Fix clustering algorithm in switch expansion.
[official-gcc.git] / gcc / ChangeLog
blob926f8bcac390cd56f38a868ab8e624a47977a421
1 2018-06-28  Martin Liska  <mliska@suse.cz>
3         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
4         Add new checking assert to catch invalid state.
5         (jump_table_cluster::can_be_handled): Handle single case
6         clusters.
7         (jump_table_cluster::is_beneficial): Bail out for such case.
8         (bit_test_cluster::find_bit_tests):
9         Add new checking assert to catch invalid state.
10         (bit_test_cluster::can_be_handled): Handle single case
11         clusters.
12         (bit_test_cluster::is_beneficial): Bail out for such case.
13         (switch_decision_tree::analyze_switch_statement):
14         Fix comment.
16 2018-06-28  Martin Liska  <mliska@suse.cz>
18         * common.opt: Introduce -completion option.
19         * gcc.c (driver_handle_option): Handle it.
20         (driver::main): Print completions if completion
21         is set.
22         * opt-suggestions.c (option_proposer::get_completions):
23         New function.
24         (option_proposer::suggest_completion): Likewise.
25         (option_proposer::find_param_completions): Likewise.
26         (verify_autocompletions): Likewise.
27         (test_completion_valid_options): Likewise.
28         (test_completion_valid_params): Likewise.
29         (in_completion_p): Likewise.
30         (empty_completion_p): Likewise.
31         (test_completion_partial_match): Likewise.
32         (test_completion_garbage): Likewise.
33         (opt_proposer_c_tests): Likewise.
34         * opt-suggestions.h: Declare new functions.
35         * opts.c (common_handle_option): Handle OPT__completion_.
36         * selftest-run-tests.c (selftest::run_tests): Add
37         opt_proposer_c_tests.
38         * selftest.c (assert_str_startswith): New.
39         * selftest.h (assert_str_startswith): Likewise.
40         (opt_proposer_c_tests): New.
41         (ASSERT_STR_STARTSWITH): Likewise.
43 2018-06-28  Martin Liska  <mliska@suse.cz>
45         * Makefile.in: Add opt-suggestions.o.
46         * gcc-main.c: Include opt-suggestions.h.
47         * gcc.c (driver::driver): Likewise.
48         (driver::~driver): Remove m_option_suggestions.
49         (driver::build_option_suggestions): Moved to option_proposer.
50         (driver::suggest_option): Likewise.
51         (driver::handle_unrecognized_options): Use option_proposer.
52         * gcc.h (class driver): Add new memver m_option_proposer.
53         * opt-suggestions.c: New file.
54         * opt-suggestions.h: New file.
56 2018-06-28  Martin Liska  <mliska@suse.cz>
58         * vec.h (class auto_string_vec): New (moved from auto_argvec).
59         (auto_string_vec::~auto_string_vec): Likewise.
61 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
63         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
64         statement if id->reset_location is true.
65         (copy_edges_for_bb): Do not set goto_locus on the new edges if
66         id->reset_location is true.
67         (copy_phis_for_bb): Force input_location on the arguments if
68         id->reset_location is true.
69         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
70         is set on the function to be inlined.
71         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
72         prevent_decl_creation_for_types fields up and add reset_location field.
74 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
76         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
78 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
80         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
81         registers for Pmode.
82         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
83         hard registers for the clobbered pseudo.
85 2018-06-27  Paul Koning  <ni1d@arrl.net>
87         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
88         mutually exclusive options.
89         * config/pdp11/constraints.md (h): New constraint.
90         (O): Update definition to match shift code generation.
91         (D): New constraint.
92         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
93         (CCFP): Remove.
94         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
95         function.
96         (output_jump): Change arguments.
97         (pdp11_fixed_cc_regs): New function.
98         (pdp11_cc_mode): Ditto.
99         (pdp11_expand_shift): Ditto.
100         (pdp11_assemble_shift): Ditto.
101         (pdp11_small_shift): Ditto.
102         (pdp11_branch_cost): Remove.
103         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
104         from output.
105         (pdp11_register_move_cost): Update for CC registers.
106         (pdp11_rtx_costs): Add case for LSHIFTRT.
107         (pdp11_output_jump): Add CCNZ mode conditional branches.
108         (notice_update_cc_on_set): Remove.
109         (pdp11_cc_mode): New function.
110         (simple_memory_operand): Correct pre/post decrement case.
111         (no_side_effect_operand): New function.
112         (pdp11_regno_reg_class): Add CC_REGS class.
113         (pdp11_fixed_cc_regs): New function.
114         (pdp11_small_shift): New function.
115         (pdp11_expand_shift): New function to expand shift insns.
116         (pdp11_assemble_shift): New function to output shifts.
117         (pdp11_branch_cost): Remove.
118         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
119         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
120         (WCHAR_TYPE): Ditto.
121         (PTRDIFF_TYPE): Ditto.
122         (ADJUST_INSN_LENGTH): New macro.
123         (FIXED_REGISTERS): Add CC registers.
124         (CALL_USED_REGISTERS): Ditto.
125         (reg_class): Ditto.
126         (REG_CLASS_NAMES): Ditto.
127         (REG_CLASS_CONTENTS): Ditto.
128         (SELECT_CC_MODE): Use new function.
129         (TARGET_FLAGS_REGNUM): New macro.
130         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
131         (cc0_reg_rtx): Remove.
132         (CC_STATUS_MDEP): Remove.
133         (CC_STATUS_MDEFP_INIT): Remove.
134         (CC_IN_FPU): Remove.
135         (NOTICE_UPDATE_CC): Remove.
136         (REGISTER_NAMES): Add CC registers.
137         (BRANCH_COST): Change to constant 1.
138         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
139         handling.
140         * config/pdp11/pdp11.opt (mbcopy): Remove.
141         (mbcopy-builtin): Remove.
142         (mbranch-cheap): Remove.
143         (mbranch-expensive): Remove.
144         * config/pdp11/predicates.md (expand_shift_operand): Update to
145         match shift code generation.
146         (ccnz_operator): New predicate.
147         * doc/invoke.texi (PDP-11 Options): Remove deleted options
148         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
149         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
150         exclusive options.
151         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
152         description of O constraint.
154 2018-06-27  Jeff Law  <law@redhat.com>
155             Austin Law  <austinklaw@gmail.com>
157         * config/v850/v850.md (addsi3_set_flags): New pattern.
158         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
159         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
160         (zero_extendhisi2_v850_set_flags): Likewise.
161         (zero_extendqisi2_v850_set_flags): Likewise.
162         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
163         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
164         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
166         * config/v850/v850-protos.h (notice_update_cc): Remove.
167         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
168         (v850_print_operand): Handle 'D' and "d".
169         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
170         Add handling of arithmetic/logical operations compared against zero.
171         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
172         Do not look at v850_compare_op, instead get mode from last argument.
173         (v850_gen_compare): Remove
174         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
175         after reload for prologue insns.
176         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
177         patterns.
178         (construct_save_jarl): Likewise.
179         (TARGET_FLAGS_REGNUM): Define.
180         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
181         (NOTICE_UPDATE_CC): Remove.
182         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
183         than cc0.  Conditionalize on reload_completed.
184         (cmpsi_insn, setfcc_insn): Likewise.
185         (tst1 splitter): Turn into define_and_split which sets the flags
186         after reload.
187         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
188         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
189         (cstoresf4, cstoredf4): Clobber the flags.
190         (cmpsi, cmpsf, cmpdf): Remove expanders.
191         (setf_insn): Remove pattern.
192         (addsi3): Turn into define_and_split which clobbers the flags after
193         reload and a suitable pattern (addsi3_clobber_flags) for use after
194         reload.
195         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
196         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
197         (ashrsi3, ashrsi3_v850e2): Likewise.
198         (bins): Clobber the flags.
199         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
200         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
201         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
202         (call_value_internal_short, call_value_internal_long): Likewise.
203         (callt_save_interrupt, callt_return_interrupt): Likewise.
204         (save_interrupt, return_interrupt): Likewise.
205         (callt_save_all_interrupt, save_all_interrupt): Likewise.
206         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
207         (restore_all_interrupt, _restore_all_interrupt): Likewise.
208         (All FP comparisons): Only allow after reload has completed.
209         (trfsr): Likewise.
210         (divh, divhu): Tweak output template.
211         (branch_z_normal, branch_z_invert): Remove
212         (branch_nz_normal, branch_nz_invert): Likewise.
213         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
215         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
216         * config/v850/v850.c (notice_update_cc): Remove.
217         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
218         (CC_NO_CARRY): Likewise.
219         (NOTICE_UPDATE_CC): Define to nothing.
220         * config/v850/v850.md: Remove block comment on cc0 handling
221         Remove "cc" attribute from all patterns.  Remove cc_status handling
222         from all patterns.  Minor formatting fixes.
224 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
226         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
227         (cortex-a76.cortex-a55): Likewise.
228         * config/aarch64/aarch64-tune.md: Regenerate.
229         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
230         cortex-a76.cortex-a55.
232 2018-06-27  Jeff Law  <law@redhat.com>
234         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
235         (MULTILIB_DIRNAMES): Similarly.
237 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
239         * gimple.h (gimple_return_retbnd): Delete.
240         (gimple_return_set_retbnd): Likewise.
241         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
242         gimple_return_set_retbnd.
243         * gimple-pretty-print.c (dump_gimple_return): Remove call to
244         gimple_return_retbnd and adjust.
245         * tree-inline.h (struct copy_body_data): Remove retbnd field.
246         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
247         Explicitly return NULL in a couple more cases.  Move assertion
248         on debug statements and remove unreachable code.
249         (reset_debug_binding): Do not test id->retbnd.
250         (expand_call_inline): Do not set it.
252 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
254         * configure.ac: Add --disable-gcov option.
255         * configure: Regenerate.
256         * Makefile.in: Honour @enable_gcov@.
257         * doc/install.texi: Document --disable-gcov.
259 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
261         * config/arm/arm-cpus.in (cortex-a76): New entry.
262         (cortex-a76.cortex-a55): Likewise.
263         * config/arm/arm-tables.opt: Regenerate.
264         * config/arm/arm-tune.md: Likewise.
265         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
266         * doc/invoke.texi (ARM Options): Document cortex-a76 and
267         cortex-a76.cortex-a55.
269 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
271         PR target/85769
272         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
274 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
276         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
277         comment.
278         (EPILOGUE_USES): Likewise.
280 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
282         * tree-inline.c (remap_location): New function extracted from...
283         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
284         (copy_phis_for_bb): ...here.  Call remap_location.
285         (copy_cfg_body): Adjust call to copy_edges_for_bb.
287 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
289         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
290         unaligned vsx for 16B memset.
292 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
294         PR target/86285
295         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
296         ieee128_float_type_node to long_double_type_node unless
297         TARGET_LONG_DOUBLE_128 is set.
299 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
301         * cfgloop.c (get_loop_location): Convert return type from
302         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
303         by implicit construction from rtx_insn *, and using
304         dump_user_location_t::from_function_decl for the fallback case.
305         * cfgloop.h (get_loop_location): Convert return type from
306         location_t to dump_user_location_t.
307         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
308         dump_printf_loc to pass in a dump_location_t rather than a
309         location_t, via the gimple stmt.
310         * coverage.c (get_coverage_counts): Update calls to
311         dump_printf_loc to pass in dump_location_t rather than a
312         location_t.
313         * doc/optinfo.texi (Dump types): Convert example of
314         dump_printf_loc from taking "locus" to taking "insn".  Update
315         description of the "_loc" calls to cover dump_location_t.
316         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
317         "selftest.h".
318         (dump_user_location_t::dump_user_location_t): New constructors,
319         from gimple *stmt and rtx_insn *.
320         (dump_user_location_t::from_function_decl): New function.
321         (dump_loc): Make static.
322         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
323         const dump_location_t &.
324         (dump_generic_expr_loc): Delete.
325         (dump_printf_loc): Convert param "loc" from location_t to
326         const dump_location_t &.
327         (selftest::test_impl_location): New function.
328         (selftest::dumpfile_c_tests): New function.
329         * dumpfile.h: Include "profile-count.h".
330         (class dump_user_location_t): New class.
331         (struct dump_impl_location_t): New struct.
332         (class dump_location_t): New class.
333         (dump_printf_loc): Convert 2nd param from source_location to
334         const dump_location_t &.
335         (dump_generic_expr_loc): Delete.
336         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
337         const dump_location_t &.
338         * gimple-fold.c (fold_gimple_assign): Update call to
339         dump_printf_loc to pass in a dump_location_t rather than a
340         location_t, via the gimple stmt.
341         (gimple_fold_call): Likewise.
342         * gimple-loop-interchange.cc
343         (loop_cand::analyze_iloop_reduction_var): Update for change to
344         check_reduction_path.
345         (tree_loop_interchange::interchange): Update for change to
346         find_loop_location.
347         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
348         change in return-type of find_loop_location.
349         (graphite_regenerate_ast_isl): Likewise.
350         * graphite-optimize-isl.c (optimize_isl): Likewise.
351         * graphite.c (graphite_transform_loops): Likewise.
352         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
353         pass in a dump_location_t rather than a location_t, via the
354         gimple stmt.
355         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
356         * ipa.c (walk_polymorphic_call_targets): Likewise.
357         * loop-unroll.c (report_unroll): Convert "locus" param from
358         location_t to dump_location_t.
359         (decide_unrolling): Update for change to get_loop_location's
360         return type.
361         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
362         location_t to dump_user_location_t.
363         (grid_find_single_omp_among_assignments_1): Updates calls to
364         dump_printf_loc to pass in a dump_location_t rather than a
365         location_t, via the gimple stmt.
366         (grid_parallel_clauses_gridifiable): Convert "tloc" from
367         location_t to dump_location_t.  Updates calls to dump_printf_loc
368         to pass in a dump_location_t rather than a location_t, via the
369         gimple stmt.
370         (grid_inner_loop_gridifiable_p): Likewise.
371         (grid_dist_follows_simple_pattern): Likewise.
372         (grid_gfor_follows_tiling_pattern): Likewise.
373         (grid_target_follows_gridifiable_pattern): Likewise.
374         (grid_attempt_target_gridification): Convert initialization
375         of local "grid" from memset to zero-initialization; FIXME: does
376         this require C++11?  Update call to dump_printf_loc to pass in a
377         optinfo_location rather than a location_t, via the gimple stmt.
378         * profile.c (read_profile_edge_counts): Updates call to
379         dump_printf_loc to pass in a dump_location_t rather than a
380         location_t
381         (compute_branch_probabilities): Likewise.
382         * selftest-run-tests.c (selftest::run_tests): Call
383         dumpfile_c_tests.
384         * selftest.h (dumpfile_c_tests): New decl.
385         * tree-loop-distribution.c (pass_loop_distribution::execute):
386         Update for change in return type of find_loop_location.
387         * tree-parloops.c (parallelize_loops): Likewise.
388         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
389         "locus" from location_t to dump_user_location_t.
390         (canonicalize_loop_induction_variables): Likewise.
391         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
392         for change in return type of find_loop_location.
393         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
394         to dump_printf_loc to pass in a dump_location_t rather than a
395         location_t, via the stmt.
396         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
397         Likewise.
398         * tree-vect-loop-manip.c (find_loop_location): Convert return
399         type from source_location to dump_user_location_t.
400         (vect_do_peeling): Update for above change.
401         (vect_loop_versioning): Update for change in type of
402         vect_location.
403         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
404         from location_t to dump_user_location_t.
405         (vect_estimate_min_profitable_iters): Update for change in type
406         of vect_location.
407         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
408         location_t to dump_location_t.
409         (vect_slp_bb): Update for change in type of vect_location.
410         * tree-vectorizer.c (vect_location): Convert from source_location
411         to dump_user_location_t.
412         (try_vectorize_loop_1): Update for change in vect_location's type.
413         (vectorize_loops): Likewise.
414         (increase_alignment): Likewise.
415         * tree-vectorizer.h (vect_location): Convert from source_location
416         to dump_user_location_t.
417         (find_loop_location): Convert return type from source_location to
418         dump_user_location_t.
419         (check_reduction_path): Convert 1st param from location_t to
420         dump_user_location_t.
421         * value-prof.c (check_counter): Update call to dump_printf_loc to
422         pass in a dump_user_location_t rather than a location_t; update
423         call to error_at for change in type of "locus".
424         (check_ic_target): Update call to dump_printf_loc to
425         pass in a dump_user_location_t rather than a location_t, via the
426         call_stmt.
428 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
430         * config/s390/s390.h (enum processor_flags): Do not use
431         default tune parameter when -march was specified.
433 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
435         PR target/86314
436         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
437         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
438         operands.
440 2018-06-26  Richard Biener  <rguenther@suse.de>
442         PR tree-optimization/86287
443         PR bootstrap/86316
444         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
445         (vect_analyze_loop): Initialize n_stmts.
447 2018-06-26  Richard Biener  <rguenther@suse.de>
449         PR middle-end/86271
450         * fold-const.c (fold_convertible_p): Pointer extension
451         isn't valid.
453 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
455         PR debug/86064
456         * dwarf2out.c (loc_list_has_views): Adjust comments.
457         (dw_loc_list): Split single cross-partition range with
458         nonzero locview.
460 2018-06-25  Jeff Law  <law@redhat.com>
462         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
463         on -mbig-switch by default.
465         * config/v850/predicates.md (const_float_1_operand): Fix match_code
466         test.
467         (const_float_0_operand): Remove unused predicate.
468         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
469         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
470         (recipsf2): New expander.  Original pattern now called
471         (recipsf2_insn).
472         (recipdf2, recipdf2_insn): Similarly.
473         (rsqrtsf2, rsqrtsf2_insn): Similarly
474         (rsqrtdf2, rsqrtdf2_insn): Similarly
476 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
478         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
479         Simplify logic for FreeBSD (twice).
481 2018-06-25  Martin Sebor  <msebor@redhat.com>
483         PR tree-optimization/86204
484         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
485         a strnlen result if it's less than the length of the string.
487 2018-06-25  Martin Sebor  <msebor@redhat.com>
489         PR tree-optimization/85700
490         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
491         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
492         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
494 2018-06-25  Martin Sebor  <msebor@redhat.com>
496         * doc/extend.texi (Zero-length arrays): Update and clarify.
498 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
500         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
501         added IEEE/IBM long double multilib support on PowerPC little
502         endian Linux systems.
503         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
504         (MULTILIB_DEFAULTS): Likewise.
505         * config/rs6000/rs6000.c (rs6000_option_override_internal):
506         Likewise.
507         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
508         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
509         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
511 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
513         PR middle-end/86311
514         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
515         (REORDER_45): Likewise.
517 2018-06-25  Jeff Law  <law@redhat.com>
519         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
520         dividend to 32 bits.  Adjust length.
521         (udivmodhi4): Cleanup output template.  Fix length.
523 2018-06-25  Carl Love  <cel@us.ibm.com>
525         * config/rs6000/vsx.md: Change word selector to prefered location.
527 2018-06-25  Richard Biener  <rguenther@suse.de>
529         PR tree-optimization/86304
530         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
531         epilogue-if-converted loops as well.
533 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
535         * lto-section-out.c (lto_begin_section): Do not print section
536         name for noaddr and unnumbered dumps.
538 2018-06-25  Richard Biener  <rguenther@suse.de>
540         * tree-vectorizer.h (struct vec_info_shared): New structure
541         with parts split out from struct vec_info and loop_nest from
542         struct _loop_vec_info.
543         (struct vec_info): Adjust accordingly.
544         (struct _loop_vec_info): Likewise.
545         (LOOP_VINFO_LOOP_NEST): Adjust.
546         (LOOP_VINFO_DATAREFS): Likewise.
547         (LOOP_VINFO_DDRS): Likewise.
548         (struct _bb_vec_info): Likewise.
549         (BB_VINFO_DATAREFS): Likewise.
550         (BB_VINFO_DDRS): Likewise.
551         (struct _stmt_vec_info): Add dr_aux member.
552         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
553         (DR_MISALIGNMENT_UNINITIALIZED): New.
554         (set_dr_misalignment): Adjust.
555         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
556         (vect_analyze_loop): Adjust prototype.
557         (vect_analyze_loop_form): Likewise.
558         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
559         Compute dependences lazily.
560         (vect_record_base_alignments): Use shared datarefs/ddrs.
561         (vect_verify_datarefs_alignment): Likewise.
562         (vect_analyze_data_refs_alignment): Likewise.
563         (vect_analyze_data_ref_accesses): Likewise.
564         (vect_analyze_data_refs): Likewise.
565         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
566         constructor parameter for shared part.
567         (vect_analyze_loop_form): Pass in shared part and adjust.
568         (vect_analyze_loop_2): Pass in storage for the number of
569         stmts.  Move loop nest finding to the caller.  Compute
570         datarefs lazily.
571         (vect_analyze_loop): Pass in shared part.
572         (vect_transform_loop): Verify shared datarefs are unchanged.
573         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
574         constructor parameter for shared part.
575         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
576         (vect_slp_bb): Verify shared datarefs are unchanged before
577         transform.
578         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
579         change.
580         (new_stmt_vec_info): Initialize DR_AUX misalignment to
581         DR_MISALIGNMENT_UNINITIALIZED.
582         * tree-vectorizer.c (vec_info::vec_info): Add constructor
583         parameter for shared part.
584         (vec_info::~vec_info): Adjust.
585         (vec_info_shared::vec_info_shared): New.
586         (vec_info_shared::~vec_info_shared): Likewise.
587         (vec_info_shared::save_datarefs): Likewise.
588         (vec_info_shared::check_datarefs): Likewise.
589         (try_vectorize_loop_1): Construct shared part live for analyses
590         of a single loop for multiple vector sizes.
591         * tree-parloops.c (gather_scalar_reductions): Adjust.
593 2018-06-25  Richard Biener  <rguenther@suse.de>
595         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
596         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
597         (vect_analyze_data_refs): Remove similar code from here and
598         simplify accordingly.
600 2018-06-25  Richard Biener  <rguenther@suse.de>
602         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
603         for reverse storage order accesses rather than asserting
604         they cannot happen here.
606 2018-06-25  Tom de Vries  <tdevries@suse.de>
608         PR debug/86257
609         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
610         Use data16 instead of .byte for insn prefix.
612 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
614         PR C++/86082
615         * parser.c (make_char_string_pack): Pass this literal chars
616         through cpp_interpret_string.
617         (cp_parser_userdef_numeric_literal): Check the result of
618         make_char_string_pack.
620 2018-06-24  Maya Rashish  <coypu@sdf.org>
622         * ginclude/stddef.h: Simplify conditions around avoiding
623         re-definition of __size_t.
625 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
627         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
628         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
630 2018-06-22  Maya Rashish  <coypu@sdf.org>
632         * doc/invoke.texi (mno-fancy-math-387): Update for changes
633         made to OpenBSD and NetBSD through the years.
635 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
637         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
638         behavior of vec_pack (vector double, vector double) to match
639         behavior of vec_float2 (vector double, vector double).
641 2018-06-22  Olivier Hainque  <hainque@adacore.com>
643         * gimplify.c (gimplify_function_tree): Prevent creation
644         of a trampoline for the address of the current function
645         passed to entry/exit instrumentation hooks.
647 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
649         PR target/86222
650         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
651         correctly.
653 2018-06-22  Martin Liska  <mliska@suse.cz>
655         PR tree-optimization/86263
656         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
657         Bail out if is_enabled is false.
658         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
659         New declaration.
660         (jump_table_cluster::is_enabled): New function.
662 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
664         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
665         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
666         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
667         (lto_input_ts_binfo_tree_pointers): Likewise.
668         * tree-streamer-out.c (streamer_write_tree_bitfields,
669         write_ts_binfo_tree_pointers): Likewise.
670         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
672 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
674         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
676 2018-06-22  Martin Liska  <mliska@suse.cz>
678         * symbol-summary.h (get): Make it pure and inline move
679         functionality from ::get function.
680         (get): Remove and inline into ::get and ::get_create.
681         (get_create): Move code from ::get function.
683 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
685         PR target/85994
686         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
687         -x assembler-with-cpp.
689 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
691         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
692         _FILE_OFFSET_BITS=64 for C++.
694 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
696         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
697         conversion insn that shows up when pr85657-3.c is compiled using
698         IEEE 128-bit long double.
699         (neg<mode>2_internal): Use the correct mode to check whether the
700         mode is IBM extended.
701         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
702         multiply and divide external functions from being created more
703         than once.
705 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
707         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
708         functions.
709         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
710         the edge can be forwarded.
711         (cfg_layout_merge_blocks): Likewise.
713 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
715         * except.c (finish_eh_generation): Commit edge insertions only after
716         the EH edges have been redirected from post-landing to landing pads.
718 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
720         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
721         create_tmp_var_for to create the FRAME decl.
722         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
724 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
726         * tree-inline.c (copy_edges_for_bb): Minor tweak.
727         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
728         debug statement when resetting its value.
729         (expand_call_inline): Copy the locus of the call onto the assignment
730         of the return value, if any.  Use local variable in more cases.
732 2018-06-21  Martin Liska  <mliska@suse.cz>
734         * ipa-pure-const.c (propagate_nothrow): Use
735         funct_state_summaries->get.
736         (dump_malloc_lattice): Likewise.
737         (propagate_malloc): Likewise.
739 2018-06-21  Richard Biener  <rguenther@suse.de>
741         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
742         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
743         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
744         comment.
745         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
746         BLOCK_ABSTRACT_ORIGIN unconditionally.
748 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
750         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
751         deleting it.
752         * ipa-reference.c (ipa_reference_c_finalize): Delete
753         ipa_ref_opt_sum_summaries and set it to NULL.
755 2018-06-21  Tom de Vries  <tdevries@suse.de>
757         PR tree-optimization/85859
758         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
759         test with comment from bb_no_side_effects_p.
761 2018-06-21  Richard Biener  <rguenther@suse.de>
763         PR tree-optimization/86232
764         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
765         max for constant niter.
767 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
769         * config/aarch64/aarch64-simd.md
770         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
772 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
774         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
775         Make opernads of the unspec commutative.
777 2018-06-21  Richard Biener  <rguenther@suse.de>
779         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
780         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
781         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
782         (vect_analyze_data_ref_dependence): Re-order checks to deal with
783         NULL DR_STEP.
784         (vect_record_base_alignments): Do not record base alignment
785         for gathers or scatters.
786         (vect_compute_data_ref_alignment): Drop return value that is always
787         true.  Bail out early for gathers or scatters.
788         (vect_enhance_data_refs_alignment): Bail out early for gathers
789         or scatters.
790         (vect_find_same_alignment_drs): Likewise.
791         (vect_analyze_data_refs_alignment): Remove dead code.
792         (vect_slp_analyze_and_verify_node_alignment): Likewise.
793         (vect_analyze_data_refs): For possible gathers or scatters do
794         not create an alternate DR, just check their possible validity
795         and mark them.  Adjust DECL_NONALIASED handling to not rely
796         on DR_BASE_ADDRESS.
797         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
798         update inits of gathers or scatters.
799         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
800         Also copy gather/scatter flag to pattern vinfo.
802 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
804         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
805         behavior of vec_packsu (vector unsigned long long, vector unsigned
806         long long) to match behavior of vec_packs with same signature.
808 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
809             Thomas Schwinge <thomas@codesourcery.com>
810             Cesar Philippidis  <cesar@codesourcery.com>
812         * gimplify.c (gimplify_scan_omp_clauses): Add support for
813         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
814         (gimplify_adjust_omp_clauses): Likewise.
815         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
816         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
817         (gimplify_omp_target_update): Update handling of acc update and
818         enter/exit data.
819         * omp-low.c (install_var_field): Remove unused parameter
820         base_pointers_restrict.
821         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
822         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
823         FINALIZE}
824         (omp_target_base_pointers_restrict_p): Delete.
825         (scan_omp_target): Update call to scan_sharing_clauses.
826         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
827         FINALIZE}.
828         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
829         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
830         (convert_local_omp_clauses): Likewise.
831         * tree-pretty-print.c (dump_omp_clause): Likewise.
832         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
833         FINALIZE}.
834         (omp_clause_code_name): Likewise.
836 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
838         PR debug/86194
839         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
840         be narrowed.
842         PR tree-optimization/86231
843         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
844         anti-range don't overwrite *vr0min before using it to compute *vr0max.
846 2018-06-20  Tom de Vries  <tdevries@suse.de>
848         PR tree-optimization/86097
849         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
850         iv type if signedness of iv type is not the same as that of *nit.
852 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
854         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
855         EDGE_EH edges, verify they are all EDGE_EH.
857 2018-06-20  Maya Rashish  <coypu@sdf.org>
859         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
861 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
863         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
864         * config/aarch64/aarch64.c (xgene1_tunings): Add
865         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
866         (aarch64_mode_valid_for_sched_fusion_p):
867         Allow 16-byte modes.
868         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
869         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
870         128-bit modes.
871         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
872         New pattern.
873         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
874         * config/aarch64/iterators.md (VQ2): New mode iterator.
876 2018-06-20  Martin Liska  <mliska@suse.cz>
878         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
879         Change default ratio from 10 to 8.
881 2018-06-20  Martin Liska  <mliska@suse.cz>
883         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
884         New.
885         (bit_test_cluster::find_bit_tests): Likewise.
886         (switch_decision_tree::analyze_switch_statement): Find clusters.
887         * tree-switch-conversion.h (struct jump_table_cluster): Document
888         hierarchy.
890 2018-06-20  Martin Liska  <mliska@suse.cz>
892         * tree-switch-conversion.c (switch_conversion::collect):
893         Record m_uniq property.
894         (switch_conversion::expand): Bail out for special conditions.
895         (group_cluster::~group_cluster): New.
896         (group_cluster::group_cluster): Likewise.
897         (group_cluster::dump): Likewise.
898         (jump_table_cluster::emit): New.
899         (switch_decision_tree::fix_phi_operands_for_edges): New.
900         (struct case_node): Remove struct.
901         (jump_table_cluster::can_be_handled): New.
902         (case_values_threshold): Moved to header.
903         (reset_out_edges_aux): Likewise.
904         (jump_table_cluster::is_beneficial): New.
905         (bit_test_cluster::can_be_handled): Likewise.
906         (add_case_node): Remove.
907         (bit_test_cluster::is_beneficial): New.
908         (case_bit_test::cmp): New.
909         (bit_test_cluster::emit): New.
910         (expand_switch_as_decision_tree_p): Remove.
911         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
912         (fix_phi_operands_for_edge): Likewise.
913         (switch_decision_tree::analyze_switch_statement): New.
914         (compute_cases_per_edge): Move ...
915         (switch_decision_tree::compute_cases_per_edge): ... here.
916         (try_switch_expansion): Likewise.
917         (switch_decision_tree::try_switch_expansion): Likewise.
918         (record_phi_operand_mapping): Likewise.
919         (switch_decision_tree::record_phi_operand_mapping): Likewise.
920         (emit_case_decision_tree): Likewise.
921         (switch_decision_tree::emit): Likewise.
922         (balance_case_nodes): Likewise.
923         (switch_decision_tree::balance_case_nodes): Likewise.
924         (dump_case_nodes): Likewise.
925         (switch_decision_tree::dump_case_nodes): Likewise.
926         (emit_jump): Likewise.
927         (switch_decision_tree::emit_jump): Likewise.
928         (emit_cmp_and_jump_insns): Likewise.
929         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
930         (emit_case_nodes): Likewise.
931         (switch_decision_tree::emit_case_nodes): Likewise.
932         (conditional_probability): Remove.
933         * tree-switch-conversion.h (enum cluster_type): New.
934         (PRINT_CASE): New.
935         (struct cluster): Likewise.
936         (cluster::cluster): Likewise.
937         (struct simple_cluster): Likewise.
938         (simple_cluster::simple_cluster): Likewise.
939         (struct group_cluster): Likewise.
940         (struct jump_table_cluster): Likewise.
941         (struct bit_test_cluster): Likewise.
942         (struct min_cluster_item): Likewise.
943         (struct case_tree_node): Likewise.
944         (case_tree_node::case_tree_node): Likewise.
945         (jump_table_cluster::case_values_threshold): Likewise.
946         (struct case_bit_test): Likewise.
947         (struct switch_decision_tree): Likewise.
948         (struct switch_conversion): Likewise.
949         (switch_decision_tree::reset_out_edges_aux): Likewise.
951 2018-06-20  Martin Liska  <mliska@suse.cz>
953         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
954         (hoist_edge_and_branch_if_true): Likewise.
955         (expand_switch_using_bit_tests_p): Likewise.
956         (struct case_bit_test): Likewise.
957         (case_bit_test_cmp): Likewise.
958         (emit_case_bit_tests): Likewise.
959         (switch_conversion::switch_conversion): New class.
960         (struct switch_conv_info): Remove old struct.
961         (collect_switch_conv_info): More to ...
962         (switch_conversion::collect): ... this.
963         (check_range): Likewise.
964         (switch_conversion::check_range): Likewise.
965         (check_all_empty_except_final): Likewise.
966         (switch_conversion::check_all_empty_except_final): Likewise.
967         (check_final_bb): Likewise.
968         (switch_conversion::check_final_bb): Likewise.
969         (create_temp_arrays): Likewise.
970         (switch_conversion::create_temp_arrays): Likewise.
971         (free_temp_arrays): Likewise.
972         (gather_default_values): Likewise.
973         (switch_conversion::gather_default_values): Likewise.
974         (build_constructors): Likewise.
975         (switch_conversion::build_constructors): Likewise.
976         (constructor_contains_same_values_p): Likewise.
977         (switch_conversion::contains_same_values_p): Likewise.
978         (array_value_type): Likewise.
979         (switch_conversion::array_value_type): Likewise.
980         (build_one_array): Likewise.
981         (switch_conversion::build_one_array): Likewise.
982         (build_arrays): Likewise.
983         (switch_conversion::build_arrays): Likewise.
984         (gen_def_assigns): Likewise.
985         (switch_conversion::gen_def_assigns): Likewise.
986         (prune_bbs): Likewise.
987         (switch_conversion::prune_bbs): Likewise.
988         (fix_phi_nodes): Likewise.
989         (switch_conversion::fix_phi_nodes): Likewise.
990         (gen_inbound_check): Likewise.
991         (switch_conversion::gen_inbound_check): Likewise.
992         (process_switch): Use the newly created class.
993         (switch_conversion::expand): New.
994         (switch_conversion::~switch_conversion): New.
995         * tree-switch-conversion.h: New file.
997 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
999         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
1000         tree-vect-patterns.c.
1001         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
1002         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
1003         (vect_recog_sad_pattern): Likewise.
1004         (vect_recog_widen_sum_pattern): Likewise.
1005         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
1006         (vect_recog_widen_shift_pattern): Remove the type_in argument.
1007         (vect_recog_rotate_pattern): Likewise.
1008         (vect_recog_mult_pattern): Likewise.
1009         (vect_recog_vector_vector_shift_pattern): Likewise.
1010         (vect_recog_divmod_pattern): Likewise.
1011         (vect_recog_mixed_size_cond_pattern): Likewise.
1012         (vect_recog_bool_pattern): Likewise.
1013         (vect_recog_mask_conversion_pattern): Likewise.
1014         (vect_try_gather_scatter_pattern): Likewise.
1015         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
1016         (vect_recog_over_widening_pattern): Likewise.
1017         (vect_recog_gather_scatter_pattern): Likewise.
1018         (vect_recog_func_ptr): Move from tree-vectorizer.h
1019         (vect_vect_recog_func_ptrs): Move further down the file.
1020         (vect_recog_func): Likewise.  Remove the third argument.
1021         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
1022         (vect_pattern_recog_1): Expect the pattern function to do any
1023         necessary target tests.  Also expect it to provide a vector type.
1024         Remove the type_in handling.
1026 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1028         * tree-vect-patterns.c (vect_pattern_detected): New function.
1029         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
1030         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
1031         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
1032         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
1033         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
1034         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
1035         (vect_recog_mask_conversion_pattern)
1036         (vect_try_gather_scatter_pattern): Likewise.
1038 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1040         * tree-vect-patterns.c (vect_get_internal_def): New function.
1041         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1042         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
1043         (search_type_for_mask_1): Use it.
1045 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1047         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
1048         redundant WIDEN_SUM_EXPR handling.
1049         (vect_recog_sad_pattern): Likewise.
1051 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1053         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
1054         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
1055         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
1056         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
1057         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
1059 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1061         * tree-vect-stmts.c (vectorizable_call): Make sure that we
1062         use the stmt_vec_info of the original bb statement for the
1063         new zero assignment, even if the call is part of a pattern.
1065 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1067         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
1068         that the sequence is attached to the original statement rather
1069         than the pattern statement.
1070         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
1071         PATTERN_DEF_SEQ from the original statement rather than
1072         the main pattern statement.
1073         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
1074         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
1075         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
1077 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1079         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
1080         definition statements before the early exit for statements that aren't
1081         live or relevant.
1082         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
1083         split out from...
1084         (vect_transform_loop): ...here.  Process pattern definition
1085         statements without first checking whether the main pattern
1086         statement is live or relevant.
1088 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
1090         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
1091         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
1092         
1093 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
1095         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
1096         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
1097         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
1098         (expand_block_compare): Change select_block_compare_mode call.
1099         (expand_strncmp_align_check): Use new functions, fix comment.
1100         (emit_final_str_compare_gpr): New function.
1101         (expand_strn_compare): Refactor and clean up code.
1102         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
1104 2018-06-19  Tony Reix  <tony.reix@atos.com>
1105             Damien Bergamini  <damien.bergamini@atos.com>
1106             David Edelsohn  <dje.gcc@gmail.com>
1108         * collect2.c (static_obj): New variable.
1109         (static_libs): New variable.
1110         (is_in_list): Uncomment declaration.
1111         (main): Track AIX libraries linked statically.
1112         (is_in_list): Uncomment definition.
1113         (scan_prog_file): Don't add AIX shared libraries initializer
1114         to constructor list if linking statically.
1116 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
1118         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
1119         constant.
1120         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
1122 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
1124         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
1125         blocks.
1127 2018-06-19  Martin Liska  <mliska@suse.cz>
1129         * config/i386/i386.c (ix86_can_inline_p): Do not use
1130         ipa_fn_summaries::get_create.
1131         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
1132         get.
1133         (devirtualization_time_bonus): Likewise.
1134         (ipcp_propagate_stage): Likewise.
1135         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
1136         (edge_set_predicate): Likewise.
1137         (evaluate_conditions_for_known_args): Likewise.
1138         (evaluate_properties_for_edge): Likewise.
1139         (ipa_call_summary::reset): Tranform to ...
1140         (ipa_call_summary::~ipa_call_summary): ... this.
1141         (ipa_fn_summary::reset): Transform to ...
1142         (ipa_fn_summary::~ipa_fn_summary): ... this.
1143         (ipa_fn_summary_t::remove): Rename to ...
1144         (ipa_fn_summary_t::remove_callees): ... this.
1145         (ipa_fn_summary_t::duplicate): Use placement new
1146         instead of memory copy.
1147         (ipa_call_summary_t::duplicate): Likewise.
1148         (ipa_call_summary_t::remove): Remove.
1149         (dump_ipa_call_summary): Change get_create to get.
1150         (ipa_dump_fn_summary): Dump only when summary exists.
1151         (analyze_function_body): Use symbol_summary::get instead
1152         of get_create.
1153         (compute_fn_summary): Likewise.
1154         (estimate_edge_devirt_benefit): Likewise.
1155         (estimate_edge_size_and_time): Likewise.
1156         (inline_update_callee_summaries): Likewise.
1157         (remap_edge_change_prob): Likewise.
1158         (remap_edge_summaries): Likewise.
1159         (ipa_merge_fn_summary_after_inlining): Likewise.
1160         (write_ipa_call_summary): Likewise.
1161         (ipa_fn_summary_write): Likewise.
1162         (ipa_free_fn_summary): Likewise.
1163         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
1164         (struct ipa_call_summary): Likewise.
1165         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
1166         of get_create.
1167         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
1168         (estimate_size_after_inlining): Likewise.
1169         (estimate_growth): Likewise.
1170         (growth_likely_positive): Likewise.
1171         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
1172         (inline_call): Likewise.
1173         * ipa-inline.c (caller_growth_limits): Likewise.
1174         (can_inline_edge_p): Likewise.
1175         (can_inline_edge_by_limits_p): Likewise.
1176         (compute_uninlined_call_time): Likewise.
1177         (compute_inlined_call_time): Likewise.
1178         (want_inline_small_function_p): Likewise.
1179         (edge_badness): Likewise.
1180         (update_caller_keys): Likewise.
1181         (update_callee_keys): Likewise.
1182         (inline_small_functions): Likewise.
1183         (inline_to_all_callers_1): Likewise.
1184         (dump_overall_stats): Likewise.
1185         (early_inline_small_functions): Likewise.
1186         (early_inliner): Likewise.
1187         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
1188         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1189         * ipa-pure-const.c (malloc_candidate_p): Likewise.
1190         * ipa-split.c (execute_split_functions): Likewise.
1191         * symbol-summary.h: Likewise.
1192         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
1194 2018-06-19  Richard Biener  <rguenther@suse.de>
1196         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
1197         (vectorize_loops): ... here.  Fix dbgcnt handling.
1198         (try_vectorize_loop): Wrap try_vectorize_loop_1.
1200 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
1202         PR target/86197
1203         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
1204         ieee128 argument takes up only one (vector) register, not two (floating
1205         point) registers.
1207 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
1209         * gimplify.c (gimplify_init_constructor): Really never clear for an
1210         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
1212 2018-06-19  Richard Biener  <rguenther@suse.de>
1214         PR tree-optimization/86179
1215         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
1216         after failed recognition.
1218 2018-06-18  Martin Sebor  <msebor@redhat.com>
1220         PR middle-end/85602
1221         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
1222         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
1223         Handle integer subtraction.
1224         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
1225         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
1227 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
1229         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
1230         param from rtx to rtx_insn *.
1231         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
1232         param.
1233         (frv_ifcvt_modify_insn): Likwise.
1234         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
1235         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
1236         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
1237         as_a <rtx_insn *> cast to local "unprotected_region" once
1238         it's been established that it's not NULL or pc_rtx.
1239         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
1240         param "sethi" from rtx to rtx_insn *.
1241         (nds32_group_float_insns): Likewise for param "insn".
1242         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
1243         param.
1244         (vax_output_int_subtract): Likewise.
1245         * config/vax/vax.c (vax_output_int_add): Likewise for param
1246         "insn".
1247         (vax_output_int_subtract): Likewise.
1248         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
1249         (emit_pattern_after): Likewise for param "after".
1250         (emit_insn_after): Likewise.
1251         (emit_jump_insn_after): Likewise.
1252         (emit_call_insn_after): Likewise.
1253         (emit_debug_insn_after): Likewise.
1254         (emit_pattern_before): Likewise for param "before".
1255         (emit_insn_before): Likewise.
1256         (emit_jump_insn_before): Likewise.
1257         * final.c (get_insn_template): Likewise for param "insn", removing
1258         a cast.
1259         * output.h (get_insn_template): Likewise for 2nd param.
1260         * rtl.h (emit_insn_before): Likewise.
1261         (emit_jump_insn_before): Likewise.
1262         (emit_debug_insn_before_noloc): Likewise.
1263         (emit_insn_after): Likewise.
1264         (emit_jump_insn_after): Likewise.
1265         (emit_call_insn_after): Likewise.
1266         (emit_debug_insn_after): Likewise.
1267         (set_insn_deleted): Likewise for param.
1269 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
1271         PR target/85358
1272         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
1273         floating point modes, so that IFmode is numerically greater than
1274         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
1275         to declare the ordering.  This prevents IFmode from being
1276         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
1277         machine.  Include rs6000-modes.h to share the fractional values
1278         between genmodes* and the rest of the compiler.
1279         (IFmode): Likewise.
1280         (KFmode): Likewise.
1281         (TFmode): Likewise.
1282         * config/rs6000/rs6000-modes.h: New file.
1283         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
1284         meaning of rs6000_long_double_size so that 126..128 selects an
1285         appropriate 128-bit floating point type.
1286         (rs6000_option_override_internal): Likewise.
1287         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
1288         (TARGET_LONG_DOUBLE_128): Change the meaning of
1289         rs6000_long_double_size so that 126..128 selects an appropriate
1290         128-bit floating point type.
1291         (LONG_DOUBLE_TYPE_SIZE): Update comment.
1292         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
1293         source and destination to match the standard usage.
1294         (truncifkf2): Likewise.
1295         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
1296         ISA 2.07 to use an explicit clobber, instead of passing in a
1297         temporary.
1298         (copysign<mode>3_soft): Likewise.
1300 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
1302         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
1303         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
1304         (vect_slp_analyze_instance_dependence): Likewise.
1305         (vect_enhance_data_refs_alignment): Likewise.
1306         (vect_analyze_data_refs_alignment): Likewise.
1307         (vect_slp_analyze_and_verify_instance_alignment
1308         (vect_analyze_data_ref_accesses): Likewise.
1309         (vect_prune_runtime_alias_test_list): Likewise.
1310         (vect_analyze_data_refs): Likewise.
1311         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
1312         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
1313         (vect_analyze_scalar_cycles_1): Likewise.
1314         (vect_get_loop_niters): Likewise.
1315         (vect_analyze_loop_form_1): Likewise.
1316         (vect_update_vf_for_slp): Likewise.
1317         (vect_analyze_loop_operations): Likewise.
1318         (vect_analyze_loop): Likewise.
1319         (vectorizable_induction): Likewise.
1320         (vect_transform_loop): Likewise.
1321         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
1322         * tree-vect-slp.c (vect_analyze_slp): Likewise.
1323         (vect_make_slp_decision): Likewise.
1324         (vect_detect_hybrid_slp): Likewise.
1325         (vect_slp_analyze_operations): Likewise.
1326         (vect_slp_bb): Likewise.
1327         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
1328         (vectorizable_bswap): Likewise.
1329         (vectorizable_call): Likewise.
1330         (vectorizable_simd_clone_call): Likewise.
1331         (vectorizable_conversion): Likewise.
1332         (vectorizable_assignment): Likewise.
1333         (vectorizable_shift): Likewise.
1334         (vectorizable_operation): Likewise.
1335         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
1337 2018-06-18  Martin Sebor  <msebor@redhat.com>
1339         PR tree-optimization/81384
1340         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
1341         * builtins.c (expand_builtin_strnlen): New function.
1342         (expand_builtin): Call it.
1343         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
1344         * builtins.def (BUILT_IN_STRNLEN): New.
1345         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
1346         Warn for bounds in excess of maximum object size.
1347         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
1348         single-value ranges.  Handle strnlen.
1349         (handle_builtin_strlen): Handle strnlen.
1350         (strlen_check_and_optimize_stmt): Same.
1351         * doc/extend.texi (Other Builtins): Document strnlen.
1353 2018-06-18  Maya Rashish  <coypu@sdf.org>
1355         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
1356         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
1357         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
1359         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
1360         here to ...
1361         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
1363 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1365         * tree.c (escaped_string::escape): Replace cast to char * by
1366         const_cast<char *> (unescaped).
1368 2018-06-18  Nick Clifton  <nickc@redhat.com>
1370         PR 84195
1371         * tree.c (escaped_string): New class.  Converts an unescaped
1372         string into its escaped equivalent.
1373         (warn_deprecated_use): Use the new class to convert the
1374         deprecation message, if present.
1375         (test_escaped_strings): New self test.
1376         (test_c_tests): Add test_escaped_strings.
1377         * doc/extend.texi (deprecated): Add a note that the
1378         deprecation message is affected by the -fmessage-length
1379         option, and that control characters will be escaped.
1380         (#pragma GCC error): Document this pragma.
1381         (#pragma GCC warning): Likewise.
1382         * doc/invoke.texi (-fmessage-length): Document this option's
1383         effect on the #warning and #error preprocessor directives and
1384         the deprecated attribute.
1386 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
1388         * tree.c (decl_value_expr_lookup): Revert latest change.
1389         (decl_value_expr_insert): Likewise.
1391 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
1393         * gimplify.c (nonlocal_vlas): Delete.
1394         (nonlocal_vla_vars): Likewise.
1395         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
1396         referenced VLAs.
1397         (gimplify_body): Do not create and destroy nonlocal_vlas.
1398         * tree-nested.c: Include diagnostic.h.
1399         (use_pointer_in_frame): Tweak.
1400         (lookup_field_for_decl): Add assertion and declare the transformation.
1401         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
1402         internal error when the reference is in a wrong context.  Do not
1403         create a debug decl by default.
1404         (note_nonlocal_block_vlas): Delete.
1405         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
1406         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
1407         create a debug decl by default.
1408         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
1409         call is in a wrong context.
1410         (fixup_vla_decls): New function.
1411         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
1412         debug variables were created.
1413         * tree.c (decl_value_expr_lookup): Add checking assertion.
1414         (decl_value_expr_insert): Likewise.
1416 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
1418         PR middle-end/82479
1419         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
1420         * tree-scalar-evolution.c (interpret_expr): Likewise.
1421         (expression_expensive_p): Likewise.
1422         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
1423         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
1424         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
1425         (ssa_defined_by_minus_one_stmt_p): New.
1427 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
1429         PR middle-end/64946
1430         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
1431         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
1432         * dojump.c (do_jump): Likewise.
1433         * expr.c (expand_expr_real_2): Check operand type's sign.
1434         * fold-const.c (const_unop): Handle ABSU_EXPR.
1435         (fold_abs_const): Likewise.
1436         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
1437         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
1438         (strip_sign_op_1): Likesise.
1439         * match.pd: Add new pattern to generate ABSU_EXPR.
1440         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
1441         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
1442         * tree-eh.c (operation_could_trap_helper_p): Likewise.
1443         * tree-inline.c (estimate_operator_cost): Likewise.
1444         * tree-pretty-print.c (dump_generic_node): Likewise.
1445         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
1446         * tree.def (ABSU_EXPR): New.
1448 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
1450         PR middle-end/86095
1451         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
1452         documented as preserved for backward compatibility only.
1453         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
1455         PR rtl-optimization/86108
1456         * bb-reorder.c (create_forwarder_block): Renamed to ...
1457         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
1458         jump from new landing pad to the second part.
1459         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
1460         Adjust callers.
1462 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
1464         PR middle-end/85878
1465         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
1466         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
1467         Only call store_expr for halves if the mode is the same.
1469         PR middle-end/86123
1470         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
1471         Fix up comment formatting.
1473 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1475         * typed-splay-tree.h (typed_splay_tree::remove): New function.
1476         (typed_splay_tree::closure,
1477         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
1478         (typed_splay_tree::typed_splay_tree,
1479         typed_splay_tree::operator =): Declared private.
1480         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
1481         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
1482         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
1483         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
1484         typed_splay_tree::splay_tree_splay,
1485         typed_splay_tree::splay_tree_foreach_helper,
1486         typed_splay_tree::splay_tree_insert,
1487         typed_splay_tree::splay_tree_remove,
1488         typed_splay_tree::splay_tree_lookup,
1489         typed_splay_tree::splay_tree_predecessor,
1490         typed_splay_tree::splay_tree_successor,
1491         typed_splay_tree::splay_tree_min,
1492         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
1493         (typed_splay_tree::root, typed_splay_tree::comp,
1494         typed_splay_tree::delete_key,
1495         typed_splay_tree::delete_value): New data members.
1496         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
1497         typed_splay_tree::remove.
1499 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
1501         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
1502         -mginv and -mno-ginv to the assembler.
1503         * config/mips/mips.opt (-mcrc): New option.
1504         (-mginv): Likewise.
1505         * doc/invoke.text (-mcrc): Document.
1506         (-mginv): Likewise.
1508 2018-06-15  Nick Clifton  <nickc@redhat.com>
1510         PR 84195
1511         * tree.c (escaped_string): New class.  Converts an unescaped
1512         string into its escaped equivalent.
1513         (warn_deprecated_use): Use the new class to convert the
1514         deprecation message, if present.
1515         (test_escaped_strings): New self test.
1516         (test_c_tests): Add test_escaped_strings.
1517         * doc/extend.texi (deprecated): Add a note that the
1518         deprecation message is affected by the -fmessage-length
1519         option, and that control characters will be escaped.
1520         (#pragma GCC error): Document this pragma.
1521         (#pragma GCC warning): Likewise.
1522         * doc/invoke.texi (-fmessage-length): Document this option's
1523         effect on the #warning and #error preprocessor directives and
1524         the deprecated attribute.
1526 2018-06-15  Richard Biener  <rguenther@suse.de>
1528         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
1529         here, also noting vector size used.
1530         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
1531         size used in MSG_OPTIMIZED_LOCATIONS dump.
1532         (pass_slp_vectorize::execute): Adjust.
1534 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
1536         PR target/85968
1537         * config/arc/arc.c (arc_return_address_register): Fix
1538         if-condition.
1540 2018-06-15  Richard Biener  <rguenther@suse.de>
1542         PR middle-end/86159
1543         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
1544         leave useless conversion stripping to force_gimple_operand_gsi.
1545         (gimplify_build2): Likewise.
1546         (gimplify_build1): Likewise.
1548 2018-06-15  Richard Biener  <rguenther@suse.de>
1550         PR middle-end/86076
1551         * tree-cfg.c (move_stmt_op): unshare invariant addresses
1552         before adjusting their block.
1554 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1556         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
1557         multilibs for *-*-rtems*.
1558         * config/riscv/t-rtems: New file.
1560 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
1562         PR middle-end/86122
1563         * match.pd ((A +- CST1) +- CST2): Punt if last resort
1564         unsigned_type_for returns NULL.
1566         PR target/85945
1567         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
1568         subregs of multi-word pseudos unless the float mode has word size.
1570 2018-06-14  Richard Biener  <rguenther@suse.de>
1572         PR middle-end/86139
1573         * tree-vect-generic.c (build_word_mode_vector_type): Remove
1574         duplicate and harmful type_hash_canon.
1575         * tree.c (type_hash_canon): Assert we didn't find ourselves.
1577 2018-06-14  Richard Biener  <rguenther@suse.de>
1579         PR ipa/86124
1580         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
1581         NULL cgraph_node.
1583 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1585         * config/rtems.h (STDINT_LONG32): Define.
1587 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
1588             Prachi Godbole  <prachi.godbole@imgtec.com>
1590         * config/mips/mips-cpus.def: Define P6600.
1591         * config/mips/mips-tables.opt: Regenerate.
1592         * config/mips/mips.c (mips_ucbranch_type): New enum.
1593         (mips_rtx_cost_data): Add support for P6600.
1594         (mips_issue_rate): Likewise.
1595         (mips_multipass_dfa_lookahead): Likewise.
1596         (mips_avoid_hazard): Likewise.
1597         (mips_reorg_process_insns): Likewise.
1598         (mips_classify_branch_p6600): New function.
1599         * config/mips/mips.h (TUNE_P6600): New define.
1600         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
1601         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
1602         * config/mips/mips.md: Include p6600.md.
1603         (processor): Add p6600.
1604         * config/mips/p6600.md: New file.
1605         * doc/invoke.texi: Add p6600 to supported architectures.
1607 2018-06-13  Martin Sebor  <msebor@redhat.com>
1609         PR tree-optimization/86114
1610         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
1611         of integer types.
1612         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
1614 2018-06-13  Richard Biener  <rguenther@suse.de>
1616         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
1617         Properly set vector type of the intermediate stmt.
1618         * tree-vect-stmts.c (vectorizable_operation): The destination
1619         var always has vectype_out type.
1621 2018-06-13  Jeff Law  <law@redhat.com>
1623         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
1624         integer 0 for argument to print_rtl_with_bb.
1625         (rl78_reorg): Likewise.
1627 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
1629         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
1630         from rtx to rtx_insn *.
1631         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
1632         "label".
1633         (add_sched_insns_for_speculation): Likewise for local "target",
1634         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
1635         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
1636         from rtx_insn ** to rtx_code_label **.
1637         (reorg_emit_nops): Likewise.
1638         (c6x_reorg): Likewise for local "call_labels".
1639         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
1640         rtx to rtx_insn *.
1641         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
1642         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
1643         the loops over LABEL_REFS.
1644         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
1645         braf_label.
1646         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
1647         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
1648         (split_branches): Strengthen local "olabel" from rtx to
1649         rtx_insn *, adding a safe_as_a cast.
1650         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
1651         to "rtx_insn *".
1652         (add_insn_after): Likewise for first two params.
1653         (add_insn_before): Likewise.
1654         (remove_insn): Likewise for param.
1655         (emit_pattern_before_noloc): Likewise for second and third params.
1656         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
1657         (emit_call_insn_before_noloc): Likewise.
1658         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
1659         to "rtx_insn *".
1660         (emit_barrier_before): Likewise.
1661         (emit_label_before): Strengthen "label" param from "rtx" to
1662         "rtx_code_label *".  Strengthen "before" param from "rtx" to
1663         "rtx_insn *".
1664         (emit_insn_after_1): Strengthen "after" param from "rtx" to
1665         "rtx_insn *".
1666         (emit_pattern_after_noloc): Likewise.
1667         (emit_insn_after_noloc): Likewise.
1668         (emit_jump_insn_after_noloc): Likewise.
1669         (emit_call_insn_after_noloc): Likewise.
1670         (emit_debug_insn_after_noloc): Likewise.
1671         (emit_barrier_after): Likewise.
1672         (emit_label_after): Likewise for both params.
1673         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
1674         "loc" param from "int" to "location_t".
1675         (emit_insn_after_setloc): Likewise.
1676         (emit_jump_insn_after_setloc): Likewise.
1677         (emit_call_insn_after_setloc): Likewise.
1678         (emit_debug_insn_after_setloc): Likewise.
1679         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
1680         "loc" param from "int" to "location_t".
1681         (emit_pattern_before): Convert NULL_RTX to NULL.
1682         (emit_insn_before_setloc): Convert "loc" param from "int" to
1683         "location_t".
1684         (emit_jump_insn_before_setloc): Likewise.
1685         (emit_call_insn_before_setloc): Likewise.
1686         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
1687         rtx_insn *.  Convert "loc" param from "int" to "location_t".
1688         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
1689         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
1690         Convert 3rd param from "int" to "location_t".
1691         (emit_barrier_before, emit_barrier_after, next_real_insn):
1692         Strengthen param from rtx to rtx_insn *.
1693         (emit_label_before): Strengthen 1st param from "rtx" to
1694         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
1695         "rtx_insn *".
1696         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
1697         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
1698         Strengthen 2nd param from "rtx" to "rtx_insn *".
1699         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
1700         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
1701         Likewise. Convert 3rd param from "int" to "location_t".
1702         (emit_label_after): Strengthen 1st param from "rtx" to
1703         "rtx_code_label *".
1704         (next_real_insn, remove_insn): Strengthen param from "rtx" to
1705         "rtx_insn *".
1706         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
1707         from "rtx" to "rtx_insn *".
1709 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
1711         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
1712         bodies streamed in with -Q.
1713         * dumpfile.c (dump_files): Add lto-stream-out dump file.
1714         * dumpfile.h (tree_dump_index): Add lto_stream_out.
1715         * gimple-streamer-out.c: Include gimple-pretty-print.h
1716         (output_bb): Dump stmts streamed.
1717         * lto-section-out.c: Include print-tree.h
1718         (lto_begin_section): Dump sections created.
1719         (lto_output_decl_index): Dump decl encoded.
1720         * lto-streamer-out.c: Include print-tree.h
1721         (create_output_block): Dump output block created.
1722         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
1723         (output_function): Dump function output.
1724         (output_constructor): Dump constructor streamed.
1725         (write_global_stream): Output indexes encoded.
1726         (produce_asm_for_decls): Dump streams encoded.
1727         * lto-streamer.c (streamer_dump_file): New global var.
1728         * lto-streamer.h (streamer_dump_file): Declare.
1729         * passes.c (ipa_write_summaries): Initialize streamer dump.
1730         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
1731         in.
1733 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
1735         PR target/86048
1736         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
1737         offsets for register save directives.  Emit a second batch of save
1738         directives, if need be, when the function accesses prior frames.
1740 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1742         * config/arc/fpu.md (fmasf4): Force operand to register.
1743         (fnmasf4): Likewise.
1745 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1747         * config/arc/arc-protos.h (arc_pad_return): Remove.
1748         * config/arc/arc.c (machine_function): Remove force_short_suffix
1749         and size_reason.
1750         (arc_print_operand): Adjust printing of '&'.
1751         (arc_verify_short): Remove conditional printing of short suffix.
1752         (arc_final_prescan_insn): Remove reference to size_reason.
1753         (pad_return): New function.
1754         (arc_reorg): Call pad_return.
1755         (arc_pad_return): Remove.
1756         (arc_init_machine_status): Remove reference to force_short_suffix.
1757         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
1758         (attr length): When attribute iscompact is true force to 2
1759         regardless; in the case of maybe check if we want to force the
1760         instruction to have 4 bytes length.
1761         (nopv): Change it to generate 4 byte long nop as well.
1762         (blockage): New pattern.
1763         (simple_return): Remove call to arc_pad_return.
1764         (p_return_i): Likewise.
1766 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1768         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1770 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1772         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
1773         ARC cores.
1775 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1777         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
1778         for ARC700 and ARCv2.
1780 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
1782         PR target/86076
1783         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
1784         operands[2] instead of operands[1].
1787 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
1789         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
1790         case, check whether the outer register overlaps an unallocatable
1791         register, not just whether it fits the required class.
1793 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
1795         * poly-int.h (can_div_trunc_p): Add new overload in which all values
1796         are poly_ints.
1797         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
1798         (memrefs_conflict_p): Likewise.
1799         (init_alias_analysis): Likewise.
1800         * cfgexpand.c (expand_debug_expr): Likewise.
1801         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
1802         * cse.c (fold_rtx): Likewise.
1803         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
1804         * expr.c (emit_block_move_hints): Likewise.
1805         (clear_storage_hints, push_block, emit_push_insn): Likewise.
1806         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
1807         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
1808         (emit_group_store): Likewise.
1809         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
1810         to read the PRE/POST_MODIFY increment.
1811         * calls.c (store_one_arg): Use strip_offset.
1812         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
1813         poly_int_rtx_p.
1814         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
1815         by a VEC_SELECT.
1816         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
1817         (simplify_binary_operation_1): Extend CONST_INT handling to
1818         poly_int_rtx_p.
1819         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
1820         than a HOST_WIDE_INT.
1821         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
1822         poly_int64.
1823         (adjust_mems, add_stores): Update accodingly.
1824         (vt_canonicalize_addr): Track polynomial offsets.
1825         (emit_note_insn_var_location): Likewise.
1826         (vt_add_function_parameter): Likewise.
1827         (vt_initialize): Likewise.
1829 2018-06-12  Jeff Law  <law@redhat.com>
1831         * config.gcc (alpha*-*-freebsd*): Remove.
1832         * config/alpha/freebsd.h: Remove.
1834 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
1836         PR other/69968
1837         * spellcheck-tree.c (levenshtein_distance): Rename to...
1838         (get_edit_distance): ...this, and update for underlying renaming.
1839         * spellcheck-tree.h (levenshtein_distance): Rename to...
1840         (get_edit_distance): ...this.
1841         * spellcheck.c (levenshtein_distance): Rename to...
1842         (get_edit_distance): ...this.  Convert from Levenshtein distance
1843         to Damerau-Levenshtein distance by supporting transpositions of
1844         adjacent characters.  Rename "v1" to "v_next" and "v0" to
1845         "v_one_ago".
1846         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
1847         (selftest::test_edit_distance_unit_test_oneway): ...this, and
1848         update for underlying renaming.
1849         (selftest::levenshtein_distance_unit_test): Rename to...
1850         (selftest::test_get_edit_distance_unit): ...this, and update for
1851         underlying renaming.
1852         (selftest::test_find_closest_string): Add example from PR 69968
1853         where transposition helps
1854         (selftest::test_metric_conditions): Update for renaming.
1855         (selftest::test_metric_conditions): Likewise.
1856         (selftest::spellcheck_c_tests): Likewise.
1857         * spellcheck.h (levenshtein_distance): Rename both overloads to...
1858         (get_edit_distance): ...this.
1859         (best_match::consider): Update for renaming.
1861 2018-06-12  Martin Sebor  <msebor@redhat.com>
1863         PR tree-optimization/85259
1864         * builtins.c (compute_objsize): Handle constant offsets.
1865         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
1866         true iff a warning has been issued.
1867         * gimple.h (gimple_nonartificial_location): New function.
1868         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
1869         gimple_nonartificial_location and handle -Wno-system-headers.
1870         (handle_builtin_stxncpy): Same.
1872 2018-06-12  Martin Sebor  <msebor@redhat.com>
1874         PR c/85931
1875         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
1877 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
1879         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
1880         BUILTIN_VEC_XST entries for pointer to double and long long.
1882 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
1884         PR target/85990
1885         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
1886         Update comments.
1887         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
1888         Likewise.
1890 2018-06-12  Martin Liska  <mliska@suse.cz>
1892         * doc/options.texi: Document IntegerRange.
1894 2018-06-12  Martin Liska  <mliska@suse.cz>
1896         * config/i386/i386.opt: Make MPX-related options as Deprecated.
1897         * opt-functions.awk: Handle Deprecated flag.
1898         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
1899         and report error.
1900         (read_cmdline_option): Report warning for a deprecated option.
1901         * opts.h (struct cl_option): Add new field cl_deprecated.
1902         (CL_ERR_DEPRECATED): New.
1904 2018-06-12  Martin Liska  <mliska@suse.cz>
1906         * doc/options.texi: Document Deprecated option flag.
1908 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1910         * config/arc/arc-arch.h (arc_extras): New enum.
1911         (arc_cpu_t):Add field extra.
1912         (arc_cpu_types): Consider the extras.
1913         * config/arc/arc-cpus.def: Add extras info.
1914         * config/arc/arc-opts.h (processor_type): Consider extra field.
1915         * config/arc/arc.c (arc_override_options): Handle extra field.
1917 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1919         * config/arc/arc-arch.h: Update ARC_OPTX macro.
1920         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
1921         field.
1922         * config/arc/arc.c (arc_init): Update pic warning.
1923         (irq_range): Update irq range parsing warnings.
1924         (arc_override_options): Update various warning messages.
1925         (arc_handle_aux_attribute): Likewise.
1927 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
1929         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
1931 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1933         * doc/sourcebuild.texi: Document usage of line number 0 in verify
1934         compiler messages directives.
1936 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
1938         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
1939         * config/mips/mips-tables.opt: Regenerate.
1940         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
1941         mips64r6.
1942         * doc/invoke.texi: Document -march=i6500.
1944 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
1946         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
1947         (i6400_gpmul): Add cpu_unit.
1948         (i6400_gpdiv): Likewise.
1949         (i6400_msa_add_d): Update reservations.
1950         (i6400_msa_int_add) Likewise.
1951         (i6400_msa_short_logic3) Likewise.
1952         (i6400_msa_short_logic2) Likewise.
1953         (i6400_msa_short_logic) Likewise.
1954         (i6400_msa_move) Likewise.
1955         (i6400_msa_cmp) Likewise.
1956         (i6400_msa_short_float2) Likewise.
1957         (i6400_msa_div_d) Likewise.
1958         (i6400_msa_long_logic1) Likewise.
1959         (i6400_msa_long_logic2) Likewise.
1960         (i6400_msa_mult) Likewise.
1961         (i6400_msa_long_float2) Likewise.
1962         (i6400_msa_long_float4) Likewise.
1963         (i6400_msa_long_float5) Likewise.
1964         (i6400_msa_long_float8) Likewise.
1965         (i6400_fpu_fadd): Include frint type.
1966         (i6400_fpu_store): New define_insn_reservation.
1967         (i6400_fpu_load): Likewise.
1968         (i6400_fpu_move): Likewise.
1969         (i6400_fpu_fcmp): Likewise.
1970         (i6400_fpu_fmadd): Likewise.
1971         (i6400_int_mult): Include imul3nc type and update reservation.
1972         (i6400_int_div): Include idiv3 type and update reservation.
1973         (i6400_int_load): Update to check type not move_type.
1974         (i6400_int_store): Likewise.
1975         (i6400_int_prefetch): Set zero latency.
1977 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
1979         * gcc.c: Document new %@{...} sequence.
1980         (LINK_COMMAND_SPEC): Use it for the -L switches.
1981         (cpp_unique_options): Use it for the -I switches.
1982         (at_file_argbuf): New global variable.
1983         (in_at_file): Likewise.
1984         (alloc_args): Create at_file_argbuf.
1985         (clear_args): Truncate at_file_argbuf.
1986         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
1987         (open_at_file): New function.
1988         (close_at_file): Likewise.
1989         (create_at_file): Delete.
1990         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
1991         <'o'>: Likewise.
1992         <'@'>: New case.
1993         (validate_switches_from_spec): Deal with %@{...} sequence.
1994         (validate_switches): Likewise.
1995         (driver::finalize): Call clear_args.
1997 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
1999         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
2001 2018-06-11  Martin Sebor  <msebor@redhat.com>
2003         * doc/invoke.texi (-Wall): List -Wc++17-compat.
2004         (Wno-class-memaccess): Add @opindex.
2005         (Wno-templates, Wno-multiple-inheritance): Same.
2006         (Wno-virtual-inheritance, Wno-namespaces): Same.
2007         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
2008         (Wno-format-overflow, Wno-format-truncation): Same.
2009         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
2010         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
2011         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
2012         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
2013         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
2014         (Wno-misspelled-isr): Same.
2016 2018-06-11  Martin Sebor  <msebor@redhat.com>
2018         * PR tree-optimization/86083
2019         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
2021 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
2023         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
2025 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
2027         PR target/85755
2028         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
2029         on the correct operand.
2030         (*movdi_internal64): Ditto.
2032 2018-06-11  Martin Liska  <mliska@suse.cz>
2034         PR tree-optimization/86089
2035         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
2037 2018-06-11  Julia Koval  <julia.koval@intel.com>
2039         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
2040         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
2041         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
2043 2018-06-11  Olivier Hainque  <hainque@adacore.com>
2045         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
2046         for Ada with strict dwarf2.
2048 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
2050         PR target/85755
2051         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
2052         addresses.
2054 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
2056         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
2058 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
2060         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
2061         TARGET_ELF.
2063 2018-06-08  Martin Liska  <mliska@suse.cz>
2065         * tree-cfg.h (debug_function): Fix argument type to match
2066         implementation.
2068 2018-06-08  Martin Liska  <mliska@suse.cz>
2070         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
2071         Remove usage of MPX-related (and removed) fields.
2072         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
2074 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
2076         * cfg.c (debug): Use TDF_NONE rather than 0.
2077         * cfghooks.c (debug): Likewise.
2078         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
2079         (struct dump_option_value_info): Convert to...
2080         (struct kv_pair): ...this template type.
2081         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
2082         rather than 0.
2083         (optinfo_verbosity_options): Likewise.
2084         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
2085         OPTGROUP_NONE.
2086         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
2087         than int for "optgroup_flags" param.
2088         (dump_generic_expr_loc): Use dump_flags_t rather than int for
2089         "dump_kind" param.
2090         (dump_dec): Likewise.
2091         (dump_finish): Use TDF_NONE rather than 0.
2092         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
2093         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
2094         than 0.  Update for change to option_ptr.
2095         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
2096         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
2097         0.  Update for changes to optinfo_verbosity_options and
2098         optgroup_options.
2099         (opt_info_switch_p): Convert optgroup_flags from int to
2100         optgroup_flags_t.
2101         (dump_basic_block): Use dump_flags_t rather than int
2102         for "dump_kind" param.
2103         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
2104         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
2105         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
2106         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
2107         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
2108         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
2109         TDF_NONE): Convert from macros to...
2110         (enum dump_flag): ...this new enum.
2111         (dump_flags_t): Update to use enum.
2112         (operator|, operator&, operator~, operator|=, operator&=):
2113         Implement for dump_flags_t.
2114         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
2115         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
2116         Convert from macros to...
2117         (enum optgroup_flag): ...this new enum.
2118         (optgroup_flags_t): New typedef.
2119         (operator|, operator|=): Implement for optgroup_flags_t.
2120         (struct dump_file_info): Convert field "alt_flags" to
2121         dump_flags_t.  Convert field "optgroup_flags" to
2122         optgroup_flags_t.
2123         (dump_basic_block): Use dump_flags_t rather than int for param.
2124         (dump_generic_expr_loc): Likewise.
2125         (dump_dec): Likewise.
2126         (dump_register): Convert param "optgroup_flags" to
2127         optgroup_flags_t.
2128         (opt_info_enable_passes): Likewise.
2129         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
2130         than 0.
2131         * gimple-pretty-print.c (debug): Likewise.
2132         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
2133         (merged_store_group::apply_stores): Likewise.
2134         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
2135         * gimple.c (verify_gimple_pp): Likewise.
2136         * graphite-poly.c (print_pbb_body): Likewise.
2137         * passes.c (pass_manager::register_one_dump_file): Convert
2138         local "optgroup_flags" to optgroup_flags_t.
2139         * print-tree.c (print_node): Use TDF_NONE rather than 0.
2140         (debug): Likewise.
2141         (debug_body): Likewise.
2142         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
2143         to optgroup_flags_t.
2144         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
2145         than 0.
2146         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
2147         (convert_mult_to_fma): Likewise.
2148         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
2149         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
2150         * tree-vect-data-refs.c (dump_lower_bound): Convert param
2151         "dump_kind" to dump_flags_t.
2153 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
2155         * config/rs6000/rs6000.c (min, max): Delete.
2157 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
2159         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
2160         -mabi=spe and -mabi=no-spe.
2162 2018-06-08  Martin Liska  <mliska@suse.cz>
2164         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
2165         where we expect an existing summary.
2167 2018-06-08  Martin Liska  <mliska@suse.cz>
2169         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
2170         * ipa-inline.h (estimate_edge_growth): Likewise.
2172 2018-06-08  Martin Liska  <mliska@suse.cz>
2174         * cgraph.c (function_version_hasher::hash): Use
2175         cgraph_node::get_uid ().
2176         (function_version_hasher::equal):
2177         * cgraph.h (cgraph_node::get_uid): New method.
2178         * ipa-inline.c (update_caller_keys): Use
2179         cgraph_node::get_uid ().
2180         (update_callee_keys): Likewise.
2181         * ipa-utils.c (searchc): Likewise.
2182         (ipa_reduced_postorder): Likewise.
2183         * lto-cgraph.c (input_node): Likewise.
2184         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
2185         * symbol-summary.h (symtab_insertion): Likewise.
2186         (symtab_removal): Likewise.
2187         (symtab_duplication): Likewise.
2188         * tree-pretty-print.c (dump_function_header): Likewise.
2189         * tree-sra.c (convert_callers_for_node): Likewise.
2191 2018-06-08  Martin Liska  <mliska@suse.cz>
2193         * cgraph.c (symbol_table::create_edge): Always assign a new
2194         unique number.
2195         (symbol_table::free_edge): Do not recycle numbers.
2196         * cgraph.h (cgraph_edge::get): New method.
2197         * symbol-summary.h (symtab_removal): Use it.
2198         (symtab_duplication): Likewise.
2199         (call_summary::hashable_uid): Remove.
2201 2018-06-08  Martin Liska  <mliska@suse.cz>
2203         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
2204         (initialize_growth_caches): Remove.
2205         (free_growth_caches): Likewise.
2206         (do_estimate_edge_time): Use edge_growth_cache.
2207         (do_estimate_edge_size): Likewise.
2208         (do_estimate_edge_hints): Likewise.
2209         * ipa-inline.c (reset_edge_caches): Likewise.
2210         (recursive_inlining): Likewise.
2211         (inline_small_functions): Likewise.
2212         * ipa-inline.h (initialize_growth_caches): Remove.
2213         (estimate_edge_size): Likewise.
2214         (estimate_edge_time): Likewise.
2215         (estimate_edge_hints): Likewise.
2216         (reset_edge_growth_cache): Likewise.
2217         * symbol-summary.h (call_summary::remove): New method.
2219 2018-06-08  Martin Liska  <mliska@suse.cz>
2221         * ipa-cp.c (class edge_clone_summary): New summary.
2222         (grow_edge_clone_vectors): Remove.
2223         (ipcp_edge_duplication_hook): Remove.
2224         (class edge_clone_summary_t): New call_summary class.
2225         (ipcp_edge_removal_hook): Remove.
2226         (edge_clone_summary_t::duplicate): New function.
2227         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
2228         (create_specialized_node): Likewise.
2229         (ipcp_driver): Initialize edge_clone_summaries and do not
2230         register hooks.
2232 2018-06-08  Martin Liska  <mliska@suse.cz>
2234         * symbol-summary.h (get): New function.
2235         (call_summary::m_initialize_when_cloning): New class member.
2237 2018-06-08  Martin Liska  <mliska@suse.cz>
2239         * cgraph.c (cgraph_node::remove): Do not recycle uid.
2240         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
2241         (symbol_table::allocate_cgraph_symbol): Do not set uid.
2242         * passes.c (uid_hash_t): Record removed_nodes by their uids.
2243         (remove_cgraph_node_from_order): Use the removed_nodes set.
2244         (do_per_function_toporder): Likwise.
2245         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
2246         instead of summary_uid.
2247         (symtab_removal): Likewise.
2248         (symtab_duplication): Likewise.
2250 2018-06-08  Martin Liska  <mliska@suse.cz>
2252         * ipa-cp.c (ipcp_store_bits_results): Use
2253         ipcp_transformation_sum.
2254         (ipcp_store_vr_results): Likewise.
2255         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
2256         to ...
2257         (ipcp_transformation_initialize): ... this.
2258         (ipa_set_node_agg_value_chain):
2259         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
2260         (write_ipcp_transformation_info): Likewise.
2261         (read_ipcp_transformation_info): Likewise.
2262         (ipcp_update_bits): Likewise.
2263         (ipcp_update_vr): Likewise.
2264         (ipcp_transform_function): Likewise.
2265         * ipa-prop.h: Rename ipcp_transformation_summary to
2266         ipcp_transformation.
2267         (class ipcp_transformation_t): New function summary.
2268         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
2269         (ipa_get_agg_replacements_for_node): Likewise.
2271 2018-06-08  Martin Liska  <mliska@suse.cz>
2273         * ipa-pure-const.c (struct funct_state_d): Do it class instead
2274         of struct.
2275         (class funct_state_summary_t): New function_summary class.
2276         (has_function_state): Remove.
2277         (get_function_state): Likewise.
2278         (set_function_state): Likewise.
2279         (add_new_function): Likewise.
2280         (funct_state_summary_t::insert): New function.
2281         (duplicate_node_data): Remove.
2282         (remove_node_data): Remove.
2283         (funct_state_summary_t::duplicate): New function.
2284         (register_hooks): Create new funct_state_summaries.
2285         (pure_const_generate_summary): Use it.
2286         (pure_const_write_summary): Likewise.
2287         (pure_const_read_summary): Likewise.
2288         (propagate_pure_const): Likewise.
2289         (propagate_nothrow): Likewise.
2290         (dump_malloc_lattice): Likewise.
2291         (propagate_malloc): Likewise.
2292         (execute): Do not register hooks, just remove summary
2293         instead.
2294         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
2295         constructor.
2297 2018-06-08  Martin Liska  <mliska@suse.cz>
2299         * ipa-reference.c (remove_node_data): Remove.
2300         (duplicate_node_data): Likewise.
2301         (class ipa_ref_var_info_summary_t): New class.
2302         (class ipa_ref_opt_summary_t): Likewise.
2303         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
2304         (get_reference_optimization_summary): Use
2305         ipa_ref_opt_sum_summaries.
2306         (set_reference_vars_info): Remove.
2307         (set_reference_optimization_summary): Likewise.
2308         (ipa_init): Create summaries.
2309         (init_function_info): Use function summary.
2310         (ipa_ref_opt_summary_t::duplicate): New function.
2311         (ipa_ref_opt_summary_t::remove): New function.
2312         (get_read_write_all_from_node): Fix GNU coding style.
2313         (propagate): Use function summary.
2314         (write_node_summary_p): Fix GNU coding style.
2315         (stream_out_bitmap): Likewise.
2316         (ipa_reference_read_optimization_summary): Use function summary.
2317         (ipa_reference_c_finalize): Do not release hooks.
2319 2018-06-08  Martin Liska  <mliska@suse.cz>
2321         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
2322         (analyze_function_body): Extract multiple calls of get_create.
2323         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
2324         * ipa-inline.c (recursive_inlining): Use ::get method.
2325         * ipa-inline.h (estimate_edge_growth): Likewise.
2327 2018-06-08  Martin Liska  <mliska@suse.cz>
2329         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
2330         HSA_INVALID.
2331         (hsa_function_summary::hsa_function_summary): Use the new enum
2332         value.
2333         (hsa_gpu_implementation_p): Use hsa_summaries::get.
2334         * hsa-gen.c (hsa_get_host_function): Likewise.
2335         (get_brig_function_name): Likewise.
2336         * ipa-hsa.c (process_hsa_functions): Likewise.
2337         (ipa_hsa_write_summary): Likewise.
2338         * symbol-summary.h (symtab_duplication): Use ::get function/
2339         (get): New function.
2341 2018-06-08  Martin Liska  <mliska@suse.cz>
2343         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
2344         of get.
2345         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
2346         (hsa_register_kernel): Likewise.
2347         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
2348         * hsa-gen.c (hsa_get_host_function): Likewise.
2349         (get_brig_function_name): Likewise.
2350         (generate_hsa): Likewise.
2351         (pass_gen_hsail::execute): Likewise.
2352         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
2353         (devirtualization_time_bonus): Likewise.
2354         (ipcp_propagate_stage): Likewise.
2355         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
2356         (edge_set_predicate): Likewise.
2357         (evaluate_conditions_for_known_args): Likewise.
2358         (evaluate_properties_for_edge): Likewise.
2359         (ipa_fn_summary::reset): Likewise.
2360         (ipa_fn_summary_t::duplicate): Likewise.
2361         (dump_ipa_call_summary): Likewise.
2362         (ipa_dump_fn_summary): Likewise.
2363         (analyze_function_body): Likewise.
2364         (compute_fn_summary): Likewise.
2365         (estimate_edge_devirt_benefit): Likewise.
2366         (estimate_edge_size_and_time): Likewise.
2367         (estimate_calls_size_and_time): Likewise.
2368         (estimate_node_size_and_time): Likewise.
2369         (inline_update_callee_summaries): Likewise.
2370         (remap_edge_change_prob): Likewise.
2371         (remap_edge_summaries): Likewise.
2372         (ipa_merge_fn_summary_after_inlining): Likewise.
2373         (ipa_update_overall_fn_summary): Likewise.
2374         (read_ipa_call_summary): Likewise.
2375         (inline_read_section): Likewise.
2376         (write_ipa_call_summary): Likewise.
2377         (ipa_fn_summary_write): Likewise.
2378         (ipa_free_fn_summary): Likewise.
2379         * ipa-hsa.c (process_hsa_functions): Likewise.
2380         (ipa_hsa_write_summary): Likewise.
2381         (ipa_hsa_read_section): Likewise.
2382         * ipa-icf.c (sem_function::merge): Likewise.
2383         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
2384         (do_estimate_edge_time): Likewise.
2385         (estimate_size_after_inlining): Likewise.
2386         (estimate_growth): Likewise.
2387         (growth_likely_positive): Likewise.
2388         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
2389         (inline_call): Likewise.
2390         * ipa-inline.c (caller_growth_limits): Likewise.
2391         (can_inline_edge_p): Likewise.
2392         (can_inline_edge_by_limits_p): Likewise.
2393         (compute_uninlined_call_time): Likewise.
2394         (compute_inlined_call_time): Likewise.
2395         (want_inline_small_function_p): Likewise.
2396         (edge_badness): Likewise.
2397         (update_caller_keys): Likewise.
2398         (update_callee_keys): Likewise.
2399         (recursive_inlining): Likewise.
2400         (inline_small_functions): Likewise.
2401         (inline_to_all_callers_1): Likewise.
2402         (dump_overall_stats): Likewise.
2403         (early_inline_small_functions): Likewise.
2404         (early_inliner): Likewise.
2405         * ipa-inline.h (estimate_edge_growth): Likewise.
2406         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
2407         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2408         * ipa-prop.h (IPA_NODE_REF): Likewise.
2409         (IPA_EDGE_REF): Likewise.
2410         * ipa-pure-const.c (malloc_candidate_p): Likewise.
2411         (propagate_malloc): Likewise.
2412         * ipa-split.c (execute_split_functions): Likewise.
2413         * symbol-summary.h: Rename get to get_create.
2414         (get): Likewise.
2415         (get_create): Likewise.
2416         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2418 2018-06-08  Martin Liska  <mliska@suse.cz>
2420         * symbol-summary.h (release): Move definition out of class
2421         declaration.
2422         (symtab_removal): Likewise.
2423         (symtab_duplication): Likewise.
2425 2018-06-08  Martin Liska  <mliska@suse.cz>
2427         * symbol-summary.h (function_summary): Move constructor
2428         implementation out of class declaration.
2429         (release): Likewise.
2430         (symtab_insertion): Likewise.
2431         (symtab_removal): Likewise.
2432         (symtab_duplication): Likewise.
2433         (get): Likewise.
2435 2018-06-08  Martin Liska  <mliska@suse.cz>
2437         * Makefile.in: Remove support for MPX (macros, related functions,
2438         fields in cgraph_node, ...).
2439         * builtin-types.def (BT_BND): Likewise.
2440         (BT_FN_BND_CONST_PTR): Likewise.
2441         (BT_FN_CONST_PTR_BND): Likewise.
2442         (BT_FN_VOID_PTR_BND): Likewise.
2443         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
2444         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
2445         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
2446         (expand_builtin_mempcpy_with_bounds): Likewise.
2447         (expand_builtin_memset_with_bounds): Likewise.
2448         (expand_builtin_memset_args): Likewise.
2449         (std_expand_builtin_va_start): Likewise.
2450         (expand_builtin): Likewise.
2451         (expand_builtin_with_bounds): Likewise.
2452         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
2453         (DEF_LIB_BUILTIN_CHKP): Likewise.
2454         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
2455         (DEF_CHKP_BUILTIN): Likewise.
2456         (BUILT_IN_MEMCPY): Likewise.
2457         (BUILT_IN_MEMMOVE): Likewise.
2458         (BUILT_IN_MEMPCPY): Likewise.
2459         (BUILT_IN_MEMSET): Likewise.
2460         (BUILT_IN_STPCPY): Likewise.
2461         (BUILT_IN_STRCAT): Likewise.
2462         (BUILT_IN_STRCHR): Likewise.
2463         (BUILT_IN_STRCPY): Likewise.
2464         (BUILT_IN_STRLEN): Likewise.
2465         (BUILT_IN_MEMCPY_CHK): Likewise.
2466         (BUILT_IN_MEMMOVE_CHK): Likewise.
2467         (BUILT_IN_MEMPCPY_CHK): Likewise.
2468         (BUILT_IN_MEMSET_CHK): Likewise.
2469         (BUILT_IN_STPCPY_CHK): Likewise.
2470         (BUILT_IN_STRCAT_CHK): Likewise.
2471         (BUILT_IN_STRCPY_CHK): Likewise.
2472         * calls.c (store_bounds): Likewise.
2473         (emit_call_1): Likewise.
2474         (special_function_p): Likewise.
2475         (maybe_warn_nonstring_arg): Likewise.
2476         (initialize_argument_information): Likewise.
2477         (finalize_must_preallocate): Likewise.
2478         (compute_argument_addresses): Likewise.
2479         (expand_call): Likewise.
2480         * cfgexpand.c (expand_call_stmt): Likewise.
2481         (expand_return): Likewise.
2482         (expand_gimple_stmt_1): Likewise.
2483         (pass_expand::execute): Likewise.
2484         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
2485         (cgraph_node::remove): Likewise.
2486         (cgraph_node::dump): Likewise.
2487         (cgraph_node::verify_node): Likewise.
2488         * cgraph.h (chkp_function_instrumented_p): Likewise.
2489         (symtab_node::get_alias_target): Likewise.
2490         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
2491         (cgraph_local_p): Likewise.
2492         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
2493         (cgraph_edge::rebuild_references): Likewise.
2494         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
2495         (walk_polymorphic_call_targets): Likewise.
2496         (cgraph_node::expand_thunk): Likewise.
2497         (symbol_table::output_weakrefs): Likewise.
2498         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
2499         (ix86_handle_option): Likewise.
2500         * config/i386/constraints.md: Likewise.
2501         * config/i386/i386-builtin-types.def (BND): Likewise.
2502         (VOID): Likewise.
2503         (PVOID): Likewise.
2504         (ULONG): Likewise.
2505         * config/i386/i386-builtin.def (BDESC_END): Likewise.
2506         (BDESC_FIRST): Likewise.
2507         (BDESC): Likewise.
2508         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
2509         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
2510         * config/i386/i386.c (enum reg_class): Likewise.
2511         (ix86_target_string): Likewise.
2512         (ix86_option_override_internal): Likewise.
2513         (ix86_conditional_register_usage): Likewise.
2514         (ix86_valid_target_attribute_inner_p): Likewise.
2515         (ix86_set_indirect_branch_type): Likewise.
2516         (ix86_set_current_function): Likewise.
2517         (ix86_function_arg_regno_p): Likewise.
2518         (init_cumulative_args): Likewise.
2519         (ix86_function_arg_advance): Likewise.
2520         (ix86_function_arg): Likewise.
2521         (ix86_pass_by_reference): Likewise.
2522         (ix86_function_value_regno_p): Likewise.
2523         (ix86_function_value_1): Likewise.
2524         (ix86_function_value_bounds): Likewise.
2525         (ix86_return_in_memory): Likewise.
2526         (ix86_setup_incoming_vararg_bounds): Likewise.
2527         (ix86_va_start): Likewise.
2528         (indirect_thunk_need_prefix): Likewise.
2529         (print_reg): Likewise.
2530         (ix86_print_operand): Likewise.
2531         (ix86_expand_call): Likewise.
2532         (ix86_output_function_return): Likewise.
2533         (reg_encoded_number): Likewise.
2534         (BDESC_VERIFYS): Likewise.
2535         (ix86_init_mpx_builtins): Likewise.
2536         (ix86_init_builtins): Likewise.
2537         (ix86_emit_cmove): Likewise.
2538         (ix86_emit_move_max): Likewise.
2539         (ix86_expand_builtin): Likewise.
2540         (ix86_builtin_mpx_function): Likewise.
2541         (ix86_get_arg_address_for_bt): Likewise.
2542         (ix86_load_bounds): Likewise.
2543         (ix86_store_bounds): Likewise.
2544         (ix86_load_returned_bounds): Likewise.
2545         (ix86_store_returned_bounds): Likewise.
2546         (ix86_class_likely_spilled_p): Likewise.
2547         (ix86_hard_regno_mode_ok): Likewise.
2548         (x86_order_regs_for_local_alloc): Likewise.
2549         (ix86_mitigate_rop): Likewise.
2550         (ix86_bnd_prefixed_insn_p): Likewise.
2551         (ix86_mpx_bound_mode): Likewise.
2552         (ix86_make_bounds_constant): Likewise.
2553         (ix86_initialize_bounds): Likewise.
2554         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
2555         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
2556         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
2557         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
2558         (TARGET_CHKP_BOUND_MODE): Likewise.
2559         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
2560         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
2561         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
2562         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
2563         * config/i386/i386.h (TARGET_MPX): Likewise.
2564         (TARGET_MPX_P): Likewise.
2565         (VALID_BND_REG_MODE): Likewise.
2566         (FIRST_BND_REG): Likewise.
2567         (LAST_BND_REG): Likewise.
2568         (enum reg_class): Likewise.
2569         (BND_REG_P): Likewise.
2570         (BND_REGNO_P): Likewise.
2571         (BNDmode): Likewise.
2572         (ADJUST_INSN_LENGTH): Likewise.
2573         * config/i386/i386.md: Likewise.
2574         * config/i386/i386.opt: Likewise.
2575         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
2576         (defined): Likewise.
2577         (LINK_MPX): Likewise.
2578         (MPX_SPEC): Likewise.
2579         (LIBMPX_SPEC): Likewise.
2580         (LIBMPXWRAPPERS_SPEC): Likewise.
2581         (CHKP_SPEC): Likewise.
2582         * config/i386/predicates.md: Likewise.
2583         * dbxout.c (dbxout_type): Likewise.
2584         * doc/extend.texi: Likewise.
2585         * doc/invoke.texi: Likewise.
2586         * doc/md.texi: Likewise.
2587         * doc/tm.texi: Likewise.
2588         * doc/tm.texi.in: Likewise.
2589         * dwarf2out.c (is_base_type): Likewise.
2590         (gen_formal_types_die): Likewise.
2591         (gen_subprogram_die): Likewise.
2592         (gen_type_die_with_usage): Likewise.
2593         (gen_decl_die): Likewise.
2594         (dwarf2out_late_global_decl): Likewise.
2595         * expr.c (expand_assignment): Likewise.
2596         (emit_storent_insn): Likewise.
2597         (store_expr_with_bounds): Likewise.
2598         (store_expr): Likewise.
2599         (expand_expr_real_1): Likewise.
2600         * expr.h (store_expr_with_bounds): Likewise.
2601         * function.c (use_register_for_decl): Likewise.
2602         (struct bounds_parm_data): Likewise.
2603         (assign_parms_augmented_arg_list): Likewise.
2604         (assign_parm_find_entry_rtl): Likewise.
2605         (assign_parm_is_stack_parm): Likewise.
2606         (assign_parm_load_bounds): Likewise.
2607         (assign_bounds): Likewise.
2608         (assign_parms): Likewise.
2609         (expand_function_start): Likewise.
2610         * gcc.c (CHKP_SPEC): Likewise.
2611         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
2612         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
2613         (wrestrict_dom_walker::check_call): Likewise.
2614         * gimple.c (gimple_build_call_from_tree): Likewise.
2615         * gimple.h (enum gf_mask): Likewise.
2616         (gimple_call_with_bounds_p): Likewise.
2617         (gimple_call_set_with_bounds): Likewise.
2618         * gimplify.c (gimplify_init_constructor): Likewise.
2619         * ipa-cp.c (initialize_node_lattices): Likewise.
2620         (propagate_constants_across_call): Likewise.
2621         (find_more_scalar_values_for_callers_subset): Likewise.
2622         * ipa-hsa.c (process_hsa_functions): Likewise.
2623         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
2624         * ipa-icf.c (sem_function::merge): Likewise.
2625         * ipa-inline.c (early_inliner): Likewise.
2626         * ipa-pure-const.c (warn_function_noreturn): Likewise.
2627         (warn_function_cold): Likewise.
2628         (propagate_pure_const): Likewise.
2629         * ipa-ref.h (enum GTY): Likewise.
2630         * ipa-split.c (find_retbnd): Likewise.
2631         (consider_split): Likewise.
2632         (split_function): Likewise.
2633         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
2634         * ipa.c (walk_polymorphic_call_targets): Likewise.
2635         (symbol_table::remove_unreachable_nodes): Likewise.
2636         (process_references): Likewise.
2637         (cgraph_build_static_cdtor_1): Likewise.
2638         * lto-cgraph.c (lto_output_node): Likewise.
2639         (output_refs): Likewise.
2640         (compute_ltrans_boundary): Likewise.
2641         (input_overwrite_node): Likewise.
2642         (input_node): Likewise.
2643         (input_cgraph_1): Likewise.
2644         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
2645         * passes.c (pass_manager::execute_early_local_passes): Likewise.
2646         (class pass_chkp_instrumentation_passes): Likewise.
2647         (make_pass_chkp_instrumentation_passes): Likewise.
2648         * passes.def: Likewise.
2649         * rtl.h (struct GTY): Likewise.
2650         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
2651         * stor-layout.c (layout_type): Likewise.
2652         * symtab.c: Likewise.
2653         * target.def: Likewise.
2654         * targhooks.c (default_chkp_bound_type): Likewise.
2655         (default_chkp_bound_mode): Likewise.
2656         (default_builtin_chkp_function): Likewise.
2657         (default_chkp_function_value_bounds): Likewise.
2658         (default_chkp_make_bounds_constant): Likewise.
2659         (default_chkp_initialize_bounds): Likewise.
2660         * targhooks.h (default_chkp_bound_type): Likewise.
2661         (default_chkp_bound_mode): Likewise.
2662         (default_builtin_chkp_function): Likewise.
2663         (default_chkp_function_value_bounds): Likewise.
2664         (default_chkp_make_bounds_constant): Likewise.
2665         (default_chkp_initialize_bounds): Likewise.
2666         * toplev.c (compile_file): Likewise.
2667         (process_options): Likewise.
2668         * tree-core.h (DEF_BUILTIN): Likewise.
2669         (DEF_BUILTIN_CHKP): Likewise.
2670         * tree-inline.c (declare_return_variable): Likewise.
2671         (remap_gimple_stmt): Likewise.
2672         (copy_bb): Likewise.
2673         (initialize_inlined_parameters): Likewise.
2674         (expand_call_inline): Likewise.
2675         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
2676         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
2677         (make_pass_ipa_chkp_produce_thunks): Likewise.
2678         (make_pass_chkp): Likewise.
2679         (make_pass_chkp_opt): Likewise.
2680         (make_pass_chkp_instrumentation_passes): Likewise.
2681         * tree-pretty-print.c (dump_generic_node): Likewise.
2682         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
2683         * tree-ssa-dce.c (propagate_necessity): Likewise.
2684         (eliminate_unnecessary_stmts): Likewise.
2685         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
2686         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
2687         * tree-ssa-sccvn.h: Likewise.
2688         * tree-ssa-strlen.c (get_string_length): Likewise.
2689         (valid_builtin_call): Likewise.
2690         (adjust_last_stmt): Likewise.
2691         (handle_builtin_strchr): Likewise.
2692         (handle_builtin_strcpy): Likewise.
2693         (handle_builtin_stxncpy): Likewise.
2694         (handle_builtin_memcpy): Likewise.
2695         (handle_builtin_strcat): Likewise.
2696         (strlen_check_and_optimize_stmt): Likewise.
2697         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
2698         * tree-streamer-in.c: Likewise.
2699         * tree-streamer.c (record_common_node): Likewise.
2700         * tree.c (tree_code_size): Likewise.
2701         (wide_int_to_tree_1): Likewise.
2702         (type_contains_placeholder_1): Likewise.
2703         (build_common_tree_nodes): Likewise.
2704         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
2705         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
2706         (POINTER_BOUNDS_P): Likewise.
2707         (BOUNDED_TYPE_P): Likewise.
2708         (BOUNDED_P): Likewise.
2709         (CALL_WITH_BOUNDS_P): Likewise.
2710         (pointer_bounds_type_node): Likewise.
2711         * value-prof.c (gimple_ic): Likewise.
2712         * var-tracking.c (vt_add_function_parameters): Likewise.
2713         * varasm.c (make_decl_rtl): Likewise.
2714         (assemble_start_function): Likewise.
2715         (output_constant): Likewise.
2716         (maybe_assemble_visibility): Likewise.
2717         * varpool.c (ctor_for_folding): Likewise.
2718         * chkp-builtins.def: Remove.
2719         * ipa-chkp.c: Remove.
2720         * ipa-chkp.h: Remove.
2721         * rtl-chkp.c: Remove.
2722         * rtl-chkp.h: Remove.
2723         * tree-chkp-opt.c: Remove.
2724         * tree-chkp.c: Remove.
2725         * tree-chkp.h: Remove.
2727 2018-06-07  Carl Love  <cel@us.ibm.com>
2729         * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
2730         vextract_fp_from_shortl): Add BE support.
2732 2018-06-07  Paul Koning  <ni1d@arrl.net>
2734         * compare-elim.c (try_merge_compare): Don't merge compare if
2735         address contains a side effect.
2736         (try_eliminate_compare): Likewise.
2738 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
2740         * config.gcc: Support "tremont".
2741         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
2742         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2743         PROCESSOR_TREMONT.
2744         * config/i386/i386.c (m_TREMONT): Define.
2745         (processor_target_table): Add "tremont".
2746         (PTA_TREMONT): Define.
2747         (ix86_lea_outperforms): Add TARGET_TREMONT.
2748         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
2749         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
2750         and M_INTEL_GOLDMONT_PLUS.
2751         (fold_builtin_cpu): Add "tremont".
2752         (ix86_add_stmt_cost): Add TARGET_TREMONT.
2753         (ix86_option_override_internal): Add "tremont".
2754         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
2755         (processor_type): Add PROCESSOR_TREMONT.
2756         * config/i386/x86-tune.def: Add m_TREMONT.
2757         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
2759 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2761         * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
2762         symbol defined for msp430i* devices to be lower case.
2764         gcc/testsuite/gcc.target/msp430/
2765         * msp430i-device-symbol.c: New test.
2766         * msp430f-device-symbol.c: New test.
2767         * msp430.h: New test header file.
2769 2018-06-07  Richard Biener  <rguenther@suse.de>
2771         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
2772         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
2773         Properly wrap signed arithmetic if overflow wraps.
2775 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
2777         PR tree-optimization/69615
2778         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
2779         of a cast from a same precision integral SSA_NAME in a bb dominated
2780         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
2781         cast to utype if rhs2 has already a compatible type.
2783 2018-06-07  Richard Biener  <rguenther@suse.de>
2785         PR tree-optimization/85935
2786         * graphite-scop-detection.c (find_params_in_bb): Analyze
2787         condition operands with respect to the correct loop.  Assert
2788         the analysis doesn't fail.
2790 2018-06-04  Carl Love  <cel@us.ibm.com>
2792         * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
2793         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
2794         as it is slightly cheaper.
2795         (first_match_or_eos_index_<mode>):
2796         Calculate index using natural element order.
2797         (first_match_index_<mode>):
2798         Calculate index using natural element order.
2799         (first_match_or_eos_index_<mode>):
2800         Calculate index using natural order.
2801         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
2802         for BE and LE modes.
2803         * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
2804         P9V_BUILTIN_VCLZLSBB_V16QI.
2805         * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
2806         specific.
2808 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2810         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
2811         indentation and line wrap for many prototypes.  Add missing
2812         @smallexample directives around block of prototypes for vec_xl and
2813         vec_xst.
2815 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
2817         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
2818         track if we pass or return IEEE 128-bit floating point.
2819         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
2820         C++ mangling that is compatible with GCC 8.1.
2821         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
2822         (init_cumulative_args): Note if we pass or return IEEE 128-bit
2823         floating point types.
2824         (rs6000_function_arg_advance_1): Likewise.
2825         (rs6000_mangle_type): Optionally generate mangled names that match
2826         what GCC 8.1 generated for IEEE 128-bit floating point types.
2827         (rs6000_globalize_decl_name): If we have an external function that
2828         passes or returns IEEE 128-bit types, generate a weak reference
2829         from the mangled name used in GCC 8.1 to the current mangled
2830         name.
2831         (rs6000_init_builtins): Make __ibm128 use the long double type if
2832         long double is IBM extended double.  Make __float128 use the long
2833         double type if long double is IEEE 128-bit.
2835         PR target/85657
2836         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
2837         macro for __ibm128 built-in functions.
2838         (PACK_IF): Add __ibm128 pack/unpack functions.
2839         (UNPACK_IF): Likewise.
2840         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
2841         enable long double built-in functions if long double is IEEE
2842         128-bit floating point.
2843         (rs6000_invalid_builtin): Update long double built-in function
2844         error message.
2845         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
2846         functions, adjust the built-in function to use the long double
2847         built-in function if __ibm128 and long double are the same type.
2848         * doc/extend.texi (PowerPC builtins): Update documention for
2849         __builtin_{,un}pack_longdouble.  Add documentation for
2850         __builtin_{,un}pack_ibm128.
2852 2018-06-06  Jim Wilson  <jimw@sifive.com>
2854         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
2855         (struct machine_function): New field interrupt_mode.
2856         (riscv_handle_type_attribute): New function.  Add forward declaration.
2857         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
2858         (riscv_expand_epilogue): Check interrupt_mode field.
2859         (riscv_set_current_function): Check interrupt attribute args and
2860         set interrupt_mode field.
2861         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
2862         (riscv_sret, riscv_uret): New.
2863         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
2864         new arguments to interrupt attribute.
2866 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
2868         PR target/63177
2869         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
2870         Don't handle -mcpu=power8 if -mpower9-vector is also used.
2872 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2874         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
2875         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
2876         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
2877         several redundant entries.
2879 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
2881         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
2882         type from "rtx" to "rtx_insn *".
2883         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
2884         for local "call_insn", removing cast.
2885         (ix86_expand_call): Likewise, introducing a "call_insn" local.
2887 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
2889         PR tree-optimization/86066
2890         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
2891         for BIT_INSERT_EXPR stores.
2893 2018-06-06  Richard Biener  <rguenther@suse.de>
2895         PR tree-optimization/86062
2896         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
2897         component refs ontop
2898         of to be offsetted base.
2900 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2902         * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
2903         to be static and remove check on interrupt attribute name.
2905         gcc/testsuite/gcc.target/msp430/
2906         * function-attributes-4.c: New test.
2907         * static-interrupts.c: New test.
2909 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2911         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
2912         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
2914 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
2916         PR target/79924
2917         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
2918         second argument.
2919         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
2920         Remove second argument, change how error is called.
2921         (aarch64_layout_arg): Remove second argument from
2922         aarch64_err_no_fpadvsimd call.
2923         (aarch64_init_cumulative_args): Ditto.
2924         (aarch64_gimplify_va_arg_expr): Ditto.
2925         * config/aarch64/aarch64.md (mov<mode>): Ditto.
2927 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
2929         * config/i386/i386.md (simple_return_indirect_internal): New expander.
2930         (*simple_return_indirect_internal<mode>): Rename from
2931         simple_return_indirect_internal.  Use W mode iterator.
2932         (rstorssp): New expander.
2933         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
2934         (clrssbsy): New expander.
2935         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
2937 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2939         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
2940         __typeof__.
2941         (cmse_check_pointed_object): Likewise.
2943 2018-06-05  Martin Liska  <mliska@suse.cz>
2945         PR gcov-profile/47618
2946         * doc/invoke.texi: Document how -fprofile-dir format
2947         is extended.
2949 2018-06-05  Richard Biener  <rguenther@suse.de>
2951         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
2952         removal pretend DOM info isn't available so we do not update
2953         it and only remove edges, not dominated blocks.  Actually free
2954         DOM info in case we removed something.  Remove unreachable blocks.
2955         (mfb_keep_latches): Work with either DOM info or marked backedges.
2956         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
2957         first.  Mark backedges if DOM info isn't available.
2958         (Re-)compute DOM info after cleanup_control_flow_pre.
2960 2018-06-05  Richard Biener  <rguenther@suse.de>
2962         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
2963         (locus_discrim_hasher::hash): Adjust.
2964         (locus_discrim_hasher::equal): Likewise.
2965         (next_discriminator_for_locus): Work on line directly.
2966         (same_line_p): Pass in expanded locus1 as well.
2967         (assign_discriminators): Avoid redundant location expansions.
2969 2018-06-05  Richard Biener  <rguenther@suse.de>
2971         PR tree-optimization/86046
2972         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
2973         if required after clearing TREE_ADDRESSABLE.
2975 2018-06-05  Richard Biener  <rguenther@suse.de>
2977         PR tree-optimization/86047
2978         * tree-ssa-loop.c (for_each_index): Glob handling of all
2979         decls and constants and really handle all of them.
2981 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2983         PR target/81497
2984         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
2985         qualifier_void_pointer and qualifier_const_void_pointer.
2986         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
2987         (arm_init_builtins): Handle the above.
2988         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
2989         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
2990         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
2991         void intrinsics.
2993 2018-06-05  Martin Liska  <mliska@suse.cz>
2995         * auto-profile.c (read_autofdo_file): Do not use
2996         gcov_ctr_summary struct.
2997         (afdo_callsite_hot_enough_for_early_inline): Likewise.
2998         * coverage.c (struct counts_entry): Likewise.
2999         (read_counts_file): Read just single summary entry.
3000         (get_coverage_counts): Use gcov_summary struct.
3001         * coverage.h (get_coverage_counts): Likewise.
3002         * gcov-dump.c (dump_working_sets): Likewise.
3003         (tag_summary): Dump just single summary.
3004         * gcov-io.c (gcov_write_summary): Write just histogram
3005         summary.
3006         (gcov_read_summary): Read just single summary.
3007         (compute_working_sets): Use gcov_summary struct.
3008         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
3009         of GCOV_COUNTERS_SUMMABLE.
3010         (GCOV_COUNTERS_SUMMABLE): Remove.
3011         (GCOV_FIRST_VALUE_COUNTER): Replace with
3012         GCOV_COUNTER_V_INTERVAL.
3013         (struct gcov_ctr_summary): Remove.
3014         (struct gcov_summary): Directly use fields of former
3015         gcov_ctr_summary.
3016         (compute_working_sets): Use gcov_summary struct.
3017         * gcov.c (read_count_file): Do not use ctrs fields.
3018         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
3019         struct.
3020         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
3021         struct.
3022         * profile.c: Likewise.
3023         * profile.h: Likewise.
3025 2018-06-05  Martin Liska  <mliska@suse.cz>
3027         PR gcov-profile/84846
3028         * gcov.c (output_lines): Print working directory only
3029         in intermediate format.
3031 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
3033         * config/s390/s390-builtin-types.def: Add void function type.
3034         * config/s390/s390-builtins.def: Use the function type for the
3035         tbeginc builtin.
3037 2018-06-04  Jim Wilson  <jimw@sifive.com>
3039         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
3040         to int.
3041         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
3042         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
3043         handle EH_RETURN_DATA_REGNO registers properly.
3044         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
3045         (riscv_expand_epilogue): Update comment.  Change argument name and
3046         type.  Update code to use new name and type.  Pass new args to
3047         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
3048         EXCEPTION_RETURN.
3049         * config/riscv/riscv.md (NORMAL_RETURN): New.
3050         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
3051         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
3052         (eh_return): Call gen_eh_return_internal and emit barrier.
3053         (eh_return_internal): Call riscv_expand_epilogue.
3055 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
3057         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
3058         bit_insertion field and declare can_be_merged_into method.
3059         (merged_store_group::can_be_merged_into): New method.
3060         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
3061         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
3062         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
3064 2018-06-04  Richard Biener  <rguenther@suse.de>
3066         PR tree-optimization/85955
3067         * builtins.c (fold_builtin_sincos): Convert pointers to
3068         destination to appropriate type before dereferencing.
3070 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
3072         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
3074 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
3076         * expr.c (expand_expr_real_1): Force the operand into memory if
3077         its TYPE_MODE is BLKmode and if there is no integer mode for
3078         the number of bits being extracted.
3080 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
3082         PR target/85832
3083         PR target/86036
3084         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
3085         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
3087 2018-06-04  Richard Biener  <rguenther@suse.de>
3089         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
3090         (cleanup_tree_cfg_noloop): ... single caller.  Do
3091         start_recording_case_labels later.
3093 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
3095         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
3096         to _IMMINTRIN_H_INCLUDED.
3097         * config/i386/pconfigintrin.h: Ditto.
3098         * config/i386/waitpkgintrin.h: Ditto.
3099         * config/i386/immintrin.h: Add includes for sgxintrin.h,
3100         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
3101         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
3102         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
3103         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
3104         waitpkgintrin.h and cldemoteintrin.h.
3106 2018-06-04  Richard Biener  <rguenther@suse.de>
3108         PR tree-optimization/86038
3109         * tracer.c (find_best_successor): Check probability for
3110         being initialized, bail out if not.
3112 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
3114         PR target/86003
3115         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
3116         of bits to ignore when comparing architectures.
3118 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
3120         PR tree-optimization/69615
3121         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
3122         maximum or minimum of the type, try to merge it also as if
3123         range1 is + [-, x - 1] or + [x + 1, -].
3125         PR c++/86025
3126         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
3128 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
3130         PR tree-optimization/86034
3131         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
3132         the unsigned bitfield type in a bit insertion sequence if it does not
3133         have a larger precision than the bitfield size.
3134         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
3136 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
3138         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
3140 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
3142         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
3143         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
3144         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
3145         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
3147 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
3149         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
3150         Disable -fdelete-null-pointer-checks for ELF toolchain.
3152 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
3153             Kito Cheng  <kito.cheng@gmail.com>
3155         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
3156         (nds32le-*-*, nds32be-*-*): Integrate checking process.
3157         (nds32*-*-*): Add glibc and uclibc conditions.
3158         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
3159         (TARGET_EXCEPT_UNWIND_INFO): Define.
3160         * config/nds32/elf.h: New file.
3161         * config/nds32/linux.h: New file.
3162         * config/nds32/nds32-elf.opt: New file.
3163         * config/nds32/nds32-linux.opt: New file.
3164         * config/nds32/nds32-fp-as-gp.c
3165         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
3166         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
3167         TARGET_LINUX_ABI.
3168         (nds32_asm_file_end): Ditto.
3169         (nds32_print_operand): Ditto.
3170         (nds32_insert_attributes): Ditto.
3171         (nds32_init_libfuncs): New function.
3172         (TARGET_HAVE_TLS): Define.
3173         (TARGET_INIT_LIBFUNCS): Define.
3174         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
3175         spec content.
3176         (TARGET_ELF): Apply different mcmodel setting.
3177         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
3178         been migrated into elf.h and linux.h files.
3179         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
3180         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
3181         (mcmodel): The content has been migrated into nds32-elf.opt and
3182         nds32-linux.opt files.
3183         * config/nds32/t-elf: New file.
3184         * config/nds32/t-linux: New file.
3186 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
3187             Shiva Chen  <shiva0217@gmail.com>
3189         * config/nds32/constants.md (unspec_volatile_element): Add
3190         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
3191         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
3192         optimization.
3193         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
3194         (make_pass_nds32_fp_as_gp): Declare.
3195         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
3196         optmization pass.
3197         (nds32_asm_function_end_prologue): Remove unused asm output.
3198         (nds32_asm_function_begin_epilogue): Remove unused asm output.
3199         (nds32_asm_file_start): Output necessary fp_as_gp information.
3200         (nds32_option_override): Adjust register usage.
3201         (nds32_expand_prologue): Consider fp_as_gp situation.
3202         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
3203         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
3204         (epilogue): Ditto.
3205         (return): Ditto.
3206         (simple_return): Ditto.
3207         (omit_fp_begin): Output special directive for fp_as_gp.
3208         (omit_fp_end): Output special directive for fp_as_gp.
3209         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
3210         mforbid-fp-as-gp): New options.
3212 2018-06-01  Mark Wielaard  <mark@klomp.org>
3214         * dwarf2out.c (dwarf2out_finish): Remove generation of
3215         DW_AT_loclists_base.
3217 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
3219         * gimple-ssa-store-merging.c: Include gimple-fold.h.
3220         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
3221         (struct merged_store_group): Add bit_insertion field.
3222         (dump_char_array): Use standard hexadecimal format.
3223         (merged_store_group::merged_store_group): Set bit_insertion to false.
3224         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
3225         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
3226         also print the mask in the dump file.
3227         (pass_store_merging::gate): Minor tweak.
3228         (imm_store_chain_info::coalesce_immediate): Fix wrong association
3229         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
3230         stores with INTEGER_CST stores.
3231         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
3232         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
3233         and use it throughout.  Generate bit insertion sequences if need be.
3234         (pass_store_merging::process_store): Remove redundant condition.
3235         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
3237 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
3239         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
3240         the 128-bit floating point types.  Fix function comment.
3242 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3244         * config/aarch64/aarch64-simd.md
3245         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
3246         mnemonics.
3247         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
3248         mnemonics.
3250 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
3252         PR tree-optimization/85989
3253         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
3254         variable.
3255         (backprop::intersect_uses): Check it when deciding whether this
3256         is a backedge reference.
3257         (backprop::process_block): Add each phi to m_visited_phis
3258         after visiting it, then clear it at the end.
3260 2018-06-01  Richard Biener  <rguenther@suse.de>
3262         * tree-vectorizer.h (vect_dr_stmt): New function.
3263         (vect_get_load_cost): Adjust.
3264         (vect_get_store_cost): Likewise.
3265         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
3266         Use vect_dr_stmt instead of DR_SMTT.
3267         (vect_record_base_alignments): Likewise.
3268         (vect_calculate_target_alignment): Likewise.
3269         (vect_compute_data_ref_alignment): Likewise and make static.
3270         (vect_update_misalignment_for_peel): Likewise.
3271         (vect_verify_datarefs_alignment): Likewise.
3272         (vector_alignment_reachable_p): Likewise.
3273         (vect_get_data_access_cost): Likewise.  Pass down
3274         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
3275         (vect_get_peeling_costs_all_drs): Likewise.
3276         (vect_peeling_hash_get_lowest_cost): Likewise.
3277         (vect_enhance_data_refs_alignment): Likewise.
3278         (vect_find_same_alignment_drs): Likewise.
3279         (vect_analyze_data_refs_alignment): Likewise.
3280         (vect_analyze_group_access_1): Likewise.
3281         (vect_analyze_group_access): Likewise.
3282         (vect_analyze_data_ref_access): Likewise.
3283         (vect_analyze_data_ref_accesses): Likewise.
3284         (vect_vfa_segment_size): Likewise.
3285         (vect_small_gap_p): Likewise.
3286         (vectorizable_with_step_bound_p): Likewise.
3287         (vect_prune_runtime_alias_test_list): Likewise.
3288         (vect_analyze_data_refs): Likewise.
3289         (vect_supportable_dr_alignment): Likewise.
3290         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3291         (vect_gen_prolog_loop_niters): Likewise.
3292         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3293         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
3294         modify DR_STMT.
3295         (vect_recog_mask_conversion_pattern): Likewise.
3296         (vect_try_gather_scatter_pattern): Likewise.
3297         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
3298         to vect_get_store_cost.
3299         (vect_get_store_cost): Get stmt_info instead of DR.
3300         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
3301         (vect_get_load_cost): Get stmt_info instead of DR.
3303 2018-06-01  Richard Biener  <rguenther@suse.de>
3305         PR middle-end/86017
3306         * gimple-fold.c (var_decl_component_p): Also allow offsetted
3307         vars wrapped in MEM_REFs.
3309 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
3311         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
3312         Fix subreg tests so that we only return a choice between
3313         GENERAL_REGS and FP_REGS if the original classes included both.
3315 2018-06-01  Richard Biener  <rguenther@suse.de>
3317         PR ipa/85960
3318         * tree-ssa-structalias.c (get_function_part_constraint):
3319         Handle NULL fi->decl.
3320         (find_func_aliases_for_call): Properly handle indirect
3321         fi from direct call.
3322         (find_func_clobbers): Likewise.
3323         (ipa_pta_execute): Likewise.
3324         (create_variable_info_for): For functions that are ifunc_resolver
3325         resolve to a varinfo that contains the result of the resolver call.
3326         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
3327         aliases.
3329 2018-05-31  Michael Collison  <michael.collison@arm.com>
3331         * config/aarch64/aarch64.md:
3332         (*fix_to_zero_extenddfdi2): New pattern.
3333         * gcc.target/aarch64/fix_extend1.c: New testcase.
3335 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
3337         PR middle-end/78809
3338         PR middle-end/83026
3339         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
3340         and BUILT_IN_STRNCMP_EQ.
3341         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
3342         BUILT_IN_STRNCMP_EQ.
3343         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
3344         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
3345         (gimple_fold_builtin): Likewise.
3346         * tree-ssa-strlen.c (compute_string_length): New function.
3347         (determine_min_obsize): New function.
3348         (handle_builtin_string_cmp): New function to handle calls to
3349         string compare functions.
3350         (strlen_optimize_stmt): Add handling to builtin string compare
3351         calls.
3352         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
3353         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
3354         * tree.c (build_common_builtin_nodes): Add new defines of
3355         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
3357 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
3359         PR target/85984
3360         * bb-reorder.c (pass_partition_blocks::gate): Return false for
3361         functions with naked attribute.
3363 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
3365         * config/i386/sse.md (avx_vec_concat<mode>):
3366         Substitute concat_tg_mode mode attribute with xtg_mode.
3367         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
3368         (concat_tg_mode): Remove mode attribute.
3370 2018-05-31  Martin Sebor  <msebor@redhat.com>
3372         PR c/82063
3373         * calls.c (alloc_max_size): Correct a logic error/typo.
3374         Treat excessive arguments as infinite.  Warn for invalid arguments.
3375         * doc/invoke.texi (-Walloc-size-larger-than): Update.
3377 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
3379         PR target/85829
3380         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
3381         and movx for Haswell.
3383 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
3384             Cesar Philippidis  <cesar@codesourcery.com>
3386         PR middle-end/85879
3387         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
3388         when emitting error on private/firstprivate reductions.
3389         * omp-low.c (lower_omp_target): Avoid reference-type processing
3390         on pointers for firstprivate clause.
3392 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
3394         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
3395         (st1x2): Likewise.
3396         (st1x3): Likewise.
3397         * config/aarch64/aarch64-simd.md
3398         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
3399         (aarch64_ld1_x3_<mode>): Likewise
3400         (aarch64_st1x2<VALLDIF:mode>): Likewise
3401         (aarch64_st1_x2_<mode>): Likewise
3402         (aarch64_st1x3<VALLDIF:mode>): Likewise
3403         (aarch64_st1_x3_<mode>): Likewise
3404         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
3405         (vld1_s8_x3): Likewise.
3406         (vld1_u16_x3): Likewise.
3407         (vld1_s16_x3): Likewise.
3408         (vld1_u32_x3): Likewise.
3409         (vld1_s32_x3): Likewise.
3410         (vld1_u64_x3): Likewise.
3411         (vld1_s64_x3): Likewise.
3412         (vld1_f16_x3): Likewise.
3413         (vld1_f32_x3): Likewise.
3414         (vld1_f64_x3): Likewise.
3415         (vld1_p8_x3): Likewise.
3416         (vld1_p16_x3): Likewise.
3417         (vld1_p64_x3): Likewise.
3418         (vld1q_u8_x3): Likewise.
3419         (vld1q_s8_x3): Likewise.
3420         (vld1q_u16_x3): Likewise.
3421         (vld1q_s16_x3): Likewise.
3422         (vld1q_u32_x3): Likewise.
3423         (vld1q_s32_x3): Likewise.
3424         (vld1q_u64_x3): Likewise.
3425         (vld1q_s64_x3): Likewise.
3426         (vld1q_f16_x3): Likewise.
3427         (vld1q_f32_x3): Likewise.
3428         (vld1q_f64_x3): Likewise.
3429         (vld1q_p8_x3): Likewise.
3430         (vld1q_p16_x3): Likewise.
3431         (vld1q_p64_x3): Likewise.
3432         (vst1_s64_x2): Likewise.
3433         (vst1_u64_x2): Likewise.
3434         (vst1_f64_x2): Likewise.
3435         (vst1_s8_x2): Likewise.
3436         (vst1_p8_x2): Likewise.
3437         (vst1_s16_x2): Likewise.
3438         (vst1_p16_x2): Likewise.
3439         (vst1_s32_x2): Likewise.
3440         (vst1_u8_x2): Likewise.
3441         (vst1_u16_x2): Likewise.
3442         (vst1_u32_x2): Likewise.
3443         (vst1_f16_x2): Likewise.
3444         (vst1_f32_x2): Likewise.
3445         (vst1_p64_x2): Likewise.
3446         (vst1q_s8_x2): Likewise.
3447         (vst1q_p8_x2): Likewise.
3448         (vst1q_s16_x2): Likewise.
3449         (vst1q_p16_x2): Likewise.
3450         (vst1q_s32_x2): Likewise.
3451         (vst1q_s64_x2): Likewise.
3452         (vst1q_u8_x2): Likewise.
3453         (vst1q_u16_x2): Likewise.
3454         (vst1q_u32_x2): Likewise.
3455         (vst1q_u64_x2): Likewise.
3456         (vst1q_f16_x2): Likewise.
3457         (vst1q_f32_x2): Likewise.
3458         (vst1q_f64_x2): Likewise.
3459         (vst1q_p64_x2): Likewise.
3460         (vst1_s64_x3): Likewise.
3461         (vst1_u64_x3): Likewise.
3462         (vst1_f64_x3): Likewise.
3463         (vst1_s8_x3): Likewise.
3464         (vst1_p8_x3): Likewise.
3465         (vst1_s16_x3): Likewise.
3466         (vst1_p16_x3): Likewise.
3467         (vst1_s32_x3): Likewise.
3468         (vst1_u8_x3): Likewise.
3469         (vst1_u16_x3): Likewise.
3470         (vst1_u32_x3): Likewise.
3471         (vst1_f16_x3): Likewise.
3472         (vst1_f32_x3): Likewise.
3473         (vst1_p64_x3): Likewise.
3474         (vst1q_s8_x3): Likewise.
3475         (vst1q_p8_x3): Likewise.
3476         (vst1q_s16_x3): Likewise.
3477         (vst1q_p16_x3): Likewise.
3478         (vst1q_s32_x3): Likewise.
3479         (vst1q_s64_x3): Likewise.
3480         (vst1q_u8_x3): Likewise.
3481         (vst1q_u16_x3): Likewise.
3482         (vst1q_u32_x3): Likewise.
3483         (vst1q_u64_x3): Likewise.
3484         (vst1q_f16_x3): Likewise.
3485         (vst1q_f32_x3): Likewise.
3486         (vst1q_f64_x3): Likewise.
3487         (vst1q_p64_x3): Likewise.
3489 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3491         * config/msp430/msp430.c (msp430_output_labelref): Prepend
3492         user_label_prefix to name.
3494         * tree-core.h: Update comment about the format of NAME string
3495         passed to handler in attribute_spec.
3497         * config/msp430/msp430.md: Remove erroneous subreg expression from
3498         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
3499         zero_extend{q,h}isi2.
3501 2018-05-30  Borislav Petkov  <bp@suse.de>
3503         * doc/extend.texi: Document some architecture specific
3504         constraints and sort entries.
3506 2018-05-30  Martin Sebor  <msebor@redhat.com>
3508         PR middle-end/85369
3509         * builtins.c (expand_builtin_stpcpy_1): New function.
3510         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
3511         only if the former succeeds.
3513 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
3515         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
3516         in saphira.
3518 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3520         * doc/invoke.texi (-flinker-output): Document
3522 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3524         * passes.c (ipa_write_summaries): Only modify statements if body
3525         is in memory.
3526         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
3527         incrementally linking.
3528         (ipa_passes): Likewise.
3529         * lto-cgraph.c (lto_output_node): When incrementally linking do not
3530         pass down resolution info.
3531         * common.opt (flag_incremental_link): Update info.
3532         * gcc.c (plugin specs): Turn flinker-output=* to
3533         -plugin-opt=-linker-output-known
3534         * toplev.c (compile_file): Also cut compilation when doing incremental
3535         link.
3536         * flag-types. (enum lto_partition_model): Add
3537         LTO_LINKER_OUTPUT_NOLTOREL.
3538         (invoke.texi): Add -flinker-output docs.
3539         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
3540         link same way as WPA; do not stream in dead initializers.
3542         * dwarf2out.c (dwarf2out_die_ref_for_decl,
3543         darf2out_register_external_decl): Support incremental link.
3545 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3547         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
3549 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3551         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
3552         it down to simple_object_copy_lto_debug_sections.
3553         (run_gcc): Determine incremental LTO link time and configure
3554         lto1 into non-wpa mode, disable renaming of debug sections.
3556 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3558         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
3559         descriptions of various incorrectly documented functions.
3561 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3563         Revert:
3564         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3565         address check not strict.
3567 2018-05-30  Richard Biener  <rguenther@suse.de>
3569         PR tree-optimization/85964
3570         * tracer.c (better_p): Drop initialized count check, we only
3571         call the function with initialized counts now.
3572         (find_best_successor): Do find a best edge if one
3573         has uninitialized count.
3574         (find_best_predecessor): Likewise.  Do BB frequency check only
3575         if count is initialized.
3577 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
3579         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
3580         (aarch64_ldrstr_offset_compare): New.
3581         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
3582         load/store orderings.
3583         (aarch64_gen_adjusted_ldpstp): Likewise.
3585 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
3587         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
3588         Check for subset of GENERAL_REGS and FP_REGS.
3589         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
3590         r=w alternative.
3592 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
3594         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
3595         and wi::to_poly_offset.  Add the current offset and then check
3596         whether the sum fits, rather than using an unchecked addition of
3597         a checked term.  Check for a shwi rather than a uhwi.
3598         * expr.c (get_bit_range): Use tree_to_poly_uint64.
3599         (store_constructor): Use poly_int_tree_p.
3600         (expand_expr_real_1): Likewise.
3601         * function.c (assign_temp): Likewise.
3602         * fold-const.c (const_binop): Use poly_int_tree_p and
3603         wi::to_poly_offset.
3604         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
3605         division.
3606         * ipa-icf-gimple.c (func_checker::compare_operand): Use
3607         to_poly_offset for MEM offsets.
3608         * ipa-icf.c (sem_variable::equals): Likewise.
3609         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
3610         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
3611         wi::to_poly_offset for BIT_FIELD_REF offsets.
3612         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
3613         wi::to_poly_offset.
3614         * var-tracking.c (emit_note_insn_var_location): Use
3615         tree_to_poly_uint64.
3617 2018-05-29  Jim Wilson  <jimw@sifive.com>
3619         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
3621 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
3623         PR target/85950
3624         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
3625         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
3626         sequence.
3627         (sse4_1_round<mode>2): Use nonimmediate_operand
3628         for operand 1 predicate.
3630 2018-05-29  Martin Sebor  <msebor@redhat.com>
3631             Richard Biener  <rguenther@suse.de>
3633         PR testsuite/85888
3634         * calls.c (get_size_range): Call determine_value_range instead
3635         of get_value_range..
3636         * tree-vrp.h (determine_value_range): Declared new function.
3637         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
3639 2018-05-29  Richard Biener  <rguenther@suse.de>
3641         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
3642         sure to use non-pattern stmts for get_earlier_stmt arguments.
3643         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
3644         called on pattern stmts.
3645         (get_later_stmt): Likewise.
3647 2018-05-29  Martin Liska  <mliska@suse.cz>
3649         PR gcov-profile/85759
3650         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
3651         env variables.
3653 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
3655         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
3656         VEC_UNPACK_*_EXPR.
3657         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
3658         VEC_PACK_*_EXPR.
3660         PR target/85918
3661         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
3662         VEC_PACK_FLOAT_EXPR): New tree codes.
3663         * tree-pretty-print.c (op_code_prio): Handle
3664         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
3665         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
3666         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
3667         * tree-inline.c (estimate_operator_cost): Likewise.
3668         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
3669         * fold-const.c (const_binop): Likewise.
3670         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
3671         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
3672         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3673         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
3674         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
3675         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
3676         * expr.c (expand_expr_real_2): Likewise.
3677         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
3678         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
3679         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
3680         optabs.
3681         * optabs.c (expand_widen_pattern_expr): For
3682         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
3683         sign from result type rather than operand's type.
3684         (expand_binop_directly): For vec_packu_float_optab and
3685         vec_packs_float_optab allow result type to be different from operand's
3686         type.
3687         * optabs-tree.c (optab_for_tree_code): Handle
3688         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
3689         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
3690         * tree-vect-generic.c (expand_vector_operations_1):  Handle
3691         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
3692         VEC_PACK_FLOAT_EXPR.
3693         * tree-vect-stmts.c (supportable_widening_operation): Handle
3694         FIX_TRUNC_EXPR.
3695         (supportable_narrowing_operation): Handle FLOAT_EXPR.
3696         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
3697         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
3698         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
3699         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
3700         mode attributes.
3701         (vec_pack<floatprefix>_float_<mode>): New expander.
3702         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
3703         attributes.
3704         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
3705         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
3706         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
3707         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
3708         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
3709         Document.
3710         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
3711         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
3712         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
3713         VEC_PACK_FLOAT_EXPR): Document.
3715 2018-05-29  Richard Biener  <rguenther@suse.de>
3717         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
3718         member.
3719         (stmt_vec_info_vec): Make pointer.
3720         (init_stmt_vec_info_vec): Remove.
3721         (free_stmt_vec_info_vec): Likewise.
3722         (set_stmt_vec_info_vec): New function.
3723         (free_stmt_vec_infos): Likewise.
3724         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
3725         (set_vinfo_for_stmt): Likewise.
3726         (get_earlier_stmt): Likewise.
3727         (get_later_stmt): Likewise.
3728         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
3729         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
3730         (vec_info::~vec_info): Free stmt_vec_infos.
3731         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
3732         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
3733         (pass_slp_vectorize::execute): Likewise.
3734         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
3735         (free_stmt_vec_info_vec): Likewise.
3736         (set_stmt_vec_info_vec): New function.
3737         (free_stmt_vec_infos): Likewise.
3738         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
3739         the global stmt_vec_info_vec.
3740         * tree-parloops.c (gather_scalar_reductions): Use
3741         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
3742         vector.
3744 2018-05-29  Richard Biener  <rguenther@suse.de>
3746         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
3748 2018-05-29  Martin Liska  <mliska@suse.cz>
3749             David Malcolm  <dmalcolm@redhat.com>
3751         * vec.c (test_reverse): New.
3752         (vec_c_tests): Add new test.
3753         * vec.h (vl_ptr>::reverse): New function.
3755 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
3757         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
3759         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
3760         and later.
3762 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3764         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
3766 2018-05-28  Richard Biener  <rguenther@suse.de>
3768         PR tree-optimization/85933
3769         * tree-vect-data-refs.c (vect_record_base_alignments): Only
3770         look at stmts marked as vectorizable.
3772 2018-05-28  Richard Biener  <rguenther@suse.de>
3774         PR tree-optimization/85934
3775         * tree-vect-generic.c (expand_vector_operations_1): Hoist
3776         vector boolean check before scalar optimization.
3778 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
3780         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
3781         for armv5te.
3783 2018-05-28  Mark Wielaard  <mark@klomp.org>
3785         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
3786         if it is an expression containing a minus sign.
3788 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
3790         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
3792 2018-05-27  Paul Koning  <ni1d@arrl.net>
3794         * config/pdp11/pdp11.md (truncsihi2): Remove.
3796 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
3797             Chung-Ju Wu  <jasonwucj@gmail.com>
3799         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
3800         implementation.
3801         (unaligned_store_dw): Ditto.
3802         * config/nds32/nds32-memory-manipulation.c
3803         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
3804         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
3805         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
3806         (emit_setmem_word_loop): Rename to ...
3807         (emit_setmem_doubleword_loop): ... this.
3808         (nds32_gen_dup_4_byte_to_word_value): New function.
3809         (nds32_gen_dup_8_byte_to_double_word_value): New function.
3810         (nds32_expand_setmem_loop): Refine implementation.
3811         (nds32_expand_setmem_loop_v3m): Ditto.
3812         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
3813         pattern.
3815 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
3817         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
3819 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
3821         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
3822         (nds32_init_machine_status): Initialize machine->attr_naked_p and
3823         machine->attr_no_prologue_p.
3824         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
3825         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
3826         (nds32_expand_epilogue): Consider attr_naked_p.
3827         (nds32_expand_epilogue_v3pop): Likewise.
3828         (nds32_can_use_return_insn): Likewise.
3829         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
3830         attr_no_prologue_p fields.
3831         * config/nds32/nds32.opt (mret-in-naked-func): New option.
3833 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
3835         PR target/85918
3836         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
3837         attributes.
3838         * config/i386/sse.md
3839         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
3840         Rename to ...
3841         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
3842         ... this.
3843         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
3844         Rename to ...
3845         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
3846         ... this.
3847         (*<floatsuffix>floatv2div2sf2): Rename to ...
3848         (*float<floatunssuffix>v2div2sf2): ... this.
3849         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
3850         (float<floatunssuffix>v2div2sf2_mask): ... this.
3851         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
3852         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
3853         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
3854         to ...
3855         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
3856         ... this.
3857         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
3858         Rename to ...
3859         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
3860         ... this.
3861         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
3862         Rename to ...
3863         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
3864         ... this.
3865         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
3866         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
3867         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
3868         gen_ufix_truncv8dfv8si2.
3869         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
3870         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
3871         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
3872         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
3873         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
3874         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
3875         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
3876         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
3878 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
3880         PR target/85900
3881         PR target/85345
3882         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
3884 2018-05-25  Jim Wilson  <jimw@sifive.com>
3886         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
3887         * config/riscv/riscv.c (struct machine_function): Add
3888         interrupt_handler_p and attribute_checked_p fields.
3889         (riscv_attribute_table): Add interrupt.
3890         (riscv_interrupt_type_p): New.
3891         (riscv_save_reg_p): Save extra regs for interrupt handler.
3892         (riscv_use_save_libcall): Return false  for interrupt handler.
3893         (riscv_first_stack_step): Add forward declaration.
3894         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
3895         for interrupt handler with large frame.  Use it for saved reg list.
3896         (riscv_expand_prologue): Move flag_stack_usage_info support to
3897         eliminate duplication.
3898         (riscv_expand_epilogue): Generate mret for interrupt handler.
3899         (riscv_epilogue_uses): New.
3900         (riscv_can_use_return_insn): Return false for interrupt handler.
3901         (riscv_function_ok_for_sibcall): Likewise.
3902         (riscv_set_current_function): Add interrupt handler support.
3903         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
3904         * config/riscv/riscv.md (UNSPECV_MRET): New.
3905         (GP_REGNUM): New.
3906         (riscv_frflags, riscv_fsflags): Use tab after opcode.
3907         (riscv_mret): New.
3908         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
3910 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
3912         PR tree-optimization/85712
3913         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
3914         this candidate has already been replaced in-situ by a copy.
3916 2018-05-25  Jason Merrill  <jason@redhat.com>
3918         PR c++/80485 - inline function non-zero address.
3919         * symtab.c (nonzero_address): Check DECL_COMDAT.
3921 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
3923         PR target/83628
3924         * config/alpha/alpha.md (ashlsi3): New insn pattern.
3925         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
3926         extension of SImode operation.  Use const123_operand predicate.
3927         (*saddsi_1): Remove.
3928         (*saddl_se_1): Ditto.
3929         (*ssubsi_1): Ditto.
3930         (*ssubl_se_1): Ditto.
3931         * config/alpha/predicates.md (const123_operand): New predicate.
3932         * config/alpha/constraints.md (P): Use IN_RANGE.
3934 2018-05-25  Richard Biener  <rguenther@suse.de>
3936         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
3937         defaulted to true.
3938         (ref_maybe_used_by_stmt_p): Likewise.
3939         (stmt_may_clobber_ref_p): Likewise.
3940         (stmt_may_clobber_ref_p_1): Likewise.
3941         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
3942         and pass it along.
3943         (ref_maybe_used_by_stmt_p): Likewise.
3944         (stmt_may_clobber_ref_p): Likewise.
3945         (stmt_may_clobber_ref_p_1): Likewise.
3946         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
3947         the alias oracle to disambiguate DRs with stmts DR analysis
3948         couldn't handle.
3949         (vect_analyze_data_refs): Do not give up on not analyzable
3950         DRs for BB vectorization.  Remove code truncating the dataref
3951         vector.
3953 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
3955         PR target/85832
3956         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
3957         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
3958         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
3960 2018-05-25  Richard Biener  <rguenther@suse.de>
3962         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
3963         function, combining stmt data ref gathering and fatal analysis
3964         parts.
3965         (vect_analyze_data_refs): Remove now redudnant code and simplify.
3966         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
3967         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
3968         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
3969         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
3971 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
3973         PR tree-optimization/85720
3974         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
3975         SCC if all partitions are builtins.
3976         (version_loop_by_alias_check): New parameter.  Generate cancelable
3977         runtime alias check if all partitions are builtins.
3978         (distribute_loop): Update call to above function.
3980 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
3982         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
3983         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
3984         (parm_default_def_partition_arg): Ditto.
3985         (set_parm_default_def_partition): Ditto.
3986         (get_parm_default_def_partitions): Ditto and make it static.
3987         (get_undefined_value_partitions): Ditto and make it static.
3988         (remove_ssa_form): Refactor call to init_var_map here.
3989         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
3990         computation for loop region.
3991         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
3992         (register_default_def): Delete.
3993         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
3994         (parm_default_def_partition_arg): Ditto.
3995         (set_parm_default_def_partition): Ditto.
3996         (get_parm_default_def_partitions): Ditto and make it static.
3997         (get_undefined_value_partitions): Ditto and make it static.
3998         (coalesce_with_default, coalesce_with_default): Update comment.
3999         (create_coalesce_list_for_region): New func factored out from
4000         create_outofssa_var_map.
4001         (populate_coalesce_list_for_outofssa): New func factored out from
4002         create_outofssa_var_map and coalesce_ssa_name.
4003         (create_outofssa_var_map): Delete.
4004         (coalesce_ssa_name): Refactor to support live range computation.
4005         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
4006         (get_parm_default_def_partitions): Delete.
4007         (get_undefined_value_partitions): Ditto.
4008         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
4009         computation for loop region.
4010         (new_tree_live_info, loe_visit_block): Ditto.
4011         (live_worklist, set_var_live_on_entry): Ditto.
4012         (calculate_live_on_exit, verify_live_on_entry): Ditto.
4013         * tree-ssa-live.h (struct _var_map): New fields.
4014         (init_var_map): Change decl.
4015         (region_contains_p): New.
4017 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
4019         * tree-ssa-live.h (live_merge_and_clear): Delete.
4021 2018-05-25  Richard Biener  <rguenther@suse.de>
4023         PR c++/85912
4024         * tree-dump.c (dequeue_and_dump): Remove access to removed
4025         operand 2 of a SWITCH_EXPR.
4027 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4029         * doc/sourcebuild.texi (vect_double_cond_arith): Include
4030         multiplication and division.
4031         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
4032         (cond_udiv@var{m}, cond_umod@var{m}): Document.
4033         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
4034         (cond_udiv_optab, cond_umod_optab): New optabs.
4035         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
4036         (IFN_COND_RDIV): New internal functions.
4037         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
4038         TRUNC_MOD_EXPR and RDIV_EXPR.
4039         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
4040         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
4041         New unspecs.
4042         (SVE_INT_BINARY): Include mult.
4043         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
4044         (optab, sve_int_op): Handle mult.
4045         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
4046         UNSPEC_COND_DIV.
4047         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
4048         for SVE_INT_BINARY_SD.
4050 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4052         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
4053         (optab, sve_int_op): Handle div and udiv.
4054         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
4055         for SVE_INT_BINARY_SD.
4056         (*<optab><mode>3): New insn for the same.
4058 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4060         * tree-vect-patterns.c: Include predict.h.
4061         (vect_recog_divmod_pattern): Restrict check for division support
4062         to when optimizing for size.
4064 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4066         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
4067         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
4068         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
4069         (gimple_match_op::set_op): Likewise.
4070         (gimple_resimplify4): Declare.
4071         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
4072         (expr::gen_transform): Likewise.
4073         (decision_tree::gen): Generate a simplification routine for 4 operands.
4074         * gimple-match-head.c (gimple_simplify): Add an overload for
4075         4 operands.  In the top-level function, handle up to 4 call
4076         arguments and call gimple_resimplify4.
4077         (gimple_resimplify4): New function.
4078         (build_call_internal): Pass a fourth operand.
4079         (maybe_push_to_seq): Likewise.
4080         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
4081         Fold VEC_COND_EXPRs of an operation and a default value into
4082         an IFN_COND_* function if possible.
4083         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
4084         New unspecs.
4085         (SVE_COND_FP_BINARY): Include them.
4086         (optab, sve_fp_op): Handle them.
4087         (SVE_INT_BINARY_REV): New code iterator.
4088         (SVE_COND_FP_BINARY_REV): New int iterator.
4089         (commutative): New int attribute.
4090         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
4091         Declare.
4092         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
4093         function.
4094         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
4095         (*cond_<optab><mode>): New patterns for reversed operands.
4097 2018-05-25  Richard Biener  <rguenther@suse.de>
4099         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
4100         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
4101         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
4102         (STMT_VINFO_GROUPED_ACCESS): Adjust.
4103         * tree-vect-data-refs.c (everywhere): Adjust users.
4104         * tree-vect-loop.c (everywhere): Likewise.
4105         * tree-vect-slp.c (everywhere): Likewise.
4106         * tree-vect-stmts.c (everywhere): Likewise.
4107         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4109 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4111         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
4112         Rename to...
4113         (gcc_cv_as_section_exclude): ... this.
4114         Try Solaris as #exclude syntax.
4115         * configure: Regenerate.
4116         * config.in: Regenerate.
4117         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
4118         SECTION_EXCLUDE.
4119         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
4120         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
4122         * varasm.c (default_elf_asm_named_section): Don't check if
4123         HAVE_GAS_SECTION_EXCLUDE is defined.
4125 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4127         * doc/md.texi: Update the documentation of the cond_* optabs
4128         to mention the new final operand.  Fix GET_MODE_NUNITS call.
4129         Describe the scalar case too.
4130         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
4131         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
4132         instead of 2.
4133         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
4134         (get_conditional_internal_fn): Update comment.
4135         * tree-vect-loop.c (vectorizable_reduction): Pass the original
4136         accumulator value as a final argument to conditional functions.
4137         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
4138         a define_expand and add an "else" operand.  Assert for now that
4139         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
4140         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
4141         (*cond_<optab><mode>): New patterns.
4142         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
4143         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
4144         (UNSPEC_COND_EOR): Delete.
4145         (optab): Remove associated mappings.
4146         (SVE_INT_BINARY): New code iterator.
4147         (sve_int_op): Remove int attribute and add "minus" to the code
4148         attribute.
4149         (SVE_COND_INT_OP): Delete.
4150         (SVE_COND_FP_OP): Rename to...
4151         (SVE_COND_FP_BINARY): ...this.
4153 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4155         * optabs.c (can_reuse_operands_p): New function.
4156         (maybe_legitimize_operands): Try to reuse the results for
4157         earlier operands.
4159 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
4161         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
4162         Add {q} suffix to insn mnemonic.
4164 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4166         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
4167         (msp430_warn_func_return): New.
4169 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
4171         * fold-const.c (tree_nonzero_bits): New function.
4172         * fold-const.h (tree_nonzero_bits): Likewise.
4173         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
4174         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
4176 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
4178         PR target/85900
4179         PR target/85345
4180         * varasm.c (assemble_alias): Check ifunc_resolver only on
4181         FUNCTION_DECL.
4183 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
4185         PR target/85903
4186         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
4187         when memory input operand is handled.
4189 2018-05-24  Luis Machado  <luis.machado@linaro.org>
4191         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
4192         global.
4193         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
4195 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
4197         * match.pd: Delay FMA folds until after vectorization.
4199 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4201         PR target/83009
4202         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4203         address check not strict.
4205 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
4207         * gimple-match.h (gimple_match_op): New class.
4208         (mprts_hook): Replace parameters with a gimple_match_op *.
4209         (maybe_build_generic_op): Likewise.
4210         (gimple_simplified_result_is_gimple_val): Replace parameters with
4211         a const gimple_match_op *.
4212         (gimple_simplify): Replace code_helper * and tree * parameters with
4213         a gimple_match_op * parameter.
4214         (gimple_resimplify1): Replace code_helper *, tree and tree *
4215         parameters with a gimple_match_op * parameter.
4216         (gimple_resimplify2): Likewise.
4217         (gimple_resimplify3): Likewise.
4218         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
4219         parameters with a gimple_match_op * parameter.
4220         * gimple-match-head.c (gimple_simplify): Change prototypes of
4221         auto-generated functions to take a gimple_match_op * instead of
4222         separate code_helper * and tree * parameters.  Make the same
4223         change in the top-level overload and update calls to the
4224         gimple_resimplify routines.  Update calls to the auto-generated
4225         functions and to maybe_push_res_to_seq in the publicly-facing
4226         operation-specific gimple_simplify overloads.
4227         (gimple_match_op::MAX_NUM_OPS): Define.
4228         (gimple_resimplify1): Replace rcode and ops with a single res_op
4229         parameter.  Update call to gimple_simplify.
4230         (gimple_resimplify2): Likewise.
4231         (gimple_resimplify3): Likewise.
4232         (mprts_hook): Replace parameters with a gimple_match_op *.
4233         (maybe_build_generic_op): Likewise.
4234         (build_call_internal): Replace type, nargs and ops with
4235         a gimple_match_op *.
4236         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
4237         with a single gimple_match_op *.  Update calls to mprts_hook,
4238         build_call_internal and gimple_simplified_result_is_gimple_val.
4239         Factor out code that is common to the tree_code and combined_fn cases.
4240         * genmatch.c (expr::gen_transform): Replace tem_code and
4241         tem_ops with a gimple_match_op called tem_op.  Update calls
4242         to the gimple_resimplify functions and maybe_push_res_to_seq.
4243         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
4244         res_ops.  Update call to the gimple_resimplify functions.
4245         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
4246         (decision_tree::gen): Make the functions take a gimple_match_op *
4247         called res_op instead of separate res_code and res_ops parameters.
4248         Update call accordingly.
4249         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
4250         and ops with a single res_op parameter.  Update calls to
4251         maybe_build_generic_op and maybe_push_res_to_seq.
4252         (fold_stmt_1): Update calls to gimple_simplify and
4253         replace_stmt_with_simplification.
4254         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
4255         and gimple_simplified_result_is_gimple_val.
4256         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
4257         gimple_simplify.
4258         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
4259         with a gimple_match_op *.
4260         (vn_nary_build_or_lookup): Likewise.  Update call to
4261         vn_nary_build_or_lookup_1.
4262         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
4263         gimple_match_op *.  Update calls to the gimple_resimplify routines
4264         and to gimple_simplified_result_is_gimple_val.
4265         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
4266         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
4267         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
4268         (visit_nary_op): Likewise.
4269         (visit_reference_op_load): Likewise.
4271 2018-05-23  Luis Machado  <luis.machado@linaro.org>
4273         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
4274         modifier for printing the step amount.
4276 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
4278         PR target/78849
4279         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
4280         types.
4282 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
4284         * doc/sourcebuild.texi (Endianness): New subsubsection.
4286 2018-05-23  Luis Machado  <luis.machado@linaro.org>
4288         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
4289         <prefetch_dynamic_strides>: New const bool field.
4290         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
4291         prefetch_dynamic_strides.
4292         (exynosm1_prefetch_tune): Likewise.
4293         (thunderxt88_prefetch_tune): Likewise.
4294         (thunderx_prefetch_tune): Likewise.
4295         (thunderx2t99_prefetch_tune): Likewise.
4296         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
4297         false.
4298         (aarch64_override_options_internal): Update to set
4299         PARAM_PREFETCH_DYNAMIC_STRIDES.
4300         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
4301         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
4302         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
4303         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
4304         prefetch-dynamic-strides setting.
4306 2018-05-23  Luis Machado  <luis.machado@linaro.org>
4308         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
4309         <minimum_stride>: New const int field.
4310         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
4311         minimum_stride field defaulting to -1.
4312         (exynosm1_prefetch_tune): Likewise.
4313         (thunderxt88_prefetch_tune): Likewise.
4314         (thunderx_prefetch_tune): Likewise.
4315         (thunderx2t99_prefetch_tune): Likewise.
4316         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
4317         <default_opt_level>: Set to 3.
4318         (aarch64_override_options_internal): Update to set
4319         PARAM_PREFETCH_MINIMUM_STRIDE.
4320         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
4321         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
4322         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
4323         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
4324         stride is constant and is below the minimum stride threshold.
4326 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4328         * config/arm/arm-cpus.in (mode26): Delete.
4329         (armv4): Delete mode26 reference.
4330         * config/arm/arm.c (arm_configure_build_target): Delete use of
4331         isa_bit_mode26.
4333 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
4335         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
4336         New insn pattern.
4337         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
4338         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
4339         for non-SSE modes.
4340         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
4341         (floatunsdidf2): Ditto.
4343 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
4345         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
4346         (fixuns_trunc<mode>si2_avx512f): Ditto.
4347         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
4348         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
4349         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
4351 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
4353         PR rtl-optimization/79985
4354         * df-scan.c (df_insn_refs_collect): Remove special case for
4355         global registers and asm statements.
4357 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
4359         * extend.texi (Global Register Variables): Rewrite the bullet list.
4360         Note that the register is available for allocation. Note that access
4361         via inline asm must use constraints. Add note about async-signal
4362         handlers. Remove paragraph about automagic register selection.
4364 2018-05-23  Richard Biener  <rguenther@suse.de>
4366         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
4367         of fixed offset from memset VN.
4369 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
4371         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
4372         first_interp field.
4373         (alloc_cand_and_find_basis): Initialize first_interp field.
4374         (slsr_process_mul): Modify first_interp field.
4375         (slsr_process_add): Likewise.
4376         (slsr_process_cast): Modify first_interp field for each new
4377         interpretation.
4378         (slsr_process_copy): Likewise.
4379         (dump_candidate): Dump first_interp field.
4380         (replace_mult_candidate): Process all interpretations, not just
4381         subsequent ones.
4382         (replace_rhs_if_not_dup): Likewise.
4383         (replace_one_candidate): Likewise.
4385 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
4387         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
4388         Add new boolean.
4389         (aarch64_needs_frame_chain): New function.
4390         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
4392 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
4394         PR target/84882
4395         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
4396         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
4397         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
4398         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
4399         as true for strict-align.
4400         (aarch64_can_inline_p): Perform checks even when callee has no
4401         attributes to check for strict alignment.
4402         * doc/extend.texi (AArch64 Function Attributes): Document
4403         no-strict-align.
4404         * doc/invoke.texi: (AArch64 Options): Likewise.
4406 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
4408         PR tree-optimization/85853
4409         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
4410         the handling of the root of the node to...
4411         (vect_slp_analyze_node_operations_1): ...this new function,
4412         and run the whole thing with the child nodes' def types
4413         set according to their SLP node's def type.
4415 2018-05-23  Richard Biener  <rguenther@suse.de>
4417         PR middle-end/85874
4418         * tree-data-ref.c (create_runtime_alias_checks): Defer
4419         and ignore overflow warnings.
4421 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
4423         PR tree-optimization/85822
4424         * tree-vrp.c (is_masked_range_test): Fix handling of negative
4425         constants.
4427 2018-05-23  Richard Biener  <rguenther@suse.de>
4429         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
4430         memset constants via native_interpret_expr.
4432 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
4434         PR target/85345
4435         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
4436         attribute.
4437         (cgraph_node::create_alias): Likewise.
4438         (cgraph_node::get_availability): Check ifunc_resolver instead
4439         of looking up ifunc attribute.
4440         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4441         * varasm.c (do_assemble_alias): Likewise.
4442         (assemble_alias): Likewise.
4443         (default_binds_local_p_3): Likewise.
4444         * cgraph.h (cgraph_node): Add ifunc_resolver.
4445         (cgraph_node::only_called_directly_or_aliased_p): Return false
4446         for IFUNC resolver.
4447         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
4448         attribute.
4449         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
4450         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
4451         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
4452         instead of looking up ifunc attribute.
4454 2018-05-22  Luis Machado  <luis.machado@linaro.org>
4456         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
4458 2018-05-22  Martin Sebor  <msebor@redhat.com>
4460         PR middle-end/85359
4461         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
4462         only when expasion succeeds.
4463         (expand_builtin_strcmp): Same.
4464         (expand_builtin_strncmp): Same.
4466 2018-05-22  Martin Sebor  <msebor@redhat.com>
4468         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
4470 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
4471             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4473         * config/aarch64/aarch64-ldpstp.md: Replace uses of
4474         aarch64_mem_pair_operand with memory_operand and delete operand swapping
4475         code.
4476         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
4477         Add check for legitimate_address.
4478         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
4479         (aarch64_swap_ldrstr_operands): New.
4480         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
4481         Define prototype.
4483 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
4484             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4486         * config/aarch64/aarch64.md: New patterns to generate stp
4487         and ldp.
4488         (store_pair_sw, store_pair_dw): New patterns to generate stp for
4489         single words and double words.
4490         (load_pair_sw, load_pair_dw): Likewise.
4491         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
4492         Delete.
4493         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
4494         Delete.
4495         * config/aarch64/aarch64-ldpstp.md: Modify peephole
4496         for different mode ldpstp and add peephole for merged zero stores.
4497         Likewise for loads.
4498         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
4499         Add size check.
4500         (aarch64_gen_store_pair): Rename calls to match new patterns.
4501         (aarch64_gen_load_pair): Rename calls to match new patterns.
4502         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
4503         (load_pair<DREG:mode><DREG2:mode>): ... This.
4504         (store_pair<mode>): Rename to...
4505         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
4506         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
4507         New mode iterators.
4508         (V_INT_EQUIV): Handle SImode.
4509         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
4510         New predicate.
4512 2018-05-22  Martin Sebor  <msebor@redhat.com>
4514         PR c/85623
4515         * calls.c (maybe_warn_nonstring_arg): Use string length to set
4516         or ajust the presumed bound on an operation to avoid unnecessary
4517         warnings.
4519 2018-05-22  Martin Sebor  <msebor@redhat.com>
4521         PR tree-optimization/85826
4522         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
4523         assuming that a DECL necesarily has a constant size.
4525 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
4527         PR middle-end/85862
4528         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
4530 2018-05-22  Richard Biener  <rguenther@suse.de>
4532         PR tree-optimization/85834
4533         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
4534         non-constant and non-zero memset arguments.
4536 2018-05-22  Martin Liska  <mliska@suse.cz>
4538         PR ipa/85607
4539         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
4541 2018-05-22  Richard Biener  <rguenther@suse.de>
4543         PR tree-optimization/85863
4544         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
4545         comparisons when vectype is specified.
4546         (vectorizable_condition): Do not specify vectype for
4547         vect_is_simple_cond when SLP vectorizing.
4549 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
4551         PR target/85657
4552         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
4553         define __ibm128 as long double.
4554         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
4555         as a distinct type when IEEE 128-bit support is enabled.
4556         (init_float128_ieee): Fix up conversions between IFmode and IEEE
4557         128-bit types to use the correct functions.
4558         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
4559         convert between 128-bit floating point types that have different
4560         modes but the same representation, instead of using gen_lowpart to
4561         makean alias.
4562         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
4563         KFmode.
4564         (IFKF_reg): New attributes to give the register constraints for
4565         IFmode and KFmode.
4566         (extend<mode>tf2_internal): New insns to mark an explicit
4567         conversion between 128-bit floating point types that have a
4568         different mode but share the same representation.
4570 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
4572         PR tree-optimization/85814
4573         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
4574         a null return from get_strinfo when unsharing the next
4575         strinfo in the chain.
4577 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
4579         PR gcc/84923
4580         * varasm.c (weak_finish): Clean up weak_decls.
4582 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4584         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
4585         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
4586         UNSPEC_UADALP values.
4587         * config/aarch64/iterators.md (ABAL): New int iterator.
4588         (ABDL2): Likewise.
4589         (ADALP): Likewise.
4590         (sur): Add mappings for the above.
4591         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
4592         New define_insn.
4593         (aarch64_<sur>abal<mode>_4): Likewise.
4594         (aarch64_<sur>adalp<mode>_3): Likewise.
4595         (<sur>sadv16qi): New define_expand.
4597 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
4599         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
4600         (*movdf_internal): Ditto.
4601         (*rcpsf2_sse): Ditto.
4602         (*rsqrtsf2_sse): Ditto.
4603         (*sqrt<mode>2_sse): Ditto.
4605 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
4607         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
4608         eor3q<mode>4.
4609         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
4610         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
4611         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
4612         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
4613         vbcaxq_s64): New.
4614         * config/aarch64/arm_neon.h: Likewise.
4615         * config/aarch64/iterators.md (VQ_I): New.
4617 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
4619         * config.gcc: Add arc/t-multilib-linux to tmake_file for
4620         arc*-*-linux*.
4621         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
4622         MULTILIB_DIRNAMES
4624 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
4626         * config/nds32/constraints.md (S): New constraint.
4627         * config/nds32/nds32.md (call_internal): Use constraint S.
4628         (call_value_internal): Likewise.
4629         (sibcall_internal): Likewise.
4630         (sibcall_value_internal): Likewise.
4632 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
4633             Chung-Ju Wu  <jasonwucj@gmail.com>
4635         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
4636         into consideration.
4638 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
4639             Chung-Ju Wu  <jasonwucj@gmail.com>
4641         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
4642         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
4643         (nds32_rtx_costs_impl): Simplify.
4644         (nds32_address_cost_impl): Simplify.
4645         (nds32_init_rtx_costs): New function.
4646         (nds32_rtx_costs_speed_prefer): Likewise.
4647         (nds32_rtx_costs_size_prefer): Likewise.
4648         (nds32_address_cost_speed_prefer): Likewise.
4649         (nds32_address_cost_speed_fwprop): Likewise.
4650         (nds32_address_cost_size_prefer): Likewise.
4651         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
4652         * config/nds32/nds32.c (nds32_option_override): Use
4653         nds32_init_rtx_costs function.
4655 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
4657         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
4658         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
4659         (TARGET_PIPELINE_N8): Likewise.
4660         (TARGET_PIPELINE_N10): Likewise.
4661         (TARGET_PIPELINE_N13): Likewise.
4662         (TARGET_PIPELINE_GRAYWOLF): Likewise.
4664 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
4666         * config/nds32/nds32-fpu.md: Update copyright year.
4668 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4670         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
4672 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4674         * config/nds32/nds32.c
4675         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
4676         * config/nds32/nds32.opt (minline-asm-r15): New option.
4678 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4680         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
4681         MASK_HW_ABS.
4682         * config/nds32/nds32.md (abssi2): New pattern.
4684 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
4686         * config/i386/i386.md (rex64namesuffix): New mode attribute.
4687         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
4688         Merge insn pattern from sse_cvtsi2ss<round_name> and
4689         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
4690         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
4691         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
4692         using SWI48 mode iterator.
4693         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
4694         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
4695         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
4696         pattern from sse_cvttss2si<round_saeonly_name>
4697         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
4698         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
4699         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
4700         using SWI48 mode iterator.
4701         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
4702         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
4703         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
4704         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
4705         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
4706         using SWI48 mode iterator.
4707         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
4708         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
4709         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
4710         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
4711         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
4712         SWI48 mode iterator.
4713         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
4714         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
4715         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
4716         pattern from sse_cvttsd2si<round_saeonly_name>
4717         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
4719 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4721         * config/nds32/nds32-md-auxiliary.c
4722         (nds32_valid_smw_lwm_base_p): Refine.
4723         (nds32_output_smw_single_word): Refine.
4724         (nds32_output_smw_double_word): New.
4725         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
4727 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4729         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
4730         (nds32_output_stack_pop): Refine.
4731         (nds32_expand_unaligned_load): Refine.
4732         (nds32_expand_unaligned_store): Refine.
4734 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
4735             Chung-Ju Wu  <jasonwucj@gmail.com>
4737         * config/nds32/constants.md: Add TP_REGNUM constant.
4738         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
4739         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
4740         UNSPEC_ADD32.
4741         * config/nds32/nds32-doubleword.md: Consider flag_pic.
4742         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
4743         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
4744         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
4745         and PIC code generation.
4746         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
4747         code generation.
4748         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
4749         optimization.
4750         * config/nds32/nds32.md: Support TLS and PIC.
4751         * config/nds32/nds32.c: Support TLS and PIC.
4752         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
4753         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
4754         predicate.
4756 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4758         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
4759         mode with E_ prefix.
4761 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
4762             Chung-Ju Wu  <jasonwucj@gmail.com>
4764         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
4765         * config/nds32/nds32-md-auxiliary.c
4766         (symbolic_reference_mentioned_p): New.
4767         (nds32_legitimize_ict_address): New.
4768         (nds32_expand_ict_move): New.
4769         (nds32_indirect_call_referenced_p): New.
4770         (nds32_symbol_binds_local_p): Delete.
4771         (nds32_long_call_p): Modify.
4772         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
4773         * config/nds32/nds32-protos.h
4774         (symbolic_reference_mentioned_p): Declare.
4775         (nds32_legitimize_ict_address): Declare.
4776         (nds32_expand_ict_move): Declare.
4777         (nds32_indirect_call_referenced_p): Declare.
4778         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
4779         (nds32_relax_group): Use nds32_ict_const_p as condition.
4780         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
4781         (nds32_asm_file_start): Output ict_model directive in asm code.
4782         (nds32_legitimate_address_p): Consider indirect call.
4783         (nds32_print_operand): Consider indirect call.
4784         (nds32_print_operand_address): Consider indirect call.
4785         (nds32_insert_attributes): Handle "indirect_call" attribute.
4786         (TARGET_LEGITIMATE_ADDRESS_P): Define.
4787         (TARGET_LEGITIMATE_CONSTANT_P): Define.
4788         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
4789         (TARGET_DELEGITIMIZE_ADDRESS): Define.
4790         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
4791         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
4792         (TARGET_ICT_MODEL_SMALL): Define.
4793         (TARGET_ICT_MODEL_LARGE): Define.
4794         * config/nds32/nds32.md (movsi): Consider ict model.
4795         (call, call_value): Consider ict model.
4796         (sibcall, sibcall_value): Consider ict model.
4797         * config/nds32/nds32.opt (mict-model): New option.
4798         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
4799         model.
4801 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
4802             Monk Chiang  <sh.chiang04@gmail.com>
4803             Jim Wilson <jimw@sifive.com>
4805         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
4806         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
4807         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
4808         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
4809         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
4810         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
4811         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
4812         compute save_libcall_adjustment properly.
4813         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
4814         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
4815         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
4816         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
4817         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
4818         (ABI_SPEC): Handle mabi=ilp32e.
4819         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
4820         (RVE): Add RVE mask.
4821         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
4822         <-march>: Add rv32e as an example.
4824 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
4826         PR c++/82899
4827         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
4828         (intra_create_variable_infos): Handle C++ constructors.
4830 2018-05-18  Martin Liska  <mliska@suse.cz>
4832         * passes.def: Remove a redundant pass.
4834 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
4836         PR bootstrap/85838
4837         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
4839 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4841         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
4842         (ARMv4): Update.
4843         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
4844         (ARMv6m): Update.
4845         (armv2, armv2a, armv3, armv3m): Delete architectures.
4846         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
4847         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
4848         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
4849         Delete cpus.
4850         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
4851         (*mulsidi3adddi): Likewise.
4852         (mulsidi3): Likewise.
4853         (*mulsidi3_nov6): Likewise.
4854         (umulsidi3): Likewise.
4855         (umulsidi3_nov6): Likewise.
4856         (umaddsidi4): Likewise.
4857         (*umulsidi3adddi): Likewise.
4858         (smulsi3_highpart): Likewise.
4859         (*smulsi3_highpart_nov6): Likewise.
4860         (umulsi3_highpart): Likewise.
4861         (*umulsi3_highpart_nov6): Likewise.
4862         * config/arm/arm.h (arm_arch3m): Delete.
4863         * config/arm/arm.c (arm_arch3m): Delete.
4864         (arm_option_override_internal): Update armv3-related comment.
4865         (arm_configure_build_target): Delete use of isa_bit_mode32.
4866         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
4867         (arm_rtx_costs_internal): Delete check of arm_arch3m.
4868         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
4869         (mulsa3): Likewise.
4870         (mulusa3): Likewise.
4871         * config/arm/arm-protos.h (arm_arch3m): Delete.
4872         * config/arm/arm-tables.opt: Regenerate.
4873         * config/arm/arm-tune.md: Likewise.
4874         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
4875         deleted architectures.
4877 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4879         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
4880         (armv5t, armv5te): New features.
4881         (ARMv5, ARMv5e): Delete fgroups.
4882         (ARMv5t, ARMv5te): Adjust for above changes.
4883         (ARMv6m): Likewise.
4884         (armv5, armv5e): Delete arches.
4885         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
4886         arm_arch5.
4887         (*call_reg_arm): Likewise.
4888         (*call_value_reg_armv5): Likewise.
4889         (*call_value_reg_arm): Likewise.
4890         (*call_symbol): Likewise.
4891         (*call_value_symbol): Likewise.
4892         (*sibcall_insn): Likewise.
4893         (*sibcall_value_insn): Likewise.
4894         (clzsi2): Likewise.
4895         (prefetch): Likewise.
4896         (define_split and define_peephole2 dependent on arm_arch5):
4897         Likewise.
4898         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
4899         arm_arch5e.
4900         (TARGET_ARM_QBIT): Likewise.
4901         (TARGET_DSP_MULTIPLY): Likewise.
4902         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
4903         (arm_arch5, arm_arch5e): Delete.
4904         (arm_arch5t, arm_arch5te): Declare.
4905         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
4906         (arm_arch5t): Declare.
4907         (arm_option_reconfigure_globals): Update for the above.
4908         (arm_options_perform_arch_sanity_checks): Update comment, replace
4909         use of arm_arch5 with arm_arch5t.
4910         (use_return_insn): Likewise.
4911         (arm_emit_call_insn): Likewise.
4912         (output_return_instruction): Likewise.
4913         (arm_final_prescan_insn): Likewise.
4914         (arm_coproc_builtin_available): Likewise.
4915         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
4916         arm_arch5e with arm_arch5t and arm_arch5te.
4917         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
4918         (arm_arch5t, arm_arch5te): Declare.
4919         * config/arm/arm-tables.opt: Regenerate.
4920         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
4921         * config/arm/t-multilib: Likewise.
4922         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
4923         instead of arm_arch5.
4924         (*call_reg_thumb1): Likewise.
4925         (*call_value_reg_thumb1_v5): Likewise.
4926         (*call_value_reg_thumb1): Likewise.
4927         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
4928         unreachable path.
4929         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
4931 2018-05-18  Martin Liska  <mliska@suse.cz>
4933         PR gcov-profile/84846
4934         * doc/gcov.texi: Document -t option of gcov tool.
4936 2018-05-18  Martin Liska  <mliska@suse.cz>
4938         PR gcov-profile/84846
4939         * gcov.c (print_usage): Add new -t option.
4940         (process_args): Handle the option.
4941         (generate_results): Use stdout as output when requested by
4942         the option.
4944 2018-05-18  Martin Liska  <mliska@suse.cz>
4946         PR gcov-profile/84846
4947         * coverage.c (coverage_init): Write PWD to .gcno file.
4948         * doc/gcov.texi: Document how working directory is printed.
4949         * gcov-dump.c (dump_gcov_file): Print PWD.
4950         * gcov.c (output_intermediate_file): Likewise.
4951         (read_graph_file): Read PWD string.
4952         (output_lines): Print PWD.
4954 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4956         PR middle-end/85817
4957         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
4958         for retval and return false if all args to phi are zero.
4960 2018-05-18  Richard Biener  <rguenther@suse.de>
4962         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
4963         method.
4964         (evrp_dom_walker::before_dom_children): Call it.
4966 2018-05-18  Richard Biener  <rguenther@suse.de>
4968         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
4969         results when processing array refs with variable index.
4971 2018-05-18  Toon Moene  <toon@moene.org>
4973         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
4974         directly after that of -floop-interchange. Indicate that both
4975         options are enabled by default when specifying -O3.
4977 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4979         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
4980         iterator.  Delete separate integer-mode vec_set<mode> expander.
4981         (aarch64_simd_vec_setv2di): Delete.
4982         (vec_setv2di): Delete.
4983         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
4984         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
4985         the "w, r" alternative.
4987 2018-05-18  Martin Liska  <mliska@suse.cz>
4989         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
4990         * tree-pass.h (make_pass_lower_switch_O0): New function.
4991         * tree-switch-conversion.c (node_has_low_bound): Remove.
4992         (node_has_high_bound): Likewise.
4993         (node_is_bounded): Likewise.
4994         (class pass_lower_switch): Make it a template type and create
4995         two instances.
4996         (pass_lower_switch::execute): Add template argument.
4997         (make_pass_lower_switch): New function.
4998         (make_pass_lower_switch_O0): New function.
4999         (do_jump_if_equal): Remove.
5000         (emit_case_nodes): Simplify to just handle all 3 cases and leave
5001         all the hard work to tree optimization passes.
5003 2018-05-18  Martin Liska  <mliska@suse.cz>
5005         * dbgcnt.c (limit_low): Renamed from limit.
5006         (limit_high): New variable.
5007         (dbg_cnt_is_enabled): Check for upper limit.
5008         (dbg_cnt): Adjust dumping.
5009         (dbg_cnt_set_limit_by_index): Add new argument for high
5010         value.
5011         (dbg_cnt_set_limit_by_name): Likewise.
5012         (dbg_cnt_process_single_pair): Parse new format.
5013         (dbg_cnt_process_opt): Use strtok.
5014         (dbg_cnt_list_all_counters): Remove 'value' and add
5015         'limit_high'.
5016         * doc/invoke.texi: Document changes.
5018 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
5020         * doc/sourcebuild.texi (scalar_all_fma): Document.
5021         * tree.def (FMA_EXPR): Delete.
5022         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
5023         * internal-fn.c (ternary_direct): New macro.
5024         (expand_ternary_optab_fn): Likewise.
5025         (direct_ternary_optab_supported_p): Likewise.
5026         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
5027         * builtins.c (fold_builtin_fma): Delete.
5028         (fold_builtin_3): Don't call it.
5029         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
5030         * expr.c (expand_expr_real_2): Likewise.
5031         * fold-const.c (operand_equal_p): Likewise.
5032         (fold_ternary_loc): Likewise.
5033         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
5034         * gimple.c (DEFTREECODE): Likewise.
5035         * gimplify.c (gimplify_expr): Likewise.
5036         * optabs-tree.c (optab_for_tree_code): Likewise.
5037         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
5038         * tree-eh.c (operation_could_trap_p): Likewise.
5039         (stmt_could_throw_1_p): Likewise.
5040         * tree-inline.c (estimate_operator_cost): Likewise.
5041         * tree-pretty-print.c (dump_generic_node): Likewise.
5042         (op_code_prio): Likewise.
5043         * tree-ssa-loop-im.c (stmt_cost): Likewise.
5044         * tree-ssa-operands.c (get_expr_operands): Likewise.
5045         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
5046         * fold-const-call.h (fold_fma): Delete.
5047         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
5048         CFN_FNMA and CFN_FNMS.
5049         (fold_fma): Delete.
5050         * genmatch.c (combined_fn): New enum.
5051         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
5052         (commutative_op): New function.
5053         (commutate): Use it.  Handle more than 2 operands.
5054         (dt_operand::gen_gimple_expr): Use commutative_op.
5055         (parser::parse_expr): Allow :c to be used with non-binary
5056         operators if the commutative operand is known.
5057         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
5058         CFN_FMS, CFN_FNMA and CFN_FNMS.
5059         (backprop::process_assign_use): Remove FMA_EXPR handling.
5060         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
5061         (gen_hsa_fma): New function.
5062         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
5063         IFN_FNMA and IFN_FNMS.
5064         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
5065         * gimple-fold.h (follow_all_ssa_edges): Declare.
5066         * gimple-fold.c (follow_all_ssa_edges): New function.
5067         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
5068         gimple_build interface and use follow_all_ssa_edges to fold the result.
5069         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
5070         instead of checking for optabs directly.
5071         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
5072         rather than FMA_EXPRs.
5073         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
5074         call to IFN_FMA instead of an FMA_EXPR.
5076 2018-05-17  Jim Wilson  <jimw@sifive.com>
5078         * expr.c (do_tablejump): When converting index to Pmode, if we have a
5079         sign extended promoted subreg, and the range does not have the sign bit
5080         set, then do a sign extend.
5082         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
5083         test, check for sign extended subreg and/or constant operands, and
5084         do a sign extend in that case.
5086 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
5088         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
5089         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
5090         Add untyped.
5091         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
5092         Change logics_shift_reg to logics_shift_imm.
5093         (thunderx2t99_fp_loadpair_basic): Delete.
5094         (thunderx2t99_fp_storepair_basic): Delete.
5095         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
5096         (thunderx2t99_asimd_polynomial): Delete.
5097         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
5098         and neon_fp_mul_d_scalar_q.
5099         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
5100         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
5101         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
5102         (thunderx2t99_asimd_lut): Add missing tbl types.
5103         (thunderx2t99_asimd_ext): Delete.
5104         (thunderx2t99_asimd_load1_1_mult): Delete.
5105         (thunderx2t99_asimd_load1_2_mult): Delete.
5106         (thunderx2t99_asimd_load1_ldp): New.
5107         (thunderx2t99_asimd_load1): New.
5108         (thunderx2t99_asimd_load2): Add missing *load2* types.
5109         (thunderx2t99_asimd_load3): New.
5110         (thunderx2t99_asimd_load4): New.
5111         (thunderx2t99_asimd_store1_1_mult): Delete.
5112         (thunderx2t99_asimd_store1_2_mult): Delete.
5113         (thunderx2t99_asimd_store2_mult): Delete.
5114         (thunderx2t99_asimd_store2_onelane): Delete.
5115         (thunderx2t99_asimd_store_stp): New.
5116         (thunderx2t99_asimd_store1): New.
5117         (thunderx2t99_asimd_store2): New.
5118         (thunderx2t99_asimd_store3): New.
5119         (thunderx2t99_asimd_store4): New.
5121 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
5123         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
5124         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
5126 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
5127             Segher Boessenkool  <segher@kernel.crashing.org>
5129         PR target/85698
5130         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
5131         operand.
5133 2018-05-17  Richard Biener  <rguenther@suse.de>
5135         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
5136         for pruning loop and prune defs feeding only already visited PHIs.
5138 2018-05-17  Richard Biener  <rguenther@suse.de>
5140         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
5142 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
5143             Richard Biener  <rguenther@suse.de>
5145         PR tree-optimization/85793
5146         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
5147         for VMAT_ELEMENTWISE.
5149 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
5151         * internal-fn.h (lookup_internal_fn): Declare
5152         * internal-fn.c (lookup_internal_fn): New function.
5153         * gimple.c (gimple_build_call_from_tree): Handle calls to
5154         internal functions.
5155         * gimple-pretty-print.c (dump_gimple_call): Print "." before
5156         internal function names.
5157         * tree-pretty-print.c (dump_generic_node): Likewise.
5158         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
5160 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
5162         * gimple-fold.h (gimple_build): Make the function forms take
5163         combined_fn rather than built_in_function.
5164         (gimple_simplify): Likewise.
5165         * gimple-match-head.c (gimple_simplify): Likewise.
5166         * gimple-fold.c (gimple_build): Likewise.
5167         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
5168         rather than gimple_build_call_internal.
5169         (get_initial_defs_for_reduction): Likewise.
5170         (vect_create_epilog_for_reduction): Likewise.
5171         (vectorizable_live_operation): Likewise.
5173 2018-05-17  Martin Liska  <mliska@suse.cz>
5175         * gimple-ssa-sprintf.c (format_directive): Do not use
5176         space in between 'G_' and '('.
5178 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
5180         PR target/85323
5181         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
5182         even if the mask is not all ones.
5184         PR target/85323
5185         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
5186         vector.
5187         (ix86_gimple_fold_builtin): Likewise.
5189         PR target/85323
5190         * config/i386/i386.c: Include tree-vector-builder.h.
5191         (ix86_vector_shift_count): New function.
5192         (ix86_fold_builtin): Fold shift builtins by scalar count.
5193         (ix86_gimple_fold_builtin): Likewise.
5195         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
5196         _mm512_setzero): New intrinsics.
5198 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
5199             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5201         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
5202         code generation for cases where splatting a value is not useful.
5203         * simplify-rtx.c (simplify_ternary_operation): Simplify
5204         vec_merge across a vec_duplicate and a paradoxical subreg forming
5205         a vector mode to a vec_concat.
5207 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
5209         * config.gcc: Support "goldmont-plus".
5210         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
5211         "goldmont-plus".
5212         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5213         PROCESSOR_GOLDMONT_PLUS.
5214         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
5215         (processor_target_table): Add "goldmont-plus".
5216         (PTA_GOLDMONT_PLUS): Define.
5217         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
5218         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
5219         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
5220         (fold_builtin_cpu): Add "goldmont-plus".
5221         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
5222         (ix86_option_override_internal): Add "goldmont-plus".
5223         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
5224         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
5225         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
5226         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
5228 2018-05-17  Richard Biener  <rguenther@suse.de>
5230         PR tree-optimization/85757
5231         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
5232         remove defs that only feed that PHI from further processing.
5234 2018-05-16  Jim Wilson  <jimw@sifive.com>
5236         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
5237         asterisk to name.
5238         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
5240 2018-05-16  Mark Wielaard  <mark@klomp.org>
5242         * dwarf2out.c (count_index_strings): New function.
5243         (output_indirect_strings): Call count_index_strings and generate
5244         header for dwarf_version >= 5.
5246 2018-05-16  Mark Wielaard  <mark@klomp.org>
5248         * dwarf2out.c (dwarf_FORM): New function.
5249         (set_indirect_string): Use dwarf_FORM.
5250         (reset_indirect_string): Likewise.
5251         (size_of_die): Likewise.
5252         (value_format): Likewise.
5253         (output_die): Likewise.
5254         (add_skeleton_AT_string): Likewise.
5255         (output_macinfo_op): Likewise.
5256         (index_string): Likewise.
5257         (output_index_string_offset): Likewise.
5258         (output_index_string): Likewise.
5259         (count_index_strings): Likewise.
5261 2018-05-16  Carl Love  <cel@us.ibm.com>
5263         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
5264         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
5266 2018-05-16  Martin Jambor  <mjambor@suse.cz>
5268         * ipa-prop.c (ipa_free_all_edge_args): Remove.
5269         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
5271 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
5273         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
5274         (fnma<mode>4): Likewise.
5275         (fms<mode>4): Likewise.
5276         (fnms<mode>4): Likewise.
5277         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
5278         (aarch64_fnma<mode>4): Likewise.
5279         (aarch64_fms<mode>4): Likewise.
5280         (aarch64_fnms<mode>4): Likewise.
5281         (aarch64_fnmadd<mode>4): Likewise.
5283 2018-05-16  Jason Merrill  <jason@redhat.com>
5285         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
5287 2018-05-16  Richard Biener  <rguenther@suse.de>
5289         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
5290         (dump_stmt_cost): Declare.
5291         (add_stmt_cost): Dump cost we add.
5292         (add_stmt_costs): New function.
5293         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
5294         No longer exported.
5295         (vect_analyze_stmt): Adjust prototype.
5296         (vectorizable_condition): Likewise.
5297         (vectorizable_live_operation): Likewise.
5298         (vectorizable_reduction): Likewise.
5299         (vectorizable_induction): Likewise.
5300         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
5301         cost vector to pass to vectorizable_ and record afterwards.
5302         (vect_model_reduction_cost): Take cost vector argument and adjust.
5303         (vect_model_induction_cost): Likewise.
5304         (vectorizable_reduction): Likewise.
5305         (vectorizable_induction): Likewise.
5306         (vectorizable_live_operation): Likewise.
5307         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
5308         SLP_TREE_NUMBER_OF_VEC_STMTS.
5309         (vect_analyze_slp_cost_1): Remove.
5310         (vect_analyze_slp_cost): Likewise.
5311         (vect_slp_analyze_node_operations): Take visited args and
5312         a target cost vector.  Avoid processing already visited stmt sets.
5313         (vect_slp_analyze_operations): Use a local cost vector to gather
5314         costs and register those of non-discarded instances.
5315         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
5316         (vect_schedule_slp_instance): Remove copying of
5317         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
5318         zero.
5319         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
5320         adding cost.  Record cost entry location.
5321         (vect_prologue_cost_for_slp_op): Function to compute cost of
5322         a constant or invariant generated for SLP vect in the prologue,
5323         split out from vect_analyze_slp_cost_1.
5324         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
5325         (vect_model_promotion_demotion_cost): Likewise.
5326         (vect_model_store_cost): Likewise, make static.
5327         (vect_model_load_cost): Likewise.
5328         (vectorizable_bswap): Add cost vector arg and adjust.
5329         (vectorizable_call): Likewise.
5330         (vectorizable_simd_clone_call): Likewise.
5331         (vectorizable_conversion): Likewise.
5332         (vectorizable_assignment): Likewise.
5333         (vectorizable_shift): Likewise.
5334         (vectorizable_operation): Likewise.
5335         (vectorizable_store): Likewise.
5336         (vectorizable_load): Likewise.
5337         (vectorizable_condition): Likewise.
5338         (vectorizable_comparison): Likewise.
5339         (can_vectorize_live_stmts): Likewise.
5340         (vect_analyze_stmt): Likewise.
5341         (vect_transform_stmt): Adjust calls to vectorizable_*.
5342         * tree-vectorizer.c: Include gimple-pretty-print.h.
5343         (dump_stmt_cost): New function.
5345 2018-05-16  Richard Biener  <rguenther@suse.de>
5347         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
5348         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
5349         * tree-ssa-dse.c: Include tree-ssa-loop.h.
5350         (check_name): New callback.
5351         (dse_classify_store): Track cycles via a visited bitmap of PHI
5352         defs and simplify handling of in-loop and across loop dead stores
5353         and properly fail for loop-variant refs.  Handle byte-tracking with
5354         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
5355         limiting the walk.
5357 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
5359         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
5360         (vect_get_mask_type_for_stmt): Likewise.
5361         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
5362         split out from...
5363         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
5364         to determine the statement's vector type and the vector type that
5365         should be used for calculating nunits.  Deal with cases in which
5366         the type has to be deferred.
5367         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
5368         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
5369         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
5370         (vect_determine_vf_for_stmt): New functions, split out from...
5371         (vect_determine_vectorization_factor): ...here.
5372         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
5373         (vect_get_mask_type_for_stmt): New functions, split out from
5374         vect_determine_vectorization_factor.
5376 2018-05-16  Richard Biener  <rguenther@suse.de>
5378         * tree-cfg.c (verify_gimple_assign_ternary): Properly
5379         verify the [VEC_]COND_EXPR embedded comparison.
5381 2018-05-15  Martin Sebor  <msebor@redhat.com>
5383         PR tree-optimization/85753
5384         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
5385         RECORD_TYPE in addition to ARRAY_TYPE.
5387 2018-05-15  Martin Sebor  <msebor@redhat.com>
5389         PR middle-end/85643
5390         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
5392 2018-05-15  Richard Biener  <rguenther@suse.de>
5394         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
5395         add by_clobber_p one.  Change algorithm to collect all defs
5396         representing uses we need to walk and try reducing them to
5397         a single one before failing.
5398         (dse_dom_walker::dse_optimize_stmt): Adjust.
5400 2018-05-13  Mark Wielaard  <mark@klomp.org>
5402         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
5403         (size_of_loc_descr): Likewise.
5404         (output_loc_operands): Likewise.
5405         (output_loc_operands_raw): Likewise.
5406         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
5407         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
5408         (hash_loc_operands): Likewise.
5409         (compare_loc_operands): Likewise.
5411 2018-05-14  Mark Wielaard  <mark@klomp.org>
5413         * dwarf2out.c (count_index_addrs): New function.
5414         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
5416 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5418         PR tree-optimization/83648
5419         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
5420         return value as malloc candidate.
5422 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5424         PR ipa/85734
5425         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
5426         param as true in call to suggest_attribute.
5428 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
5430         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
5431         -mreadonly-in-sdata.
5433 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5435         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
5436         New pattern.
5437         (aarch64_crypto_aesd_fused): Likewise.
5439 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
5441         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
5442         (movsi_aarch64): Likewise.
5443         (load_pairsi): Likewise.
5444         (load_pairdi): Likewise.
5445         (store_pairsi): Likewise.
5446         (store_pairdi): Likewise.
5447         (load_pairsf): Likewise.
5448         (load_pairdf): Likewise.
5449         (store_pairsf): Likewise.
5450         (store_pairdf): Likewise.
5451         (zero_extend): Likewise.
5452         (trunc): Swap alternatives.
5453         (fcvt_target): Add '?' to prefer w over r.
5455 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
5457         PR target/85756
5458         * config/i386/i386.md: Disallow non-commutative arithmetics in
5459         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
5460         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
5461         in the peephole2 before it.
5463 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
5465         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
5466         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
5467         (ix86_handle_option): Handle -mcldemote.
5468         * config.gcc: New header.
5469         * config/i386/cldemoteintrin.h: New file.
5470         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
5471         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
5472         -mcldemote.
5473         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5474         OPTION_MASK_ISA_CLDEMOTE.
5475         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
5476         (ix86_valid_target_attribute_inner_p): Ditto.
5477         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
5478         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
5479         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
5480         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
5481         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
5482         (cldemote): New.
5483         * config/i386/i386.opt: Add -mcldemote.
5484         * config/i386/x86intrin.h: New header.
5485         * doc/invoke.texi: Add -mcldemote.
5487 2018-05-14  Richard Biener  <rguenther@suse.de>
5489         * doc/match-and-simplify.texi: Adjust :s documentation.
5491 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
5493         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
5494         intended memcpy size.
5495         (REORDER_45): Likewise.
5497 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
5499         * sort.cc: New file.
5500         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
5501         * vec.c (qsort_chk): Use gcc_qsort.
5502         * Makefile.in (OBJS-libcommon): Add sort.o.
5503         (build/sort.o): New target.  Use it...
5504         (BUILD_RTL): ... here, and...
5505         (build/gencfn-macros): ... here, and...
5506         (build/genmatch): ... here.
5508 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
5509             Chung-Ju Wu  <jasonwucj@gmail.com>
5511         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
5512         * config/nds32/nds32-graywolf.md: New file.
5513         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
5514         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
5515         pipeline.
5516         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
5517         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
5518         * config/nds32/nds32.md (pipeline_model): Add graywolf.
5519         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
5520         * config/nds32/pipelines.md: Include n15 settings.
5522 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
5523             Chung-Ju Wu  <jasonwucj@gmail.com>
5525         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
5526         * config/nds32/nds32-n13.md: New file.
5527         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
5528         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
5529         pipeline.
5530         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
5531         * config/nds32/nds32.md (pipeline_model): Add n13.
5532         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
5533         * config/nds32/pipelines.md: Include n13 settings.
5535 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
5536             Chung-Ju Wu  <jasonwucj@gmail.com>
5538         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
5539         * config/nds32/nds32-n10.md: New file.
5540         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
5541         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
5542         pipeline.
5543         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
5544         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
5545         * config/nds32/nds32.md (pipeline_model): Add n10.
5546         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
5547         * config/nds32/pipelines.md: Include n10 settings.
5549 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
5550             Kito Cheng  <kito.cheng@gmail.com>
5551             Chung-Ju Wu  <jasonwucj@gmail.com>
5553         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
5554         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5555         Add enum values for DSP extension instructions.
5556         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
5557         New constraints.
5558         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
5559         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
5560         New code iterators.
5561         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
5562         * config/nds32/nds32-dspext.md: New file for DSP implementation.
5563         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
5564         * config/nds32/nds32-intrinsic.md: Likewise.
5565         * config/nds32/nds32_intrinsic.h: Likewise.
5566         * config/nds32/nds32-md-auxiliary.c: Likewise.
5567         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
5568         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
5569         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
5570         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
5571         * config/nds32/nds32-protos.h: New declarations for DSP extension.
5572         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
5573         TYPE_DMAC in switch statement.
5574         * config/nds32/nds32.c: New checking and implementation for DSP
5575         extension instructions.
5576         * config/nds32/nds32.h: Likewise.
5577         * config/nds32/nds32.md: Likewise.
5578         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
5579         * config/nds32/predicates.md: Implement new predicates for DSP
5580         extension.
5582 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
5584         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
5585         Reformat alternatives and attributes so it is easier to identify
5586         which constraints/attributes go with which instruction.
5587         (mov<mode>_hardfloat32, FMOVE64): Likewise.
5588         (mov<mode>_softfloat32, FMOVE64): Likewise.
5589         (mov<mode>_hardfloat64, FMOVE64): Likewise.
5590         (mov<mode>_softfloat64, FMOVE64): Likewise.
5592 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5594         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5595         subsection.
5596         (Basic PowerPC Built-in Functions): The new name of the
5597         subsection previously known as "PowerPC Built-in Functions".
5598         (Basic PowerPC Built-in Functions Available on all Configurations):
5599         New subsubsection.
5600         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
5601         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
5602         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
5603         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
5605 2018-05-11  Martin Jambor  <mjambor@suse.cz>
5607         PR ipa/85655
5608         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
5609         single const.
5611 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
5613         PR target/85733
5614         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
5616 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
5618         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
5619         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
5620         (ix86_handle_option): Handle -mwaitpkg.
5621         * config.gcc: New header.
5622         * config/i386/cpuid.h (bit_WAITPKG): New bit.
5623         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
5624         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
5625         function type.
5626         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5627         OPTION_MASK_ISA_WAITPKG.
5628         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
5629         (ix86_option_override_internal): Add PTA_WAITPKG.
5630         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
5631         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
5632         IX86_BUILTIN_TPAUSE.
5633         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
5634         __builtin_ia32_umwait and __builtin_ia32_tpause.
5635         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
5636         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
5637         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
5638         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
5639         UNSPECV_TPAUSE): New.
5640         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
5641         * config/i386/i386.opt: Add -mwaitpkg.
5642         * config/i386/waitpkgintrin.h: New file.
5643         * config/i386/x86intrin.h: New header.
5644         * doc/invoke.texi: Add -mwaitpkg.
5646 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
5648         PR target/85606
5649         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
5650         equivalent.
5651         (cortex-m0): Use armv6s-m isa.
5652         (cortex-m0plus): Likewise.
5653         (cortex-m1): Likewise.
5654         (cortex-m0.small-multiply): Likewise.
5655         (cortex-m0plus.small-multiply): Likewise.
5656         (cortex-m1.small-multiply): Likewise.
5658 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
5659             Jakub Jelinek  <jakub@redhat.com>
5661         PR tree-optimization/85692
5662         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
5663         source permute as well.
5665 2018-05-11  Martin Liska  <mliska@suse.cz>
5667         PR sanitizer/85556
5668         * doc/extend.texi: Document LLVM style format for no_sanitize
5669         attribute.
5671 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
5673         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
5674         mode_supports_vsx_dform_quad to mode_supports_dq_form.
5675         (mode_supports_vsx_dform_quad): Likewise.
5676         (mode_supports_vmx_dform): Move these functions to be next to the
5677         other mode_supports functions.
5678         (mode_supports_dq_form): Likewise.
5679         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
5680         mode_supports_dq_form.
5681         (reg_offset_addressing_ok_p): Likewise.
5682         (offsettable_ok_by_alignment): Likewise.
5683         (rs6000_legitimate_offset_address_p): Likewise.
5684         (legitimate_lo_sum_address_p): Likewise.
5685         (rs6000_legitimize_address): Likewise.
5686         (rs6000_legitimize_reload_address): Likewise.
5687         (rs6000_secondary_reload_inner): Likewise.
5688         (rs6000_preferred_reload_class): Likewise.
5689         (rs6000_output_move_128bit): Likewise.
5691 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
5693         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
5694         Generate SImode target register for null target.
5695         <case IX86_BUILTIN_XGETBV>: Ditto.
5696         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
5697         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
5699 2018-05-10  Carl Love  <cel@us.ibm.com>
5701         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
5702         dcbtt and dcbtstt if operands[2] is 0.
5704 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
5706         PR target/85693
5707         * config/i386/sse.md (usadv64qi): New expander.
5709 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
5711         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
5712         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
5713         -maltivec=be support.
5714         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
5715         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
5716         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
5717         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
5718         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
5719         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
5720         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
5721         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
5722         altivec_vsumsws): Adjust.
5723         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
5724         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
5725         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
5726         support.
5727         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
5728         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
5729         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
5730         (altivec_lve<VI_char>x): Delete expand.
5731         (*altivec_lve<VI_char>x_internal): Rename to...
5732         (altivec_lve<VI_char>x): ... this.
5733         (altivec_lvxl_<mode>): Delete expand.
5734         (*altivec_lvxl_<mode>_internal): Rename to ...
5735         (altivec_lvxl_<mode>): ... this.
5736         (altivec_stvxl_<mode>): Delete expand.
5737         (*altivec_stvxl_<mode>_internal): Rename to ...
5738         (altivec_stvxl_<mode>): ... this.
5739         (altivec_stve<VI_char>x): Delete expand.
5740         (*altivec_stve<VI_char>x_internal): Rename to ...
5741         (altivec_stve<VI_char>x): ... this.
5742         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
5743         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
5744         reduc_plus_scal_<mode>): Adjust.
5745         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
5746         comment.
5747         (rs6000_cpu_cpp_builtins): Adjust.
5748         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
5749         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
5750         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
5751         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
5752         -maltivec=be support.
5753         (rs6000_split_vec_extract_var): Adjust.
5754         (rs6000_split_v4si_init): Adjust.
5755         (swap_selector_for_mode): Delete.
5756         (altivec_expand_lvx_be, altivec_expand_stvx_be,
5757         altivec_expand_stvex_be): Delete.
5758         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
5759         -maltivec=be support.
5760         (rs6000_gimple_fold_builtin): Ditto.
5761         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
5762         Adjust.
5763         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
5764         (TARGET_DIRECT_MOVE_64BIT): Adjust.
5765         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
5766         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
5767         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
5768         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
5769         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
5770         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
5771         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
5772         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
5773         anonymous split): Adjust.
5774         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
5775         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
5777 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
5779         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
5780         when --with-gxx-include-dir is also specified.
5781         * configure: Regenerate.
5783 2018-05-09  Jim Wilson  <jimw@sifive.com>
5785         PR target/84797
5786         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
5787         * config/riscv/t-withmultilib: New.
5788         * config/riscv/withmultilib.h: New.
5789         * doc/install.texi: Document RISC-V --with-multilib-list support.
5791 2018-05-09  Richard Biener  <rguenther@suse.de>
5793         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
5794         vector.
5795         (vect_bb_vectorization_profitable_p): Adjust.  Compute
5796         actual scalar cost using the cost vector and the add_stmt_cost
5797         machinery.
5799 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5801         PR rtl-optimization/85645
5802         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
5803         in the REG_CFA_REGISTER note for LR, don't leave it empty.
5805 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5807         PR rtl-optimization/85645
5808         * shrink-wrap.c (spread_components): Return a boolean saying if
5809         anything was changed.
5810         (try_shrink_wrapping_separate): Iterate spread_components until
5811         nothing changes anymore.
5813 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5815         PR rtl-optimization/85645
5816         * regrename.c (build_def_use): Also kill the chains that include the
5817         destination of a REG_CFA_REGISTER note.
5819 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5821         PR rtl-optimization/85645
5822         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
5823         insn that has a REG_CFA_REGISTER note.
5825 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
5827         * cfgexpand.c (expand_clobber): New function.
5828         (expand_gimple_stmt_1): Use it.
5829         * tree-vect-stmts.c (vect_clobber_variable): New function,
5830         split out from...
5831         (vectorizable_simd_clone_call): ...here.
5832         (vectorizable_store): Emit a clobber either side of an
5833         IFN_STORE_LANES sequence.
5834         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
5836 2018-05-09  Tom de Vries  <tom@codesourcery.com>
5838         PR target/85626
5839         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
5840         (define_insn "trap_if_false"): Add exit after trap.
5842 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
5844         PR rtl-optimization/85638
5845         * bb-reorder.c: Include common/common-target.h.
5846         (create_forwarder_block): New function extracted from...
5847         (fix_up_crossing_landing_pad): ...here.  Rename into...
5848         (dw2_fix_up_crossing_landing_pad): ...this.
5849         (sjlj_fix_up_crossing_landing_pad): New function.
5850         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
5851         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
5852         from both partitions and exit the loop after one iteration.
5854 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5856         Revert:
5857         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5858         subsection.
5859         (Basic PowerPC Built-in Functions): The new name of the
5860         subsection previously known as "PowerPC Built-in Functions".
5861         (Basic PowerPC Built-in Functions Available on all Configurations):
5862         New subsubsection.
5863         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
5864         subsubsection.
5865         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
5866         subsubsection.
5867         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
5868         subsubsection.
5869         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
5870         subsubsection.
5872 2018-05-08  Jim Wilson  <jimw@sifive.com>
5874         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
5875         (LD_EMUL_SUFFIX): New.
5876         (LINK_SPEC): Use it.
5878 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5880         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5881         subsection.
5882         (Basic PowerPC Built-in Functions): The new name of the
5883         subsection previously known as "PowerPC Built-in Functions".
5884         (Basic PowerPC Built-in Functions Available on all Configurations):
5885         New subsubsection.
5886         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
5887         subsubsection.
5888         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
5889         subsubsection.
5890         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
5891         subsubsection.
5892         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
5893         subsubsection.
5895 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
5897         PR target/85683
5898         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
5899         after cmpelim optimization.
5901 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
5903         * config.gcc: Support "goldmont".
5904         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
5905         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5906         PROCESSOR_GOLDMONT.
5907         * config/i386/i386.c (m_GOLDMONT): Define.
5908         (processor_target_table): Add "goldmont".
5909         (PTA_GOLDMONT): Define.
5910         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
5911         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
5912         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
5913         (fold_builtin_cpu): Add "goldmont".
5914         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
5915         (ix86_option_override_internal): Add "goldmont".
5916         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
5917         (processor_type): Add PROCESSOR_GOLDMONT.
5918         * config/i386/i386.md: Add CPU "glm".
5919         * config/i386/glm.md: New file.
5920         * config/i386/x86-tune.def: Add m_GOLDMONT.
5921         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
5923 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
5925         PR target/85572
5926         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
5927         E_V4DImode.
5928         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
5929         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
5930         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
5932         PR target/85317
5933         * config/i386/i386.c (ix86_fold_builtin): Handle
5934         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
5936         PR target/85480
5937         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
5938         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
5940 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
5942         PR target/85658
5943         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
5944         (check_arch): Likewise.
5945         (check_fpu): Return the result rather than printing it.
5946         (end arch): Fix operator precedence.
5947         (end cpu): Likewise.
5948         (END): Print the result from check_fpu.
5950 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
5951             Alan Hayward  <alan.hayward@arm.com>
5952             David Sherwood  <david.sherwood@arm.com>
5954         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
5955         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
5956         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
5957         (*fcmuo<mode>_and): New patterns.
5959 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
5961         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
5962         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
5963         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
5964         (cmp_op, sve_imm_con): New code attributes.
5965         (SVE_COND_INT_CMP, imm_con): Delete.
5966         (cmp_op): Remove above unspecs from int attribute.
5967         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
5968         to...
5969         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
5970         comparison-specific unspecs.
5971         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
5972         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
5973         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
5974         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
5975         (*vec_fcm<cmp_op><mode>): Rename to...
5976         (*fcm<cmp_op><mode>): ...this and adjust likewise.
5977         (*vec_fcmuo<mode>): Rename to...
5978         (*fcmuo<mode>): ...this and adjust likewise.
5979         (*pred_fcm<cmp_op><mode>): New pattern.
5980         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
5981         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
5982         functions.
5983         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
5984         and UNORDERED.
5985         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
5986         (aarch64_emit_sve_predicated_cond): New function.
5987         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
5988         (aarch64_emit_unspec_cond_or): Replace with...
5989         (aarch64_emit_sve_or_conds): ...this new function.  Use
5990         aarch64_emit_sve_ptrue_op for the individual comparisons and
5991         aarch64_emit_binop to OR them together.
5992         (aarch64_emit_inverted_unspec_cond): Replace with...
5993         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
5994         aarch64_emit_sve_ptrue_op for the comparison and
5995         aarch64_emit_unop to invert the result.
5996         (aarch64_expand_sve_vec_cmp_float): Update after the above
5997         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
5999 2018-05-07  Nathan Sidwell  <nathan@acm.org>
6001         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
6002         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
6003         (Backwards Compatibility): Likewise.
6005 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6007         PR bootstrap/85681
6008         Revert:
6009         2018-05-07  Luis Machado  <luis.machado@linaro.org>
6011         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6012         <prefetch_dynamic_strides>: New const bool field.
6013         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6014         prefetch_dynamic_strides.
6015         (exynosm1_prefetch_tune): Likewise.
6016         (thunderxt88_prefetch_tune): Likewise.
6017         (thunderx_prefetch_tune): Likewise.
6018         (thunderx2t99_prefetch_tune): Likewise.
6019         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
6020         to false.
6021         (aarch64_override_options_internal): Update to set
6022         PARAM_PREFETCH_DYNAMIC_STRIDES.
6023         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6024         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6025         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6026         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6027         prefetch-dynamic-strides setting.
6029         2018-05-07  Luis Machado  <luis.machado@linaro.org>
6031         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6032         <minimum_stride>: New const int field.
6033         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6034         minimum_stride field.
6035         (exynosm1_prefetch_tune): Likewise.
6036         (thunderxt88_prefetch_tune): Likewise.
6037         (thunderx_prefetch_tune): Likewise.
6038         (thunderx2t99_prefetch_tune): Likewise.
6039         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
6040         (aarch64_override_options_internal): Update to set
6041         PARAM_PREFETCH_MINIMUM_STRIDE.
6042         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6043         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6044         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6045         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6046         stride is constant and is below the minimum stride threshold.
6048 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6050         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
6051         to 512.
6053 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6055         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6056         <prefetch_dynamic_strides>: New const bool field.
6057         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6058         prefetch_dynamic_strides.
6059         (exynosm1_prefetch_tune): Likewise.
6060         (thunderxt88_prefetch_tune): Likewise.
6061         (thunderx_prefetch_tune): Likewise.
6062         (thunderx2t99_prefetch_tune): Likewise.
6063         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
6064         to false.
6065         (aarch64_override_options_internal): Update to set
6066         PARAM_PREFETCH_DYNAMIC_STRIDES.
6067         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6068         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6069         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6070         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6071         prefetch-dynamic-strides setting.
6073 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6075         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6076         <minimum_stride>: New const int field.
6077         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6078         minimum_stride field.
6079         (exynosm1_prefetch_tune): Likewise.
6080         (thunderxt88_prefetch_tune): Likewise.
6081         (thunderx_prefetch_tune): Likewise.
6082         (thunderx2t99_prefetch_tune): Likewise.
6083         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
6084         (aarch64_override_options_internal): Update to set
6085         PARAM_PREFETCH_MINIMUM_STRIDE.
6086         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6087         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6088         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6089         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6090         stride is constant and is below the minimum stride threshold.
6092 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
6094         PR c++/85659
6095         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
6096         the type is addressable.  Don't force op into register if it has
6097         BLKmode.
6099 2018-05-05  Roland McGrath  <mcgrathr@google.com>
6101         PR other/77609
6102         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
6103         any section for which we don't know a specific type it should have,
6104         regardless of name.  Previously this was done only for the exact
6105         names ".init_array", ".fini_array", and ".preinit_array".
6106         (default_elf_asm_named_section): Add comment about
6107         relationship with default_section_type_flags and SECTION_NOTYPE.
6108         (get_section): Don't consider it a type conflict if one side has
6109         SECTION_NOTYPE and the other doesn't, as long as neither has the
6110         SECTION_BSS et al used in the default_section_type_flags logic.
6112 2018-05-05  Tom de Vries  <tom@codesourcery.com>
6114         PR target/85653
6115         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
6116         (workaround_barsyncs): New function.
6117         (nvptx_reorg): Use workaround_barsyncs.
6118         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
6119         (define_expand "nvptx_membar_cta"): New define_expand.
6120         (define_insn "*nvptx_membar_cta"): New insn.
6122 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
6124         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
6125         To improve optimization opportunities.
6126         * builtin-types.def: The new needed builtin types for the above.
6128 2018-05-04  Richard Biener  <rguenther@suse.de>
6130         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
6131         * gimple-ssa-store-merging.c
6132         (imm_store_chain_info::output_merged_store): Remove redundant create,
6133         release split_store vector contents on failure.
6134         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
6135         scalar stmt vector on cache hit.
6137 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
6139         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
6140         Xilinx FP support.
6141         * config.gcc (powerpc-xilinx-eabi*): Remove.
6142         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
6143         support.
6144         (fusion_addis_mem_combo_load): Ditto.
6145         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
6146         FP support.
6147         (rs6000_cpu_cpp_builtins): Ditto.
6148         * config/rs6000/rs6000-linux.c
6149         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
6150         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
6151         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
6152         support.
6153         (rs6000_setup_reg_addr_masks): Ditto.
6154         (rs6000_init_hard_regno_mode_ok): Ditto.
6155         (rs6000_option_override_internal): Ditto.
6156         (legitimate_lo_sum_address_p): Ditto.
6157         (rs6000_legitimize_address): Ditto.
6158         (rs6000_legitimize_reload_address): Ditto.
6159         (rs6000_legitimate_address_p): Ditto.
6160         (abi_v4_pass_in_fpr): Ditto.
6161         (setup_incoming_varargs): Ditto.
6162         (rs6000_gimplify_va_arg): Ditto.
6163         (rs6000_split_multireg_move): Ditto.
6164         (rs6000_savres_strategy): Ditto.
6165         (rs6000_emit_prologue_components): Ditto.
6166         (rs6000_emit_epilogue_components): Ditto.
6167         (rs6000_emit_prologue): Ditto.
6168         (rs6000_emit_epilogue): Ditto.
6169         (rs6000_elf_file_end): Ditto.
6170         (rs6000_function_value): Ditto.
6171         (rs6000_libcall_value): Ditto.
6172         * config/rs6000/rs6000.h: Ditto.
6173         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
6174         (TARGET_MINMAX): ... this.  New.
6175         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
6176         * config/rs6000/rs6000.md: Remove Xilinx FP support.
6177         (*movsi_internal1_single): Delete.
6178         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
6179         mfpu=, mxilinx-fpu): Delete.
6180         * config/rs6000/singlefp.h: Delete.
6181         * config/rs6000/sysv4.h: Remove Xilinx FP support.
6182         * config/rs6000/t-rs6000: Ditto.
6183         * config/rs6000/t-xilinx: Delete.
6184         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
6185         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
6186         (VStype_simple): Delete.
6187         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
6188         * config/rs6000/xfpu.h: Delete.
6189         * config/rs6000/xfpu.md: Delete.
6190         * config/rs6000/xilinx.h: Delete.
6191         * config/rs6000/xilinx.opt: Delete.
6192         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
6193         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
6195 2018-05-04  Tom de Vries  <tom@codesourcery.com>
6197         PR libgomp/85639
6198         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
6199         if ignore == 0.
6201 2018-05-04  Richard Biener  <rguenther@suse.de>
6203         PR middle-end/85627
6204         * tree-complex.c (update_complex_assignment): We are always in SSA form.
6205         (expand_complex_div_wide): Likewise.
6206         (expand_complex_operations_1): Likewise.
6207         (expand_complex_libcall): Preserve EH info of the original stmt.
6208         (tree_lower_complex): Handle removed blocks.
6209         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
6210         on complex multiplication and division libcall builtins.
6212 2018-05-04  Richard Biener  <rguenther@suse.de>
6214         PR middle-end/85574
6215         * fold-const.c (negate_expr_p): Restrict negation of operand
6216         zero of a division to when we know that can happen without
6217         overflow.
6218         (fold_negate_expr_1): Likewise.
6220 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
6222         PR libstdc++/85466
6223         * real.h (real_nextafter): Declare.
6224         * real.c (real_nextafter): New function.
6225         * fold-const-call.c (fold_const_nextafter): New function.
6226         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
6227         CASE_CFN_NEXTTOWARD.
6228         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
6229         even when arg1_mode is different from arg0_mode.
6231 2018-05-03  Nathan Sidwell  <nathan@acm.org>
6233         * doc/extend.texi (Deprecated Features): Remove
6234         -ffriend-injection.
6235         (Backwards Compatibility): Likewise.
6236         * doc/invoke.texi (C++ Language Options): Likewise.
6237         (C++ Dialect Options): Likewise.
6239 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
6241         PR target/85530
6242         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
6243         _mm512_mask_mullox_epi64): New intrinsics.
6245 2018-05-03  Tom de Vries  <tom@codesourcery.com>
6247         PR testsuite/85106
6248         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
6249         dump files): Add offload-tree.
6251 2018-05-03  Richard Biener  <rguenther@suse.de>
6253         PR tree-optimization/85615
6254         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
6255         to loops not nested in BBs loop father to avoid creating multi-entry
6256         loops.
6258 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6260         PR tree-optimization/70291
6261         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
6262         arguments.  Change return type to tree.  Emit libcall as a new
6263         statement rather than replacing existing one when inplace_p is true.
6264         (expand_complex_multiplication_components): New function.
6265         (expand_complex_multiplication): Expand floating-point complex
6266         multiplication using the above.
6267         (expand_complex_division): Rename inner_type parameter to type.
6268         Update expand_complex_libcall call-site.
6269         (expand_complex_operations_1): Update expand_complex_multiplication
6270         and expand_complex_division call-sites.
6272 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
6274         PR target/85582
6275         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
6276         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
6277         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
6278         the highest significant bit of the shift count mask is clear.  In
6279         check whether and[sq]i3 is needed verify that all significant bits
6280         of the shift count other than the highest are set.
6282 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6284         PR libgomp/82428
6285         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
6286         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
6287         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
6288         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
6289         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
6290         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
6291         __builtin_goacc_parlevel_size.
6293 2018-05-02  Richard Biener  <rguenther@suse.de>
6295         PR tree-optimization/85597
6296         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
6297         do not use split vect_get_vec_defs call but call vect_get_slp_defs
6298         directly.
6300 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6302         PR testsuite/85106
6303         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
6304         dump files): Add ltrans-tree.
6306 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6308         PR testsuite/85106
6309         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
6310         dump files): Add wpa-ipa.
6312 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
6314         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
6315         powerpc*-*-linux*paired* target.
6316         * config/rs6000/750cl.h: Delete.
6317         * config/rs6000/paired.h: Delete.
6318         * config/rs6000/paired.md: Delete.
6319         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
6320         float support.
6321         * config/rs6000/rs6000-builtin.def: Remove paired float support.
6322         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
6323         comment.  Remove paired float support.
6324         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
6325         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
6326         VECTOR_PAIRED.
6327         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
6328         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
6329         declarations.
6330         * config/rs6000/rs6000.c: Remove paired float support.
6331         (paired_expand_vector_init, paired_expand_vector_move,
6332         paired_emit_vector_compare, paired_emit_vector_cond_expr,
6333         (paired_expand_lv_builtin, paired_expand_stv_builtin,
6334         paired_expand_builtin, paired_expand_predicate_builtin,
6335         paired_init_builtins): Delete.
6336         * config/rs6000/rs6000.h: Remove paired float support.
6337         * config/rs6000/rs6000.md: Remove paired float support.
6338         (move_from_CR_ov_bit): Delete.
6339         * config/rs6000/rs6000.opt (mpaired): Delete.
6340         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
6341         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
6343 2018-05-02  Richard Biener  <rguenther@suse.de>
6345         PR middle-end/85567
6346         * gimplify.c (gimplify_save_expr): When in SSA form allow
6347         SAVE_EXPRs to compute to SSA vars.
6349 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
6351         PR target/85582
6352         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
6353         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
6354         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
6355         clobber operands[2], instead use a new pseudo.  Formatting fixes.
6357 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
6359         PR tree-optimization/85586
6360         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
6361         exit early for statements in the same group if the accesses are
6362         not strided.
6364 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6366         PR lto/85451
6367         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
6368         error message.
6370 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
6372         PR tree-optimization/85143
6373         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
6375 2018-05-01  Tom de Vries  <tom@codesourcery.com>
6377         PR lto/85451
6378         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
6379         not found" error message.
6381 2018-05-01  Tom de Vries  <tom@codesourcery.com>
6383         PR other/83786
6384         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
6385         * vec.c (test_ordered_remove_if): New function.
6386         (vec_c_tests): Call test_ordered_remove_if.
6387         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
6388         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
6389         * tree-vect-patterns.c (vect_pattern_recog_1): Use
6390         VEC_ORDERED_REMOVE_IF.
6392 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6394         PR tree-optimization/82665
6395         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
6396         pointer subtraction where arguments come from a memchr call.
6398 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
6400         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
6401         --push-state --as-needed and --pop-state instead of --as-needed and
6402         --no-as-needed if ld supports it.
6403         * configure: Regenerated.
6405         PR web/85578
6406         * doc/install.texi2html: Replace _002d with - and _002a with * in
6407         generated html files using sed.
6409 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6411         PR c++/85523
6412         * gcc-rich-location.c (blank_line_before_p): New function.
6413         (use_new_line): New function.
6414         (gcc_rich_location::add_fixit_insert_formatted): New function.
6415         * gcc-rich-location.h
6416         (gcc_rich_location::add_fixit_insert_formatted): New function.
6418 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6420         * selftest.c (assert_streq): Rename "expected" and "actual" to
6421         "val1" and "val2".  Extend NULL-handling to cover both inputs
6422         symmetrically, while still requiring both to be non-NULL for a pass.
6423         * selftest.h (assert_streq): Rename "expected" and "actual" to
6424         "val1" and "val2".
6425         (ASSERT_EQ): Likewise.
6426         (ASSERT_EQ_AT): Likewise.
6427         (ASSERT_KNOWN_EQ): Likewise.
6428         (ASSERT_KNOWN_EQ_AT): Likewise.
6429         (ASSERT_NE): Likewise.
6430         (ASSERT_MAYBE_NE): Likewise.
6431         (ASSERT_MAYBE_NE_AT): Likewise.
6432         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
6433         the assertion to pass.
6434         (ASSERT_STREQ_AT): Likewise.
6436 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
6438         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
6439         interaction with -pie.
6441 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6443         * selftest.h: Fix alphabetization of per-source-file selftest
6444         declarations.
6446 2018-04-30  Jason Merrill  <jason@redhat.com>
6448         PR c++/61982 - dead stores to destroyed objects.
6449         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
6450         of clobber.
6452 2018-04-30  Jason Merrill  <jason@redhat.com>
6454         * tree.c (build_clobber): New.
6455         * tree.h: Declare it.
6456         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
6458 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6460         * diagnostic-show-locus.c (layout::layout): Update for
6461         location_get_source_line returning a char_span.
6462         (struct char_span): Move to input.h.
6463         (struct correction): Update for fields in char_span becoming
6464         private.
6465         (struct source_line): Update for location_get_source_line
6466         returning a char_span.
6467         (layout::print_line): Likewise.
6468         * edit-context.c (edited_file::print_content): Likewise.
6469         (edited_file::print_diff_hunk): Likewise.
6470         (edited_file::print_run_of_changed_lines): Likewise.
6471         (edited_file::get_num_lines): Likewise.
6472         (edited_line::edited_line): Likewise.
6473         * final.c (asm_show_source): Likewise.
6474         * input.c (location_get_source_line): Convert return type
6475         from const char * to char_span, losing the final "line_len"
6476         param.
6477         (dump_location_info): Update for the above.
6478         (get_substring_ranges_for_loc): Likewise.  Use a char_span
6479         when handling the literal within the line.
6480         (test_reading_source_line): Update for location_get_source_line
6481         returning a char_span.
6482         * input.h (class char_span): Move here from
6483         diagnostic-show-locus.c, converting from a struct to a class.
6484         Make data members private.
6485         (char_span::operator bool): New.
6486         (char_span::length): New.
6487         (char_span::get_buffer): New.
6488         (char_span::operator[]): New.
6489         (char_span::subspan): Make const.
6490         (char_span::xstrdup): New.
6491         (location_get_source_line): Convert return type from const char *
6492         to char_span, losing the final "line_size" param.
6494 2018-04-30  Jan Hubicka  <jh@suse.cz>
6496         * lto-wrapper.c (ltrans_priorities): New static var.
6497         (cmp_priority): New.
6498         (run_gcc): Read priorities and if doing parallel build order
6499         the Makefile by them.
6501 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6503         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
6505 2018-04-30  Richard Biener  <rguenther@suse.de>
6507         * tree-cfg.c (verify_address): Remove base argument, add
6508         flag whether to check TREE_ADDRESSABLE and do that.
6509         (verify_expr): Remove.
6510         (verify_types_in_gimple_reference): Add pieces from verify_expr.
6511         (verify_gimple_assign_single): Likewise.
6512         (verify_gimple_switch): Likewise.
6513         (verify_expr_location_1): Dereference tp once.  Add (disabled)
6514         piece from verify_expr.
6515         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
6517 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
6519         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
6521 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
6523         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
6524         (small_data_pattern): Likewise.
6525         (arc_rewrite_small_data): Likewise.
6526         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
6527         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
6528         (get_symbol_alignment): New function.
6529         (legitimate_small_data_address_p): Likewise.
6530         (legitimate_scaled_address): Update, call
6531         legitimate_small_data_address_p.
6532         (output_sdata): New static variable.
6533         (arc_print_operand): Update how we handle small data operands.
6534         (arc_print_operand_address): Likewise.
6535         (arc_legitimate_address_p): Update, use
6536         legitimate_small_data_address_p.
6537         (arc_rewrite_small_data_p): Remove.
6538         (arc_rewrite_small_data_1): Likewise.
6539         (arc_rewrite_small_data): Likewise.
6540         (small_data_pattern): Likewise.
6541         (compact_sda_memory_operand): Update to use
6542         legitimate_small_data_address_p and get_symbol_alignment.
6543         (prepare_move_operands): Don't rewite sdata pattern.
6544         (prepare_extend_operands): Remove.
6545         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
6546         pattern.
6547         (zero_extendqisi2): Likewise.
6548         (zero_extendhisi2): Likewise.
6549         (extendqihi2): Likewise.
6550         (extendqisi2): Likewise.
6551         (extendhisi2): Likewise.
6552         (addsi3): Likewise.
6553         (subsi3): Likewise.
6554         (andsi3): Likewise.
6555         * config/arc/constraints.md (Usd): Change it to memory constraint.
6557 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
6559         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
6560         as source of std instructions.
6561         * config/arc/arc.md (movsi_insn): Update pattern predicate to
6562         allow 6-bit constants as source for store instructions.
6563         (movdi_insn): Update instruction pattern to allow 6-bit constants
6564         as source for store instructions.
6566 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
6568         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
6570 2018-04-30  Nathan Sidwell  <nathan@acm.org>
6571             Sandra Loosemore <sandra@codesourcery.com>
6573         * dumpfile.c (dump_open): Allow '-' for stdout.
6574         * doc/invoke.texi (Developer Options): Document dump filename
6575         determination early.  Document stdin/stdout selection.
6577 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
6579         Microblaze Target: PIC data text relative
6581         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
6582         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
6583         Add declaration.
6584         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
6585         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
6586         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
6587         New addressing mode for data-text relative position indepenedent code.
6588         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
6589         'ADDRESS_SYMBOLIC_TXT_REL'.
6590         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
6591         (microblaze_legitimate_pic_operand): Exclude function calls from
6592         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
6593         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
6594         addresses cases.
6595         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
6596         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
6597         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
6598         for 'address + offset'.
6599         (microblaze_expand_prologue): Add new function prologue call for
6600         'r20' assignation.
6601         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
6602         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
6603         table in case of TARGET_PIC_DATA_TEXT_REL.
6604         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
6605         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
6606         Add new macros 'UNSPEC_TEXT',
6607         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
6608         + exclude function calls from 'UNSPEC_PLT' in case of data text
6609         relative mode.
6610         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
6611         new target hook for generating address diff vector tables in case of
6612         flag_pic.
6613         * doc/tm.texi : Regenerate.
6614         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
6615         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
6616         of addr diff vector generation.
6617         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
6618         target hook definition.
6619         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
6620         Add default function for generate_pic_addr_diff_vec -> flag_pic.
6621         * doc/invoke.texi (Add new pic option): Add new microblaze pic
6622         option for data text relative.
6624 2018-04-30  Richard Biener  <rguenther@suse.de>
6626         * tree-chrec.h (evolution_function_is_constant_p): Remove
6627         redundant check.
6628         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
6630 2018-04-30  Richard Biener  <rguenther@suse.de>
6632         PR bootstrap/85571
6633         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
6635 2018-04-30  Richard Biener  <rguenther@suse.de>
6637         PR tree-optimization/28364
6638         PR tree-optimization/85275
6639         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
6640         copying first exit test.
6642 2018-04-28  Mark Wielaard  <mark@klomp.org>
6644         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
6645         dwarf_version >= 5.
6646         (dwarf_AT): Handle DW_AT_addr_base.
6647         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
6649 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
6651         PR target/84431
6652         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
6653         (*ashl<dwi>3_doubleword_mask_1): Ditto.
6654         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
6655         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
6657 2018-04-28  Richard Biener  <rguenther@suse.de>
6659         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
6660         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
6661         to reflect use.  Only add interesting stmts.
6663 2018-04-27  Martin Jambor  <mjambor@suse.cz>
6665         PR ipa/85549
6666         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
6667         the jump function allows for passing through aggregate values.
6669 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
6671         * input.h (in_system_header_at): Convert from macro to inline
6672         function.
6673         (from_macro_expansion_at): Likewise.
6674         (from_macro_definition_at): Likewise.
6676 2018-04-27  Jeff Law  <law@redhat.com>
6678         * config.gcc: Mark tile* targets as deprecated/obsolete.
6680 2018-04-27  Richard Biener  <rguenther@suse.de>
6682         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
6683         fix for ILP32.
6685 2018-04-27  Richard Biener  <rguenther@suse.de>
6687         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
6689 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
6691         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
6692         with Yd constraint. Set "preferred_for_speed" attribute from
6693         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
6694         with Yd constraint.
6695         (*movdi_internal): Ditto.
6696         (movti_interunit splitters): Remove
6697         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
6698         (movdi_interunit splitters): Ditto.
6699         * config/i386/constraints.md (Ye): Remove.
6700         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
6702 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6704         PR target/85512
6705         * config/aarch64/constraints.md (Usg): Limit to 31.
6706         (Usj): Limit to 63.
6708 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
6710         PR tree-optimization/85529
6711         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
6712         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
6713         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
6714         zero extension or masking of the MSB bit.
6715         (optimize_range_tests): Add FIRST_BB argument, pass it through
6716         to optimize_range_tests_var_bound.
6717         (maybe_optimize_range_tests, reassociate_bb): Adjust
6718         optimize_range_tests callers.
6720 2018-04-26  Richard Biener  <rguenther@suse.de>
6721             Jakub Jelinek  <jakub@redhat.com>
6723         * cgraph.h (symbol_table): Just declare debug method here.
6724         * symtab.c (symbol_table::debug): Define.
6726 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
6728         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
6730 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
6732         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
6733         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
6734         (*movdi_internal): Substitute Yi and Yj constraint with x
6735         and Ym and Yn constraint with y constraint.  Update "isa"
6736         attribute and set "preferred_for_speed" attribute from
6737         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
6738         (*movsi_internal): Ditto.
6739         (*movdf_internal): Ditto.
6740         (*movsf_internal): Ditto.
6741         (*zero_extendsidi2): Ditto.
6742         * config/i386/sse.md (vec_set<mode>_0): Ditto.
6743         (sse2_loadld): Ditto.
6744         (*vec_extract<ssevecmodelower>_0): Ditto.
6745         (*vec_extractv4si_0_zext_sse4): Ditto.
6746         (vec_concatv2di): Ditto.
6747         (*vec_dup<mode>): Ditto.
6748         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
6749         * config/i386/constraints.md (Yi): Remove.
6750         (Yj): Remove.
6751         (Ym): Remove.
6752         (Yn): Remove.
6754 2018-04-26  Nathan Sidwell  <nathan@acm.org>
6756         * dumpfile.c (dump_open): New.
6757         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
6758         (dump_finish): Detect stdio/stderr by value not name.
6760 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
6762         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
6764 2018-04-26  Tom de Vries  <tom@codesourcery.com>
6766         PR target/84952
6767         * config/nvptx/nvptx.c (verify_neutering_jumps)
6768         (verify_neutering_labels): New function
6769         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
6771 2018-04-26  Tom de Vries  <tom@codesourcery.com>
6773         PR target/84025
6774         * config/nvptx/nvptx.c (needs_neutering_p): New function.
6775         (nvptx_single): Use needs_neutering_p to skip over insns that do not
6776         need neutering.
6778 2018-04-26  Richard Biener <rguenther@suse.de>
6779             Tom de Vries  <tom@codesourcery.com>
6781         PR lto/85422
6782         * lto-streamer-out.c (output_function): Fixup loops if required to match
6783         discovery done in the reader.
6785 2018-04-26  Richard Biener  <rguenther@suse.de>
6787         PR tree-optimization/85116
6788         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
6789         have a loop exit from the single latch predecessor.  Remove
6790         case of header with just condition.
6791         (ch_base::copy_headers): Exclude infinite loops from any
6792         processing.
6793         (pass_ch::execute): Record exits.
6795 2018-04-26  Richard Biener  <rguenther@suse.de>
6797         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
6798         prologue cost vector and pass it to vect_get_load_cost.
6799         (vect_get_peeling_costs_all_drs): Likewise.
6800         (vect_peeling_hash_get_lowest_cost): Likewise.
6801         (vect_enhance_data_refs_alignment): Likewise.
6803 2018-04-26  Richard Biener  <rguenther@suse.de>
6805         PR middle-end/85450
6806         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
6807         checking of integer<->pointer conversions.
6808         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
6809         sign-/zero-extending pointer types.
6810         (expand_omp_for_static_chunk): Likewise.
6812 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
6813             Jean Lee  <xiaoyur347@gmail.com>
6815         * config/mips/mips.c (mips_asan_shadow_offset): New function.
6816         (TARGET_ASAN_SHADOW_OFFSET): Define.
6817         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
6818         true for -fsanitize=address.
6820 2018-04-25  Mark Wielaard  <mark@klomp.org>
6822         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
6823         shorter ones.
6825 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
6827         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
6828         than "alu", remove explicit "memory" and "imm_disp" attributes.
6829         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
6831         PR middle-end/85414
6832         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
6833         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
6834         gen_lowpart_no_emit.
6836 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
6838         PR target/85473
6839         * config/i386/i386.c (ix86_expand_builtin): Change memory
6840         operand to XI, extend p0 to Pmode.
6841         * config/i386/i386.md: Change unspec volatile and operand
6842         1 mode to XI, change operand 0 mode to P.
6844 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6846         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
6847         GET_MODE_MASK before any checking.
6848         (nds32_can_use_bset_p): Likewise.
6849         (nds32_can_use_btgl_p): Likewise.
6851 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6853         * config/nds32/nds32-doubleword.md: New define_split pattern for
6854         illegal register number.
6856 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6858         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
6860 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6862         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
6864 2018-04-25  Richard Biener  <rguenther@suse.de>
6866         * lto-streamer.h (LTO_major_version): Bump to 8.
6868 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
6870         * BASE-VER: Set to 9.0.0.
6872 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
6874         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
6875         in __abskf2 and __powikf2.
6877 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6879         PR target/85512
6880         * config/aarch64/constraints.md (Usg, Usj): New constraints.
6881         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
6882         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
6883         Use the above on operand 2.  Reindent.
6884         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
6886 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
6888         PR target/85485
6889         * common/config/i386/i386-common.c (ix86_handle_option): Don't
6890         handle OPT_mcet.
6891         * config/i386/i386.opt (mcet): Removed.
6892         * doc/install.texi: Remove -mcet documentation.
6893         * doc/invoke.texi: Likewise.
6895 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
6897         PR target/85485
6898         * doc/install.texi: Remove -mcet from bootstrap-cet.
6900 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6902         PR target/85511
6903         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
6904         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
6905         if TARGET_64BIT.
6907         PR target/85503
6908         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
6909         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
6910         containing a CONST_VECTOR.
6912 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
6914         * doc/install.texi: Update newlib dependency for nvptx.
6916 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6918         PR target/85508
6919         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
6920         instead of INTVAL when shifting x left.
6922 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
6924         PR tree-optimization/85478
6925         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
6926         vect_grouped_store_supported for single element vectors.
6928 2018-04-24  Richard Biener  <rguenther@suse.de>
6930         PR target/85491
6931         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
6932         load cost increase to the case of non-constant step.
6934 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6936         PR target/84828
6937         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
6938         destination if any_malformed_asm.
6940 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
6942         PR middle-end/85496
6943         * expr.c (store_field): In the bitfield case, if the value comes from
6944         a function call and is returned in registers by means of a PARALLEL,
6945         do not change the mode of the temporary unless BLKmode and VOIDmode.
6947 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
6949         PR rtl-optimization/85423
6950         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
6951         dependencies to debug insns when the previous insn is non-debug.
6953 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
6955         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
6956         enums into a single definition.
6957         (fls): Fix predicates and printing.
6958         (seti): Likewise.
6960 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
6962         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
6963         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
6964         and short u6 immediate.
6965         (check_if_valid_sleep_operand): Remove.
6966         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
6968 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6970         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
6971         flag_always_save_lp condition.
6972         * config/nds32/nds32.opt (malways-save-lp): New option.
6974 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
6976         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
6977         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
6978         * config/nds32/nds32.h
6979         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
6980         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
6982 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
6984         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
6985         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
6987 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
6988             Chung-Ju Wu  <jasonwucj@gmail.com>
6990         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
6991         Declare.
6992         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
6993         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
6995 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6997         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
6999 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7001         * config/nds32/nds32-protos.h (nds32_data_alignment,
7002         nds32_local_alignment): Declare.
7003         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
7004         nds32_local_alignment): New functions.
7005         (TARGET_CONSTANT_ALIGNMENT): Define.
7006         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
7008 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7010         * config/nds32/nds32.c
7011         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
7012         (TARGET_MODES_TIEABLE_P): Likewise.
7014 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7016         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
7017         level Ofast and Og.
7019 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
7020             Chung-Ju Wu  <jasonwucj@gmail.com>
7022         * config/nds32/constants.md (unspec_volatile_element): Add enum values
7023         for unaligned access.
7024         * config/nds32/nds32-intrinsic.c: Implementation of expanding
7025         unaligned access.
7026         * config/nds32/nds32-intrinsic.md: Likewise.
7027         * config/nds32/nds32_intrinsic.h: Likewise.
7028         * config/nds32/nds32.h (nds32_builtins): Likewise.
7029         * config/nds32/nds32.opt (munaligned-access): New option.
7030         * config/nds32/nds32.c (nds32_asm_file_start): Display
7031         flag_unaligned_access status.
7033 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
7035         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
7036         -mno-relax is present.
7037         * config/riscv/linux.h (LINK_SPEC): Ditto.
7039 2018-04-20  Martin Sebor  <msebor@redhat.com>
7041         PR c/85365
7042         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
7043         for null pointers.
7044         (gimple_fold_builtin_stxcpy_chk): Same.
7045         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
7047 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
7049         PR target/85456
7050         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
7051         __powikf2 when long double is IEEE 128-bit.
7053 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
7055         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
7056         step to make sure stack always aligned.
7058 2018-04-20  Carl Love  <cel@us.ibm.com>
7060         PR target/83402
7061         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
7062         size check for arg0.
7064 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7065             Tom de Vries  <tom@codesourcery.com>
7067         PR target/85445
7068         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
7069         Emit insns for calls too.
7070         (nvptx_find_par): Always look for worker-level predecessor insn.
7071         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
7072         calls.
7073         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
7074         (nvptx_process_pars): Propagate frames for calls.
7076 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
7078         PR target/85469
7079         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
7080         Removed.
7081         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
7082         (ix86_handle_option): Don't handle OPT_mibt.
7083         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
7084         __SHSTK__.
7085         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
7086         has_ibt and ibt.
7087         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
7088         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
7089         (ix86_target_macros): Define __CET__ with flag_cf_protection
7090         for -fcf-protection.
7091         * config/i386/i386.c (isa2_opts): Remove -mibt.
7092         * config/i386/i386.h (TARGET_IBT): Removed.
7093         (TARGET_IBT_P): Likewise.
7094         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
7095         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
7096         * config/i386/i386.opt (mcet): Update help message.
7097         (mshstk): Likewise.
7098         (mibt): Removed.
7099         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
7100         -mcet as an alias for -mshstk.
7102 2018-04-20  Richard Biener <rguenther@suse.de>
7104         PR middle-end/85475
7105         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
7106         complexity by forcing a single use of the multiply operand.
7108 2018-04-20  Martin Jambor  <mjambor@suse.cz>
7110         ipa/85449
7111         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
7112         recursion dependency to only apply to non-clones.
7114 2018-04-20  Martin Jambor  <mjambor@suse.cz>
7116         ipa/85447
7117         * ipa-cp.c (create_specialized_node): Check that clones of
7118         self-recursive edges exist during IPA-CP.
7120 2018-04-19  Toon Moene  <toon@moene.org>
7122         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
7123         by -O3.
7125 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
7127         PR tree-optimization/85467
7128         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
7129         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
7130         VECTOR_CST element to type.
7132 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
7134         PR target/85397
7135         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
7136         * config/i386/i386.md (builtin_setjmp_setup): Removed.
7137         (builtin_longjmp): Likewise.
7138         (save_stack_nonlocal): New pattern.
7139         (restore_stack_nonlocal): Likewise.
7141 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
7143         PR target/85404
7144         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
7145         Replace ASM_OUTPUT_LABEL with fprintf.
7147 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
7149         PR target/85417
7150         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
7151         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
7152         * config/i386/i386-c.c (ix86_target_macros_internal): Also
7153         define __IBT__ and __SHSTK__ for -fcf-protection.
7154         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
7155         TARGET_IBT.
7156         (ix86_trampoline_init): Likewise.
7157         (x86_output_mi_thunk): Likewise.
7158         (ix86_notrack_prefixed_insn_p): Likewise.
7159         (ix86_option_override_internal): Don't disallow -fcf-protection.
7160         * config/i386/i386.md (rdssp<mode>): Also enable for
7161         -fcf-protection.
7162         (incssp<mode>): Likewise.
7163         (nop_endbr): Likewise.
7164         * config/i386/i386.opt (mcet): Change help message to built-in
7165         functions only.
7166         (mibt): Likewise.
7167         (mshstk): Likewise.
7168         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
7169         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
7170         enable CET built-in functions.
7172 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
7174         * common/config/i386/i386-common.c
7175         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
7176         OPTION_MASK_ISA_MOVDIRI_UNSET,
7177         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
7178         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
7179         * config.gcc (movdirintrin.h): New header.
7180         * config/i386/cpuid.h (bit_MOVDIRI,
7181         bit_MOVDIR64B): New bits.
7182         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
7183         and -mmvodir64b.
7184         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
7185         (VOID, PVOID, PCVOID)): New function types.
7186         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
7187         __builtin_ia32_directstoreu_u64,
7188         __builtin_ia32_movdir64b): New builtins.
7189         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
7190         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
7191         and -mmovdiri.
7192         (ix86_valid_target_attribute_inner_p): Ditto.
7193         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
7194         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
7195         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
7196         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
7197         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
7198         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
7199         (movdiri<mode>, movdir64b_<mode>): New.
7200         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
7201         * config/i386/immintrin.h: Include movdirintrin.h.
7202         * config/i386/movdirintrin.h: New file.
7203         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
7205 2018-04-19  Richard Biener  <rguenther@suse.de>
7207         PR middle-end/85455
7208         * cfg.c (clear_bb_flags): When loop state says we have
7209         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
7211 2018-04-19  Richard Biener  <rguenther@suse.de>
7213         PR tree-optimization/84737
7214         * tree-vect-data-refs.c (vect_copy_ref_info): New function
7215         copying restrict info.
7216         (vect_setup_realignment): Use it.
7217         * tree-vectorizer.h (vect_copy_ref_info): Declare.
7218         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
7219         the first DR to all generated stores.
7220         (vectorizable_load): Likewise for loads.
7222 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
7224         PR tree-optimization/85446
7225         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
7226         the integral and pointer types to have the same precision.
7228         * doc/install.texi: Document --disable-cet being the default and
7229         --enable-cet=auto.
7231 2018-04-18  Martin Liska  <mliska@suse.cz>
7233         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
7234         style.
7236 2018-04-18  Martin Liska  <mliska@suse.cz>
7238         Revert
7239         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
7241         PR ipa/83983
7242         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
7243         arguments if they are comparable.
7245 2018-04-18  Martin Liska  <mliska@suse.cz>
7247         Revert
7248         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
7250         PR lto/84805
7251         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
7252         incomplete types.
7254 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
7256         PR target/85388
7257         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
7258         ENDBR after calling __morestack.
7260 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
7262         PR jit/85384
7263         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
7264         by using gcc_base_ver to generate a gcc_driver_version, and use
7265         it when generating GCC_DRIVER_NAME.
7266         * configure: Regenerate.
7268 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
7270         PR target/81084
7271         * config.gcc: Obsolete powerpc*-*-*spe*.
7273 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
7275         PR debug/84637
7276         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
7277         (stabstr_D): Change type of unum from unsigned int to
7278         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
7279         type.
7281 2018-04-17  Jim Wilson  <jimw@sifive.com>
7283         PR 84856
7284         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
7285         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
7286         Set arg_pointer_offset after using pretend_args_size.
7288 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
7290         PR rtl-optimization/85431
7291         * dse.c (record_store): Ignore zero width stores.
7293         PR sanitizer/85230
7294         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
7295         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
7296         __builtin_stack_restore rather than after it.
7297         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
7298         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
7299         argument instead of virtual_dynamic_stack_rtx.
7301 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7303         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
7304         New prototype.
7305         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
7306         Add note to error message to explain internal mapping of overloaded
7307         built-in function name to non-overloaded built-in function name.
7308         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
7309         function.
7311 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
7313         PR target/85424
7314         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
7315         where the inputs overlap with the output.
7317 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
7319         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
7320         (=v, v) alternative and explicit "memory" attribute.
7321         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
7322         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
7323         attributes.
7324         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
7325         "sselog1" type instead of "sselog".
7326         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
7327         "sselog".  Remove explicit "memory" attribute.
7328         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
7329         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
7330         attributes.
7331         (vec_extract_hi_v32hi): Merge all alternatives into one, use
7332         "sselog1" type instead of "sselog".  Remove explicit "memory"
7333         attribute.
7334         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
7335         use "sselog1" type instead of "sselog".  Remove explicit "memory"
7336         attribute.
7337         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
7338         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
7339         attributes.
7340         (vec_extract_hi_v64qi): Merge all alternatives into one, use
7341         "sselog1" type instead of "sselog".  Remove explicit "memory"
7342         attribute.
7343         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
7344         use "sselog1" type instead of "sselog".  Remove explicit "memory"
7345         attribute.
7347         PR target/85430
7348         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
7350         PR middle-end/85414
7351         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
7352         on a SUBREG.
7354 2018-04-17  Martin Jambor  <mjambor@suse.cz>
7356         PR ipa/85421
7357         * ipa-cp.c (create_specialized_node): Call
7358         expand_all_artificial_thunks if necessary.
7360 2018-04-17  Martin Liska  <mliska@suse.cz>
7362         PR lto/85405
7363         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
7364         in message, remote space in between '_G' and '('.
7366 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
7368         PR target/85281
7369         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
7370         avx512f_vmcmp<mode>3<round_saeonly_name>,
7371         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
7372         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
7373         avx512f_rndscale<mode><round_saeonly_name>,
7374         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
7375         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
7376         Use %<iptr>2 instead of %2 for -masm=intel.
7377         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
7378         avx512f_vcvttss2usi<round_saeonly_name>,
7379         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
7380         -masm=intel.
7381         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
7382         avx512f_vcvttsd2usi<round_saeonly_name>,
7383         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
7384         Use %q1 instead of %1 for -masm=intel.
7385         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
7386         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
7387         of %3 for -masm=intel.
7388         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
7389         -masm=intel.
7390         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
7391         -masm=intel.
7392         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
7393         -masm=intel.
7394         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
7395         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
7396         %g1.
7397         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
7398         -masm=intel.
7399         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
7400         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
7401         %g1 and one with %0 and %1.
7402         (avx512er_vmrcp28<mode><round_saeonly_name>,
7403         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
7404         %1 for -masm=intel.
7405         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
7406         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
7407         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
7408         of %0 and %{%4%} for -masm=intel.
7409         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
7410         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
7411         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
7412         order of %0 and %{%5%}%{z%} for -masm=intel.
7414 2018-04-17  Jan Hubicka  <jh@suse.cz>
7416         PR lto/85405
7417         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
7419 2018-04-17  Martin Liska  <mliska@suse.cz>
7421         PR ipa/85329
7422         * multiple_target.c (create_dispatcher_calls): Set apostrophes
7423         for target_clone error message.  Make default implementation
7424         clone to be a local declaration.
7425         (separate_attrs): Add new argument and check for an empty
7426         string.
7427         (expand_target_clones): Handle it.
7428         (ipa_target_clone): Make redirection just for target_clones
7429         functions.
7431 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
7432             Tom de Vries  <tom@codesourcery.com>
7434         PR middle-end/84955
7435         * omp-expand.c (expand_oacc_for): Add dummy false branch for
7436         tiled basic blocks without omp continue statements.
7438 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
7440         PR target/83660
7441         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
7442         vec_extract expression as having side effects to make sure it gets
7443         a cleanup point.
7445 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
7447         PR target/85403
7448         * config/i386/i386.c (get_builtin_code_for_version): Check
7449         error_mark_node.
7451 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
7453         PR target/84331
7454         * gcc/config.gcc: Support "skylake".
7455         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
7456         PROCESSOR_SKYLAKE.
7457         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
7458         (processor_target_table): Add "skylake".
7459         (ix86_option_override_internal): Add "skylake".
7460         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
7461         PROCESSOR_CANNONLAKE.
7462         (get_builtin_code_for_version): Fix priority for
7463         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
7464         PROCESSOR_SKYLAKE-AVX512.
7465         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
7466         (processor_type): Add PROCESSOR_SKYLAKE.
7468 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
7469             Jason Merrill  <jason@redhat.com>
7471         PR c++/85112
7472         * convert.c (convert_to_integer_1): Use direct recursion for
7473         enumeral types and types with a precision less than the number
7474         of bits in their mode.
7476 2018-04-16  Julia Koval  <julia.koval@intel.com>
7478         PR target/84413
7479         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
7480         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
7482 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
7484         PR target/85293
7485         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
7486         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
7487         and -mno-direct-move.
7489 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
7491         PR target/83402
7492         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
7493         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
7494         Ensure negative shifts result in {0}.
7496 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
7498         PR rtl-optimization/79916
7499         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
7500         regs (if any) to define how to gnerate SD moves when LRA is in
7501         progress.
7503 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
7505         PR rtl-optimization/85393
7506         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
7507         * except.c (expand_dw2_landing_pad_for_region): Make static.
7508         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
7509         a label and unconditional jump to old_bb, rather than
7510         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
7511         basic block.
7513         PR rtl-optimization/85376
7514         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
7515         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
7516         instead of a specific value.
7518 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
7519             Bin Cheng  <bin.cheng@arm.com>
7521         PR tree-optimization/82965
7522         PR tree-optimization/83991
7523         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
7524         by_profile_only parameter.
7525         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
7526         information if the loop was predicted to iterate too many times.
7527         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
7529 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
7531         PR lto/71991
7532         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
7533         always inline.
7535 2018-04-13  Martin Liska  <mliska@suse.cz>
7536             Jakub Jelinek  <jakub@redhat.com>
7538         PR middle-end/81657
7539         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
7540         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
7541         * builtins.c (expand_builtin_memory_copy_args): Use
7542         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
7543         handle dest_addr == pc_rtx.
7545 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
7547         PR target/85291
7548         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
7549         asked to not generate direct moves.
7550         (fix_trunc<mode>si2_stfiwx): Similar.
7551         (fix_trunc<mode>si2_internal): Similar.
7553 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7555         PR debug/83157
7556         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
7557         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
7558         lookup if dest in some wider mode is known to be const0_rtx and
7559         if so, record permanent equivalence for it to be ZERO_EXTEND of
7560         the narrower mode destination.
7562 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
7564         * lto-streamer-out.c (output_function): Revert 259346.
7565         * omp-expand.c (expand_oacc_for): Likewise.
7567 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
7569         PR rtl-optimization/85354
7570         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
7571         * sel-sched.c (sel_global_init): ... here.
7573 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
7575         PR target/85238
7576         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
7577         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7578         mode for PE-COFF targets.
7579         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
7580         (i386_pe_asm_lto_end): Likewise.
7581         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
7582         (TARGET_ASM_LTO_END): Likewise.
7583         * config/i386/winnt.c (saved_debug_info_level): New static variable.
7584         (i386_pe_asm_lto_start): New function.
7585         (i386_pe_asm_lto_end): Likewise.
7587 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
7588             Richard Biener  <rguenther@suse.de>
7590         PR middle-end/84955
7591         * lto-streamer-out.c (output_function): Fix CFG loop state before
7592         streaming out.
7593         * omp-expand.c (expand_oacc_for): Handle calls to internal
7594         functions like regular functions.
7596 2018-04-12  Richard Biener  <rguenther@suse.de>
7598         PR lto/85371
7599         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
7600         for the early LTO debug to properly generate references to it
7601         during DIE emission.  Do not re-use that for the skeleton for
7602         split-dwarf.
7603         (dwarf2out_early_finish): Likewise.
7605 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7607         PR target/85328
7608         * config/i386/sse.md
7609         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
7610         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
7611         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
7612         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
7613         and output is a reg, avoid creating invalid lowpart subreg, but
7614         instead split into a 512-bit move.  Don't split if not AVX512VL,
7615         input is xmm16+ reg and output is a mem.
7616         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
7617         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
7618         xmm16+ reg and output is a mem.
7620 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7622         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
7623         also for flag_dwarf2_cfi_asm.
7625 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7627         PR rtl-optimization/85342
7628         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
7629         a bool scalar var inside of the loop instead.  Don't try to update
7630         recog_data.operand after failed apply_change_group.
7632 2018-04-12  Tom de Vries  <tom@codesourcery.com>
7634         PR target/85296
7635         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
7636         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
7637         array with flexible array member as array without given dimension.
7638         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
7639         argument for undefined param to true.
7641 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
7643         PR target/85321
7644         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
7645         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
7646         from PowerPC section.
7647         * config/rs6000/sysv4.opt (mcall-): Improve help text.
7648         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
7649         help text that is too long.
7650         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
7651         help text that is too long.
7652         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
7653         help text that is too long.
7655 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
7657         * config/alpha/alpha.md (stack_probe_internal): Rename
7658         from "probe_stack".  Update all callers.
7660 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7662         PR rtl-optimization/84566
7663         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
7664         sched_macro_fuse_insns.
7666 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7668         PR target/84301
7669         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
7670         (compute_block_dependences): ... from here.
7672 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7674         PR tree-optimization/85331
7675         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
7676         from int to HOST_WIDE_INT.
7678 2018-04-11  Martin Jambor  <mjambor@suse.cz>
7680         PR ipa/84149
7681         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
7682         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
7683         not the same as the source val.
7684         (cgraph_edge_brings_value_p): New parameter.
7685         (gather_edges_for_value): Pass destination value to
7686         cgraph_edge_brings_value_p.
7687         (perhaps_add_new_callers): Likewise.
7688         (get_info_about_necessary_edges): Likewise and exclude values brought
7689         only by self-recursive edges.
7690         (create_specialized_node): Redirect only clones of self-calling edges.
7691         (+self_recursive_pass_through_p): New function.
7692         (find_more_scalar_values_for_callers_subset): Use it.
7693         (find_aggregate_values_for_callers_subset): Likewise.
7694         (known_aggs_to_agg_replacement_list): Removed.
7695         (decide_whether_version_node): Re-calculate known constants for all
7696         remaining context clones.
7698 2018-04-11  Richard Biener  <rguenther@suse.de>
7700         PR lto/85339
7701         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
7702         from early DWARF output.
7703         (dwarf2out_early_finish): Output line info unconditionally into
7704         early DWARF and add reference to it.
7706 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7708         PR target/85281
7709         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
7710         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
7711         other than V2DFmode using iptr mode attribute.
7712         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
7714 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7716         PR rtl-optimization/84659
7717         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
7719 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7721         PR debug/85302
7722         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
7723         SIZEP is NULL.
7724         (output_loc_list): Pass address of a dummy size variable even in the
7725         locview handling loop.
7726         (index_location_lists): Add comment on why skip_loc_list_entry can't
7727         call size_of_locs.
7729 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7731         PR target/85261
7732         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
7733         into register.
7735 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
7737         PR target/85321
7738         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
7739         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
7740         and -mstring-compare-inline-limit.
7742 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7744         PR target/85287
7745         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
7746         for stack clash protection in a register whenever we need it to be in
7747         a register.
7749 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7751         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
7752         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
7754 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7756         PR target/85321
7757         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
7758         the help text.
7759         (mlong-double-): Ditto.
7760         * config/rs6000/sysv4.opt (msdata=): Ditto.
7761         (mtls-size=): Ditto.
7763 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7765         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7766         erroneous entries for
7767         "vector int vec_ldl (int, long int *)", and
7768         "vector unsigned int vec_ldl (int, unsigned long int *)".
7769         Add comments and entries for
7770         "vector bool char vec_ldl (int, bool char *)",
7771         "vector bool short vec_ldl (int, bool short *)",
7772         "vector bool int vec_ldl (int, bool int *)",
7773         "vector bool long long vec_ldl (int, bool long long *)",
7774         "vector pixel vec_ldl (int, pixel *)",
7775         "vector long long vec_ldl (int, long long *)",
7776         "vector unsigned long long vec_ldl (int, unsigned long long *)".
7777         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
7778         type tree bool_long_long_type_node and correct definition of
7779         bool_V2DI_type_node to make reference to this new type tree.
7780         (rs6000_mangle_type): Replace erroneous reference to
7781         bool_long_type_node with bool_long_long_type_node.
7782         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
7783         comments to emphasize sign distinctions for char and int types and
7784         replace RS6000_BTI_bool_long constant with
7785         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
7786         use of RS6000_BTI_pixel.
7787         (bool_long_type_node): Remove this macro definition.
7788         (bool_long_long_type_node): New macro definition
7790 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
7792         PR rtl-optimization/85300
7793         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
7794         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
7795         simplify_unary_operation fails.
7797 2018-04-10  Martin Liska  <mliska@suse.cz>
7799         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
7800         cgraph_edge and ipa_ref.
7802 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
7804         PR target/85177
7805         PR target/85255
7806         * config/i386/sse.md
7807         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
7808         computation of the VEC_MERGE selector from mask.
7809         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
7810         Fix decoding of the VEC_MERGE selector into mask.
7812 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
7814         PR tree-optimization/85286
7815         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
7817 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
7819         * final.c (final_1): Set insn_last_address as well as
7820         insn_current_address.
7822 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7824         PR target/85173
7825         * explow.c (emit_stack_probe): Call validize_mem on memory location
7826         before passing it to gen_probe_stack.  Create address operand and
7827         legitimize it for the probe_stack_address case.
7829 2018-04-09  Jan Hubicka  <jh@suse.cz>
7831         PR lto/85078
7832         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
7833         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
7834         * tree.c (free_lang_data_in_type): Fix handling of binfos;
7835         walk basetypes.
7836         (free_lang_data): Rebuild type inheritance graph.
7838 2018-04-09  Martin Sebor  <msebor@redhat.com>
7840         * invoke.texi (-finline-small-functions): Mention other optimization
7841         options.
7842         (-findirect-inlining, -fpartial-inlining): Same.
7843         (-finline-functions-called-once): Same.
7844         (-freorder-blocks-and-partition): Same.
7846 2018-04-09  Jan Hubicka  <jh@suse.cz>
7848         PR rtl/84058
7849         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
7850         jumps; choose last target that matches the criteria (i.e.
7851         no partition changes for non-crossing jumps).
7852         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
7853         support for redirecting crossing jumps to non-crossing.
7855 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
7857         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
7858         also for naked functions.
7860 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
7862         * config/arc/arc.md (add_shift): New pattern.
7863         (add_shift2): Likewise.
7864         (sub_shift): Likewise.
7865         (sub_shift_cmp0_noout): Likewise.
7866         (compare_si_ashiftsi): Likewise.
7867         (xbfu_cmp0_noout): New combine pattern.
7868         (xbfu_cmp0"): Likewise.
7869         (movsi_set_cc_insn): Place the predicable variant first.
7870         (commutative_binary_cmp0_noout): Remove clobber.
7871         (commutative_binary_cmp0): New pattern.
7872         (noncommutative_binary_cmp0): Likewise.
7873         (noncommutative_binary_cmp0_noout): Likewise.
7874         (noncommutative_binary_comparison_result_used): Removed.
7875         (rsub_cmp0): New pattern.
7876         (rsub_cmp0_noout): Likewise.
7877         (extzvsi): Changed, keep only meaningful variants.
7878         (SQH, SEZ): New iterators.
7879         (SQH_postfix): New mode attribute.
7880         (SEZ_prefix): New code attribute.
7881         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
7882         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
7883         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
7884         of numerical value.
7885         (noncommutative_operator): Check the availability of barrel
7886         shifter option.
7888 2018-04-09  Richard Biener  <rguenther@suse.de>
7890         PR tree-optimization/85284
7891         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
7892         Only use the niter constraining form of simple_iv when the exit
7893         is always executed.
7895 2018-04-09  Tom de Vries  <tom@codesourcery.com>
7897         PR target/84041
7898         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7899         (define_expand "*memory_barrier"): New define_expand.
7900         (define_insn "memory_barrier"): New insn.
7902 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7904         PR rtl-optimization/80463
7905         PR rtl-optimization/83972
7906         PR rtl-optimization/83480
7908         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
7909         correct producer for the insn.
7910         (tidy_control_flow): Fixup seqnos in case of debug insns.
7912 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7914         PR rtl-optimization/83913
7916         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
7917         different sched-times when merging exprs.
7919 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7921         PR rtl-optimization/83962
7923         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
7924         tidy_fallthru_edge and tidy_control_flow.
7926 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7928         PR rtl-optimization/83530
7930         * sel-sched.c (force_next_insn): New global variable.
7931         (remove_insn_for_debug): When force_next_insn is true, also leave only
7932         next insn in the ready list.
7933         (sel_sched_region): When the region wasn't scheduled, make another pass
7934         over it with force_next_insn set to 1.
7936 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
7938         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
7939         into tm_file.
7940         * config/nds32/constants.md (unspec_volatile_element): Add enum values
7941         for interrupt control.
7942         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
7943         functions for interrupt control.
7944         * config/nds32/nds32-intrinsic.md: Likewise.
7945         * config/nds32/nds32_intrinsic.h: Likewise.
7946         * config/nds32/nds32.h (nds32_builtins): Likewise.
7948 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
7950         * config/nds32/nds32.c (nds32_init_machine_status,
7951         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
7952         strict_aligned_p field.
7953         (nds32_expand_to_rtl_hook): New function.
7954         (TARGET_EXPAND_TO_RTL_HOOK): Define.
7955         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
7957 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7958             Chung-Ju Wu  <jasonwucj@gmail.com>
7960         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
7961         * config/nds32/nds32-n7.md: New file.
7962         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
7963         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
7964         pipeline.
7965         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
7966         * config/nds32/nds32.md (pipeline_model): Add n7.
7967         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
7968         * config/nds32/pipelines.md: Include n7 settings.
7970 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7971             Chung-Ju Wu  <jasonwucj@gmail.com>
7973         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
7974         * config/nds32/nds32-e8.md: New file.
7975         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
7976         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
7977         pipeline.
7978         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
7979         * config/nds32/nds32.md (pipeline_model): Add e8.
7980         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
7981         * config/nds32/pipelines.md: Include e8 settings.
7983 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7984             Chung-Ju Wu  <jasonwucj@gmail.com>
7986         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
7987         * config/nds32/nds32-n8.md: New file.
7988         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
7989         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
7990         pipeline.
7991         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
7992         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
7993         * config/nds32/nds32.md (pipeline_model): Add n8.
7994         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
7995         * config/nds32/pipelines.md: Include n8 settings.
7997 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7998             Chung-Ju Wu  <jasonwucj@gmail.com>
8000         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
8001         * config/nds32/nds32-n9-2r1w.md: New file.
8002         * config/nds32/nds32-n9-3r2w.md: New file.
8003         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
8004         nds32_register_ports): New or modify for cpu n9.
8005         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
8006         pipeline.
8007         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
8008         * config/nds32/nds32-utils.c: New file.
8009         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
8010         TARGET_MUL_SLOW): Define.
8011         * config/nds32/nds32.md (pipeline_model): New attribute.
8012         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
8013         New options that support cpu n9.
8014         * config/nds32/pipelines.md: Include n9 settings.
8015         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
8017 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
8019         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
8020         information if necessary.
8021         (output_cond_branch_compare_zero): Likewise.
8022         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
8023         (nds32_target_alignment): Refine for alignment.
8024         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
8025         (FUNCTION_BOUNDARY): Modify.
8026         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
8027         align case.
8028         * config/nds32/nds32.opt (malways-align, malign-functions): New.
8030 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
8032         * config/nds32/constants.md (unspec_volatile_element): Add values for
8033         TLB operation and data prefetch.
8034         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
8035         functions for TLB operation and data prefetch.
8036         * config/nds32/nds32-intrinsic.md: Likewise.
8037         * config/nds32/nds32_intrinsic.h: Likewise.
8038         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
8039         (nds32_print_operand): Likewise.
8040         * config/nds32/nds32.h (nds32_builtins): Likewise.
8042 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
8043         Andrew Pinski <pinsika@gcc.gnu.org>
8045         PR middle-end/82976
8046         * match.pd: Use constant_boolean_node of correct type instead of
8047         boolean_true_node or boolean_false_node for simplifying
8048         pointer comparisons to zero.
8050 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
8052         PR tree-optimization/80021
8053         * tree.c (verify_type_variant): Make error call in verify_variant_match
8054         translatable and remove final full stop.
8056 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
8058         * config/nds32/constants.md (unspec_volatile_element): Add
8059         UNSPEC_VOLATILE_EH_RETURN.
8060         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
8061         nds32_output_stack_pop): Support dwarf exception handling process.
8062         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
8063         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
8064         exception handling process.
8065         (nds32_compute_stack_frame): Likewise.
8066         (nds32_return_addr_rtx): Likewise.
8067         (nds32_initial_elimination_offset): Likewise.
8068         (nds32_expand_prologue): Likewise.
8069         (nds32_expand_epilogue): Likewise.
8070         (nds32_dynamic_chain_address): New function.
8071         * config/nds32/nds32.h (machine_function): Add fields for dwarf
8072         exception handling.
8073         (DYNAMIC_CHAIN_ADDRESS): Define.
8074         (EH_RETURN_DATA_REGNO): Define.
8075         (EH_RETURN_STACKADJ_RTX): Define.
8076         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
8077         patterns for dwarf exception handling.
8079 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
8081         * config/nds32/nds32.h: Clean up obsolete macros.
8083 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8085         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8086         Add enum values for particular instructions.
8087         * config/nds32/nds32-intrinsic.c: Implementation of expanding
8088         particular intrinsic functions.
8089         * config/nds32/nds32-intrinsic.md: Likewise.
8090         * config/nds32/nds32_intrinsic.h: Likewise.
8091         * config/nds32/nds32.h (nds32_builtins): Likewise.
8092         * config/nds32/nds32.md (type): Add pbsad and pbsada.
8093         (btst, ave): New patterns for particular instructions.
8095 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8097         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8098         Add enum values for atomic load/store and memory sync.
8099         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
8100         and memory sync.
8101         * config/nds32/nds32-intrinsic.md: Likewise.
8102         * config/nds32/nds32_intrinsic.h: Likewise.
8103         * config/nds32/nds32.h (nds32_builtins): Likewise.
8105 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
8107         PR tree-optimization/85257
8108         * fold-const.c (native_encode_vector): If not all elts could fit
8109         and off is -1, return 0 rather than offset.
8110         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
8111         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
8112         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
8113         adjust buffer in native_interpret_expr call.
8115 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8117         * config/nds32/constants.md (unspec_volatile_element): Add cache
8118         control enum values.
8119         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
8120         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
8121         * config/nds32/nds32.c (nds32_cctl_names): New.
8122         (nds32_print_operand): Handle cache control register names.
8123         * config/nds32/nds32.h (nds32_builtins): New enum values.
8124         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
8125         macros.
8126         * config/nds32/nds32.md (type): Add mmu.
8127         * config/nds32/pipelines.md (simple_insn): Add mmu.
8129 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
8131         * config/nds32/nds32.md (type): Remove call.
8132         * config/nds32/pipelines.md (simple_insn): Likewise.
8134 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8136         * config/nds32/constants.md (unspec_volatile_element): Add
8137         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
8138         UNSPEC_VOLATILE_FMFCFG.
8139         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
8140         description for fmfcfg and fmfcsr.
8141         (bdesc_1arg): Add fmtcsr.
8142         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
8143         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
8144         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
8145         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
8146         unspec_fmfcfg): New patterns.
8147         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
8148         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
8149         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
8150         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
8151         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
8152         __nds32__fmfcfg): Define.
8154 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8156         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
8157         intrinsic register names.
8158         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
8159         intrinsic register enum values and macros.
8161 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
8163         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
8164         for load/store addressing form.
8165         (nds32_print_operand_address): Likewise.
8167 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
8169         PR target/85196
8170         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
8171         based on LABEL_REF.  Remove useless assertion.
8172         (pic_address_needs_scratch): Fix formatting.
8173         (sparc_legitimize_pic_address): Minor tweaks.
8174         (sparc_delegitimize_address): Adjust assertion accordingly.
8175         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
8176         into symbolic_operand.
8177         (movsi_high_pic_label_ref): Likewise.
8178         (movsi_lo_sum_pic_label_ref): Likewise.
8179         (movdi_pic_label_ref): Likewise.
8180         (movdi_high_pic_label_ref): Likewise.
8181         (movdi_lo_sum_pic_label_ref): Likewise.
8183 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
8185         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
8186         custom LIB_SPEC setup.
8188 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
8189             Kito Cheng  <kito.cheng@gmail.com>
8191         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
8192         * config/riscv/freebsd.h: New.
8194 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
8196         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
8197         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
8198         file.
8200 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
8201             Kito Cheng  <kito.cheng@gmail.com>
8203         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
8204         nds32_output_call, nds32_symbol_binds_local_p): New functions.
8205         * config/nds32/nds32-protos.h (nds32_output_call,
8206         nds32_output_return): Declare.
8207         * config/nds32/nds32.md: Refine all the call and return patterns.
8209 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
8211         PR debug/85252
8212         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
8213         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
8215         PR rtl-optimization/84872
8216         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
8217         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
8218         EDGE_CROSSING edge.
8220 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
8222         * expr.c (copy_blkmode_to_reg): Revert 254862.
8223         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
8225 2018-04-06  Richard Biener  <rguenther@suse.de>
8227         PR middle-end/85244
8228         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
8229         after seeing a component reference with an adjacent field.  Treat
8230         refs to arrays at struct end of external decls similar to
8231         refs to unconstrained commons.
8233 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
8235         PR sanitizer/85213
8236         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
8237         look through SAVE_EXPRs with non-side-effects argument.  Adjust
8238         recursive calls.
8239         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
8240         save_p here.
8242 2018-04-06  Richard Biener  <rguenther@suse.de>
8244         PR middle-end/85180
8245         * alias.c (find_base_term): New wrapper around find_base_term
8246         unwinding CSELIB_VAL_PTR changes.
8247         (find_base_term): Do not restore CSELIB_VAL_PTR during the
8248         recursion.
8250 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8252         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
8253         instructions.
8254         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
8255         constant definitions.
8256         ("nop"): lr 0,0 -> nopr r0
8257         ("nop_lr0", "nop_lr1"): New insn definitions.
8259 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
8261         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
8262         NDS32_V3PUSH_AVAILABLE_P macro.
8264 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
8265             Chung-Ju Wu  <jasonwucj@gmail.com>
8267         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
8268         (nds32*-*-*): Add float and fpu_config into supported_defaults.
8269         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
8270         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
8271         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
8272         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
8273         * config/nds32/constraints.md: New constraints and checking for hard
8274         float configuration.
8275         * config/nds32/iterators.md: New mode iterator and attribute for hard
8276         float configuration.
8277         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
8278         patterns.
8279         * config/nds32/nds32-fpu.md: New file.
8280         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
8281         deal with hard float code generation.
8282         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
8283         ARCH_V3S.
8284         (abi_type, float_reg_number): New enum type.
8285         * config/nds32/nds32-predicates.c: New predicates for hard float.
8286         * config/nds32/nds32-protos.h: Declare functions for hard float.
8287         * config/nds32/nds32.c: Implementation for hard float configuration.
8288         * config/nds32/nds32.h: Definitions for hard float configuration.
8289         * config/nds32/nds32.md: Include hard float machine description and
8290         modify patterns for hard float configuration.
8291         * config/nds32/nds32.opt: New options for hard float configuration.
8292         * config/nds32/predicates.md: New predicates for hard float
8293         configuration.
8295 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
8297         * common/config/nds32/nds32-common.c
8298         (nds32_option_optimization_table): Enable -mreleax-hint by default.
8300 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
8302         PR middle-end/85195
8303         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
8304         CONSTRUCTOR_ELT (ctor, ...)->value.
8306 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
8308         PR target/85193
8309         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
8311 2018-04-05  Tom de Vries  <tom@codesourcery.com>
8313         PR target/85204
8314         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
8315         cond jump.
8317 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
8318             Kito Cheng  <kito.cheng@gmail.com>
8320         * config/nds32/constraints.md (U33): Fine-tune checking condition.
8321         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
8322         * config/nds32/nds32.h (nds32_16bit_address_type): Add
8323         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
8325 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
8326             Kito Cheng  <kito.cheng@gmail.com>
8328         * config/nds32/constraints.md (Ufe): New memory constraint.
8329         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
8330         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
8331         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
8332         operands.
8333         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
8334         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
8336 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8338         * config/nds32/nds32.md: Use optimize_size in the condition for
8339         alu-shift instructions.
8341 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8343         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
8345 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8347         * config/nds32/nds32.md (negsi2): Refine pattern.
8349 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
8350             Chung-Ju Wu  <jasonwucj@gmail.com>
8352         * config/nds32/iterators.md (shift_rotate): New code iterator.
8353         (shift): New code attribute.
8354         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
8355         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
8356         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
8357         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
8358         bit-wise operations.
8359         (andsi3, *andsi3): Ditto.
8360         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
8361         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
8362         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
8363         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
8364         nds32_ior_operand, nds32_xor_operand): New predicates.
8366 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8368         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
8369         (addsi3, subsi3): ... this.
8371 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8373         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
8375 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8377         * config/nds32/nds32.md: Adjust indention.
8379 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
8381         * config/nds32/nds32.md (feature): New attribute.
8383 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8385         * config/nds32/nds32.md (subtype): New attribute.
8387 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8389         PR target/85203
8390         * config/arm/arm-builtins.c (arm_expand_builtin): Change
8391         expansion to perform a bitwise AND of the argument followed by a
8392         boolean negation of the result.
8394 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
8396         PR rtl-optimization/84878
8397         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
8398         the basic block.  Assert the use reference is not artificial and that
8399         it has an associated insn.
8401 2018-04-04  Michael Matz  <matz@suse.de>
8403         * builtins.c (compute_objsize): Pass correct operand
8404         to array_at_struct_end_p.
8406 2018-04-04  Richard Biener  <rguenther@suse.de>
8408         PR lto/85176
8409         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
8410         from contexts for DINFO_LEVEL_TERSE and below.
8412 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
8414         * config/nds32/nds32-doubleword.md (move_<mode>): Require
8415         resiter_operand condition.
8416         * config/nds32/nds32.md (*move<mode>): Ditto.
8418 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
8419             Monk Chiang  <sh.chiang04@gmail.com>
8421         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
8423 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
8425         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
8427 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
8428             Kito Cheng  <kito.cheng@gmail.com>
8430         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
8431         nds32_cond_code_str, output_cond_branch,
8432         output_cond_branch_compare_zero, nds32_expand_cbranch,
8433         nds32_expand_cstore, nds32_expand_movcc,
8434         nds32_output_cbranchsi4_equality_zero,
8435         nds32_output_cbranchsi4_equality_reg,
8436         nds32_output_cbranchsi4_equality_reg_or_const_int,
8437         nds32_output_cbranchsi4_greater_less_zero: New functions.
8438         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
8439         nds32_expand_cstore, nds32_expand_movcc,
8440         nds32_output_cbranchsi4_equality_zero,
8441         nds32_output_cbranchsi4_equality_reg,
8442         nds32_output_cbranchsi4_equality_reg_or_const_int,
8443         nds32_output_cbranchsi4_greater_less_zero): Declare.
8444         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
8445         nds32_rimm11s_operand): New predicates.
8446         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
8447         * config/nds32/nds32.md: Rewrite all the branch and conditional move
8448         patterns.
8450 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
8452         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
8453         * config/nds32/nds32.md: Ditto.
8454         * config/nds32/pipelines.md: Ditto.
8456 2018-04-04  Richard Biener  <rguenther@suse.de>
8458         PR tree-optimization/85168
8459         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
8460         propagating abnormals.
8462 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
8464         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
8466 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
8467             Kito Cheng  <kito.cheng@gmail.com>
8469         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
8470         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
8471         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
8472         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
8473         * config/nds32/nds32.md (sibcall_internal): New.
8474         (sibcall_register): Remove.
8475         (sibcall_immediate): Remove.
8476         (sibcall_value_internal): New.
8477         (sibcall_value_register): Remove.
8478         (sibcall_value_immediate): Remove.
8479         * config/nds32/predicates.md (nds32_general_register_operand): New.
8480         (nds32_call_address_operand): New.
8482 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
8484         PR rtl-optimization/85167
8485         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
8486         bb_defs if *split_p, instead preinitialize it to NULL.
8488         PR tree-optimization/85156
8489         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
8490         evaluating the argument multiple times.
8492 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
8494         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
8495         than vector.
8496         (_mm_cvtpd_ps): Likewise.
8497         (_mm_cvttpd_epi32): Likewise.
8498         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
8499         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
8500         vector, pixel, and bool following altivec.h include.
8502 2018-04-03  Martin Sebor  <msebor@redhat.com>
8504         * doc/extend.texi (Common Function Attributes): Clarify.
8505         (const attribute): Likewise.
8506         (pure attribute): Likewise.
8508 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
8510         PR target/85169
8511         * config/i386/i386.c (ix86_expand_vector_set): Use
8512         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
8514 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
8516         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
8517         instructions when changing rounding bits to preserve precision bits
8518         in the x87 control word.
8520 2018-04-03  Martin Liska  <mliska@suse.cz>
8522         PR tree-optimization/82491
8523         * rtl.h (strip_offset_and_add): Replace += suboffset with
8524         poly_uint64 () + suboffset.
8526 2018-03-29  Martin Liska  <mliska@suse.cz>
8527             Martin Jambor  <mjambor@suse.cz>
8529         PR ipa/84947
8530         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
8531         param_type is not an integral or pointer type.
8533 2018-04-03  Richard Biener  <rguenther@suse.de>
8535         * sese.h (recompute_all_dominators): Remove.
8537 2018-04-02  Martin Sebor  <msebor@redhat.com>
8539         * doc/invoke.texi (-Wrestrict): Fix typos.
8541 2018-04-02  Jim Wilson  <jimw@sifive.com>
8543         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
8544         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
8545         (<optab>di3, <optab>si3_extend): Likewise.
8546         (<optab>si3_mask, <optab>si3_mask_1): New.
8547         (<optab>di3_mask, <optab>di3_mask_1): New.
8548         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
8549         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
8550         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
8552 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
8554         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
8555         example.
8557 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8559         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
8560         (nds32_canonicalize_comparison): New function.
8562 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8563             Kito Cheng  <kito.cheng@gmail.com>
8564             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
8566         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
8567         * config/nds32/constants.md (unspec_volatile_element): Add
8568         UNSPEC_VOLATILE_RELAX_GROUP.
8569         * config/nds32/nds32-relax-opt.c: New file.
8570         * config/nds32/nds32-predicates.c
8571         (nds32_symbol_load_store_p): New function.
8572         * config/nds32/nds32-protos.h
8573         (nds32_symbol_load_store_p): Declare function.
8574         (make_pass_nds32_relax_opt): Declare new rtl pass function.
8575         * config/nds32/nds32.c
8576         (nds32_register_pass): New function to register pass.
8577         (nds32_register_passes): New function to register passes.
8578         * config/nds32/nds32.md (relax_group): New pattern.
8579         * config/nds32/nds32.opt (mrelax-hint): New option.
8580         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
8582 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
8584         * config/nds32/t-nds32: Modify files dependency.
8586 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8588         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
8589         (PROFILE_HOOK): Define its implementation.
8591 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8593         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
8594         type and 32-bit size.
8596 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
8598         PR middle-end/85090
8599         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
8600         (V_128_256): New mode iterator.
8601         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
8602         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
8603         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
8604         of V.
8605         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
8606         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
8608 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
8610         PR target/83315
8611         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
8612         NaN inputs correctly.
8614 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
8616         PR target/80546
8617         * config/rs6000/vsx.md (??r): New mode attribute.
8618         (*vsx_mov<mode>_64bit): Use it.
8619         (*vsx_mov<mode>_32bit): Likewise.
8621 2018-03-30  Martin Sebor  <msebor@redhat.com>
8623         PR tree-optimization/84818
8624         * builtins.c (check_access): Use warning_n.
8626 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
8628         PR target/83822
8629         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
8630         condition.
8631         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
8632         condition.
8634 2018-03-30  Julia Koval  <julia.koval@intel.com>
8636         PR target/84413
8637         * x86-tune.def (movx, partial_reg_dependency): Enable for
8638         m_SKYLAKE_AVX512.
8640 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
8642         PR inline-asm/84985
8643         * lra-constraints.c (process_alt_operands): Move setting
8644         this_alternative_matches below.
8646 2018-03-29  Martin Liska  <mliska@suse.cz>
8648         PR lto/84995.
8649         * doc/invoke.texi: Document how LTO works with debug info.
8650         Describe auto-load support of binutils.  Mention 'x86-64'
8651         as valid option value of -march option.
8653 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
8655         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
8657         PR c/85094
8658         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
8659         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
8660         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
8661         checking.
8663 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
8665         PR target/84912
8666         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
8667         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
8668         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
8669         for RS6000_BTM_POWERPC64.
8670         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
8671         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
8672         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
8673         definition.
8674         (DIVDE): Use it.
8675         (DIVDEU): Likewise.
8677 2018-03-28 Carl Love  <cel@us.ibm.com>
8679         Revert
8680         2017-09-27  Carl Love  <cel@us.ibm.com>
8682         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
8683         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
8684         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
8685         fctiw instruction.
8687 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8689         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
8690         instead of __vector bool.
8691         (_mm_max_pu8): Likewise.
8692         (_mm_min_pi16): Likewise.
8694 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
8696         PR target/84912
8697         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
8698         (DIVWEUO): Likewise.
8699         (DIVDEO): Likewise.
8700         (DIVDEUO): Likewise.
8701         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
8702         DIVWEUO and DIVDEUO.
8703         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
8704         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
8705         (div_extend): Likewise.
8706         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
8707         builtin function.
8708         (__builtin_divweuo): Likewise.
8709         (__builtin_divdeo): Likewise.
8710         (__builtin_divdeuo): Likewise.
8712 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
8714         PR target/85095
8715         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
8716         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
8718         PR tree-optimization/82004
8719         * gimple-match-head.c (optimize_pow_to_exp): New function.
8720         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
8721         Don't fold to exp if optimize_pow_to_exp is false.
8723 2018-03-28  Martin Liska  <mliska@suse.cz>
8725         PR other/84819
8726         * calls.c (initialize_argument_information): Fix trailing space.
8727         * common.opt: Fix typo and provide better explanation for
8728         -fsanitize-coverage option.
8729         * config/i386/i386.opt: Fix typo.
8731 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
8732             Martin Liska  <mliska@suse.cz>
8734         PR sanitizer/85081
8735         * gimplify.c (asan_poison_variable): Don't do the check for
8736         gimplify_omp_ctxp here.
8737         (gimplify_decl_expr): Do it here.
8738         (gimplify_target_expr): Likewise.
8740 2018-03-28  Martin Liska  <mliska@suse.cz>
8742         PR target/84988
8743         * config/i386/i386.c (ix86_function_arg_advance): Do not call
8744         chkp_type_bounds_count if MPX is not enabled.
8746 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8748         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
8750 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
8752         PR target/84914
8753         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
8754         function to create the function decl for complex long double
8755         multiply and divide for -mabi=ieeelongdouble.
8756         (init_float128_ieee): Call it.
8758 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
8760         PR target/85044
8761         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
8762         -fcf-protection=branch -mibt.
8763         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
8765 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8767         PR target/81863
8768         * config/arm/arm.c (arm_valid_symbolic_address): Handle
8769         arm_word_relocations.
8771 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
8773         PR target/85056
8774         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
8775         extern array declarations.
8777 2018-03-27  Richard Biener  <rguenther@suse.de>
8779         PR middle-end/84067
8780         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
8781         explicit single_use checks.
8783 2018-03-27  Richard Biener  <rguenther@suse.de>
8785         PR tree-optimization/85082
8786         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
8787         Valueize the VUSE.
8789 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8791         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
8792         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
8793         Turn on fasynchronous-unwind-tables and funwind-tables.
8795 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
8797         PR target/85073
8798         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
8799         (*bmi_blsr_<mode>_ccz): Ditto.
8801 2018-03-26  Tom de Vries  <tom@codesourcery.com>
8803         PR tree-optimization/85063
8804         * omp-general.c (offloading_function_p): New function.  Factor out
8805         of ...
8806         * omp-offload.c (pass_omp_target_link::gate): ... here.
8807         * omp-general.h (offloading_function_p): Declare.
8808         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
8809         with attribute omp declare target for offloading functions.
8811 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
8813         PR tree-optimization/84005
8814         * tree-data-ref.h (get_base_for_alignment): Declare.
8815         * tree-data-ref.c (get_base_for_alignment_1): New function.
8816         (get_base_for_alignment): Likewise.
8817         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
8818         get_base_for_alignment to find a suitable base object, instead
8819         of always using drb->base_address.
8821 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
8823         PR inline-asm/85022
8824         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
8825         known size by default.
8827 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
8829         PR inline-asm/85030
8830         * lra-constraints.c (process_alt_operands): Don't match BLKmode
8831         and non BLKmode operands.
8833 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8835         PR target/85026
8836         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
8837         Clean up attributes.
8839 2018-03-23  Richard Biener  <rguenther@suse.de>
8841         PR debug/85020
8842         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
8843         we are going to emit early debug for LTO.
8845 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
8847         PR inline-asm/85034
8848         * function.c (match_asm_constraints_1): Don't optimize if input
8849         doesn't satisfy general_operand predicate for output's mode.
8851         PR inline-asm/85022
8852         * alias.c (write_dependence_p): Don't require for x_canonicalized
8853         non-VOIDmode if x has VOIDmode.
8855         PR sanitizer/85029
8856         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
8857         just don't try to optimize it rather than assert it never happens.
8859 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8861         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
8862         macro expansions for definition of ST_INTERNAL_<mode> and
8863         LD_INTERNAL_<mode> builtins.
8864         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
8865         Remove prototype.
8866         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
8867         function.
8868         (altivec_expand_st_builtin): Likewise.
8869         (altivec_expand_builtin): Remove calls to deleted functions.
8870         (rs6000_address_for_altivec): Delete this function.
8871         * config/rs6000/vector.md: Remove expands for
8872         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
8874 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
8876         PR target/84826
8877         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
8878         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
8879         re-computing once computed.
8880         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
8881         (arm_init_machine_status): Initialize
8882         machine->static_chain_stack_bytes.
8884 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8886         PR target/84760
8887         * doc/extend.texi: Add four new prototypes for vec_ld.
8888         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
8889         definitions for more logical presentation.
8890         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
8891         entries for V1TI variants of __builtin_altivec_ld builtin.
8892         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
8893         handling of V1TI variant of LVX icode pattern.
8894         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
8895         (rs6000_gimple_fold_builtin): Likewise.
8896         (altivec_init_builtins): Add code to define
8897         __builtin_altivec_lvx_v1ti function.
8899 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
8901         PR inline-asm/84941
8902         * function.c (match_asm_constraints_1): Don't do the optimization
8903         if input isn't a REG, SUBREG, MEM or constant.
8905 2018-03-22  Tom de Vries  <tom@codesourcery.com>
8907         PR tree-optimization/84956
8908         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
8909         bb_has_abnormal_pred.
8911 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
8913         PR sanitizer/85018
8914         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
8915         DECL_INITIAL (decl) to decl at the end.
8916         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
8917         adjust the comment.
8919 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
8921         * doc/extend.texi (__builtin_tgmath): Document when complex
8922         integer types are treated as _Complex _Float64.
8924 2018-03-21  Tom de Vries  <tom@codesourcery.com>
8926         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
8928 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8930         PR tree-optimization/84960
8931         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
8932         if it is ENTRY block, move them into single succ of ENTRY in that case.
8934 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
8936         PR tree-optimization/84811
8937         * poly-int.h (poly_span_traits): Remove the T3 parameter and
8938         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
8939         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
8940         (known_subrange_p): Update accordingly.  Cast each value involved
8941         in the size comparison, rather than casting the result of the
8942         subtraction.
8944 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8946         PR tree-optimization/84982
8947         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
8948         by flipping the least significant bit rather than all bits from
8949         bitpos to bitpos + bitsize - 1.
8951 2018-03-21  Nathan Sidwell  <nathan@acm.org>
8953         * doc/extend.texi (Deprecated Features): Remove mention of
8954         long-deleted deprecations.
8956 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8958         PR jit/84288
8959         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
8960         * configure: Regenerate.
8962 2018-03-21  Tom de Vries  <tom@codesourcery.com>
8964         PR tree-optimization/83126
8965         * tree-parloops.c (num_phis): New function.
8966         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
8968 2018-03-21  Nathan Sidwell  <nathan@acm.org>
8970         * doc/extend.texi (Deprecated Features): Update deprecated flags,
8971         mention anon-struct/union members and trailing attributes.
8973 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
8975         PR tree-optimization/84969
8976         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
8977         builtin memset partitions if they set different rhs values.
8979 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8981         PR rtl-optimization/84989
8982         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
8983         VEC_DUPLICATE with scalar result mode.
8985 2018-03-21  Martin Liska  <mliska@suse.cz>
8987         PR ipa/84963
8988         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
8989         not intended return statement.
8991 2018-03-21  Martin Liska  <mliska@suse.cz>
8993         PR target/84988
8994         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
8995         (chkp_find_bound_slots_1): Limit number of iterations.
8997 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
8999         PR target/84838
9000         * Minor grammar fixes for x86 options.
9002 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
9004         PR debug/84875
9005         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
9006         holding REG_CFA_RESTORE notes, instead turn them into a USE.
9008 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
9010         PR target/83789
9011         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
9012         (altivec_lvx_<mode>_1op): Likewise.
9013         (altivec_stvx_<mode>_2op): Likewise.
9014         (altivec_stvx_<mode>_1op): Likewise.
9015         (altivec_lvx_<VM2:mode>): New define_expand.
9016         (altivec_stvx_<VM2:mode>): Likewise.
9017         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
9018         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
9019         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
9020         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
9021         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
9022         (rs6000_gen_lvx): Likewise.
9023         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
9024         (altivec_expand_stv_builtin): Likewise.
9025         (altivec_expand_builtin): Likewise.
9026         * config/rs6000/vector.md: Likewise.
9028 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9030         PR target/82518
9031         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
9032         BYTES_BIG_ENDIAN.
9034 2018-03-20  Richard Biener  <rguenther@suse.de>
9036         PR target/84986
9037         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
9038         sign-conversions as zero, fall back to standard scalar_stmt
9039         cost for the rest.
9041 2018-03-20  Martin Liska  <mliska@suse.cz>
9043         PR ipa/84825
9044         * predict.c (rebuild_frequencies): Handle case when we have
9045         PROFILE_ABSENT, but flag_guess_branch_prob is false.
9047 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
9049         PR target/84990
9050         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
9051         flag_section_anchors.
9052         * varasm.c (use_blocks_for_decl_p): Remove hack for
9053         dw2_force_const_mem.
9055         PR target/84845
9056         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
9057         to ...
9058         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
9059         be created, use lowpart_subreg of operands[0] rather than operands[0]
9060         itself.
9061         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
9062         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
9063         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
9064         and n constraint instead of aarch64_shift_imm_di and Usd.
9065         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
9066         (*aarch64_<optab>_reg_minus<mode>3): ... this.
9068 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
9070         PR target/82989
9071         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
9072         to favor GPR over NEON registers.
9073         (<shift>di3_neon): Likewise.
9075 2018-03-20  Tom de Vries  <tom@codesourcery.com>
9077         PR target/84952
9078         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
9079         (nvptx_process_pars): Emit bar.sync asap and alap.
9081 2018-03-20  Tom de Vries  <tom@codesourcery.com>
9083         PR target/84954
9084         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
9085         seen_label if seen_label is already set.
9087 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
9089         PR target/84945
9090         * config/i386/i386.c (fold_builtin_cpu): For features above 31
9091         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
9092         Use 1U instead of 1.  Formatting fixes.
9094         PR c/84953
9095         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
9096         instead of TREE_TYPE (s1) for the return value.
9098 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
9100         PR tree-optimization/84946
9101         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
9102         bitsize + bitsize in poly_uint64 rather than poly_int64.
9104         PR sanitizer/78651
9105         * dwarf2asm.c: Include fold-const.c.
9106         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
9107         of decl rather than decl itself.
9109         PR rtl-optimization/84643
9110         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
9112 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
9114         PR sanitizer/78651
9115         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
9116         calling assemble_variable.
9118 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
9120         PR target/81647
9121         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
9122         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
9124 2018-03-19  Jim Wilson  <jimw@sifive.com>
9126         PR bootstrap/84856
9127         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
9128         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
9129         (riscv_first_stack_step): Likewise.
9130         (riscv_option_override): Use STACK_BOUNDARY instead of
9131         MIN_STACK_BOUNDARY.
9132         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
9133         MIN_STACK_BOUNDARY.
9134         (BIGGEST_ALIGNMENT): Set to 128.
9135         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
9136         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
9137         STACK_BOUNDARY.
9139 2018-03-19  Richard Biener  <rguenther@suse.de>
9141         PR tree-optimization/84933
9142         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
9143         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
9145 2018-03-19  Richard Biener  <rguenther@suse.de>
9147         PR tree-optimization/84859
9148         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
9149         (cond_if_else_store_replacement): Perform sinking operation on
9150         single-store BBs regardless of MAX_STORES_TO_SINK setting.
9151         Generalize what a BB with a single eligible store is.
9153 2018-03-19  Richard Biener  <rguenther@suse.de>
9155         PR tree-optimization/84929
9156         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
9157         chrec_is_positive against non-chrec arg.
9159 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
9161         PR target/84711
9162         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
9164 2018-03-18  Martin Liska  <mliska@suse.cz>
9166         PR rtl-optimization/84635
9167         * regrename.c (build_def_use): Use matches_mode only when
9168         matches >= 0.
9170 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
9172         PR tree-optimization/84913
9173         * tree-vect-loop.c (vectorizable_reduction): Don't try to
9174         vectorize chains of COND_EXPRs.
9176 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
9178         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
9180 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
9182         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
9184 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
9186         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
9188 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
9189             Kito Cheng  <kito.cheng@gmail.com>
9191         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
9192         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
9193         (nds32_adjust_reg_alloc_order): New function.
9194         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
9196 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
9198         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
9199         nds32_print_operand, nds32_print_operand_address): Use
9200         HOST_WIDE_INT_PRINT_DEC instead.
9202 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
9204         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
9206 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
9208         PR target/84902
9209         * config/i386/i386.c (initial_ix86_tune_features,
9210         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
9211         unsigned long long.
9212         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
9213         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
9214         rather than 1u << ix86_tune.  Formatting fix.
9215         (ix86_option_override_internal): Change ix86_arch_mask from
9216         unsigned int to unsigned HOST_WIDE_INT, initialize to
9217         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
9218         (ix86_function_specific_restore): Likewise.
9220 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
9222         PR target/84899
9223         * postreload.c (reload_combine_recognize_pattern): Perform
9224         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
9225         truncate_int_for_mode the result for the destination's mode.
9227         PR c/84909
9228         * hsa-gen.c (mem_type_for_type): Fix comment typo.
9229         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
9230         Likewise.
9231         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
9232         Likewise.
9234 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
9236         PR target/84876
9237         * lra-assigns.c (lra_split_hard_reg_for): Don't use
9238         regno_allocno_class_array and sorted_pseudos.
9239         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
9240         insns where regno is used.
9242 2018-03-16  Martin Liska  <mliska@suse.cz>
9244         PR ipa/84833
9245         * multiple_target.c (create_dispatcher_calls): Redirect
9246         reference in the symbol table.
9248 2018-03-16  Martin Liska  <mliska@suse.cz>
9250         PR ipa/84722
9251         * multiple_target.c (create_dispatcher_calls): Redirect also
9252         an alias.
9254 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
9256         PR c++/79937
9257         PR c++/82410
9258         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
9259         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
9260         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
9262 2018-03-16  Julia Koval  <julia.koval@intel.com>
9264         * doc/invoke.texi (Skylake Server): Add CLWB.
9265         Cannonlake): Remove CLWB.
9267 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
9269         PR tree-optimization/84841
9270         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
9271         1 << 3.
9272         (FLOAT_ONE_CONST_TYPE): Define.
9273         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
9274         (sort_by_operand_rank): Put entries with higher constant_type last
9275         rather than first to match comments.
9277 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
9279         * config/nios2/nios2.md (movsi_internal): Fix thinko in
9280         split predicate.
9282 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
9284         PR c++/79085
9285         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
9286         check and use address of target always.
9288 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
9290         PR target/84574
9291         * config/i386/i386.c (indirect_thunk_needed): Update comments.
9292         (indirect_thunk_bnd_needed): Likewise.
9293         (indirect_thunks_used): Likewise.
9294         (indirect_thunks_bnd_used): Likewise.
9295         (indirect_return_needed): New.
9296         (indirect_return_bnd_needed): Likewise.
9297         (output_indirect_thunk_function): Add a bool argument for
9298         function return.
9299         (output_indirect_thunk_function): Don't generate alias for
9300         function return thunk.
9301         (ix86_code_end): Call output_indirect_thunk_function to generate
9302         function return thunks.
9303         (ix86_output_function_return): Set indirect_return_bnd_needed
9304         and indirect_return_needed instead of indirect_thunk_bnd_needed
9305         and indirect_thunk_needed.
9307 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
9309         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
9310         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
9311         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
9313 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
9314             Paul Hua <paul.hua.gm@gmail.com>
9316         PR c/84852
9317         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
9319 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
9321         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
9322         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
9323         resp. SFmode cases.
9325 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
9327         PR target/84711
9328         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
9329         instead of GET_MODE_SIZE when comparing Units.
9331 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9333         PR target/68256
9334         * varasm.c (hash_section): Return an unchangeble hash value
9335         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
9336         Return !aarch64_can_use_per_function_literal_pools_p ().
9338 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
9340         PR target/84860
9341         * optabs.c (emit_conditional_move): Pass address of cmode's copy
9342         rather than address of cmode as last argument to prepare_cmp_insn.
9344 2018-03-15  Julia Koval  <julia.koval@intel.com>
9346         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
9347         F_AVX512VNNI, F_AVX512BITALG): New.
9349 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
9351         PR target/83451
9352         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
9353         insn for floating-point loads and stores.
9355 2018-03-14  Carl Love  <cel@us.ibm.com>
9357         * config/rs6000/rs6000-c.c: Add macro definitions for
9358         ALTIVEC_BUILTIN_VEC_PERMXOR.
9359         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
9360         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
9361         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
9362         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
9363         UNSPEC_VPERMXOR.
9364         * config/doc/extend.texi: Add prototypes for vec_permxor.
9366 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
9368         PR c/84852
9369         * diagnostic-show-locus.c (class layout_point): Convert m_line
9370         from int to linenum_type.
9371         (line_span::comparator): Use linenum "compare" function when
9372         comparing line numbers.
9373         (test_line_span): New function.
9374         (layout_range::contains_point): Convert param "row" from int to
9375         linenum_type.
9376         (layout_range::intersects_line_p): Likewise.
9377         (layout::will_show_line_p): Likewise.
9378         (layout::print_source_line): Likewise.
9379         (layout::should_print_annotation_line_p): Likewise.
9380         (layout::print_annotation_line): Likewise.
9381         (layout::print_leading_fixits): Likewise.
9382         (layout::annotation_line_showed_range_p): Likewise.
9383         (struct line_corrections): Likewise for field m_row.
9384         (line_corrections::line_corrections): Likewise for param "row".
9385         (layout::print_trailing_fixits): Likewise.
9386         (layout::get_state_at_point): Likewise.
9387         (layout::get_x_bound_for_row): Likewise.
9388         (layout::print_line): Likewise.
9389         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
9390         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
9391         * input.c (selftest::test_linenum_comparisons): New function.
9392         (selftest::input_c_tests): Call it.
9393         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
9394         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
9395         * selftest.h (ASSERT_GT): New macro.
9396         (ASSERT_GT_AT): New macro.
9397         (ASSERT_LT): New macro.
9398         (ASSERT_LT_AT): New macro.
9400 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
9402         PR rtl-optimization/84780
9403         * combine.c (distribute_links): Don't make a link based on pc_rtx.
9405 2018-03-14  Martin Liska  <mliska@suse.cz>
9407         * tree.c (record_node_allocation_statistics): Use
9408         get_stats_node_kind.
9409         (get_stats_node_kind): New function extracted from
9410         record_node_allocation_statistics.
9411         (free_node): Use get_stats_node_kind.
9413 2018-03-14  Richard Biener  <rguenther@suse.de>
9415         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
9416         that the value-set of ANTIC_IN doesn't grow.
9418         Revert
9419         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
9420         member.
9421         (BB_VISITED_WITH_VISITED_SUCCS): New define.
9422         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
9424 2018-03-14  Julia Koval  <julia.koval@intel.com>
9426         * config.gcc (icelake-client, icelake-server): New.
9427         (icelake): Remove.
9428         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
9429         (initial_ix86_arch_features): Ditto.
9430         (PTA_SKYLAKE): Add SGX.
9431         (PTA_ICELAKE): Remove.
9432         (PTA_ICELAKE_CLIENT): New.
9433         (PTA_ICELAKE_SERVER): New.
9434         (ix86_option_override_internal): Split up icelake on icelake client and
9435         icelake server.
9436         (get_builtin_code_for_version): Ditto.
9437         (fold_builtin_cpu): Ditto.
9438         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
9439         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
9440         * config/i386/i386.h (processor_type): Ditto.
9441         * doc/invoke.texi: Ditto.
9443 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
9445         PR sanitizer/83392
9446         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
9447         INTEGER_CST offset, add it together with bitpos / 8 and
9448         sign extend based on POINTER_SIZE.
9450         PR target/84844
9451         Revert
9452         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
9454         PR target/78090
9455         * config/i386/constraints.md (Yc): New register constraint.
9456         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
9457         Use Yc constraint for alternative 2 of operand 0.  Remove
9458         preferred_for_speed attribute.
9460 2018-03-14  Richard Biener  <rguenther@suse.de>
9462         PR tree-optimization/84830
9463         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
9464         with the old one to avoid oscillations.
9466 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
9468         PR target/83712
9469         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
9470         pseudos.
9471         (assign_by_spills): Return a flag of reload assignment failure.
9472         Do not process the reload assignment failures.  Do not spill other
9473         reload pseudos if they has the same reg class.  Update n if
9474         necessary.
9475         (lra_assign): Add a return arg.  Set up from the result of
9476         assign_by_spills call.
9477         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9478         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
9479         usage_insns if it is not NULL.
9480         (spill_hard_reg_in_range): New function.
9481         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9482         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9483         function prototypes.
9484         (lra_assign): Change prototype.
9485         * lra.c (lra): Add code to deal with fails by splitting hard reg
9486         live ranges.
9488 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
9490         * config/riscv/riscv.opt (mrelax): New option.
9491         * config/riscv/riscv.c (riscv_file_start): Emit ".option
9492         "norelax" when riscv_mrelax is disabled.
9493         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
9495 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
9497         PR target/84743
9498         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
9499         reassociation for int modes.
9501 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
9503         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
9504         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
9505         for big-endian.
9506         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
9507         * config/aarch64/aarch64-sve.md
9508         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
9509         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
9510         (*extend<mode><Vwide>2): Rename to...
9511         (aarch64_sve_extend<mode><Vwide>2): ...this.
9512         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
9513         renaming the old pattern to...
9514         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
9515         unsigned packs.
9516         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
9517         define_expand, renaming the old pattern to...
9518         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
9519         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
9520         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
9521         account when deciding which SVE instruction the optab should use.
9522         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
9524 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
9526         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
9527         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
9528         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
9529         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
9530         (tlsdesc_small_<mode>): Turn a define_expand and use
9531         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
9532         (tlsdesc_small_advsimd_<mode>): ...this.
9533         (tlsdesc_small_sve_<mode>): New pattern.
9535 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
9537         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
9538         (UNSPEC_UMUL_HIGHPART): New constants.
9539         (MUL_HIGHPART): New int iteraor.
9540         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
9541         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
9542         define_expand.
9543         (*<su>mul<mode>3_highpart): New define_insn.
9545 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
9547         PR lto/84805
9548         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9549         incomplete types.
9551 2018-03-13  Martin Liska  <mliska@suse.cz>
9553         PR ipa/84658.
9554         * (sem_item_optimizer::sem_item_optimizer): Initialize new
9555         vector.
9556         (sem_item_optimizer::~sem_item_optimizer): Release it.
9557         (sem_item_optimizer::merge_classes): Register variable aliases.
9558         (sem_item_optimizer::fixup_pt_set): New function.
9559         (sem_item_optimizer::fixup_points_to_sets): Likewise.
9560         * ipa-icf.h: Declare new variables and functions.
9562 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
9564         PR middle-end/84834
9565         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
9566         integer_pow2p@2 and test integer_pow2p in condition.
9567         (A < 0 ? C : 0): Similarly for @1.
9569         PR middle-end/84831
9570         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
9571         characters starting at p contain '\0' character, don't look beyond
9572         that.
9574         PR target/84827
9575         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
9576         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
9578         PR target/84828
9579         * reg-stack.c (change_stack): Change update_end var from int to
9580         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
9581         also call set_block_for_insn on the newly added insns and rescan.
9583         PR target/84786
9584         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
9585         on the last operand.
9587         PR c++/84704
9588         * tree.c (stabilize_reference_1): Return save_expr (e) for
9589         STATEMENT_LIST even if it doesn't have side-effects.
9591 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
9593         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
9595 2018-03-12  Renlin Li  <renlin.li@arm.com>
9597         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
9598         aarch64_output_scalar_simd_mov_immediate.
9600 2018-03-12  Martin Sebor  <msebor@redhat.com>
9602         PR tree-optimization/83456
9603         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
9604         for perfectly overlapping calls to memcpy.
9605         (gimple_fold_builtin_memory_chk): Same.
9606         (gimple_fold_builtin_strcpy): Handle no-warning.
9607         (gimple_fold_builtin_stxcpy_chk): Same.
9608         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
9610 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
9612         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
9613         parameter.  Use it for SFmode.
9614         (rs6000_function_arg_advance_1): Adjust.
9615         (rs6000_function_arg): Adjust.
9616         (rs6000_gimplify_va_arg): Pass false for that new parameter.
9618 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
9620         PR rtl-optimization/84169
9621         PR rtl-optimization/84780
9622         * combine.c (can_combine_p): Check for a 2-insn combination whether
9623         the destination register is used between the two insns, too.
9625 2018-03-12  Richard Biener  <rguenther@suse.de>
9627         PR tree-optimization/84803
9628         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
9629         for refs DR analysis didn't process.
9631 2018-03-12  Richard Biener  <rguenther@suse.de>
9633         PR tree-optimization/84777
9634         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
9635         force-vectorize loops ignore whether we are optimizing for size.
9637 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9639         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
9640         (TARGET_MD_ASM_ADJUST): Define.
9642 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
9643             Kito Cheng  <kito.cheng@gmail.com>
9644             Chung-Ju Wu  <jasonwucj@gmail.com>
9646         * config/nds32/nds32.c (nds32_compute_stack_frame,
9647         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
9648         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
9649         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
9650         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
9651         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
9652         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
9653         * config/nds32/nds32.md (prologue, epilogue): Use macro
9654         NDS32_V3PUSH_AVAILABLE_P to do checking.
9656 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
9658         PR debug/58150
9659         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
9660         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
9661         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
9662         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
9663         addition of most attributes on !orig_type_die or the attribute not
9664         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
9666 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9667             Chung-Ju Wu  <jasonwucj@gmail.com>
9669         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
9670         __NDS32_VH__ macro.
9671         * config/nds32/nds32.opt (mvh): New option.
9673 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9674             Chung-Ju Wu  <jasonwucj@gmail.com>
9676         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
9677         function.
9678         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
9679         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
9680         definition.
9682 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9683             Chung-Ju Wu  <jasonwucj@gmail.com>
9685         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
9686         function.
9687         * config/nds32/nds32-multiple.md (strlensi): New pattern.
9688         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
9690 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
9691             Kito Cheng  <kito.cheng@gmail.com>
9692             Chung-Ju Wu  <jasonwucj@gmail.com>
9694         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
9695         UNSPEC_FFMISM and UNSPEC_FLMISM.
9696         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
9697         for ffb, ffmism and flmism.
9698         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
9699         (unspec_ffmism): Ditto.
9700         (unspec_flmism): Ditto.
9701         (nds32_expand_builtin_impl): Check if string extension is available.
9702         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
9703         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
9705 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
9707         Reverting patch:
9708         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
9710         PR target/83712
9711         * lra-assigns.c (assign_by_spills): Return a flag of reload
9712         assignment failure.  Do not process the reload assignment
9713         failures.  Do not spill other reload pseudos if they has the same
9714         reg class.
9715         (lra_assign): Add a return arg.  Set up from the result of
9716         assign_by_spills call.
9717         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9718         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
9719         usage_insns if it is not NULL.
9720         (spill_hard_reg_in_range): New function.
9721         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9722         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9723         function prototypes.
9724         (lra_assign): Change prototype.
9725         * lra.c (lra): Add code to deal with fails by splitting hard reg
9726         live ranges.
9728 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
9730         PR target/84807
9731         * config/i386/i386.opt: Replace Enforcment with Enforcement.
9733 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
9735         PR debug/84620
9736         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
9737         (dw_val_node): Add val_symbolic_view.
9738         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
9739         (symview_upper_bound): New.
9740         (new_line_info_table): Initialize symviews_since_reset.
9741         (dwarf2out_source_line): Count symviews_since_reset and set
9742         symview_upper_bound.
9743         (dw_val_equal_p): Handle symview.
9744         (add_AT_symview): New.
9745         (print_dw_val): Handle symview.
9746         (attr_checksum, attr_checksum_ordered): Likewise.
9747         (same_dw_val_p, size_of_die): Likewise.
9748         (value_format, output_die): Likewise.
9749         (add_high_low_attributes): Use add_AT_symview for entry_view.
9750         (dwarf2out_finish): Reset symview_upper_bound, clear
9751         zero_view_p.
9753 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
9755         PR target/83969
9756         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
9757         Add strict argument and use it.
9758         (rs6000_split_multireg_move): Update for new strict argument.
9759         (mem_operand_gpr): Disallow all non-offsettable addresses.
9760         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
9762 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
9764         PR target/84772
9765         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
9766         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
9767         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
9769         PR c++/84767
9770         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
9771         decl, use remap_type if we want to use the type.
9773 2018-03-09  Martin Sebor  <msebor@redhat.com>
9775         PR tree-optimization/84526
9776         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
9777         Remove dead code.
9778         (builtin_access::generic_overlap): Be prepared to handle non-array
9779         base objects.
9781 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
9783         PR rtl-optimization/84682
9784         * lra-constraints.c (process_address_1): Check is_address flag
9785         for address constraints.
9786         (process_alt_operands): Likewise.
9787         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
9788         preprocess_constraints.
9789         * recog.h (preprocess_constraints): Add oploc parameter.
9790         Adjust callers.
9791         * recog.c (preprocess_constraints): Test address_operand for
9792         CT_ADDRESS constraints.
9794 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
9796         PR target/83712
9797         * lra-assigns.c (assign_by_spills): Return a flag of reload
9798         assignment failure.  Do not process the reload assignment
9799         failures.  Do not spill other reload pseudos if they has the same
9800         reg class.
9801         (lra_assign): Add a return arg.  Set up from the result of
9802         assign_by_spills call.
9803         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9804         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
9805         usage_insns if it is not NULL.
9806         (spill_hard_reg_in_range): New function.
9807         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9808         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9809         function prototypes.
9810         (lra_assign): Change prototype.
9811         * lra.c (lra): Add code to deal with fails by splitting hard reg
9812         live ranges.
9814 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9816         PR target/83193
9817         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
9818         Accept complain bool parameter.  Only emit errors if it is true.
9819         (arm_parse_cpu_option_name): Likewise.
9820         (arm_target_thumb_only): Adjust callers of the above.
9821         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
9822         prototype to take a default true bool parameter.
9823         (arm_parse_arch_option_name): Likewise.
9825 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
9826             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
9828         PR jit/64089
9829         PR jit/84288
9830         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
9831         * configure: Regenerate.
9832         * configure.ac ("linker --version-script option"): New.
9833         ("linker soname option"): New.
9835 2018-03-09  Richard Biener  <rguenther@suse.de>
9837         PR tree-optimization/84775
9838         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
9839         immediate uses of predicate stmts and mark them modified.
9841         Revert
9842         PR tree-optimization/84178
9843         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
9844         to caller.
9845         (version_loop_for_if_conversion): Delay update_ssa call.
9846         (tree_if_conversion): Delay update_ssa until after predicate
9847         insertion.
9849 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
9851         PR target/84763
9852         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
9853         when the function accesses prior frames.
9855 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
9857         PR debug/84456
9858         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
9859         gen_llsym, otherwise call maybe_gen_llsym.
9861         PR inline-asm/84742
9862         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
9863         has ',' character inside of it.
9865 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9867         PR target/84748
9868         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
9869         as clobbering CC_REGNUM.
9871 2018-03-08  Richard Biener  <rguenther@suse.de>
9873         PR middle-end/84552
9874         * tree-scalar-evolution.c: Include tree-into-ssa.h.
9875         (follow_copies_to_constant): Do not follow SSA names registered
9876         for update.
9878 2018-03-08  Richard Biener  <rguenther@suse.de>
9880         PR tree-optimization/84178
9881         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
9882         to caller.
9883         (version_loop_for_if_conversion): Delay update_ssa call.
9884         (tree_if_conversion): Delay update_ssa until after predicate
9885         insertion.
9887 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
9889         PR tree-optimization/84178
9890         * tree-if-conv.c (release_bb_predicate): Remove the
9891         the assertion that the stmts have NULL use_ops.
9892         Discard the statements, asserting that they haven't
9893         yet been added to a BB.
9895 2018-03-08  Richard Biener  <rguenther@suse.de>
9897         PR tree-optimization/84746
9898         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
9899         (phi_translate): Pass in destination ANTIC_OUT set.
9900         (phi_translate_1): Likewise.  For a simplified result lookup
9901         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
9902         (phi_translate_set): Adjust.
9903         (do_pre_regular_insertion): Likewise.
9904         (do_pre_partial_partial_insertion): Likewise.
9906 2018-03-08  Martin Liska  <mliska@suse.cz>
9908         PR gcov-profile/84735
9909         * doc/gcov.texi: Document usage of profile files.
9910         * gcov-io.h: Document changes in the format.
9912 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
9914         PR debug/84404
9915         PR debug/84408
9916         * dwarf2out.c (struct dw_line_info_table): Update comments for
9917         view == -1.
9918         (FORCE_RESET_NEXT_VIEW): New.
9919         (FORCE_RESETTING_VIEW_P): New.
9920         (RESETTING_VIEW_P): Check for -1 too.
9921         (ZERO_VIEW_P): Likewise.
9922         (new_line_info_table): Force-reset next view.
9923         (dwarf2out_begin_function): Likewise.
9924         (dwarf2out_source_line): Simplify zero_view_p initialization.
9925         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
9926         view directly.  Omit view when omitting .loc at line 0.
9928 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
9930         PR tree-optimization/84740
9931         * tree-switch-conversion.c (process_switch): Call build_constructors
9932         only if info.phi_count is non-zero.
9934         PR tree-optimization/84739
9935         * tree-tailcall.c (find_tail_calls): Check call arguments against
9936         DECL_ARGUMENTS (current_function_decl) rather than
9937         DECL_ARGUMENTS (func) when checking for tail recursion.
9939 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
9941         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
9942         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
9943         Volker Reichelt's entry and add entries for people that perform
9944         GCC fuzzy testing and report numerous bugs.
9946 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
9948         PR target/82411
9949         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
9950         readonly data in sdata, if that is disabled.
9951         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
9952         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
9953         -mreadonly-in-sdata option.
9955 2018-03-07  Martin Sebor  <msebor@redhat.com>
9957         PR tree-optimization/84468
9958         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
9959         basic block when looking for nul assignment.
9961 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
9963         PR target/84277
9964         * except.h (output_function_exception_table): Adjust prototype.
9965         * except.c (output_function_exception_table): Remove FNNAME parameter
9966         and add SECTION parameter.  Ouput one part of the table at a time.
9967         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
9968         the first part of the exception table and emit unwind directives.
9969         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
9970         (i386_pe_seh_cold_init): Likewise.
9971         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
9972         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
9973         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
9974         (ix86_output_call_insn): Emit a nop in one more case for SEH.
9975         * config/i386/winnt.c: Include except.h.
9976         (struct seh_frame_state): Add reg_offset, after_prologue and
9977         in_cold_section fields.
9978         (i386_pe_seh_end_prologue): Set seh->after_prologue.
9979         (i386_pe_seh_cold_init): New function.
9980         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
9981         to seh->in_cold_section.
9982         (seh_emit_push): Record the offset of the push.
9983         (seh_emit_save): Record the offet of the save.
9984         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
9985         Test seh->after_prologue to disregard the epilogue.
9986         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
9987         (i386_pe_end_cold_function): New function.
9989 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
9991         PR fortran/84565
9992         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
9993         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
9995         PR c++/84704
9996         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
9997         on tmp_var.
9998         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
9999         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
10001         PR middle-end/84723
10002         * multiple_target.c: Include tree-inline.h and intl.h.
10003         (expand_target_clones): Diagnose and fail if node->definition and
10004         !tree_versionable_function_p (node->decl).
10006 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
10008         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
10009         sprint_ul.
10010         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
10011         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
10012         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
10014 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
10016         PR target/84710
10017         * combine.c (try_combine): Use reg_or_subregno instead of handling
10018         just paradoxical SUBREGs and REGs.
10020 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
10022         * config/arc/arc.c (arc_finalize_pic): Remove function.
10023         (arc_must_save_register): We use single base PIC register, remove
10024         checks to save/restore the PIC register.
10025         (arc_expand_prologue): Likewise.
10026         * config/arc/arc-protos.h (arc_set_default_type_attributes):
10027         Remove.
10028         (arc_verify_short): Likewise.
10029         (arc_attr_type): Likewise.
10030         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
10031         (walk_stores): Likewise.
10032         (arc_address_cost): Make it static.
10033         (arc_verify_short): Likewise.
10034         (branch_dest): Likewise.
10035         (arc_attr_type): Likewise.
10036         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
10037         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
10038         (arc_final_prescan_insn): Remove inserting the nops due to
10039         hardware hazards.  It is done in reorg step.
10040         (insn_length_variant_t): Remove.
10041         (insn_length_parameters_t): Likewise.
10042         (arc_insn_length_parameters): Likewise.
10043         (arc_get_insn_variants): Likewise.
10044         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
10046 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
10048         PR inline-asm/84683
10049         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
10050         assertion failure.
10052         PR tree-optimization/84687
10053         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
10054         on new_node->decl.
10055         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
10057 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10059         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
10060         Rename to ppc_speculation_barrier.
10061         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
10062         __builtin_ppc_speculation_barrier.
10064 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
10066         PR target/84700
10067         * combine.c (combine_simplify_rtx): Don't try to simplify if
10068         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
10069         are equal to x.
10071 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
10073         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
10074         to 32 bytes when compiling for POWER9.
10076 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
10078         PR target/84564
10079         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
10080         regparm >= 3 with no arg reg available also for calls with
10081         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
10083         PR target/84524
10084         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
10085         orig,vex.
10086         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
10088 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
10090         PR target/84264
10091         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
10093 2018-03-05  Richard Biener  <rguenther@suse.de>
10095         PR tree-optimization/84486
10096         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
10097         When inserting a __builtin_assume_aligned call set the LHS
10098         SSA name alignment info accordingly.
10100 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
10102         PR tree-optimization/84114
10103         * config/aarch64/aarch64.c (aarch64_reassociation_width)
10104         Avoid reassociation of FLOAT_MODE addition.
10106 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
10108         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
10109         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
10110         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
10111         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
10112         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
10113         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
10114         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
10115         and -mwbnoinvd.
10116         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
10117         __builtin_ia32_wbinvd): New builtins.
10118         (SPECIAL_ARGS2): New.
10119         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
10120         (SPECIAL_ARGS2): New.
10121         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
10122         (ix86_valid_target_attribute_inner_p): Ditto.
10123         (ix86_init_mmx_sse_builtins): Add special_args2.
10124         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
10125         TARGET_WBNOINVD_P): New.
10126         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
10127         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
10128         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
10129         * config/i386/immintrin.h (_wbinvd): New intrinsic.
10130         * config/i386/pconfigintrin.h: New file.
10131         * config/i386/wbnoinvdintrin.h: Ditto.
10132         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
10133         wbnoinvdintrin.h.
10134         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
10136 2018-03-05  Richard Biener  <rguenther@suse.de>
10138         PR tree-optimization/84670
10139         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
10140         member.
10141         (BB_VISITED_WITH_VISITED_SUCCS): New define.
10142         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
10143         (compute_antic_aux): Only assert the number of values in ANTIC_IN
10144         doesn't grow if all successors (recursively) were visited at least
10145         once.
10147 2018-03-05  Richard Biener  <rguenther@suse.de>
10149         PR tree-optimization/84650
10150         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
10151         if executed in the loop pipeline.
10153 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
10155         * doc/configfiles.texi (Configuration Files): Move info about
10156         conditionalizing $target-protos.h to...
10157         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
10158         differs from $target-protos.h.
10160 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
10161             Chung-Ju Wu  <jasonwucj@gmail.com>
10163         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
10164         * config/nds32/nds32-multiple.md (setmemsi): Define.
10165         * config/nds32/nds32-memory-manipulation.c
10166         (nds32_gen_dup_4_byte_to_word_value): New.
10167         (emit_setmem_word_loop): New.
10168         (emit_setmem_byte_loop): New.
10169         (nds32_expand_setmem_loop): New.
10170         (nds32_expand_setmem_loop_v3m): New.
10171         (nds32_expand_setmem_unroll): New.
10172         (nds32_expand_setmem): New.
10174 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
10175             Chung-Ju Wu  <jasonwucj@gmail.com>
10177         * config/nds32/nds32-memory-manipulation.c
10178         (nds32_emit_load_store): New.
10179         (nds32_emit_post_inc_load_store): New.
10180         (nds32_emit_mem_move): New.
10181         (nds32_emit_mem_move_block): New.
10182         (nds32_expand_movmemsi_loop_unknown_size): New.
10183         (nds32_expand_movmemsi_loop_known_size): New.
10184         (nds32_expand_movmemsi_loop): New.
10185         (nds32_expand_movmemsi_unroll): New.
10186         (nds32_expand_movmemqi): Rename ...
10187         (nds32_expand_movmemsi): ... to this.
10188         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
10189         (movmemsi): ... to this.
10190         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
10191         (nds32_expand_movmemsi): ... to this.
10193 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
10194             Monk Chiang  <sh.chiang04@gmail.com>
10195             Chung-Ju Wu  <jasonwucj@gmail.com>
10197         * config/nds32/nds32-protos.h
10198         (nds32_expand_load_multiple): New arguments.
10199         (nds32_expand_store_multiple): Ditto.
10200         (nds32_valid_multiple_load_store): Rename ...
10201         (nds32_valid_multiple_load_store_p): ... to this.
10202         * config/nds32/nds32-memory-manipulation.c
10203         (nds32_expand_load_multiple): Refine implementation.
10204         (nds32_expand_store_multiple): Ditto.
10205         * config/nds32/nds32-multiple.md
10206         (load_multiple): Update nds32_expand_load_multiple interface.
10207         (store_multiple): Update nds32_expand_store_multiple interface.
10208         * config/nds32/nds32-predicates.c
10209         (nds32_valid_multiple_load_store): Rename ...
10210         (nds32_valid_multiple_load_store_p): ... to this and refine
10211         implementation.
10212         * config/nds32/predicates.md
10213         (nds32_load_multiple_and_update_address_operation): New predicate.
10214         (nds32_store_multiple_and_update_address_operation): New predicate.
10216 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
10217             Chung-Ju Wu  <jasonwucj@gmail.com>
10219         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
10220         (combo): New attribute.
10221         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
10223 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
10225         * config/nds32/nds32.opt: Change -mcmodel= default value.
10227 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
10228             Monk Chiang  <sh.chiang04@gmail.com>
10229             Chung-Ju Wu  <jasonwucj@gmail.com>
10231         * config/nds32/constants.md (unspec_element): New enum.
10232         * config/nds32/constraints.md (Umw): New constraint.
10233         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
10234         * config/nds32/nds32-intrinsic.md: Likewise.
10235         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
10236         (nds32_valid_smw_lwm_base_p): New.
10237         (nds32_output_smw_single_word): New.
10238         (nds32_output_lmw_single_word): New.
10239         (nds32_expand_unaligned_load): New.
10240         (nds32_expand_unaligned_store): New.
10241         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
10242         (nds32_output_smw_single_word): Declare.
10243         (nds32_output_lmw_single_word): Declare.
10244         (nds32_expand_unaligned_load): Declare.
10245         (nds32_expand_unaligned_store): Declare.
10246         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
10247         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
10248         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
10249         NDS32_BUILTIN_UASTORE_DW.
10250         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
10251         predicate.
10253 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
10254             Kito Cheng  <kito.cheng@gmail.com>
10255             Chung-Ju Wu  <jasonwucj@gmail.com>
10257         * config/nds32/nds32-intrinsic.c
10258         (nds32_expand_builtin_null_ftype_reg): Delete.
10259         (nds32_expand_builtin_reg_ftype_imm): Ditto.
10260         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
10261         (nds32_read_argument): New.
10262         (nds32_legitimize_target): Ditto.
10263         (nds32_legitimize_argument): Ditto.
10264         (nds32_check_constant_argument): Ditto.
10265         (nds32_expand_unop_builtin): Ditto.
10266         (nds32_expand_unopimm_builtin): Ditto.
10267         (nds32_expand_binop_builtin): Ditto.
10268         (nds32_builtin_decl_impl): Ditto.
10269         (builtin_description): Ditto.
10270         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
10271         (nds32_init_builtins_impl): Ditto.
10272         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
10273         (nds32_builtin_decl): New.
10274         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
10275         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
10277 2018-03-02  Jeff Law  <law@redhat.com>
10279         * reorg.c (stop_search_p): Handle DEBUG_INSN.
10280         (redundant_insn, fill_simple_delay_slots): Likewise.
10281         (fill_slots_from_thread): Likewise.
10282         * resource.c (mark_referenced_resources): Likewise.
10283         (mark_set_resources, find_dead_or_set_registers): Likewise.
10285 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
10287         * substring-locations.h (format_warning_va): Formatting fix for
10288         ATTRIBUTE_GCC_DIAG.
10289         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
10290         argument.
10291         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
10292         * substring-locations.c: Include intl.h.
10293         (format_warning_va): Turned into small wrapper around
10294         format_warning_n_va, renamed to ...
10295         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
10296         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
10297         use ngettext.
10298         (format_warning_at_substring_n): New function.
10299         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
10300         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
10301         format_warning_at_substring with just a shorter name instead of
10302         const function pointer.
10303         (fmtwarn_n): New function.
10304         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
10305         appropriate, get rid of all the fmtstr temporaries, move conditionals
10306         with G_() wrapped string literals directly into fmtwarn arguments,
10307         cast dir.len to (int), formatting fixes.
10309 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
10311         * doc/invoke.texi: Remove "Cilk Plus" references.
10313 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
10314             Richard Biener  <rguenther@suse.de>
10316         PR ipa/84628
10317         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
10318         for error or warning attributes if CALL_FROM_THUNK_P is set.
10319         Formatting fixes.
10321 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
10323         PR target/56540
10324         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
10325         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
10327         PR target/56540
10328         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
10329         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
10331         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
10332         instead of -1U in last predictors element's probability member.
10334 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
10336         PR ipa/83983
10337         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
10338         arguments if they are comparable.
10340 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
10342         PR tree-optimization/84634
10343         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
10344         masks and masked_loop_p with a single loop_masks, making sure it's
10345         null for bb vectorization.
10347 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
10349         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10350         (vect_analyze_data_ref_access): Use loop->safe_len rather than
10351         loop->force_vectorize to check whether there is no alias.
10353 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
10355         PR target/84614
10356         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
10357         prototypes.
10358         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
10359         comments.
10360         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
10361         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
10362         instead of a loop around prev_real_insn.
10363         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
10364         prev_real_insn.
10366         PR inline-asm/84625
10367         * config/i386/i386.c (ix86_print_operand): Use conditional
10368         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
10369         zero vector.
10371 2018-03-02  Richard Biener  <rguenther@suse.de>
10373         PR tree-optimization/84427
10374         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
10375         (bitmap_set_subtract_values): Rewrite to handle multiple
10376         exprs per value.
10377         (clean): Likewise.
10378         (prune_clobbered_mems): Likewise.
10379         (phi_translate): Take edge instead of pred/phiblock.
10380         (phi_translate_1): Likewise.
10381         (phi_translate_set): Likewise.  Insert all translated
10382         exprs for a value into the set, keeping possibly multiple
10383         expressions per value.
10384         (compute_antic_aux): Adjust for phi_translate changes.
10385         When intersecting union the expressions and prune those
10386         not in the final value set, keeping possibly multiple
10387         expressions per value.  Do not use value-insertion
10388         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
10389         all expressions.  Add verification that the value-sets
10390         only shrink during iteration.
10391         (compute_partial_antic_aux): Adjust for the phi_translate changes.
10392         (do_pre_regular_insertion): Likewise.
10393         (do_pre_partial_partial_insertion): Likewise.
10395 2018-03-02  Richard Biener  <rguenther@suse.de>
10397         PR target/82005
10398         * config/darwin.c (saved_debug_info_level): New static global.
10399         (darwin_asm_lto_start): Disable debug info generation for LTO out.
10400         (darwin_asm_lto_end): Restore debug info generation settings.
10402 2018-03-01  Martin Liska  <mliska@suse.cz>
10404         PR sanitizer/82484
10405         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
10406         volatile arguments.
10408 2018-03-01  Richard Biener  <rguenther@suse.de>
10410         PR debug/84645
10411         * dwarf2out.c (gen_variable_die): Properly handle late VLA
10412         type annotation with LTO when debug was disabled at compile-time.
10414 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
10416         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
10417         XINT with INTVAL.
10418         (mips_final_postscan_insn): Likewise.
10420 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
10422         PR rtl-optimization/84528
10423         * alias.c (init_alias_target): Add commentary.
10424         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
10425         a unique base value if the frame pointer is not eliminated
10426         to the stack pointer.
10428 2018-03-01  Tom de Vries  <tom@codesourcery.com>
10430         PR rtl-optimization/83327
10431         * lra-int.h (hard_regs_spilled_into): Declare.
10432         * lra.c (hard_regs_spilled_into): Define.
10433         (init_reg_info): Init hard_regs_spilled_into.
10434         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
10435         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
10436         (process_bb_lives): Handle hard_regs_spilled_into.
10437         (lra_create_live_ranges_1): Before doing liveness propagation, clear
10438         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
10440 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
10442         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
10443         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
10444         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
10445         * config/rs6000/aix72.h: New file.
10447 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
10449         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
10450         instead of warning_at with conditional singular and plural messages
10451         where possible.
10453         PR target/52991
10454         * stor-layout.c (update_alignment_for_field): For
10455         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
10456         && !DECL_PACKED (field), do the alignment update, just use
10457         only desired_align instead of MAX (type_align, desired_align)
10458         as the alignment.
10459         (place_field): Don't do known_align < desired_align handling
10460         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
10461         is non-NULL, instead do it after rli->prev_field handling and
10462         only if not within a bitfield word.  For DECL_PACKED (field)
10463         use type_align of BITS_PER_UNIT.
10465 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
10467         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
10468         superfluous parentheses and trailing spaces.
10470 2018-02-28  Richard Biener  <rguenther@suse.de>
10472         PR tree-optimization/84584
10473         * graphite-scop-detection.c (scop_detection::add_scop): Discard
10474         SCoPs with fake exit edge.
10476 2018-02-28  Martin Liska  <mliska@suse.cz>
10478         PR testsuite/84597
10479         * timevar.c (timer::print): Fix format to properly print 100%
10480         values.
10482 2018-02-28  Richard Biener  <rguenther@suse.de>
10484         PR middle-end/84607
10485         * genmatch.c (capture_info::walk_match): Do not mark
10486         captured expressions without operands as expr_p given
10487         they act more like predicates and should be subject to
10488         "lost tail" side-effect preserving.
10490 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
10492         PR rtl-optimization/81611
10493         * auto-inc-dec.c (attempt_change): Move dead note from
10494         mem_insn if it's the next use of regno
10495         (find_address): Take address use of reg holding
10496         non-incremented value.  Add parm to limit search to the named
10497         reg only.
10498         (merge_in_block): Attempt to use a mem insn that is the next
10499         use of the original regno.
10501 2018-02-27  Martin Sebor  <msebor@redhat.com>
10503         PR c++/83871
10504         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
10505         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
10507 2018-02-27  Martin Sebor  <msebor@redhat.com>
10509         PR translation/84207
10510         * diagnostic-core.h (warning_n, error_n, inform_n): Change
10511         n argument to unsigned HOST_WIDE_INT.
10512         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
10513         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
10514         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
10515         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
10517 2018-02-27  Richard Biener  <rguenther@suse.de>
10519         PR tree-optimization/84512
10520         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
10521         Do not use the estimate returned from record_stmt_cost for
10522         the scalar iteration cost but sum properly using add_stmt_cost.
10524 2018-02-27  Richard Biener  <rguenther@suse.de>
10526         PR tree-optimization/84466
10527         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
10528         Adjust last change to less strictly validate use operands.
10530 2018-02-27  Martin Liska  <mliska@suse.cz>
10532         PR gcov-profile/84548
10533         * gcov.c (process_file): Allow partial overlap and consider it
10534         also as group functions.
10535         (output_lines): Properly calculate range of lines for a group.
10537 2018-02-27  Martin Liska  <mliska@suse.cz>
10539         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
10540         'ggc' suffixes.  Change first column width.
10541         (timer::print): Fix formatting of the column.
10543 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
10545         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
10546         preserve inline entry blocks for the sake of debug inline
10547         entry point markers alone.
10548         (remove_unused_locals): Suggest in comments a better place to
10549         force the preservation of inline entry blocks that are
10550         otherwise unused, but do not preserve them.
10552 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10554         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
10556 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10558         PR target/84039
10559         * config/i386/constraints.md (Bs): Replace
10560         ix86_indirect_branch_register with
10561         TARGET_INDIRECT_BRANCH_REGISTER.
10562         (Bw): Likewise.
10563         * config/i386/i386.md (indirect_jump): Likewise.
10564         (tablejump): Likewise.
10565         (*sibcall_memory): Likewise.
10566         (*sibcall_value_memory): Likewise.
10567         Peepholes of indirect call and jump via memory: Likewise.
10568         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
10569         (*sibcall_value_GOT_32): Likewise.
10570         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10571         (GOT_memory_operand): Likewise.
10572         (call_insn_operand): Likewise.
10573         (sibcall_insn_operand): Likewise.
10574         (GOT32_symbol_operand): Likewise.
10575         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
10577 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
10579         PR rtl-optimization/83496
10580         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
10581         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
10582         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
10583         redundant insn, if any.
10584         (relax_delay_slots): Likewise.
10585         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
10587 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
10589         PR tree-optimization/83965
10590         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
10591         that grouped statements are part of a reduction chain.  Return
10592         true if the statement is not marked as a reduction itself but
10593         is part of a group.
10594         (vect_recog_dot_prod_pattern): Don't check whether the statement
10595         is part of a group here.
10596         (vect_recog_sad_pattern): Likewise.
10597         (vect_recog_widen_sum_pattern): Likewise.
10599 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
10601         PR debug/84545
10602         * final.c (rest_of_clean_state): Also look for calls inside sequences.
10604 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10606         PR target/84530
10607         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
10608         the bool argument.
10609         (ix86_output_indirect_function_return): New prototype.
10610         (ix86_split_simple_return_pop_internal): Likewise.
10611         * config/i386/i386.c (indirect_return_via_cx): New.
10612         (indirect_return_via_cx_bnd): Likewise.
10613         (indirect_thunk_name): Handle return va CX_REG.
10614         (output_indirect_thunk_function): Create alias for
10615         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
10616         (ix86_output_indirect_jmp): Remove the bool argument.
10617         (ix86_output_indirect_function_return): New function.
10618         (ix86_split_simple_return_pop_internal): Likewise.
10619         * config/i386/i386.md (*indirect_jump): Don't pass false
10620         to ix86_output_indirect_jmp.
10621         (*tablejump_1): Likewise.
10622         (simple_return_pop_internal): Change it to define_insn_and_split.
10623         Call ix86_split_simple_return_pop_internal to split it for
10624         -mfunction-return=.
10625         (simple_return_indirect_internal): Call
10626         ix86_output_indirect_function_return instead of
10627         ix86_output_indirect_jmp.
10629 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
10631         PR bootstrap/84405
10632         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
10633         memset and value initialization afterwards.
10635 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
10637         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
10639 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
10641         PR target/84521
10642         * common/config/aarch64/aarch64-common.c
10643         (aarch_option_optimization_table[]): Switch
10644         off fomit-frame-pointer
10646 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
10647             Chung-Ju Wu  <jasonwucj@gmail.com>
10649         * config/nds32/nds32-multiple.md (load_multiple): Disallow
10650         volatile memory.
10651         (store_multiple): Ditto.
10653 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
10655         * config.gcc: Add --with-cpu support for nds32 target.
10656         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
10657         * config/nds32/nds32.opt: Add -mcpu= option.
10659 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
10661         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
10662         isel=yes): Warn for these deprecated options.
10664 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
10666         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
10667         ISA_2_5_MASKS_EMBEDDED.
10669 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
10671         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
10672         p->max as pointers rather than using iterative_hash_expr.
10674 2018-02-23  Carl Love  <cel@us.ibm.com>
10676         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
10677         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
10678         BU_P8V_OVERLOAD_2.
10679         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
10680         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
10681         P8V_BUILTIN_VEC_VUNSIGNED2.
10683 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
10685         PR target/81572
10686         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
10687         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
10688         LRA_UNKNOWN_ALT.
10689         * lra-constraints.c (curr_insn_transform): Set up
10690         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
10691         LRA_UNKNOWN_ALT.
10692         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
10693         * lra-eliminations.c (spill_pseudos): Ditto.
10694         (process_insn_for_elimination): Ditto.
10695         * lra-lives.c (reg_early_clobber_p): Use the new macros.
10696         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
10697         LRA_NON_CLOBBERED_ALT.
10699 2018-02-22  Martin Sebor  <msebor@redhat.com>
10701         PR tree-optimization/84480
10702         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
10703         to maybe_diag_stxncpy_trunc.  Call it.
10704         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
10705         from gimple_fold_builtin_strcpy.  Print inlining stack.
10706         (handle_builtin_stxncpy): Print inlining stack.
10707         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
10709 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
10711         PR target/84176
10712         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
10713         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
10714         and -fcheck-pointer-bounds are used together.
10715         (indirect_thunk_prefix): New enum.
10716         (indirect_thunk_need_prefix): New function.
10717         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
10718         "_nt" instead of "_bnd" for NOTRACK prefix.
10719         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
10720         (output_indirect_thunk_function): Likewise.
10721         (): Likewise.
10722         (ix86_code_end): Update output_indirect_thunk_function calls.
10723         (ix86_output_indirect_branch_via_reg): Replace
10724         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
10725         (ix86_output_indirect_branch_via_push): Likewise.
10726         (ix86_output_function_return): Likewise.
10727         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
10728         incompatible with -fcf-protection=branch and
10729         -fcheck-pointer-bounds.
10731 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
10733         PR target/83335
10734         * config/aarch64/aarch64.c (aarch64_print_address_internal):
10735         Change gcc_assert call to output_operand_lossage.
10737 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
10739         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
10741 2018-02-22  DJ Delorie  <dj@redhat.com>
10742             Sebastian Perta  <sebastian.perta@renesas.com>
10743             Oleg Endo  <olegendo@gcc.gnu.org>
10745         * config/rx/rx.c (rx_rtx_costs): New function.
10746         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
10748 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10750         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
10752 2018-02-22  Martin Liska  <mliska@suse.cz>
10754         PR driver/83193
10755         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
10756         Add "native" as a possible value.
10758 2018-02-22  Martin Liska  <mliska@suse.cz>
10760         PR driver/83193
10761         * config/i386/i386.c (ix86_option_override_internal):
10762         Add "native" as a possible value for -march and -mtune.
10764 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
10766         PR target/84502
10767         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
10768         to all type variants.
10770         PR tree-optimization/84503
10771         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
10772         width as info->bitpos + info->bitsize - start.
10773         (merged_store_group::merge_overlapping): Simplify width computation.
10774         (check_no_overlap): New function.
10775         (imm_store_chain_info::try_coalesce_bswap): Compute expected
10776         start + width and last_order of the group, fail if check_no_overlap
10777         fails.
10778         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
10779         to group if check_no_overlap fails.
10781 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
10783         * config/rs6000/altivec.md: Delete contraint arguments to
10784         define_expand, define_split, and define_peephole2, and in
10785         define_insn_and_split if always unused.
10786         * config/rs6000/darwin.md: Ditto.
10787         * config/rs6000/dfp.md: Ditto.
10788         * config/rs6000/rs6000.md: Ditto.
10789         * config/rs6000/sync.md: Ditto.
10790         * config/rs6000/vector.md: Ditto.
10791         * config/rs6000/vsx.md: Ditto.
10793 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
10795         * config/rs6000/altivec.md: Write output control strings as braced
10796         blocks instead of double-quoted strings.
10797         * config/rs6000/darwin.md: Ditto.
10798         * config/rs6000/rs6000.md: Ditto.
10799         * config/rs6000/vector.md: Ditto.
10800         * config/rs6000/vsx.md: Ditto.
10802 2018-02-21  Jason Merrill  <jason@redhat.com>
10804         PR c++/84314 - ICE with templates and fastcall attribute.
10805         * attribs.c (build_type_attribute_qual_variant): Remove assert.
10807 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
10809         * ipa-cp.c (determine_versionability): Fix comment typos.
10811 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
10813         PR c/84229
10814         * ipa-cp.c (determine_versionability): Do not version functions caling
10815         va_arg_pack.
10817 2018-02-21  Martin Liska  <mliska@suse.cz>
10819         PR driver/83193
10820         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
10821         Add "native" as a possible value.
10822         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
10823         the macro when native cpu detection is available.
10825 2018-02-21  Martin Liska  <mliska@suse.cz>
10827         PR driver/83193
10828         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
10829         Add "native" as a possible value.
10830         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
10831         when native cpu detection is available.
10833 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
10834             Martin Sebor  <msebor@redhat.com>
10836         PR tree-optimization/84478
10837         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
10838         false.
10839         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
10840         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
10841         support which is conservatively correct, for 2 only stay conservative
10842         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
10843         argument to the 2 argument get_range_strlen, adjust 6 arg
10844         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
10845         false.
10846         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
10847         (gimple_fold_builtin_strlen): Pass true as last argument to
10848         get_range_strlen.
10850 2018-02-20  Martin Sebor  <msebor@redhat.com>
10852         PR middle-end/84095
10853         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
10854         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
10855         (builtin_memref::builtin_memref): Factor out parts into
10856         set_base_and_offset and call it.
10858 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
10860         PR middle-end/84406
10861         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
10862         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
10863         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
10864         search at the associated MODE_INT.
10866 2018-02-20  Jeff Law  <law@redhat.com>
10868         PR middle-end/82123
10869         PR tree-optimization/81592
10870         PR middle-end/79257
10871         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
10872         for range data rather than using global data.
10873         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
10874         range data rather than using global data.
10875         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
10876         pass it to children as needed.
10877         (struct directive::fmtresult): Similarly.
10878         (struct directive::set_width): Similarly.
10879         (struct directive::set_precision): Similarly.
10880         (format_integer, format_directive, parse_directive): Similarly.
10881         (format_none): Accept unnamed vr_values parameter.
10882         (format_percent, format_floating, format_character): Similarly.
10883         (format_string, format_plain): Similarly.
10884         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
10885         the EVRP range analyzer for range data rather than using global data.
10886         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
10887         gimple-ssa-evrp-analyze.h
10888         (class sprintf_dom_walker): Add after_dom_children member function.
10889         Add evrp_range_analyzer member.
10890         (sprintf_dom_walker::before_dom_children): Call into the EVRP
10891         range analyzer as needed.
10892         (sprintf_dom_walker::after_dom_children): New member function.
10893         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
10894         if not optimizing.
10895         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
10896         (evrp_range_analyzer::pop_to_marker): Likewise.
10898 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
10900         PR tree-optimization/84419
10901         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
10902         with the required type if its current type is compatible but
10903         different.
10905 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
10907         PR middle-end/82004
10908         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
10909         after vectorization.
10911 2018-02-20  Martin Liska  <mliska@suse.cz>
10913         PR driver/83193
10914         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
10915         possible values if we don't have a hint.
10917 2018-02-20  Martin Liska  <mliska@suse.cz>
10919         PR c/84310
10920         PR target/79747
10921         * final.c (shorten_branches): Build align_tab array with one
10922         more element.
10923         * opts.c (finish_options): Add alignment option limit check.
10924         (MAX_CODE_ALIGN): Likewise.
10925         (MAX_CODE_ALIGN_VALUE): Likewise.
10926         * doc/invoke.texi: Document maximum allowed option value for
10927         all -falign-* options.
10929 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
10931         PR target/84146
10932         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
10933         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
10934         * var-tracking.c (emit_note_insn_var_location): Remove all references
10935         to NOTE_INSN_CALL_ARG_LOCATION.
10936         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
10937         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
10938         Use copy_rtx_if_shared.
10939         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
10940         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
10941         (dwarf2out_var_location): Remove handling of
10942         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
10943         on call_insn.
10944         * final.c (final_scan_insn): Remove all references to
10945         NOTE_INSN_CALL_ARG_LOCATION.
10946         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
10947         before dumping final insns.
10948         * except.c (emit_note_eh_region_end): Remove all references to
10949         NOTE_INSN_CALL_ARG_LOCATION.
10950         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
10951         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
10952         * config/arc/arc.c (hwloop_optimize): Likewise.
10953         * config/arm/arm.c (create_fix_barrier): Likewise.
10954         * config/s390/s390.c (s390_chunkify_start): Likewise.
10955         * config/sh/sh.c (find_barrier): Likewise.
10956         * config/i386/i386.c (rest_of_insert_endbranch,
10957         ix86_seh_fixup_eh_fallthru): Likewise.
10958         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
10959         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
10960         * config/frv/frv.c (frv_function_prologue): Likewise.
10961         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
10962         reg note.
10963         (note_outside_basic_block_p): Remove all references to
10964         NOTE_INSN_CALL_ARG_LOCATION.
10965         * gengtype.c (adjust_field_rtx_def): Likewise.
10966         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
10967         Likewise.
10968         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
10969         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
10971         PR c++/84444
10972         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
10973         is ADDR_EXPR.
10975         PR tree-optimization/84452
10976         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
10977         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
10978         is NULL.
10980 2018-02-19  Martin Liska  <mliska@suse.cz>
10982         PR sanitizer/82183
10983         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
10985 2018-02-19  Martin Liska  <mliska@suse.cz>
10986             Richard Sandiford  <richard.sandiford@linaro.org>
10988         PR tree-optimization/82491
10989         * gimple-fold.c (get_base_constructor): Make earlier bail out
10990         to prevent ubsan.
10992 2018-02-19  Carl Love  <cel@us.ibm.com>
10994         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
10995         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
10996         BU_P8V_OVERLOAD_1.
10997         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
10998         P8V_BUILTIN_VEC_NEG.
11000 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
11002         * config/rl78/rl78.md (movdf): New define expand.
11004 2018-02-19  Martin Liska  <mliska@suse.cz>
11006         PR other/80589
11007         * doc/invoke.texi: Fix typo.
11008         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
11010 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
11012         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
11013         handle rs6000_single_float and rs6000_double_float specially for
11014         e500 family CPUs.
11016 2018-02-16  Jeff Law  <law@redhat.com>
11018         * config/rx/rx.c (add_pop_cfi_notes): New function.;
11019         (pop_regs): Use it.
11021 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
11023         PR ipa/84425
11024         * ipa-inline.c (inline_small_functions): Fix a typo.
11026 2018-02-16  Nathan Sidwell  <nathan@acm.org>
11028         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
11030 2018-02-16  Carl Love  <cel@us.ibm.com>
11032         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
11033         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
11034         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
11035         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
11036         expansion to P8V_BUILTIN_VEC_FLOAT2.
11038 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
11040         PR rtl-optimization/70023
11041         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
11042         src_regno into account.
11044 2018-02-16  Carl Love  <cel@us.ibm.com>
11046         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
11047         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
11048         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
11049         * config/rs6000/rs6000.c: Remove case statements for
11050         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
11051         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
11052         and P9V_BUILTIN_VEC_VINSERT4B.
11053         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
11054         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
11055         * config/rs6000/vsx.md:
11056         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
11057         vec_insert4b.
11059 2018-02-16  Carl Love  <cel@us.ibm.com>
11061         * config/rs6000/altivec.h: Add builtin names vec_extract4b
11062         vec_insert4b.
11063         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
11064         definitions.
11065         * config/rs6000/rs6000-c.c: Add the definitions for
11066         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
11067         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
11068         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
11069         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
11070         definition for insert4b and define insn *insert3b_internal.
11071         * doc/extend.texi: Add documentation for vec_extract4b.
11073 2018-02-16  Nathan Sidwell  <nathan@acm.org>
11075         * doc/extend.texi (Backwards Compatibility): Mention friend
11076         injection.  Note for-scope is deprecated.
11077         * doc/invoke.texi (-ffriend-injection): Deprecate.
11079 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
11081         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
11082         that moved to I2, also allow destinations that are a paradoxical
11083         subreg (instead of a normal reg).
11085 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
11087         PR target/83831
11088         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
11089         to QImode.
11091 2018-02-16  Richard Biener  <rguenther@suse.de>
11093         PR tree-optimization/84037
11094         PR tree-optimization/84016
11095         PR target/82862
11096         * config/i386/i386.c (ix86_builtin_vectorization_cost):
11097         Adjust vec_construct for the fact we need additional higher latency
11098         128bit inserts for AVX256 and AVX512 vector builds.
11099         (ix86_add_stmt_cost): Scale vector construction cost for
11100         elementwise loads.
11102 2018-02-16  Richard Biener  <rguenther@suse.de>
11104         PR tree-optimization/84417
11105         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
11106         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
11107         (non_rewritable_lvalue_p): Likewise, use poly-ints.
11109 2018-02-16  Martin Liska  <mliska@suse.cz>
11111         PR sanitizer/84307
11112         * internal-fn.def (ASAN_CHECK): Set proper flags.
11113         (ASAN_MARK): Likewise.
11115 2018-02-16  Julia Koval  <julia.koval@intel.com>
11117         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
11118         from PTA_CANNONLAKE.
11120 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
11122         PR target/84272
11123         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
11124         Use ++iter rather than iter++ for std::list iterators.
11125         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
11126         defer deleting them until all nodes in the forest are processed.  Do
11127         free even leaf nodes.  Change to_process into auto_vec.
11129         PR bootstrap/84405
11130         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
11131         * vec.h (vec_default_construct): Use memset instead of placement new
11132         if BROKEN_VALUE_INITIALIZATION is defined.
11133         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
11134         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
11135         is defined.
11137         PR rtl-optimization/83723
11138         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
11139         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
11140         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
11141         recursive calls.
11142         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
11143         callers.
11144         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
11146 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
11148         PR rtl-optimization/81443
11149         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
11150         from inner REGs to paradoxical SUBREGs.
11152 2018-02-16  Richard Biener  <rguenther@suse.de>
11154         PR tree-optimization/84399
11155         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
11156         For operands we can analyze at their definition make sure we can
11157         analyze them at each use as well.
11159 2018-02-16  Richard Biener  <rguenther@suse.de>
11161         PR tree-optimization/84190
11162         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
11163         volatile accesses if the decl isn't volatile.
11165 2018-02-15  Jason Merrill  <jason@redhat.com>
11167         PR c++/84314 - ICE with templates and fastcall attribute.
11168         * attribs.c (build_type_attribute_qual_variant): Don't clobber
11169         TYPE_CANONICAL on an existing type.
11171 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
11173         PR tree-optimization/84383
11174         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
11175         dstoff nor call operand_equal_p if dstbase is NULL.
11177         PR tree-optimization/84334
11178         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
11179         also a CONSTANT_CLASS_P, punt.
11181 2018-02-14  Jim Wilson  <jimw@sifive.com>
11183         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
11184         first SMALL_OPERAND check.  New local min_second_step.  Move assert
11185         to where locals are set.  Add TARGET_RVC support.
11186         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
11188 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
11190         * doc/invoke.texi: Correct -Wformat-overflow code sample.
11192 2018-02-14  Martin Sebor  <msebor@redhat.com>
11194         PR tree-optimization/83698
11195         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
11196         arrays constrain the offset range to their bounds.
11197         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
11198         (builtin_access::overlap): Avoid setting the size of overlap if it's
11199         already been set.
11200         (maybe_diag_overlap): Also consider arrays when deciding what values
11201         of offsets to include in diagnostics.
11203 2018-02-14  Martin Sebor  <msebor@redhat.com>
11205         PR c/84108
11206         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
11207         that correspond to the kind of a declaration.
11209 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
11211         PR target/83984
11212         * config/pa/pa.md: Load address of PIC label using the linkage table
11213         if the label is nonlocal.
11215 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11217         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
11218         warning message if user requests -maltivec=be.
11219         * doc/invoke.texi: Document deprecation of -maltivec=be.
11221 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
11223         PR target/84220
11224         * config/rs6000/rs6000-c.c: Update definitions for
11225         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
11226         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
11228 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
11230         PR target/84239
11231         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
11232         add _get_ssp intrinsics. Remove argument from
11233         __builtin_ia32_rdssp[d|q].
11234         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
11235         * config/i386/i386-builtin.def: Remove argument from
11236         __builtin_ia32_rdssp[d|q].
11237         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
11238         ix86_expand_special_args_builtin for _rdssp[d|q].
11239         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
11240         Clear register before usage.
11241         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
11242         Add documentation for new _get_ssp and _inc_ssp intrinsics.
11244 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
11246         PR tree-optimization/84357
11247         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
11248         operand 1 of an ARRAY_REF too.
11250 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
11252         PR target/83831
11253         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
11254         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
11255         declarations.
11256         (set_of_reg): New struct.
11257         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
11258         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
11259         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
11260         functions.
11261         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
11262         Split into bitclr, bitset, bitinvert patterns if appropriate.
11263         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
11264         use rx_fuse_in_memory_bitop.
11265         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
11266         to named insn, correct maximum insn length.
11268 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
11270         PR target/79242
11271         * machmode.def: Define a complex mode for PARTIAL_INT.
11272         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
11273         MODE_PARTIAL_INT.
11274         * doc/rtl.texi: Document CSPImode.
11275         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
11276         handling.
11277         (msp430_hard_regno_nregs_with_padding): Likewise.
11279 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
11281         PR target/84279
11282         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
11284 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
11286         PR rtl-optimization/84169
11287         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
11288         we generated a parallel as new i3 and we split that to new i2 and i3
11289         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
11290         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
11291         those to i2, not i1.  Partially rewrite this scan code.
11293 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
11295         PR c/82210
11296         * stor-layout.c (place_field): For variable length fields, adjust
11297         offset_align afterwards not just based on the field's alignment,
11298         but also on the size.
11300         PR middle-end/84309
11301         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
11302         of exps and logs in the use_exp2 case.
11304 2018-02-13  Jeff Law  <law@redhat.com>
11306         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
11307         entry for "vector".
11309         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
11310         ARGS as unused.
11312 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
11314         PR debug/84342
11315         PR debug/84319
11316         * common.opt (gas-loc-support, gas-locview-support): New.
11317         (ginline-points, ginternal-reset-location-views): New.
11318         * doc/invoke.texi: Document them.  Use @itemx where intended.
11319         (gvariable-location-views): Adjust.
11320         * target.def (reset_location_view): New.
11321         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
11322         (TARGET_RESET_LOCATION_VIEW): New.
11323         * doc/tm.texi: Rebuilt.
11324         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
11325         (dwarf2out_default_as_locview_support): New.
11326         (output_asm_line_debug_info): Use option variables.
11327         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
11328         (output_loc_list): Likewise.
11329         (add_high_low_attributes): Check option variables.
11330         Don't output entry view attribute in strict mode.
11331         (gen_inlined_subroutine_die): Check option variables.
11332         (dwarf2out_inline_entry): Likewise.
11333         (init_sections_and_labels): Likewise.
11334         (dwarf2out_early_finish): Likewise.
11335         (maybe_reset_location_view): New, from...
11336         (dwarf2out_var_location): ... here.  Call it.
11337         * debug.h (dwarf2out_default_as_loc_support): Declare.
11338         (dwarf2out_default_as_locview_support): Declare.
11339         * hooks.c (hook_int_rtx_insn_0): New.
11340         * hooks.h (hook_int_rtx_insn_0): Declare.
11341         * toplev.c (process_options): Take -gas-loc-support and
11342         -gas-locview-support from dwarf2out.  Enable
11343         -gvariable-location-views by default only with locview
11344         assembler support.  Enable -ginternal-reset-location-views by
11345         default only if the target defines the corresponding hook.
11346         Enable -ginline-points by default if location views are
11347         enabled; force it disabled if statement frontiers are
11348         disabled.
11349         * tree-inline.c (expand_call_inline): Check option variables.
11350         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
11352 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
11354         PR tree-optimization/84321
11355         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
11356         handling.  Also check whether the anti-range contains any values
11357         that satisfy the mask; switch to a VR_RANGE if not.
11359 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
11361         PR sanitizer/84340
11362         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
11364 2018-02-13  Martin Jambor  <mjambor@suse.cz>
11366         PR c++/83990
11367         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
11368         of call statements, also set location of a load to a temporary.
11370 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
11372         * config/rl78/rl78.c (add_vector_labels): New function.
11373         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
11374         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
11375         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
11376         which checks that no arguments are passed.
11377         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
11378         * doc/extend.texi: Documentation for the new attribute.
11380 2018-02-13  Andreas Schwab  <schwab@suse.de>
11382         * config/riscv/linux.h (CPP_SPEC): Define.
11384 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
11386         PR target/84335
11387         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
11388         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
11389         OPTION_MASK_ISA_AES as first argument to def_builtin_const
11390         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
11391         instead of OPTION_MASK_ISA_PCLMUL as first argument to
11392         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
11393         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
11394         temporarily for AES and PCLMUL builtins.
11396         PR tree-optimization/84339
11397         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
11398         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
11399         Formatting fixes.
11401         PR middle-end/84309
11402         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
11403         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
11404         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
11405         inline function.
11406         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
11407         inline function.
11408         * omp-simd-clone.h: New file.
11409         * omp-simd-clone.c: Include omp-simd-clone.h.
11410         (expand_simd_clones): No longer static.
11411         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
11412         cgraph.h and omp-simd-clone.h.
11413         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
11414         (vect_recog_widen_shift_pattern): Formatting fix.
11415         (vect_pattern_recog_1): Don't check optab for calls.
11417         PR target/84336
11418         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
11419         operands[2] into a REG before using gen_lowpart on it.
11421 2018-02-12  Jeff Law  <law@redhat.com>
11423         PR target/83760
11424         * config/sh/sh.c (find_barrier): Consider a sibling call
11425         a barrier as well.
11427         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
11428         successfully back substituting a reg.
11430 2018-02-12  Richard Biener  <rguenther@suse.de>
11432         PR tree-optimization/84037
11433         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
11434         parameter, move visited init to caller.
11435         (vect_slp_analyze_operations): Separate cost from validity
11436         check, initialize visited once for all instances.
11437         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
11438         for all instances.
11439         * tree-vect-stmts.c (vect_model_simple_cost): Make early
11440         out an assert.
11441         (vect_model_promotion_demotion_cost): Likewise.
11442         (vectorizable_bswap): Guard cost modeling with !slp_node
11443         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
11444         SLP stmts.
11445         (vectorizable_call): Likewise.
11446         (vectorizable_conversion): Likewise.
11447         (vectorizable_assignment): Likewise.
11448         (vectorizable_shift): Likewise.
11449         (vectorizable_operation): Likewise.
11450         (vectorizable_store): Likewise.
11451         (vectorizable_load): Likewise.
11452         (vectorizable_condition): Likewise.
11453         (vectorizable_comparison): Likewise.
11455 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
11457         PR sanitizer/84307
11458         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
11459         (ASAN_MARK): Fix fnspec to account for return value, change pointer
11460         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
11462 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
11464         PR middle-end/83665
11465         * params.def (inline-min-speedup): Increase from 8 to 15.
11466         (max-inline-insns-auto): Decrease from 40 to 30.
11467         * ipa-split.c (consider_split): Add some buffer for function to
11468         be considered inlining candidate.
11469         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
11470         default values.
11472 2018-02-12  Richard Biener  <rguenther@suse.de>
11474         PR tree-optimization/84037
11475         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
11476         matched stmts if we cannot swap the non-matched ones.
11478 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
11480         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
11481         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
11482         _mm_maskz_scalef_round_ss): New intrinsics.
11483         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
11484         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
11485         __builtin_ia32_scalefss_round): Remove.
11486         (__builtin_ia32_scalefsd_mask_round,
11487         __builtin_ia32_scalefss_mask_round): New intrinsics.
11488         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
11489         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
11490         ((match_operand:VF_128 2 "<round_nimm_predicate>"
11491         "<round_constraint>")): Changed to ...
11492         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
11493         "<round_scalar_constraint>")): ... this.
11494         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
11495         %0, %1, %2<round_op3>}"): Changed to ...
11496         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
11497         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
11498         %2<round_scalar_mask_op3>}"): ... this.
11499         * config/i386/subst.md (round_scalar_nimm_predicate): New.
11501 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
11503         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
11504         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
11505         (_mm_maskz_sqrt_round_ss): New intrinsics.
11506         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
11507         (__builtin_ia32_sqrtsd_mask_round)
11508         (__builtin_ia32_sqrtss_mask_round): New builtins.
11509         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
11510         (__builtin_ia32_sqrtss_round): Remove.
11511         (__builtin_ia32_sqrtsd_mask_round)
11512         (__builtin_ia32_sqrtss_mask_round): New builtins.
11513         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
11514         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
11515         ((match_operand:VF_128 1 "vector_operand"
11516         "xBm,<round_constraint>")): Changed to ...
11517         ((match_operand:VF_128 1 "vector_operand"
11518         "xBm,<round_scalar_constraint>")): ... this.
11519         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
11520         %0, %2, %<iptr>1<round_op3>}): Changed to ...
11521         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
11522         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
11523         %<iptr>1<round_scalar_mask_op3>}): ... this.
11524         ((set_attr "prefix" "<round_prefix>")): Changed to ...
11525         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
11527 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
11529         PR target/84266
11530         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
11531         Cast vec_cmpeq result to correct type.
11532         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
11533         Cast vec_cmpgt result to correct type.
11535 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
11537         * final.c (final_scan_insn_1): Renamed from...
11538         (final_scan_insn): ... this.  New wrapper, to recover
11539         seen from the outermost call in recursive ones.
11540         * config/sparc/sparc.c (output_return): Drop seen from call.
11541         (output_sibcall): Likewise.
11542         * config/visium/visium.c (output_branch): Likewise.
11544 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
11546         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
11547         function label.
11549 2018-02-10  Alan Modra  <amodra@gmail.com>
11551         PR target/84300
11552         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
11553         Specify LR as an input.
11555 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
11557         PR sanitizer/83987
11558         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
11559         remove_member_access_dummy_vars): New functions.
11560         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
11561         lower_omp_1, execute_lower_omp): Use them.
11563         PR rtl-optimization/84308
11564         * shrink-wrap.c (spread_components): Release todo vector.
11566 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
11568         PR rtl-optimization/57193
11569         * ira-color.c (struct allocno_color_data): Add member
11570         conflict_allocno_hard_prefs.
11571         (update_conflict_allocno_hard_prefs): New.
11572         (bucket_allocno_compare_func): Add a preference based on
11573         conflict_allocno_hard_prefs.
11574         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
11575         (color_allocnos): Remove a dead code.  Initiate
11576         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
11578 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
11580         PR target/84226
11581         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
11582         constraint from =wa to wa.  Avoid a subreg on the output operand,
11583         instead use a pseudo and subreg it in a move.
11584         (p9_xxbrd_<mode>): Changed to ...
11585         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
11586         (p9_xxbrd_v2df): New expander.
11587         (p9_xxbrw_<mode>): Changed to ...
11588         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
11589         (p9_xxbrw_v4sf): New expander.
11591 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
11593         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
11595 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
11597         PR target/83926
11598         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
11599         multiply in 32-bit mode.
11600         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
11601         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
11602         mode.
11604 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
11606         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
11607         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
11608         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
11609         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
11611 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
11613         PR lto/84213
11614         * dwarf2out.c (is_trivial_indirect_ref): New function.
11615         (dwarf2out_late_global_decl): Do not generate a location
11616         attribute for variables that have a non-trivial DECL_VALUE_EXPR
11617         and that are not defined in the current unit.
11619 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
11621         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
11622         instead of a libcall for UNORDERED.
11624 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
11626         PR target/82641
11627         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
11628         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
11630 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11632         PR target/PR84295
11633         * config/s390/s390.c (s390_set_current_function): Invoke
11634         s390_indirect_branch_settings also if fndecl didn't change.
11636 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
11638         * config/rs6000/rs6000.md (blockage): Set length to zero.
11640 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
11642         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
11644 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
11646         PR sanitizer/84285
11647         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
11648         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
11649         -static-lib*san.
11651         PR debug/84252
11652         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
11653         PARALLEL incoming that failed vt_get_decl_and_offset check.
11655         PR middle-end/84237
11656         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
11657         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
11658         TREE_READONLY bit.
11659         (get_variable_section): For decls in named .bss* sections pass true as
11660         second argument to bss_initializer_p.
11662 2018-02-09  Marek Polacek  <polacek@redhat.com>
11663             Jakub Jelinek  <jakub@redhat.com>
11665         PR c++/83659
11666         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
11667         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
11668         Sync some changes from cxx_fold_indirect_ref.
11670 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
11672         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
11673         markers.
11674         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
11675         (BLOCK_INLINE_ENTRY_LABEL): New.
11676         (dwarf2out_var_location): Disregard inline entry markers.
11677         (inline_entry_data): New struct.
11678         (inline_entry_data_hasher): New hashtable type.
11679         (inline_entry_data_hasher::hash): New.
11680         (inline_entry_data_hasher::equal): New.
11681         (inline_entry_data_table): New variable.
11682         (add_high_low_attributes): Add DW_AT_entry_pc and
11683         DW_AT_GNU_entry_view attributes if a pending entry is found
11684         in inline_entry_data_table.  Add old entry_pc attribute only
11685         if debug nonbinding markers are disabled.
11686         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
11687         markers are enabled.
11688         (block_within_block_p, dwarf2out_inline_entry): New.
11689         (dwarf2out_finish): Check that no entries remained in
11690         inline_entry_data_table.
11691         * final.c (reemit_insn_block_notes): Handle inline entry notes.
11692         (final_scan_insn, notice_source_line): Likewise.
11693         (rest_of_clean_state): Skip inline entry markers.
11694         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
11695         markers.
11696         * gimple.c (gimple_build_debug_inline_entry): New.
11697         * gimple.h (enum gimple_debug_subcode): Add
11698         GIMPLE_DEBUG_INLINE_ENTRY.
11699         (gimple_build_debug_inline_entry): Declare.
11700         (gimple_debug_inline_entry_p): New.
11701         (gimple_debug_nonbind_marker_p): Adjust.
11702         * insn-notes.def (INLINE_ENTRY): New.
11703         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
11704         inline entry marker notes.
11705         (print_insn): Likewise.
11706         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
11707         (INSN_DEBUG_MARKER_KIND): Likewise.
11708         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
11709         * tree-inline.c (expand_call_inline): Build and insert
11710         debug_inline_entry stmt.
11711         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
11712         inline entry blocks early, if nonbind markers are enabled.
11713         (dump_scope_block): Dump fragment info.
11714         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
11715         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
11716         (gimple_build_debug_inline_entry): New.
11717         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
11718         Enable/disable inline entry points too.
11719         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
11720         (DEBUG_INSN): Describe inline entry markers.
11722         * common.opt (gvariable-location-views): New.
11723         (gvariable-location-views=incompat5): New.
11724         * config.in: Rebuilt.
11725         * configure: Rebuilt.
11726         * configure.ac: Test assembler for view support.
11727         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
11728         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
11729         * dwarf2out.c (var_loc_view): New typedef.
11730         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
11731         (dwarf2out_locviews_in_attribute): New.
11732         (dwarf2out_locviews_in_loclist): New.
11733         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
11734         (enum dw_line_info_opcode): Add LI_adv_address.
11735         (struct dw_line_info_table): Add view.
11736         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
11737         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
11738         (zero_view_p): New variable.
11739         (ZERO_VIEW_P): New macro.
11740         (output_asm_line_debug_info): New.
11741         (struct var_loc_node): Add view.
11742         (add_AT_view_list, AT_loc_list): New.
11743         (add_var_loc_to_decl): Add view param.  Test it against last.
11744         (new_loc_list): Add view params.  Record them.
11745         (AT_loc_list_ptr): Handle loc and view lists.
11746         (view_list_to_loc_list_val_node): New.
11747         (print_dw_val): Handle dw_val_class_view_list.
11748         (size_of_die): Likewise.
11749         (value_format): Likewise.
11750         (loc_list_has_views): New.
11751         (gen_llsym): Set vl_symbol too.
11752         (maybe_gen_llsym, skip_loc_list_entry): New.
11753         (dwarf2out_maybe_output_loclist_view_pair): New.
11754         (output_loc_list): Output view list or entries too.
11755         (output_view_list_offset): New.
11756         (output_die): Handle dw_val_class_view_list.
11757         (output_dwarf_version): New.
11758         (output_compilation_unit_header): Use it.
11759         (output_skeleton_debug_sections): Likewise.
11760         (output_rnglists, output_line_info): Likewise.
11761         (output_pubnames, output_aranges): Update version comments.
11762         (output_one_line_info_table): Output view numbers in asm comments.
11763         (dw_loc_list): Determine current endview, pass it to new_loc_list.
11764         Call maybe_gen_llsym.
11765         (loc_list_from_tree_1): Adjust.
11766         (add_AT_location_description): Create view list attribute if
11767         needed, check it's absent otherwise.
11768         (convert_cfa_to_fb_loc_list): Adjust.
11769         (maybe_emit_file): Call output_asm_line_debug_info for test.
11770         (dwarf2out_var_location): Reset views as needed.  Precompute
11771         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
11772         attribute.  Set view.
11773         (new_line_info_table): Reset next view.
11774         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
11775         (dwarf2out_source_line): Likewise.  Output view resets and labels to
11776         the assembler, or select appropriate line info opcodes.
11777         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
11778         (optimize_string_length): Catch it.  Adjust.
11779         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
11780         dw_val_class_view_list, and remove it if no longer needed.
11781         (hash_loc_list): Hash view numbers.
11782         (loc_list_hasher::equal): Compare them.
11783         (optimize_location_lists): Check whether a view list symbol is
11784         needed, and whether the locview attribute is present, and
11785         whether they match.  Remove the locview attribute if no longer
11786         needed.
11787         (index_location_lists): Call skip_loc_list_entry for test.
11788         (dwarf2out_finish): Call output_asm_line_debug_info for test.
11789         Use output_dwarf_version.
11790         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
11791         (struct dw_val_node): Add val_view_list.
11792         * final.c (SEEN_NEXT_VIEW): New.
11793         (set_next_view_needed): New.
11794         (clear_next_view_needed): New.
11795         (maybe_output_next_view): New.
11796         (final_start_function): Rename to...
11797         (final_start_function_1): ... this.  Take pointer to FIRST,
11798         add SEEN parameter.  Emit param bindings in the initial view.
11799         (final_start_function): Reintroduce SEEN-less interface.
11800         (final): Rename to...
11801         (final_1): ... this.  Take SEEN parameter.  Output final pending
11802         next view at the end.
11803         (final): Reintroduce seen-less interface.
11804         (final_scan_insn): Output pending next view before switching
11805         sections or ending a block.  Mark the next view as needed when
11806         outputting variable locations.  Notify debug backend of section
11807         changes, and of location view changes.
11808         (rest_of_handle_final): Adjust.
11809         * toplev.c (process_options): Autodetect value for debug variable
11810         location views option.  Warn on incompat5 without -gdwarf-5.
11811         * doc/invoke.texi (gvariable-location-views): New.
11812         (gvariable-location-views=incompat5): New.
11813         (gno-variable-location-views): New.
11815 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
11817         PR tree-optimization/84136
11818         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
11819         that the result of find_edge is non-NULL.
11821 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
11823         PR target/83008
11824         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
11825         storing integer register in SImode.  Fix cost of 256 and 512
11826         byte aligned SSE register store.
11828 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
11830         * config/i386/i386.c (ix86_multiplication_cost): Fix
11831         multiplication cost for TARGET_AVX512DQ.
11833 2018-02-08  Marek Polacek  <polacek@redhat.com>
11835         PR tree-optimization/84238
11836         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
11837         get_range_strlen.
11839 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11841         PR tree-optimization/84265
11842         * tree-vect-stmts.c (vectorizable_store): Don't treat
11843         VMAT_CONTIGUOUS accesses as grouped.
11844         (vectorizable_load): Likewise.
11846 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11848         PR tree-optimization/81635
11849         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
11850         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
11851         (test_round_for_mask): New functions.
11852         (wide_int_cc_tests): Call test_round_for_mask.
11853         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
11854         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
11855         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
11856         range returned by get_range_info.
11858 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
11860         PR ipa/81360
11861         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
11862         * symtab.c: Include builtins.h
11863         (symtab_node::output_to_lto_symbol_table_p): Move here
11864         from lto-streamer-out.c:output_symbol_p.
11865         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
11866         (output_symbol_p): Move all logic to symtab.c
11867         (produce_symtab): Update.
11869 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11871         * config/s390/s390-opts.h (enum indirect_branch): Define.
11872         * config/s390/s390-protos.h (s390_return_addr_from_memory)
11873         (s390_indirect_branch_via_thunk)
11874         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
11875         (enum s390_indirect_branch_type): Define.
11876         * config/s390/s390.c (struct s390_frame_layout, struct
11877         machine_function): Remove.
11878         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
11879         (indirect_branch_table_label_no, indirect_branch_table_name):
11880         Define variables.
11881         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
11882         (enum s390_indirect_branch_option): Define.
11883         (s390_return_addr_from_memory): New function.
11884         (s390_handle_string_attribute): New function.
11885         (s390_attribute_table): Add new attribute handler.
11886         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
11887         (s390_indirect_branch_via_thunk): New function.
11888         (s390_indirect_branch_via_inline_thunk): New function.
11889         (s390_function_ok_for_sibcall): When jumping via thunk disallow
11890         sibling call optimization for non z10 compiles.
11891         (s390_emit_call): Force indirect branch target to be a single
11892         register.  Add r1 clobber for non-z10 compiles.
11893         (s390_emit_epilogue): Emit return jump via return_use expander.
11894         (s390_reorg): Handle JUMP_INSNs as execute targets.
11895         (s390_option_override_internal): Perform validity checks for the
11896         new command line options.
11897         (s390_indirect_branch_attrvalue): New function.
11898         (s390_indirect_branch_settings): New function.
11899         (s390_set_current_function): Invoke s390_indirect_branch_settings.
11900         (s390_output_indirect_thunk_function):  New function.
11901         (s390_code_end): Implement target hook.
11902         (s390_case_values_threshold): Implement target hook.
11903         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
11904         macros.
11905         * config/s390/s390.h (struct s390_frame_layout)
11906         (struct machine_function): Move here from s390.c.
11907         (TARGET_INDIRECT_BRANCH_NOBP_RET)
11908         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
11909         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
11910         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
11911         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
11912         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
11913         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
11914         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
11915         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
11916         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
11917         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
11918         (mnemonic attribute): Add values which aren't recognized
11919         automatically.
11920         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
11921         pattern for branch conversion.  Fix mnemonic attribute.
11922         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
11923         indirect branch via thunk if requested.
11924         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
11925         ("*indirect_jump"): Disable for branch conversion using out of
11926         line thunks.
11927         ("indirect_jump_via_thunk<mode>_z10")
11928         ("indirect_jump_via_thunk<mode>")
11929         ("indirect_jump_via_inlinethunk<mode>_z10")
11930         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
11931         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
11932         ("casesi_jump_via_inlinethunk<mode>_z10")
11933         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
11934         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
11935         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
11936         ("*indirect2_jump"): Disable for branch conversion.
11937         ("casesi_jump"): Turn into expander and expand patterns for branch
11938         conversion.
11939         ("return_use"): New expander.
11940         ("*return"): Emit return via thunk and rename it to ...
11941         ("*return<mode>"): ... this one.
11942         * config/s390/s390.opt: Add new options and and enum for the
11943         option values.
11945 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11947         * lra-constraints.c (match_reload): Unconditionally use
11948         gen_lowpart_SUBREG, rather than selecting between that
11949         and equivalent gen_rtx_SUBREG code.
11951 2018-02-08  Richard Biener  <rguenther@suse.de>
11953         PR tree-optimization/84233
11954         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
11955         changed flag instead of boguously re-using phi_inserted.
11957 2018-02-08  Martin Jambor  <mjambor@suse.cz>
11959         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
11960         static local variables.
11962 2018-02-08  Richard Biener  <rguenther@suse.de>
11964         PR tree-optimization/84278
11965         * tree-vect-stmts.c (vectorizable_store): When looking for
11966         smaller vector types to perform grouped strided loads/stores
11967         make sure the mode is supported by the target.
11968         (vectorizable_load): Likewise.
11970 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
11972         * config/aarch64/aarch64.c (aarch64_components_for_bb):
11973         Increase LDP/STP opportunities by adding adjacent callee-saves.
11975 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
11977         PR rtl-optimization/84068
11978         PR rtl-optimization/83459
11979         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
11981 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
11983         PR tree-optimization/84224
11984         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
11985         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
11986         non-zero arguments.
11988 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
11990         PR target/84113
11991         * config/rs6000/altivec.md (*restore_world): Remove LR use.
11992         * config/rs6000/predicates.md (restore_world_operation): Adjust op
11993         count, remove one USE.
11995 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
11997         * doc/install.texi (Configuration): Document the
11998         --with-long-double-format={ibm,ieee} PowerPC configuration
11999         options.
12001         PR target/84154
12002         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
12003         Convert from define_expand to be define_insn_and_split.  Rework
12004         float/double/_Float128 conversions to QI/HI/SImode to work with
12005         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
12006         conversions to QI/HImode types did a store and then a load to
12007         truncate the value.  For conversions to VSX registers, don't split
12008         the insn, instead emit the code directly.  Use the code iterator
12009         any_fix to combine signed and unsigned conversions.
12010         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
12011         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
12012         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
12013         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
12014         (fix_<mode>di2_hw): Likewise.
12015         (fixuns_<mode>di2_hw): Likewise.
12016         (fix_<mode>si2_hw): Likewise.
12017         (fixuns_<mode>si2_hw): Likewise.
12018         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
12019         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
12020         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
12021         fix<uns>_trunc<SFDF:mode>si2_p8.
12022         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
12023         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
12024         (fix<uns>_<mode>_mem): Likewise.
12025         (fctiw<u>z_<mode>_mem): Likewise.
12026         (fix<uns>_<mode>_mem): Likewise.
12027         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
12028         the register allocator from doing a direct move to the GPRs to do
12029         a store, and instead use the ISA 3.0 store byte/half-word from
12030         vector register instruction.  For IEEE 128-bit floating point,
12031         also optimize stores of 32-bit ints.
12032         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
12034 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
12036         * genextract.c (push_pathstr_operand): New function to support
12037         [a-zA-Z].
12038         (walk_rtx): Call push_pathstr_operand.
12039         (print_path): Support [a-zA-Z].
12041 2018-02-07  Richard Biener  <rguenther@suse.de>
12043         PR tree-optimization/84037
12044         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
12045         (cse_and_gimplify_to_preheader): Declare.
12046         (vect_get_place_in_interleaving_chain): Likewise.
12047         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12048         ivexpr_map.
12049         (_loop_vec_info::~_loop_vec_info): Delete it.
12050         (cse_and_gimplify_to_preheader): New function.
12051         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
12052         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
12053         (vectorizable_load): Likewise.  For grouped stores always base
12054         the IV on the first element.
12055         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
12056         condition before gimplifying.
12058 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
12060         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
12061         *DIV_EXPR and *MOD_EXPR.
12063 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
12065         PR target/84248
12066         * config/i386/i386.c (ix86_option_override_internal): Mask out
12067         the CF_SET bit when checking -fcf-protection.
12069 2018-02-07  Tom de Vries  <tom@codesourcery.com>
12071         PR libgomp/84217
12072         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
12073         enough.
12075 2018-02-07  Richard Biener  <rguenther@suse.de>
12077         PR tree-optimization/84204
12078         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
12079         this place.
12081         PR tree-optimization/84205
12082         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
12083         special-case isl_ast_op_zdiv_r.
12085         PR tree-optimization/84223
12086         * graphite-scop-detection.c (gather_bbs::before_dom_children):
12087         Only add conditions from within the region.
12088         (gather_bbs::after_dom_children): Adjust.
12090 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
12092         PR target/84209
12093         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
12094         * config/avr/avr.md: Only post-reload split REG-REG moves if
12095         either register is GENERAL_REG_P.
12097 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
12099         PR tree-optimization/84235
12100         * tree-ssa-scopedtables.c
12101         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
12102         if the subtraction is performed in floating point type where NaNs are
12103         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
12104         build 1.  Formatting fix.
12106 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
12108         PR target/84146
12109         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
12110         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
12111         and skip it regardless of bb boundaries.  Use CALL_P macro,
12112         don't test INSN_P (insn) together with CALL_P or JUMP_P check
12113         unnecessarily, formatting fix.
12115 2018-02-06  Michael Collison  <michael.collison@arm.com>
12117         * config/arm/thumb2.md:
12118         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
12119         (*thumb_mov_notscc): Ditto.
12121 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
12123         PR target/84154
12124         * config/rs6000/rs6000.md (su code attribute): Use "u" for
12125         unsigned_fix, not "s".
12127 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12129         * configure.ac (gcc_fn_eh_frame_ro): New function.
12130         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
12131         correct .eh_frame permissions.
12132         * configure: Regenerate.
12134 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
12136         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
12137         irrelevant options.
12139 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12141         * config/rs6000/rs6000.c (rs6000_option_override_internal):
12142         Display warning message for -mno-speculate-indirect-jumps.
12144 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
12146         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
12147         Undocumented.
12148         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
12150 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
12152         PR tree-optimization/84225
12153         * tree-eh.c (find_trapping_overflow): Only call
12154         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
12156 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
12158         PR target/84145
12159         * config/i386/i386.c: Reimplement the check of possible options
12160         -mibt/-mshstk conbination. Change error messages.
12161         * doc/invoke.texi: Fix a typo: remove extra '='.
12163 2018-02-06  Marek Polacek  <polacek@redhat.com>
12165         PR tree-optimization/84228
12166         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
12168 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
12170         PR target/82641
12171         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
12172         emitted arch directives.
12173         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
12174         __ARM_FEATURE_COPROC before changing architectures.
12176 2018-02-06  Richard Biener  <rguenther@suse.de>
12178         * config/i386/i386.c (print_reg): Fix typo.
12179         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
12181 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
12183         * configure: Regenerate.
12185 2018-02-05  Martin Sebor  <msebor@redhat.com>
12187         PR tree-optimization/83369
12188         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
12189         inlining context.
12191 2018-02-05  Martin Liska  <mliska@suse.cz>
12193         * doc/invoke.texi: Cherry-pick upstream r323995.
12195 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
12197         * ira.c (ira_init_register_move_cost): Adjust comment.
12199 2018-02-05  Martin Liska  <mliska@suse.cz>
12201         PR gcov-profile/84137
12202         * doc/gcov.texi: Fix typo in documentation.
12204 2018-02-05  Martin Liska  <mliska@suse.cz>
12206         PR gcov-profile/83879
12207         * doc/gcov.texi: Document necessity of --dynamic-list-data when
12208         using dlopen functionality.
12210 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
12212         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
12213         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
12214         _mm_maskz_range_ss, _mm_mask_range_round_ss,
12215         _mm_maskz_range_round_ss): New intrinsics.
12216         (__builtin_ia32_rangesd128_round)
12217         (__builtin_ia32_rangess128_round): Remove.
12218         (__builtin_ia32_rangesd128_mask_round,
12219         __builtin_ia32_rangess128_mask_round): New builtins.
12220         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
12221         __builtin_ia32_rangess128_round): Remove.
12222         (__builtin_ia32_rangesd128_mask_round,
12223         __builtin_ia32_rangess128_mask_round): New builtins.
12224         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
12225         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
12226         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
12227         "<round_saeonly_constraint>")): Changed to ...
12228         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
12229         "<round_saeonly_scalar_constraint>")): ... this.
12230         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
12231         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
12232         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
12233         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
12234         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
12236 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
12238         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
12239         options.
12240         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
12241         Remove all values except native, 8540 and 8548.
12243 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
12245         * config/i386/i386.c (ix86_output_function_return): Pass
12246         INVALID_REGNUM, instead of -1, as invalid register number to
12247         indirect_thunk_name and output_indirect_thunk.
12249 2018-02-02  Julia Koval  <julia.koval@intel.com>
12251         * config.gcc: Add -march=icelake.
12252         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
12253         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
12254         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
12255         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
12256         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
12257         (processor_target_table): Add icelake.
12258         (ix86_option_override_internal): Handle new PTAs.
12259         (get_builtin_code_for_version): Handle icelake.
12260         (M_INTEL_COREI7_ICELAKE): New.
12261         (fold_builtin_cpu): Handle icelake.
12262         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
12263         * doc/invoke.texi: Add -march=icelake.
12265 2018-02-02  Julia Koval  <julia.koval@intel.com>
12267         * config/i386/i386.c (ix86_option_override_internal): Change flags type
12268         to wide_int_bitmask.
12269         * wide-int-bitmask.h: New.
12271 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
12273         PR target/84066
12274         * config/i386/i386.md: Replace Pmode with word_mode in
12275         builtin_setjmp_setup and builtin_longjmp to support x32.
12277 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
12279         PR target/56010
12280         PR target/83743
12281         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
12282         #include "opts.h".
12283         (rs6000_supported_cpu_names): New static variable.
12284         (linux_cpu_translation_table): Likewise.
12285         (elf_platform) <cpu>: Define new static variable and use it.
12286         Translate kernel AT_PLATFORM name to canonical name if needed.
12287         Error if platform name is unknown.
12289 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
12291         PR target/84089
12292         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
12294 2018-02-01  Jeff Law  <law@redhat.com>
12296         PR target/84128
12297         * config/i386/i386.c (release_scratch_register_on_entry): Add new
12298         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
12299         the scratch if RELEASE_VIA_POP is false.
12300         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
12301         If we have to save a temporary register, decrement SIZE appropriately.
12302         Pass new arguments to release_scratch_register_on_entry.
12303         (ix86_adjust_stack_and_probe): Likewise.
12304         (ix86_emit_probe_stack_range): Pass new arguments to
12305         release_scratch_register_on_entry.
12307 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
12309         PR rtl-optimization/84157
12310         * combine.c (change_zero_ext): Use REG_P predicate in
12311         front of HARD_REGISTER_P predicate.
12313 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
12315         * config/avr/avr.c (avr_option_override): Move disabling of
12316         -fdelete-null-pointer-checks to...
12317         * common/config/avr/avr-common.c (avr_option_optimization_table):
12318         ...here.
12320 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12322         PR tree-optimization/81635
12323         * tree-data-ref.c (split_constant_offset_1): For types that
12324         wrap on overflow, try to use range info to prove that wrapping
12325         cannot occur.
12327 2018-02-01  Renlin Li  <renlin.li@arm.com>
12329         PR target/83370
12330         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
12331         TAILCALL_ADDR_REGS.
12332         (aarch64_register_move_cost): Likewise.
12333         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
12334         TAILCALL_ADDR_REGS.
12335         (REG_CLASS_NAMES): Likewise.
12336         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
12337         TAILCALL_ADDR_REGS. Remove IP registers.
12338         * config/aarch64/aarch64.md (Ucs): Update register constraint.
12340 2018-02-01  Richard Biener  <rguenther@suse.de>
12342         * domwalk.h (dom_walker::dom_walker): Add additional constructor
12343         for specifying RPO order and allow NULL for that.
12344         * domwalk.c (dom_walker::dom_walker): Likewise.
12345         (dom_walker::walk): Handle NULL RPO order.
12346         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
12347         in RPO order.
12348         (rewrite_update_dom_walker): Likewise.
12349         (mark_def_dom_walker): Likewise.
12351 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12353         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
12354         (aarch64_maybe_expand_sve_subreg_move): Declare.
12355         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
12356         * config/aarch64/predicates.md (aarch64_any_register_operand): New
12357         predicate.
12358         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
12359         that are semantically a reverse operation.
12360         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
12361         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
12362         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
12363         functions.
12364         (aarch64_can_change_mode_class): For big-endian, forbid changes
12365         between two SVE modes if they have different element sizes.
12367 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12369         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
12370         the TImode handling for big-endian targets.
12372 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12374         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
12375         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
12376         not just bytes.
12377         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
12378         Remove BSWAP handing for big-endian targets and use the form of
12379         LD1RQ appropariate for the mode.
12381 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12383         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
12384         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
12385         duplicated element.
12387 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12389         PR tearget/83845
12390         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
12391         check for operands that need to go through aarch64_sve_reload_be.
12393 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
12395         PR tree-optimization/81661
12396         PR tree-optimization/84117
12397         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
12398         * tree-eh.c: Include gimplify.h.
12399         (find_trapping_overflow, replace_trapping_overflow,
12400         rewrite_to_non_trapping_overflow): New functions.
12401         * tree-vect-loop.c: Include tree-eh.h.
12402         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
12403         * tree-data-ref.c: Include tree-eh.h.
12404         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
12406 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
12408         PR rtl-optimization/84123
12409         * combine.c (change_zero_ext): Check if hard register satisfies
12410         can_change_dest_mode before calling gen_lowpart_SUBREG.
12412 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
12414         PR target/82444
12415         * ira.c (ira_init_register_move_cost): Remove assert.
12417 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
12419         PR rtl-optimization/84071
12420         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
12421         * doc/tm.texi: Regenerate.
12423 2018-01-31  Richard Biener  <rguenther@suse.de>
12425         PR tree-optimization/84132
12426         * tree-data-ref.c (analyze_miv_subscript): Properly
12427         check whether evolution_function_is_affine_multivariate_p
12428         before calling gcd_of_steps_may_divide_p.
12430 2018-01-31  Julia Koval  <julia.koval@intel.com>
12432         PR target/83618
12433         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
12434         * config/i386/i386.md (rdpid_rex64) New.
12435         (rdpid): Make 32bit only.
12437 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
12439         PR lto/84105
12440         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
12441         an IDENTIFIER_NODE for FUNCTION_TYPE's.
12443 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
12445         Revert
12446         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
12448         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
12450 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
12452         PR rtl-optimization/84071
12453         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
12454         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
12456 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
12458         * config/arc/arc.c (arc_handle_aux_attribute): New function.
12459         (arc_attribute_table): Add 'aux' attribute.
12460         (arc_in_small_data_p): Consider aux like variables.
12461         (arc_is_aux_reg_p): New function.
12462         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
12463         (arc_get_aux_arg): New function.
12464         (prepare_move_operands): Handle aux-register access.
12465         (arc_handle_aux_attribute): New function.
12466         * doc/extend.texi (ARC Variable attributes): Add subsection.
12468 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
12470         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
12471         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
12472         (arc_attribute_table): Add 'uncached' attribute.
12473         (arc_print_operand): Print '.di' flag for uncached memory
12474         accesses.
12475         (arc_in_small_data_p): Do not consider for small data the uncached
12476         types.
12477         (arc_is_uncached_mem_p): New function.
12478         * config/arc/predicates.md (compact_store_memory_operand): Check
12479         for uncached memory accesses.
12480         (nonvol_nonimm_operand): Likewise.
12481         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
12483 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
12485         PR c/84100
12486         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
12487         falign-loops=): Add Optimization flag.
12489 2018-01-30  Jeff Law  <law@redhat.com>
12491         PR target/84064
12492         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
12493         INT_REGISTERS_SAVED.  Check it prior to calling
12494         get_scratch_register_on_entry.
12495         (ix86_adjust_stack_and_probe): Similarly.
12496         (ix86_emit_probe_stack_range): Similarly.
12497         (ix86_expand_prologue): Corresponding changes.
12499 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12501         PR target/40411
12502         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
12503         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
12505 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
12507         PR target/84112
12508         * lra-constraints.c (curr_insn_transform): Process AND in the
12509         address.
12511 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
12513         PR rtl-optimization/83986
12514         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
12515         dependence against last_pending_memory_flush in addition to
12516         pending_jump_insns.
12518 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
12520         PR tree-optimization/81611
12521         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
12522         copies.
12524 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12526         PR target/83758
12527         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
12528         a reg rtx.
12530 2018-01-30  Richard Biener  <rguenther@suse.de>
12531             Jakub Jelinek  <jakub@redhat.com>
12533         PR tree-optimization/84111
12534         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
12535         inner loops added during recursion, as they don't have up-to-date
12536         SSA form.
12538 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
12540         PR ipa/81360
12541         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
12542         (can_inline_edge_by_limits_p): ... here.
12543         (can_early_inline_edge_p, check_callers,
12544         update_caller_keys, update_callee_keys, recursive_inlining,
12545         add_new_edges_to_heap, speculation_useful_p,
12546         inline_small_functions,
12547         inline_small_functions, flatten_function,
12548         inline_to_all_callers_1): Update.
12550 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
12552         * profile-count.c (profile_count::combine_with_ipa_count): Handle
12553         zeros correctly.
12555 2018-01-30  Richard Biener  <rguenther@suse.de>
12557         PR tree-optimization/83008
12558         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
12559         invariant and constant vector uses in stmts when they need
12560         more than one stmt.
12562 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12564         PR bootstrap/84017
12565         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
12566         * configure: Regenerate.
12568 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12570         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
12571         pattern.
12572         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
12573         Use gen_rtx_REG rather than gen_lowpart.
12575 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12577         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
12578         rather than 0 when creating partial subregs.
12580 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12582         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
12583         of usage.
12585 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
12587         PR target/81550
12588         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
12589         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
12590         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
12591         flags.  This restores the settings used before the 2017-07-24.
12592         Turning off pre increment/decrement/modify allows IVOPTS to
12593         optimize DF/SF loops where the index is an int.
12595 2018-01-29  Richard Biener  <rguenther@suse.de>
12596             Kelvin Nilsen  <kelvin@gcc.gnu.org>
12598         PR bootstrap/80867
12599         * tree-vect-stmts.c (vectorizable_call): Don't call
12600         targetm.vectorize_builtin_md_vectorized_function if callee is
12601         NULL.
12603 2018-01-22  Carl Love  <cel@us.ibm.com>
12605         * doc/extend.tex: Fix typo in second arg in
12606         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
12608 2018-01-29  Richard Biener  <rguenther@suse.de>
12610         PR tree-optimization/84086
12611         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
12612         (flush_ssaname_freelist): When SSA names were released reset
12613         the SCEV hash table.
12615 2018-01-29  Richard Biener  <rguenther@suse.de>
12617         PR tree-optimization/84057
12618         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
12619         removed paths when removing edges.
12621 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
12623         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
12624         -mfunction-return=@var{choice}.
12626 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12628         PR diagnostic/84034
12629         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
12630         Handle CR like TAB.
12631         (layout::print_source_line): Likewise.
12632         (test_get_line_width_without_trailing_whitespace): Add test cases.
12634 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
12636         PR middle-end/84040
12637         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
12638         debug insns.
12640 2018-01-26  Jim Wilson  <jimw@sifive.com>
12642         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
12644         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
12645         specified.
12647 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12649         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
12650         and CMP + SUB-immediate -> SUBS.
12652 2018-01-26  Martin Sebor  <msebor@redhat.com>
12654         PR tree-optimization/83896
12655         * tree-ssa-strlen.c (get_string_len): Rename...
12656         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
12657         Avoid assuming length is constant.
12658         (handle_char_store): Use HOST_WIDE_INT for string length.
12660 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
12662         PR target/81763
12663         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
12664         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
12666 2018-01-26  Richard Biener  <rguenther@suse.de>
12668         PR rtl-optimization/84003
12669         * dse.c (record_store): Only record redundant stores when
12670         the earlier store aliases at least all accesses the later one does.
12672 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
12674         PR rtl-optimization/83985
12675         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
12676         REG_CFA_RESTORE insns.
12677         (delete_unmarked_insns): Don't ignore separate shrink wrapping
12678         REG_CFA_RESTORE insns here.
12680         PR c/83989
12681         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
12682         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
12684 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12686         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
12687         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
12688         (arc_init): Likewise.
12689         (arc_override_options): Likewise.
12690         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
12691         value.
12692         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
12693         support.
12694         * config/arc/arc.h (TARGET_DBNZ): Define.
12695         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
12696         properly set the tune attribute.
12697         (dbnz): Use TARGET_DBNZ guard.
12698         * config/arc/arc.opt (mtune): Add core3 option.
12700 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12702         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
12703         recognize new pic like addresses.
12704         (arc_delegitimize_address): Clean up.
12706 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12708         * config/arc/arc-arches.def: Option mrf16 valid for all
12709         architectures.
12710         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
12711         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
12712         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
12713         * config/arc/arc-tables.opt: Regenerate.
12714         * config/arc/arc.c (arc_conditional_register_usage): Handle
12715         reduced register file case.
12716         (arc_file_start): Set must have build attributes.
12717         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
12718         mrf16 option value.
12719         * config/arc/arc.opt (mrf16): Add new option.
12720         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
12721         * config/arc/genmultilib.awk: Handle new mrf16 option.
12722         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
12723         * config/arc/t-multilib: Regenerate.
12724         * doc/invoke.texi (ARC Options): Document mrf16 option.
12726 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12728         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
12729         * config/arc/arc.c (arc_handle_secure_attribute): New function.
12730         (arc_attribute_table): Add 'secure_call' attribute.
12731         (arc_print_operand): Print secure call operand.
12732         (arc_function_ok_for_sibcall): Don't optimize tail calls when
12733         secure.
12734         (arc_is_secure_call_p): New function.  * config/arc/arc.md
12735         (call_i): Add support for sjli instruction.
12736         (call_value_i): Likewise.
12737         * config/arc/constraints.md (Csc): New constraint.
12739 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12740             John Eric Martin  <John.Martin@emmicro-us.com>
12742         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
12743         * config/arc/arc.c (_arc_jli_section): New struct.
12744         (arc_jli_section): New type.
12745         (rc_jli_sections): New static variable.
12746         (arc_handle_jli_attribute): New function.
12747         (arc_attribute_table): Add jli_always and jli_fixed attribute.
12748         (arc_file_end): New function.
12749         (TARGET_ASM_FILE_END): Define.
12750         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
12751         (arc_add_jli_section): New function.
12752         (jli_call_scan): Likewise.
12753         (arc_reorg): Call jli_call_scan.
12754         (arc_output_addsi): Remove 'S' from printing asm operand.
12755         (arc_is_jli_call_p): New function.
12756         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
12757         operand.
12758         (movhi_insn): Likewise.
12759         (movsi_insn): Likewise.
12760         (movsi_set_cc_insn): Likewise.
12761         (loadqi_update): Likewise.
12762         (load_zeroextendqisi_update): Likewise.
12763         (load_signextendqisi_update): Likewise.
12764         (loadhi_update): Likewise.
12765         (load_zeroextendhisi_update): Likewise.
12766         (load_signextendhisi_update): Likewise.
12767         (loadsi_update): Likewise.
12768         (loadsf_update): Likewise.
12769         (movsicc_insn): Likewise.
12770         (bset_insn): Likewise.
12771         (bxor_insn): Likewise.
12772         (bclr_insn): Likewise.
12773         (bmsk_insn): Likewise.
12774         (bicsi3_insn): Likewise.
12775         (cmpsi_cc_c_insn): Likewise.
12776         (movsi_ne): Likewise.
12777         (movsi_cond_exec): Likewise.
12778         (clrsbsi2): Likewise.
12779         (norm_f): Likewise.
12780         (normw): Likewise.
12781         (swap): Likewise.
12782         (divaw): Likewise.
12783         (flag): Likewise.
12784         (sr): Likewise.
12785         (kflag): Likewise.
12786         (ffs): Likewise.
12787         (ffs_f): Likewise.
12788         (fls): Likewise.
12789         (call_i): Remove 'S' asm letter, add jli instruction.
12790         (call_value_i): Likewise.
12791         * config/arc/arc.op (mjli-always): New option.
12792         * config/arc/constraints.md (Cji): New constraint.
12793         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
12794         operand.
12795         (subsf3_fpx): Likewise.
12796         (mulsf3_fpx): Likewise.
12797         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
12798         asm operand.
12799         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
12800         function attrbutes.
12801         * doc/invoke.texi (ARC): Document mjli-always option.
12803 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
12805         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
12806         avoid addition with 0 and use incw and decw where possible.
12808 2018-01-26  Richard Biener  <rguenther@suse.de>
12810         PR tree-optimization/81082
12811         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
12812         association if it requires casting to unsigned.
12813         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
12814         from fold_plusminus_mult_expr to catch important cases late when
12815         range info is available.
12817 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12819         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
12820         * configure.ac (hidden_linkonce): New test.
12821         * configure: Regenerate.
12822         * config.in: Regenerate.
12824 2018-01-26  Julia Koval  <julia.koval@intel.com>
12826         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
12827         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
12828         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
12829         _mm_mask_bitshuffle_epi64_mask): Fix type.
12830         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
12831         USI_FTYPE_V4DI_V4DI_USI): Remove.
12832         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
12833         __builtin_ia32_vpshufbitqmb256_mask,
12834         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
12835         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
12836         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
12838 2018-01-26  Alan Modra  <amodra@gmail.com>
12840         PR target/84033
12841         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
12842         UNSPEC_VBPERMQ.  Sort other unspecs.
12844 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
12846         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
12848 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
12850         PR middle-end/83055
12851         * predict.c (drop_profile): Do not push/pop cfun; update also
12852         node->count.
12853         (handle_missing_profiles): Fix logic looking for zero profiles.
12855 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
12857         PR middle-end/83977
12858         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
12859         on functions with #pragma omp declare simd or functions with simd
12860         attribute.
12861         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
12862         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
12863         Remove trailing \n from warning_at calls.
12865 2018-01-25  Tom de Vries  <tom@codesourcery.com>
12867         PR target/84028
12868         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
12869         for neutered workers.
12871 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
12873         PR target/68467
12874         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
12875         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
12877 2018-01-24  Jeff Law  <law@redhat.com>
12879         PR target/83994
12880         * i386.c (get_probe_interval): Move to earlier point.
12881         (ix86_compute_frame_layout): If -fstack-clash-protection and
12882         the frame is larger than the probe interval, then use pushes
12883         to save registers rather than reg->mem moves.
12884         (ix86_expand_prologue): Remove conditional for int_registers_saved
12885         assertion.
12887 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
12889         PR target/84014
12890         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
12891         min/max for never referenced object.
12893 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
12895         PR middle-end/83977
12896         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
12897         here.
12898         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
12899         attributes from DECL_ATTRIBUTES (decl) without affecting
12900         DECL_ATTRIBUTES (current_function_decl).
12901         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
12902         functions with non-NULL DECL_ABSTRACT_ORIGIN.
12904 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
12906         PR tree-optimization/83979
12907         * fold-const.c (fold_comparison): Use constant_boolean_node
12908         instead of boolean_{true,false}_node.
12910 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
12912         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
12913         with zero counts.
12915 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12917         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12918         Simplify the clause that sets the length attribute.
12919         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12920         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
12921         clause that sets the length attribute.
12922         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12924 2018-01-24  Tom de Vries  <tom@codesourcery.com>
12926         PR target/83589
12927         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
12928         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
12929         Add strict parameter.
12930         (prevent_branch_around_nothing): Insert dummy insn between branch to
12931         label and label with no ptx insn inbetween.
12932         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
12934 2018-01-24  Tom de Vries  <tom@codesourcery.com>
12936         PR target/81352
12937         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
12938         for neutered threads in warp.
12939         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
12941 2018-01-24  Richard Biener  <rguenther@suse.de>
12943         PR tree-optimization/83176
12944         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
12945         operands.
12947 2018-01-24  Richard Biener  <rguenther@suse.de>
12949         PR tree-optimization/82819
12950         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
12951         code generating pluses that are no-ops in the target precision.
12953 2018-01-24  Richard Biener  <rguenther@suse.de>
12955         PR middle-end/84000
12956         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
12958 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
12960         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
12961         to merge probabilities.
12962         * predict.c (probably_never_executed): Also mark as cold functions
12963         with global 0 profile and guessed local profile.
12964         * profile-count.c (profile_probability::combine_with_count): New
12965         member function.
12966         * profile-count.h (profile_probability::operator*,
12967         profile_probability::operator*=, profile_probability::operator/,
12968         profile_probability::operator/=): Reduce precision to adjusted
12969         and set value to guessed on contradictory divisions.
12970         (profile_probability::combine_with_freq): Remove.
12971         (profile_probability::combine_wiht_count): Declare.
12972         (profile_count::force_nonzero):: Set to adjusted.
12973         (profile_count::probability_in):: Set quality to adjusted.
12974         * tree-ssa-tail-merge.c (replace_block_by): Use
12975         combine_with_count.
12977 2018-01-23  Andrew Waterman  <andrew@sifive.com>
12978             Jim Wilson  <jimw@sifive.com>
12980         * config/riscv/riscv.c (riscv_stack_boundary): New.
12981         (riscv_option_override): Set riscv_stack_boundary.  Handle
12982         riscv_preferred_stack_boundary_arg.
12983         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
12984         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
12985         (STACK_BOUNDARY): Set to riscv_stack_boundary.
12986         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
12987         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
12988         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
12990 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
12992         PR target/83905
12993         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
12994         of struct ix86_frame.
12995         (ix86_expand_epilogue): Likewise.  Add a local variable for
12996         the reg_save_offset field in struct ix86_frame.
12998 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
13000         PR tree-optimization/82604
13001         * tree-loop-distribution.c (enum partition_kind): New enum item
13002         PKIND_PARTIAL_MEMSET.
13003         (partition_builtin_p): Support above new enum item.
13004         (generate_code_for_partition): Ditto.
13005         (compute_access_range): Differentiate cases that equality can be
13006         proven at all loops, the innermost loops or no loops.
13007         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
13008         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
13009         (finalize_partitions, distribute_loop): Don't fuse partition of
13010         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
13011         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
13012         parloop is enabled.
13014 2018-01-23  Martin Liska  <mliska@suse.cz>
13016         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
13017         order to ignore the predictor.
13018         (PRED_POLYMORPHIC_CALL): Likewise.
13019         (PRED_RECURSIVE_CALL): Likewise.
13021 2018-01-23  Martin Liska  <mliska@suse.cz>
13023         * tree-profile.c (tree_profiling): Print function header to
13024         aware reader which function we are working on.
13025         * value-prof.c (gimple_find_values_to_profile): Do not print
13026         not interesting value histograms.
13028 2018-01-23  Martin Liska  <mliska@suse.cz>
13030         * profile-count.h (enum profile_quality): Add
13031         profile_uninitialized as the first value. Do not number values
13032         as they are zero based.
13033         (profile_count::verify): Update sanity check.
13034         (profile_probability::verify): Likewise.
13036 2018-01-23  Nathan Sidwell  <nathan@acm.org>
13038         * doc/invoke.texi (ffor-scope): Deprecate.
13040 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
13042         PR tree-optimization/83510
13043         * domwalk.c (set_all_edges_as_executable): New function.
13044         (dom_walker::dom_walker): Convert bool param
13045         "skip_unreachable_blocks" to enum reachability.  Move setup of
13046         edge flags to set_all_edges_as_executable and only do it when
13047         reachability is REACHABLE_BLOCKS.
13048         * domwalk.h (enum dom_walker::reachability): New enum.
13049         (dom_walker::dom_walker): Convert bool param
13050         "skip_unreachable_blocks" to enum reachability.
13051         (set_all_edges_as_executable): New decl.
13052         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
13053         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
13054         "reachability".
13055         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
13056         but converting true to REACHABLE_BLOCKS.
13057         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
13058         * tree-vrp.c
13059         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
13060         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
13061         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
13062         REACHABLE_BLOCKS.
13063         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
13064         if check_all_array_refs will be called.
13066 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
13068         * tree.c (selftest::test_location_wrappers): Add more test
13069         coverage.
13071 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
13073         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
13074         (selftest::test_bit_in_range): Likewise.
13076 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
13078         PR testsuite/83888
13079         * doc/sourcebuild.texi (vect_float): Say that the selector
13080         only describes the situation when -funsafe-math-optimizations is on.
13081         (vect_float_strict): Document.
13083 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
13085         PR tree-optimization/83965
13086         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
13087         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
13088         instead of checking only for a reduction.
13089         (vect_recog_widen_sum_pattern): Likewise.
13091 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
13093         * predict.c (probably_never_executed): Only use precise profile info.
13094         (compute_function_frequency): Skip after inlining hack since we now
13095         have quality checking.
13097 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
13099         * profile-count.h (profile_probability::very_unlikely,
13100         profile_probability::unlikely, profile_probability::even): Set
13101         precision to guessed.
13103 2018-01-23  Richard Biener  <rguenther@suse.de>
13105         PR tree-optimization/83963
13106         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
13107         Properly terminate dominator walk when crossing the exit edge not
13108         when visiting its source block.
13110 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
13112         PR c++/83918
13113         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
13114         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
13116 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
13118         PR tree-optimization/83957
13119         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
13120         semicolon after for body surrounded by braces.
13122         PR tree-optimization/83081
13123         * profile-count.h (profile_probability::split): New method.
13124         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
13125         Use profile_probability::split.
13126         (do_compare_rtx_and_jump): Fix adjustment of probabilities
13127         when splitting a single conditional jump into 2.
13129 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
13131         PR tree-optimization/69452
13132         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
13133         decl.
13135 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13137         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
13138         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
13139         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
13141 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13143         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
13144         declaration.
13145         * config/rl78/rl78.md (movdi): New define_expand.
13146         * config/rl78/rl78.c (rl78_split_movdi): New function.
13148 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
13150         PR target/83862
13151         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
13152         no longer used.
13153         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
13154         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
13155         128-bit to produce an UNSPEC move to get the double word with the
13156         signbit and then a shift directly to do signbit.
13157         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
13158         implementation with a new version that just does either a direct
13159         move or a regular move.  Move memory interface to separate insns.
13160         Move insns so they are next to the expander.
13161         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
13162         with signbit move.  Split big and little endian case.
13163         (signbit<mode>2_dm_mem_le): Likewise.
13164         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
13165         (signbit<mode>2_dm2): Likewise.
13167 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13169         * config/rl78/rl78.md (anddi3): New define_expand.
13171 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13173         * config/rl78/rl78.md (umindi3): New define_expand.
13175 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13177         * config/rl78/rl78.md (smindi3): New define_expand.
13179 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13181         * config/rl78/rl78.md (smaxdi3): New define_expand.
13183 2018-01-22  Carl Love  <cel@us.ibm.com>
13185         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
13186         LVX_V1TI): Add macro expansion.
13187         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
13188         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
13189         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
13190         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
13191         Change check to determine if the instruction is a byte reversing
13192         entry.  Fix typo in comment.
13193         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
13194         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
13195         Add def_builtin calls for new builtins.
13196         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
13197         Add define_insn expansion.
13199 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13201         * config/rl78/rl78.md (umaxdi3): New define_expand.
13203 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13205         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
13206         for non-QImode registers.
13208 2018-01-22  Richard Biener  <rguenther@suse.de>
13210         PR tree-optimization/83963
13211         * graphite-scop-detection.c (scop_detection::get_sese): Delay
13212         including the loop exit block.
13213         (scop_detection::merge_sese): Likewise.
13214         (scop_detection::add_scop): Do it here instead.
13216 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13218         * doc/sourcebuild.texi (arm_softfloat): Document.
13220 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
13222         PR gcc/77734
13223         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
13224         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
13225         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
13227 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13228             David Edelsohn  <dje.gcc@gmail.com>
13230         PR target/83946
13231         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
13232         Change "crset eq" to "crset 2".
13233         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
13234         (*call_indirect_aix<mode>_nospec): Likewise.
13235         (*call_value_indirect_aix<mode>_nospec): Likewise.
13236         (*call_indirect_elfv2<mode>_nospec): Likewise.
13237         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
13238         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
13239         change assembly output from . to $.
13240         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
13241         (indirect_jump<mode>_nospec): Change assembly output from . to $.
13242         (*tablejump<mode>_internal1_nospec): Likewise.
13244 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
13246         PR target/80870
13247         * config/sh/sh_optimize_sett_clrt.cc:
13248         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
13250 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
13252         PR tree-optimization/83940
13253         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
13254         offset_dt to vect_constant_def rather than vect_unknown_def_type.
13255         (vect_check_load_store_mask): Add a mask_dt_out parameter and
13256         use it to pass back the definition type.
13257         (vect_check_store_rhs): Likewise rhs_dt_out.
13258         (vect_build_gather_load_calls): Add a mask_dt argument and use
13259         it instead of a call to vect_is_simple_use.
13260         (vectorizable_store): Update calls to vect_check_load_store_mask
13261         and vect_check_store_rhs.  Use the dt returned by the latter instead
13262         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
13263         instead of calls to vect_is_simple_use.  Pass the scalar rather
13264         than the vector operand to vect_is_simple_use when handling
13265         second and subsequent copies of an rhs value.
13266         (vectorizable_load): Update calls to vect_check_load_store_mask
13267         and vect_build_gather_load_calls.  Use the cached mask_dt and
13268         gs_info.offset_dt instead of calls to vect_is_simple_use.
13270 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
13272         PR middle-end/83945
13273         * tree-emutls.c: Include gimplify.h.
13274         (lower_emutls_2): New function.
13275         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
13276         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
13277         it before further processing.
13279         PR target/83930
13280         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
13281         UINTVAL (trueop1) instead of INTVAL (op1).
13283 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
13285         PR debug/81570
13286         PR debug/83728
13287         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
13288         INCOMING_FRAME_SP_OFFSET if not defined.
13289         (scan_trace): Add ENTRY argument.  If true and
13290         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
13291         emit a note to adjust the CFA offset.
13292         (create_cfi_notes): Adjust scan_trace callers.
13293         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
13294         INCOMING_FRAME_SP_OFFSET in the CIE.
13295         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
13296         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
13297         Likewise.
13298         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
13299         * doc/tm.texi: Regenerated.
13301 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13303         PR rtl-optimization/83147
13304         * lra-constraints.c (remove_inheritance_pseudos): Use
13305         lra_substitute_pseudo_within_insn.
13307 2018-01-19  Tom de Vries  <tom@codesourcery.com>
13308             Cesar Philippidis  <cesar@codesourcery.com>
13310         PR target/83920
13311         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
13313 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
13315         PR target/83790
13316         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
13317         spaces for function labels.
13319 2018-01-19  Martin Liska  <mliska@suse.cz>
13321         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
13322         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
13323         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
13324         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
13325         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
13326         (PRED_CONST_RETURN): Change from 69 to 65.
13327         (PRED_NULL_RETURN): Change from 91 to 71.
13328         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
13329         (PRED_LOOP_GUARD): Change from 66 to 73.
13331 2018-01-19  Martin Liska  <mliska@suse.cz>
13333         * predict.c (predict_insn_def): Add new assert.
13334         (struct branch_predictor): Change type to signed integer.
13335         (test_prediction_value_range): Amend test to cover
13336         PROB_UNINITIALIZED.
13337         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
13338         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
13339         (PRED_LOOP_ITERATIONS_MAX): Likewise.
13340         (PRED_LOOP_IV_COMPARE): Likewise.
13341         * predict.h (PROB_UNINITIALIZED): Define new constant.
13343 2018-01-19  Martin Liska  <mliska@suse.cz>
13345         * predict.c (dump_prediction): Add new format for
13346         analyze_brprob.py script which is enabled with -details
13347         suboption.
13348         * profile-count.h (precise_p): New function.
13350 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
13352         PR tree-optimization/83922
13353         * tree-vect-loop.c (vect_verify_full_masking): Return false if
13354         there are no statements that need masking.
13355         (vect_active_double_reduction_p): New function.
13356         (vect_analyze_loop_operations): Use it when handling phis that
13357         are not in the loop header.
13359 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
13361         PR tree-optimization/83914
13362         * tree-vect-loop.c (vectorizable_induction): Don't convert
13363         init_expr or apply the peeling adjustment for inductions
13364         that are nested within the vectorized loop.
13366 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13368         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
13369         instead of NEG.
13371 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
13373         PR sanitizer/81715
13374         PR testsuite/83882
13375         * function.h (gimplify_parameters): Add gimple_seq * argument.
13376         * function.c: Include gimple.h and options.h.
13377         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
13378         for the added local temporaries if needed.
13379         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
13380         if there are any parameter cleanups, wrap whole body into a
13381         try/finally with the cleanups.
13383 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
13385         PR target/82964
13386         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
13387         Use GET_MODE_CLASS for scalar floating point.
13389 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
13391         PR ipa/82256
13392         patch by PaX Team
13393         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
13394         Fix call of call_cgraph_insertion_hooks.
13396 2018-01-18  Martin Sebor  <msebor@redhat.com>
13398         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
13400 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
13402         PR ipa/83619
13403         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
13404         frequencies.
13406 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
13408         PR other/70268
13409         * common.opt: (-ffile-prefix-map): New option.
13410         * opts.c (common_handle_option): Defer it.
13411         * opts-global.c (handle_common_deferred_options): Handle it.
13412         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
13413         * file-prefix-map.h: New file.
13414         (remap_debug_filename, add_debug_prefix_map): ...here.
13415         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
13416         * final.c (debug_prefix_map, add_debug_prefix_map
13417         remap_debug_filename): Move to...
13418         * file-prefix-map.c: New file.
13419         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
13420         generalize, get rid of alloca(), use strrchr() instead of strchr().
13421         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
13422         Implement in terms of add_prefix_map().
13423         (remap_macro_filename, remap_debug_filename): Implement in term of
13424         remap_filename().
13425         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
13426         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
13427         * dbxout.c: Include file-prefix-map.h.
13428         * varasm.c: Likewise.
13429         * vmsdbgout.c: Likewise.
13430         * xcoffout.c: Likewise.
13431         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
13432         * doc/cppopts.texi (-fmacro-prefix-map): Document.
13433         * doc/invoke.texi (-ffile-prefix-map): Document.
13434         (-fdebug-prefix-map): Update description.
13436 2018-01-18  Martin Liska  <mliska@suse.cz>
13438         * config/i386/i386.c (indirect_thunk_name): Document that also
13439         lfence is emitted.
13440         (output_indirect_thunk): Document why both instructions
13441         (pause and lfence) are generated.
13443 2018-01-18  Richard Biener  <rguenther@suse.de>
13445         PR tree-optimization/83887
13446         * graphite-scop-detection.c
13447         (scop_detection::get_nearest_dom_with_single_entry): Remove.
13448         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
13449         (scop_detection::merge_sese): Re-implement with a flood-fill
13450         algorithm that properly finds a SESE region if it exists.
13452 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
13454         PR c/61240
13455         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
13456         pointer_diff optimizations use view_convert instead of convert.
13458 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13460         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
13461         Generate different code for -mno-speculate-indirect-jumps.
13462         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
13463         (*call_indirect_aix<mode>): Disable for
13464         -mno-speculate-indirect-jumps.
13465         (*call_indirect_aix<mode>_nospec): New define_insn.
13466         (*call_value_indirect_aix<mode>): Disable for
13467         -mno-speculate-indirect-jumps.
13468         (*call_value_indirect_aix<mode>_nospec): New define_insn.
13469         (*sibcall_nonlocal_sysv<mode>): Generate different code for
13470         -mno-speculate-indirect-jumps.
13471         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
13473 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
13475         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
13476         long double type, set the flags for noting the default long double
13477         type, even if we don't pass or return a long double type.
13479 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
13481         PR ipa/83051
13482         * ipa-inline.c (flatten_function): Do not overwrite final inlining
13483         failure.
13485 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
13487         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
13488         support for merge[hl].
13489         (fold_mergehl_helper): New helper function.
13490         (tree-vector-builder.h): New #include for tree_vector_builder usage.
13491         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
13492         (altivec_vmrglw_direct): Add xxmrglw insn.
13494 2018-01-17  Andrew Waterman  <andrew@sifive.com>
13496         * config/riscv/riscv.c (riscv_conditional_register_usage): If
13497         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
13499 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
13501         PR lto/83121
13502         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
13503         call the lto_location_cache before reading the
13504         DECL_SOURCE_LOCATION of the types.
13506 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
13507             Richard Sandiford  <richard.sandiford@linaro.org>
13509         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
13510         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
13511         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
13512         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
13513         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
13514         Add declaration.
13515         * config/aarch64/constraints.md (aarch64_movti_operand):
13516         Limit immediates.
13517         * config/aarch64/predicates.md (Uti): Add new constraint.
13519 2018-01-17 Carl Love  <cel@us.ibm.com>
13521         * config/rs6000/vsx.md (define_expand xl_len_r,
13522         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
13523         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
13524         lxvll.
13525         (define_expand, define_insn): Move the shift left from  the
13526         define_insn to the define_expand for lxvl and stxvl instructions.
13527         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
13528         and XL_LEN_R definitions to PURE.
13530 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
13532         * config/i386/i386.c (indirect_thunk_name): Declare regno
13533         as unsigned int.  Compare regno with INVALID_REGNUM.
13534         (output_indirect_thunk): Ditto.
13535         (output_indirect_thunk_function): Ditto.
13536         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
13537         in the call to output_indirect_thunk_function.
13539 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
13541         PR middle-end/83884
13542         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
13543         rather than the size of inner_type to determine the stack slot size
13544         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
13546 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
13548         PR target/83546
13549         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
13550         to PTA_SILVERMONT.
13552 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
13554         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
13555         endian Linux systems to optionally enable multilibs for selecting
13556         the long double type if the user configured an explicit type.
13557         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
13558         have no long double multilibs if not defined.
13559         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
13560         warn if the user used -mabi={ieee,ibm}longdouble and we built
13561         multilibs for long double.
13562         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
13563         appropriate multilib option.
13564         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
13565         multilib options.
13566         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
13567         for building long double multilibs.
13568         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
13570 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
13572         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
13573         copies.
13575         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
13576         64 bits.
13577         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
13578         128 bits.
13580         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
13581         variables.
13583         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
13584         return value.
13586 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
13588         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
13589         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
13591 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13593         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
13594         different rtl trees depending on TARGET_64BIT.
13595         (rs6000_gen_lvx): Likewise.
13597 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
13599         * config/visium/visium.md (nop): Tweak comment.
13600         (hazard_nop): Likewise.
13602 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13604         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
13605         -mspeculate-indirect-jumps.
13606         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
13607         for -mno-speculate-indirect-jumps.
13608         (*call_indirect_elfv2<mode>_nospec): New define_insn.
13609         (*call_value_indirect_elfv2<mode>): Disable for
13610         -mno-speculate-indirect-jumps.
13611         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
13612         (indirect_jump): Emit different RTL for
13613         -mno-speculate-indirect-jumps.
13614         (*indirect_jump<mode>): Disable for
13615         -mno-speculate-indirect-jumps.
13616         (*indirect_jump<mode>_nospec): New define_insn.
13617         (tablejump): Emit different RTL for
13618         -mno-speculate-indirect-jumps.
13619         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
13620         (tablejumpsi_nospec): New define_expand.
13621         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
13622         (tablejumpdi_nospec): New define_expand.
13623         (*tablejump<mode>_internal1): Disable for
13624         -mno-speculate-indirect-jumps.
13625         (*tablejump<mode>_internal1_nospec): New define_insn.
13626         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
13627         option.
13629 2018-01-16  Artyom Skrobov tyomitch@gmail.com
13631         * caller-save.c (insert_save): Drop unnecessary parameter.  All
13632         callers updated.
13634 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13635             Richard Biener  <rguenth@suse.de>
13637         PR libgomp/83590
13638         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
13639         return early, inline manually is_gimple_sizepos.  Make sure if we
13640         call gimplify_expr we don't end up with a gimple constant.
13641         * tree.c (variably_modified_type_p): Don't return true for
13642         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
13643         * gimplify.h (is_gimple_sizepos): Remove.
13645 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13647         PR tree-optimization/83857
13648         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
13649         vectorizable_live_operation for pure SLP statements.
13650         (vectorizable_live_operation): Handle PHIs.
13652 2018-01-16  Richard Biener  <rguenther@suse.de>
13654         PR tree-optimization/83867
13655         * tree-vect-stmts.c (vect_transform_stmt): Precompute
13656         nested_in_vect_loop_p since the scalar stmt may get invalidated.
13658 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13660         PR c/83844
13661         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
13662         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
13663         If off is not INTEGER_CST, issue a may not be aligned warning
13664         rather than isn't aligned.  Use isn%'t rather than isn't.
13665         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
13666         into MULT_EXPR.
13667         <case MULT_EXPR>: Improve the case when bottom and one of the
13668         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
13669         operand, in that case check if the other operand is multiple of
13670         bottom divided by the INTEGER_CST operand.
13672 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13674         PR target/83858
13675         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
13676         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
13677         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
13678         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
13679         * config/pa/pa.c (pa_function_arg_advance): Likewise.
13680         (pa_function_arg, pa_arg_partial_bytes): Likewise.
13681         (pa_function_arg_size): New function.
13683 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13685         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
13686         in a separate statement.
13688 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13690         PR tree-optimization/83847
13691         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
13692         group gathers and scatters.
13694 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13696         PR rtl-optimization/86620
13697         * params.def (max-sched-ready-insns): Bump minimum value to 1.
13699         PR rtl-optimization/83213
13700         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
13701         to last if both are JUMP_INSNs.
13703         PR tree-optimization/83843
13704         * gimple-ssa-store-merging.c
13705         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
13706         store_immediate_info for bswap/nop orig_stores.
13708 2018-01-15  Andrew Waterman  <andrew@sifive.com>
13710         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
13711         !TARGET_MUL.
13712         <UDIV>: Increase cost if !TARGET_DIV.
13714 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
13716         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
13717         (define_attr "cr_logical_3op"): New.
13718         (cceq_ior_compare): Adjust.
13719         (cceq_ior_compare_complement): Adjust.
13720         (*cceq_rev_compare): Adjust.
13721         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
13722         (is_cracked_insn): Adjust.
13723         (insn_must_be_first_in_group): Adjust.
13724         * config/rs6000/40x.md: Adjust.
13725         * config/rs6000/440.md: Adjust.
13726         * config/rs6000/476.md: Adjust.
13727         * config/rs6000/601.md: Adjust.
13728         * config/rs6000/603.md: Adjust.
13729         * config/rs6000/6xx.md: Adjust.
13730         * config/rs6000/7450.md: Adjust.
13731         * config/rs6000/7xx.md: Adjust.
13732         * config/rs6000/8540.md: Adjust.
13733         * config/rs6000/cell.md: Adjust.
13734         * config/rs6000/e300c2c3.md: Adjust.
13735         * config/rs6000/e500mc.md: Adjust.
13736         * config/rs6000/e500mc64.md: Adjust.
13737         * config/rs6000/e5500.md: Adjust.
13738         * config/rs6000/e6500.md: Adjust.
13739         * config/rs6000/mpc.md: Adjust.
13740         * config/rs6000/power4.md: Adjust.
13741         * config/rs6000/power5.md: Adjust.
13742         * config/rs6000/power6.md: Adjust.
13743         * config/rs6000/power7.md: Adjust.
13744         * config/rs6000/power8.md: Adjust.
13745         * config/rs6000/power9.md: Adjust.
13746         * config/rs6000/rs64.md: Adjust.
13747         * config/rs6000/titan.md: Adjust.
13749 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13751         * config/i386/predicates.md (indirect_branch_operand): Rewrite
13752         ix86_indirect_branch_register logic.
13754 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13756         * config/i386/constraints.md (Bs): Update
13757         ix86_indirect_branch_register check.  Don't check
13758         ix86_indirect_branch_register with GOT_memory_operand.
13759         (Bw): Likewise.
13760         * config/i386/predicates.md (GOT_memory_operand): Don't check
13761         ix86_indirect_branch_register here.
13762         (GOT32_symbol_operand): Likewise.
13764 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13766         * config/i386/predicates.md (constant_call_address_operand):
13767         Rewrite ix86_indirect_branch_register logic.
13768         (sibcall_insn_operand): Likewise.
13770 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13772         * config/i386/constraints.md (Bs): Replace
13773         ix86_indirect_branch_thunk_register with
13774         ix86_indirect_branch_register.
13775         (Bw): Likewise.
13776         * config/i386/i386.md (indirect_jump): Likewise.
13777         (tablejump): Likewise.
13778         (*sibcall_memory): Likewise.
13779         (*sibcall_value_memory): Likewise.
13780         Peepholes of indirect call and jump via memory: Likewise.
13781         * config/i386/i386.opt: Likewise.
13782         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13783         (GOT_memory_operand): Likewise.
13784         (call_insn_operand): Likewise.
13785         (sibcall_insn_operand): Likewise.
13786         (GOT32_symbol_operand): Likewise.
13788 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
13790         PR middle-end/83837
13791         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
13792         type rather than type addr's type points to.
13793         (expand_omp_atomic_mutex): Likewise.
13794         (expand_omp_atomic): Likewise.
13796 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13798         PR target/83839
13799         * config/i386/i386.c (output_indirect_thunk_function): Use
13800         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
13801         for  __x86_return_thunk.
13803 2018-01-15  Richard Biener  <rguenther@suse.de>
13805         PR middle-end/83850
13806         * expmed.c (extract_bit_field_1): Fix typo.
13808 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13810         PR target/83687
13811         * config/arm/iterators.md (VF): New mode iterator.
13812         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
13813         Remove integer-related logic from pattern.
13814         (neon_vabd<mode>_3): Likewise.
13816 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
13818         PR middle-end/82694
13819         * common.opt (fstrict-overflow): No longer an alias.
13820         (fwrapv-pointer): New option.
13821         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
13822         also for pointer types based on flag_wrapv_pointer.
13823         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
13824         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
13825         opts->x_flag_wrapv got set.
13826         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
13827         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
13828         POINTER_TYPE_OVERFLOW_UNDEFINED.
13829         * match.pd: Likewise in address comparison pattern.
13830         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
13832 2018-01-15  Richard Biener  <rguenther@suse.de>
13834         PR lto/83804
13835         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
13836         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
13837         Reset type names to their identifier if their TYPE_DECL doesn't
13838         have linkage (and thus is used for ODR and devirt).
13839         (save_debug_info_for_decl): Remove.
13840         (save_debug_info_for_type): Likewise.
13841         (add_tree_to_fld_list): Adjust.
13842         * tree-pretty-print.c (dump_generic_node): Make dumping of
13843         type names more robust.
13845 2018-01-15  Richard Biener  <rguenther@suse.de>
13847         * BASE-VER: Bump to 8.0.1.
13849 2018-01-14  Martin Sebor  <msebor@redhat.com>
13851         PR other/83508
13852         * builtins.c (check_access): Avoid warning when the no-warning bit
13853         is set.
13855 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
13857         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
13858         * ira-color (allocno_hard_regs_compare): Likewise.
13860 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
13862         PR target/83013
13863         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
13864         Use .pushsection/.popsection.
13866 2018-01-14  Martin Sebor  <msebor@redhat.com>
13868         PR c++/81327
13869         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
13871 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
13873         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
13874         entry from extra_headers.
13875         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
13876         extra_headers, make the list bitwise identical to the i?86-*-* one.
13878 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13880         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
13881         -mcmodel=large with -mindirect-branch=thunk,
13882         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
13883         -mfunction-return=thunk-extern.
13884         * doc/invoke.texi: Document -mcmodel=large is incompatible with
13885         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
13886         -mfunction-return=thunk and -mfunction-return=thunk-extern.
13888 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13890         * config/i386/i386.c (print_reg): Print the name of the full
13891         integer register without '%'.
13892         (ix86_print_operand): Handle 'V'.
13893         * doc/extend.texi: Document 'V' modifier.
13895 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13897         * config/i386/constraints.md (Bs): Disallow memory operand for
13898         -mindirect-branch-register.
13899         (Bw): Likewise.
13900         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13901         (GOT_memory_operand): Likewise.
13902         (call_insn_operand): Likewise.
13903         (sibcall_insn_operand): Likewise.
13904         (GOT32_symbol_operand): Likewise.
13905         * config/i386/i386.md (indirect_jump): Call convert_memory_address
13906         for -mindirect-branch-register.
13907         (tablejump): Likewise.
13908         (*sibcall_memory): Likewise.
13909         (*sibcall_value_memory): Likewise.
13910         Disallow peepholes of indirect call and jump via memory for
13911         -mindirect-branch-register.
13912         (*call_pop): Replace m with Bw.
13913         (*call_value_pop): Likewise.
13914         (*sibcall_pop_memory): Replace m with Bs.
13915         * config/i386/i386.opt (mindirect-branch-register): New option.
13916         * doc/invoke.texi: Document -mindirect-branch-register option.
13918 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13920         * config/i386/i386-protos.h (ix86_output_function_return): New.
13921         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
13922         set function_return_type.
13923         (indirect_thunk_name): Add ret_p to indicate thunk for function
13924         return.
13925         (output_indirect_thunk_function): Pass false to
13926         indirect_thunk_name.
13927         (ix86_output_indirect_branch_via_reg): Likewise.
13928         (ix86_output_indirect_branch_via_push): Likewise.
13929         (output_indirect_thunk_function): Create alias for function
13930         return thunk if regno < 0.
13931         (ix86_output_function_return): New function.
13932         (ix86_handle_fndecl_attribute): Handle function_return.
13933         (ix86_attribute_table): Add function_return.
13934         * config/i386/i386.h (machine_function): Add
13935         function_return_type.
13936         * config/i386/i386.md (simple_return_internal): Use
13937         ix86_output_function_return.
13938         (simple_return_internal_long): Likewise.
13939         * config/i386/i386.opt (mfunction-return=): New option.
13940         (indirect_branch): Mention -mfunction-return=.
13941         * doc/extend.texi: Document function_return function attribute.
13942         * doc/invoke.texi: Document -mfunction-return= option.
13944 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13946         * config/i386/i386-opts.h (indirect_branch): New.
13947         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
13948         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
13949         with local indirect jump when converting indirect call and jump.
13950         (ix86_set_indirect_branch_type): New.
13951         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
13952         (indirectlabelno): New.
13953         (indirect_thunk_needed): Likewise.
13954         (indirect_thunk_bnd_needed): Likewise.
13955         (indirect_thunks_used): Likewise.
13956         (indirect_thunks_bnd_used): Likewise.
13957         (INDIRECT_LABEL): Likewise.
13958         (indirect_thunk_name): Likewise.
13959         (output_indirect_thunk): Likewise.
13960         (output_indirect_thunk_function): Likewise.
13961         (ix86_output_indirect_branch_via_reg): Likewise.
13962         (ix86_output_indirect_branch_via_push): Likewise.
13963         (ix86_output_indirect_branch): Likewise.
13964         (ix86_output_indirect_jmp): Likewise.
13965         (ix86_code_end): Call output_indirect_thunk_function if needed.
13966         (ix86_output_call_insn): Call ix86_output_indirect_branch if
13967         needed.
13968         (ix86_handle_fndecl_attribute): Handle indirect_branch.
13969         (ix86_attribute_table): Add indirect_branch.
13970         * config/i386/i386.h (machine_function): Add indirect_branch_type
13971         and has_local_indirect_jump.
13972         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
13973         to true.
13974         (tablejump): Likewise.
13975         (*indirect_jump): Use ix86_output_indirect_jmp.
13976         (*tablejump_1): Likewise.
13977         (simple_return_indirect_internal): Likewise.
13978         * config/i386/i386.opt (mindirect-branch=): New option.
13979         (indirect_branch): New.
13980         (keep): Likewise.
13981         (thunk): Likewise.
13982         (thunk-inline): Likewise.
13983         (thunk-extern): Likewise.
13984         * doc/extend.texi: Document indirect_branch function attribute.
13985         * doc/invoke.texi: Document -mindirect-branch= option.
13987 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
13989         PR ipa/83051
13990         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
13992 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
13994         * ipa-inline.c (want_inline_small_function_p): Return false if
13995         inlining has already failed with CIF_FINAL_ERROR.
13996         (update_caller_keys): Call want_inline_small_function_p before
13997         can_inline_edge_p.
13998         (update_callee_keys): Likewise.
14000 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14002         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
14003         New function.
14004         (rs6000_quadword_masked_address_p): Likewise.
14005         (quad_aligned_load_p): Likewise.
14006         (quad_aligned_store_p): Likewise.
14007         (const_load_sequence_p): Add comment to describe the outer-most loop.
14008         (mimic_memory_attributes_and_flags): New function.
14009         (rs6000_gen_stvx): Likewise.
14010         (replace_swapped_aligned_store): Likewise.
14011         (rs6000_gen_lvx): Likewise.
14012         (replace_swapped_aligned_load): Likewise.
14013         (replace_swapped_load_constant): Capitalize argument name in
14014         comment describing this function.
14015         (rs6000_analyze_swaps): Add a third pass to search for vector loads
14016         and stores that access quad-word aligned addresses and replace
14017         with stvx or lvx instructions when appropriate.
14018         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
14019         New function prototype.
14020         (rs6000_quadword_masked_address_p): Likewise.
14021         (rs6000_gen_lvx): Likewise.
14022         (rs6000_gen_stvx): Likewise.
14023         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
14024         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
14025         when memory address is aligned.
14026         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
14027         this split to select lvx instruction when memory address is aligned.
14028         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
14029         instruction when memory address is aligned.
14030         (*vsx_le_perm_load_v16qi): Likewise.
14031         (four unnamed splitters): Modify to select the stvx instruction
14032         when memory is aligned.
14034 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
14036         * predict.c (determine_unlikely_bbs): Handle correctly BBs
14037         which appears in the queue multiple times.
14039 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14040             Alan Hayward  <alan.hayward@arm.com>
14041             David Sherwood  <david.sherwood@arm.com>
14043         * tree-vectorizer.h (vec_lower_bound): New structure.
14044         (_loop_vec_info): Add check_nonzero and lower_bounds.
14045         (LOOP_VINFO_CHECK_NONZERO): New macro.
14046         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
14047         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
14048         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
14049         fields.  Make seg_len the distance travelled, not including the
14050         access size.
14051         (dr_direction_indicator): Declare.
14052         (dr_zero_step_indicator): Likewise.
14053         (dr_known_forward_stride_p): Likewise.
14054         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
14055         tree-ssanames.h.
14056         (runtime_alias_check_p): Allow runtime alias checks with
14057         variable strides.
14058         (operator ==): Compare access_size and align.
14059         (prune_runtime_alias_test_list): Rework for new distinction between
14060         the access_size and seg_len.
14061         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
14062         segment lengths.
14063         (get_segment_min_max): New function.
14064         (create_intersect_range_checks): Use it.
14065         (dr_step_indicator): New function.
14066         (dr_direction_indicator): Likewise.
14067         (dr_zero_step_indicator): Likewise.
14068         (dr_known_forward_stride_p): Likewise.
14069         * tree-loop-distribution.c (data_ref_segment_size): Return
14070         DR_STEP * (niters - 1).
14071         (compute_alias_check_pairs): Update call to the dr_with_seg_len
14072         constructor.
14073         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
14074         (vect_preserves_scalar_order_p): New function, split out from...
14075         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
14076         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
14077         (vect_vfa_access_size): New function.
14078         (vect_vfa_align): Likewise.
14079         (vect_compile_time_alias): Take access_size_a and access_b arguments.
14080         (dump_lower_bound): New function.
14081         (vect_check_lower_bound): Likewise.
14082         (vect_small_gap_p): Likewise.
14083         (vectorizable_with_step_bound_p): Likewise.
14084         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
14085         depencies if the vectorization factor is 1.  Convert the checks
14086         for nonzero steps into checks on the bounds of DR_STEP.  Try using
14087         a bunds check for variable steps if the minimum required step is
14088         relatively small. Update calls to the dr_with_seg_len
14089         constructor and to vect_compile_time_alias.
14090         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
14091         function.
14092         (vect_loop_versioning): Call it.
14093         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
14094         when retrying.
14095         (vect_estimate_min_profitable_iters): Account for any bounds checks.
14097 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14098             Alan Hayward  <alan.hayward@arm.com>
14099             David Sherwood  <david.sherwood@arm.com>
14101         * doc/sourcebuild.texi (vect_scatter_store): Document.
14102         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
14103         optabs.
14104         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
14105         Document.
14106         * genopinit.c (main): Add supports_vec_scatter_store and
14107         supports_vec_scatter_store_cached to target_optabs.
14108         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
14109         IFN_MASK_SCATTER_STORE.
14110         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
14111         functions.
14112         * internal-fn.h (internal_store_fn_p): Declare.
14113         (internal_fn_stored_value_index): Likewise.
14114         * internal-fn.c (scatter_store_direct): New macro.
14115         (expand_scatter_store_optab_fn): New function.
14116         (direct_scatter_store_optab_supported_p): New macro.
14117         (internal_store_fn_p): New function.
14118         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
14119         IFN_MASK_SCATTER_STORE.
14120         (internal_fn_mask_index): Likewise.
14121         (internal_fn_stored_value_index): New function.
14122         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
14123         for scatter stores.
14124         * optabs-query.h (supports_vec_scatter_store_p): Declare.
14125         * optabs-query.c (supports_vec_scatter_store_p): New function.
14126         * tree-vectorizer.h (vect_get_store_rhs): Declare.
14127         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
14128         true for scatter stores.
14129         (vect_gather_scatter_fn_p): Handle scatter stores too.
14130         (vect_check_gather_scatter): Consider using scatter stores if
14131         supports_vec_scatter_store_p.
14132         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
14133         scatter stores too.
14134         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
14135         internal_fn_stored_value_index.
14136         (check_load_store_masking): Handle scatter stores too.
14137         (vect_get_store_rhs): Make public.
14138         (vectorizable_call): Use internal_store_fn_p.
14139         (vectorizable_store): Handle scatter store internal functions.
14140         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
14141         when deciding whether the end of the group has been reached.
14142         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
14143         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
14144         (mask_scatter_store<mode>): New insns.
14146 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14147             Alan Hayward  <alan.hayward@arm.com>
14148             David Sherwood  <david.sherwood@arm.com>
14150         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
14151         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
14152         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
14153         function.
14154         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
14155         Use vect_truncate_gather_scatter_offset if we can't treat the
14156         operation as a normal gather load or scatter store.
14157         (get_group_load_store_type): Take the gather_scatter_info
14158         as argument.  Try using a gather load or scatter store for
14159         single-element groups.
14160         (get_load_store_type): Update calls to get_group_load_store_type
14161         and vect_use_strided_gather_scatters_p.
14163 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14164             Alan Hayward  <alan.hayward@arm.com>
14165             David Sherwood  <david.sherwood@arm.com>
14167         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
14168         optional tree argument.
14169         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
14170         null target hooks.
14171         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
14172         but continue to use the current value as a fallback.
14173         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
14174         to compare the updates.
14175         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
14176         (get_load_store_type): Use it when handling a strided access.
14177         (vect_get_strided_load_store_ops): New function.
14178         (vect_get_data_ptr_increment): Likewise.
14179         (vectorizable_load): Handle strided gather loads.  Always pass
14180         a step to vect_create_data_ref_ptr and bump_vector_ptr.
14182 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14183             Alan Hayward  <alan.hayward@arm.com>
14184             David Sherwood  <david.sherwood@arm.com>
14186         * doc/md.texi (gather_load@var{m}): Document.
14187         (mask_gather_load@var{m}): Likewise.
14188         * genopinit.c (main): Add supports_vec_gather_load and
14189         supports_vec_gather_load_cached to target_optabs.
14190         * optabs-tree.c (init_tree_optimization_optabs): Use
14191         ggc_cleared_alloc to allocate target_optabs.
14192         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
14193         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
14194         functions.
14195         * internal-fn.h (internal_load_fn_p): Declare.
14196         (internal_gather_scatter_fn_p): Likewise.
14197         (internal_fn_mask_index): Likewise.
14198         (internal_gather_scatter_fn_supported_p): Likewise.
14199         * internal-fn.c (gather_load_direct): New macro.
14200         (expand_gather_load_optab_fn): New function.
14201         (direct_gather_load_optab_supported_p): New macro.
14202         (direct_internal_fn_optab): New function.
14203         (internal_load_fn_p): Likewise.
14204         (internal_gather_scatter_fn_p): Likewise.
14205         (internal_fn_mask_index): Likewise.
14206         (internal_gather_scatter_fn_supported_p): Likewise.
14207         * optabs-query.c (supports_at_least_one_mode_p): New function.
14208         (supports_vec_gather_load_p): Likewise.
14209         * optabs-query.h (supports_vec_gather_load_p): Declare.
14210         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
14211         and memory_type field.
14212         (NUM_PATTERNS): Bump to 15.
14213         * tree-vect-data-refs.c: Include internal-fn.h.
14214         (vect_gather_scatter_fn_p): New function.
14215         (vect_describe_gather_scatter_call): Likewise.
14216         (vect_check_gather_scatter): Try using internal functions for
14217         gather loads.  Recognize existing calls to a gather load function.
14218         (vect_analyze_data_refs): Consider using gather loads if
14219         supports_vec_gather_load_p.
14220         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
14221         (vect_get_gather_scatter_offset_type): Likewise.
14222         (vect_convert_mask_for_vectype): Likewise.
14223         (vect_add_conversion_to_patterm): Likewise.
14224         (vect_try_gather_scatter_pattern): Likewise.
14225         (vect_recog_gather_scatter_pattern): New pattern recognizer.
14226         (vect_vect_recog_func_ptrs): Add it.
14227         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
14228         internal_fn_mask_index and internal_gather_scatter_fn_p.
14229         (check_load_store_masking): Take the gather_scatter_info as an
14230         argument and handle gather loads.
14231         (vect_get_gather_scatter_ops): New function.
14232         (vectorizable_call): Check internal_load_fn_p.
14233         (vectorizable_load): Likewise.  Handle gather load internal
14234         functions.
14235         (vectorizable_store): Update call to check_load_store_masking.
14236         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
14237         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
14238         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
14239         (aarch64_gather_scale_operand_d): New predicates.
14240         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
14241         (mask_gather_load<mode>): New insns.
14243 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14244             Alan Hayward  <alan.hayward@arm.com>
14245             David Sherwood  <david.sherwood@arm.com>
14247         * optabs.def (fold_left_plus_optab): New optab.
14248         * doc/md.texi (fold_left_plus_@var{m}): Document.
14249         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
14250         * internal-fn.c (fold_left_direct): Define.
14251         (expand_fold_left_optab_fn): Likewise.
14252         (direct_fold_left_optab_supported_p): Likewise.
14253         * fold-const-call.c (fold_const_fold_left): New function.
14254         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
14255         * tree-parloops.c (valid_reduction_p): New function.
14256         (gather_scalar_reductions): Use it.
14257         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
14258         (vect_finish_replace_stmt): Declare.
14259         * tree-vect-loop.c (fold_left_reduction_fn): New function.
14260         (needs_fold_left_reduction_p): New function, split out from...
14261         (vect_is_simple_reduction): ...here.  Accept reductions that
14262         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
14263         (vect_force_simple_reduction): Also store the reduction type in
14264         the assignment's STMT_VINFO_REDUC_TYPE.
14265         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
14266         (merge_with_identity): New function.
14267         (vect_expand_fold_left): Likewise.
14268         (vectorize_fold_left_reduction): Likewise.
14269         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
14270         scalar phi in place for it.  Check for target support and reject
14271         cases that would reassociate the operation.  Defer the transform
14272         phase to vectorize_fold_left_reduction.
14273         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
14274         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
14275         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
14277 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14279         * tree-if-conv.c (predicate_mem_writes): Remove redundant
14280         call to ifc_temp_var.
14282 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14283             Alan Hayward  <alan.hayward@arm.com>
14284             David Sherwood  <david.sherwood@arm.com>
14286         * target.def (legitimize_address_displacement): Take the original
14287         offset as a poly_int.
14288         * targhooks.h (default_legitimize_address_displacement): Update
14289         accordingly.
14290         * targhooks.c (default_legitimize_address_displacement): Likewise.
14291         * doc/tm.texi: Regenerate.
14292         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
14293         as an argument, moving assert of ad->disp == ad->disp_term to...
14294         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
14295         Try calling targetm.legitimize_address_displacement before expanding
14296         the address rather than afterwards, and adjust for the new interface.
14297         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
14298         Match the new hook interface.  Handle SVE addresses.
14299         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
14300         new hook interface.
14302 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14304         * Makefile.in (OBJS): Add early-remat.o.
14305         * target.def (select_early_remat_modes): New hook.
14306         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
14307         * doc/tm.texi: Regenerate.
14308         * targhooks.h (default_select_early_remat_modes): Declare.
14309         * targhooks.c (default_select_early_remat_modes): New function.
14310         * timevar.def (TV_EARLY_REMAT): New timevar.
14311         * passes.def (pass_early_remat): New pass.
14312         * tree-pass.h (make_pass_early_remat): Declare.
14313         * early-remat.c: New file.
14314         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
14315         function.
14316         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
14318 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14319             Alan Hayward  <alan.hayward@arm.com>
14320             David Sherwood  <david.sherwood@arm.com>
14322         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
14323         vfm1 with a bound_epilog parameter.
14324         (vect_do_peeling): Update calls accordingly, and move the prologue
14325         call earlier in the function.  Treat the base bound_epilog as 0 for
14326         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
14327         this base when peeling for gaps.
14328         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
14329         with fully-masked loops.
14330         (vect_estimate_min_profitable_iters): Handle the single peeled
14331         iteration in that case.
14333 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14334             Alan Hayward  <alan.hayward@arm.com>
14335             David Sherwood  <david.sherwood@arm.com>
14337         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
14338         single-element interleaving even if the size is not a power of 2.
14339         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
14340         accesses for single-element interleaving if the group size is
14341         not a power of 2.
14343 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14344             Alan Hayward  <alan.hayward@arm.com>
14345             David Sherwood  <david.sherwood@arm.com>
14347         * doc/md.texi (fold_extract_last_@var{m}): Document.
14348         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
14349         * optabs.def (fold_extract_last_optab): New optab.
14350         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
14351         * internal-fn.c (fold_extract_direct): New macro.
14352         (expand_fold_extract_optab_fn): Likewise.
14353         (direct_fold_extract_optab_supported_p): Likewise.
14354         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
14355         * tree-vect-loop.c (vect_model_reduction_cost): Handle
14356         EXTRACT_LAST_REDUCTION.
14357         (get_initial_def_for_reduction): Do not create an initial vector
14358         for EXTRACT_LAST_REDUCTION reductions.
14359         (vectorizable_reduction): Leave the scalar phi in place for
14360         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
14361         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
14362         epilogue code for EXTRACT_LAST_REDUCTION and defer the
14363         transform phase to vectorizable_condition.
14364         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
14365         split out from...
14366         (vect_finish_stmt_generation): ...here.
14367         (vect_finish_replace_stmt): New function.
14368         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
14369         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
14370         pattern.
14371         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
14373 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14374             Alan Hayward  <alan.hayward@arm.com>
14375             David Sherwood  <david.sherwood@arm.com>
14377         * doc/md.texi (extract_last_@var{m}): Document.
14378         * optabs.def (extract_last_optab): New optab.
14379         * internal-fn.def (EXTRACT_LAST): New internal function.
14380         * internal-fn.c (cond_unary_direct): New macro.
14381         (expand_cond_unary_optab_fn): Likewise.
14382         (direct_cond_unary_optab_supported_p): Likewise.
14383         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
14384         loops using EXTRACT_LAST.
14385         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
14386         (extract_last_<mode>): ...this optab.
14387         (vec_extract<mode><Vel>): Update accordingly.
14389 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14390             Alan Hayward  <alan.hayward@arm.com>
14391             David Sherwood  <david.sherwood@arm.com>
14393         * target.def (empty_mask_is_expensive): New hook.
14394         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
14395         * doc/tm.texi: Regenerate.
14396         * targhooks.h (default_empty_mask_is_expensive): Declare.
14397         * targhooks.c (default_empty_mask_is_expensive): New function.
14398         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
14399         if the target says that empty masks are expensive.
14400         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
14401         New function.
14402         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
14404 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14405             Alan Hayward  <alan.hayward@arm.com>
14406             David Sherwood  <david.sherwood@arm.com>
14408         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
14409         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
14410         (vect_use_loop_mask_for_alignment_p): New function.
14411         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
14412         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
14413         niters_skip argument.  Make sure that the first niters_skip elements
14414         of the first iteration are inactive.
14415         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
14416         Update call to vect_set_loop_masks_directly.
14417         (get_misalign_in_elems): New function, split out from...
14418         (vect_gen_prolog_loop_niters): ...here.
14419         (vect_update_init_of_dr): Take a code argument that specifies whether
14420         the adjustment should be added or subtracted.
14421         (vect_update_init_of_drs): Likewise.
14422         (vect_prepare_for_masked_peels): New function.
14423         (vect_do_peeling): Skip prologue peeling if we're using a mask
14424         instead.  Update call to vect_update_inits_of_drs.
14425         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14426         mask_skip_niters.
14427         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
14428         alignment.  Do not include the number of peeled iterations in
14429         the minimum threshold in that case.
14430         (vectorizable_induction): Adjust the start value down by
14431         LOOP_VINFO_MASK_SKIP_NITERS iterations.
14432         (vect_transform_loop): Call vect_prepare_for_masked_peels.
14433         Take the number of skipped iterations into account when calculating
14434         the loop bounds.
14435         * tree-vect-stmts.c (vect_gen_while_not): New function.
14437 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14438             Alan Hayward  <alan.hayward@arm.com>
14439             David Sherwood  <david.sherwood@arm.com>
14441         * doc/sourcebuild.texi (vect_fully_masked): Document.
14442         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
14443         default value to 0.
14444         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
14445         split out from...
14446         (vect_analyze_loop_2): ...here. Don't check the vectorization
14447         factor against the number of loop iterations if the loop is
14448         fully-masked.
14450 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14451             Alan Hayward  <alan.hayward@arm.com>
14452             David Sherwood  <david.sherwood@arm.com>
14454         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
14455         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
14456         (dump_groups): Update accordingly.
14457         (iv_use::mem_type): New member variable.
14458         (address_p): New function.
14459         (record_use): Add a mem_type argument and initialize the new
14460         mem_type field.
14461         (record_group_use): Add a mem_type argument.  Use address_p.
14462         Remove obsolete null checks of base_object.  Update call to record_use.
14463         (find_interesting_uses_op): Update call to record_group_use.
14464         (find_interesting_uses_cond): Likewise.
14465         (find_interesting_uses_address): Likewise.
14466         (get_mem_type_for_internal_fn): New function.
14467         (find_address_like_use): Likewise.
14468         (find_interesting_uses_stmt): Try find_address_like_use before
14469         calling find_interesting_uses_op.
14470         (addr_offset_valid_p): Use the iv mem_type field as the type
14471         of the addressed memory.
14472         (add_autoinc_candidates): Likewise.
14473         (get_address_cost): Likewise.
14474         (split_small_address_groups_p): Use address_p.
14475         (split_address_groups): Likewise.
14476         (add_iv_candidate_for_use): Likewise.
14477         (autoinc_possible_for_pair): Likewise.
14478         (rewrite_groups): Likewise.
14479         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
14480         (determine_group_iv_cost): Update after split of USE_ADDRESS.
14481         (get_alias_ptr_type_for_ptr_address): New function.
14482         (rewrite_use_address): Rewrite address uses in calls that were
14483         identified by find_address_like_use.
14485 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14486             Alan Hayward  <alan.hayward@arm.com>
14487             David Sherwood  <david.sherwood@arm.com>
14489         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
14490         TARGET_MEM_REFs.
14491         * gimple-expr.h (is_gimple_addressable: Likewise.
14492         * gimple-expr.c (is_gimple_address): Likewise.
14493         * internal-fn.c (expand_call_mem_ref): New function.
14494         (expand_mask_load_optab_fn): Use it.
14495         (expand_mask_store_optab_fn): Likewise.
14497 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14498             Alan Hayward  <alan.hayward@arm.com>
14499             David Sherwood  <david.sherwood@arm.com>
14501         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
14502         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
14503         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
14504         (cond_umax@var{mode}): Document.
14505         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
14506         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
14507         (cond_umin_optab, cond_umax_optab): New optabs.
14508         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
14509         (COND_IOR, COND_XOR): New internal functions.
14510         * internal-fn.h (get_conditional_internal_fn): Declare.
14511         * internal-fn.c (cond_binary_direct): New macro.
14512         (expand_cond_binary_optab_fn): Likewise.
14513         (direct_cond_binary_optab_supported_p): Likewise.
14514         (get_conditional_internal_fn): New function.
14515         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
14516         Cope with reduction statements that are vectorized as calls rather
14517         than assignments.
14518         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
14519         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
14520         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
14521         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
14522         (UNSPEC_COND_EOR): New unspecs.
14523         (optab): Add mappings for them.
14524         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
14525         (sve_int_op, sve_fp_op): New int attributes.
14527 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14528             Alan Hayward  <alan.hayward@arm.com>
14529             David Sherwood  <david.sherwood@arm.com>
14531         * optabs.def (while_ult_optab): New optab.
14532         * doc/md.texi (while_ult@var{m}@var{n}): Document.
14533         * internal-fn.def (WHILE_ULT): New internal function.
14534         * internal-fn.h (direct_internal_fn_supported_p): New override
14535         that takes two types as argument.
14536         * internal-fn.c (while_direct): New macro.
14537         (expand_while_optab_fn): New function.
14538         (convert_optab_supported_p): Likewise.
14539         (direct_while_optab_supported_p): New macro.
14540         * wide-int.h (wi::udiv_ceil): New function.
14541         * tree-vectorizer.h (rgroup_masks): New structure.
14542         (vec_loop_masks): New typedef.
14543         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
14544         and fully_masked_p.
14545         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
14546         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
14547         (vect_max_vf): New function.
14548         (slpeel_make_loop_iterate_ntimes): Delete.
14549         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
14550         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
14551         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
14552         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
14553         internal-fn.h, stor-layout.h and optabs-query.h.
14554         (vect_set_loop_mask): New function.
14555         (add_preheader_seq): Likewise.
14556         (add_header_seq): Likewise.
14557         (interleave_supported_p): Likewise.
14558         (vect_maybe_permute_loop_masks): Likewise.
14559         (vect_set_loop_masks_directly): Likewise.
14560         (vect_set_loop_condition_masked): Likewise.
14561         (vect_set_loop_condition_unmasked): New function, split out from
14562         slpeel_make_loop_iterate_ntimes.
14563         (slpeel_make_loop_iterate_ntimes): Rename to..
14564         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
14565         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
14566         (vect_do_peeling): Update call accordingly.
14567         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
14568         loops.
14569         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14570         mask_compare_type, can_fully_mask_p and fully_masked_p.
14571         (release_vec_loop_masks): New function.
14572         (_loop_vec_info): Use it to free the loop masks.
14573         (can_produce_all_loop_masks_p): New function.
14574         (vect_get_max_nscalars_per_iter): Likewise.
14575         (vect_verify_full_masking): Likewise.
14576         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
14577         retries, and free the mask rgroups before retrying.  Check loop-wide
14578         reasons for disallowing fully-masked loops.  Make the final decision
14579         about whether use a fully-masked loop or not.
14580         (vect_estimate_min_profitable_iters): Do not assume that peeling
14581         for the number of iterations will be needed for fully-masked loops.
14582         (vectorizable_reduction): Disable fully-masked loops.
14583         (vectorizable_live_operation): Likewise.
14584         (vect_halve_mask_nunits): New function.
14585         (vect_double_mask_nunits): Likewise.
14586         (vect_record_loop_mask): Likewise.
14587         (vect_get_loop_mask): Likewise.
14588         (vect_transform_loop): Handle the case in which the final loop
14589         iteration might handle a partial vector.  Call vect_set_loop_condition
14590         instead of slpeel_make_loop_iterate_ntimes.
14591         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
14592         (check_load_store_masking): New function.
14593         (prepare_load_store_mask): Likewise.
14594         (vectorizable_store): Handle fully-masked loops.
14595         (vectorizable_load): Likewise.
14596         (supportable_widening_operation): Use vect_halve_mask_nunits for
14597         booleans.
14598         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
14599         (vect_gen_while): New function.
14600         * config/aarch64/aarch64.md (umax<mode>3): New expander.
14601         (aarch64_uqdec<mode>): New insn.
14603 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14604             Alan Hayward  <alan.hayward@arm.com>
14605             David Sherwood  <david.sherwood@arm.com>
14607         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
14608         (reduc_xor_scal_optab): New optabs.
14609         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
14610         (reduc_xor_scal_@var{m}): Document.
14611         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
14612         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
14613         internal functions.
14614         * fold-const-call.c (fold_const_call): Handle them.
14615         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
14616         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
14617         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
14618         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
14619         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
14620         (UNSPEC_XORV): New unspecs.
14621         (optab): Add entries for them.
14622         (BITWISEV): New int iterator.
14623         (bit_reduc_op): New int attributes.
14625 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14626             Alan Hayward  <alan.hayward@arm.com>
14627             David Sherwood  <david.sherwood@arm.com>
14629         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
14630         * internal-fn.def (VEC_SHL_INSERT): New internal function.
14631         * optabs.def (vec_shl_insert_optab): New optab.
14632         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
14633         (duplicate_and_interleave): Likewise.
14634         * tree-vect-loop.c: Include internal-fn.h.
14635         (neutral_op_for_slp_reduction): New function, split out from
14636         get_initial_defs_for_reduction.
14637         (get_initial_def_for_reduction): Handle option 2 for variable-length
14638         vectors by loading the neutral value into a vector and then shifting
14639         the initial value into element 0.
14640         (get_initial_defs_for_reduction): Replace the code argument with
14641         the neutral value calculated by neutral_op_for_slp_reduction.
14642         Use gimple_build_vector for constant-length vectors.
14643         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
14644         but the first group_size elements have a neutral value.
14645         Use duplicate_and_interleave otherwise.
14646         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
14647         Update call to get_initial_defs_for_reduction.  Handle SLP
14648         reductions for variable-length vectors by creating one vector
14649         result for each scalar result, with the elements associated
14650         with other scalar results stubbed out with the neutral value.
14651         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
14652         Require IFN_VEC_SHL_INSERT for double reductions on
14653         variable-length vectors, or SLP reductions that have
14654         a neutral value.  Require can_duplicate_and_interleave_p
14655         support for variable-length unchained SLP reductions if there
14656         is no neutral value, such as for MIN/MAX reductions.  Also require
14657         the number of vector elements to be a multiple of the number of
14658         SLP statements when doing variable-length unchained SLP reductions.
14659         Update call to vect_create_epilog_for_reduction.
14660         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
14661         and remove initial values.
14662         (duplicate_and_interleave): Make public.
14663         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
14664         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
14666 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14667             Alan Hayward  <alan.hayward@arm.com>
14668             David Sherwood  <david.sherwood@arm.com>
14670         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
14671         (can_duplicate_and_interleave_p): New function.
14672         (vect_get_and_check_slp_defs): Take the vector of statements
14673         rather than just the current one.  Remove excess parentheses.
14674         Restriction rejectinon of vect_constant_def and vect_external_def
14675         for variable-length vectors to boolean types, or types for which
14676         can_duplicate_and_interleave_p is false.
14677         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
14678         (duplicate_and_interleave): New function.
14679         (vect_get_constant_vectors): Use gimple_build_vector for
14680         constant-length vectors and suitable variable-length constant
14681         vectors.  Use duplicate_and_interleave for other variable-length
14682         vectors.  Don't defer the update when inserting new statements.
14684 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14685             Alan Hayward  <alan.hayward@arm.com>
14686             David Sherwood  <david.sherwood@arm.com>
14688         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
14689         min_profitable_iters doesn't go negative.
14691 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14692             Alan Hayward  <alan.hayward@arm.com>
14693             David Sherwood  <david.sherwood@arm.com>
14695         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
14696         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
14697         * optabs.def (vec_mask_load_lanes_optab): New optab.
14698         (vec_mask_store_lanes_optab): Likewise.
14699         * internal-fn.def (MASK_LOAD_LANES): New internal function.
14700         (MASK_STORE_LANES): Likewise.
14701         * internal-fn.c (mask_load_lanes_direct): New macro.
14702         (mask_store_lanes_direct): Likewise.
14703         (expand_mask_load_optab_fn): Handle masked operations.
14704         (expand_mask_load_lanes_optab_fn): New macro.
14705         (expand_mask_store_optab_fn): Handle masked operations.
14706         (expand_mask_store_lanes_optab_fn): New macro.
14707         (direct_mask_load_lanes_optab_supported_p): Likewise.
14708         (direct_mask_store_lanes_optab_supported_p): Likewise.
14709         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
14710         parameter.
14711         (vect_load_lanes_supported): Likewise.
14712         * tree-vect-data-refs.c (strip_conversion): New function.
14713         (can_group_stmts_p): Likewise.
14714         (vect_analyze_data_ref_accesses): Use it instead of checking
14715         for a pair of assignments.
14716         (vect_store_lanes_supported): Take a masked_p parameter.
14717         (vect_load_lanes_supported): Likewise.
14718         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
14719         vect_store_lanes_supported and vect_load_lanes_supported.
14720         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14721         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
14722         parameter.  Don't allow gaps for masked accesses.
14723         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
14724         and vect_load_lanes_supported.
14725         (get_load_store_type): Take a masked_p parameter and update
14726         call to get_group_load_store_type.
14727         (vectorizable_store): Update call to get_load_store_type.
14728         Handle IFN_MASK_STORE_LANES.
14729         (vectorizable_load): Update call to get_load_store_type.
14730         Handle IFN_MASK_LOAD_LANES.
14732 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14733             Alan Hayward  <alan.hayward@arm.com>
14734             David Sherwood  <david.sherwood@arm.com>
14736         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
14737         modes for SVE.
14738         * config/aarch64/aarch64-protos.h
14739         (aarch64_sve_struct_memory_operand_p): Declare.
14740         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
14741         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
14742         (VPRED, vpred): Handle SVE structure modes.
14743         * config/aarch64/constraints.md (Utx): New constraint.
14744         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
14745         (aarch64_sve_struct_nonimmediate_operand): New predicates.
14746         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
14747         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
14748         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
14749         structure modes.  Split into pieces after RA.
14750         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
14751         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
14752         New patterns.
14753         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
14754         SVE structure modes.
14755         (aarch64_classify_address): Likewise.
14756         (sizetochar): Move earlier in file.
14757         (aarch64_print_operand): Handle SVE register lists.
14758         (aarch64_array_mode): New function.
14759         (aarch64_sve_struct_memory_operand_p): Likewise.
14760         (TARGET_ARRAY_MODE): Redefine.
14762 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14763             Alan Hayward  <alan.hayward@arm.com>
14764             David Sherwood  <david.sherwood@arm.com>
14766         * target.def (array_mode): New target hook.
14767         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
14768         * doc/tm.texi: Regenerate.
14769         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
14770         * hooks.c (hook_optmode_mode_uhwi_none): New function.
14771         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
14772         targetm.array_mode.
14773         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
14774         type sizes.
14776 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14777             Alan Hayward  <alan.hayward@arm.com>
14778             David Sherwood  <david.sherwood@arm.com>
14780         * fold-const.c (fold_binary_loc): Check the argument types
14781         rather than the result type when testing for a vector operation.
14783 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14785         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
14786         * doc/tm.texi: Regenerate.
14788 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14789             Alan Hayward  <alan.hayward@arm.com>
14790             David Sherwood  <david.sherwood@arm.com>
14792         * doc/invoke.texi (-msve-vector-bits=): Document new option.
14793         (sve): Document new AArch64 extension.
14794         * doc/md.texi (w): Extend the description of the AArch64
14795         constraint to include SVE vectors.
14796         (Upl, Upa): Document new AArch64 predicate constraints.
14797         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
14798         enum.
14799         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
14800         (msve-vector-bits=): New option.
14801         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
14802         SVE when these are disabled.
14803         (sve): New extension.
14804         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
14805         modes.  Adjust their number of units based on aarch64_sve_vg.
14806         (MAX_BITSIZE_MODE_ANY_MODE): Define.
14807         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
14808         aarch64_addr_query_type.
14809         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
14810         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
14811         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
14812         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
14813         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
14814         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
14815         (aarch64_simd_imm_zero_p): Delete.
14816         (aarch64_check_zero_based_sve_index_immediate): Declare.
14817         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
14818         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
14819         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
14820         (aarch64_sve_float_mul_immediate_p): Likewise.
14821         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
14822         rather than an rtx.
14823         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
14824         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
14825         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
14826         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
14827         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
14828         (aarch64_regmode_natural_size): Likewise.
14829         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
14830         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
14831         left one place.
14832         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
14833         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
14834         for VG and the SVE predicate registers.
14835         (V_ALIASES): Add a "z"-prefixed alias.
14836         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
14837         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
14838         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
14839         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
14840         (REG_CLASS_NAMES): Add entries for them.
14841         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
14842         and the predicate registers.
14843         (aarch64_sve_vg): Declare.
14844         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
14845         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
14846         (REGMODE_NATURAL_SIZE): Define.
14847         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
14848         SVE macros.
14849         * config/aarch64/aarch64.c: Include cfgrtl.h.
14850         (simd_immediate_info): Add a constructor for series vectors,
14851         and an associated step field.
14852         (aarch64_sve_vg): New variable.
14853         (aarch64_dbx_register_number): Handle VG and the predicate registers.
14854         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
14855         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
14856         (VEC_ANY_DATA, VEC_STRUCT): New constants.
14857         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
14858         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
14859         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
14860         (aarch64_get_mask_mode): New functions.
14861         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
14862         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
14863         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
14864         predicate modes and predicate registers.  Explicitly restrict
14865         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
14866         to store a vector mode if it is recognized by
14867         aarch64_classify_vector_mode.
14868         (aarch64_regmode_natural_size): New function.
14869         (aarch64_hard_regno_caller_save_mode): Return the original mode
14870         for predicates.
14871         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
14872         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
14873         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
14874         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
14875         functions.
14876         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
14877         does not overlap dest if the function is frame-related.  Handle
14878         SVE constants.
14879         (aarch64_split_add_offset): New function.
14880         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
14881         them aarch64_add_offset.
14882         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
14883         and update call to aarch64_sub_sp.
14884         (aarch64_add_cfa_expression): New function.
14885         (aarch64_expand_prologue): Pass extra temporary registers to the
14886         functions above.  Handle the case in which we need to emit new
14887         DW_CFA_expressions for registers that were originally saved
14888         relative to the stack pointer, but now have to be expressed
14889         relative to the frame pointer.
14890         (aarch64_output_mi_thunk): Pass extra temporary registers to the
14891         functions above.
14892         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
14893         IP0 and IP1 values for SVE frames.
14894         (aarch64_expand_vec_series): New function.
14895         (aarch64_expand_sve_widened_duplicate): Likewise.
14896         (aarch64_expand_sve_const_vector): Likewise.
14897         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
14898         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
14899         into the register, rather than emitting a SET directly.
14900         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
14901         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
14902         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
14903         (offset_9bit_signed_scaled_p): New functions.
14904         (aarch64_replicate_bitmask_imm): New function.
14905         (aarch64_bitmask_imm): Use it.
14906         (aarch64_cannot_force_const_mem): Reject expressions involving
14907         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
14908         (aarch64_classify_index): Handle SVE indices, by requiring
14909         a plain register index with a scale that matches the element size.
14910         (aarch64_classify_address): Handle SVE addresses.  Assert that
14911         the mode of the address is VOIDmode or an integer mode.
14912         Update call to aarch64_classify_symbol.
14913         (aarch64_classify_symbolic_expression): Update call to
14914         aarch64_classify_symbol.
14915         (aarch64_const_vec_all_in_range_p): New function.
14916         (aarch64_print_vector_float_operand): Likewise.
14917         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
14918         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
14919         and the FP immediates 1.0 and 0.5.
14920         (aarch64_print_address_internal): Handle SVE addresses.
14921         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
14922         (aarch64_regno_regclass): Handle predicate registers.
14923         (aarch64_secondary_reload): Handle big-endian reloads of SVE
14924         data modes.
14925         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
14926         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
14927         (aarch64_convert_sve_vector_bits): New function.
14928         (aarch64_override_options): Use it to handle -msve-vector-bits=.
14929         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
14930         rather than an rtx.
14931         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
14932         Handle SVE vector and predicate modes.  Accept VL-based constants
14933         that need only one temporary register, and VL offsets that require
14934         no temporary registers.
14935         (aarch64_conditional_register_usage): Mark the predicate registers
14936         as fixed if SVE isn't available.
14937         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
14938         Return true for SVE vector and predicate modes.
14939         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
14940         rather than an unsigned int.  Handle SVE modes.
14941         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
14942         SVE modes.
14943         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
14944         if SVE is enabled.
14945         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
14946         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
14947         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
14948         (aarch64_sve_float_mul_immediate_p): New functions.
14949         (aarch64_sve_valid_immediate): New function.
14950         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
14951         Explicitly reject structure modes.  Check for INDEX constants.
14952         Handle PTRUE and PFALSE constants.
14953         (aarch64_check_zero_based_sve_index_immediate): New function.
14954         (aarch64_simd_imm_zero_p): Delete.
14955         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
14956         vector modes.  Accept constants in the range of CNT[BHWD].
14957         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
14958         ask for an Advanced SIMD mode.
14959         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
14960         (aarch64_simd_vector_alignment): Handle SVE predicates.
14961         (aarch64_vectorize_preferred_vector_alignment): New function.
14962         (aarch64_simd_vector_alignment_reachable): Use it instead of
14963         the vector size.
14964         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
14965         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
14966         functions.
14967         (MAX_VECT_LEN): Delete.
14968         (expand_vec_perm_d): Add a vec_flags field.
14969         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
14970         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
14971         (aarch64_evpc_ext): Don't apply a big-endian lane correction
14972         for SVE modes.
14973         (aarch64_evpc_rev): Rename to...
14974         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
14975         (aarch64_evpc_rev_global): New function.
14976         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
14977         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
14978         MAX_VECT_LEN.
14979         (aarch64_evpc_sve_tbl): New function.
14980         (aarch64_expand_vec_perm_const_1): Update after rename of
14981         aarch64_evpc_rev.  Handle SVE permutes too, trying
14982         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
14983         than aarch64_evpc_tbl.
14984         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
14985         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
14986         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
14987         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
14988         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
14989         (aarch64_expand_sve_vcond): New functions.
14990         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
14991         of aarch64_vector_mode_p.
14992         (aarch64_dwarf_poly_indeterminate_value): New function.
14993         (aarch64_compute_pressure_classes): Likewise.
14994         (aarch64_can_change_mode_class): Likewise.
14995         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
14996         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
14997         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
14998         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
14999         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
15000         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
15001         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
15002         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
15003         constraints.
15004         (Dn, Dl, Dr): Accept const as well as const_vector.
15005         (Dz): Likewise.  Compare against CONST0_RTX.
15006         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
15007         of "vector" where appropriate.
15008         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
15009         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
15010         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
15011         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
15012         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
15013         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
15014         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
15015         (v_int_equiv): Extend to SVE modes.
15016         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
15017         mode attributes.
15018         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
15019         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
15020         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
15021         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
15022         (SVE_COND_FP_CMP): New int iterators.
15023         (perm_hilo): Handle the new unpack unspecs.
15024         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
15025         attributes.
15026         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
15027         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
15028         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
15029         (aarch64_equality_operator, aarch64_constant_vector_operand)
15030         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
15031         (aarch64_sve_nonimmediate_operand): Likewise.
15032         (aarch64_sve_general_operand): Likewise.
15033         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
15034         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
15035         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
15036         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
15037         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
15038         (aarch64_sve_float_arith_immediate): Likewise.
15039         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
15040         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
15041         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
15042         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
15043         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
15044         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
15045         (aarch64_sve_float_arith_operand): Likewise.
15046         (aarch64_sve_float_arith_with_sub_operand): Likewise.
15047         (aarch64_sve_float_mul_operand): Likewise.
15048         (aarch64_sve_vec_perm_operand): Likewise.
15049         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
15050         (aarch64_mov_operand): Accept const_poly_int and const_vector.
15051         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
15052         as well as const_vector.
15053         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
15054         in file.  Use CONST0_RTX and CONSTM1_RTX.
15055         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
15056         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
15057         Use aarch64_simd_imm_zero.
15058         * config/aarch64/aarch64-sve.md: New file.
15059         * config/aarch64/aarch64.md: Include it.
15060         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
15061         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
15062         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
15063         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
15064         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
15065         (sve): New attribute.
15066         (enabled): Disable instructions with the sve attribute unless
15067         TARGET_SVE.
15068         (movqi, movhi): Pass CONST_POLY_INT operaneds through
15069         aarch64_expand_mov_immediate.
15070         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
15071         CNT[BHSD] immediates.
15072         (movti): Split CONST_POLY_INT moves into two halves.
15073         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
15074         Split additions that need a temporary here if the destination
15075         is the stack pointer.
15076         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
15077         (*add<mode>3_poly_1): New instruction.
15078         (set_clobber_cc): New expander.
15080 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15082         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
15083         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
15084         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
15085         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
15086         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
15087         Change innermode from fixed_mode_size to machine_mode.
15088         (simplify_subreg): Update call accordingly.  Handle a constant-sized
15089         subreg of a variable-length CONST_VECTOR.
15091 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15092             Alan Hayward  <alan.hayward@arm.com>
15093             David Sherwood  <david.sherwood@arm.com>
15095         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
15096         (add_offset_to_base): New function, split out from...
15097         (create_mem_ref): ...here.  When handling a scale other than 1,
15098         check first whether the address is valid without the offset.
15099         Add it into the base if so, leaving the index and scale as-is.
15101 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
15103         PR c++/83778
15104         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
15105         fold_for_warn before checking if arg2 is INTEGER_CST.
15107 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
15109         * config/rs6000/predicates.md (load_multiple_operation): Delete.
15110         (store_multiple_operation): Delete.
15111         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
15112         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
15113         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
15114         guarded by TARGET_STRING.
15115         (rs6000_output_load_multiple): Delete.
15116         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
15117         OPTION_MASK_STRING / TARGET_STRING handling.
15118         (print_operand) <'N', 'O'>: Add comment that these are unused now.
15119         (const rs6000_opt_masks) <"string">: Change mask to 0.
15120         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
15121         (MASK_STRING): Delete.
15122         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
15123         parts.  Simplify.
15124         (load_multiple): Delete.
15125         (*ldmsi8): Delete.
15126         (*ldmsi7): Delete.
15127         (*ldmsi6): Delete.
15128         (*ldmsi5): Delete.
15129         (*ldmsi4): Delete.
15130         (*ldmsi3): Delete.
15131         (store_multiple): Delete.
15132         (*stmsi8): Delete.
15133         (*stmsi7): Delete.
15134         (*stmsi6): Delete.
15135         (*stmsi5): Delete.
15136         (*stmsi4): Delete.
15137         (*stmsi3): Delete.
15138         (movmemsi_8reg): Delete.
15139         (corresponding unnamed define_insn): Delete.
15140         (movmemsi_6reg): Delete.
15141         (corresponding unnamed define_insn): Delete.
15142         (movmemsi_4reg): Delete.
15143         (corresponding unnamed define_insn): Delete.
15144         (movmemsi_2reg): Delete.
15145         (corresponding unnamed define_insn): Delete.
15146         (movmemsi_1reg): Delete.
15147         (corresponding unnamed define_insn): Delete.
15148         * config/rs6000/rs6000.opt (mno-string): New.
15149         (mstring): Replace by deprecation warning stub.
15150         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
15152 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
15154         * regrename.c (regrename_do_replace): If replacing the same
15155         reg multiple times, try to reuse last created gen_raw_REG.
15157         PR debug/81155
15158         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
15159         main to workaround a bug in GDB.
15161 2018-01-12  Tom de Vries  <tom@codesourcery.com>
15163         PR target/83737
15164         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
15166 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
15168         PR rtl-optimization/80481
15169         * ira-color.c (get_cap_member): New function.
15170         (allocnos_conflict_by_live_ranges_p): Use it.
15171         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
15172         (setup_slot_coalesced_allocno_live_ranges): Ditto.
15174 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
15176         PR target/83628
15177         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
15178         (*saddl_se_1): Ditto.
15179         (*ssubsi_1): Ditto.
15180         (*ssubl_se_1): Ditto.
15182 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
15184         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
15185         rather than wi::to_widest for DR_INITs.
15186         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
15187         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
15188         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
15189         INTEGER_CSTs.
15190         (vect_analyze_group_access_1): Note that here.
15192 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
15194         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
15195         polynomial type sizes.
15197 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
15199         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
15200         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
15201         (gimple_add_tmp_var): Likewise.
15203 2018-01-12  Martin Liska  <mliska@suse.cz>
15205         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
15206         (gimple_alloc_sizes): Likewise.
15207         (dump_gimple_statistics): Use PRIu64 in printf format.
15208         * gimple.h: Change uint64_t to int.
15210 2018-01-12  Martin Liska  <mliska@suse.cz>
15212         * tree-core.h: Use uint64_t instead of int.
15213         * tree.c (tree_node_counts): Likewise.
15214         (tree_node_sizes): Likewise.
15215         (dump_tree_statistics): Use PRIu64 in printf format.
15217 2018-01-12  Martin Liska  <mliska@suse.cz>
15219         * Makefile.in: As qsort_chk is implemented in vec.c, add
15220         vec.o to linkage of gencfn-macros.
15221         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
15222         passing the info to record_node_allocation_statistics.
15223         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
15224         and pass the info.
15225         * ggc-common.c (struct ggc_usage): Add operator== and use
15226         it in operator< and compare function.
15227         * mem-stats.h (struct mem_usage): Likewise.
15228         * vec.c (struct vec_usage): Remove operator< and compare
15229         function. Can be simply inherited.
15231 2018-01-12  Martin Jambor  <mjambor@suse.cz>
15233         PR target/81616
15234         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
15235         * tree-ssa-math-opts.c: Include domwalk.h.
15236         (convert_mult_to_fma_1): New function.
15237         (fma_transformation_info): New type.
15238         (fma_deferring_state): Likewise.
15239         (cancel_fma_deferring): New function.
15240         (result_of_phi): Likewise.
15241         (last_fma_candidate_feeds_initial_phi): Likewise.
15242         (convert_mult_to_fma): Added deferring logic, split actual
15243         transformation to convert_mult_to_fma_1.
15244         (math_opts_dom_walker): New type.
15245         (math_opts_dom_walker::after_dom_children): New method, body moved
15246         here from pass_optimize_widening_mul::execute, added deferring logic
15247         bits.
15248         (pass_optimize_widening_mul::execute): Moved most of code to
15249         math_opts_dom_walker::after_dom_children.
15250         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
15251         * config/i386/i386.c (ix86_option_override_internal): Added
15252         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
15254 2018-01-12  Richard Biener  <rguenther@suse.de>
15256         PR debug/83157
15257         * dwarf2out.c (gen_variable_die): Do not reset old_die for
15258         inline instance vars.
15260 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
15262         PR target/81819
15263         * config/rx/rx.c (rx_is_restricted_memory_address):
15264         Handle SUBREG case.
15266 2018-01-12  Richard Biener  <rguenther@suse.de>
15268         PR tree-optimization/80846
15269         * target.def (split_reduction): New target hook.
15270         * targhooks.c (default_split_reduction): New function.
15271         * targhooks.h (default_split_reduction): Declare.
15272         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
15273         target requests first reduce vectors by combining low and high
15274         parts.
15275         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
15276         (get_vectype_for_scalar_type_and_size): Export.
15277         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
15278         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
15279         * doc/tm.texi: Regenerate.
15280         * config/i386/i386.c (ix86_split_reduction): Implement
15281         TARGET_VECTORIZE_SPLIT_REDUCTION.
15283 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
15285         PR target/83368
15286         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
15287         in PIC mode except for TARGET_VXWORKS_RTP.
15288         * config/sparc/sparc.c: Include cfgrtl.h.
15289         (TARGET_INIT_PIC_REG): Define.
15290         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
15291         (sparc_pic_register_p): New predicate.
15292         (sparc_legitimate_address_p): Use it.
15293         (sparc_legitimize_pic_address): Likewise.
15294         (sparc_delegitimize_address): Likewise.
15295         (sparc_mode_dependent_address_p): Likewise.
15296         (gen_load_pcrel_sym): Remove 4th parameter.
15297         (load_got_register): Adjust call to above.  Remove obsolete stuff.
15298         (sparc_expand_prologue): Do not call load_got_register here.
15299         (sparc_flat_expand_prologue): Likewise.
15300         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
15301         (sparc_use_pseudo_pic_reg): New function.
15302         (sparc_init_pic_reg): Likewise.
15303         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15304         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
15306 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
15308         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
15309         Add item for branch_cost.
15311 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
15313         PR rtl-optimization/83565
15314         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
15315         not extend the result to a larger mode for rotate operations.
15316         (num_sign_bit_copies1): Likewise.
15318 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15320         PR target/40411
15321         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
15322         -symbolic.
15323         Use values-Xc.o for -pedantic.
15324         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
15326 2018-01-12  Martin Liska  <mliska@suse.cz>
15328         PR ipa/83054
15329         * ipa-devirt.c (final_warning_record::grow_type_warnings):
15330         New function.
15331         (possible_polymorphic_call_targets): Use it.
15332         (ipa_devirt): Likewise.
15334 2018-01-12  Martin Liska  <mliska@suse.cz>
15336         * profile-count.h (enum profile_quality): Use 0 as invalid
15337         enum value of profile_quality.
15339 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
15341         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
15342         -mext-string options.
15344 2018-01-12  Richard Biener  <rguenther@suse.de>
15346         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
15347         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
15348         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
15349         Likewise.
15350         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
15352 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
15354         * configure.ac (--with-long-double-format): Add support for the
15355         configuration option to change the default long double format on
15356         PowerPC systems.
15357         * config.gcc (powerpc*-linux*-*): Likewise.
15358         * configure: Regenerate.
15359         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
15360         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
15361         used without modification.
15363 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15365         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
15366         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
15367         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
15368         MISC_BUILTIN_SPEC_BARRIER.
15369         (rs6000_init_builtins): Likewise.
15370         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
15371         enum value.
15372         (speculation_barrier): New define_insn.
15373         * doc/extend.texi: Document __builtin_speculation_barrier.
15375 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
15377         PR target/83203
15378         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
15379         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
15380         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
15381         iterators.
15382         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
15383         integral modes instead of "ss" and "sd".
15384         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
15385         vectors with 32-bit and 64-bit elements.
15386         (vecdupssescalarmodesuffix): New mode attribute.
15387         (vec_dup<mode>): Use it.
15389 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
15391         PR target/83330
15392         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
15393         frame if argument is passed on stack.
15395 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
15397         PR target/82682
15398         * ree.c (combine_reaching_defs): Optimize also
15399         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
15400         reg2=any_extend(exp); reg1=reg2;, formatting fix.
15402 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
15404         PR middle-end/83189
15405         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
15407 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
15409         PR middle-end/83718
15410         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
15411         after they are computed.
15413 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
15415         PR tree-optimization/83695
15416         * gimple-loop-linterchange.cc
15417         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
15418         reset cached scev information after interchange.
15419         (pass_linterchange::execute): Remove call to scev_reset_htab.
15421 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15423         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
15424         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
15425         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
15426         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
15427         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
15428         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
15429         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
15430         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
15431         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
15432         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
15433         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
15434         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
15435         (V_lane_reg): Likewise.
15436         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
15437         New define_expand.
15438         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
15439         (vfmal_lane_low<mode>_intrinsic,
15440         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
15441         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
15442         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
15443         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
15444         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
15445         vfmsl_lane_high<mode>_intrinsic): New define_insns.
15447 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15449         * config/arm/arm-cpus.in (fp16fml): New feature.
15450         (ALL_SIMD): Add fp16fml.
15451         (armv8.2-a): Add fp16fml as an option.
15452         (armv8.3-a): Likewise.
15453         (armv8.4-a): Add fp16fml as part of fp16.
15454         * config/arm/arm.h (TARGET_FP16FML): Define.
15455         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
15456         when appropriate.
15457         * config/arm/arm-modes.def (V2HF): Define.
15458         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
15459         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
15460         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
15461         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
15462         vfmsl_low, vfmsl_high): New set of builtins.
15463         * config/arm/iterators.md (PLUSMINUS): New code iterator.
15464         (vfml_op): New code attribute.
15465         (VFMLHALVES): New int iterator.
15466         (VFML, VFMLSEL): New mode attributes.
15467         (V_reg): Define mapping for V2HF.
15468         (V_hi, V_lo): New mode attributes.
15469         (VF_constraint): Likewise.
15470         (vfml_half, vfml_half_selector): New int attributes.
15471         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
15472         define_expand.
15473         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
15474         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
15475         New define_insn.
15476         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
15477         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
15478         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
15479         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
15480         documentation.
15481         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
15482         Document new effective target and option set.
15484 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15486         * config/arm/arm-cpus.in (armv8_4): New feature.
15487         (ARMv8_4a): New fgroup.
15488         (armv8.4-a): New arch.
15489         * config/arm/arm-tables.opt: Regenerate.
15490         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
15491         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
15492         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
15493         Add matching rules for -march=armv8.4-a and extensions.
15494         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
15496 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
15498         PR target/81821
15499         * config/rx/rx.md (BW): New mode attribute.
15500         (sync_lock_test_and_setsi): Add mode suffix to insn output.
15502 2018-01-11  Richard Biener  <rguenther@suse.de>
15504         PR tree-optimization/83435
15505         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
15506         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
15507         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
15509 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15510             Alan Hayward  <alan.hayward@arm.com>
15511             David Sherwood  <david.sherwood@arm.com>
15513         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
15514         field.
15515         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
15516         (aarch64_print_address_internal): Use it to check for a zero offset.
15518 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15519             Alan Hayward  <alan.hayward@arm.com>
15520             David Sherwood  <david.sherwood@arm.com>
15522         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
15523         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
15524         Return a poly_int64 rather than a HOST_WIDE_INT.
15525         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
15526         rather than a HOST_WIDE_INT.
15527         * config/aarch64/aarch64.h (aarch64_frame): Protect with
15528         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
15529         hard_fp_offset, frame_size, initial_adjust, callee_offset and
15530         final_offset from HOST_WIDE_INT to poly_int64.
15531         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
15532         to_constant when getting the number of units in an Advanced SIMD
15533         mode.
15534         (aarch64_builtin_vectorized_function): Check for a constant number
15535         of units.
15536         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
15537         GET_MODE_SIZE.
15538         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
15539         attribute instead of GET_MODE_NUNITS.
15540         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
15541         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
15542         GET_MODE_SIZE for fixed-size registers.
15543         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
15544         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
15545         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
15546         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
15547         (aarch64_print_operand, aarch64_print_address_internal)
15548         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
15549         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
15550         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
15551         Handle polynomial GET_MODE_SIZE.
15552         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
15553         wider than SImode without modification.
15554         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
15555         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
15556         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
15557         passing and returning SVE modes.
15558         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
15559         rather than GEN_INT.
15560         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
15561         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
15562         (aarch64_allocate_and_probe_stack_space): Likewise.
15563         (aarch64_layout_frame): Cope with polynomial offsets.
15564         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
15565         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
15566         polynomial offsets.
15567         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
15568         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
15569         poly_int64 rather than a HOST_WIDE_INT.
15570         (aarch64_get_separate_components, aarch64_process_components)
15571         (aarch64_expand_prologue, aarch64_expand_epilogue)
15572         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
15573         (aarch64_anchor_offset): New function, split out from...
15574         (aarch64_legitimize_address): ...here.
15575         (aarch64_builtin_vectorization_cost): Handle polynomial
15576         TYPE_VECTOR_SUBPARTS.
15577         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
15578         GET_MODE_NUNITS.
15579         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
15580         number of elements from the PARALLEL rather than the mode.
15581         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
15582         rather than GET_MODE_BITSIZE.
15583         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
15584         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
15585         (aarch64_expand_vec_perm_const_1): Handle polynomial
15586         d->perm.length () and d->perm elements.
15587         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
15588         Apply to_constant to d->perm elements.
15589         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
15590         polynomial CONST_VECTOR_NUNITS.
15591         (aarch64_move_pointer): Take amount as a poly_int64 rather
15592         than an int.
15593         (aarch64_progress_pointer): Avoid temporary variable.
15594         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
15595         the mode attribute instead of GET_MODE.
15597 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15598             Alan Hayward  <alan.hayward@arm.com>
15599             David Sherwood  <david.sherwood@arm.com>
15601         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
15602         x exists before using it.
15603         (aarch64_add_constant_internal): Rename to...
15604         (aarch64_add_offset_1): ...this.  Replace regnum with separate
15605         src and dest rtxes.  Handle the case in which they're different,
15606         including when the offset is zero.  Replace scratchreg with an rtx.
15607         Use 2 additions if there is no spare register into which we can
15608         move a 16-bit constant.
15609         (aarch64_add_constant): Delete.
15610         (aarch64_add_offset): Replace reg with separate src and dest
15611         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
15612         Use aarch64_add_offset_1.
15613         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
15614         an rtx rather than an int.  Take the delta as a poly_int64
15615         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
15616         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
15617         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
15618         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
15619         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
15620         and aarch64_add_sp.
15621         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
15622         aarch64_add_constant.
15624 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15626         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
15627         Use scalar_float_mode.
15629 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15631         * config/aarch64/aarch64-simd.md
15632         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
15633         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
15634         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
15635         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
15636         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
15637         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
15638         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
15639         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
15640         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
15641         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
15643 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15645         PR target/83514
15646         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
15647         targ_options->x_arm_arch_string is non NULL.
15649 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
15651         * config/aarch64/aarch64.h
15652         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
15654 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
15656         PR target/82096
15657         * expmed.c (emit_store_flag_force): Swap if const op0
15658         and change VOIDmode to mode of op0.
15660 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15662         PR rtl-optimization/83761
15663         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
15664         than bytes to mode_for_size.
15666 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
15668         PR middle-end/83189
15669         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
15670         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
15671         profile.
15673 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
15675         PR middle-end/83575
15676         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
15677         when in layout mode.
15678         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
15679         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
15680         partition fixup.
15682 2018-01-10  Michael Collison  <michael.collison@arm.com>
15684         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
15685         * config/aarch64/aarch64-option-extension.def: Add
15686         AARCH64_OPT_EXTENSION of 'fp16fml'.
15687         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15688         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
15689         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
15690         * config/aarch64/constraints.md (Ui7): New constraint.
15691         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
15692         (VFMLA_SEL_W): Ditto.
15693         (f16quad): Ditto.
15694         (f16mac1): Ditto.
15695         (VFMLA16_LOW): New int iterator.
15696         (VFMLA16_HIGH): Ditto.
15697         (UNSPEC_FMLAL): New unspec.
15698         (UNSPEC_FMLSL): Ditto.
15699         (UNSPEC_FMLAL2): Ditto.
15700         (UNSPEC_FMLSL2): Ditto.
15701         (f16mac): New code attribute.
15702         * config/aarch64/aarch64-simd-builtins.def
15703         (aarch64_fmlal_lowv2sf): Ditto.
15704         (aarch64_fmlsl_lowv2sf): Ditto.
15705         (aarch64_fmlalq_lowv4sf): Ditto.
15706         (aarch64_fmlslq_lowv4sf): Ditto.
15707         (aarch64_fmlal_highv2sf): Ditto.
15708         (aarch64_fmlsl_highv2sf): Ditto.
15709         (aarch64_fmlalq_highv4sf): Ditto.
15710         (aarch64_fmlslq_highv4sf): Ditto.
15711         (aarch64_fmlal_lane_lowv2sf): Ditto.
15712         (aarch64_fmlsl_lane_lowv2sf): Ditto.
15713         (aarch64_fmlal_laneq_lowv2sf): Ditto.
15714         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
15715         (aarch64_fmlalq_lane_lowv4sf): Ditto.
15716         (aarch64_fmlsl_lane_lowv4sf): Ditto.
15717         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
15718         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
15719         (aarch64_fmlal_lane_highv2sf): Ditto.
15720         (aarch64_fmlsl_lane_highv2sf): Ditto.
15721         (aarch64_fmlal_laneq_highv2sf): Ditto.
15722         (aarch64_fmlsl_laneq_highv2sf): Ditto.
15723         (aarch64_fmlalq_lane_highv4sf): Ditto.
15724         (aarch64_fmlsl_lane_highv4sf): Ditto.
15725         (aarch64_fmlalq_laneq_highv4sf): Ditto.
15726         (aarch64_fmlsl_laneq_highv4sf): Ditto.
15727         * config/aarch64/aarch64-simd.md:
15728         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
15729         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
15730         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
15731         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
15732         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
15733         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
15734         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
15735         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
15736         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
15737         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
15738         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
15739         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
15740         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
15741         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
15742         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
15743         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
15744         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
15745         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
15746         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
15747         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
15748         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
15749         (vfmlsl_low_u32): Ditto.
15750         (vfmlalq_low_u32): Ditto.
15751         (vfmlslq_low_u32): Ditto.
15752         (vfmlal_high_u32): Ditto.
15753         (vfmlsl_high_u32): Ditto.
15754         (vfmlalq_high_u32): Ditto.
15755         (vfmlslq_high_u32): Ditto.
15756         (vfmlal_lane_low_u32): Ditto.
15757         (vfmlsl_lane_low_u32): Ditto.
15758         (vfmlal_laneq_low_u32): Ditto.
15759         (vfmlsl_laneq_low_u32): Ditto.
15760         (vfmlalq_lane_low_u32): Ditto.
15761         (vfmlslq_lane_low_u32): Ditto.
15762         (vfmlalq_laneq_low_u32): Ditto.
15763         (vfmlslq_laneq_low_u32): Ditto.
15764         (vfmlal_lane_high_u32): Ditto.
15765         (vfmlsl_lane_high_u32): Ditto.
15766         (vfmlal_laneq_high_u32): Ditto.
15767         (vfmlsl_laneq_high_u32): Ditto.
15768         (vfmlalq_lane_high_u32): Ditto.
15769         (vfmlslq_lane_high_u32): Ditto.
15770         (vfmlalq_laneq_high_u32): Ditto.
15771         (vfmlslq_laneq_high_u32): Ditto.
15772         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
15773         (AARCH64_FL_FOR_ARCH8_4): New.
15774         (AARCH64_ISA_F16FML): New ISA flag.
15775         (TARGET_F16FML): New feature flag for fp16fml.
15776         (doc/invoke.texi): Document new fp16fml option.
15778 2018-01-10  Michael Collison  <michael.collison@arm.com>
15780         * config/aarch64/aarch64-builtins.c:
15781         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
15782         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15783         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
15784         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
15785         (AARCH64_ISA_SHA3): New ISA flag.
15786         (TARGET_SHA3): New feature flag for sha3.
15787         * config/aarch64/iterators.md (sha512_op): New int attribute.
15788         (CRYPTO_SHA512): New int iterator.
15789         (UNSPEC_SHA512H): New unspec.
15790         (UNSPEC_SHA512H2): Ditto.
15791         (UNSPEC_SHA512SU0): Ditto.
15792         (UNSPEC_SHA512SU1): Ditto.
15793         * config/aarch64/aarch64-simd-builtins.def
15794         (aarch64_crypto_sha512hqv2di): New builtin.
15795         (aarch64_crypto_sha512h2qv2di): Ditto.
15796         (aarch64_crypto_sha512su0qv2di): Ditto.
15797         (aarch64_crypto_sha512su1qv2di): Ditto.
15798         (aarch64_eor3qv8hi): Ditto.
15799         (aarch64_rax1qv2di): Ditto.
15800         (aarch64_xarqv2di): Ditto.
15801         (aarch64_bcaxqv8hi): Ditto.
15802         * config/aarch64/aarch64-simd.md:
15803         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
15804         (aarch64_crypto_sha512su0qv2di): Ditto.
15805         (aarch64_crypto_sha512su1qv2di): Ditto.
15806         (aarch64_eor3qv8hi): Ditto.
15807         (aarch64_rax1qv2di): Ditto.
15808         (aarch64_xarqv2di): Ditto.
15809         (aarch64_bcaxqv8hi): Ditto.
15810         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
15811         (vsha512h2q_u64): Ditto.
15812         (vsha512su0q_u64): Ditto.
15813         (vsha512su1q_u64): Ditto.
15814         (veor3q_u16): Ditto.
15815         (vrax1q_u64): Ditto.
15816         (vxarq_u64): Ditto.
15817         (vbcaxq_u16): Ditto.
15818         * config/arm/types.md (crypto_sha512): New type attribute.
15819         (crypto_sha3): Ditto.
15820         (doc/invoke.texi): Document new sha3 option.
15822 2018-01-10  Michael Collison  <michael.collison@arm.com>
15824         * config/aarch64/aarch64-builtins.c:
15825         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
15826         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15827         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
15828         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
15829         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
15830         (AARCH64_ISA_SM4): New ISA flag.
15831         (TARGET_SM4): New feature flag for sm4.
15832         * config/aarch64/aarch64-simd-builtins.def
15833         (aarch64_sm3ss1qv4si): Ditto.
15834         (aarch64_sm3tt1aq4si): Ditto.
15835         (aarch64_sm3tt1bq4si): Ditto.
15836         (aarch64_sm3tt2aq4si): Ditto.
15837         (aarch64_sm3tt2bq4si): Ditto.
15838         (aarch64_sm3partw1qv4si): Ditto.
15839         (aarch64_sm3partw2qv4si): Ditto.
15840         (aarch64_sm4eqv4si): Ditto.
15841         (aarch64_sm4ekeyqv4si): Ditto.
15842         * config/aarch64/aarch64-simd.md:
15843         (aarch64_sm3ss1qv4si): Ditto.
15844         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
15845         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
15846         (aarch64_sm4eqv4si): Ditto.
15847         (aarch64_sm4ekeyqv4si): Ditto.
15848         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
15849         (sm3part_op): Ditto.
15850         (CRYPTO_SM3TT): Ditto.
15851         (CRYPTO_SM3PART): Ditto.
15852         (UNSPEC_SM3SS1): New unspec.
15853         (UNSPEC_SM3TT1A): Ditto.
15854         (UNSPEC_SM3TT1B): Ditto.
15855         (UNSPEC_SM3TT2A): Ditto.
15856         (UNSPEC_SM3TT2B): Ditto.
15857         (UNSPEC_SM3PARTW1): Ditto.
15858         (UNSPEC_SM3PARTW2): Ditto.
15859         (UNSPEC_SM4E): Ditto.
15860         (UNSPEC_SM4EKEY): Ditto.
15861         * config/aarch64/constraints.md (Ui2): New constraint.
15862         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
15863         * config/arm/types.md (crypto_sm3): New type attribute.
15864         (crypto_sm4): Ditto.
15865         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
15866         (vsm3tt1aq_u32): Ditto.
15867         (vsm3tt1bq_u32): Ditto.
15868         (vsm3tt2aq_u32): Ditto.
15869         (vsm3tt2bq_u32): Ditto.
15870         (vsm3partw1q_u32): Ditto.
15871         (vsm3partw2q_u32): Ditto.
15872         (vsm4eq_u32): Ditto.
15873         (vsm4ekeyq_u32): Ditto.
15874         (doc/invoke.texi): Document new sm4 option.
15876 2018-01-10  Michael Collison  <michael.collison@arm.com>
15878         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
15879         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
15880         (AARCH64_FL_FOR_ARCH8_4): New.
15881         (AARCH64_FL_V8_4): New flag.
15882         (doc/invoke.texi): Document new armv8.4-a option.
15884 2018-01-10  Michael Collison  <michael.collison@arm.com>
15886         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15887         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
15888         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
15889         * config/aarch64/aarch64-option-extension.def: Add
15890         AARCH64_OPT_EXTENSION of 'sha2'.
15891         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
15892         (crypto): Disable sha2 and aes if crypto disabled.
15893         (crypto): Enable aes and sha2 if enabled.
15894         (simd): Disable sha2 and aes if simd disabled.
15895         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
15896         New flags.
15897         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
15898         (TARGET_SHA2): New feature flag for sha2.
15899         (TARGET_AES): New feature flag for aes.
15900         * config/aarch64/aarch64-simd.md:
15901         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
15902         conditional on TARGET_AES.
15903         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
15904         (aarch64_crypto_sha1hsi): Make pattern conditional
15905         on TARGET_SHA2.
15906         (aarch64_crypto_sha1hv4si): Ditto.
15907         (aarch64_be_crypto_sha1hv4si): Ditto.
15908         (aarch64_crypto_sha1su1v4si): Ditto.
15909         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
15910         (aarch64_crypto_sha1su0v4si): Ditto.
15911         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
15912         (aarch64_crypto_sha256su0v4si): Ditto.
15913         (aarch64_crypto_sha256su1v4si): Ditto.
15914         (doc/invoke.texi): Document new aes and sha2 options.
15916 2018-01-10  Martin Sebor  <msebor@redhat.com>
15918         PR tree-optimization/83781
15919         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
15920         as string arrays.
15922 2018-01-11  Martin Sebor  <msebor@gmail.com>
15923             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15925         PR tree-optimization/83501
15926         PR tree-optimization/81703
15928         * tree-ssa-strlen.c (get_string_cst): Rename...
15929         (get_string_len): ...to this.  Handle global constants.
15930         (handle_char_store): Adjust.
15932 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
15933             Jim Wilson  <jimw@sifive.com>
15935         * config/riscv/riscv-protos.h (riscv_output_return): New.
15936         * config/riscv/riscv.c (struct machine_function): New naked_p field.
15937         (riscv_attribute_table, riscv_output_return),
15938         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
15939         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
15940         (riscv_compute_frame_info): Only compute frame->mask if not a naked
15941         function.
15942         (riscv_expand_prologue): Add early return for naked function.
15943         (riscv_expand_epilogue): Likewise.
15944         (riscv_function_ok_for_sibcall): Return false for naked function.
15945         (riscv_set_current_function): New.
15946         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
15947         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
15948         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
15949         * doc/extend.texi (RISC-V Function Attributes): New.
15951 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
15953         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
15954         check for 128-bit long double before checking TCmode.
15955         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
15956         128-bit long doubles before checking TFmode or TCmode.
15957         (FLOAT128_IBM_P): Likewise.
15959 2018-01-10  Martin Sebor  <msebor@redhat.com>
15961         PR tree-optimization/83671
15962         * builtins.c (c_strlen): Unconditionally return zero for the empty
15963         string.
15964         Use -Warray-bounds for warnings.
15965         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
15966         for non-constant array indices with COMPONENT_REF, arrays of
15967         arrays, and pointers to arrays.
15968         (gimple_fold_builtin_strlen): Determine and set length range for
15969         non-constant character arrays.
15971 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
15973         PR middle-end/81897
15974         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
15975         empty blocks.
15977 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
15979         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
15981 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
15983         PR target/83399
15984         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
15985         VECTOR_MEM_ALTIVEC_OR_VSX_P.
15986         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
15987         indexed_or_indirect_operand predicate.
15988         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
15989         (*vsx_le_perm_load_v8hi): Likewise.
15990         (*vsx_le_perm_load_v16qi): Likewise.
15991         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
15992         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
15993         (*vsx_le_perm_store_v8hi): Likewise.
15994         (*vsx_le_perm_store_v16qi): Likewise.
15995         (eight unnamed splitters): Likewise.
15997 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
15999         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
16000         * config/rs6000/emmintrin.h: Likewise.
16001         * config/rs6000/mmintrin.h: Likewise.
16002         * config/rs6000/xmmintrin.h: Likewise.
16004 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
16006         PR c++/43486
16007         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
16008         "public_flag".
16009         * tree.c (tree_nop_conversion): Return true for location wrapper
16010         nodes.
16011         (maybe_wrap_with_location): New function.
16012         (selftest::check_strip_nops): New function.
16013         (selftest::test_location_wrappers): New function.
16014         (selftest::tree_c_tests): Call it.
16015         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
16016         (maybe_wrap_with_location): New decl.
16017         (EXPR_LOCATION_WRAPPER_P): New macro.
16018         (location_wrapper_p): New inline function.
16019         (tree_strip_any_location_wrapper): New inline function.
16021 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
16023         PR target/83735
16024         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
16025         stack_realign_offset for the largest alignment of stack slot
16026         actually used.
16027         (ix86_find_max_used_stack_alignment): New function.
16028         (ix86_finalize_stack_frame_flags): Use it.  Set
16029         max_used_stack_alignment if we don't realign stack.
16030         * config/i386/i386.h (machine_function): Add
16031         max_used_stack_alignment.
16033 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
16035         * config/arm/arm.opt (-mbranch-cost): New option.
16036         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
16037         account.
16039 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
16041         PR target/83629
16042         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
16043         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
16045 2018-01-10  Richard Biener  <rguenther@suse.de>
16047         PR debug/83765
16048         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
16049         early out so it also covers the case where we have a non-NULL
16050         origin.
16052 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
16054         PR tree-optimization/83753
16055         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
16056         for non-strided grouped accesses if the number of elements is 1.
16058 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
16060         PR target/81616
16061         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
16062         * i386.h (TARGET_USE_GATHER): Define.
16063         * x86-tune.def (X86_TUNE_USE_GATHER): New.
16065 2018-01-10  Martin Liska  <mliska@suse.cz>
16067         PR bootstrap/82831
16068         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
16069         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
16070         partitioning.
16071         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
16072         CLEANUP_NO_PARTITIONING is not set.
16074 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
16076         * doc/rtl.texi: Remove documentation of (const ...) wrappers
16077         for vectors, as a partial revert of r254296.
16078         * rtl.h (const_vec_p): Delete.
16079         (const_vec_duplicate_p): Don't test for vector CONSTs.
16080         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
16081         * expmed.c (make_tree): Likewise.
16083         Revert:
16084         * common.md (E, F): Use CONSTANT_P instead of checking for
16085         CONST_VECTOR.
16086         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
16087         checking for CONST_VECTOR.
16089 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
16091         PR middle-end/83575
16092         * predict.c (force_edge_cold): Handle in more sane way edges
16093         with no prediction.
16095 2018-01-09  Carl Love  <cel@us.ibm.com>
16097         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
16098         V4SI, V4SF types.
16099         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
16100         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
16101         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
16102         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
16103         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
16104         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
16105         * config/rs6000/rs6000-protos.h: Add extern defition for
16106         rs6000_generate_float2_double_code.
16107         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
16108         function.
16109         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
16110         (float2_v2df): Add define_expand.
16112 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
16114         PR target/83628
16115         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
16116         op_mode in the force_to_mode call.
16118 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
16120         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
16121         instead of checking each element individually.
16122         (aarch64_evpc_uzp): Likewise.
16123         (aarch64_evpc_zip): Likewise.
16124         (aarch64_evpc_ext): Likewise.
16125         (aarch64_evpc_rev): Likewise.
16126         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
16127         instead of checking each element individually.  Return true without
16128         generating rtl if
16129         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
16130         whether all selected elements come from the same input, instead of
16131         checking each element individually.  Remove calls to gen_rtx_REG,
16132         start_sequence and end_sequence and instead assert that no rtl is
16133         generated.
16135 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
16137         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
16138         order of HIGH and CONST checks.
16140 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
16142         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
16143         if the destination isn't an SSA_NAME.
16145 2018-01-09  Richard Biener  <rguenther@suse.de>
16147         PR tree-optimization/83668
16148         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
16149         move prologue...
16150         (canonicalize_loop_form): ... here, renamed from ...
16151         (canonicalize_loop_closed_ssa_form): ... this and amended to
16152         swap successor edges for loop exit blocks to make us use
16153         the RPO order we need for initial schedule generation.
16155 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
16157         PR tree-optimization/64811
16158         * match.pd: When optimizing comparisons with Inf, avoid
16159         introducing or losing exceptions from comparisons with NaN.
16161 2018-01-09  Martin Liska  <mliska@suse.cz>
16163         PR sanitizer/82517
16164         * asan.c (shadow_mem_size): Add gcc_assert.
16166 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
16168         Don't save registers in main().
16170         PR target/83738
16171         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
16172         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
16173         * config/avr/avr.c (avr_set_current_function): Don't error if
16174         naked, OS_task or OS_main are specified at the same time.
16175         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
16176         OS_main.
16177         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
16178         attribute.
16179         * common/config/avr/avr-common.c (avr_option_optimization_table):
16180         Switch on -mmain-is-OS_task for optimizing compilations.
16182 2018-01-09  Richard Biener  <rguenther@suse.de>
16184         PR tree-optimization/83572
16185         * graphite.c: Include cfganal.h.
16186         (graphite_transform_loops): Connect infinite loops to exit
16187         and remove fake edges at the end.
16189 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
16191         * ipa-inline.c (edge_badness): Revert accidental checkin.
16193 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
16195         PR ipa/80763
16196         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
16197         symbols; not inline clones.
16199 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
16201         PR target/83507
16202         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
16203         hard registers.  Formatting fixes.
16205         PR preprocessor/83722
16206         * gcc.c (try_generate_repro): Pass
16207         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
16208         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
16209         do_report_bug.
16211 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
16212             Kito Cheng  <kito.cheng@gmail.com>
16214         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
16215         (riscv_leaf_function_p): Delete.
16216         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
16218 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16220         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
16221         function.
16222         (do_ifelse): New function.
16223         (do_isel): New function.
16224         (do_sub3): New function.
16225         (do_add3): New function.
16226         (do_load_mask_compare): New function.
16227         (do_overlap_load_compare): New function.
16228         (expand_compare_loop): New function.
16229         (expand_block_compare): Call expand_compare_loop() when appropriate.
16230         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
16231         option description.
16232         (-mblock-compare-inline-loop-limit): New option.
16234 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16236         PR target/83677
16237         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
16238         Reverse order of second and third operands in first alternative.
16239         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
16240         of first and second elements in UNSPEC_VPERMR vector.
16241         (altivec_expand_vec_perm_le): Likewise.
16243 2018-01-08  Jeff Law  <law@redhat.com>
16245         PR rtl-optimizatin/81308
16246         * tree-switch-conversion.c (cfg_altered): New file scoped static.
16247         (process_switch): If group_case_labels makes a change, then set
16248         cfg_altered.
16249         (pass_convert_switch::execute): If a switch is converted, then
16250         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
16252         PR rtl-optimization/81308
16253         * recog.c (split_all_insns): Conditionally cleanup the CFG after
16254         splitting insns.
16256 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
16258         PR target/83663 - Revert r255946
16259         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
16260         generation for cases where splatting a value is not useful.
16261         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
16262         across a vec_duplicate and a paradoxical subreg forming a vector
16263         mode to a vec_concat.
16265 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16267         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
16268         -march=armv8.3-a variants.
16269         * config/arm/t-multilib: Likewise.
16270         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
16272 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16274         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
16275         to generate rtl.
16276         (cceq_ior_compare_complement): Give it a name so I can use it, and
16277         change boolean_or_operator predicate to boolean_operator so it can
16278         be used to generate a crand.
16279         (eqne): New code iterator.
16280         (bd/bd_neg): New code_attrs.
16281         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
16282         a single define_insn.
16283         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
16284         decrement (bdnzt/bdnzf/bdzt/bdzf).
16285         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
16286         with the new names of the branch decrement patterns, and added the
16287         names of the branch decrement conditional patterns.
16289 2018-01-08  Richard Biener  <rguenther@suse.de>
16291         PR tree-optimization/83563
16292         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
16293         cache.
16295 2018-01-08  Richard Biener  <rguenther@suse.de>
16297         PR middle-end/83713
16298         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
16300 2018-01-08  Richard Biener  <rguenther@suse.de>
16302         PR tree-optimization/83685
16303         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
16304         references to abnormals.
16306 2018-01-08  Richard Biener  <rguenther@suse.de>
16308         PR lto/83719
16309         * dwarf2out.c (output_indirect_strings): Handle empty
16310         skeleton_debug_str_hash.
16311         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
16313 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
16315         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
16316         (emit_store_direct): Likewise.
16317         (arc_trampoline_adjust_address): Likewise.
16318         (arc_asm_trampoline_template): New function.
16319         (arc_initialize_trampoline): Use asm_trampoline_template.
16320         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
16321         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
16322         * config/arc/arc.md (flush_icache): Delete pattern.
16324 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
16326         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
16327         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
16328         munaligned-access.
16330 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
16332         PR target/83681
16333         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
16334         by not USED_FOR_TARGET.
16335         (make_pass_resolve_sw_modes): Likewise.
16337 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
16339         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
16340         USED_FOR_TARGET.
16342 2018-01-08  Richard Biener  <rguenther@suse.de>
16344         PR middle-end/83580
16345         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
16347 2018-01-08  Richard Biener  <rguenther@suse.de>
16349         PR middle-end/83517
16350         * match.pd ((t * 2) / 2) -> t): Add missing :c.
16352 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
16354         PR middle-end/81897
16355         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
16356         basic blocks with a small number of successors.
16357         (convert_control_dep_chain_into_preds): Improve handling of
16358         forwarder blocks.
16359         (dump_predicates): Split apart into...
16360         (dump_pred_chain): ...here...
16361         (dump_pred_info): ...and here.
16362         (can_one_predicate_be_invalidated_p): Add debugging printfs.
16363         (can_chain_union_be_invalidated_p): Improve check for invalidation
16364         of paths.
16365         (uninit_uses_cannot_happen): Avoid unnecessary if
16366         convert_control_dep_chain_into_preds yielded nothing.
16368 2018-01-06  Martin Sebor  <msebor@redhat.com>
16370         PR tree-optimization/83640
16371         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
16372         subtracting negative offset from size.
16373         (builtin_access::overlap): Adjust offset bounds of the access to fall
16374         within the size of the object if possible.
16376 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
16378         PR rtl-optimization/83699
16379         * expmed.c (extract_bit_field_1): Restrict the vector usage of
16380         extract_bit_field_as_subreg to cases in which the extracted
16381         value is also a vector.
16383         * lra-constraints.c (process_alt_operands): Test for the equivalence
16384         substitutions when detecting a possible reload cycle.
16386 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
16388         PR debug/83480
16389         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
16390         by default if flag_selective_schedling{,2}.  Formatting fixes.
16392         PR rtl-optimization/83682
16393         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
16394         if it has non-VECTOR_MODE element mode.
16395         (vec_duplicate_p): Likewise.
16397         PR middle-end/83694
16398         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
16399         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
16401 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
16403         PR target/83604
16404         * config/i386/i386-builtin.def
16405         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
16406         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
16407         Require also OPTION_MASK_ISA_AVX512F in addition to
16408         OPTION_MASK_ISA_GFNI.
16409         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
16410         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
16411         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
16412         to OPTION_MASK_ISA_GFNI.
16413         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
16414         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
16415         OPTION_MASK_ISA_AVX512BW.
16416         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
16417         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
16418         addition to OPTION_MASK_ISA_GFNI.
16419         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
16420         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
16421         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
16422         to OPTION_MASK_ISA_GFNI.
16423         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
16424         a requirement for all ISAs rather than any of them with a few
16425         exceptions.
16426         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
16427         processing.
16428         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
16429         bitmasks to be enabled with 3 exceptions, instead of requiring any
16430         enabled ISA with lots of exceptions.
16431         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
16432         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
16433         Change avx512bw in isa attribute to avx512f.
16434         * config/i386/sgxintrin.h: Add license boilerplate.
16435         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
16436         to __AVX512F__ and __AVX512VL to __AVX512VL__.
16437         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
16438         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
16439         defined.
16440         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
16441         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
16442         temporarily sse2 rather than sse if not enabled already.
16444         PR target/83604
16445         * config/i386/sse.md (VI248_VLBW): Rename to ...
16446         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
16447         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
16448         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
16449         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
16450         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
16451         mode iterator instead of VI248_VLBW.
16453 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
16455         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
16456         (record_modified): Skip clobbers; add debug output.
16457         (param_change_prob): Use sreal frequencies.
16459 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
16461         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
16462         punt for user-aligned variables.
16464 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
16466         * tree-chrec.c (chrec_contains_symbols): Return true for
16467         POLY_INT_CST.
16469 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
16471         PR target/82439
16472         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
16473         of (x|y) == x for BICS pattern.
16475 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
16477         PR tree-optimization/83605
16478         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
16479         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
16480         can throw.
16482 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
16484         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
16485         * config/epiphany/rtems.h: New file.
16487 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16488             Uros Bizjak  <ubizjak@gmail.com>
16490         PR target/83554
16491         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
16492         QIreg_operand instead of register_operand predicate.
16493         * config/i386/i386.c (ix86_rop_should_change_byte_p,
16494         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
16495         comments instead of -fmitigate[-_]rop.
16497 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16499         PR bootstrap/81926
16500         * cgraphunit.c (symbol_table::compile): Switch to text_section
16501         before calling assembly_start debug hook.
16502         * run-rtl-passes.c (run_rtl_passes): Likewise.
16503         Include output.h.
16505 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16507         * tree-vrp.c (extract_range_from_binary_expr_1): Check
16508         range_int_cst_p rather than !symbolic_range_p before calling
16509         extract_range_from_multiplicative_op_1.
16511 2018-01-04  Jeff Law  <law@redhat.com>
16513         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
16514         redundant test in assertion.
16516 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16518         * doc/rtl.texi: Document machine_mode wrapper classes.
16520 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16522         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
16523         using tree_to_uhwi.
16525 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16527         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
16528         the VEC_PERM_EXPR fold to fail.
16530 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16532         PR debug/83585
16533         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
16534         to switched_sections.
16536 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16538         PR target/83680
16539         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
16540         test for d.testing.
16542 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
16544         PR target/83387
16545         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
16546         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
16548 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16550         PR debug/83666
16551         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
16552         is BLKmode and bitpos not zero or mode change is needed.
16554 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16556         PR target/83675
16557         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
16558         TARGET_VIS2.
16560 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
16562         PR target/83628
16563         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
16564         instead of MULT rtx.  Update all corresponding splitters.
16565         (*saddl_se): Ditto.
16566         (*ssub<modesuffix>): Ditto.
16567         (*ssubl_se): Ditto.
16568         (*cmp_sadd_di): Update split patterns.
16569         (*cmp_sadd_si): Ditto.
16570         (*cmp_sadd_sidi): Ditto.
16571         (*cmp_ssub_di): Ditto.
16572         (*cmp_ssub_si): Ditto.
16573         (*cmp_ssub_sidi): Ditto.
16574         * config/alpha/predicates.md (const23_operand): New predicate.
16575         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
16576         Look for ASHIFT, not MULT inner operand.
16577         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
16579 2018-01-04  Martin Liska  <mliska@suse.cz>
16581         PR gcov-profile/83669
16582         * gcov.c (output_intermediate_file): Add version to intermediate
16583         gcov file.
16584         * doc/gcov.texi: Document new field 'version' in intermediate
16585         file format. Fix location of '-k' option of gcov command.
16587 2018-01-04  Martin Liska  <mliska@suse.cz>
16589         PR ipa/82352
16590         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
16592 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16594         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
16596 2018-01-03  Martin Sebor  <msebor@redhat.com>
16598         PR tree-optimization/83655
16599         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
16600         checking calls with invalid arguments.
16602 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16604         * tree-vect-stmts.c (vect_get_store_rhs): New function.
16605         (vectorizable_mask_load_store): Delete.
16606         (vectorizable_call): Return false for masked loads and stores.
16607         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
16608         instead of gimple_assign_rhs1.
16609         (vectorizable_load): Handle IFN_MASK_LOAD.
16610         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
16612 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16614         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
16615         split out from..,
16616         (vectorizable_mask_load_store): ...here.
16617         (vectorizable_load): ...and here.
16619 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16621         * tree-vect-stmts.c (vect_build_all_ones_mask)
16622         (vect_build_zero_merge_argument): New functions, split out from...
16623         (vectorizable_load): ...here.
16625 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16627         * tree-vect-stmts.c (vect_check_store_rhs): New function,
16628         split out from...
16629         (vectorizable_mask_load_store): ...here.
16630         (vectorizable_store): ...and here.
16632 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16634         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
16635         split out from...
16636         (vectorizable_mask_load_store): ...here.
16638 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16640         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
16641         (vect_model_store_cost): Take a vec_load_store_type instead of a
16642         vect_def_type.
16643         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
16644         (vect_model_store_cost): Take a vec_load_store_type instead of a
16645         vect_def_type.
16646         (vectorizable_mask_load_store): Update accordingly.
16647         (vectorizable_store): Likewise.
16648         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
16650 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16652         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
16653         IFN_MASK_LOAD calls here rather than...
16654         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
16656 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16657             Alan Hayward  <alan.hayward@arm.com>
16658             David Sherwood  <david.sherwood@arm.com>
16660         * expmed.c (extract_bit_field_1): For vector extracts,
16661         fall back to extract_bit_field_as_subreg if vec_extract
16662         isn't available.
16664 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16665             Alan Hayward  <alan.hayward@arm.com>
16666             David Sherwood  <david.sherwood@arm.com>
16668         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
16669         they are variable or constant sized.
16670         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
16671         slots for constant-sized data.
16673 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16674             Alan Hayward  <alan.hayward@arm.com>
16675             David Sherwood  <david.sherwood@arm.com>
16677         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
16678         handling COND_EXPRs with boolean comparisons, try to find a better
16679         basis for the mask type than the boolean itself.
16681 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16683         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
16684         is calculated and how it can be overridden.
16685         * genmodes.c (max_bitsize_mode_any_mode): New variable.
16686         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
16687         if defined.
16688         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
16689         if nonzero.
16691 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16692             Alan Hayward  <alan.hayward@arm.com>
16693             David Sherwood  <david.sherwood@arm.com>
16695         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
16696         Remove the mode argument.
16697         (aarch64_simd_valid_immediate): Remove the mode and inverse
16698         arguments.
16699         * config/aarch64/iterators.md (bitsize): New iterator.
16700         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
16701         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
16702         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
16703         aarch64_simd_valid_immediate.
16704         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
16705         (aarch64_reg_or_bic_imm): Likewise.
16706         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
16707         with an insn_type enum and msl with a modifier_type enum.
16708         Replace element_width with a scalar_mode.  Change the shift
16709         to unsigned int.  Add constructors for scalar_float_mode and
16710         scalar_int_mode elements.
16711         (aarch64_vect_float_const_representable_p): Delete.
16712         (aarch64_can_const_movi_rtx_p)
16713         (aarch64_simd_scalar_immediate_valid_for_move)
16714         (aarch64_simd_make_constant): Update call to
16715         aarch64_simd_valid_immediate.
16716         (aarch64_advsimd_valid_immediate_hs): New function.
16717         (aarch64_advsimd_valid_immediate): Likewise.
16718         (aarch64_simd_valid_immediate): Remove mode and inverse
16719         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
16720         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
16721         and aarch64_float_const_representable_p on the result.
16722         (aarch64_output_simd_mov_immediate): Remove mode argument.
16723         Update call to aarch64_simd_valid_immediate and use of
16724         simd_immediate_info.
16725         (aarch64_output_scalar_simd_mov_immediate): Update call
16726         accordingly.
16728 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16729             Alan Hayward  <alan.hayward@arm.com>
16730             David Sherwood  <david.sherwood@arm.com>
16732         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
16733         (mode_nunits): Likewise CONST_MODE_NUNITS.
16734         * machmode.def (ADJUST_NUNITS): Document.
16735         * genmodes.c (mode_data::need_nunits_adj): New field.
16736         (blank_mode): Update accordingly.
16737         (adj_nunits): New variable.
16738         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
16739         parameter.
16740         (emit_mode_size_inline): Set need_bytesize_adj for all modes
16741         listed in adj_nunits.
16742         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
16743         listed in adj_nunits.  Don't emit case statements for such modes.
16744         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
16745         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
16746         nothing if adj_nunits is nonnull.
16747         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
16748         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
16749         (emit_mode_fbit): Update use of print_maybe_const_decl.
16750         (emit_move_size): Likewise.  Treat the array as non-const
16751         if adj_nunits.
16752         (emit_mode_adjustments): Handle adj_nunits.
16754 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16756         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
16757         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
16758         (VECTOR_MODES): Use it.
16759         (make_vector_modes): Take the prefix as an argument.
16761 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16762             Alan Hayward  <alan.hayward@arm.com>
16763             David Sherwood  <david.sherwood@arm.com>
16765         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
16766         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
16767         for MODE_VECTOR_BOOL.
16768         * machmode.def (VECTOR_BOOL_MODE): Document.
16769         * genmodes.c (VECTOR_BOOL_MODE): New macro.
16770         (make_vector_bool_mode): New function.
16771         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
16772         MODE_VECTOR_BOOL.
16773         * lto-streamer-in.c (lto_input_mode_table): Likewise.
16774         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
16775         Likewise.
16776         * stor-layout.c (int_mode_for_mode): Likewise.
16777         * tree.c (build_vector_type_for_mode): Likewise.
16778         * varasm.c (output_constant_pool_2): Likewise.
16779         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
16780         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
16781         for MODE_VECTOR_BOOL.
16782         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
16783         of mode class checks.
16784         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
16785         instead of a list of mode class checks.
16786         (expand_vector_scalar_condition): Likewise.
16787         (type_for_widest_vector_mode): Handle BImode as an inner mode.
16789 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16790             Alan Hayward  <alan.hayward@arm.com>
16791             David Sherwood  <david.sherwood@arm.com>
16793         * machmode.h (mode_size): Change from unsigned short to
16794         poly_uint16_pod.
16795         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
16796         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
16797         or if measurement_type is not polynomial.
16798         (fixed_size_mode::includes_p): Check for constant-sized modes.
16799         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
16800         return a poly_uint16 rather than an unsigned short.
16801         (emit_mode_size): Change the type of mode_size from unsigned short
16802         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
16803         (emit_mode_adjustments): Cope with polynomial vector sizes.
16804         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16805         for GET_MODE_SIZE.
16806         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16807         for GET_MODE_SIZE.
16808         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
16809         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
16810         * caller-save.c (setup_save_areas): Likewise.
16811         (replace_reg_with_saved_mem): Likewise.
16812         * calls.c (emit_library_call_value_1): Likewise.
16813         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
16814         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
16815         (gen_lowpart_for_combine): Likewise.
16816         * convert.c (convert_to_integer_1): Likewise.
16817         * cse.c (equiv_constant, cse_insn): Likewise.
16818         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
16819         (cselib_subst_to_values): Likewise.
16820         * dce.c (word_dce_process_block): Likewise.
16821         * df-problems.c (df_word_lr_mark_ref): Likewise.
16822         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
16823         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
16824         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
16825         (rtl_for_decl_location): Likewise.
16826         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
16827         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
16828         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
16829         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
16830         (expand_expr_real_1): Likewise.
16831         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
16832         (pad_below): Likewise.
16833         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
16834         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
16835         * ira.c (get_subreg_tracking_sizes): Likewise.
16836         * ira-build.c (ira_create_allocno_objects): Likewise.
16837         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
16838         (ira_sort_regnos_for_alter_reg): Likewise.
16839         * ira-costs.c (record_operand_costs): Likewise.
16840         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
16841         (resolve_simple_move): Likewise.
16842         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
16843         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
16844         (lra_constraints): Likewise.
16845         (CONST_POOL_OK_P): Reject variable-sized modes.
16846         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
16847         (add_pseudo_to_slot, lra_spill): Likewise.
16848         * omp-low.c (omp_clause_aligned_alignment): Likewise.
16849         * optabs-query.c (get_best_extraction_insn): Likewise.
16850         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
16851         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
16852         (expand_mult_highpart, valid_multiword_target_p): Likewise.
16853         * recog.c (offsettable_address_addr_space_p): Likewise.
16854         * regcprop.c (maybe_mode_change): Likewise.
16855         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
16856         * regrename.c (build_def_use): Likewise.
16857         * regstat.c (dump_reg_info): Likewise.
16858         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
16859         (find_reloads, find_reloads_subreg_address): Likewise.
16860         * reload1.c (eliminate_regs_1): Likewise.
16861         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
16862         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
16863         (simplify_binary_operation_1, simplify_subreg): Likewise.
16864         * targhooks.c (default_function_arg_padding): Likewise.
16865         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
16866         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
16867         (verify_gimple_assign_ternary): Likewise.
16868         * tree-inline.c (estimate_move_cost): Likewise.
16869         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
16870         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
16871         (get_address_cost_ainc): Likewise.
16872         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
16873         (vect_supportable_dr_alignment): Likewise.
16874         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16875         (vectorizable_reduction): Likewise.
16876         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
16877         (vectorizable_operation, vectorizable_load): Likewise.
16878         * tree.c (build_same_sized_truth_vector_type): Likewise.
16879         * valtrack.c (cleanup_auto_inc_dec): Likewise.
16880         * var-tracking.c (emit_note_insn_var_location): Likewise.
16881         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
16882         (ADDR_VEC_ALIGN): Likewise.
16884 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16885             Alan Hayward  <alan.hayward@arm.com>
16886             David Sherwood  <david.sherwood@arm.com>
16888         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
16889         unsigned short.
16890         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
16891         or if measurement_type is polynomial.
16892         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
16893         * combine.c (make_extraction): Likewise.
16894         * dse.c (find_shift_sequence): Likewise.
16895         * dwarf2out.c (mem_loc_descriptor): Likewise.
16896         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
16897         (extract_bit_field, extract_low_bits): Likewise.
16898         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
16899         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
16900         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
16901         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
16902         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
16903         * reload.c (find_reloads): Likewise.
16904         * reload1.c (alter_reg): Likewise.
16905         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
16906         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
16907         * tree-if-conv.c (predicate_mem_writes): Likewise.
16908         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
16909         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
16910         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
16911         * valtrack.c (dead_debug_insert_temp): Likewise.
16912         * varasm.c (mergeable_constant_section): Likewise.
16913         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
16915 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16916             Alan Hayward  <alan.hayward@arm.com>
16917             David Sherwood  <david.sherwood@arm.com>
16919         * expr.c (expand_assignment): Cope with polynomial mode sizes
16920         when assigning to a CONCAT.
16922 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16923             Alan Hayward  <alan.hayward@arm.com>
16924             David Sherwood  <david.sherwood@arm.com>
16926         * machmode.h (mode_precision): Change from unsigned short to
16927         poly_uint16_pod.
16928         (mode_to_precision): Return a poly_uint16 rather than an unsigned
16929         short.
16930         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
16931         or if measurement_type is not polynomial.
16932         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
16933         in which the mode is already known to be a scalar_int_mode.
16934         * genmodes.c (emit_mode_precision): Change the type of mode_precision
16935         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
16936         initializer.
16937         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16938         for GET_MODE_PRECISION.
16939         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16940         for GET_MODE_PRECISION.
16941         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
16942         as polynomial.
16943         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
16944         (expand_field_assignment, make_extraction): Likewise.
16945         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
16946         (get_last_value): Likewise.
16947         * convert.c (convert_to_integer_1): Likewise.
16948         * cse.c (cse_insn): Likewise.
16949         * expr.c (expand_expr_real_1): Likewise.
16950         * lra-constraints.c (simplify_operand_subreg): Likewise.
16951         * optabs-query.c (can_atomic_load_p): Likewise.
16952         * optabs.c (expand_atomic_load): Likewise.
16953         (expand_atomic_store): Likewise.
16954         * ree.c (combine_reaching_defs): Likewise.
16955         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
16956         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
16957         * tree.h (type_has_mode_precision_p): Likewise.
16958         * ubsan.c (instrument_si_overflow): Likewise.
16960 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16961             Alan Hayward  <alan.hayward@arm.com>
16962             David Sherwood  <david.sherwood@arm.com>
16964         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
16965         polynomial numbers of units.
16966         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
16967         (valid_vector_subparts_p): New function.
16968         (build_vector_type): Remove temporary shim and take the number
16969         of units as a poly_uint64 rather than an int.
16970         (build_opaque_vector_type): Take the number of units as a
16971         poly_uint64 rather than an int.
16972         * tree.c (build_vector_from_ctor): Handle polynomial
16973         TYPE_VECTOR_SUBPARTS.
16974         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
16975         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
16976         (build_vector_from_val): If the number of units is variable,
16977         use build_vec_duplicate_cst for constant operands and
16978         VEC_DUPLICATE_EXPR otherwise.
16979         (make_vector_type): Remove temporary is_constant ().
16980         (build_vector_type, build_opaque_vector_type): Take the number of
16981         units as a poly_uint64 rather than an int.
16982         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
16983         VECTOR_CST_NELTS.
16984         * cfgexpand.c (expand_debug_expr): Likewise.
16985         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
16986         (store_constructor, expand_expr_real_1): Likewise.
16987         (const_scalar_mask_from_tree): Likewise.
16988         * fold-const-call.c (fold_const_reduction): Likewise.
16989         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
16990         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
16991         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
16992         (fold_relational_const): Likewise.
16993         (native_interpret_vector): Likewise.  Change the size from an
16994         int to an unsigned int.
16995         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
16996         TYPE_VECTOR_SUBPARTS.
16997         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
16998         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
16999         duplicating a non-constant operand into a variable-length vector.
17000         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
17001         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
17002         * ipa-icf.c (sem_variable::equals): Likewise.
17003         * match.pd: Likewise.
17004         * omp-simd-clone.c (simd_clone_subparts): Likewise.
17005         * print-tree.c (print_node): Likewise.
17006         * stor-layout.c (layout_type): Likewise.
17007         * targhooks.c (default_builtin_vectorization_cost): Likewise.
17008         * tree-cfg.c (verify_gimple_comparison): Likewise.
17009         (verify_gimple_assign_binary): Likewise.
17010         (verify_gimple_assign_ternary): Likewise.
17011         (verify_gimple_assign_single): Likewise.
17012         * tree-pretty-print.c (dump_generic_node): Likewise.
17013         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17014         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
17015         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
17016         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
17017         (vect_shift_permute_load_chain): Likewise.
17018         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
17019         (expand_vector_condition, optimize_vector_constructor): Likewise.
17020         (lower_vec_perm, get_compute_type): Likewise.
17021         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17022         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
17023         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
17024         (vect_recog_mask_conversion_pattern): Likewise.
17025         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
17026         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
17027         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17028         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
17029         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
17030         (vectorizable_shift, vectorizable_operation, vectorizable_store)
17031         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
17032         (supportable_widening_operation): Likewise.
17033         (supportable_narrowing_operation): Likewise.
17034         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
17035         Likewise.
17036         * varasm.c (output_constant): Likewise.
17038 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17039             Alan Hayward  <alan.hayward@arm.com>
17040             David Sherwood  <david.sherwood@arm.com>
17042         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
17043         so that both the length == 3 and length != 3 cases set up their
17044         own permute vectors.  Add comments explaining why we know the
17045         number of elements is constant.
17046         (vect_permute_load_chain): Likewise.
17048 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17049             Alan Hayward  <alan.hayward@arm.com>
17050             David Sherwood  <david.sherwood@arm.com>
17052         * machmode.h (mode_nunits): Change from unsigned char to
17053         poly_uint16_pod.
17054         (ONLY_FIXED_SIZE_MODES): New macro.
17055         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
17056         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
17057         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
17058         New typedefs.
17059         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
17060         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
17061         or if measurement_type is not polynomial.
17062         * genmodes.c (ZERO_COEFFS): New macro.
17063         (emit_mode_nunits_inline): Make mode_nunits_inline return a
17064         poly_uint16.
17065         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
17066         Use ZERO_COEFFS when emitting initializers.
17067         * data-streamer.h (bp_pack_poly_value): New function.
17068         (bp_unpack_poly_value): Likewise.
17069         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
17070         for GET_MODE_NUNITS.
17071         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
17072         for GET_MODE_NUNITS.
17073         * tree.c (make_vector_type): Remove temporary shim and make
17074         the real function take the number of units as a poly_uint64
17075         rather than an int.
17076         (build_vector_type_for_mode): Handle polynomial nunits.
17077         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
17078         * emit-rtl.c (const_vec_series_p_1): Likewise.
17079         (gen_rtx_CONST_VECTOR): Likewise.
17080         * fold-const.c (test_vec_duplicate_folding): Likewise.
17081         * genrecog.c (validate_pattern): Likewise.
17082         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
17083         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
17084         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
17085         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
17086         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
17087         * rtlanal.c (subreg_get_info): Likewise.
17088         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17089         (vect_grouped_load_supported): Likewise.
17090         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
17091         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
17092         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
17093         (simplify_const_unary_operation, simplify_binary_operation_1)
17094         (simplify_const_binary_operation, simplify_ternary_operation)
17095         (test_vector_ops_duplicate, test_vector_ops): Likewise.
17096         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
17097         instead of CONST_VECTOR_NUNITS.
17098         * varasm.c (output_constant_pool_2): Likewise.
17099         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
17100         explicit-encoded elements in the XVEC for variable-length vectors.
17102 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17104         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
17106 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17107             Alan Hayward  <alan.hayward@arm.com>
17108             David Sherwood  <david.sherwood@arm.com>
17110         * coretypes.h (fixed_size_mode): Declare.
17111         (fixed_size_mode_pod): New typedef.
17112         * builtins.h (target_builtins::x_apply_args_mode)
17113         (target_builtins::x_apply_result_mode): Change type to
17114         fixed_size_mode_pod.
17115         * builtins.c (apply_args_size, apply_result_size, result_vector)
17116         (expand_builtin_apply_args_1, expand_builtin_apply)
17117         (expand_builtin_return): Update accordingly.
17119 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17121         * cse.c (hash_rtx_cb): Hash only the encoded elements.
17122         * cselib.c (cselib_hash_rtx): Likewise.
17123         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
17124         CONST_VECTOR encoding.
17126 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
17127             Jeff Law  <law@redhat.com>
17129         PR target/83641
17130         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
17131         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
17132         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
17133         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
17135         PR target/83641
17136         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
17137         explicitly probe *sp in a noreturn function if there were any callee
17138         register saves or frame pointer is needed.
17140 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
17142         PR debug/83621
17143         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
17144         BLKmode for ternary, binary or unary expressions.
17146         PR debug/83645
17147         * var-tracking.c (delete_vta_debug_insn): New inline function.
17148         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
17149         insns from get_insns () to NULL instead of each bb separately.
17150         Use delete_vta_debug_insn.  No longer static.
17151         (vt_debug_insns_local, variable_tracking_main_1): Adjust
17152         delete_vta_debug_insns callers.
17153         * rtl.h (delete_vta_debug_insns): Declare.
17154         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
17155         instead of variable_tracking_main.
17157 2018-01-03  Martin Sebor  <msebor@redhat.com>
17159         PR tree-optimization/83603
17160         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
17161         arguments past the endof the argument list in functions declared
17162         without a prototype.
17163         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
17164         Avoid checking when arguments are null.
17166 2018-01-03  Martin Sebor  <msebor@redhat.com>
17168         PR c/83559
17169         * doc/extend.texi (attribute const): Fix a typo.
17170         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
17171         issuing -Wsuggest-attribute for void functions.
17173 2018-01-03  Martin Sebor  <msebor@redhat.com>
17175         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
17176         offset_int::from instead of wide_int::to_shwi.
17177         (maybe_diag_overlap): Remove assertion.
17178         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
17179         * gimple-ssa-sprintf.c (format_directive): Same.
17180         (parse_directive): Same.
17181         (sprintf_dom_walker::compute_format_length): Same.
17182         (try_substitute_return_value): Same.
17184 2018-01-03  Jeff Law  <law@redhat.com>
17186         PR middle-end/83654
17187         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
17188         non-constant residual for zero at runtime and avoid probing in
17189         that case.  Reorganize code for trailing problem to mirror handling
17190         of the residual.
17192 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17194         PR tree-optimization/83501
17195         * tree-ssa-strlen.c (get_string_cst): New.
17196         (handle_char_store): Call get_string_cst.
17198 2018-01-03  Martin Liska  <mliska@suse.cz>
17200         PR tree-optimization/83593
17201         * tree-ssa-strlen.c: Include tree-cfg.h.
17202         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
17203         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
17204         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
17205         to false.
17206         (strlen_dom_walker::before_dom_children): Call
17207         gimple_purge_dead_eh_edges. Dump tranformation with details
17208         dump flags.
17209         (strlen_dom_walker::before_dom_children): Update call by adding
17210         new argument cleanup_eh.
17211         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
17213 2018-01-03  Martin Liska  <mliska@suse.cz>
17215         PR ipa/83549
17216         * cif-code.def (VARIADIC_THUNK): New enum value.
17217         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
17218         thunks.
17220 2018-01-03  Jan Beulich  <jbeulich@suse.com>
17222         * sse.md (mov<mode>_internal): Tighten condition for when to use
17223         vmovdqu<ssescalarsize> for TI and OI modes.
17225 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
17227         Update copyright years.
17229 2018-01-03  Martin Liska  <mliska@suse.cz>
17231         PR ipa/83594
17232         * ipa-visibility.c (function_and_variable_visibility): Skip
17233         functions with noipa attribure.
17235 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
17237         * gcc.c (process_command): Update copyright notice dates.
17238         * gcov-dump.c (print_version): Ditto.
17239         * gcov.c (print_version): Ditto.
17240         * gcov-tool.c (print_version): Ditto.
17241         * gengtype.c (create_file): Ditto.
17242         * doc/cpp.texi: Bump @copying's copyright year.
17243         * doc/cppinternals.texi: Ditto.
17244         * doc/gcc.texi: Ditto.
17245         * doc/gccint.texi: Ditto.
17246         * doc/gcov.texi: Ditto.
17247         * doc/install.texi: Ditto.
17248         * doc/invoke.texi: Ditto.
17250 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17252         * vector-builder.h (vector_builder::m_full_nelts): Change from
17253         unsigned int to poly_uint64.
17254         (vector_builder::full_nelts): Update prototype accordingly.
17255         (vector_builder::new_vector): Likewise.
17256         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
17257         (vector_builder::operator ==): Likewise.
17258         (vector_builder::finalize): Likewise.
17259         * int-vector-builder.h (int_vector_builder::int_vector_builder):
17260         Take the number of elements as a poly_uint64 rather than an
17261         unsigned int.
17262         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
17263         from unsigned int to poly_uint64.
17264         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
17265         (vec_perm_indices::new_vector): Likewise.
17266         (vec_perm_indices::length): Likewise.
17267         (vec_perm_indices::nelts_per_input): Likewise.
17268         (vec_perm_indices::input_nelts): Likewise.
17269         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
17270         number of elements per input as a poly_uint64 rather than an
17271         unsigned int.  Use the original encoding for variable-length
17272         vectors, rather than clamping each individual element.
17273         For the second and subsequent elements in each pattern,
17274         clamp the step and base before clamping their sum.
17275         (vec_perm_indices::series_p): Handle polynomial element counts.
17276         (vec_perm_indices::all_in_range_p): Likewise.
17277         (vec_perm_indices_to_tree): Likewise.
17278         (vec_perm_indices_to_rtx): Likewise.
17279         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
17280         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
17281         (tree_vector_builder::new_binary_operation): Handle polynomial
17282         element counts.  Return false if we need to know the number
17283         of elements at compile time.
17284         * fold-const.c (fold_vec_perm): Punt if the number of elements
17285         isn't known at compile time.
17287 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17289         * vec-perm-indices.h (vec_perm_builder): Change element type
17290         from HOST_WIDE_INT to poly_int64.
17291         (vec_perm_indices::element_type): Update accordingly.
17292         (vec_perm_indices::clamp): Handle polynomial element_types.
17293         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
17294         (vec_perm_indices::all_in_range_p): Likewise.
17295         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
17296         than shwi trees.
17297         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
17298         polynomial vec_perm_indices element types.
17299         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
17300         * fold-const.c (fold_vec_perm): Likewise.
17301         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
17302         * tree-vect-generic.c (lower_vec_perm): Likewise.
17303         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
17304         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
17305         element type to HOST_WIDE_INT.
17307 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17308             Alan Hayward  <alan.hayward@arm.com>
17309             David Sherwood  <david.sherwood@arm.com>
17311         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
17312         rather than an int.  Use plus_constant.
17313         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
17314         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
17316 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17317             Alan Hayward  <alan.hayward@arm.com>
17318             David Sherwood  <david.sherwood@arm.com>
17320         * calls.c (emit_call_1, expand_call): Change struct_value_size from
17321         a HOST_WIDE_INT to a poly_int64.
17323 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17324             Alan Hayward  <alan.hayward@arm.com>
17325             David Sherwood  <david.sherwood@arm.com>
17327         * calls.c (load_register_parameters): Cope with polynomial
17328         mode sizes.  Require a constant size for BLKmode parameters
17329         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
17330         forces a parameter to be padded at the lsb end in order to
17331         fill a complete number of words, require the parameter size
17332         to be ordered wrt UNITS_PER_WORD.
17334 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17335             Alan Hayward  <alan.hayward@arm.com>
17336             David Sherwood  <david.sherwood@arm.com>
17338         * reload1.c (spill_stack_slot_width): Change element type
17339         from unsigned int to poly_uint64_pod.
17340         (alter_reg): Treat mode sizes as polynomial.
17342 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17343             Alan Hayward  <alan.hayward@arm.com>
17344             David Sherwood  <david.sherwood@arm.com>
17346         * reload.c (complex_word_subreg_p): New function.
17347         (reload_inner_reg_of_subreg, push_reload): Use it.
17349 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17350             Alan Hayward  <alan.hayward@arm.com>
17351             David Sherwood  <david.sherwood@arm.com>
17353         * lra-constraints.c (process_alt_operands): Reject matched
17354         operands whose sizes aren't ordered.
17355         (match_reload): Refer to this check here.
17357 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17358             Alan Hayward  <alan.hayward@arm.com>
17359             David Sherwood  <david.sherwood@arm.com>
17361         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
17362         that the mode size is in the set {1, 2, 4, 8, 16}.
17364 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17365             Alan Hayward  <alan.hayward@arm.com>
17366             David Sherwood  <david.sherwood@arm.com>
17368         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
17369         Use plus_constant instead of gen_rtx_PLUS.
17371 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17372             Alan Hayward  <alan.hayward@arm.com>
17373             David Sherwood  <david.sherwood@arm.com>
17375         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
17376         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
17377         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
17378         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
17379         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
17380         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
17381         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
17382         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
17383         * config/i386/i386.c (ix86_push_rounding): ...this new function.
17384         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
17385         a poly_int64.
17386         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
17387         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
17388         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
17389         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
17390         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
17391         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
17392         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
17393         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
17394         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
17395         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
17396         function.
17397         * expr.c (emit_move_resolve_push): Treat the input and result
17398         of PUSH_ROUNDING as a poly_int64.
17399         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
17400         (emit_push_insn): Likewise.
17401         * lra-eliminations.c (mark_not_eliminable): Likewise.
17402         * recog.c (push_operand): Likewise.
17403         * reload1.c (elimination_effects): Likewise.
17404         * rtlanal.c (nonzero_bits1): Likewise.
17405         * calls.c (store_one_arg): Likewise.  Require the padding to be
17406         known at compile time.
17408 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17409             Alan Hayward  <alan.hayward@arm.com>
17410             David Sherwood  <david.sherwood@arm.com>
17412         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
17413         Use plus_constant instead of gen_rtx_PLUS.
17415 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17416             Alan Hayward  <alan.hayward@arm.com>
17417             David Sherwood  <david.sherwood@arm.com>
17419         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
17420         rather than an int.
17422 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17423             Alan Hayward  <alan.hayward@arm.com>
17424             David Sherwood  <david.sherwood@arm.com>
17426         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
17427         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
17428         via stack temporaries.  Treat the mode size as polynomial too.
17430 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17431             Alan Hayward  <alan.hayward@arm.com>
17432             David Sherwood  <david.sherwood@arm.com>
17434         * expr.c (expand_expr_real_2): When handling conversions involving
17435         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
17436         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
17437         as a poly_uint64 too.
17439 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17440             Alan Hayward  <alan.hayward@arm.com>
17441             David Sherwood  <david.sherwood@arm.com>
17443         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
17445 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17446             Alan Hayward  <alan.hayward@arm.com>
17447             David Sherwood  <david.sherwood@arm.com>
17449         * combine.c (can_change_dest_mode): Handle polynomial
17450         REGMODE_NATURAL_SIZE.
17451         * expmed.c (store_bit_field_1): Likewise.
17452         * expr.c (store_constructor): Likewise.
17453         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
17454         and polynomial REGMODE_NATURAL_SIZE.
17455         (gen_lowpart_common): Likewise.
17456         * reginfo.c (record_subregs_of_mode): Likewise.
17457         * rtlanal.c (read_modify_subreg_p): Likewise.
17459 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17460             Alan Hayward  <alan.hayward@arm.com>
17461             David Sherwood  <david.sherwood@arm.com>
17463         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
17464         numbers of elements.
17466 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17467             Alan Hayward  <alan.hayward@arm.com>
17468             David Sherwood  <david.sherwood@arm.com>
17470         * match.pd: Cope with polynomial numbers of vector elements.
17472 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17473             Alan Hayward  <alan.hayward@arm.com>
17474             David Sherwood  <david.sherwood@arm.com>
17476         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
17477         in a POINTER_PLUS_EXPR.
17479 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17480             Alan Hayward  <alan.hayward@arm.com>
17481             David Sherwood  <david.sherwood@arm.com>
17483         * omp-simd-clone.c (simd_clone_subparts): New function.
17484         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
17485         (ipa_simd_modify_function_body): Likewise.
17487 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17488             Alan Hayward  <alan.hayward@arm.com>
17489             David Sherwood  <david.sherwood@arm.com>
17491         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
17492         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
17493         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
17494         (expand_vector_condition, vector_element): Likewise.
17495         (subparts_gt): New function.
17496         (get_compute_type): Use subparts_gt.
17497         (count_type_subparts): Delete.
17498         (expand_vector_operations_1): Use subparts_gt instead of
17499         count_type_subparts.
17501 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17502             Alan Hayward  <alan.hayward@arm.com>
17503             David Sherwood  <david.sherwood@arm.com>
17505         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
17506         (vect_compile_time_alias): ...this new function.  Do the calculation
17507         on poly_ints rather than trees.
17508         (vect_prune_runtime_alias_test_list): Update call accordingly.
17510 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17511             Alan Hayward  <alan.hayward@arm.com>
17512             David Sherwood  <david.sherwood@arm.com>
17514         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
17515         numbers of units.
17516         (vect_schedule_slp_instance): Likewise.
17518 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17519             Alan Hayward  <alan.hayward@arm.com>
17520             David Sherwood  <david.sherwood@arm.com>
17522         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
17523         constant and extern definitions for variable-length vectors.
17524         (vect_get_constant_vectors): Note that the number of units
17525         is known to be constant.
17527 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17528             Alan Hayward  <alan.hayward@arm.com>
17529             David Sherwood  <david.sherwood@arm.com>
17531         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
17532         of units as polynomial.  Choose between WIDE and NARROW based
17533         on multiple_p.
17535 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17536             Alan Hayward  <alan.hayward@arm.com>
17537             David Sherwood  <david.sherwood@arm.com>
17539         * tree-vect-stmts.c (simd_clone_subparts): New function.
17540         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
17542 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17543             Alan Hayward  <alan.hayward@arm.com>
17544             David Sherwood  <david.sherwood@arm.com>
17546         * tree-vect-stmts.c (vectorizable_call): Treat the number of
17547         vectors as polynomial.  Use build_index_vector for
17548         IFN_GOMP_SIMD_LANE.
17550 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17551             Alan Hayward  <alan.hayward@arm.com>
17552             David Sherwood  <david.sherwood@arm.com>
17554         * tree-vect-stmts.c (get_load_store_type): Treat the number of
17555         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
17556         for variable-length vectors.
17557         (vectorizable_mask_load_store): Treat the number of units as
17558         polynomial, asserting that it is constant if the condition has
17559         already been enforced.
17560         (vectorizable_store, vectorizable_load): Likewise.
17562 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17563             Alan Hayward  <alan.hayward@arm.com>
17564             David Sherwood  <david.sherwood@arm.com>
17566         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
17567         of units as polynomial.  Punt if we can't tell at compile time
17568         which vector contains the final result.
17570 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17571             Alan Hayward  <alan.hayward@arm.com>
17572             David Sherwood  <david.sherwood@arm.com>
17574         * tree-vect-loop.c (vectorizable_induction): Treat the number
17575         of units as polynomial.  Punt on SLP inductions.  Use an integer
17576         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
17577         cast of such a series for variable-length floating-point
17578         reductions.
17580 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17581             Alan Hayward  <alan.hayward@arm.com>
17582             David Sherwood  <david.sherwood@arm.com>
17584         * tree.h (build_index_vector): Declare.
17585         * tree.c (build_index_vector): New function.
17586         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
17587         of units as polynomial, forcibly converting it to a constant if
17588         vectorizable_reduction has already enforced the condition.
17589         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
17590         to create a {1,2,3,...} vector.
17591         (vectorizable_reduction): Treat the number of units as polynomial.
17592         Choose vectype_in based on the largest scalar element size rather
17593         than the smallest number of units.  Enforce the restrictions
17594         relied on above.
17596 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17597             Alan Hayward  <alan.hayward@arm.com>
17598             David Sherwood  <david.sherwood@arm.com>
17600         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
17601         number of units as polynomial.
17603 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17604             Alan Hayward  <alan.hayward@arm.com>
17605             David Sherwood  <david.sherwood@arm.com>
17607         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
17608         * target.def (autovectorize_vector_sizes): Return the vector sizes
17609         by pointer, using vector_sizes rather than a bitmask.
17610         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
17611         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
17612         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
17613         Likewise.
17614         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
17615         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
17616         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
17617         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
17618         * omp-general.c (omp_max_vf): Likewise.
17619         * omp-low.c (omp_clause_aligned_alignment): Likewise.
17620         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
17621         * tree-vect-loop.c (vect_analyze_loop): Likewise.
17622         * tree-vect-slp.c (vect_slp_bb): Likewise.
17623         * doc/tm.texi: Regenerate.
17624         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
17625         to a poly_uint64.
17626         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
17627         the vector size as a poly_uint64 rather than an unsigned int.
17628         (current_vector_size): Change from an unsigned int to a poly_uint64.
17629         (get_vectype_for_scalar_type): Update accordingly.
17630         * tree.h (build_truth_vector_type): Take the size and number of
17631         units as a poly_uint64 rather than an unsigned int.
17632         (build_vector_type): Add a temporary overload that takes
17633         the number of units as a poly_uint64 rather than an unsigned int.
17634         * tree.c (make_vector_type): Likewise.
17635         (build_truth_vector_type): Take the number of units as a poly_uint64
17636         rather than an unsigned int.
17638 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17639             Alan Hayward  <alan.hayward@arm.com>
17640             David Sherwood  <david.sherwood@arm.com>
17642         * target.def (get_mask_mode): Take the number of units and length
17643         as poly_uint64s rather than unsigned ints.
17644         * targhooks.h (default_get_mask_mode): Update accordingly.
17645         * targhooks.c (default_get_mask_mode): Likewise.
17646         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
17647         * doc/tm.texi: Regenerate.
17649 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17650             Alan Hayward  <alan.hayward@arm.com>
17651             David Sherwood  <david.sherwood@arm.com>
17653         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
17654         * omp-general.c (omp_max_vf): Likewise.
17655         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
17656         (expand_omp_simd): Handle polynomial safelen.
17657         * omp-low.c (omplow_simd_context): Add a default constructor.
17658         (omplow_simd_context::max_vf): Change from int to poly_uint64.
17659         (lower_rec_simd_input_clauses): Update accordingly.
17660         (lower_rec_input_clauses): Likewise.
17662 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17663             Alan Hayward  <alan.hayward@arm.com>
17664             David Sherwood  <david.sherwood@arm.com>
17666         * tree-vectorizer.h (vect_nunits_for_cost): New function.
17667         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
17668         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
17669         (vect_analyze_slp_cost): Likewise.
17670         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
17671         (vect_model_load_cost): Likewise.
17673 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17674             Alan Hayward  <alan.hayward@arm.com>
17675             David Sherwood  <david.sherwood@arm.com>
17677         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
17678         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
17679         from an unsigned int * to a poly_uint64_pod *.
17680         (calculate_unrolling_factor): New function.
17681         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
17683 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17684             Alan Hayward  <alan.hayward@arm.com>
17685             David Sherwood  <david.sherwood@arm.com>
17687         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
17688         from an unsigned int to a poly_uint64.
17689         (_loop_vec_info::slp_unrolling_factor): Likewise.
17690         (_loop_vec_info::vectorization_factor): Change from an int
17691         to a poly_uint64.
17692         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
17693         (vect_get_num_vectors): New function.
17694         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
17695         (vect_get_num_copies): Use vect_get_num_vectors.
17696         (vect_analyze_data_ref_dependences): Change max_vf from an int *
17697         to an unsigned int *.
17698         (vect_analyze_data_refs): Change min_vf from an int * to a
17699         poly_uint64 *.
17700         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
17701         than an unsigned HOST_WIDE_INT.
17702         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
17703         (vect_analyze_data_ref_dependence): Change max_vf from an int *
17704         to an unsigned int *.
17705         (vect_analyze_data_ref_dependences): Likewise.
17706         (vect_compute_data_ref_alignment): Handle polynomial vf.
17707         (vect_enhance_data_refs_alignment): Likewise.
17708         (vect_prune_runtime_alias_test_list): Likewise.
17709         (vect_shift_permute_load_chain): Likewise.
17710         (vect_supportable_dr_alignment): Likewise.
17711         (dependence_distance_ge_vf): Take the vectorization factor as a
17712         poly_uint64 rather than an unsigned HOST_WIDE_INT.
17713         (vect_analyze_data_refs): Change min_vf from an int * to a
17714         poly_uint64 *.
17715         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
17716         vfm1 as a poly_uint64 rather than an int.  Make the same change
17717         for the returned bound_scalar.
17718         (vect_gen_vector_loop_niters): Handle polynomial vf.
17719         (vect_do_peeling): Likewise.  Update call to
17720         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
17721         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
17722         be constant.
17723         * tree-vect-loop.c (vect_determine_vectorization_factor)
17724         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
17725         (vect_get_known_peeling_cost): Likewise.
17726         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
17727         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
17728         (vect_transform_loop): Likewise.  Use the lowest possible VF when
17729         updating the upper bounds of the loop.
17730         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
17731         rather than an int.
17732         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
17733         polynomial unroll factors.
17734         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
17735         (vect_make_slp_decision): Likewise.
17736         (vect_supported_load_permutation_p): Likewise, and polynomial
17737         vf too.
17738         (vect_analyze_slp_cost): Handle polynomial vf.
17739         (vect_slp_analyze_node_operations): Likewise.
17740         (vect_slp_analyze_bb_1): Likewise.
17741         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
17742         than an unsigned HOST_WIDE_INT.
17743         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
17744         (vectorizable_load): Handle polynomial vf.
17745         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
17746         a poly_uint64.
17747         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
17749 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17750             Alan Hayward  <alan.hayward@arm.com>
17751             David Sherwood  <david.sherwood@arm.com>
17753         * match.pd: Handle bit operations involving three constants
17754         and try to fold one pair.
17756 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17758         * tree-vect-loop-manip.c: Include gimple-fold.h.
17759         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
17760         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
17761         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
17762         Add a path that uses a step of VF instead of 1, but disable it
17763         for now.
17764         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
17765         and niters_no_overflow parameters.  Update calls to
17766         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
17767         Create a new SSA name if the latter choses to use a ste other
17768         than zero, and return it via niters_vector_mult_vf_var.
17769         * tree-vect-loop.c (vect_transform_loop): Update calls to
17770         vect_do_peeling, vect_gen_vector_loop_niters and
17771         slpeel_make_loop_iterate_ntimes.
17772         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
17773         (vect_gen_vector_loop_niters): Update declarations after above changes.
17775 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
17777         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
17778         128-bit round to integer instructions.
17779         (ceil<mode>2): Likewise.
17780         (btrunc<mode>2): Likewise.
17781         (round<mode>2): Likewise.
17783 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17785         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
17786         unaligned VSX load/store on P8/P9.
17787         (expand_block_clear): Allow the use of unaligned VSX
17788         load/store on P8/P9.
17790 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17792         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
17793         New function.
17794         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
17795         swap associated with both a load and a store.
17797 2018-01-02  Andrew Waterman  <andrew@sifive.com>
17799         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
17800         * config/riscv/riscv.md (clear_cache): Use it.
17802 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
17804         * web.c: Remove out-of-date comment.
17806 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17808         * expr.c (fixup_args_size_notes): Check that any existing
17809         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
17810         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
17811         (emit_single_push_insn): ...here.
17813 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17815         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
17816         (const_vector_encoded_nelts): New function.
17817         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
17818         (const_vector_int_elt, const_vector_elt): Declare.
17819         * emit-rtl.c (const_vector_int_elt_1): New function.
17820         (const_vector_elt): Likewise.
17821         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
17822         of CONST_VECTOR_ELT.
17824 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17826         * expr.c: Include rtx-vector-builder.h.
17827         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
17828         directly on the tree encoding.
17829         (const_vector_from_tree): Likewise.
17830         * optabs.c: Include rtx-vector-builder.h.
17831         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
17832         sequence of "u" values.
17833         * vec-perm-indices.c: Include rtx-vector-builder.h.
17834         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
17835         directly on the vec_perm_indices encoding.
17837 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17839         * doc/rtl.texi (const_vector): Describe new encoding scheme.
17840         * Makefile.in (OBJS): Add rtx-vector-builder.o.
17841         * rtx-vector-builder.h: New file.
17842         * rtx-vector-builder.c: Likewise.
17843         * rtl.h (rtx_def::u2): Add a const_vector field.
17844         (CONST_VECTOR_NPATTERNS): New macro.
17845         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
17846         (CONST_VECTOR_DUPLICATE_P): Likewise.
17847         (CONST_VECTOR_STEPPED_P): Likewise.
17848         (CONST_VECTOR_ENCODED_ELT): Likewise.
17849         (const_vec_duplicate_p): Check for a duplicated vector encoding.
17850         (unwrap_const_vec_duplicate): Likewise.
17851         (const_vec_series_p): Check for a non-duplicated vector encoding.
17852         Say that the function only returns true for integer vectors.
17853         * emit-rtl.c: Include rtx-vector-builder.h.
17854         (gen_const_vec_duplicate_1): Delete.
17855         (gen_const_vector): Call gen_const_vec_duplicate instead of
17856         gen_const_vec_duplicate_1.
17857         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
17858         (gen_const_vec_duplicate): Use rtx_vector_builder.
17859         (gen_const_vec_series): Likewise.
17860         (gen_rtx_CONST_VECTOR): Likewise.
17861         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
17862         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
17863         Build a new vector rather than modifying a CONST_VECTOR in-place.
17864         (handle_special_swappables): Update call accordingly.
17865         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
17866         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
17867         Build a new vector rather than modifying a CONST_VECTOR in-place.
17868         (handle_special_swappables): Update call accordingly.
17870 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17872         * simplify-rtx.c (simplify_const_binary_operation): Use
17873         CONST_VECTOR_ELT instead of XVECEXP.
17875 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17877         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
17878         the selector elements to be different from the data elements
17879         if the selector is a VECTOR_CST.
17880         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
17881         ssizetype for the selector.
17883 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17885         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
17886         before testing each element individually.
17887         * tree-vect-generic.c (lower_vec_perm): Likewise.
17889 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17891         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
17892         * selftest-run-tests.c (selftest::run_tests): Call it.
17893         * vector-builder.h (vector_builder::operator ==): New function.
17894         (vector_builder::operator !=): Likewise.
17895         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
17896         (vec_perm_indices::all_from_input_p): New function.
17897         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
17898         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
17899         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
17900         instead of reading the VECTOR_CST directly.  Detect whether both
17901         vector inputs are the same before constructing the vec_perm_indices,
17902         and update the number of inputs argument accordingly.  Use the
17903         utility functions added above.  Only construct sel2 if we need to.
17905 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17907         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
17908         the broadcast of the low byte.
17909         (expand_mult_highpart): Use an explicit encoding for the permutes.
17910         * optabs-query.c (can_mult_highpart_p): Likewise.
17911         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
17912         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17913         (vectorizable_bswap): Likewise.
17914         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
17915         explicit encoding for the power-of-2 permutes.
17916         (vect_permute_store_chain): Likewise.
17917         (vect_grouped_load_supported): Likewise.
17918         (vect_permute_load_chain): Likewise.
17920 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17922         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
17923         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
17924         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
17925         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
17926         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
17927         (vect_gen_perm_mask_any): Likewise.
17929 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17931         * int-vector-builder.h: New file.
17932         * vec-perm-indices.h: Include int-vector-builder.h.
17933         (vec_perm_indices): Redefine as an int_vector_builder.
17934         (auto_vec_perm_indices): Delete.
17935         (vec_perm_builder): Redefine as a stand-alone class.
17936         (vec_perm_indices::vec_perm_indices): New function.
17937         (vec_perm_indices::clamp): Likewise.
17938         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
17939         (vec_perm_indices::new_vector): New function.
17940         (vec_perm_indices::new_expanded_vector): Update for new
17941         vec_perm_indices class.
17942         (vec_perm_indices::rotate_inputs): New function.
17943         (vec_perm_indices::all_in_range_p): Operate directly on the
17944         encoded form, without computing elided elements.
17945         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
17946         encoding.  Update for new vec_perm_indices class.
17947         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
17948         the given vec_perm_builder.
17949         (expand_vec_perm_var): Update vec_perm_builder constructor.
17950         (expand_mult_highpart): Use vec_perm_builder instead of
17951         auto_vec_perm_indices.
17952         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
17953         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
17954         or double series encoding as appropriate.
17955         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
17956         vec_perm_indices instead of auto_vec_perm_indices.
17957         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17958         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17959         (vect_permute_store_chain): Likewise.
17960         (vect_grouped_load_supported): Likewise.
17961         (vect_permute_load_chain): Likewise.
17962         (vect_shift_permute_load_chain): Likewise.
17963         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
17964         (vect_transform_slp_perm_load): Likewise.
17965         (vect_schedule_slp_instance): Likewise.
17966         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17967         (vectorizable_mask_load_store): Likewise.
17968         (vectorizable_bswap): Likewise.
17969         (vectorizable_store): Likewise.
17970         (vectorizable_load): Likewise.
17971         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
17972         vec_perm_indices instead of auto_vec_perm_indices.  Use
17973         tree_to_vec_perm_builder to read the vector from a tree.
17974         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
17975         vec_perm_builder instead of a vec_perm_indices.
17976         (have_whole_vector_shift): Use vec_perm_builder and
17977         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
17978         truncation to calc_vec_perm_mask_for_shift.
17979         (vect_create_epilog_for_reduction): Likewise.
17980         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
17981         from auto_vec_perm_indices to vec_perm_indices.
17982         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
17983         instead of changing individual elements.
17984         (aarch64_vectorize_vec_perm_const): Use new_vector to install
17985         the vector in d.perm.
17986         * config/arm/arm.c (expand_vec_perm_d::perm): Change
17987         from auto_vec_perm_indices to vec_perm_indices.
17988         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
17989         instead of changing individual elements.
17990         (arm_vectorize_vec_perm_const): Use new_vector to install
17991         the vector in d.perm.
17992         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
17993         Update vec_perm_builder constructor.
17994         (rs6000_expand_interleave): Likewise.
17995         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
17996         (rs6000_expand_interleave): Likewise.
17998 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18000         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
18001         to qimode could truncate the indices.
18002         * optabs.c (expand_vec_perm_var): Likewise.
18004 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18006         * Makefile.in (OBJS): Add vec-perm-indices.o.
18007         * vec-perm-indices.h: New file.
18008         * vec-perm-indices.c: Likewise.
18009         * target.h (vec_perm_indices): Replace with a forward class
18010         declaration.
18011         (auto_vec_perm_indices): Move to vec-perm-indices.h.
18012         * optabs.h: Include vec-perm-indices.h.
18013         (expand_vec_perm): Delete.
18014         (selector_fits_mode_p, expand_vec_perm_var): Declare.
18015         (expand_vec_perm_const): Declare.
18016         * target.def (vec_perm_const_ok): Replace with...
18017         (vec_perm_const): ...this new hook.
18018         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
18019         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
18020         * doc/tm.texi: Regenerate.
18021         * optabs.def (vec_perm_const): Delete.
18022         * doc/md.texi (vec_perm_const): Likewise.
18023         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
18024         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
18025         expand_vec_perm for constant permutation vectors.  Assert that
18026         the mode of variable permutation vectors is the integer equivalent
18027         of the mode that is being permuted.
18028         * optabs-query.h (selector_fits_mode_p): Declare.
18029         * optabs-query.c: Include vec-perm-indices.h.
18030         (selector_fits_mode_p): New function.
18031         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
18032         is defined, instead of checking whether the vec_perm_const_optab
18033         exists.  Use targetm.vectorize.vec_perm_const instead of
18034         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
18035         fit in the vector mode before using a variable permute.
18036         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
18037         vec_perm_indices instead of an rtx.
18038         (expand_vec_perm): Replace with...
18039         (expand_vec_perm_const): ...this new function.  Take the selector
18040         as a vec_perm_indices rather than an rtx.  Also take the mode of
18041         the selector.  Update call to shift_amt_for_vec_perm_mask.
18042         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
18043         Use vec_perm_indices::new_expanded_vector to expand the original
18044         selector into bytes.  Check whether the indices fit in the vector
18045         mode before using a variable permute.
18046         (expand_vec_perm_var): Make global.
18047         (expand_mult_highpart): Use expand_vec_perm_const.
18048         * fold-const.c: Includes vec-perm-indices.h.
18049         * tree-ssa-forwprop.c: Likewise.
18050         * tree-vect-data-refs.c: Likewise.
18051         * tree-vect-generic.c: Likewise.
18052         * tree-vect-loop.c: Likewise.
18053         * tree-vect-slp.c: Likewise.
18054         * tree-vect-stmts.c: Likewise.
18055         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
18056         Delete.
18057         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
18058         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
18059         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
18060         (aarch64_vectorize_vec_perm_const): ...this new function.
18061         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18062         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18063         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
18064         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
18065         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18066         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18067         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
18068         into...
18069         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
18070         check for NEON modes.
18071         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
18072         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
18073         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
18074         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
18075         into...
18076         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
18077         the old VEC_PERM_CONST conditions.
18078         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
18079         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
18080         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
18081         (ia64_vectorize_vec_perm_const_ok): Merge into...
18082         (ia64_vectorize_vec_perm_const): ...this new function.
18083         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
18084         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
18085         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
18086         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
18087         * config/mips/mips.c (mips_expand_vec_perm_const)
18088         (mips_vectorize_vec_perm_const_ok): Merge into...
18089         (mips_vectorize_vec_perm_const): ...this new function.
18090         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
18091         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
18092         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
18093         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
18094         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
18095         (rs6000_expand_vec_perm_const): Delete.
18096         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
18097         Delete.
18098         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18099         (altivec_expand_vec_perm_const_le): Take each operand individually.
18100         Operate on constant selectors rather than rtxes.
18101         (altivec_expand_vec_perm_const): Likewise.  Update call to
18102         altivec_expand_vec_perm_const_le.
18103         (rs6000_expand_vec_perm_const): Delete.
18104         (rs6000_vectorize_vec_perm_const_ok): Delete.
18105         (rs6000_vectorize_vec_perm_const): New function.
18106         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
18107         an element count and rtx array.
18108         (rs6000_expand_extract_even): Update call accordingly.
18109         (rs6000_expand_interleave): Likewise.
18110         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
18111         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
18112         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
18113         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
18114         (rs6000_expand_vec_perm_const): Delete.
18115         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18116         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18117         (altivec_expand_vec_perm_const_le): Take each operand individually.
18118         Operate on constant selectors rather than rtxes.
18119         (altivec_expand_vec_perm_const): Likewise.  Update call to
18120         altivec_expand_vec_perm_const_le.
18121         (rs6000_expand_vec_perm_const): Delete.
18122         (rs6000_vectorize_vec_perm_const_ok): Delete.
18123         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
18124         reference to the SPE evmerge intructions.
18125         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
18126         an element count and rtx array.
18127         (rs6000_expand_extract_even): Update call accordingly.
18128         (rs6000_expand_interleave): Likewise.
18129         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
18130         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
18131         new function.
18132         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18134 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18136         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
18137         vector mode and that that mode matches the mode of the data
18138         being permuted.
18139         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
18140         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
18141         directly using expand_vec_perm_1 when forcing selectors into
18142         registers.
18143         (expand_vec_perm_var): New function, split out from expand_vec_perm.
18145 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18147         * optabs-query.h (can_vec_perm_p): Delete.
18148         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
18149         * optabs-query.c (can_vec_perm_p): Split into...
18150         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
18151         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
18152         particular selector is valid.
18153         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18154         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18155         (vect_grouped_load_supported): Likewise.
18156         (vect_shift_permute_load_chain): Likewise.
18157         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
18158         (vect_transform_slp_perm_load): Likewise.
18159         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18160         (vectorizable_bswap): Likewise.
18161         (vect_gen_perm_mask_checked): Likewise.
18162         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
18163         implementations of variable permutation vectors into account
18164         when deciding which selector to use.
18165         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
18166         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
18167         with a false third argument.
18168         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
18169         to test whether the constant selector is valid and can_vec_perm_var_p
18170         to test whether a variable selector is valid.
18172 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18174         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
18175         * optabs-query.c (can_vec_perm_p): Likewise.
18176         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
18177         instead of vec_perm_indices.
18178         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
18179         (vect_gen_perm_mask_checked): Likewise,
18180         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
18181         (vect_gen_perm_mask_checked): Likewise,
18183 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18185         * optabs-query.h (qimode_for_vec_perm): Declare.
18186         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
18187         (qimode_for_vec_perm): ...this new function.
18188         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
18190 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18192         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
18193         does not have a conditional at the top.
18195 2018-01-02  Richard Biener  <rguenther@suse.de>
18197         * ipa-inline.c (big_speedup_p): Fix expression.
18199 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
18201         PR target/81616
18202         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
18203         for generic 4->6.
18205 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
18207         PR target/81616
18208         Generic tuning.
18209         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
18210         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
18211         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
18212         cond_taken_branch_cost 3->4.
18214 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
18216         PR tree-optimization/83581
18217         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
18218         TODO_cleanup_cfg if any changes have been made.
18220         PR middle-end/83608
18221         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
18222         convert_modes if target mode has the right side, but different mode
18223         class.
18225         PR middle-end/83609
18226         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
18227         last argument when extracting from CONCAT.  If either from_real or
18228         from_imag is NULL, use expansion through memory.  If result is not
18229         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
18230         the parts directly to inner mode, if even that fails, use expansion
18231         through memory.
18233         PR middle-end/83623
18234         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
18235         check for bswap in mode rather than HImode and use that in expand_unop
18236         too.
18238 Copyright (C) 2018 Free Software Foundation, Inc.
18240 Copying and distribution of this file, with or without modification,
18241 are permitted in any medium without royalty provided the copyright
18242 notice and this notice are preserved.