.
[official-gcc.git] / gcc / ChangeLog
blobaee4f0fbf7a956a3900c7bd81782d443a96f461a
1 2018-06-28  Martin Liska  <mliska@suse.cz>
3         * Makefile.in: Add opt-suggestions.o.
4         * gcc-main.c: Include opt-suggestions.h.
5         * gcc.c (driver::driver): Likewise.
6         (driver::~driver): Remove m_option_suggestions.
7         (driver::build_option_suggestions): Moved to option_proposer.
8         (driver::suggest_option): Likewise.
9         (driver::handle_unrecognized_options): Use option_proposer.
10         * gcc.h (class driver): Add new memver m_option_proposer.
11         * opt-suggestions.c: New file.
12         * opt-suggestions.h: New file.
14 2018-06-28  Martin Liska  <mliska@suse.cz>
16         * vec.h (class auto_string_vec): New (moved from auto_argvec).
17         (auto_string_vec::~auto_string_vec): Likewise.
19 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
21         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
22         statement if id->reset_location is true.
23         (copy_edges_for_bb): Do not set goto_locus on the new edges if
24         id->reset_location is true.
25         (copy_phis_for_bb): Force input_location on the arguments if
26         id->reset_location is true.
27         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
28         is set on the function to be inlined.
29         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
30         prevent_decl_creation_for_types fields up and add reset_location field.
32 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
34         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
36 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
38         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
39         registers for Pmode.
40         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
41         hard registers for the clobbered pseudo.
43 2018-06-27  Paul Koning  <ni1d@arrl.net>
45         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
46         mutually exclusive options.
47         * config/pdp11/constraints.md (h): New constraint.
48         (O): Update definition to match shift code generation.
49         (D): New constraint.
50         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
51         (CCFP): Remove.
52         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
53         function.
54         (output_jump): Change arguments.
55         (pdp11_fixed_cc_regs): New function.
56         (pdp11_cc_mode): Ditto.
57         (pdp11_expand_shift): Ditto.
58         (pdp11_assemble_shift): Ditto.
59         (pdp11_small_shift): Ditto.
60         (pdp11_branch_cost): Remove.
61         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
62         from output.
63         (pdp11_register_move_cost): Update for CC registers.
64         (pdp11_rtx_costs): Add case for LSHIFTRT.
65         (pdp11_output_jump): Add CCNZ mode conditional branches.
66         (notice_update_cc_on_set): Remove.
67         (pdp11_cc_mode): New function.
68         (simple_memory_operand): Correct pre/post decrement case.
69         (no_side_effect_operand): New function.
70         (pdp11_regno_reg_class): Add CC_REGS class.
71         (pdp11_fixed_cc_regs): New function.
72         (pdp11_small_shift): New function.
73         (pdp11_expand_shift): New function to expand shift insns.
74         (pdp11_assemble_shift): New function to output shifts.
75         (pdp11_branch_cost): Remove.
76         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
77         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
78         (WCHAR_TYPE): Ditto.
79         (PTRDIFF_TYPE): Ditto.
80         (ADJUST_INSN_LENGTH): New macro.
81         (FIXED_REGISTERS): Add CC registers.
82         (CALL_USED_REGISTERS): Ditto.
83         (reg_class): Ditto.
84         (REG_CLASS_NAMES): Ditto.
85         (REG_CLASS_CONTENTS): Ditto.
86         (SELECT_CC_MODE): Use new function.
87         (TARGET_FLAGS_REGNUM): New macro.
88         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
89         (cc0_reg_rtx): Remove.
90         (CC_STATUS_MDEP): Remove.
91         (CC_STATUS_MDEFP_INIT): Remove.
92         (CC_IN_FPU): Remove.
93         (NOTICE_UPDATE_CC): Remove.
94         (REGISTER_NAMES): Add CC registers.
95         (BRANCH_COST): Change to constant 1.
96         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
97         handling.
98         * config/pdp11/pdp11.opt (mbcopy): Remove.
99         (mbcopy-builtin): Remove.
100         (mbranch-cheap): Remove.
101         (mbranch-expensive): Remove.
102         * config/pdp11/predicates.md (expand_shift_operand): Update to
103         match shift code generation.
104         (ccnz_operator): New predicate.
105         * doc/invoke.texi (PDP-11 Options): Remove deleted options
106         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
107         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
108         exclusive options.
109         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
110         description of O constraint.
112 2018-06-27  Jeff Law  <law@redhat.com>
113             Austin Law  <austinklaw@gmail.com>
115         * config/v850/v850.md (addsi3_set_flags): New pattern.
116         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
117         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
118         (zero_extendhisi2_v850_set_flags): Likewise.
119         (zero_extendqisi2_v850_set_flags): Likewise.
120         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
121         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
122         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
124         * config/v850/v850-protos.h (notice_update_cc): Remove.
125         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
126         (v850_print_operand): Handle 'D' and "d".
127         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
128         Add handling of arithmetic/logical operations compared against zero.
129         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
130         Do not look at v850_compare_op, instead get mode from last argument.
131         (v850_gen_compare): Remove
132         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
133         after reload for prologue insns.
134         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
135         patterns.
136         (construct_save_jarl): Likewise.
137         (TARGET_FLAGS_REGNUM): Define.
138         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
139         (NOTICE_UPDATE_CC): Remove.
140         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
141         than cc0.  Conditionalize on reload_completed.
142         (cmpsi_insn, setfcc_insn): Likewise.
143         (tst1 splitter): Turn into define_and_split which sets the flags
144         after reload.
145         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
146         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
147         (cstoresf4, cstoredf4): Clobber the flags.
148         (cmpsi, cmpsf, cmpdf): Remove expanders.
149         (setf_insn): Remove pattern.
150         (addsi3): Turn into define_and_split which clobbers the flags after
151         reload and a suitable pattern (addsi3_clobber_flags) for use after
152         reload.
153         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
154         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
155         (ashrsi3, ashrsi3_v850e2): Likewise.
156         (bins): Clobber the flags.
157         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
158         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
159         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
160         (call_value_internal_short, call_value_internal_long): Likewise.
161         (callt_save_interrupt, callt_return_interrupt): Likewise.
162         (save_interrupt, return_interrupt): Likewise.
163         (callt_save_all_interrupt, save_all_interrupt): Likewise.
164         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
165         (restore_all_interrupt, _restore_all_interrupt): Likewise.
166         (All FP comparisons): Only allow after reload has completed.
167         (trfsr): Likewise.
168         (divh, divhu): Tweak output template.
169         (branch_z_normal, branch_z_invert): Remove
170         (branch_nz_normal, branch_nz_invert): Likewise.
171         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
173         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
174         * config/v850/v850.c (notice_update_cc): Remove.
175         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
176         (CC_NO_CARRY): Likewise.
177         (NOTICE_UPDATE_CC): Define to nothing.
178         * config/v850/v850.md: Remove block comment on cc0 handling
179         Remove "cc" attribute from all patterns.  Remove cc_status handling
180         from all patterns.  Minor formatting fixes.
182 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
184         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
185         (cortex-a76.cortex-a55): Likewise.
186         * config/aarch64/aarch64-tune.md: Regenerate.
187         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
188         cortex-a76.cortex-a55.
190 2018-06-27  Jeff Law  <law@redhat.com>
192         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
193         (MULTILIB_DIRNAMES): Similarly.
195 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
197         * gimple.h (gimple_return_retbnd): Delete.
198         (gimple_return_set_retbnd): Likewise.
199         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
200         gimple_return_set_retbnd.
201         * gimple-pretty-print.c (dump_gimple_return): Remove call to
202         gimple_return_retbnd and adjust.
203         * tree-inline.h (struct copy_body_data): Remove retbnd field.
204         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
205         Explicitly return NULL in a couple more cases.  Move assertion
206         on debug statements and remove unreachable code.
207         (reset_debug_binding): Do not test id->retbnd.
208         (expand_call_inline): Do not set it.
210 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
212         * configure.ac: Add --disable-gcov option.
213         * configure: Regenerate.
214         * Makefile.in: Honour @enable_gcov@.
215         * doc/install.texi: Document --disable-gcov.
217 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
219         * config/arm/arm-cpus.in (cortex-a76): New entry.
220         (cortex-a76.cortex-a55): Likewise.
221         * config/arm/arm-tables.opt: Regenerate.
222         * config/arm/arm-tune.md: Likewise.
223         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
224         * doc/invoke.texi (ARM Options): Document cortex-a76 and
225         cortex-a76.cortex-a55.
227 2018-06-27 Tamar Christina  <tamar.christina@arm.com>
229         PR target/85769
230         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
232 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
234         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
235         comment.
236         (EPILOGUE_USES): Likewise.
238 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
240         * tree-inline.c (remap_location): New function extracted from...
241         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
242         (copy_phis_for_bb): ...here.  Call remap_location.
243         (copy_cfg_body): Adjust call to copy_edges_for_bb.
245 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
247         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
248         unaligned vsx for 16B memset.
250 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
252         PR target/86285
253         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
254         ieee128_float_type_node to long_double_type_node unless
255         TARGET_LONG_DOUBLE_128 is set.
257 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
259         * cfgloop.c (get_loop_location): Convert return type from
260         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
261         by implicit construction from rtx_insn *, and using
262         dump_user_location_t::from_function_decl for the fallback case.
263         * cfgloop.h (get_loop_location): Convert return type from
264         location_t to dump_user_location_t.
265         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
266         dump_printf_loc to pass in a dump_location_t rather than a
267         location_t, via the gimple stmt.
268         * coverage.c (get_coverage_counts): Update calls to
269         dump_printf_loc to pass in dump_location_t rather than a
270         location_t.
271         * doc/optinfo.texi (Dump types): Convert example of
272         dump_printf_loc from taking "locus" to taking "insn".  Update
273         description of the "_loc" calls to cover dump_location_t.
274         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
275         "selftest.h".
276         (dump_user_location_t::dump_user_location_t): New constructors,
277         from gimple *stmt and rtx_insn *.
278         (dump_user_location_t::from_function_decl): New function.
279         (dump_loc): Make static.
280         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
281         const dump_location_t &.
282         (dump_generic_expr_loc): Delete.
283         (dump_printf_loc): Convert param "loc" from location_t to
284         const dump_location_t &.
285         (selftest::test_impl_location): New function.
286         (selftest::dumpfile_c_tests): New function.
287         * dumpfile.h: Include "profile-count.h".
288         (class dump_user_location_t): New class.
289         (struct dump_impl_location_t): New struct.
290         (class dump_location_t): New class.
291         (dump_printf_loc): Convert 2nd param from source_location to
292         const dump_location_t &.
293         (dump_generic_expr_loc): Delete.
294         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
295         const dump_location_t &.
296         * gimple-fold.c (fold_gimple_assign): Update call to
297         dump_printf_loc to pass in a dump_location_t rather than a
298         location_t, via the gimple stmt.
299         (gimple_fold_call): Likewise.
300         * gimple-loop-interchange.cc
301         (loop_cand::analyze_iloop_reduction_var): Update for change to
302         check_reduction_path.
303         (tree_loop_interchange::interchange): Update for change to
304         find_loop_location.
305         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
306         change in return-type of find_loop_location.
307         (graphite_regenerate_ast_isl): Likewise.
308         * graphite-optimize-isl.c (optimize_isl): Likewise.
309         * graphite.c (graphite_transform_loops): Likewise.
310         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
311         pass in a dump_location_t rather than a location_t, via the
312         gimple stmt.
313         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
314         * ipa.c (walk_polymorphic_call_targets): Likewise.
315         * loop-unroll.c (report_unroll): Convert "locus" param from
316         location_t to dump_location_t.
317         (decide_unrolling): Update for change to get_loop_location's
318         return type.
319         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
320         location_t to dump_user_location_t.
321         (grid_find_single_omp_among_assignments_1): Updates calls to
322         dump_printf_loc to pass in a dump_location_t rather than a
323         location_t, via the gimple stmt.
324         (grid_parallel_clauses_gridifiable): Convert "tloc" from
325         location_t to dump_location_t.  Updates calls to dump_printf_loc
326         to pass in a dump_location_t rather than a location_t, via the
327         gimple stmt.
328         (grid_inner_loop_gridifiable_p): Likewise.
329         (grid_dist_follows_simple_pattern): Likewise.
330         (grid_gfor_follows_tiling_pattern): Likewise.
331         (grid_target_follows_gridifiable_pattern): Likewise.
332         (grid_attempt_target_gridification): Convert initialization
333         of local "grid" from memset to zero-initialization; FIXME: does
334         this require C++11?  Update call to dump_printf_loc to pass in a
335         optinfo_location rather than a location_t, via the gimple stmt.
336         * profile.c (read_profile_edge_counts): Updates call to
337         dump_printf_loc to pass in a dump_location_t rather than a
338         location_t
339         (compute_branch_probabilities): Likewise.
340         * selftest-run-tests.c (selftest::run_tests): Call
341         dumpfile_c_tests.
342         * selftest.h (dumpfile_c_tests): New decl.
343         * tree-loop-distribution.c (pass_loop_distribution::execute):
344         Update for change in return type of find_loop_location.
345         * tree-parloops.c (parallelize_loops): Likewise.
346         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
347         "locus" from location_t to dump_user_location_t.
348         (canonicalize_loop_induction_variables): Likewise.
349         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
350         for change in return type of find_loop_location.
351         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
352         to dump_printf_loc to pass in a dump_location_t rather than a
353         location_t, via the stmt.
354         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
355         Likewise.
356         * tree-vect-loop-manip.c (find_loop_location): Convert return
357         type from source_location to dump_user_location_t.
358         (vect_do_peeling): Update for above change.
359         (vect_loop_versioning): Update for change in type of
360         vect_location.
361         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
362         from location_t to dump_user_location_t.
363         (vect_estimate_min_profitable_iters): Update for change in type
364         of vect_location.
365         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
366         location_t to dump_location_t.
367         (vect_slp_bb): Update for change in type of vect_location.
368         * tree-vectorizer.c (vect_location): Convert from source_location
369         to dump_user_location_t.
370         (try_vectorize_loop_1): Update for change in vect_location's type.
371         (vectorize_loops): Likewise.
372         (increase_alignment): Likewise.
373         * tree-vectorizer.h (vect_location): Convert from source_location
374         to dump_user_location_t.
375         (find_loop_location): Convert return type from source_location to
376         dump_user_location_t.
377         (check_reduction_path): Convert 1st param from location_t to
378         dump_user_location_t.
379         * value-prof.c (check_counter): Update call to dump_printf_loc to
380         pass in a dump_user_location_t rather than a location_t; update
381         call to error_at for change in type of "locus".
382         (check_ic_target): Update call to dump_printf_loc to
383         pass in a dump_user_location_t rather than a location_t, via the
384         call_stmt.
386 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
388         * config/s390/s390.h (enum processor_flags): Do not use
389         default tune parameter when -march was specified.
391 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
393         PR target/86314
394         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
395         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
396         operands.
398 2018-06-26  Richard Biener  <rguenther@suse.de>
400         PR tree-optimization/86287
401         PR bootstrap/86316
402         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
403         (vect_analyze_loop): Initialize n_stmts.
405 2018-06-26  Richard Biener  <rguenther@suse.de>
407         PR middle-end/86271
408         * fold-const.c (fold_convertible_p): Pointer extension
409         isn't valid.
411 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
413         PR debug/86064
414         * dwarf2out.c (loc_list_has_views): Adjust comments.
415         (dw_loc_list): Split single cross-partition range with
416         nonzero locview.
418 2018-06-25  Jeff Law  <law@redhat.com>
420         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
421         on -mbig-switch by default.
423         * config/v850/predicates.md (const_float_1_operand): Fix match_code
424         test.
425         (const_float_0_operand): Remove unused predicate.
426         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
427         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
428         (recipsf2): New expander.  Original pattern now called
429         (recipsf2_insn).
430         (recipdf2, recipdf2_insn): Similarly.
431         (rsqrtsf2, rsqrtsf2_insn): Similarly
432         (rsqrtdf2, rsqrtdf2_insn): Similarly
434 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
436         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
437         Simplify logic for FreeBSD (twice).
439 2018-06-25  Martin Sebor  <msebor@redhat.com>
441         PR tree-optimization/86204
442         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
443         a strnlen result if it's less than the length of the string.
445 2018-06-25  Martin Sebor  <msebor@redhat.com>
447         PR tree-optimization/85700
448         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
449         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
450         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
452 2018-06-25  Martin Sebor  <msebor@redhat.com>
454         * doc/extend.texi (Zero-length arrays): Update and clarify.
456 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
458         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
459         added IEEE/IBM long double multilib support on PowerPC little
460         endian Linux systems.
461         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
462         (MULTILIB_DEFAULTS): Likewise.
463         * config/rs6000/rs6000.c (rs6000_option_override_internal):
464         Likewise.
465         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
466         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
467         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
469 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
471         PR middle-end/86311
472         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
473         (REORDER_45): Likewise.
475 2018-06-25  Jeff Law  <law@redhat.com>
477         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
478         dividend to 32 bits.  Adjust length.
479         (udivmodhi4): Cleanup output template.  Fix length.
481 2018-06-25  Carl Love  <cel@us.ibm.com>
483         * config/rs6000/vsx.md: Change word selector to prefered location.
485 2018-06-25  Richard Biener  <rguenther@suse.de>
487         PR tree-optimization/86304
488         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
489         epilogue-if-converted loops as well.
491 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
493         * lto-section-out.c (lto_begin_section): Do not print section
494         name for noaddr and unnumbered dumps.
496 2018-06-25  Richard Biener  <rguenther@suse.de>
498         * tree-vectorizer.h (struct vec_info_shared): New structure
499         with parts split out from struct vec_info and loop_nest from
500         struct _loop_vec_info.
501         (struct vec_info): Adjust accordingly.
502         (struct _loop_vec_info): Likewise.
503         (LOOP_VINFO_LOOP_NEST): Adjust.
504         (LOOP_VINFO_DATAREFS): Likewise.
505         (LOOP_VINFO_DDRS): Likewise.
506         (struct _bb_vec_info): Likewise.
507         (BB_VINFO_DATAREFS): Likewise.
508         (BB_VINFO_DDRS): Likewise.
509         (struct _stmt_vec_info): Add dr_aux member.
510         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
511         (DR_MISALIGNMENT_UNINITIALIZED): New.
512         (set_dr_misalignment): Adjust.
513         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
514         (vect_analyze_loop): Adjust prototype.
515         (vect_analyze_loop_form): Likewise.
516         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
517         Compute dependences lazily.
518         (vect_record_base_alignments): Use shared datarefs/ddrs.
519         (vect_verify_datarefs_alignment): Likewise.
520         (vect_analyze_data_refs_alignment): Likewise.
521         (vect_analyze_data_ref_accesses): Likewise.
522         (vect_analyze_data_refs): Likewise.
523         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
524         constructor parameter for shared part.
525         (vect_analyze_loop_form): Pass in shared part and adjust.
526         (vect_analyze_loop_2): Pass in storage for the number of
527         stmts.  Move loop nest finding to the caller.  Compute
528         datarefs lazily.
529         (vect_analyze_loop): Pass in shared part.
530         (vect_transform_loop): Verify shared datarefs are unchanged.
531         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
532         constructor parameter for shared part.
533         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
534         (vect_slp_bb): Verify shared datarefs are unchanged before
535         transform.
536         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
537         change.
538         (new_stmt_vec_info): Initialize DR_AUX misalignment to
539         DR_MISALIGNMENT_UNINITIALIZED.
540         * tree-vectorizer.c (vec_info::vec_info): Add constructor
541         parameter for shared part.
542         (vec_info::~vec_info): Adjust.
543         (vec_info_shared::vec_info_shared): New.
544         (vec_info_shared::~vec_info_shared): Likewise.
545         (vec_info_shared::save_datarefs): Likewise.
546         (vec_info_shared::check_datarefs): Likewise.
547         (try_vectorize_loop_1): Construct shared part live for analyses
548         of a single loop for multiple vector sizes.
549         * tree-parloops.c (gather_scalar_reductions): Adjust.
551 2018-06-25  Richard Biener  <rguenther@suse.de>
553         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
554         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
555         (vect_analyze_data_refs): Remove similar code from here and
556         simplify accordingly.
558 2018-06-25  Richard Biener  <rguenther@suse.de>
560         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
561         for reverse storage order accesses rather than asserting
562         they cannot happen here.
564 2018-06-25  Tom de Vries  <tdevries@suse.de>
566         PR debug/86257
567         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
568         Use data16 instead of .byte for insn prefix.
570 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
572         PR C++/86082
573         * parser.c (make_char_string_pack): Pass this literal chars
574         through cpp_interpret_string.
575         (cp_parser_userdef_numeric_literal): Check the result of
576         make_char_string_pack.
578 2018-06-24  Maya Rashish  <coypu@sdf.org>
580         * ginclude/stddef.h: Simplify conditions around avoiding
581         re-definition of __size_t.
583 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
585         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
586         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
588 2018-06-22  Maya Rashish  <coypu@sdf.org>
590         * doc/invoke.texi (mno-fancy-math-387): Update for changes
591         made to OpenBSD and NetBSD through the years.
593 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
595         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
596         behavior of vec_pack (vector double, vector double) to match
597         behavior of vec_float2 (vector double, vector double).
599 2018-06-22  Olivier Hainque  <hainque@adacore.com>
601         * gimplify.c (gimplify_function_tree): Prevent creation
602         of a trampoline for the address of the current function
603         passed to entry/exit instrumentation hooks.
605 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
607         PR target/86222
608         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
609         correctly.
611 2018-06-22  Martin Liska  <mliska@suse.cz>
613         PR tree-optimization/86263
614         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
615         Bail out if is_enabled is false.
616         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
617         New declaration.
618         (jump_table_cluster::is_enabled): New function.
620 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
622         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
623         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
624         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
625         (lto_input_ts_binfo_tree_pointers): Likewise.
626         * tree-streamer-out.c (streamer_write_tree_bitfields,
627         write_ts_binfo_tree_pointers): Likewise.
628         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
630 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
632         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
634 2018-06-22  Martin Liska  <mliska@suse.cz>
636         * symbol-summary.h (get): Make it pure and inline move
637         functionality from ::get function.
638         (get): Remove and inline into ::get and ::get_create.
639         (get_create): Move code from ::get function.
641 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
643         PR target/85994
644         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
645         -x assembler-with-cpp.
647 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
649         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
650         _FILE_OFFSET_BITS=64 for C++.
652 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
654         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
655         conversion insn that shows up when pr85657-3.c is compiled using
656         IEEE 128-bit long double.
657         (neg<mode>2_internal): Use the correct mode to check whether the
658         mode is IBM extended.
659         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
660         multiply and divide external functions from being created more
661         than once.
663 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
665         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
666         functions.
667         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
668         the edge can be forwarded.
669         (cfg_layout_merge_blocks): Likewise.
671 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
673         * except.c (finish_eh_generation): Commit edge insertions only after
674         the EH edges have been redirected from post-landing to landing pads.
676 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
678         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
679         create_tmp_var_for to create the FRAME decl.
680         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
682 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
684         * tree-inline.c (copy_edges_for_bb): Minor tweak.
685         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
686         debug statement when resetting its value.
687         (expand_call_inline): Copy the locus of the call onto the assignment
688         of the return value, if any.  Use local variable in more cases.
690 2018-06-21  Martin Liska  <mliska@suse.cz>
692         * ipa-pure-const.c (propagate_nothrow): Use
693         funct_state_summaries->get.
694         (dump_malloc_lattice): Likewise.
695         (propagate_malloc): Likewise.
697 2018-06-21  Richard Biener  <rguenther@suse.de>
699         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
700         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
701         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
702         comment.
703         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
704         BLOCK_ABSTRACT_ORIGIN unconditionally.
706 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
708         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
709         deleting it.
710         * ipa-reference.c (ipa_reference_c_finalize): Delete
711         ipa_ref_opt_sum_summaries and set it to NULL.
713 2018-06-21  Tom de Vries  <tdevries@suse.de>
715         PR tree-optimization/85859
716         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
717         test with comment from bb_no_side_effects_p.
719 2018-06-21  Richard Biener  <rguenther@suse.de>
721         PR tree-optimization/86232
722         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
723         max for constant niter.
725 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
727         * config/aarch64/aarch64-simd.md
728         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
730 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
732         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
733         Make opernads of the unspec commutative.
735 2018-06-21  Richard Biener  <rguenther@suse.de>
737         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
738         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
739         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
740         (vect_analyze_data_ref_dependence): Re-order checks to deal with
741         NULL DR_STEP.
742         (vect_record_base_alignments): Do not record base alignment
743         for gathers or scatters.
744         (vect_compute_data_ref_alignment): Drop return value that is always
745         true.  Bail out early for gathers or scatters.
746         (vect_enhance_data_refs_alignment): Bail out early for gathers
747         or scatters.
748         (vect_find_same_alignment_drs): Likewise.
749         (vect_analyze_data_refs_alignment): Remove dead code.
750         (vect_slp_analyze_and_verify_node_alignment): Likewise.
751         (vect_analyze_data_refs): For possible gathers or scatters do
752         not create an alternate DR, just check their possible validity
753         and mark them.  Adjust DECL_NONALIASED handling to not rely
754         on DR_BASE_ADDRESS.
755         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
756         update inits of gathers or scatters.
757         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
758         Also copy gather/scatter flag to pattern vinfo.
760 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
762         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
763         behavior of vec_packsu (vector unsigned long long, vector unsigned
764         long long) to match behavior of vec_packs with same signature.
766 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
767             Thomas Schwinge <thomas@codesourcery.com>
768             Cesar Philippidis  <cesar@codesourcery.com>
770         * gimplify.c (gimplify_scan_omp_clauses): Add support for
771         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
772         (gimplify_adjust_omp_clauses): Likewise.
773         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
774         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
775         (gimplify_omp_target_update): Update handling of acc update and
776         enter/exit data.
777         * omp-low.c (install_var_field): Remove unused parameter
778         base_pointers_restrict.
779         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
780         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
781         FINALIZE}
782         (omp_target_base_pointers_restrict_p): Delete.
783         (scan_omp_target): Update call to scan_sharing_clauses.
784         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
785         FINALIZE}.
786         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
787         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
788         (convert_local_omp_clauses): Likewise.
789         * tree-pretty-print.c (dump_omp_clause): Likewise.
790         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
791         FINALIZE}.
792         (omp_clause_code_name): Likewise.
794 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
796         PR debug/86194
797         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
798         be narrowed.
800         PR tree-optimization/86231
801         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
802         anti-range don't overwrite *vr0min before using it to compute *vr0max.
804 2018-06-20  Tom de Vries  <tdevries@suse.de>
806         PR tree-optimization/86097
807         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
808         iv type if signedness of iv type is not the same as that of *nit.
810 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
812         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
813         EDGE_EH edges, verify they are all EDGE_EH.
815 2018-06-20  Maya Rashish  <coypu@sdf.org>
817         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
819 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
821         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
822         * config/aarch64/aarch64.c (xgene1_tunings): Add
823         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
824         (aarch64_mode_valid_for_sched_fusion_p):
825         Allow 16-byte modes.
826         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
827         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
828         128-bit modes.
829         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
830         New pattern.
831         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
832         * config/aarch64/iterators.md (VQ2): New mode iterator.
834 2018-06-20  Martin Liska  <mliska@suse.cz>
836         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
837         Change default ratio from 10 to 8.
839 2018-06-20  Martin Liska  <mliska@suse.cz>
841         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
842         New.
843         (bit_test_cluster::find_bit_tests): Likewise.
844         (switch_decision_tree::analyze_switch_statement): Find clusters.
845         * tree-switch-conversion.h (struct jump_table_cluster): Document
846         hierarchy.
848 2018-06-20  Martin Liska  <mliska@suse.cz>
850         * tree-switch-conversion.c (switch_conversion::collect):
851         Record m_uniq property.
852         (switch_conversion::expand): Bail out for special conditions.
853         (group_cluster::~group_cluster): New.
854         (group_cluster::group_cluster): Likewise.
855         (group_cluster::dump): Likewise.
856         (jump_table_cluster::emit): New.
857         (switch_decision_tree::fix_phi_operands_for_edges): New.
858         (struct case_node): Remove struct.
859         (jump_table_cluster::can_be_handled): New.
860         (case_values_threshold): Moved to header.
861         (reset_out_edges_aux): Likewise.
862         (jump_table_cluster::is_beneficial): New.
863         (bit_test_cluster::can_be_handled): Likewise.
864         (add_case_node): Remove.
865         (bit_test_cluster::is_beneficial): New.
866         (case_bit_test::cmp): New.
867         (bit_test_cluster::emit): New.
868         (expand_switch_as_decision_tree_p): Remove.
869         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
870         (fix_phi_operands_for_edge): Likewise.
871         (switch_decision_tree::analyze_switch_statement): New.
872         (compute_cases_per_edge): Move ...
873         (switch_decision_tree::compute_cases_per_edge): ... here.
874         (try_switch_expansion): Likewise.
875         (switch_decision_tree::try_switch_expansion): Likewise.
876         (record_phi_operand_mapping): Likewise.
877         (switch_decision_tree::record_phi_operand_mapping): Likewise.
878         (emit_case_decision_tree): Likewise.
879         (switch_decision_tree::emit): Likewise.
880         (balance_case_nodes): Likewise.
881         (switch_decision_tree::balance_case_nodes): Likewise.
882         (dump_case_nodes): Likewise.
883         (switch_decision_tree::dump_case_nodes): Likewise.
884         (emit_jump): Likewise.
885         (switch_decision_tree::emit_jump): Likewise.
886         (emit_cmp_and_jump_insns): Likewise.
887         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
888         (emit_case_nodes): Likewise.
889         (switch_decision_tree::emit_case_nodes): Likewise.
890         (conditional_probability): Remove.
891         * tree-switch-conversion.h (enum cluster_type): New.
892         (PRINT_CASE): New.
893         (struct cluster): Likewise.
894         (cluster::cluster): Likewise.
895         (struct simple_cluster): Likewise.
896         (simple_cluster::simple_cluster): Likewise.
897         (struct group_cluster): Likewise.
898         (struct jump_table_cluster): Likewise.
899         (struct bit_test_cluster): Likewise.
900         (struct min_cluster_item): Likewise.
901         (struct case_tree_node): Likewise.
902         (case_tree_node::case_tree_node): Likewise.
903         (jump_table_cluster::case_values_threshold): Likewise.
904         (struct case_bit_test): Likewise.
905         (struct switch_decision_tree): Likewise.
906         (struct switch_conversion): Likewise.
907         (switch_decision_tree::reset_out_edges_aux): Likewise.
909 2018-06-20  Martin Liska  <mliska@suse.cz>
911         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
912         (hoist_edge_and_branch_if_true): Likewise.
913         (expand_switch_using_bit_tests_p): Likewise.
914         (struct case_bit_test): Likewise.
915         (case_bit_test_cmp): Likewise.
916         (emit_case_bit_tests): Likewise.
917         (switch_conversion::switch_conversion): New class.
918         (struct switch_conv_info): Remove old struct.
919         (collect_switch_conv_info): More to ...
920         (switch_conversion::collect): ... this.
921         (check_range): Likewise.
922         (switch_conversion::check_range): Likewise.
923         (check_all_empty_except_final): Likewise.
924         (switch_conversion::check_all_empty_except_final): Likewise.
925         (check_final_bb): Likewise.
926         (switch_conversion::check_final_bb): Likewise.
927         (create_temp_arrays): Likewise.
928         (switch_conversion::create_temp_arrays): Likewise.
929         (free_temp_arrays): Likewise.
930         (gather_default_values): Likewise.
931         (switch_conversion::gather_default_values): Likewise.
932         (build_constructors): Likewise.
933         (switch_conversion::build_constructors): Likewise.
934         (constructor_contains_same_values_p): Likewise.
935         (switch_conversion::contains_same_values_p): Likewise.
936         (array_value_type): Likewise.
937         (switch_conversion::array_value_type): Likewise.
938         (build_one_array): Likewise.
939         (switch_conversion::build_one_array): Likewise.
940         (build_arrays): Likewise.
941         (switch_conversion::build_arrays): Likewise.
942         (gen_def_assigns): Likewise.
943         (switch_conversion::gen_def_assigns): Likewise.
944         (prune_bbs): Likewise.
945         (switch_conversion::prune_bbs): Likewise.
946         (fix_phi_nodes): Likewise.
947         (switch_conversion::fix_phi_nodes): Likewise.
948         (gen_inbound_check): Likewise.
949         (switch_conversion::gen_inbound_check): Likewise.
950         (process_switch): Use the newly created class.
951         (switch_conversion::expand): New.
952         (switch_conversion::~switch_conversion): New.
953         * tree-switch-conversion.h: New file.
955 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
957         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
958         tree-vect-patterns.c.
959         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
960         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
961         (vect_recog_sad_pattern): Likewise.
962         (vect_recog_widen_sum_pattern): Likewise.
963         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
964         (vect_recog_widen_shift_pattern): Remove the type_in argument.
965         (vect_recog_rotate_pattern): Likewise.
966         (vect_recog_mult_pattern): Likewise.
967         (vect_recog_vector_vector_shift_pattern): Likewise.
968         (vect_recog_divmod_pattern): Likewise.
969         (vect_recog_mixed_size_cond_pattern): Likewise.
970         (vect_recog_bool_pattern): Likewise.
971         (vect_recog_mask_conversion_pattern): Likewise.
972         (vect_try_gather_scatter_pattern): Likewise.
973         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
974         (vect_recog_over_widening_pattern): Likewise.
975         (vect_recog_gather_scatter_pattern): Likewise.
976         (vect_recog_func_ptr): Move from tree-vectorizer.h
977         (vect_vect_recog_func_ptrs): Move further down the file.
978         (vect_recog_func): Likewise.  Remove the third argument.
979         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
980         (vect_pattern_recog_1): Expect the pattern function to do any
981         necessary target tests.  Also expect it to provide a vector type.
982         Remove the type_in handling.
984 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
986         * tree-vect-patterns.c (vect_pattern_detected): New function.
987         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
988         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
989         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
990         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
991         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
992         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
993         (vect_recog_mask_conversion_pattern)
994         (vect_try_gather_scatter_pattern): Likewise.
996 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
998         * tree-vect-patterns.c (vect_get_internal_def): New function.
999         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
1000         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
1001         (search_type_for_mask_1): Use it.
1003 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1005         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
1006         redundant WIDEN_SUM_EXPR handling.
1007         (vect_recog_sad_pattern): Likewise.
1009 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1011         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
1012         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
1013         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
1014         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
1015         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
1017 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1019         * tree-vect-stmts.c (vectorizable_call): Make sure that we
1020         use the stmt_vec_info of the original bb statement for the
1021         new zero assignment, even if the call is part of a pattern.
1023 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1025         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
1026         that the sequence is attached to the original statement rather
1027         than the pattern statement.
1028         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
1029         PATTERN_DEF_SEQ from the original statement rather than
1030         the main pattern statement.
1031         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
1032         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
1033         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
1035 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
1037         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
1038         definition statements before the early exit for statements that aren't
1039         live or relevant.
1040         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
1041         split out from...
1042         (vect_transform_loop): ...here.  Process pattern definition
1043         statements without first checking whether the main pattern
1044         statement is live or relevant.
1046 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
1048         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
1049         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
1050         
1051 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
1053         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
1054         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
1055         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
1056         (expand_block_compare): Change select_block_compare_mode call.
1057         (expand_strncmp_align_check): Use new functions, fix comment.
1058         (emit_final_str_compare_gpr): New function.
1059         (expand_strn_compare): Refactor and clean up code.
1060         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
1062 2018-06-19  Tony Reix  <tony.reix@atos.com>
1063             Damien Bergamini  <damien.bergamini@atos.com>
1064             David Edelsohn  <dje.gcc@gmail.com>
1066         * collect2.c (static_obj): New variable.
1067         (static_libs): New variable.
1068         (is_in_list): Uncomment declaration.
1069         (main): Track AIX libraries linked statically.
1070         (is_in_list): Uncomment definition.
1071         (scan_prog_file): Don't add AIX shared libraries initializer
1072         to constructor list if linking statically.
1074 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
1076         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
1077         constant.
1078         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
1080 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
1082         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
1083         blocks.
1085 2018-06-19  Martin Liska  <mliska@suse.cz>
1087         * config/i386/i386.c (ix86_can_inline_p): Do not use
1088         ipa_fn_summaries::get_create.
1089         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
1090         get.
1091         (devirtualization_time_bonus): Likewise.
1092         (ipcp_propagate_stage): Likewise.
1093         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
1094         (edge_set_predicate): Likewise.
1095         (evaluate_conditions_for_known_args): Likewise.
1096         (evaluate_properties_for_edge): Likewise.
1097         (ipa_call_summary::reset): Tranform to ...
1098         (ipa_call_summary::~ipa_call_summary): ... this.
1099         (ipa_fn_summary::reset): Transform to ...
1100         (ipa_fn_summary::~ipa_fn_summary): ... this.
1101         (ipa_fn_summary_t::remove): Rename to ...
1102         (ipa_fn_summary_t::remove_callees): ... this.
1103         (ipa_fn_summary_t::duplicate): Use placement new
1104         instead of memory copy.
1105         (ipa_call_summary_t::duplicate): Likewise.
1106         (ipa_call_summary_t::remove): Remove.
1107         (dump_ipa_call_summary): Change get_create to get.
1108         (ipa_dump_fn_summary): Dump only when summary exists.
1109         (analyze_function_body): Use symbol_summary::get instead
1110         of get_create.
1111         (compute_fn_summary): Likewise.
1112         (estimate_edge_devirt_benefit): Likewise.
1113         (estimate_edge_size_and_time): Likewise.
1114         (inline_update_callee_summaries): Likewise.
1115         (remap_edge_change_prob): Likewise.
1116         (remap_edge_summaries): Likewise.
1117         (ipa_merge_fn_summary_after_inlining): Likewise.
1118         (write_ipa_call_summary): Likewise.
1119         (ipa_fn_summary_write): Likewise.
1120         (ipa_free_fn_summary): Likewise.
1121         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
1122         (struct ipa_call_summary): Likewise.
1123         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
1124         of get_create.
1125         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
1126         (estimate_size_after_inlining): Likewise.
1127         (estimate_growth): Likewise.
1128         (growth_likely_positive): Likewise.
1129         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
1130         (inline_call): Likewise.
1131         * ipa-inline.c (caller_growth_limits): Likewise.
1132         (can_inline_edge_p): Likewise.
1133         (can_inline_edge_by_limits_p): Likewise.
1134         (compute_uninlined_call_time): Likewise.
1135         (compute_inlined_call_time): Likewise.
1136         (want_inline_small_function_p): Likewise.
1137         (edge_badness): Likewise.
1138         (update_caller_keys): Likewise.
1139         (update_callee_keys): Likewise.
1140         (inline_small_functions): Likewise.
1141         (inline_to_all_callers_1): Likewise.
1142         (dump_overall_stats): Likewise.
1143         (early_inline_small_functions): Likewise.
1144         (early_inliner): Likewise.
1145         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
1146         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1147         * ipa-pure-const.c (malloc_candidate_p): Likewise.
1148         * ipa-split.c (execute_split_functions): Likewise.
1149         * symbol-summary.h: Likewise.
1150         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
1152 2018-06-19  Richard Biener  <rguenther@suse.de>
1154         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
1155         (vectorize_loops): ... here.  Fix dbgcnt handling.
1156         (try_vectorize_loop): Wrap try_vectorize_loop_1.
1158 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
1160         PR target/86197
1161         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
1162         ieee128 argument takes up only one (vector) register, not two (floating
1163         point) registers.
1165 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
1167         * gimplify.c (gimplify_init_constructor): Really never clear for an
1168         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
1170 2018-06-19  Richard Biener  <rguenther@suse.de>
1172         PR tree-optimization/86179
1173         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
1174         after failed recognition.
1176 2018-06-18  Martin Sebor  <msebor@redhat.com>
1178         PR middle-end/85602
1179         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
1180         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
1181         Handle integer subtraction.
1182         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
1183         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
1185 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
1187         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
1188         param from rtx to rtx_insn *.
1189         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
1190         param.
1191         (frv_ifcvt_modify_insn): Likwise.
1192         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
1193         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
1194         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
1195         as_a <rtx_insn *> cast to local "unprotected_region" once
1196         it's been established that it's not NULL or pc_rtx.
1197         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
1198         param "sethi" from rtx to rtx_insn *.
1199         (nds32_group_float_insns): Likewise for param "insn".
1200         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
1201         param.
1202         (vax_output_int_subtract): Likewise.
1203         * config/vax/vax.c (vax_output_int_add): Likewise for param
1204         "insn".
1205         (vax_output_int_subtract): Likewise.
1206         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
1207         (emit_pattern_after): Likewise for param "after".
1208         (emit_insn_after): Likewise.
1209         (emit_jump_insn_after): Likewise.
1210         (emit_call_insn_after): Likewise.
1211         (emit_debug_insn_after): Likewise.
1212         (emit_pattern_before): Likewise for param "before".
1213         (emit_insn_before): Likewise.
1214         (emit_jump_insn_before): Likewise.
1215         * final.c (get_insn_template): Likewise for param "insn", removing
1216         a cast.
1217         * output.h (get_insn_template): Likewise for 2nd param.
1218         * rtl.h (emit_insn_before): Likewise.
1219         (emit_jump_insn_before): Likewise.
1220         (emit_debug_insn_before_noloc): Likewise.
1221         (emit_insn_after): Likewise.
1222         (emit_jump_insn_after): Likewise.
1223         (emit_call_insn_after): Likewise.
1224         (emit_debug_insn_after): Likewise.
1225         (set_insn_deleted): Likewise for param.
1227 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
1229         PR target/85358
1230         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
1231         floating point modes, so that IFmode is numerically greater than
1232         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
1233         to declare the ordering.  This prevents IFmode from being
1234         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
1235         machine.  Include rs6000-modes.h to share the fractional values
1236         between genmodes* and the rest of the compiler.
1237         (IFmode): Likewise.
1238         (KFmode): Likewise.
1239         (TFmode): Likewise.
1240         * config/rs6000/rs6000-modes.h: New file.
1241         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
1242         meaning of rs6000_long_double_size so that 126..128 selects an
1243         appropriate 128-bit floating point type.
1244         (rs6000_option_override_internal): Likewise.
1245         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
1246         (TARGET_LONG_DOUBLE_128): Change the meaning of
1247         rs6000_long_double_size so that 126..128 selects an appropriate
1248         128-bit floating point type.
1249         (LONG_DOUBLE_TYPE_SIZE): Update comment.
1250         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
1251         source and destination to match the standard usage.
1252         (truncifkf2): Likewise.
1253         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
1254         ISA 2.07 to use an explicit clobber, instead of passing in a
1255         temporary.
1256         (copysign<mode>3_soft): Likewise.
1258 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
1260         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
1261         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
1262         (vect_slp_analyze_instance_dependence): Likewise.
1263         (vect_enhance_data_refs_alignment): Likewise.
1264         (vect_analyze_data_refs_alignment): Likewise.
1265         (vect_slp_analyze_and_verify_instance_alignment
1266         (vect_analyze_data_ref_accesses): Likewise.
1267         (vect_prune_runtime_alias_test_list): Likewise.
1268         (vect_analyze_data_refs): Likewise.
1269         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
1270         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
1271         (vect_analyze_scalar_cycles_1): Likewise.
1272         (vect_get_loop_niters): Likewise.
1273         (vect_analyze_loop_form_1): Likewise.
1274         (vect_update_vf_for_slp): Likewise.
1275         (vect_analyze_loop_operations): Likewise.
1276         (vect_analyze_loop): Likewise.
1277         (vectorizable_induction): Likewise.
1278         (vect_transform_loop): Likewise.
1279         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
1280         * tree-vect-slp.c (vect_analyze_slp): Likewise.
1281         (vect_make_slp_decision): Likewise.
1282         (vect_detect_hybrid_slp): Likewise.
1283         (vect_slp_analyze_operations): Likewise.
1284         (vect_slp_bb): Likewise.
1285         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
1286         (vectorizable_bswap): Likewise.
1287         (vectorizable_call): Likewise.
1288         (vectorizable_simd_clone_call): Likewise.
1289         (vectorizable_conversion): Likewise.
1290         (vectorizable_assignment): Likewise.
1291         (vectorizable_shift): Likewise.
1292         (vectorizable_operation): Likewise.
1293         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
1295 2018-06-18  Martin Sebor  <msebor@redhat.com>
1297         PR tree-optimization/81384
1298         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
1299         * builtins.c (expand_builtin_strnlen): New function.
1300         (expand_builtin): Call it.
1301         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
1302         * builtins.def (BUILT_IN_STRNLEN): New.
1303         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
1304         Warn for bounds in excess of maximum object size.
1305         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
1306         single-value ranges.  Handle strnlen.
1307         (handle_builtin_strlen): Handle strnlen.
1308         (strlen_check_and_optimize_stmt): Same.
1309         * doc/extend.texi (Other Builtins): Document strnlen.
1311 2018-06-18  Maya Rashish  <coypu@sdf.org>
1313         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
1314         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
1315         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
1317         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
1318         here to ...
1319         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
1321 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
1323         * tree.c (escaped_string::escape): Replace cast to char * by
1324         const_cast<char *> (unescaped).
1326 2018-06-18  Nick Clifton  <nickc@redhat.com>
1328         PR 84195
1329         * tree.c (escaped_string): New class.  Converts an unescaped
1330         string into its escaped equivalent.
1331         (warn_deprecated_use): Use the new class to convert the
1332         deprecation message, if present.
1333         (test_escaped_strings): New self test.
1334         (test_c_tests): Add test_escaped_strings.
1335         * doc/extend.texi (deprecated): Add a note that the
1336         deprecation message is affected by the -fmessage-length
1337         option, and that control characters will be escaped.
1338         (#pragma GCC error): Document this pragma.
1339         (#pragma GCC warning): Likewise.
1340         * doc/invoke.texi (-fmessage-length): Document this option's
1341         effect on the #warning and #error preprocessor directives and
1342         the deprecated attribute.
1344 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
1346         * tree.c (decl_value_expr_lookup): Revert latest change.
1347         (decl_value_expr_insert): Likewise.
1349 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
1351         * gimplify.c (nonlocal_vlas): Delete.
1352         (nonlocal_vla_vars): Likewise.
1353         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
1354         referenced VLAs.
1355         (gimplify_body): Do not create and destroy nonlocal_vlas.
1356         * tree-nested.c: Include diagnostic.h.
1357         (use_pointer_in_frame): Tweak.
1358         (lookup_field_for_decl): Add assertion and declare the transformation.
1359         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
1360         internal error when the reference is in a wrong context.  Do not
1361         create a debug decl by default.
1362         (note_nonlocal_block_vlas): Delete.
1363         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
1364         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
1365         create a debug decl by default.
1366         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
1367         call is in a wrong context.
1368         (fixup_vla_decls): New function.
1369         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
1370         debug variables were created.
1371         * tree.c (decl_value_expr_lookup): Add checking assertion.
1372         (decl_value_expr_insert): Likewise.
1374 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
1376         PR middle-end/82479
1377         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
1378         * tree-scalar-evolution.c (interpret_expr): Likewise.
1379         (expression_expensive_p): Likewise.
1380         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
1381         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
1382         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
1383         (ssa_defined_by_minus_one_stmt_p): New.
1385 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
1387         PR middle-end/64946
1388         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
1389         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
1390         * dojump.c (do_jump): Likewise.
1391         * expr.c (expand_expr_real_2): Check operand type's sign.
1392         * fold-const.c (const_unop): Handle ABSU_EXPR.
1393         (fold_abs_const): Likewise.
1394         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
1395         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
1396         (strip_sign_op_1): Likesise.
1397         * match.pd: Add new pattern to generate ABSU_EXPR.
1398         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
1399         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
1400         * tree-eh.c (operation_could_trap_helper_p): Likewise.
1401         * tree-inline.c (estimate_operator_cost): Likewise.
1402         * tree-pretty-print.c (dump_generic_node): Likewise.
1403         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
1404         * tree.def (ABSU_EXPR): New.
1406 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
1408         PR middle-end/86095
1409         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
1410         documented as preserved for backward compatibility only.
1411         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
1413         PR rtl-optimization/86108
1414         * bb-reorder.c (create_forwarder_block): Renamed to ...
1415         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
1416         jump from new landing pad to the second part.
1417         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
1418         Adjust callers.
1420 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
1422         PR middle-end/85878
1423         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
1424         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
1425         Only call store_expr for halves if the mode is the same.
1427         PR middle-end/86123
1428         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
1429         Fix up comment formatting.
1431 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1433         * typed-splay-tree.h (typed_splay_tree::remove): New function.
1434         (typed_splay_tree::closure,
1435         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
1436         (typed_splay_tree::typed_splay_tree,
1437         typed_splay_tree::operator =): Declared private.
1438         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
1439         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
1440         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
1441         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
1442         typed_splay_tree::splay_tree_splay,
1443         typed_splay_tree::splay_tree_foreach_helper,
1444         typed_splay_tree::splay_tree_insert,
1445         typed_splay_tree::splay_tree_remove,
1446         typed_splay_tree::splay_tree_lookup,
1447         typed_splay_tree::splay_tree_predecessor,
1448         typed_splay_tree::splay_tree_successor,
1449         typed_splay_tree::splay_tree_min,
1450         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
1451         (typed_splay_tree::root, typed_splay_tree::comp,
1452         typed_splay_tree::delete_key,
1453         typed_splay_tree::delete_value): New data members.
1454         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
1455         typed_splay_tree::remove.
1457 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
1459         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
1460         -mginv and -mno-ginv to the assembler.
1461         * config/mips/mips.opt (-mcrc): New option.
1462         (-mginv): Likewise.
1463         * doc/invoke.text (-mcrc): Document.
1464         (-mginv): Likewise.
1466 2018-06-15  Nick Clifton  <nickc@redhat.com>
1468         PR 84195
1469         * tree.c (escaped_string): New class.  Converts an unescaped
1470         string into its escaped equivalent.
1471         (warn_deprecated_use): Use the new class to convert the
1472         deprecation message, if present.
1473         (test_escaped_strings): New self test.
1474         (test_c_tests): Add test_escaped_strings.
1475         * doc/extend.texi (deprecated): Add a note that the
1476         deprecation message is affected by the -fmessage-length
1477         option, and that control characters will be escaped.
1478         (#pragma GCC error): Document this pragma.
1479         (#pragma GCC warning): Likewise.
1480         * doc/invoke.texi (-fmessage-length): Document this option's
1481         effect on the #warning and #error preprocessor directives and
1482         the deprecated attribute.
1484 2018-06-15  Richard Biener  <rguenther@suse.de>
1486         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
1487         here, also noting vector size used.
1488         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
1489         size used in MSG_OPTIMIZED_LOCATIONS dump.
1490         (pass_slp_vectorize::execute): Adjust.
1492 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
1494         PR target/85968
1495         * config/arc/arc.c (arc_return_address_register): Fix
1496         if-condition.
1498 2018-06-15  Richard Biener  <rguenther@suse.de>
1500         PR middle-end/86159
1501         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
1502         leave useless conversion stripping to force_gimple_operand_gsi.
1503         (gimplify_build2): Likewise.
1504         (gimplify_build1): Likewise.
1506 2018-06-15  Richard Biener  <rguenther@suse.de>
1508         PR middle-end/86076
1509         * tree-cfg.c (move_stmt_op): unshare invariant addresses
1510         before adjusting their block.
1512 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1514         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
1515         multilibs for *-*-rtems*.
1516         * config/riscv/t-rtems: New file.
1518 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
1520         PR middle-end/86122
1521         * match.pd ((A +- CST1) +- CST2): Punt if last resort
1522         unsigned_type_for returns NULL.
1524         PR target/85945
1525         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
1526         subregs of multi-word pseudos unless the float mode has word size.
1528 2018-06-14  Richard Biener  <rguenther@suse.de>
1530         PR middle-end/86139
1531         * tree-vect-generic.c (build_word_mode_vector_type): Remove
1532         duplicate and harmful type_hash_canon.
1533         * tree.c (type_hash_canon): Assert we didn't find ourselves.
1535 2018-06-14  Richard Biener  <rguenther@suse.de>
1537         PR ipa/86124
1538         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
1539         NULL cgraph_node.
1541 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
1543         * config/rtems.h (STDINT_LONG32): Define.
1545 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
1546             Prachi Godbole  <prachi.godbole@imgtec.com>
1548         * config/mips/mips-cpus.def: Define P6600.
1549         * config/mips/mips-tables.opt: Regenerate.
1550         * config/mips/mips.c (mips_ucbranch_type): New enum.
1551         (mips_rtx_cost_data): Add support for P6600.
1552         (mips_issue_rate): Likewise.
1553         (mips_multipass_dfa_lookahead): Likewise.
1554         (mips_avoid_hazard): Likewise.
1555         (mips_reorg_process_insns): Likewise.
1556         (mips_classify_branch_p6600): New function.
1557         * config/mips/mips.h (TUNE_P6600): New define.
1558         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
1559         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
1560         * config/mips/mips.md: Include p6600.md.
1561         (processor): Add p6600.
1562         * config/mips/p6600.md: New file.
1563         * doc/invoke.texi: Add p6600 to supported architectures.
1565 2018-06-13  Martin Sebor  <msebor@redhat.com>
1567         PR tree-optimization/86114
1568         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
1569         of integer types.
1570         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
1572 2018-06-13  Richard Biener  <rguenther@suse.de>
1574         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
1575         Properly set vector type of the intermediate stmt.
1576         * tree-vect-stmts.c (vectorizable_operation): The destination
1577         var always has vectype_out type.
1579 2018-06-13  Jeff Law  <law@redhat.com>
1581         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
1582         integer 0 for argument to print_rtl_with_bb.
1583         (rl78_reorg): Likewise.
1585 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
1587         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
1588         from rtx to rtx_insn *.
1589         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
1590         "label".
1591         (add_sched_insns_for_speculation): Likewise for local "target",
1592         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
1593         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
1594         from rtx_insn ** to rtx_code_label **.
1595         (reorg_emit_nops): Likewise.
1596         (c6x_reorg): Likewise for local "call_labels".
1597         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
1598         rtx to rtx_insn *.
1599         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
1600         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
1601         the loops over LABEL_REFS.
1602         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
1603         braf_label.
1604         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
1605         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
1606         (split_branches): Strengthen local "olabel" from rtx to
1607         rtx_insn *, adding a safe_as_a cast.
1608         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
1609         to "rtx_insn *".
1610         (add_insn_after): Likewise for first two params.
1611         (add_insn_before): Likewise.
1612         (remove_insn): Likewise for param.
1613         (emit_pattern_before_noloc): Likewise for second and third params.
1614         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
1615         (emit_call_insn_before_noloc): Likewise.
1616         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
1617         to "rtx_insn *".
1618         (emit_barrier_before): Likewise.
1619         (emit_label_before): Strengthen "label" param from "rtx" to
1620         "rtx_code_label *".  Strengthen "before" param from "rtx" to
1621         "rtx_insn *".
1622         (emit_insn_after_1): Strengthen "after" param from "rtx" to
1623         "rtx_insn *".
1624         (emit_pattern_after_noloc): Likewise.
1625         (emit_insn_after_noloc): Likewise.
1626         (emit_jump_insn_after_noloc): Likewise.
1627         (emit_call_insn_after_noloc): Likewise.
1628         (emit_debug_insn_after_noloc): Likewise.
1629         (emit_barrier_after): Likewise.
1630         (emit_label_after): Likewise for both params.
1631         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
1632         "loc" param from "int" to "location_t".
1633         (emit_insn_after_setloc): Likewise.
1634         (emit_jump_insn_after_setloc): Likewise.
1635         (emit_call_insn_after_setloc): Likewise.
1636         (emit_debug_insn_after_setloc): Likewise.
1637         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
1638         "loc" param from "int" to "location_t".
1639         (emit_pattern_before): Convert NULL_RTX to NULL.
1640         (emit_insn_before_setloc): Convert "loc" param from "int" to
1641         "location_t".
1642         (emit_jump_insn_before_setloc): Likewise.
1643         (emit_call_insn_before_setloc): Likewise.
1644         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
1645         rtx_insn *.  Convert "loc" param from "int" to "location_t".
1646         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
1647         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
1648         Convert 3rd param from "int" to "location_t".
1649         (emit_barrier_before, emit_barrier_after, next_real_insn):
1650         Strengthen param from rtx to rtx_insn *.
1651         (emit_label_before): Strengthen 1st param from "rtx" to
1652         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
1653         "rtx_insn *".
1654         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
1655         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
1656         Strengthen 2nd param from "rtx" to "rtx_insn *".
1657         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
1658         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
1659         Likewise. Convert 3rd param from "int" to "location_t".
1660         (emit_label_after): Strengthen 1st param from "rtx" to
1661         "rtx_code_label *".
1662         (next_real_insn, remove_insn): Strengthen param from "rtx" to
1663         "rtx_insn *".
1664         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
1665         from "rtx" to "rtx_insn *".
1667 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
1669         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
1670         bodies streamed in with -Q.
1671         * dumpfile.c (dump_files): Add lto-stream-out dump file.
1672         * dumpfile.h (tree_dump_index): Add lto_stream_out.
1673         * gimple-streamer-out.c: Include gimple-pretty-print.h
1674         (output_bb): Dump stmts streamed.
1675         * lto-section-out.c: Include print-tree.h
1676         (lto_begin_section): Dump sections created.
1677         (lto_output_decl_index): Dump decl encoded.
1678         * lto-streamer-out.c: Include print-tree.h
1679         (create_output_block): Dump output block created.
1680         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
1681         (output_function): Dump function output.
1682         (output_constructor): Dump constructor streamed.
1683         (write_global_stream): Output indexes encoded.
1684         (produce_asm_for_decls): Dump streams encoded.
1685         * lto-streamer.c (streamer_dump_file): New global var.
1686         * lto-streamer.h (streamer_dump_file): Declare.
1687         * passes.c (ipa_write_summaries): Initialize streamer dump.
1688         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
1689         in.
1691 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
1693         PR target/86048
1694         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
1695         offsets for register save directives.  Emit a second batch of save
1696         directives, if need be, when the function accesses prior frames.
1698 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1700         * config/arc/fpu.md (fmasf4): Force operand to register.
1701         (fnmasf4): Likewise.
1703 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1705         * config/arc/arc-protos.h (arc_pad_return): Remove.
1706         * config/arc/arc.c (machine_function): Remove force_short_suffix
1707         and size_reason.
1708         (arc_print_operand): Adjust printing of '&'.
1709         (arc_verify_short): Remove conditional printing of short suffix.
1710         (arc_final_prescan_insn): Remove reference to size_reason.
1711         (pad_return): New function.
1712         (arc_reorg): Call pad_return.
1713         (arc_pad_return): Remove.
1714         (arc_init_machine_status): Remove reference to force_short_suffix.
1715         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
1716         (attr length): When attribute iscompact is true force to 2
1717         regardless; in the case of maybe check if we want to force the
1718         instruction to have 4 bytes length.
1719         (nopv): Change it to generate 4 byte long nop as well.
1720         (blockage): New pattern.
1721         (simple_return): Remove call to arc_pad_return.
1722         (p_return_i): Likewise.
1724 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1726         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
1728 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1730         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
1731         ARC cores.
1733 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1735         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
1736         for ARC700 and ARCv2.
1738 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
1740         PR target/86076
1741         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
1742         operands[2] instead of operands[1].
1745 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
1747         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
1748         case, check whether the outer register overlaps an unallocatable
1749         register, not just whether it fits the required class.
1751 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
1753         * poly-int.h (can_div_trunc_p): Add new overload in which all values
1754         are poly_ints.
1755         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
1756         (memrefs_conflict_p): Likewise.
1757         (init_alias_analysis): Likewise.
1758         * cfgexpand.c (expand_debug_expr): Likewise.
1759         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
1760         * cse.c (fold_rtx): Likewise.
1761         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
1762         * expr.c (emit_block_move_hints): Likewise.
1763         (clear_storage_hints, push_block, emit_push_insn): Likewise.
1764         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
1765         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
1766         (emit_group_store): Likewise.
1767         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
1768         to read the PRE/POST_MODIFY increment.
1769         * calls.c (store_one_arg): Use strip_offset.
1770         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
1771         poly_int_rtx_p.
1772         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
1773         by a VEC_SELECT.
1774         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
1775         (simplify_binary_operation_1): Extend CONST_INT handling to
1776         poly_int_rtx_p.
1777         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
1778         than a HOST_WIDE_INT.
1779         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
1780         poly_int64.
1781         (adjust_mems, add_stores): Update accodingly.
1782         (vt_canonicalize_addr): Track polynomial offsets.
1783         (emit_note_insn_var_location): Likewise.
1784         (vt_add_function_parameter): Likewise.
1785         (vt_initialize): Likewise.
1787 2018-06-12  Jeff Law  <law@redhat.com>
1789         * config.gcc (alpha*-*-freebsd*): Remove.
1790         * config/alpha/freebsd.h: Remove.
1792 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
1794         PR other/69968
1795         * spellcheck-tree.c (levenshtein_distance): Rename to...
1796         (get_edit_distance): ...this, and update for underlying renaming.
1797         * spellcheck-tree.h (levenshtein_distance): Rename to...
1798         (get_edit_distance): ...this.
1799         * spellcheck.c (levenshtein_distance): Rename to...
1800         (get_edit_distance): ...this.  Convert from Levenshtein distance
1801         to Damerau-Levenshtein distance by supporting transpositions of
1802         adjacent characters.  Rename "v1" to "v_next" and "v0" to
1803         "v_one_ago".
1804         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
1805         (selftest::test_edit_distance_unit_test_oneway): ...this, and
1806         update for underlying renaming.
1807         (selftest::levenshtein_distance_unit_test): Rename to...
1808         (selftest::test_get_edit_distance_unit): ...this, and update for
1809         underlying renaming.
1810         (selftest::test_find_closest_string): Add example from PR 69968
1811         where transposition helps
1812         (selftest::test_metric_conditions): Update for renaming.
1813         (selftest::test_metric_conditions): Likewise.
1814         (selftest::spellcheck_c_tests): Likewise.
1815         * spellcheck.h (levenshtein_distance): Rename both overloads to...
1816         (get_edit_distance): ...this.
1817         (best_match::consider): Update for renaming.
1819 2018-06-12  Martin Sebor  <msebor@redhat.com>
1821         PR tree-optimization/85259
1822         * builtins.c (compute_objsize): Handle constant offsets.
1823         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
1824         true iff a warning has been issued.
1825         * gimple.h (gimple_nonartificial_location): New function.
1826         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
1827         gimple_nonartificial_location and handle -Wno-system-headers.
1828         (handle_builtin_stxncpy): Same.
1830 2018-06-12  Martin Sebor  <msebor@redhat.com>
1832         PR c/85931
1833         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
1835 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
1837         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
1838         BUILTIN_VEC_XST entries for pointer to double and long long.
1840 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
1842         PR target/85990
1843         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
1844         Update comments.
1845         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
1846         Likewise.
1848 2018-06-12  Martin Liska  <mliska@suse.cz>
1850         * doc/options.texi: Document IntegerRange.
1852 2018-06-12  Martin Liska  <mliska@suse.cz>
1854         * config/i386/i386.opt: Make MPX-related options as Deprecated.
1855         * opt-functions.awk: Handle Deprecated flag.
1856         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
1857         and report error.
1858         (read_cmdline_option): Report warning for a deprecated option.
1859         * opts.h (struct cl_option): Add new field cl_deprecated.
1860         (CL_ERR_DEPRECATED): New.
1862 2018-06-12  Martin Liska  <mliska@suse.cz>
1864         * doc/options.texi: Document Deprecated option flag.
1866 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1868         * config/arc/arc-arch.h (arc_extras): New enum.
1869         (arc_cpu_t):Add field extra.
1870         (arc_cpu_types): Consider the extras.
1871         * config/arc/arc-cpus.def: Add extras info.
1872         * config/arc/arc-opts.h (processor_type): Consider extra field.
1873         * config/arc/arc.c (arc_override_options): Handle extra field.
1875 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
1877         * config/arc/arc-arch.h: Update ARC_OPTX macro.
1878         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
1879         field.
1880         * config/arc/arc.c (arc_init): Update pic warning.
1881         (irq_range): Update irq range parsing warnings.
1882         (arc_override_options): Update various warning messages.
1883         (arc_handle_aux_attribute): Likewise.
1885 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
1887         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
1889 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1891         * doc/sourcebuild.texi: Document usage of line number 0 in verify
1892         compiler messages directives.
1894 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
1896         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
1897         * config/mips/mips-tables.opt: Regenerate.
1898         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
1899         mips64r6.
1900         * doc/invoke.texi: Document -march=i6500.
1902 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
1904         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
1905         (i6400_gpmul): Add cpu_unit.
1906         (i6400_gpdiv): Likewise.
1907         (i6400_msa_add_d): Update reservations.
1908         (i6400_msa_int_add) Likewise.
1909         (i6400_msa_short_logic3) Likewise.
1910         (i6400_msa_short_logic2) Likewise.
1911         (i6400_msa_short_logic) Likewise.
1912         (i6400_msa_move) Likewise.
1913         (i6400_msa_cmp) Likewise.
1914         (i6400_msa_short_float2) Likewise.
1915         (i6400_msa_div_d) Likewise.
1916         (i6400_msa_long_logic1) Likewise.
1917         (i6400_msa_long_logic2) Likewise.
1918         (i6400_msa_mult) Likewise.
1919         (i6400_msa_long_float2) Likewise.
1920         (i6400_msa_long_float4) Likewise.
1921         (i6400_msa_long_float5) Likewise.
1922         (i6400_msa_long_float8) Likewise.
1923         (i6400_fpu_fadd): Include frint type.
1924         (i6400_fpu_store): New define_insn_reservation.
1925         (i6400_fpu_load): Likewise.
1926         (i6400_fpu_move): Likewise.
1927         (i6400_fpu_fcmp): Likewise.
1928         (i6400_fpu_fmadd): Likewise.
1929         (i6400_int_mult): Include imul3nc type and update reservation.
1930         (i6400_int_div): Include idiv3 type and update reservation.
1931         (i6400_int_load): Update to check type not move_type.
1932         (i6400_int_store): Likewise.
1933         (i6400_int_prefetch): Set zero latency.
1935 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
1937         * gcc.c: Document new %@{...} sequence.
1938         (LINK_COMMAND_SPEC): Use it for the -L switches.
1939         (cpp_unique_options): Use it for the -I switches.
1940         (at_file_argbuf): New global variable.
1941         (in_at_file): Likewise.
1942         (alloc_args): Create at_file_argbuf.
1943         (clear_args): Truncate at_file_argbuf.
1944         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
1945         (open_at_file): New function.
1946         (close_at_file): Likewise.
1947         (create_at_file): Delete.
1948         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
1949         <'o'>: Likewise.
1950         <'@'>: New case.
1951         (validate_switches_from_spec): Deal with %@{...} sequence.
1952         (validate_switches): Likewise.
1953         (driver::finalize): Call clear_args.
1955 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
1957         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
1959 2018-06-11  Martin Sebor  <msebor@redhat.com>
1961         * doc/invoke.texi (-Wall): List -Wc++17-compat.
1962         (Wno-class-memaccess): Add @opindex.
1963         (Wno-templates, Wno-multiple-inheritance): Same.
1964         (Wno-virtual-inheritance, Wno-namespaces): Same.
1965         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
1966         (Wno-format-overflow, Wno-format-truncation): Same.
1967         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
1968         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
1969         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
1970         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
1971         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
1972         (Wno-misspelled-isr): Same.
1974 2018-06-11  Martin Sebor  <msebor@redhat.com>
1976         * PR tree-optimization/86083
1977         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
1979 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
1981         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
1983 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
1985         PR target/85755
1986         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
1987         on the correct operand.
1988         (*movdi_internal64): Ditto.
1990 2018-06-11  Martin Liska  <mliska@suse.cz>
1992         PR tree-optimization/86089
1993         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
1995 2018-06-11  Julia Koval  <julia.koval@intel.com>
1997         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
1998         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
1999         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
2001 2018-06-11  Olivier Hainque  <hainque@adacore.com>
2003         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
2004         for Ada with strict dwarf2.
2006 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
2008         PR target/85755
2009         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
2010         addresses.
2012 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
2014         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
2016 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
2018         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
2019         TARGET_ELF.
2021 2018-06-08  Martin Liska  <mliska@suse.cz>
2023         * tree-cfg.h (debug_function): Fix argument type to match
2024         implementation.
2026 2018-06-08  Martin Liska  <mliska@suse.cz>
2028         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
2029         Remove usage of MPX-related (and removed) fields.
2030         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
2032 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
2034         * cfg.c (debug): Use TDF_NONE rather than 0.
2035         * cfghooks.c (debug): Likewise.
2036         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
2037         (struct dump_option_value_info): Convert to...
2038         (struct kv_pair): ...this template type.
2039         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
2040         rather than 0.
2041         (optinfo_verbosity_options): Likewise.
2042         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
2043         OPTGROUP_NONE.
2044         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
2045         than int for "optgroup_flags" param.
2046         (dump_generic_expr_loc): Use dump_flags_t rather than int for
2047         "dump_kind" param.
2048         (dump_dec): Likewise.
2049         (dump_finish): Use TDF_NONE rather than 0.
2050         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
2051         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
2052         than 0.  Update for change to option_ptr.
2053         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
2054         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
2055         0.  Update for changes to optinfo_verbosity_options and
2056         optgroup_options.
2057         (opt_info_switch_p): Convert optgroup_flags from int to
2058         optgroup_flags_t.
2059         (dump_basic_block): Use dump_flags_t rather than int
2060         for "dump_kind" param.
2061         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
2062         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
2063         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
2064         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
2065         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
2066         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
2067         TDF_NONE): Convert from macros to...
2068         (enum dump_flag): ...this new enum.
2069         (dump_flags_t): Update to use enum.
2070         (operator|, operator&, operator~, operator|=, operator&=):
2071         Implement for dump_flags_t.
2072         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
2073         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
2074         Convert from macros to...
2075         (enum optgroup_flag): ...this new enum.
2076         (optgroup_flags_t): New typedef.
2077         (operator|, operator|=): Implement for optgroup_flags_t.
2078         (struct dump_file_info): Convert field "alt_flags" to
2079         dump_flags_t.  Convert field "optgroup_flags" to
2080         optgroup_flags_t.
2081         (dump_basic_block): Use dump_flags_t rather than int for param.
2082         (dump_generic_expr_loc): Likewise.
2083         (dump_dec): Likewise.
2084         (dump_register): Convert param "optgroup_flags" to
2085         optgroup_flags_t.
2086         (opt_info_enable_passes): Likewise.
2087         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
2088         than 0.
2089         * gimple-pretty-print.c (debug): Likewise.
2090         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
2091         (merged_store_group::apply_stores): Likewise.
2092         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
2093         * gimple.c (verify_gimple_pp): Likewise.
2094         * graphite-poly.c (print_pbb_body): Likewise.
2095         * passes.c (pass_manager::register_one_dump_file): Convert
2096         local "optgroup_flags" to optgroup_flags_t.
2097         * print-tree.c (print_node): Use TDF_NONE rather than 0.
2098         (debug): Likewise.
2099         (debug_body): Likewise.
2100         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
2101         to optgroup_flags_t.
2102         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
2103         than 0.
2104         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
2105         (convert_mult_to_fma): Likewise.
2106         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
2107         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
2108         * tree-vect-data-refs.c (dump_lower_bound): Convert param
2109         "dump_kind" to dump_flags_t.
2111 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
2113         * config/rs6000/rs6000.c (min, max): Delete.
2115 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
2117         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
2118         -mabi=spe and -mabi=no-spe.
2120 2018-06-08  Martin Liska  <mliska@suse.cz>
2122         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
2123         where we expect an existing summary.
2125 2018-06-08  Martin Liska  <mliska@suse.cz>
2127         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
2128         * ipa-inline.h (estimate_edge_growth): Likewise.
2130 2018-06-08  Martin Liska  <mliska@suse.cz>
2132         * cgraph.c (function_version_hasher::hash): Use
2133         cgraph_node::get_uid ().
2134         (function_version_hasher::equal):
2135         * cgraph.h (cgraph_node::get_uid): New method.
2136         * ipa-inline.c (update_caller_keys): Use
2137         cgraph_node::get_uid ().
2138         (update_callee_keys): Likewise.
2139         * ipa-utils.c (searchc): Likewise.
2140         (ipa_reduced_postorder): Likewise.
2141         * lto-cgraph.c (input_node): Likewise.
2142         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
2143         * symbol-summary.h (symtab_insertion): Likewise.
2144         (symtab_removal): Likewise.
2145         (symtab_duplication): Likewise.
2146         * tree-pretty-print.c (dump_function_header): Likewise.
2147         * tree-sra.c (convert_callers_for_node): Likewise.
2149 2018-06-08  Martin Liska  <mliska@suse.cz>
2151         * cgraph.c (symbol_table::create_edge): Always assign a new
2152         unique number.
2153         (symbol_table::free_edge): Do not recycle numbers.
2154         * cgraph.h (cgraph_edge::get): New method.
2155         * symbol-summary.h (symtab_removal): Use it.
2156         (symtab_duplication): Likewise.
2157         (call_summary::hashable_uid): Remove.
2159 2018-06-08  Martin Liska  <mliska@suse.cz>
2161         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
2162         (initialize_growth_caches): Remove.
2163         (free_growth_caches): Likewise.
2164         (do_estimate_edge_time): Use edge_growth_cache.
2165         (do_estimate_edge_size): Likewise.
2166         (do_estimate_edge_hints): Likewise.
2167         * ipa-inline.c (reset_edge_caches): Likewise.
2168         (recursive_inlining): Likewise.
2169         (inline_small_functions): Likewise.
2170         * ipa-inline.h (initialize_growth_caches): Remove.
2171         (estimate_edge_size): Likewise.
2172         (estimate_edge_time): Likewise.
2173         (estimate_edge_hints): Likewise.
2174         (reset_edge_growth_cache): Likewise.
2175         * symbol-summary.h (call_summary::remove): New method.
2177 2018-06-08  Martin Liska  <mliska@suse.cz>
2179         * ipa-cp.c (class edge_clone_summary): New summary.
2180         (grow_edge_clone_vectors): Remove.
2181         (ipcp_edge_duplication_hook): Remove.
2182         (class edge_clone_summary_t): New call_summary class.
2183         (ipcp_edge_removal_hook): Remove.
2184         (edge_clone_summary_t::duplicate): New function.
2185         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
2186         (create_specialized_node): Likewise.
2187         (ipcp_driver): Initialize edge_clone_summaries and do not
2188         register hooks.
2190 2018-06-08  Martin Liska  <mliska@suse.cz>
2192         * symbol-summary.h (get): New function.
2193         (call_summary::m_initialize_when_cloning): New class member.
2195 2018-06-08  Martin Liska  <mliska@suse.cz>
2197         * cgraph.c (cgraph_node::remove): Do not recycle uid.
2198         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
2199         (symbol_table::allocate_cgraph_symbol): Do not set uid.
2200         * passes.c (uid_hash_t): Record removed_nodes by their uids.
2201         (remove_cgraph_node_from_order): Use the removed_nodes set.
2202         (do_per_function_toporder): Likwise.
2203         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
2204         instead of summary_uid.
2205         (symtab_removal): Likewise.
2206         (symtab_duplication): Likewise.
2208 2018-06-08  Martin Liska  <mliska@suse.cz>
2210         * ipa-cp.c (ipcp_store_bits_results): Use
2211         ipcp_transformation_sum.
2212         (ipcp_store_vr_results): Likewise.
2213         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
2214         to ...
2215         (ipcp_transformation_initialize): ... this.
2216         (ipa_set_node_agg_value_chain):
2217         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
2218         (write_ipcp_transformation_info): Likewise.
2219         (read_ipcp_transformation_info): Likewise.
2220         (ipcp_update_bits): Likewise.
2221         (ipcp_update_vr): Likewise.
2222         (ipcp_transform_function): Likewise.
2223         * ipa-prop.h: Rename ipcp_transformation_summary to
2224         ipcp_transformation.
2225         (class ipcp_transformation_t): New function summary.
2226         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
2227         (ipa_get_agg_replacements_for_node): Likewise.
2229 2018-06-08  Martin Liska  <mliska@suse.cz>
2231         * ipa-pure-const.c (struct funct_state_d): Do it class instead
2232         of struct.
2233         (class funct_state_summary_t): New function_summary class.
2234         (has_function_state): Remove.
2235         (get_function_state): Likewise.
2236         (set_function_state): Likewise.
2237         (add_new_function): Likewise.
2238         (funct_state_summary_t::insert): New function.
2239         (duplicate_node_data): Remove.
2240         (remove_node_data): Remove.
2241         (funct_state_summary_t::duplicate): New function.
2242         (register_hooks): Create new funct_state_summaries.
2243         (pure_const_generate_summary): Use it.
2244         (pure_const_write_summary): Likewise.
2245         (pure_const_read_summary): Likewise.
2246         (propagate_pure_const): Likewise.
2247         (propagate_nothrow): Likewise.
2248         (dump_malloc_lattice): Likewise.
2249         (propagate_malloc): Likewise.
2250         (execute): Do not register hooks, just remove summary
2251         instead.
2252         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
2253         constructor.
2255 2018-06-08  Martin Liska  <mliska@suse.cz>
2257         * ipa-reference.c (remove_node_data): Remove.
2258         (duplicate_node_data): Likewise.
2259         (class ipa_ref_var_info_summary_t): New class.
2260         (class ipa_ref_opt_summary_t): Likewise.
2261         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
2262         (get_reference_optimization_summary): Use
2263         ipa_ref_opt_sum_summaries.
2264         (set_reference_vars_info): Remove.
2265         (set_reference_optimization_summary): Likewise.
2266         (ipa_init): Create summaries.
2267         (init_function_info): Use function summary.
2268         (ipa_ref_opt_summary_t::duplicate): New function.
2269         (ipa_ref_opt_summary_t::remove): New function.
2270         (get_read_write_all_from_node): Fix GNU coding style.
2271         (propagate): Use function summary.
2272         (write_node_summary_p): Fix GNU coding style.
2273         (stream_out_bitmap): Likewise.
2274         (ipa_reference_read_optimization_summary): Use function summary.
2275         (ipa_reference_c_finalize): Do not release hooks.
2277 2018-06-08  Martin Liska  <mliska@suse.cz>
2279         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
2280         (analyze_function_body): Extract multiple calls of get_create.
2281         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
2282         * ipa-inline.c (recursive_inlining): Use ::get method.
2283         * ipa-inline.h (estimate_edge_growth): Likewise.
2285 2018-06-08  Martin Liska  <mliska@suse.cz>
2287         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
2288         HSA_INVALID.
2289         (hsa_function_summary::hsa_function_summary): Use the new enum
2290         value.
2291         (hsa_gpu_implementation_p): Use hsa_summaries::get.
2292         * hsa-gen.c (hsa_get_host_function): Likewise.
2293         (get_brig_function_name): Likewise.
2294         * ipa-hsa.c (process_hsa_functions): Likewise.
2295         (ipa_hsa_write_summary): Likewise.
2296         * symbol-summary.h (symtab_duplication): Use ::get function/
2297         (get): New function.
2299 2018-06-08  Martin Liska  <mliska@suse.cz>
2301         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
2302         of get.
2303         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
2304         (hsa_register_kernel): Likewise.
2305         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
2306         * hsa-gen.c (hsa_get_host_function): Likewise.
2307         (get_brig_function_name): Likewise.
2308         (generate_hsa): Likewise.
2309         (pass_gen_hsail::execute): Likewise.
2310         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
2311         (devirtualization_time_bonus): Likewise.
2312         (ipcp_propagate_stage): Likewise.
2313         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
2314         (edge_set_predicate): Likewise.
2315         (evaluate_conditions_for_known_args): Likewise.
2316         (evaluate_properties_for_edge): Likewise.
2317         (ipa_fn_summary::reset): Likewise.
2318         (ipa_fn_summary_t::duplicate): Likewise.
2319         (dump_ipa_call_summary): Likewise.
2320         (ipa_dump_fn_summary): Likewise.
2321         (analyze_function_body): Likewise.
2322         (compute_fn_summary): Likewise.
2323         (estimate_edge_devirt_benefit): Likewise.
2324         (estimate_edge_size_and_time): Likewise.
2325         (estimate_calls_size_and_time): Likewise.
2326         (estimate_node_size_and_time): Likewise.
2327         (inline_update_callee_summaries): Likewise.
2328         (remap_edge_change_prob): Likewise.
2329         (remap_edge_summaries): Likewise.
2330         (ipa_merge_fn_summary_after_inlining): Likewise.
2331         (ipa_update_overall_fn_summary): Likewise.
2332         (read_ipa_call_summary): Likewise.
2333         (inline_read_section): Likewise.
2334         (write_ipa_call_summary): Likewise.
2335         (ipa_fn_summary_write): Likewise.
2336         (ipa_free_fn_summary): Likewise.
2337         * ipa-hsa.c (process_hsa_functions): Likewise.
2338         (ipa_hsa_write_summary): Likewise.
2339         (ipa_hsa_read_section): Likewise.
2340         * ipa-icf.c (sem_function::merge): Likewise.
2341         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
2342         (do_estimate_edge_time): Likewise.
2343         (estimate_size_after_inlining): Likewise.
2344         (estimate_growth): Likewise.
2345         (growth_likely_positive): Likewise.
2346         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
2347         (inline_call): Likewise.
2348         * ipa-inline.c (caller_growth_limits): Likewise.
2349         (can_inline_edge_p): Likewise.
2350         (can_inline_edge_by_limits_p): Likewise.
2351         (compute_uninlined_call_time): Likewise.
2352         (compute_inlined_call_time): Likewise.
2353         (want_inline_small_function_p): Likewise.
2354         (edge_badness): Likewise.
2355         (update_caller_keys): Likewise.
2356         (update_callee_keys): Likewise.
2357         (recursive_inlining): Likewise.
2358         (inline_small_functions): Likewise.
2359         (inline_to_all_callers_1): Likewise.
2360         (dump_overall_stats): Likewise.
2361         (early_inline_small_functions): Likewise.
2362         (early_inliner): Likewise.
2363         * ipa-inline.h (estimate_edge_growth): Likewise.
2364         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
2365         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2366         * ipa-prop.h (IPA_NODE_REF): Likewise.
2367         (IPA_EDGE_REF): Likewise.
2368         * ipa-pure-const.c (malloc_candidate_p): Likewise.
2369         (propagate_malloc): Likewise.
2370         * ipa-split.c (execute_split_functions): Likewise.
2371         * symbol-summary.h: Rename get to get_create.
2372         (get): Likewise.
2373         (get_create): Likewise.
2374         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2376 2018-06-08  Martin Liska  <mliska@suse.cz>
2378         * symbol-summary.h (release): Move definition out of class
2379         declaration.
2380         (symtab_removal): Likewise.
2381         (symtab_duplication): Likewise.
2383 2018-06-08  Martin Liska  <mliska@suse.cz>
2385         * symbol-summary.h (function_summary): Move constructor
2386         implementation out of class declaration.
2387         (release): Likewise.
2388         (symtab_insertion): Likewise.
2389         (symtab_removal): Likewise.
2390         (symtab_duplication): Likewise.
2391         (get): Likewise.
2393 2018-06-08  Martin Liska  <mliska@suse.cz>
2395         * Makefile.in: Remove support for MPX (macros, related functions,
2396         fields in cgraph_node, ...).
2397         * builtin-types.def (BT_BND): Likewise.
2398         (BT_FN_BND_CONST_PTR): Likewise.
2399         (BT_FN_CONST_PTR_BND): Likewise.
2400         (BT_FN_VOID_PTR_BND): Likewise.
2401         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
2402         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
2403         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
2404         (expand_builtin_mempcpy_with_bounds): Likewise.
2405         (expand_builtin_memset_with_bounds): Likewise.
2406         (expand_builtin_memset_args): Likewise.
2407         (std_expand_builtin_va_start): Likewise.
2408         (expand_builtin): Likewise.
2409         (expand_builtin_with_bounds): Likewise.
2410         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
2411         (DEF_LIB_BUILTIN_CHKP): Likewise.
2412         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
2413         (DEF_CHKP_BUILTIN): Likewise.
2414         (BUILT_IN_MEMCPY): Likewise.
2415         (BUILT_IN_MEMMOVE): Likewise.
2416         (BUILT_IN_MEMPCPY): Likewise.
2417         (BUILT_IN_MEMSET): Likewise.
2418         (BUILT_IN_STPCPY): Likewise.
2419         (BUILT_IN_STRCAT): Likewise.
2420         (BUILT_IN_STRCHR): Likewise.
2421         (BUILT_IN_STRCPY): Likewise.
2422         (BUILT_IN_STRLEN): Likewise.
2423         (BUILT_IN_MEMCPY_CHK): Likewise.
2424         (BUILT_IN_MEMMOVE_CHK): Likewise.
2425         (BUILT_IN_MEMPCPY_CHK): Likewise.
2426         (BUILT_IN_MEMSET_CHK): Likewise.
2427         (BUILT_IN_STPCPY_CHK): Likewise.
2428         (BUILT_IN_STRCAT_CHK): Likewise.
2429         (BUILT_IN_STRCPY_CHK): Likewise.
2430         * calls.c (store_bounds): Likewise.
2431         (emit_call_1): Likewise.
2432         (special_function_p): Likewise.
2433         (maybe_warn_nonstring_arg): Likewise.
2434         (initialize_argument_information): Likewise.
2435         (finalize_must_preallocate): Likewise.
2436         (compute_argument_addresses): Likewise.
2437         (expand_call): Likewise.
2438         * cfgexpand.c (expand_call_stmt): Likewise.
2439         (expand_return): Likewise.
2440         (expand_gimple_stmt_1): Likewise.
2441         (pass_expand::execute): Likewise.
2442         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
2443         (cgraph_node::remove): Likewise.
2444         (cgraph_node::dump): Likewise.
2445         (cgraph_node::verify_node): Likewise.
2446         * cgraph.h (chkp_function_instrumented_p): Likewise.
2447         (symtab_node::get_alias_target): Likewise.
2448         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
2449         (cgraph_local_p): Likewise.
2450         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
2451         (cgraph_edge::rebuild_references): Likewise.
2452         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
2453         (walk_polymorphic_call_targets): Likewise.
2454         (cgraph_node::expand_thunk): Likewise.
2455         (symbol_table::output_weakrefs): Likewise.
2456         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
2457         (ix86_handle_option): Likewise.
2458         * config/i386/constraints.md: Likewise.
2459         * config/i386/i386-builtin-types.def (BND): Likewise.
2460         (VOID): Likewise.
2461         (PVOID): Likewise.
2462         (ULONG): Likewise.
2463         * config/i386/i386-builtin.def (BDESC_END): Likewise.
2464         (BDESC_FIRST): Likewise.
2465         (BDESC): Likewise.
2466         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
2467         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
2468         * config/i386/i386.c (enum reg_class): Likewise.
2469         (ix86_target_string): Likewise.
2470         (ix86_option_override_internal): Likewise.
2471         (ix86_conditional_register_usage): Likewise.
2472         (ix86_valid_target_attribute_inner_p): Likewise.
2473         (ix86_set_indirect_branch_type): Likewise.
2474         (ix86_set_current_function): Likewise.
2475         (ix86_function_arg_regno_p): Likewise.
2476         (init_cumulative_args): Likewise.
2477         (ix86_function_arg_advance): Likewise.
2478         (ix86_function_arg): Likewise.
2479         (ix86_pass_by_reference): Likewise.
2480         (ix86_function_value_regno_p): Likewise.
2481         (ix86_function_value_1): Likewise.
2482         (ix86_function_value_bounds): Likewise.
2483         (ix86_return_in_memory): Likewise.
2484         (ix86_setup_incoming_vararg_bounds): Likewise.
2485         (ix86_va_start): Likewise.
2486         (indirect_thunk_need_prefix): Likewise.
2487         (print_reg): Likewise.
2488         (ix86_print_operand): Likewise.
2489         (ix86_expand_call): Likewise.
2490         (ix86_output_function_return): Likewise.
2491         (reg_encoded_number): Likewise.
2492         (BDESC_VERIFYS): Likewise.
2493         (ix86_init_mpx_builtins): Likewise.
2494         (ix86_init_builtins): Likewise.
2495         (ix86_emit_cmove): Likewise.
2496         (ix86_emit_move_max): Likewise.
2497         (ix86_expand_builtin): Likewise.
2498         (ix86_builtin_mpx_function): Likewise.
2499         (ix86_get_arg_address_for_bt): Likewise.
2500         (ix86_load_bounds): Likewise.
2501         (ix86_store_bounds): Likewise.
2502         (ix86_load_returned_bounds): Likewise.
2503         (ix86_store_returned_bounds): Likewise.
2504         (ix86_class_likely_spilled_p): Likewise.
2505         (ix86_hard_regno_mode_ok): Likewise.
2506         (x86_order_regs_for_local_alloc): Likewise.
2507         (ix86_mitigate_rop): Likewise.
2508         (ix86_bnd_prefixed_insn_p): Likewise.
2509         (ix86_mpx_bound_mode): Likewise.
2510         (ix86_make_bounds_constant): Likewise.
2511         (ix86_initialize_bounds): Likewise.
2512         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
2513         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
2514         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
2515         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
2516         (TARGET_CHKP_BOUND_MODE): Likewise.
2517         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
2518         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
2519         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
2520         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
2521         * config/i386/i386.h (TARGET_MPX): Likewise.
2522         (TARGET_MPX_P): Likewise.
2523         (VALID_BND_REG_MODE): Likewise.
2524         (FIRST_BND_REG): Likewise.
2525         (LAST_BND_REG): Likewise.
2526         (enum reg_class): Likewise.
2527         (BND_REG_P): Likewise.
2528         (BND_REGNO_P): Likewise.
2529         (BNDmode): Likewise.
2530         (ADJUST_INSN_LENGTH): Likewise.
2531         * config/i386/i386.md: Likewise.
2532         * config/i386/i386.opt: Likewise.
2533         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
2534         (defined): Likewise.
2535         (LINK_MPX): Likewise.
2536         (MPX_SPEC): Likewise.
2537         (LIBMPX_SPEC): Likewise.
2538         (LIBMPXWRAPPERS_SPEC): Likewise.
2539         (CHKP_SPEC): Likewise.
2540         * config/i386/predicates.md: Likewise.
2541         * dbxout.c (dbxout_type): Likewise.
2542         * doc/extend.texi: Likewise.
2543         * doc/invoke.texi: Likewise.
2544         * doc/md.texi: Likewise.
2545         * doc/tm.texi: Likewise.
2546         * doc/tm.texi.in: Likewise.
2547         * dwarf2out.c (is_base_type): Likewise.
2548         (gen_formal_types_die): Likewise.
2549         (gen_subprogram_die): Likewise.
2550         (gen_type_die_with_usage): Likewise.
2551         (gen_decl_die): Likewise.
2552         (dwarf2out_late_global_decl): Likewise.
2553         * expr.c (expand_assignment): Likewise.
2554         (emit_storent_insn): Likewise.
2555         (store_expr_with_bounds): Likewise.
2556         (store_expr): Likewise.
2557         (expand_expr_real_1): Likewise.
2558         * expr.h (store_expr_with_bounds): Likewise.
2559         * function.c (use_register_for_decl): Likewise.
2560         (struct bounds_parm_data): Likewise.
2561         (assign_parms_augmented_arg_list): Likewise.
2562         (assign_parm_find_entry_rtl): Likewise.
2563         (assign_parm_is_stack_parm): Likewise.
2564         (assign_parm_load_bounds): Likewise.
2565         (assign_bounds): Likewise.
2566         (assign_parms): Likewise.
2567         (expand_function_start): Likewise.
2568         * gcc.c (CHKP_SPEC): Likewise.
2569         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
2570         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
2571         (wrestrict_dom_walker::check_call): Likewise.
2572         * gimple.c (gimple_build_call_from_tree): Likewise.
2573         * gimple.h (enum gf_mask): Likewise.
2574         (gimple_call_with_bounds_p): Likewise.
2575         (gimple_call_set_with_bounds): Likewise.
2576         * gimplify.c (gimplify_init_constructor): Likewise.
2577         * ipa-cp.c (initialize_node_lattices): Likewise.
2578         (propagate_constants_across_call): Likewise.
2579         (find_more_scalar_values_for_callers_subset): Likewise.
2580         * ipa-hsa.c (process_hsa_functions): Likewise.
2581         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
2582         * ipa-icf.c (sem_function::merge): Likewise.
2583         * ipa-inline.c (early_inliner): Likewise.
2584         * ipa-pure-const.c (warn_function_noreturn): Likewise.
2585         (warn_function_cold): Likewise.
2586         (propagate_pure_const): Likewise.
2587         * ipa-ref.h (enum GTY): Likewise.
2588         * ipa-split.c (find_retbnd): Likewise.
2589         (consider_split): Likewise.
2590         (split_function): Likewise.
2591         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
2592         * ipa.c (walk_polymorphic_call_targets): Likewise.
2593         (symbol_table::remove_unreachable_nodes): Likewise.
2594         (process_references): Likewise.
2595         (cgraph_build_static_cdtor_1): Likewise.
2596         * lto-cgraph.c (lto_output_node): Likewise.
2597         (output_refs): Likewise.
2598         (compute_ltrans_boundary): Likewise.
2599         (input_overwrite_node): Likewise.
2600         (input_node): Likewise.
2601         (input_cgraph_1): Likewise.
2602         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
2603         * passes.c (pass_manager::execute_early_local_passes): Likewise.
2604         (class pass_chkp_instrumentation_passes): Likewise.
2605         (make_pass_chkp_instrumentation_passes): Likewise.
2606         * passes.def: Likewise.
2607         * rtl.h (struct GTY): Likewise.
2608         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
2609         * stor-layout.c (layout_type): Likewise.
2610         * symtab.c: Likewise.
2611         * target.def: Likewise.
2612         * targhooks.c (default_chkp_bound_type): Likewise.
2613         (default_chkp_bound_mode): Likewise.
2614         (default_builtin_chkp_function): Likewise.
2615         (default_chkp_function_value_bounds): Likewise.
2616         (default_chkp_make_bounds_constant): Likewise.
2617         (default_chkp_initialize_bounds): Likewise.
2618         * targhooks.h (default_chkp_bound_type): Likewise.
2619         (default_chkp_bound_mode): Likewise.
2620         (default_builtin_chkp_function): Likewise.
2621         (default_chkp_function_value_bounds): Likewise.
2622         (default_chkp_make_bounds_constant): Likewise.
2623         (default_chkp_initialize_bounds): Likewise.
2624         * toplev.c (compile_file): Likewise.
2625         (process_options): Likewise.
2626         * tree-core.h (DEF_BUILTIN): Likewise.
2627         (DEF_BUILTIN_CHKP): Likewise.
2628         * tree-inline.c (declare_return_variable): Likewise.
2629         (remap_gimple_stmt): Likewise.
2630         (copy_bb): Likewise.
2631         (initialize_inlined_parameters): Likewise.
2632         (expand_call_inline): Likewise.
2633         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
2634         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
2635         (make_pass_ipa_chkp_produce_thunks): Likewise.
2636         (make_pass_chkp): Likewise.
2637         (make_pass_chkp_opt): Likewise.
2638         (make_pass_chkp_instrumentation_passes): Likewise.
2639         * tree-pretty-print.c (dump_generic_node): Likewise.
2640         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
2641         * tree-ssa-dce.c (propagate_necessity): Likewise.
2642         (eliminate_unnecessary_stmts): Likewise.
2643         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
2644         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
2645         * tree-ssa-sccvn.h: Likewise.
2646         * tree-ssa-strlen.c (get_string_length): Likewise.
2647         (valid_builtin_call): Likewise.
2648         (adjust_last_stmt): Likewise.
2649         (handle_builtin_strchr): Likewise.
2650         (handle_builtin_strcpy): Likewise.
2651         (handle_builtin_stxncpy): Likewise.
2652         (handle_builtin_memcpy): Likewise.
2653         (handle_builtin_strcat): Likewise.
2654         (strlen_check_and_optimize_stmt): Likewise.
2655         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
2656         * tree-streamer-in.c: Likewise.
2657         * tree-streamer.c (record_common_node): Likewise.
2658         * tree.c (tree_code_size): Likewise.
2659         (wide_int_to_tree_1): Likewise.
2660         (type_contains_placeholder_1): Likewise.
2661         (build_common_tree_nodes): Likewise.
2662         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
2663         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
2664         (POINTER_BOUNDS_P): Likewise.
2665         (BOUNDED_TYPE_P): Likewise.
2666         (BOUNDED_P): Likewise.
2667         (CALL_WITH_BOUNDS_P): Likewise.
2668         (pointer_bounds_type_node): Likewise.
2669         * value-prof.c (gimple_ic): Likewise.
2670         * var-tracking.c (vt_add_function_parameters): Likewise.
2671         * varasm.c (make_decl_rtl): Likewise.
2672         (assemble_start_function): Likewise.
2673         (output_constant): Likewise.
2674         (maybe_assemble_visibility): Likewise.
2675         * varpool.c (ctor_for_folding): Likewise.
2676         * chkp-builtins.def: Remove.
2677         * ipa-chkp.c: Remove.
2678         * ipa-chkp.h: Remove.
2679         * rtl-chkp.c: Remove.
2680         * rtl-chkp.h: Remove.
2681         * tree-chkp-opt.c: Remove.
2682         * tree-chkp.c: Remove.
2683         * tree-chkp.h: Remove.
2685 2018-06-07  Carl Love  <cel@us.ibm.com>
2687         * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
2688         vextract_fp_from_shortl): Add BE support.
2690 2018-06-07  Paul Koning  <ni1d@arrl.net>
2692         * compare-elim.c (try_merge_compare): Don't merge compare if
2693         address contains a side effect.
2694         (try_eliminate_compare): Likewise.
2696 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
2698         * config.gcc: Support "tremont".
2699         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
2700         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
2701         PROCESSOR_TREMONT.
2702         * config/i386/i386.c (m_TREMONT): Define.
2703         (processor_target_table): Add "tremont".
2704         (PTA_TREMONT): Define.
2705         (ix86_lea_outperforms): Add TARGET_TREMONT.
2706         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
2707         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
2708         and M_INTEL_GOLDMONT_PLUS.
2709         (fold_builtin_cpu): Add "tremont".
2710         (ix86_add_stmt_cost): Add TARGET_TREMONT.
2711         (ix86_option_override_internal): Add "tremont".
2712         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
2713         (processor_type): Add PROCESSOR_TREMONT.
2714         * config/i386/x86-tune.def: Add m_TREMONT.
2715         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
2717 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2719         * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
2720         symbol defined for msp430i* devices to be lower case.
2722         gcc/testsuite/gcc.target/msp430/
2723         * msp430i-device-symbol.c: New test.
2724         * msp430f-device-symbol.c: New test.
2725         * msp430.h: New test header file.
2727 2018-06-07  Richard Biener  <rguenther@suse.de>
2729         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
2730         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
2731         Properly wrap signed arithmetic if overflow wraps.
2733 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
2735         PR tree-optimization/69615
2736         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
2737         of a cast from a same precision integral SSA_NAME in a bb dominated
2738         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
2739         cast to utype if rhs2 has already a compatible type.
2741 2018-06-07  Richard Biener  <rguenther@suse.de>
2743         PR tree-optimization/85935
2744         * graphite-scop-detection.c (find_params_in_bb): Analyze
2745         condition operands with respect to the correct loop.  Assert
2746         the analysis doesn't fail.
2748 2018-06-04  Carl Love  <cel@us.ibm.com>
2750         * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
2751         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
2752         as it is slightly cheaper.
2753         (first_match_or_eos_index_<mode>):
2754         Calculate index using natural element order.
2755         (first_match_index_<mode>):
2756         Calculate index using natural element order.
2757         (first_match_or_eos_index_<mode>):
2758         Calculate index using natural order.
2759         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
2760         for BE and LE modes.
2761         * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
2762         P9V_BUILTIN_VCLZLSBB_V16QI.
2763         * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
2764         specific.
2766 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2768         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
2769         indentation and line wrap for many prototypes.  Add missing
2770         @smallexample directives around block of prototypes for vec_xl and
2771         vec_xst.
2773 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
2775         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
2776         track if we pass or return IEEE 128-bit floating point.
2777         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
2778         C++ mangling that is compatible with GCC 8.1.
2779         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
2780         (init_cumulative_args): Note if we pass or return IEEE 128-bit
2781         floating point types.
2782         (rs6000_function_arg_advance_1): Likewise.
2783         (rs6000_mangle_type): Optionally generate mangled names that match
2784         what GCC 8.1 generated for IEEE 128-bit floating point types.
2785         (rs6000_globalize_decl_name): If we have an external function that
2786         passes or returns IEEE 128-bit types, generate a weak reference
2787         from the mangled name used in GCC 8.1 to the current mangled
2788         name.
2789         (rs6000_init_builtins): Make __ibm128 use the long double type if
2790         long double is IBM extended double.  Make __float128 use the long
2791         double type if long double is IEEE 128-bit.
2793         PR target/85657
2794         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
2795         macro for __ibm128 built-in functions.
2796         (PACK_IF): Add __ibm128 pack/unpack functions.
2797         (UNPACK_IF): Likewise.
2798         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
2799         enable long double built-in functions if long double is IEEE
2800         128-bit floating point.
2801         (rs6000_invalid_builtin): Update long double built-in function
2802         error message.
2803         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
2804         functions, adjust the built-in function to use the long double
2805         built-in function if __ibm128 and long double are the same type.
2806         * doc/extend.texi (PowerPC builtins): Update documention for
2807         __builtin_{,un}pack_longdouble.  Add documentation for
2808         __builtin_{,un}pack_ibm128.
2810 2018-06-06  Jim Wilson  <jimw@sifive.com>
2812         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
2813         (struct machine_function): New field interrupt_mode.
2814         (riscv_handle_type_attribute): New function.  Add forward declaration.
2815         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
2816         (riscv_expand_epilogue): Check interrupt_mode field.
2817         (riscv_set_current_function): Check interrupt attribute args and
2818         set interrupt_mode field.
2819         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
2820         (riscv_sret, riscv_uret): New.
2821         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
2822         new arguments to interrupt attribute.
2824 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
2826         PR target/63177
2827         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
2828         Don't handle -mcpu=power8 if -mpower9-vector is also used.
2830 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2832         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
2833         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
2834         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
2835         several redundant entries.
2837 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
2839         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
2840         type from "rtx" to "rtx_insn *".
2841         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
2842         for local "call_insn", removing cast.
2843         (ix86_expand_call): Likewise, introducing a "call_insn" local.
2845 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
2847         PR tree-optimization/86066
2848         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
2849         for BIT_INSERT_EXPR stores.
2851 2018-06-06  Richard Biener  <rguenther@suse.de>
2853         PR tree-optimization/86062
2854         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
2855         component refs ontop
2856         of to be offsetted base.
2858 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2860         * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
2861         to be static and remove check on interrupt attribute name.
2863         gcc/testsuite/gcc.target/msp430/
2864         * function-attributes-4.c: New test.
2865         * static-interrupts.c: New test.
2867 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
2869         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
2870         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
2872 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
2874         PR target/79924
2875         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
2876         second argument.
2877         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
2878         Remove second argument, change how error is called.
2879         (aarch64_layout_arg): Remove second argument from
2880         aarch64_err_no_fpadvsimd call.
2881         (aarch64_init_cumulative_args): Ditto.
2882         (aarch64_gimplify_va_arg_expr): Ditto.
2883         * config/aarch64/aarch64.md (mov<mode>): Ditto.
2885 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
2887         * config/i386/i386.md (simple_return_indirect_internal): New expander.
2888         (*simple_return_indirect_internal<mode>): Rename from
2889         simple_return_indirect_internal.  Use W mode iterator.
2890         (rstorssp): New expander.
2891         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
2892         (clrssbsy): New expander.
2893         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
2895 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
2897         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
2898         __typeof__.
2899         (cmse_check_pointed_object): Likewise.
2901 2018-06-05  Martin Liska  <mliska@suse.cz>
2903         PR gcov-profile/47618
2904         * doc/invoke.texi: Document how -fprofile-dir format
2905         is extended.
2907 2018-06-05  Richard Biener  <rguenther@suse.de>
2909         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
2910         removal pretend DOM info isn't available so we do not update
2911         it and only remove edges, not dominated blocks.  Actually free
2912         DOM info in case we removed something.  Remove unreachable blocks.
2913         (mfb_keep_latches): Work with either DOM info or marked backedges.
2914         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
2915         first.  Mark backedges if DOM info isn't available.
2916         (Re-)compute DOM info after cleanup_control_flow_pre.
2918 2018-06-05  Richard Biener  <rguenther@suse.de>
2920         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
2921         (locus_discrim_hasher::hash): Adjust.
2922         (locus_discrim_hasher::equal): Likewise.
2923         (next_discriminator_for_locus): Work on line directly.
2924         (same_line_p): Pass in expanded locus1 as well.
2925         (assign_discriminators): Avoid redundant location expansions.
2927 2018-06-05  Richard Biener  <rguenther@suse.de>
2929         PR tree-optimization/86046
2930         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
2931         if required after clearing TREE_ADDRESSABLE.
2933 2018-06-05  Richard Biener  <rguenther@suse.de>
2935         PR tree-optimization/86047
2936         * tree-ssa-loop.c (for_each_index): Glob handling of all
2937         decls and constants and really handle all of them.
2939 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2941         PR target/81497
2942         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
2943         qualifier_void_pointer and qualifier_const_void_pointer.
2944         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
2945         (arm_init_builtins): Handle the above.
2946         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
2947         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
2948         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
2949         void intrinsics.
2951 2018-06-05  Martin Liska  <mliska@suse.cz>
2953         * auto-profile.c (read_autofdo_file): Do not use
2954         gcov_ctr_summary struct.
2955         (afdo_callsite_hot_enough_for_early_inline): Likewise.
2956         * coverage.c (struct counts_entry): Likewise.
2957         (read_counts_file): Read just single summary entry.
2958         (get_coverage_counts): Use gcov_summary struct.
2959         * coverage.h (get_coverage_counts): Likewise.
2960         * gcov-dump.c (dump_working_sets): Likewise.
2961         (tag_summary): Dump just single summary.
2962         * gcov-io.c (gcov_write_summary): Write just histogram
2963         summary.
2964         (gcov_read_summary): Read just single summary.
2965         (compute_working_sets): Use gcov_summary struct.
2966         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
2967         of GCOV_COUNTERS_SUMMABLE.
2968         (GCOV_COUNTERS_SUMMABLE): Remove.
2969         (GCOV_FIRST_VALUE_COUNTER): Replace with
2970         GCOV_COUNTER_V_INTERVAL.
2971         (struct gcov_ctr_summary): Remove.
2972         (struct gcov_summary): Directly use fields of former
2973         gcov_ctr_summary.
2974         (compute_working_sets): Use gcov_summary struct.
2975         * gcov.c (read_count_file): Do not use ctrs fields.
2976         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
2977         struct.
2978         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
2979         struct.
2980         * profile.c: Likewise.
2981         * profile.h: Likewise.
2983 2018-06-05  Martin Liska  <mliska@suse.cz>
2985         PR gcov-profile/84846
2986         * gcov.c (output_lines): Print working directory only
2987         in intermediate format.
2989 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
2991         * config/s390/s390-builtin-types.def: Add void function type.
2992         * config/s390/s390-builtins.def: Use the function type for the
2993         tbeginc builtin.
2995 2018-06-04  Jim Wilson  <jimw@sifive.com>
2997         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
2998         to int.
2999         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
3000         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
3001         handle EH_RETURN_DATA_REGNO registers properly.
3002         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
3003         (riscv_expand_epilogue): Update comment.  Change argument name and
3004         type.  Update code to use new name and type.  Pass new args to
3005         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
3006         EXCEPTION_RETURN.
3007         * config/riscv/riscv.md (NORMAL_RETURN): New.
3008         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
3009         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
3010         (eh_return): Call gen_eh_return_internal and emit barrier.
3011         (eh_return_internal): Call riscv_expand_epilogue.
3013 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
3015         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
3016         bit_insertion field and declare can_be_merged_into method.
3017         (merged_store_group::can_be_merged_into): New method.
3018         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
3019         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
3020         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
3022 2018-06-04  Richard Biener  <rguenther@suse.de>
3024         PR tree-optimization/85955
3025         * builtins.c (fold_builtin_sincos): Convert pointers to
3026         destination to appropriate type before dereferencing.
3028 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
3030         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
3032 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
3034         * expr.c (expand_expr_real_1): Force the operand into memory if
3035         its TYPE_MODE is BLKmode and if there is no integer mode for
3036         the number of bits being extracted.
3038 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
3040         PR target/85832
3041         PR target/86036
3042         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
3043         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
3045 2018-06-04  Richard Biener  <rguenther@suse.de>
3047         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
3048         (cleanup_tree_cfg_noloop): ... single caller.  Do
3049         start_recording_case_labels later.
3051 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
3053         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
3054         to _IMMINTRIN_H_INCLUDED.
3055         * config/i386/pconfigintrin.h: Ditto.
3056         * config/i386/waitpkgintrin.h: Ditto.
3057         * config/i386/immintrin.h: Add includes for sgxintrin.h,
3058         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
3059         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
3060         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
3061         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
3062         waitpkgintrin.h and cldemoteintrin.h.
3064 2018-06-04  Richard Biener  <rguenther@suse.de>
3066         PR tree-optimization/86038
3067         * tracer.c (find_best_successor): Check probability for
3068         being initialized, bail out if not.
3070 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
3072         PR target/86003
3073         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
3074         of bits to ignore when comparing architectures.
3076 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
3078         PR tree-optimization/69615
3079         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
3080         maximum or minimum of the type, try to merge it also as if
3081         range1 is + [-, x - 1] or + [x + 1, -].
3083         PR c++/86025
3084         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
3086 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
3088         PR tree-optimization/86034
3089         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
3090         the unsigned bitfield type in a bit insertion sequence if it does not
3091         have a larger precision than the bitfield size.
3092         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
3094 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
3096         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
3098 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
3100         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
3101         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
3102         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
3103         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
3105 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
3107         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
3108         Disable -fdelete-null-pointer-checks for ELF toolchain.
3110 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
3111             Kito Cheng  <kito.cheng@gmail.com>
3113         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
3114         (nds32le-*-*, nds32be-*-*): Integrate checking process.
3115         (nds32*-*-*): Add glibc and uclibc conditions.
3116         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
3117         (TARGET_EXCEPT_UNWIND_INFO): Define.
3118         * config/nds32/elf.h: New file.
3119         * config/nds32/linux.h: New file.
3120         * config/nds32/nds32-elf.opt: New file.
3121         * config/nds32/nds32-linux.opt: New file.
3122         * config/nds32/nds32-fp-as-gp.c
3123         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
3124         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
3125         TARGET_LINUX_ABI.
3126         (nds32_asm_file_end): Ditto.
3127         (nds32_print_operand): Ditto.
3128         (nds32_insert_attributes): Ditto.
3129         (nds32_init_libfuncs): New function.
3130         (TARGET_HAVE_TLS): Define.
3131         (TARGET_INIT_LIBFUNCS): Define.
3132         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
3133         spec content.
3134         (TARGET_ELF): Apply different mcmodel setting.
3135         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
3136         been migrated into elf.h and linux.h files.
3137         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
3138         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
3139         (mcmodel): The content has been migrated into nds32-elf.opt and
3140         nds32-linux.opt files.
3141         * config/nds32/t-elf: New file.
3142         * config/nds32/t-linux: New file.
3144 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
3145             Shiva Chen  <shiva0217@gmail.com>
3147         * config/nds32/constants.md (unspec_volatile_element): Add
3148         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
3149         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
3150         optimization.
3151         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
3152         (make_pass_nds32_fp_as_gp): Declare.
3153         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
3154         optmization pass.
3155         (nds32_asm_function_end_prologue): Remove unused asm output.
3156         (nds32_asm_function_begin_epilogue): Remove unused asm output.
3157         (nds32_asm_file_start): Output necessary fp_as_gp information.
3158         (nds32_option_override): Adjust register usage.
3159         (nds32_expand_prologue): Consider fp_as_gp situation.
3160         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
3161         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
3162         (epilogue): Ditto.
3163         (return): Ditto.
3164         (simple_return): Ditto.
3165         (omit_fp_begin): Output special directive for fp_as_gp.
3166         (omit_fp_end): Output special directive for fp_as_gp.
3167         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
3168         mforbid-fp-as-gp): New options.
3170 2018-06-01  Mark Wielaard  <mark@klomp.org>
3172         * dwarf2out.c (dwarf2out_finish): Remove generation of
3173         DW_AT_loclists_base.
3175 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
3177         * gimple-ssa-store-merging.c: Include gimple-fold.h.
3178         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
3179         (struct merged_store_group): Add bit_insertion field.
3180         (dump_char_array): Use standard hexadecimal format.
3181         (merged_store_group::merged_store_group): Set bit_insertion to false.
3182         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
3183         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
3184         also print the mask in the dump file.
3185         (pass_store_merging::gate): Minor tweak.
3186         (imm_store_chain_info::coalesce_immediate): Fix wrong association
3187         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
3188         stores with INTEGER_CST stores.
3189         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
3190         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
3191         and use it throughout.  Generate bit insertion sequences if need be.
3192         (pass_store_merging::process_store): Remove redundant condition.
3193         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
3195 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
3197         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
3198         the 128-bit floating point types.  Fix function comment.
3200 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3202         * config/aarch64/aarch64-simd.md
3203         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
3204         mnemonics.
3205         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
3206         mnemonics.
3208 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
3210         PR tree-optimization/85989
3211         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
3212         variable.
3213         (backprop::intersect_uses): Check it when deciding whether this
3214         is a backedge reference.
3215         (backprop::process_block): Add each phi to m_visited_phis
3216         after visiting it, then clear it at the end.
3218 2018-06-01  Richard Biener  <rguenther@suse.de>
3220         * tree-vectorizer.h (vect_dr_stmt): New function.
3221         (vect_get_load_cost): Adjust.
3222         (vect_get_store_cost): Likewise.
3223         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
3224         Use vect_dr_stmt instead of DR_SMTT.
3225         (vect_record_base_alignments): Likewise.
3226         (vect_calculate_target_alignment): Likewise.
3227         (vect_compute_data_ref_alignment): Likewise and make static.
3228         (vect_update_misalignment_for_peel): Likewise.
3229         (vect_verify_datarefs_alignment): Likewise.
3230         (vector_alignment_reachable_p): Likewise.
3231         (vect_get_data_access_cost): Likewise.  Pass down
3232         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
3233         (vect_get_peeling_costs_all_drs): Likewise.
3234         (vect_peeling_hash_get_lowest_cost): Likewise.
3235         (vect_enhance_data_refs_alignment): Likewise.
3236         (vect_find_same_alignment_drs): Likewise.
3237         (vect_analyze_data_refs_alignment): Likewise.
3238         (vect_analyze_group_access_1): Likewise.
3239         (vect_analyze_group_access): Likewise.
3240         (vect_analyze_data_ref_access): Likewise.
3241         (vect_analyze_data_ref_accesses): Likewise.
3242         (vect_vfa_segment_size): Likewise.
3243         (vect_small_gap_p): Likewise.
3244         (vectorizable_with_step_bound_p): Likewise.
3245         (vect_prune_runtime_alias_test_list): Likewise.
3246         (vect_analyze_data_refs): Likewise.
3247         (vect_supportable_dr_alignment): Likewise.
3248         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
3249         (vect_gen_prolog_loop_niters): Likewise.
3250         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
3251         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
3252         modify DR_STMT.
3253         (vect_recog_mask_conversion_pattern): Likewise.
3254         (vect_try_gather_scatter_pattern): Likewise.
3255         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
3256         to vect_get_store_cost.
3257         (vect_get_store_cost): Get stmt_info instead of DR.
3258         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
3259         (vect_get_load_cost): Get stmt_info instead of DR.
3261 2018-06-01  Richard Biener  <rguenther@suse.de>
3263         PR middle-end/86017
3264         * gimple-fold.c (var_decl_component_p): Also allow offsetted
3265         vars wrapped in MEM_REFs.
3267 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
3269         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
3270         Fix subreg tests so that we only return a choice between
3271         GENERAL_REGS and FP_REGS if the original classes included both.
3273 2018-06-01  Richard Biener  <rguenther@suse.de>
3275         PR ipa/85960
3276         * tree-ssa-structalias.c (get_function_part_constraint):
3277         Handle NULL fi->decl.
3278         (find_func_aliases_for_call): Properly handle indirect
3279         fi from direct call.
3280         (find_func_clobbers): Likewise.
3281         (ipa_pta_execute): Likewise.
3282         (create_variable_info_for): For functions that are ifunc_resolver
3283         resolve to a varinfo that contains the result of the resolver call.
3284         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
3285         aliases.
3287 2018-05-31  Michael Collison  <michael.collison@arm.com>
3289         * config/aarch64/aarch64.md:
3290         (*fix_to_zero_extenddfdi2): New pattern.
3291         * gcc.target/aarch64/fix_extend1.c: New testcase.
3293 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
3295         PR middle-end/78809
3296         PR middle-end/83026
3297         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
3298         and BUILT_IN_STRNCMP_EQ.
3299         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
3300         BUILT_IN_STRNCMP_EQ.
3301         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
3302         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
3303         (gimple_fold_builtin): Likewise.
3304         * tree-ssa-strlen.c (compute_string_length): New function.
3305         (determine_min_obsize): New function.
3306         (handle_builtin_string_cmp): New function to handle calls to
3307         string compare functions.
3308         (strlen_optimize_stmt): Add handling to builtin string compare
3309         calls.
3310         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
3311         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
3312         * tree.c (build_common_builtin_nodes): Add new defines of
3313         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
3315 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
3317         PR target/85984
3318         * bb-reorder.c (pass_partition_blocks::gate): Return false for
3319         functions with naked attribute.
3321 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
3323         * config/i386/sse.md (avx_vec_concat<mode>):
3324         Substitute concat_tg_mode mode attribute with xtg_mode.
3325         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
3326         (concat_tg_mode): Remove mode attribute.
3328 2018-05-31  Martin Sebor  <msebor@redhat.com>
3330         PR c/82063
3331         * calls.c (alloc_max_size): Correct a logic error/typo.
3332         Treat excessive arguments as infinite.  Warn for invalid arguments.
3333         * doc/invoke.texi (-Walloc-size-larger-than): Update.
3335 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
3337         PR target/85829
3338         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
3339         and movx for Haswell.
3341 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
3342             Cesar Philippidis  <cesar@codesourcery.com>
3344         PR middle-end/85879
3345         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
3346         when emitting error on private/firstprivate reductions.
3347         * omp-low.c (lower_omp_target): Avoid reference-type processing
3348         on pointers for firstprivate clause.
3350 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
3352         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
3353         (st1x2): Likewise.
3354         (st1x3): Likewise.
3355         * config/aarch64/aarch64-simd.md
3356         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
3357         (aarch64_ld1_x3_<mode>): Likewise
3358         (aarch64_st1x2<VALLDIF:mode>): Likewise
3359         (aarch64_st1_x2_<mode>): Likewise
3360         (aarch64_st1x3<VALLDIF:mode>): Likewise
3361         (aarch64_st1_x3_<mode>): Likewise
3362         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
3363         (vld1_s8_x3): Likewise.
3364         (vld1_u16_x3): Likewise.
3365         (vld1_s16_x3): Likewise.
3366         (vld1_u32_x3): Likewise.
3367         (vld1_s32_x3): Likewise.
3368         (vld1_u64_x3): Likewise.
3369         (vld1_s64_x3): Likewise.
3370         (vld1_f16_x3): Likewise.
3371         (vld1_f32_x3): Likewise.
3372         (vld1_f64_x3): Likewise.
3373         (vld1_p8_x3): Likewise.
3374         (vld1_p16_x3): Likewise.
3375         (vld1_p64_x3): Likewise.
3376         (vld1q_u8_x3): Likewise.
3377         (vld1q_s8_x3): Likewise.
3378         (vld1q_u16_x3): Likewise.
3379         (vld1q_s16_x3): Likewise.
3380         (vld1q_u32_x3): Likewise.
3381         (vld1q_s32_x3): Likewise.
3382         (vld1q_u64_x3): Likewise.
3383         (vld1q_s64_x3): Likewise.
3384         (vld1q_f16_x3): Likewise.
3385         (vld1q_f32_x3): Likewise.
3386         (vld1q_f64_x3): Likewise.
3387         (vld1q_p8_x3): Likewise.
3388         (vld1q_p16_x3): Likewise.
3389         (vld1q_p64_x3): Likewise.
3390         (vst1_s64_x2): Likewise.
3391         (vst1_u64_x2): Likewise.
3392         (vst1_f64_x2): Likewise.
3393         (vst1_s8_x2): Likewise.
3394         (vst1_p8_x2): Likewise.
3395         (vst1_s16_x2): Likewise.
3396         (vst1_p16_x2): Likewise.
3397         (vst1_s32_x2): Likewise.
3398         (vst1_u8_x2): Likewise.
3399         (vst1_u16_x2): Likewise.
3400         (vst1_u32_x2): Likewise.
3401         (vst1_f16_x2): Likewise.
3402         (vst1_f32_x2): Likewise.
3403         (vst1_p64_x2): Likewise.
3404         (vst1q_s8_x2): Likewise.
3405         (vst1q_p8_x2): Likewise.
3406         (vst1q_s16_x2): Likewise.
3407         (vst1q_p16_x2): Likewise.
3408         (vst1q_s32_x2): Likewise.
3409         (vst1q_s64_x2): Likewise.
3410         (vst1q_u8_x2): Likewise.
3411         (vst1q_u16_x2): Likewise.
3412         (vst1q_u32_x2): Likewise.
3413         (vst1q_u64_x2): Likewise.
3414         (vst1q_f16_x2): Likewise.
3415         (vst1q_f32_x2): Likewise.
3416         (vst1q_f64_x2): Likewise.
3417         (vst1q_p64_x2): Likewise.
3418         (vst1_s64_x3): Likewise.
3419         (vst1_u64_x3): Likewise.
3420         (vst1_f64_x3): Likewise.
3421         (vst1_s8_x3): Likewise.
3422         (vst1_p8_x3): Likewise.
3423         (vst1_s16_x3): Likewise.
3424         (vst1_p16_x3): Likewise.
3425         (vst1_s32_x3): Likewise.
3426         (vst1_u8_x3): Likewise.
3427         (vst1_u16_x3): Likewise.
3428         (vst1_u32_x3): Likewise.
3429         (vst1_f16_x3): Likewise.
3430         (vst1_f32_x3): Likewise.
3431         (vst1_p64_x3): Likewise.
3432         (vst1q_s8_x3): Likewise.
3433         (vst1q_p8_x3): Likewise.
3434         (vst1q_s16_x3): Likewise.
3435         (vst1q_p16_x3): Likewise.
3436         (vst1q_s32_x3): Likewise.
3437         (vst1q_s64_x3): Likewise.
3438         (vst1q_u8_x3): Likewise.
3439         (vst1q_u16_x3): Likewise.
3440         (vst1q_u32_x3): Likewise.
3441         (vst1q_u64_x3): Likewise.
3442         (vst1q_f16_x3): Likewise.
3443         (vst1q_f32_x3): Likewise.
3444         (vst1q_f64_x3): Likewise.
3445         (vst1q_p64_x3): Likewise.
3447 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3449         * config/msp430/msp430.c (msp430_output_labelref): Prepend
3450         user_label_prefix to name.
3452         * tree-core.h: Update comment about the format of NAME string
3453         passed to handler in attribute_spec.
3455         * config/msp430/msp430.md: Remove erroneous subreg expression from
3456         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
3457         zero_extend{q,h}isi2.
3459 2018-05-30  Borislav Petkov  <bp@suse.de>
3461         * doc/extend.texi: Document some architecture specific
3462         constraints and sort entries.
3464 2018-05-30  Martin Sebor  <msebor@redhat.com>
3466         PR middle-end/85369
3467         * builtins.c (expand_builtin_stpcpy_1): New function.
3468         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
3469         only if the former succeeds.
3471 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
3473         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
3474         in saphira.
3476 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3478         * doc/invoke.texi (-flinker-output): Document
3480 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3482         * passes.c (ipa_write_summaries): Only modify statements if body
3483         is in memory.
3484         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
3485         incrementally linking.
3486         (ipa_passes): Likewise.
3487         * lto-cgraph.c (lto_output_node): When incrementally linking do not
3488         pass down resolution info.
3489         * common.opt (flag_incremental_link): Update info.
3490         * gcc.c (plugin specs): Turn flinker-output=* to
3491         -plugin-opt=-linker-output-known
3492         * toplev.c (compile_file): Also cut compilation when doing incremental
3493         link.
3494         * flag-types. (enum lto_partition_model): Add
3495         LTO_LINKER_OUTPUT_NOLTOREL.
3496         (invoke.texi): Add -flinker-output docs.
3497         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
3498         link same way as WPA; do not stream in dead initializers.
3500         * dwarf2out.c (dwarf2out_die_ref_for_decl,
3501         darf2out_register_external_decl): Support incremental link.
3503 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3505         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
3507 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
3509         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
3510         it down to simple_object_copy_lto_debug_sections.
3511         (run_gcc): Determine incremental LTO link time and configure
3512         lto1 into non-wpa mode, disable renaming of debug sections.
3514 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3516         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
3517         descriptions of various incorrectly documented functions.
3519 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
3521         Revert:
3522         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
3523         address check not strict.
3525 2018-05-30  Richard Biener  <rguenther@suse.de>
3527         PR tree-optimization/85964
3528         * tracer.c (better_p): Drop initialized count check, we only
3529         call the function with initialized counts now.
3530         (find_best_successor): Do find a best edge if one
3531         has uninitialized count.
3532         (find_best_predecessor): Likewise.  Do BB frequency check only
3533         if count is initialized.
3535 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
3537         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
3538         (aarch64_ldrstr_offset_compare): New.
3539         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
3540         load/store orderings.
3541         (aarch64_gen_adjusted_ldpstp): Likewise.
3543 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
3545         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
3546         Check for subset of GENERAL_REGS and FP_REGS.
3547         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
3548         r=w alternative.
3550 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
3552         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
3553         and wi::to_poly_offset.  Add the current offset and then check
3554         whether the sum fits, rather than using an unchecked addition of
3555         a checked term.  Check for a shwi rather than a uhwi.
3556         * expr.c (get_bit_range): Use tree_to_poly_uint64.
3557         (store_constructor): Use poly_int_tree_p.
3558         (expand_expr_real_1): Likewise.
3559         * function.c (assign_temp): Likewise.
3560         * fold-const.c (const_binop): Use poly_int_tree_p and
3561         wi::to_poly_offset.
3562         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
3563         division.
3564         * ipa-icf-gimple.c (func_checker::compare_operand): Use
3565         to_poly_offset for MEM offsets.
3566         * ipa-icf.c (sem_variable::equals): Likewise.
3567         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
3568         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
3569         wi::to_poly_offset for BIT_FIELD_REF offsets.
3570         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
3571         wi::to_poly_offset.
3572         * var-tracking.c (emit_note_insn_var_location): Use
3573         tree_to_poly_uint64.
3575 2018-05-29  Jim Wilson  <jimw@sifive.com>
3577         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
3579 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
3581         PR target/85950
3582         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
3583         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
3584         sequence.
3585         (sse4_1_round<mode>2): Use nonimmediate_operand
3586         for operand 1 predicate.
3588 2018-05-29  Martin Sebor  <msebor@redhat.com>
3589             Richard Biener  <rguenther@suse.de>
3591         PR testsuite/85888
3592         * calls.c (get_size_range): Call determine_value_range instead
3593         of get_value_range..
3594         * tree-vrp.h (determine_value_range): Declared new function.
3595         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
3597 2018-05-29  Richard Biener  <rguenther@suse.de>
3599         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
3600         sure to use non-pattern stmts for get_earlier_stmt arguments.
3601         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
3602         called on pattern stmts.
3603         (get_later_stmt): Likewise.
3605 2018-05-29  Martin Liska  <mliska@suse.cz>
3607         PR gcov-profile/85759
3608         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
3609         env variables.
3611 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
3613         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
3614         VEC_UNPACK_*_EXPR.
3615         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
3616         VEC_PACK_*_EXPR.
3618         PR target/85918
3619         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
3620         VEC_PACK_FLOAT_EXPR): New tree codes.
3621         * tree-pretty-print.c (op_code_prio): Handle
3622         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
3623         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
3624         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
3625         * tree-inline.c (estimate_operator_cost): Likewise.
3626         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
3627         * fold-const.c (const_binop): Likewise.
3628         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
3629         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
3630         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
3631         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
3632         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
3633         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
3634         * expr.c (expand_expr_real_2): Likewise.
3635         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
3636         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
3637         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
3638         optabs.
3639         * optabs.c (expand_widen_pattern_expr): For
3640         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
3641         sign from result type rather than operand's type.
3642         (expand_binop_directly): For vec_packu_float_optab and
3643         vec_packs_float_optab allow result type to be different from operand's
3644         type.
3645         * optabs-tree.c (optab_for_tree_code): Handle
3646         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
3647         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
3648         * tree-vect-generic.c (expand_vector_operations_1):  Handle
3649         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
3650         VEC_PACK_FLOAT_EXPR.
3651         * tree-vect-stmts.c (supportable_widening_operation): Handle
3652         FIX_TRUNC_EXPR.
3653         (supportable_narrowing_operation): Handle FLOAT_EXPR.
3654         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
3655         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
3656         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
3657         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
3658         mode attributes.
3659         (vec_pack<floatprefix>_float_<mode>): New expander.
3660         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
3661         attributes.
3662         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
3663         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
3664         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
3665         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
3666         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
3667         Document.
3668         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
3669         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
3670         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
3671         VEC_PACK_FLOAT_EXPR): Document.
3673 2018-05-29  Richard Biener  <rguenther@suse.de>
3675         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
3676         member.
3677         (stmt_vec_info_vec): Make pointer.
3678         (init_stmt_vec_info_vec): Remove.
3679         (free_stmt_vec_info_vec): Likewise.
3680         (set_stmt_vec_info_vec): New function.
3681         (free_stmt_vec_infos): Likewise.
3682         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
3683         (set_vinfo_for_stmt): Likewise.
3684         (get_earlier_stmt): Likewise.
3685         (get_later_stmt): Likewise.
3686         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
3687         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
3688         (vec_info::~vec_info): Free stmt_vec_infos.
3689         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
3690         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
3691         (pass_slp_vectorize::execute): Likewise.
3692         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
3693         (free_stmt_vec_info_vec): Likewise.
3694         (set_stmt_vec_info_vec): New function.
3695         (free_stmt_vec_infos): Likewise.
3696         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
3697         the global stmt_vec_info_vec.
3698         * tree-parloops.c (gather_scalar_reductions): Use
3699         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
3700         vector.
3702 2018-05-29  Richard Biener  <rguenther@suse.de>
3704         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
3706 2018-05-29  Martin Liska  <mliska@suse.cz>
3707             David Malcolm  <dmalcolm@redhat.com>
3709         * vec.c (test_reverse): New.
3710         (vec_c_tests): Add new test.
3711         * vec.h (vl_ptr>::reverse): New function.
3713 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
3715         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
3717         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
3718         and later.
3720 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3722         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
3724 2018-05-28  Richard Biener  <rguenther@suse.de>
3726         PR tree-optimization/85933
3727         * tree-vect-data-refs.c (vect_record_base_alignments): Only
3728         look at stmts marked as vectorizable.
3730 2018-05-28  Richard Biener  <rguenther@suse.de>
3732         PR tree-optimization/85934
3733         * tree-vect-generic.c (expand_vector_operations_1): Hoist
3734         vector boolean check before scalar optimization.
3736 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
3738         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
3739         for armv5te.
3741 2018-05-28  Mark Wielaard  <mark@klomp.org>
3743         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
3744         if it is an expression containing a minus sign.
3746 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
3748         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
3750 2018-05-27  Paul Koning  <ni1d@arrl.net>
3752         * config/pdp11/pdp11.md (truncsihi2): Remove.
3754 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
3755             Chung-Ju Wu  <jasonwucj@gmail.com>
3757         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
3758         implementation.
3759         (unaligned_store_dw): Ditto.
3760         * config/nds32/nds32-memory-manipulation.c
3761         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
3762         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
3763         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
3764         (emit_setmem_word_loop): Rename to ...
3765         (emit_setmem_doubleword_loop): ... this.
3766         (nds32_gen_dup_4_byte_to_word_value): New function.
3767         (nds32_gen_dup_8_byte_to_double_word_value): New function.
3768         (nds32_expand_setmem_loop): Refine implementation.
3769         (nds32_expand_setmem_loop_v3m): Ditto.
3770         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
3771         pattern.
3773 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
3775         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
3777 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
3779         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
3780         (nds32_init_machine_status): Initialize machine->attr_naked_p and
3781         machine->attr_no_prologue_p.
3782         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
3783         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
3784         (nds32_expand_epilogue): Consider attr_naked_p.
3785         (nds32_expand_epilogue_v3pop): Likewise.
3786         (nds32_can_use_return_insn): Likewise.
3787         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
3788         attr_no_prologue_p fields.
3789         * config/nds32/nds32.opt (mret-in-naked-func): New option.
3791 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
3793         PR target/85918
3794         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
3795         attributes.
3796         * config/i386/sse.md
3797         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
3798         Rename to ...
3799         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
3800         ... this.
3801         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
3802         Rename to ...
3803         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
3804         ... this.
3805         (*<floatsuffix>floatv2div2sf2): Rename to ...
3806         (*float<floatunssuffix>v2div2sf2): ... this.
3807         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
3808         (float<floatunssuffix>v2div2sf2_mask): ... this.
3809         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
3810         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
3811         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
3812         to ...
3813         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
3814         ... this.
3815         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
3816         Rename to ...
3817         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
3818         ... this.
3819         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
3820         Rename to ...
3821         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
3822         ... this.
3823         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
3824         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
3825         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
3826         gen_ufix_truncv8dfv8si2.
3827         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
3828         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
3829         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
3830         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
3831         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
3832         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
3833         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
3834         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
3836 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
3838         PR target/85900
3839         PR target/85345
3840         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
3842 2018-05-25  Jim Wilson  <jimw@sifive.com>
3844         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
3845         * config/riscv/riscv.c (struct machine_function): Add
3846         interrupt_handler_p and attribute_checked_p fields.
3847         (riscv_attribute_table): Add interrupt.
3848         (riscv_interrupt_type_p): New.
3849         (riscv_save_reg_p): Save extra regs for interrupt handler.
3850         (riscv_use_save_libcall): Return false  for interrupt handler.
3851         (riscv_first_stack_step): Add forward declaration.
3852         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
3853         for interrupt handler with large frame.  Use it for saved reg list.
3854         (riscv_expand_prologue): Move flag_stack_usage_info support to
3855         eliminate duplication.
3856         (riscv_expand_epilogue): Generate mret for interrupt handler.
3857         (riscv_epilogue_uses): New.
3858         (riscv_can_use_return_insn): Return false for interrupt handler.
3859         (riscv_function_ok_for_sibcall): Likewise.
3860         (riscv_set_current_function): Add interrupt handler support.
3861         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
3862         * config/riscv/riscv.md (UNSPECV_MRET): New.
3863         (GP_REGNUM): New.
3864         (riscv_frflags, riscv_fsflags): Use tab after opcode.
3865         (riscv_mret): New.
3866         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
3868 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
3870         PR tree-optimization/85712
3871         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
3872         this candidate has already been replaced in-situ by a copy.
3874 2018-05-25  Jason Merrill  <jason@redhat.com>
3876         PR c++/80485 - inline function non-zero address.
3877         * symtab.c (nonzero_address): Check DECL_COMDAT.
3879 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
3881         PR target/83628
3882         * config/alpha/alpha.md (ashlsi3): New insn pattern.
3883         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
3884         extension of SImode operation.  Use const123_operand predicate.
3885         (*saddsi_1): Remove.
3886         (*saddl_se_1): Ditto.
3887         (*ssubsi_1): Ditto.
3888         (*ssubl_se_1): Ditto.
3889         * config/alpha/predicates.md (const123_operand): New predicate.
3890         * config/alpha/constraints.md (P): Use IN_RANGE.
3892 2018-05-25  Richard Biener  <rguenther@suse.de>
3894         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
3895         defaulted to true.
3896         (ref_maybe_used_by_stmt_p): Likewise.
3897         (stmt_may_clobber_ref_p): Likewise.
3898         (stmt_may_clobber_ref_p_1): Likewise.
3899         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
3900         and pass it along.
3901         (ref_maybe_used_by_stmt_p): Likewise.
3902         (stmt_may_clobber_ref_p): Likewise.
3903         (stmt_may_clobber_ref_p_1): Likewise.
3904         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
3905         the alias oracle to disambiguate DRs with stmts DR analysis
3906         couldn't handle.
3907         (vect_analyze_data_refs): Do not give up on not analyzable
3908         DRs for BB vectorization.  Remove code truncating the dataref
3909         vector.
3911 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
3913         PR target/85832
3914         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
3915         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
3916         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
3918 2018-05-25  Richard Biener  <rguenther@suse.de>
3920         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
3921         function, combining stmt data ref gathering and fatal analysis
3922         parts.
3923         (vect_analyze_data_refs): Remove now redudnant code and simplify.
3924         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
3925         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
3926         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
3927         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
3929 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
3931         PR tree-optimization/85720
3932         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
3933         SCC if all partitions are builtins.
3934         (version_loop_by_alias_check): New parameter.  Generate cancelable
3935         runtime alias check if all partitions are builtins.
3936         (distribute_loop): Update call to above function.
3938 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
3940         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
3941         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
3942         (parm_default_def_partition_arg): Ditto.
3943         (set_parm_default_def_partition): Ditto.
3944         (get_parm_default_def_partitions): Ditto and make it static.
3945         (get_undefined_value_partitions): Ditto and make it static.
3946         (remove_ssa_form): Refactor call to init_var_map here.
3947         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
3948         computation for loop region.
3949         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
3950         (register_default_def): Delete.
3951         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
3952         (parm_default_def_partition_arg): Ditto.
3953         (set_parm_default_def_partition): Ditto.
3954         (get_parm_default_def_partitions): Ditto and make it static.
3955         (get_undefined_value_partitions): Ditto and make it static.
3956         (coalesce_with_default, coalesce_with_default): Update comment.
3957         (create_coalesce_list_for_region): New func factored out from
3958         create_outofssa_var_map.
3959         (populate_coalesce_list_for_outofssa): New func factored out from
3960         create_outofssa_var_map and coalesce_ssa_name.
3961         (create_outofssa_var_map): Delete.
3962         (coalesce_ssa_name): Refactor to support live range computation.
3963         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
3964         (get_parm_default_def_partitions): Delete.
3965         (get_undefined_value_partitions): Ditto.
3966         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
3967         computation for loop region.
3968         (new_tree_live_info, loe_visit_block): Ditto.
3969         (live_worklist, set_var_live_on_entry): Ditto.
3970         (calculate_live_on_exit, verify_live_on_entry): Ditto.
3971         * tree-ssa-live.h (struct _var_map): New fields.
3972         (init_var_map): Change decl.
3973         (region_contains_p): New.
3975 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
3977         * tree-ssa-live.h (live_merge_and_clear): Delete.
3979 2018-05-25  Richard Biener  <rguenther@suse.de>
3981         PR c++/85912
3982         * tree-dump.c (dequeue_and_dump): Remove access to removed
3983         operand 2 of a SWITCH_EXPR.
3985 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
3987         * doc/sourcebuild.texi (vect_double_cond_arith): Include
3988         multiplication and division.
3989         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
3990         (cond_udiv@var{m}, cond_umod@var{m}): Document.
3991         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
3992         (cond_udiv_optab, cond_umod_optab): New optabs.
3993         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
3994         (IFN_COND_RDIV): New internal functions.
3995         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
3996         TRUNC_MOD_EXPR and RDIV_EXPR.
3997         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
3998         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
3999         New unspecs.
4000         (SVE_INT_BINARY): Include mult.
4001         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
4002         (optab, sve_int_op): Handle mult.
4003         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
4004         UNSPEC_COND_DIV.
4005         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
4006         for SVE_INT_BINARY_SD.
4008 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4010         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
4011         (optab, sve_int_op): Handle div and udiv.
4012         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
4013         for SVE_INT_BINARY_SD.
4014         (*<optab><mode>3): New insn for the same.
4016 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4018         * tree-vect-patterns.c: Include predict.h.
4019         (vect_recog_divmod_pattern): Restrict check for division support
4020         to when optimizing for size.
4022 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4024         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
4025         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
4026         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
4027         (gimple_match_op::set_op): Likewise.
4028         (gimple_resimplify4): Declare.
4029         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
4030         (expr::gen_transform): Likewise.
4031         (decision_tree::gen): Generate a simplification routine for 4 operands.
4032         * gimple-match-head.c (gimple_simplify): Add an overload for
4033         4 operands.  In the top-level function, handle up to 4 call
4034         arguments and call gimple_resimplify4.
4035         (gimple_resimplify4): New function.
4036         (build_call_internal): Pass a fourth operand.
4037         (maybe_push_to_seq): Likewise.
4038         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
4039         Fold VEC_COND_EXPRs of an operation and a default value into
4040         an IFN_COND_* function if possible.
4041         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
4042         New unspecs.
4043         (SVE_COND_FP_BINARY): Include them.
4044         (optab, sve_fp_op): Handle them.
4045         (SVE_INT_BINARY_REV): New code iterator.
4046         (SVE_COND_FP_BINARY_REV): New int iterator.
4047         (commutative): New int attribute.
4048         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
4049         Declare.
4050         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
4051         function.
4052         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
4053         (*cond_<optab><mode>): New patterns for reversed operands.
4055 2018-05-25  Richard Biener  <rguenther@suse.de>
4057         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
4058         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
4059         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
4060         (STMT_VINFO_GROUPED_ACCESS): Adjust.
4061         * tree-vect-data-refs.c (everywhere): Adjust users.
4062         * tree-vect-loop.c (everywhere): Likewise.
4063         * tree-vect-slp.c (everywhere): Likewise.
4064         * tree-vect-stmts.c (everywhere): Likewise.
4065         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
4067 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4069         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
4070         Rename to...
4071         (gcc_cv_as_section_exclude): ... this.
4072         Try Solaris as #exclude syntax.
4073         * configure: Regenerate.
4074         * config.in: Regenerate.
4075         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
4076         SECTION_EXCLUDE.
4077         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
4078         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
4080         * varasm.c (default_elf_asm_named_section): Don't check if
4081         HAVE_GAS_SECTION_EXCLUDE is defined.
4083 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4085         * doc/md.texi: Update the documentation of the cond_* optabs
4086         to mention the new final operand.  Fix GET_MODE_NUNITS call.
4087         Describe the scalar case too.
4088         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
4089         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
4090         instead of 2.
4091         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
4092         (get_conditional_internal_fn): Update comment.
4093         * tree-vect-loop.c (vectorizable_reduction): Pass the original
4094         accumulator value as a final argument to conditional functions.
4095         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
4096         a define_expand and add an "else" operand.  Assert for now that
4097         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
4098         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
4099         (*cond_<optab><mode>): New patterns.
4100         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
4101         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
4102         (UNSPEC_COND_EOR): Delete.
4103         (optab): Remove associated mappings.
4104         (SVE_INT_BINARY): New code iterator.
4105         (sve_int_op): Remove int attribute and add "minus" to the code
4106         attribute.
4107         (SVE_COND_INT_OP): Delete.
4108         (SVE_COND_FP_OP): Rename to...
4109         (SVE_COND_FP_BINARY): ...this.
4111 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
4113         * optabs.c (can_reuse_operands_p): New function.
4114         (maybe_legitimize_operands): Try to reuse the results for
4115         earlier operands.
4117 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
4119         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
4120         Add {q} suffix to insn mnemonic.
4122 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
4124         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
4125         (msp430_warn_func_return): New.
4127 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
4129         * fold-const.c (tree_nonzero_bits): New function.
4130         * fold-const.h (tree_nonzero_bits): Likewise.
4131         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
4132         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
4134 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
4136         PR target/85900
4137         PR target/85345
4138         * varasm.c (assemble_alias): Check ifunc_resolver only on
4139         FUNCTION_DECL.
4141 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
4143         PR target/85903
4144         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
4145         when memory input operand is handled.
4147 2018-05-24  Luis Machado  <luis.machado@linaro.org>
4149         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
4150         global.
4151         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
4153 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
4155         * match.pd: Delay FMA folds until after vectorization.
4157 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
4159         PR target/83009
4160         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4161         address check not strict.
4163 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
4165         * gimple-match.h (gimple_match_op): New class.
4166         (mprts_hook): Replace parameters with a gimple_match_op *.
4167         (maybe_build_generic_op): Likewise.
4168         (gimple_simplified_result_is_gimple_val): Replace parameters with
4169         a const gimple_match_op *.
4170         (gimple_simplify): Replace code_helper * and tree * parameters with
4171         a gimple_match_op * parameter.
4172         (gimple_resimplify1): Replace code_helper *, tree and tree *
4173         parameters with a gimple_match_op * parameter.
4174         (gimple_resimplify2): Likewise.
4175         (gimple_resimplify3): Likewise.
4176         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
4177         parameters with a gimple_match_op * parameter.
4178         * gimple-match-head.c (gimple_simplify): Change prototypes of
4179         auto-generated functions to take a gimple_match_op * instead of
4180         separate code_helper * and tree * parameters.  Make the same
4181         change in the top-level overload and update calls to the
4182         gimple_resimplify routines.  Update calls to the auto-generated
4183         functions and to maybe_push_res_to_seq in the publicly-facing
4184         operation-specific gimple_simplify overloads.
4185         (gimple_match_op::MAX_NUM_OPS): Define.
4186         (gimple_resimplify1): Replace rcode and ops with a single res_op
4187         parameter.  Update call to gimple_simplify.
4188         (gimple_resimplify2): Likewise.
4189         (gimple_resimplify3): Likewise.
4190         (mprts_hook): Replace parameters with a gimple_match_op *.
4191         (maybe_build_generic_op): Likewise.
4192         (build_call_internal): Replace type, nargs and ops with
4193         a gimple_match_op *.
4194         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
4195         with a single gimple_match_op *.  Update calls to mprts_hook,
4196         build_call_internal and gimple_simplified_result_is_gimple_val.
4197         Factor out code that is common to the tree_code and combined_fn cases.
4198         * genmatch.c (expr::gen_transform): Replace tem_code and
4199         tem_ops with a gimple_match_op called tem_op.  Update calls
4200         to the gimple_resimplify functions and maybe_push_res_to_seq.
4201         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
4202         res_ops.  Update call to the gimple_resimplify functions.
4203         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
4204         (decision_tree::gen): Make the functions take a gimple_match_op *
4205         called res_op instead of separate res_code and res_ops parameters.
4206         Update call accordingly.
4207         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
4208         and ops with a single res_op parameter.  Update calls to
4209         maybe_build_generic_op and maybe_push_res_to_seq.
4210         (fold_stmt_1): Update calls to gimple_simplify and
4211         replace_stmt_with_simplification.
4212         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
4213         and gimple_simplified_result_is_gimple_val.
4214         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
4215         gimple_simplify.
4216         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
4217         with a gimple_match_op *.
4218         (vn_nary_build_or_lookup): Likewise.  Update call to
4219         vn_nary_build_or_lookup_1.
4220         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
4221         gimple_match_op *.  Update calls to the gimple_resimplify routines
4222         and to gimple_simplified_result_is_gimple_val.
4223         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
4224         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
4225         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
4226         (visit_nary_op): Likewise.
4227         (visit_reference_op_load): Likewise.
4229 2018-05-23  Luis Machado  <luis.machado@linaro.org>
4231         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
4232         modifier for printing the step amount.
4234 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
4236         PR target/78849
4237         * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
4238         types.
4240 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
4242         * doc/sourcebuild.texi (Endianness): New subsubsection.
4244 2018-05-23  Luis Machado  <luis.machado@linaro.org>
4246         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
4247         <prefetch_dynamic_strides>: New const bool field.
4248         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
4249         prefetch_dynamic_strides.
4250         (exynosm1_prefetch_tune): Likewise.
4251         (thunderxt88_prefetch_tune): Likewise.
4252         (thunderx_prefetch_tune): Likewise.
4253         (thunderx2t99_prefetch_tune): Likewise.
4254         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
4255         false.
4256         (aarch64_override_options_internal): Update to set
4257         PARAM_PREFETCH_DYNAMIC_STRIDES.
4258         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
4259         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
4260         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
4261         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
4262         prefetch-dynamic-strides setting.
4264 2018-05-23  Luis Machado  <luis.machado@linaro.org>
4266         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
4267         <minimum_stride>: New const int field.
4268         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
4269         minimum_stride field defaulting to -1.
4270         (exynosm1_prefetch_tune): Likewise.
4271         (thunderxt88_prefetch_tune): Likewise.
4272         (thunderx_prefetch_tune): Likewise.
4273         (thunderx2t99_prefetch_tune): Likewise.
4274         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
4275         <default_opt_level>: Set to 3.
4276         (aarch64_override_options_internal): Update to set
4277         PARAM_PREFETCH_MINIMUM_STRIDE.
4278         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
4279         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
4280         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
4281         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
4282         stride is constant and is below the minimum stride threshold.
4284 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4286         * config/arm/arm-cpus.in (mode26): Delete.
4287         (armv4): Delete mode26 reference.
4288         * config/arm/arm.c (arm_configure_build_target): Delete use of
4289         isa_bit_mode26.
4291 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
4293         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
4294         New insn pattern.
4295         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
4296         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
4297         for non-SSE modes.
4298         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
4299         (floatunsdidf2): Ditto.
4301 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
4303         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
4304         (fixuns_trunc<mode>si2_avx512f): Ditto.
4305         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
4306         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
4307         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
4309 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
4311         PR rtl-optimization/79985
4312         * df-scan.c (df_insn_refs_collect): Remove special case for
4313         global registers and asm statements.
4315 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
4317         * extend.texi (Global Register Variables): Rewrite the bullet list.
4318         Note that the register is available for allocation. Note that access
4319         via inline asm must use constraints. Add note about async-signal
4320         handlers. Remove paragraph about automagic register selection.
4322 2018-05-23  Richard Biener  <rguenther@suse.de>
4324         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
4325         of fixed offset from memset VN.
4327 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
4329         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
4330         first_interp field.
4331         (alloc_cand_and_find_basis): Initialize first_interp field.
4332         (slsr_process_mul): Modify first_interp field.
4333         (slsr_process_add): Likewise.
4334         (slsr_process_cast): Modify first_interp field for each new
4335         interpretation.
4336         (slsr_process_copy): Likewise.
4337         (dump_candidate): Dump first_interp field.
4338         (replace_mult_candidate): Process all interpretations, not just
4339         subsequent ones.
4340         (replace_rhs_if_not_dup): Likewise.
4341         (replace_one_candidate): Likewise.
4343 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
4345         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
4346         Add new boolean.
4347         (aarch64_needs_frame_chain): New function.
4348         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
4350 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
4352         PR target/84882
4353         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
4354         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
4355         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
4356         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
4357         as true for strict-align.
4358         (aarch64_can_inline_p): Perform checks even when callee has no
4359         attributes to check for strict alignment.
4360         * doc/extend.texi (AArch64 Function Attributes): Document
4361         no-strict-align.
4362         * doc/invoke.texi: (AArch64 Options): Likewise.
4364 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
4366         PR tree-optimization/85853
4367         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
4368         the handling of the root of the node to...
4369         (vect_slp_analyze_node_operations_1): ...this new function,
4370         and run the whole thing with the child nodes' def types
4371         set according to their SLP node's def type.
4373 2018-05-23  Richard Biener  <rguenther@suse.de>
4375         PR middle-end/85874
4376         * tree-data-ref.c (create_runtime_alias_checks): Defer
4377         and ignore overflow warnings.
4379 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
4381         PR tree-optimization/85822
4382         * tree-vrp.c (is_masked_range_test): Fix handling of negative
4383         constants.
4385 2018-05-23  Richard Biener  <rguenther@suse.de>
4387         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
4388         memset constants via native_interpret_expr.
4390 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
4392         PR target/85345
4393         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
4394         attribute.
4395         (cgraph_node::create_alias): Likewise.
4396         (cgraph_node::get_availability): Check ifunc_resolver instead
4397         of looking up ifunc attribute.
4398         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
4399         * varasm.c (do_assemble_alias): Likewise.
4400         (assemble_alias): Likewise.
4401         (default_binds_local_p_3): Likewise.
4402         * cgraph.h (cgraph_node): Add ifunc_resolver.
4403         (cgraph_node::only_called_directly_or_aliased_p): Return false
4404         for IFUNC resolver.
4405         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
4406         attribute.
4407         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
4408         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
4409         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
4410         instead of looking up ifunc attribute.
4412 2018-05-22  Luis Machado  <luis.machado@linaro.org>
4414         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
4416 2018-05-22  Martin Sebor  <msebor@redhat.com>
4418         PR middle-end/85359
4419         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
4420         only when expasion succeeds.
4421         (expand_builtin_strcmp): Same.
4422         (expand_builtin_strncmp): Same.
4424 2018-05-22  Martin Sebor  <msebor@redhat.com>
4426         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
4428 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
4429             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4431         * config/aarch64/aarch64-ldpstp.md: Replace uses of
4432         aarch64_mem_pair_operand with memory_operand and delete operand swapping
4433         code.
4434         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
4435         Add check for legitimate_address.
4436         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
4437         (aarch64_swap_ldrstr_operands): New.
4438         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
4439         Define prototype.
4441 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
4442             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4444         * config/aarch64/aarch64.md: New patterns to generate stp
4445         and ldp.
4446         (store_pair_sw, store_pair_dw): New patterns to generate stp for
4447         single words and double words.
4448         (load_pair_sw, load_pair_dw): Likewise.
4449         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
4450         Delete.
4451         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
4452         Delete.
4453         * config/aarch64/aarch64-ldpstp.md: Modify peephole
4454         for different mode ldpstp and add peephole for merged zero stores.
4455         Likewise for loads.
4456         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
4457         Add size check.
4458         (aarch64_gen_store_pair): Rename calls to match new patterns.
4459         (aarch64_gen_load_pair): Rename calls to match new patterns.
4460         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
4461         (load_pair<DREG:mode><DREG2:mode>): ... This.
4462         (store_pair<mode>): Rename to...
4463         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
4464         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
4465         New mode iterators.
4466         (V_INT_EQUIV): Handle SImode.
4467         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
4468         New predicate.
4470 2018-05-22  Martin Sebor  <msebor@redhat.com>
4472         PR c/85623
4473         * calls.c (maybe_warn_nonstring_arg): Use string length to set
4474         or ajust the presumed bound on an operation to avoid unnecessary
4475         warnings.
4477 2018-05-22  Martin Sebor  <msebor@redhat.com>
4479         PR tree-optimization/85826
4480         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
4481         assuming that a DECL necesarily has a constant size.
4483 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
4485         PR middle-end/85862
4486         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
4488 2018-05-22  Richard Biener  <rguenther@suse.de>
4490         PR tree-optimization/85834
4491         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
4492         non-constant and non-zero memset arguments.
4494 2018-05-22  Martin Liska  <mliska@suse.cz>
4496         PR ipa/85607
4497         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
4499 2018-05-22  Richard Biener  <rguenther@suse.de>
4501         PR tree-optimization/85863
4502         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
4503         comparisons when vectype is specified.
4504         (vectorizable_condition): Do not specify vectype for
4505         vect_is_simple_cond when SLP vectorizing.
4507 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
4509         PR target/85657
4510         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
4511         define __ibm128 as long double.
4512         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
4513         as a distinct type when IEEE 128-bit support is enabled.
4514         (init_float128_ieee): Fix up conversions between IFmode and IEEE
4515         128-bit types to use the correct functions.
4516         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
4517         convert between 128-bit floating point types that have different
4518         modes but the same representation, instead of using gen_lowpart to
4519         makean alias.
4520         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
4521         KFmode.
4522         (IFKF_reg): New attributes to give the register constraints for
4523         IFmode and KFmode.
4524         (extend<mode>tf2_internal): New insns to mark an explicit
4525         conversion between 128-bit floating point types that have a
4526         different mode but share the same representation.
4528 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
4530         PR tree-optimization/85814
4531         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
4532         a null return from get_strinfo when unsharing the next
4533         strinfo in the chain.
4535 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
4537         PR gcc/84923
4538         * varasm.c (weak_finish): Clean up weak_decls.
4540 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4542         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
4543         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
4544         UNSPEC_UADALP values.
4545         * config/aarch64/iterators.md (ABAL): New int iterator.
4546         (ABDL2): Likewise.
4547         (ADALP): Likewise.
4548         (sur): Add mappings for the above.
4549         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
4550         New define_insn.
4551         (aarch64_<sur>abal<mode>_4): Likewise.
4552         (aarch64_<sur>adalp<mode>_3): Likewise.
4553         (<sur>sadv16qi): New define_expand.
4555 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
4557         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
4558         (*movdf_internal): Ditto.
4559         (*rcpsf2_sse): Ditto.
4560         (*rsqrtsf2_sse): Ditto.
4561         (*sqrt<mode>2_sse): Ditto.
4563 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
4565         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
4566         eor3q<mode>4.
4567         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
4568         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
4569         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
4570         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
4571         vbcaxq_s64): New.
4572         * config/aarch64/arm_neon.h: Likewise.
4573         * config/aarch64/iterators.md (VQ_I): New.
4575 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
4577         * config.gcc: Add arc/t-multilib-linux to tmake_file for
4578         arc*-*-linux*.
4579         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
4580         MULTILIB_DIRNAMES
4582 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
4584         * config/nds32/constraints.md (S): New constraint.
4585         * config/nds32/nds32.md (call_internal): Use constraint S.
4586         (call_value_internal): Likewise.
4587         (sibcall_internal): Likewise.
4588         (sibcall_value_internal): Likewise.
4590 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
4591             Chung-Ju Wu  <jasonwucj@gmail.com>
4593         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
4594         into consideration.
4596 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
4597             Chung-Ju Wu  <jasonwucj@gmail.com>
4599         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
4600         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
4601         (nds32_rtx_costs_impl): Simplify.
4602         (nds32_address_cost_impl): Simplify.
4603         (nds32_init_rtx_costs): New function.
4604         (nds32_rtx_costs_speed_prefer): Likewise.
4605         (nds32_rtx_costs_size_prefer): Likewise.
4606         (nds32_address_cost_speed_prefer): Likewise.
4607         (nds32_address_cost_speed_fwprop): Likewise.
4608         (nds32_address_cost_size_prefer): Likewise.
4609         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
4610         * config/nds32/nds32.c (nds32_option_override): Use
4611         nds32_init_rtx_costs function.
4613 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
4615         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
4616         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
4617         (TARGET_PIPELINE_N8): Likewise.
4618         (TARGET_PIPELINE_N10): Likewise.
4619         (TARGET_PIPELINE_N13): Likewise.
4620         (TARGET_PIPELINE_GRAYWOLF): Likewise.
4622 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
4624         * config/nds32/nds32-fpu.md: Update copyright year.
4626 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4628         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
4630 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4632         * config/nds32/nds32.c
4633         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
4634         * config/nds32/nds32.opt (minline-asm-r15): New option.
4636 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4638         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
4639         MASK_HW_ABS.
4640         * config/nds32/nds32.md (abssi2): New pattern.
4642 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
4644         * config/i386/i386.md (rex64namesuffix): New mode attribute.
4645         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
4646         Merge insn pattern from sse_cvtsi2ss<round_name> and
4647         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
4648         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
4649         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
4650         using SWI48 mode iterator.
4651         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
4652         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
4653         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
4654         pattern from sse_cvttss2si<round_saeonly_name>
4655         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
4656         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
4657         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
4658         using SWI48 mode iterator.
4659         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
4660         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
4661         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
4662         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
4663         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
4664         using SWI48 mode iterator.
4665         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
4666         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
4667         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
4668         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
4669         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
4670         SWI48 mode iterator.
4671         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
4672         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
4673         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
4674         pattern from sse_cvttsd2si<round_saeonly_name>
4675         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
4677 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4679         * config/nds32/nds32-md-auxiliary.c
4680         (nds32_valid_smw_lwm_base_p): Refine.
4681         (nds32_output_smw_single_word): Refine.
4682         (nds32_output_smw_double_word): New.
4683         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
4685 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4687         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
4688         (nds32_output_stack_pop): Refine.
4689         (nds32_expand_unaligned_load): Refine.
4690         (nds32_expand_unaligned_store): Refine.
4692 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
4693             Chung-Ju Wu  <jasonwucj@gmail.com>
4695         * config/nds32/constants.md: Add TP_REGNUM constant.
4696         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
4697         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
4698         UNSPEC_ADD32.
4699         * config/nds32/nds32-doubleword.md: Consider flag_pic.
4700         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
4701         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
4702         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
4703         and PIC code generation.
4704         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
4705         code generation.
4706         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
4707         optimization.
4708         * config/nds32/nds32.md: Support TLS and PIC.
4709         * config/nds32/nds32.c: Support TLS and PIC.
4710         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
4711         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
4712         predicate.
4714 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
4716         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
4717         mode with E_ prefix.
4719 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
4720             Chung-Ju Wu  <jasonwucj@gmail.com>
4722         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
4723         * config/nds32/nds32-md-auxiliary.c
4724         (symbolic_reference_mentioned_p): New.
4725         (nds32_legitimize_ict_address): New.
4726         (nds32_expand_ict_move): New.
4727         (nds32_indirect_call_referenced_p): New.
4728         (nds32_symbol_binds_local_p): Delete.
4729         (nds32_long_call_p): Modify.
4730         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
4731         * config/nds32/nds32-protos.h
4732         (symbolic_reference_mentioned_p): Declare.
4733         (nds32_legitimize_ict_address): Declare.
4734         (nds32_expand_ict_move): Declare.
4735         (nds32_indirect_call_referenced_p): Declare.
4736         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
4737         (nds32_relax_group): Use nds32_ict_const_p as condition.
4738         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
4739         (nds32_asm_file_start): Output ict_model directive in asm code.
4740         (nds32_legitimate_address_p): Consider indirect call.
4741         (nds32_print_operand): Consider indirect call.
4742         (nds32_print_operand_address): Consider indirect call.
4743         (nds32_insert_attributes): Handle "indirect_call" attribute.
4744         (TARGET_LEGITIMATE_ADDRESS_P): Define.
4745         (TARGET_LEGITIMATE_CONSTANT_P): Define.
4746         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
4747         (TARGET_DELEGITIMIZE_ADDRESS): Define.
4748         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
4749         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
4750         (TARGET_ICT_MODEL_SMALL): Define.
4751         (TARGET_ICT_MODEL_LARGE): Define.
4752         * config/nds32/nds32.md (movsi): Consider ict model.
4753         (call, call_value): Consider ict model.
4754         (sibcall, sibcall_value): Consider ict model.
4755         * config/nds32/nds32.opt (mict-model): New option.
4756         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
4757         model.
4759 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
4760             Monk Chiang  <sh.chiang04@gmail.com>
4761             Jim Wilson <jimw@sifive.com>
4763         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
4764         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
4765         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
4766         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
4767         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
4768         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
4769         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
4770         compute save_libcall_adjustment properly.
4771         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
4772         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
4773         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
4774         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
4775         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
4776         (ABI_SPEC): Handle mabi=ilp32e.
4777         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
4778         (RVE): Add RVE mask.
4779         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
4780         <-march>: Add rv32e as an example.
4782 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
4784         PR c++/82899
4785         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
4786         (intra_create_variable_infos): Handle C++ constructors.
4788 2018-05-18  Martin Liska  <mliska@suse.cz>
4790         * passes.def: Remove a redundant pass.
4792 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
4794         PR bootstrap/85838
4795         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
4797 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4799         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
4800         (ARMv4): Update.
4801         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
4802         (ARMv6m): Update.
4803         (armv2, armv2a, armv3, armv3m): Delete architectures.
4804         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
4805         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
4806         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
4807         Delete cpus.
4808         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
4809         (*mulsidi3adddi): Likewise.
4810         (mulsidi3): Likewise.
4811         (*mulsidi3_nov6): Likewise.
4812         (umulsidi3): Likewise.
4813         (umulsidi3_nov6): Likewise.
4814         (umaddsidi4): Likewise.
4815         (*umulsidi3adddi): Likewise.
4816         (smulsi3_highpart): Likewise.
4817         (*smulsi3_highpart_nov6): Likewise.
4818         (umulsi3_highpart): Likewise.
4819         (*umulsi3_highpart_nov6): Likewise.
4820         * config/arm/arm.h (arm_arch3m): Delete.
4821         * config/arm/arm.c (arm_arch3m): Delete.
4822         (arm_option_override_internal): Update armv3-related comment.
4823         (arm_configure_build_target): Delete use of isa_bit_mode32.
4824         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
4825         (arm_rtx_costs_internal): Delete check of arm_arch3m.
4826         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
4827         (mulsa3): Likewise.
4828         (mulusa3): Likewise.
4829         * config/arm/arm-protos.h (arm_arch3m): Delete.
4830         * config/arm/arm-tables.opt: Regenerate.
4831         * config/arm/arm-tune.md: Likewise.
4832         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
4833         deleted architectures.
4835 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4837         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
4838         (armv5t, armv5te): New features.
4839         (ARMv5, ARMv5e): Delete fgroups.
4840         (ARMv5t, ARMv5te): Adjust for above changes.
4841         (ARMv6m): Likewise.
4842         (armv5, armv5e): Delete arches.
4843         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
4844         arm_arch5.
4845         (*call_reg_arm): Likewise.
4846         (*call_value_reg_armv5): Likewise.
4847         (*call_value_reg_arm): Likewise.
4848         (*call_symbol): Likewise.
4849         (*call_value_symbol): Likewise.
4850         (*sibcall_insn): Likewise.
4851         (*sibcall_value_insn): Likewise.
4852         (clzsi2): Likewise.
4853         (prefetch): Likewise.
4854         (define_split and define_peephole2 dependent on arm_arch5):
4855         Likewise.
4856         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
4857         arm_arch5e.
4858         (TARGET_ARM_QBIT): Likewise.
4859         (TARGET_DSP_MULTIPLY): Likewise.
4860         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
4861         (arm_arch5, arm_arch5e): Delete.
4862         (arm_arch5t, arm_arch5te): Declare.
4863         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
4864         (arm_arch5t): Declare.
4865         (arm_option_reconfigure_globals): Update for the above.
4866         (arm_options_perform_arch_sanity_checks): Update comment, replace
4867         use of arm_arch5 with arm_arch5t.
4868         (use_return_insn): Likewise.
4869         (arm_emit_call_insn): Likewise.
4870         (output_return_instruction): Likewise.
4871         (arm_final_prescan_insn): Likewise.
4872         (arm_coproc_builtin_available): Likewise.
4873         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
4874         arm_arch5e with arm_arch5t and arm_arch5te.
4875         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
4876         (arm_arch5t, arm_arch5te): Declare.
4877         * config/arm/arm-tables.opt: Regenerate.
4878         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
4879         * config/arm/t-multilib: Likewise.
4880         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
4881         instead of arm_arch5.
4882         (*call_reg_thumb1): Likewise.
4883         (*call_value_reg_thumb1_v5): Likewise.
4884         (*call_value_reg_thumb1): Likewise.
4885         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
4886         unreachable path.
4887         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
4889 2018-05-18  Martin Liska  <mliska@suse.cz>
4891         PR gcov-profile/84846
4892         * doc/gcov.texi: Document -t option of gcov tool.
4894 2018-05-18  Martin Liska  <mliska@suse.cz>
4896         PR gcov-profile/84846
4897         * gcov.c (print_usage): Add new -t option.
4898         (process_args): Handle the option.
4899         (generate_results): Use stdout as output when requested by
4900         the option.
4902 2018-05-18  Martin Liska  <mliska@suse.cz>
4904         PR gcov-profile/84846
4905         * coverage.c (coverage_init): Write PWD to .gcno file.
4906         * doc/gcov.texi: Document how working directory is printed.
4907         * gcov-dump.c (dump_gcov_file): Print PWD.
4908         * gcov.c (output_intermediate_file): Likewise.
4909         (read_graph_file): Read PWD string.
4910         (output_lines): Print PWD.
4912 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4914         PR middle-end/85817
4915         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
4916         for retval and return false if all args to phi are zero.
4918 2018-05-18  Richard Biener  <rguenther@suse.de>
4920         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
4921         method.
4922         (evrp_dom_walker::before_dom_children): Call it.
4924 2018-05-18  Richard Biener  <rguenther@suse.de>
4926         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
4927         results when processing array refs with variable index.
4929 2018-05-18  Toon Moene  <toon@moene.org>
4931         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
4932         directly after that of -floop-interchange. Indicate that both
4933         options are enabled by default when specifying -O3.
4935 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4937         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
4938         iterator.  Delete separate integer-mode vec_set<mode> expander.
4939         (aarch64_simd_vec_setv2di): Delete.
4940         (vec_setv2di): Delete.
4941         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
4942         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
4943         the "w, r" alternative.
4945 2018-05-18  Martin Liska  <mliska@suse.cz>
4947         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
4948         * tree-pass.h (make_pass_lower_switch_O0): New function.
4949         * tree-switch-conversion.c (node_has_low_bound): Remove.
4950         (node_has_high_bound): Likewise.
4951         (node_is_bounded): Likewise.
4952         (class pass_lower_switch): Make it a template type and create
4953         two instances.
4954         (pass_lower_switch::execute): Add template argument.
4955         (make_pass_lower_switch): New function.
4956         (make_pass_lower_switch_O0): New function.
4957         (do_jump_if_equal): Remove.
4958         (emit_case_nodes): Simplify to just handle all 3 cases and leave
4959         all the hard work to tree optimization passes.
4961 2018-05-18  Martin Liska  <mliska@suse.cz>
4963         * dbgcnt.c (limit_low): Renamed from limit.
4964         (limit_high): New variable.
4965         (dbg_cnt_is_enabled): Check for upper limit.
4966         (dbg_cnt): Adjust dumping.
4967         (dbg_cnt_set_limit_by_index): Add new argument for high
4968         value.
4969         (dbg_cnt_set_limit_by_name): Likewise.
4970         (dbg_cnt_process_single_pair): Parse new format.
4971         (dbg_cnt_process_opt): Use strtok.
4972         (dbg_cnt_list_all_counters): Remove 'value' and add
4973         'limit_high'.
4974         * doc/invoke.texi: Document changes.
4976 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
4978         * doc/sourcebuild.texi (scalar_all_fma): Document.
4979         * tree.def (FMA_EXPR): Delete.
4980         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
4981         * internal-fn.c (ternary_direct): New macro.
4982         (expand_ternary_optab_fn): Likewise.
4983         (direct_ternary_optab_supported_p): Likewise.
4984         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
4985         * builtins.c (fold_builtin_fma): Delete.
4986         (fold_builtin_3): Don't call it.
4987         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
4988         * expr.c (expand_expr_real_2): Likewise.
4989         * fold-const.c (operand_equal_p): Likewise.
4990         (fold_ternary_loc): Likewise.
4991         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
4992         * gimple.c (DEFTREECODE): Likewise.
4993         * gimplify.c (gimplify_expr): Likewise.
4994         * optabs-tree.c (optab_for_tree_code): Likewise.
4995         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
4996         * tree-eh.c (operation_could_trap_p): Likewise.
4997         (stmt_could_throw_1_p): Likewise.
4998         * tree-inline.c (estimate_operator_cost): Likewise.
4999         * tree-pretty-print.c (dump_generic_node): Likewise.
5000         (op_code_prio): Likewise.
5001         * tree-ssa-loop-im.c (stmt_cost): Likewise.
5002         * tree-ssa-operands.c (get_expr_operands): Likewise.
5003         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
5004         * fold-const-call.h (fold_fma): Delete.
5005         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
5006         CFN_FNMA and CFN_FNMS.
5007         (fold_fma): Delete.
5008         * genmatch.c (combined_fn): New enum.
5009         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
5010         (commutative_op): New function.
5011         (commutate): Use it.  Handle more than 2 operands.
5012         (dt_operand::gen_gimple_expr): Use commutative_op.
5013         (parser::parse_expr): Allow :c to be used with non-binary
5014         operators if the commutative operand is known.
5015         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
5016         CFN_FMS, CFN_FNMA and CFN_FNMS.
5017         (backprop::process_assign_use): Remove FMA_EXPR handling.
5018         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
5019         (gen_hsa_fma): New function.
5020         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
5021         IFN_FNMA and IFN_FNMS.
5022         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
5023         * gimple-fold.h (follow_all_ssa_edges): Declare.
5024         * gimple-fold.c (follow_all_ssa_edges): New function.
5025         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
5026         gimple_build interface and use follow_all_ssa_edges to fold the result.
5027         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
5028         instead of checking for optabs directly.
5029         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
5030         rather than FMA_EXPRs.
5031         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
5032         call to IFN_FMA instead of an FMA_EXPR.
5034 2018-05-17  Jim Wilson  <jimw@sifive.com>
5036         * expr.c (do_tablejump): When converting index to Pmode, if we have a
5037         sign extended promoted subreg, and the range does not have the sign bit
5038         set, then do a sign extend.
5040         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
5041         test, check for sign extended subreg and/or constant operands, and
5042         do a sign extend in that case.
5044 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
5046         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
5047         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
5048         Add untyped.
5049         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
5050         Change logics_shift_reg to logics_shift_imm.
5051         (thunderx2t99_fp_loadpair_basic): Delete.
5052         (thunderx2t99_fp_storepair_basic): Delete.
5053         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
5054         (thunderx2t99_asimd_polynomial): Delete.
5055         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
5056         and neon_fp_mul_d_scalar_q.
5057         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
5058         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
5059         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
5060         (thunderx2t99_asimd_lut): Add missing tbl types.
5061         (thunderx2t99_asimd_ext): Delete.
5062         (thunderx2t99_asimd_load1_1_mult): Delete.
5063         (thunderx2t99_asimd_load1_2_mult): Delete.
5064         (thunderx2t99_asimd_load1_ldp): New.
5065         (thunderx2t99_asimd_load1): New.
5066         (thunderx2t99_asimd_load2): Add missing *load2* types.
5067         (thunderx2t99_asimd_load3): New.
5068         (thunderx2t99_asimd_load4): New.
5069         (thunderx2t99_asimd_store1_1_mult): Delete.
5070         (thunderx2t99_asimd_store1_2_mult): Delete.
5071         (thunderx2t99_asimd_store2_mult): Delete.
5072         (thunderx2t99_asimd_store2_onelane): Delete.
5073         (thunderx2t99_asimd_store_stp): New.
5074         (thunderx2t99_asimd_store1): New.
5075         (thunderx2t99_asimd_store2): New.
5076         (thunderx2t99_asimd_store3): New.
5077         (thunderx2t99_asimd_store4): New.
5079 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
5081         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
5082         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
5084 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
5085             Segher Boessenkool  <segher@kernel.crashing.org>
5087         PR target/85698
5088         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
5089         operand.
5091 2018-05-17  Richard Biener  <rguenther@suse.de>
5093         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
5094         for pruning loop and prune defs feeding only already visited PHIs.
5096 2018-05-17  Richard Biener  <rguenther@suse.de>
5098         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
5100 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
5101             Richard Biener  <rguenther@suse.de>
5103         PR tree-optimization/85793
5104         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
5105         for VMAT_ELEMENTWISE.
5107 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
5109         * internal-fn.h (lookup_internal_fn): Declare
5110         * internal-fn.c (lookup_internal_fn): New function.
5111         * gimple.c (gimple_build_call_from_tree): Handle calls to
5112         internal functions.
5113         * gimple-pretty-print.c (dump_gimple_call): Print "." before
5114         internal function names.
5115         * tree-pretty-print.c (dump_generic_node): Likewise.
5116         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
5118 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
5120         * gimple-fold.h (gimple_build): Make the function forms take
5121         combined_fn rather than built_in_function.
5122         (gimple_simplify): Likewise.
5123         * gimple-match-head.c (gimple_simplify): Likewise.
5124         * gimple-fold.c (gimple_build): Likewise.
5125         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
5126         rather than gimple_build_call_internal.
5127         (get_initial_defs_for_reduction): Likewise.
5128         (vect_create_epilog_for_reduction): Likewise.
5129         (vectorizable_live_operation): Likewise.
5131 2018-05-17  Martin Liska  <mliska@suse.cz>
5133         * gimple-ssa-sprintf.c (format_directive): Do not use
5134         space in between 'G_' and '('.
5136 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
5138         PR target/85323
5139         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
5140         even if the mask is not all ones.
5142         PR target/85323
5143         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
5144         vector.
5145         (ix86_gimple_fold_builtin): Likewise.
5147         PR target/85323
5148         * config/i386/i386.c: Include tree-vector-builder.h.
5149         (ix86_vector_shift_count): New function.
5150         (ix86_fold_builtin): Fold shift builtins by scalar count.
5151         (ix86_gimple_fold_builtin): Likewise.
5153         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
5154         _mm512_setzero): New intrinsics.
5156 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
5157             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5159         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
5160         code generation for cases where splatting a value is not useful.
5161         * simplify-rtx.c (simplify_ternary_operation): Simplify
5162         vec_merge across a vec_duplicate and a paradoxical subreg forming
5163         a vector mode to a vec_concat.
5165 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
5167         * config.gcc: Support "goldmont-plus".
5168         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
5169         "goldmont-plus".
5170         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5171         PROCESSOR_GOLDMONT_PLUS.
5172         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
5173         (processor_target_table): Add "goldmont-plus".
5174         (PTA_GOLDMONT_PLUS): Define.
5175         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
5176         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
5177         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
5178         (fold_builtin_cpu): Add "goldmont-plus".
5179         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
5180         (ix86_option_override_internal): Add "goldmont-plus".
5181         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
5182         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
5183         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
5184         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
5186 2018-05-17  Richard Biener  <rguenther@suse.de>
5188         PR tree-optimization/85757
5189         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
5190         remove defs that only feed that PHI from further processing.
5192 2018-05-16  Jim Wilson  <jimw@sifive.com>
5194         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
5195         asterisk to name.
5196         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
5198 2018-05-16  Mark Wielaard  <mark@klomp.org>
5200         * dwarf2out.c (count_index_strings): New function.
5201         (output_indirect_strings): Call count_index_strings and generate
5202         header for dwarf_version >= 5.
5204 2018-05-16  Mark Wielaard  <mark@klomp.org>
5206         * dwarf2out.c (dwarf_FORM): New function.
5207         (set_indirect_string): Use dwarf_FORM.
5208         (reset_indirect_string): Likewise.
5209         (size_of_die): Likewise.
5210         (value_format): Likewise.
5211         (output_die): Likewise.
5212         (add_skeleton_AT_string): Likewise.
5213         (output_macinfo_op): Likewise.
5214         (index_string): Likewise.
5215         (output_index_string_offset): Likewise.
5216         (output_index_string): Likewise.
5217         (count_index_strings): Likewise.
5219 2018-05-16  Carl Love  <cel@us.ibm.com>
5221         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
5222         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
5224 2018-05-16  Martin Jambor  <mjambor@suse.cz>
5226         * ipa-prop.c (ipa_free_all_edge_args): Remove.
5227         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
5229 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
5231         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
5232         (fnma<mode>4): Likewise.
5233         (fms<mode>4): Likewise.
5234         (fnms<mode>4): Likewise.
5235         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
5236         (aarch64_fnma<mode>4): Likewise.
5237         (aarch64_fms<mode>4): Likewise.
5238         (aarch64_fnms<mode>4): Likewise.
5239         (aarch64_fnmadd<mode>4): Likewise.
5241 2018-05-16  Jason Merrill  <jason@redhat.com>
5243         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
5245 2018-05-16  Richard Biener  <rguenther@suse.de>
5247         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
5248         (dump_stmt_cost): Declare.
5249         (add_stmt_cost): Dump cost we add.
5250         (add_stmt_costs): New function.
5251         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
5252         No longer exported.
5253         (vect_analyze_stmt): Adjust prototype.
5254         (vectorizable_condition): Likewise.
5255         (vectorizable_live_operation): Likewise.
5256         (vectorizable_reduction): Likewise.
5257         (vectorizable_induction): Likewise.
5258         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
5259         cost vector to pass to vectorizable_ and record afterwards.
5260         (vect_model_reduction_cost): Take cost vector argument and adjust.
5261         (vect_model_induction_cost): Likewise.
5262         (vectorizable_reduction): Likewise.
5263         (vectorizable_induction): Likewise.
5264         (vectorizable_live_operation): Likewise.
5265         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
5266         SLP_TREE_NUMBER_OF_VEC_STMTS.
5267         (vect_analyze_slp_cost_1): Remove.
5268         (vect_analyze_slp_cost): Likewise.
5269         (vect_slp_analyze_node_operations): Take visited args and
5270         a target cost vector.  Avoid processing already visited stmt sets.
5271         (vect_slp_analyze_operations): Use a local cost vector to gather
5272         costs and register those of non-discarded instances.
5273         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
5274         (vect_schedule_slp_instance): Remove copying of
5275         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
5276         zero.
5277         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
5278         adding cost.  Record cost entry location.
5279         (vect_prologue_cost_for_slp_op): Function to compute cost of
5280         a constant or invariant generated for SLP vect in the prologue,
5281         split out from vect_analyze_slp_cost_1.
5282         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
5283         (vect_model_promotion_demotion_cost): Likewise.
5284         (vect_model_store_cost): Likewise, make static.
5285         (vect_model_load_cost): Likewise.
5286         (vectorizable_bswap): Add cost vector arg and adjust.
5287         (vectorizable_call): Likewise.
5288         (vectorizable_simd_clone_call): Likewise.
5289         (vectorizable_conversion): Likewise.
5290         (vectorizable_assignment): Likewise.
5291         (vectorizable_shift): Likewise.
5292         (vectorizable_operation): Likewise.
5293         (vectorizable_store): Likewise.
5294         (vectorizable_load): Likewise.
5295         (vectorizable_condition): Likewise.
5296         (vectorizable_comparison): Likewise.
5297         (can_vectorize_live_stmts): Likewise.
5298         (vect_analyze_stmt): Likewise.
5299         (vect_transform_stmt): Adjust calls to vectorizable_*.
5300         * tree-vectorizer.c: Include gimple-pretty-print.h.
5301         (dump_stmt_cost): New function.
5303 2018-05-16  Richard Biener  <rguenther@suse.de>
5305         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
5306         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
5307         * tree-ssa-dse.c: Include tree-ssa-loop.h.
5308         (check_name): New callback.
5309         (dse_classify_store): Track cycles via a visited bitmap of PHI
5310         defs and simplify handling of in-loop and across loop dead stores
5311         and properly fail for loop-variant refs.  Handle byte-tracking with
5312         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
5313         limiting the walk.
5315 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
5317         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
5318         (vect_get_mask_type_for_stmt): Likewise.
5319         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
5320         split out from...
5321         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
5322         to determine the statement's vector type and the vector type that
5323         should be used for calculating nunits.  Deal with cases in which
5324         the type has to be deferred.
5325         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
5326         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
5327         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
5328         (vect_determine_vf_for_stmt): New functions, split out from...
5329         (vect_determine_vectorization_factor): ...here.
5330         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
5331         (vect_get_mask_type_for_stmt): New functions, split out from
5332         vect_determine_vectorization_factor.
5334 2018-05-16  Richard Biener  <rguenther@suse.de>
5336         * tree-cfg.c (verify_gimple_assign_ternary): Properly
5337         verify the [VEC_]COND_EXPR embedded comparison.
5339 2018-05-15  Martin Sebor  <msebor@redhat.com>
5341         PR tree-optimization/85753
5342         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
5343         RECORD_TYPE in addition to ARRAY_TYPE.
5345 2018-05-15  Martin Sebor  <msebor@redhat.com>
5347         PR middle-end/85643
5348         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
5350 2018-05-15  Richard Biener  <rguenther@suse.de>
5352         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
5353         add by_clobber_p one.  Change algorithm to collect all defs
5354         representing uses we need to walk and try reducing them to
5355         a single one before failing.
5356         (dse_dom_walker::dse_optimize_stmt): Adjust.
5358 2018-05-13  Mark Wielaard  <mark@klomp.org>
5360         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
5361         (size_of_loc_descr): Likewise.
5362         (output_loc_operands): Likewise.
5363         (output_loc_operands_raw): Likewise.
5364         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
5365         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
5366         (hash_loc_operands): Likewise.
5367         (compare_loc_operands): Likewise.
5369 2018-05-14  Mark Wielaard  <mark@klomp.org>
5371         * dwarf2out.c (count_index_addrs): New function.
5372         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
5374 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5376         PR tree-optimization/83648
5377         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
5378         return value as malloc candidate.
5380 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
5382         PR ipa/85734
5383         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
5384         param as true in call to suggest_attribute.
5386 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
5388         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
5389         -mreadonly-in-sdata.
5391 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5393         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
5394         New pattern.
5395         (aarch64_crypto_aesd_fused): Likewise.
5397 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
5399         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
5400         (movsi_aarch64): Likewise.
5401         (load_pairsi): Likewise.
5402         (load_pairdi): Likewise.
5403         (store_pairsi): Likewise.
5404         (store_pairdi): Likewise.
5405         (load_pairsf): Likewise.
5406         (load_pairdf): Likewise.
5407         (store_pairsf): Likewise.
5408         (store_pairdf): Likewise.
5409         (zero_extend): Likewise.
5410         (trunc): Swap alternatives.
5411         (fcvt_target): Add '?' to prefer w over r.
5413 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
5415         PR target/85756
5416         * config/i386/i386.md: Disallow non-commutative arithmetics in
5417         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
5418         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
5419         in the peephole2 before it.
5421 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
5423         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
5424         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
5425         (ix86_handle_option): Handle -mcldemote.
5426         * config.gcc: New header.
5427         * config/i386/cldemoteintrin.h: New file.
5428         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
5429         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
5430         -mcldemote.
5431         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5432         OPTION_MASK_ISA_CLDEMOTE.
5433         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
5434         (ix86_valid_target_attribute_inner_p): Ditto.
5435         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
5436         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
5437         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
5438         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
5439         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
5440         (cldemote): New.
5441         * config/i386/i386.opt: Add -mcldemote.
5442         * config/i386/x86intrin.h: New header.
5443         * doc/invoke.texi: Add -mcldemote.
5445 2018-05-14  Richard Biener  <rguenther@suse.de>
5447         * doc/match-and-simplify.texi: Adjust :s documentation.
5449 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
5451         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
5452         intended memcpy size.
5453         (REORDER_45): Likewise.
5455 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
5457         * sort.cc: New file.
5458         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
5459         * vec.c (qsort_chk): Use gcc_qsort.
5460         * Makefile.in (OBJS-libcommon): Add sort.o.
5461         (build/sort.o): New target.  Use it...
5462         (BUILD_RTL): ... here, and...
5463         (build/gencfn-macros): ... here, and...
5464         (build/genmatch): ... here.
5466 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
5467             Chung-Ju Wu  <jasonwucj@gmail.com>
5469         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
5470         * config/nds32/nds32-graywolf.md: New file.
5471         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
5472         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
5473         pipeline.
5474         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
5475         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
5476         * config/nds32/nds32.md (pipeline_model): Add graywolf.
5477         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
5478         * config/nds32/pipelines.md: Include n15 settings.
5480 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
5481             Chung-Ju Wu  <jasonwucj@gmail.com>
5483         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
5484         * config/nds32/nds32-n13.md: New file.
5485         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
5486         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
5487         pipeline.
5488         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
5489         * config/nds32/nds32.md (pipeline_model): Add n13.
5490         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
5491         * config/nds32/pipelines.md: Include n13 settings.
5493 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
5494             Chung-Ju Wu  <jasonwucj@gmail.com>
5496         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
5497         * config/nds32/nds32-n10.md: New file.
5498         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
5499         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
5500         pipeline.
5501         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
5502         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
5503         * config/nds32/nds32.md (pipeline_model): Add n10.
5504         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
5505         * config/nds32/pipelines.md: Include n10 settings.
5507 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
5508             Kito Cheng  <kito.cheng@gmail.com>
5509             Chung-Ju Wu  <jasonwucj@gmail.com>
5511         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
5512         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
5513         Add enum values for DSP extension instructions.
5514         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
5515         New constraints.
5516         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
5517         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
5518         New code iterators.
5519         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
5520         * config/nds32/nds32-dspext.md: New file for DSP implementation.
5521         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
5522         * config/nds32/nds32-intrinsic.md: Likewise.
5523         * config/nds32/nds32_intrinsic.h: Likewise.
5524         * config/nds32/nds32-md-auxiliary.c: Likewise.
5525         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
5526         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
5527         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
5528         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
5529         * config/nds32/nds32-protos.h: New declarations for DSP extension.
5530         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
5531         TYPE_DMAC in switch statement.
5532         * config/nds32/nds32.c: New checking and implementation for DSP
5533         extension instructions.
5534         * config/nds32/nds32.h: Likewise.
5535         * config/nds32/nds32.md: Likewise.
5536         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
5537         * config/nds32/predicates.md: Implement new predicates for DSP
5538         extension.
5540 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
5542         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
5543         Reformat alternatives and attributes so it is easier to identify
5544         which constraints/attributes go with which instruction.
5545         (mov<mode>_hardfloat32, FMOVE64): Likewise.
5546         (mov<mode>_softfloat32, FMOVE64): Likewise.
5547         (mov<mode>_hardfloat64, FMOVE64): Likewise.
5548         (mov<mode>_softfloat64, FMOVE64): Likewise.
5550 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5552         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5553         subsection.
5554         (Basic PowerPC Built-in Functions): The new name of the
5555         subsection previously known as "PowerPC Built-in Functions".
5556         (Basic PowerPC Built-in Functions Available on all Configurations):
5557         New subsubsection.
5558         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
5559         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
5560         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
5561         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
5563 2018-05-11  Martin Jambor  <mjambor@suse.cz>
5565         PR ipa/85655
5566         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
5567         single const.
5569 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
5571         PR target/85733
5572         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
5574 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
5576         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
5577         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
5578         (ix86_handle_option): Handle -mwaitpkg.
5579         * config.gcc: New header.
5580         * config/i386/cpuid.h (bit_WAITPKG): New bit.
5581         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
5582         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
5583         function type.
5584         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5585         OPTION_MASK_ISA_WAITPKG.
5586         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
5587         (ix86_option_override_internal): Add PTA_WAITPKG.
5588         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
5589         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
5590         IX86_BUILTIN_TPAUSE.
5591         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
5592         __builtin_ia32_umwait and __builtin_ia32_tpause.
5593         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
5594         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
5595         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
5596         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
5597         UNSPECV_TPAUSE): New.
5598         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
5599         * config/i386/i386.opt: Add -mwaitpkg.
5600         * config/i386/waitpkgintrin.h: New file.
5601         * config/i386/x86intrin.h: New header.
5602         * doc/invoke.texi: Add -mwaitpkg.
5604 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
5606         PR target/85606
5607         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
5608         equivalent.
5609         (cortex-m0): Use armv6s-m isa.
5610         (cortex-m0plus): Likewise.
5611         (cortex-m1): Likewise.
5612         (cortex-m0.small-multiply): Likewise.
5613         (cortex-m0plus.small-multiply): Likewise.
5614         (cortex-m1.small-multiply): Likewise.
5616 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
5617             Jakub Jelinek  <jakub@redhat.com>
5619         PR tree-optimization/85692
5620         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
5621         source permute as well.
5623 2018-05-11  Martin Liska  <mliska@suse.cz>
5625         PR sanitizer/85556
5626         * doc/extend.texi: Document LLVM style format for no_sanitize
5627         attribute.
5629 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
5631         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
5632         mode_supports_vsx_dform_quad to mode_supports_dq_form.
5633         (mode_supports_vsx_dform_quad): Likewise.
5634         (mode_supports_vmx_dform): Move these functions to be next to the
5635         other mode_supports functions.
5636         (mode_supports_dq_form): Likewise.
5637         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
5638         mode_supports_dq_form.
5639         (reg_offset_addressing_ok_p): Likewise.
5640         (offsettable_ok_by_alignment): Likewise.
5641         (rs6000_legitimate_offset_address_p): Likewise.
5642         (legitimate_lo_sum_address_p): Likewise.
5643         (rs6000_legitimize_address): Likewise.
5644         (rs6000_legitimize_reload_address): Likewise.
5645         (rs6000_secondary_reload_inner): Likewise.
5646         (rs6000_preferred_reload_class): Likewise.
5647         (rs6000_output_move_128bit): Likewise.
5649 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
5651         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
5652         Generate SImode target register for null target.
5653         <case IX86_BUILTIN_XGETBV>: Ditto.
5654         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
5655         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
5657 2018-05-10  Carl Love  <cel@us.ibm.com>
5659         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
5660         dcbtt and dcbtstt if operands[2] is 0.
5662 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
5664         PR target/85693
5665         * config/i386/sse.md (usadv64qi): New expander.
5667 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
5669         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
5670         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
5671         -maltivec=be support.
5672         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
5673         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
5674         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
5675         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
5676         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
5677         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
5678         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
5679         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
5680         altivec_vsumsws): Adjust.
5681         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
5682         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
5683         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
5684         support.
5685         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
5686         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
5687         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
5688         (altivec_lve<VI_char>x): Delete expand.
5689         (*altivec_lve<VI_char>x_internal): Rename to...
5690         (altivec_lve<VI_char>x): ... this.
5691         (altivec_lvxl_<mode>): Delete expand.
5692         (*altivec_lvxl_<mode>_internal): Rename to ...
5693         (altivec_lvxl_<mode>): ... this.
5694         (altivec_stvxl_<mode>): Delete expand.
5695         (*altivec_stvxl_<mode>_internal): Rename to ...
5696         (altivec_stvxl_<mode>): ... this.
5697         (altivec_stve<VI_char>x): Delete expand.
5698         (*altivec_stve<VI_char>x_internal): Rename to ...
5699         (altivec_stve<VI_char>x): ... this.
5700         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
5701         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
5702         reduc_plus_scal_<mode>): Adjust.
5703         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
5704         comment.
5705         (rs6000_cpu_cpp_builtins): Adjust.
5706         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
5707         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
5708         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
5709         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
5710         -maltivec=be support.
5711         (rs6000_split_vec_extract_var): Adjust.
5712         (rs6000_split_v4si_init): Adjust.
5713         (swap_selector_for_mode): Delete.
5714         (altivec_expand_lvx_be, altivec_expand_stvx_be,
5715         altivec_expand_stvex_be): Delete.
5716         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
5717         -maltivec=be support.
5718         (rs6000_gimple_fold_builtin): Ditto.
5719         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
5720         Adjust.
5721         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
5722         (TARGET_DIRECT_MOVE_64BIT): Adjust.
5723         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
5724         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
5725         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
5726         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
5727         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
5728         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
5729         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
5730         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
5731         anonymous split): Adjust.
5732         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
5733         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
5735 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
5737         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
5738         when --with-gxx-include-dir is also specified.
5739         * configure: Regenerate.
5741 2018-05-09  Jim Wilson  <jimw@sifive.com>
5743         PR target/84797
5744         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
5745         * config/riscv/t-withmultilib: New.
5746         * config/riscv/withmultilib.h: New.
5747         * doc/install.texi: Document RISC-V --with-multilib-list support.
5749 2018-05-09  Richard Biener  <rguenther@suse.de>
5751         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
5752         vector.
5753         (vect_bb_vectorization_profitable_p): Adjust.  Compute
5754         actual scalar cost using the cost vector and the add_stmt_cost
5755         machinery.
5757 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5759         PR rtl-optimization/85645
5760         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
5761         in the REG_CFA_REGISTER note for LR, don't leave it empty.
5763 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5765         PR rtl-optimization/85645
5766         * shrink-wrap.c (spread_components): Return a boolean saying if
5767         anything was changed.
5768         (try_shrink_wrapping_separate): Iterate spread_components until
5769         nothing changes anymore.
5771 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5773         PR rtl-optimization/85645
5774         * regrename.c (build_def_use): Also kill the chains that include the
5775         destination of a REG_CFA_REGISTER note.
5777 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
5779         PR rtl-optimization/85645
5780         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
5781         insn that has a REG_CFA_REGISTER note.
5783 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
5785         * cfgexpand.c (expand_clobber): New function.
5786         (expand_gimple_stmt_1): Use it.
5787         * tree-vect-stmts.c (vect_clobber_variable): New function,
5788         split out from...
5789         (vectorizable_simd_clone_call): ...here.
5790         (vectorizable_store): Emit a clobber either side of an
5791         IFN_STORE_LANES sequence.
5792         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
5794 2018-05-09  Tom de Vries  <tom@codesourcery.com>
5796         PR target/85626
5797         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
5798         (define_insn "trap_if_false"): Add exit after trap.
5800 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
5802         PR rtl-optimization/85638
5803         * bb-reorder.c: Include common/common-target.h.
5804         (create_forwarder_block): New function extracted from...
5805         (fix_up_crossing_landing_pad): ...here.  Rename into...
5806         (dw2_fix_up_crossing_landing_pad): ...this.
5807         (sjlj_fix_up_crossing_landing_pad): New function.
5808         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
5809         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
5810         from both partitions and exit the loop after one iteration.
5812 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5814         Revert:
5815         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5816         subsection.
5817         (Basic PowerPC Built-in Functions): The new name of the
5818         subsection previously known as "PowerPC Built-in Functions".
5819         (Basic PowerPC Built-in Functions Available on all Configurations):
5820         New subsubsection.
5821         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
5822         subsubsection.
5823         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
5824         subsubsection.
5825         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
5826         subsubsection.
5827         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
5828         subsubsection.
5830 2018-05-08  Jim Wilson  <jimw@sifive.com>
5832         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
5833         (LD_EMUL_SUFFIX): New.
5834         (LINK_SPEC): Use it.
5836 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5838         * doc/extend.texi (PowerPC Built-in Functions): Rename this
5839         subsection.
5840         (Basic PowerPC Built-in Functions): The new name of the
5841         subsection previously known as "PowerPC Built-in Functions".
5842         (Basic PowerPC Built-in Functions Available on all Configurations):
5843         New subsubsection.
5844         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
5845         subsubsection.
5846         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
5847         subsubsection.
5848         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
5849         subsubsection.
5850         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
5851         subsubsection.
5853 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
5855         PR target/85683
5856         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
5857         after cmpelim optimization.
5859 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
5861         * config.gcc: Support "goldmont".
5862         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
5863         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
5864         PROCESSOR_GOLDMONT.
5865         * config/i386/i386.c (m_GOLDMONT): Define.
5866         (processor_target_table): Add "goldmont".
5867         (PTA_GOLDMONT): Define.
5868         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
5869         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
5870         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
5871         (fold_builtin_cpu): Add "goldmont".
5872         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
5873         (ix86_option_override_internal): Add "goldmont".
5874         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
5875         (processor_type): Add PROCESSOR_GOLDMONT.
5876         * config/i386/i386.md: Add CPU "glm".
5877         * config/i386/glm.md: New file.
5878         * config/i386/x86-tune.def: Add m_GOLDMONT.
5879         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
5881 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
5883         PR target/85572
5884         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
5885         E_V4DImode.
5886         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
5887         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
5888         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
5890         PR target/85317
5891         * config/i386/i386.c (ix86_fold_builtin): Handle
5892         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
5894         PR target/85480
5895         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
5896         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
5898 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
5900         PR target/85658
5901         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
5902         (check_arch): Likewise.
5903         (check_fpu): Return the result rather than printing it.
5904         (end arch): Fix operator precedence.
5905         (end cpu): Likewise.
5906         (END): Print the result from check_fpu.
5908 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
5909             Alan Hayward  <alan.hayward@arm.com>
5910             David Sherwood  <david.sherwood@arm.com>
5912         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
5913         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
5914         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
5915         (*fcmuo<mode>_and): New patterns.
5917 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
5919         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
5920         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
5921         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
5922         (cmp_op, sve_imm_con): New code attributes.
5923         (SVE_COND_INT_CMP, imm_con): Delete.
5924         (cmp_op): Remove above unspecs from int attribute.
5925         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
5926         to...
5927         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
5928         comparison-specific unspecs.
5929         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
5930         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
5931         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
5932         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
5933         (*vec_fcm<cmp_op><mode>): Rename to...
5934         (*fcm<cmp_op><mode>): ...this and adjust likewise.
5935         (*vec_fcmuo<mode>): Rename to...
5936         (*fcmuo<mode>): ...this and adjust likewise.
5937         (*pred_fcm<cmp_op><mode>): New pattern.
5938         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
5939         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
5940         functions.
5941         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
5942         and UNORDERED.
5943         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
5944         (aarch64_emit_sve_predicated_cond): New function.
5945         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
5946         (aarch64_emit_unspec_cond_or): Replace with...
5947         (aarch64_emit_sve_or_conds): ...this new function.  Use
5948         aarch64_emit_sve_ptrue_op for the individual comparisons and
5949         aarch64_emit_binop to OR them together.
5950         (aarch64_emit_inverted_unspec_cond): Replace with...
5951         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
5952         aarch64_emit_sve_ptrue_op for the comparison and
5953         aarch64_emit_unop to invert the result.
5954         (aarch64_expand_sve_vec_cmp_float): Update after the above
5955         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
5957 2018-05-07  Nathan Sidwell  <nathan@acm.org>
5959         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
5960         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
5961         (Backwards Compatibility): Likewise.
5963 2018-05-07  Luis Machado  <luis.machado@linaro.org>
5965         PR bootstrap/85681
5966         Revert:
5967         2018-05-07  Luis Machado  <luis.machado@linaro.org>
5969         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5970         <prefetch_dynamic_strides>: New const bool field.
5971         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5972         prefetch_dynamic_strides.
5973         (exynosm1_prefetch_tune): Likewise.
5974         (thunderxt88_prefetch_tune): Likewise.
5975         (thunderx_prefetch_tune): Likewise.
5976         (thunderx2t99_prefetch_tune): Likewise.
5977         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
5978         to false.
5979         (aarch64_override_options_internal): Update to set
5980         PARAM_PREFETCH_DYNAMIC_STRIDES.
5981         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5982         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5983         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5984         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5985         prefetch-dynamic-strides setting.
5987         2018-05-07  Luis Machado  <luis.machado@linaro.org>
5989         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5990         <minimum_stride>: New const int field.
5991         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5992         minimum_stride field.
5993         (exynosm1_prefetch_tune): Likewise.
5994         (thunderxt88_prefetch_tune): Likewise.
5995         (thunderx_prefetch_tune): Likewise.
5996         (thunderx2t99_prefetch_tune): Likewise.
5997         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
5998         (aarch64_override_options_internal): Update to set
5999         PARAM_PREFETCH_MINIMUM_STRIDE.
6000         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6001         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6002         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6003         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6004         stride is constant and is below the minimum stride threshold.
6006 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6008         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
6009         to 512.
6011 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6013         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6014         <prefetch_dynamic_strides>: New const bool field.
6015         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6016         prefetch_dynamic_strides.
6017         (exynosm1_prefetch_tune): Likewise.
6018         (thunderxt88_prefetch_tune): Likewise.
6019         (thunderx_prefetch_tune): Likewise.
6020         (thunderx2t99_prefetch_tune): Likewise.
6021         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
6022         to false.
6023         (aarch64_override_options_internal): Update to set
6024         PARAM_PREFETCH_DYNAMIC_STRIDES.
6025         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
6026         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
6027         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
6028         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
6029         prefetch-dynamic-strides setting.
6031 2018-05-07  Luis Machado  <luis.machado@linaro.org>
6033         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
6034         <minimum_stride>: New const int field.
6035         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
6036         minimum_stride field.
6037         (exynosm1_prefetch_tune): Likewise.
6038         (thunderxt88_prefetch_tune): Likewise.
6039         (thunderx_prefetch_tune): Likewise.
6040         (thunderx2t99_prefetch_tune): Likewise.
6041         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
6042         (aarch64_override_options_internal): Update to set
6043         PARAM_PREFETCH_MINIMUM_STRIDE.
6044         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
6045         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
6046         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
6047         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
6048         stride is constant and is below the minimum stride threshold.
6050 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
6052         PR c++/85659
6053         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
6054         the type is addressable.  Don't force op into register if it has
6055         BLKmode.
6057 2018-05-05  Roland McGrath  <mcgrathr@google.com>
6059         PR other/77609
6060         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
6061         any section for which we don't know a specific type it should have,
6062         regardless of name.  Previously this was done only for the exact
6063         names ".init_array", ".fini_array", and ".preinit_array".
6064         (default_elf_asm_named_section): Add comment about
6065         relationship with default_section_type_flags and SECTION_NOTYPE.
6066         (get_section): Don't consider it a type conflict if one side has
6067         SECTION_NOTYPE and the other doesn't, as long as neither has the
6068         SECTION_BSS et al used in the default_section_type_flags logic.
6070 2018-05-05  Tom de Vries  <tom@codesourcery.com>
6072         PR target/85653
6073         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
6074         (workaround_barsyncs): New function.
6075         (nvptx_reorg): Use workaround_barsyncs.
6076         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
6077         (define_expand "nvptx_membar_cta"): New define_expand.
6078         (define_insn "*nvptx_membar_cta"): New insn.
6080 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
6082         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
6083         To improve optimization opportunities.
6084         * builtin-types.def: The new needed builtin types for the above.
6086 2018-05-04  Richard Biener  <rguenther@suse.de>
6088         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
6089         * gimple-ssa-store-merging.c
6090         (imm_store_chain_info::output_merged_store): Remove redundant create,
6091         release split_store vector contents on failure.
6092         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
6093         scalar stmt vector on cache hit.
6095 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
6097         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
6098         Xilinx FP support.
6099         * config.gcc (powerpc-xilinx-eabi*): Remove.
6100         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
6101         support.
6102         (fusion_addis_mem_combo_load): Ditto.
6103         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
6104         FP support.
6105         (rs6000_cpu_cpp_builtins): Ditto.
6106         * config/rs6000/rs6000-linux.c
6107         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
6108         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
6109         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
6110         support.
6111         (rs6000_setup_reg_addr_masks): Ditto.
6112         (rs6000_init_hard_regno_mode_ok): Ditto.
6113         (rs6000_option_override_internal): Ditto.
6114         (legitimate_lo_sum_address_p): Ditto.
6115         (rs6000_legitimize_address): Ditto.
6116         (rs6000_legitimize_reload_address): Ditto.
6117         (rs6000_legitimate_address_p): Ditto.
6118         (abi_v4_pass_in_fpr): Ditto.
6119         (setup_incoming_varargs): Ditto.
6120         (rs6000_gimplify_va_arg): Ditto.
6121         (rs6000_split_multireg_move): Ditto.
6122         (rs6000_savres_strategy): Ditto.
6123         (rs6000_emit_prologue_components): Ditto.
6124         (rs6000_emit_epilogue_components): Ditto.
6125         (rs6000_emit_prologue): Ditto.
6126         (rs6000_emit_epilogue): Ditto.
6127         (rs6000_elf_file_end): Ditto.
6128         (rs6000_function_value): Ditto.
6129         (rs6000_libcall_value): Ditto.
6130         * config/rs6000/rs6000.h: Ditto.
6131         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
6132         (TARGET_MINMAX): ... this.  New.
6133         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
6134         * config/rs6000/rs6000.md: Remove Xilinx FP support.
6135         (*movsi_internal1_single): Delete.
6136         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
6137         mfpu=, mxilinx-fpu): Delete.
6138         * config/rs6000/singlefp.h: Delete.
6139         * config/rs6000/sysv4.h: Remove Xilinx FP support.
6140         * config/rs6000/t-rs6000: Ditto.
6141         * config/rs6000/t-xilinx: Delete.
6142         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
6143         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
6144         (VStype_simple): Delete.
6145         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
6146         * config/rs6000/xfpu.h: Delete.
6147         * config/rs6000/xfpu.md: Delete.
6148         * config/rs6000/xilinx.h: Delete.
6149         * config/rs6000/xilinx.opt: Delete.
6150         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
6151         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
6153 2018-05-04  Tom de Vries  <tom@codesourcery.com>
6155         PR libgomp/85639
6156         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
6157         if ignore == 0.
6159 2018-05-04  Richard Biener  <rguenther@suse.de>
6161         PR middle-end/85627
6162         * tree-complex.c (update_complex_assignment): We are always in SSA form.
6163         (expand_complex_div_wide): Likewise.
6164         (expand_complex_operations_1): Likewise.
6165         (expand_complex_libcall): Preserve EH info of the original stmt.
6166         (tree_lower_complex): Handle removed blocks.
6167         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
6168         on complex multiplication and division libcall builtins.
6170 2018-05-04  Richard Biener  <rguenther@suse.de>
6172         PR middle-end/85574
6173         * fold-const.c (negate_expr_p): Restrict negation of operand
6174         zero of a division to when we know that can happen without
6175         overflow.
6176         (fold_negate_expr_1): Likewise.
6178 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
6180         PR libstdc++/85466
6181         * real.h (real_nextafter): Declare.
6182         * real.c (real_nextafter): New function.
6183         * fold-const-call.c (fold_const_nextafter): New function.
6184         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
6185         CASE_CFN_NEXTTOWARD.
6186         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
6187         even when arg1_mode is different from arg0_mode.
6189 2018-05-03  Nathan Sidwell  <nathan@acm.org>
6191         * doc/extend.texi (Deprecated Features): Remove
6192         -ffriend-injection.
6193         (Backwards Compatibility): Likewise.
6194         * doc/invoke.texi (C++ Language Options): Likewise.
6195         (C++ Dialect Options): Likewise.
6197 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
6199         PR target/85530
6200         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
6201         _mm512_mask_mullox_epi64): New intrinsics.
6203 2018-05-03  Tom de Vries  <tom@codesourcery.com>
6205         PR testsuite/85106
6206         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
6207         dump files): Add offload-tree.
6209 2018-05-03  Richard Biener  <rguenther@suse.de>
6211         PR tree-optimization/85615
6212         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
6213         to loops not nested in BBs loop father to avoid creating multi-entry
6214         loops.
6216 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6218         PR tree-optimization/70291
6219         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
6220         arguments.  Change return type to tree.  Emit libcall as a new
6221         statement rather than replacing existing one when inplace_p is true.
6222         (expand_complex_multiplication_components): New function.
6223         (expand_complex_multiplication): Expand floating-point complex
6224         multiplication using the above.
6225         (expand_complex_division): Rename inner_type parameter to type.
6226         Update expand_complex_libcall call-site.
6227         (expand_complex_operations_1): Update expand_complex_multiplication
6228         and expand_complex_division call-sites.
6230 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
6232         PR target/85582
6233         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
6234         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
6235         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
6236         the highest significant bit of the shift count mask is clear.  In
6237         check whether and[sq]i3 is needed verify that all significant bits
6238         of the shift count other than the highest are set.
6240 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6242         PR libgomp/82428
6243         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
6244         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
6245         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
6246         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
6247         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
6248         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
6249         __builtin_goacc_parlevel_size.
6251 2018-05-02  Richard Biener  <rguenther@suse.de>
6253         PR tree-optimization/85597
6254         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
6255         do not use split vect_get_vec_defs call but call vect_get_slp_defs
6256         directly.
6258 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6260         PR testsuite/85106
6261         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
6262         dump files): Add ltrans-tree.
6264 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6266         PR testsuite/85106
6267         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
6268         dump files): Add wpa-ipa.
6270 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
6272         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
6273         powerpc*-*-linux*paired* target.
6274         * config/rs6000/750cl.h: Delete.
6275         * config/rs6000/paired.h: Delete.
6276         * config/rs6000/paired.md: Delete.
6277         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
6278         float support.
6279         * config/rs6000/rs6000-builtin.def: Remove paired float support.
6280         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
6281         comment.  Remove paired float support.
6282         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
6283         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
6284         VECTOR_PAIRED.
6285         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
6286         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
6287         declarations.
6288         * config/rs6000/rs6000.c: Remove paired float support.
6289         (paired_expand_vector_init, paired_expand_vector_move,
6290         paired_emit_vector_compare, paired_emit_vector_cond_expr,
6291         (paired_expand_lv_builtin, paired_expand_stv_builtin,
6292         paired_expand_builtin, paired_expand_predicate_builtin,
6293         paired_init_builtins): Delete.
6294         * config/rs6000/rs6000.h: Remove paired float support.
6295         * config/rs6000/rs6000.md: Remove paired float support.
6296         (move_from_CR_ov_bit): Delete.
6297         * config/rs6000/rs6000.opt (mpaired): Delete.
6298         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
6299         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
6301 2018-05-02  Richard Biener  <rguenther@suse.de>
6303         PR middle-end/85567
6304         * gimplify.c (gimplify_save_expr): When in SSA form allow
6305         SAVE_EXPRs to compute to SSA vars.
6307 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
6309         PR target/85582
6310         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
6311         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
6312         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
6313         clobber operands[2], instead use a new pseudo.  Formatting fixes.
6315 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
6317         PR tree-optimization/85586
6318         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
6319         exit early for statements in the same group if the accesses are
6320         not strided.
6322 2018-05-02  Tom de Vries  <tom@codesourcery.com>
6324         PR lto/85451
6325         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
6326         error message.
6328 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
6330         PR tree-optimization/85143
6331         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
6333 2018-05-01  Tom de Vries  <tom@codesourcery.com>
6335         PR lto/85451
6336         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
6337         not found" error message.
6339 2018-05-01  Tom de Vries  <tom@codesourcery.com>
6341         PR other/83786
6342         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
6343         * vec.c (test_ordered_remove_if): New function.
6344         (vec_c_tests): Call test_ordered_remove_if.
6345         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
6346         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
6347         * tree-vect-patterns.c (vect_pattern_recog_1): Use
6348         VEC_ORDERED_REMOVE_IF.
6350 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6352         PR tree-optimization/82665
6353         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
6354         pointer subtraction where arguments come from a memchr call.
6356 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
6358         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
6359         --push-state --as-needed and --pop-state instead of --as-needed and
6360         --no-as-needed if ld supports it.
6361         * configure: Regenerated.
6363         PR web/85578
6364         * doc/install.texi2html: Replace _002d with - and _002a with * in
6365         generated html files using sed.
6367 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6369         PR c++/85523
6370         * gcc-rich-location.c (blank_line_before_p): New function.
6371         (use_new_line): New function.
6372         (gcc_rich_location::add_fixit_insert_formatted): New function.
6373         * gcc-rich-location.h
6374         (gcc_rich_location::add_fixit_insert_formatted): New function.
6376 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6378         * selftest.c (assert_streq): Rename "expected" and "actual" to
6379         "val1" and "val2".  Extend NULL-handling to cover both inputs
6380         symmetrically, while still requiring both to be non-NULL for a pass.
6381         * selftest.h (assert_streq): Rename "expected" and "actual" to
6382         "val1" and "val2".
6383         (ASSERT_EQ): Likewise.
6384         (ASSERT_EQ_AT): Likewise.
6385         (ASSERT_KNOWN_EQ): Likewise.
6386         (ASSERT_KNOWN_EQ_AT): Likewise.
6387         (ASSERT_NE): Likewise.
6388         (ASSERT_MAYBE_NE): Likewise.
6389         (ASSERT_MAYBE_NE_AT): Likewise.
6390         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
6391         the assertion to pass.
6392         (ASSERT_STREQ_AT): Likewise.
6394 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
6396         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
6397         interaction with -pie.
6399 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6401         * selftest.h: Fix alphabetization of per-source-file selftest
6402         declarations.
6404 2018-04-30  Jason Merrill  <jason@redhat.com>
6406         PR c++/61982 - dead stores to destroyed objects.
6407         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
6408         of clobber.
6410 2018-04-30  Jason Merrill  <jason@redhat.com>
6412         * tree.c (build_clobber): New.
6413         * tree.h: Declare it.
6414         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
6416 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6418         * diagnostic-show-locus.c (layout::layout): Update for
6419         location_get_source_line returning a char_span.
6420         (struct char_span): Move to input.h.
6421         (struct correction): Update for fields in char_span becoming
6422         private.
6423         (struct source_line): Update for location_get_source_line
6424         returning a char_span.
6425         (layout::print_line): Likewise.
6426         * edit-context.c (edited_file::print_content): Likewise.
6427         (edited_file::print_diff_hunk): Likewise.
6428         (edited_file::print_run_of_changed_lines): Likewise.
6429         (edited_file::get_num_lines): Likewise.
6430         (edited_line::edited_line): Likewise.
6431         * final.c (asm_show_source): Likewise.
6432         * input.c (location_get_source_line): Convert return type
6433         from const char * to char_span, losing the final "line_len"
6434         param.
6435         (dump_location_info): Update for the above.
6436         (get_substring_ranges_for_loc): Likewise.  Use a char_span
6437         when handling the literal within the line.
6438         (test_reading_source_line): Update for location_get_source_line
6439         returning a char_span.
6440         * input.h (class char_span): Move here from
6441         diagnostic-show-locus.c, converting from a struct to a class.
6442         Make data members private.
6443         (char_span::operator bool): New.
6444         (char_span::length): New.
6445         (char_span::get_buffer): New.
6446         (char_span::operator[]): New.
6447         (char_span::subspan): Make const.
6448         (char_span::xstrdup): New.
6449         (location_get_source_line): Convert return type from const char *
6450         to char_span, losing the final "line_size" param.
6452 2018-04-30  Jan Hubicka  <jh@suse.cz>
6454         * lto-wrapper.c (ltrans_priorities): New static var.
6455         (cmp_priority): New.
6456         (run_gcc): Read priorities and if doing parallel build order
6457         the Makefile by them.
6459 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
6461         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
6463 2018-04-30  Richard Biener  <rguenther@suse.de>
6465         * tree-cfg.c (verify_address): Remove base argument, add
6466         flag whether to check TREE_ADDRESSABLE and do that.
6467         (verify_expr): Remove.
6468         (verify_types_in_gimple_reference): Add pieces from verify_expr.
6469         (verify_gimple_assign_single): Likewise.
6470         (verify_gimple_switch): Likewise.
6471         (verify_expr_location_1): Dereference tp once.  Add (disabled)
6472         piece from verify_expr.
6473         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
6475 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
6477         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
6479 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
6481         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
6482         (small_data_pattern): Likewise.
6483         (arc_rewrite_small_data): Likewise.
6484         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
6485         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
6486         (get_symbol_alignment): New function.
6487         (legitimate_small_data_address_p): Likewise.
6488         (legitimate_scaled_address): Update, call
6489         legitimate_small_data_address_p.
6490         (output_sdata): New static variable.
6491         (arc_print_operand): Update how we handle small data operands.
6492         (arc_print_operand_address): Likewise.
6493         (arc_legitimate_address_p): Update, use
6494         legitimate_small_data_address_p.
6495         (arc_rewrite_small_data_p): Remove.
6496         (arc_rewrite_small_data_1): Likewise.
6497         (arc_rewrite_small_data): Likewise.
6498         (small_data_pattern): Likewise.
6499         (compact_sda_memory_operand): Update to use
6500         legitimate_small_data_address_p and get_symbol_alignment.
6501         (prepare_move_operands): Don't rewite sdata pattern.
6502         (prepare_extend_operands): Remove.
6503         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
6504         pattern.
6505         (zero_extendqisi2): Likewise.
6506         (zero_extendhisi2): Likewise.
6507         (extendqihi2): Likewise.
6508         (extendqisi2): Likewise.
6509         (extendhisi2): Likewise.
6510         (addsi3): Likewise.
6511         (subsi3): Likewise.
6512         (andsi3): Likewise.
6513         * config/arc/constraints.md (Usd): Change it to memory constraint.
6515 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
6517         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
6518         as source of std instructions.
6519         * config/arc/arc.md (movsi_insn): Update pattern predicate to
6520         allow 6-bit constants as source for store instructions.
6521         (movdi_insn): Update instruction pattern to allow 6-bit constants
6522         as source for store instructions.
6524 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
6526         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
6528 2018-04-30  Nathan Sidwell  <nathan@acm.org>
6529             Sandra Loosemore <sandra@codesourcery.com>
6531         * dumpfile.c (dump_open): Allow '-' for stdout.
6532         * doc/invoke.texi (Developer Options): Document dump filename
6533         determination early.  Document stdin/stdout selection.
6535 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
6537         Microblaze Target: PIC data text relative
6539         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
6540         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
6541         Add declaration.
6542         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
6543         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
6544         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
6545         New addressing mode for data-text relative position indepenedent code.
6546         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
6547         'ADDRESS_SYMBOLIC_TXT_REL'.
6548         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
6549         (microblaze_legitimate_pic_operand): Exclude function calls from
6550         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
6551         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
6552         addresses cases.
6553         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
6554         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
6555         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
6556         for 'address + offset'.
6557         (microblaze_expand_prologue): Add new function prologue call for
6558         'r20' assignation.
6559         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
6560         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
6561         table in case of TARGET_PIC_DATA_TEXT_REL.
6562         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
6563         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
6564         Add new macros 'UNSPEC_TEXT',
6565         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
6566         + exclude function calls from 'UNSPEC_PLT' in case of data text
6567         relative mode.
6568         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
6569         new target hook for generating address diff vector tables in case of
6570         flag_pic.
6571         * doc/tm.texi : Regenerate.
6572         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
6573         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
6574         of addr diff vector generation.
6575         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
6576         target hook definition.
6577         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
6578         Add default function for generate_pic_addr_diff_vec -> flag_pic.
6579         * doc/invoke.texi (Add new pic option): Add new microblaze pic
6580         option for data text relative.
6582 2018-04-30  Richard Biener  <rguenther@suse.de>
6584         * tree-chrec.h (evolution_function_is_constant_p): Remove
6585         redundant check.
6586         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
6588 2018-04-30  Richard Biener  <rguenther@suse.de>
6590         PR bootstrap/85571
6591         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
6593 2018-04-30  Richard Biener  <rguenther@suse.de>
6595         PR tree-optimization/28364
6596         PR tree-optimization/85275
6597         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
6598         copying first exit test.
6600 2018-04-28  Mark Wielaard  <mark@klomp.org>
6602         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
6603         dwarf_version >= 5.
6604         (dwarf_AT): Handle DW_AT_addr_base.
6605         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
6607 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
6609         PR target/84431
6610         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
6611         (*ashl<dwi>3_doubleword_mask_1): Ditto.
6612         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
6613         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
6615 2018-04-28  Richard Biener  <rguenther@suse.de>
6617         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
6618         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
6619         to reflect use.  Only add interesting stmts.
6621 2018-04-27  Martin Jambor  <mjambor@suse.cz>
6623         PR ipa/85549
6624         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
6625         the jump function allows for passing through aggregate values.
6627 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
6629         * input.h (in_system_header_at): Convert from macro to inline
6630         function.
6631         (from_macro_expansion_at): Likewise.
6632         (from_macro_definition_at): Likewise.
6634 2018-04-27  Jeff Law  <law@redhat.com>
6636         * config.gcc: Mark tile* targets as deprecated/obsolete.
6638 2018-04-27  Richard Biener  <rguenther@suse.de>
6640         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
6641         fix for ILP32.
6643 2018-04-27  Richard Biener  <rguenther@suse.de>
6645         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
6647 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
6649         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
6650         with Yd constraint. Set "preferred_for_speed" attribute from
6651         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
6652         with Yd constraint.
6653         (*movdi_internal): Ditto.
6654         (movti_interunit splitters): Remove
6655         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
6656         (movdi_interunit splitters): Ditto.
6657         * config/i386/constraints.md (Ye): Remove.
6658         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
6660 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6662         PR target/85512
6663         * config/aarch64/constraints.md (Usg): Limit to 31.
6664         (Usj): Limit to 63.
6666 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
6668         PR tree-optimization/85529
6669         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
6670         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
6671         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
6672         zero extension or masking of the MSB bit.
6673         (optimize_range_tests): Add FIRST_BB argument, pass it through
6674         to optimize_range_tests_var_bound.
6675         (maybe_optimize_range_tests, reassociate_bb): Adjust
6676         optimize_range_tests callers.
6678 2018-04-26  Richard Biener  <rguenther@suse.de>
6679             Jakub Jelinek  <jakub@redhat.com>
6681         * cgraph.h (symbol_table): Just declare debug method here.
6682         * symtab.c (symbol_table::debug): Define.
6684 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
6686         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
6688 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
6690         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
6691         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
6692         (*movdi_internal): Substitute Yi and Yj constraint with x
6693         and Ym and Yn constraint with y constraint.  Update "isa"
6694         attribute and set "preferred_for_speed" attribute from
6695         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
6696         (*movsi_internal): Ditto.
6697         (*movdf_internal): Ditto.
6698         (*movsf_internal): Ditto.
6699         (*zero_extendsidi2): Ditto.
6700         * config/i386/sse.md (vec_set<mode>_0): Ditto.
6701         (sse2_loadld): Ditto.
6702         (*vec_extract<ssevecmodelower>_0): Ditto.
6703         (*vec_extractv4si_0_zext_sse4): Ditto.
6704         (vec_concatv2di): Ditto.
6705         (*vec_dup<mode>): Ditto.
6706         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
6707         * config/i386/constraints.md (Yi): Remove.
6708         (Yj): Remove.
6709         (Ym): Remove.
6710         (Yn): Remove.
6712 2018-04-26  Nathan Sidwell  <nathan@acm.org>
6714         * dumpfile.c (dump_open): New.
6715         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
6716         (dump_finish): Detect stdio/stderr by value not name.
6718 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
6720         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
6722 2018-04-26  Tom de Vries  <tom@codesourcery.com>
6724         PR target/84952
6725         * config/nvptx/nvptx.c (verify_neutering_jumps)
6726         (verify_neutering_labels): New function
6727         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
6729 2018-04-26  Tom de Vries  <tom@codesourcery.com>
6731         PR target/84025
6732         * config/nvptx/nvptx.c (needs_neutering_p): New function.
6733         (nvptx_single): Use needs_neutering_p to skip over insns that do not
6734         need neutering.
6736 2018-04-26  Richard Biener <rguenther@suse.de>
6737             Tom de Vries  <tom@codesourcery.com>
6739         PR lto/85422
6740         * lto-streamer-out.c (output_function): Fixup loops if required to match
6741         discovery done in the reader.
6743 2018-04-26  Richard Biener  <rguenther@suse.de>
6745         PR tree-optimization/85116
6746         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
6747         have a loop exit from the single latch predecessor.  Remove
6748         case of header with just condition.
6749         (ch_base::copy_headers): Exclude infinite loops from any
6750         processing.
6751         (pass_ch::execute): Record exits.
6753 2018-04-26  Richard Biener  <rguenther@suse.de>
6755         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
6756         prologue cost vector and pass it to vect_get_load_cost.
6757         (vect_get_peeling_costs_all_drs): Likewise.
6758         (vect_peeling_hash_get_lowest_cost): Likewise.
6759         (vect_enhance_data_refs_alignment): Likewise.
6761 2018-04-26  Richard Biener  <rguenther@suse.de>
6763         PR middle-end/85450
6764         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
6765         checking of integer<->pointer conversions.
6766         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
6767         sign-/zero-extending pointer types.
6768         (expand_omp_for_static_chunk): Likewise.
6770 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
6771             Jean Lee  <xiaoyur347@gmail.com>
6773         * config/mips/mips.c (mips_asan_shadow_offset): New function.
6774         (TARGET_ASAN_SHADOW_OFFSET): Define.
6775         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
6776         true for -fsanitize=address.
6778 2018-04-25  Mark Wielaard  <mark@klomp.org>
6780         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
6781         shorter ones.
6783 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
6785         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
6786         than "alu", remove explicit "memory" and "imm_disp" attributes.
6787         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
6789         PR middle-end/85414
6790         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
6791         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
6792         gen_lowpart_no_emit.
6794 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
6796         PR target/85473
6797         * config/i386/i386.c (ix86_expand_builtin): Change memory
6798         operand to XI, extend p0 to Pmode.
6799         * config/i386/i386.md: Change unspec volatile and operand
6800         1 mode to XI, change operand 0 mode to P.
6802 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6804         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
6805         GET_MODE_MASK before any checking.
6806         (nds32_can_use_bset_p): Likewise.
6807         (nds32_can_use_btgl_p): Likewise.
6809 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6811         * config/nds32/nds32-doubleword.md: New define_split pattern for
6812         illegal register number.
6814 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6816         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
6818 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
6820         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
6822 2018-04-25  Richard Biener  <rguenther@suse.de>
6824         * lto-streamer.h (LTO_major_version): Bump to 8.
6826 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
6828         * BASE-VER: Set to 9.0.0.
6830 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
6832         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
6833         in __abskf2 and __powikf2.
6835 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6837         PR target/85512
6838         * config/aarch64/constraints.md (Usg, Usj): New constraints.
6839         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
6840         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
6841         Use the above on operand 2.  Reindent.
6842         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
6844 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
6846         PR target/85485
6847         * common/config/i386/i386-common.c (ix86_handle_option): Don't
6848         handle OPT_mcet.
6849         * config/i386/i386.opt (mcet): Removed.
6850         * doc/install.texi: Remove -mcet documentation.
6851         * doc/invoke.texi: Likewise.
6853 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
6855         PR target/85485
6856         * doc/install.texi: Remove -mcet from bootstrap-cet.
6858 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6860         PR target/85511
6861         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
6862         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
6863         if TARGET_64BIT.
6865         PR target/85503
6866         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
6867         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
6868         containing a CONST_VECTOR.
6870 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
6872         * doc/install.texi: Update newlib dependency for nvptx.
6874 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6876         PR target/85508
6877         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
6878         instead of INTVAL when shifting x left.
6880 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
6882         PR tree-optimization/85478
6883         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
6884         vect_grouped_store_supported for single element vectors.
6886 2018-04-24  Richard Biener  <rguenther@suse.de>
6888         PR target/85491
6889         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
6890         load cost increase to the case of non-constant step.
6892 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
6894         PR target/84828
6895         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
6896         destination if any_malformed_asm.
6898 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
6900         PR middle-end/85496
6901         * expr.c (store_field): In the bitfield case, if the value comes from
6902         a function call and is returned in registers by means of a PARALLEL,
6903         do not change the mode of the temporary unless BLKmode and VOIDmode.
6905 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
6907         PR rtl-optimization/85423
6908         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
6909         dependencies to debug insns when the previous insn is non-debug.
6911 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
6913         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
6914         enums into a single definition.
6915         (fls): Fix predicates and printing.
6916         (seti): Likewise.
6918 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
6920         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
6921         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
6922         and short u6 immediate.
6923         (check_if_valid_sleep_operand): Remove.
6924         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
6926 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6928         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
6929         flag_always_save_lp condition.
6930         * config/nds32/nds32.opt (malways-save-lp): New option.
6932 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
6934         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
6935         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
6936         * config/nds32/nds32.h
6937         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
6938         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
6940 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
6942         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
6943         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
6945 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
6946             Chung-Ju Wu  <jasonwucj@gmail.com>
6948         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
6949         Declare.
6950         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
6951         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
6953 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6955         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
6957 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6959         * config/nds32/nds32-protos.h (nds32_data_alignment,
6960         nds32_local_alignment): Declare.
6961         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
6962         nds32_local_alignment): New functions.
6963         (TARGET_CONSTANT_ALIGNMENT): Define.
6964         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
6966 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6968         * config/nds32/nds32.c
6969         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
6970         (TARGET_MODES_TIEABLE_P): Likewise.
6972 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
6974         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
6975         level Ofast and Og.
6977 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
6978             Chung-Ju Wu  <jasonwucj@gmail.com>
6980         * config/nds32/constants.md (unspec_volatile_element): Add enum values
6981         for unaligned access.
6982         * config/nds32/nds32-intrinsic.c: Implementation of expanding
6983         unaligned access.
6984         * config/nds32/nds32-intrinsic.md: Likewise.
6985         * config/nds32/nds32_intrinsic.h: Likewise.
6986         * config/nds32/nds32.h (nds32_builtins): Likewise.
6987         * config/nds32/nds32.opt (munaligned-access): New option.
6988         * config/nds32/nds32.c (nds32_asm_file_start): Display
6989         flag_unaligned_access status.
6991 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
6993         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
6994         -mno-relax is present.
6995         * config/riscv/linux.h (LINK_SPEC): Ditto.
6997 2018-04-20  Martin Sebor  <msebor@redhat.com>
6999         PR c/85365
7000         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
7001         for null pointers.
7002         (gimple_fold_builtin_stxcpy_chk): Same.
7003         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
7005 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
7007         PR target/85456
7008         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
7009         __powikf2 when long double is IEEE 128-bit.
7011 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
7013         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
7014         step to make sure stack always aligned.
7016 2018-04-20  Carl Love  <cel@us.ibm.com>
7018         PR target/83402
7019         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
7020         size check for arg0.
7022 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
7023             Tom de Vries  <tom@codesourcery.com>
7025         PR target/85445
7026         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
7027         Emit insns for calls too.
7028         (nvptx_find_par): Always look for worker-level predecessor insn.
7029         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
7030         calls.
7031         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
7032         (nvptx_process_pars): Propagate frames for calls.
7034 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
7036         PR target/85469
7037         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
7038         Removed.
7039         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
7040         (ix86_handle_option): Don't handle OPT_mibt.
7041         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
7042         __SHSTK__.
7043         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
7044         has_ibt and ibt.
7045         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
7046         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
7047         (ix86_target_macros): Define __CET__ with flag_cf_protection
7048         for -fcf-protection.
7049         * config/i386/i386.c (isa2_opts): Remove -mibt.
7050         * config/i386/i386.h (TARGET_IBT): Removed.
7051         (TARGET_IBT_P): Likewise.
7052         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
7053         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
7054         * config/i386/i386.opt (mcet): Update help message.
7055         (mshstk): Likewise.
7056         (mibt): Removed.
7057         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
7058         -mcet as an alias for -mshstk.
7060 2018-04-20  Richard Biener <rguenther@suse.de>
7062         PR middle-end/85475
7063         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
7064         complexity by forcing a single use of the multiply operand.
7066 2018-04-20  Martin Jambor  <mjambor@suse.cz>
7068         ipa/85449
7069         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
7070         recursion dependency to only apply to non-clones.
7072 2018-04-20  Martin Jambor  <mjambor@suse.cz>
7074         ipa/85447
7075         * ipa-cp.c (create_specialized_node): Check that clones of
7076         self-recursive edges exist during IPA-CP.
7078 2018-04-19  Toon Moene  <toon@moene.org>
7080         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
7081         by -O3.
7083 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
7085         PR tree-optimization/85467
7086         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
7087         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
7088         VECTOR_CST element to type.
7090 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
7092         PR target/85397
7093         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
7094         * config/i386/i386.md (builtin_setjmp_setup): Removed.
7095         (builtin_longjmp): Likewise.
7096         (save_stack_nonlocal): New pattern.
7097         (restore_stack_nonlocal): Likewise.
7099 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
7101         PR target/85404
7102         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
7103         Replace ASM_OUTPUT_LABEL with fprintf.
7105 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
7107         PR target/85417
7108         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
7109         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
7110         * config/i386/i386-c.c (ix86_target_macros_internal): Also
7111         define __IBT__ and __SHSTK__ for -fcf-protection.
7112         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
7113         TARGET_IBT.
7114         (ix86_trampoline_init): Likewise.
7115         (x86_output_mi_thunk): Likewise.
7116         (ix86_notrack_prefixed_insn_p): Likewise.
7117         (ix86_option_override_internal): Don't disallow -fcf-protection.
7118         * config/i386/i386.md (rdssp<mode>): Also enable for
7119         -fcf-protection.
7120         (incssp<mode>): Likewise.
7121         (nop_endbr): Likewise.
7122         * config/i386/i386.opt (mcet): Change help message to built-in
7123         functions only.
7124         (mibt): Likewise.
7125         (mshstk): Likewise.
7126         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
7127         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
7128         enable CET built-in functions.
7130 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
7132         * common/config/i386/i386-common.c
7133         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
7134         OPTION_MASK_ISA_MOVDIRI_UNSET,
7135         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
7136         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
7137         * config.gcc (movdirintrin.h): New header.
7138         * config/i386/cpuid.h (bit_MOVDIRI,
7139         bit_MOVDIR64B): New bits.
7140         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
7141         and -mmvodir64b.
7142         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
7143         (VOID, PVOID, PCVOID)): New function types.
7144         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
7145         __builtin_ia32_directstoreu_u64,
7146         __builtin_ia32_movdir64b): New builtins.
7147         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
7148         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
7149         and -mmovdiri.
7150         (ix86_valid_target_attribute_inner_p): Ditto.
7151         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
7152         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
7153         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
7154         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
7155         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
7156         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
7157         (movdiri<mode>, movdir64b_<mode>): New.
7158         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
7159         * config/i386/immintrin.h: Include movdirintrin.h.
7160         * config/i386/movdirintrin.h: New file.
7161         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
7163 2018-04-19  Richard Biener  <rguenther@suse.de>
7165         PR middle-end/85455
7166         * cfg.c (clear_bb_flags): When loop state says we have
7167         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
7169 2018-04-19  Richard Biener  <rguenther@suse.de>
7171         PR tree-optimization/84737
7172         * tree-vect-data-refs.c (vect_copy_ref_info): New function
7173         copying restrict info.
7174         (vect_setup_realignment): Use it.
7175         * tree-vectorizer.h (vect_copy_ref_info): Declare.
7176         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
7177         the first DR to all generated stores.
7178         (vectorizable_load): Likewise for loads.
7180 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
7182         PR tree-optimization/85446
7183         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
7184         the integral and pointer types to have the same precision.
7186         * doc/install.texi: Document --disable-cet being the default and
7187         --enable-cet=auto.
7189 2018-04-18  Martin Liska  <mliska@suse.cz>
7191         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
7192         style.
7194 2018-04-18  Martin Liska  <mliska@suse.cz>
7196         Revert
7197         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
7199         PR ipa/83983
7200         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
7201         arguments if they are comparable.
7203 2018-04-18  Martin Liska  <mliska@suse.cz>
7205         Revert
7206         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
7208         PR lto/84805
7209         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
7210         incomplete types.
7212 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
7214         PR target/85388
7215         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
7216         ENDBR after calling __morestack.
7218 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
7220         PR jit/85384
7221         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
7222         by using gcc_base_ver to generate a gcc_driver_version, and use
7223         it when generating GCC_DRIVER_NAME.
7224         * configure: Regenerate.
7226 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
7228         PR target/81084
7229         * config.gcc: Obsolete powerpc*-*-*spe*.
7231 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
7233         PR debug/84637
7234         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
7235         (stabstr_D): Change type of unum from unsigned int to
7236         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
7237         type.
7239 2018-04-17  Jim Wilson  <jimw@sifive.com>
7241         PR 84856
7242         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
7243         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
7244         Set arg_pointer_offset after using pretend_args_size.
7246 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
7248         PR rtl-optimization/85431
7249         * dse.c (record_store): Ignore zero width stores.
7251         PR sanitizer/85230
7252         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
7253         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
7254         __builtin_stack_restore rather than after it.
7255         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
7256         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
7257         argument instead of virtual_dynamic_stack_rtx.
7259 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7261         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
7262         New prototype.
7263         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
7264         Add note to error message to explain internal mapping of overloaded
7265         built-in function name to non-overloaded built-in function name.
7266         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
7267         function.
7269 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
7271         PR target/85424
7272         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
7273         where the inputs overlap with the output.
7275 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
7277         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
7278         (=v, v) alternative and explicit "memory" attribute.
7279         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
7280         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
7281         attributes.
7282         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
7283         "sselog1" type instead of "sselog".
7284         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
7285         "sselog".  Remove explicit "memory" attribute.
7286         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
7287         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
7288         attributes.
7289         (vec_extract_hi_v32hi): Merge all alternatives into one, use
7290         "sselog1" type instead of "sselog".  Remove explicit "memory"
7291         attribute.
7292         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
7293         use "sselog1" type instead of "sselog".  Remove explicit "memory"
7294         attribute.
7295         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
7296         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
7297         attributes.
7298         (vec_extract_hi_v64qi): Merge all alternatives into one, use
7299         "sselog1" type instead of "sselog".  Remove explicit "memory"
7300         attribute.
7301         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
7302         use "sselog1" type instead of "sselog".  Remove explicit "memory"
7303         attribute.
7305         PR target/85430
7306         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
7308         PR middle-end/85414
7309         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
7310         on a SUBREG.
7312 2018-04-17  Martin Jambor  <mjambor@suse.cz>
7314         PR ipa/85421
7315         * ipa-cp.c (create_specialized_node): Call
7316         expand_all_artificial_thunks if necessary.
7318 2018-04-17  Martin Liska  <mliska@suse.cz>
7320         PR lto/85405
7321         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
7322         in message, remote space in between '_G' and '('.
7324 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
7326         PR target/85281
7327         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
7328         avx512f_vmcmp<mode>3<round_saeonly_name>,
7329         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
7330         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
7331         avx512f_rndscale<mode><round_saeonly_name>,
7332         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
7333         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
7334         Use %<iptr>2 instead of %2 for -masm=intel.
7335         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
7336         avx512f_vcvttss2usi<round_saeonly_name>,
7337         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
7338         -masm=intel.
7339         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
7340         avx512f_vcvttsd2usi<round_saeonly_name>,
7341         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
7342         Use %q1 instead of %1 for -masm=intel.
7343         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
7344         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
7345         of %3 for -masm=intel.
7346         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
7347         -masm=intel.
7348         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
7349         -masm=intel.
7350         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
7351         -masm=intel.
7352         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
7353         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
7354         %g1.
7355         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
7356         -masm=intel.
7357         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
7358         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
7359         %g1 and one with %0 and %1.
7360         (avx512er_vmrcp28<mode><round_saeonly_name>,
7361         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
7362         %1 for -masm=intel.
7363         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
7364         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
7365         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
7366         of %0 and %{%4%} for -masm=intel.
7367         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
7368         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
7369         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
7370         order of %0 and %{%5%}%{z%} for -masm=intel.
7372 2018-04-17  Jan Hubicka  <jh@suse.cz>
7374         PR lto/85405
7375         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
7377 2018-04-17  Martin Liska  <mliska@suse.cz>
7379         PR ipa/85329
7380         * multiple_target.c (create_dispatcher_calls): Set apostrophes
7381         for target_clone error message.  Make default implementation
7382         clone to be a local declaration.
7383         (separate_attrs): Add new argument and check for an empty
7384         string.
7385         (expand_target_clones): Handle it.
7386         (ipa_target_clone): Make redirection just for target_clones
7387         functions.
7389 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
7390             Tom de Vries  <tom@codesourcery.com>
7392         PR middle-end/84955
7393         * omp-expand.c (expand_oacc_for): Add dummy false branch for
7394         tiled basic blocks without omp continue statements.
7396 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
7398         PR target/83660
7399         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
7400         vec_extract expression as having side effects to make sure it gets
7401         a cleanup point.
7403 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
7405         PR target/85403
7406         * config/i386/i386.c (get_builtin_code_for_version): Check
7407         error_mark_node.
7409 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
7411         PR target/84331
7412         * gcc/config.gcc: Support "skylake".
7413         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
7414         PROCESSOR_SKYLAKE.
7415         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
7416         (processor_target_table): Add "skylake".
7417         (ix86_option_override_internal): Add "skylake".
7418         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
7419         PROCESSOR_CANNONLAKE.
7420         (get_builtin_code_for_version): Fix priority for
7421         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
7422         PROCESSOR_SKYLAKE-AVX512.
7423         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
7424         (processor_type): Add PROCESSOR_SKYLAKE.
7426 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
7427             Jason Merrill  <jason@redhat.com>
7429         PR c++/85112
7430         * convert.c (convert_to_integer_1): Use direct recursion for
7431         enumeral types and types with a precision less than the number
7432         of bits in their mode.
7434 2018-04-16  Julia Koval  <julia.koval@intel.com>
7436         PR target/84413
7437         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
7438         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
7440 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
7442         PR target/85293
7443         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
7444         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
7445         and -mno-direct-move.
7447 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
7449         PR target/83402
7450         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
7451         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
7452         Ensure negative shifts result in {0}.
7454 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
7456         PR rtl-optimization/79916
7457         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
7458         regs (if any) to define how to gnerate SD moves when LRA is in
7459         progress.
7461 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
7463         PR rtl-optimization/85393
7464         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
7465         * except.c (expand_dw2_landing_pad_for_region): Make static.
7466         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
7467         a label and unconditional jump to old_bb, rather than
7468         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
7469         basic block.
7471         PR rtl-optimization/85376
7472         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
7473         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
7474         instead of a specific value.
7476 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
7477             Bin Cheng  <bin.cheng@arm.com>
7479         PR tree-optimization/82965
7480         PR tree-optimization/83991
7481         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
7482         by_profile_only parameter.
7483         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
7484         information if the loop was predicted to iterate too many times.
7485         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
7487 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
7489         PR lto/71991
7490         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
7491         always inline.
7493 2018-04-13  Martin Liska  <mliska@suse.cz>
7494             Jakub Jelinek  <jakub@redhat.com>
7496         PR middle-end/81657
7497         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
7498         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
7499         * builtins.c (expand_builtin_memory_copy_args): Use
7500         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
7501         handle dest_addr == pc_rtx.
7503 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
7505         PR target/85291
7506         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
7507         asked to not generate direct moves.
7508         (fix_trunc<mode>si2_stfiwx): Similar.
7509         (fix_trunc<mode>si2_internal): Similar.
7511 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7513         PR debug/83157
7514         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
7515         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
7516         lookup if dest in some wider mode is known to be const0_rtx and
7517         if so, record permanent equivalence for it to be ZERO_EXTEND of
7518         the narrower mode destination.
7520 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
7522         * lto-streamer-out.c (output_function): Revert 259346.
7523         * omp-expand.c (expand_oacc_for): Likewise.
7525 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
7527         PR rtl-optimization/85354
7528         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
7529         * sel-sched.c (sel_global_init): ... here.
7531 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
7533         PR target/85238
7534         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
7535         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
7536         mode for PE-COFF targets.
7537         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
7538         (i386_pe_asm_lto_end): Likewise.
7539         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
7540         (TARGET_ASM_LTO_END): Likewise.
7541         * config/i386/winnt.c (saved_debug_info_level): New static variable.
7542         (i386_pe_asm_lto_start): New function.
7543         (i386_pe_asm_lto_end): Likewise.
7545 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
7546             Richard Biener  <rguenther@suse.de>
7548         PR middle-end/84955
7549         * lto-streamer-out.c (output_function): Fix CFG loop state before
7550         streaming out.
7551         * omp-expand.c (expand_oacc_for): Handle calls to internal
7552         functions like regular functions.
7554 2018-04-12  Richard Biener  <rguenther@suse.de>
7556         PR lto/85371
7557         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
7558         for the early LTO debug to properly generate references to it
7559         during DIE emission.  Do not re-use that for the skeleton for
7560         split-dwarf.
7561         (dwarf2out_early_finish): Likewise.
7563 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7565         PR target/85328
7566         * config/i386/sse.md
7567         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
7568         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
7569         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
7570         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
7571         and output is a reg, avoid creating invalid lowpart subreg, but
7572         instead split into a 512-bit move.  Don't split if not AVX512VL,
7573         input is xmm16+ reg and output is a mem.
7574         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
7575         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
7576         xmm16+ reg and output is a mem.
7578 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7580         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
7581         also for flag_dwarf2_cfi_asm.
7583 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
7585         PR rtl-optimization/85342
7586         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
7587         a bool scalar var inside of the loop instead.  Don't try to update
7588         recog_data.operand after failed apply_change_group.
7590 2018-04-12  Tom de Vries  <tom@codesourcery.com>
7592         PR target/85296
7593         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
7594         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
7595         array with flexible array member as array without given dimension.
7596         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
7597         argument for undefined param to true.
7599 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
7601         PR target/85321
7602         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
7603         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
7604         from PowerPC section.
7605         * config/rs6000/sysv4.opt (mcall-): Improve help text.
7606         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
7607         help text that is too long.
7608         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
7609         help text that is too long.
7610         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
7611         help text that is too long.
7613 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
7615         * config/alpha/alpha.md (stack_probe_internal): Rename
7616         from "probe_stack".  Update all callers.
7618 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7620         PR rtl-optimization/84566
7621         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
7622         sched_macro_fuse_insns.
7624 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7626         PR target/84301
7627         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
7628         (compute_block_dependences): ... from here.
7630 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7632         PR tree-optimization/85331
7633         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
7634         from int to HOST_WIDE_INT.
7636 2018-04-11  Martin Jambor  <mjambor@suse.cz>
7638         PR ipa/84149
7639         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
7640         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
7641         not the same as the source val.
7642         (cgraph_edge_brings_value_p): New parameter.
7643         (gather_edges_for_value): Pass destination value to
7644         cgraph_edge_brings_value_p.
7645         (perhaps_add_new_callers): Likewise.
7646         (get_info_about_necessary_edges): Likewise and exclude values brought
7647         only by self-recursive edges.
7648         (create_specialized_node): Redirect only clones of self-calling edges.
7649         (+self_recursive_pass_through_p): New function.
7650         (find_more_scalar_values_for_callers_subset): Use it.
7651         (find_aggregate_values_for_callers_subset): Likewise.
7652         (known_aggs_to_agg_replacement_list): Removed.
7653         (decide_whether_version_node): Re-calculate known constants for all
7654         remaining context clones.
7656 2018-04-11  Richard Biener  <rguenther@suse.de>
7658         PR lto/85339
7659         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
7660         from early DWARF output.
7661         (dwarf2out_early_finish): Output line info unconditionally into
7662         early DWARF and add reference to it.
7664 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7666         PR target/85281
7667         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
7668         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
7669         other than V2DFmode using iptr mode attribute.
7670         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
7672 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
7674         PR rtl-optimization/84659
7675         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
7677 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
7679         PR debug/85302
7680         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
7681         SIZEP is NULL.
7682         (output_loc_list): Pass address of a dummy size variable even in the
7683         locview handling loop.
7684         (index_location_lists): Add comment on why skip_loc_list_entry can't
7685         call size_of_locs.
7687 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7689         PR target/85261
7690         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
7691         into register.
7693 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
7695         PR target/85321
7696         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
7697         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
7698         and -mstring-compare-inline-limit.
7700 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7702         PR target/85287
7703         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
7704         for stack clash protection in a register whenever we need it to be in
7705         a register.
7707 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7709         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
7710         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
7712 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
7714         PR target/85321
7715         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
7716         the help text.
7717         (mlong-double-): Ditto.
7718         * config/rs6000/sysv4.opt (msdata=): Ditto.
7719         (mtls-size=): Ditto.
7721 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7723         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
7724         erroneous entries for
7725         "vector int vec_ldl (int, long int *)", and
7726         "vector unsigned int vec_ldl (int, unsigned long int *)".
7727         Add comments and entries for
7728         "vector bool char vec_ldl (int, bool char *)",
7729         "vector bool short vec_ldl (int, bool short *)",
7730         "vector bool int vec_ldl (int, bool int *)",
7731         "vector bool long long vec_ldl (int, bool long long *)",
7732         "vector pixel vec_ldl (int, pixel *)",
7733         "vector long long vec_ldl (int, long long *)",
7734         "vector unsigned long long vec_ldl (int, unsigned long long *)".
7735         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
7736         type tree bool_long_long_type_node and correct definition of
7737         bool_V2DI_type_node to make reference to this new type tree.
7738         (rs6000_mangle_type): Replace erroneous reference to
7739         bool_long_type_node with bool_long_long_type_node.
7740         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
7741         comments to emphasize sign distinctions for char and int types and
7742         replace RS6000_BTI_bool_long constant with
7743         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
7744         use of RS6000_BTI_pixel.
7745         (bool_long_type_node): Remove this macro definition.
7746         (bool_long_long_type_node): New macro definition
7748 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
7750         PR rtl-optimization/85300
7751         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
7752         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
7753         simplify_unary_operation fails.
7755 2018-04-10  Martin Liska  <mliska@suse.cz>
7757         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
7758         cgraph_edge and ipa_ref.
7760 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
7762         PR target/85177
7763         PR target/85255
7764         * config/i386/sse.md
7765         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
7766         computation of the VEC_MERGE selector from mask.
7767         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
7768         Fix decoding of the VEC_MERGE selector into mask.
7770 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
7772         PR tree-optimization/85286
7773         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
7775 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
7777         * final.c (final_1): Set insn_last_address as well as
7778         insn_current_address.
7780 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7782         PR target/85173
7783         * explow.c (emit_stack_probe): Call validize_mem on memory location
7784         before passing it to gen_probe_stack.  Create address operand and
7785         legitimize it for the probe_stack_address case.
7787 2018-04-09  Jan Hubicka  <jh@suse.cz>
7789         PR lto/85078
7790         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
7791         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
7792         * tree.c (free_lang_data_in_type): Fix handling of binfos;
7793         walk basetypes.
7794         (free_lang_data): Rebuild type inheritance graph.
7796 2018-04-09  Martin Sebor  <msebor@redhat.com>
7798         * invoke.texi (-finline-small-functions): Mention other optimization
7799         options.
7800         (-findirect-inlining, -fpartial-inlining): Same.
7801         (-finline-functions-called-once): Same.
7802         (-freorder-blocks-and-partition): Same.
7804 2018-04-09  Jan Hubicka  <jh@suse.cz>
7806         PR rtl/84058
7807         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
7808         jumps; choose last target that matches the criteria (i.e.
7809         no partition changes for non-crossing jumps).
7810         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
7811         support for redirecting crossing jumps to non-crossing.
7813 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
7815         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
7816         also for naked functions.
7818 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
7820         * config/arc/arc.md (add_shift): New pattern.
7821         (add_shift2): Likewise.
7822         (sub_shift): Likewise.
7823         (sub_shift_cmp0_noout): Likewise.
7824         (compare_si_ashiftsi): Likewise.
7825         (xbfu_cmp0_noout): New combine pattern.
7826         (xbfu_cmp0"): Likewise.
7827         (movsi_set_cc_insn): Place the predicable variant first.
7828         (commutative_binary_cmp0_noout): Remove clobber.
7829         (commutative_binary_cmp0): New pattern.
7830         (noncommutative_binary_cmp0): Likewise.
7831         (noncommutative_binary_cmp0_noout): Likewise.
7832         (noncommutative_binary_comparison_result_used): Removed.
7833         (rsub_cmp0): New pattern.
7834         (rsub_cmp0_noout): Likewise.
7835         (extzvsi): Changed, keep only meaningful variants.
7836         (SQH, SEZ): New iterators.
7837         (SQH_postfix): New mode attribute.
7838         (SEZ_prefix): New code attribute.
7839         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
7840         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
7841         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
7842         of numerical value.
7843         (noncommutative_operator): Check the availability of barrel
7844         shifter option.
7846 2018-04-09  Richard Biener  <rguenther@suse.de>
7848         PR tree-optimization/85284
7849         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
7850         Only use the niter constraining form of simple_iv when the exit
7851         is always executed.
7853 2018-04-09  Tom de Vries  <tom@codesourcery.com>
7855         PR target/84041
7856         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7857         (define_expand "*memory_barrier"): New define_expand.
7858         (define_insn "memory_barrier"): New insn.
7860 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7862         PR rtl-optimization/80463
7863         PR rtl-optimization/83972
7864         PR rtl-optimization/83480
7866         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
7867         correct producer for the insn.
7868         (tidy_control_flow): Fixup seqnos in case of debug insns.
7870 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7872         PR rtl-optimization/83913
7874         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
7875         different sched-times when merging exprs.
7877 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7879         PR rtl-optimization/83962
7881         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
7882         tidy_fallthru_edge and tidy_control_flow.
7884 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
7886         PR rtl-optimization/83530
7888         * sel-sched.c (force_next_insn): New global variable.
7889         (remove_insn_for_debug): When force_next_insn is true, also leave only
7890         next insn in the ready list.
7891         (sel_sched_region): When the region wasn't scheduled, make another pass
7892         over it with force_next_insn set to 1.
7894 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
7896         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
7897         into tm_file.
7898         * config/nds32/constants.md (unspec_volatile_element): Add enum values
7899         for interrupt control.
7900         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
7901         functions for interrupt control.
7902         * config/nds32/nds32-intrinsic.md: Likewise.
7903         * config/nds32/nds32_intrinsic.h: Likewise.
7904         * config/nds32/nds32.h (nds32_builtins): Likewise.
7906 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
7908         * config/nds32/nds32.c (nds32_init_machine_status,
7909         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
7910         strict_aligned_p field.
7911         (nds32_expand_to_rtl_hook): New function.
7912         (TARGET_EXPAND_TO_RTL_HOOK): Define.
7913         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
7915 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7916             Chung-Ju Wu  <jasonwucj@gmail.com>
7918         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
7919         * config/nds32/nds32-n7.md: New file.
7920         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
7921         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
7922         pipeline.
7923         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
7924         * config/nds32/nds32.md (pipeline_model): Add n7.
7925         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
7926         * config/nds32/pipelines.md: Include n7 settings.
7928 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7929             Chung-Ju Wu  <jasonwucj@gmail.com>
7931         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
7932         * config/nds32/nds32-e8.md: New file.
7933         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
7934         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
7935         pipeline.
7936         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
7937         * config/nds32/nds32.md (pipeline_model): Add e8.
7938         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
7939         * config/nds32/pipelines.md: Include e8 settings.
7941 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7942             Chung-Ju Wu  <jasonwucj@gmail.com>
7944         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
7945         * config/nds32/nds32-n8.md: New file.
7946         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
7947         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
7948         pipeline.
7949         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
7950         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
7951         * config/nds32/nds32.md (pipeline_model): Add n8.
7952         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
7953         * config/nds32/pipelines.md: Include n8 settings.
7955 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
7956             Chung-Ju Wu  <jasonwucj@gmail.com>
7958         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
7959         * config/nds32/nds32-n9-2r1w.md: New file.
7960         * config/nds32/nds32-n9-3r2w.md: New file.
7961         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
7962         nds32_register_ports): New or modify for cpu n9.
7963         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
7964         pipeline.
7965         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
7966         * config/nds32/nds32-utils.c: New file.
7967         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
7968         TARGET_MUL_SLOW): Define.
7969         * config/nds32/nds32.md (pipeline_model): New attribute.
7970         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
7971         New options that support cpu n9.
7972         * config/nds32/pipelines.md: Include n9 settings.
7973         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
7975 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
7977         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
7978         information if necessary.
7979         (output_cond_branch_compare_zero): Likewise.
7980         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
7981         (nds32_target_alignment): Refine for alignment.
7982         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
7983         (FUNCTION_BOUNDARY): Modify.
7984         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
7985         align case.
7986         * config/nds32/nds32.opt (malways-align, malign-functions): New.
7988 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
7990         * config/nds32/constants.md (unspec_volatile_element): Add values for
7991         TLB operation and data prefetch.
7992         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
7993         functions for TLB operation and data prefetch.
7994         * config/nds32/nds32-intrinsic.md: Likewise.
7995         * config/nds32/nds32_intrinsic.h: Likewise.
7996         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
7997         (nds32_print_operand): Likewise.
7998         * config/nds32/nds32.h (nds32_builtins): Likewise.
8000 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
8001         Andrew Pinski <pinsika@gcc.gnu.org>
8003         PR middle-end/82976
8004         * match.pd: Use constant_boolean_node of correct type instead of
8005         boolean_true_node or boolean_false_node for simplifying
8006         pointer comparisons to zero.
8008 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
8010         PR tree-optimization/80021
8011         * tree.c (verify_type_variant): Make error call in verify_variant_match
8012         translatable and remove final full stop.
8014 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
8016         * config/nds32/constants.md (unspec_volatile_element): Add
8017         UNSPEC_VOLATILE_EH_RETURN.
8018         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
8019         nds32_output_stack_pop): Support dwarf exception handling process.
8020         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
8021         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
8022         exception handling process.
8023         (nds32_compute_stack_frame): Likewise.
8024         (nds32_return_addr_rtx): Likewise.
8025         (nds32_initial_elimination_offset): Likewise.
8026         (nds32_expand_prologue): Likewise.
8027         (nds32_expand_epilogue): Likewise.
8028         (nds32_dynamic_chain_address): New function.
8029         * config/nds32/nds32.h (machine_function): Add fields for dwarf
8030         exception handling.
8031         (DYNAMIC_CHAIN_ADDRESS): Define.
8032         (EH_RETURN_DATA_REGNO): Define.
8033         (EH_RETURN_STACKADJ_RTX): Define.
8034         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
8035         patterns for dwarf exception handling.
8037 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
8039         * config/nds32/nds32.h: Clean up obsolete macros.
8041 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8043         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8044         Add enum values for particular instructions.
8045         * config/nds32/nds32-intrinsic.c: Implementation of expanding
8046         particular intrinsic functions.
8047         * config/nds32/nds32-intrinsic.md: Likewise.
8048         * config/nds32/nds32_intrinsic.h: Likewise.
8049         * config/nds32/nds32.h (nds32_builtins): Likewise.
8050         * config/nds32/nds32.md (type): Add pbsad and pbsada.
8051         (btst, ave): New patterns for particular instructions.
8053 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8055         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
8056         Add enum values for atomic load/store and memory sync.
8057         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
8058         and memory sync.
8059         * config/nds32/nds32-intrinsic.md: Likewise.
8060         * config/nds32/nds32_intrinsic.h: Likewise.
8061         * config/nds32/nds32.h (nds32_builtins): Likewise.
8063 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
8065         PR tree-optimization/85257
8066         * fold-const.c (native_encode_vector): If not all elts could fit
8067         and off is -1, return 0 rather than offset.
8068         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
8069         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
8070         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
8071         adjust buffer in native_interpret_expr call.
8073 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8075         * config/nds32/constants.md (unspec_volatile_element): Add cache
8076         control enum values.
8077         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
8078         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
8079         * config/nds32/nds32.c (nds32_cctl_names): New.
8080         (nds32_print_operand): Handle cache control register names.
8081         * config/nds32/nds32.h (nds32_builtins): New enum values.
8082         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
8083         macros.
8084         * config/nds32/nds32.md (type): Add mmu.
8085         * config/nds32/pipelines.md (simple_insn): Add mmu.
8087 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
8089         * config/nds32/nds32.md (type): Remove call.
8090         * config/nds32/pipelines.md (simple_insn): Likewise.
8092 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8094         * config/nds32/constants.md (unspec_volatile_element): Add
8095         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
8096         UNSPEC_VOLATILE_FMFCFG.
8097         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
8098         description for fmfcfg and fmfcsr.
8099         (bdesc_1arg): Add fmtcsr.
8100         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
8101         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
8102         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
8103         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
8104         unspec_fmfcfg): New patterns.
8105         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
8106         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
8107         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
8108         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
8109         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
8110         __nds32__fmfcfg): Define.
8112 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
8114         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
8115         intrinsic register names.
8116         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
8117         intrinsic register enum values and macros.
8119 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
8121         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
8122         for load/store addressing form.
8123         (nds32_print_operand_address): Likewise.
8125 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
8127         PR target/85196
8128         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
8129         based on LABEL_REF.  Remove useless assertion.
8130         (pic_address_needs_scratch): Fix formatting.
8131         (sparc_legitimize_pic_address): Minor tweaks.
8132         (sparc_delegitimize_address): Adjust assertion accordingly.
8133         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
8134         into symbolic_operand.
8135         (movsi_high_pic_label_ref): Likewise.
8136         (movsi_lo_sum_pic_label_ref): Likewise.
8137         (movdi_pic_label_ref): Likewise.
8138         (movdi_high_pic_label_ref): Likewise.
8139         (movdi_lo_sum_pic_label_ref): Likewise.
8141 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
8143         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
8144         custom LIB_SPEC setup.
8146 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
8147             Kito Cheng  <kito.cheng@gmail.com>
8149         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
8150         * config/riscv/freebsd.h: New.
8152 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
8154         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
8155         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
8156         file.
8158 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
8159             Kito Cheng  <kito.cheng@gmail.com>
8161         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
8162         nds32_output_call, nds32_symbol_binds_local_p): New functions.
8163         * config/nds32/nds32-protos.h (nds32_output_call,
8164         nds32_output_return): Declare.
8165         * config/nds32/nds32.md: Refine all the call and return patterns.
8167 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
8169         PR debug/85252
8170         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
8171         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
8173         PR rtl-optimization/84872
8174         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
8175         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
8176         EDGE_CROSSING edge.
8178 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
8180         * expr.c (copy_blkmode_to_reg): Revert 254862.
8181         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
8183 2018-04-06  Richard Biener  <rguenther@suse.de>
8185         PR middle-end/85244
8186         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
8187         after seeing a component reference with an adjacent field.  Treat
8188         refs to arrays at struct end of external decls similar to
8189         refs to unconstrained commons.
8191 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
8193         PR sanitizer/85213
8194         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
8195         look through SAVE_EXPRs with non-side-effects argument.  Adjust
8196         recursive calls.
8197         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
8198         save_p here.
8200 2018-04-06  Richard Biener  <rguenther@suse.de>
8202         PR middle-end/85180
8203         * alias.c (find_base_term): New wrapper around find_base_term
8204         unwinding CSELIB_VAL_PTR changes.
8205         (find_base_term): Do not restore CSELIB_VAL_PTR during the
8206         recursion.
8208 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
8210         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
8211         instructions.
8212         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
8213         constant definitions.
8214         ("nop"): lr 0,0 -> nopr r0
8215         ("nop_lr0", "nop_lr1"): New insn definitions.
8217 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
8219         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
8220         NDS32_V3PUSH_AVAILABLE_P macro.
8222 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
8223             Chung-Ju Wu  <jasonwucj@gmail.com>
8225         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
8226         (nds32*-*-*): Add float and fpu_config into supported_defaults.
8227         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
8228         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
8229         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
8230         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
8231         * config/nds32/constraints.md: New constraints and checking for hard
8232         float configuration.
8233         * config/nds32/iterators.md: New mode iterator and attribute for hard
8234         float configuration.
8235         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
8236         patterns.
8237         * config/nds32/nds32-fpu.md: New file.
8238         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
8239         deal with hard float code generation.
8240         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
8241         ARCH_V3S.
8242         (abi_type, float_reg_number): New enum type.
8243         * config/nds32/nds32-predicates.c: New predicates for hard float.
8244         * config/nds32/nds32-protos.h: Declare functions for hard float.
8245         * config/nds32/nds32.c: Implementation for hard float configuration.
8246         * config/nds32/nds32.h: Definitions for hard float configuration.
8247         * config/nds32/nds32.md: Include hard float machine description and
8248         modify patterns for hard float configuration.
8249         * config/nds32/nds32.opt: New options for hard float configuration.
8250         * config/nds32/predicates.md: New predicates for hard float
8251         configuration.
8253 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
8255         * common/config/nds32/nds32-common.c
8256         (nds32_option_optimization_table): Enable -mreleax-hint by default.
8258 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
8260         PR middle-end/85195
8261         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
8262         CONSTRUCTOR_ELT (ctor, ...)->value.
8264 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
8266         PR target/85193
8267         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
8269 2018-04-05  Tom de Vries  <tom@codesourcery.com>
8271         PR target/85204
8272         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
8273         cond jump.
8275 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
8276             Kito Cheng  <kito.cheng@gmail.com>
8278         * config/nds32/constraints.md (U33): Fine-tune checking condition.
8279         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
8280         * config/nds32/nds32.h (nds32_16bit_address_type): Add
8281         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
8283 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
8284             Kito Cheng  <kito.cheng@gmail.com>
8286         * config/nds32/constraints.md (Ufe): New memory constraint.
8287         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
8288         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
8289         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
8290         operands.
8291         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
8292         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
8294 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8296         * config/nds32/nds32.md: Use optimize_size in the condition for
8297         alu-shift instructions.
8299 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8301         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
8303 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8305         * config/nds32/nds32.md (negsi2): Refine pattern.
8307 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
8308             Chung-Ju Wu  <jasonwucj@gmail.com>
8310         * config/nds32/iterators.md (shift_rotate): New code iterator.
8311         (shift): New code attribute.
8312         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
8313         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
8314         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
8315         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
8316         bit-wise operations.
8317         (andsi3, *andsi3): Ditto.
8318         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
8319         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
8320         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
8321         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
8322         nds32_ior_operand, nds32_xor_operand): New predicates.
8324 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8326         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
8327         (addsi3, subsi3): ... this.
8329 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8331         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
8333 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8335         * config/nds32/nds32.md: Adjust indention.
8337 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
8339         * config/nds32/nds32.md (feature): New attribute.
8341 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
8343         * config/nds32/nds32.md (subtype): New attribute.
8345 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
8347         PR target/85203
8348         * config/arm/arm-builtins.c (arm_expand_builtin): Change
8349         expansion to perform a bitwise AND of the argument followed by a
8350         boolean negation of the result.
8352 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
8354         PR rtl-optimization/84878
8355         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
8356         the basic block.  Assert the use reference is not artificial and that
8357         it has an associated insn.
8359 2018-04-04  Michael Matz  <matz@suse.de>
8361         * builtins.c (compute_objsize): Pass correct operand
8362         to array_at_struct_end_p.
8364 2018-04-04  Richard Biener  <rguenther@suse.de>
8366         PR lto/85176
8367         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
8368         from contexts for DINFO_LEVEL_TERSE and below.
8370 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
8372         * config/nds32/nds32-doubleword.md (move_<mode>): Require
8373         resiter_operand condition.
8374         * config/nds32/nds32.md (*move<mode>): Ditto.
8376 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
8377             Monk Chiang  <sh.chiang04@gmail.com>
8379         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
8381 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
8383         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
8385 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
8386             Kito Cheng  <kito.cheng@gmail.com>
8388         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
8389         nds32_cond_code_str, output_cond_branch,
8390         output_cond_branch_compare_zero, nds32_expand_cbranch,
8391         nds32_expand_cstore, nds32_expand_movcc,
8392         nds32_output_cbranchsi4_equality_zero,
8393         nds32_output_cbranchsi4_equality_reg,
8394         nds32_output_cbranchsi4_equality_reg_or_const_int,
8395         nds32_output_cbranchsi4_greater_less_zero: New functions.
8396         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
8397         nds32_expand_cstore, nds32_expand_movcc,
8398         nds32_output_cbranchsi4_equality_zero,
8399         nds32_output_cbranchsi4_equality_reg,
8400         nds32_output_cbranchsi4_equality_reg_or_const_int,
8401         nds32_output_cbranchsi4_greater_less_zero): Declare.
8402         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
8403         nds32_rimm11s_operand): New predicates.
8404         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
8405         * config/nds32/nds32.md: Rewrite all the branch and conditional move
8406         patterns.
8408 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
8410         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
8411         * config/nds32/nds32.md: Ditto.
8412         * config/nds32/pipelines.md: Ditto.
8414 2018-04-04  Richard Biener  <rguenther@suse.de>
8416         PR tree-optimization/85168
8417         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
8418         propagating abnormals.
8420 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
8422         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
8424 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
8425             Kito Cheng  <kito.cheng@gmail.com>
8427         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
8428         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
8429         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
8430         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
8431         * config/nds32/nds32.md (sibcall_internal): New.
8432         (sibcall_register): Remove.
8433         (sibcall_immediate): Remove.
8434         (sibcall_value_internal): New.
8435         (sibcall_value_register): Remove.
8436         (sibcall_value_immediate): Remove.
8437         * config/nds32/predicates.md (nds32_general_register_operand): New.
8438         (nds32_call_address_operand): New.
8440 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
8442         PR rtl-optimization/85167
8443         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
8444         bb_defs if *split_p, instead preinitialize it to NULL.
8446         PR tree-optimization/85156
8447         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
8448         evaluating the argument multiple times.
8450 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
8452         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
8453         than vector.
8454         (_mm_cvtpd_ps): Likewise.
8455         (_mm_cvttpd_epi32): Likewise.
8456         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
8457         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
8458         vector, pixel, and bool following altivec.h include.
8460 2018-04-03  Martin Sebor  <msebor@redhat.com>
8462         * doc/extend.texi (Common Function Attributes): Clarify.
8463         (const attribute): Likewise.
8464         (pure attribute): Likewise.
8466 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
8468         PR target/85169
8469         * config/i386/i386.c (ix86_expand_vector_set): Use
8470         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
8472 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
8474         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
8475         instructions when changing rounding bits to preserve precision bits
8476         in the x87 control word.
8478 2018-04-03  Martin Liska  <mliska@suse.cz>
8480         PR tree-optimization/82491
8481         * rtl.h (strip_offset_and_add): Replace += suboffset with
8482         poly_uint64 () + suboffset.
8484 2018-03-29  Martin Liska  <mliska@suse.cz>
8485             Martin Jambor  <mjambor@suse.cz>
8487         PR ipa/84947
8488         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
8489         param_type is not an integral or pointer type.
8491 2018-04-03  Richard Biener  <rguenther@suse.de>
8493         * sese.h (recompute_all_dominators): Remove.
8495 2018-04-02  Martin Sebor  <msebor@redhat.com>
8497         * doc/invoke.texi (-Wrestrict): Fix typos.
8499 2018-04-02  Jim Wilson  <jimw@sifive.com>
8501         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
8502         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
8503         (<optab>di3, <optab>si3_extend): Likewise.
8504         (<optab>si3_mask, <optab>si3_mask_1): New.
8505         (<optab>di3_mask, <optab>di3_mask_1): New.
8506         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
8507         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
8508         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
8510 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
8512         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
8513         example.
8515 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
8517         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
8518         (nds32_canonicalize_comparison): New function.
8520 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8521             Kito Cheng  <kito.cheng@gmail.com>
8522             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
8524         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
8525         * config/nds32/constants.md (unspec_volatile_element): Add
8526         UNSPEC_VOLATILE_RELAX_GROUP.
8527         * config/nds32/nds32-relax-opt.c: New file.
8528         * config/nds32/nds32-predicates.c
8529         (nds32_symbol_load_store_p): New function.
8530         * config/nds32/nds32-protos.h
8531         (nds32_symbol_load_store_p): Declare function.
8532         (make_pass_nds32_relax_opt): Declare new rtl pass function.
8533         * config/nds32/nds32.c
8534         (nds32_register_pass): New function to register pass.
8535         (nds32_register_passes): New function to register passes.
8536         * config/nds32/nds32.md (relax_group): New pattern.
8537         * config/nds32/nds32.opt (mrelax-hint): New option.
8538         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
8540 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
8542         * config/nds32/t-nds32: Modify files dependency.
8544 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8546         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
8547         (PROFILE_HOOK): Define its implementation.
8549 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
8551         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
8552         type and 32-bit size.
8554 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
8556         PR middle-end/85090
8557         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
8558         (V_128_256): New mode iterator.
8559         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
8560         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
8561         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
8562         of V.
8563         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
8564         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
8566 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
8568         PR target/83315
8569         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
8570         NaN inputs correctly.
8572 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
8574         PR target/80546
8575         * config/rs6000/vsx.md (??r): New mode attribute.
8576         (*vsx_mov<mode>_64bit): Use it.
8577         (*vsx_mov<mode>_32bit): Likewise.
8579 2018-03-30  Martin Sebor  <msebor@redhat.com>
8581         PR tree-optimization/84818
8582         * builtins.c (check_access): Use warning_n.
8584 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
8586         PR target/83822
8587         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
8588         condition.
8589         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
8590         condition.
8592 2018-03-30  Julia Koval  <julia.koval@intel.com>
8594         PR target/84413
8595         * x86-tune.def (movx, partial_reg_dependency): Enable for
8596         m_SKYLAKE_AVX512.
8598 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
8600         PR inline-asm/84985
8601         * lra-constraints.c (process_alt_operands): Move setting
8602         this_alternative_matches below.
8604 2018-03-29  Martin Liska  <mliska@suse.cz>
8606         PR lto/84995.
8607         * doc/invoke.texi: Document how LTO works with debug info.
8608         Describe auto-load support of binutils.  Mention 'x86-64'
8609         as valid option value of -march option.
8611 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
8613         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
8615         PR c/85094
8616         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
8617         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
8618         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
8619         checking.
8621 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
8623         PR target/84912
8624         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
8625         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
8626         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
8627         for RS6000_BTM_POWERPC64.
8628         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
8629         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
8630         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
8631         definition.
8632         (DIVDE): Use it.
8633         (DIVDEU): Likewise.
8635 2018-03-28 Carl Love  <cel@us.ibm.com>
8637         Revert
8638         2017-09-27  Carl Love  <cel@us.ibm.com>
8640         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
8641         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
8642         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
8643         fctiw instruction.
8645 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8647         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
8648         instead of __vector bool.
8649         (_mm_max_pu8): Likewise.
8650         (_mm_min_pi16): Likewise.
8652 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
8654         PR target/84912
8655         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
8656         (DIVWEUO): Likewise.
8657         (DIVDEO): Likewise.
8658         (DIVDEUO): Likewise.
8659         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
8660         DIVWEUO and DIVDEUO.
8661         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
8662         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
8663         (div_extend): Likewise.
8664         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
8665         builtin function.
8666         (__builtin_divweuo): Likewise.
8667         (__builtin_divdeo): Likewise.
8668         (__builtin_divdeuo): Likewise.
8670 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
8672         PR target/85095
8673         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
8674         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
8676         PR tree-optimization/82004
8677         * gimple-match-head.c (optimize_pow_to_exp): New function.
8678         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
8679         Don't fold to exp if optimize_pow_to_exp is false.
8681 2018-03-28  Martin Liska  <mliska@suse.cz>
8683         PR other/84819
8684         * calls.c (initialize_argument_information): Fix trailing space.
8685         * common.opt: Fix typo and provide better explanation for
8686         -fsanitize-coverage option.
8687         * config/i386/i386.opt: Fix typo.
8689 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
8690             Martin Liska  <mliska@suse.cz>
8692         PR sanitizer/85081
8693         * gimplify.c (asan_poison_variable): Don't do the check for
8694         gimplify_omp_ctxp here.
8695         (gimplify_decl_expr): Do it here.
8696         (gimplify_target_expr): Likewise.
8698 2018-03-28  Martin Liska  <mliska@suse.cz>
8700         PR target/84988
8701         * config/i386/i386.c (ix86_function_arg_advance): Do not call
8702         chkp_type_bounds_count if MPX is not enabled.
8704 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
8706         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
8708 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
8710         PR target/84914
8711         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
8712         function to create the function decl for complex long double
8713         multiply and divide for -mabi=ieeelongdouble.
8714         (init_float128_ieee): Call it.
8716 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
8718         PR target/85044
8719         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
8720         -fcf-protection=branch -mibt.
8721         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
8723 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8725         PR target/81863
8726         * config/arm/arm.c (arm_valid_symbolic_address): Handle
8727         arm_word_relocations.
8729 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
8731         PR target/85056
8732         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
8733         extern array declarations.
8735 2018-03-27  Richard Biener  <rguenther@suse.de>
8737         PR middle-end/84067
8738         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
8739         explicit single_use checks.
8741 2018-03-27  Richard Biener  <rguenther@suse.de>
8743         PR tree-optimization/85082
8744         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
8745         Valueize the VUSE.
8747 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
8749         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
8750         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
8751         Turn on fasynchronous-unwind-tables and funwind-tables.
8753 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
8755         PR target/85073
8756         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
8757         (*bmi_blsr_<mode>_ccz): Ditto.
8759 2018-03-26  Tom de Vries  <tom@codesourcery.com>
8761         PR tree-optimization/85063
8762         * omp-general.c (offloading_function_p): New function.  Factor out
8763         of ...
8764         * omp-offload.c (pass_omp_target_link::gate): ... here.
8765         * omp-general.h (offloading_function_p): Declare.
8766         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
8767         with attribute omp declare target for offloading functions.
8769 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
8771         PR tree-optimization/84005
8772         * tree-data-ref.h (get_base_for_alignment): Declare.
8773         * tree-data-ref.c (get_base_for_alignment_1): New function.
8774         (get_base_for_alignment): Likewise.
8775         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
8776         get_base_for_alignment to find a suitable base object, instead
8777         of always using drb->base_address.
8779 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
8781         PR inline-asm/85022
8782         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
8783         known size by default.
8785 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
8787         PR inline-asm/85030
8788         * lra-constraints.c (process_alt_operands): Don't match BLKmode
8789         and non BLKmode operands.
8791 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8793         PR target/85026
8794         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
8795         Clean up attributes.
8797 2018-03-23  Richard Biener  <rguenther@suse.de>
8799         PR debug/85020
8800         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
8801         we are going to emit early debug for LTO.
8803 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
8805         PR inline-asm/85034
8806         * function.c (match_asm_constraints_1): Don't optimize if input
8807         doesn't satisfy general_operand predicate for output's mode.
8809         PR inline-asm/85022
8810         * alias.c (write_dependence_p): Don't require for x_canonicalized
8811         non-VOIDmode if x has VOIDmode.
8813         PR sanitizer/85029
8814         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
8815         just don't try to optimize it rather than assert it never happens.
8817 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8819         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
8820         macro expansions for definition of ST_INTERNAL_<mode> and
8821         LD_INTERNAL_<mode> builtins.
8822         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
8823         Remove prototype.
8824         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
8825         function.
8826         (altivec_expand_st_builtin): Likewise.
8827         (altivec_expand_builtin): Remove calls to deleted functions.
8828         (rs6000_address_for_altivec): Delete this function.
8829         * config/rs6000/vector.md: Remove expands for
8830         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
8832 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
8834         PR target/84826
8835         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
8836         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
8837         re-computing once computed.
8838         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
8839         (arm_init_machine_status): Initialize
8840         machine->static_chain_stack_bytes.
8842 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8844         PR target/84760
8845         * doc/extend.texi: Add four new prototypes for vec_ld.
8846         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
8847         definitions for more logical presentation.
8848         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
8849         entries for V1TI variants of __builtin_altivec_ld builtin.
8850         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
8851         handling of V1TI variant of LVX icode pattern.
8852         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
8853         (rs6000_gimple_fold_builtin): Likewise.
8854         (altivec_init_builtins): Add code to define
8855         __builtin_altivec_lvx_v1ti function.
8857 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
8859         PR inline-asm/84941
8860         * function.c (match_asm_constraints_1): Don't do the optimization
8861         if input isn't a REG, SUBREG, MEM or constant.
8863 2018-03-22  Tom de Vries  <tom@codesourcery.com>
8865         PR tree-optimization/84956
8866         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
8867         bb_has_abnormal_pred.
8869 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
8871         PR sanitizer/85018
8872         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
8873         DECL_INITIAL (decl) to decl at the end.
8874         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
8875         adjust the comment.
8877 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
8879         * doc/extend.texi (__builtin_tgmath): Document when complex
8880         integer types are treated as _Complex _Float64.
8882 2018-03-21  Tom de Vries  <tom@codesourcery.com>
8884         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
8886 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8888         PR tree-optimization/84960
8889         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
8890         if it is ENTRY block, move them into single succ of ENTRY in that case.
8892 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
8894         PR tree-optimization/84811
8895         * poly-int.h (poly_span_traits): Remove the T3 parameter and
8896         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
8897         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
8898         (known_subrange_p): Update accordingly.  Cast each value involved
8899         in the size comparison, rather than casting the result of the
8900         subtraction.
8902 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8904         PR tree-optimization/84982
8905         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
8906         by flipping the least significant bit rather than all bits from
8907         bitpos to bitpos + bitsize - 1.
8909 2018-03-21  Nathan Sidwell  <nathan@acm.org>
8911         * doc/extend.texi (Deprecated Features): Remove mention of
8912         long-deleted deprecations.
8914 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8916         PR jit/84288
8917         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
8918         * configure: Regenerate.
8920 2018-03-21  Tom de Vries  <tom@codesourcery.com>
8922         PR tree-optimization/83126
8923         * tree-parloops.c (num_phis): New function.
8924         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
8926 2018-03-21  Nathan Sidwell  <nathan@acm.org>
8928         * doc/extend.texi (Deprecated Features): Update deprecated flags,
8929         mention anon-struct/union members and trailing attributes.
8931 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
8933         PR tree-optimization/84969
8934         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
8935         builtin memset partitions if they set different rhs values.
8937 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
8939         PR rtl-optimization/84989
8940         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
8941         VEC_DUPLICATE with scalar result mode.
8943 2018-03-21  Martin Liska  <mliska@suse.cz>
8945         PR ipa/84963
8946         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
8947         not intended return statement.
8949 2018-03-21  Martin Liska  <mliska@suse.cz>
8951         PR target/84988
8952         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
8953         (chkp_find_bound_slots_1): Limit number of iterations.
8955 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
8957         PR target/84838
8958         * Minor grammar fixes for x86 options.
8960 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
8962         PR debug/84875
8963         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
8964         holding REG_CFA_RESTORE notes, instead turn them into a USE.
8966 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
8968         PR target/83789
8969         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
8970         (altivec_lvx_<mode>_1op): Likewise.
8971         (altivec_stvx_<mode>_2op): Likewise.
8972         (altivec_stvx_<mode>_1op): Likewise.
8973         (altivec_lvx_<VM2:mode>): New define_expand.
8974         (altivec_stvx_<VM2:mode>): Likewise.
8975         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
8976         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
8977         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
8978         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
8979         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
8980         (rs6000_gen_lvx): Likewise.
8981         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
8982         (altivec_expand_stv_builtin): Likewise.
8983         (altivec_expand_builtin): Likewise.
8984         * config/rs6000/vector.md: Likewise.
8986 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8988         PR target/82518
8989         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
8990         BYTES_BIG_ENDIAN.
8992 2018-03-20  Richard Biener  <rguenther@suse.de>
8994         PR target/84986
8995         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
8996         sign-conversions as zero, fall back to standard scalar_stmt
8997         cost for the rest.
8999 2018-03-20  Martin Liska  <mliska@suse.cz>
9001         PR ipa/84825
9002         * predict.c (rebuild_frequencies): Handle case when we have
9003         PROFILE_ABSENT, but flag_guess_branch_prob is false.
9005 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
9007         PR target/84990
9008         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
9009         flag_section_anchors.
9010         * varasm.c (use_blocks_for_decl_p): Remove hack for
9011         dw2_force_const_mem.
9013         PR target/84845
9014         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
9015         to ...
9016         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
9017         be created, use lowpart_subreg of operands[0] rather than operands[0]
9018         itself.
9019         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
9020         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
9021         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
9022         and n constraint instead of aarch64_shift_imm_di and Usd.
9023         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
9024         (*aarch64_<optab>_reg_minus<mode>3): ... this.
9026 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
9028         PR target/82989
9029         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
9030         to favor GPR over NEON registers.
9031         (<shift>di3_neon): Likewise.
9033 2018-03-20  Tom de Vries  <tom@codesourcery.com>
9035         PR target/84952
9036         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
9037         (nvptx_process_pars): Emit bar.sync asap and alap.
9039 2018-03-20  Tom de Vries  <tom@codesourcery.com>
9041         PR target/84954
9042         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
9043         seen_label if seen_label is already set.
9045 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
9047         PR target/84945
9048         * config/i386/i386.c (fold_builtin_cpu): For features above 31
9049         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
9050         Use 1U instead of 1.  Formatting fixes.
9052         PR c/84953
9053         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
9054         instead of TREE_TYPE (s1) for the return value.
9056 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
9058         PR tree-optimization/84946
9059         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
9060         bitsize + bitsize in poly_uint64 rather than poly_int64.
9062         PR sanitizer/78651
9063         * dwarf2asm.c: Include fold-const.c.
9064         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
9065         of decl rather than decl itself.
9067         PR rtl-optimization/84643
9068         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
9070 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
9072         PR sanitizer/78651
9073         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
9074         calling assemble_variable.
9076 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
9078         PR target/81647
9079         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
9080         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
9082 2018-03-19  Jim Wilson  <jimw@sifive.com>
9084         PR bootstrap/84856
9085         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
9086         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
9087         (riscv_first_stack_step): Likewise.
9088         (riscv_option_override): Use STACK_BOUNDARY instead of
9089         MIN_STACK_BOUNDARY.
9090         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
9091         MIN_STACK_BOUNDARY.
9092         (BIGGEST_ALIGNMENT): Set to 128.
9093         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
9094         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
9095         STACK_BOUNDARY.
9097 2018-03-19  Richard Biener  <rguenther@suse.de>
9099         PR tree-optimization/84933
9100         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
9101         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
9103 2018-03-19  Richard Biener  <rguenther@suse.de>
9105         PR tree-optimization/84859
9106         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
9107         (cond_if_else_store_replacement): Perform sinking operation on
9108         single-store BBs regardless of MAX_STORES_TO_SINK setting.
9109         Generalize what a BB with a single eligible store is.
9111 2018-03-19  Richard Biener  <rguenther@suse.de>
9113         PR tree-optimization/84929
9114         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
9115         chrec_is_positive against non-chrec arg.
9117 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
9119         PR target/84711
9120         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
9122 2018-03-18  Martin Liska  <mliska@suse.cz>
9124         PR rtl-optimization/84635
9125         * regrename.c (build_def_use): Use matches_mode only when
9126         matches >= 0.
9128 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
9130         PR tree-optimization/84913
9131         * tree-vect-loop.c (vectorizable_reduction): Don't try to
9132         vectorize chains of COND_EXPRs.
9134 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
9136         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
9138 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
9140         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
9142 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
9144         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
9146 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
9147             Kito Cheng  <kito.cheng@gmail.com>
9149         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
9150         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
9151         (nds32_adjust_reg_alloc_order): New function.
9152         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
9154 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
9156         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
9157         nds32_print_operand, nds32_print_operand_address): Use
9158         HOST_WIDE_INT_PRINT_DEC instead.
9160 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
9162         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
9164 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
9166         PR target/84902
9167         * config/i386/i386.c (initial_ix86_tune_features,
9168         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
9169         unsigned long long.
9170         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
9171         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
9172         rather than 1u << ix86_tune.  Formatting fix.
9173         (ix86_option_override_internal): Change ix86_arch_mask from
9174         unsigned int to unsigned HOST_WIDE_INT, initialize to
9175         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
9176         (ix86_function_specific_restore): Likewise.
9178 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
9180         PR target/84899
9181         * postreload.c (reload_combine_recognize_pattern): Perform
9182         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
9183         truncate_int_for_mode the result for the destination's mode.
9185         PR c/84909
9186         * hsa-gen.c (mem_type_for_type): Fix comment typo.
9187         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
9188         Likewise.
9189         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
9190         Likewise.
9192 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
9194         PR target/84876
9195         * lra-assigns.c (lra_split_hard_reg_for): Don't use
9196         regno_allocno_class_array and sorted_pseudos.
9197         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
9198         insns where regno is used.
9200 2018-03-16  Martin Liska  <mliska@suse.cz>
9202         PR ipa/84833
9203         * multiple_target.c (create_dispatcher_calls): Redirect
9204         reference in the symbol table.
9206 2018-03-16  Martin Liska  <mliska@suse.cz>
9208         PR ipa/84722
9209         * multiple_target.c (create_dispatcher_calls): Redirect also
9210         an alias.
9212 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
9214         PR c++/79937
9215         PR c++/82410
9216         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
9217         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
9218         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
9220 2018-03-16  Julia Koval  <julia.koval@intel.com>
9222         * doc/invoke.texi (Skylake Server): Add CLWB.
9223         Cannonlake): Remove CLWB.
9225 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
9227         PR tree-optimization/84841
9228         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
9229         1 << 3.
9230         (FLOAT_ONE_CONST_TYPE): Define.
9231         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
9232         (sort_by_operand_rank): Put entries with higher constant_type last
9233         rather than first to match comments.
9235 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
9237         * config/nios2/nios2.md (movsi_internal): Fix thinko in
9238         split predicate.
9240 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
9242         PR c++/79085
9243         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
9244         check and use address of target always.
9246 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
9248         PR target/84574
9249         * config/i386/i386.c (indirect_thunk_needed): Update comments.
9250         (indirect_thunk_bnd_needed): Likewise.
9251         (indirect_thunks_used): Likewise.
9252         (indirect_thunks_bnd_used): Likewise.
9253         (indirect_return_needed): New.
9254         (indirect_return_bnd_needed): Likewise.
9255         (output_indirect_thunk_function): Add a bool argument for
9256         function return.
9257         (output_indirect_thunk_function): Don't generate alias for
9258         function return thunk.
9259         (ix86_code_end): Call output_indirect_thunk_function to generate
9260         function return thunks.
9261         (ix86_output_function_return): Set indirect_return_bnd_needed
9262         and indirect_return_needed instead of indirect_thunk_bnd_needed
9263         and indirect_thunk_needed.
9265 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
9267         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
9268         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
9269         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
9271 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
9272             Paul Hua <paul.hua.gm@gmail.com>
9274         PR c/84852
9275         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
9277 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
9279         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
9280         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
9281         resp. SFmode cases.
9283 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
9285         PR target/84711
9286         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
9287         instead of GET_MODE_SIZE when comparing Units.
9289 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
9291         PR target/68256
9292         * varasm.c (hash_section): Return an unchangeble hash value
9293         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
9294         Return !aarch64_can_use_per_function_literal_pools_p ().
9296 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
9298         PR target/84860
9299         * optabs.c (emit_conditional_move): Pass address of cmode's copy
9300         rather than address of cmode as last argument to prepare_cmp_insn.
9302 2018-03-15  Julia Koval  <julia.koval@intel.com>
9304         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
9305         F_AVX512VNNI, F_AVX512BITALG): New.
9307 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
9309         PR target/83451
9310         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
9311         insn for floating-point loads and stores.
9313 2018-03-14  Carl Love  <cel@us.ibm.com>
9315         * config/rs6000/rs6000-c.c: Add macro definitions for
9316         ALTIVEC_BUILTIN_VEC_PERMXOR.
9317         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
9318         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
9319         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
9320         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
9321         UNSPEC_VPERMXOR.
9322         * config/doc/extend.texi: Add prototypes for vec_permxor.
9324 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
9326         PR c/84852
9327         * diagnostic-show-locus.c (class layout_point): Convert m_line
9328         from int to linenum_type.
9329         (line_span::comparator): Use linenum "compare" function when
9330         comparing line numbers.
9331         (test_line_span): New function.
9332         (layout_range::contains_point): Convert param "row" from int to
9333         linenum_type.
9334         (layout_range::intersects_line_p): Likewise.
9335         (layout::will_show_line_p): Likewise.
9336         (layout::print_source_line): Likewise.
9337         (layout::should_print_annotation_line_p): Likewise.
9338         (layout::print_annotation_line): Likewise.
9339         (layout::print_leading_fixits): Likewise.
9340         (layout::annotation_line_showed_range_p): Likewise.
9341         (struct line_corrections): Likewise for field m_row.
9342         (line_corrections::line_corrections): Likewise for param "row".
9343         (layout::print_trailing_fixits): Likewise.
9344         (layout::get_state_at_point): Likewise.
9345         (layout::get_x_bound_for_row): Likewise.
9346         (layout::print_line): Likewise.
9347         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
9348         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
9349         * input.c (selftest::test_linenum_comparisons): New function.
9350         (selftest::input_c_tests): Call it.
9351         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
9352         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
9353         * selftest.h (ASSERT_GT): New macro.
9354         (ASSERT_GT_AT): New macro.
9355         (ASSERT_LT): New macro.
9356         (ASSERT_LT_AT): New macro.
9358 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
9360         PR rtl-optimization/84780
9361         * combine.c (distribute_links): Don't make a link based on pc_rtx.
9363 2018-03-14  Martin Liska  <mliska@suse.cz>
9365         * tree.c (record_node_allocation_statistics): Use
9366         get_stats_node_kind.
9367         (get_stats_node_kind): New function extracted from
9368         record_node_allocation_statistics.
9369         (free_node): Use get_stats_node_kind.
9371 2018-03-14  Richard Biener  <rguenther@suse.de>
9373         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
9374         that the value-set of ANTIC_IN doesn't grow.
9376         Revert
9377         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
9378         member.
9379         (BB_VISITED_WITH_VISITED_SUCCS): New define.
9380         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
9382 2018-03-14  Julia Koval  <julia.koval@intel.com>
9384         * config.gcc (icelake-client, icelake-server): New.
9385         (icelake): Remove.
9386         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
9387         (initial_ix86_arch_features): Ditto.
9388         (PTA_SKYLAKE): Add SGX.
9389         (PTA_ICELAKE): Remove.
9390         (PTA_ICELAKE_CLIENT): New.
9391         (PTA_ICELAKE_SERVER): New.
9392         (ix86_option_override_internal): Split up icelake on icelake client and
9393         icelake server.
9394         (get_builtin_code_for_version): Ditto.
9395         (fold_builtin_cpu): Ditto.
9396         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
9397         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
9398         * config/i386/i386.h (processor_type): Ditto.
9399         * doc/invoke.texi: Ditto.
9401 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
9403         PR sanitizer/83392
9404         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
9405         INTEGER_CST offset, add it together with bitpos / 8 and
9406         sign extend based on POINTER_SIZE.
9408         PR target/84844
9409         Revert
9410         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
9412         PR target/78090
9413         * config/i386/constraints.md (Yc): New register constraint.
9414         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
9415         Use Yc constraint for alternative 2 of operand 0.  Remove
9416         preferred_for_speed attribute.
9418 2018-03-14  Richard Biener  <rguenther@suse.de>
9420         PR tree-optimization/84830
9421         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
9422         with the old one to avoid oscillations.
9424 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
9426         PR target/83712
9427         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
9428         pseudos.
9429         (assign_by_spills): Return a flag of reload assignment failure.
9430         Do not process the reload assignment failures.  Do not spill other
9431         reload pseudos if they has the same reg class.  Update n if
9432         necessary.
9433         (lra_assign): Add a return arg.  Set up from the result of
9434         assign_by_spills call.
9435         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9436         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
9437         usage_insns if it is not NULL.
9438         (spill_hard_reg_in_range): New function.
9439         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9440         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9441         function prototypes.
9442         (lra_assign): Change prototype.
9443         * lra.c (lra): Add code to deal with fails by splitting hard reg
9444         live ranges.
9446 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
9448         * config/riscv/riscv.opt (mrelax): New option.
9449         * config/riscv/riscv.c (riscv_file_start): Emit ".option
9450         "norelax" when riscv_mrelax is disabled.
9451         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
9453 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
9455         PR target/84743
9456         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
9457         reassociation for int modes.
9459 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
9461         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
9462         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
9463         for big-endian.
9464         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
9465         * config/aarch64/aarch64-sve.md
9466         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
9467         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
9468         (*extend<mode><Vwide>2): Rename to...
9469         (aarch64_sve_extend<mode><Vwide>2): ...this.
9470         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
9471         renaming the old pattern to...
9472         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
9473         unsigned packs.
9474         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
9475         define_expand, renaming the old pattern to...
9476         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
9477         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
9478         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
9479         account when deciding which SVE instruction the optab should use.
9480         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
9482 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
9484         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
9485         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
9486         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
9487         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
9488         (tlsdesc_small_<mode>): Turn a define_expand and use
9489         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
9490         (tlsdesc_small_advsimd_<mode>): ...this.
9491         (tlsdesc_small_sve_<mode>): New pattern.
9493 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
9495         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
9496         (UNSPEC_UMUL_HIGHPART): New constants.
9497         (MUL_HIGHPART): New int iteraor.
9498         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
9499         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
9500         define_expand.
9501         (*<su>mul<mode>3_highpart): New define_insn.
9503 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
9505         PR lto/84805
9506         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
9507         incomplete types.
9509 2018-03-13  Martin Liska  <mliska@suse.cz>
9511         PR ipa/84658.
9512         * (sem_item_optimizer::sem_item_optimizer): Initialize new
9513         vector.
9514         (sem_item_optimizer::~sem_item_optimizer): Release it.
9515         (sem_item_optimizer::merge_classes): Register variable aliases.
9516         (sem_item_optimizer::fixup_pt_set): New function.
9517         (sem_item_optimizer::fixup_points_to_sets): Likewise.
9518         * ipa-icf.h: Declare new variables and functions.
9520 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
9522         PR middle-end/84834
9523         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
9524         integer_pow2p@2 and test integer_pow2p in condition.
9525         (A < 0 ? C : 0): Similarly for @1.
9527         PR middle-end/84831
9528         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
9529         characters starting at p contain '\0' character, don't look beyond
9530         that.
9532         PR target/84827
9533         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
9534         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
9536         PR target/84828
9537         * reg-stack.c (change_stack): Change update_end var from int to
9538         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
9539         also call set_block_for_insn on the newly added insns and rescan.
9541         PR target/84786
9542         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
9543         on the last operand.
9545         PR c++/84704
9546         * tree.c (stabilize_reference_1): Return save_expr (e) for
9547         STATEMENT_LIST even if it doesn't have side-effects.
9549 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
9551         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
9553 2018-03-12  Renlin Li  <renlin.li@arm.com>
9555         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
9556         aarch64_output_scalar_simd_mov_immediate.
9558 2018-03-12  Martin Sebor  <msebor@redhat.com>
9560         PR tree-optimization/83456
9561         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
9562         for perfectly overlapping calls to memcpy.
9563         (gimple_fold_builtin_memory_chk): Same.
9564         (gimple_fold_builtin_strcpy): Handle no-warning.
9565         (gimple_fold_builtin_stxcpy_chk): Same.
9566         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
9568 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
9570         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
9571         parameter.  Use it for SFmode.
9572         (rs6000_function_arg_advance_1): Adjust.
9573         (rs6000_function_arg): Adjust.
9574         (rs6000_gimplify_va_arg): Pass false for that new parameter.
9576 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
9578         PR rtl-optimization/84169
9579         PR rtl-optimization/84780
9580         * combine.c (can_combine_p): Check for a 2-insn combination whether
9581         the destination register is used between the two insns, too.
9583 2018-03-12  Richard Biener  <rguenther@suse.de>
9585         PR tree-optimization/84803
9586         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
9587         for refs DR analysis didn't process.
9589 2018-03-12  Richard Biener  <rguenther@suse.de>
9591         PR tree-optimization/84777
9592         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
9593         force-vectorize loops ignore whether we are optimizing for size.
9595 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9597         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
9598         (TARGET_MD_ASM_ADJUST): Define.
9600 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
9601             Kito Cheng  <kito.cheng@gmail.com>
9602             Chung-Ju Wu  <jasonwucj@gmail.com>
9604         * config/nds32/nds32.c (nds32_compute_stack_frame,
9605         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
9606         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
9607         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
9608         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
9609         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
9610         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
9611         * config/nds32/nds32.md (prologue, epilogue): Use macro
9612         NDS32_V3PUSH_AVAILABLE_P to do checking.
9614 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
9616         PR debug/58150
9617         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
9618         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
9619         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
9620         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
9621         addition of most attributes on !orig_type_die or the attribute not
9622         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
9624 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9625             Chung-Ju Wu  <jasonwucj@gmail.com>
9627         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
9628         __NDS32_VH__ macro.
9629         * config/nds32/nds32.opt (mvh): New option.
9631 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9632             Chung-Ju Wu  <jasonwucj@gmail.com>
9634         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
9635         function.
9636         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
9637         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
9638         definition.
9640 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
9641             Chung-Ju Wu  <jasonwucj@gmail.com>
9643         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
9644         function.
9645         * config/nds32/nds32-multiple.md (strlensi): New pattern.
9646         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
9648 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
9649             Kito Cheng  <kito.cheng@gmail.com>
9650             Chung-Ju Wu  <jasonwucj@gmail.com>
9652         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
9653         UNSPEC_FFMISM and UNSPEC_FLMISM.
9654         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
9655         for ffb, ffmism and flmism.
9656         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
9657         (unspec_ffmism): Ditto.
9658         (unspec_flmism): Ditto.
9659         (nds32_expand_builtin_impl): Check if string extension is available.
9660         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
9661         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
9663 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
9665         Reverting patch:
9666         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
9668         PR target/83712
9669         * lra-assigns.c (assign_by_spills): Return a flag of reload
9670         assignment failure.  Do not process the reload assignment
9671         failures.  Do not spill other reload pseudos if they has the same
9672         reg class.
9673         (lra_assign): Add a return arg.  Set up from the result of
9674         assign_by_spills call.
9675         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9676         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
9677         usage_insns if it is not NULL.
9678         (spill_hard_reg_in_range): New function.
9679         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9680         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9681         function prototypes.
9682         (lra_assign): Change prototype.
9683         * lra.c (lra): Add code to deal with fails by splitting hard reg
9684         live ranges.
9686 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
9688         PR target/84807
9689         * config/i386/i386.opt: Replace Enforcment with Enforcement.
9691 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
9693         PR debug/84620
9694         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
9695         (dw_val_node): Add val_symbolic_view.
9696         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
9697         (symview_upper_bound): New.
9698         (new_line_info_table): Initialize symviews_since_reset.
9699         (dwarf2out_source_line): Count symviews_since_reset and set
9700         symview_upper_bound.
9701         (dw_val_equal_p): Handle symview.
9702         (add_AT_symview): New.
9703         (print_dw_val): Handle symview.
9704         (attr_checksum, attr_checksum_ordered): Likewise.
9705         (same_dw_val_p, size_of_die): Likewise.
9706         (value_format, output_die): Likewise.
9707         (add_high_low_attributes): Use add_AT_symview for entry_view.
9708         (dwarf2out_finish): Reset symview_upper_bound, clear
9709         zero_view_p.
9711 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
9713         PR target/83969
9714         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
9715         Add strict argument and use it.
9716         (rs6000_split_multireg_move): Update for new strict argument.
9717         (mem_operand_gpr): Disallow all non-offsettable addresses.
9718         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
9720 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
9722         PR target/84772
9723         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
9724         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
9725         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
9727         PR c++/84767
9728         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
9729         decl, use remap_type if we want to use the type.
9731 2018-03-09  Martin Sebor  <msebor@redhat.com>
9733         PR tree-optimization/84526
9734         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
9735         Remove dead code.
9736         (builtin_access::generic_overlap): Be prepared to handle non-array
9737         base objects.
9739 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
9741         PR rtl-optimization/84682
9742         * lra-constraints.c (process_address_1): Check is_address flag
9743         for address constraints.
9744         (process_alt_operands): Likewise.
9745         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
9746         preprocess_constraints.
9747         * recog.h (preprocess_constraints): Add oploc parameter.
9748         Adjust callers.
9749         * recog.c (preprocess_constraints): Test address_operand for
9750         CT_ADDRESS constraints.
9752 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
9754         PR target/83712
9755         * lra-assigns.c (assign_by_spills): Return a flag of reload
9756         assignment failure.  Do not process the reload assignment
9757         failures.  Do not spill other reload pseudos if they has the same
9758         reg class.
9759         (lra_assign): Add a return arg.  Set up from the result of
9760         assign_by_spills call.
9761         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
9762         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
9763         usage_insns if it is not NULL.
9764         (spill_hard_reg_in_range): New function.
9765         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
9766         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
9767         function prototypes.
9768         (lra_assign): Change prototype.
9769         * lra.c (lra): Add code to deal with fails by splitting hard reg
9770         live ranges.
9772 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9774         PR target/83193
9775         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
9776         Accept complain bool parameter.  Only emit errors if it is true.
9777         (arm_parse_cpu_option_name): Likewise.
9778         (arm_target_thumb_only): Adjust callers of the above.
9779         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
9780         prototype to take a default true bool parameter.
9781         (arm_parse_arch_option_name): Likewise.
9783 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
9784             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
9786         PR jit/64089
9787         PR jit/84288
9788         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
9789         * configure: Regenerate.
9790         * configure.ac ("linker --version-script option"): New.
9791         ("linker soname option"): New.
9793 2018-03-09  Richard Biener  <rguenther@suse.de>
9795         PR tree-optimization/84775
9796         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
9797         immediate uses of predicate stmts and mark them modified.
9799         Revert
9800         PR tree-optimization/84178
9801         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
9802         to caller.
9803         (version_loop_for_if_conversion): Delay update_ssa call.
9804         (tree_if_conversion): Delay update_ssa until after predicate
9805         insertion.
9807 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
9809         PR target/84763
9810         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
9811         when the function accesses prior frames.
9813 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
9815         PR debug/84456
9816         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
9817         gen_llsym, otherwise call maybe_gen_llsym.
9819         PR inline-asm/84742
9820         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
9821         has ',' character inside of it.
9823 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9825         PR target/84748
9826         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
9827         as clobbering CC_REGNUM.
9829 2018-03-08  Richard Biener  <rguenther@suse.de>
9831         PR middle-end/84552
9832         * tree-scalar-evolution.c: Include tree-into-ssa.h.
9833         (follow_copies_to_constant): Do not follow SSA names registered
9834         for update.
9836 2018-03-08  Richard Biener  <rguenther@suse.de>
9838         PR tree-optimization/84178
9839         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
9840         to caller.
9841         (version_loop_for_if_conversion): Delay update_ssa call.
9842         (tree_if_conversion): Delay update_ssa until after predicate
9843         insertion.
9845 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
9847         PR tree-optimization/84178
9848         * tree-if-conv.c (release_bb_predicate): Remove the
9849         the assertion that the stmts have NULL use_ops.
9850         Discard the statements, asserting that they haven't
9851         yet been added to a BB.
9853 2018-03-08  Richard Biener  <rguenther@suse.de>
9855         PR tree-optimization/84746
9856         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
9857         (phi_translate): Pass in destination ANTIC_OUT set.
9858         (phi_translate_1): Likewise.  For a simplified result lookup
9859         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
9860         (phi_translate_set): Adjust.
9861         (do_pre_regular_insertion): Likewise.
9862         (do_pre_partial_partial_insertion): Likewise.
9864 2018-03-08  Martin Liska  <mliska@suse.cz>
9866         PR gcov-profile/84735
9867         * doc/gcov.texi: Document usage of profile files.
9868         * gcov-io.h: Document changes in the format.
9870 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
9872         PR debug/84404
9873         PR debug/84408
9874         * dwarf2out.c (struct dw_line_info_table): Update comments for
9875         view == -1.
9876         (FORCE_RESET_NEXT_VIEW): New.
9877         (FORCE_RESETTING_VIEW_P): New.
9878         (RESETTING_VIEW_P): Check for -1 too.
9879         (ZERO_VIEW_P): Likewise.
9880         (new_line_info_table): Force-reset next view.
9881         (dwarf2out_begin_function): Likewise.
9882         (dwarf2out_source_line): Simplify zero_view_p initialization.
9883         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
9884         view directly.  Omit view when omitting .loc at line 0.
9886 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
9888         PR tree-optimization/84740
9889         * tree-switch-conversion.c (process_switch): Call build_constructors
9890         only if info.phi_count is non-zero.
9892         PR tree-optimization/84739
9893         * tree-tailcall.c (find_tail_calls): Check call arguments against
9894         DECL_ARGUMENTS (current_function_decl) rather than
9895         DECL_ARGUMENTS (func) when checking for tail recursion.
9897 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
9899         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
9900         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
9901         Volker Reichelt's entry and add entries for people that perform
9902         GCC fuzzy testing and report numerous bugs.
9904 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
9906         PR target/82411
9907         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
9908         readonly data in sdata, if that is disabled.
9909         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
9910         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
9911         -mreadonly-in-sdata option.
9913 2018-03-07  Martin Sebor  <msebor@redhat.com>
9915         PR tree-optimization/84468
9916         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
9917         basic block when looking for nul assignment.
9919 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
9921         PR target/84277
9922         * except.h (output_function_exception_table): Adjust prototype.
9923         * except.c (output_function_exception_table): Remove FNNAME parameter
9924         and add SECTION parameter.  Ouput one part of the table at a time.
9925         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
9926         the first part of the exception table and emit unwind directives.
9927         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
9928         (i386_pe_seh_cold_init): Likewise.
9929         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
9930         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
9931         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
9932         (ix86_output_call_insn): Emit a nop in one more case for SEH.
9933         * config/i386/winnt.c: Include except.h.
9934         (struct seh_frame_state): Add reg_offset, after_prologue and
9935         in_cold_section fields.
9936         (i386_pe_seh_end_prologue): Set seh->after_prologue.
9937         (i386_pe_seh_cold_init): New function.
9938         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
9939         to seh->in_cold_section.
9940         (seh_emit_push): Record the offset of the push.
9941         (seh_emit_save): Record the offet of the save.
9942         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
9943         Test seh->after_prologue to disregard the epilogue.
9944         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
9945         (i386_pe_end_cold_function): New function.
9947 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
9949         PR fortran/84565
9950         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
9951         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
9953         PR c++/84704
9954         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
9955         on tmp_var.
9956         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
9957         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
9959         PR middle-end/84723
9960         * multiple_target.c: Include tree-inline.h and intl.h.
9961         (expand_target_clones): Diagnose and fail if node->definition and
9962         !tree_versionable_function_p (node->decl).
9964 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
9966         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
9967         sprint_ul.
9968         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
9969         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
9970         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
9972 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
9974         PR target/84710
9975         * combine.c (try_combine): Use reg_or_subregno instead of handling
9976         just paradoxical SUBREGs and REGs.
9978 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
9980         * config/arc/arc.c (arc_finalize_pic): Remove function.
9981         (arc_must_save_register): We use single base PIC register, remove
9982         checks to save/restore the PIC register.
9983         (arc_expand_prologue): Likewise.
9984         * config/arc/arc-protos.h (arc_set_default_type_attributes):
9985         Remove.
9986         (arc_verify_short): Likewise.
9987         (arc_attr_type): Likewise.
9988         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
9989         (walk_stores): Likewise.
9990         (arc_address_cost): Make it static.
9991         (arc_verify_short): Likewise.
9992         (branch_dest): Likewise.
9993         (arc_attr_type): Likewise.
9994         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
9995         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
9996         (arc_final_prescan_insn): Remove inserting the nops due to
9997         hardware hazards.  It is done in reorg step.
9998         (insn_length_variant_t): Remove.
9999         (insn_length_parameters_t): Likewise.
10000         (arc_insn_length_parameters): Likewise.
10001         (arc_get_insn_variants): Likewise.
10002         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
10004 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
10006         PR inline-asm/84683
10007         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
10008         assertion failure.
10010         PR tree-optimization/84687
10011         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
10012         on new_node->decl.
10013         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
10015 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10017         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
10018         Rename to ppc_speculation_barrier.
10019         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
10020         __builtin_ppc_speculation_barrier.
10022 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
10024         PR target/84700
10025         * combine.c (combine_simplify_rtx): Don't try to simplify if
10026         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
10027         are equal to x.
10029 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
10031         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
10032         to 32 bytes when compiling for POWER9.
10034 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
10036         PR target/84564
10037         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
10038         regparm >= 3 with no arg reg available also for calls with
10039         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
10041         PR target/84524
10042         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
10043         orig,vex.
10044         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
10046 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
10048         PR target/84264
10049         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
10051 2018-03-05  Richard Biener  <rguenther@suse.de>
10053         PR tree-optimization/84486
10054         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
10055         When inserting a __builtin_assume_aligned call set the LHS
10056         SSA name alignment info accordingly.
10058 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
10060         PR tree-optimization/84114
10061         * config/aarch64/aarch64.c (aarch64_reassociation_width)
10062         Avoid reassociation of FLOAT_MODE addition.
10064 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
10066         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
10067         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
10068         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
10069         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
10070         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
10071         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
10072         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
10073         and -mwbnoinvd.
10074         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
10075         __builtin_ia32_wbinvd): New builtins.
10076         (SPECIAL_ARGS2): New.
10077         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
10078         (SPECIAL_ARGS2): New.
10079         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
10080         (ix86_valid_target_attribute_inner_p): Ditto.
10081         (ix86_init_mmx_sse_builtins): Add special_args2.
10082         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
10083         TARGET_WBNOINVD_P): New.
10084         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
10085         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
10086         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
10087         * config/i386/immintrin.h (_wbinvd): New intrinsic.
10088         * config/i386/pconfigintrin.h: New file.
10089         * config/i386/wbnoinvdintrin.h: Ditto.
10090         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
10091         wbnoinvdintrin.h.
10092         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
10094 2018-03-05  Richard Biener  <rguenther@suse.de>
10096         PR tree-optimization/84670
10097         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
10098         member.
10099         (BB_VISITED_WITH_VISITED_SUCCS): New define.
10100         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
10101         (compute_antic_aux): Only assert the number of values in ANTIC_IN
10102         doesn't grow if all successors (recursively) were visited at least
10103         once.
10105 2018-03-05  Richard Biener  <rguenther@suse.de>
10107         PR tree-optimization/84650
10108         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
10109         if executed in the loop pipeline.
10111 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
10113         * doc/configfiles.texi (Configuration Files): Move info about
10114         conditionalizing $target-protos.h to...
10115         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
10116         differs from $target-protos.h.
10118 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
10119             Chung-Ju Wu  <jasonwucj@gmail.com>
10121         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
10122         * config/nds32/nds32-multiple.md (setmemsi): Define.
10123         * config/nds32/nds32-memory-manipulation.c
10124         (nds32_gen_dup_4_byte_to_word_value): New.
10125         (emit_setmem_word_loop): New.
10126         (emit_setmem_byte_loop): New.
10127         (nds32_expand_setmem_loop): New.
10128         (nds32_expand_setmem_loop_v3m): New.
10129         (nds32_expand_setmem_unroll): New.
10130         (nds32_expand_setmem): New.
10132 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
10133             Chung-Ju Wu  <jasonwucj@gmail.com>
10135         * config/nds32/nds32-memory-manipulation.c
10136         (nds32_emit_load_store): New.
10137         (nds32_emit_post_inc_load_store): New.
10138         (nds32_emit_mem_move): New.
10139         (nds32_emit_mem_move_block): New.
10140         (nds32_expand_movmemsi_loop_unknown_size): New.
10141         (nds32_expand_movmemsi_loop_known_size): New.
10142         (nds32_expand_movmemsi_loop): New.
10143         (nds32_expand_movmemsi_unroll): New.
10144         (nds32_expand_movmemqi): Rename ...
10145         (nds32_expand_movmemsi): ... to this.
10146         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
10147         (movmemsi): ... to this.
10148         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
10149         (nds32_expand_movmemsi): ... to this.
10151 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
10152             Monk Chiang  <sh.chiang04@gmail.com>
10153             Chung-Ju Wu  <jasonwucj@gmail.com>
10155         * config/nds32/nds32-protos.h
10156         (nds32_expand_load_multiple): New arguments.
10157         (nds32_expand_store_multiple): Ditto.
10158         (nds32_valid_multiple_load_store): Rename ...
10159         (nds32_valid_multiple_load_store_p): ... to this.
10160         * config/nds32/nds32-memory-manipulation.c
10161         (nds32_expand_load_multiple): Refine implementation.
10162         (nds32_expand_store_multiple): Ditto.
10163         * config/nds32/nds32-multiple.md
10164         (load_multiple): Update nds32_expand_load_multiple interface.
10165         (store_multiple): Update nds32_expand_store_multiple interface.
10166         * config/nds32/nds32-predicates.c
10167         (nds32_valid_multiple_load_store): Rename ...
10168         (nds32_valid_multiple_load_store_p): ... to this and refine
10169         implementation.
10170         * config/nds32/predicates.md
10171         (nds32_load_multiple_and_update_address_operation): New predicate.
10172         (nds32_store_multiple_and_update_address_operation): New predicate.
10174 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
10175             Chung-Ju Wu  <jasonwucj@gmail.com>
10177         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
10178         (combo): New attribute.
10179         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
10181 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
10183         * config/nds32/nds32.opt: Change -mcmodel= default value.
10185 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
10186             Monk Chiang  <sh.chiang04@gmail.com>
10187             Chung-Ju Wu  <jasonwucj@gmail.com>
10189         * config/nds32/constants.md (unspec_element): New enum.
10190         * config/nds32/constraints.md (Umw): New constraint.
10191         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
10192         * config/nds32/nds32-intrinsic.md: Likewise.
10193         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
10194         (nds32_valid_smw_lwm_base_p): New.
10195         (nds32_output_smw_single_word): New.
10196         (nds32_output_lmw_single_word): New.
10197         (nds32_expand_unaligned_load): New.
10198         (nds32_expand_unaligned_store): New.
10199         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
10200         (nds32_output_smw_single_word): Declare.
10201         (nds32_output_lmw_single_word): Declare.
10202         (nds32_expand_unaligned_load): Declare.
10203         (nds32_expand_unaligned_store): Declare.
10204         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
10205         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
10206         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
10207         NDS32_BUILTIN_UASTORE_DW.
10208         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
10209         predicate.
10211 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
10212             Kito Cheng  <kito.cheng@gmail.com>
10213             Chung-Ju Wu  <jasonwucj@gmail.com>
10215         * config/nds32/nds32-intrinsic.c
10216         (nds32_expand_builtin_null_ftype_reg): Delete.
10217         (nds32_expand_builtin_reg_ftype_imm): Ditto.
10218         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
10219         (nds32_read_argument): New.
10220         (nds32_legitimize_target): Ditto.
10221         (nds32_legitimize_argument): Ditto.
10222         (nds32_check_constant_argument): Ditto.
10223         (nds32_expand_unop_builtin): Ditto.
10224         (nds32_expand_unopimm_builtin): Ditto.
10225         (nds32_expand_binop_builtin): Ditto.
10226         (nds32_builtin_decl_impl): Ditto.
10227         (builtin_description): Ditto.
10228         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
10229         (nds32_init_builtins_impl): Ditto.
10230         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
10231         (nds32_builtin_decl): New.
10232         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
10233         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
10235 2018-03-02  Jeff Law  <law@redhat.com>
10237         * reorg.c (stop_search_p): Handle DEBUG_INSN.
10238         (redundant_insn, fill_simple_delay_slots): Likewise.
10239         (fill_slots_from_thread): Likewise.
10240         * resource.c (mark_referenced_resources): Likewise.
10241         (mark_set_resources, find_dead_or_set_registers): Likewise.
10243 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
10245         * substring-locations.h (format_warning_va): Formatting fix for
10246         ATTRIBUTE_GCC_DIAG.
10247         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
10248         argument.
10249         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
10250         * substring-locations.c: Include intl.h.
10251         (format_warning_va): Turned into small wrapper around
10252         format_warning_n_va, renamed to ...
10253         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
10254         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
10255         use ngettext.
10256         (format_warning_at_substring_n): New function.
10257         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
10258         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
10259         format_warning_at_substring with just a shorter name instead of
10260         const function pointer.
10261         (fmtwarn_n): New function.
10262         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
10263         appropriate, get rid of all the fmtstr temporaries, move conditionals
10264         with G_() wrapped string literals directly into fmtwarn arguments,
10265         cast dir.len to (int), formatting fixes.
10267 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
10269         * doc/invoke.texi: Remove "Cilk Plus" references.
10271 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
10272             Richard Biener  <rguenther@suse.de>
10274         PR ipa/84628
10275         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
10276         for error or warning attributes if CALL_FROM_THUNK_P is set.
10277         Formatting fixes.
10279 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
10281         PR target/56540
10282         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
10283         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
10285         PR target/56540
10286         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
10287         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
10289         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
10290         instead of -1U in last predictors element's probability member.
10292 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
10294         PR ipa/83983
10295         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
10296         arguments if they are comparable.
10298 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
10300         PR tree-optimization/84634
10301         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
10302         masks and masked_loop_p with a single loop_masks, making sure it's
10303         null for bb vectorization.
10305 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
10307         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10308         (vect_analyze_data_ref_access): Use loop->safe_len rather than
10309         loop->force_vectorize to check whether there is no alias.
10311 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
10313         PR target/84614
10314         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
10315         prototypes.
10316         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
10317         comments.
10318         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
10319         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
10320         instead of a loop around prev_real_insn.
10321         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
10322         prev_real_insn.
10324         PR inline-asm/84625
10325         * config/i386/i386.c (ix86_print_operand): Use conditional
10326         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
10327         zero vector.
10329 2018-03-02  Richard Biener  <rguenther@suse.de>
10331         PR tree-optimization/84427
10332         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
10333         (bitmap_set_subtract_values): Rewrite to handle multiple
10334         exprs per value.
10335         (clean): Likewise.
10336         (prune_clobbered_mems): Likewise.
10337         (phi_translate): Take edge instead of pred/phiblock.
10338         (phi_translate_1): Likewise.
10339         (phi_translate_set): Likewise.  Insert all translated
10340         exprs for a value into the set, keeping possibly multiple
10341         expressions per value.
10342         (compute_antic_aux): Adjust for phi_translate changes.
10343         When intersecting union the expressions and prune those
10344         not in the final value set, keeping possibly multiple
10345         expressions per value.  Do not use value-insertion
10346         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
10347         all expressions.  Add verification that the value-sets
10348         only shrink during iteration.
10349         (compute_partial_antic_aux): Adjust for the phi_translate changes.
10350         (do_pre_regular_insertion): Likewise.
10351         (do_pre_partial_partial_insertion): Likewise.
10353 2018-03-02  Richard Biener  <rguenther@suse.de>
10355         PR target/82005
10356         * config/darwin.c (saved_debug_info_level): New static global.
10357         (darwin_asm_lto_start): Disable debug info generation for LTO out.
10358         (darwin_asm_lto_end): Restore debug info generation settings.
10360 2018-03-01  Martin Liska  <mliska@suse.cz>
10362         PR sanitizer/82484
10363         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
10364         volatile arguments.
10366 2018-03-01  Richard Biener  <rguenther@suse.de>
10368         PR debug/84645
10369         * dwarf2out.c (gen_variable_die): Properly handle late VLA
10370         type annotation with LTO when debug was disabled at compile-time.
10372 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
10374         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
10375         XINT with INTVAL.
10376         (mips_final_postscan_insn): Likewise.
10378 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
10380         PR rtl-optimization/84528
10381         * alias.c (init_alias_target): Add commentary.
10382         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
10383         a unique base value if the frame pointer is not eliminated
10384         to the stack pointer.
10386 2018-03-01  Tom de Vries  <tom@codesourcery.com>
10388         PR rtl-optimization/83327
10389         * lra-int.h (hard_regs_spilled_into): Declare.
10390         * lra.c (hard_regs_spilled_into): Define.
10391         (init_reg_info): Init hard_regs_spilled_into.
10392         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
10393         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
10394         (process_bb_lives): Handle hard_regs_spilled_into.
10395         (lra_create_live_ranges_1): Before doing liveness propagation, clear
10396         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
10398 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
10400         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
10401         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
10402         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
10403         * config/rs6000/aix72.h: New file.
10405 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
10407         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
10408         instead of warning_at with conditional singular and plural messages
10409         where possible.
10411         PR target/52991
10412         * stor-layout.c (update_alignment_for_field): For
10413         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
10414         && !DECL_PACKED (field), do the alignment update, just use
10415         only desired_align instead of MAX (type_align, desired_align)
10416         as the alignment.
10417         (place_field): Don't do known_align < desired_align handling
10418         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
10419         is non-NULL, instead do it after rli->prev_field handling and
10420         only if not within a bitfield word.  For DECL_PACKED (field)
10421         use type_align of BITS_PER_UNIT.
10423 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
10425         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
10426         superfluous parentheses and trailing spaces.
10428 2018-02-28  Richard Biener  <rguenther@suse.de>
10430         PR tree-optimization/84584
10431         * graphite-scop-detection.c (scop_detection::add_scop): Discard
10432         SCoPs with fake exit edge.
10434 2018-02-28  Martin Liska  <mliska@suse.cz>
10436         PR testsuite/84597
10437         * timevar.c (timer::print): Fix format to properly print 100%
10438         values.
10440 2018-02-28  Richard Biener  <rguenther@suse.de>
10442         PR middle-end/84607
10443         * genmatch.c (capture_info::walk_match): Do not mark
10444         captured expressions without operands as expr_p given
10445         they act more like predicates and should be subject to
10446         "lost tail" side-effect preserving.
10448 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
10450         PR rtl-optimization/81611
10451         * auto-inc-dec.c (attempt_change): Move dead note from
10452         mem_insn if it's the next use of regno
10453         (find_address): Take address use of reg holding
10454         non-incremented value.  Add parm to limit search to the named
10455         reg only.
10456         (merge_in_block): Attempt to use a mem insn that is the next
10457         use of the original regno.
10459 2018-02-27  Martin Sebor  <msebor@redhat.com>
10461         PR c++/83871
10462         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
10463         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
10465 2018-02-27  Martin Sebor  <msebor@redhat.com>
10467         PR translation/84207
10468         * diagnostic-core.h (warning_n, error_n, inform_n): Change
10469         n argument to unsigned HOST_WIDE_INT.
10470         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
10471         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
10472         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
10473         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
10475 2018-02-27  Richard Biener  <rguenther@suse.de>
10477         PR tree-optimization/84512
10478         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
10479         Do not use the estimate returned from record_stmt_cost for
10480         the scalar iteration cost but sum properly using add_stmt_cost.
10482 2018-02-27  Richard Biener  <rguenther@suse.de>
10484         PR tree-optimization/84466
10485         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
10486         Adjust last change to less strictly validate use operands.
10488 2018-02-27  Martin Liska  <mliska@suse.cz>
10490         PR gcov-profile/84548
10491         * gcov.c (process_file): Allow partial overlap and consider it
10492         also as group functions.
10493         (output_lines): Properly calculate range of lines for a group.
10495 2018-02-27  Martin Liska  <mliska@suse.cz>
10497         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
10498         'ggc' suffixes.  Change first column width.
10499         (timer::print): Fix formatting of the column.
10501 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
10503         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
10504         preserve inline entry blocks for the sake of debug inline
10505         entry point markers alone.
10506         (remove_unused_locals): Suggest in comments a better place to
10507         force the preservation of inline entry blocks that are
10508         otherwise unused, but do not preserve them.
10510 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10512         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
10514 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10516         PR target/84039
10517         * config/i386/constraints.md (Bs): Replace
10518         ix86_indirect_branch_register with
10519         TARGET_INDIRECT_BRANCH_REGISTER.
10520         (Bw): Likewise.
10521         * config/i386/i386.md (indirect_jump): Likewise.
10522         (tablejump): Likewise.
10523         (*sibcall_memory): Likewise.
10524         (*sibcall_value_memory): Likewise.
10525         Peepholes of indirect call and jump via memory: Likewise.
10526         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
10527         (*sibcall_value_GOT_32): Likewise.
10528         * config/i386/predicates.md (indirect_branch_operand): Likewise.
10529         (GOT_memory_operand): Likewise.
10530         (call_insn_operand): Likewise.
10531         (sibcall_insn_operand): Likewise.
10532         (GOT32_symbol_operand): Likewise.
10533         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
10535 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
10537         PR rtl-optimization/83496
10538         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
10539         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
10540         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
10541         redundant insn, if any.
10542         (relax_delay_slots): Likewise.
10543         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
10545 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
10547         PR tree-optimization/83965
10548         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
10549         that grouped statements are part of a reduction chain.  Return
10550         true if the statement is not marked as a reduction itself but
10551         is part of a group.
10552         (vect_recog_dot_prod_pattern): Don't check whether the statement
10553         is part of a group here.
10554         (vect_recog_sad_pattern): Likewise.
10555         (vect_recog_widen_sum_pattern): Likewise.
10557 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
10559         PR debug/84545
10560         * final.c (rest_of_clean_state): Also look for calls inside sequences.
10562 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
10564         PR target/84530
10565         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
10566         the bool argument.
10567         (ix86_output_indirect_function_return): New prototype.
10568         (ix86_split_simple_return_pop_internal): Likewise.
10569         * config/i386/i386.c (indirect_return_via_cx): New.
10570         (indirect_return_via_cx_bnd): Likewise.
10571         (indirect_thunk_name): Handle return va CX_REG.
10572         (output_indirect_thunk_function): Create alias for
10573         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
10574         (ix86_output_indirect_jmp): Remove the bool argument.
10575         (ix86_output_indirect_function_return): New function.
10576         (ix86_split_simple_return_pop_internal): Likewise.
10577         * config/i386/i386.md (*indirect_jump): Don't pass false
10578         to ix86_output_indirect_jmp.
10579         (*tablejump_1): Likewise.
10580         (simple_return_pop_internal): Change it to define_insn_and_split.
10581         Call ix86_split_simple_return_pop_internal to split it for
10582         -mfunction-return=.
10583         (simple_return_indirect_internal): Call
10584         ix86_output_indirect_function_return instead of
10585         ix86_output_indirect_jmp.
10587 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
10589         PR bootstrap/84405
10590         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
10591         memset and value initialization afterwards.
10593 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
10595         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
10597 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
10599         PR target/84521
10600         * common/config/aarch64/aarch64-common.c
10601         (aarch_option_optimization_table[]): Switch
10602         off fomit-frame-pointer
10604 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
10605             Chung-Ju Wu  <jasonwucj@gmail.com>
10607         * config/nds32/nds32-multiple.md (load_multiple): Disallow
10608         volatile memory.
10609         (store_multiple): Ditto.
10611 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
10613         * config.gcc: Add --with-cpu support for nds32 target.
10614         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
10615         * config/nds32/nds32.opt: Add -mcpu= option.
10617 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
10619         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
10620         isel=yes): Warn for these deprecated options.
10622 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
10624         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
10625         ISA_2_5_MASKS_EMBEDDED.
10627 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
10629         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
10630         p->max as pointers rather than using iterative_hash_expr.
10632 2018-02-23  Carl Love  <cel@us.ibm.com>
10634         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
10635         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
10636         BU_P8V_OVERLOAD_2.
10637         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
10638         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
10639         P8V_BUILTIN_VEC_VUNSIGNED2.
10641 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
10643         PR target/81572
10644         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
10645         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
10646         LRA_UNKNOWN_ALT.
10647         * lra-constraints.c (curr_insn_transform): Set up
10648         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
10649         LRA_UNKNOWN_ALT.
10650         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
10651         * lra-eliminations.c (spill_pseudos): Ditto.
10652         (process_insn_for_elimination): Ditto.
10653         * lra-lives.c (reg_early_clobber_p): Use the new macros.
10654         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
10655         LRA_NON_CLOBBERED_ALT.
10657 2018-02-22  Martin Sebor  <msebor@redhat.com>
10659         PR tree-optimization/84480
10660         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
10661         to maybe_diag_stxncpy_trunc.  Call it.
10662         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
10663         from gimple_fold_builtin_strcpy.  Print inlining stack.
10664         (handle_builtin_stxncpy): Print inlining stack.
10665         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
10667 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
10669         PR target/84176
10670         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
10671         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
10672         and -fcheck-pointer-bounds are used together.
10673         (indirect_thunk_prefix): New enum.
10674         (indirect_thunk_need_prefix): New function.
10675         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
10676         "_nt" instead of "_bnd" for NOTRACK prefix.
10677         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
10678         (output_indirect_thunk_function): Likewise.
10679         (): Likewise.
10680         (ix86_code_end): Update output_indirect_thunk_function calls.
10681         (ix86_output_indirect_branch_via_reg): Replace
10682         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
10683         (ix86_output_indirect_branch_via_push): Likewise.
10684         (ix86_output_function_return): Likewise.
10685         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
10686         incompatible with -fcf-protection=branch and
10687         -fcheck-pointer-bounds.
10689 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
10691         PR target/83335
10692         * config/aarch64/aarch64.c (aarch64_print_address_internal):
10693         Change gcc_assert call to output_operand_lossage.
10695 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
10697         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
10699 2018-02-22  DJ Delorie  <dj@redhat.com>
10700             Sebastian Perta  <sebastian.perta@renesas.com>
10701             Oleg Endo  <olegendo@gcc.gnu.org>
10703         * config/rx/rx.c (rx_rtx_costs): New function.
10704         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
10706 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
10708         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
10710 2018-02-22  Martin Liska  <mliska@suse.cz>
10712         PR driver/83193
10713         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
10714         Add "native" as a possible value.
10716 2018-02-22  Martin Liska  <mliska@suse.cz>
10718         PR driver/83193
10719         * config/i386/i386.c (ix86_option_override_internal):
10720         Add "native" as a possible value for -march and -mtune.
10722 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
10724         PR target/84502
10725         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
10726         to all type variants.
10728         PR tree-optimization/84503
10729         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
10730         width as info->bitpos + info->bitsize - start.
10731         (merged_store_group::merge_overlapping): Simplify width computation.
10732         (check_no_overlap): New function.
10733         (imm_store_chain_info::try_coalesce_bswap): Compute expected
10734         start + width and last_order of the group, fail if check_no_overlap
10735         fails.
10736         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
10737         to group if check_no_overlap fails.
10739 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
10741         * config/rs6000/altivec.md: Delete contraint arguments to
10742         define_expand, define_split, and define_peephole2, and in
10743         define_insn_and_split if always unused.
10744         * config/rs6000/darwin.md: Ditto.
10745         * config/rs6000/dfp.md: Ditto.
10746         * config/rs6000/rs6000.md: Ditto.
10747         * config/rs6000/sync.md: Ditto.
10748         * config/rs6000/vector.md: Ditto.
10749         * config/rs6000/vsx.md: Ditto.
10751 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
10753         * config/rs6000/altivec.md: Write output control strings as braced
10754         blocks instead of double-quoted strings.
10755         * config/rs6000/darwin.md: Ditto.
10756         * config/rs6000/rs6000.md: Ditto.
10757         * config/rs6000/vector.md: Ditto.
10758         * config/rs6000/vsx.md: Ditto.
10760 2018-02-21  Jason Merrill  <jason@redhat.com>
10762         PR c++/84314 - ICE with templates and fastcall attribute.
10763         * attribs.c (build_type_attribute_qual_variant): Remove assert.
10765 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
10767         * ipa-cp.c (determine_versionability): Fix comment typos.
10769 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
10771         PR c/84229
10772         * ipa-cp.c (determine_versionability): Do not version functions caling
10773         va_arg_pack.
10775 2018-02-21  Martin Liska  <mliska@suse.cz>
10777         PR driver/83193
10778         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
10779         Add "native" as a possible value.
10780         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
10781         the macro when native cpu detection is available.
10783 2018-02-21  Martin Liska  <mliska@suse.cz>
10785         PR driver/83193
10786         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
10787         Add "native" as a possible value.
10788         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
10789         when native cpu detection is available.
10791 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
10792             Martin Sebor  <msebor@redhat.com>
10794         PR tree-optimization/84478
10795         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
10796         false.
10797         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
10798         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
10799         support which is conservatively correct, for 2 only stay conservative
10800         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
10801         argument to the 2 argument get_range_strlen, adjust 6 arg
10802         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
10803         false.
10804         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
10805         (gimple_fold_builtin_strlen): Pass true as last argument to
10806         get_range_strlen.
10808 2018-02-20  Martin Sebor  <msebor@redhat.com>
10810         PR middle-end/84095
10811         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
10812         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
10813         (builtin_memref::builtin_memref): Factor out parts into
10814         set_base_and_offset and call it.
10816 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
10818         PR middle-end/84406
10819         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
10820         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
10821         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
10822         search at the associated MODE_INT.
10824 2018-02-20  Jeff Law  <law@redhat.com>
10826         PR middle-end/82123
10827         PR tree-optimization/81592
10828         PR middle-end/79257
10829         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
10830         for range data rather than using global data.
10831         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
10832         range data rather than using global data.
10833         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
10834         pass it to children as needed.
10835         (struct directive::fmtresult): Similarly.
10836         (struct directive::set_width): Similarly.
10837         (struct directive::set_precision): Similarly.
10838         (format_integer, format_directive, parse_directive): Similarly.
10839         (format_none): Accept unnamed vr_values parameter.
10840         (format_percent, format_floating, format_character): Similarly.
10841         (format_string, format_plain): Similarly.
10842         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
10843         the EVRP range analyzer for range data rather than using global data.
10844         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
10845         gimple-ssa-evrp-analyze.h
10846         (class sprintf_dom_walker): Add after_dom_children member function.
10847         Add evrp_range_analyzer member.
10848         (sprintf_dom_walker::before_dom_children): Call into the EVRP
10849         range analyzer as needed.
10850         (sprintf_dom_walker::after_dom_children): New member function.
10851         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
10852         if not optimizing.
10853         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
10854         (evrp_range_analyzer::pop_to_marker): Likewise.
10856 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
10858         PR tree-optimization/84419
10859         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
10860         with the required type if its current type is compatible but
10861         different.
10863 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
10865         PR middle-end/82004
10866         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
10867         after vectorization.
10869 2018-02-20  Martin Liska  <mliska@suse.cz>
10871         PR driver/83193
10872         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
10873         possible values if we don't have a hint.
10875 2018-02-20  Martin Liska  <mliska@suse.cz>
10877         PR c/84310
10878         PR target/79747
10879         * final.c (shorten_branches): Build align_tab array with one
10880         more element.
10881         * opts.c (finish_options): Add alignment option limit check.
10882         (MAX_CODE_ALIGN): Likewise.
10883         (MAX_CODE_ALIGN_VALUE): Likewise.
10884         * doc/invoke.texi: Document maximum allowed option value for
10885         all -falign-* options.
10887 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
10889         PR target/84146
10890         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
10891         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
10892         * var-tracking.c (emit_note_insn_var_location): Remove all references
10893         to NOTE_INSN_CALL_ARG_LOCATION.
10894         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
10895         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
10896         Use copy_rtx_if_shared.
10897         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
10898         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
10899         (dwarf2out_var_location): Remove handling of
10900         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
10901         on call_insn.
10902         * final.c (final_scan_insn): Remove all references to
10903         NOTE_INSN_CALL_ARG_LOCATION.
10904         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
10905         before dumping final insns.
10906         * except.c (emit_note_eh_region_end): Remove all references to
10907         NOTE_INSN_CALL_ARG_LOCATION.
10908         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
10909         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
10910         * config/arc/arc.c (hwloop_optimize): Likewise.
10911         * config/arm/arm.c (create_fix_barrier): Likewise.
10912         * config/s390/s390.c (s390_chunkify_start): Likewise.
10913         * config/sh/sh.c (find_barrier): Likewise.
10914         * config/i386/i386.c (rest_of_insert_endbranch,
10915         ix86_seh_fixup_eh_fallthru): Likewise.
10916         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
10917         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
10918         * config/frv/frv.c (frv_function_prologue): Likewise.
10919         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
10920         reg note.
10921         (note_outside_basic_block_p): Remove all references to
10922         NOTE_INSN_CALL_ARG_LOCATION.
10923         * gengtype.c (adjust_field_rtx_def): Likewise.
10924         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
10925         Likewise.
10926         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
10927         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
10929         PR c++/84444
10930         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
10931         is ADDR_EXPR.
10933         PR tree-optimization/84452
10934         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
10935         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
10936         is NULL.
10938 2018-02-19  Martin Liska  <mliska@suse.cz>
10940         PR sanitizer/82183
10941         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
10943 2018-02-19  Martin Liska  <mliska@suse.cz>
10944             Richard Sandiford  <richard.sandiford@linaro.org>
10946         PR tree-optimization/82491
10947         * gimple-fold.c (get_base_constructor): Make earlier bail out
10948         to prevent ubsan.
10950 2018-02-19  Carl Love  <cel@us.ibm.com>
10952         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
10953         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
10954         BU_P8V_OVERLOAD_1.
10955         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
10956         P8V_BUILTIN_VEC_NEG.
10958 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
10960         * config/rl78/rl78.md (movdf): New define expand.
10962 2018-02-19  Martin Liska  <mliska@suse.cz>
10964         PR other/80589
10965         * doc/invoke.texi: Fix typo.
10966         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
10968 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
10970         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
10971         handle rs6000_single_float and rs6000_double_float specially for
10972         e500 family CPUs.
10974 2018-02-16  Jeff Law  <law@redhat.com>
10976         * config/rx/rx.c (add_pop_cfi_notes): New function.;
10977         (pop_regs): Use it.
10979 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
10981         PR ipa/84425
10982         * ipa-inline.c (inline_small_functions): Fix a typo.
10984 2018-02-16  Nathan Sidwell  <nathan@acm.org>
10986         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
10988 2018-02-16  Carl Love  <cel@us.ibm.com>
10990         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
10991         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
10992         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
10993         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
10994         expansion to P8V_BUILTIN_VEC_FLOAT2.
10996 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
10998         PR rtl-optimization/70023
10999         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
11000         src_regno into account.
11002 2018-02-16  Carl Love  <cel@us.ibm.com>
11004         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
11005         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
11006         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
11007         * config/rs6000/rs6000.c: Remove case statements for
11008         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
11009         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
11010         and P9V_BUILTIN_VEC_VINSERT4B.
11011         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
11012         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
11013         * config/rs6000/vsx.md:
11014         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
11015         vec_insert4b.
11017 2018-02-16  Carl Love  <cel@us.ibm.com>
11019         * config/rs6000/altivec.h: Add builtin names vec_extract4b
11020         vec_insert4b.
11021         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
11022         definitions.
11023         * config/rs6000/rs6000-c.c: Add the definitions for
11024         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
11025         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
11026         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
11027         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
11028         definition for insert4b and define insn *insert3b_internal.
11029         * doc/extend.texi: Add documentation for vec_extract4b.
11031 2018-02-16  Nathan Sidwell  <nathan@acm.org>
11033         * doc/extend.texi (Backwards Compatibility): Mention friend
11034         injection.  Note for-scope is deprecated.
11035         * doc/invoke.texi (-ffriend-injection): Deprecate.
11037 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
11039         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
11040         that moved to I2, also allow destinations that are a paradoxical
11041         subreg (instead of a normal reg).
11043 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
11045         PR target/83831
11046         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
11047         to QImode.
11049 2018-02-16  Richard Biener  <rguenther@suse.de>
11051         PR tree-optimization/84037
11052         PR tree-optimization/84016
11053         PR target/82862
11054         * config/i386/i386.c (ix86_builtin_vectorization_cost):
11055         Adjust vec_construct for the fact we need additional higher latency
11056         128bit inserts for AVX256 and AVX512 vector builds.
11057         (ix86_add_stmt_cost): Scale vector construction cost for
11058         elementwise loads.
11060 2018-02-16  Richard Biener  <rguenther@suse.de>
11062         PR tree-optimization/84417
11063         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
11064         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
11065         (non_rewritable_lvalue_p): Likewise, use poly-ints.
11067 2018-02-16  Martin Liska  <mliska@suse.cz>
11069         PR sanitizer/84307
11070         * internal-fn.def (ASAN_CHECK): Set proper flags.
11071         (ASAN_MARK): Likewise.
11073 2018-02-16  Julia Koval  <julia.koval@intel.com>
11075         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
11076         from PTA_CANNONLAKE.
11078 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
11080         PR target/84272
11081         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
11082         Use ++iter rather than iter++ for std::list iterators.
11083         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
11084         defer deleting them until all nodes in the forest are processed.  Do
11085         free even leaf nodes.  Change to_process into auto_vec.
11087         PR bootstrap/84405
11088         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
11089         * vec.h (vec_default_construct): Use memset instead of placement new
11090         if BROKEN_VALUE_INITIALIZATION is defined.
11091         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
11092         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
11093         is defined.
11095         PR rtl-optimization/83723
11096         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
11097         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
11098         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
11099         recursive calls.
11100         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
11101         callers.
11102         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
11104 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
11106         PR rtl-optimization/81443
11107         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
11108         from inner REGs to paradoxical SUBREGs.
11110 2018-02-16  Richard Biener  <rguenther@suse.de>
11112         PR tree-optimization/84399
11113         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
11114         For operands we can analyze at their definition make sure we can
11115         analyze them at each use as well.
11117 2018-02-16  Richard Biener  <rguenther@suse.de>
11119         PR tree-optimization/84190
11120         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
11121         volatile accesses if the decl isn't volatile.
11123 2018-02-15  Jason Merrill  <jason@redhat.com>
11125         PR c++/84314 - ICE with templates and fastcall attribute.
11126         * attribs.c (build_type_attribute_qual_variant): Don't clobber
11127         TYPE_CANONICAL on an existing type.
11129 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
11131         PR tree-optimization/84383
11132         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
11133         dstoff nor call operand_equal_p if dstbase is NULL.
11135         PR tree-optimization/84334
11136         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
11137         also a CONSTANT_CLASS_P, punt.
11139 2018-02-14  Jim Wilson  <jimw@sifive.com>
11141         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
11142         first SMALL_OPERAND check.  New local min_second_step.  Move assert
11143         to where locals are set.  Add TARGET_RVC support.
11144         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
11146 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
11148         * doc/invoke.texi: Correct -Wformat-overflow code sample.
11150 2018-02-14  Martin Sebor  <msebor@redhat.com>
11152         PR tree-optimization/83698
11153         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
11154         arrays constrain the offset range to their bounds.
11155         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
11156         (builtin_access::overlap): Avoid setting the size of overlap if it's
11157         already been set.
11158         (maybe_diag_overlap): Also consider arrays when deciding what values
11159         of offsets to include in diagnostics.
11161 2018-02-14  Martin Sebor  <msebor@redhat.com>
11163         PR c/84108
11164         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
11165         that correspond to the kind of a declaration.
11167 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
11169         PR target/83984
11170         * config/pa/pa.md: Load address of PIC label using the linkage table
11171         if the label is nonlocal.
11173 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11175         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
11176         warning message if user requests -maltivec=be.
11177         * doc/invoke.texi: Document deprecation of -maltivec=be.
11179 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
11181         PR target/84220
11182         * config/rs6000/rs6000-c.c: Update definitions for
11183         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
11184         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
11186 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
11188         PR target/84239
11189         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
11190         add _get_ssp intrinsics. Remove argument from
11191         __builtin_ia32_rdssp[d|q].
11192         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
11193         * config/i386/i386-builtin.def: Remove argument from
11194         __builtin_ia32_rdssp[d|q].
11195         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
11196         ix86_expand_special_args_builtin for _rdssp[d|q].
11197         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
11198         Clear register before usage.
11199         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
11200         Add documentation for new _get_ssp and _inc_ssp intrinsics.
11202 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
11204         PR tree-optimization/84357
11205         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
11206         operand 1 of an ARRAY_REF too.
11208 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
11210         PR target/83831
11211         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
11212         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
11213         declarations.
11214         (set_of_reg): New struct.
11215         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
11216         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
11217         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
11218         functions.
11219         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
11220         Split into bitclr, bitset, bitinvert patterns if appropriate.
11221         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
11222         use rx_fuse_in_memory_bitop.
11223         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
11224         to named insn, correct maximum insn length.
11226 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
11228         PR target/79242
11229         * machmode.def: Define a complex mode for PARTIAL_INT.
11230         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
11231         MODE_PARTIAL_INT.
11232         * doc/rtl.texi: Document CSPImode.
11233         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
11234         handling.
11235         (msp430_hard_regno_nregs_with_padding): Likewise.
11237 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
11239         PR target/84279
11240         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
11242 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
11244         PR rtl-optimization/84169
11245         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
11246         we generated a parallel as new i3 and we split that to new i2 and i3
11247         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
11248         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
11249         those to i2, not i1.  Partially rewrite this scan code.
11251 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
11253         PR c/82210
11254         * stor-layout.c (place_field): For variable length fields, adjust
11255         offset_align afterwards not just based on the field's alignment,
11256         but also on the size.
11258         PR middle-end/84309
11259         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
11260         of exps and logs in the use_exp2 case.
11262 2018-02-13  Jeff Law  <law@redhat.com>
11264         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
11265         entry for "vector".
11267         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
11268         ARGS as unused.
11270 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
11272         PR debug/84342
11273         PR debug/84319
11274         * common.opt (gas-loc-support, gas-locview-support): New.
11275         (ginline-points, ginternal-reset-location-views): New.
11276         * doc/invoke.texi: Document them.  Use @itemx where intended.
11277         (gvariable-location-views): Adjust.
11278         * target.def (reset_location_view): New.
11279         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
11280         (TARGET_RESET_LOCATION_VIEW): New.
11281         * doc/tm.texi: Rebuilt.
11282         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
11283         (dwarf2out_default_as_locview_support): New.
11284         (output_asm_line_debug_info): Use option variables.
11285         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
11286         (output_loc_list): Likewise.
11287         (add_high_low_attributes): Check option variables.
11288         Don't output entry view attribute in strict mode.
11289         (gen_inlined_subroutine_die): Check option variables.
11290         (dwarf2out_inline_entry): Likewise.
11291         (init_sections_and_labels): Likewise.
11292         (dwarf2out_early_finish): Likewise.
11293         (maybe_reset_location_view): New, from...
11294         (dwarf2out_var_location): ... here.  Call it.
11295         * debug.h (dwarf2out_default_as_loc_support): Declare.
11296         (dwarf2out_default_as_locview_support): Declare.
11297         * hooks.c (hook_int_rtx_insn_0): New.
11298         * hooks.h (hook_int_rtx_insn_0): Declare.
11299         * toplev.c (process_options): Take -gas-loc-support and
11300         -gas-locview-support from dwarf2out.  Enable
11301         -gvariable-location-views by default only with locview
11302         assembler support.  Enable -ginternal-reset-location-views by
11303         default only if the target defines the corresponding hook.
11304         Enable -ginline-points by default if location views are
11305         enabled; force it disabled if statement frontiers are
11306         disabled.
11307         * tree-inline.c (expand_call_inline): Check option variables.
11308         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
11310 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
11312         PR tree-optimization/84321
11313         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
11314         handling.  Also check whether the anti-range contains any values
11315         that satisfy the mask; switch to a VR_RANGE if not.
11317 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
11319         PR sanitizer/84340
11320         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
11322 2018-02-13  Martin Jambor  <mjambor@suse.cz>
11324         PR c++/83990
11325         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
11326         of call statements, also set location of a load to a temporary.
11328 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
11330         * config/rl78/rl78.c (add_vector_labels): New function.
11331         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
11332         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
11333         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
11334         which checks that no arguments are passed.
11335         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
11336         * doc/extend.texi: Documentation for the new attribute.
11338 2018-02-13  Andreas Schwab  <schwab@suse.de>
11340         * config/riscv/linux.h (CPP_SPEC): Define.
11342 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
11344         PR target/84335
11345         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
11346         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
11347         OPTION_MASK_ISA_AES as first argument to def_builtin_const
11348         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
11349         instead of OPTION_MASK_ISA_PCLMUL as first argument to
11350         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
11351         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
11352         temporarily for AES and PCLMUL builtins.
11354         PR tree-optimization/84339
11355         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
11356         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
11357         Formatting fixes.
11359         PR middle-end/84309
11360         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
11361         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
11362         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
11363         inline function.
11364         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
11365         inline function.
11366         * omp-simd-clone.h: New file.
11367         * omp-simd-clone.c: Include omp-simd-clone.h.
11368         (expand_simd_clones): No longer static.
11369         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
11370         cgraph.h and omp-simd-clone.h.
11371         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
11372         (vect_recog_widen_shift_pattern): Formatting fix.
11373         (vect_pattern_recog_1): Don't check optab for calls.
11375         PR target/84336
11376         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
11377         operands[2] into a REG before using gen_lowpart on it.
11379 2018-02-12  Jeff Law  <law@redhat.com>
11381         PR target/83760
11382         * config/sh/sh.c (find_barrier): Consider a sibling call
11383         a barrier as well.
11385         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
11386         successfully back substituting a reg.
11388 2018-02-12  Richard Biener  <rguenther@suse.de>
11390         PR tree-optimization/84037
11391         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
11392         parameter, move visited init to caller.
11393         (vect_slp_analyze_operations): Separate cost from validity
11394         check, initialize visited once for all instances.
11395         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
11396         for all instances.
11397         * tree-vect-stmts.c (vect_model_simple_cost): Make early
11398         out an assert.
11399         (vect_model_promotion_demotion_cost): Likewise.
11400         (vectorizable_bswap): Guard cost modeling with !slp_node
11401         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
11402         SLP stmts.
11403         (vectorizable_call): Likewise.
11404         (vectorizable_conversion): Likewise.
11405         (vectorizable_assignment): Likewise.
11406         (vectorizable_shift): Likewise.
11407         (vectorizable_operation): Likewise.
11408         (vectorizable_store): Likewise.
11409         (vectorizable_load): Likewise.
11410         (vectorizable_condition): Likewise.
11411         (vectorizable_comparison): Likewise.
11413 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
11415         PR sanitizer/84307
11416         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
11417         (ASAN_MARK): Fix fnspec to account for return value, change pointer
11418         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
11420 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
11422         PR middle-end/83665
11423         * params.def (inline-min-speedup): Increase from 8 to 15.
11424         (max-inline-insns-auto): Decrease from 40 to 30.
11425         * ipa-split.c (consider_split): Add some buffer for function to
11426         be considered inlining candidate.
11427         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
11428         default values.
11430 2018-02-12  Richard Biener  <rguenther@suse.de>
11432         PR tree-optimization/84037
11433         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
11434         matched stmts if we cannot swap the non-matched ones.
11436 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
11438         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
11439         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
11440         _mm_maskz_scalef_round_ss): New intrinsics.
11441         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
11442         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
11443         __builtin_ia32_scalefss_round): Remove.
11444         (__builtin_ia32_scalefsd_mask_round,
11445         __builtin_ia32_scalefss_mask_round): New intrinsics.
11446         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
11447         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
11448         ((match_operand:VF_128 2 "<round_nimm_predicate>"
11449         "<round_constraint>")): Changed to ...
11450         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
11451         "<round_scalar_constraint>")): ... this.
11452         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
11453         %0, %1, %2<round_op3>}"): Changed to ...
11454         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
11455         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
11456         %2<round_scalar_mask_op3>}"): ... this.
11457         * config/i386/subst.md (round_scalar_nimm_predicate): New.
11459 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
11461         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
11462         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
11463         (_mm_maskz_sqrt_round_ss): New intrinsics.
11464         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
11465         (__builtin_ia32_sqrtsd_mask_round)
11466         (__builtin_ia32_sqrtss_mask_round): New builtins.
11467         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
11468         (__builtin_ia32_sqrtss_round): Remove.
11469         (__builtin_ia32_sqrtsd_mask_round)
11470         (__builtin_ia32_sqrtss_mask_round): New builtins.
11471         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
11472         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
11473         ((match_operand:VF_128 1 "vector_operand"
11474         "xBm,<round_constraint>")): Changed to ...
11475         ((match_operand:VF_128 1 "vector_operand"
11476         "xBm,<round_scalar_constraint>")): ... this.
11477         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
11478         %0, %2, %<iptr>1<round_op3>}): Changed to ...
11479         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
11480         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
11481         %<iptr>1<round_scalar_mask_op3>}): ... this.
11482         ((set_attr "prefix" "<round_prefix>")): Changed to ...
11483         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
11485 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
11487         PR target/84266
11488         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
11489         Cast vec_cmpeq result to correct type.
11490         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
11491         Cast vec_cmpgt result to correct type.
11493 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
11495         * final.c (final_scan_insn_1): Renamed from...
11496         (final_scan_insn): ... this.  New wrapper, to recover
11497         seen from the outermost call in recursive ones.
11498         * config/sparc/sparc.c (output_return): Drop seen from call.
11499         (output_sibcall): Likewise.
11500         * config/visium/visium.c (output_branch): Likewise.
11502 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
11504         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
11505         function label.
11507 2018-02-10  Alan Modra  <amodra@gmail.com>
11509         PR target/84300
11510         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
11511         Specify LR as an input.
11513 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
11515         PR sanitizer/83987
11516         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
11517         remove_member_access_dummy_vars): New functions.
11518         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
11519         lower_omp_1, execute_lower_omp): Use them.
11521         PR rtl-optimization/84308
11522         * shrink-wrap.c (spread_components): Release todo vector.
11524 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
11526         PR rtl-optimization/57193
11527         * ira-color.c (struct allocno_color_data): Add member
11528         conflict_allocno_hard_prefs.
11529         (update_conflict_allocno_hard_prefs): New.
11530         (bucket_allocno_compare_func): Add a preference based on
11531         conflict_allocno_hard_prefs.
11532         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
11533         (color_allocnos): Remove a dead code.  Initiate
11534         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
11536 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
11538         PR target/84226
11539         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
11540         constraint from =wa to wa.  Avoid a subreg on the output operand,
11541         instead use a pseudo and subreg it in a move.
11542         (p9_xxbrd_<mode>): Changed to ...
11543         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
11544         (p9_xxbrd_v2df): New expander.
11545         (p9_xxbrw_<mode>): Changed to ...
11546         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
11547         (p9_xxbrw_v4sf): New expander.
11549 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
11551         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
11553 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
11555         PR target/83926
11556         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
11557         multiply in 32-bit mode.
11558         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
11559         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
11560         mode.
11562 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
11564         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
11565         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
11566         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
11567         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
11569 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
11571         PR lto/84213
11572         * dwarf2out.c (is_trivial_indirect_ref): New function.
11573         (dwarf2out_late_global_decl): Do not generate a location
11574         attribute for variables that have a non-trivial DECL_VALUE_EXPR
11575         and that are not defined in the current unit.
11577 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
11579         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
11580         instead of a libcall for UNORDERED.
11582 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
11584         PR target/82641
11585         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
11586         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
11588 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11590         PR target/PR84295
11591         * config/s390/s390.c (s390_set_current_function): Invoke
11592         s390_indirect_branch_settings also if fndecl didn't change.
11594 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
11596         * config/rs6000/rs6000.md (blockage): Set length to zero.
11598 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
11600         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
11602 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
11604         PR sanitizer/84285
11605         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
11606         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
11607         -static-lib*san.
11609         PR debug/84252
11610         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
11611         PARALLEL incoming that failed vt_get_decl_and_offset check.
11613         PR middle-end/84237
11614         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
11615         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
11616         TREE_READONLY bit.
11617         (get_variable_section): For decls in named .bss* sections pass true as
11618         second argument to bss_initializer_p.
11620 2018-02-09  Marek Polacek  <polacek@redhat.com>
11621             Jakub Jelinek  <jakub@redhat.com>
11623         PR c++/83659
11624         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
11625         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
11626         Sync some changes from cxx_fold_indirect_ref.
11628 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
11630         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
11631         markers.
11632         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
11633         (BLOCK_INLINE_ENTRY_LABEL): New.
11634         (dwarf2out_var_location): Disregard inline entry markers.
11635         (inline_entry_data): New struct.
11636         (inline_entry_data_hasher): New hashtable type.
11637         (inline_entry_data_hasher::hash): New.
11638         (inline_entry_data_hasher::equal): New.
11639         (inline_entry_data_table): New variable.
11640         (add_high_low_attributes): Add DW_AT_entry_pc and
11641         DW_AT_GNU_entry_view attributes if a pending entry is found
11642         in inline_entry_data_table.  Add old entry_pc attribute only
11643         if debug nonbinding markers are disabled.
11644         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
11645         markers are enabled.
11646         (block_within_block_p, dwarf2out_inline_entry): New.
11647         (dwarf2out_finish): Check that no entries remained in
11648         inline_entry_data_table.
11649         * final.c (reemit_insn_block_notes): Handle inline entry notes.
11650         (final_scan_insn, notice_source_line): Likewise.
11651         (rest_of_clean_state): Skip inline entry markers.
11652         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
11653         markers.
11654         * gimple.c (gimple_build_debug_inline_entry): New.
11655         * gimple.h (enum gimple_debug_subcode): Add
11656         GIMPLE_DEBUG_INLINE_ENTRY.
11657         (gimple_build_debug_inline_entry): Declare.
11658         (gimple_debug_inline_entry_p): New.
11659         (gimple_debug_nonbind_marker_p): Adjust.
11660         * insn-notes.def (INLINE_ENTRY): New.
11661         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
11662         inline entry marker notes.
11663         (print_insn): Likewise.
11664         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
11665         (INSN_DEBUG_MARKER_KIND): Likewise.
11666         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
11667         * tree-inline.c (expand_call_inline): Build and insert
11668         debug_inline_entry stmt.
11669         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
11670         inline entry blocks early, if nonbind markers are enabled.
11671         (dump_scope_block): Dump fragment info.
11672         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
11673         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
11674         (gimple_build_debug_inline_entry): New.
11675         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
11676         Enable/disable inline entry points too.
11677         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
11678         (DEBUG_INSN): Describe inline entry markers.
11680         * common.opt (gvariable-location-views): New.
11681         (gvariable-location-views=incompat5): New.
11682         * config.in: Rebuilt.
11683         * configure: Rebuilt.
11684         * configure.ac: Test assembler for view support.
11685         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
11686         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
11687         * dwarf2out.c (var_loc_view): New typedef.
11688         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
11689         (dwarf2out_locviews_in_attribute): New.
11690         (dwarf2out_locviews_in_loclist): New.
11691         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
11692         (enum dw_line_info_opcode): Add LI_adv_address.
11693         (struct dw_line_info_table): Add view.
11694         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
11695         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
11696         (zero_view_p): New variable.
11697         (ZERO_VIEW_P): New macro.
11698         (output_asm_line_debug_info): New.
11699         (struct var_loc_node): Add view.
11700         (add_AT_view_list, AT_loc_list): New.
11701         (add_var_loc_to_decl): Add view param.  Test it against last.
11702         (new_loc_list): Add view params.  Record them.
11703         (AT_loc_list_ptr): Handle loc and view lists.
11704         (view_list_to_loc_list_val_node): New.
11705         (print_dw_val): Handle dw_val_class_view_list.
11706         (size_of_die): Likewise.
11707         (value_format): Likewise.
11708         (loc_list_has_views): New.
11709         (gen_llsym): Set vl_symbol too.
11710         (maybe_gen_llsym, skip_loc_list_entry): New.
11711         (dwarf2out_maybe_output_loclist_view_pair): New.
11712         (output_loc_list): Output view list or entries too.
11713         (output_view_list_offset): New.
11714         (output_die): Handle dw_val_class_view_list.
11715         (output_dwarf_version): New.
11716         (output_compilation_unit_header): Use it.
11717         (output_skeleton_debug_sections): Likewise.
11718         (output_rnglists, output_line_info): Likewise.
11719         (output_pubnames, output_aranges): Update version comments.
11720         (output_one_line_info_table): Output view numbers in asm comments.
11721         (dw_loc_list): Determine current endview, pass it to new_loc_list.
11722         Call maybe_gen_llsym.
11723         (loc_list_from_tree_1): Adjust.
11724         (add_AT_location_description): Create view list attribute if
11725         needed, check it's absent otherwise.
11726         (convert_cfa_to_fb_loc_list): Adjust.
11727         (maybe_emit_file): Call output_asm_line_debug_info for test.
11728         (dwarf2out_var_location): Reset views as needed.  Precompute
11729         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
11730         attribute.  Set view.
11731         (new_line_info_table): Reset next view.
11732         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
11733         (dwarf2out_source_line): Likewise.  Output view resets and labels to
11734         the assembler, or select appropriate line info opcodes.
11735         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
11736         (optimize_string_length): Catch it.  Adjust.
11737         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
11738         dw_val_class_view_list, and remove it if no longer needed.
11739         (hash_loc_list): Hash view numbers.
11740         (loc_list_hasher::equal): Compare them.
11741         (optimize_location_lists): Check whether a view list symbol is
11742         needed, and whether the locview attribute is present, and
11743         whether they match.  Remove the locview attribute if no longer
11744         needed.
11745         (index_location_lists): Call skip_loc_list_entry for test.
11746         (dwarf2out_finish): Call output_asm_line_debug_info for test.
11747         Use output_dwarf_version.
11748         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
11749         (struct dw_val_node): Add val_view_list.
11750         * final.c (SEEN_NEXT_VIEW): New.
11751         (set_next_view_needed): New.
11752         (clear_next_view_needed): New.
11753         (maybe_output_next_view): New.
11754         (final_start_function): Rename to...
11755         (final_start_function_1): ... this.  Take pointer to FIRST,
11756         add SEEN parameter.  Emit param bindings in the initial view.
11757         (final_start_function): Reintroduce SEEN-less interface.
11758         (final): Rename to...
11759         (final_1): ... this.  Take SEEN parameter.  Output final pending
11760         next view at the end.
11761         (final): Reintroduce seen-less interface.
11762         (final_scan_insn): Output pending next view before switching
11763         sections or ending a block.  Mark the next view as needed when
11764         outputting variable locations.  Notify debug backend of section
11765         changes, and of location view changes.
11766         (rest_of_handle_final): Adjust.
11767         * toplev.c (process_options): Autodetect value for debug variable
11768         location views option.  Warn on incompat5 without -gdwarf-5.
11769         * doc/invoke.texi (gvariable-location-views): New.
11770         (gvariable-location-views=incompat5): New.
11771         (gno-variable-location-views): New.
11773 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
11775         PR tree-optimization/84136
11776         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
11777         that the result of find_edge is non-NULL.
11779 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
11781         PR target/83008
11782         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
11783         storing integer register in SImode.  Fix cost of 256 and 512
11784         byte aligned SSE register store.
11786 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
11788         * config/i386/i386.c (ix86_multiplication_cost): Fix
11789         multiplication cost for TARGET_AVX512DQ.
11791 2018-02-08  Marek Polacek  <polacek@redhat.com>
11793         PR tree-optimization/84238
11794         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
11795         get_range_strlen.
11797 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11799         PR tree-optimization/84265
11800         * tree-vect-stmts.c (vectorizable_store): Don't treat
11801         VMAT_CONTIGUOUS accesses as grouped.
11802         (vectorizable_load): Likewise.
11804 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11806         PR tree-optimization/81635
11807         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
11808         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
11809         (test_round_for_mask): New functions.
11810         (wide_int_cc_tests): Call test_round_for_mask.
11811         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
11812         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
11813         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
11814         range returned by get_range_info.
11816 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
11818         PR ipa/81360
11819         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
11820         * symtab.c: Include builtins.h
11821         (symtab_node::output_to_lto_symbol_table_p): Move here
11822         from lto-streamer-out.c:output_symbol_p.
11823         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
11824         (output_symbol_p): Move all logic to symtab.c
11825         (produce_symtab): Update.
11827 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
11829         * config/s390/s390-opts.h (enum indirect_branch): Define.
11830         * config/s390/s390-protos.h (s390_return_addr_from_memory)
11831         (s390_indirect_branch_via_thunk)
11832         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
11833         (enum s390_indirect_branch_type): Define.
11834         * config/s390/s390.c (struct s390_frame_layout, struct
11835         machine_function): Remove.
11836         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
11837         (indirect_branch_table_label_no, indirect_branch_table_name):
11838         Define variables.
11839         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
11840         (enum s390_indirect_branch_option): Define.
11841         (s390_return_addr_from_memory): New function.
11842         (s390_handle_string_attribute): New function.
11843         (s390_attribute_table): Add new attribute handler.
11844         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
11845         (s390_indirect_branch_via_thunk): New function.
11846         (s390_indirect_branch_via_inline_thunk): New function.
11847         (s390_function_ok_for_sibcall): When jumping via thunk disallow
11848         sibling call optimization for non z10 compiles.
11849         (s390_emit_call): Force indirect branch target to be a single
11850         register.  Add r1 clobber for non-z10 compiles.
11851         (s390_emit_epilogue): Emit return jump via return_use expander.
11852         (s390_reorg): Handle JUMP_INSNs as execute targets.
11853         (s390_option_override_internal): Perform validity checks for the
11854         new command line options.
11855         (s390_indirect_branch_attrvalue): New function.
11856         (s390_indirect_branch_settings): New function.
11857         (s390_set_current_function): Invoke s390_indirect_branch_settings.
11858         (s390_output_indirect_thunk_function):  New function.
11859         (s390_code_end): Implement target hook.
11860         (s390_case_values_threshold): Implement target hook.
11861         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
11862         macros.
11863         * config/s390/s390.h (struct s390_frame_layout)
11864         (struct machine_function): Move here from s390.c.
11865         (TARGET_INDIRECT_BRANCH_NOBP_RET)
11866         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
11867         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
11868         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
11869         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
11870         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
11871         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
11872         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
11873         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
11874         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
11875         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
11876         (mnemonic attribute): Add values which aren't recognized
11877         automatically.
11878         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
11879         pattern for branch conversion.  Fix mnemonic attribute.
11880         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
11881         indirect branch via thunk if requested.
11882         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
11883         ("*indirect_jump"): Disable for branch conversion using out of
11884         line thunks.
11885         ("indirect_jump_via_thunk<mode>_z10")
11886         ("indirect_jump_via_thunk<mode>")
11887         ("indirect_jump_via_inlinethunk<mode>_z10")
11888         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
11889         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
11890         ("casesi_jump_via_inlinethunk<mode>_z10")
11891         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
11892         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
11893         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
11894         ("*indirect2_jump"): Disable for branch conversion.
11895         ("casesi_jump"): Turn into expander and expand patterns for branch
11896         conversion.
11897         ("return_use"): New expander.
11898         ("*return"): Emit return via thunk and rename it to ...
11899         ("*return<mode>"): ... this one.
11900         * config/s390/s390.opt: Add new options and and enum for the
11901         option values.
11903 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
11905         * lra-constraints.c (match_reload): Unconditionally use
11906         gen_lowpart_SUBREG, rather than selecting between that
11907         and equivalent gen_rtx_SUBREG code.
11909 2018-02-08  Richard Biener  <rguenther@suse.de>
11911         PR tree-optimization/84233
11912         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
11913         changed flag instead of boguously re-using phi_inserted.
11915 2018-02-08  Martin Jambor  <mjambor@suse.cz>
11917         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
11918         static local variables.
11920 2018-02-08  Richard Biener  <rguenther@suse.de>
11922         PR tree-optimization/84278
11923         * tree-vect-stmts.c (vectorizable_store): When looking for
11924         smaller vector types to perform grouped strided loads/stores
11925         make sure the mode is supported by the target.
11926         (vectorizable_load): Likewise.
11928 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
11930         * config/aarch64/aarch64.c (aarch64_components_for_bb):
11931         Increase LDP/STP opportunities by adding adjacent callee-saves.
11933 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
11935         PR rtl-optimization/84068
11936         PR rtl-optimization/83459
11937         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
11939 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
11941         PR tree-optimization/84224
11942         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
11943         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
11944         non-zero arguments.
11946 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
11948         PR target/84113
11949         * config/rs6000/altivec.md (*restore_world): Remove LR use.
11950         * config/rs6000/predicates.md (restore_world_operation): Adjust op
11951         count, remove one USE.
11953 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
11955         * doc/install.texi (Configuration): Document the
11956         --with-long-double-format={ibm,ieee} PowerPC configuration
11957         options.
11959         PR target/84154
11960         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
11961         Convert from define_expand to be define_insn_and_split.  Rework
11962         float/double/_Float128 conversions to QI/HI/SImode to work with
11963         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
11964         conversions to QI/HImode types did a store and then a load to
11965         truncate the value.  For conversions to VSX registers, don't split
11966         the insn, instead emit the code directly.  Use the code iterator
11967         any_fix to combine signed and unsigned conversions.
11968         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
11969         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
11970         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
11971         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
11972         (fix_<mode>di2_hw): Likewise.
11973         (fixuns_<mode>di2_hw): Likewise.
11974         (fix_<mode>si2_hw): Likewise.
11975         (fixuns_<mode>si2_hw): Likewise.
11976         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
11977         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
11978         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
11979         fix<uns>_trunc<SFDF:mode>si2_p8.
11980         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
11981         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
11982         (fix<uns>_<mode>_mem): Likewise.
11983         (fctiw<u>z_<mode>_mem): Likewise.
11984         (fix<uns>_<mode>_mem): Likewise.
11985         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
11986         the register allocator from doing a direct move to the GPRs to do
11987         a store, and instead use the ISA 3.0 store byte/half-word from
11988         vector register instruction.  For IEEE 128-bit floating point,
11989         also optimize stores of 32-bit ints.
11990         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
11992 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
11994         * genextract.c (push_pathstr_operand): New function to support
11995         [a-zA-Z].
11996         (walk_rtx): Call push_pathstr_operand.
11997         (print_path): Support [a-zA-Z].
11999 2018-02-07  Richard Biener  <rguenther@suse.de>
12001         PR tree-optimization/84037
12002         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
12003         (cse_and_gimplify_to_preheader): Declare.
12004         (vect_get_place_in_interleaving_chain): Likewise.
12005         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
12006         ivexpr_map.
12007         (_loop_vec_info::~_loop_vec_info): Delete it.
12008         (cse_and_gimplify_to_preheader): New function.
12009         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
12010         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
12011         (vectorizable_load): Likewise.  For grouped stores always base
12012         the IV on the first element.
12013         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
12014         condition before gimplifying.
12016 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
12018         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
12019         *DIV_EXPR and *MOD_EXPR.
12021 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
12023         PR target/84248
12024         * config/i386/i386.c (ix86_option_override_internal): Mask out
12025         the CF_SET bit when checking -fcf-protection.
12027 2018-02-07  Tom de Vries  <tom@codesourcery.com>
12029         PR libgomp/84217
12030         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
12031         enough.
12033 2018-02-07  Richard Biener  <rguenther@suse.de>
12035         PR tree-optimization/84204
12036         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
12037         this place.
12039         PR tree-optimization/84205
12040         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
12041         special-case isl_ast_op_zdiv_r.
12043         PR tree-optimization/84223
12044         * graphite-scop-detection.c (gather_bbs::before_dom_children):
12045         Only add conditions from within the region.
12046         (gather_bbs::after_dom_children): Adjust.
12048 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
12050         PR target/84209
12051         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
12052         * config/avr/avr.md: Only post-reload split REG-REG moves if
12053         either register is GENERAL_REG_P.
12055 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
12057         PR tree-optimization/84235
12058         * tree-ssa-scopedtables.c
12059         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
12060         if the subtraction is performed in floating point type where NaNs are
12061         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
12062         build 1.  Formatting fix.
12064 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
12066         PR target/84146
12067         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
12068         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
12069         and skip it regardless of bb boundaries.  Use CALL_P macro,
12070         don't test INSN_P (insn) together with CALL_P or JUMP_P check
12071         unnecessarily, formatting fix.
12073 2018-02-06  Michael Collison  <michael.collison@arm.com>
12075         * config/arm/thumb2.md:
12076         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
12077         (*thumb_mov_notscc): Ditto.
12079 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
12081         PR target/84154
12082         * config/rs6000/rs6000.md (su code attribute): Use "u" for
12083         unsigned_fix, not "s".
12085 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12087         * configure.ac (gcc_fn_eh_frame_ro): New function.
12088         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
12089         correct .eh_frame permissions.
12090         * configure: Regenerate.
12092 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
12094         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
12095         irrelevant options.
12097 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12099         * config/rs6000/rs6000.c (rs6000_option_override_internal):
12100         Display warning message for -mno-speculate-indirect-jumps.
12102 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
12104         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
12105         Undocumented.
12106         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
12108 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
12110         PR tree-optimization/84225
12111         * tree-eh.c (find_trapping_overflow): Only call
12112         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
12114 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
12116         PR target/84145
12117         * config/i386/i386.c: Reimplement the check of possible options
12118         -mibt/-mshstk conbination. Change error messages.
12119         * doc/invoke.texi: Fix a typo: remove extra '='.
12121 2018-02-06  Marek Polacek  <polacek@redhat.com>
12123         PR tree-optimization/84228
12124         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
12126 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
12128         PR target/82641
12129         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
12130         emitted arch directives.
12131         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
12132         __ARM_FEATURE_COPROC before changing architectures.
12134 2018-02-06  Richard Biener  <rguenther@suse.de>
12136         * config/i386/i386.c (print_reg): Fix typo.
12137         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
12139 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
12141         * configure: Regenerate.
12143 2018-02-05  Martin Sebor  <msebor@redhat.com>
12145         PR tree-optimization/83369
12146         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
12147         inlining context.
12149 2018-02-05  Martin Liska  <mliska@suse.cz>
12151         * doc/invoke.texi: Cherry-pick upstream r323995.
12153 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
12155         * ira.c (ira_init_register_move_cost): Adjust comment.
12157 2018-02-05  Martin Liska  <mliska@suse.cz>
12159         PR gcov-profile/84137
12160         * doc/gcov.texi: Fix typo in documentation.
12162 2018-02-05  Martin Liska  <mliska@suse.cz>
12164         PR gcov-profile/83879
12165         * doc/gcov.texi: Document necessity of --dynamic-list-data when
12166         using dlopen functionality.
12168 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
12170         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
12171         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
12172         _mm_maskz_range_ss, _mm_mask_range_round_ss,
12173         _mm_maskz_range_round_ss): New intrinsics.
12174         (__builtin_ia32_rangesd128_round)
12175         (__builtin_ia32_rangess128_round): Remove.
12176         (__builtin_ia32_rangesd128_mask_round,
12177         __builtin_ia32_rangess128_mask_round): New builtins.
12178         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
12179         __builtin_ia32_rangess128_round): Remove.
12180         (__builtin_ia32_rangesd128_mask_round,
12181         __builtin_ia32_rangess128_mask_round): New builtins.
12182         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
12183         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
12184         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
12185         "<round_saeonly_constraint>")): Changed to ...
12186         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
12187         "<round_saeonly_scalar_constraint>")): ... this.
12188         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
12189         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
12190         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
12191         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
12192         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
12194 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
12196         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
12197         options.
12198         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
12199         Remove all values except native, 8540 and 8548.
12201 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
12203         * config/i386/i386.c (ix86_output_function_return): Pass
12204         INVALID_REGNUM, instead of -1, as invalid register number to
12205         indirect_thunk_name and output_indirect_thunk.
12207 2018-02-02  Julia Koval  <julia.koval@intel.com>
12209         * config.gcc: Add -march=icelake.
12210         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
12211         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
12212         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
12213         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
12214         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
12215         (processor_target_table): Add icelake.
12216         (ix86_option_override_internal): Handle new PTAs.
12217         (get_builtin_code_for_version): Handle icelake.
12218         (M_INTEL_COREI7_ICELAKE): New.
12219         (fold_builtin_cpu): Handle icelake.
12220         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
12221         * doc/invoke.texi: Add -march=icelake.
12223 2018-02-02  Julia Koval  <julia.koval@intel.com>
12225         * config/i386/i386.c (ix86_option_override_internal): Change flags type
12226         to wide_int_bitmask.
12227         * wide-int-bitmask.h: New.
12229 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
12231         PR target/84066
12232         * config/i386/i386.md: Replace Pmode with word_mode in
12233         builtin_setjmp_setup and builtin_longjmp to support x32.
12235 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
12237         PR target/56010
12238         PR target/83743
12239         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
12240         #include "opts.h".
12241         (rs6000_supported_cpu_names): New static variable.
12242         (linux_cpu_translation_table): Likewise.
12243         (elf_platform) <cpu>: Define new static variable and use it.
12244         Translate kernel AT_PLATFORM name to canonical name if needed.
12245         Error if platform name is unknown.
12247 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
12249         PR target/84089
12250         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
12252 2018-02-01  Jeff Law  <law@redhat.com>
12254         PR target/84128
12255         * config/i386/i386.c (release_scratch_register_on_entry): Add new
12256         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
12257         the scratch if RELEASE_VIA_POP is false.
12258         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
12259         If we have to save a temporary register, decrement SIZE appropriately.
12260         Pass new arguments to release_scratch_register_on_entry.
12261         (ix86_adjust_stack_and_probe): Likewise.
12262         (ix86_emit_probe_stack_range): Pass new arguments to
12263         release_scratch_register_on_entry.
12265 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
12267         PR rtl-optimization/84157
12268         * combine.c (change_zero_ext): Use REG_P predicate in
12269         front of HARD_REGISTER_P predicate.
12271 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
12273         * config/avr/avr.c (avr_option_override): Move disabling of
12274         -fdelete-null-pointer-checks to...
12275         * common/config/avr/avr-common.c (avr_option_optimization_table):
12276         ...here.
12278 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12280         PR tree-optimization/81635
12281         * tree-data-ref.c (split_constant_offset_1): For types that
12282         wrap on overflow, try to use range info to prove that wrapping
12283         cannot occur.
12285 2018-02-01  Renlin Li  <renlin.li@arm.com>
12287         PR target/83370
12288         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
12289         TAILCALL_ADDR_REGS.
12290         (aarch64_register_move_cost): Likewise.
12291         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
12292         TAILCALL_ADDR_REGS.
12293         (REG_CLASS_NAMES): Likewise.
12294         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
12295         TAILCALL_ADDR_REGS. Remove IP registers.
12296         * config/aarch64/aarch64.md (Ucs): Update register constraint.
12298 2018-02-01  Richard Biener  <rguenther@suse.de>
12300         * domwalk.h (dom_walker::dom_walker): Add additional constructor
12301         for specifying RPO order and allow NULL for that.
12302         * domwalk.c (dom_walker::dom_walker): Likewise.
12303         (dom_walker::walk): Handle NULL RPO order.
12304         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
12305         in RPO order.
12306         (rewrite_update_dom_walker): Likewise.
12307         (mark_def_dom_walker): Likewise.
12309 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12311         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
12312         (aarch64_maybe_expand_sve_subreg_move): Declare.
12313         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
12314         * config/aarch64/predicates.md (aarch64_any_register_operand): New
12315         predicate.
12316         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
12317         that are semantically a reverse operation.
12318         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
12319         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
12320         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
12321         functions.
12322         (aarch64_can_change_mode_class): For big-endian, forbid changes
12323         between two SVE modes if they have different element sizes.
12325 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12327         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
12328         the TImode handling for big-endian targets.
12330 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12332         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
12333         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
12334         not just bytes.
12335         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
12336         Remove BSWAP handing for big-endian targets and use the form of
12337         LD1RQ appropariate for the mode.
12339 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12341         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
12342         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
12343         duplicated element.
12345 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
12347         PR tearget/83845
12348         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
12349         check for operands that need to go through aarch64_sve_reload_be.
12351 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
12353         PR tree-optimization/81661
12354         PR tree-optimization/84117
12355         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
12356         * tree-eh.c: Include gimplify.h.
12357         (find_trapping_overflow, replace_trapping_overflow,
12358         rewrite_to_non_trapping_overflow): New functions.
12359         * tree-vect-loop.c: Include tree-eh.h.
12360         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
12361         * tree-data-ref.c: Include tree-eh.h.
12362         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
12364 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
12366         PR rtl-optimization/84123
12367         * combine.c (change_zero_ext): Check if hard register satisfies
12368         can_change_dest_mode before calling gen_lowpart_SUBREG.
12370 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
12372         PR target/82444
12373         * ira.c (ira_init_register_move_cost): Remove assert.
12375 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
12377         PR rtl-optimization/84071
12378         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
12379         * doc/tm.texi: Regenerate.
12381 2018-01-31  Richard Biener  <rguenther@suse.de>
12383         PR tree-optimization/84132
12384         * tree-data-ref.c (analyze_miv_subscript): Properly
12385         check whether evolution_function_is_affine_multivariate_p
12386         before calling gcd_of_steps_may_divide_p.
12388 2018-01-31  Julia Koval  <julia.koval@intel.com>
12390         PR target/83618
12391         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
12392         * config/i386/i386.md (rdpid_rex64) New.
12393         (rdpid): Make 32bit only.
12395 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
12397         PR lto/84105
12398         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
12399         an IDENTIFIER_NODE for FUNCTION_TYPE's.
12401 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
12403         Revert
12404         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
12406         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
12408 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
12410         PR rtl-optimization/84071
12411         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
12412         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
12414 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
12416         * config/arc/arc.c (arc_handle_aux_attribute): New function.
12417         (arc_attribute_table): Add 'aux' attribute.
12418         (arc_in_small_data_p): Consider aux like variables.
12419         (arc_is_aux_reg_p): New function.
12420         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
12421         (arc_get_aux_arg): New function.
12422         (prepare_move_operands): Handle aux-register access.
12423         (arc_handle_aux_attribute): New function.
12424         * doc/extend.texi (ARC Variable attributes): Add subsection.
12426 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
12428         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
12429         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
12430         (arc_attribute_table): Add 'uncached' attribute.
12431         (arc_print_operand): Print '.di' flag for uncached memory
12432         accesses.
12433         (arc_in_small_data_p): Do not consider for small data the uncached
12434         types.
12435         (arc_is_uncached_mem_p): New function.
12436         * config/arc/predicates.md (compact_store_memory_operand): Check
12437         for uncached memory accesses.
12438         (nonvol_nonimm_operand): Likewise.
12439         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
12441 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
12443         PR c/84100
12444         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
12445         falign-loops=): Add Optimization flag.
12447 2018-01-30  Jeff Law  <law@redhat.com>
12449         PR target/84064
12450         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
12451         INT_REGISTERS_SAVED.  Check it prior to calling
12452         get_scratch_register_on_entry.
12453         (ix86_adjust_stack_and_probe): Similarly.
12454         (ix86_emit_probe_stack_range): Similarly.
12455         (ix86_expand_prologue): Corresponding changes.
12457 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12459         PR target/40411
12460         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
12461         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
12463 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
12465         PR target/84112
12466         * lra-constraints.c (curr_insn_transform): Process AND in the
12467         address.
12469 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
12471         PR rtl-optimization/83986
12472         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
12473         dependence against last_pending_memory_flush in addition to
12474         pending_jump_insns.
12476 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
12478         PR tree-optimization/81611
12479         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
12480         copies.
12482 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12484         PR target/83758
12485         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
12486         a reg rtx.
12488 2018-01-30  Richard Biener  <rguenther@suse.de>
12489             Jakub Jelinek  <jakub@redhat.com>
12491         PR tree-optimization/84111
12492         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
12493         inner loops added during recursion, as they don't have up-to-date
12494         SSA form.
12496 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
12498         PR ipa/81360
12499         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
12500         (can_inline_edge_by_limits_p): ... here.
12501         (can_early_inline_edge_p, check_callers,
12502         update_caller_keys, update_callee_keys, recursive_inlining,
12503         add_new_edges_to_heap, speculation_useful_p,
12504         inline_small_functions,
12505         inline_small_functions, flatten_function,
12506         inline_to_all_callers_1): Update.
12508 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
12510         * profile-count.c (profile_count::combine_with_ipa_count): Handle
12511         zeros correctly.
12513 2018-01-30  Richard Biener  <rguenther@suse.de>
12515         PR tree-optimization/83008
12516         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
12517         invariant and constant vector uses in stmts when they need
12518         more than one stmt.
12520 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12522         PR bootstrap/84017
12523         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
12524         * configure: Regenerate.
12526 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12528         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
12529         pattern.
12530         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
12531         Use gen_rtx_REG rather than gen_lowpart.
12533 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12535         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
12536         rather than 0 when creating partial subregs.
12538 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
12540         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
12541         of usage.
12543 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
12545         PR target/81550
12546         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
12547         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
12548         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
12549         flags.  This restores the settings used before the 2017-07-24.
12550         Turning off pre increment/decrement/modify allows IVOPTS to
12551         optimize DF/SF loops where the index is an int.
12553 2018-01-29  Richard Biener  <rguenther@suse.de>
12554             Kelvin Nilsen  <kelvin@gcc.gnu.org>
12556         PR bootstrap/80867
12557         * tree-vect-stmts.c (vectorizable_call): Don't call
12558         targetm.vectorize_builtin_md_vectorized_function if callee is
12559         NULL.
12561 2018-01-22  Carl Love  <cel@us.ibm.com>
12563         * doc/extend.tex: Fix typo in second arg in
12564         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
12566 2018-01-29  Richard Biener  <rguenther@suse.de>
12568         PR tree-optimization/84086
12569         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
12570         (flush_ssaname_freelist): When SSA names were released reset
12571         the SCEV hash table.
12573 2018-01-29  Richard Biener  <rguenther@suse.de>
12575         PR tree-optimization/84057
12576         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
12577         removed paths when removing edges.
12579 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
12581         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
12582         -mfunction-return=@var{choice}.
12584 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12586         PR diagnostic/84034
12587         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
12588         Handle CR like TAB.
12589         (layout::print_source_line): Likewise.
12590         (test_get_line_width_without_trailing_whitespace): Add test cases.
12592 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
12594         PR middle-end/84040
12595         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
12596         debug insns.
12598 2018-01-26  Jim Wilson  <jimw@sifive.com>
12600         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
12602         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
12603         specified.
12605 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
12607         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
12608         and CMP + SUB-immediate -> SUBS.
12610 2018-01-26  Martin Sebor  <msebor@redhat.com>
12612         PR tree-optimization/83896
12613         * tree-ssa-strlen.c (get_string_len): Rename...
12614         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
12615         Avoid assuming length is constant.
12616         (handle_char_store): Use HOST_WIDE_INT for string length.
12618 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
12620         PR target/81763
12621         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
12622         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
12624 2018-01-26  Richard Biener  <rguenther@suse.de>
12626         PR rtl-optimization/84003
12627         * dse.c (record_store): Only record redundant stores when
12628         the earlier store aliases at least all accesses the later one does.
12630 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
12632         PR rtl-optimization/83985
12633         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
12634         REG_CFA_RESTORE insns.
12635         (delete_unmarked_insns): Don't ignore separate shrink wrapping
12636         REG_CFA_RESTORE insns here.
12638         PR c/83989
12639         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
12640         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
12642 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12644         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
12645         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
12646         (arc_init): Likewise.
12647         (arc_override_options): Likewise.
12648         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
12649         value.
12650         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
12651         support.
12652         * config/arc/arc.h (TARGET_DBNZ): Define.
12653         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
12654         properly set the tune attribute.
12655         (dbnz): Use TARGET_DBNZ guard.
12656         * config/arc/arc.opt (mtune): Add core3 option.
12658 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12660         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
12661         recognize new pic like addresses.
12662         (arc_delegitimize_address): Clean up.
12664 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12666         * config/arc/arc-arches.def: Option mrf16 valid for all
12667         architectures.
12668         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
12669         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
12670         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
12671         * config/arc/arc-tables.opt: Regenerate.
12672         * config/arc/arc.c (arc_conditional_register_usage): Handle
12673         reduced register file case.
12674         (arc_file_start): Set must have build attributes.
12675         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
12676         mrf16 option value.
12677         * config/arc/arc.opt (mrf16): Add new option.
12678         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
12679         * config/arc/genmultilib.awk: Handle new mrf16 option.
12680         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
12681         * config/arc/t-multilib: Regenerate.
12682         * doc/invoke.texi (ARC Options): Document mrf16 option.
12684 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12686         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
12687         * config/arc/arc.c (arc_handle_secure_attribute): New function.
12688         (arc_attribute_table): Add 'secure_call' attribute.
12689         (arc_print_operand): Print secure call operand.
12690         (arc_function_ok_for_sibcall): Don't optimize tail calls when
12691         secure.
12692         (arc_is_secure_call_p): New function.  * config/arc/arc.md
12693         (call_i): Add support for sjli instruction.
12694         (call_value_i): Likewise.
12695         * config/arc/constraints.md (Csc): New constraint.
12697 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
12698             John Eric Martin  <John.Martin@emmicro-us.com>
12700         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
12701         * config/arc/arc.c (_arc_jli_section): New struct.
12702         (arc_jli_section): New type.
12703         (rc_jli_sections): New static variable.
12704         (arc_handle_jli_attribute): New function.
12705         (arc_attribute_table): Add jli_always and jli_fixed attribute.
12706         (arc_file_end): New function.
12707         (TARGET_ASM_FILE_END): Define.
12708         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
12709         (arc_add_jli_section): New function.
12710         (jli_call_scan): Likewise.
12711         (arc_reorg): Call jli_call_scan.
12712         (arc_output_addsi): Remove 'S' from printing asm operand.
12713         (arc_is_jli_call_p): New function.
12714         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
12715         operand.
12716         (movhi_insn): Likewise.
12717         (movsi_insn): Likewise.
12718         (movsi_set_cc_insn): Likewise.
12719         (loadqi_update): Likewise.
12720         (load_zeroextendqisi_update): Likewise.
12721         (load_signextendqisi_update): Likewise.
12722         (loadhi_update): Likewise.
12723         (load_zeroextendhisi_update): Likewise.
12724         (load_signextendhisi_update): Likewise.
12725         (loadsi_update): Likewise.
12726         (loadsf_update): Likewise.
12727         (movsicc_insn): Likewise.
12728         (bset_insn): Likewise.
12729         (bxor_insn): Likewise.
12730         (bclr_insn): Likewise.
12731         (bmsk_insn): Likewise.
12732         (bicsi3_insn): Likewise.
12733         (cmpsi_cc_c_insn): Likewise.
12734         (movsi_ne): Likewise.
12735         (movsi_cond_exec): Likewise.
12736         (clrsbsi2): Likewise.
12737         (norm_f): Likewise.
12738         (normw): Likewise.
12739         (swap): Likewise.
12740         (divaw): Likewise.
12741         (flag): Likewise.
12742         (sr): Likewise.
12743         (kflag): Likewise.
12744         (ffs): Likewise.
12745         (ffs_f): Likewise.
12746         (fls): Likewise.
12747         (call_i): Remove 'S' asm letter, add jli instruction.
12748         (call_value_i): Likewise.
12749         * config/arc/arc.op (mjli-always): New option.
12750         * config/arc/constraints.md (Cji): New constraint.
12751         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
12752         operand.
12753         (subsf3_fpx): Likewise.
12754         (mulsf3_fpx): Likewise.
12755         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
12756         asm operand.
12757         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
12758         function attrbutes.
12759         * doc/invoke.texi (ARC): Document mjli-always option.
12761 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
12763         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
12764         avoid addition with 0 and use incw and decw where possible.
12766 2018-01-26  Richard Biener  <rguenther@suse.de>
12768         PR tree-optimization/81082
12769         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
12770         association if it requires casting to unsigned.
12771         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
12772         from fold_plusminus_mult_expr to catch important cases late when
12773         range info is available.
12775 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12777         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
12778         * configure.ac (hidden_linkonce): New test.
12779         * configure: Regenerate.
12780         * config.in: Regenerate.
12782 2018-01-26  Julia Koval  <julia.koval@intel.com>
12784         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
12785         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
12786         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
12787         _mm_mask_bitshuffle_epi64_mask): Fix type.
12788         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
12789         USI_FTYPE_V4DI_V4DI_USI): Remove.
12790         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
12791         __builtin_ia32_vpshufbitqmb256_mask,
12792         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
12793         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
12794         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
12796 2018-01-26  Alan Modra  <amodra@gmail.com>
12798         PR target/84033
12799         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
12800         UNSPEC_VBPERMQ.  Sort other unspecs.
12802 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
12804         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
12806 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
12808         PR middle-end/83055
12809         * predict.c (drop_profile): Do not push/pop cfun; update also
12810         node->count.
12811         (handle_missing_profiles): Fix logic looking for zero profiles.
12813 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
12815         PR middle-end/83977
12816         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
12817         on functions with #pragma omp declare simd or functions with simd
12818         attribute.
12819         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
12820         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
12821         Remove trailing \n from warning_at calls.
12823 2018-01-25  Tom de Vries  <tom@codesourcery.com>
12825         PR target/84028
12826         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
12827         for neutered workers.
12829 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
12831         PR target/68467
12832         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
12833         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
12835 2018-01-24  Jeff Law  <law@redhat.com>
12837         PR target/83994
12838         * i386.c (get_probe_interval): Move to earlier point.
12839         (ix86_compute_frame_layout): If -fstack-clash-protection and
12840         the frame is larger than the probe interval, then use pushes
12841         to save registers rather than reg->mem moves.
12842         (ix86_expand_prologue): Remove conditional for int_registers_saved
12843         assertion.
12845 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
12847         PR target/84014
12848         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
12849         min/max for never referenced object.
12851 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
12853         PR middle-end/83977
12854         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
12855         here.
12856         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
12857         attributes from DECL_ATTRIBUTES (decl) without affecting
12858         DECL_ATTRIBUTES (current_function_decl).
12859         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
12860         functions with non-NULL DECL_ABSTRACT_ORIGIN.
12862 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
12864         PR tree-optimization/83979
12865         * fold-const.c (fold_comparison): Use constant_boolean_node
12866         instead of boolean_{true,false}_node.
12868 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
12870         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
12871         with zero counts.
12873 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12875         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
12876         Simplify the clause that sets the length attribute.
12877         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
12878         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
12879         clause that sets the length attribute.
12880         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
12882 2018-01-24  Tom de Vries  <tom@codesourcery.com>
12884         PR target/83589
12885         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
12886         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
12887         Add strict parameter.
12888         (prevent_branch_around_nothing): Insert dummy insn between branch to
12889         label and label with no ptx insn inbetween.
12890         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
12892 2018-01-24  Tom de Vries  <tom@codesourcery.com>
12894         PR target/81352
12895         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
12896         for neutered threads in warp.
12897         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
12899 2018-01-24  Richard Biener  <rguenther@suse.de>
12901         PR tree-optimization/83176
12902         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
12903         operands.
12905 2018-01-24  Richard Biener  <rguenther@suse.de>
12907         PR tree-optimization/82819
12908         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
12909         code generating pluses that are no-ops in the target precision.
12911 2018-01-24  Richard Biener  <rguenther@suse.de>
12913         PR middle-end/84000
12914         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
12916 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
12918         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
12919         to merge probabilities.
12920         * predict.c (probably_never_executed): Also mark as cold functions
12921         with global 0 profile and guessed local profile.
12922         * profile-count.c (profile_probability::combine_with_count): New
12923         member function.
12924         * profile-count.h (profile_probability::operator*,
12925         profile_probability::operator*=, profile_probability::operator/,
12926         profile_probability::operator/=): Reduce precision to adjusted
12927         and set value to guessed on contradictory divisions.
12928         (profile_probability::combine_with_freq): Remove.
12929         (profile_probability::combine_wiht_count): Declare.
12930         (profile_count::force_nonzero):: Set to adjusted.
12931         (profile_count::probability_in):: Set quality to adjusted.
12932         * tree-ssa-tail-merge.c (replace_block_by): Use
12933         combine_with_count.
12935 2018-01-23  Andrew Waterman  <andrew@sifive.com>
12936             Jim Wilson  <jimw@sifive.com>
12938         * config/riscv/riscv.c (riscv_stack_boundary): New.
12939         (riscv_option_override): Set riscv_stack_boundary.  Handle
12940         riscv_preferred_stack_boundary_arg.
12941         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
12942         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
12943         (STACK_BOUNDARY): Set to riscv_stack_boundary.
12944         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
12945         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
12946         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
12948 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
12950         PR target/83905
12951         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
12952         of struct ix86_frame.
12953         (ix86_expand_epilogue): Likewise.  Add a local variable for
12954         the reg_save_offset field in struct ix86_frame.
12956 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
12958         PR tree-optimization/82604
12959         * tree-loop-distribution.c (enum partition_kind): New enum item
12960         PKIND_PARTIAL_MEMSET.
12961         (partition_builtin_p): Support above new enum item.
12962         (generate_code_for_partition): Ditto.
12963         (compute_access_range): Differentiate cases that equality can be
12964         proven at all loops, the innermost loops or no loops.
12965         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
12966         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
12967         (finalize_partitions, distribute_loop): Don't fuse partition of
12968         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
12969         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
12970         parloop is enabled.
12972 2018-01-23  Martin Liska  <mliska@suse.cz>
12974         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
12975         order to ignore the predictor.
12976         (PRED_POLYMORPHIC_CALL): Likewise.
12977         (PRED_RECURSIVE_CALL): Likewise.
12979 2018-01-23  Martin Liska  <mliska@suse.cz>
12981         * tree-profile.c (tree_profiling): Print function header to
12982         aware reader which function we are working on.
12983         * value-prof.c (gimple_find_values_to_profile): Do not print
12984         not interesting value histograms.
12986 2018-01-23  Martin Liska  <mliska@suse.cz>
12988         * profile-count.h (enum profile_quality): Add
12989         profile_uninitialized as the first value. Do not number values
12990         as they are zero based.
12991         (profile_count::verify): Update sanity check.
12992         (profile_probability::verify): Likewise.
12994 2018-01-23  Nathan Sidwell  <nathan@acm.org>
12996         * doc/invoke.texi (ffor-scope): Deprecate.
12998 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
13000         PR tree-optimization/83510
13001         * domwalk.c (set_all_edges_as_executable): New function.
13002         (dom_walker::dom_walker): Convert bool param
13003         "skip_unreachable_blocks" to enum reachability.  Move setup of
13004         edge flags to set_all_edges_as_executable and only do it when
13005         reachability is REACHABLE_BLOCKS.
13006         * domwalk.h (enum dom_walker::reachability): New enum.
13007         (dom_walker::dom_walker): Convert bool param
13008         "skip_unreachable_blocks" to enum reachability.
13009         (set_all_edges_as_executable): New decl.
13010         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
13011         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
13012         "reachability".
13013         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
13014         but converting true to REACHABLE_BLOCKS.
13015         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
13016         * tree-vrp.c
13017         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
13018         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
13019         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
13020         REACHABLE_BLOCKS.
13021         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
13022         if check_all_array_refs will be called.
13024 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
13026         * tree.c (selftest::test_location_wrappers): Add more test
13027         coverage.
13029 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
13031         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
13032         (selftest::test_bit_in_range): Likewise.
13034 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
13036         PR testsuite/83888
13037         * doc/sourcebuild.texi (vect_float): Say that the selector
13038         only describes the situation when -funsafe-math-optimizations is on.
13039         (vect_float_strict): Document.
13041 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
13043         PR tree-optimization/83965
13044         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
13045         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
13046         instead of checking only for a reduction.
13047         (vect_recog_widen_sum_pattern): Likewise.
13049 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
13051         * predict.c (probably_never_executed): Only use precise profile info.
13052         (compute_function_frequency): Skip after inlining hack since we now
13053         have quality checking.
13055 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
13057         * profile-count.h (profile_probability::very_unlikely,
13058         profile_probability::unlikely, profile_probability::even): Set
13059         precision to guessed.
13061 2018-01-23  Richard Biener  <rguenther@suse.de>
13063         PR tree-optimization/83963
13064         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
13065         Properly terminate dominator walk when crossing the exit edge not
13066         when visiting its source block.
13068 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
13070         PR c++/83918
13071         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
13072         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
13074 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
13076         PR tree-optimization/83957
13077         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
13078         semicolon after for body surrounded by braces.
13080         PR tree-optimization/83081
13081         * profile-count.h (profile_probability::split): New method.
13082         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
13083         Use profile_probability::split.
13084         (do_compare_rtx_and_jump): Fix adjustment of probabilities
13085         when splitting a single conditional jump into 2.
13087 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
13089         PR tree-optimization/69452
13090         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
13091         decl.
13093 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13095         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
13096         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
13097         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
13099 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13101         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
13102         declaration.
13103         * config/rl78/rl78.md (movdi): New define_expand.
13104         * config/rl78/rl78.c (rl78_split_movdi): New function.
13106 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
13108         PR target/83862
13109         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
13110         no longer used.
13111         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
13112         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
13113         128-bit to produce an UNSPEC move to get the double word with the
13114         signbit and then a shift directly to do signbit.
13115         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
13116         implementation with a new version that just does either a direct
13117         move or a regular move.  Move memory interface to separate insns.
13118         Move insns so they are next to the expander.
13119         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
13120         with signbit move.  Split big and little endian case.
13121         (signbit<mode>2_dm_mem_le): Likewise.
13122         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
13123         (signbit<mode>2_dm2): Likewise.
13125 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13127         * config/rl78/rl78.md (anddi3): New define_expand.
13129 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13131         * config/rl78/rl78.md (umindi3): New define_expand.
13133 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13135         * config/rl78/rl78.md (smindi3): New define_expand.
13137 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13139         * config/rl78/rl78.md (smaxdi3): New define_expand.
13141 2018-01-22  Carl Love  <cel@us.ibm.com>
13143         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
13144         LVX_V1TI): Add macro expansion.
13145         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
13146         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
13147         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
13148         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
13149         Change check to determine if the instruction is a byte reversing
13150         entry.  Fix typo in comment.
13151         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
13152         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
13153         Add def_builtin calls for new builtins.
13154         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
13155         Add define_insn expansion.
13157 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13159         * config/rl78/rl78.md (umaxdi3): New define_expand.
13161 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
13163         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
13164         for non-QImode registers.
13166 2018-01-22  Richard Biener  <rguenther@suse.de>
13168         PR tree-optimization/83963
13169         * graphite-scop-detection.c (scop_detection::get_sese): Delay
13170         including the loop exit block.
13171         (scop_detection::merge_sese): Likewise.
13172         (scop_detection::add_scop): Do it here instead.
13174 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13176         * doc/sourcebuild.texi (arm_softfloat): Document.
13178 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
13180         PR gcc/77734
13181         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
13182         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
13183         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
13185 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13186             David Edelsohn  <dje.gcc@gmail.com>
13188         PR target/83946
13189         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
13190         Change "crset eq" to "crset 2".
13191         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
13192         (*call_indirect_aix<mode>_nospec): Likewise.
13193         (*call_value_indirect_aix<mode>_nospec): Likewise.
13194         (*call_indirect_elfv2<mode>_nospec): Likewise.
13195         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
13196         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
13197         change assembly output from . to $.
13198         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
13199         (indirect_jump<mode>_nospec): Change assembly output from . to $.
13200         (*tablejump<mode>_internal1_nospec): Likewise.
13202 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
13204         PR target/80870
13205         * config/sh/sh_optimize_sett_clrt.cc:
13206         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
13208 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
13210         PR tree-optimization/83940
13211         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
13212         offset_dt to vect_constant_def rather than vect_unknown_def_type.
13213         (vect_check_load_store_mask): Add a mask_dt_out parameter and
13214         use it to pass back the definition type.
13215         (vect_check_store_rhs): Likewise rhs_dt_out.
13216         (vect_build_gather_load_calls): Add a mask_dt argument and use
13217         it instead of a call to vect_is_simple_use.
13218         (vectorizable_store): Update calls to vect_check_load_store_mask
13219         and vect_check_store_rhs.  Use the dt returned by the latter instead
13220         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
13221         instead of calls to vect_is_simple_use.  Pass the scalar rather
13222         than the vector operand to vect_is_simple_use when handling
13223         second and subsequent copies of an rhs value.
13224         (vectorizable_load): Update calls to vect_check_load_store_mask
13225         and vect_build_gather_load_calls.  Use the cached mask_dt and
13226         gs_info.offset_dt instead of calls to vect_is_simple_use.
13228 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
13230         PR middle-end/83945
13231         * tree-emutls.c: Include gimplify.h.
13232         (lower_emutls_2): New function.
13233         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
13234         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
13235         it before further processing.
13237         PR target/83930
13238         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
13239         UINTVAL (trueop1) instead of INTVAL (op1).
13241 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
13243         PR debug/81570
13244         PR debug/83728
13245         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
13246         INCOMING_FRAME_SP_OFFSET if not defined.
13247         (scan_trace): Add ENTRY argument.  If true and
13248         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
13249         emit a note to adjust the CFA offset.
13250         (create_cfi_notes): Adjust scan_trace callers.
13251         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
13252         INCOMING_FRAME_SP_OFFSET in the CIE.
13253         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
13254         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
13255         Likewise.
13256         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
13257         * doc/tm.texi: Regenerated.
13259 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13261         PR rtl-optimization/83147
13262         * lra-constraints.c (remove_inheritance_pseudos): Use
13263         lra_substitute_pseudo_within_insn.
13265 2018-01-19  Tom de Vries  <tom@codesourcery.com>
13266             Cesar Philippidis  <cesar@codesourcery.com>
13268         PR target/83920
13269         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
13271 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
13273         PR target/83790
13274         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
13275         spaces for function labels.
13277 2018-01-19  Martin Liska  <mliska@suse.cz>
13279         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
13280         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
13281         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
13282         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
13283         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
13284         (PRED_CONST_RETURN): Change from 69 to 65.
13285         (PRED_NULL_RETURN): Change from 91 to 71.
13286         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
13287         (PRED_LOOP_GUARD): Change from 66 to 73.
13289 2018-01-19  Martin Liska  <mliska@suse.cz>
13291         * predict.c (predict_insn_def): Add new assert.
13292         (struct branch_predictor): Change type to signed integer.
13293         (test_prediction_value_range): Amend test to cover
13294         PROB_UNINITIALIZED.
13295         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
13296         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
13297         (PRED_LOOP_ITERATIONS_MAX): Likewise.
13298         (PRED_LOOP_IV_COMPARE): Likewise.
13299         * predict.h (PROB_UNINITIALIZED): Define new constant.
13301 2018-01-19  Martin Liska  <mliska@suse.cz>
13303         * predict.c (dump_prediction): Add new format for
13304         analyze_brprob.py script which is enabled with -details
13305         suboption.
13306         * profile-count.h (precise_p): New function.
13308 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
13310         PR tree-optimization/83922
13311         * tree-vect-loop.c (vect_verify_full_masking): Return false if
13312         there are no statements that need masking.
13313         (vect_active_double_reduction_p): New function.
13314         (vect_analyze_loop_operations): Use it when handling phis that
13315         are not in the loop header.
13317 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
13319         PR tree-optimization/83914
13320         * tree-vect-loop.c (vectorizable_induction): Don't convert
13321         init_expr or apply the peeling adjustment for inductions
13322         that are nested within the vectorized loop.
13324 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13326         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
13327         instead of NEG.
13329 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
13331         PR sanitizer/81715
13332         PR testsuite/83882
13333         * function.h (gimplify_parameters): Add gimple_seq * argument.
13334         * function.c: Include gimple.h and options.h.
13335         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
13336         for the added local temporaries if needed.
13337         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
13338         if there are any parameter cleanups, wrap whole body into a
13339         try/finally with the cleanups.
13341 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
13343         PR target/82964
13344         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
13345         Use GET_MODE_CLASS for scalar floating point.
13347 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
13349         PR ipa/82256
13350         patch by PaX Team
13351         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
13352         Fix call of call_cgraph_insertion_hooks.
13354 2018-01-18  Martin Sebor  <msebor@redhat.com>
13356         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
13358 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
13360         PR ipa/83619
13361         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
13362         frequencies.
13364 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
13366         PR other/70268
13367         * common.opt: (-ffile-prefix-map): New option.
13368         * opts.c (common_handle_option): Defer it.
13369         * opts-global.c (handle_common_deferred_options): Handle it.
13370         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
13371         * file-prefix-map.h: New file.
13372         (remap_debug_filename, add_debug_prefix_map): ...here.
13373         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
13374         * final.c (debug_prefix_map, add_debug_prefix_map
13375         remap_debug_filename): Move to...
13376         * file-prefix-map.c: New file.
13377         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
13378         generalize, get rid of alloca(), use strrchr() instead of strchr().
13379         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
13380         Implement in terms of add_prefix_map().
13381         (remap_macro_filename, remap_debug_filename): Implement in term of
13382         remap_filename().
13383         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
13384         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
13385         * dbxout.c: Include file-prefix-map.h.
13386         * varasm.c: Likewise.
13387         * vmsdbgout.c: Likewise.
13388         * xcoffout.c: Likewise.
13389         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
13390         * doc/cppopts.texi (-fmacro-prefix-map): Document.
13391         * doc/invoke.texi (-ffile-prefix-map): Document.
13392         (-fdebug-prefix-map): Update description.
13394 2018-01-18  Martin Liska  <mliska@suse.cz>
13396         * config/i386/i386.c (indirect_thunk_name): Document that also
13397         lfence is emitted.
13398         (output_indirect_thunk): Document why both instructions
13399         (pause and lfence) are generated.
13401 2018-01-18  Richard Biener  <rguenther@suse.de>
13403         PR tree-optimization/83887
13404         * graphite-scop-detection.c
13405         (scop_detection::get_nearest_dom_with_single_entry): Remove.
13406         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
13407         (scop_detection::merge_sese): Re-implement with a flood-fill
13408         algorithm that properly finds a SESE region if it exists.
13410 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
13412         PR c/61240
13413         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
13414         pointer_diff optimizations use view_convert instead of convert.
13416 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13418         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
13419         Generate different code for -mno-speculate-indirect-jumps.
13420         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
13421         (*call_indirect_aix<mode>): Disable for
13422         -mno-speculate-indirect-jumps.
13423         (*call_indirect_aix<mode>_nospec): New define_insn.
13424         (*call_value_indirect_aix<mode>): Disable for
13425         -mno-speculate-indirect-jumps.
13426         (*call_value_indirect_aix<mode>_nospec): New define_insn.
13427         (*sibcall_nonlocal_sysv<mode>): Generate different code for
13428         -mno-speculate-indirect-jumps.
13429         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
13431 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
13433         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
13434         long double type, set the flags for noting the default long double
13435         type, even if we don't pass or return a long double type.
13437 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
13439         PR ipa/83051
13440         * ipa-inline.c (flatten_function): Do not overwrite final inlining
13441         failure.
13443 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
13445         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
13446         support for merge[hl].
13447         (fold_mergehl_helper): New helper function.
13448         (tree-vector-builder.h): New #include for tree_vector_builder usage.
13449         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
13450         (altivec_vmrglw_direct): Add xxmrglw insn.
13452 2018-01-17  Andrew Waterman  <andrew@sifive.com>
13454         * config/riscv/riscv.c (riscv_conditional_register_usage): If
13455         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
13457 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
13459         PR lto/83121
13460         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
13461         call the lto_location_cache before reading the
13462         DECL_SOURCE_LOCATION of the types.
13464 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
13465             Richard Sandiford  <richard.sandiford@linaro.org>
13467         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
13468         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
13469         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
13470         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
13471         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
13472         Add declaration.
13473         * config/aarch64/constraints.md (aarch64_movti_operand):
13474         Limit immediates.
13475         * config/aarch64/predicates.md (Uti): Add new constraint.
13477 2018-01-17 Carl Love  <cel@us.ibm.com>
13479         * config/rs6000/vsx.md (define_expand xl_len_r,
13480         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
13481         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
13482         lxvll.
13483         (define_expand, define_insn): Move the shift left from  the
13484         define_insn to the define_expand for lxvl and stxvl instructions.
13485         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
13486         and XL_LEN_R definitions to PURE.
13488 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
13490         * config/i386/i386.c (indirect_thunk_name): Declare regno
13491         as unsigned int.  Compare regno with INVALID_REGNUM.
13492         (output_indirect_thunk): Ditto.
13493         (output_indirect_thunk_function): Ditto.
13494         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
13495         in the call to output_indirect_thunk_function.
13497 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
13499         PR middle-end/83884
13500         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
13501         rather than the size of inner_type to determine the stack slot size
13502         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
13504 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
13506         PR target/83546
13507         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
13508         to PTA_SILVERMONT.
13510 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
13512         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
13513         endian Linux systems to optionally enable multilibs for selecting
13514         the long double type if the user configured an explicit type.
13515         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
13516         have no long double multilibs if not defined.
13517         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
13518         warn if the user used -mabi={ieee,ibm}longdouble and we built
13519         multilibs for long double.
13520         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
13521         appropriate multilib option.
13522         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
13523         multilib options.
13524         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
13525         for building long double multilibs.
13526         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
13528 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
13530         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
13531         copies.
13533         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
13534         64 bits.
13535         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
13536         128 bits.
13538         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
13539         variables.
13541         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
13542         return value.
13544 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
13546         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
13547         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
13549 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13551         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
13552         different rtl trees depending on TARGET_64BIT.
13553         (rs6000_gen_lvx): Likewise.
13555 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
13557         * config/visium/visium.md (nop): Tweak comment.
13558         (hazard_nop): Likewise.
13560 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13562         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
13563         -mspeculate-indirect-jumps.
13564         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
13565         for -mno-speculate-indirect-jumps.
13566         (*call_indirect_elfv2<mode>_nospec): New define_insn.
13567         (*call_value_indirect_elfv2<mode>): Disable for
13568         -mno-speculate-indirect-jumps.
13569         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
13570         (indirect_jump): Emit different RTL for
13571         -mno-speculate-indirect-jumps.
13572         (*indirect_jump<mode>): Disable for
13573         -mno-speculate-indirect-jumps.
13574         (*indirect_jump<mode>_nospec): New define_insn.
13575         (tablejump): Emit different RTL for
13576         -mno-speculate-indirect-jumps.
13577         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
13578         (tablejumpsi_nospec): New define_expand.
13579         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
13580         (tablejumpdi_nospec): New define_expand.
13581         (*tablejump<mode>_internal1): Disable for
13582         -mno-speculate-indirect-jumps.
13583         (*tablejump<mode>_internal1_nospec): New define_insn.
13584         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
13585         option.
13587 2018-01-16  Artyom Skrobov tyomitch@gmail.com
13589         * caller-save.c (insert_save): Drop unnecessary parameter.  All
13590         callers updated.
13592 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13593             Richard Biener  <rguenth@suse.de>
13595         PR libgomp/83590
13596         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
13597         return early, inline manually is_gimple_sizepos.  Make sure if we
13598         call gimplify_expr we don't end up with a gimple constant.
13599         * tree.c (variably_modified_type_p): Don't return true for
13600         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
13601         * gimplify.h (is_gimple_sizepos): Remove.
13603 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13605         PR tree-optimization/83857
13606         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
13607         vectorizable_live_operation for pure SLP statements.
13608         (vectorizable_live_operation): Handle PHIs.
13610 2018-01-16  Richard Biener  <rguenther@suse.de>
13612         PR tree-optimization/83867
13613         * tree-vect-stmts.c (vect_transform_stmt): Precompute
13614         nested_in_vect_loop_p since the scalar stmt may get invalidated.
13616 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13618         PR c/83844
13619         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
13620         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
13621         If off is not INTEGER_CST, issue a may not be aligned warning
13622         rather than isn't aligned.  Use isn%'t rather than isn't.
13623         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
13624         into MULT_EXPR.
13625         <case MULT_EXPR>: Improve the case when bottom and one of the
13626         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
13627         operand, in that case check if the other operand is multiple of
13628         bottom divided by the INTEGER_CST operand.
13630 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13632         PR target/83858
13633         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
13634         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
13635         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
13636         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
13637         * config/pa/pa.c (pa_function_arg_advance): Likewise.
13638         (pa_function_arg, pa_arg_partial_bytes): Likewise.
13639         (pa_function_arg_size): New function.
13641 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13643         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
13644         in a separate statement.
13646 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
13648         PR tree-optimization/83847
13649         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
13650         group gathers and scatters.
13652 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
13654         PR rtl-optimization/86620
13655         * params.def (max-sched-ready-insns): Bump minimum value to 1.
13657         PR rtl-optimization/83213
13658         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
13659         to last if both are JUMP_INSNs.
13661         PR tree-optimization/83843
13662         * gimple-ssa-store-merging.c
13663         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
13664         store_immediate_info for bswap/nop orig_stores.
13666 2018-01-15  Andrew Waterman  <andrew@sifive.com>
13668         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
13669         !TARGET_MUL.
13670         <UDIV>: Increase cost if !TARGET_DIV.
13672 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
13674         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
13675         (define_attr "cr_logical_3op"): New.
13676         (cceq_ior_compare): Adjust.
13677         (cceq_ior_compare_complement): Adjust.
13678         (*cceq_rev_compare): Adjust.
13679         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
13680         (is_cracked_insn): Adjust.
13681         (insn_must_be_first_in_group): Adjust.
13682         * config/rs6000/40x.md: Adjust.
13683         * config/rs6000/440.md: Adjust.
13684         * config/rs6000/476.md: Adjust.
13685         * config/rs6000/601.md: Adjust.
13686         * config/rs6000/603.md: Adjust.
13687         * config/rs6000/6xx.md: Adjust.
13688         * config/rs6000/7450.md: Adjust.
13689         * config/rs6000/7xx.md: Adjust.
13690         * config/rs6000/8540.md: Adjust.
13691         * config/rs6000/cell.md: Adjust.
13692         * config/rs6000/e300c2c3.md: Adjust.
13693         * config/rs6000/e500mc.md: Adjust.
13694         * config/rs6000/e500mc64.md: Adjust.
13695         * config/rs6000/e5500.md: Adjust.
13696         * config/rs6000/e6500.md: Adjust.
13697         * config/rs6000/mpc.md: Adjust.
13698         * config/rs6000/power4.md: Adjust.
13699         * config/rs6000/power5.md: Adjust.
13700         * config/rs6000/power6.md: Adjust.
13701         * config/rs6000/power7.md: Adjust.
13702         * config/rs6000/power8.md: Adjust.
13703         * config/rs6000/power9.md: Adjust.
13704         * config/rs6000/rs64.md: Adjust.
13705         * config/rs6000/titan.md: Adjust.
13707 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13709         * config/i386/predicates.md (indirect_branch_operand): Rewrite
13710         ix86_indirect_branch_register logic.
13712 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13714         * config/i386/constraints.md (Bs): Update
13715         ix86_indirect_branch_register check.  Don't check
13716         ix86_indirect_branch_register with GOT_memory_operand.
13717         (Bw): Likewise.
13718         * config/i386/predicates.md (GOT_memory_operand): Don't check
13719         ix86_indirect_branch_register here.
13720         (GOT32_symbol_operand): Likewise.
13722 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13724         * config/i386/predicates.md (constant_call_address_operand):
13725         Rewrite ix86_indirect_branch_register logic.
13726         (sibcall_insn_operand): Likewise.
13728 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13730         * config/i386/constraints.md (Bs): Replace
13731         ix86_indirect_branch_thunk_register with
13732         ix86_indirect_branch_register.
13733         (Bw): Likewise.
13734         * config/i386/i386.md (indirect_jump): Likewise.
13735         (tablejump): Likewise.
13736         (*sibcall_memory): Likewise.
13737         (*sibcall_value_memory): Likewise.
13738         Peepholes of indirect call and jump via memory: Likewise.
13739         * config/i386/i386.opt: Likewise.
13740         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13741         (GOT_memory_operand): Likewise.
13742         (call_insn_operand): Likewise.
13743         (sibcall_insn_operand): Likewise.
13744         (GOT32_symbol_operand): Likewise.
13746 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
13748         PR middle-end/83837
13749         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
13750         type rather than type addr's type points to.
13751         (expand_omp_atomic_mutex): Likewise.
13752         (expand_omp_atomic): Likewise.
13754 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
13756         PR target/83839
13757         * config/i386/i386.c (output_indirect_thunk_function): Use
13758         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
13759         for  __x86_return_thunk.
13761 2018-01-15  Richard Biener  <rguenther@suse.de>
13763         PR middle-end/83850
13764         * expmed.c (extract_bit_field_1): Fix typo.
13766 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13768         PR target/83687
13769         * config/arm/iterators.md (VF): New mode iterator.
13770         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
13771         Remove integer-related logic from pattern.
13772         (neon_vabd<mode>_3): Likewise.
13774 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
13776         PR middle-end/82694
13777         * common.opt (fstrict-overflow): No longer an alias.
13778         (fwrapv-pointer): New option.
13779         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
13780         also for pointer types based on flag_wrapv_pointer.
13781         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
13782         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
13783         opts->x_flag_wrapv got set.
13784         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
13785         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
13786         POINTER_TYPE_OVERFLOW_UNDEFINED.
13787         * match.pd: Likewise in address comparison pattern.
13788         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
13790 2018-01-15  Richard Biener  <rguenther@suse.de>
13792         PR lto/83804
13793         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
13794         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
13795         Reset type names to their identifier if their TYPE_DECL doesn't
13796         have linkage (and thus is used for ODR and devirt).
13797         (save_debug_info_for_decl): Remove.
13798         (save_debug_info_for_type): Likewise.
13799         (add_tree_to_fld_list): Adjust.
13800         * tree-pretty-print.c (dump_generic_node): Make dumping of
13801         type names more robust.
13803 2018-01-15  Richard Biener  <rguenther@suse.de>
13805         * BASE-VER: Bump to 8.0.1.
13807 2018-01-14  Martin Sebor  <msebor@redhat.com>
13809         PR other/83508
13810         * builtins.c (check_access): Avoid warning when the no-warning bit
13811         is set.
13813 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
13815         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
13816         * ira-color (allocno_hard_regs_compare): Likewise.
13818 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
13820         PR target/83013
13821         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
13822         Use .pushsection/.popsection.
13824 2018-01-14  Martin Sebor  <msebor@redhat.com>
13826         PR c++/81327
13827         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
13829 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
13831         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
13832         entry from extra_headers.
13833         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
13834         extra_headers, make the list bitwise identical to the i?86-*-* one.
13836 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13838         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
13839         -mcmodel=large with -mindirect-branch=thunk,
13840         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
13841         -mfunction-return=thunk-extern.
13842         * doc/invoke.texi: Document -mcmodel=large is incompatible with
13843         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
13844         -mfunction-return=thunk and -mfunction-return=thunk-extern.
13846 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13848         * config/i386/i386.c (print_reg): Print the name of the full
13849         integer register without '%'.
13850         (ix86_print_operand): Handle 'V'.
13851         * doc/extend.texi: Document 'V' modifier.
13853 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13855         * config/i386/constraints.md (Bs): Disallow memory operand for
13856         -mindirect-branch-register.
13857         (Bw): Likewise.
13858         * config/i386/predicates.md (indirect_branch_operand): Likewise.
13859         (GOT_memory_operand): Likewise.
13860         (call_insn_operand): Likewise.
13861         (sibcall_insn_operand): Likewise.
13862         (GOT32_symbol_operand): Likewise.
13863         * config/i386/i386.md (indirect_jump): Call convert_memory_address
13864         for -mindirect-branch-register.
13865         (tablejump): Likewise.
13866         (*sibcall_memory): Likewise.
13867         (*sibcall_value_memory): Likewise.
13868         Disallow peepholes of indirect call and jump via memory for
13869         -mindirect-branch-register.
13870         (*call_pop): Replace m with Bw.
13871         (*call_value_pop): Likewise.
13872         (*sibcall_pop_memory): Replace m with Bs.
13873         * config/i386/i386.opt (mindirect-branch-register): New option.
13874         * doc/invoke.texi: Document -mindirect-branch-register option.
13876 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13878         * config/i386/i386-protos.h (ix86_output_function_return): New.
13879         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
13880         set function_return_type.
13881         (indirect_thunk_name): Add ret_p to indicate thunk for function
13882         return.
13883         (output_indirect_thunk_function): Pass false to
13884         indirect_thunk_name.
13885         (ix86_output_indirect_branch_via_reg): Likewise.
13886         (ix86_output_indirect_branch_via_push): Likewise.
13887         (output_indirect_thunk_function): Create alias for function
13888         return thunk if regno < 0.
13889         (ix86_output_function_return): New function.
13890         (ix86_handle_fndecl_attribute): Handle function_return.
13891         (ix86_attribute_table): Add function_return.
13892         * config/i386/i386.h (machine_function): Add
13893         function_return_type.
13894         * config/i386/i386.md (simple_return_internal): Use
13895         ix86_output_function_return.
13896         (simple_return_internal_long): Likewise.
13897         * config/i386/i386.opt (mfunction-return=): New option.
13898         (indirect_branch): Mention -mfunction-return=.
13899         * doc/extend.texi: Document function_return function attribute.
13900         * doc/invoke.texi: Document -mfunction-return= option.
13902 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
13904         * config/i386/i386-opts.h (indirect_branch): New.
13905         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
13906         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
13907         with local indirect jump when converting indirect call and jump.
13908         (ix86_set_indirect_branch_type): New.
13909         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
13910         (indirectlabelno): New.
13911         (indirect_thunk_needed): Likewise.
13912         (indirect_thunk_bnd_needed): Likewise.
13913         (indirect_thunks_used): Likewise.
13914         (indirect_thunks_bnd_used): Likewise.
13915         (INDIRECT_LABEL): Likewise.
13916         (indirect_thunk_name): Likewise.
13917         (output_indirect_thunk): Likewise.
13918         (output_indirect_thunk_function): Likewise.
13919         (ix86_output_indirect_branch_via_reg): Likewise.
13920         (ix86_output_indirect_branch_via_push): Likewise.
13921         (ix86_output_indirect_branch): Likewise.
13922         (ix86_output_indirect_jmp): Likewise.
13923         (ix86_code_end): Call output_indirect_thunk_function if needed.
13924         (ix86_output_call_insn): Call ix86_output_indirect_branch if
13925         needed.
13926         (ix86_handle_fndecl_attribute): Handle indirect_branch.
13927         (ix86_attribute_table): Add indirect_branch.
13928         * config/i386/i386.h (machine_function): Add indirect_branch_type
13929         and has_local_indirect_jump.
13930         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
13931         to true.
13932         (tablejump): Likewise.
13933         (*indirect_jump): Use ix86_output_indirect_jmp.
13934         (*tablejump_1): Likewise.
13935         (simple_return_indirect_internal): Likewise.
13936         * config/i386/i386.opt (mindirect-branch=): New option.
13937         (indirect_branch): New.
13938         (keep): Likewise.
13939         (thunk): Likewise.
13940         (thunk-inline): Likewise.
13941         (thunk-extern): Likewise.
13942         * doc/extend.texi: Document indirect_branch function attribute.
13943         * doc/invoke.texi: Document -mindirect-branch= option.
13945 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
13947         PR ipa/83051
13948         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
13950 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
13952         * ipa-inline.c (want_inline_small_function_p): Return false if
13953         inlining has already failed with CIF_FINAL_ERROR.
13954         (update_caller_keys): Call want_inline_small_function_p before
13955         can_inline_edge_p.
13956         (update_callee_keys): Likewise.
13958 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13960         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
13961         New function.
13962         (rs6000_quadword_masked_address_p): Likewise.
13963         (quad_aligned_load_p): Likewise.
13964         (quad_aligned_store_p): Likewise.
13965         (const_load_sequence_p): Add comment to describe the outer-most loop.
13966         (mimic_memory_attributes_and_flags): New function.
13967         (rs6000_gen_stvx): Likewise.
13968         (replace_swapped_aligned_store): Likewise.
13969         (rs6000_gen_lvx): Likewise.
13970         (replace_swapped_aligned_load): Likewise.
13971         (replace_swapped_load_constant): Capitalize argument name in
13972         comment describing this function.
13973         (rs6000_analyze_swaps): Add a third pass to search for vector loads
13974         and stores that access quad-word aligned addresses and replace
13975         with stvx or lvx instructions when appropriate.
13976         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
13977         New function prototype.
13978         (rs6000_quadword_masked_address_p): Likewise.
13979         (rs6000_gen_lvx): Likewise.
13980         (rs6000_gen_stvx): Likewise.
13981         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
13982         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
13983         when memory address is aligned.
13984         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
13985         this split to select lvx instruction when memory address is aligned.
13986         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
13987         instruction when memory address is aligned.
13988         (*vsx_le_perm_load_v16qi): Likewise.
13989         (four unnamed splitters): Modify to select the stvx instruction
13990         when memory is aligned.
13992 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
13994         * predict.c (determine_unlikely_bbs): Handle correctly BBs
13995         which appears in the queue multiple times.
13997 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
13998             Alan Hayward  <alan.hayward@arm.com>
13999             David Sherwood  <david.sherwood@arm.com>
14001         * tree-vectorizer.h (vec_lower_bound): New structure.
14002         (_loop_vec_info): Add check_nonzero and lower_bounds.
14003         (LOOP_VINFO_CHECK_NONZERO): New macro.
14004         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
14005         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
14006         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
14007         fields.  Make seg_len the distance travelled, not including the
14008         access size.
14009         (dr_direction_indicator): Declare.
14010         (dr_zero_step_indicator): Likewise.
14011         (dr_known_forward_stride_p): Likewise.
14012         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
14013         tree-ssanames.h.
14014         (runtime_alias_check_p): Allow runtime alias checks with
14015         variable strides.
14016         (operator ==): Compare access_size and align.
14017         (prune_runtime_alias_test_list): Rework for new distinction between
14018         the access_size and seg_len.
14019         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
14020         segment lengths.
14021         (get_segment_min_max): New function.
14022         (create_intersect_range_checks): Use it.
14023         (dr_step_indicator): New function.
14024         (dr_direction_indicator): Likewise.
14025         (dr_zero_step_indicator): Likewise.
14026         (dr_known_forward_stride_p): Likewise.
14027         * tree-loop-distribution.c (data_ref_segment_size): Return
14028         DR_STEP * (niters - 1).
14029         (compute_alias_check_pairs): Update call to the dr_with_seg_len
14030         constructor.
14031         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
14032         (vect_preserves_scalar_order_p): New function, split out from...
14033         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
14034         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
14035         (vect_vfa_access_size): New function.
14036         (vect_vfa_align): Likewise.
14037         (vect_compile_time_alias): Take access_size_a and access_b arguments.
14038         (dump_lower_bound): New function.
14039         (vect_check_lower_bound): Likewise.
14040         (vect_small_gap_p): Likewise.
14041         (vectorizable_with_step_bound_p): Likewise.
14042         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
14043         depencies if the vectorization factor is 1.  Convert the checks
14044         for nonzero steps into checks on the bounds of DR_STEP.  Try using
14045         a bunds check for variable steps if the minimum required step is
14046         relatively small. Update calls to the dr_with_seg_len
14047         constructor and to vect_compile_time_alias.
14048         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
14049         function.
14050         (vect_loop_versioning): Call it.
14051         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
14052         when retrying.
14053         (vect_estimate_min_profitable_iters): Account for any bounds checks.
14055 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14056             Alan Hayward  <alan.hayward@arm.com>
14057             David Sherwood  <david.sherwood@arm.com>
14059         * doc/sourcebuild.texi (vect_scatter_store): Document.
14060         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
14061         optabs.
14062         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
14063         Document.
14064         * genopinit.c (main): Add supports_vec_scatter_store and
14065         supports_vec_scatter_store_cached to target_optabs.
14066         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
14067         IFN_MASK_SCATTER_STORE.
14068         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
14069         functions.
14070         * internal-fn.h (internal_store_fn_p): Declare.
14071         (internal_fn_stored_value_index): Likewise.
14072         * internal-fn.c (scatter_store_direct): New macro.
14073         (expand_scatter_store_optab_fn): New function.
14074         (direct_scatter_store_optab_supported_p): New macro.
14075         (internal_store_fn_p): New function.
14076         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
14077         IFN_MASK_SCATTER_STORE.
14078         (internal_fn_mask_index): Likewise.
14079         (internal_fn_stored_value_index): New function.
14080         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
14081         for scatter stores.
14082         * optabs-query.h (supports_vec_scatter_store_p): Declare.
14083         * optabs-query.c (supports_vec_scatter_store_p): New function.
14084         * tree-vectorizer.h (vect_get_store_rhs): Declare.
14085         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
14086         true for scatter stores.
14087         (vect_gather_scatter_fn_p): Handle scatter stores too.
14088         (vect_check_gather_scatter): Consider using scatter stores if
14089         supports_vec_scatter_store_p.
14090         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
14091         scatter stores too.
14092         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
14093         internal_fn_stored_value_index.
14094         (check_load_store_masking): Handle scatter stores too.
14095         (vect_get_store_rhs): Make public.
14096         (vectorizable_call): Use internal_store_fn_p.
14097         (vectorizable_store): Handle scatter store internal functions.
14098         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
14099         when deciding whether the end of the group has been reached.
14100         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
14101         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
14102         (mask_scatter_store<mode>): New insns.
14104 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14105             Alan Hayward  <alan.hayward@arm.com>
14106             David Sherwood  <david.sherwood@arm.com>
14108         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
14109         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
14110         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
14111         function.
14112         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
14113         Use vect_truncate_gather_scatter_offset if we can't treat the
14114         operation as a normal gather load or scatter store.
14115         (get_group_load_store_type): Take the gather_scatter_info
14116         as argument.  Try using a gather load or scatter store for
14117         single-element groups.
14118         (get_load_store_type): Update calls to get_group_load_store_type
14119         and vect_use_strided_gather_scatters_p.
14121 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14122             Alan Hayward  <alan.hayward@arm.com>
14123             David Sherwood  <david.sherwood@arm.com>
14125         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
14126         optional tree argument.
14127         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
14128         null target hooks.
14129         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
14130         but continue to use the current value as a fallback.
14131         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
14132         to compare the updates.
14133         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
14134         (get_load_store_type): Use it when handling a strided access.
14135         (vect_get_strided_load_store_ops): New function.
14136         (vect_get_data_ptr_increment): Likewise.
14137         (vectorizable_load): Handle strided gather loads.  Always pass
14138         a step to vect_create_data_ref_ptr and bump_vector_ptr.
14140 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14141             Alan Hayward  <alan.hayward@arm.com>
14142             David Sherwood  <david.sherwood@arm.com>
14144         * doc/md.texi (gather_load@var{m}): Document.
14145         (mask_gather_load@var{m}): Likewise.
14146         * genopinit.c (main): Add supports_vec_gather_load and
14147         supports_vec_gather_load_cached to target_optabs.
14148         * optabs-tree.c (init_tree_optimization_optabs): Use
14149         ggc_cleared_alloc to allocate target_optabs.
14150         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
14151         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
14152         functions.
14153         * internal-fn.h (internal_load_fn_p): Declare.
14154         (internal_gather_scatter_fn_p): Likewise.
14155         (internal_fn_mask_index): Likewise.
14156         (internal_gather_scatter_fn_supported_p): Likewise.
14157         * internal-fn.c (gather_load_direct): New macro.
14158         (expand_gather_load_optab_fn): New function.
14159         (direct_gather_load_optab_supported_p): New macro.
14160         (direct_internal_fn_optab): New function.
14161         (internal_load_fn_p): Likewise.
14162         (internal_gather_scatter_fn_p): Likewise.
14163         (internal_fn_mask_index): Likewise.
14164         (internal_gather_scatter_fn_supported_p): Likewise.
14165         * optabs-query.c (supports_at_least_one_mode_p): New function.
14166         (supports_vec_gather_load_p): Likewise.
14167         * optabs-query.h (supports_vec_gather_load_p): Declare.
14168         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
14169         and memory_type field.
14170         (NUM_PATTERNS): Bump to 15.
14171         * tree-vect-data-refs.c: Include internal-fn.h.
14172         (vect_gather_scatter_fn_p): New function.
14173         (vect_describe_gather_scatter_call): Likewise.
14174         (vect_check_gather_scatter): Try using internal functions for
14175         gather loads.  Recognize existing calls to a gather load function.
14176         (vect_analyze_data_refs): Consider using gather loads if
14177         supports_vec_gather_load_p.
14178         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
14179         (vect_get_gather_scatter_offset_type): Likewise.
14180         (vect_convert_mask_for_vectype): Likewise.
14181         (vect_add_conversion_to_patterm): Likewise.
14182         (vect_try_gather_scatter_pattern): Likewise.
14183         (vect_recog_gather_scatter_pattern): New pattern recognizer.
14184         (vect_vect_recog_func_ptrs): Add it.
14185         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
14186         internal_fn_mask_index and internal_gather_scatter_fn_p.
14187         (check_load_store_masking): Take the gather_scatter_info as an
14188         argument and handle gather loads.
14189         (vect_get_gather_scatter_ops): New function.
14190         (vectorizable_call): Check internal_load_fn_p.
14191         (vectorizable_load): Likewise.  Handle gather load internal
14192         functions.
14193         (vectorizable_store): Update call to check_load_store_masking.
14194         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
14195         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
14196         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
14197         (aarch64_gather_scale_operand_d): New predicates.
14198         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
14199         (mask_gather_load<mode>): New insns.
14201 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14202             Alan Hayward  <alan.hayward@arm.com>
14203             David Sherwood  <david.sherwood@arm.com>
14205         * optabs.def (fold_left_plus_optab): New optab.
14206         * doc/md.texi (fold_left_plus_@var{m}): Document.
14207         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
14208         * internal-fn.c (fold_left_direct): Define.
14209         (expand_fold_left_optab_fn): Likewise.
14210         (direct_fold_left_optab_supported_p): Likewise.
14211         * fold-const-call.c (fold_const_fold_left): New function.
14212         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
14213         * tree-parloops.c (valid_reduction_p): New function.
14214         (gather_scalar_reductions): Use it.
14215         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
14216         (vect_finish_replace_stmt): Declare.
14217         * tree-vect-loop.c (fold_left_reduction_fn): New function.
14218         (needs_fold_left_reduction_p): New function, split out from...
14219         (vect_is_simple_reduction): ...here.  Accept reductions that
14220         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
14221         (vect_force_simple_reduction): Also store the reduction type in
14222         the assignment's STMT_VINFO_REDUC_TYPE.
14223         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
14224         (merge_with_identity): New function.
14225         (vect_expand_fold_left): Likewise.
14226         (vectorize_fold_left_reduction): Likewise.
14227         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
14228         scalar phi in place for it.  Check for target support and reject
14229         cases that would reassociate the operation.  Defer the transform
14230         phase to vectorize_fold_left_reduction.
14231         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
14232         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
14233         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
14235 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14237         * tree-if-conv.c (predicate_mem_writes): Remove redundant
14238         call to ifc_temp_var.
14240 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14241             Alan Hayward  <alan.hayward@arm.com>
14242             David Sherwood  <david.sherwood@arm.com>
14244         * target.def (legitimize_address_displacement): Take the original
14245         offset as a poly_int.
14246         * targhooks.h (default_legitimize_address_displacement): Update
14247         accordingly.
14248         * targhooks.c (default_legitimize_address_displacement): Likewise.
14249         * doc/tm.texi: Regenerate.
14250         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
14251         as an argument, moving assert of ad->disp == ad->disp_term to...
14252         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
14253         Try calling targetm.legitimize_address_displacement before expanding
14254         the address rather than afterwards, and adjust for the new interface.
14255         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
14256         Match the new hook interface.  Handle SVE addresses.
14257         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
14258         new hook interface.
14260 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14262         * Makefile.in (OBJS): Add early-remat.o.
14263         * target.def (select_early_remat_modes): New hook.
14264         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
14265         * doc/tm.texi: Regenerate.
14266         * targhooks.h (default_select_early_remat_modes): Declare.
14267         * targhooks.c (default_select_early_remat_modes): New function.
14268         * timevar.def (TV_EARLY_REMAT): New timevar.
14269         * passes.def (pass_early_remat): New pass.
14270         * tree-pass.h (make_pass_early_remat): Declare.
14271         * early-remat.c: New file.
14272         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
14273         function.
14274         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
14276 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14277             Alan Hayward  <alan.hayward@arm.com>
14278             David Sherwood  <david.sherwood@arm.com>
14280         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
14281         vfm1 with a bound_epilog parameter.
14282         (vect_do_peeling): Update calls accordingly, and move the prologue
14283         call earlier in the function.  Treat the base bound_epilog as 0 for
14284         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
14285         this base when peeling for gaps.
14286         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
14287         with fully-masked loops.
14288         (vect_estimate_min_profitable_iters): Handle the single peeled
14289         iteration in that case.
14291 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14292             Alan Hayward  <alan.hayward@arm.com>
14293             David Sherwood  <david.sherwood@arm.com>
14295         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
14296         single-element interleaving even if the size is not a power of 2.
14297         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
14298         accesses for single-element interleaving if the group size is
14299         not a power of 2.
14301 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14302             Alan Hayward  <alan.hayward@arm.com>
14303             David Sherwood  <david.sherwood@arm.com>
14305         * doc/md.texi (fold_extract_last_@var{m}): Document.
14306         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
14307         * optabs.def (fold_extract_last_optab): New optab.
14308         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
14309         * internal-fn.c (fold_extract_direct): New macro.
14310         (expand_fold_extract_optab_fn): Likewise.
14311         (direct_fold_extract_optab_supported_p): Likewise.
14312         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
14313         * tree-vect-loop.c (vect_model_reduction_cost): Handle
14314         EXTRACT_LAST_REDUCTION.
14315         (get_initial_def_for_reduction): Do not create an initial vector
14316         for EXTRACT_LAST_REDUCTION reductions.
14317         (vectorizable_reduction): Leave the scalar phi in place for
14318         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
14319         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
14320         epilogue code for EXTRACT_LAST_REDUCTION and defer the
14321         transform phase to vectorizable_condition.
14322         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
14323         split out from...
14324         (vect_finish_stmt_generation): ...here.
14325         (vect_finish_replace_stmt): New function.
14326         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
14327         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
14328         pattern.
14329         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
14331 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14332             Alan Hayward  <alan.hayward@arm.com>
14333             David Sherwood  <david.sherwood@arm.com>
14335         * doc/md.texi (extract_last_@var{m}): Document.
14336         * optabs.def (extract_last_optab): New optab.
14337         * internal-fn.def (EXTRACT_LAST): New internal function.
14338         * internal-fn.c (cond_unary_direct): New macro.
14339         (expand_cond_unary_optab_fn): Likewise.
14340         (direct_cond_unary_optab_supported_p): Likewise.
14341         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
14342         loops using EXTRACT_LAST.
14343         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
14344         (extract_last_<mode>): ...this optab.
14345         (vec_extract<mode><Vel>): Update accordingly.
14347 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14348             Alan Hayward  <alan.hayward@arm.com>
14349             David Sherwood  <david.sherwood@arm.com>
14351         * target.def (empty_mask_is_expensive): New hook.
14352         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
14353         * doc/tm.texi: Regenerate.
14354         * targhooks.h (default_empty_mask_is_expensive): Declare.
14355         * targhooks.c (default_empty_mask_is_expensive): New function.
14356         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
14357         if the target says that empty masks are expensive.
14358         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
14359         New function.
14360         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
14362 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14363             Alan Hayward  <alan.hayward@arm.com>
14364             David Sherwood  <david.sherwood@arm.com>
14366         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
14367         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
14368         (vect_use_loop_mask_for_alignment_p): New function.
14369         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
14370         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
14371         niters_skip argument.  Make sure that the first niters_skip elements
14372         of the first iteration are inactive.
14373         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
14374         Update call to vect_set_loop_masks_directly.
14375         (get_misalign_in_elems): New function, split out from...
14376         (vect_gen_prolog_loop_niters): ...here.
14377         (vect_update_init_of_dr): Take a code argument that specifies whether
14378         the adjustment should be added or subtracted.
14379         (vect_update_init_of_drs): Likewise.
14380         (vect_prepare_for_masked_peels): New function.
14381         (vect_do_peeling): Skip prologue peeling if we're using a mask
14382         instead.  Update call to vect_update_inits_of_drs.
14383         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14384         mask_skip_niters.
14385         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
14386         alignment.  Do not include the number of peeled iterations in
14387         the minimum threshold in that case.
14388         (vectorizable_induction): Adjust the start value down by
14389         LOOP_VINFO_MASK_SKIP_NITERS iterations.
14390         (vect_transform_loop): Call vect_prepare_for_masked_peels.
14391         Take the number of skipped iterations into account when calculating
14392         the loop bounds.
14393         * tree-vect-stmts.c (vect_gen_while_not): New function.
14395 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14396             Alan Hayward  <alan.hayward@arm.com>
14397             David Sherwood  <david.sherwood@arm.com>
14399         * doc/sourcebuild.texi (vect_fully_masked): Document.
14400         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
14401         default value to 0.
14402         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
14403         split out from...
14404         (vect_analyze_loop_2): ...here. Don't check the vectorization
14405         factor against the number of loop iterations if the loop is
14406         fully-masked.
14408 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14409             Alan Hayward  <alan.hayward@arm.com>
14410             David Sherwood  <david.sherwood@arm.com>
14412         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
14413         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
14414         (dump_groups): Update accordingly.
14415         (iv_use::mem_type): New member variable.
14416         (address_p): New function.
14417         (record_use): Add a mem_type argument and initialize the new
14418         mem_type field.
14419         (record_group_use): Add a mem_type argument.  Use address_p.
14420         Remove obsolete null checks of base_object.  Update call to record_use.
14421         (find_interesting_uses_op): Update call to record_group_use.
14422         (find_interesting_uses_cond): Likewise.
14423         (find_interesting_uses_address): Likewise.
14424         (get_mem_type_for_internal_fn): New function.
14425         (find_address_like_use): Likewise.
14426         (find_interesting_uses_stmt): Try find_address_like_use before
14427         calling find_interesting_uses_op.
14428         (addr_offset_valid_p): Use the iv mem_type field as the type
14429         of the addressed memory.
14430         (add_autoinc_candidates): Likewise.
14431         (get_address_cost): Likewise.
14432         (split_small_address_groups_p): Use address_p.
14433         (split_address_groups): Likewise.
14434         (add_iv_candidate_for_use): Likewise.
14435         (autoinc_possible_for_pair): Likewise.
14436         (rewrite_groups): Likewise.
14437         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
14438         (determine_group_iv_cost): Update after split of USE_ADDRESS.
14439         (get_alias_ptr_type_for_ptr_address): New function.
14440         (rewrite_use_address): Rewrite address uses in calls that were
14441         identified by find_address_like_use.
14443 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14444             Alan Hayward  <alan.hayward@arm.com>
14445             David Sherwood  <david.sherwood@arm.com>
14447         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
14448         TARGET_MEM_REFs.
14449         * gimple-expr.h (is_gimple_addressable: Likewise.
14450         * gimple-expr.c (is_gimple_address): Likewise.
14451         * internal-fn.c (expand_call_mem_ref): New function.
14452         (expand_mask_load_optab_fn): Use it.
14453         (expand_mask_store_optab_fn): Likewise.
14455 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14456             Alan Hayward  <alan.hayward@arm.com>
14457             David Sherwood  <david.sherwood@arm.com>
14459         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
14460         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
14461         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
14462         (cond_umax@var{mode}): Document.
14463         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
14464         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
14465         (cond_umin_optab, cond_umax_optab): New optabs.
14466         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
14467         (COND_IOR, COND_XOR): New internal functions.
14468         * internal-fn.h (get_conditional_internal_fn): Declare.
14469         * internal-fn.c (cond_binary_direct): New macro.
14470         (expand_cond_binary_optab_fn): Likewise.
14471         (direct_cond_binary_optab_supported_p): Likewise.
14472         (get_conditional_internal_fn): New function.
14473         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
14474         Cope with reduction statements that are vectorized as calls rather
14475         than assignments.
14476         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
14477         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
14478         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
14479         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
14480         (UNSPEC_COND_EOR): New unspecs.
14481         (optab): Add mappings for them.
14482         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
14483         (sve_int_op, sve_fp_op): New int attributes.
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         * optabs.def (while_ult_optab): New optab.
14490         * doc/md.texi (while_ult@var{m}@var{n}): Document.
14491         * internal-fn.def (WHILE_ULT): New internal function.
14492         * internal-fn.h (direct_internal_fn_supported_p): New override
14493         that takes two types as argument.
14494         * internal-fn.c (while_direct): New macro.
14495         (expand_while_optab_fn): New function.
14496         (convert_optab_supported_p): Likewise.
14497         (direct_while_optab_supported_p): New macro.
14498         * wide-int.h (wi::udiv_ceil): New function.
14499         * tree-vectorizer.h (rgroup_masks): New structure.
14500         (vec_loop_masks): New typedef.
14501         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
14502         and fully_masked_p.
14503         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
14504         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
14505         (vect_max_vf): New function.
14506         (slpeel_make_loop_iterate_ntimes): Delete.
14507         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
14508         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
14509         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
14510         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
14511         internal-fn.h, stor-layout.h and optabs-query.h.
14512         (vect_set_loop_mask): New function.
14513         (add_preheader_seq): Likewise.
14514         (add_header_seq): Likewise.
14515         (interleave_supported_p): Likewise.
14516         (vect_maybe_permute_loop_masks): Likewise.
14517         (vect_set_loop_masks_directly): Likewise.
14518         (vect_set_loop_condition_masked): Likewise.
14519         (vect_set_loop_condition_unmasked): New function, split out from
14520         slpeel_make_loop_iterate_ntimes.
14521         (slpeel_make_loop_iterate_ntimes): Rename to..
14522         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
14523         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
14524         (vect_do_peeling): Update call accordingly.
14525         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
14526         loops.
14527         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
14528         mask_compare_type, can_fully_mask_p and fully_masked_p.
14529         (release_vec_loop_masks): New function.
14530         (_loop_vec_info): Use it to free the loop masks.
14531         (can_produce_all_loop_masks_p): New function.
14532         (vect_get_max_nscalars_per_iter): Likewise.
14533         (vect_verify_full_masking): Likewise.
14534         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
14535         retries, and free the mask rgroups before retrying.  Check loop-wide
14536         reasons for disallowing fully-masked loops.  Make the final decision
14537         about whether use a fully-masked loop or not.
14538         (vect_estimate_min_profitable_iters): Do not assume that peeling
14539         for the number of iterations will be needed for fully-masked loops.
14540         (vectorizable_reduction): Disable fully-masked loops.
14541         (vectorizable_live_operation): Likewise.
14542         (vect_halve_mask_nunits): New function.
14543         (vect_double_mask_nunits): Likewise.
14544         (vect_record_loop_mask): Likewise.
14545         (vect_get_loop_mask): Likewise.
14546         (vect_transform_loop): Handle the case in which the final loop
14547         iteration might handle a partial vector.  Call vect_set_loop_condition
14548         instead of slpeel_make_loop_iterate_ntimes.
14549         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
14550         (check_load_store_masking): New function.
14551         (prepare_load_store_mask): Likewise.
14552         (vectorizable_store): Handle fully-masked loops.
14553         (vectorizable_load): Likewise.
14554         (supportable_widening_operation): Use vect_halve_mask_nunits for
14555         booleans.
14556         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
14557         (vect_gen_while): New function.
14558         * config/aarch64/aarch64.md (umax<mode>3): New expander.
14559         (aarch64_uqdec<mode>): New insn.
14561 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14562             Alan Hayward  <alan.hayward@arm.com>
14563             David Sherwood  <david.sherwood@arm.com>
14565         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
14566         (reduc_xor_scal_optab): New optabs.
14567         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
14568         (reduc_xor_scal_@var{m}): Document.
14569         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
14570         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
14571         internal functions.
14572         * fold-const-call.c (fold_const_call): Handle them.
14573         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
14574         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
14575         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
14576         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
14577         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
14578         (UNSPEC_XORV): New unspecs.
14579         (optab): Add entries for them.
14580         (BITWISEV): New int iterator.
14581         (bit_reduc_op): New int attributes.
14583 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14584             Alan Hayward  <alan.hayward@arm.com>
14585             David Sherwood  <david.sherwood@arm.com>
14587         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
14588         * internal-fn.def (VEC_SHL_INSERT): New internal function.
14589         * optabs.def (vec_shl_insert_optab): New optab.
14590         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
14591         (duplicate_and_interleave): Likewise.
14592         * tree-vect-loop.c: Include internal-fn.h.
14593         (neutral_op_for_slp_reduction): New function, split out from
14594         get_initial_defs_for_reduction.
14595         (get_initial_def_for_reduction): Handle option 2 for variable-length
14596         vectors by loading the neutral value into a vector and then shifting
14597         the initial value into element 0.
14598         (get_initial_defs_for_reduction): Replace the code argument with
14599         the neutral value calculated by neutral_op_for_slp_reduction.
14600         Use gimple_build_vector for constant-length vectors.
14601         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
14602         but the first group_size elements have a neutral value.
14603         Use duplicate_and_interleave otherwise.
14604         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
14605         Update call to get_initial_defs_for_reduction.  Handle SLP
14606         reductions for variable-length vectors by creating one vector
14607         result for each scalar result, with the elements associated
14608         with other scalar results stubbed out with the neutral value.
14609         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
14610         Require IFN_VEC_SHL_INSERT for double reductions on
14611         variable-length vectors, or SLP reductions that have
14612         a neutral value.  Require can_duplicate_and_interleave_p
14613         support for variable-length unchained SLP reductions if there
14614         is no neutral value, such as for MIN/MAX reductions.  Also require
14615         the number of vector elements to be a multiple of the number of
14616         SLP statements when doing variable-length unchained SLP reductions.
14617         Update call to vect_create_epilog_for_reduction.
14618         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
14619         and remove initial values.
14620         (duplicate_and_interleave): Make public.
14621         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
14622         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
14624 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14625             Alan Hayward  <alan.hayward@arm.com>
14626             David Sherwood  <david.sherwood@arm.com>
14628         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
14629         (can_duplicate_and_interleave_p): New function.
14630         (vect_get_and_check_slp_defs): Take the vector of statements
14631         rather than just the current one.  Remove excess parentheses.
14632         Restriction rejectinon of vect_constant_def and vect_external_def
14633         for variable-length vectors to boolean types, or types for which
14634         can_duplicate_and_interleave_p is false.
14635         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
14636         (duplicate_and_interleave): New function.
14637         (vect_get_constant_vectors): Use gimple_build_vector for
14638         constant-length vectors and suitable variable-length constant
14639         vectors.  Use duplicate_and_interleave for other variable-length
14640         vectors.  Don't defer the update when inserting new statements.
14642 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14643             Alan Hayward  <alan.hayward@arm.com>
14644             David Sherwood  <david.sherwood@arm.com>
14646         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
14647         min_profitable_iters doesn't go negative.
14649 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14650             Alan Hayward  <alan.hayward@arm.com>
14651             David Sherwood  <david.sherwood@arm.com>
14653         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
14654         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
14655         * optabs.def (vec_mask_load_lanes_optab): New optab.
14656         (vec_mask_store_lanes_optab): Likewise.
14657         * internal-fn.def (MASK_LOAD_LANES): New internal function.
14658         (MASK_STORE_LANES): Likewise.
14659         * internal-fn.c (mask_load_lanes_direct): New macro.
14660         (mask_store_lanes_direct): Likewise.
14661         (expand_mask_load_optab_fn): Handle masked operations.
14662         (expand_mask_load_lanes_optab_fn): New macro.
14663         (expand_mask_store_optab_fn): Handle masked operations.
14664         (expand_mask_store_lanes_optab_fn): New macro.
14665         (direct_mask_load_lanes_optab_supported_p): Likewise.
14666         (direct_mask_store_lanes_optab_supported_p): Likewise.
14667         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
14668         parameter.
14669         (vect_load_lanes_supported): Likewise.
14670         * tree-vect-data-refs.c (strip_conversion): New function.
14671         (can_group_stmts_p): Likewise.
14672         (vect_analyze_data_ref_accesses): Use it instead of checking
14673         for a pair of assignments.
14674         (vect_store_lanes_supported): Take a masked_p parameter.
14675         (vect_load_lanes_supported): Likewise.
14676         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
14677         vect_store_lanes_supported and vect_load_lanes_supported.
14678         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
14679         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
14680         parameter.  Don't allow gaps for masked accesses.
14681         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
14682         and vect_load_lanes_supported.
14683         (get_load_store_type): Take a masked_p parameter and update
14684         call to get_group_load_store_type.
14685         (vectorizable_store): Update call to get_load_store_type.
14686         Handle IFN_MASK_STORE_LANES.
14687         (vectorizable_load): Update call to get_load_store_type.
14688         Handle IFN_MASK_LOAD_LANES.
14690 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14691             Alan Hayward  <alan.hayward@arm.com>
14692             David Sherwood  <david.sherwood@arm.com>
14694         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
14695         modes for SVE.
14696         * config/aarch64/aarch64-protos.h
14697         (aarch64_sve_struct_memory_operand_p): Declare.
14698         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
14699         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
14700         (VPRED, vpred): Handle SVE structure modes.
14701         * config/aarch64/constraints.md (Utx): New constraint.
14702         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
14703         (aarch64_sve_struct_nonimmediate_operand): New predicates.
14704         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
14705         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
14706         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
14707         structure modes.  Split into pieces after RA.
14708         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
14709         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
14710         New patterns.
14711         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
14712         SVE structure modes.
14713         (aarch64_classify_address): Likewise.
14714         (sizetochar): Move earlier in file.
14715         (aarch64_print_operand): Handle SVE register lists.
14716         (aarch64_array_mode): New function.
14717         (aarch64_sve_struct_memory_operand_p): Likewise.
14718         (TARGET_ARRAY_MODE): Redefine.
14720 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14721             Alan Hayward  <alan.hayward@arm.com>
14722             David Sherwood  <david.sherwood@arm.com>
14724         * target.def (array_mode): New target hook.
14725         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
14726         * doc/tm.texi: Regenerate.
14727         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
14728         * hooks.c (hook_optmode_mode_uhwi_none): New function.
14729         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
14730         targetm.array_mode.
14731         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
14732         type sizes.
14734 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14735             Alan Hayward  <alan.hayward@arm.com>
14736             David Sherwood  <david.sherwood@arm.com>
14738         * fold-const.c (fold_binary_loc): Check the argument types
14739         rather than the result type when testing for a vector operation.
14741 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14743         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
14744         * doc/tm.texi: Regenerate.
14746 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
14747             Alan Hayward  <alan.hayward@arm.com>
14748             David Sherwood  <david.sherwood@arm.com>
14750         * doc/invoke.texi (-msve-vector-bits=): Document new option.
14751         (sve): Document new AArch64 extension.
14752         * doc/md.texi (w): Extend the description of the AArch64
14753         constraint to include SVE vectors.
14754         (Upl, Upa): Document new AArch64 predicate constraints.
14755         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
14756         enum.
14757         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
14758         (msve-vector-bits=): New option.
14759         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
14760         SVE when these are disabled.
14761         (sve): New extension.
14762         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
14763         modes.  Adjust their number of units based on aarch64_sve_vg.
14764         (MAX_BITSIZE_MODE_ANY_MODE): Define.
14765         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
14766         aarch64_addr_query_type.
14767         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
14768         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
14769         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
14770         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
14771         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
14772         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
14773         (aarch64_simd_imm_zero_p): Delete.
14774         (aarch64_check_zero_based_sve_index_immediate): Declare.
14775         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
14776         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
14777         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
14778         (aarch64_sve_float_mul_immediate_p): Likewise.
14779         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
14780         rather than an rtx.
14781         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
14782         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
14783         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
14784         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
14785         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
14786         (aarch64_regmode_natural_size): Likewise.
14787         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
14788         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
14789         left one place.
14790         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
14791         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
14792         for VG and the SVE predicate registers.
14793         (V_ALIASES): Add a "z"-prefixed alias.
14794         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
14795         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
14796         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
14797         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
14798         (REG_CLASS_NAMES): Add entries for them.
14799         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
14800         and the predicate registers.
14801         (aarch64_sve_vg): Declare.
14802         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
14803         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
14804         (REGMODE_NATURAL_SIZE): Define.
14805         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
14806         SVE macros.
14807         * config/aarch64/aarch64.c: Include cfgrtl.h.
14808         (simd_immediate_info): Add a constructor for series vectors,
14809         and an associated step field.
14810         (aarch64_sve_vg): New variable.
14811         (aarch64_dbx_register_number): Handle VG and the predicate registers.
14812         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
14813         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
14814         (VEC_ANY_DATA, VEC_STRUCT): New constants.
14815         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
14816         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
14817         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
14818         (aarch64_get_mask_mode): New functions.
14819         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
14820         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
14821         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
14822         predicate modes and predicate registers.  Explicitly restrict
14823         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
14824         to store a vector mode if it is recognized by
14825         aarch64_classify_vector_mode.
14826         (aarch64_regmode_natural_size): New function.
14827         (aarch64_hard_regno_caller_save_mode): Return the original mode
14828         for predicates.
14829         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
14830         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
14831         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
14832         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
14833         functions.
14834         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
14835         does not overlap dest if the function is frame-related.  Handle
14836         SVE constants.
14837         (aarch64_split_add_offset): New function.
14838         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
14839         them aarch64_add_offset.
14840         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
14841         and update call to aarch64_sub_sp.
14842         (aarch64_add_cfa_expression): New function.
14843         (aarch64_expand_prologue): Pass extra temporary registers to the
14844         functions above.  Handle the case in which we need to emit new
14845         DW_CFA_expressions for registers that were originally saved
14846         relative to the stack pointer, but now have to be expressed
14847         relative to the frame pointer.
14848         (aarch64_output_mi_thunk): Pass extra temporary registers to the
14849         functions above.
14850         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
14851         IP0 and IP1 values for SVE frames.
14852         (aarch64_expand_vec_series): New function.
14853         (aarch64_expand_sve_widened_duplicate): Likewise.
14854         (aarch64_expand_sve_const_vector): Likewise.
14855         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
14856         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
14857         into the register, rather than emitting a SET directly.
14858         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
14859         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
14860         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
14861         (offset_9bit_signed_scaled_p): New functions.
14862         (aarch64_replicate_bitmask_imm): New function.
14863         (aarch64_bitmask_imm): Use it.
14864         (aarch64_cannot_force_const_mem): Reject expressions involving
14865         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
14866         (aarch64_classify_index): Handle SVE indices, by requiring
14867         a plain register index with a scale that matches the element size.
14868         (aarch64_classify_address): Handle SVE addresses.  Assert that
14869         the mode of the address is VOIDmode or an integer mode.
14870         Update call to aarch64_classify_symbol.
14871         (aarch64_classify_symbolic_expression): Update call to
14872         aarch64_classify_symbol.
14873         (aarch64_const_vec_all_in_range_p): New function.
14874         (aarch64_print_vector_float_operand): Likewise.
14875         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
14876         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
14877         and the FP immediates 1.0 and 0.5.
14878         (aarch64_print_address_internal): Handle SVE addresses.
14879         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
14880         (aarch64_regno_regclass): Handle predicate registers.
14881         (aarch64_secondary_reload): Handle big-endian reloads of SVE
14882         data modes.
14883         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
14884         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
14885         (aarch64_convert_sve_vector_bits): New function.
14886         (aarch64_override_options): Use it to handle -msve-vector-bits=.
14887         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
14888         rather than an rtx.
14889         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
14890         Handle SVE vector and predicate modes.  Accept VL-based constants
14891         that need only one temporary register, and VL offsets that require
14892         no temporary registers.
14893         (aarch64_conditional_register_usage): Mark the predicate registers
14894         as fixed if SVE isn't available.
14895         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
14896         Return true for SVE vector and predicate modes.
14897         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
14898         rather than an unsigned int.  Handle SVE modes.
14899         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
14900         SVE modes.
14901         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
14902         if SVE is enabled.
14903         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
14904         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
14905         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
14906         (aarch64_sve_float_mul_immediate_p): New functions.
14907         (aarch64_sve_valid_immediate): New function.
14908         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
14909         Explicitly reject structure modes.  Check for INDEX constants.
14910         Handle PTRUE and PFALSE constants.
14911         (aarch64_check_zero_based_sve_index_immediate): New function.
14912         (aarch64_simd_imm_zero_p): Delete.
14913         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
14914         vector modes.  Accept constants in the range of CNT[BHWD].
14915         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
14916         ask for an Advanced SIMD mode.
14917         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
14918         (aarch64_simd_vector_alignment): Handle SVE predicates.
14919         (aarch64_vectorize_preferred_vector_alignment): New function.
14920         (aarch64_simd_vector_alignment_reachable): Use it instead of
14921         the vector size.
14922         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
14923         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
14924         functions.
14925         (MAX_VECT_LEN): Delete.
14926         (expand_vec_perm_d): Add a vec_flags field.
14927         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
14928         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
14929         (aarch64_evpc_ext): Don't apply a big-endian lane correction
14930         for SVE modes.
14931         (aarch64_evpc_rev): Rename to...
14932         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
14933         (aarch64_evpc_rev_global): New function.
14934         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
14935         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
14936         MAX_VECT_LEN.
14937         (aarch64_evpc_sve_tbl): New function.
14938         (aarch64_expand_vec_perm_const_1): Update after rename of
14939         aarch64_evpc_rev.  Handle SVE permutes too, trying
14940         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
14941         than aarch64_evpc_tbl.
14942         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
14943         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
14944         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
14945         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
14946         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
14947         (aarch64_expand_sve_vcond): New functions.
14948         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
14949         of aarch64_vector_mode_p.
14950         (aarch64_dwarf_poly_indeterminate_value): New function.
14951         (aarch64_compute_pressure_classes): Likewise.
14952         (aarch64_can_change_mode_class): Likewise.
14953         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
14954         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
14955         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
14956         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
14957         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
14958         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
14959         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
14960         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
14961         constraints.
14962         (Dn, Dl, Dr): Accept const as well as const_vector.
14963         (Dz): Likewise.  Compare against CONST0_RTX.
14964         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
14965         of "vector" where appropriate.
14966         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
14967         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
14968         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
14969         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
14970         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
14971         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
14972         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
14973         (v_int_equiv): Extend to SVE modes.
14974         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
14975         mode attributes.
14976         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
14977         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
14978         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
14979         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
14980         (SVE_COND_FP_CMP): New int iterators.
14981         (perm_hilo): Handle the new unpack unspecs.
14982         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
14983         attributes.
14984         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
14985         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
14986         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
14987         (aarch64_equality_operator, aarch64_constant_vector_operand)
14988         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
14989         (aarch64_sve_nonimmediate_operand): Likewise.
14990         (aarch64_sve_general_operand): Likewise.
14991         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
14992         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
14993         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
14994         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
14995         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
14996         (aarch64_sve_float_arith_immediate): Likewise.
14997         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
14998         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
14999         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
15000         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
15001         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
15002         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
15003         (aarch64_sve_float_arith_operand): Likewise.
15004         (aarch64_sve_float_arith_with_sub_operand): Likewise.
15005         (aarch64_sve_float_mul_operand): Likewise.
15006         (aarch64_sve_vec_perm_operand): Likewise.
15007         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
15008         (aarch64_mov_operand): Accept const_poly_int and const_vector.
15009         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
15010         as well as const_vector.
15011         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
15012         in file.  Use CONST0_RTX and CONSTM1_RTX.
15013         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
15014         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
15015         Use aarch64_simd_imm_zero.
15016         * config/aarch64/aarch64-sve.md: New file.
15017         * config/aarch64/aarch64.md: Include it.
15018         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
15019         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
15020         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
15021         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
15022         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
15023         (sve): New attribute.
15024         (enabled): Disable instructions with the sve attribute unless
15025         TARGET_SVE.
15026         (movqi, movhi): Pass CONST_POLY_INT operaneds through
15027         aarch64_expand_mov_immediate.
15028         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
15029         CNT[BHSD] immediates.
15030         (movti): Split CONST_POLY_INT moves into two halves.
15031         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
15032         Split additions that need a temporary here if the destination
15033         is the stack pointer.
15034         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
15035         (*add<mode>3_poly_1): New instruction.
15036         (set_clobber_cc): New expander.
15038 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15040         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
15041         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
15042         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
15043         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
15044         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
15045         Change innermode from fixed_mode_size to machine_mode.
15046         (simplify_subreg): Update call accordingly.  Handle a constant-sized
15047         subreg of a variable-length CONST_VECTOR.
15049 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
15050             Alan Hayward  <alan.hayward@arm.com>
15051             David Sherwood  <david.sherwood@arm.com>
15053         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
15054         (add_offset_to_base): New function, split out from...
15055         (create_mem_ref): ...here.  When handling a scale other than 1,
15056         check first whether the address is valid without the offset.
15057         Add it into the base if so, leaving the index and scale as-is.
15059 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
15061         PR c++/83778
15062         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
15063         fold_for_warn before checking if arg2 is INTEGER_CST.
15065 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
15067         * config/rs6000/predicates.md (load_multiple_operation): Delete.
15068         (store_multiple_operation): Delete.
15069         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
15070         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
15071         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
15072         guarded by TARGET_STRING.
15073         (rs6000_output_load_multiple): Delete.
15074         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
15075         OPTION_MASK_STRING / TARGET_STRING handling.
15076         (print_operand) <'N', 'O'>: Add comment that these are unused now.
15077         (const rs6000_opt_masks) <"string">: Change mask to 0.
15078         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
15079         (MASK_STRING): Delete.
15080         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
15081         parts.  Simplify.
15082         (load_multiple): Delete.
15083         (*ldmsi8): Delete.
15084         (*ldmsi7): Delete.
15085         (*ldmsi6): Delete.
15086         (*ldmsi5): Delete.
15087         (*ldmsi4): Delete.
15088         (*ldmsi3): Delete.
15089         (store_multiple): Delete.
15090         (*stmsi8): Delete.
15091         (*stmsi7): Delete.
15092         (*stmsi6): Delete.
15093         (*stmsi5): Delete.
15094         (*stmsi4): Delete.
15095         (*stmsi3): Delete.
15096         (movmemsi_8reg): Delete.
15097         (corresponding unnamed define_insn): Delete.
15098         (movmemsi_6reg): Delete.
15099         (corresponding unnamed define_insn): Delete.
15100         (movmemsi_4reg): Delete.
15101         (corresponding unnamed define_insn): Delete.
15102         (movmemsi_2reg): Delete.
15103         (corresponding unnamed define_insn): Delete.
15104         (movmemsi_1reg): Delete.
15105         (corresponding unnamed define_insn): Delete.
15106         * config/rs6000/rs6000.opt (mno-string): New.
15107         (mstring): Replace by deprecation warning stub.
15108         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
15110 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
15112         * regrename.c (regrename_do_replace): If replacing the same
15113         reg multiple times, try to reuse last created gen_raw_REG.
15115         PR debug/81155
15116         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
15117         main to workaround a bug in GDB.
15119 2018-01-12  Tom de Vries  <tom@codesourcery.com>
15121         PR target/83737
15122         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
15124 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
15126         PR rtl-optimization/80481
15127         * ira-color.c (get_cap_member): New function.
15128         (allocnos_conflict_by_live_ranges_p): Use it.
15129         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
15130         (setup_slot_coalesced_allocno_live_ranges): Ditto.
15132 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
15134         PR target/83628
15135         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
15136         (*saddl_se_1): Ditto.
15137         (*ssubsi_1): Ditto.
15138         (*ssubl_se_1): Ditto.
15140 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
15142         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
15143         rather than wi::to_widest for DR_INITs.
15144         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
15145         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
15146         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
15147         INTEGER_CSTs.
15148         (vect_analyze_group_access_1): Note that here.
15150 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
15152         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
15153         polynomial type sizes.
15155 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
15157         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
15158         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
15159         (gimple_add_tmp_var): Likewise.
15161 2018-01-12  Martin Liska  <mliska@suse.cz>
15163         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
15164         (gimple_alloc_sizes): Likewise.
15165         (dump_gimple_statistics): Use PRIu64 in printf format.
15166         * gimple.h: Change uint64_t to int.
15168 2018-01-12  Martin Liska  <mliska@suse.cz>
15170         * tree-core.h: Use uint64_t instead of int.
15171         * tree.c (tree_node_counts): Likewise.
15172         (tree_node_sizes): Likewise.
15173         (dump_tree_statistics): Use PRIu64 in printf format.
15175 2018-01-12  Martin Liska  <mliska@suse.cz>
15177         * Makefile.in: As qsort_chk is implemented in vec.c, add
15178         vec.o to linkage of gencfn-macros.
15179         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
15180         passing the info to record_node_allocation_statistics.
15181         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
15182         and pass the info.
15183         * ggc-common.c (struct ggc_usage): Add operator== and use
15184         it in operator< and compare function.
15185         * mem-stats.h (struct mem_usage): Likewise.
15186         * vec.c (struct vec_usage): Remove operator< and compare
15187         function. Can be simply inherited.
15189 2018-01-12  Martin Jambor  <mjambor@suse.cz>
15191         PR target/81616
15192         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
15193         * tree-ssa-math-opts.c: Include domwalk.h.
15194         (convert_mult_to_fma_1): New function.
15195         (fma_transformation_info): New type.
15196         (fma_deferring_state): Likewise.
15197         (cancel_fma_deferring): New function.
15198         (result_of_phi): Likewise.
15199         (last_fma_candidate_feeds_initial_phi): Likewise.
15200         (convert_mult_to_fma): Added deferring logic, split actual
15201         transformation to convert_mult_to_fma_1.
15202         (math_opts_dom_walker): New type.
15203         (math_opts_dom_walker::after_dom_children): New method, body moved
15204         here from pass_optimize_widening_mul::execute, added deferring logic
15205         bits.
15206         (pass_optimize_widening_mul::execute): Moved most of code to
15207         math_opts_dom_walker::after_dom_children.
15208         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
15209         * config/i386/i386.c (ix86_option_override_internal): Added
15210         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
15212 2018-01-12  Richard Biener  <rguenther@suse.de>
15214         PR debug/83157
15215         * dwarf2out.c (gen_variable_die): Do not reset old_die for
15216         inline instance vars.
15218 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
15220         PR target/81819
15221         * config/rx/rx.c (rx_is_restricted_memory_address):
15222         Handle SUBREG case.
15224 2018-01-12  Richard Biener  <rguenther@suse.de>
15226         PR tree-optimization/80846
15227         * target.def (split_reduction): New target hook.
15228         * targhooks.c (default_split_reduction): New function.
15229         * targhooks.h (default_split_reduction): Declare.
15230         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
15231         target requests first reduce vectors by combining low and high
15232         parts.
15233         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
15234         (get_vectype_for_scalar_type_and_size): Export.
15235         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
15236         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
15237         * doc/tm.texi: Regenerate.
15238         * config/i386/i386.c (ix86_split_reduction): Implement
15239         TARGET_VECTORIZE_SPLIT_REDUCTION.
15241 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
15243         PR target/83368
15244         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
15245         in PIC mode except for TARGET_VXWORKS_RTP.
15246         * config/sparc/sparc.c: Include cfgrtl.h.
15247         (TARGET_INIT_PIC_REG): Define.
15248         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
15249         (sparc_pic_register_p): New predicate.
15250         (sparc_legitimate_address_p): Use it.
15251         (sparc_legitimize_pic_address): Likewise.
15252         (sparc_delegitimize_address): Likewise.
15253         (sparc_mode_dependent_address_p): Likewise.
15254         (gen_load_pcrel_sym): Remove 4th parameter.
15255         (load_got_register): Adjust call to above.  Remove obsolete stuff.
15256         (sparc_expand_prologue): Do not call load_got_register here.
15257         (sparc_flat_expand_prologue): Likewise.
15258         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
15259         (sparc_use_pseudo_pic_reg): New function.
15260         (sparc_init_pic_reg): Likewise.
15261         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
15262         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
15264 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
15266         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
15267         Add item for branch_cost.
15269 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
15271         PR rtl-optimization/83565
15272         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
15273         not extend the result to a larger mode for rotate operations.
15274         (num_sign_bit_copies1): Likewise.
15276 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15278         PR target/40411
15279         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
15280         -symbolic.
15281         Use values-Xc.o for -pedantic.
15282         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
15284 2018-01-12  Martin Liska  <mliska@suse.cz>
15286         PR ipa/83054
15287         * ipa-devirt.c (final_warning_record::grow_type_warnings):
15288         New function.
15289         (possible_polymorphic_call_targets): Use it.
15290         (ipa_devirt): Likewise.
15292 2018-01-12  Martin Liska  <mliska@suse.cz>
15294         * profile-count.h (enum profile_quality): Use 0 as invalid
15295         enum value of profile_quality.
15297 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
15299         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
15300         -mext-string options.
15302 2018-01-12  Richard Biener  <rguenther@suse.de>
15304         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
15305         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
15306         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
15307         Likewise.
15308         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
15310 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
15312         * configure.ac (--with-long-double-format): Add support for the
15313         configuration option to change the default long double format on
15314         PowerPC systems.
15315         * config.gcc (powerpc*-linux*-*): Likewise.
15316         * configure: Regenerate.
15317         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
15318         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
15319         used without modification.
15321 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
15323         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
15324         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
15325         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
15326         MISC_BUILTIN_SPEC_BARRIER.
15327         (rs6000_init_builtins): Likewise.
15328         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
15329         enum value.
15330         (speculation_barrier): New define_insn.
15331         * doc/extend.texi: Document __builtin_speculation_barrier.
15333 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
15335         PR target/83203
15336         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
15337         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
15338         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
15339         iterators.
15340         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
15341         integral modes instead of "ss" and "sd".
15342         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
15343         vectors with 32-bit and 64-bit elements.
15344         (vecdupssescalarmodesuffix): New mode attribute.
15345         (vec_dup<mode>): Use it.
15347 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
15349         PR target/83330
15350         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
15351         frame if argument is passed on stack.
15353 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
15355         PR target/82682
15356         * ree.c (combine_reaching_defs): Optimize also
15357         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
15358         reg2=any_extend(exp); reg1=reg2;, formatting fix.
15360 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
15362         PR middle-end/83189
15363         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
15365 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
15367         PR middle-end/83718
15368         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
15369         after they are computed.
15371 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
15373         PR tree-optimization/83695
15374         * gimple-loop-linterchange.cc
15375         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
15376         reset cached scev information after interchange.
15377         (pass_linterchange::execute): Remove call to scev_reset_htab.
15379 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15381         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
15382         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
15383         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
15384         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
15385         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
15386         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
15387         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
15388         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
15389         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
15390         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
15391         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
15392         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
15393         (V_lane_reg): Likewise.
15394         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
15395         New define_expand.
15396         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
15397         (vfmal_lane_low<mode>_intrinsic,
15398         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
15399         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
15400         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
15401         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
15402         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
15403         vfmsl_lane_high<mode>_intrinsic): New define_insns.
15405 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15407         * config/arm/arm-cpus.in (fp16fml): New feature.
15408         (ALL_SIMD): Add fp16fml.
15409         (armv8.2-a): Add fp16fml as an option.
15410         (armv8.3-a): Likewise.
15411         (armv8.4-a): Add fp16fml as part of fp16.
15412         * config/arm/arm.h (TARGET_FP16FML): Define.
15413         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
15414         when appropriate.
15415         * config/arm/arm-modes.def (V2HF): Define.
15416         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
15417         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
15418         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
15419         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
15420         vfmsl_low, vfmsl_high): New set of builtins.
15421         * config/arm/iterators.md (PLUSMINUS): New code iterator.
15422         (vfml_op): New code attribute.
15423         (VFMLHALVES): New int iterator.
15424         (VFML, VFMLSEL): New mode attributes.
15425         (V_reg): Define mapping for V2HF.
15426         (V_hi, V_lo): New mode attributes.
15427         (VF_constraint): Likewise.
15428         (vfml_half, vfml_half_selector): New int attributes.
15429         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
15430         define_expand.
15431         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
15432         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
15433         New define_insn.
15434         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
15435         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
15436         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
15437         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
15438         documentation.
15439         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
15440         Document new effective target and option set.
15442 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15444         * config/arm/arm-cpus.in (armv8_4): New feature.
15445         (ARMv8_4a): New fgroup.
15446         (armv8.4-a): New arch.
15447         * config/arm/arm-tables.opt: Regenerate.
15448         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
15449         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
15450         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
15451         Add matching rules for -march=armv8.4-a and extensions.
15452         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
15454 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
15456         PR target/81821
15457         * config/rx/rx.md (BW): New mode attribute.
15458         (sync_lock_test_and_setsi): Add mode suffix to insn output.
15460 2018-01-11  Richard Biener  <rguenther@suse.de>
15462         PR tree-optimization/83435
15463         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
15464         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
15465         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
15467 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15468             Alan Hayward  <alan.hayward@arm.com>
15469             David Sherwood  <david.sherwood@arm.com>
15471         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
15472         field.
15473         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
15474         (aarch64_print_address_internal): Use it to check for a zero offset.
15476 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15477             Alan Hayward  <alan.hayward@arm.com>
15478             David Sherwood  <david.sherwood@arm.com>
15480         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
15481         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
15482         Return a poly_int64 rather than a HOST_WIDE_INT.
15483         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
15484         rather than a HOST_WIDE_INT.
15485         * config/aarch64/aarch64.h (aarch64_frame): Protect with
15486         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
15487         hard_fp_offset, frame_size, initial_adjust, callee_offset and
15488         final_offset from HOST_WIDE_INT to poly_int64.
15489         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
15490         to_constant when getting the number of units in an Advanced SIMD
15491         mode.
15492         (aarch64_builtin_vectorized_function): Check for a constant number
15493         of units.
15494         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
15495         GET_MODE_SIZE.
15496         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
15497         attribute instead of GET_MODE_NUNITS.
15498         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
15499         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
15500         GET_MODE_SIZE for fixed-size registers.
15501         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
15502         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
15503         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
15504         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
15505         (aarch64_print_operand, aarch64_print_address_internal)
15506         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
15507         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
15508         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
15509         Handle polynomial GET_MODE_SIZE.
15510         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
15511         wider than SImode without modification.
15512         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
15513         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
15514         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
15515         passing and returning SVE modes.
15516         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
15517         rather than GEN_INT.
15518         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
15519         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
15520         (aarch64_allocate_and_probe_stack_space): Likewise.
15521         (aarch64_layout_frame): Cope with polynomial offsets.
15522         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
15523         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
15524         polynomial offsets.
15525         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
15526         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
15527         poly_int64 rather than a HOST_WIDE_INT.
15528         (aarch64_get_separate_components, aarch64_process_components)
15529         (aarch64_expand_prologue, aarch64_expand_epilogue)
15530         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
15531         (aarch64_anchor_offset): New function, split out from...
15532         (aarch64_legitimize_address): ...here.
15533         (aarch64_builtin_vectorization_cost): Handle polynomial
15534         TYPE_VECTOR_SUBPARTS.
15535         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
15536         GET_MODE_NUNITS.
15537         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
15538         number of elements from the PARALLEL rather than the mode.
15539         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
15540         rather than GET_MODE_BITSIZE.
15541         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
15542         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
15543         (aarch64_expand_vec_perm_const_1): Handle polynomial
15544         d->perm.length () and d->perm elements.
15545         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
15546         Apply to_constant to d->perm elements.
15547         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
15548         polynomial CONST_VECTOR_NUNITS.
15549         (aarch64_move_pointer): Take amount as a poly_int64 rather
15550         than an int.
15551         (aarch64_progress_pointer): Avoid temporary variable.
15552         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
15553         the mode attribute instead of GET_MODE.
15555 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15556             Alan Hayward  <alan.hayward@arm.com>
15557             David Sherwood  <david.sherwood@arm.com>
15559         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
15560         x exists before using it.
15561         (aarch64_add_constant_internal): Rename to...
15562         (aarch64_add_offset_1): ...this.  Replace regnum with separate
15563         src and dest rtxes.  Handle the case in which they're different,
15564         including when the offset is zero.  Replace scratchreg with an rtx.
15565         Use 2 additions if there is no spare register into which we can
15566         move a 16-bit constant.
15567         (aarch64_add_constant): Delete.
15568         (aarch64_add_offset): Replace reg with separate src and dest
15569         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
15570         Use aarch64_add_offset_1.
15571         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
15572         an rtx rather than an int.  Take the delta as a poly_int64
15573         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
15574         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
15575         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
15576         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
15577         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
15578         and aarch64_add_sp.
15579         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
15580         aarch64_add_constant.
15582 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15584         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
15585         Use scalar_float_mode.
15587 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15589         * config/aarch64/aarch64-simd.md
15590         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
15591         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
15592         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
15593         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
15594         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
15595         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
15596         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
15597         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
15598         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
15599         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
15601 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15603         PR target/83514
15604         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
15605         targ_options->x_arm_arch_string is non NULL.
15607 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
15609         * config/aarch64/aarch64.h
15610         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
15612 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
15614         PR target/82096
15615         * expmed.c (emit_store_flag_force): Swap if const op0
15616         and change VOIDmode to mode of op0.
15618 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
15620         PR rtl-optimization/83761
15621         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
15622         than bytes to mode_for_size.
15624 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
15626         PR middle-end/83189
15627         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
15628         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
15629         profile.
15631 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
15633         PR middle-end/83575
15634         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
15635         when in layout mode.
15636         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
15637         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
15638         partition fixup.
15640 2018-01-10  Michael Collison  <michael.collison@arm.com>
15642         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
15643         * config/aarch64/aarch64-option-extension.def: Add
15644         AARCH64_OPT_EXTENSION of 'fp16fml'.
15645         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15646         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
15647         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
15648         * config/aarch64/constraints.md (Ui7): New constraint.
15649         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
15650         (VFMLA_SEL_W): Ditto.
15651         (f16quad): Ditto.
15652         (f16mac1): Ditto.
15653         (VFMLA16_LOW): New int iterator.
15654         (VFMLA16_HIGH): Ditto.
15655         (UNSPEC_FMLAL): New unspec.
15656         (UNSPEC_FMLSL): Ditto.
15657         (UNSPEC_FMLAL2): Ditto.
15658         (UNSPEC_FMLSL2): Ditto.
15659         (f16mac): New code attribute.
15660         * config/aarch64/aarch64-simd-builtins.def
15661         (aarch64_fmlal_lowv2sf): Ditto.
15662         (aarch64_fmlsl_lowv2sf): Ditto.
15663         (aarch64_fmlalq_lowv4sf): Ditto.
15664         (aarch64_fmlslq_lowv4sf): Ditto.
15665         (aarch64_fmlal_highv2sf): Ditto.
15666         (aarch64_fmlsl_highv2sf): Ditto.
15667         (aarch64_fmlalq_highv4sf): Ditto.
15668         (aarch64_fmlslq_highv4sf): Ditto.
15669         (aarch64_fmlal_lane_lowv2sf): Ditto.
15670         (aarch64_fmlsl_lane_lowv2sf): Ditto.
15671         (aarch64_fmlal_laneq_lowv2sf): Ditto.
15672         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
15673         (aarch64_fmlalq_lane_lowv4sf): Ditto.
15674         (aarch64_fmlsl_lane_lowv4sf): Ditto.
15675         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
15676         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
15677         (aarch64_fmlal_lane_highv2sf): Ditto.
15678         (aarch64_fmlsl_lane_highv2sf): Ditto.
15679         (aarch64_fmlal_laneq_highv2sf): Ditto.
15680         (aarch64_fmlsl_laneq_highv2sf): Ditto.
15681         (aarch64_fmlalq_lane_highv4sf): Ditto.
15682         (aarch64_fmlsl_lane_highv4sf): Ditto.
15683         (aarch64_fmlalq_laneq_highv4sf): Ditto.
15684         (aarch64_fmlsl_laneq_highv4sf): Ditto.
15685         * config/aarch64/aarch64-simd.md:
15686         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
15687         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
15688         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
15689         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
15690         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
15691         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
15692         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
15693         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
15694         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
15695         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
15696         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
15697         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
15698         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
15699         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
15700         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
15701         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
15702         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
15703         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
15704         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
15705         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
15706         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
15707         (vfmlsl_low_u32): Ditto.
15708         (vfmlalq_low_u32): Ditto.
15709         (vfmlslq_low_u32): Ditto.
15710         (vfmlal_high_u32): Ditto.
15711         (vfmlsl_high_u32): Ditto.
15712         (vfmlalq_high_u32): Ditto.
15713         (vfmlslq_high_u32): Ditto.
15714         (vfmlal_lane_low_u32): Ditto.
15715         (vfmlsl_lane_low_u32): Ditto.
15716         (vfmlal_laneq_low_u32): Ditto.
15717         (vfmlsl_laneq_low_u32): Ditto.
15718         (vfmlalq_lane_low_u32): Ditto.
15719         (vfmlslq_lane_low_u32): Ditto.
15720         (vfmlalq_laneq_low_u32): Ditto.
15721         (vfmlslq_laneq_low_u32): Ditto.
15722         (vfmlal_lane_high_u32): Ditto.
15723         (vfmlsl_lane_high_u32): Ditto.
15724         (vfmlal_laneq_high_u32): Ditto.
15725         (vfmlsl_laneq_high_u32): Ditto.
15726         (vfmlalq_lane_high_u32): Ditto.
15727         (vfmlslq_lane_high_u32): Ditto.
15728         (vfmlalq_laneq_high_u32): Ditto.
15729         (vfmlslq_laneq_high_u32): Ditto.
15730         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
15731         (AARCH64_FL_FOR_ARCH8_4): New.
15732         (AARCH64_ISA_F16FML): New ISA flag.
15733         (TARGET_F16FML): New feature flag for fp16fml.
15734         (doc/invoke.texi): Document new fp16fml option.
15736 2018-01-10  Michael Collison  <michael.collison@arm.com>
15738         * config/aarch64/aarch64-builtins.c:
15739         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
15740         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15741         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
15742         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
15743         (AARCH64_ISA_SHA3): New ISA flag.
15744         (TARGET_SHA3): New feature flag for sha3.
15745         * config/aarch64/iterators.md (sha512_op): New int attribute.
15746         (CRYPTO_SHA512): New int iterator.
15747         (UNSPEC_SHA512H): New unspec.
15748         (UNSPEC_SHA512H2): Ditto.
15749         (UNSPEC_SHA512SU0): Ditto.
15750         (UNSPEC_SHA512SU1): Ditto.
15751         * config/aarch64/aarch64-simd-builtins.def
15752         (aarch64_crypto_sha512hqv2di): New builtin.
15753         (aarch64_crypto_sha512h2qv2di): Ditto.
15754         (aarch64_crypto_sha512su0qv2di): Ditto.
15755         (aarch64_crypto_sha512su1qv2di): Ditto.
15756         (aarch64_eor3qv8hi): Ditto.
15757         (aarch64_rax1qv2di): Ditto.
15758         (aarch64_xarqv2di): Ditto.
15759         (aarch64_bcaxqv8hi): Ditto.
15760         * config/aarch64/aarch64-simd.md:
15761         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
15762         (aarch64_crypto_sha512su0qv2di): Ditto.
15763         (aarch64_crypto_sha512su1qv2di): Ditto.
15764         (aarch64_eor3qv8hi): Ditto.
15765         (aarch64_rax1qv2di): Ditto.
15766         (aarch64_xarqv2di): Ditto.
15767         (aarch64_bcaxqv8hi): Ditto.
15768         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
15769         (vsha512h2q_u64): Ditto.
15770         (vsha512su0q_u64): Ditto.
15771         (vsha512su1q_u64): Ditto.
15772         (veor3q_u16): Ditto.
15773         (vrax1q_u64): Ditto.
15774         (vxarq_u64): Ditto.
15775         (vbcaxq_u16): Ditto.
15776         * config/arm/types.md (crypto_sha512): New type attribute.
15777         (crypto_sha3): Ditto.
15778         (doc/invoke.texi): Document new sha3 option.
15780 2018-01-10  Michael Collison  <michael.collison@arm.com>
15782         * config/aarch64/aarch64-builtins.c:
15783         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
15784         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15785         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
15786         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
15787         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
15788         (AARCH64_ISA_SM4): New ISA flag.
15789         (TARGET_SM4): New feature flag for sm4.
15790         * config/aarch64/aarch64-simd-builtins.def
15791         (aarch64_sm3ss1qv4si): Ditto.
15792         (aarch64_sm3tt1aq4si): Ditto.
15793         (aarch64_sm3tt1bq4si): Ditto.
15794         (aarch64_sm3tt2aq4si): Ditto.
15795         (aarch64_sm3tt2bq4si): Ditto.
15796         (aarch64_sm3partw1qv4si): Ditto.
15797         (aarch64_sm3partw2qv4si): Ditto.
15798         (aarch64_sm4eqv4si): Ditto.
15799         (aarch64_sm4ekeyqv4si): Ditto.
15800         * config/aarch64/aarch64-simd.md:
15801         (aarch64_sm3ss1qv4si): Ditto.
15802         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
15803         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
15804         (aarch64_sm4eqv4si): Ditto.
15805         (aarch64_sm4ekeyqv4si): Ditto.
15806         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
15807         (sm3part_op): Ditto.
15808         (CRYPTO_SM3TT): Ditto.
15809         (CRYPTO_SM3PART): Ditto.
15810         (UNSPEC_SM3SS1): New unspec.
15811         (UNSPEC_SM3TT1A): Ditto.
15812         (UNSPEC_SM3TT1B): Ditto.
15813         (UNSPEC_SM3TT2A): Ditto.
15814         (UNSPEC_SM3TT2B): Ditto.
15815         (UNSPEC_SM3PARTW1): Ditto.
15816         (UNSPEC_SM3PARTW2): Ditto.
15817         (UNSPEC_SM4E): Ditto.
15818         (UNSPEC_SM4EKEY): Ditto.
15819         * config/aarch64/constraints.md (Ui2): New constraint.
15820         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
15821         * config/arm/types.md (crypto_sm3): New type attribute.
15822         (crypto_sm4): Ditto.
15823         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
15824         (vsm3tt1aq_u32): Ditto.
15825         (vsm3tt1bq_u32): Ditto.
15826         (vsm3tt2aq_u32): Ditto.
15827         (vsm3tt2bq_u32): Ditto.
15828         (vsm3partw1q_u32): Ditto.
15829         (vsm3partw2q_u32): Ditto.
15830         (vsm4eq_u32): Ditto.
15831         (vsm4ekeyq_u32): Ditto.
15832         (doc/invoke.texi): Document new sm4 option.
15834 2018-01-10  Michael Collison  <michael.collison@arm.com>
15836         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
15837         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
15838         (AARCH64_FL_FOR_ARCH8_4): New.
15839         (AARCH64_FL_V8_4): New flag.
15840         (doc/invoke.texi): Document new armv8.4-a option.
15842 2018-01-10  Michael Collison  <michael.collison@arm.com>
15844         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
15845         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
15846         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
15847         * config/aarch64/aarch64-option-extension.def: Add
15848         AARCH64_OPT_EXTENSION of 'sha2'.
15849         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
15850         (crypto): Disable sha2 and aes if crypto disabled.
15851         (crypto): Enable aes and sha2 if enabled.
15852         (simd): Disable sha2 and aes if simd disabled.
15853         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
15854         New flags.
15855         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
15856         (TARGET_SHA2): New feature flag for sha2.
15857         (TARGET_AES): New feature flag for aes.
15858         * config/aarch64/aarch64-simd.md:
15859         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
15860         conditional on TARGET_AES.
15861         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
15862         (aarch64_crypto_sha1hsi): Make pattern conditional
15863         on TARGET_SHA2.
15864         (aarch64_crypto_sha1hv4si): Ditto.
15865         (aarch64_be_crypto_sha1hv4si): Ditto.
15866         (aarch64_crypto_sha1su1v4si): Ditto.
15867         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
15868         (aarch64_crypto_sha1su0v4si): Ditto.
15869         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
15870         (aarch64_crypto_sha256su0v4si): Ditto.
15871         (aarch64_crypto_sha256su1v4si): Ditto.
15872         (doc/invoke.texi): Document new aes and sha2 options.
15874 2018-01-10  Martin Sebor  <msebor@redhat.com>
15876         PR tree-optimization/83781
15877         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
15878         as string arrays.
15880 2018-01-11  Martin Sebor  <msebor@gmail.com>
15881             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
15883         PR tree-optimization/83501
15884         PR tree-optimization/81703
15886         * tree-ssa-strlen.c (get_string_cst): Rename...
15887         (get_string_len): ...to this.  Handle global constants.
15888         (handle_char_store): Adjust.
15890 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
15891             Jim Wilson  <jimw@sifive.com>
15893         * config/riscv/riscv-protos.h (riscv_output_return): New.
15894         * config/riscv/riscv.c (struct machine_function): New naked_p field.
15895         (riscv_attribute_table, riscv_output_return),
15896         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
15897         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
15898         (riscv_compute_frame_info): Only compute frame->mask if not a naked
15899         function.
15900         (riscv_expand_prologue): Add early return for naked function.
15901         (riscv_expand_epilogue): Likewise.
15902         (riscv_function_ok_for_sibcall): Return false for naked function.
15903         (riscv_set_current_function): New.
15904         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
15905         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
15906         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
15907         * doc/extend.texi (RISC-V Function Attributes): New.
15909 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
15911         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
15912         check for 128-bit long double before checking TCmode.
15913         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
15914         128-bit long doubles before checking TFmode or TCmode.
15915         (FLOAT128_IBM_P): Likewise.
15917 2018-01-10  Martin Sebor  <msebor@redhat.com>
15919         PR tree-optimization/83671
15920         * builtins.c (c_strlen): Unconditionally return zero for the empty
15921         string.
15922         Use -Warray-bounds for warnings.
15923         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
15924         for non-constant array indices with COMPONENT_REF, arrays of
15925         arrays, and pointers to arrays.
15926         (gimple_fold_builtin_strlen): Determine and set length range for
15927         non-constant character arrays.
15929 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
15931         PR middle-end/81897
15932         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
15933         empty blocks.
15935 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
15937         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
15939 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
15941         PR target/83399
15942         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
15943         VECTOR_MEM_ALTIVEC_OR_VSX_P.
15944         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
15945         indexed_or_indirect_operand predicate.
15946         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
15947         (*vsx_le_perm_load_v8hi): Likewise.
15948         (*vsx_le_perm_load_v16qi): Likewise.
15949         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
15950         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
15951         (*vsx_le_perm_store_v8hi): Likewise.
15952         (*vsx_le_perm_store_v16qi): Likewise.
15953         (eight unnamed splitters): Likewise.
15955 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
15957         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
15958         * config/rs6000/emmintrin.h: Likewise.
15959         * config/rs6000/mmintrin.h: Likewise.
15960         * config/rs6000/xmmintrin.h: Likewise.
15962 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
15964         PR c++/43486
15965         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
15966         "public_flag".
15967         * tree.c (tree_nop_conversion): Return true for location wrapper
15968         nodes.
15969         (maybe_wrap_with_location): New function.
15970         (selftest::check_strip_nops): New function.
15971         (selftest::test_location_wrappers): New function.
15972         (selftest::tree_c_tests): Call it.
15973         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
15974         (maybe_wrap_with_location): New decl.
15975         (EXPR_LOCATION_WRAPPER_P): New macro.
15976         (location_wrapper_p): New inline function.
15977         (tree_strip_any_location_wrapper): New inline function.
15979 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
15981         PR target/83735
15982         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
15983         stack_realign_offset for the largest alignment of stack slot
15984         actually used.
15985         (ix86_find_max_used_stack_alignment): New function.
15986         (ix86_finalize_stack_frame_flags): Use it.  Set
15987         max_used_stack_alignment if we don't realign stack.
15988         * config/i386/i386.h (machine_function): Add
15989         max_used_stack_alignment.
15991 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
15993         * config/arm/arm.opt (-mbranch-cost): New option.
15994         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
15995         account.
15997 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
15999         PR target/83629
16000         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
16001         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
16003 2018-01-10  Richard Biener  <rguenther@suse.de>
16005         PR debug/83765
16006         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
16007         early out so it also covers the case where we have a non-NULL
16008         origin.
16010 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
16012         PR tree-optimization/83753
16013         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
16014         for non-strided grouped accesses if the number of elements is 1.
16016 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
16018         PR target/81616
16019         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
16020         * i386.h (TARGET_USE_GATHER): Define.
16021         * x86-tune.def (X86_TUNE_USE_GATHER): New.
16023 2018-01-10  Martin Liska  <mliska@suse.cz>
16025         PR bootstrap/82831
16026         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
16027         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
16028         partitioning.
16029         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
16030         CLEANUP_NO_PARTITIONING is not set.
16032 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
16034         * doc/rtl.texi: Remove documentation of (const ...) wrappers
16035         for vectors, as a partial revert of r254296.
16036         * rtl.h (const_vec_p): Delete.
16037         (const_vec_duplicate_p): Don't test for vector CONSTs.
16038         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
16039         * expmed.c (make_tree): Likewise.
16041         Revert:
16042         * common.md (E, F): Use CONSTANT_P instead of checking for
16043         CONST_VECTOR.
16044         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
16045         checking for CONST_VECTOR.
16047 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
16049         PR middle-end/83575
16050         * predict.c (force_edge_cold): Handle in more sane way edges
16051         with no prediction.
16053 2018-01-09  Carl Love  <cel@us.ibm.com>
16055         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
16056         V4SI, V4SF types.
16057         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
16058         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
16059         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
16060         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
16061         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
16062         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
16063         * config/rs6000/rs6000-protos.h: Add extern defition for
16064         rs6000_generate_float2_double_code.
16065         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
16066         function.
16067         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
16068         (float2_v2df): Add define_expand.
16070 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
16072         PR target/83628
16073         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
16074         op_mode in the force_to_mode call.
16076 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
16078         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
16079         instead of checking each element individually.
16080         (aarch64_evpc_uzp): Likewise.
16081         (aarch64_evpc_zip): Likewise.
16082         (aarch64_evpc_ext): Likewise.
16083         (aarch64_evpc_rev): Likewise.
16084         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
16085         instead of checking each element individually.  Return true without
16086         generating rtl if
16087         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
16088         whether all selected elements come from the same input, instead of
16089         checking each element individually.  Remove calls to gen_rtx_REG,
16090         start_sequence and end_sequence and instead assert that no rtl is
16091         generated.
16093 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
16095         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
16096         order of HIGH and CONST checks.
16098 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
16100         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
16101         if the destination isn't an SSA_NAME.
16103 2018-01-09  Richard Biener  <rguenther@suse.de>
16105         PR tree-optimization/83668
16106         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
16107         move prologue...
16108         (canonicalize_loop_form): ... here, renamed from ...
16109         (canonicalize_loop_closed_ssa_form): ... this and amended to
16110         swap successor edges for loop exit blocks to make us use
16111         the RPO order we need for initial schedule generation.
16113 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
16115         PR tree-optimization/64811
16116         * match.pd: When optimizing comparisons with Inf, avoid
16117         introducing or losing exceptions from comparisons with NaN.
16119 2018-01-09  Martin Liska  <mliska@suse.cz>
16121         PR sanitizer/82517
16122         * asan.c (shadow_mem_size): Add gcc_assert.
16124 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
16126         Don't save registers in main().
16128         PR target/83738
16129         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
16130         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
16131         * config/avr/avr.c (avr_set_current_function): Don't error if
16132         naked, OS_task or OS_main are specified at the same time.
16133         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
16134         OS_main.
16135         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
16136         attribute.
16137         * common/config/avr/avr-common.c (avr_option_optimization_table):
16138         Switch on -mmain-is-OS_task for optimizing compilations.
16140 2018-01-09  Richard Biener  <rguenther@suse.de>
16142         PR tree-optimization/83572
16143         * graphite.c: Include cfganal.h.
16144         (graphite_transform_loops): Connect infinite loops to exit
16145         and remove fake edges at the end.
16147 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
16149         * ipa-inline.c (edge_badness): Revert accidental checkin.
16151 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
16153         PR ipa/80763
16154         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
16155         symbols; not inline clones.
16157 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
16159         PR target/83507
16160         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
16161         hard registers.  Formatting fixes.
16163         PR preprocessor/83722
16164         * gcc.c (try_generate_repro): Pass
16165         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
16166         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
16167         do_report_bug.
16169 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
16170             Kito Cheng  <kito.cheng@gmail.com>
16172         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
16173         (riscv_leaf_function_p): Delete.
16174         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
16176 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16178         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
16179         function.
16180         (do_ifelse): New function.
16181         (do_isel): New function.
16182         (do_sub3): New function.
16183         (do_add3): New function.
16184         (do_load_mask_compare): New function.
16185         (do_overlap_load_compare): New function.
16186         (expand_compare_loop): New function.
16187         (expand_block_compare): Call expand_compare_loop() when appropriate.
16188         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
16189         option description.
16190         (-mblock-compare-inline-loop-limit): New option.
16192 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16194         PR target/83677
16195         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
16196         Reverse order of second and third operands in first alternative.
16197         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
16198         of first and second elements in UNSPEC_VPERMR vector.
16199         (altivec_expand_vec_perm_le): Likewise.
16201 2018-01-08  Jeff Law  <law@redhat.com>
16203         PR rtl-optimizatin/81308
16204         * tree-switch-conversion.c (cfg_altered): New file scoped static.
16205         (process_switch): If group_case_labels makes a change, then set
16206         cfg_altered.
16207         (pass_convert_switch::execute): If a switch is converted, then
16208         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
16210         PR rtl-optimization/81308
16211         * recog.c (split_all_insns): Conditionally cleanup the CFG after
16212         splitting insns.
16214 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
16216         PR target/83663 - Revert r255946
16217         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
16218         generation for cases where splatting a value is not useful.
16219         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
16220         across a vec_duplicate and a paradoxical subreg forming a vector
16221         mode to a vec_concat.
16223 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16225         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
16226         -march=armv8.3-a variants.
16227         * config/arm/t-multilib: Likewise.
16228         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
16230 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
16232         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
16233         to generate rtl.
16234         (cceq_ior_compare_complement): Give it a name so I can use it, and
16235         change boolean_or_operator predicate to boolean_operator so it can
16236         be used to generate a crand.
16237         (eqne): New code iterator.
16238         (bd/bd_neg): New code_attrs.
16239         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
16240         a single define_insn.
16241         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
16242         decrement (bdnzt/bdnzf/bdzt/bdzf).
16243         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
16244         with the new names of the branch decrement patterns, and added the
16245         names of the branch decrement conditional patterns.
16247 2018-01-08  Richard Biener  <rguenther@suse.de>
16249         PR tree-optimization/83563
16250         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
16251         cache.
16253 2018-01-08  Richard Biener  <rguenther@suse.de>
16255         PR middle-end/83713
16256         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
16258 2018-01-08  Richard Biener  <rguenther@suse.de>
16260         PR tree-optimization/83685
16261         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
16262         references to abnormals.
16264 2018-01-08  Richard Biener  <rguenther@suse.de>
16266         PR lto/83719
16267         * dwarf2out.c (output_indirect_strings): Handle empty
16268         skeleton_debug_str_hash.
16269         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
16271 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
16273         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
16274         (emit_store_direct): Likewise.
16275         (arc_trampoline_adjust_address): Likewise.
16276         (arc_asm_trampoline_template): New function.
16277         (arc_initialize_trampoline): Use asm_trampoline_template.
16278         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
16279         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
16280         * config/arc/arc.md (flush_icache): Delete pattern.
16282 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
16284         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
16285         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
16286         munaligned-access.
16288 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
16290         PR target/83681
16291         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
16292         by not USED_FOR_TARGET.
16293         (make_pass_resolve_sw_modes): Likewise.
16295 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
16297         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
16298         USED_FOR_TARGET.
16300 2018-01-08  Richard Biener  <rguenther@suse.de>
16302         PR middle-end/83580
16303         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
16305 2018-01-08  Richard Biener  <rguenther@suse.de>
16307         PR middle-end/83517
16308         * match.pd ((t * 2) / 2) -> t): Add missing :c.
16310 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
16312         PR middle-end/81897
16313         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
16314         basic blocks with a small number of successors.
16315         (convert_control_dep_chain_into_preds): Improve handling of
16316         forwarder blocks.
16317         (dump_predicates): Split apart into...
16318         (dump_pred_chain): ...here...
16319         (dump_pred_info): ...and here.
16320         (can_one_predicate_be_invalidated_p): Add debugging printfs.
16321         (can_chain_union_be_invalidated_p): Improve check for invalidation
16322         of paths.
16323         (uninit_uses_cannot_happen): Avoid unnecessary if
16324         convert_control_dep_chain_into_preds yielded nothing.
16326 2018-01-06  Martin Sebor  <msebor@redhat.com>
16328         PR tree-optimization/83640
16329         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
16330         subtracting negative offset from size.
16331         (builtin_access::overlap): Adjust offset bounds of the access to fall
16332         within the size of the object if possible.
16334 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
16336         PR rtl-optimization/83699
16337         * expmed.c (extract_bit_field_1): Restrict the vector usage of
16338         extract_bit_field_as_subreg to cases in which the extracted
16339         value is also a vector.
16341         * lra-constraints.c (process_alt_operands): Test for the equivalence
16342         substitutions when detecting a possible reload cycle.
16344 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
16346         PR debug/83480
16347         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
16348         by default if flag_selective_schedling{,2}.  Formatting fixes.
16350         PR rtl-optimization/83682
16351         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
16352         if it has non-VECTOR_MODE element mode.
16353         (vec_duplicate_p): Likewise.
16355         PR middle-end/83694
16356         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
16357         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
16359 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
16361         PR target/83604
16362         * config/i386/i386-builtin.def
16363         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
16364         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
16365         Require also OPTION_MASK_ISA_AVX512F in addition to
16366         OPTION_MASK_ISA_GFNI.
16367         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
16368         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
16369         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
16370         to OPTION_MASK_ISA_GFNI.
16371         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
16372         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
16373         OPTION_MASK_ISA_AVX512BW.
16374         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
16375         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
16376         addition to OPTION_MASK_ISA_GFNI.
16377         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
16378         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
16379         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
16380         to OPTION_MASK_ISA_GFNI.
16381         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
16382         a requirement for all ISAs rather than any of them with a few
16383         exceptions.
16384         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
16385         processing.
16386         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
16387         bitmasks to be enabled with 3 exceptions, instead of requiring any
16388         enabled ISA with lots of exceptions.
16389         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
16390         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
16391         Change avx512bw in isa attribute to avx512f.
16392         * config/i386/sgxintrin.h: Add license boilerplate.
16393         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
16394         to __AVX512F__ and __AVX512VL to __AVX512VL__.
16395         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
16396         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
16397         defined.
16398         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
16399         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
16400         temporarily sse2 rather than sse if not enabled already.
16402         PR target/83604
16403         * config/i386/sse.md (VI248_VLBW): Rename to ...
16404         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
16405         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
16406         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
16407         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
16408         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
16409         mode iterator instead of VI248_VLBW.
16411 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
16413         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
16414         (record_modified): Skip clobbers; add debug output.
16415         (param_change_prob): Use sreal frequencies.
16417 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
16419         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
16420         punt for user-aligned variables.
16422 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
16424         * tree-chrec.c (chrec_contains_symbols): Return true for
16425         POLY_INT_CST.
16427 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
16429         PR target/82439
16430         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
16431         of (x|y) == x for BICS pattern.
16433 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
16435         PR tree-optimization/83605
16436         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
16437         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
16438         can throw.
16440 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
16442         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
16443         * config/epiphany/rtems.h: New file.
16445 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16446             Uros Bizjak  <ubizjak@gmail.com>
16448         PR target/83554
16449         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
16450         QIreg_operand instead of register_operand predicate.
16451         * config/i386/i386.c (ix86_rop_should_change_byte_p,
16452         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
16453         comments instead of -fmitigate[-_]rop.
16455 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16457         PR bootstrap/81926
16458         * cgraphunit.c (symbol_table::compile): Switch to text_section
16459         before calling assembly_start debug hook.
16460         * run-rtl-passes.c (run_rtl_passes): Likewise.
16461         Include output.h.
16463 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16465         * tree-vrp.c (extract_range_from_binary_expr_1): Check
16466         range_int_cst_p rather than !symbolic_range_p before calling
16467         extract_range_from_multiplicative_op_1.
16469 2018-01-04  Jeff Law  <law@redhat.com>
16471         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
16472         redundant test in assertion.
16474 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16476         * doc/rtl.texi: Document machine_mode wrapper classes.
16478 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16480         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
16481         using tree_to_uhwi.
16483 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16485         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
16486         the VEC_PERM_EXPR fold to fail.
16488 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16490         PR debug/83585
16491         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
16492         to switched_sections.
16494 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16496         PR target/83680
16497         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
16498         test for d.testing.
16500 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
16502         PR target/83387
16503         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
16504         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
16506 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16508         PR debug/83666
16509         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
16510         is BLKmode and bitpos not zero or mode change is needed.
16512 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
16514         PR target/83675
16515         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
16516         TARGET_VIS2.
16518 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
16520         PR target/83628
16521         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
16522         instead of MULT rtx.  Update all corresponding splitters.
16523         (*saddl_se): Ditto.
16524         (*ssub<modesuffix>): Ditto.
16525         (*ssubl_se): Ditto.
16526         (*cmp_sadd_di): Update split patterns.
16527         (*cmp_sadd_si): Ditto.
16528         (*cmp_sadd_sidi): Ditto.
16529         (*cmp_ssub_di): Ditto.
16530         (*cmp_ssub_si): Ditto.
16531         (*cmp_ssub_sidi): Ditto.
16532         * config/alpha/predicates.md (const23_operand): New predicate.
16533         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
16534         Look for ASHIFT, not MULT inner operand.
16535         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
16537 2018-01-04  Martin Liska  <mliska@suse.cz>
16539         PR gcov-profile/83669
16540         * gcov.c (output_intermediate_file): Add version to intermediate
16541         gcov file.
16542         * doc/gcov.texi: Document new field 'version' in intermediate
16543         file format. Fix location of '-k' option of gcov command.
16545 2018-01-04  Martin Liska  <mliska@suse.cz>
16547         PR ipa/82352
16548         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
16550 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
16552         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
16554 2018-01-03  Martin Sebor  <msebor@redhat.com>
16556         PR tree-optimization/83655
16557         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
16558         checking calls with invalid arguments.
16560 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16562         * tree-vect-stmts.c (vect_get_store_rhs): New function.
16563         (vectorizable_mask_load_store): Delete.
16564         (vectorizable_call): Return false for masked loads and stores.
16565         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
16566         instead of gimple_assign_rhs1.
16567         (vectorizable_load): Handle IFN_MASK_LOAD.
16568         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
16570 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16572         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
16573         split out from..,
16574         (vectorizable_mask_load_store): ...here.
16575         (vectorizable_load): ...and here.
16577 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16579         * tree-vect-stmts.c (vect_build_all_ones_mask)
16580         (vect_build_zero_merge_argument): New functions, split out from...
16581         (vectorizable_load): ...here.
16583 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16585         * tree-vect-stmts.c (vect_check_store_rhs): New function,
16586         split out from...
16587         (vectorizable_mask_load_store): ...here.
16588         (vectorizable_store): ...and here.
16590 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16592         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
16593         split out from...
16594         (vectorizable_mask_load_store): ...here.
16596 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16598         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
16599         (vect_model_store_cost): Take a vec_load_store_type instead of a
16600         vect_def_type.
16601         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
16602         (vect_model_store_cost): Take a vec_load_store_type instead of a
16603         vect_def_type.
16604         (vectorizable_mask_load_store): Update accordingly.
16605         (vectorizable_store): Likewise.
16606         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
16608 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16610         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
16611         IFN_MASK_LOAD calls here rather than...
16612         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
16614 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16615             Alan Hayward  <alan.hayward@arm.com>
16616             David Sherwood  <david.sherwood@arm.com>
16618         * expmed.c (extract_bit_field_1): For vector extracts,
16619         fall back to extract_bit_field_as_subreg if vec_extract
16620         isn't available.
16622 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16623             Alan Hayward  <alan.hayward@arm.com>
16624             David Sherwood  <david.sherwood@arm.com>
16626         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
16627         they are variable or constant sized.
16628         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
16629         slots for constant-sized data.
16631 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16632             Alan Hayward  <alan.hayward@arm.com>
16633             David Sherwood  <david.sherwood@arm.com>
16635         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
16636         handling COND_EXPRs with boolean comparisons, try to find a better
16637         basis for the mask type than the boolean itself.
16639 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16641         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
16642         is calculated and how it can be overridden.
16643         * genmodes.c (max_bitsize_mode_any_mode): New variable.
16644         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
16645         if defined.
16646         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
16647         if nonzero.
16649 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16650             Alan Hayward  <alan.hayward@arm.com>
16651             David Sherwood  <david.sherwood@arm.com>
16653         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
16654         Remove the mode argument.
16655         (aarch64_simd_valid_immediate): Remove the mode and inverse
16656         arguments.
16657         * config/aarch64/iterators.md (bitsize): New iterator.
16658         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
16659         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
16660         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
16661         aarch64_simd_valid_immediate.
16662         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
16663         (aarch64_reg_or_bic_imm): Likewise.
16664         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
16665         with an insn_type enum and msl with a modifier_type enum.
16666         Replace element_width with a scalar_mode.  Change the shift
16667         to unsigned int.  Add constructors for scalar_float_mode and
16668         scalar_int_mode elements.
16669         (aarch64_vect_float_const_representable_p): Delete.
16670         (aarch64_can_const_movi_rtx_p)
16671         (aarch64_simd_scalar_immediate_valid_for_move)
16672         (aarch64_simd_make_constant): Update call to
16673         aarch64_simd_valid_immediate.
16674         (aarch64_advsimd_valid_immediate_hs): New function.
16675         (aarch64_advsimd_valid_immediate): Likewise.
16676         (aarch64_simd_valid_immediate): Remove mode and inverse
16677         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
16678         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
16679         and aarch64_float_const_representable_p on the result.
16680         (aarch64_output_simd_mov_immediate): Remove mode argument.
16681         Update call to aarch64_simd_valid_immediate and use of
16682         simd_immediate_info.
16683         (aarch64_output_scalar_simd_mov_immediate): Update call
16684         accordingly.
16686 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16687             Alan Hayward  <alan.hayward@arm.com>
16688             David Sherwood  <david.sherwood@arm.com>
16690         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
16691         (mode_nunits): Likewise CONST_MODE_NUNITS.
16692         * machmode.def (ADJUST_NUNITS): Document.
16693         * genmodes.c (mode_data::need_nunits_adj): New field.
16694         (blank_mode): Update accordingly.
16695         (adj_nunits): New variable.
16696         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
16697         parameter.
16698         (emit_mode_size_inline): Set need_bytesize_adj for all modes
16699         listed in adj_nunits.
16700         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
16701         listed in adj_nunits.  Don't emit case statements for such modes.
16702         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
16703         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
16704         nothing if adj_nunits is nonnull.
16705         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
16706         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
16707         (emit_mode_fbit): Update use of print_maybe_const_decl.
16708         (emit_move_size): Likewise.  Treat the array as non-const
16709         if adj_nunits.
16710         (emit_mode_adjustments): Handle adj_nunits.
16712 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16714         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
16715         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
16716         (VECTOR_MODES): Use it.
16717         (make_vector_modes): Take the prefix as an argument.
16719 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16720             Alan Hayward  <alan.hayward@arm.com>
16721             David Sherwood  <david.sherwood@arm.com>
16723         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
16724         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
16725         for MODE_VECTOR_BOOL.
16726         * machmode.def (VECTOR_BOOL_MODE): Document.
16727         * genmodes.c (VECTOR_BOOL_MODE): New macro.
16728         (make_vector_bool_mode): New function.
16729         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
16730         MODE_VECTOR_BOOL.
16731         * lto-streamer-in.c (lto_input_mode_table): Likewise.
16732         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
16733         Likewise.
16734         * stor-layout.c (int_mode_for_mode): Likewise.
16735         * tree.c (build_vector_type_for_mode): Likewise.
16736         * varasm.c (output_constant_pool_2): Likewise.
16737         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
16738         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
16739         for MODE_VECTOR_BOOL.
16740         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
16741         of mode class checks.
16742         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
16743         instead of a list of mode class checks.
16744         (expand_vector_scalar_condition): Likewise.
16745         (type_for_widest_vector_mode): Handle BImode as an inner mode.
16747 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16748             Alan Hayward  <alan.hayward@arm.com>
16749             David Sherwood  <david.sherwood@arm.com>
16751         * machmode.h (mode_size): Change from unsigned short to
16752         poly_uint16_pod.
16753         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
16754         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
16755         or if measurement_type is not polynomial.
16756         (fixed_size_mode::includes_p): Check for constant-sized modes.
16757         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
16758         return a poly_uint16 rather than an unsigned short.
16759         (emit_mode_size): Change the type of mode_size from unsigned short
16760         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
16761         (emit_mode_adjustments): Cope with polynomial vector sizes.
16762         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16763         for GET_MODE_SIZE.
16764         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16765         for GET_MODE_SIZE.
16766         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
16767         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
16768         * caller-save.c (setup_save_areas): Likewise.
16769         (replace_reg_with_saved_mem): Likewise.
16770         * calls.c (emit_library_call_value_1): Likewise.
16771         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
16772         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
16773         (gen_lowpart_for_combine): Likewise.
16774         * convert.c (convert_to_integer_1): Likewise.
16775         * cse.c (equiv_constant, cse_insn): Likewise.
16776         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
16777         (cselib_subst_to_values): Likewise.
16778         * dce.c (word_dce_process_block): Likewise.
16779         * df-problems.c (df_word_lr_mark_ref): Likewise.
16780         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
16781         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
16782         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
16783         (rtl_for_decl_location): Likewise.
16784         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
16785         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
16786         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
16787         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
16788         (expand_expr_real_1): Likewise.
16789         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
16790         (pad_below): Likewise.
16791         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
16792         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
16793         * ira.c (get_subreg_tracking_sizes): Likewise.
16794         * ira-build.c (ira_create_allocno_objects): Likewise.
16795         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
16796         (ira_sort_regnos_for_alter_reg): Likewise.
16797         * ira-costs.c (record_operand_costs): Likewise.
16798         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
16799         (resolve_simple_move): Likewise.
16800         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
16801         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
16802         (lra_constraints): Likewise.
16803         (CONST_POOL_OK_P): Reject variable-sized modes.
16804         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
16805         (add_pseudo_to_slot, lra_spill): Likewise.
16806         * omp-low.c (omp_clause_aligned_alignment): Likewise.
16807         * optabs-query.c (get_best_extraction_insn): Likewise.
16808         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
16809         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
16810         (expand_mult_highpart, valid_multiword_target_p): Likewise.
16811         * recog.c (offsettable_address_addr_space_p): Likewise.
16812         * regcprop.c (maybe_mode_change): Likewise.
16813         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
16814         * regrename.c (build_def_use): Likewise.
16815         * regstat.c (dump_reg_info): Likewise.
16816         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
16817         (find_reloads, find_reloads_subreg_address): Likewise.
16818         * reload1.c (eliminate_regs_1): Likewise.
16819         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
16820         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
16821         (simplify_binary_operation_1, simplify_subreg): Likewise.
16822         * targhooks.c (default_function_arg_padding): Likewise.
16823         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
16824         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
16825         (verify_gimple_assign_ternary): Likewise.
16826         * tree-inline.c (estimate_move_cost): Likewise.
16827         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
16828         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
16829         (get_address_cost_ainc): Likewise.
16830         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
16831         (vect_supportable_dr_alignment): Likewise.
16832         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16833         (vectorizable_reduction): Likewise.
16834         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
16835         (vectorizable_operation, vectorizable_load): Likewise.
16836         * tree.c (build_same_sized_truth_vector_type): Likewise.
16837         * valtrack.c (cleanup_auto_inc_dec): Likewise.
16838         * var-tracking.c (emit_note_insn_var_location): Likewise.
16839         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
16840         (ADDR_VEC_ALIGN): Likewise.
16842 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16843             Alan Hayward  <alan.hayward@arm.com>
16844             David Sherwood  <david.sherwood@arm.com>
16846         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
16847         unsigned short.
16848         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
16849         or if measurement_type is polynomial.
16850         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
16851         * combine.c (make_extraction): Likewise.
16852         * dse.c (find_shift_sequence): Likewise.
16853         * dwarf2out.c (mem_loc_descriptor): Likewise.
16854         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
16855         (extract_bit_field, extract_low_bits): Likewise.
16856         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
16857         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
16858         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
16859         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
16860         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
16861         * reload.c (find_reloads): Likewise.
16862         * reload1.c (alter_reg): Likewise.
16863         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
16864         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
16865         * tree-if-conv.c (predicate_mem_writes): Likewise.
16866         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
16867         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
16868         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
16869         * valtrack.c (dead_debug_insert_temp): Likewise.
16870         * varasm.c (mergeable_constant_section): Likewise.
16871         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
16873 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16874             Alan Hayward  <alan.hayward@arm.com>
16875             David Sherwood  <david.sherwood@arm.com>
16877         * expr.c (expand_assignment): Cope with polynomial mode sizes
16878         when assigning to a CONCAT.
16880 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16881             Alan Hayward  <alan.hayward@arm.com>
16882             David Sherwood  <david.sherwood@arm.com>
16884         * machmode.h (mode_precision): Change from unsigned short to
16885         poly_uint16_pod.
16886         (mode_to_precision): Return a poly_uint16 rather than an unsigned
16887         short.
16888         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
16889         or if measurement_type is not polynomial.
16890         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
16891         in which the mode is already known to be a scalar_int_mode.
16892         * genmodes.c (emit_mode_precision): Change the type of mode_precision
16893         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
16894         initializer.
16895         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
16896         for GET_MODE_PRECISION.
16897         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
16898         for GET_MODE_PRECISION.
16899         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
16900         as polynomial.
16901         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
16902         (expand_field_assignment, make_extraction): Likewise.
16903         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
16904         (get_last_value): Likewise.
16905         * convert.c (convert_to_integer_1): Likewise.
16906         * cse.c (cse_insn): Likewise.
16907         * expr.c (expand_expr_real_1): Likewise.
16908         * lra-constraints.c (simplify_operand_subreg): Likewise.
16909         * optabs-query.c (can_atomic_load_p): Likewise.
16910         * optabs.c (expand_atomic_load): Likewise.
16911         (expand_atomic_store): Likewise.
16912         * ree.c (combine_reaching_defs): Likewise.
16913         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
16914         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
16915         * tree.h (type_has_mode_precision_p): Likewise.
16916         * ubsan.c (instrument_si_overflow): Likewise.
16918 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16919             Alan Hayward  <alan.hayward@arm.com>
16920             David Sherwood  <david.sherwood@arm.com>
16922         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
16923         polynomial numbers of units.
16924         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
16925         (valid_vector_subparts_p): New function.
16926         (build_vector_type): Remove temporary shim and take the number
16927         of units as a poly_uint64 rather than an int.
16928         (build_opaque_vector_type): Take the number of units as a
16929         poly_uint64 rather than an int.
16930         * tree.c (build_vector_from_ctor): Handle polynomial
16931         TYPE_VECTOR_SUBPARTS.
16932         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
16933         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
16934         (build_vector_from_val): If the number of units is variable,
16935         use build_vec_duplicate_cst for constant operands and
16936         VEC_DUPLICATE_EXPR otherwise.
16937         (make_vector_type): Remove temporary is_constant ().
16938         (build_vector_type, build_opaque_vector_type): Take the number of
16939         units as a poly_uint64 rather than an int.
16940         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
16941         VECTOR_CST_NELTS.
16942         * cfgexpand.c (expand_debug_expr): Likewise.
16943         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
16944         (store_constructor, expand_expr_real_1): Likewise.
16945         (const_scalar_mask_from_tree): Likewise.
16946         * fold-const-call.c (fold_const_reduction): Likewise.
16947         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
16948         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
16949         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
16950         (fold_relational_const): Likewise.
16951         (native_interpret_vector): Likewise.  Change the size from an
16952         int to an unsigned int.
16953         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
16954         TYPE_VECTOR_SUBPARTS.
16955         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
16956         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
16957         duplicating a non-constant operand into a variable-length vector.
16958         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
16959         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
16960         * ipa-icf.c (sem_variable::equals): Likewise.
16961         * match.pd: Likewise.
16962         * omp-simd-clone.c (simd_clone_subparts): Likewise.
16963         * print-tree.c (print_node): Likewise.
16964         * stor-layout.c (layout_type): Likewise.
16965         * targhooks.c (default_builtin_vectorization_cost): Likewise.
16966         * tree-cfg.c (verify_gimple_comparison): Likewise.
16967         (verify_gimple_assign_binary): Likewise.
16968         (verify_gimple_assign_ternary): Likewise.
16969         (verify_gimple_assign_single): Likewise.
16970         * tree-pretty-print.c (dump_generic_node): Likewise.
16971         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
16972         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
16973         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
16974         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
16975         (vect_shift_permute_load_chain): Likewise.
16976         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
16977         (expand_vector_condition, optimize_vector_constructor): Likewise.
16978         (lower_vec_perm, get_compute_type): Likewise.
16979         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16980         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
16981         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
16982         (vect_recog_mask_conversion_pattern): Likewise.
16983         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
16984         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
16985         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
16986         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
16987         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
16988         (vectorizable_shift, vectorizable_operation, vectorizable_store)
16989         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
16990         (supportable_widening_operation): Likewise.
16991         (supportable_narrowing_operation): Likewise.
16992         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
16993         Likewise.
16994         * varasm.c (output_constant): Likewise.
16996 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
16997             Alan Hayward  <alan.hayward@arm.com>
16998             David Sherwood  <david.sherwood@arm.com>
17000         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
17001         so that both the length == 3 and length != 3 cases set up their
17002         own permute vectors.  Add comments explaining why we know the
17003         number of elements is constant.
17004         (vect_permute_load_chain): Likewise.
17006 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17007             Alan Hayward  <alan.hayward@arm.com>
17008             David Sherwood  <david.sherwood@arm.com>
17010         * machmode.h (mode_nunits): Change from unsigned char to
17011         poly_uint16_pod.
17012         (ONLY_FIXED_SIZE_MODES): New macro.
17013         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
17014         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
17015         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
17016         New typedefs.
17017         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
17018         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
17019         or if measurement_type is not polynomial.
17020         * genmodes.c (ZERO_COEFFS): New macro.
17021         (emit_mode_nunits_inline): Make mode_nunits_inline return a
17022         poly_uint16.
17023         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
17024         Use ZERO_COEFFS when emitting initializers.
17025         * data-streamer.h (bp_pack_poly_value): New function.
17026         (bp_unpack_poly_value): Likewise.
17027         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
17028         for GET_MODE_NUNITS.
17029         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
17030         for GET_MODE_NUNITS.
17031         * tree.c (make_vector_type): Remove temporary shim and make
17032         the real function take the number of units as a poly_uint64
17033         rather than an int.
17034         (build_vector_type_for_mode): Handle polynomial nunits.
17035         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
17036         * emit-rtl.c (const_vec_series_p_1): Likewise.
17037         (gen_rtx_CONST_VECTOR): Likewise.
17038         * fold-const.c (test_vec_duplicate_folding): Likewise.
17039         * genrecog.c (validate_pattern): Likewise.
17040         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
17041         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
17042         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
17043         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
17044         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
17045         * rtlanal.c (subreg_get_info): Likewise.
17046         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17047         (vect_grouped_load_supported): Likewise.
17048         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
17049         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
17050         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
17051         (simplify_const_unary_operation, simplify_binary_operation_1)
17052         (simplify_const_binary_operation, simplify_ternary_operation)
17053         (test_vector_ops_duplicate, test_vector_ops): Likewise.
17054         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
17055         instead of CONST_VECTOR_NUNITS.
17056         * varasm.c (output_constant_pool_2): Likewise.
17057         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
17058         explicit-encoded elements in the XVEC for variable-length vectors.
17060 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17062         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
17064 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17065             Alan Hayward  <alan.hayward@arm.com>
17066             David Sherwood  <david.sherwood@arm.com>
17068         * coretypes.h (fixed_size_mode): Declare.
17069         (fixed_size_mode_pod): New typedef.
17070         * builtins.h (target_builtins::x_apply_args_mode)
17071         (target_builtins::x_apply_result_mode): Change type to
17072         fixed_size_mode_pod.
17073         * builtins.c (apply_args_size, apply_result_size, result_vector)
17074         (expand_builtin_apply_args_1, expand_builtin_apply)
17075         (expand_builtin_return): Update accordingly.
17077 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17079         * cse.c (hash_rtx_cb): Hash only the encoded elements.
17080         * cselib.c (cselib_hash_rtx): Likewise.
17081         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
17082         CONST_VECTOR encoding.
17084 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
17085             Jeff Law  <law@redhat.com>
17087         PR target/83641
17088         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
17089         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
17090         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
17091         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
17093         PR target/83641
17094         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
17095         explicitly probe *sp in a noreturn function if there were any callee
17096         register saves or frame pointer is needed.
17098 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
17100         PR debug/83621
17101         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
17102         BLKmode for ternary, binary or unary expressions.
17104         PR debug/83645
17105         * var-tracking.c (delete_vta_debug_insn): New inline function.
17106         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
17107         insns from get_insns () to NULL instead of each bb separately.
17108         Use delete_vta_debug_insn.  No longer static.
17109         (vt_debug_insns_local, variable_tracking_main_1): Adjust
17110         delete_vta_debug_insns callers.
17111         * rtl.h (delete_vta_debug_insns): Declare.
17112         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
17113         instead of variable_tracking_main.
17115 2018-01-03  Martin Sebor  <msebor@redhat.com>
17117         PR tree-optimization/83603
17118         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
17119         arguments past the endof the argument list in functions declared
17120         without a prototype.
17121         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
17122         Avoid checking when arguments are null.
17124 2018-01-03  Martin Sebor  <msebor@redhat.com>
17126         PR c/83559
17127         * doc/extend.texi (attribute const): Fix a typo.
17128         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
17129         issuing -Wsuggest-attribute for void functions.
17131 2018-01-03  Martin Sebor  <msebor@redhat.com>
17133         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
17134         offset_int::from instead of wide_int::to_shwi.
17135         (maybe_diag_overlap): Remove assertion.
17136         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
17137         * gimple-ssa-sprintf.c (format_directive): Same.
17138         (parse_directive): Same.
17139         (sprintf_dom_walker::compute_format_length): Same.
17140         (try_substitute_return_value): Same.
17142 2018-01-03  Jeff Law  <law@redhat.com>
17144         PR middle-end/83654
17145         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
17146         non-constant residual for zero at runtime and avoid probing in
17147         that case.  Reorganize code for trailing problem to mirror handling
17148         of the residual.
17150 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
17152         PR tree-optimization/83501
17153         * tree-ssa-strlen.c (get_string_cst): New.
17154         (handle_char_store): Call get_string_cst.
17156 2018-01-03  Martin Liska  <mliska@suse.cz>
17158         PR tree-optimization/83593
17159         * tree-ssa-strlen.c: Include tree-cfg.h.
17160         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
17161         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
17162         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
17163         to false.
17164         (strlen_dom_walker::before_dom_children): Call
17165         gimple_purge_dead_eh_edges. Dump tranformation with details
17166         dump flags.
17167         (strlen_dom_walker::before_dom_children): Update call by adding
17168         new argument cleanup_eh.
17169         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
17171 2018-01-03  Martin Liska  <mliska@suse.cz>
17173         PR ipa/83549
17174         * cif-code.def (VARIADIC_THUNK): New enum value.
17175         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
17176         thunks.
17178 2018-01-03  Jan Beulich  <jbeulich@suse.com>
17180         * sse.md (mov<mode>_internal): Tighten condition for when to use
17181         vmovdqu<ssescalarsize> for TI and OI modes.
17183 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
17185         Update copyright years.
17187 2018-01-03  Martin Liska  <mliska@suse.cz>
17189         PR ipa/83594
17190         * ipa-visibility.c (function_and_variable_visibility): Skip
17191         functions with noipa attribure.
17193 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
17195         * gcc.c (process_command): Update copyright notice dates.
17196         * gcov-dump.c (print_version): Ditto.
17197         * gcov.c (print_version): Ditto.
17198         * gcov-tool.c (print_version): Ditto.
17199         * gengtype.c (create_file): Ditto.
17200         * doc/cpp.texi: Bump @copying's copyright year.
17201         * doc/cppinternals.texi: Ditto.
17202         * doc/gcc.texi: Ditto.
17203         * doc/gccint.texi: Ditto.
17204         * doc/gcov.texi: Ditto.
17205         * doc/install.texi: Ditto.
17206         * doc/invoke.texi: Ditto.
17208 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17210         * vector-builder.h (vector_builder::m_full_nelts): Change from
17211         unsigned int to poly_uint64.
17212         (vector_builder::full_nelts): Update prototype accordingly.
17213         (vector_builder::new_vector): Likewise.
17214         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
17215         (vector_builder::operator ==): Likewise.
17216         (vector_builder::finalize): Likewise.
17217         * int-vector-builder.h (int_vector_builder::int_vector_builder):
17218         Take the number of elements as a poly_uint64 rather than an
17219         unsigned int.
17220         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
17221         from unsigned int to poly_uint64.
17222         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
17223         (vec_perm_indices::new_vector): Likewise.
17224         (vec_perm_indices::length): Likewise.
17225         (vec_perm_indices::nelts_per_input): Likewise.
17226         (vec_perm_indices::input_nelts): Likewise.
17227         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
17228         number of elements per input as a poly_uint64 rather than an
17229         unsigned int.  Use the original encoding for variable-length
17230         vectors, rather than clamping each individual element.
17231         For the second and subsequent elements in each pattern,
17232         clamp the step and base before clamping their sum.
17233         (vec_perm_indices::series_p): Handle polynomial element counts.
17234         (vec_perm_indices::all_in_range_p): Likewise.
17235         (vec_perm_indices_to_tree): Likewise.
17236         (vec_perm_indices_to_rtx): Likewise.
17237         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
17238         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
17239         (tree_vector_builder::new_binary_operation): Handle polynomial
17240         element counts.  Return false if we need to know the number
17241         of elements at compile time.
17242         * fold-const.c (fold_vec_perm): Punt if the number of elements
17243         isn't known at compile time.
17245 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17247         * vec-perm-indices.h (vec_perm_builder): Change element type
17248         from HOST_WIDE_INT to poly_int64.
17249         (vec_perm_indices::element_type): Update accordingly.
17250         (vec_perm_indices::clamp): Handle polynomial element_types.
17251         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
17252         (vec_perm_indices::all_in_range_p): Likewise.
17253         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
17254         than shwi trees.
17255         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
17256         polynomial vec_perm_indices element types.
17257         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
17258         * fold-const.c (fold_vec_perm): Likewise.
17259         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
17260         * tree-vect-generic.c (lower_vec_perm): Likewise.
17261         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
17262         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
17263         element type to HOST_WIDE_INT.
17265 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17266             Alan Hayward  <alan.hayward@arm.com>
17267             David Sherwood  <david.sherwood@arm.com>
17269         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
17270         rather than an int.  Use plus_constant.
17271         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
17272         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
17274 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17275             Alan Hayward  <alan.hayward@arm.com>
17276             David Sherwood  <david.sherwood@arm.com>
17278         * calls.c (emit_call_1, expand_call): Change struct_value_size from
17279         a HOST_WIDE_INT to a poly_int64.
17281 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17282             Alan Hayward  <alan.hayward@arm.com>
17283             David Sherwood  <david.sherwood@arm.com>
17285         * calls.c (load_register_parameters): Cope with polynomial
17286         mode sizes.  Require a constant size for BLKmode parameters
17287         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
17288         forces a parameter to be padded at the lsb end in order to
17289         fill a complete number of words, require the parameter size
17290         to be ordered wrt UNITS_PER_WORD.
17292 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17293             Alan Hayward  <alan.hayward@arm.com>
17294             David Sherwood  <david.sherwood@arm.com>
17296         * reload1.c (spill_stack_slot_width): Change element type
17297         from unsigned int to poly_uint64_pod.
17298         (alter_reg): Treat mode sizes as polynomial.
17300 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17301             Alan Hayward  <alan.hayward@arm.com>
17302             David Sherwood  <david.sherwood@arm.com>
17304         * reload.c (complex_word_subreg_p): New function.
17305         (reload_inner_reg_of_subreg, push_reload): Use it.
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         * lra-constraints.c (process_alt_operands): Reject matched
17312         operands whose sizes aren't ordered.
17313         (match_reload): Refer to this check here.
17315 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17316             Alan Hayward  <alan.hayward@arm.com>
17317             David Sherwood  <david.sherwood@arm.com>
17319         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
17320         that the mode size is in the set {1, 2, 4, 8, 16}.
17322 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17323             Alan Hayward  <alan.hayward@arm.com>
17324             David Sherwood  <david.sherwood@arm.com>
17326         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
17327         Use plus_constant instead of gen_rtx_PLUS.
17329 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17330             Alan Hayward  <alan.hayward@arm.com>
17331             David Sherwood  <david.sherwood@arm.com>
17333         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
17334         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
17335         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
17336         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
17337         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
17338         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
17339         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
17340         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
17341         * config/i386/i386.c (ix86_push_rounding): ...this new function.
17342         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
17343         a poly_int64.
17344         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
17345         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
17346         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
17347         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
17348         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
17349         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
17350         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
17351         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
17352         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
17353         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
17354         function.
17355         * expr.c (emit_move_resolve_push): Treat the input and result
17356         of PUSH_ROUNDING as a poly_int64.
17357         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
17358         (emit_push_insn): Likewise.
17359         * lra-eliminations.c (mark_not_eliminable): Likewise.
17360         * recog.c (push_operand): Likewise.
17361         * reload1.c (elimination_effects): Likewise.
17362         * rtlanal.c (nonzero_bits1): Likewise.
17363         * calls.c (store_one_arg): Likewise.  Require the padding to be
17364         known at compile time.
17366 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17367             Alan Hayward  <alan.hayward@arm.com>
17368             David Sherwood  <david.sherwood@arm.com>
17370         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
17371         Use plus_constant instead of gen_rtx_PLUS.
17373 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17374             Alan Hayward  <alan.hayward@arm.com>
17375             David Sherwood  <david.sherwood@arm.com>
17377         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
17378         rather than an int.
17380 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17381             Alan Hayward  <alan.hayward@arm.com>
17382             David Sherwood  <david.sherwood@arm.com>
17384         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
17385         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
17386         via stack temporaries.  Treat the mode size as polynomial too.
17388 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17389             Alan Hayward  <alan.hayward@arm.com>
17390             David Sherwood  <david.sherwood@arm.com>
17392         * expr.c (expand_expr_real_2): When handling conversions involving
17393         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
17394         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
17395         as a poly_uint64 too.
17397 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17398             Alan Hayward  <alan.hayward@arm.com>
17399             David Sherwood  <david.sherwood@arm.com>
17401         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
17403 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17404             Alan Hayward  <alan.hayward@arm.com>
17405             David Sherwood  <david.sherwood@arm.com>
17407         * combine.c (can_change_dest_mode): Handle polynomial
17408         REGMODE_NATURAL_SIZE.
17409         * expmed.c (store_bit_field_1): Likewise.
17410         * expr.c (store_constructor): Likewise.
17411         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
17412         and polynomial REGMODE_NATURAL_SIZE.
17413         (gen_lowpart_common): Likewise.
17414         * reginfo.c (record_subregs_of_mode): Likewise.
17415         * rtlanal.c (read_modify_subreg_p): Likewise.
17417 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17418             Alan Hayward  <alan.hayward@arm.com>
17419             David Sherwood  <david.sherwood@arm.com>
17421         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
17422         numbers of elements.
17424 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17425             Alan Hayward  <alan.hayward@arm.com>
17426             David Sherwood  <david.sherwood@arm.com>
17428         * match.pd: Cope with polynomial numbers of vector elements.
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         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
17435         in a POINTER_PLUS_EXPR.
17437 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17438             Alan Hayward  <alan.hayward@arm.com>
17439             David Sherwood  <david.sherwood@arm.com>
17441         * omp-simd-clone.c (simd_clone_subparts): New function.
17442         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
17443         (ipa_simd_modify_function_body): Likewise.
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         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
17450         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
17451         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
17452         (expand_vector_condition, vector_element): Likewise.
17453         (subparts_gt): New function.
17454         (get_compute_type): Use subparts_gt.
17455         (count_type_subparts): Delete.
17456         (expand_vector_operations_1): Use subparts_gt instead of
17457         count_type_subparts.
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         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
17464         (vect_compile_time_alias): ...this new function.  Do the calculation
17465         on poly_ints rather than trees.
17466         (vect_prune_runtime_alias_test_list): Update call accordingly.
17468 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17469             Alan Hayward  <alan.hayward@arm.com>
17470             David Sherwood  <david.sherwood@arm.com>
17472         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
17473         numbers of units.
17474         (vect_schedule_slp_instance): Likewise.
17476 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17477             Alan Hayward  <alan.hayward@arm.com>
17478             David Sherwood  <david.sherwood@arm.com>
17480         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
17481         constant and extern definitions for variable-length vectors.
17482         (vect_get_constant_vectors): Note that the number of units
17483         is known to be constant.
17485 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17486             Alan Hayward  <alan.hayward@arm.com>
17487             David Sherwood  <david.sherwood@arm.com>
17489         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
17490         of units as polynomial.  Choose between WIDE and NARROW based
17491         on multiple_p.
17493 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17494             Alan Hayward  <alan.hayward@arm.com>
17495             David Sherwood  <david.sherwood@arm.com>
17497         * tree-vect-stmts.c (simd_clone_subparts): New function.
17498         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
17500 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17501             Alan Hayward  <alan.hayward@arm.com>
17502             David Sherwood  <david.sherwood@arm.com>
17504         * tree-vect-stmts.c (vectorizable_call): Treat the number of
17505         vectors as polynomial.  Use build_index_vector for
17506         IFN_GOMP_SIMD_LANE.
17508 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17509             Alan Hayward  <alan.hayward@arm.com>
17510             David Sherwood  <david.sherwood@arm.com>
17512         * tree-vect-stmts.c (get_load_store_type): Treat the number of
17513         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
17514         for variable-length vectors.
17515         (vectorizable_mask_load_store): Treat the number of units as
17516         polynomial, asserting that it is constant if the condition has
17517         already been enforced.
17518         (vectorizable_store, vectorizable_load): Likewise.
17520 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17521             Alan Hayward  <alan.hayward@arm.com>
17522             David Sherwood  <david.sherwood@arm.com>
17524         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
17525         of units as polynomial.  Punt if we can't tell at compile time
17526         which vector contains the final result.
17528 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17529             Alan Hayward  <alan.hayward@arm.com>
17530             David Sherwood  <david.sherwood@arm.com>
17532         * tree-vect-loop.c (vectorizable_induction): Treat the number
17533         of units as polynomial.  Punt on SLP inductions.  Use an integer
17534         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
17535         cast of such a series for variable-length floating-point
17536         reductions.
17538 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17539             Alan Hayward  <alan.hayward@arm.com>
17540             David Sherwood  <david.sherwood@arm.com>
17542         * tree.h (build_index_vector): Declare.
17543         * tree.c (build_index_vector): New function.
17544         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
17545         of units as polynomial, forcibly converting it to a constant if
17546         vectorizable_reduction has already enforced the condition.
17547         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
17548         to create a {1,2,3,...} vector.
17549         (vectorizable_reduction): Treat the number of units as polynomial.
17550         Choose vectype_in based on the largest scalar element size rather
17551         than the smallest number of units.  Enforce the restrictions
17552         relied on above.
17554 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17555             Alan Hayward  <alan.hayward@arm.com>
17556             David Sherwood  <david.sherwood@arm.com>
17558         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
17559         number of units as polynomial.
17561 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17562             Alan Hayward  <alan.hayward@arm.com>
17563             David Sherwood  <david.sherwood@arm.com>
17565         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
17566         * target.def (autovectorize_vector_sizes): Return the vector sizes
17567         by pointer, using vector_sizes rather than a bitmask.
17568         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
17569         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
17570         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
17571         Likewise.
17572         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
17573         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
17574         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
17575         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
17576         * omp-general.c (omp_max_vf): Likewise.
17577         * omp-low.c (omp_clause_aligned_alignment): Likewise.
17578         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
17579         * tree-vect-loop.c (vect_analyze_loop): Likewise.
17580         * tree-vect-slp.c (vect_slp_bb): Likewise.
17581         * doc/tm.texi: Regenerate.
17582         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
17583         to a poly_uint64.
17584         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
17585         the vector size as a poly_uint64 rather than an unsigned int.
17586         (current_vector_size): Change from an unsigned int to a poly_uint64.
17587         (get_vectype_for_scalar_type): Update accordingly.
17588         * tree.h (build_truth_vector_type): Take the size and number of
17589         units as a poly_uint64 rather than an unsigned int.
17590         (build_vector_type): Add a temporary overload that takes
17591         the number of units as a poly_uint64 rather than an unsigned int.
17592         * tree.c (make_vector_type): Likewise.
17593         (build_truth_vector_type): Take the number of units as a poly_uint64
17594         rather than an unsigned int.
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         * target.def (get_mask_mode): Take the number of units and length
17601         as poly_uint64s rather than unsigned ints.
17602         * targhooks.h (default_get_mask_mode): Update accordingly.
17603         * targhooks.c (default_get_mask_mode): Likewise.
17604         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
17605         * doc/tm.texi: Regenerate.
17607 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17608             Alan Hayward  <alan.hayward@arm.com>
17609             David Sherwood  <david.sherwood@arm.com>
17611         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
17612         * omp-general.c (omp_max_vf): Likewise.
17613         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
17614         (expand_omp_simd): Handle polynomial safelen.
17615         * omp-low.c (omplow_simd_context): Add a default constructor.
17616         (omplow_simd_context::max_vf): Change from int to poly_uint64.
17617         (lower_rec_simd_input_clauses): Update accordingly.
17618         (lower_rec_input_clauses): Likewise.
17620 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17621             Alan Hayward  <alan.hayward@arm.com>
17622             David Sherwood  <david.sherwood@arm.com>
17624         * tree-vectorizer.h (vect_nunits_for_cost): New function.
17625         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
17626         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
17627         (vect_analyze_slp_cost): Likewise.
17628         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
17629         (vect_model_load_cost): Likewise.
17631 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17632             Alan Hayward  <alan.hayward@arm.com>
17633             David Sherwood  <david.sherwood@arm.com>
17635         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
17636         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
17637         from an unsigned int * to a poly_uint64_pod *.
17638         (calculate_unrolling_factor): New function.
17639         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
17641 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17642             Alan Hayward  <alan.hayward@arm.com>
17643             David Sherwood  <david.sherwood@arm.com>
17645         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
17646         from an unsigned int to a poly_uint64.
17647         (_loop_vec_info::slp_unrolling_factor): Likewise.
17648         (_loop_vec_info::vectorization_factor): Change from an int
17649         to a poly_uint64.
17650         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
17651         (vect_get_num_vectors): New function.
17652         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
17653         (vect_get_num_copies): Use vect_get_num_vectors.
17654         (vect_analyze_data_ref_dependences): Change max_vf from an int *
17655         to an unsigned int *.
17656         (vect_analyze_data_refs): Change min_vf from an int * to a
17657         poly_uint64 *.
17658         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
17659         than an unsigned HOST_WIDE_INT.
17660         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
17661         (vect_analyze_data_ref_dependence): Change max_vf from an int *
17662         to an unsigned int *.
17663         (vect_analyze_data_ref_dependences): Likewise.
17664         (vect_compute_data_ref_alignment): Handle polynomial vf.
17665         (vect_enhance_data_refs_alignment): Likewise.
17666         (vect_prune_runtime_alias_test_list): Likewise.
17667         (vect_shift_permute_load_chain): Likewise.
17668         (vect_supportable_dr_alignment): Likewise.
17669         (dependence_distance_ge_vf): Take the vectorization factor as a
17670         poly_uint64 rather than an unsigned HOST_WIDE_INT.
17671         (vect_analyze_data_refs): Change min_vf from an int * to a
17672         poly_uint64 *.
17673         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
17674         vfm1 as a poly_uint64 rather than an int.  Make the same change
17675         for the returned bound_scalar.
17676         (vect_gen_vector_loop_niters): Handle polynomial vf.
17677         (vect_do_peeling): Likewise.  Update call to
17678         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
17679         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
17680         be constant.
17681         * tree-vect-loop.c (vect_determine_vectorization_factor)
17682         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
17683         (vect_get_known_peeling_cost): Likewise.
17684         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
17685         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
17686         (vect_transform_loop): Likewise.  Use the lowest possible VF when
17687         updating the upper bounds of the loop.
17688         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
17689         rather than an int.
17690         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
17691         polynomial unroll factors.
17692         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
17693         (vect_make_slp_decision): Likewise.
17694         (vect_supported_load_permutation_p): Likewise, and polynomial
17695         vf too.
17696         (vect_analyze_slp_cost): Handle polynomial vf.
17697         (vect_slp_analyze_node_operations): Likewise.
17698         (vect_slp_analyze_bb_1): Likewise.
17699         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
17700         than an unsigned HOST_WIDE_INT.
17701         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
17702         (vectorizable_load): Handle polynomial vf.
17703         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
17704         a poly_uint64.
17705         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
17707 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17708             Alan Hayward  <alan.hayward@arm.com>
17709             David Sherwood  <david.sherwood@arm.com>
17711         * match.pd: Handle bit operations involving three constants
17712         and try to fold one pair.
17714 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
17716         * tree-vect-loop-manip.c: Include gimple-fold.h.
17717         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
17718         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
17719         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
17720         Add a path that uses a step of VF instead of 1, but disable it
17721         for now.
17722         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
17723         and niters_no_overflow parameters.  Update calls to
17724         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
17725         Create a new SSA name if the latter choses to use a ste other
17726         than zero, and return it via niters_vector_mult_vf_var.
17727         * tree-vect-loop.c (vect_transform_loop): Update calls to
17728         vect_do_peeling, vect_gen_vector_loop_niters and
17729         slpeel_make_loop_iterate_ntimes.
17730         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
17731         (vect_gen_vector_loop_niters): Update declarations after above changes.
17733 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
17735         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
17736         128-bit round to integer instructions.
17737         (ceil<mode>2): Likewise.
17738         (btrunc<mode>2): Likewise.
17739         (round<mode>2): Likewise.
17741 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
17743         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
17744         unaligned VSX load/store on P8/P9.
17745         (expand_block_clear): Allow the use of unaligned VSX
17746         load/store on P8/P9.
17748 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17750         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
17751         New function.
17752         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
17753         swap associated with both a load and a store.
17755 2018-01-02  Andrew Waterman  <andrew@sifive.com>
17757         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
17758         * config/riscv/riscv.md (clear_cache): Use it.
17760 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
17762         * web.c: Remove out-of-date comment.
17764 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17766         * expr.c (fixup_args_size_notes): Check that any existing
17767         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
17768         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
17769         (emit_single_push_insn): ...here.
17771 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17773         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
17774         (const_vector_encoded_nelts): New function.
17775         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
17776         (const_vector_int_elt, const_vector_elt): Declare.
17777         * emit-rtl.c (const_vector_int_elt_1): New function.
17778         (const_vector_elt): Likewise.
17779         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
17780         of CONST_VECTOR_ELT.
17782 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17784         * expr.c: Include rtx-vector-builder.h.
17785         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
17786         directly on the tree encoding.
17787         (const_vector_from_tree): Likewise.
17788         * optabs.c: Include rtx-vector-builder.h.
17789         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
17790         sequence of "u" values.
17791         * vec-perm-indices.c: Include rtx-vector-builder.h.
17792         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
17793         directly on the vec_perm_indices encoding.
17795 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17797         * doc/rtl.texi (const_vector): Describe new encoding scheme.
17798         * Makefile.in (OBJS): Add rtx-vector-builder.o.
17799         * rtx-vector-builder.h: New file.
17800         * rtx-vector-builder.c: Likewise.
17801         * rtl.h (rtx_def::u2): Add a const_vector field.
17802         (CONST_VECTOR_NPATTERNS): New macro.
17803         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
17804         (CONST_VECTOR_DUPLICATE_P): Likewise.
17805         (CONST_VECTOR_STEPPED_P): Likewise.
17806         (CONST_VECTOR_ENCODED_ELT): Likewise.
17807         (const_vec_duplicate_p): Check for a duplicated vector encoding.
17808         (unwrap_const_vec_duplicate): Likewise.
17809         (const_vec_series_p): Check for a non-duplicated vector encoding.
17810         Say that the function only returns true for integer vectors.
17811         * emit-rtl.c: Include rtx-vector-builder.h.
17812         (gen_const_vec_duplicate_1): Delete.
17813         (gen_const_vector): Call gen_const_vec_duplicate instead of
17814         gen_const_vec_duplicate_1.
17815         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
17816         (gen_const_vec_duplicate): Use rtx_vector_builder.
17817         (gen_const_vec_series): Likewise.
17818         (gen_rtx_CONST_VECTOR): Likewise.
17819         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
17820         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
17821         Build a new vector rather than modifying a CONST_VECTOR in-place.
17822         (handle_special_swappables): Update call accordingly.
17823         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
17824         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
17825         Build a new vector rather than modifying a CONST_VECTOR in-place.
17826         (handle_special_swappables): Update call accordingly.
17828 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17830         * simplify-rtx.c (simplify_const_binary_operation): Use
17831         CONST_VECTOR_ELT instead of XVECEXP.
17833 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17835         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
17836         the selector elements to be different from the data elements
17837         if the selector is a VECTOR_CST.
17838         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
17839         ssizetype for the selector.
17841 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17843         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
17844         before testing each element individually.
17845         * tree-vect-generic.c (lower_vec_perm): Likewise.
17847 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17849         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
17850         * selftest-run-tests.c (selftest::run_tests): Call it.
17851         * vector-builder.h (vector_builder::operator ==): New function.
17852         (vector_builder::operator !=): Likewise.
17853         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
17854         (vec_perm_indices::all_from_input_p): New function.
17855         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
17856         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
17857         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
17858         instead of reading the VECTOR_CST directly.  Detect whether both
17859         vector inputs are the same before constructing the vec_perm_indices,
17860         and update the number of inputs argument accordingly.  Use the
17861         utility functions added above.  Only construct sel2 if we need to.
17863 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17865         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
17866         the broadcast of the low byte.
17867         (expand_mult_highpart): Use an explicit encoding for the permutes.
17868         * optabs-query.c (can_mult_highpart_p): Likewise.
17869         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
17870         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17871         (vectorizable_bswap): Likewise.
17872         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
17873         explicit encoding for the power-of-2 permutes.
17874         (vect_permute_store_chain): Likewise.
17875         (vect_grouped_load_supported): Likewise.
17876         (vect_permute_load_chain): Likewise.
17878 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17880         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
17881         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
17882         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
17883         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
17884         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
17885         (vect_gen_perm_mask_any): Likewise.
17887 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17889         * int-vector-builder.h: New file.
17890         * vec-perm-indices.h: Include int-vector-builder.h.
17891         (vec_perm_indices): Redefine as an int_vector_builder.
17892         (auto_vec_perm_indices): Delete.
17893         (vec_perm_builder): Redefine as a stand-alone class.
17894         (vec_perm_indices::vec_perm_indices): New function.
17895         (vec_perm_indices::clamp): Likewise.
17896         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
17897         (vec_perm_indices::new_vector): New function.
17898         (vec_perm_indices::new_expanded_vector): Update for new
17899         vec_perm_indices class.
17900         (vec_perm_indices::rotate_inputs): New function.
17901         (vec_perm_indices::all_in_range_p): Operate directly on the
17902         encoded form, without computing elided elements.
17903         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
17904         encoding.  Update for new vec_perm_indices class.
17905         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
17906         the given vec_perm_builder.
17907         (expand_vec_perm_var): Update vec_perm_builder constructor.
17908         (expand_mult_highpart): Use vec_perm_builder instead of
17909         auto_vec_perm_indices.
17910         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
17911         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
17912         or double series encoding as appropriate.
17913         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
17914         vec_perm_indices instead of auto_vec_perm_indices.
17915         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17916         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
17917         (vect_permute_store_chain): Likewise.
17918         (vect_grouped_load_supported): Likewise.
17919         (vect_permute_load_chain): Likewise.
17920         (vect_shift_permute_load_chain): Likewise.
17921         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
17922         (vect_transform_slp_perm_load): Likewise.
17923         (vect_schedule_slp_instance): Likewise.
17924         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
17925         (vectorizable_mask_load_store): Likewise.
17926         (vectorizable_bswap): Likewise.
17927         (vectorizable_store): Likewise.
17928         (vectorizable_load): Likewise.
17929         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
17930         vec_perm_indices instead of auto_vec_perm_indices.  Use
17931         tree_to_vec_perm_builder to read the vector from a tree.
17932         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
17933         vec_perm_builder instead of a vec_perm_indices.
17934         (have_whole_vector_shift): Use vec_perm_builder and
17935         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
17936         truncation to calc_vec_perm_mask_for_shift.
17937         (vect_create_epilog_for_reduction): Likewise.
17938         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
17939         from auto_vec_perm_indices to vec_perm_indices.
17940         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
17941         instead of changing individual elements.
17942         (aarch64_vectorize_vec_perm_const): Use new_vector to install
17943         the vector in d.perm.
17944         * config/arm/arm.c (expand_vec_perm_d::perm): Change
17945         from auto_vec_perm_indices to vec_perm_indices.
17946         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
17947         instead of changing individual elements.
17948         (arm_vectorize_vec_perm_const): Use new_vector to install
17949         the vector in d.perm.
17950         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
17951         Update vec_perm_builder constructor.
17952         (rs6000_expand_interleave): Likewise.
17953         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
17954         (rs6000_expand_interleave): Likewise.
17956 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17958         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
17959         to qimode could truncate the indices.
17960         * optabs.c (expand_vec_perm_var): Likewise.
17962 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
17964         * Makefile.in (OBJS): Add vec-perm-indices.o.
17965         * vec-perm-indices.h: New file.
17966         * vec-perm-indices.c: Likewise.
17967         * target.h (vec_perm_indices): Replace with a forward class
17968         declaration.
17969         (auto_vec_perm_indices): Move to vec-perm-indices.h.
17970         * optabs.h: Include vec-perm-indices.h.
17971         (expand_vec_perm): Delete.
17972         (selector_fits_mode_p, expand_vec_perm_var): Declare.
17973         (expand_vec_perm_const): Declare.
17974         * target.def (vec_perm_const_ok): Replace with...
17975         (vec_perm_const): ...this new hook.
17976         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
17977         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
17978         * doc/tm.texi: Regenerate.
17979         * optabs.def (vec_perm_const): Delete.
17980         * doc/md.texi (vec_perm_const): Likewise.
17981         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
17982         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
17983         expand_vec_perm for constant permutation vectors.  Assert that
17984         the mode of variable permutation vectors is the integer equivalent
17985         of the mode that is being permuted.
17986         * optabs-query.h (selector_fits_mode_p): Declare.
17987         * optabs-query.c: Include vec-perm-indices.h.
17988         (selector_fits_mode_p): New function.
17989         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
17990         is defined, instead of checking whether the vec_perm_const_optab
17991         exists.  Use targetm.vectorize.vec_perm_const instead of
17992         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
17993         fit in the vector mode before using a variable permute.
17994         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
17995         vec_perm_indices instead of an rtx.
17996         (expand_vec_perm): Replace with...
17997         (expand_vec_perm_const): ...this new function.  Take the selector
17998         as a vec_perm_indices rather than an rtx.  Also take the mode of
17999         the selector.  Update call to shift_amt_for_vec_perm_mask.
18000         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
18001         Use vec_perm_indices::new_expanded_vector to expand the original
18002         selector into bytes.  Check whether the indices fit in the vector
18003         mode before using a variable permute.
18004         (expand_vec_perm_var): Make global.
18005         (expand_mult_highpart): Use expand_vec_perm_const.
18006         * fold-const.c: Includes vec-perm-indices.h.
18007         * tree-ssa-forwprop.c: Likewise.
18008         * tree-vect-data-refs.c: Likewise.
18009         * tree-vect-generic.c: Likewise.
18010         * tree-vect-loop.c: Likewise.
18011         * tree-vect-slp.c: Likewise.
18012         * tree-vect-stmts.c: Likewise.
18013         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
18014         Delete.
18015         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
18016         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
18017         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
18018         (aarch64_vectorize_vec_perm_const): ...this new function.
18019         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18020         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18021         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
18022         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
18023         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18024         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18025         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
18026         into...
18027         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
18028         check for NEON modes.
18029         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
18030         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
18031         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
18032         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
18033         into...
18034         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
18035         the old VEC_PERM_CONST conditions.
18036         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
18037         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
18038         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
18039         (ia64_vectorize_vec_perm_const_ok): Merge into...
18040         (ia64_vectorize_vec_perm_const): ...this new function.
18041         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
18042         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
18043         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
18044         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
18045         * config/mips/mips.c (mips_expand_vec_perm_const)
18046         (mips_vectorize_vec_perm_const_ok): Merge into...
18047         (mips_vectorize_vec_perm_const): ...this new function.
18048         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
18049         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
18050         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
18051         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
18052         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
18053         (rs6000_expand_vec_perm_const): Delete.
18054         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
18055         Delete.
18056         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18057         (altivec_expand_vec_perm_const_le): Take each operand individually.
18058         Operate on constant selectors rather than rtxes.
18059         (altivec_expand_vec_perm_const): Likewise.  Update call to
18060         altivec_expand_vec_perm_const_le.
18061         (rs6000_expand_vec_perm_const): Delete.
18062         (rs6000_vectorize_vec_perm_const_ok): Delete.
18063         (rs6000_vectorize_vec_perm_const): New function.
18064         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
18065         an element count and rtx array.
18066         (rs6000_expand_extract_even): Update call accordingly.
18067         (rs6000_expand_interleave): Likewise.
18068         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
18069         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
18070         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
18071         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
18072         (rs6000_expand_vec_perm_const): Delete.
18073         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
18074         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18075         (altivec_expand_vec_perm_const_le): Take each operand individually.
18076         Operate on constant selectors rather than rtxes.
18077         (altivec_expand_vec_perm_const): Likewise.  Update call to
18078         altivec_expand_vec_perm_const_le.
18079         (rs6000_expand_vec_perm_const): Delete.
18080         (rs6000_vectorize_vec_perm_const_ok): Delete.
18081         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
18082         reference to the SPE evmerge intructions.
18083         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
18084         an element count and rtx array.
18085         (rs6000_expand_extract_even): Update call accordingly.
18086         (rs6000_expand_interleave): Likewise.
18087         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
18088         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
18089         new function.
18090         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
18092 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18094         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
18095         vector mode and that that mode matches the mode of the data
18096         being permuted.
18097         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
18098         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
18099         directly using expand_vec_perm_1 when forcing selectors into
18100         registers.
18101         (expand_vec_perm_var): New function, split out from expand_vec_perm.
18103 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18105         * optabs-query.h (can_vec_perm_p): Delete.
18106         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
18107         * optabs-query.c (can_vec_perm_p): Split into...
18108         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
18109         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
18110         particular selector is valid.
18111         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18112         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18113         (vect_grouped_load_supported): Likewise.
18114         (vect_shift_permute_load_chain): Likewise.
18115         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
18116         (vect_transform_slp_perm_load): Likewise.
18117         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18118         (vectorizable_bswap): Likewise.
18119         (vect_gen_perm_mask_checked): Likewise.
18120         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
18121         implementations of variable permutation vectors into account
18122         when deciding which selector to use.
18123         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
18124         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
18125         with a false third argument.
18126         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
18127         to test whether the constant selector is valid and can_vec_perm_var_p
18128         to test whether a variable selector is valid.
18130 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18132         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
18133         * optabs-query.c (can_vec_perm_p): Likewise.
18134         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
18135         instead of vec_perm_indices.
18136         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
18137         (vect_gen_perm_mask_checked): Likewise,
18138         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
18139         (vect_gen_perm_mask_checked): Likewise,
18141 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
18143         * optabs-query.h (qimode_for_vec_perm): Declare.
18144         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
18145         (qimode_for_vec_perm): ...this new function.
18146         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
18148 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
18150         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
18151         does not have a conditional at the top.
18153 2018-01-02  Richard Biener  <rguenther@suse.de>
18155         * ipa-inline.c (big_speedup_p): Fix expression.
18157 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
18159         PR target/81616
18160         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
18161         for generic 4->6.
18163 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
18165         PR target/81616
18166         Generic tuning.
18167         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
18168         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
18169         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
18170         cond_taken_branch_cost 3->4.
18172 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
18174         PR tree-optimization/83581
18175         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
18176         TODO_cleanup_cfg if any changes have been made.
18178         PR middle-end/83608
18179         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
18180         convert_modes if target mode has the right side, but different mode
18181         class.
18183         PR middle-end/83609
18184         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
18185         last argument when extracting from CONCAT.  If either from_real or
18186         from_imag is NULL, use expansion through memory.  If result is not
18187         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
18188         the parts directly to inner mode, if even that fails, use expansion
18189         through memory.
18191         PR middle-end/83623
18192         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
18193         check for bswap in mode rather than HImode and use that in expand_unop
18194         too.
18196 Copyright (C) 2018 Free Software Foundation, Inc.
18198 Copying and distribution of this file, with or without modification,
18199 are permitted in any medium without royalty provided the copyright
18200 notice and this notice are preserved.