[RS6000] Use config/linux.h for powerpc*-*-linux*
[official-gcc.git] / gcc / ChangeLog
blob19a802c6c7200725b6733452326e06ae5e893b65
1 2018-11-27  Alan Modra  <amodra@gmail.com>
3         * config.gcc (powerpc*-*-linux*): Add linux.h to tm_file.
4         * config/rs6000/linux.h (TARGET_OS_CPP_BUILTINS): Use
5         GNU_USER_TARGET_OS_CPP_BUILTINS.
6         (RS6000_ABI_NAME): Define.
7         * config/rs6000/linux64.h (TARGET_OS_CPP_BUILTINS): Use
8         GNU_USER_TARGET_OS_CPP_BUILTINS.
9         (MUSL_DYNAMIC_LINKER32): Undef before defining.
10         (UCLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER64): Don't define.
11         (CHOOSE_DYNAMIC_LINKER): Don't define.
12         (GNU_USER_DYNAMIC_LINKER32, GNU_USER_DYNAMIC_LINKER64): Don't define.
13         * config/rs6000/sysv4.h (MUSL_DYNAMIC_LINKER): Undef before defining.
14         (CHOOSE_DYNAMIC_LINKER, GNU_USER_DYNAMIC_LINKER): Only define when
15         not already defined.
16         (CPP_OS_LINUX_SPEC): Remove defines and asserts handled by
17         TARGET_OS_CPP_BUILTINS.
19 2018-11-26  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
21         * doc/sourcebuild.texi: Document check_effective_target_newlib_nano_io.
23 2018-11-26  Jakub Jelinek  <jakub@redhat.com>
25         PR target/88195
26         * config/i386/i386.c (def_builtin2): If tcode == VOID_FTYPE_UINT64
27         and !TARGET_64BIT, return NULL_TREE.
29         PR c++/86900
30         * dwarf2out.c (secname_for_decl): For functions with
31         DECL_SECTION_NAME if in_cold_section_p, try to return
32         current_function_section's name if it is a named section.
34 2018-11-26  Maya Rashish  <coypu@sdf.org>
36         PR target/58397
37         * config.host (*-*-netbsd*): Use x-netbsd and host-netbsd.o.
38         * config/x-netbsd: New file.
39         * config/host-netbsd: New file.
41 2018-11-26  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
43         * doc/sourcebuild.texi: Document check_effective_target_size20plus.
44         Clarify documentation for check_effective_target_size32plus.
46 2018-11-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
48         * config/rs6000/rs6000-string.c (expand_cmp_vec_sequence): Rename
49         and modify expand_strncmp_vec_sequence.
50         (emit_final_compare_vec): Rename and modify emit_final_str_compare_vec.
51         (generate_6432_conversion): New function.
52         (expand_block_compare): Add support for vsx.
53         (expand_block_compare_gpr): New function.
54         * config/rs6000/rs6000.opt (rs6000_block_compare_inline_limit): Increase
55         default limit to 63 because of more compact vsx code.
57 2018-11-26  Uros Bizjak  <ubizjak@gmail.com>
59         PR target/88178
60         * config/i386/i386.c (dbx_register_map): Use IGNORED_DWARF_REGNUM
61         for registers for which no debug information can be generated.
62         Use INVALID_REGNUM for non-existent registers.
63         (dbx64_register_map): Ditto.
64         (svr4_dbx_register_map): Ditto.
66 2018-11-26  Sandra Loosemore  <sandra@codesourcery.com>
68         PR c/57182
69         * doc/invoke.texi (Optimize Options): Document that
70         -freorder-functions also uses "hot" and "cold" attributes.
72 2018-11-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
74         * config/aarch64/aarch64.c (aarch64_mangle_type): Fix typo in comment.
76 2018-11-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
78         * config/arm/types.md (mul64): Rename to...
79         (widen_mul64): ... This.
80         * config/arm/arm-generic.md: Rename mul64 to widen_mul64.
81         * config/arm/cortex-a15.md: Likewise.
82         * config/arm/cortex-a5.md: Likewise.
83         * config/arm/cortex-a53.md: Likewise.
84         * config/arm/cortex-a57.md: Likewise.
85         * config/arm/cortex-a7.md: Likewise.
86         * config/arm/cortex-m4.md: Likewise.
87         * config/arm/exynos-m1.md: Likewise.
88         * config/arm/marvell-pj4.md: Likewise.
89         * config/arm/xgene1.md: Likewise.
91 2018-11-26  Richard Biener  <rguenther@suse.de>
93         PR tree-optimization/88182
94         * tree-vect-loop.c (vectorizable_reduction): Pick up single
95         correct reduc_def_info.
96         * tree-vect-slp.c (vect_analyze_slp_instance): Set
97         STMT_VINFO_REDUC_DEF of the first stmt.
99 2018-11-26  Andreas Krebbel  <krebbel@linux.ibm.com>
101         * doc/invoke.texi: Document z14/arch12 -march option.
103 2018-11-25  Sandra Loosemore  <sandra@codesourcery.com>
105         PR c/57166
106         * doc/invoke.texi (Option Summary): Add -Wmissing-noreturn.
107         (Warning Options): Likewise.
109 2018-11-25  Sandra Loosemore  <sandra@codesourcery.com>
111         PR web/79738
112         * doc/extend.texi (Common Function Attributes): Clarify that
113         functions with "const" attribute can read const global variables.
115 2018-11-26  Alan Modra  <amodra@gmail.com>
117         * config/rs6000/rs6000.h (OBJECT_PEF, TARGET_MACOS): Delete.
119 2018-11-25  Sandra Loosemore  <sandra@codesourcery.com>
121         PR other/54265
122         * doc/extend.texi (Common Variable Attributes): Use preferred
123         placement of type attributes in examples, plus whitespace fixes.
124         (Type Attributes): Clarify why placement of attributes
125         immediately after struct/union/enum keyword is preferred.
126         (Common Type Attributes): Use preferred placement of type
127         attributes in examples, plus more whitespace fixes.
129 2018-11-25  Paul Koning  <ni1d@arrl.net>
131         * config/pdp11/pdp11.h (TARGET_HAS_NO_HW_DIVIDE): Define.
133 2018-11-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
135         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
136         attributes): Document d_runtime.
138 2018-11-25  Vladimir Makarov  <vmakarov@redhat.com>
140         PR bootstrap/88157
141         * ira-costs.c (record_operand_costs): Initiate register move cost
142         for mode.
144 2018-11-23  Jeff Law  <law@redhat.com>
146         PR rtl-optimization/87468
147         * tree-ssa-threadupdate.c (create_block_for_threading): Clear
148         EDGE_IGNORE on all outgoing edges of the duplicate block.
150 2018-11-23  Vladimir Makarov  <vmakarov@redhat.com>
152         PR bootstrap/88157
153         * ira-costs.c (record_operand_costs): Use bigger hard reg class if
154         its mode does not fit to the original class.
156 2018-11-23  Martin Sebor  <msebor@redhat.com>
158         PR tree-optimization/87756
159         * expr.c (string_constant): Synthesize a string literal from
160         the address of a constant character.
161         * tree.c (build_string_literal): Add an argument.
162         * tree.h (build_string_literal): Same.
164 2018-11-23  Christoph Muellner  <christoph.muellner@theobroma-systems.com>
166         * config/aarch64/aarch64-cores.def: Define emag.
167         * config/aarch64/aarch64-tune.md: Regenerated with emag.
168         * config/aarch64/aarch64.c (emag_tunings): New struct.
169         * doc/invoke.texi: Document mtune value.
171 2018-11-23  Christoph Muellner  <christoph.muellner@theobroma-systems.com>
172             Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
174         * config/aarch64/aarch64.c (xgene1_tunings): Optimize Xgene1 tunings
175         for GCC 9.
176         * config/aarch64/aarch64.c (xgene1_tunings): Add Xgene1 specific
177         prefetch tunings.
178         * config/aarch64/aarch64.c (xgene1_addrcost_table): Correct the post-modify
179         costs.
180         * config/arm/aarch-cost-tables.h (xgene1_extra_costs): Update the cost table
181         for XGene1.
183 2018-11-23  Richard Biener  <rguenther@suse.de>
185         PR tree-optimization/88149
186         * tree-vect-slp.c (vect_slp_analyze_node_operations): Detect
187         the case where there are two different def types for the
188         same operand at different operand position in the same stmt.
190 2018-23-11  Mihail Ionescu  <mihail.ionescu@arm.com>
192         * config/arm/arm.c (arm_expand_compare_and_swap): Simplify and call
193         gen_atomic_compare_swap_1.
194         (arm_evpc_neon_vuzp): Likewise gen_neon_vuzp_internal.
195         (arm_evpc_neon_vtrn): Likewise gen_neon_vtrn_internal.
196         (arm_evpc_neon_vext): Likewise gen_neon_vext_internal.
197         (arm_evpc_neon_vzip): Likewise gen_neon_vzip_internal.
198         (arm_evpc_neon_vrev): Replace the function pointer and simplify the mode
199         checks.
200         * config/arm/arm.md (neon_vext<mode>),
201         (neon_vrev64<mode>, neon_vrev32<mode>),
202         (neon_vrev16<mode>, neon_vtrn<mode>_internal),
203         (neon_vzip<mode>_internal, neon_vuzp<mode>_internal): Add an '@'character
204         before the pattern name.
205         * config/arm/sync.md:
206         (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1),
207         (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): Likewise.
209 2018-11-23  Jakub Jelinek  <jakub@redhat.com>
211         PR tree-optimization/86614
212         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return early
213         if TREE_NO_WARNING is set on ref.ref.
215 2018-11-22  Sandra Loosemore  <sandra@codesourcery.com>
216             Alan Coopersmith  <alan.coopersmith@oracle.com>
218         PR c/53608
219         * doc/extend.texi (Designated Inits): Clarify handling of multiple
220         initializers for unions.
222 2018-11-22  Jan Hubicka  <jh@suse.cz>
224         PR lto/88142
225         * ipa-devirt.c (type_variants_equivalent_p): Drop warn and warned
226         parameters; do not warn here.
227         (odr_subtypes_equivalent_p): Likewise.
228         (warn_odr): Fix typo.
229         (warn_types_mismatch): Do not output confused warnings on integer types.
230         (odr_types_equivalent_p): Update.
232 2018-11-22  Jakub Jelinek  <jakub@redhat.com>
234         * config/i386/i386.c (ix86_option_override_internal,
235         ix86_can_inline_p, classify_argument, construct_container,
236         ix86_expand_prologue, ix86_expand_split_stack_prologue,
237         ix86_expand_carry_flag_compare, expand_set_or_movmem_via_loop,
238         expand_setmem_epilogue_via_loop, promote_duplicated_reg,
239         ix86_expand_set_or_movmem, ix86_init_builtins_va_builtins_abi):
240         Formatting fixes.
242         * config/i386/i386.c (ix86_option_override_internal): For
243         stack_protector_guard related options, use opts_set->x_ instead
244         of global_options_set. and prefix options with opts->x_ .  Move
245         defaults for offset and reg into else block.
247 2018-11-22  Uros Bizjak  <ubizjak@gmail.com>
249         * config/i386/i386.c (ix86_check_avx_upper_register):
250         Return true for all SSE registers with mode bitsize > 128.
252 2018-11-22  Vladimir Makarov  <vmakarov@redhat.com>
254         PR rtl-optimization/87718
255         * ira-costs.c: Remove trailing white-spaces.
256         (record_operand_costs): Add a special treatment for moves
257         involving a hard register.
259 2018-11-22  Uros Bizjak  <ubizjak@gmail.com>
261         * config/i386/i386.c (ix86_avx_emit_vzeroupper): Remove.
262         (ix86_emit_mode_set) <case AVX_U128>: Emit vzeroupper here.
264 2018-11-22  Martin Liska  <mliska@suse.cz>
266         * common/config/i386/i386-common.c (processor_names): Add
267         static assert and add missing "znver2".
268         (ix86_get_valid_option_values): Add checking assert for null
269         values and add "native" value if feasible.
270         * config/i386/i386.h: Do not declare size of processor_names.
271         * common/config/i386/i386-common.c:
272         * config/i386/i386.c: Add static assert for size
273         of processor_cost_table.
275 2018-11-22  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
277         * target-insns.def (stack_protect_combined_set): Define new standard
278         pattern name.
279         (stack_protect_combined_test): Likewise.
280         * cfgexpand.c (stack_protect_prologue): Try new
281         stack_protect_combined_set pattern first.
282         * function.c (stack_protect_epilogue): Try new
283         stack_protect_combined_test pattern first.
284         * config/arm/arm.c (require_pic_register): Add pic_reg and compute_now
285         parameters to control which register to use as PIC register and force
286         reloading PIC register respectively.  Insert in the stream of insns if
287         possible.
288         (legitimize_pic_address): Expose above new parameters in prototype and
289         adapt recursive calls accordingly.  Use pic_reg if non null instead of
290         cached one.
291         (arm_load_pic_register): Add pic_reg parameter and use it if non null.
292         (arm_legitimize_address): Adapt to new legitimize_pic_address
293         prototype.
294         (thumb_legitimize_address): Likewise.
295         (arm_emit_call_insn): Adapt to require_pic_register prototype change.
296         (arm_expand_prologue): Adapt to arm_load_pic_register prototype change.
297         (thumb1_expand_prologue): Likewise.
298         * config/arm/arm-protos.h (legitimize_pic_address): Adapt to prototype
299         change.
300         (arm_load_pic_register): Likewise.
301         * config/arm/predicated.md (guard_addr_operand): New predicate.
302         (guard_operand): New predicate.
303         * config/arm/arm.md (movsi expander): Adapt to legitimize_pic_address
304         prototype change.
305         (builtin_setjmp_receiver expander): Adapt to thumb1_expand_prologue
306         prototype change.
307         (stack_protect_combined_set): New expander..
308         (stack_protect_combined_set_insn): New insn_and_split pattern.
309         (stack_protect_set_insn): New insn pattern.
310         (stack_protect_combined_test): New expander.
311         (stack_protect_combined_test_insn): New insn_and_split pattern.
312         (arm_stack_protect_test_insn): New insn pattern.
313         * config/arm/thumb1.md (thumb1_stack_protect_test_insn): New insn pattern.
314         * config/arm/unspecs.md (UNSPEC_SP_SET): New unspec.
315         (UNSPEC_SP_TEST): Likewise.
316         * doc/md.texi (stack_protect_combined_set): Document new standard
317         pattern name.
318         (stack_protect_set): Clarify that the operand for guard's address is
319         legal.
320         (stack_protect_combined_test): Document new standard pattern name.
321         (stack_protect_test): Clarify that the operand for guard's address is
322         legal.
324 2018-11-22  Richard Biener  <rguenther@suse.de>
326         PR tree-optimization/88148
327         * tree-ssa-loop-niter.c (simplify_replace_tree): Get optional
328         valueization callback parameter and handle it.
329         * tree-ssa-loop-niter.h (simplify_replace_tree): Export.
330         * tree-ssa-sccvn.c (process_bb): Eliminate in loop niter trees.
332 2018-11-22  Richard Biener  <rguenther@suse.de>
334         PR lto/87229
335         PR lto/88112
336         * lto-streamer-out.c (lto_is_streamable): Allow CALL_EXPRs
337         which can appear in size expressions.
338         * tree-streamer-in.c (unpack_ts_base_value_fields): Stream
339         CALL_EXPR_BY_DESCRIPTOR.
340         (streamer_read_tree_bitfields): Stream CALL_EXPR_IFN.
341         * tree-streamer-out.c (pack_ts_base_value_fields): Stream
342         CALL_EXPR_BY_DESCRIPTOR.
343         (streamer_write_tree_bitfields): Stream CALL_EXPR_IFN.
345         Revert
346         PR lto/87229
347         * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
348         sizepos values.
350 2018-11-22  Richard Biener  <rguenther@suse.de>
352         PR tree-optimization/88069
353         * tree-ssa-sccvn.c (visit_phi): Tweak previous fix to not
354         apply to default defs.
356 2018-11-22  Jakub Jelinek  <jakub@redhat.com>
358         PR target/85644
359         PR target/86832
360         * config/i386/i386.c (ix86_option_override_internal): Default
361         ix86_stack_protector_guard to SSP_TLS only if TARGET_THREAD_SSP_OFFSET
362         is defined.
363         * config/i386/i386.md (stack_protect_set, stack_protect_set_<mode>,
364         stack_protect_test, stack_protect_test_<mode>): Use empty condition
365         instead of TARGET_SSP_TLS_GUARD.
367 2018-11-22  Martin Liska  <mliska@suse.cz>
369         PR sanitizer/88017
370         * config/i386/i386.c (ix86_option_override_internal): Error
371         about usage -mabi=ms and -fsanitize=thread.
373 2018-11-21  Uros Bizjak  <ubizjak@gmail.com>
375         Revert the revert:
376         2013-10-26  Vladimir Makarov  <vmakarov@redhat.com>
378         Revert:
379         2013-10-25  Vladimir Makarov  <vmakarov@redhat.com>
381         * lra-spills.c (lra_final_code_change): Remove useless move insns.
383 2018-11-21  Uros Bizjak  <ubizjak@gmail.com>
385         PR middle-end/88129
386         * function.c (expand_function_end): Do not emit extra blockage insn.
388 2018-11-21  Lokesh Janghel  <lokeshjanghel91@gmail.com>
390         PR target/85667
391         * config/i386/i386.c (function_value_ms_64): Return AX_REG instead
392         of FIRST_SSE_REG for 4 or 8 byte modes.
394 2018-11-21  Jan Hubicka  <jh@suse.cz>
396         PR lto/87957
397         * tree.c (fld_decl_context): Break out from ...
398         (free_lang_data_in_decl): ... here; free TREE_PUBLIC, TREE_PRIVATE
399         DECL_ARTIFICIAL of TYPE_DECL; do not free TREE_TYPE of TYPE_DECL.
400         (fld_incomplete_type_of): Build copy of TYP_DECL.
401         * ipa-devirt.c (free_enum_values): Rename to ...
402         (free_odr_warning_data): ... this one; free also duplicated TYPE_DECLs
403         and TREE_TYPEs of TYPE_DECLs.
404         (get_odr_type): Initialize odr_vtable_hash if needed.
406 2018-11-21  Alexandre Oliva <oliva@adacore.com>
408         * final.c (compute_discriminator): Declare.  Renamed from...
409         (maybe_set_discriminator): ... this.  Set and return a local.
410         (override_discriminator): New.
411         (final_scan_insn_1): Set it.
412         (notice_source_line): Adjust.  Always set discriminator.
414 2018-11-21  Jakub Jelinek  <jakub@redhat.com>
416         PR target/87839
417         * config/aarch64/atomics.md (@aarch64_compare_and_swap<mode>): Use
418         rIJ constraint for aarch64_plus_operand rather than rn.
420 2018-11-21  Renlin Li  <renlin.li@arm.com>
422         PR middle-end/84877
423         * explow.h (get_dynamic_stack_size): Declare it as external.
424         * explow.c (record_new_stack_level): Remove function static attribute.
425         * function.c (assign_stack_local_1): Dynamically align the stack slot
426         addr for parameter copy on the stack.
428 2018-11-21  Richard Biener  <rguenther@suse.de>
430         PR bootstrap/88133
431         * bitmap.c (bitmap_last_set_bit): Refactor to avoid warning.
432         * Makefile.in (bitmap.o-warn): Remove again.
434 2018-11-20  Jeff Law  <law@redhat.com>
436         PR tree-optimization/88069
437         * tree-ssa-dom.c (record_equivalences_from_phis): Propagate away
438         degenerate virtual PHIs.
440 2018-11-21  H.J. Lu  <hongjiu.lu@intel.com>
442         PR target/87317
443         * config/i386/sse.md (sse4_1_<code>v8qiv8hi2<mask_name>): Replace
444         nonimmediate_operand with register_operand.
445         (avx2_<code>v8qiv8si2<mask_name>): Likewise.
446         (sse4_1_<code>v4qiv4si2<mask_name>): Likewise.
447         (sse4_1_<code>v4hiv4si2<mask_name>): Likewise.
448         (sse4_1_<code>v2qiv2di2<mask_name>): Likewise.
449         (avx512f_<code>v8qiv8di2<mask_name>): Likewise.
450         (avx2_<code>v4qiv4di2<mask_name>): Likewise.
451         (avx2_<code>v4hiv4di2<mask_name>): Likewise.
452         (sse4_1_<code>v2hiv2di2<mask_name>): Likewise.
453         (sse4_1_<code>v2siv2di2<mask_name>): Likewise.
454         (*sse4_1_<code>v8qiv8hi2<mask_name>_1): New pattern.
455         (*sse4_1_<code>v8qiv8hi2<mask_name>_2): Likewise.
456         (*avx2_<code>v8qiv8si2<mask_name>_1): Likewise.
457         (*avx2_<code>v8qiv8si2<mask_name>_2): Likewise.
458         (*sse4_1_<code>v4qiv4si2<mask_name>_1): Likewise.
459         (*sse4_1_<code>v4qiv4si2<mask_name>_2): Likewise.
460         (*sse4_1_<code>v4hiv4si2<mask_name>_1): Likewise.
461         (*sse4_1_<code>v4hiv4si2<mask_name>_2): Likewise.
462         (*avx512f_<code>v8qiv8di2<mask_name>_1): Likewise.
463         (*avx512f_<code>v8qiv8di2<mask_name>_2): Likewise.
464         (*avx2_<code>v4qiv4di2<mask_name>_1): Likewise.
465         (*avx2_<code>v4qiv4di2<mask_name>_2): Likewise.
466         (*avx2_<code>v4hiv4di2<mask_name>_1): Likewise.
467         (*avx2_<code>v4hiv4di2<mask_name>_2): Likewise.
468         (*sse4_1_<code>v2hiv2di2<mask_name>_1): Likewise.
469         (*sse4_1_<code>v2hiv2di2<mask_name>_2): Likewise.
470         (*sse4_1_<code>v2siv2di2<mask_name>_1): Likewise.
471         (*sse4_1_<code>v2siv2di2<mask_name>_2): Likewise.
473 2018-11-21  H.J. Lu  <hongjiu.lu@intel.com>
475         * read-rtl.c (apply_subst_iterator): Handle define_split and
476         define_insn_and_split.
478 2018-11-21  Jakub Jelinek  <jakub@redhat.com>
480         PR rtl-optimization/87817
481         * config/i386/i386.md (bmi2_bzhi_<mode>3, *bmi2_bzhi_<mode>3,
482         *bmi2_bzhi_<mode>3_1, *bmi2_bzhi_<mode>3_1_ccz): Use IF_THEN_ELSE
483         in the pattern to avoid triggering UB when operands[2] is zero.
484         (tbm_bextri_<mode>): New expander.  Renamed the old define_insn to ...
485         (*tbm_bextri_<mode>): ... this.
487 2018-11-21  Tom de Vries  <tdevries@suse.de>
489         PR driver/79855
490         * params.def (HOT_BB_COUNT_FRACTION): Terminate help message with
491         period.
493 2018-11-21  Andreas Krebbel  <krebbel@linux.ibm.com>
495         * configure.ac: Add check for Binutils to determine whether vector
496         load/store alignments hints are being supported.
497         * config.in: Regenerate.
498         * configure: Regenerate.
499         * config/s390/s390.c (print_operand): Support new output
500         modifier A.
501         * config/s390/s390.md ("movti"): Append alignment hint output
502         using the new output modifier 'A'.
503         * config/s390/vector.md ("mov<mode>", "*vec_tf_to_v1tf")
504         ("*vec_ti_to_v1ti"): Likewise.
506 2018-11-20  Martin Sebor  <msebor@redhat.com>
508         * doc/extend.texi (Other Builtins): Add __builtin_has_attribute.
510 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
512         PR lto/84044
513         * ipa-devirt.c (odr_types_equivalent_p): Use operand_equal_p to
514         compare ENUM values.
516 2018-11-20  Jakub Jelinek  <jakub@redhat.com>
518         PR tree-optimization/87895
519         * omp-simd-clone.c (ipa_simd_modify_function_body): When removing
520         or replacing GIMPLE_RETURN, set EDGE_FALLTHRU on the edge to EXIT.
521         (simd_clone_adjust): Don't set EDGE_FALLTHRU here. In a loop that
522         redirects edges to EXIT to edges to incr_bb, iterate while EXIT
523         has any preds and always use EDGE_PRED (, 0).
525 2018-11-20  Uros Bizjak  <ubizjak@gmail.com>
527         PR target/88070
528         * mode-switching.c (create_pre_exit): After reload, always split the
529         fallthrough edge to the exit block.
531 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
533         * ipa-devirt.c (add_type_duplicate): Do not ICE on incomplete enums.
534         * tree.c (build_array_type_1): Forward declare.
535         (fld_type_variant_equal_p): Add INNER_TYPE parameter.
536         (fld_type_variant): Likewise.
537         (fld_simplified_types): New hash.
538         (fld_process_array_type): New function.
539         (fld_incomplete_type_of): Handle array and enumeration types.
540         (fld_simplified_type): Handle simplification of arrays.
541         (free_lang_data): Allocate and free simplified types hash.
543 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
545         PR lto/87957
546         * ipa-devirt.c (odr_subtypes_equivalent_p): Report ODR violation
547         when sybtype already violates ODR.
548         (get_odr_type): Do not ICE when insert is false and type duplicate
549         is not registered yet.
550         (register_odr_type): Be sure to register subtypes first.
552 2018-11-20  Andreas Krebbel  <krebbel@linux.ibm.com>
554         * config/s390/s390.md ("clztidi2"): Swap the RTX's written to the
555         DImode parts of the target operand.
557 2018-11-20  Nathan Sidwell  <nathan@acm.org>
559         PR 87926
560         * Makefile.in (bitmap.o-warn): Use -Wno-error=array-bounds.
562 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
564         PR lto/87997
565         * tree.c (free_lang_data_in_cgraph): Add argument fld; break out
566         type checking to...
567         (free_lang_data) ... here; update call of free_lang_data_in_cgraph.
569 2018-11-20  Jan Hubicka  <hubicka@ucw.cz>
571         PR ipa/87706
572         * ipa-fnsummary.c (pass_ipa_fnsummary): Do not remove functions
573         * ipa.c (possible_inline_candidate_p): Break out from ..
574         (process_references): ... here ; drop before_inlining_p;
575         cleanup handling of alises.
576         (walk_polymorphic_call_targets): Likewise.
577         (symbol_table::remove_unreachable_nodes): Likewise.
578         * passes.c (pass_data_ipa_remove_symbols): New structure.
579         (pass_ipa_remove_symbols): New pass.
580         (make_pass_ipa_remove_symbols): New function.
581         * tree-pass.h (make_pass_ipa_remove_symbols): Declare.
582         * passes.def (pass_ipa_remove_symbols): Schedule after early passes.
584 2018-11-20  Richard Biener  <rguenther@suse.de>
586         * tree-vect-stmts.c (vectorizable_condition): Do not get
587         at else_clause vect def for EXTRACT_LAST_REDUCTION.  Remove
588         pointless vect_is_simple_use calls.
590 2018-11-20  Richard Biener  <rguenther@suse.de>
592         PR tree-optimization/88074
593         * tree-ssa-dom.c (pass_dominator::execute): Do not walk
594         backedges.
596 2018-11-20  Richard Biener  <rguenther@suse.de>
598         PR tree-optimization/88069
599         * tree-ssa-sccvn.c (visit_phi): Do not value-number to unvisited
600         virtual PHI arguments.
602 2018-11-20  Ilya Leoshkevich  <iii@linux.ibm.com>
604         PR target/88083
605         * config/s390/s390.md: Skip LT(G) peephole when literal pool is
606         involved.
607         * rtl.h (contains_constant_pool_address_p): New function.
608         * rtlanal.c (contains_constant_pool_address_p): Likewise.
610 2018-11-20  Richard Biener  <rguenther@suse.de>
612         PR middle-end/83215
613         * alias.c (component_uses_parent_alias_set_from): Remove
614         alias-set zero and TYPE_TYPELESS_STORAGE case both already
615         handled in other ways.
617 2018-11-20  Richard Biener  <rguenther@suse.de>
619         PR tree-optimization/88087
620         * tree-ssa-pre.c (create_expression_by_pieces): Re-materialize
621         call fntype.
622         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Remember
623         call fntype.
625 2018-11-20  Richard Biener  <rguenther@suse.de>
627         PR middle-end/88089
628         * tree-data-ref.c (lambda_matrix_right_hermite): Use abs_hwi.
630 2018-11-19  Jan Hubicka  <hubicka@ucw.cz>
632         PR lto/87957
633         * ipa-devirt.c (free_enum_values): Do not ICE on ODR vilations.
635 2018-11-19  Sandra Loosemore  <sandra@codesourcery.com>
637         PR driver/50250
638         * doc/invoke.texi (Link Options): Mention shared libraries
639         in documentation for the -l option.  Simplify discussion and
640         point to the system linker documentation for details.
642 2018-11-19  Peter Bergner  <bergner@linux.ibm.com>
644         PR rtl-optimization/88033
645         * ira-lives.c (non_conflicting_reg_copy_p): Skip copies from a register
646         to itself.  Use HARD_REGISTER_NUM_P.
648 2018-11-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
650         * tree-vect-loop.c (vect_transform_loop): Disable further unrolling
651         of the loop if vf is non-constant.
653 2018-11-19  David Malcolm  <dmalcolm@redhat.com>
655         PR tree-optimization/87025
656         * dumpfile.c (dump_context::begin_scope): Call end_any_optinfo
657         immediately after creating the scope optinfo.
658         (selftest::test_pr87025): New function.
659         (selftest::dumpfile_c_tests): Call it.
660         * optinfo-emit-json.cc (optrecord_json_writer::pop_scope): Assert
661         that we're not popping the top-level records array.
662         * optinfo.cc (optinfo::handle_dump_file_kind): Assert that we're
663         not changing the kind of a "scope" optinfo.
665 2018-11-19  David Malcolm  <dmalcolm@redhat.com>
667         PR tree-optimization/87025
668         * dump-context.h: Include "optinfo.h".
669         (class optrecord_json_writer): New forward decl.
670         (dump_context::forcibly_enable_optinfo_p): Delete.
671         (dump_context::optinfo_enabled_p): New member function.
672         (dump_context::optimization_records_enabled_p): New member
673         function.
674         (dump_context::set_json_writer): New member function.
675         (dump_context::emit_optinfo): New member function.
676         (dump_context::m_forcibly_enable_optinfo): Delete.
677         (dump_context::m_json_writer): New member data.
678         * dumpfile.c (dump_context::set_json_writer): New member function.
679         (dump_context::finish_any_json_writer): New member function.
680         (dump_context::end_scope): Replace call to
681         optimization_records_maybe_pop_dump_scope with call to
682         m_json_writer->pop_scope.
683         (dump_context::optinfo_enabled_p): New member function.
684         (dump_context::end_any_optinfo): Replace call to optinfo::emit with call
685         to dump_context::emit_optinfo.
686         (dump_context::emit_optinfo): New member function.
687         (temp_dump_context::temp_dump_context): Replace
688         m_forcibly_enable_optinfo with call to set_json_writer.
689         (temp_dump_context::~temp_dump_context): Clean up any json writer.
690         * optinfo-emit-json.cc (class optrecord_json_writer): Move to
691         optinfo-emit-json.h
692         (the_json_writer): Delete.
693         (optimization_records_start): Delete.
694         (optimization_records_finish): Delete.
695         (optimization_records_enabled_p): Delete, in favor of
696         dump_context::optimization_records_enabled_p.
697         (optimization_records_maybe_record_optinfo): Delete.
698         (optimization_records_maybe_pop_dump_scope): Delete.
699         * optinfo-emit-json.h: Include "json.h".  Delete forward
700         decl of opt_pass.
701         (optimization_records_start): Delete.
702         (optimization_records_finish): Delete.
703         (optimization_records_enabled_p): Delete.
704         (optimization_records_maybe_record_optinfo): Delete.
705         (optimization_records_maybe_pop_dump_scope): Delete.
706         (class optrecord_json_writer): Move here from
707         optinfo-emit-json.cc.
708         * optinfo.cc (optinfo::emit_for_opt_problem): Replace call
709         to optinfo::emit with call to dump_context::emit_optinfo.
710         (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
711         (optinfo_enabled_p): Delete, in favor of
712         dump_context::optinfo_enabled_p.
713         (optinfo_wants_inlining_info_p): Update for conversion o
714         optimization_records_enabled_p to a member function of
715         dump_context.
716         * optinfo.h (optinfo_enabled_p): Delete, in favor of
717         dump_context::optinfo_enabled_p.
718         (optinfo::emit): Delete, in favor of dump_context::emit_optinfo.
719         * toplev.c: Include "dump-context.h".
720         (compile_file): Replace call to optimization_records_finish with
721         dump_context::finish_any_json_writer.
722         (do_compile): Replace call to optimization_records_start with
723         conditionally creating a optrecord_json_writer for the
724         dump_context.
726 2018-11-19  Jakub Jelinek  <jakub@redhat.com>
728         PR tree-optimization/88071
729         * tree-vect-loop.c (vectorize_fold_left_reduction): Pass true instead
730         of false as last argument to gsi_remove.
731         * tree-vect-stmts.c (vect_finish_replace_stmt): Pass true instead of
732         false as last argument to gsi_replace.
734         PR debug/87039
735         * omp-expand.c: Don't include debug.h.
736         (adjust_context_and_scope): Add REGION argument.  Find DECL_CONTEXT
737         from innermost outer parallel, task, teams or target that has a
738         child_fn set, or, if there is no such outer region, use
739         current_function_decl.  Do the DECL_CONTEXT adjustment regardless of
740         whether a suitable BLOCK is found or not.
741         (expand_parallel_call, expand_teams_call): Don't call
742         adjust_context_and_scope here.
743         (grid_expand_target_grid_body): Revert 2017-01-25 changes.
744         (expand_omp_taskreg, expand_omp_target): Likewise.  Call
745         adjust_context_and_scope.
746         * dwarf2out.c (dwarf2out_early_global_decl): For
747         decl_function_context recurse instead of calling dwarf2out_decl.
749 2018-11-20  Eric Botcazou  <ebotcazou@adacore.com>
751         PR rtl-optimization/85925
752         * rtl.h (word_register_operation_p): New predicate.
753         * combine.c (record_dead_and_set_regs_1): Only apply specific handling
754         for WORD_REGISTER_OPERATIONS targets to word_register_operation_p RTX.
755         * rtlanal.c (nonzero_bits1): Likewise.  Adjust couple of comments.
756         (num_sign_bit_copies1): Likewise.
758 2018-11-19  Richard Biener  <rguenther@suse.de>
760         PR lto/87229
761         * tree.c (free_lang_data_in_one_sizepos): Free non-gimple-val
762         sizepos values.
764 2018-11-19  Eric Botcazou  <ebotcazou@adacore.com>
766         * compare-elim.c (struct comparison): Add not_in_a field.
767         (is_not): New static function.
768         (strip_not): Likewise.
769         (conforming_compare): Handle a NOT in the first operand.
770         (can_eliminate_compare): Likewise.
771         (find_comparison_dom_walker::before_dom_children): Likewise.
772         (try_eliminate_compare): Likewise.
773         * config/visium/visium.md (negsi2_insn_set_carry): Turn into...
774         (neg<mode>2_insn_set_carry): ...this and add missing NEG operation.
776 2018-11-19  Jonathan Wakely  <jwakely@redhat.com>
778         * doc/extend.texi (Common Type Attributes): Fix typos.
780 2018-11-19  Martin Liska  <mliska@suse.cz>
782         PR gcov-profile/88045
783         * coverage.c (coverage_begin_function): Add assert.
785 2018-11-18  Sandra Loosemore  <sandra@codesourcery.com>
787         PR other/40498
788         * doc/extend.texi (Common Function Attributes): Document that
789         no_instrument_function applies to -p and -pg, too.
790         * doc/invoke.texi (Instrumentation Options): Add cross-references
791         to docs for -p, -pg, and -finstrument-functions.
793 2018-11-18  Alan Modra  <amodra@gmail.com>
795         * config/gnu-user.h (GNU_USER_TARGET_CRTI): Define.
796         (GNU_USER_TARGET_STARTFILE_SPEC): Use it here.
797         (GNU_USER_TARGET_CRTN): Define.
798         (GNU_USER_TARGET_ENDFILE_SPEC): Use it here.
799         (GNU_USER_TARGET_LINK_GCC_C_SEQUENCE_SPEC): Define.
801 2018-11-18  Alan Modra  <amodra@gmail.com>
803         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Delete
804         !HAVE_LD_PIE variant.
805         (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
807 2018-11-17  Nick Clifton  <nickc@redhat.com>
808             Sandra Loosemore  <sandra@codesourcery.com>
810         PR driver/31357
811         * doc/invoke.texi (Overall Options): Document that --help and
812         --help=<value> options cannot be combined.
814 2018-11-17  Jim Wilson  <jimw@sifive.com>
816         * config/riscv/riscv.c (epilogue_cfa_sp_offset): New.
817         (riscv_restore_reg): If restoring HARD_FRAME_POINTER_REGNUM, and
818         epilogue_cfa_sp_offset set, then add REG_CFA_DEF_CFA regnote.
819         (riscv_expand_epilogue): Initialize epilogue_cfa_sp_offset.  Set it
820         to step2 if frame_pointer_needed and step1 is 0.
822 2018-11-17  Sandra Loosemore  <sandra@codesourcery.com>
824         PR c++/4225
825         * doc/cpp.texi (System Headers): Add note about implicit
826         extern "C" block on targets that define SYSTEM_IMPLICIT_EXTERN_C.
828 2018-11-17  Sandra Loosemore  <sandra@codesourcery.com>
830         PR c++/4025
831         * doc/invoke.texi (C++ Dialect Options): Clarify usage of
832         -fno-implicit-templates.
834 2018-11-17  Jakub Jelinek  <jakub@redhat.com>
836         PR tree-optimization/87546
837         * tree-vect-patterns.c (vect_look_through_possible_promotion): Add
838         min_precision variable, initially set it to orig_precision, only does
839         something if op_type's precision is <= min_precision and update
840         min_precision whenever calling set_op.
842 2018-11-16  Jan Hubicka  <hubicka@ucw.cz>
844         PR ipa/87957
845         * ipa-devirt.c (warn_odr): Look for main variant to get TYPE_DECL.
847 2018-11-16  Sandra Loosemore  <sandra@codesourcery.com>
849         * doc/invoke.texi (Option Summary): Fix whitespace and line
850         breaks in @gccoptlist environments.
851         (Warning Options): Likewise.
852         (Optimize Options): Likewise.
853         (PowerPC SPE Options): Likewise.
854         (RS/6000 and PowerPC Options): Likewise.
856 2018-11-16  Jeff Law  <law@redhat.com>
858         * config/mn10300/mn10300.md (adddi3_degenerate): Remove bogus
859         gcc_assert.
861 2018-11-16  Sandra Loosemore  <sandra@codesourcery.com>
863         PR middle-end/23197
864         * doc/invoke.texi (Optimize Options): Update options enabled by
865         fprofile-generate, -fprofile-use, and -fauto-profile.
867 2018-11-16  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
869         PR target/87927
870         * target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
871         Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
872         * target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
873         the byte_op hook.
874         * target.h: Add psi, pdi, pti to struct asm_int_op definition.
875         * targhooks.c (default_print_patchable_function_entry): Assert
876         asm_int_op does not return a NULL string.
877         * varasm.c (integer_asm_op): Return the op for a partial int type
878         when the requested size does not correspond to an integer type.
879         * config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
880         * doc/tm.texi: Regenerate.
882 2018-11-12  Jason Merrill  <jason@redhat.com>
884         * gimplify.c (gimplify_case_label_expr): Handle hot/cold attributes.
886 2018-11-16  Michael Meissner  <meissner@linux.ibm.com>
888         * config/rs6000/constraints.md (wF constraint): Remove power9
889         fusion documentation.  Just document wF's use for power8 fusion.
890         * config/rs6000/predicates.md (p9_fusion_reg_operand): Delete.
891         (fusion_gpr_addis): Delete power9 fusion support.  Change power8
892         fusion support to require the upper 12 bits to be all 0's or all
893         1's.
894         (fusion_gpr_mem_load): Add comment.
895         (fusion_addis_mem_combo_load): Remove power9 fusion support.
896         (fusion_addis_mem_combo_store): Delete.
897         (fusion_offsettable_mem_operand): Delete.
898         * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Do not set
899         power8 fusion here.
900         (ISA_3_0_MASKS_SERVER): Delete power9 fusion.
901         (POWERPC_MASKS): Delete power9 fusion.
902         * config/rs6000/rs6000-protos.h (emit_fusion_load_store): Delete.
903         (fusion_p9_p): Delete.
904         (expand_fusion_p9_load): Delete.
905         (expand_fusion_p9_store): Delete.
906         (emit_fusion_p9_load): Delete.
907         (emit_fusion_p9_store): Delete.
908         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Delete power9
909         fusion support.
910         (rs6000_option_override_internal): Set power8 fusion based on
911         whether we are tuning for power8.  Delete power9 fusion support.
912         (rs6000_opt_masks): Delete -mpower9-fusion switch.
913         (emit_fusion_load): Rename emit_fusion_load_store to
914         emit_fusion_load, and drop fusion store support.  Update callers.
915         (emit_fusion_load_store): Likewise.
916         (emit_fusion_gpr_load): Likewise.
917         (fusion_p9_p): Delete.
918         (expand_fusion_p9_load): Delete.
919         (expand_fusion_p9_store): Delete.
920         (emit_fusion_p9_load): Delete.
921         (emit_fusion_p9_store): Delete.
922         * config/rs6000/rs6000.md (UNSPEC_FUSION_P9): Delete.
923         (GPR_FUSION): Delete.
924         (FPR_FUSION): Delete.
925         (power9 fusion peephole2s): Delete.
926         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Delete.
927         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Delete.
928         (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_load): Delete.
929         (fusion_vsx_<P:mode>_<FPR_FUSION:mode>_store): Delete.
930         (fusion_p9_<mode>_constant): Delete.
931         * config/rs6000/rs6000.opt (-mpower9-fusion): Delete undocumented
932         power9 fusion switch.
933         * doc/md.texi (PowerPC constraints): Update wF constraint
934         documentation for power8 fusion only.
936 2018-11-16  Jakub Jelinek  <jakub@redhat.com>
938         PR rtl-optimization/87475
939         * cfgrtl.c (patch_jump_insn): Allow redirection failure for
940         CROSSING_JUMP_P insns.
941         (cfg_layout_redirect_edge_and_branch): Don't ICE if ret is NULL.
943 2018-11-16  Uros Bizjak  <ubizjak@gmail.com>
945         PR target/88051
946         * config/i386/i386.md (floatunsdidf2): Allow only 64bit AVX512F targets.
947         * config/i386/sse.md (UNSPEC_MOVDI_TO_SSE): New UNSPEC.
948         (movdi_to_sse): Rewrite using UNSPEC_MOVDI_TO_SSE unspec.
950 2018-11-16  Jakub Jelinek  <jakub@redhat.com>
952         PR middle-end/88032
953         * optabs.c (expand_binop): For op0_mode use GET_MODE (op0), unless it
954         is VOIDmode, in which case use int_mode.  Similarly for op1_mode.
956 2018-11-16  Eric Botcazou  <ebotcazou@adacore.com>
958         * tree-switch-conversion.h (switch_decision_tree::emit_case_nodes): Add
959         location_t parameter.
960         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
961         (switch_decision_tree::do_jump_if_equal): Likewise.
962         * tree-switch-conversion.c (switch_decision_tree::emit): Pass location
963         of switch statement to emit_case_nodes.
964         (switch_decision_tree::emit_cmp_and_jump_insns): Add LOC parameter and
965         set it on the newly built GIMPLE comparison statement.
966         (switch_decision_tree::do_jump_if_equal): Likewise.
967         (switch_decision_tree::emit_case_nodes): Add LOC parameter and pass it
968         in calls to do_jump_if_equal as well as recursive calls.
970 2018-11-16  Andi Kleen  <ak@linux.intel.com>
972         * config/i386/i386.md: Allow memory operands to ptwrite.
974 2018-11-16  Michael Matz  <matz@suse.de>
976         * system.h (PRsa): New macro.
977         (SIZE_AMOUNT): Cast number to uint64_t.
978         * alloc-pool.h (pool_usage::dump): Don't use %zu but PRsa.
979         (pool_usage::dump_footer): Likewise and also use PRIu64.
980         * bitmap.h (bitmap_usage::dump): Likewise.
981         * ggc-common.c (ggc_usage::dump): Likewise.
982         * ggc-page.c (ggc_print_statistics): Likewise.
983         * input.c (dump_line_table_statistics): Likewise.
984         * mem-stats.h (mem_usage::dump): Likewise.
985         (mem_usage::dump_footer): Likewise.
986         * rtl.c (dump_rtx_statistics): Likewise.
987         * tree-cfg.c (dump_cfg_stats): Likewise.
988         * tree-dfa.c (dump_dfa_stats): Likewise.
989         * tree-phinodes.c (phinodes_print_statistics): Likewise.
990         * tree-ssanames (ssanames_print_statistics): Likewise.
991         * vec.c (vec_usage::dump): Likewise.
992         (vec_usage::dump_footer): Likewise.
994 2018-11-16  Richard Biener  <rguenther@suse.de>
996         PR tree-optimization/88011
997         * tree-vrp.c (extract_range_from_binary_expr): Fix error in
998         replacing set_value_range_to_undefined and
999         set_value_range_to_varying with method calls.
1001 2018-11-16  Ilya Leoshkevich  <iii@linux.ibm.com>
1003         * config/s390/s390.md
1004         (*r<noxa>sbg_<mode>_srl_bitmask): Do not delegate arithmetic to
1005         assembler.
1006         (*r<noxa>sbg_<mode>_sll): Likewise.
1007         (*r<noxa>sbg_<mode>_srl): Likewise.
1008         (*r<noxa>sbg_sidi_srl): New pattern.
1010 2018-11-16  Jerome Lambourg  <lambourg@adacore.com>
1012         * config/vxworks.h (TARGET_VXWORKS_HAVE_CTORS_DTORS): New macro.
1013         Default to TARGET_VXWORKS_RTP.
1014         (SUPPORTS_INIT_PRIORITY): Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
1015         of TARGET_VXWORKS_RTP.
1016         * config/vxworksae.h: Also define TARGET_VXWORKS_HAVE_CTORS_DTORS.
1017         * config/vxworks.c: Use TARGET_VXWORKS_HAVE_CTORS_DTORS instead
1018         of TARGET_VXWORKS_RTP to set targetm.have_ctors_dtors.
1020 2018-11-15  Sandra Loosemore  <sandra@codesourcery.com>
1022         PR c++/25759
1023         * doc/extend.texi (Common Type Attributes): Make it explicit
1024         that attribute "packed" can apply to C++ classes.
1026 2018-11-15  Martin Sebor  <msebor@redhat.com>
1028         PR c++/87541
1029         PR c++/87542
1030         * tree.c (type_argument_type): New function.
1031         * tree.h (type_argument_type): Declare it.
1032         * gcc/doc/extend.texi (alloc_align): Update and clarify.
1033         (alloc_size, nonnull, sentinel): Same.
1035 2018-11-15  Andrew Stubbs  <ams@codesourcery.com>
1036             Kwok Cheung Yeung  <kcy@codesourcery.com>
1038         * tree-vect-stmts.c (vectorizable_store): Don't ICE when
1039         int_mode_for_size fails.
1040         (vectorizable_load): Likewise.
1042 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
1044         * doc/ux.texi (Group logically-related diagnostics): Move
1045         discussion of auto_diagnostic_group into this new subsection.
1046         Give an example of where this grouping is used.
1048 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
1050         PR other/19165
1051         * Makefile.in (OBJS): Move json.o to...
1052         (OBJS-libcommon): ...here and add diagnostic-format-json.o.
1053         * common.opt (fdiagnostics-format=): New option.
1054         (diagnostics_output_format): New enum.
1055         * diagnostic-format-json.cc: New file.
1056         * diagnostic.c (default_diagnostic_final_cb): New function, taken
1057         from start of diagnostic_finish.
1058         (diagnostic_initialize): Initialize final_cb to
1059         default_diagnostic_final_cb.
1060         (diagnostic_finish): Move "being treated as errors" messages to
1061         default_diagnostic_final_cb.  Call any final_cb.
1062         (default_diagnostic_finalizer): Add diagnostic_t param.
1063         (diagnostic_report_diagnostic): Pass "orig_diag_kind" to
1064         diagnostic_finalizer callback.
1065         * diagnostic.h (enum diagnostics_output_format): New enum.
1066         (diagnostic_finalizer_fn): Reimplement, adding diagnostic_t param.
1067         (struct diagnostic_context): Add "final_cb".
1068         (default_diagnostic_finalizer): Add diagnostic_t param.
1069         (diagnostic_output_format_init): New decl.
1070         * doc/invoke.texi (-fdiagnostics-format): New option.
1071         * dwarf2out.c (gen_producer_string): Ignore
1072         OPT_fdiagnostics_format_.
1073         * gcc.c (driver_handle_option): Handle OPT_fdiagnostics_format_.
1074         * lto-wrapper.c (append_diag_options): Ignore it.
1075         * opts.c (common_handle_option): Handle it.
1077 2018-11-15  David Malcolm  <dmalcolm@redhat.com>
1079         PR tree-optimization/88015
1080         * graphite-isl-ast-to-gimple.c
1081         (translate_isl_ast_to_gimple::scop_to_isl_ast): Add missing check
1082         for dump_enabled_p.
1083         * graphite-sese-to-poly.c (build_poly_scop): Likewise.
1085 2018-11-15  Richard Biener  <rguenther@suse.de>
1087         PR middle-end/88029
1088         * gimple.c (gimple_call_flags): Union flags from decl, type
1089         and call fntype.
1090         * trans-mem.c (is_tm_pure_call): Simplify.
1092 2018-11-15  Richard Biener  <rguenther@suse.de>
1094         PR tree-optimization/88031
1095         * tree-vect-loop.c (vectorizable_reduction): Move check
1096         for multiple types earlier so we get the expected dump.
1097         Simplify calls to vectorizable_condition.
1098         * tree-vect-stmts.h (vectorizable_condition): Update prototype.
1099         * tree-vect-stmts.c (vectorizable_condition): Instead of
1100         reduc_def and reduc_index take just a flag.  Simplify
1101         code-generation now that we can rely on the defs being set up.
1102         (vectorizable_comparison): Remove unused argument.
1104 2018-11-15  Richard Biener  <rguenther@suse.de>
1106         PR tree-optimization/88030
1107         * tree-complex.c (need_eh_cleanup): New global.
1108         (update_complex_assignment): Mark blocks that need EH update.
1109         (expand_complex_comparison): Likewise.
1110         (tree_lower_complex): Allocate and deallocate need_eh_cleanup,
1111         perform EH cleanup and schedule CFG cleanup if that did anything.
1113 2018-11-15  Jakub Jelinek  <jakub@redhat.com>
1115         PR rtl-optimization/88018
1116         * cfgrtl.c (fixup_abnormal_edges): Guard moving insns to fallthru edge
1117         on the presence of fallthru edge, rather than if it is a USE or not.
1119 2018-11-15  Richard Biener  <rguenther@suse.de>
1121         PR middle-end/87917
1122         * tree-data-ref.c (analyze_miv_subscript): Guard calls to
1123         analyze_subscript_affine_affine properly.
1125 2018-11-15  Xianmiao Qu  <xianmiao_qu@c-sky.com>
1127         * config/csky/csky-linux-elf.h (LINUX_DYNAMIC_LINKER): Remove.
1128         (GLIBC_DYNAMIC_LINKER): Define.
1129         (LINUX_TARGET_LINK_SPEC): Update the dynamic linker's name.
1131 2018-11-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
1133         PR tree-optimization/84648
1134         * tree-ssa-loop-niter.c (adjust_cond_for_loop_until_wrap): New.
1135         (number_of_iterations_cond): Adjust exit cond for loop-until-wrap case
1136         by calling adjust_cond_for_loop_until_wrap.
1138 2018-11-15  Sandra Loosemore  <sandra@codesourcery.com>
1140         PR other/56334
1141         * doc/extend.texi (Common Function Attributes): Clarify linker
1142         restrictions on "aligned" attribute.
1143         (Common Variable Attributes): Likewise.  Mention that linker
1144         restrictions don't apply to stack-allocated variables.
1146 2018-11-15  Joern Rennecke  <joern.rennecke@riscy-ip.com>
1148         * gensupport.c (add_predicate_code): Properly handle ZERO_EXTRACT
1149         as an lvalue.
1151 2018-11-14  Sandra Loosemore  <sandra@codesourcery.com>
1153         PR lto/55102
1154         PR lto/56700
1155         * doc/invoke.texi (Optimize Options): Remove bad example about
1156         interaction between -flto and -O.  Replace it with a note that
1157         you need to compile with -O and not just link.  Copy-edit -flto
1158         discussion to reduce verbiage and improve flow.
1160 2018-11-14  Sandra Loosemore  <sandra@codesourcery.com>
1162         PR middle-end/59658
1163         * doc/invoke.texi (Optimize Options): Clarify that -O0 and -Og
1164         also suppress many optimizations.  Alphabetize option lists for
1165         -O1, -O2, and -Os.  Add list of options disabled with -Og, and
1166         correct documentation for those options to say that.
1167         * opts.c (default_options_table): Sort table by level and option
1168         name, to make it easier to correlate to the manual.
1170 2018-11-14  Uros Bizjak  <ubizjak@gmail.com>
1172         * config/i386/i386.c (ix86_print_operand_address_as): Simplify
1173         printing of the names of segment registers.
1175 2018-11-14  Nathan Sidwell  <nathan@acm.org>
1177         PR debug/88006
1178         PR debug/87462
1179         * dwarf2out.c (dwarf2out_finish): Apply resolve_addr to comdat
1180         type list.
1182 2018-11-14  David Malcolm  <dmalcolm@redhat.com>
1184         * Makefile.in (CFLAGS-optinfo-emit-json.o): Add $(ZLIBINC).
1186 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
1188         P1236R1 - Signed integers are two's complement
1189         * doc/invoke.texi (Wshift-overflow): Adjust documentation for c++2a.
1191         PR bootstrap/86739
1192         * hash-map.h (hash_map::iterator::reference_pair): New class.
1193         (hash_map::iterator::operator*): Return it rather than std::pair.
1195 2018-11-14  Jeff Law  <law@redhat.com>
1197         * optabs.c (expand_binop): Pass INT_MODE to operand_subword_force
1198         iff the operand is a constant.
1200 2018-11-14  Aldy Hernandez  <aldyh@redhat.com>
1202         * gimple-ssa-evrp-analyze.c
1203         (evrp_range_analyzer::record_ranges_from_incoming_edge): Rename
1204         ignore_equivs_equal_p to equal_p.
1205         * ipa-cp.c (meet_with_1): Use equal_p instead of
1206         ignore_equivs_equal_p.
1207         * ipa-prop.c (ipa_vr_ggc_hash_traits::equal): Same.
1208         * tree-vrp.c (value_range::ignore_equivs_equal_p): Remove.
1209         (value_range::operator==): Remove.
1210         (value_range::operator!=): Remove.
1211         (vrp_prop::visit_stmt): Use equal_p.
1212         * tree-vrp.h (value_range): Remove operator==, operator!=,
1213         ignore_equivs_equal_p.
1214         * vr-values.c (update_value_range): Use equal_p.
1216 2018-11-14  Michael Matz  <matz@suse.de>
1218         PR middle-end/86575
1219         * gimplify.c (collect_fallthrough_labels): Add new argument,
1220         return location via that, don't modify statements.
1221         (warn_implicit_fallthrough_r): Adjust call, don't use
1222         statement location directly.
1224 2018-11-14  Richard Biener  <rguenther@suse.de>
1226         PR middle-end/87985
1227         * tree-data-ref.c (split_constant_offset): Add wrapper
1228         allocating a cache hash-map.
1229         (split_constant_offset_1): Cache results of expanding
1230         expressions from SSA def stmts.
1232 2018-11-14  Richard Biener  <rguenther@suse.de>
1234         PR middle-end/88021
1235         * tree-data-ref.c (lambda_matrix_row_add): Change const1 argument
1236         to lambda_int.
1237         (lambda_vector_mult_const): Likewise.
1238         (lambda_matrix_right_hermite): Use lambda_int temporaries.
1240 2018-11-14  Wilco Dijkstra  <wdijkstr@arm.com>
1241             Jackson Woodruff  <jackson.woodruff@arm.com>
1243         PR 71026/tree-optimization
1244         * match.pd: Simplify floating point comparisons.
1246 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
1248         PR rtl-optimization/87817
1249         * config/i386/i386.c (ix86_fold_builtin): For _bzhi_u{32,64} if
1250         last argument has low 8 bits clear, fold to 0.
1252 2018-11-14  Iain Sandoe  <iain@sandoe.co.uk>
1254         * tree-vect-data-refs.c (vect_can_force_dr_alignment_p): Cast
1255         MAX_OFILE_ALIGNMENT as needed.
1257 2018-11-14  Richard Biener  <rguenther@suse.de>
1259         PR tree-optimization/88019
1260         * graphite-isl-ast-to-gimple.c (ternary_op_to_tree): Rewrite
1261         COND_EXPR arguments to non-trapping overflow.
1263 2018-11-14  Claudiu Zissulescu  <claziss@synopsys.com>
1265         * config/arc/arc.h (reg_class): Reorder registers classes, remove
1266         unused register classes.
1267         (REG_CLASS_NAMES): Likewise.
1268         (REG_CLASS_CONTENTS): Likewise.
1269         (FIXED_REGISTERS): Make lp_count fixed.
1270         (BASE_REG_CLASS): Remove ACC16_BASE_REGS reference.
1271         (PROGRAM_COUNTER_REGNO): Remove.
1272         * config/arc/arc.c (arc_conditional_register_usage): Remove unused
1273         register classes, use constants for register numbers, remove
1274         reg_class_contents references.
1275         (arc_process_double_reg_moves): Add asserts.
1276         (arc_secondary_reload): Remove LPCOUNT_REG reference, use
1277         lra_in_progress predicate.
1278         (arc_init_reg_tables): Remove unused register classes.
1279         (arc_register_move_cost): Likewise.
1280         (arc_preferred_reload_class): Likewise.
1281         (hwloop_optimize): Update rtx patterns involving lp_count register.
1282         (arc_return_address_register): Rename ILINK1, INLINK2 regnums macros.
1283         * config/arc/constraints.md ("c"): Choose between GENERAL_REGS and
1284         CHEAP_CORE_REGS.  Former one will be used for LRA.
1285         ("Rac"): Choose between GENERAL_REGS and ALL_CORE_REGS.  Former
1286         one will be used for LRA.
1287         ("w"): Choose between GENERAL_REGS and WRITABLE_CORE_REGS.  Former
1288         one will be used for LRA.
1289         ("W"): Choose between GENERAL_REGS and MPY_WRITABLE_CORE_REGS.
1290         Former one will be used for LRA.
1291         ("f"): Delete constraint.
1292         ("k"): Likewise.
1293         ("e"): Likewise.
1294         ("l"): Change it from register constraint to constraint.
1295         * config/arc/arc.md (movqi_insn): Remove unsed lp_count constraints.
1296         (movhi_insn): Likewise.
1297         (movsi_insn): Update pattern.
1298         (arc_lp): Likewise.
1299         (dbnz): Likewise.
1300         (stack_tie): Remove 'b' constraint letter.
1301         (R4_REG): Define.
1302         (R9_REG, R15_REG, R16_REG, R25_REG): Likewise.
1303         (R32_REG, R40_REG, R41_REG, R42_REG, R43_REG, R44_REG): Likewise.
1304         (R57_REG, R59_REG, PCL_REG): Likewise.
1305         (ILINK1_REGNUM): Renamed to ILINK1_REG.
1306         (ILINK2_REGNUM): Renamed to ILINK2_REG.
1307         (Rgp): Remove.
1308         (SP_REGS): Likewise.
1309         (Rcw): Remove unused reg classes.
1310         * config/arc/predicates.md (dest_reg_operand): Just default on
1311         register_operand predicate.
1312         (mpy_dest_reg_operand): Likewise.
1313         (move_dest_operand): Use macros instead of constants.
1314         * config/arc/arc.opt (mlra): Switch to lra as default.
1316 2018-11-14  Richard Biener  <rguenther@suse.de>
1318         PR tree-optimization/87974
1319         * tree-vect-loop.c (vectorizable_reduction): When computing
1320         the vectorized reduction PHI vector type ignore constant
1321         and external defs.
1323 2018-11-14  Jakub Jelinek  <jakub@redhat.com>
1325         PR tree-optimization/87977
1326         * tree-ssa-math-opts.c (optimize_recip_sqrt): Don't reuse division
1327         stmt, build a new one and replace the old one with it.  Formatting fix.
1328         Call release_ssa_name (x) if !has_other_use and !delete_div.
1329         (pass_cse_reciprocals::execute): Before calling optimize_recip_sqrt
1330         verify lhs of stmt is still def.
1332 2018-11-13  Peter Bergner  <bergner@linux.ibm.com>
1334         PR rtl-optimization/87507
1335         * lower-subreg.c (operand_for_swap_move_operator): New function.
1336         (simple_move): Strip simple operators.
1337         (find_pseudo_copy): Likewise.
1338         (resolve_operand_for_swap_move_operator): New function.
1339         (resolve_simple_move): Strip simple operators and swap operands.
1341 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
1343         PR tree-optimization/87898
1344         * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Formatting fix.
1345         (ipa_simd_modify_function_body): Remove debug stmts where the first
1346         argument was changed into a non-decl.
1348 2018-11-13  Peter Bergner  <bergner@linux.ibm.com>
1350         PR rtl-optimization/87899
1351         * lra-lives.c (start_living): Update white space in comment.
1352         (enum point_type): New.
1353         (sparseset_contains_pseudos_p): New function.
1354         (update_pseudo_point): Likewise.
1355         (make_hard_regno_live): Use HARD_REGISTER_NUM_P macro.
1356         (make_hard_regno_dead): Likewise.  Remove ignore_reg_for_conflicts
1357         handling.  Move early exit after adding conflicts.
1358         (mark_pseudo_live): Use HARD_REGISTER_NUM_P macro.  Add early exit
1359         if regno is already live.  Remove all handling of program points.
1360         (mark_pseudo_dead): Use HARD_REGISTER_NUM_P macro.  Add early exit
1361         after adding conflicts.  Remove all handling of program points and
1362         ignore_reg_for_conflicts.
1363         (mark_regno_live): Use HARD_REGISTER_NUM_P macro.  Remove return value
1364         and do not guard call to mark_pseudo_live.
1365         (mark_regno_dead): Use HARD_REGISTER_NUM_P macro.  Remove return value
1366         and do not guard call to mark_pseudo_dead.
1367         (check_pseudos_live_through_calls): Use HARD_REGISTER_NUM_P macro.
1368         (process_bb_lives): Use HARD_REGISTER_NUM_P and HARD_REGISTER_P macros.
1369         Use new function update_pseudo_point.  Handle register copies by
1370         removing the source register from the live set.  Handle INOUT operands.
1371         Update to the next program point using the unused_set, dead_set and
1372         start_dying sets.
1373         (lra_create_live_ranges_1): Use HARD_REGISTER_NUM_P macro.
1375 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
1377         * builtins.c: Replace "source_location" with "location_t".
1378         * diagnostic-show-locus.c: Likewise.
1379         * diagnostic.c: Likewise.
1380         * dumpfile.c: Likewise.
1381         * gcc-rich-location.h: Likewise.
1382         * genmatch.c: Likewise.
1383         * gimple.h: Likewise.
1384         * gimplify.c: Likewise.
1385         * input.c: Likewise.
1386         * input.h: Likewise.  Eliminate the typedef.
1387         * omp-expand.c: Likewise.
1388         * selftest.h: Likewise.
1389         * substring-locations.h (get_source_location_for_substring):
1390         Rename to...
1391         (get_location_within_string): ...this.
1392         * tree-cfg.c: Replace "source_location" with "location_t".
1393         * tree-cfgcleanup.c: Likewise.
1394         * tree-diagnostic.c: Likewise.
1395         * tree-into-ssa.c: Likewise.
1396         * tree-outof-ssa.c: Likewise.
1397         * tree-parloops.c: Likewise.
1398         * tree-phinodes.c: Likewise.
1399         * tree-phinodes.h: Likewise.
1400         * tree-ssa-loop-ivopts.c: Likewise.
1401         * tree-ssa-loop-manip.c: Likewise.
1402         * tree-ssa-phiopt.c: Likewise.
1403         * tree-ssa-phiprop.c: Likewise.
1404         * tree-ssa-threadupdate.c: Likewise.
1405         * tree-ssa.c: Likewise.
1406         * tree-ssa.h: Likewise.
1407         * tree-vect-loop-manip.c: Likewise.
1409 2018-11-13  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
1411         * doc/extend.texi: Fix typo in the weakref description.
1413 2018-11-13  Richard Biener  <rguenther@suse.de>
1415         PR tree-optimization/86991
1416         * tree-vect-loop.c (vect_is_slp_reduction): Delay reduction
1417         group building until we have successfully detected the SLP
1418         reduction.
1419         (vect_is_simple_reduction): Remove fixup code here.
1421 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
1423         * dumpfile.c (VERIFY_DUMP_ENABLED_P): New macro.
1424         (dump_gimple_stmt): Use it.
1425         (dump_gimple_stmt_loc): Likewise.
1426         (dump_gimple_expr): Likewise.
1427         (dump_gimple_expr_loc): Likewise.
1428         (dump_generic_expr): Likewise.
1429         (dump_generic_expr_loc): Likewise.
1430         (dump_printf): Likewise.
1431         (dump_printf_loc): Likewise.
1432         (dump_dec): Likewise.
1433         (dump_dec): Likewise.
1434         (dump_hex): Likewise.
1435         (dump_symtab_node): Likewise.
1436         * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
1437         Guard dump call with dump_enabled_p.
1438         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl): Likewise.
1439         * graphite-optimize-isl.c (optimize_isl): Likewise.
1440         * graphite.c (graphite_transform_loops): Likewise.
1441         * tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
1442         * tree-parloops.c (parallelize_loops): Likewise.
1443         * tree-ssa-loop-niter.c (number_of_iterations_exit): Likewise.
1444         * tree-vect-data-refs.c (vect_analyze_group_access_1): Likewise.
1445         (vect_prune_runtime_alias_test_list): Likewise.
1446         * tree-vect-loop.c (vect_update_vf_for_slp): Likewise.
1447         (vect_estimate_min_profitable_iters): Likewise.
1448         * tree-vect-slp.c (vect_record_max_nunits): Likewise.
1449         (vect_build_slp_tree_2): Likewise.
1450         (vect_supported_load_permutation_p): Likewise.
1451         (vect_slp_analyze_operations): Likewise.
1452         (vect_slp_analyze_bb_1): Likewise.
1453         (vect_slp_bb): Likewise.
1454         * tree-vect-stmts.c (vect_analyze_stmt): Likewise.
1455         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.
1456         (pass_slp_vectorize::execute): Likewise.
1457         (increase_alignment): Likewise.
1459 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
1461         PR ipa/87955
1462         * ipa-inline.c (report_inline_failed_reason): Guard calls to
1463         cl_target_option_print_diff and cl_optimization_print_diff with
1464         if (dump_file).
1466 2018-11-13  David Malcolm  <dmalcolm@redhat.com>
1468         * doc/invoke.texi (-fsave-optimization-record): Note that the
1469         output is compressed.
1470         * optinfo-emit-json.cc: Include <zlib.h>.
1471         (optrecord_json_writer::write): Compress the output.
1473 2018-11-13  Aldy Hernandez  <aldyh@redhat.com>
1475         * tree-vrp.c (value_range_base::dump): Dump type.
1476         Do not use INF nomenclature for 1-bit types.
1477         (dump_value_range): Group all variants to common dumping code.
1478         (debug): New overloaded functions for value_ranges.
1479         (value_range_base::dump): Remove no argument version.
1480         (value_range::dump): Same.
1482 2018-11-13  Richard Biener  <rguenther@suse.de>
1484         PR tree-optimization/87931
1485         * tree-vect-loop.c (vect_is_simple_reduction): Restrict
1486         nested cycles we support to latch computations vectorizable_reduction
1487         handles.
1489 2018-11-13  Martin Liska  <mliska@suse.cz>
1491         PR tree-optimization/87885
1492         * cfghooks.c (account_profile_record): Rename
1493         to ...
1494         (profile_record_check_consistency): ... this.
1495         Calculate missing num_mismatched_freq_in.
1496         (profile_record_account_profile): New function
1497         that calculates time and size of a function.
1498         * cfghooks.h (struct profile_record): Remove
1499         all tuples.
1500         (struct cfg_hooks): Remove after_pass flag.
1501         (account_profile_record): Rename to ...
1502         (profile_record_check_consistency): ... this.
1503         (profile_record_account_profile): New.
1504         * cfgrtl.c (rtl_account_profile_record): Remove
1505         after_pass flag.
1506         * passes.c (check_profile_consistency): Do only
1507         checking.
1508         (account_profile): Calculate size and time of
1509         function only.
1510         (pass_manager::dump_profile_report): Reformat
1511         output.
1512         (execute_one_ipa_transform_pass): Call
1513         consistency check before clean upand call account_profile
1514         after a clean up is done.
1515         (execute_one_pass): Call check_profile_consistency and
1516         account_profile instead of using after_pass flag..
1517         * tree-cfg.c (gimple_account_profile_record): Likewise.
1519 2018-11-13  Martin Liska  <mliska@suse.cz>
1521         PR sanitizer/87930
1522         * config/i386/i386.c (ix86_option_override_internal): Error
1523         about usage -mabi=ms and -fsanitize={,kernel-}address.
1525 2018-11-13  Andre Vieira  <andre.simoesdiasvieira@arm.com>
1527         * config/aarch64/aarch64.c
1528         (aarch64_vectorize_preferred_vector_alignment): Change return type to
1529         poly_uint64.
1530         (aarch64_simd_vector_alignment_reachable): Adapt to preferred vector
1531         alignment being a poly int.
1532         * doc/tm.texi (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Change
1533         return type to poly_uint64.
1534         * target.def (default_preferred_vector_alignment): Likewise.
1535         * targhooks.c (default_preferred_vector_alignment): Likewise.
1536         * targhooks.h (default_preferred_vector_alignment): Likewise.
1537         * tree-vect-data-refs.c (vect_calculate_target_alignment): Likewise.
1538         (vect_compute_data_ref_alignment): Adapt to vector alignment being a
1539         poly int.
1540         (vect_update_misalignment_for_peel): Likewise.
1541         (vect_enhance_data_refs_alignment): Likewise.
1542         (vect_find_same_alignment_drs): Likewise.
1543         (vect_duplicate_ssa_name_ptr_info): Likewise.
1544         (vect_setup_realignment): Likewise.
1545         (vect_can_force_dr_alignment_p): Change alignment parameter type to
1546         poly_uint64.
1547         * tree-vect-loop-manip.c (get_misalign_in_elems): Learn to construct a
1548         mask with a compile time variable vector alignment.
1549         (vect_gen_prolog_loop_niters): Adapt to vector alignment being a poly
1550         int.
1551         (vect_do_peeling): Exit early if vector alignment is not constant.
1552         * tree-vect-stmts.c (ensure_base_align): Adapt to vector alignment being
1553         a poly int.
1554         (vectorizable_store): Likewise.
1555         (vectorizable_load): Likweise.
1556         * tree-vectorizer.h (struct dr_vec_info): Make target_alignment field a
1557         poly_uint64.
1558         (vect_known_alignment_in_bytes): Adapt to vector alignment being a
1559         poly int.
1560         (vect_can_force_dr_alignment_p): Change alignment parameter type to
1561         poly_uint64.
1563 2018-11-13  Richard Biener  <rguenther@suse.de>
1565         PR tree-optimization/87962
1566         * tree-vect-loop.c (vect_is_simple_reduction): More reliably
1567         detect outer reduction for disqualifying in-loop uses.
1569 2018-11-13  Richard Biener  <rguenther@suse.de>
1571         PR tree-optimization/87967
1572         * tree-vect-loop.c (vect_transform_loop): Also copy PHIs
1573         for constants for the scalar loop.
1575 2018-11-13  Alan Modra  <amodra@gmail.com>
1577         * config/rs6000/linux64.h (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Exclude
1578         integer constants when -mcmodel=medium.
1580 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
1582         * config/arc/arc.h (FUNCTION_PROFILER): Redefine to empty.
1583         * config/arc/elf.h (PROFILE_HOOK): Define.
1584         * config/arc/linux.h (PROFILE_HOOK): Likewise.
1586 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
1588         * config/arc/arc.c (hwloop_optimize): Bailout when detecting a
1589         jump table data in the text section.
1591 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
1593         * config/arc/arc.c (arc_eh_return_address_location): Repurpose it
1594         to fit the eh_return pattern.
1595         * config/arc/arc.md (eh_return): Define.
1596         (VUNSPEC_ARC_EH_RETURN): Likewise.
1597         * config/arc/arc-protos.h (arc_eh_return_address_location): Match
1598         new implementation.
1599         * config/arc/arc.h (EH_RETURN_HANDLER_RTX): Remove it.
1602 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
1604         * common/config/arc/arc-common.c (arc_option_optimization_table):
1605         Millicode optimization is default on for size optimizations.
1606         * config/arc/arc-protos.h (arc_check_multi): New function.
1607         * config/arc/arc.c (RTX_OK_FOR_OFFSET_P): Rearange.
1608         (ENTER_LEAVE_START_REG): Define.
1609         (ENTER_LEAVE_END_REG): Likewise.
1610         (arc_override_options): Disable millicode when long calls option
1611         is on.
1612         (arc_frame_info): Change it from int to bool.
1613         (arc_compute_frame_size): Clean up.
1614         (arc_save_restore): Remove.
1615         (frame_save_reg): New function.
1616         (frame_restore_reg): Likewise.
1617         (arc_enter_leave_p): Likewise.
1618         (arc_save_callee_saves): Likewise.
1619         (arc_restore_callee_saves): Likewise.
1620         (arc_save_callee_enter): Likewise.
1621         (arc_restore_callee_leave): Likewise.
1622         (arc_save_callee_milli): Likewise.
1623         (arc_restore_callee_milli): Likewise.
1624         (arc_expand_prologue): Reimplement to emit enter/leave
1625         instructions.
1626         (arc_expand_epilogue): Likewise.
1627         (arc_check_multi): New function.
1628         * config/arc/arc.md (push_multi_fp): New pattern.
1629         (push_multi_fp_blink): Likewise.
1630         (pop_multi_fp): Likewise.
1631         (pop_multi_fp_blink): Likewise.
1632         (pop_multi_fp_ret): Likewise.
1633         (pop_multi_fp_blink_ret): Likewise.
1634         * config/arc/arc.opt (mmillicode): Update option.
1635         (mcode-density-frame): New option.
1636         * config/arc/predicates.md (push_multi_operand): New predicate.
1637         (pop_multi_operand): Likewise.
1638         * doc/invoke.texi (ARC): Update ARC options information.
1641 2018-11-13  Claudiu Zissulescu  <claziss@synopsys.com>
1643         * config/arc/arc-protos.h (gen_operands_ldd_std): Add.
1644         * config/arc/arc.c (operands_ok_ldd_std): New function.
1645         (mem_ok_for_ldd_std): Likewise.
1646         (gen_operands_ldd_std): Likewise.
1647         * config/arc/arc.md: Add peephole2 rules for std/ldd.
1649 2018-11-13  Eric Botcazou  <ebotcazou@adacore.com>
1651         * toplev.c (output_stack_usage): Turn test on flag_stack_usage into
1652         test on stack_usage_file.
1653         (lang_dependent_init): Do not open the .su file if generating LTO.
1655 2018-11-13  Jakub Jelinek  <jakub@redhat.com>
1657         PR rtl-optimization/87918
1658         * simplify-rtx.c (simplify_merge_mask): For COMPARISON_P, use
1659         simplify_gen_relational rather than simplify_gen_binary.
1661 2018-11-13  Richard Biener  <rguenther@suse.de>
1663         * tree-ssanames.h (set_range_info): Use value_range_base.
1664         (get_range_info): Likewise.
1665         * tree-ssanames.c (set_range_info): Likewise.
1666         (get_range_info): Likewise.
1667         * tree-vrp.c (value_range_base::union_helper): Split
1668         out common parts of value_range[_base]::union_.
1669         (value_range_base::union_): Update.
1670         (value_range::union_): Likewise.
1671         (determine_value_range_1): Use value_range_base.
1672         (determine_value_range): Likewise.
1673         * tree-vrp.h (value_range_base::union_helper): Move ...
1674         (value_range::union_helper): ... from here.
1676 2018-11-13  Alan Modra  <amodra@gmail.com>
1678         * config/rs6000/rs6000.c (rs6000_secondary_reload_inner): Negate
1679         offset for PRE_DEC.
1680         (rs6000_secondary_reload_gpr): Don't call find_replacement.
1682 2018-11-13  Sandra Loosemore  <sandra@codesourcery.com>
1684         PR middle-end/59634
1685         * doc/invoke.texi (Optimize Options): Clarify that the
1686         l1-cache-line-size, l1-cache-size, and l2-cache-size parameters
1687         apply to data cache size.
1689 2018-11-13  Alan Modra  <amodra@gmail.com>
1691         * config/rs6000/predicates.md (logical_const_operand),
1692         (logical_operand): Correct comment.
1693         * config/rs6000/rs6000.c (rs6000_emit_prologue): Comment fix.
1695 2018-11-13  Alan Modra  <amodra@gmail.com>
1697         * config/rs6000/rs6000.md (addsi3_high): Prefix with '*'.
1699 2018-11-13  Alan Modra  <amodra@gmail.com>
1701         * gcc/doc/md.texi (Machine Constraints): Correct rs6000 h constraint
1702         description.
1703         * config/rs6000/rs6000.md (movsi_internal1): Delete MT%0 case
1704         covered by alternative.
1705         (movcc_internal1): Ignore h for register preference.
1706         (mov<mode>_hardfloat64): Likewise.
1707         (mov<mode>_softfloat): Ignore c, l, h for register preference.
1709 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
1711         PR preprocessor/47823
1712         * doc/cpp.texi (Alternatives to Wrapper #ifndef): Move #pragma once
1713         documentation to...
1714         (Pragmas): ...here.
1715         * doc/extend.texi (Pragmas): Note additional pragmas documented
1716         in the CPP manual.
1718 2018-11-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
1720         PR middle-end/86677
1721         PR middle-end/87528
1722         * tree-scalar-evolution.c (expression_expensive_p): Make
1723         BUILTIN POPCOUNT as expensive when backend does not define it.
1725 2018-11-12  Fredrik Noring  <noring@nocrew.org>
1727         * config.gcc: Update with-llsc defaults for MIPS r5900.
1729 2018-11-12  Martin Liska  <mliska@suse.cz>
1731         PR gcov-profile/87442
1732         * common.opt: Add -fprofile-filter-files and -fprofile-exclude-files
1733         options.
1734         * doc/invoke.texi: Document them.
1735         * tree-profile.c (parse_profile_filter): New.
1736         (parse_profile_file_filtering): Likewise.
1737         (release_profile_file_filtering): Likewise.
1738         (include_source_file_for_profile): Likewise.
1739         (tree_profiling): Filter source files based on the
1740         newly added options.
1742 2018-11-12  Martin Liska  <mliska@suse.cz>
1744         PR target/87903
1745         * doc/extend.texi: Add missing values for __builtin_cpu_is and
1746         __builtin_cpu_supports for x86 target.
1748 2018-11-12  Sandra Loosemore  <sandra@codesourcery.com>
1750         PR middle-end/21110
1751         * doc/rtl.texi (Constants): Clarify that mode of "high" doesn't
1752         have to be Pmode.
1753         (Arithmetic): Likewise for "lo_sum".
1755 2018-11-12  Renlin Li  <renlin.li@arm.com>
1757         PR target/87815
1758         * dse.c (get_stored_val): Add check for compile-time constantness
1759         of gap.
1761 2018-11-12  Sudakshina Das  <sudi.das@arm.com>
1763         * config/arm/arm-cpus.in (armv8_5, sb, predres): New features.
1764         (ARMv8_5a): New fgroup.
1765         (armv8.5-a): New arch.
1766         (armv8-a, armv8.1-a, armv8.2-a, armv8.3-a, armv8.4-a): New options
1767         sb and predres.
1768         * config/arm/arm-tables.opt: Regenerate.
1769         * config/arm/t-aprofile: Add matching rules for -march=armv8.5-a
1770         * config/arm/t-arm-elf (all_v8_archs): Add armv8.5-a.
1771         * config/arm/t-multilib (v8_5_a_simd_variants): New variable.
1772         Add matching rules for -march=armv8.5-a and extensions.
1773         * doc/invoke.texi (ARM options): Document -march=armv8.5-a.
1774         Add sb and predres to all armv8-a except armv8.5-a.
1776 2018-11-12  Richard Biener  <rguenther@suse.de>
1778         * tree-vrp.h (value_range[_base]::set): Make public.  Provide
1779         overload for single value.
1780         (value_range[_base]::set_nonnull): New.
1781         (value_range[_base]::set_null): Likewise.
1782         (value_range): Document bitmap copying behavior, mark
1783         copy constructor and assignment operator deleted.
1784         (value_range::move): New.
1785         (value_range::set_and_canonicalize): Default bitmap to zero.
1786         (set_value_range_to_nonnull): Remove.
1787         (set_value_range_to_null): Likewise.
1788         (set_value_range): Likewise.
1789         (set_value_range_to_value): Likewise.
1790         (extract_range_from_unary_expr): Work on value_range_base.
1791         (extract_range_from_binary_expr_1): Likewise.  Rename to...
1792         (extract_range_from_binary_expr): ... this.
1793         * tree-vrp.c (value_range::update): Clear equiv bitmap
1794         if required.
1795         (value_range::move): New, move equiv bitmap.
1796         (value_range_base::set_undefined): Avoid assignment.
1797         (value_range::set_undefined): Likewise.
1798         (value_range_base::set_varying): Likewise.
1799         (value_range::set_varying): Likewise.
1800         (set_value_range): Remove.
1801         (value_range_base::set): New overload for value.
1802         (value_range::set): Likewise.
1803         (set_value_range_to_nonnull): Remove.
1804         (value_range_base::set_nonnull): New.
1805         (value_range::set_nonnull): Likewise.
1806         (set_value_range_to_null): Remove.
1807         (value_range_base::set_null): New.
1808         (value_range::set_null): Likewise.
1809         (range_is_null): Work on value_range_base.
1810         (range_is_nonnull): Likewise.
1811         (ranges_from_anti_range): Likewise.
1812         (extract_range_into_wide_ints): Likewise.
1813         (extract_range_from_multiplicative_op): Likewise.
1814         (extract_range_from_binary_expr): Likewise.  Update for API changes.
1815         (extract_range_from_unary_expr): Likewise.  Remove OBJ_TYPE_REF
1816         handling.
1817         (value_range::intersect_helper): Avoid copy and assignment.
1818         (value_range::union_helper): Likewise.
1819         (determine_value_range_1): Adjust.
1820         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
1821         Avoid assignment by using move.
1822         (evrp_range_analyzer::record_ranges_from_stmt): Avoid assignment.
1823         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1824         Likewise.
1825         * tree-ssanames.c (get_range_info): Likewise.
1826         * vr-values.h (vr_values::get_vr_for_comparison): Adjust API.
1827         * vr-values.c (vr_values::get_value_range): Adjust.
1828         (vr_values::update_value_range): Likewise.
1829         (symbolic_range_based_on_p): Work on value_range_base.
1830         (vr_values::extract_range_from_binary_expr): Use value_range_base.
1831         (vr_values::extract_range_from_unary_expr): Likewise.
1832         (vr_values::extract_range_from_cond_expr): Avoid assignment.
1833         (vr_values::extract_range_from_comparison): Adjust.
1834         (vr_values::check_for_binary_op_overflow): Use value_range_base.
1835         (vr_values::extract_range_basic): Adjust.
1836         (vr_values::adjust_range_with_scev): Likewise.
1837         (vr_values::vrp_visit_assignment_or_call): Likewise.
1838         (vr_values::get_vr_for_comparison): Change API to avoid
1839         assignment and copy construction.
1840         (vr_values::compare_name_with_value): Adjust accordingly.
1841         (vr_values::compare_names): Likewise.
1842         (vr_values::extract_range_from_phi_node): Avoid assignment and
1843         bogus in-place modify of equiv bitmap.
1844         (vr_values::simplify_bit_ops_using_ranges): Use value_range_base.
1845         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Adjust
1846         for extract_range_from_unary_expr API change.
1847         * ipa-cp.c (ipa_vr_operation_and_type_effects): Likewise.
1849 2018-11-12  Eric Botcazou  <ebotcazou@adacore.com>
1851         * config/mcore/mcore.h (WORD_REGISTER_OPERATIONS): Remove duplicate.
1853 2018-11-12  Richard Biener  <rguenther@suse.de>
1855         * tree-vrp.h (value_range_base::symbolic_p,
1856         value_range_base::constant_p, value_range_base::zero_p,
1857         value_range_base::singleton_p): Move from value_range.
1858         (value_range::dump): Add.
1859         * gimple-ssa-evrp-analyze.c
1860         (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
1861         * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
1862         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
1863         Use set_varying.
1864         * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
1865         (value_range::constant_p): Likewise.
1866         (value_range::singleton_p): Likewise.
1867         (value_range_base::dump): Add.
1868         (set_value_range_to_undefined): Remove.
1869         (set_value_range_to_varying): Likewise.
1870         (range_int_cst_p): Take value_range_base argument.
1871         (range_int_cst_singleton_p): Likewise.
1872         (value_range_constant_singleton): Likewise.
1873         (vrp_set_zero_nonzero_bits): Likewise.
1874         (extract_range_from_multiplicative_op): Use set_varying.
1875         (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
1876         (extract_range_from_unary_expr): Likewise.
1877         (dump_value_range_base): Change to overload of dump_value_range.
1878         (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
1879         (vrp_prop::visit_stmt): Likewise.
1880         (value_range::intersect_helper): Likewise.
1881         (value_range::union_helper): Likewise.
1882         (determine_value_range_1): Likewise.
1884 2018-11-12  Richard Biener  <rguenther@suse.de>
1886         * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
1887         (set_value_range_to_null): Likewise.
1888         * vr-values.c (vr_values::extract_range_from_comparison):
1889         Clear equiv for constant singleton ranges.
1891 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
1893         * config/i386/sse.md: Combine VFIXUPIMM* patterns
1894         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1895         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1896         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
1897         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1898         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1899         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
1901 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
1903         PR c/69502
1904         * doc/extend.texi (Common Type Attributes): For the align type
1905         attribute, copy language about decreasing alignment from the
1906         corresponding variable attribute.
1908 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
1910         * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
1911         -frounding-math.
1913 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
1915         PR c++/43105
1916         * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
1917         -frtti and -fno-rtti code.
1919 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
1921         PR c/26366
1922         * doc/extend.texi (Other Builtins): Document probability associated
1923         with __builtin_expect.
1925 2018-11-11  Uros Bizjak  <ubizjak@gmail.com>
1927         PR target/87928
1928         * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
1929         instead of (TARGET_64BIT && ix86_abi == MS_ABI).
1930         * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
1931         * config/i386/cygming.h (STACK_BOUNDARY): Remove.
1933 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
1935         * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
1937 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
1939         * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
1941 2018-11-11  Richard Biener  <rguenther@suse.de>
1943         * tree-vrp.h (class value_range_base): New base class for
1944         value_range containing all but the m_equiv member.
1945         (dump_value_range_base): Add.
1946         (range_includes_zero_p): Work on value_range_base.
1947         * tree-vrp.c (value_range_base::set): Split out base handling
1948         from...
1949         (value_range::set): this.
1950         (value_range::set_equiv): New.
1951         (value_range_base::value_range_base): New constructors.
1952         (value_range_base::check): Split out base handling from...
1953         (value_range::check): this.
1954         (value_range::equal_p): Refactor in terms of
1955         ignore_equivs_equal_p which is now member of the base.
1956         (value_range_base::set_undefined): New.
1957         (value_range_base::set_varying): Likewise.
1958         (value_range_base::dump):Split out base handling from...
1959         (value_range::dump): this.
1960         (value_range_base::set_and_canonicalize): Split out base handling
1961         from...
1962         (value_range::set_and_canonicalize): this.
1963         (value_range_base::union_): New.
1964         * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
1965         for m_vr.
1966         * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
1967         instead of value_range everywhere.
1968         (ipcp_vr_lattice::print): Use dump_value_range_base.
1969         (ipcp_vr_lattice::meet_with): Adjust.
1970         (ipcp_vr_lattice::meet_with_1): Likewise.
1971         (ipa_vr_operation_and_type_effects): Likewise.
1972         (propagate_vr_across_jump_function): Likewise.
1973         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
1974         (ipa_get_value_range): Likewise.
1975         (ipa_set_jfunc_vr): Likewise.
1976         (ipa_compute_jump_functions_for_edge): Likewise.
1978 2018-11-10  Sandra Loosemore  <sandra@codesourcery.com>
1980         PR middle-end/65703
1981         * doc/invoke.texi (Optimize Options): Add @opindex entries
1982         for the positive forms of -fno-xxx and -mno-xxx options
1983         that were lacking them.
1985 2018-11-10  Segher Boessenkool  <segher@kernel.crashing.org>
1987         * combine.c (make_more_copies): Only make an intermediate copy if the
1988         dest of a move is a pseudo.
1990 2018-11-09  Maya Rashish  <coypu@sdf.org>
1992         PR target/87221
1993         * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
1994         (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
1996 2018-11-09  Sandra Loosemore  <sandra@codesourcery.com>
1998         PR driver/41179
1999         PR middle-end/65703
2000         * doc/invoke.texi (Optimize Options): Clarify default behavior
2001         for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
2003 2018-11-09  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2005         PR tree-optimization/87940
2006         * expr.c (string_constant): Don't strip NOPS in subexpressions.
2007         Fold PLUS_EXPR correctly.
2009 2018-11-09  Ilya Leoshkevich  <iii@linux.ibm.com>
2011         PR target/87762
2012         * config/s390/s390.c (s390_safe_relative_long_p): New function.
2013         (annotate_constant_pool_refs): Skip insns which support
2014         relative addressing.
2015         (annotate_constant_pool_refs_1): New helper function.
2016         (find_constant_pool_ref): Skip insns which support relative
2017         addression.
2018         (find_constant_pool_ref_1): New helper function.
2019         (replace_constant_pool_ref): Skip insns which support
2020         relative addressing.
2021         (replace_constant_pool_ref_1): New helper function.
2022         (s390_mainpool_start): Adapt to the new signature.
2023         (s390_mainpool_finish): Likewise.
2024         (s390_chunkify_start): Likewise.
2025         (s390_chunkify_finish): Likewise.
2026         (pass_s390_early_mach::execute): Likewise.
2027         (s390_prologue_plus_offset): Likewise.
2028         (s390_emit_prologue): Likewise.
2029         (s390_emit_epilogue): Likewise.
2031 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
2033         * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
2034         but unsupported lastprivate with conditional modifier.
2036 2018-11-09  Jeff Law  <law@redhat.com>
2038         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
2039         unused argument better.  Add gcc_unreachable to silence warning.
2041 2018-11-09  Martin Sebor  <msebor@redhat.com>
2043         PR middle-end/81824
2044         * attribs.c (has_attribute): New helper function.
2045         (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
2046         * attribs.h (decls_mismatched_attributes): Declare.
2047         * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
2048         (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
2049         * common.opt (-Wattribute-alias): Take an argument.
2050         (-Wno-attribute-alias): New option.
2051         * doc/extend.texi (Common Function Attributes): Document copy.
2052         (Common Variable Attributes): Same.
2053         * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
2054         (-Wattribute-alias): Document new option argument.
2056 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
2058         * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
2059         matching criteria.  Remove unused array initializer.
2061 2018-11-09  Bill Schmidt  <wschmidt@linux.ibm.com>
2062             Jinsong Ji  <jji@us.ibm.com>
2064         * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
2065         constraints by introducing a new temporary.
2066         (_mm_cvtss_si64): Likewise.
2068 2018-11-09  Martin Liska  <mliska@suse.cz>
2070         * common.opt: Add -fipa-stack-alignment flag.
2071         * doc/invoke.texi: Document it.
2072         * final.c (rest_of_clean_state): Guard stack
2073         shrinking with flag.
2075 2018-11-09  Martin Liska  <mliska@suse.cz>
2077         * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
2078         to ...
2079         (ipa_discover_variable_flags): ... this.
2080         * common.opt: Come up with new flag -fipa-reference-addressable.
2081         * doc/invoke.texi: Document it.
2082         * ipa-reference.c (propagate): Call the renamed fn.
2083         * ipa-visibility.c (whole_program_function_and_variable_visibility):
2084         Likewise.
2085         * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
2086         ...
2087         (ipa_discover_variable_flags): ... this.  Discover
2088         non-addressable variables only with the newly added flag.
2089         * opts.c: Enable the newly added flag with -O1 and higher
2090         optimization level.
2092 2018-11-09  David Malcolm  <dmalcolm@redhat.com>
2094         * json.cc (selftest::test_writing_literals): Fix comment.
2096 2018-11-09  Martin Liska  <mliska@suse.cz>
2098         * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
2099         string to a stack buffer.
2100         (aarch64_parse_cpu): Likewise.
2101         (aarch64_parse_tune): Likewise.
2103 2018-11-09  Richard Biener  <rguenther@suse.de>
2105         PR tree-optimization/87953
2106         * tree-vect-loop.c (vectorizable_reduction): For analysis
2107         always pass ops[0] to vectorizable_condition.
2109 2018-11-09  Stafford Horne  <shorne@gmail.com>
2110             Richard Henderson  <rth@twiddle.net>
2111             Joel Sherrill  <joel@rtems.org>
2113         * common/config/or1k/or1k-common.c: New file.
2114         * config/or1k/*: New.
2115         * config.gcc (or1k*-*-*): New.
2116         * configure.ac (or1k*-*-*): New test for openrisc tls.
2117         * configure: Regenerated.
2118         * doc/install.texi: Document OpenRISC triplets.
2119         * doc/invoke.texi: Document OpenRISC arguments.
2120         * doc/md.texi: Document OpenRISC.
2122 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
2124         * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
2125         (arm7tdmi-s): Delete CPU.
2126         (arm710t): Add aliases for arm720t and arm740t.
2127         (arm720t, arm740t): Delete CPUs.
2128         (arm920t): Add aliases for arm920, arm922t and arm940t.
2129         (arm920, arm922t, arm940t): Delete CPUs.
2130         (arm10tdmi): Add alias for arm1020t.
2131         (arm1020t): Delete CPU.
2132         (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
2133         (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
2134         (arm10e): Add aliases for arm1020e and arm1022e.
2135         (arm1020e, arm1022e): Delete CPU.
2136         * config/arm/arm.md (generic_sched): Remove entries that are now
2137         handled by aliases.
2138         (generic_vfp): Likewise.
2139         * config/arm/arm1020e.md: Simplify tuning selection based on alias
2140         changes.
2141         * config/arm/arm-tune.md: Regenerated.
2142         * config/arm/arm-tables.opt: Regenerated.
2144 2018-11-09  Richard Biener  <rguenther@suse.de>
2146         PR tree-optimization/87621
2147         * tree-vect-loop.c (vectorizable_reduction): Handle reduction
2148         op with only phi inputs.
2149         * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
2150         (ch_base::copy_headers): Run CSE on copied loop headers.
2151         (pass_ch_vect::process_loop_p): Simplify.
2153 2018-11-09  Alexandre Oliva <oliva@adacore.com>
2155         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
2156         for non-w64 x86_64 biarch.
2158 2018-11-09  Alexandre Oliva <aoliva@redhat.com>
2160         PR rtl-optimization/86438
2161         * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
2162         of in_b for the compare if in_b is SET_DEST.
2164         PR target/87793
2165         * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
2166         non-toplevel UNSPEC.
2168 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
2170         * tree-vrp.c (value_range::check): Do not access internals
2171         directly.
2172         (value_range::singleton_p): Same.
2173         (value_range::type): Same.
2174         (vrp_finalize): Use value_range API.
2176 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
2178         * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
2180 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
2182         * vr-values.c (vr_values::get_value_range): Use value_range API
2183         instead of piecing together ranges.
2184         (vr_values::update_value_range): Same.
2186 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
2188         * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
2189         of performing ad-hoc calculations.
2190         * tree-ssanames.c (set_range_info): New overloaded function
2191         accepting value_range &.
2192         (get_range_info): Same.
2193         * tree-ssanames.h (set_range_info_raw): Remove.
2194         (set_range_info): New prototype.
2195         (get_range_info): Same.
2196         * tree-vrp.h (value_range::null_p): Rename to zero_p.
2197         * tree-vrp.c (value_range::null_p): Same.
2199 2018-11-09  Jan Hubicka  <jh@suse.cz>
2201         * tree.c (fld_type_variant_equal_p): Test user align flag.
2202         (flt_type_variant): Copy user align flag.
2203         (fld_incomplete_type_of): Clear it.
2205 2018-11-09  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
2207         * config/arm/neon.md (div<mode>3): New pattern.
2209 2018-11-08  Andi Kleen  <ak@linux.intel.com>
2211         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
2212         (OPTION_MASK_ISA_PTWRITE_UNSET): New.
2213         (ix86_handle_option): Handle OPT_mptwrite.
2214         * config/i386/cpuid.h (bit_PTWRITE): Add.
2215         * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
2216         * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
2217         * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
2218         * config/i386/i386.c (ix86_target_string): Handle ptwrite.
2219         (ix86_option_override_internal): Handle PTA_PTWRITE.
2220         (ix86_valid_target_attribute_inner_p): Define ptwrite.
2221         (def_builtin2): Force UINT64 to be 64bit only.
2222         * config/i386/i386.h (TARGET_PTWRITE): Add.
2223         (TARGET_PTWRITE_P): Add.
2224         (PTA_PTWRITE): Add.
2225         * config/i386/i386.md: Define ptwrite.
2226         * config/i386/i386.opt: Add -mptwrite.
2227         * config/i386/immintrin.h (_ptwrite64): Add.
2228         (_ptwrite32): Add
2229         * doc/extend.texi: Document __builtin_ia32_ptwrite*.
2230         * doc/invoke.texi: Document -mptwrite.
2232 2018-11-08  Peter Bergner  <bergner@linux.ibm.com>
2234         PR rtl-optimization/87600
2235         * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
2236         * lra-constraints.c (process_alt_operands): Skip illegal hard
2237         register usage.  Prefer reloading non hard register operands.
2239 2018-11-08  Sandra Loosemore  <sandra@codesourcery.com>
2241         PR other/36572
2242         * doc/invoke.texi (Optimize Options): Clarify default behavior
2243         for -fno-sched-interblock and -fno-sched-spec.
2245 2018-11-08  Roman Geissler  <roman.geissler@amadeus.com>
2247         * collect2.c (linker_select):  Add USE_LLD_LD.
2248         (ld_suffixes): Add ld.lld.
2249         (main): Handle -fuse-ld=lld.
2250         * common.opt (-fuse-ld=lld): New option.
2251         * doc/invoke.texi (-fuse-ld=lld): Document.
2252         * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
2254 2018-11-08  Paul Koning  <ni1d@arrl.net>
2256         * config/pdp11/constraints.md: Add "Z" series constraints for use
2257         with pre-dec and post-inc addressing.
2258         * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
2259         (pdp11_expand_operands): Add int argument (word count).
2260         (pdp11_sp_frame_offset): Delete.
2261         (pdp11_cmp_length): New function.
2262         (pushpop_regeq): New function.
2263         * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
2264         Add hook.
2265         (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
2266         frame layout.
2267         (pdp11_initial_elimination_offset): Ditto.
2268         (pdp11_expand_operands): Add word count argument.  Bugfixes.
2269         (output_move_multiple): Change how pointer adjustment is done.
2270         (pdp11_gen_int_label): Correct format.
2271         (output_ascii): Ditto.
2272         (pdp11_asm_output_var): Add code for DEC assembler case.
2273         (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
2274         value.
2275         (legitimate_const_double_p): Ditto.
2276         (pdp11_register_move_cost): Adjust for new register classes.
2277         (pdp11_regno_reg_class): Ditto.
2278         (expand_block_move): Delete.
2279         (pushpop_regeq): New function.
2280         (pdp11_legitimate_address_p): Bugfix in check for constant
2281         offset.
2282         (pdp11_sp_frame_offset): Delete.
2283         (pdp11_reg_save_size): New helper function for new frame layout.
2284         (output_addr_const_pdp11): Remove CONST_DOUBLE case.
2285         (pdp11_expand_shift): Bugfix in check for constant shift count.
2286         (pdp11_shift_length): Ditto.
2287         (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
2288         (pdp11_cmp_length): New function.
2289         * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
2290         some compile options.
2291         (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
2292         (CALL_USED_REGISTERS): Ditto.
2293         (ELIMINABLE_REGS): Ditto.
2294         (REGISTER_NAMES): Ditto.
2295         (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
2296         constraints.
2297         (REG_CLASS_NAMES): Ditto.
2298         (REG_CLASS_CONTENTS): Ditto.  Also remove
2299         HARD_FRAME_POINTER_REGNUM.
2300         (CPU_REG_CLASS): New macro.
2301         (CLASS_MAX_NREGS): Adjust for new register classes.
2302         (FUNCTION_PROFILER): Make no-op.
2303         (may_call_alloca): Remove unused declaration.
2304         (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
2305         (ASM_OUTPUT_SKIP): Fix format.
2306         * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
2307         (HARD_FRAME_POINTER_REGNUM): Remove.
2308         (return): Delete.
2309         (*rts): Rename.  Remove epilogue related checks.
2310         (cmpsi, cmpdi): New insn.
2311         (cbranch<mode>4): Change to apply to SI and DI modes as well.
2312         (mov<mode>): Change constraints to enforce that push/pop
2313         destination cannot use the same register as source.
2314         (*mov<mode><cc_cc>): Ditto.
2315         (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
2316         at assembly output rather than as RTL expander.
2317         (zero_extendqihi2): Bugfix in check for same registers.
2318         (adddi3_nocc): Bugfix in check for constant operand.
2319         (addsi3_nocc): Ditto.
2320         (subdi3_nocc): Ditto.
2321         (subsi3_nocc): Ditto.
2322         (negdi2_nocc): Copy input to pdp11_expand_operands.
2323         (negsi2_nocc): Ditto.
2324         (bswap2_nocc): Ditto.
2325         * config/pdp11/pdp11.opt (mlra): Fix documentation.
2326         * config/pdp11/t-pdp11: Use -Os.
2328 2018-11-08  Richard Earnshaw  <rearnsha@arm.com>
2330         * config/arm/parsecpu.awk (/alias/): New parsing rule.
2331         (/begin cpu/): Check that the cpu name hasn't been previously defined.
2332         (gen_comm_data): Print out CPU alias tables.
2333         (check_cpu): Match aliases when checking the CPU name.
2334         * config/arm/arm-protos.h (cpu_alias): New structure.
2335         (cpu_option): Add entry for aliases.
2336         * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
2337         strongarm1100 and strongarm1110.
2338         (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
2339         (config/arm/arm-generic.md): Remove redundant references to
2340         strongarm110, strongarm1100 and strongarm1110.
2341         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
2342         Scan aliases for additional hints.
2343         (arm_parse_cpu_option_name): Also match a cpu name against the list
2344         of aliases.
2345         * config/arm/arm-tables.opt: Regenerated.
2346         * config/arm/arm-tune.md: Regenerated.
2348 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
2350         * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
2351         BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
2352         BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
2353         BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
2354         BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
2355         BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
2356         * gengtype.c (open_base_files): Add omp-general.h.
2357         * gimple.c (gimple_build_omp_critical):
2358         (gimple_build_omp_taskgroup): Add CLAUSES argument.  Call
2359         gimple_omp_taskgroup_set_clauses.
2360         (gimple_build_omp_atomic_load): Add mo argument, call
2361         gimple_omp_atomic_set_memory_order.
2362         (gimple_build_omp_atomic_store): Likewise.
2363         (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
2364         * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
2365         instead of GSS_OMP.
2366         (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
2367         of GSS_OMP_SINGLE_LAYOUT, adjust comments.
2368         * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
2369         and GF_OMP_ATOMIC_MEMORY_ORDER.  Remove GF_OMP_ATOMIC_SEQ_CST, use
2370         different value for GF_OMP_ATOMIC_NEED_VALUE.
2371         (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
2372         comments.
2373         (struct gimple_statement_omp_single_layout): And remove here.
2374         (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
2375         than gimple_statement_omp_single_layout.
2376         (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
2377         GIMPLE_OMP_TEAMS.
2378         (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
2379         (gimple_omp_subcode): Formatting fix.
2380         (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
2381         gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
2382         gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
2383         gimple_omp_teams_host, gimple_omp_teams_set_host,
2384         gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
2385         gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
2386         gimple_omp_taskgroup_set_clauses): New inline functions.
2387         (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
2388         (gimple_build_omp_atomic_store): Likewise.
2389         (gimple_omp_atomic_seq_cst_p): Remove.
2390         (gimple_omp_atomic_memory_order): New function.
2391         (gimple_omp_atomic_set_seq_cst): Remove.
2392         (gimple_omp_atomic_set_memory_order): New function.
2393         (gimple_build_omp_taskgroup): Add clauses argument.
2394         * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
2395         (dump_gimple_omp_task): Print taskwait with depend clauses.
2396         (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
2397         dump_omp_atomic_memory_order.
2398         (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
2399         * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
2400         GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
2401         (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
2402         renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
2403         ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
2404         ORT_UNTIED_TASKLOOP enumerators.
2405         (enum gimplify_defaultmap_kind): New.
2406         (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
2407         target_map_pointers_as_0len_arrays members, add defaultmap.
2408         (new_omp_context): Initialize defaultmap member.
2409         (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
2410         (maybe_fold_stmt): Don't fold even in host teams regions.
2411         (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
2412         ORT_WORKSHARE.  Test ctx->defaultmap[GDMK_SCALAR] instead of
2413         ctx->omp_firstprivatize_variable.
2414         (omp_add_variable): Don't add private/firstprivate for VLAs in
2415         ORT_TASKGROUP.
2416         (omp_default_clause): Print "taskloop" rather than "task" if
2417         ORT_*TASKLOOP.
2418         (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
2419         Handle new defaultmap clause kinds.
2420         (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.  Allow simd
2421         iterator to be lastprivate or private.  Fix up diagnostics if linear
2422         is used on collapse>1 simd iterator.
2423         (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
2424         (gimplify_omp_depend): New function.
2425         (gimplify_scan_omp_clauses): Add shared clause on parallel for
2426         combined parallel master taskloop{, simd} if taskloop has
2427         firstprivate, lastprivate or reduction clause.  Handle
2428         OMP_CLAUSE_REDUCTION_TASK diagnostics.  Adjust tests for
2429         ORT_COMBINED_TEAMS.  Gimplify depend clauses with iterators.  Handle
2430         cancel and simd OMP_CLAUSE_IF_MODIFIERs.  Handle
2431         OMP_CLAUSE_NONTEMPORAL.  Handle new defaultmap clause kinds.  Handle
2432         OMP_CLAUSE_{TASK,IN}_REDUCTION.  Diagnose invalid conditional
2433         lastprivate.
2434         (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL.  Handle
2435         GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.
2436         (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL.  Handle
2437         OMP_CLAUSE_{TASK,IN}_REDUCTION.
2438         (gimplify_omp_task): Handle taskwait with depend clauses.
2439         (gimplify_omp_for): Add shared clause on parallel for combined
2440         parallel master taskloop{, simd} if taskloop has firstprivate,
2441         lastprivate or reduction clause.  Use ORT_TASKLOOP or
2442         ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK.  Adjust
2443         tests for ORT_COMBINED_TEAMS.  Handle C++ range for loops with
2444         NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS.  Firstprivatize
2445         __for_end and __for_range temporaries on OMP_PARALLEL for
2446         distribute parallel for{, simd}.  Move OMP_CLAUSE_REDUCTION
2447         and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
2448         sandwiched in between two taskloops.
2449         (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
2450         instead of ctx->omp_firstprivatize_variable.
2451         (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
2452         ORT_COMBINED_HOST_TEAMS if not inside of target construct.  If
2453         host teams, use gimplify_and_return_first etc. for body like
2454         for target or target data constructs, and at the end call
2455         gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
2456         (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
2457         of OMP_ATOMIC_SEQ_CST, pass it as new argument to
2458         gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
2459         gimple_omp_atomic_set_seq_cst calls.
2460         (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
2461         case, handle taskgroup clauses.
2462         * lto-streamer-out.c (hash_tree): Handle
2463         OMP_CLAUSE_{TASK,IN}_REDUCTION.
2464         * Makefile.in (GTFILES): Add omp-general.h.
2465         * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
2466         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
2467         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
2468         BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
2469         BUILT_IN_GOMP_LOOP_DOACROSS_START,
2470         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
2471         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
2472         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
2473         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
2474         BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
2475         BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
2476         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
2477         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
2478         BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
2479         BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
2480         BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
2481         BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
2482         BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
2483         BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
2484         BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
2485         * omp-expand.c (workshare_safe_to_combine_p): Return false for
2486         non-worksharing loops.
2487         (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
2488         (determine_parallel_type): Don't combine parallel with worksharing
2489         which has _reductemp_ clause.
2490         (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
2491         GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
2492         if there is nonmonotonic modifier or if there is no modifier and no
2493         ordered clause.  For dynamic and guided schedule without monotonic
2494         and nonmonotonic modifier, default to nonmonotonic.
2495         (expand_omp_for): Likewise.  Adjust expand_omp_for_generic caller, use
2496         GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
2497         task reductions.
2498         (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
2499         there are any reduction clauses.
2500         (expand_taskwait_call): New function.
2501         (expand_teams_call): New function.
2502         (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
2503         expand_teams_call for it.  Formatting fix.  Handle taskwait with
2504         depend clauses.
2505         (expand_omp_for_generic): Add SCHED_ARG argument.  Handle expansion
2506         of worksharing loops with task reductions.
2507         (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
2508         expansion of worksharing loops with task reductions.
2509         (expand_omp_sections): Handle expansion of sections with task
2510         reductions.
2511         (expand_omp_synch): For host teams call expand_omp_taskreg.
2512         (omp_memory_order_to_memmodel): New function.
2513         (expand_omp_atomic_load, expand_omp_atomic_store,
2514         expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
2515         instead of gimple_omp_atomic_seq_cst_p.
2516         (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
2517         depend clauses as a standalone directive.
2518         * omp-general.c (enum omp_requires): New variable.
2519         (omp_extract_for_data): Initialize have_reductemp member.  Allow
2520         NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
2521         GT_EXPR loops depending on incr sign.  Formatting fixes.
2522         * omp-general.h (struct omp_for_data): Add have_reductemp member.
2523         (enum omp_requires): New enum.
2524         (omp_requires_mask): Declare.
2525         * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
2526         Fix comment typos.
2527         * omp-low.c (struct omp_context): Add task_reductions and
2528         task_reduction_map fields.
2529         (is_host_teams_ctx): New function.
2530         (is_taskreg_ctx): Return true also if is_host_teams_ctx.
2531         (use_pointer_for_field): Use is_global_var instead of
2532         TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
2533         in outer contexts.
2534         (build_outer_var_ref): Ignore taskgroup outer contexts.
2535         (delete_omp_context): Release task_reductions and task_reduction_map.
2536         (scan_sharing_clauses): Don't add any fields for reduction clause on
2537         taskloop.  Handle OMP_CLAUSE__REDUCTEMP_.  Handle
2538         OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
2539         modifier.  Don't ignore shared clauses in is_host_teams_ctx contexts.
2540         Handle OMP_CLAUSE_NONTEMPORAL.
2541         (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
2542         needed.
2543         (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
2544         clauses with task modifier.
2545         (scan_omp_task): Handle taskwait with depend clauses.
2546         (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
2547         first.  Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
2548         Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
2549         (scan_omp_for): Fix comment formatting.
2550         (scan_omp_teams): Handle host teams constructs.
2551         (check_omp_nesting_restrictions): Allow teams with no outer
2552         OpenMP context.  Adjust diagnostics for teams strictly nested into
2553         some explicit OpenMP construct other than target.  Allow OpenMP atomics
2554         inside of simd regions.
2555         (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
2556         (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
2557         taskreg_nesting_level while scanning host teams construct.
2558         (task_reduction_read): New function.
2559         (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
2560         construct.  Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
2561         clauses.  Handle OMP_CLAUSE_REDUCTION with task modifier.  Remove
2562         second argument create_tmp_var if it is NULL.  Don't ignore shared
2563         clauses in is_host_teams_ctx contexts.  Handle
2564         OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
2565         clauses.
2566         (lower_reduction_clauses): Ignore reduction clauses with task
2567         modifier.  Remove second argument create_tmp_var if it is NULL.
2568         Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
2569         (lower_send_clauses): Ignore reduction clauses with task modifier.
2570         Handle OMP_CLAUSE__REDUCTEMP_.  Don't send anything for
2571         OMP_CLAUSE_REDUCTION on taskloop.  Handle OMP_CLAUSE_IN_REDUCTION.
2572         (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
2573         rely that it is the last stmt in body so far.  Ignore outer taskgroup
2574         contexts.
2575         (omp_task_reductions_find_first, omp_task_reduction_iterate,
2576         lower_omp_task_reductions): New functions.
2577         (lower_omp_sections): Handle reduction clauses with taskgroup
2578         modifiers.  Adjust maybe_add_implicit_barrier_cancel caller.
2579         (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
2580         (lower_omp_for): Likewise.  Handle reduction clauses with taskgroup
2581         modifiers.
2582         (lower_omp_taskgroup): Handle taskgroup reductions.
2583         (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
2584         Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
2585         (lower_depend_clauses): If there are any
2586         OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
2587         depend clauses, use a new array format.  If OMP_CLAUSE_DEPEND_LAST is
2588         seen, assume lowering is done already and return early.  Set kind
2589         on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
2590         (lower_omp_taskreg): Handle reduction clauses with task modifier on
2591         parallel construct.  Handle reduction clause on taskloop construct.
2592         Handle taskwait with depend clauses.
2593         (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
2594         for host teams constructs.
2595         * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
2596         nontemporal and _reductemp_ clause entries.
2597         (omp_clause_code_name): Likewise.
2598         (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
2599         OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
2600         * tree-core.h (enum omp_clause_code): Add
2601         OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
2602         (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
2603         (struct tree_base): Add omp_atomic_memory_order field into union.
2604         Remove OMP_ATOMIC_SEQ_CST comment.
2605         (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
2606         and OMP_CLAUSE_DEPEND_DEPOBJ.
2607         (struct tree_omp_clause): Add subcode.defaultmap_kind.
2608         * tree.def (OMP_TASKGROUP): Add another operand, move next to other
2609         OpenMP constructs with body and clauses operands.
2610         * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
2611         (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
2612         (OMP_TASKGROUP_CLAUSES): Define.
2613         (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
2614         OMP_CLAUSE__LOOPTEMP_.
2615         (OMP_ATOMIC_SEQ_CST): Remove.
2616         (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
2617         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
2618         (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
2619         OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
2620         OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
2621         OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
2622         OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
2623         (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
2624         OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
2625         OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
2626         Define.
2627         * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
2628         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
2629         OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
2630         (convert_local_omp_clauses): Likewise.  Remove useless test.
2631         * tree-parloops.c (create_call_for_reduction_1): Pass
2632         OMP_MEMORY_ORDER_RELAXED as new argument to
2633         dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
2634         * tree-pretty-print.c (dump_omp_iterators): New function.
2635         (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
2636         OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION.  Print
2637         reduction modifiers.  Handle OMP_CLAUSE_DEPEND_DEPOBJ and
2638         OMP_CLAUSE_DEPEND_MUTEXINOUTSET.  Print iterators in depend clauses.
2639         Print __internal__ for OMP_CLAUSE_DEPEND_LAST.  Handle cancel and
2640         simd OMP_CLAUSE_IF_MODIFIERs.  Handle new kinds of
2641         OMP_CLAUSE_DEFAULTMAP. Print conditional: for
2642         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
2643         (dump_omp_atomic_memory_order): New function.
2644         (dump_generic_node): Use it.  Print taskgroup clauses.  Print
2645         taskwait with depend clauses.
2646         * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
2647         * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
2648         Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
2649         * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
2650         write_ts_omp_clause_tree_pointers): Likewise.
2652 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
2654         PR ipa/86395
2655         * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
2656         "-missed", "-note", and "-all" sub-options.
2657         * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
2658         API.
2659         (can_early_inline_edge_p): Likewise.
2660         (want_early_inline_function_p): Likewise.
2661         (want_inline_self_recursive_call_p): Likewise.
2662         (recursive_inlining): Likewise.
2663         (inline_small_functions): Likewise.
2664         (flatten_function): Likewise.
2665         (ipa_inline): Likewise.
2666         (inline_always_inline_functions): Likewise.
2667         (early_inline_small_functions): Likewise.
2668         (early_inliner): Likewise.
2669         * tree-inline.c (expand_call_inline): Likewise.
2671 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
2673         * pretty-print.c (pp_format): Handle %f.
2674         (selftest::test_pp_format): Add test of %f.
2675         * pretty-print.h (pp_double): New macro.
2677 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
2679         * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
2680         * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
2681         (dump_pretty_printer::decode_format): Implement "%C" for
2682         cgraph_node *.
2683         (selftest::test_capture_of_dump_calls): Rename "where" to
2684         "stmt_loc".  Convert test_decl to a function decl and set its
2685         location.  Add a symbol_table_test RAII instance and a
2686         cgraph_node, using it to test "%C" and dump_symtab_node.
2688 2018-11-08  Eric Botcazou  <ebotcazou@adacore.com>
2690         PR middle-end/87916
2691         * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
2693 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
2695         * cgraph.c: Include "selftest.h".
2696         (saved_symtab): New variable.
2697         (selftest::symbol_table_test::symbol_table_test): New ctor.
2698         (selftest::symbol_table_test::~symbol_table_test): New dtor.
2699         (selftest::test_symbol_table_test): New test.
2700         (selftest::cgraph_c_tests): New.
2701         * cgraph.h (saved_symtab): New decl.
2702         (selftest::symbol_table_test): New class.
2703         * selftest-run-tests.c (selftest::run_tests): Call
2704         selftest::cgraph_c_tests.
2705         * selftest.h (selftest::cgraph_c_tests): New decl.
2707 2018-11-08  Richard Biener  <rguenther@suse.de>
2709         * tree-data-ref.h (lambda_int): New typedef.
2710         (lambda_vector_gcd): Adjust.
2711         (lambda_vector_new): Likewise.
2712         (lambda_matrix_new): Likewise.
2713         * tree-data-ref.c  (print_lambda_vector): Adjust.
2715 2018-11-08  Richard Biener  <rguenther@suse.de>
2717         PR tree-optimization/87929
2718         * tree-complex.c (expand_complex_comparison): Clean EH.
2720 2018-11-08  Martin Liska  <mliska@suse.cz>
2722         * doc/extend.texi: Reword.
2723         * predict.c (expr_expected_value_1): Likewise.
2725 2018-11-08  Richard Biener  <rguenther@suse.de>
2727         PR tree-optimization/87913
2728         * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
2729         of extreme values to ordered comparisons.
2731 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
2733         PR middle-end/42726
2734         * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
2736 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
2738         * doc/invoke.texi: Remove leading dash from @opindex entries
2739         throughout the file.
2741 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
2743         PR driver/80828
2744         * doc/invoke.texi (Option Summary): Add -e and --entry.
2745         (Link Options): Likewise.
2747 2018-11-07  Nathan Sidwell  <nathan@acm.org>
2749         PR 87926
2750         * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
2751         --disable-checking bootstrap.
2753 2018-11-07  Hafiz Abid Qadeer  <abidh@codesourcery.com>
2755         * configure: Regenerated.
2757 2018-11-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
2759         PR c/87691
2760         * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
2761         to the mode of the widest field iff the widest field has mode class
2762         MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
2763         reference.
2765 2018-11-07  Nikolai Merinov  <n.merinov@inango-systems.com>
2767         * common.opt: Add -Wattribute-warning.
2768         * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
2769         * expr.c (expand_expr_real_1): Add new attribute to warning_at
2770         call to allow user configure behavior of "warning" attribute.
2772 2018-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
2774         * target.def: Put @: after every vs., e.g., and i.e. where it is
2775         followed by whitespace.
2776         * doc/extend.texi: Ditto.
2777         * doc/fragments.texi: Ditto.
2778         * doc/gimple.texi: Ditto.
2779         * doc/implement-c.texi: Ditto.
2780         * doc/install.texi: Ditto.
2781         * doc/invoke.texi: Ditto.
2782         * doc/md.texi: Ditto.
2783         * doc/plugins.texi: Ditto.
2784         * doc/rtl.texi: Ditto.
2785         * doc/sourcebuild.texi: Ditto.
2786         * doc/tm.texi.in: Ditto.
2787         * doc/ux.texi: Ditto.
2788         * doc/tm.texi: Regenerate.
2790 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2792         * config/arm/arm-cpus.in (ares): New entry.
2793         * config/arm/arm-tables.opt: Regenerate.
2794         * config/arm/arm-tune.md: Likewise.
2795         * doc/invoke.texi (ARM Options): Document ares.
2797 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2799         * config/aarch64/aarch64-cores.def (ares): Define.
2800         * config/aarch64/aarch64-tune.md: Regenerate.
2801         * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
2803 2018-11-07  Jan Hubicka  <jh@suse.cz>
2805         * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
2806         (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
2807         functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
2808         TYPE_DECL.
2810 2018-11-07  Richard Biener  <rguenther@suse.de>
2812         PR tree-optimization/87914
2813         * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
2814         of nested cycles.
2815         (vectorizable_reduction): Handle shifts and rotates by dispatching
2816         to vectorizable_shift.
2817         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
2818         in-loop uses of vect_nested_cycle defs.  Merge cycle and internal
2819         def cases.
2820         (vectorizable_shift): Export and handle being called as
2821         vect_nested_cycle.
2822         (vect_analyze_stmt): Call vectorizable_shift after
2823         vectorizable_reduction.
2824         * tree-vectorizer.h (vectorizable_shift): Declare.
2826 2018-11-07  Jan Hubicka  <jh@suse.cz>
2828         * ipa-devirt.c (odr_types_equivalent_p): Expect constants
2829         than const decls in TREE_VALUE of enum.
2830         (dump_type_inheritance_graph): Improve duplicate dumping.
2831         (free_enum_values): New.
2832         (build_type_inheritance_graph): Use it.
2833         * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
2834         which are not main variants or not ODR types.
2835         (verify_type_variant): Expect variants to have no TYPE_VALUES.
2837 2018-11-07  Richard Biener  <rguenther@suse.de>
2839         * ipa-inline.c (want_inline_small_function_p): Compute
2840         big_speedup_p lazily and last.
2842 2018-11-07  Jan Hubicka  <jh@suse.cz>
2844         * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
2845         building incomplete variant of complete type.
2846         (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
2847         variant of complete type.
2849 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
2851         * config/mips/mips.c: Fix typo in documentation of
2852         mips_loongson_ext2_prefetch_cookie.
2853         (mips_option_override): fix brain twister logical.
2854         * config/mips/mips.h: Fix typo in documentation of
2855         ISA_HAS_CTZ_CTO and define pattern.
2856         * config/mips/mips.md (prefetch): Hoist EXT2 above
2857         the 2EF/EXT block.
2858         (prefetch_indexed): Hoist EXT2 above the EXT block.
2860 2018-11-07  Jan Hubicka  <jh@suse.cz>
2862         * tree.c (free_lang_data_in_type): Add fld parameter; simplify
2863         return and parameter types of function and method types.
2864         (free_lang_data_in_cgraph): Update.
2866 2018-11-07  Martin Liska  <mliska@suse.cz>
2868         PR rtl-optimization/87868
2869         * postreload-gcse.c (eliminate_partially_redundant_load): Set
2870         threshold to max_count if we would overflow.
2871         * profile-count.h: Make max_count a public constant.
2873 2018-11-07  Martin Liska  <mliska@suse.cz>
2875         * mem-stats.h: Fix GNU coding style.
2877 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
2879         * config/mips/gs264e.md: New.
2880         * config/mips/mips-cpus.def: Define gs264e.
2881         * config/mips/mips-tables.opt: Regenerate.
2882         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
2883         gs264e.
2884         (mips_issue_rate): Add support for gs264e.
2885         (mips_multipass_dfa_lookahead): Likewise.
2886         * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
2887         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
2888         (MIPS_ASE_MSA_SPEC): New.
2889         (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
2890         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
2891         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
2892         * config/mips/mips.md: Include gs264e.md.
2893         (processor): Add gs264e.
2894         * config/mips/mips.opt (MSA): Use Mask instead of Var.
2895         * doc/invoke.texi: Add gs264e to supported architectures.
2897 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
2899         * config/mips/gs464e.md: New.
2900         * config/mips/mips-cpus.def: Define gs464e.
2901         * config/mips/mips-tables.opt: Regenerate.
2902         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
2903         gs464e.
2904         (mips_issue_rate): Add support for gs464e.
2905         (mips_multipass_dfa_lookahead): Likewise.
2906         (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
2907         * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
2908         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
2909         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
2910         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
2911         * config/mips/mips.md: Include gs464e.md.
2912         (processor): Add gs464e.
2913         * doc/invoke.texi: Add gs464e to supported architectures.
2915 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
2917         * config/mips/loongson3a.md: Rename to ...
2918         * config/mips/gs464.md: ... here.
2919         * config/mips/mips-cpus.def: Define gs464; Add loongson3a
2920         as an alias of gs464 processor.
2921         * config/mips/mips-tables.opt: Regenerate.
2922         * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
2923         instead of PROCESSOR_LOONGSON_3A.
2924         (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
2925         TUNE_LOONGSON_3A.
2926         (mips_option_override): Enable MMI and EXT for gs464.
2927         * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
2928         Rename TUNE_LOONGSON_3A to TUNE_GS464.
2929         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
2930         (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
2931         ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
2932         TARGET_LOONGSON_3A.
2933         * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
2934         (processor): Add gs464;
2935         * doc/invoke.texi: Add gs464 to supported architectures.
2937 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
2939         * config/mips/mips-protos.h
2940         (mips_loongson_ext2_prefetch_cookie): New prototype.
2941         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
2942         (mips_option_override): Enable TARGET_LOONGSON_EXT when
2943         TARGET_LOONGSON_EXT2 is true.
2944         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
2945         __mips_loongson_ext2, __mips_loongson_ext_rev=2.
2946         (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
2947         (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
2948         TARGET_LOONGSON_EXT2.
2949         (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
2950         (define_insn "ctz<mode>2"): New insn pattern.
2951         (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
2952         (define_insn "prefetch_indexed_<mode>"): Include
2953         TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
2954         * config/mips/mips.opt (-mloongson-ext2): Add option.
2955         * gcc/doc/invoke.texi (-mloongson-ext2): Document.
2957 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
2959         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
2960         __mips_loongson_ext.
2961         (MIPS_ASE_LOONGSON_EXT_SPEC): New.
2962         (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
2963         -mloongson-ext.
2964         (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
2965         * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
2966         <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
2967         instead of TARGET_LOONGSON_3A.
2968         * config/mips/mips.opt (-mloongson-ext): Add option.
2969         * gcc/doc/invoke.texi (-mloongson-ext): Document.
2971 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
2973         * config.gcc (extra_headers): Add loongson-mmiintrin.h.
2974         * config/mips/loongson.md: Move to ...
2975         * config/mips/loongson-mmi.md: here; Adjustment.
2976         * config/mips/loongson.h: Move to ...
2977         State as deprecated. Include loongson-mmiintrin.h for back
2978         compatibility and warning.
2979         * config/mips/loongson-mmiintrin.h: ... here.
2980         * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
2981         mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
2982         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
2983         (mips_option_override): Make sure MMI use hard float;
2984         (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
2985         mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
2986         mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
2987         TARGET_LOONGSON_VECTORS.
2988         * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
2989         (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
2990         (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
2991         (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
2992         -mloongson-mmi.
2993         (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
2994         TARGET_LOONGSON_VECTORS.
2995         * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
2996         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
2997         (Loongson MMI patterns): Include loongson-mmi.md instead of
2998         loongson.md.
2999         * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
3000         * gcc/doc/invoke.texi (-mloongson-mmi): Document.
3002 2018-11-07  Richard Biener  <rguenther@suse.de>
3004         PR lto/87906
3005         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
3006         BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
3008 2018-11-07  Alexandre Oliva <aoliva@redhat.com>
3010         PR rtl-optimization/87874
3011         * lra.c (lra_substitute_pseudo): Do not create a subreg for
3012         const wide ints.
3014 2018-11-06  Aaron Sawdey  <acsawdey@linux.ibm.com>
3016         * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
3017         if not in indexed or indirect form.
3018         (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
3019         (bswap<mode>2_store): Ditto.
3021 2018-11-06  Richard Earnshaw  <rearnsha@arm.com>
3023         * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
3024         the UNSPEC.
3026 2018-11-06  Richard Biener  <rguenther@suse.de>
3028         PR tree-optimization/86850
3029         * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
3030         instead of src.m_vec.
3032 2018-11-06  Jan Hubicka  <jh@suse.cz>
3034         * tree.c (fld_simplified_type_name): Break out form ...
3035         (free_lang_data_in_type): ... here.
3036         (fld_type_variant_equal_p): Use it.
3038 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3040         * config/default-d.c: Include memmodel.h.
3042         * config/sol2-d.c: New file.
3043         * config/t-sol2 (sol2-d.o): New rule.
3044         * config.gcc <*-*-solaris2*>: Set d_target_objs,
3045         target_has_targetdm.
3047 2018-11-06  Jan Hubicka  <jh@suse.cz>
3049         * tree.c (fld_type_variant): Also copy alignment; be sure that
3050         new variant is equal.
3052 2018-11-06  Ilya Leoshkevich  <iii@linux.ibm.com>
3054         PR target/87762
3055         * config/s390/s390.md: Add relative_long attribute.
3057 2018-11-06  Jan Hubicka  <jh@suse.cz>
3059         * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
3060         * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
3061         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
3062         stream TYPE_NEEDS_CONSTRUCTING.
3063         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
3064         * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
3066 2018-11-06  Richard Biener  <rguenther@suse.de>
3068         * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
3069         dump-scope ...
3070         (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
3072 2018-11-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
3074         * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
3075         REG_CLASS_CONTENTS[GEN_REGS].
3076         (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
3078 2018-11-06  Jan Hubicka  <jh@suse.cz>
3080          * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
3082 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3084         PR sanitizer/80953
3085         * config/sol2.h (ASAN_CC1_SPEC): Define.
3086         (LD_WHOLE_ARCHIVE_OPTION): Define.
3087         (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
3088         (ASAN_REJECT_SPEC): Provide default.
3089         (LIBASAN_EARLY_SPEC): Define.
3090         (LIBTSAN_EARLY_SPEC): Define.
3091         (LIBLSAN_EARLY_SPEC): Define.
3092         * config/i386/sol2.h (CC1_SPEC): Redefine.
3093         (ASAN_REJECT_SPEC): Define.
3095         * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
3096         (TARGET_ASAN_SHADOW_OFFSET): Define.
3097         (sparc_asan_shadow_offset): New function.
3098         * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
3099         (ASAN_REJECT_SPEC): Define.
3101 2018-11-06  Jan Hubicka  <jh@suse.cz>
3103         * tree.c (fld_type_variant): Copy canonical type.
3104         (fld_incomplete_type_of): Check that canonical types looks sane;
3105         copy canonical type.
3106         (verify_type): Accept when incomplete type has complete canonical type.
3108 2018-11-06  Jan Hubicka  <jh@suse.cz>
3110         * tree.c (free_lang_data): Reset overwite_assembler_name,
3111         print_xnode, print_decl, print_type and print_identifier of
3112         langhooks.
3114 2018-11-06  Richard Biener  <rguenther@suse.de>
3116         PR tree-optimization/87889
3117         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
3118         Do nothing if old and new arg are the same
3120 2018-11-06  Andreas Krebbel  <krebbel@linux.ibm.com>
3122         PR target/87723
3123         * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
3124         attributes for operands 3 and 4.
3126 2018-11-06  Richard Biener  <rguenther@suse.de>
3128         PR middle-end/18041
3129         * simplify-rtx.c (simplify_binary_operation_1): Add pattern
3130         matching bitfield insertion.
3132 2018-11-06  Alexandre Oliva <aoliva@redhat.com>
3134         * auto-inc-dec.c: Include valtrack.h.  Improve comments.
3135         (reg_next_debug_use): New.
3136         (attempt_change): Propagate adjusted expression into affected
3137         debug insns.
3138         (merge_in_block): Track uses in debug insns.
3139         (pass_inc_dec::execute): Allocate and release
3140         reg_next_debug_use.
3142 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
3144         * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
3145         (_mm512_fixupimm_round_pd): Update parameters and builtin.
3146         (_mm512_maskz_fixupimm_round_pd): Ditto.
3147         (_mm512_fixupimm_round_ps): Ditto.
3148         (_mm512_maskz_fixupimm_round_ps): Ditto.
3149         (_mm_fixupimm_round_sd): Ditto.
3150         (_mm_maskz_fixupimm_round_sd): Ditto.
3151         (_mm_fixupimm_round_ss): Ditto.
3152         (_mm_maskz_fixupimm_round_ss): Ditto.
3153         (_mm512_fixupimm_pd): Ditto.
3154         (_mm512_maskz_fixupimm_pd): Ditto.
3155         (_mm512_fixupimm_ps): Ditto.
3156         (_mm512_maskz_fixupimm_ps): Ditto.
3157         (_mm_fixupimm_sd): Ditto.
3158         (_mm_maskz_fixupimm_sd): Ditto.
3159         (_mm_fixupimm_ss): Ditto.
3160         (_mm_maskz_fixupimm_ss): Ditto.
3161         (_mm512_mask_fixupimm_round_pd): Update builtin.
3162         (_mm512_mask_fixupimm_round_ps): Ditto.
3163         (_mm_mask_fixupimm_round_sd): Ditto.
3164         (_mm_mask_fixupimm_round_ss): Ditto.
3165         (_mm512_mask_fixupimm_pd): Ditto.
3166         (_mm512_mask_fixupimm_ps): Ditto.
3167         (_mm_mask_fixupimm_sd): Ditto.
3168         (_mm_mask_fixupimm_ss): Ditto.
3169         * config/i386/avx512vlintrin.h:
3170         (_mm256_fixupimm_pd): Update parameters and builtin.
3171         (_mm256_maskz_fixupimm_pd): Ditto.
3172         (_mm256_fixupimm_ps): Ditto.
3173         (_mm256_maskz_fixupimm_ps): Ditto.
3174         (_mm_fixupimm_pd): Ditto.
3175         (_mm_maskz_fixupimm_pd): Ditto.
3176         (_mm_fixupimm_ps): Ditto.
3177         (_mm_maskz_fixupimm_ps): Ditto.
3178         (_mm256_mask_fixupimm_pd): Update builtin.
3179         (_mm256_mask_fixupimm_ps): Ditto.
3180         (_mm_mask_fixupimm_pd): Ditto.
3181         (_mm_mask_fixupimm_ps): Ditto.
3182         * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
3183         * config/i386/i386-builtin.def: Update builtin definitions.
3184         * config/i386/i386.c: Handle new builtin types and remove useless ones.
3185         * config/i386/sse.md: Update VFIXUPIMM* patterns.
3186         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3187         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3188         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
3189         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
3190         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
3191         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
3192         * config/i386/subst.md:
3193         (round_saeonly_sd_mask_operand4): Add new subst_attr.
3194         (round_saeonly_sd_mask_op4): Ditto.
3195         (round_saeonly_expand_operand5): Ditto.
3196         (round_saeonly_expand): Update.
3198 2018-11-05  Max Filippov  <jcmvbkbc@gmail.com>
3200         * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
3202 2018-11-05  Segher Boessenkool  <segher@kernel.crashing.org>
3204         PR rtl-optimization/87871
3205         * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
3207 2018-11-05  Paul Koning  <ni1d@arrl.net>
3209         * doc/sourcebuild.texi (target attributes): Document new "inf"
3210         effective target keyword.
3212 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
3214         * config/s390/s390.c (s390_register_move_cost): Increase costs for
3215         moves involving the CC reg.
3217 2018-11-05  Richard Biener  <rguenther@suse.de>
3219         PR tree-optimization/87873
3220         * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
3221         argument.
3222         * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
3223         * tree-vect-loop.c (vect_transform_loop): When splitting the
3224         loop exit also create forwarder PHIs for constants.
3225         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
3226         Handle constant to_arg, add extra checking we match up the correct
3227         PHIs.
3229 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
3231         * config/s390/s390.md: QImode and HImode for load on condition.
3233 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
3235         * config/s390/predicates.md: Fix typo.
3236         * config/s390/s390.md: Allow immediates for load on condition.
3238 2018-11-05  Martin Liska  <mliska@suse.cz>
3240         * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
3241         * bitmap.h (struct bitmap_usage): Likewise.
3242         * ggc-common.c (SCALE): Remove.
3243         (LABEL): Likewise.
3244         (struct ggc_usage): Use SIZE_AMOUNT. And update
3245         compare method.
3246         * ggc-page.c (SCALE): Remove.
3247         (STAT_LABEL): Remove.
3248         (ggc_print_statistics): Use SIZE_AMOUNT.
3249         * gimple.h (SCALE): Remove.
3250         (LABEL): Likewise.
3251         * input.c (ONE_K): Remove.
3252         (ONE_M): Likewise.
3253         (SCALE): Likewise.
3254         (STAT_LABEL): Likewise.
3255         (FORMAT_AMOUNT): Likewise.
3256         (dump_line_table_statistics): Use SIZE_AMOUNT.
3257         * mem-stats.h (struct mem_usage): Likewise.
3258         * rtl.c (dump_rtx_statistics): Likewise.
3259         (rtx_alloc_counts): Change type to size_t.
3260         (rtx_alloc_sizes): Likewise.
3261         (rtx_count_cmp): New.
3262         (dump_rtx_statistics): Sort first based on counts.
3263         * tree.c (tree_nodes_cmp): New.
3264         (tree_codes_cmp): New.
3265         (dump_tree_statistics): Sort first based on counts.
3266         * system.h (ONE_K): New.
3267         (ONE_M): Likewise.
3268         (SIZE_SCALE): Likewise.
3269         (SIZE_LABEL): Likewise.
3270         (SIZE_AMOUNT): Likewise.
3271         * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
3272         * tree-dfa.c (dump_dfa_stats): Likewise.
3273         * tree-phinodes.c (phinodes_print_statistics): Likewise.
3274         * tree-ssanames.c (ssanames_print_statistics): Likewise.
3275         * tree.c (dump_tree_statistics): Likewise.
3276         * vec.c (struct vec_usage): Likewise.
3277         * trans-mem.c (tm_mangle): Enlarge buffer in order to not
3278         trigger a -Werror=format-overflow with
3279         --enable-gather-detailed-stats.
3281 2018-11-05  Martin Liska  <mliska@suse.cz>
3283         * mem-stats.h (mem_alloc_description::release_instance_overhead):
3284         Return T *.
3285         * vec.c (struct vec_usage): Register m_element_size.
3286         (vec_prefix::register_overhead): New arguments: elements and
3287         element_size.
3288         (vec_prefix::release_overhead): Subtract elements.
3289         * vec.h (struct vec_prefix): Change signature.
3290         (va_heap::reserve): Pass proper arguments.
3291         (va_heap::release): Likewise.
3293 2018-11-05  Martin Liska  <mliska@suse.cz>
3295         * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
3296         style.
3297         * vec.c: Likewise.
3299 2018-11-05  Richard Biener  <rguenther@suse.de>
3301         * tree-scalar-evolution.h (final_value_replacement_loop): Update
3302         prototype.
3303         * tree-scalar-evolution.c (final_value_replacement_loop): Return
3304         whether anything was done.
3305         (scev_const_prop): Remove constant propagation part, fold
3306         remains into ...
3307         * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
3308         (pass_data_scev_cprop): TODO_cleanup_cfg is now done
3309         conditionally.
3311 2018-11-05  Jakub Jelinek  <jakub@redhat.com>
3313         PR tree-optimization/87859
3314         * gimple-ssa-store-merging.c (struct merged_store_group): Add
3315         only_constants and first_nonmergeable_order members.
3316         (merged_store_group::merged_store_group): Initialize them.
3317         (merged_store_group::do_merge): Clear only_constants member if
3318         adding something other than INTEGER_CST store.
3319         (imm_store_chain_info::coalesce_immediate_stores): Don't merge
3320         stores with order >= first_nonmergeable_order.  Use
3321         merged_store->only_constants instead of always recomputing it.
3322         Set merged_store->first_nonmergeable_order if we've skipped any
3323         stores.  Attempt to merge overlapping INTEGER_CST stores that
3324         we would otherwise skip.
3326         PR sanitizer/87837
3327         * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
3329 2018-11-05  Xuepeng Guo  <xuepeng.guo@intel.com>
3331         PR target/87853
3332         * config/i386/emmintrin.h (__v16qs): New to cope with option
3333         -funsigned-char.
3334         (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
3335         (_mm_cmplt_epi8): Likewise.
3336         (_mm_cmpgt_epi8): Likewise.
3338 2018-11-05  Richard Biener  <rguenther@suse.de>
3340         PR rtl-optimization/87852
3341         * fwprop.c (use_killed_between): Only consider single-defs of the
3342         use whose definition statement dominates the use.
3344 2018-11-05  Martin Liska  <mliska@suse.cz>
3346         PR web/87829
3347         * doc/invoke.texi: Remove options that are
3348         not disabled with -Os.
3350 2018-11-05  Martin Liska  <mliska@suse.cz>
3352         PR c/87811
3353         * doc/extend.texi: Update constrain about the last argument
3354         of __builtin_expect_with_probability.
3356 2018-11-05  Martin Liska  <mliska@suse.cz>
3358         PR c/87811
3359         * predict.c (expr_expected_value_1): Verify
3360         that last argument is a real constants and emit
3361         error.
3363 2018-11-05  Martin Liska  <mliska@suse.cz>
3365         PR gcov-profile/77698
3366         * ipa-profile.c (ipa_profile): Adjust hotness threshold
3367         only in LTO mode.
3369 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3371         PR tree-optimization/86572
3372         * builtins.c (c_strlen): Handle negative offsets in a safe way.
3374 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3376         PR tree-optimization/87672
3377         * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
3378         * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
3380 2018-11-04  Uros Bizjak  <ubizjak@gmail.com>
3382         PR middle-end/58372
3383         * cfgexpand.c (pass_expand::execute): Move the call to
3384         finish_eh_generation in front of the call to expand_stack_alignment.
3386 2018-11-04  Venkataramanan Kumar <venkataramanan.kumar@amd.com>
3388         * common/config/i386/i386-common.c (processor_alias_table): Add
3389         znver2 entry.
3390         * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
3391         (case ${target}): Add znver2.
3392         * config/i386/driver-i386.c: (host_detect_local_cpu): Let
3393         -march=native recognize znver2 processors.
3394         * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
3395         * config/i386/i386.c (m_znver2): New definition.
3396         (m_ZNVER): New definition.
3397         (m_AMD_MULTIPLE): Includes m_znver2.
3398         (processor_cost_table): Add znver2 entry.
3399         (processor_target_table): Add znver2 entry.
3400         (get_builtin_code_for_version): Set priority for
3401         PROCESSOR_ZNVER2.
3402         (processor_model): Add M_AMDFAM17H_ZNVER2.
3403         (arch_names_table): Ditto.
3404         (ix86_reassociation_width): Include znver2.
3405         * config/i386/i386.h (TARGET_znver2): New definition.
3406         (struct ix86_size_cost): Add TARGET_ZNVER2.
3407         (enum processor_type): Add PROCESSOR_ZNVER2.
3408         * config/i386/i386.md (define_attr "cpu"): Add znver2.
3409         * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
3410         * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
3411         (ix86_adjust_cost): Add znver2.
3412         * config/i386/x86-tune.def:  Replace m_ZNVER1 by m_ZNVER.
3413         * gcc/doc/extend.texi: Add details about znver2.
3414         * gcc/doc/invoke.texi: Add details about znver2.
3416 2018-11-03  Sandra Loosemore  <sandra@codesourcery.com>
3418         PR target/87079
3420         * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
3421         pattern.
3423 2018-11-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
3425         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
3426         attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
3428 2018-11-02  Richard Earnshaw  <rearnsha@arm.com>
3430         * config/aarch64/aarch64.c ((aarch64_override_options): Disable
3431         shrink-wrapping when -mtrack-speculation.
3433 2018-11-02  Richard Biener  <rguenther@suse.de>
3435         * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
3436         (pop_cost_one_pair): Do not free pair.
3437         (pop_best_coalesce): Likewise.
3438         (create_coalesce_list): Initialize obstack.
3439         (delete_coalesce_list): Free obstack.
3440         (find_coalesce_pair): Obstack-allocate coalesce pairs.
3441         (add_cost_one_coalesce): Likewise.
3442         (struct live_track): Remove bitmap pointer indirections.
3443         (new_live_track): Adjust.
3444         (delete_live_track): Likewise.
3445         (live_track_remove_partition): Likewise.
3446         (live_track_add_partition): Likewise.
3447         (live_track_live_p): Likewise.
3448         (live_track_process_def): Likewise.
3449         (live_track_clear_base_vars): Likewise.
3451 2018-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3453         * configure.ac (gcc_cv_as_sparc_register_op): Remove.
3454         * configure: Regenerate.
3455         * config.in: Regenerate.
3456         * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
3457         HAVE_AS_REGISTER_PSEUDO_OP guard.
3458         * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
3459         !HAVE_AS_REGISTER_PSEUDO_OP support.
3460         (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
3461         guard.
3463 2018-11-02  Richard Biener  <rguenther@suse.de>
3465         * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
3466         with is_type_die.
3468 2018-11-02  Richard Biener  <rguenther@suse.de>
3470         PR tree-optimization/87776
3471         * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
3472         executable when iterating but running into rpo-vn-max-loop-depth
3473         and not eliding the iteration.
3475 2018-11-30  Jan Hubicka  <jh@suse.cz>
3477         * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
3478         TYPE_DECL.
3480 2018-11-01  Aaron Sawdey  <acsawdey@linux.ibm.com>
3482         * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
3483         prototype.
3484         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
3485         Combine with rs6000_address_for_fpconvert.
3486         (rs6000_address_for_fpconvert): Combine with
3487         rs6000_force_indexed_or_indirect_mem.
3488         (rs6000_expand_vector_init): Change function call from
3489         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
3490         * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
3491         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
3492         (floatsi<mode>2_lfiwax_mem): Ditto.
3493         (floatunssi<mode>2_lfiwzx): Ditto.
3494         (floatunssi<mode>2_lfiwzx_mem): Ditto.
3495         (float<QHI:mode><FP_ISA3:mode>2): Ditto.
3496         (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
3497         (fix_trunc<mode>si2_stfiwx): Ditto.
3498         (fixuns_trunc<mode>si2_stfiwx): Ditto.
3499         (float_<mode>si2_hw): Ditto.
3500         (floatuns_<mode>si2_hw): Ditto.
3501         * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
3502         (vsx_splat_<mode>): Ditto.
3504 2018-11-01  Joseph Myers  <joseph@codesourcery.com>
3506         * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
3507         at end of assembler input text.
3508         * configure: Regenerate.
3510 2018-11-01  Jakub Jelinek  <jakub@redhat.com>
3512         PR tree-optimization/87826
3513         * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
3514         negative or larger or equal to type's precision.
3516 2018-10-31  Alexandre Oliva <aoliva@redhat.com>
3518         * opts.c (default_options_table): Do not enable
3519         OPT_fdelayed_branch at -Og.
3520         * doc/invoke.texi (-fdelayed-branch): Document it.
3522 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
3524         * optabs-libfuncs.c (build_libfunc_function_visibility):
3525         New, split out from...
3526         (build_libfunc_function): ... here.
3527         (init_one_libfunc_visibility): New, split out from ...
3528         (init_one_libfunc): ... here.
3530         * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
3531         scratch register need not be early-clobber.  Document the reason
3532         why we cannot use ST<OP>.
3534 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
3536         PR bootstrap/82856
3537         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
3538         line for second argument of AC_DEFINE_UNQUOTED.
3539         * doc/install.texi (Tools/packages necessary for modifying GCC):
3540         Update to autoconf 2.69 and automake 1.15.1.
3541         * aclocal.m4, config.in, configure: Regenerate.
3543 2018-10-31  Pat Haugen  <pthaugen@us.ibm.com>
3545         * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
3546         initialization.
3548 2018-10-31  Martin Liska  <mliska@suse.cz>
3550         PR driver/83193
3551         * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
3552         Add new argument invalid_extension.
3553         (aarch64_get_all_extension_candidates): New function.
3554         (aarch64_rewrite_selected_cpu): Add NULL to function call.
3555         * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
3556         new argument.
3557         (aarch64_get_all_extension_candidates): New function.
3558         * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
3559         argument invalid_extension.
3560         (aarch64_parse_cpu): Likewise.
3561         (aarch64_print_hint_for_extensions): New function.
3562         (aarch64_validate_mcpu): Provide hint about invalid extension.
3563         (aarch64_validate_march): Likewise.
3564         (aarch64_handle_attr_arch): Pass new argument.
3565         (aarch64_handle_attr_cpu): Provide hint about invalid extension.
3566         (aarch64_handle_attr_isa_flags): Likewise.
3568 2018-10-31  Richard Biener  <rguenther@suse.de>
3570         PR middle-end/70359
3571         PR middle-end/86270
3572         * tree-outof-ssa.c (insert_backedge_copies): Restrict
3573         copy generation to useful cases.  Place the copy before
3574         the definition of the backedge value when possible.
3576 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
3578         * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
3579         * config/arc/arc.c (arc_active_insn): New function.
3580         (check_store_cacheline_hazard): Likewise.
3581         (workaround_arc_anomaly): Use check_store_cacheline_hazard.
3582         (arc_override_options): Disable delay slot scheduler for older
3583         A7.
3584         (arc_store_addr_hazard_p): New implementation, old one renamed to
3585         ...
3586         (arc_store_addr_hazard_internal_p): Renamed.
3587         (arc_reorg): Don't combine into brcc instructions which are part
3588         of hardware hazard solution.
3589         * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
3590         (tune_arc700): Likewise.
3591         * config/arc/arc.opt (arc7xx): New tune value.
3592         * config/arc/arc700.md: Improve A7 scheduler.
3594 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
3596         * config/arc/arc.c (arc_override_options): Remove
3597         TARGET_COMPACT_CASESI.
3598         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
3599         (CASE_VECTOR_MODE): Likewise.
3600         (CASE_VECTOR_PC_RELATIVE): Likewise.
3601         (CASE_VECTOR_SHORTEN_MODE): Likewise.
3602         (CASE_VECTOR_SHORTEN_MODE1): Delete.
3603         (ADDR_VEC_ALIGN): Update.
3604         (ASM_OUTPUT_CASE_LABEL): Undefine.
3605         (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
3606         (TARGET_BI_BIH): Define.
3607         (DEFAULT_BRANCH_INDEX): Likewise.
3608         * config/arc/arc.md (casesi): Rework to accept BI/BIH
3609         instructions, remove compact_casesi use case.
3610         (casesi_compact_jump): Remove.
3611         (casesi_dispatch): New pattern.
3612         * config/arc/arc.opt: Add mbranch-index option. Deprecate
3613         compact_casesi option.
3614         * doc/invoke.texi: Document mbranch-index option.
3616 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
3618         * config/arc/arc.c (arc_get_tp): Remove function.
3619         (arc_emit_call_tls_get_addr): Likewise.
3620         (arc_call_tls_get_addr): New function.
3621         (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
3622         * config/arc/arc.md (tls_load_tp_soft): Remove.
3623         (tls_gd_get_addr): Likewise.
3625 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
3627         * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
3628         (mulsi3_600_lib): Remove pattern.
3629         (umulsi3_highpart_600_lib_le): Likewise.
3630         (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
3631         (umulsidi3): Remove call to umulsidi3_600_lib.
3632         (umulsidi3_600_lib): Remove pattern.
3633         (peephole2): Remove peephole using the above deprecated patterns.
3635 2018-10-31  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
3637         PR target/87374
3638         * config/arm/arm.c (arm_option_check_internal): Disable the combined
3639         use of -mslow-flash-data and -mword-relocations.
3640         (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
3641         * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
3642         flag_pic.
3643         * doc/invoke.texi (-mword-relocations): Mention conflict with
3644         -mslow-flash-data.
3645         (-mslow-flash-data): Reciprocally.
3647 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
3649         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
3650         16-byte modes held in GP registers to use an even regno.
3652         * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
3653         (aarch64_atomic_ldop_supported_p): Remove.
3654         (aarch64_gen_atomic_ldop): Remove.
3655         * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
3656         Fully expand LSE operations here.
3657         (atomic_fetch_<atomic_optab><ALLI>): Likewise.
3658         (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
3659         (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
3660         and use ATOMIC_LDOP instead; use register_operand for the input;
3661         drop the split and emit insns directly.
3662         (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
3663         (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
3664         (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
3666         * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
3667         (aarch64_gen_atomic_ldop): Don't call it.
3668         * config/aarch64/atomics.md (atomic_exchange<ALLI>):
3669         Use aarch64_reg_or_zero.
3670         (aarch64_atomic_exchange<ALLI>): Likewise.
3671         (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
3672         operand 0; use aarch64_reg_or_zero for input; merge ...
3673         (@aarch64_atomic_swp<ALLI>): ... this and remove.
3675         * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
3676         (aarch64_split_compare_and_swap): Use it.
3677         (aarch64_expand_compare_and_swap): Likewise.  Remove convert_modes;
3678         test oldval against the proper predicate.
3679         * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
3680         Use nonmemory_operand for expected.
3681         (cas_short_expected_pred): New.
3682         (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
3683         (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
3684         * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
3685         (aarch64_plushi_operand): New.
3687         * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
3688         Force oldval into the rval register for TARGET_LSE; emit the compare
3689         during initial expansion so that it may be deleted if unused.
3690         (aarch64_gen_atomic_cas): Remove.
3691         * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
3692         Change =&r to +r for operand 0; use match_dup for operand 2;
3693         remove is_weak and mod_f operands as unused.  Drop the split
3694         and merge with...
3695         (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
3696         (@aarch64_compare_and_swap<GPI>_lse): Similarly.
3697         (@aarch64_atomic_cas<GPI>): Similarly.
3699 2018-10-31  Richard Biener  <rguenther@suse.de>
3701         * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
3702         using ABSU_EXPR.
3704 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
3706         * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
3707         * config/aarch64/aarch64.md: Include saphira.md
3708         * config/aarch64/saphira.md: New file for pipeline description.
3710 2018-10-30  Martin Sebor  <msebor@redhat.com>
3712         PR middle-end/87041
3713         * gimple-ssa-sprintf.c (format_directive): Use %G to include
3714         inlining context.
3715         (sprintf_dom_walker::compute_format_length):
3716         Avoid setting POSUNDER4K here.
3717         (get_destination_size): Handle null argument values.
3718         (get_user_idx_format): New function.
3719         (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
3720         functions, including user-defined with attribute format printf.
3721         Use %G to include inlining context.
3722         Set POSUNDER4K here.
3724 2018-10-30  Jan Hubicka  <jh@suse.cz>
3726         * params.def (lto-partitions): Bump from 32 to 128.
3728 2018-10-30  Jan Hubicka  <jh@suse.cz>
3730         * tree.c
3731         (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
3732         head in file.
3733         (free_lang_data_in_type): Forward declare.
3734         (fld_type_variant_equal_p): New function.
3735         (fld_type_variant): New function
3736         (fld_incomplete_types): New hash.
3737         (fld_incomplete_type_of): New function
3738         (fld_simplfied-type): New function.
3739         (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
3740         (free_lang_data): Allocate and free fld_incomplete_type; update call
3741         of free_lang_data_in_decl.
3743 2018-10-30  Eric Botcazou  <ebotcazou@adacore.com>
3745         * gcov.c (output_lines): Remove duplicate line.
3747 2018-10-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
3749         * config/rs6000/rs6000.md (bswapdi2): Force address into register
3750         if not in indexed or indirect form.
3751         (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
3752         (bswapdi2_store): Ditto.
3753         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
3754         helper function.
3755         * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
3756         Prototype for helper function.
3758 2018-10-30  Martin Sebor  <msebor@redhat.com>
3760         * doc/extend.texi (optimize): Clarify/expand attribute documentation.
3761         (target, pragma GCC optimize, pragma GCC target): Ditto.
3763 2018-10-30  Jonathan Wakely  <jwakely@redhat.com>
3765         * doc/extend.texi: Fix prototype and description of
3766         __builtin_expect_with_probability.
3768 2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
3770         * cgraph.h (clone_function_name_1): Replaced by new
3771           clone_function_name_numbered that takes name as string; for
3772           privatize_symbol_name_1 use only.
3773           (clone_function_name): Renamed to
3774           clone_function_name_numbered to be explicit about numbering.
3775           (clone_function_name): New two-argument function that does
3776           not number its output.
3777           (clone_function_name): New three-argument function that
3778           takes a number to append to its output.
3779         * cgraphclones.c (duplicate_thunk_for_node):
3780           (clone_function_name_1): Renamed.
3781           (clone_function_name_numbered): Two new functions.
3782           (clone_function_name): Improved documentation.
3783           (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
3784         * config/rs6000/rs6000.c (make_resolver_func): Ditto.
3785         * final.c (final_scan_insn_1): Use the new clone_function_name
3786           without numbering.
3787         * multiple_target.c (create_dispatcher_calls): Ditto.
3788           (create_target_clone): Ditto.
3789         * omp-expand.c (grid_expand_target_grid_body): Ditto.
3790         * omp-low.c (create_omp_child_function_name): Ditto.
3791         * omp-simd-clone.c (simd_clone_create): Ditto.
3792         * symtab.c (simd_symtab_node::noninterposable_alias): Use the
3793           new clone_function_name without numbering.
3795 2018-10-30  Richard Earnshaw  <rearnsha@arm.com>
3797         * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
3798         Assert that the allocation size is not zero.
3800 2018-10-30  Richard Biener  <rguenther@suse.de>
3802         PR tree-optimization/87800
3803         * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
3804         non-induction or reduction PHIs.
3806 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
3808         * config/aarch64/falkor-tag-collision-avoidance.c
3809         (execute_tag_collision_avoidance): Call df_note_add_problem.
3811 2018-10-30  Martin Liska  <mliska@suse.cz>
3813         * doc/extend.texi: Fix typo in documentation
3814         of __builtin_expect_with_probability.
3816 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
3818         PR c++/87721
3819         * input.c (get_substring_ranges_for_loc): Detect if
3820         linemap_resolve_location gives us a NULL map, and reject
3821         this case.
3823 2018-10-29  Iain Buclaw  <ibuclaw@gdcproject.org>
3825         * config.gcc (xstormy16-*-elf): Set tm_d_file.
3827 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
3828             Martin Sebor  <msebor@redhat.com>
3829             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
3831         * doc/ux.texi (Quoting): New subsection, adapted from material at
3832         https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
3833         MartinSebor and ManuelLopezIbanez.
3834         (Fix-it hints): Note that fix-it hints shouldn't be marked for
3835         translation.
3837 2018-10-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
3839         PR middle-end/87469
3840         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
3841         max value.
3843 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
3845         * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
3847 2018-10-29  Paul Koning  <ni1d@arrl.net>
3849         * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
3851 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
3853         * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
3854         _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
3855         _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
3856         _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
3857         _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
3858         _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
3859         _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
3860         _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
3861         Change 'vector' to '__vector'.
3862         * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
3863         _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
3864         _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
3865         _mm_avg_pu16): Likewise.  And, whitespace corrections.
3867 2018-10-29  Richard Biener  <rguenther@suse.de>
3869         PR tree-optimization/87785
3870         * tree-vect-slp.c (vect_gather_slp_loads): Only gather
3871         internal defs.
3873 2018-10-29  Olivier Hainque  <hainque@adacore.com>
3875         * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
3877 2018-10-29  Olivier Hainque  <hainque@adacore.com>
3879         * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
3880         ports configuration macro, defaults to "gnu".
3881         (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
3882         TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
3884 2018-10-29  Olivier Hainque  <hainque@adacore.com>
3886         * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
3888 2018-10-29  Richard Biener  <rguenther@suse.de>
3890         PR tree-optimization/87790
3891         * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
3892         (vect_make_slp_decision): Adjust.
3893         (vect_slp_analyze_bb_1): Likewise.
3894         (vect_detect_hybrid_slp_stmts): Properly union SLP type over
3895         edges.
3897 2018-10-29  Richard Biener  <rguenther@suse.de>
3899         PR tree-optimization/87785
3900         * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
3901         and processing.
3902         (vect_build_slp_tree): Likewise.
3903         (vect_gather_slp_loads): New function.
3904         (vect_analyze_slp_instance): Gather loads separately from the
3905         SLP tree build.
3907 2018-10-29  Martin Liska  <mliska@suse.cz>
3909         * Makefile.in: Make dependency to json.o.
3910         * doc/gcov.texi: Document new JSON format, remove
3911         old intermediate format documentation.
3912         * gcov.c (struct function_info): Come up with m_name and
3913         m_demangled_name.
3914         (function_info::function_info): Initialize it.
3915         (function_info::~function_info): Release it.
3916         (main): Rename flag_intermediate_format to flag_json_format.
3917         (print_usage): Describe --json-format.
3918         (process_args): Set flag_json_format.
3919         (output_intermediate_line): Remove.
3920         (output_intermediate_json_line): Likewise.
3921         (get_gcov_intermediate_filename): Return new extension
3922         ".gcov.json.gz".
3923         (output_intermediate_file): Implement JSON emission.
3924         (output_json_intermediate_file): Implement JSON emission.
3925         (generate_results): Use ::get_name for function name.
3926         Handle JSON output file.
3927         (read_graph_file): Use ::get_name instead of cplus_demangle.
3928         (read_count_file): Likewise.
3929         (solve_flow_graph): Likewise.
3930         (add_line_counts): Likewise.
3931         (accumulate_line_counts): Use new flag_json_format.
3932         (output_function_details): Use ::get_name instead of cplus_demangle.
3933         (output_lines): Likewise.
3934         * json.cc (test_writing_literals): Add new tests.
3935         * json.h (class literal): Add new boolean constructor.
3937 2018-10-29  Segher Boessenkool  <segher@kernel.crashing.org>
3939         PR rtl-optimization/87701
3940         PR rtl-optimization/87780
3941         * combine.c (make_more_copies): Rewrite.
3943 2018-10-28  Kugan Vivekanandarajah  <kuganv@linaro.org>
3945         * doc/generic.texi (ABSU_EXPR): Document.
3946         * match.pd (absu(x)*absu(x) -> x*x): Handle.
3947         (absu(absu(X)) -> absu(X)): Likewise.
3948         (absu(-X) -> absu(X)): Likewise.
3949         (absu(X)  where X is nonnegative -> X): Likewise.
3951 2018-10-28  Iain Buclaw  <ibuclaw@gdcproject.org>
3953         * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
3954         (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
3955         (tm_d.h, cs-tm_d.h, default-d.o): New rules.
3956         (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
3957         (s-tm-texi): Also check timestamp on d-target.def.
3958         (generated_files): Add TM_D_H and d-target-hooks-def.h.
3959         (build/genhooks.o): Also depend on D_TARGET_DEF.
3960         * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
3961         variables.
3962         * config/aarch64/aarch64-d.c: New file.
3963         * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
3964         Define.
3965         * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
3966         prototype.
3967         * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
3968         * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
3969         * config/arm/arm-d.c: New file.
3970         * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
3971         * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
3972         * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3973         * config/arm/t-arm (arm-d.o): New rule.
3974         * config/default-d.c: New file.
3975         * config/glibc-d.c: New file.
3976         * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3977         * config/i386/i386-d.c: New file.
3978         * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
3979         * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
3980         * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3981         (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
3982         * config/i386/t-i386 (i386-d.o): New rule.
3983         * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3984         * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3985         * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
3986         * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3987         * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
3988         * config/mips/mips-d.c: New file.
3989         * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
3990         * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
3991         * config/mips/t-mips (mips-d.o): New rule.
3992         * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3993         * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
3994         * config/powerpcspe/powerpcspe-d.c: New file.
3995         * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
3996         New prototype.
3997         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
3998         Support GNU D by using 0 as the language type.
3999         * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
4000         * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
4001         * config/riscv/riscv-d.c: New file.
4002         * config/riscv/riscv-protos.h (riscv_d_target_versions): New
4003         prototype.
4004         * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
4005         * config/riscv/t-riscv (riscv-d.o): New rule.
4006         * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4007         * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
4008         * config/rs6000/rs6000-d.c: New file.
4009         * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
4010         prototype.
4011         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
4012         Support GNU D by using 0 as the language type.
4013         * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
4014         * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
4015         * config/s390/s390-d.c: New file.
4016         * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
4017         * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
4018         * config/s390/t-s390 (s390-d.o): New rule.
4019         * config/sparc/sparc-d.c: New file.
4020         * config/sparc/sparc-protos.h (sparc_d_target_versions): New
4021         prototype.
4022         * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
4023         * config/sparc/t-sparc (sparc-d.o): New rule.
4024         * config/t-glibc (glibc-d.o): New rule.
4025         * configure: Regenerated.
4026         * configure.ac (tm_d_file): New variable.
4027         (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
4028         * doc/contrib.texi (Contributors): Add self for the D frontend.
4029         * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
4030         * doc/install.texi (Configuration): Mention libphobos as an option for
4031         --enable-shared.  Mention d as an option for --enable-languages.
4032         (Testing): Mention check-d as a target.
4033         * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
4034         name suffixes.  Mention d as a -x option.
4035         * doc/sourcebuild.texi (Top Level): Mention libphobos.
4036         * doc/standards.texi (Standards): Add section on D language.
4037         * doc/tm.texi: Regenerated.
4038         * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
4039         TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
4040         * dwarf2out.c (is_dlang): New function.
4041         (gen_compile_unit_die): Use DW_LANG_D for D.
4042         (declare_in_namespace): Return module die for D, instead of adding
4043         extra declarations into the namespace.
4044         (gen_namespace_die): Generate DW_TAG_module for D.
4045         (gen_decl_die): Handle CONST_DECLSs for D.
4046         (dwarf2out_decl): Likewise.
4047         (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
4048         (prune_unused_types_walk): Handle DW_tag_interface_type same as other
4049         kinds of aggregates.
4050         * gcc.c (default_compilers): Add entries for .d, .dd and .di.
4051         * genhooks.c: Include d/d-target.def.
4053 2018-10-28  Iain Sandoe  <iain@sandoe.co.uk>
4055         PR target/85669
4056         * config/rs6000/darwin.h (STACK_BOUNDARY): New.
4057         (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
4058         (STACK_DYNAMIC_OFFSET): Likewise.
4060 2018-10-27  Sandra Loosemore  <sandra@codesourcery.com>
4062         PR target/80024
4063         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
4064         error message.
4066 2018-10-26  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
4068         * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
4069         return type and other typos.
4071 2018-10-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
4073         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
4074         a shorter sequence with fewer branches.
4075         (emit_final_str_compare_gpr): Ditto.
4077 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
4079         * config/rs6000/tmmintrin.h: New file.
4080         * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
4082 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
4084         * config/rs6000/mmintrin.h: Enable 32bit compilation.
4085         * config/rs6000/xmmintrin.h: Likewise.
4087 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
4089         * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
4091 2018-10-26  Richard Biener  <rguenther@suse.de>
4093         * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
4094         and wrapper.
4095         (vect_mark_slp_stmts_relevant): Likewise.
4096         (vect_detect_hybrid_slp_stmts): Likewise.
4097         (vect_bb_slp_scalar_cost): Likewise.
4098         (vect_remove_slp_scalar_calls): Likewise.
4100 2018-10-26  Jan Hubicka  <jh@suse.cz>
4102         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
4103         (warn_types_mismatch): Fix walk of DECL_NAME.
4104         (odr_types_equivalent_p): Fix overactive assert.
4106 2018-10-26  Richard Biener  <rguenther@suse.de>
4108         PR tree-optimization/87105
4109         * tree-vectorizer.h (_slp_tree::refcnt): New member.
4110         * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
4111         refcnt.
4112         (vect_create_new_slp_node): Initialize refcnt to one.
4113         (bst_traits): Move.
4114         (scalar_stmts_set_t, bst_fail): Remove.
4115         (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
4116         (vect_build_slp_tree): Add bst_map argument and lookup
4117         already created SLP nodes.
4118         (vect_print_slp_tree): Handle a SLP graph, print SLP node
4119         addresses.
4120         (vect_slp_rearrange_stmts): Handle a SLP graph.
4121         (vect_analyze_slp_instance): Adjust and free SLP nodes from
4122         the CSE map.  Fix indenting.
4123         (vect_schedule_slp_instance): Add short-cut.
4125 2018-10-26  Martin Liska  <mliska@suse.cz>
4127         PR testsuite/86158
4128         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
4129         addr_expr and not with pointers.
4131 2018-10-26  Jan Hubicka  <jh@suse.cz>
4133         * tree.c (free_lang_data_in_type): Only check main variants.
4134         * ipa-devirt.c (warn_odr): Make static.
4135         (types_same_for_odr): Drop strict variant.
4136         (types_odr_comparable): Likewise.
4137         (odr_or_derived_type_p): Look for main variants.
4138         (odr_name_hasher::equal): Cleanup comment.
4139         (odr_subtypes_equivalent): Add warn and warned arguments; check main
4140         variants.
4141         (type_variants_equivalent_p): break out from ...
4142         (odr_types_equivalent): ... here; go for main variants where needed.
4143         (warn_odr): ... here; turn static.
4144         (warn_types_mismatch): Compare mangled names of main variants.
4145         * ipa-utils.h (types_odr_comparable): Drop strict parameter.
4146         (type_with_linkage_p): Sanity check that we look at main variant.
4147         * lto.c (lto_read_decls): Only consider main variant to be ODR type.
4148         * tree.h (types_same_for_odr): Drop strict argument.
4150 2018-10-26  Richard Biener  <rguenther@suse.de>
4152         PR tree-optimization/87746
4153         * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
4154         Simplify and fix WRT strided store groups with size not
4155         equal to step in element count.
4156         (vect_analyze_group_access_1): Dump the whole group.
4158 2018-10-25  Carl Love  <cel@us.ibm.com>
4160         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
4161         P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
4162         P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name.  Add quad
4163         precicion entry for each overloaded builtin.
4164         * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
4165         VSCEDPUO): Rename overloaded name.
4166         (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
4167         VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
4168         * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
4169         define_expand for xscmpexqp instruction.
4170         (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
4172 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
4173             Jinsong Ji <jji@us.ibm.com>
4175         * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
4176         function with vec_sl.
4177         (_mm_slli_epi32): Likewise.
4178         (_mm_slli_epi64): Likewise.
4179         (_mm_srai_epi16): Replace deprecated function with vec_sra.
4180         (_mm_srai_epi32): Likewise.
4181         (_mm_srli_epi16): Replace deprecated function with vec_sr.
4182         (_mm_srli_epi32): Likewise.
4183         (_mm_srli_epi64): Likewise.
4184         (_mm_sll_epi16): Replace deprecated function with vec_sl.
4185         (_mm_sll_epi32): Likewise.
4186         (_mm_sll_epi64): Likewise.
4187         (_mm_sra_epi16): Replace deprecated function with vec_sra.
4188         (_mm_sra_epi32): Likewise.
4189         (_mm_srl_epi16): Replace deprecated function with vec_sr.
4190         (_mm_srl_epi32): Likewise.
4191         (_mm_srl_epi64): Likewise.
4193 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
4194             Jinsong Ji <jji@us.ibm.com>
4196         * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
4197         comparison operators with vec_cmp* for compatibility due to
4198         unfortunate history; clean up formatting and use types more
4199         appropriately.
4200         (_mm_sll_epi32): Likewise.
4201         (_mm_sll_epi64): Likewise.
4202         (_mm_srl_epi16): Likewise.
4203         (_mm_srl_epi32): Likewise.
4204         (_mm_srl_epi64): Likewise.
4206 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
4207             Jinsong Ji <jji@us.ibm.com>
4209         * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
4210         * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
4211         __vector __bool int.  Use vec_cmpgt in preference to deprecated
4212         function vec_vcmpgtfp.
4213         (_mm_max_ps): Likewise.
4215 2018-10-25  Jeff Law  <law@redhat.com>
4217         * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
4218         if returning false.
4220 2018-10-25  Martin Sebor  <msebor@redhat.com>
4222         * doc/extend.texi (aligned): Expand attribute description.
4223         (Alignment): Rename section.  Discuss function arguments.
4225 2018-10-25  Jan Hubicka  <jh@suse.cz>
4227         * ipa-devirt.c (main_odr_variant): Remove.
4228         (hash_odr_name, types_same_for_odr, types_odr_comparable,
4229         odr_name_hasher::equal, odr_subtypes_equivalent_p):
4230         Drop use of main_odr_variant.
4231         (add_type_duplicate): Silence confused warnings on integer types.
4232         (get_odr_type): Always look for main variant.
4233         (register_odr_type): Simplify.
4235 2018-10-25  Richard Biener  <rguenther@suse.de>
4237         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
4238         Initialize ng to silence error with release checking bootstrap.
4240 2018-10-25  Richard Biener  <rguenther@suse.de>
4242         * tree-if-conv.c: Include tree-ssa-sccvn.h.
4243         (tree_if_conversion): Run CSE on the if-converted loop body.
4245 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
4247         * config/s390/constraints.md (ZL): New constraint.
4248         * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
4249         operands.
4250         * config/s390/s390.md (movdi_larl): Remove.
4251         (movdi_64): Add the LARL alternative.
4253 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
4255         PR bootstrap/87747
4256         * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
4257         (RTX_CODE_HWINT_P): New macro.
4258         (rtx_code_size): Use RTX_CODE_HWINT_P ().
4260 2018-10-25  Jan Hubicka  <jh@suse.cz>
4262         * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
4263         is anonymous.
4265 2018-10-25  Richard Biener  <rguenther@suse.de>
4267         PR tree-optimization/87665
4268         PR tree-optimization/87745
4269         * tree-vectorizer.h (get_earlier_stmt): Remove.
4270         (get_later_stmt): Pick up UID from the original non-pattern stmt.
4272 2018-10-25  Sam Tebbs  <sam.tebbs@arm.com>
4274         * options.texi (Deprecated): Move list to Var section.
4276 2018-10-24  Bill Schmidt  <wschmidt@linux.ibm.com>
4277             Jinsong Ji <jji@us.ibm.com>
4279         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
4280         __vector long to __vector long long.
4281         (_mm_cvtpd_ps): Likewise.
4282         (_mm_cvttpd_epi32): Likewise.
4283         (_mm_cvtpi32_pd): Likewise.
4284         (_mm_unpackhi_epi64): Likewise.
4285         (_mm_unpacklo_epi64): Likewise.
4287 2018-10-24  Segher Boessenkool  <segher@kernel.crashing.org>
4289         PR rtl-optimization/87720
4290         * combine.c (make_more_copies): Skip if the dest is pc_rtx.
4292 2018-10-24  Alexandre Oliva <aoliva@redhat.com>
4294         * gimple-ssa-isolate-paths.c
4295         (find_implicit_erroneous_behavior): Do not change code if the
4296         pass is running for warnings only.
4297         (find_explicit_erroneous_behavior): Likewise.
4299 2018-10-24  Michael Meissner  <meissner@linux.ibm.com>
4301         * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
4302         Define as rs6000_mangle_decl_assembler_name.
4303         (rs6000_mangle_decl_assembler_name): If the user switched from IBM
4304         long double to IEEE long double, switch the names of the long
4305         double built-in functions to be <func>f128 instead of <func>l.
4307 2018-10-24  Martin Sebor  <msebor@redhat.com>
4309         * doc/extend.texi (nonnull): List no-argument form.  Reference
4310         -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
4312 2018-10-24  Richard Biener  <rguenther@suse.de>
4314         * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
4316 2018-10-24  Martin Liska  <mliska@suse.cz>
4318         PR tree-optimization/84436
4319         * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
4320         Remove.
4321         (switch_conversion::contains_linear_function_p): New.
4322         (switch_conversion::build_one_array): Support linear
4323         transformation on input.
4324         * tree-switch-conversion.h (struct switch_conversion): Add
4325         contains_linear_function_p declaration.
4327 2018-10-24  Richard Biener  <rguenther@suse.de>
4329         * varasm.c (const_hash_1): Return hash of ADDR_EXPR
4330         if its argument is CONSTANT_CLASS_P.
4332 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
4334         * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
4335         it is wrong for forward declarations.
4337 2018-10-24  Ilya Leoshkevich  <iii@linux.ibm.com>
4339         * config/s390/s390.c (s390_check_qrst_address): Add the missing
4340         SYMBOL_REF_P () check.
4342 2018-10-24  Richard Biener  <rguenther@suse.de>
4344         PR tree-optimization/87105
4345         * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
4346         dump classification.
4347         (vect_analyze_data_ref_accesses): Handle duplicate loads and
4348         stores by splitting the affected group after the fact.
4349         * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
4350         fail the SLP build because of size constraints.
4352 2018-10-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4354         * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
4355         * configure: Regenerate.
4356         * config.in: Regenerate.
4357         * varasm.c (mergeable_string_section): Use readonly_data_section
4358         if linker doesn't support SHF_MERGE with alignment > 8.
4359         (mergeable_constant_section): Likewise.
4361 2018-10-24  Richard Biener  <rguenther@suse.de>
4363         PR tree-optimization/84013
4364         * tree-ssa-structalias.c (struct msdi_data): New struct for
4365         marshalling data to walk_stmt_load_store_ops.
4366         (maybe_set_dependence_info): Refactor as callback for
4367         walk_stmt_load_store_ops.
4368         (compute_dependence_clique): Set restrict info on all stmt kinds.
4370 2018-10-24  Martin Liska  <mliska@suse.cz>
4372         * cgraph.c (cgraph_node::dump):
4373         Remove reduntant dumps and make tp_first_run dump more compact.
4375 2018-10-24  Richard Biener  <rguenther@suse.de>
4377         PR tree-optimization/87665
4378         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
4379         to reflect reality.
4381 2018-10-12  Jeff Law  <law@redhat.com>
4383         * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
4384         for H8/S.
4386 2018-10-23  Richard Biener  <rguenther@suse.de>
4388         * tree-vrp.c (add_assert_info): Guard dump_printf with
4389         dump_enabled_p.
4390         * gimple-ssa-evrp-analyze.c
4391         (evrp_range_analyzer::record_ranges_from_incoming_edge):
4392         Use value_range::ignore_equivs_equal_p.
4394 2018-10-23  Richard Biener  <rguenther@suse.de>
4396         PR tree-optimization/87105
4397         PR tree-optimization/87608
4398         * passes.def (pass_all_early_optimizations): Add early phi-opt
4399         after dce.
4400         * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
4401         addition to debug stmts.
4402         (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
4403         and abs replacement early.
4404         * tree-cfg.c (gimple_empty_block_p): Likewise.
4406 2018-10-23  Richard Earnshaw  <rearnsha@arm.com>
4408         PR target/86383
4409         * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
4410         specified to configure.
4411         (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
4413 2018-10-23  Richard Biener  <rguenther@suse.de>
4415         PR tree-optimization/87700
4416         * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
4418 2018-10-23  Jakub Jelinek  <jakub@redhat.com>
4420         PR target/87674
4421         * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
4422         second argument from __mmask16 to __mmask8.
4423         * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
4424         _mm_mask_packs_epi32): Likewise.
4425         * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
4426         Likewise.
4427         (_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.
4429 2018-10-23  Richard Biener  <rguenther@suse.de>
4431         * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
4433 2018-10-23  Richard Biener  <rguenther@suse.de>
4435         PR tree-optimization/86144
4436         * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
4437         over simd attribute.
4439 2018-10-23  Richard Biener  <rguenther@suse.de>
4441         PR tree-optimization/87693
4442         * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
4443         the case we do not find the taken edge.
4445 2018-10-22  Bill Schmidt  <wschmidt@linux.ibm.com>
4446             Jinsong Ji  <jji@us.ibm.com>
4448         * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
4449         (_mm_store_pd): Use unaligned vector type for pointer cast.
4450         (_mm_maskmoveu_si128): Likewise.
4451         * config/rs6000/xmmintrin.h (__m128_u): New typedef.
4452         (_mm_store_ps): Use unaligned vector type for pointer cast.
4454 2018-10-22  Paul Koning  <ni1d@arrl.net>
4456         * symtab.c (symtab_node::increase_alignment): Correct max
4457         alignment check.
4459 2018-10-22  Yury Gribov  <tetra2005@gmail.com>
4461         PR tree-optimization/87633
4462         * match.pd: Do not generate unordered integer comparisons.
4464 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
4466         PR rtl-optimization/87600
4467         * combine.c: Add include of expr.h.
4468         (cant_combine_insn_p): Do not combine moves from any hard non-fixed
4469         register to a pseudo.
4470         (make_more_copies): New function, add a copy to a new pseudo after
4471         the moves from hard registers into pseudos.
4472         (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
4473         later.  Call make_more_copies.
4475 2018-10-22  Andrew Stubbs  <ams@codesourcery.com>
4477         * lra-constraints.c (process_alt_operands): New local array,
4478         matching_early_clobber.  Check matching_early_clobber before
4479         decrementing reject, and set matching_early_clobber after.
4481 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
4483         PR target/87598
4484         * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
4485         call output_addr_const and hope for the best.
4487 2018-10-22  Richard Biener  <rguenther@suse.de>
4489         * gimple-ssa-evrp-analyze.c
4490         (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
4491         smarter about what ranges to use.
4492         * tree-vrp.c (add_assert_info): Dump here.
4493         (register_edge_assert_for_2): Instead of here at multiple but
4494         not all places.
4496         * gcc.dg/tree-ssa/evrp12.c: New testcase.
4497         * gcc.dg/predict-6.c: Adjust.
4498         * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
4499         * gcc.dg/tree-ssa/vrp02.c: Likewise.
4500         * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
4502 2018-10-22  Steven Bosscher <steven@gcc.gnu.org>
4503         Richard Biener  <rguenther@suse.de>
4505         * bitmap.h: Update data structure documentation, including a
4506         description of bitmap views as either linked-lists or splay trees.
4507         (struct bitmap_element_def): Update comments for splay tree bitmaps.
4508         (struct bitmap_head_def): Likewise.
4509         (bitmap_list_view, bitmap_tree_view): New prototypes.
4510         (bitmap_initialize_stat): Initialize a bitmap_head's indx and
4511         tree_form fields.
4512         (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
4513         (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
4514         * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
4515         released bitmap element here.
4516         (bitmap_element_free): Remove.
4517         (bitmap_elt_clear_from): Work on splay tree bitmaps.
4518         (bitmap_list_link_element): Renamed from bitmap_element_link.  Move
4519         this function similar ones such that linked-list bitmap implementation
4520         functions are grouped.
4521         (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
4522         and moved for grouping.
4523         (bitmap_list_insert_element_after): Renamed from
4524         bitmap_elt_insert_after, and moved for grouping.
4525         (bitmap_list_find_element): New function spliced from bitmap_find_bit.
4526         (bitmap_tree_link_left, bitmap_tree_link_right,
4527         bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
4528         bitmap_tree_link_element, bitmap_tree_unlink_element,
4529         bitmap_tree_find_element): New functions for splay-tree bitmap
4530         implementation.
4531         (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
4532         Renamed and moved, see above entries.
4533         (bitmap_tree_listify_from): New function to convert part of a splay
4534         tree bitmap to a linked-list bitmap.
4535         (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
4536         (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
4537         (bitmap_find_bit): Remove.
4538         (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
4539         bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
4540         Handle splay tree bitmaps.
4541         (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
4542         bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
4543         bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
4544         bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
4545         bitmap_intersect_compl_p, bitmap_ior_and_compl,
4546         bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
4547         bitmap_hash): Reject trying to act on splay tree bitmaps.  Make
4548         corresponding changes to use linked-list specific bitmap_element
4549         manipulation functions as applicable for efficiency.
4550         (bitmap_tree_to_vec): New function.
4551         (debug_bitmap_elt_file): New function split out from ...
4552         (debug_bitmap_file): ... here.  Handle splay tree bitmaps.
4553         (bitmap_print): Likewise.
4555         PR tree-optimization/63155
4556         * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
4557         SSA edge worklists.
4558         * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
4559         in tree-view.
4561 2018-10-22  Martin Liska  <mliska@suse.cz>
4563         PR tree-optimization/87686
4564         Revert
4565         2018-08-29  Martin Liska  <mliska@suse.cz>
4567         * tree-switch-conversion.c (switch_conversion::expand):
4568         Strenghten assumption about gswitch statements.
4570 2018-10-22  Martin Liska  <mliska@suse.cz>
4572         * ipa-icf.c (sem_item::compare_attributes): Remove.
4573         (sem_item::compare_referenced_symbol_properties): Use
4574         attribute_list_equal instead.
4575         (sem_function::equals_wpa): Likewise.
4576         * ipa-icf.h: Remove compare_attributes.
4578 2018-10-22  Richard Biener  <rguenther@suse.de>
4580         PR middle-end/87682
4581         * mem-stats.h (mem_usage::operator==): Fix pasto.
4583 2018-10-22  Richard Biener  <rguenther@suse.de>
4585         PR tree-optimization/87640
4586         * tree-vrp.c (set_value_range_with_overflow): Decompose
4587         incomplete result.
4588         (extract_range_from_binary_expr_1): Adjust.
4590 2018-10-22  Martin Jambor  <mjambor@suse.cz>
4592         * tree-eh.h (stmt_could_throw_p): Add function parameter.
4593         (stmt_can_throw_external): Likewise.
4594         (stmt_can_throw_internal): Likewise.
4595         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
4596         (lower_eh_constructs_2): Likewise.
4597         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
4598         (stmt_can_throw_external): Likewise.
4599         (stmt_can_throw_internal): Likewise.
4600         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
4601         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
4602         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
4603         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
4604         (pass_lower_eh_dispatch::execute): Pass cfun to
4605         stmt_can_throw_external.
4606         (cleanup_empty_eh): Likewise.
4607         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
4608         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
4609         stmt_can_throw_external instead of pushing it to cfun.
4610         (symbol_table::create_edge): Likewise.
4611         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
4612         stmt_can_throw_internal.
4613         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
4614         to stmt_could_throw_p.
4615         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
4616         stmt_can_throw_internal.
4617         (pass_store_merging::execute): Likewise.
4618         * gimple-ssa-strength-reduction.c
4619         (find_candidates_dom_walker::before_dom_children): Pass cfun to
4620         stmt_could_throw_p.
4621         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
4622         stmt_can_throw_internal.
4623         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
4624         to stmt_can_throw_external.
4625         (check_stmt): Pass cfun to stmt_could_throw_p.
4626         (check_stmt): Pass cfun to stmt_can_throw_external.
4627         (pass_nothrow::execute): Likewise.
4628         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
4629         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
4630         stmt_can_throw_internal.
4631         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
4632         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
4633         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
4634         * tree-complex.c (expand_complex_libcall): Pass cfun to
4635         stmt_could_throw_p and to stmt_can_throw_internal.
4636         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
4637         * tree-inline.c (copy_edges_for_bb): Likewise.
4638         (maybe_move_debug_stmts_to_successors): Likewise.
4639         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
4640         stmt_could_throw_p.
4641         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
4642         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
4643         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
4644         stmt_can_throw_internal.
4645         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
4646         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
4647         stmt_could_throw_p.
4648         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
4649         stmt_can_throw_internal.
4650         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
4651         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
4652         stmt_could_throw_p.
4653         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
4654         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
4655         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
4656         (convert_mult_to_fma_1): Likewise.
4657         (convert_to_divmod): Likewise.
4658         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
4659         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
4660         * tree-ssa-propagate.c
4661         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
4662         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
4663         (maybe_optimize_range_tests): Likewise.
4664         (linearize_expr_tree): Likewise.
4665         (reassociate_bb): Likewise.
4666         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
4667         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
4668         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
4669         (handle_char_store): Likewise.
4670         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
4671         stmt_can_throw_internal.
4672         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
4673         stmt_could_throw_p.
4674         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
4675         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
4676         (vectorizable_simd_clone_call): Likewise.
4677         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
4678         (gimple_stringop_fixed_value): Likewise.
4680 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
4682         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
4683         literal pool references.
4684         (s390_check_qrst_address): Adapt to the new behavior of
4685         s390_loadrelative_operand_p ().
4687 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
4689         PR target/72782
4690         * config/i386/sse.md (*andnot<mode>3_bcst): New.
4692 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
4694         PR target/72782
4695         * config/i386/sse.md (*<code><mode>3_bcst): New.
4697 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
4699         PR target/72782
4700         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
4701         V4DI, V16SI and V8DI.
4702         (*sub<mode>3<mask_name>_bcst): New.
4703         (*add<mode>3<mask_name>_bcst): Likewise.
4705 2018-10-21  Bill Schmidt  <wschmidt@linux.ibm.com>
4706             Jinsong Ji  <jji@us.ibm.com>
4708         * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
4709         __m64 with __vector unsigned long long for compatibility.
4710         (_mm_movemask_epi8): Likewise.
4711         * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
4712         (_mm_cvttps_pi32): Likewise.
4713         (_mm_cvtpi32_ps): Likewise.
4714         (_mm_cvtps_pi16): Likewise.
4715         (_mm_loadh_pi): Likewise.
4716         (_mm_storeh_pi): Likewise.
4717         (_mm_movehl_ps): Likewise.
4718         (_mm_movelh_ps): Likewise.
4719         (_mm_loadl_pi): Likewise.
4720         (_mm_storel_pi): Likewise.
4721         (_mm_movemask_ps): Likewise.
4722         (_mm_shuffle_pi16): Likewise.
4724 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
4726         PR target/72782
4727         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
4728         __builtin_ia32_vfnmsubpd512_mask.
4729         (_mm512_mask_fnmsub_round_pd): Likewise.
4730         (_mm512_fnmsub_pd): Likewise.
4731         (_mm512_mask_fnmsub_pd): Likewise.
4732         (_mm512_maskz_fnmsub_round_pd): Use
4733         __builtin_ia32_vfnmsubpd512_maskz.
4734         (_mm512_maskz_fnmsub_pd): Likewise.
4735         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
4736         (_mm512_mask_fnmsub_round_ps): Likewise.
4737         (_mm512_fnmsub_ps): Likewise.
4738         (_mm512_mask_fnmsub_ps): Likewise.
4739         (_mm512_maskz_fnmsub_round_ps): Use
4740         __builtin_ia32_vfnmsubps512_maskz.
4741         (_mm512_maskz_fnmsub_ps): Likewise.
4742         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
4743         __builtin_ia32_vfnmsubpd256_mask.
4744         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
4745         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
4746         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
4747         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
4748         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
4749         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
4750         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
4751         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
4752         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
4753         __builtin_ia32_vfnmsubpd.
4754         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
4755         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
4756         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
4757         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
4758         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
4759         * config/i386/i386-builtin.def: Add
4760         __builtin_ia32_vfnmsubpd256_mask,
4761         __builtin_ia32_vfnmsubpd256_maskz,
4762         __builtin_ia32_vfnmsubpd128_mask,
4763         __builtin_ia32_vfnmsubpd128_maskz,
4764         __builtin_ia32_vfnmsubps256_mask,
4765         __builtin_ia32_vfnmsubps256_maskz,
4766         __builtin_ia32_vfnmsubps128_mask,
4767         __builtin_ia32_vfnmsubps128_maskz,
4768         __builtin_ia32_vfnmsubpd512_mask,
4769         __builtin_ia32_vfnmsubpd512_maskz,
4770         __builtin_ia32_vfnmsubps512_mask,
4771         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
4772         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
4773         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
4774         __builtin_ia32_vfnmsubpd256.
4775         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
4776         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
4777         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
4778         Likewise.
4779         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
4780         Likewise.
4781         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
4782         Likewise.
4783         (fmai_vmfnmsub_<mode><round_name>): Likewise.
4785 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
4787         PR target/72782
4788         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
4789         __builtin_ia32_vfnmaddpd512_mask.
4790         (_mm512_mask_fnmadd_round_pd): Likewise.
4791         (_mm512_fnmadd_pd): Likewise.
4792         (_mm512_mask_fnmadd_pd): Likewise.
4793         (_mm512_maskz_fnmadd_round_pd): Use
4794         __builtin_ia32_vfnmaddpd512_maskz.
4795         (_mm512_maskz_fnmadd_pd): Likewise.
4796         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
4797         (_mm512_mask_fnmadd_round_ps): Likewise.
4798         (_mm512_fnmadd_ps): Likewise.
4799         (_mm512_mask_fnmadd_ps): Likewise.
4800         (_mm512_maskz_fnmadd_round_ps): Use
4801         __builtin_ia32_vfnmaddps512_maskz.
4802         (_mm512_maskz_fnmadd_ps): Likewise.
4803         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
4804         __builtin_ia32_vfnmaddpd256_mask.
4805         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
4806         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
4807         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
4808         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
4809         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
4810         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
4811         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
4812         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
4813         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
4814         __builtin_ia32_vfnmaddpd.
4815         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
4816         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
4817         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
4818         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
4819         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
4820         * config/i386/i386-builtin.def: Add
4821         __builtin_ia32_vfnmaddpd256_mask,
4822         __builtin_ia32_vfnmaddpd256_maskz,
4823         __builtin_ia32_vfnmaddpd128_mask,
4824         __builtin_ia32_vfnmaddpd128_maskz,
4825         __builtin_ia32_vfnmaddps256_mask,
4826         __builtin_ia32_vfnmaddps256_maskz,
4827         __builtin_ia32_vfnmaddps128_mask,
4828         __builtin_ia32_vfnmaddps128_maskz,
4829         __builtin_ia32_vfnmaddpd512_mask,
4830         __builtin_ia32_vfnmaddpd512_maskz,
4831         __builtin_ia32_vfnmaddps512_mask,
4832         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
4833         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
4834         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
4835         __builtin_ia32_vfnmaddpd256.
4836         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
4837         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
4838         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
4839         Likewise.
4840         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
4841         Likewise.
4842         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
4843         Likewise.
4844         (fmai_vmfnmadd_<mode><round_name>): Likewise.
4846 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
4848         PR target/72782
4849         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
4850         __builtin_ia32_vfmsubpd512_mask.
4851         (_mm512_mask_fmsub_round_pd): Likewise.
4852         (_mm512_fmsub_pd): Likewise.
4853         (_mm512_mask_fmsub_pd): Likewise.
4854         (_mm512_maskz_fmsub_round_pd): Use
4855         __builtin_ia32_vfmsubpd512_maskz.
4856         (_mm512_maskz_fmsub_pd): Likewise.
4857         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
4858         (_mm512_mask_fmsub_round_ps): Likewise.
4859         (_mm512_fmsub_ps): Likewise.
4860         (_mm512_mask_fmsub_ps): Likewise.
4861         (_mm512_maskz_fmsub_round_ps): Use
4862         __builtin_ia32_vfmsubps512_maskz.
4863         (_mm512_maskz_fmsub_ps): Likewise.
4864         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
4865         __builtin_ia32_vfmsubpd256_mask.
4866         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
4867         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
4868         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
4869         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
4870         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
4871         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
4872         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
4873         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
4874         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
4875         __builtin_ia32_vfmsubpd.
4876         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
4877         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
4878         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
4879         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
4880         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
4881         * config/i386/i386-builtin.def: Add
4882         __builtin_ia32_vfmsubpd256_mask,
4883         __builtin_ia32_vfmsubpd256_maskz,
4884         __builtin_ia32_vfmsubpd128_mask,
4885         __builtin_ia32_vfmsubpd128_maskz,
4886         __builtin_ia32_vfmsubps256_mask,
4887         __builtin_ia32_vfmsubps256_maskz,
4888         __builtin_ia32_vfmsubps128_mask,
4889         __builtin_ia32_vfmsubps128_maskz,
4890         __builtin_ia32_vfmsubpd512_mask,
4891         __builtin_ia32_vfmsubpd512_maskz,
4892         __builtin_ia32_vfmsubps512_mask,
4893         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
4894         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
4895         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
4896         __builtin_ia32_vfmsubpd256.
4897         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
4898         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
4899         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
4900         Likewise.
4901         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
4902         Likewise.
4903         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
4904         Likewise.
4905         (fmai_vmfmsub_<mode><round_name>): Likewise.
4907 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
4909         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
4910         Remove plus.  Renamed to ...
4911         (*sub<mode>3<mask_name>_bcst): This.
4912         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
4913         (*add<mode>3<mask_name>_bcst): This.
4915 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
4917         PR target/72782
4918         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
4920 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
4922         PR target/87662
4923         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
4924         (_mm_or_epi32): Likewise.
4925         (_mm256_xor_epi32): Likewise.
4926         (_mm_xor_epi32): Likewise.
4927         (_mm256_or_epi64): Likewise.
4928         (_mm_or_epi64): Likewise.
4929         (_mm256_xor_epi64): Likewise.
4930         (_mm_xor_epi64): Likewise.
4932 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
4934         PR target/72782
4935         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
4937 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
4939         PR middle-end/87647
4940         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
4942 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
4944         * doc/ux.texi: Move @section directly after @node.
4946 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
4948         PR middle-end/85488
4949         PR middle-end/87649
4950         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
4951         depend closely nested inside of loop with ordered clause with
4952         a parameter.
4954 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
4956         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
4957         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
4958         * doc/ux.texi: New file.
4960 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
4962         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
4963         be the first CR field allocated.
4965 2018-10-19  Richard Biener  <rguenther@suse.de>
4967         PR target/87657
4968         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
4969         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
4971 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
4973         PR target/72782
4974         * config/i386/sse.md
4975         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
4976         (*add<mode>3<mask_name>_bcst_2): Likewise.
4978 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
4980         * config/i386/sse.md
4981         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
4982         Replace nonimmediate_operand with register_operand.
4983         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
4984         Likewise.
4985         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
4986         Likewise.
4988 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
4990         PR rtl-optimization/87596
4991         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
4992         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
4993         for instructions in FROM..TO range.
4995 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
4997         * cfgexpand.c (expand_one_var): Use specific wording in error message
4998         for non-local frame variables.
4999         * stor-layout.c (layout_decl): Do not issue a warning for them.
5001 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
5003         * haifa-sched.c (priority): Add force_recompute parameter.
5004         (apply_replacement): Call priority () with force_recompute = true.
5005         (restore_pattern): Likewise.
5007 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
5009         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
5010         HOST_BITS_PER_WIDE_INT.
5011         (test_vector_ops_duplicate): Likewise.
5013 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
5015         PR target/72782
5016         * config/i386/sse.md (VF_AVX512): New.
5017         (avx512bcst): Likewise.
5018         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
5019         Likewise.
5020         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
5021         Likewise.
5022         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
5023         Likewise.
5025 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
5027         * doc/invoke.texi (-dumpversion): Improve grammar.
5028         (-dumpfullversion): Make more consistent with -dumpversion.
5030 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
5032         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
5033         Set JUMP_LABEL to the jump insn.
5034         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
5035         Predict emitted jump and add label to jump insn.
5037 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
5039         PR tree-optimization/87562
5040         * input.c (get_substring_ranges_for_loc): Use
5041         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
5042         getting the linemap for the endpoint.  Verify that it's either
5043         in the same linemap as the start point's spelling location, or
5044         at least in the same file.
5046 2018-10-18  Richard Biener  <rguenther@suse.de>
5048         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
5049         feed width-specific load/store costs through ix86_vec_cost.
5050         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
5051         (k8_cost): Likewise.
5052         (bdver_cost): Likewise.
5053         (znver1_cost): Likewise.
5054         (btver1_cost): Likewise.
5055         (btver2_cost): Likewise.
5057 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
5059         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
5060         to simplify subreg of vec_merge.
5062 2018-10-18  Richard Biener  <rguenther@suse.de>
5064         * config/i386/i386.c: Fix costing of vector FMA.
5066 2018-10-18  Richard Biener  <rguenther@suse.de>
5068         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
5069         and argument.
5070         (ix86_builtin_vectorization_cost): For vec_construct properly
5071         cost insertion into SSE regs.
5072         (...): Adjust calls to ix86_vec_cost.
5074 2018-10-18  Richard Biener  <rguenther@suse.de>
5076         PR middle-end/87087
5077         Revert
5078         2018-02-07  Richard Biener  <rguenther@suse.de>
5080         PR tree-optimization/84204
5081         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
5082         this place.
5084 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
5086         PR target/87537
5087         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
5088         of vec_duplicate.
5089         (test_vector_ops_duplicate): Add test for a scalar subreg of a
5090         VEC_MERGE of a VEC_DUPLICATE.
5092 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
5094         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
5095         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
5096         * doc/standards.texi (C Language): Document C2X.
5097         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
5098         (rl78_option_override): Handle "GNU C2X" language name.
5100 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
5102         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
5103         Document C17 as published in 2018.
5105 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
5107         PR middle-end/87623
5108         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
5109         bail out if both sides do not have the same storage order.
5111 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
5113         * bitmap.c (bitmap_head::dump): New.
5114         * bitmap.h (bitmap_head): Add dump().
5115         * gimple-ssa-evrp-analyze.c
5116         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
5117         (evrp_range_analyzer::set_ssa_range_info): Same.
5118         (evrp_range_analyzer::record_ranges_from_phis): Same.
5119         (evrp_range_analyzer::record_ranges_from_stmt): Same.
5120         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
5121         * gimple-ssa-sprintf.c (get_int_range): Same.
5122         (format_integer): Same.
5123         (sprintf_dom_walker::handle_gimple_call): Same.
5124         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
5125         (ipcp_vr_lattice::top_p): Same.
5126         (ipcp_vr_lattice::bottom_p): Same.
5127         (ipcp_vr_lattice::set_to_bottom): Same.
5128         (ipa_vr_operation_and_type_effects): Same.
5129         (propagate_vr_across_jump_function): Same.
5130         (ipcp_store_vr_results): Same.
5131         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
5132         (ipa_print_node_jump_functions_for_edge): Same.
5133         (ipa_get_value_range): Same.
5134         (ipa_compute_jump_functions_for_edge): Same.
5135         (ipa_write_jump_function): Same.
5136         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
5137         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
5138         Same.
5139         * vr-values.c (set_value_range_to_nonnegative): Same.
5140         (set_value_range_to_truthvalue): Same.
5141         (vr_values::get_value_range): Same.
5142         (vr_values::set_defs_to_varying): Same.
5143         (vr_values::update_value_range): Same.
5144         (symbolic_range_based_on_p): Same.
5145         (vr_values::op_with_boolean_value_range_p): Same.
5146         (vr_values::extract_range_for_var_from_comparison_expr): Same.
5147         (vr_values::extract_range_from_ssa_name): Same.
5148         (vr_values::extract_range_from_binary_expr): Same.
5149         (vr_values::extract_range_from_unary_expr): Same.
5150         (vr_values::extract_range_from_cond_expr): Same.
5151         (vr_values::extract_range_from_comparison): Same.
5152         (vr_values::check_for_binary_op_overflow): Same.
5153         (vr_values::extract_range_basic): Same.
5154         (vr_values::extract_range_from_assignment): Same.
5155         (compare_ranges): Same.
5156         (compare_range_with_value): Same.
5157         (vr_values::adjust_range_with_scev): Same.
5158         (vrp_valueize): Same.
5159         (vrp_valueize_1): Same.
5160         (vr_values::get_vr_for_comparison): Same.
5161         (vr_values::compare_name_with_value): Same.
5162         (vr_values::compare_names): Same.
5163         (vr_values::vrp_evaluate_conditional): Same.
5164         (find_case_label_ranges): Same.
5165         (vr_values::vrp_visit_switch_stmt): Same.
5166         (vr_values::extract_range_from_phi_node): Same.
5167         (vr_values::simplify_div_or_mod_using_ranges): Same.
5168         (vr_values::simplify_bit_ops_using_ranges): Same.
5169         (test_for_singularity): Same.
5170         (range_fits_type_p): Same.
5171         (vr_values::simplify_cond_using_ranges_1): Same.
5172         (vr_values::simplify_switch_using_ranges): Same.
5173         (vr_values::simplify_float_conversion_using_ranges): Same.
5174         (vr_values::two_valued_val_range_p): Same.
5175         (vr_values::add_equivalence): Move to value_range::equiv_add.
5176         * vr-values.h (vr_values::add_equivalence): Remove.
5177         (VR_INITIALIZER): Remove.
5178         * tree-vrp.c (value_range::set): New.
5179         (value_range::equiv_add): New.
5180         (value_range::value_range): New.
5181         (value_range::deep_copy): New.
5182         (value_range::check): New.
5183         (value_range::equal_p): New.
5184         (value_range::ignore_equivs_equal_p): New.
5185         (value_range::operator==): New.
5186         (value_range::operator!=): New.
5187         (value_range::symbolic_p): New.
5188         (value_range::numeric_p): New.
5189         (value_range::set_undefined): New.
5190         (value_range::set_varying): New.
5191         (value_range::may_contain_p): New.
5192         (value_range::equiv_clear): New.
5193         (value_range::singleton_p): New.
5194         (value_range::intersect): New.
5195         (value_range::dump): New.
5196         (value_range::set_and_canonicalize): New.
5197         (set_value_range): Adjust for value_range API.
5198         (set_value_range_to_undefined): Same.
5199         (set_value_range_to_varying): Same.
5200         (set_and_canonicalize_value_range): Same.
5201         (set_value_range_to_nonnull): Same.
5202         (set_value_range_to_null): Same.
5203         (range_is_null): Same.
5204         (range_is_nonnull): Same.
5205         (range_int_cst_p): Same.
5206         (range_int_cst_singleton_p): Same.
5207         (symbolic_range_p): Same.
5208         (range_includes_zero_p): Same.
5209         (value_range_constant_singleton): Same.
5210         (vrp_set_zero_nonzero_bits): Same.
5211         (ranges_from_anti_range): Same.
5212         (extract_range_into_wide_ints): Same.
5213         (extract_range_from_multiplicative_op): Same.
5214         (set_value_range_with_overflow): Same.
5215         (extract_range_from_binary_expr_1): Same.
5216         (extract_range_from_unary_expr): Same.
5217         (dump_value_range): Same.
5218         (debug_value_range): Same.
5219         (vrp_prop::check_array_ref): Same.
5220         (vrp_prop::check_mem_ref): Same.
5221         (vrp_prop::vrp_initialize): Same.
5222         (vrp_prop::visit_stmt): Same.
5223         (intersect_ranges): Same.
5224         (vrp_prop::visit_phi): Same.
5225         (vrp_prop::vrp_finalize): Same.
5226         (determine_value_range_1): Same.
5227         (determine_value_range): Same.
5228         (vrp_intersect_ranges_1): Rename to...
5229         (vrp_intersect_1): this.
5230         (vrp_intersect_ranges): Rename to...
5231         (value_range::intersect_helper): ...this.
5232         (vrp_meet_1): Rename to...
5233         (value_range::union_helper): ...this.
5234         (vrp_meet): Rename to...
5235         (value_range::union_): ...this.
5236         (copy_value_range): Remove.
5237         * tree-vrp.h (struct value_range): Rewrite into a proper class.
5238         (value_range::vrtype): New.
5239         (value_range::type): New.
5240         (value_range::equiv): New.
5241         (value_range::min): New.
5242         (value_range::max): New.
5243         (value_range::varying_p): New.
5244         (value_range::undefined_p): New.
5245         (value_range::null_p): New.
5246         (value_range::equiv_add): New.
5247         (copy_value_range): Remove.
5249 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
5251         * Makefile.in (SELFTEST_TARGETS): New.
5252         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
5253         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
5254         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
5255         c/Make-lang.in.
5256         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
5257         (selftest-c++-gdb, selftest-c++-valgrind): Move to
5258         cp/Make-lang.in.
5259         * configure: Regenerate.
5260         * configure.ac (selftest_languages): New.
5262 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
5264         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
5265         overflow wraps argument.
5266         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
5267         wide_int_range_multiplicative_op.
5268         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
5269         overflow wraps argument.
5270         (wide_int_range_multiplicative_op): Same.
5271         (wide_int_range_lshift): Same.
5272         (wide_int_range_div): Same.
5273         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
5274         (wide_int_range_lshift): Same.
5275         (wide_int_range_div): Same.
5277 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
5279         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
5280         use sign as argument.
5281         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
5282         wide_int_range_shift_undefined_p.
5284 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
5286         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
5287         Rename to...
5288         (@despeculate_copy<ALLI_TI:mode>): ... This.
5289         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
5290         switch statement.
5292 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5294         * config.gcc: Obsolete *-*-solaris2.10*.
5295         * doc/install.texi (Specific, *-*-solaris2*): Document it.
5297 2018-10-12  Jeff Law  <law@redhat.com>
5299         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
5300         reg + sym +- const_int addressing modes.
5302 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
5304         * common.opt (fdiagnostics-minimum-margin-width=): New option.
5305         * diagnostic-show-locus.c (layout::layout): Apply the minimum
5306         margin width.
5307         (layout::start_annotation_line): Only print up to 3 of the
5308         margin character, to avoid touching the left-hand side.
5309         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
5310         minimum margin width, as set by test_diagnostic_context's ctor.
5311         (selftest::test_fixit_insert_containing_newline): Likewise.
5312         (selftest::test_fixit_insert_containing_newline_2): Likewise.
5313         (selftest::test_line_numbers_multiline_range): Clear
5314         dc.min_margin_width.
5315         * diagnostic.c (diagnostic_initialize): Initialize
5316         min_margin_width.
5317         * diagnostic.h (struct diagnostic_context): Add field
5318         "min_margin_width".
5319         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
5320         * opts.c (common_handle_option): Handle
5321         OPT_fdiagnostics_minimum_margin_width_.
5322         * selftest-diagnostic.c
5323         (selftest::test_diagnostic_context::test_diagnostic_context):
5324         Initialize min_margin_width to 6.
5325         * toplev.c (general_init): Initialize global_dc->min_margin_width.
5327 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
5329         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
5330         Fix usage of "error_at_rich_loc" in the comment.
5332 2018-10-15  Renlin Li  <renlin.li@arm.com>
5334         PR target/87563
5335         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
5336         if-conversioned loop when it contains ifn with types not
5337         supported by backend.
5338         * internal-fn.c (expand_direct_optab_fn): Add an assert.
5339         (direct_internal_fn_supported_p): New helper function.
5340         * internal-fn.h (direct_internal_fn_supported_p): Declare.
5342 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
5344         PR target/87572
5345         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
5346         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
5347         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
5349 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
5351         PR tree-optimization/87022
5352         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
5353         bits in dist vector rather than the first one.
5355 2018-10-15  Richard Biener  <rguenther@suse.de>
5357         PR middle-end/87610
5358         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
5359         (visit_loadstore): When a used restrict tag escaped verify that
5360         the points-to solution of "other" pointers do not include
5361         escaped.
5362         (compute_dependence_clique): If a used restrict tag escaped
5363         communicated that down to visit_loadstore.
5365 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
5367         * config/s390/s390.c (s390_expand_vec_init): Force vector element
5368         into reg if it isn't a general operand.
5370 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
5372         PR target/87599
5373         * config/i386/sse.md (*vec_dupv2di): Add register source to
5374         movddup.
5376 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
5378         PR target/87572
5379         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
5380         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
5381         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
5382         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
5384 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
5386         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
5387         (notice_args_size): Set it in the current trace if no insn that can
5388         throw internally has been seen yet.
5389         (connect_traces): When connecting args_size between traces, allow the
5390         incoming values not to match if there is an insn setting it before the
5391         first insn that can throw internally; in that case, force the creation
5392         of a CFI note on this latter insn.
5394 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
5396         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
5397         the base class, because using the injected-class-name was not clearly
5398         specified until DR 176.
5400 2018-10-12  Paul Koning  <ni1d@arrl.net>
5402         * config/pdp11/pdp11.md (doloop_end): New expander.
5403         (doloop_end_insn): renamed from "doloop_end".
5404         (addqi3): New pattern.
5405         (subqi3): New pattern.
5406         * config/pdp11/predicates.md (incdec_operand): New predicate.
5408 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
5410         PR middle-end/81376
5411         * real.c (format_helper::can_represent_integral_type_p): New function
5412         * real.h (format_helper::can_represent_integral_type_p): Ditto.
5413         * match.pd: New pattern.
5415 2018-10-12  Alexandre Oliva <oliva@adacore.com>
5417         * configure.ac: Introduce --enable-large-address-aware
5418         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
5419         * doc/install.texi: Document it.
5420         * configure, config.in: Rebuilt.
5421         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
5422         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
5423         (LINK_SPEC): Insert it.
5424         * config/i386/mingw-w64.h: Likewise.
5426         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
5428 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
5430         PR rtl-optimization/87600
5431         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
5433 2018-10-12  Paul Koning  <ni1d@arrl.net>
5435         * doc/md.texi (doloop_end): Document that the pattern code may
5436         need to check operand mode.
5438 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
5440         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
5441         to zero-extend between int and floating-point registers.
5442         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
5443         ldp into floating-point registers.  Add type and arch attributes.
5444         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
5445         Use f_loads for type attribute.
5447 2018-10-11  Martin Sebor  <msebor@redhat.com>
5449         * doc/extend.texi (attribute packed): Correct typos.
5451 2018-10-11  Martin Sebor  <msebor@redhat.com>
5453         * doc/extend.texi (attribute flatten): Mention interaction with
5454         noinline.
5456 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
5458         PR target/87156
5459         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
5460         Set new_decl virtual flag to zero.
5462 2018-10-11  Martin Sebor  <msebor@redhat.com>
5464         PR middle-end/87593
5465         * doc/extend.texi (attribute format_arg): Discuss using multiple
5466         attributes on a single function.
5468 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
5470         PR tree-optimization/86829
5471         * match.pd (sin (atan (x))): New simplification rules.
5472         (cos (atan (x))): Likewise.
5473         * real.c (build_sinatan_real): New function.
5474         * real.h (build_sinatan_real): Prototype.
5476 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
5478         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
5479         function.
5480         (fold_mergeeo_helper): New helper function.
5481         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
5482         intrinsics.  Correct some whitespace indentation issues.
5484 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
5486         PR target/87511
5487         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
5488         Use HOST_WIDE_INT_1U for shift.
5490 2018-10-11  Doug Rupp  <rupp@adacore.com>
5491             Olivier Hainque  <hainque@adacore.com>
5493         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
5494         Pass --relax to the linker for RTPs.
5495         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
5497 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
5498             Jan Hubicka  <jh@suse.cz>
5499             Martin Jambor  <mjambor@suse.cz>
5501         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
5502         the same elements are repeated rather than printing all of them.
5503         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
5504         "repeated" elements.
5505         * read-rtl-function.c (test_loading_repeat): New function.
5506         (read_rtl_function_c_tests): Call test_loading_repeat.
5507         * rtl-tests.c (test_dumping_repeat): New function.
5508         (rtl_tests_c_tests): Call test_dumping_repeat.
5510 2018-10-11  Richard Biener  <rguenther@suse.de>
5512         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
5513         bdver?_cost): Unify to ...
5514         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
5515         * config/i386/i386.c (processor_cost_table): Adjust.
5517 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
5519         PR middle-end/87574
5520         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
5521         the thunk when expanding to GIMPLE.
5523 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5525         * varasm.c (mergeable_string_section): Don't try to move zero-length
5526         strings to the merge section.
5528 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
5530         PR target/87573
5531         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
5533 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
5535         PR target/87550
5536         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
5537         to special_args set.
5539 2018-10-10  Richard Biener  <rguenther@suse.de>
5541         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
5542         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
5543         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
5544         and recursing and pattern terminating the recursion on SSE
5545         vector width using ix86_expand_reduc.
5546         (reduc_sminmax_scal_<mode>): Split into part reducing to half
5547         width and recursing and SSE2 vector variant doing the final
5548         reduction with ix86_expand_reduc.
5549         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
5550         with terminating the recursion at AVX level, splitting that
5551         to SSE there.
5553 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
5555         * genmatch.c (error_cb): Rename to...
5556         (diagnostic_cb): ...this, converting int params to enums.
5557         (fatal_at): Update for renaming.
5558         (warning_at): Likewise.
5559         (main): Likewise.
5560         * input.c (selftest::ebcdic_execution_charset::apply):
5561         Update for renaming of...
5562         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
5563         to...
5564         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
5565         converting level and reason to enums.
5566         (class selftest::lexer_error_sink): Rename to...
5567         (class selftest::lexer_test_options): ...this, renaming field
5568         "m_errors" to "m_diagnostics".
5569         (selftest::lexer_test_options::apply): Update for renaming of...
5570         (selftest::lexer_test_options::on_error): ...this, renaming to...
5571         (selftest::lexer_test_options::on_diagnostic): ...this
5572         converting level and reason to enums.
5573         (selftest::test_lexer_string_locations_raw_string_unterminated):
5574         Update for renamings.
5575         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
5576         "reason".
5578 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
5580         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
5581         * config/rs6000/pmmintrin.h: New file.
5583 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
5585         PR tree-optimization/86659
5586         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
5588 2018-10-09  Richard Biener  <rguenther@suse.de>
5590         PR tree-optimization/63155
5591         * tree-ssa-structalias.c: Include tree-ssa.h.
5592         (get_constraint_for_ssa_var): For undefs return nothing_id.
5593         (find_func_aliases): Cleanup PHI handling.
5595 2018-10-09  Richard Biener  <rguenther@suse.de>
5597         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
5598         replacements.
5600 2018-10-09  Martin Liska  <mliska@suse.cz>
5602         * asan.c (asan_emit_stack_protection): If a stack variable
5603         is located in a same file as current function, then emit
5604         line info into variable definition string.
5606 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
5608         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
5609         information.
5611 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
5613         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
5614         on the thunk.
5616 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
5618         PR tree-optimization/86659
5619         * gimple-match.h (struct gimple_match_op): Add reverse field.
5620         (gimple_match_op::set_op): New overloaded method.
5621         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
5622         the REF_REVERSE_STORAGE_ORDER flag on the value.
5623         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
5624         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
5626 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
5628         PR middle-end/63155
5629         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
5630         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
5632 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
5634         PR target/87517
5635         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
5636         Defined with __builtin_ia32_vfmaddsubpd512_mask.
5638 2018-10-08  Richard Biener  <rguenther@suse.de>
5640         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
5641         cost the same as AVX128 ones.
5643 2018-10-08  Paul Koning  <ni1d@arrl.net>
5645         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
5646         (expand_block_move): New function.
5647         * config/pdp11/pdp11.c (output_block_move): Remove.
5648         (expand_block_move): New function.
5649         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
5650         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
5651         (*movmemhi1): Remove.
5653 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
5655         * config/s390/2827.md: Increase latencies for some FP instructions.
5657 2018-10-08  Richard Biener  <rguenther@suse.de>
5659         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
5660         Open a dump scope.
5661         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
5662         * tree-vectorizer.h (dump_stmt_cost): Adjust.
5663         (add_stmt_cost): Dump return value of the hook.
5665 2018-10-08  Richard Biener  <rguenther@suse.de>
5667         PR tree-optimization/63155
5668         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
5669         (ssa_propagation_engine::ssa_propagate): Remove redundant
5670         bitmap bit clearing.
5672 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
5674         PR rtl-optimization/86939
5675         PR rtl-optimization/87479
5676         * ira.h (non_conflicting_reg_copy_p): New prototype.
5677         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
5678         (make_hard_regno_dead): Don't add conflicts for register
5679         ignore_reg_for_conflicts.
5680         (make_object_dead): Likewise.
5681         (non_conflicting_reg_copy_p): New function.
5682         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
5683         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
5684         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
5685         (make_hard_regno_dead): Don't add conflicts for register
5686         ignore_reg_for_conflicts.  Remove special conflict handling of
5687         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
5688         check_pic_pseudo_p and update callers.
5689         (mark_pseudo_dead): Don't add conflicts for register
5690         ignore_reg_for_conflicts.
5691         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
5693 2018-10-05  Andrew Waterman  <andrew@sifive.com>
5694             Jim Wilson  <jimw@sifive.com>
5696         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
5697         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
5698         new pattern using HONOR_SNANS that emits one extra instruction.
5700 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
5702         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
5703         patterns): Merge SI and DI patterns to a GPR pattern.
5704         (unnamed define_insn and define_split for record form of that): Merge
5705         to a single define_insn_and_split pattern.
5707 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
5709         PR c++/56856
5710         * input.c (expand_location_to_spelling_point): Add param "aspect"
5711         and use rather than hardcoding LOCATION_ASPECT_CARET.
5712         (get_substring_ranges_for_loc): Handle the case of a single token
5713         within a macro expansion.
5714         * input.h (expand_location_to_spelling_point): Add "aspect" param,
5715         defaulting to LOCATION_ASPECT_CARET.
5717 2018-10-05  Paul Koning  <ni1d@arrl.net>
5719         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
5720         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
5721         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
5722         (pdp11_guard_type): New function.
5724 2018-10-05  Paul Koning  <ni1d@arrl.net>
5726         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
5727         * config/pdp11/pdp11.opt (mfloat32): Remove.
5728         (mfloat64): Remove.
5729         * doc/invoke.texi (pdp11 -mfloat32): Remove:
5730         (pdp11 -mfloat64): Remove.
5732 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
5734         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
5735         (*cmp<mode>_cc_i387): Ditto.
5736         (*cmpu<mode>_cc_i387): Ditto.
5737         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
5738         * config/i386/i386.c (ix86_expand_fp_compare): Remove
5739         "scratch" argument.
5740         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
5741         Emit x86_sahf_1 pattern.
5742         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
5743         (ix86_expand_carry_flag_compare): Ditto.
5745 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
5747         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
5748         to reg_or_0_operand.  Add "C" constraint.
5749         (*cmpxf_cc_i387): Ditto.
5750         (*cmp<mode>_i387): Change operand 2 predicate
5751         to nonimm_or_0_operand.  Add "C" constraint.
5752         (*cmp<mode>_cc_i387): Ditto.
5753         (*cmp<mode>_0_i387): Remove insn pattern.
5754         (*cmp<mode>_0_cc_i387): Ditto.
5756 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
5758         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
5759         * config/i386/predicates.md (nonimm_or_0_operand): Rename
5760         from vector_move_operand.  Update all uses.
5762 2018-10-05  Martin Sebor  <msebor@redhat.com>
5764         PR tree-optimization/87490
5765         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
5766         consistently.
5768 2018-10-05  Richard Biener  <rguenther@suse.de>
5770         PR tree-optimization/63155
5771         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
5772         vertical space in dumpfiles.
5773         * tree-ssa-propagate.h
5774         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
5775         * tree-ssa-propagate.c (cfg_blocks_back): New global.
5776         (ssa_edge_worklist_back): Likewise.
5777         (curr_order): Likewise.
5778         (cfg_blocks_get): Remove abstraction.
5779         (cfg_blocks_add): Likewise.
5780         (cfg_blocks_empty_p): Likewise.
5781         (add_ssa_edge): Add to current or next worklist based on
5782         RPO index.
5783         (add_control_edge): Likewise.
5784         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
5785         into ...
5786         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
5787         iteration from CFG and SSA edge worklist so we process
5788         everything in RPO order, prioritizing forward progress
5789         over iteration.
5790         (ssa_prop_init): Allocate new worklists, do not dump
5791         immediate uses.
5792         (ssa_prop_fini): Free new worklists.
5794 2018-10-05  Richard Biener  <rguenther@suse.de>
5796         * tree-core.h (tree_block::abstract_flag): Remove.
5797         (tree_block::block_num): Make full 32bits.
5798         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
5799         * tree.h (BLOCK_ABSTRACT): Remove.
5800         * dwarf2out.c (gen_lexical_block_die): Remove dead code
5801         resulting from BLOCK_ABSTRACT being always false.
5802         (gen_inlined_subroutine_die): Likewise.
5803         (gen_block_die): Likewise.
5804         * tree.c (block_ultimate_origin): Likewise.
5805         * tree-pretty-print.c (dump_block_node): Remove code dealing
5806         with BLOCK_ABSTRACT.
5807         * tree-ssa-live.c (dump_scope_block): Likewise.
5808         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
5809         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
5811 2018-10-05   Richard Biener  <rguenther@suse.de>
5813         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
5814         is asked for initialize mode to the component mode of the
5815         vector type.
5817 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
5819         PR target/87522
5820         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
5821         assembler for -mavx.
5822         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
5824 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
5826         PR target/87509
5827         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
5828         RS6000_BTM_DFP.
5829         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
5830         to be DImode.  When using mffscrn, force the operand to a register.
5832 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
5834         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
5835         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
5836         X87MODEF mode iterator.
5837         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
5838         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
5839         X87MODEF mode iterator.
5841 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
5843         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
5844         -Wno-prio-ctor-dtor.
5846 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
5848         * Makefile.in (OBJS): Add opt-problem.o.
5849         * dump-context.h: Include "selftest.h.
5850         (selftest::temp_dump_context): New forward decl.
5851         (class dump_context): Make friend of class
5852         selftest::temp_dump_context.
5853         (dump_context::dump_loc_immediate): New decl.
5854         (class dump_pretty_printer): Move here from dumpfile.c.
5855         (class temp_dump_context): Move to namespace selftest.
5856         (temp_dump_context::temp_dump_context): Add param
5857         "forcibly_enable_dumping".
5858         (selftest::verify_dumped_text):
5859         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
5860         (selftest::verify_item):
5861         (ASSERT_IS_TEXT): Move here from dumpfile.c.
5862         (ASSERT_IS_TREE): Likewise.
5863         (ASSERT_IS_GIMPLE): Likewise.
5864         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
5865         to...
5866         (dump_context::dump_loc_immediate): ...this new function.
5867         (class dump_pretty_printer): Move to dump-context.h.
5868         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
5869         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
5870         (temp_dump_context::temp_dump_context): Move to "selftest"
5871         namespace.  Add param "forcibly_enable_dumping", and use it to
5872         conditionalize the use of m_pp;
5873         (selftest::verify_dumped_text): Make non-static.
5874         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
5875         (selftest::verify_item): Make non-static.
5876         (ASSERT_IS_TEXT): Move to dump-context.h.
5877         (ASSERT_IS_TREE): Likewise.
5878         (ASSERT_IS_GIMPLE): Likewise.
5879         (selftest::test_capture_of_dump_calls): Pass "true" for new
5880         param of temp_dump_context.
5881         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
5882         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
5883         TDF_COMPARE_DEBUG.
5884         * opt-problem.cc: New file.
5885         * opt-problem.h: New file.
5886         * optinfo-emit-json.cc
5887         (selftest::test_building_json_from_dump_calls): Pass "true" for
5888         new param of temp_dump_context.
5889         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
5890         (optinfo::emit_for_opt_problem): New function.
5891         (optinfo::emit): Clarity which emit_item is used.
5892         * optinfo.h (optinfo::get_dump_location): New accessor.
5893         (optinfo::emit_for_opt_problem): New decl.
5894         (optinfo::emit): Make const.
5895         * selftest-run-tests.c (selftest::run_tests): Call
5896         selftest::opt_problem_cc_tests.
5897         * selftest.h (selftest::opt_problem_cc_tests): New decl.
5898         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
5899         bool to opt_result, converting fprintf messages to
5900         opt_result::failure_at calls.  Add "stmt" param for use by the
5901         failure_at calls.
5902         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
5903         (runtime_alias_check_p): Convert return type from bool to
5904         opt_result, converting dump_printf calls to
5905         opt_result::failure_at, using the statement DDR_A for their
5906         location.
5907         (find_data_references_in_stmt): Convert return type from bool to
5908         opt_result, converting "return false" to opt_result::failure_at
5909         with a new message.
5910         * tree-data-ref.h: Include "opt-problem.h".
5911         (dr_analyze_innermost): Convert return type from bool to opt_result,
5912         and add a const gimple * param.
5913         (find_data_references_in_stmt): Convert return type from bool to
5914         opt_result.
5915         (runtime_alias_check_p): Likewise.
5916         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
5917         dr_analyze_innermost.
5918         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
5919         Convert return type from bool to opt_result, adding a message for
5920         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
5921         (vect_analyze_data_ref_dependence): Convert return type from bool
5922         to opt_result.  Change sense of return type from "false"
5923         effectively meaning "no problems" to "false" meaning a problem,
5924         so that "return false" becomes "return opt_result::success".
5925         Convert "return true" calls to opt_result::failure_at, using
5926         the location of statement A rather than vect_location.
5927         (vect_analyze_data_ref_dependences): Convert return type from bool
5928         to opt_result.
5929         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
5930         calls to opt_result::failure_at, using the stmt location rather
5931         than vect_location.
5932         (vect_verify_datarefs_alignment): Convert return type from bool
5933         to opt_result.
5934         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
5935         into multiple more-tightly-scoped copies.
5936         (vect_analyze_data_refs_alignment): Convert return type from bool
5937         to opt_result.
5938         (vect_analyze_data_ref_accesses): Likewise, converting a
5939         "return false" to a "return opt_result::failure_at", adding a
5940         new message.
5941         (vect_prune_runtime_alias_test_list): Convert return type from
5942         bool to opt_result, converting dump_printf_loc to
5943         opt_result::failure_at.  Add a %G to show the pertinent statement,
5944         and use the stmt's location rather than vect_location.
5945         (vect_find_stmt_data_reference): Convert return type from
5946         bool to opt_result, converting dump_printf_loc to
5947         opt_result::failure_at, using stmt's location.
5948         (vect_analyze_data_refs):  Convert return type from bool to
5949         opt_result.  Convert "return false" to "return
5950         opt_result::failure_at", adding messages as needed.
5951         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
5952         type from bool to opt_result.
5953         (vect_determine_vf_for_stmt): Likewise.
5954         (vect_determine_vectorization_factor): Likewise, converting
5955         dump_printf_loc to opt_result::failure_at, using location of phi
5956         rather than vect_location.
5957         (vect_analyze_loop_form_1): Convert return type from bool to
5958         opt_result, converting dump_printf_loc calls, retaining the use of
5959         vect_location.
5960         (vect_analyze_loop_form): Convert return type from loop_vec_info
5961         to opt_loop_vec_info.
5962         (vect_analyze_loop_operations): Convert return type from bool to
5963         opt_result, converting dump_printf_loc calls, using the location
5964         of phi/stmt rather than vect_location where available.  Convert
5965         various "return false" to "return opt_result::failure_at" with
5966         "unsupported phi" messages.
5967         (vect_get_datarefs_in_loop): Convert return type from bool to
5968         opt_result.  Add a message for the
5969         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
5970         (vect_analyze_loop_2): Convert return type from bool to
5971         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
5972         each "goto again;", adding new messages where needed.
5973         Add "unsupported grouped {store|load}" messages.
5974         (vect_analyze_loop): Convert return type from loop_vec_info to
5975         opt_loop_vec_info.
5976         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
5977         bool to opt_result.
5978         * tree-vect-stmts.c (process_use): Likewise, converting
5979         dump_printf_loc call and using stmt location, rather than
5980         vect_location.
5981         (vect_mark_stmts_to_be_vectorized): Likeise.
5982         (vect_analyze_stmt): Likewise, adding a %G.
5983         (vect_get_vector_types_for_stmt): Convert return type from bool to
5984         opt_result, converting dump_printf_loc calls and using stmt
5985         location, rather than vect_location.
5986         (vect_get_mask_type_for_stmt): Convert return type from tree to
5987         opt_tree, converting dump_printf_loc calls and using stmt location.
5988         * tree-vectorizer.c: Include "opt-problem.h.
5989         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
5990         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
5991         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
5992         enabled, use it to report at the top level "couldn't vectorize
5993         loop" followed by the problem.
5994         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
5995         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
5996         to opt_result.
5997         (vect_analyze_stmt): Likewise.
5998         (vect_get_vector_types_for_stmt): Likewise.
5999         (tree vect_get_mask_type_for_stmt): Likewise.
6000         (vect_analyze_data_ref_dependences): Likewise.
6001         (vect_enhance_data_refs_alignment): Likewise.
6002         (vect_analyze_data_refs_alignment): Likewise.
6003         (vect_verify_datarefs_alignment): Likewise.
6004         (vect_analyze_data_ref_accesses): Likewise.
6005         (vect_prune_runtime_alias_test_list): Likewise.
6006         (vect_find_stmt_data_reference): Likewise.
6007         (vect_analyze_data_refs): Likewise.
6008         (vect_analyze_loop): Convert return type from loop_vec_info to
6009         opt_loop_vec_info.
6010         (vect_analyze_loop_form): Likewise.
6011         (vect_analyze_slp): Convert return type from bool to opt_result.
6013 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
6015         * doc/invoke.texi (-fopt-info): Document new "internals"
6016         sub-option.
6017         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
6018         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
6019         MSG_ALL_KINDS.
6020         (optinfo_verbosity_options): Add "internals".
6021         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
6022         (dump_context::apply_dump_filter_p): New member function.
6023         (dump_context::dump_loc): Use apply_dump_filter_p rather than
6024         explicitly masking the dump_kind.
6025         (dump_context::begin_scope): Increment the scope depth first.  Use
6026         apply_dump_filter_p rather than explicitly masking the dump_kind.
6027         (dump_context::emit_item): Use apply_dump_filter_p rather than
6028         explicitly masking the dump_kind.
6029         (dump_dec): Likewise.
6030         (dump_hex): Likewise.
6031         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
6032         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
6033         (opt_info_switch_p): Update handling of default
6034         MSG_OPTIMIZED_LOCATIONS to cope with default of
6035         MSG_PRIORITY_USER_FACING.
6036         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
6037         masking the dump_kind.
6038         (selftest::test_capture_of_dump_calls): Update test_dump_context
6039         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
6040         than MSG_ALL.  Generalize scope test to be run at all four
6041         combinations of with/without MSG_PRIORITY_USER_FACING and
6042         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
6043         for each of the two values.
6044         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
6045         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
6046         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
6047         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
6048         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
6049         with MSG_PRIORITY_*.
6050         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
6051         dump messages as MSG_PRIORITY_USER_FACING.
6052         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
6053         about the interaction with MSG_PRIORITY_*.
6055 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6057         * varasm.c (output_constant): Add new parameter merge_strings.
6058         Make strings properly zero terminated in merge string sections.
6059         (mergeable_string_section): Don't fail if the last char is non-zero.
6060         (assemble_variable_contents): Handle merge string sections.
6061         (assemble_variable): Likewise.
6062         (assemble_constant_contents): Likewise.
6063         (output_constant_def_contents): Likewise.
6064         (output_constructor_array_range,
6065         output_constructor_regular_field): Adjust call to output_constant.
6066         (output_object_block): Adjust call to assemble_constant_contents
6067         and assemble_variable_contents.
6069 2018-10-04  Martin Liska  <mliska@suse.cz>
6071         PR c/87483
6072         * cgraphunit.c (process_function_and_variable_attributes):
6073         Warn about a function with alias attribute and a body.
6075 2018-10-04  Martin Liska  <mliska@suse.cz>
6077         PR ipa/82625
6078         * multiple_target.c (redirect_to_specific_clone): New function.
6079         (ipa_target_clone): Use it.
6080         * tree-inline.c: Fix comment.
6082 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
6084         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
6085         fields.
6086         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
6087         (gcc::dump_manager::register_pass): New member function, adapted
6088         from loop body in gcc::pass_manager::register_pass, adding a
6089         call to update_dfi_for_opt_info.
6090         (gcc::dump_manager::opt_info_enable_passes): Store the
6091         -fopt-info options into the new fields.  Move the loop
6092         bodies into...
6093         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
6094         function.
6095         * dumpfile.h (struct opt_pass): New forward decl.
6096         (gcc::dump_manager::register_pass): New decl.
6097         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
6098         (class gcc::dump_manager): Add fields "m_optgroup_flags",
6099         "m_optinfo_flags", and "m_optinfo_filename".
6100         * passes.c (gcc::pass_manager::register_pass): Move all of the
6101         dump-handling code to gcc::dump_manager::register_pass.
6103 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
6105         PR rtl-optimization/87466
6106         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
6107         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
6108         * doc/tm.texi: Regenerate.
6109         * ira-lives.c (process_bb_node_lives): Use the new target hook.
6110         * lra-lives.c (process_bb_lives): Likewise.
6111         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
6112         Define.
6114 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
6116         * params.c (add_params): Fix initialization.
6118 2018-10-04  Martin Liska  <mliska@suse.cz>
6120         PR gcov-profile/84107
6121         * tree-profile.c (init_ic_make_global_vars):
6122         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
6123         Come up with new ic_tuple* variables.  Emit
6124         __gcov_indirect_call{,_topn} variables.
6125         (gimple_gen_ic_profiler): Access the variable
6126         and emit gimple.
6127         (gimple_gen_ic_func_profiler): Access
6128         __gcov_indirect_call.callee field.
6129         (gimple_init_gcov_profiler): Use ptr_type_node.
6130         * value-prof.c (gimple_ic): Use ptr_type_node.
6132 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
6134         PR tree-optimization/85787
6135         * ipa-pure-const.c (malloc_candidate_p_1): Move most of
6136         malloc_candidate_p into this function and add support for
6137         detecting multiple phis.
6138         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
6140 2018-10-04  Martin Liska  <mliska@suse.cz>
6142         PR ipa/87491
6143         * ipa-inline.c (inline_to_all_callers_1):
6144         Call ultimate_alias_target for node being inlined.
6146 2018-10-03  Jeff Law  <law@redhat.com>
6148         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
6149         target's wchar_t.
6150         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
6151         * tree.h (get_typenode_from_name): Prototype.
6153 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
6155         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
6156         Change operand 2 predicate to nonimmediate_operand.
6157         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
6159 2018-10-03  Martin Sebor  <msebor@redhat.com>
6160             Jeff Law  <law@redhat.com>
6162         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
6163         initialize it.
6164         (get_string_length): Detect unterminated arrays.
6165         (format_string): Same.
6166         (format_directive): Warn about unterminated arrays.
6167         (handle_gimple_call): Mark statements with no_warning as needed.
6169 2018-10-03  Jim Wilson  <jimw@sifive.com>
6171         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
6172         also define __riscv_abi_rve.  Delete trailing white space.
6174 2018-10-03  Paul Koning  <ni1d@arrl.net>
6176         Enable LRA register allocator for PDP11.
6177         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
6178         (R): Likewise.
6179         (D): Likewise.
6180         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
6181         * config/pdp11/pdp11.opt (-mlra): New option.
6182         * doc/invoke.texi (PDP-11 Options): Document -mlra.
6184 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
6186         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
6187         (*<absneg:code>extend<mode>xf2): Ditto.
6189 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
6191         PR tree-optimization/87415
6192         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
6193         precision fields.
6195 2018-10-02  Jeff Law  <law@redhat.com>
6197         * gimple-fold.c (get_range_strlen): Only set *nonstr when
6198         an unterminated string is discovered.  Bubble up range
6199         even for unterminated strings.
6200         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
6201         indicates the string was not terminated via NONSTR.
6203 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
6205         * tree-vrp.c (extract_range_from_unary_expr): Special case all
6206         pointer conversions.
6207         Do not do anything special for anti-ranges.
6209 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
6211         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
6212         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
6214 2018-10-03  Martin Liska  <mliska@suse.cz>
6216         PR gcov-profile/86109
6217         * coverage.c (coverage_begin_function): Do not
6218         mark lambdas as artificial.
6219         * tree-core.h (struct GTY): Remove tm_clone_flag
6220         and introduce new lambda_function.
6221         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
6223 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
6225         PR target/87474
6226         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
6227         P8_VECTOR and VSX are enabled.
6229 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
6231         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
6232         0x3907 as CPU model number.
6234 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
6236         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
6237         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
6238         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
6239         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
6240         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
6241         * config/s390/s390.md: Likewise. Rename also the cpu attribute
6242         value from arch12 to z14.
6244 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
6246         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
6247         (isinfxf2): Ditto.
6248         (isinf<mode>2): Ditto.
6250 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
6252         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
6253         before emitting fxam.  Perform calculations in XFmode.
6255 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
6257         * match.pd (((X /[ex] A) +- B) * A): New transformation.
6259 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
6261         PR middle-end/87319
6262         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
6263         * tree.c (signed_or_unsigned_type_for): Handle complex.
6265 2018-10-02  Jeff Law  <law@redhat.com>
6267         * gimple-fold.c (get_range_strlen): Remove dead code.
6269 2018-10-02  Martin Sebor  <msebor@redhat.com>
6270             Jeff Law  <law@redhat.com>
6272         * builtins.c (unterminated_array): Add new arguments.
6273         If argument is not terminated, bubble up size and exact
6274         state to callers.
6275         (expand_builtin_strnlen): Detect, avoid expanding
6276         and diagnose unterminated arrays.
6277         (c_strlen): Fill in offset of start of unterminated strings.
6278         * builtins.h (unterminated_array): Update prototype.
6280 2018-10-02  Richard Biener  <rguenther@suse.de>
6282         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
6283         of haddv4df, first reduce to SSE width and exploit the fact
6284         that we only need element zero with the reduction result.
6285         (reduc_plus_scal_v2df): Likewise.
6287 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
6289         * dojump.h (do_jump): Delete.
6290         (do_jump_1): Likewise.
6291         (split_comparison): Move around.
6292         * dojump.c (do_jump): Make static.
6293         (do_jump_1): Likewise.
6294         (jumpifnot): Move around.
6295         (jumpifnot_1): Likewise.
6296         (jumpif): Likewise.
6297         (jumpif_1): Likewise.
6298         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
6300 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
6302         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
6303         insns in the delay slot and add_insn_after for the jump insn.
6305 2018-10-02  Richard Biener  <rguenther@suse.de>
6307         * tree-inline.c (expand_call_inline): Use the location of
6308         the callee declaration for the inline-entry marker.
6309         * final.c (notice_source_line): Remove special-casing of
6310         NOTE_INSN_INLINE_ENTRY.
6312 2018-10-01  Carl Love  <cel@us.ibm.com>
6314         PR 69431
6315         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
6316         (__builtin_mtfsb0): New.
6317         (__builtin_mtfsb1): New.
6318         ( __builtin_set_fpscr_rn): New.
6319         (__builtin_set_fpscr_drn): New.
6320         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
6321         (rs6000_expand_set_fpscr_rn_builtin): Add.
6322         (rs6000_expand_set_fpscr_drn_builtin): Add.
6323         (rs6000_expand_builtin): Add case statement entries for
6324         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
6325         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
6326         RS6000_BUILTIN_MFFSL.
6327         (rs6000_init_builtins): Add ftype initialization and def_builtin
6328         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
6329         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
6330         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
6331         rs6000_mffscdrn): Add define_insn.
6332         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
6333         * doc/extend.texi: Add documentation for the builtins.
6335 2018-10-01  Richard Biener  <rguenther@suse.de>
6337         PR tree-optimization/87465
6338         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
6339         causing branch miscounts.
6341 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
6343         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
6344         aarch64_option_default_param):  New.
6345         (params.h): Include.
6346         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
6347         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
6348         stack-clash protection validation code.
6350 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
6352         * params.c (validate_param): New.
6353         (add_params): Use it.
6354         (set_param_value): Refactor param validation into validate_param.
6355         (diagnostic.h): Include.
6356         * diagnostic.h (diagnostic_ready_p): New.
6358 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
6360         * params.c (set_param_value):
6361         Add index of parameter being validated.
6362         * common/common-target.def (option_validate_param): New.
6363         * common/common-targhooks.h (default_option_validate_param): New.
6364         * common/common-targhooks.c (default_option_validate_param): New.
6365         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
6366         * doc/tm.texi: Regenerate.
6368 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
6370         PR target/86486
6371         * config/aarch64/aarch64.c (aarch64_override_options_internal):
6372         Add validation for stack-clash parameters and set defaults.
6374 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
6376         PR target/86486
6377         * configure.ac: Add stack-clash-protection-guard-size.
6378         * doc/install.texi: Document it.
6379         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
6380         * params.def: Update comment for guard-size.
6381         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
6382         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
6383         * configure: Regenerate.
6385 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
6387         PR target/86486
6388         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
6389         STACK_DYNAMIC_OFFSET): New.
6390         * config/aarch64/aarch64.c (aarch64_layout_frame):
6391         Update outgoing args size.
6392         (aarch64_stack_clash_protection_alloca_probe_range,
6393         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
6395 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
6397         PR target/86486
6398         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
6399         probe ranges.
6400         * target.def (stack_clash_protection_alloca_probe_range): New.
6401         (stack_clash_protection_final_dynamic_probe): Remove.
6402         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
6403         (default_stack_clash_protection_final_dynamic_probe): Remove.
6404         * targhooks.c: Likewise.
6405         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
6406         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
6407         * doc/tm.texi: Regenerate.
6409 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
6411         PR target/86486
6412         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
6413         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
6414         aarch64_clamp_to_uimm12_shift): New.
6415         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
6416         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
6418 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
6420         PR target/86486
6421         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
6423 2018-10-01  Jeff Law  <law@redhat.com>
6424             Richard Sandiford <richard.sandiford@linaro.org>
6425             Tamar Christina  <tamar.christina@arm.com>
6427         PR target/86486
6428         * config/aarch64/aarch64.md
6429         (probe_stack_range): Add k (SP) constraint.
6430         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
6431         STACK_CLASH_MAX_UNROLL_PAGES): New.
6432         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
6433         stack probes for stack clash.
6434         (aarch64_allocate_and_probe_stack_space): New.
6435         (aarch64_expand_prologue): Use it.
6436         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
6437         (aarch64_sub_sp): Add emit_move_imm optional param.
6439 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
6441         PR tree-optimization/87261
6442         * match.pd: Remove trailing whitespace.
6443         Add (x & y) | ~(x | y) -> ~(x ^ y),
6444         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
6446 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
6448         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
6449         constraints.
6450         (ashlsi3_insn): Update instruction constraints.
6451         (ashrsi3_insn): Likewise.
6452         (rotrsi3): Likewise.
6453         (add_shift): Likewise.
6454         * config/arc/constraints.md (Csz): New 32 bit constraint. It
6455         avoids placing in the limm field small constants which, otherwise,
6456         could end into a small instruction.
6458 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
6460         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
6461         destination register is not odd-even.
6462         (umaddsidi4_split): Likewise.
6464 2018-10-01  Richard Biener  <rguenther@suse.de>
6466         * tree-inline.c (expand_call_inline): Store origin of fn
6467         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
6468         * tree.c (block_ultimate_origin): Simplify and do some
6469         checking.
6471 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
6473         * config/i386/mmx.md (EMMS): New int iterator.
6474         (emms): New int attribute.
6475         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
6476         EMMS int iterator.  Explicitly declare clobbers.
6477         (mmx_emms): Remove expander.
6478         (mmx_femms): Ditto.
6479         * config/i386/predicates.md (emms_operation): Remove predicate.
6480         (vzeroall_pattern): New predicate.
6481         (vzeroupper_pattern): Rename from vzeroupper_operation.
6482         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
6483         vzeroupper_pattern and vzeroall_pattern predicates.
6485 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
6487         PR rtl-optimization/86939
6488         * ira-lives.c (make_hard_regno_born): Rename from this...
6489         (make_hard_regno_live): ... to this.  Remove update to conflict
6490         information.  Update function comment.
6491         (make_hard_regno_dead): Add conflict information update.  Update
6492         function comment.
6493         (make_object_born): Rename from this...
6494         (make_object_live): ... to this.  Remove update to conflict information.
6495         Update function comment.
6496         (make_object_dead):  Add conflict information update.  Update function
6497         comment.
6498         (mark_pseudo_regno_live): Call make_object_live.
6499         (mark_pseudo_regno_subword_live): Likewise.
6500         (mark_hard_reg_dead): Update function comment.
6501         (mark_hard_reg_live): Call make_hard_regno_live.
6502         (process_bb_node_lives): Likewise.
6503         * lra-lives.c (make_hard_regno_born): Rename from this...
6504         (make_hard_regno_live): ... to this.  Remove update to conflict
6505         information.  Remove now uneeded check_pic_pseudo_p argument.
6506         Update function comment.
6507         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
6508         to conflict information.  Update function comment.
6509         (mark_pseudo_live): Remove update to conflict information.  Update
6510         function comment.
6511         (mark_pseudo_dead): Add conflict information update.
6512         (mark_regno_live): Call make_hard_regno_live.
6513         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
6514         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
6516 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
6518         PR target/87370
6519         * config/i386/i386.c (construct_container): Use TImode for
6520         BLKmode values in 2 integer registers.
6522 2018-09-29  Jeff Law  <law@redhat.com>
6524         * builtins.c (unterminated_array): Pass in c_strlen_data * to
6525         c_strlen rather than just a tree *.
6526         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
6527         Update recursive calls appropriately.  If caller did not provide a
6528         suitable data pointer, create a local one.  When a non-terminated
6529         string is discovered, bubble up information about the string via the
6530         c_strlen_data object.
6531         * builtins.h (c_strlen): Update prototype.
6532         (c_strlen_data): New structure.
6533         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
6534         For a type 2 call, if c_strlen indicates a non-terminated string
6535         use the length of the non-terminated string.
6536         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
6538 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
6540         PR target/87467
6541         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
6542         __m512d type for __A argument rather than __m512.
6544 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
6546         * match.pd (simple_comparison): Don't optimize if either operand is
6547         a function pointer when target needs function pointer canonicalization.
6549 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
6551         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
6552         power5 .. power9 to remove indirection.
6553         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
6554         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
6555         ASM_CPU_476_SPEC): Delete.
6556         (ASM_CPU_SPEC): Adjust.
6557         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
6558         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
6560 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
6562         * config.in: Delete HAVE_AS_DCI.
6563         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
6564         * config/rs6000/rs6000.h: Ditto.
6565         * configure.ac: Delete HAVE_AS_DCI.
6566         * configure: Regenerate.
6568 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
6570         * config.in (HAVE_AS_LWSYNC): Delete.
6571         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
6572         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
6573         do it as a .long .
6574         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
6575         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
6576         as a .long .
6577         * configure.ac: Delete HAVE_AS_LWSYNC.
6578         * configure: Regenerate.
6580 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
6581             Pierre-Marie de Rodat  <derodat@adacore.com>
6583         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
6584         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
6585         (cgraph_node::create_thunk): Add indirect_offset parameter.
6586         (thunk_adjust): Likewise.
6587         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
6588         and initialize the corresponding field with it.
6589         (cgraph_node::dump): Dump indirect_offset field.
6590         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
6591         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
6592         (thunk_adjust): Add indirect_offset parameter and deal with it.
6593         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
6594         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
6595         or if the thunk is external or local.  Fix formatting.  Do not chain
6596         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
6597         if any, in the GIMPLE representation.
6598         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
6599         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
6600         (input_node): Read indirect_offset field.
6601         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
6602         call to thunk_adjust.
6603         * tree-nested.c (struct nesting_info): Add thunk_p field.
6604         (create_nesting_tree): Set it.
6605         (convert_all_function_calls): Copy static chain from targets to thunks.
6606         (finalize_nesting_tree_1): Return early for thunks.
6607         (unnest_nesting_tree_1): Do not finalize thunks.
6608         (gimplify_all_functions): Do not gimplify thunks.
6610 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
6612         * opt-suggestions.c (option_proposer::build_option_suggestions):
6613         Release "option_values".
6615 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
6617         * coverage.c (get_coverage_counts): Convert problem-reporting dump
6618         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
6619         * dumpfile.c (kind_as_string): New function.
6620         (dump_loc): Rather than a hardcoded prefix of "note: ", use
6621         kind_as_string to vary the prefix based on dump_kind.
6622         (selftest::test_capture_of_dump_calls): Update for above.
6624 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
6626         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
6627         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
6629 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
6631         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
6632         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
6633         INVALID_REGNUM instead of FPSR_REG.
6634         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
6635         * config/i386/i386.md: Update comment of FP compares.
6636         (fldenv): Do not clobber FPSR_REG.
6638 2018-09-28  Richard Biener  <rguenther@suse.de>
6640         * tree.h (BLOCK_ORIGIN): New.
6641         * omp-expand.c (grid_expand_target_grid_body): Assign
6642         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
6643         * tree-inline.c (remap_block): Likewise.
6644         * auto-profile.c (get_function_decl_from_block): Simplify
6645         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
6646         * langhooks.c (lhd_print_error_function): Likewise.
6647         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
6648         Likewise.
6649         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
6650         * tree.c (block_nonartificial_location): Likewise.
6651         (block_ultimate_origin): Likewise.
6652         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
6653         no longer needed LTO case.
6655 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
6656             Jan Hubicka  <jh@suse.cz>
6657             Martin Jambor  <mjambor@suse.cz>
6659         * simplify-rtx.c (simplify_merge_mask): New function.
6660         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
6661         same masks are used in op1 or op2.
6662         (test_vec_merge): New function.
6663         (test_vector_ops): Call test_vec_merge.
6665 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
6667         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
6668         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
6669         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
6670         (cypress_costs): Set it.
6671         (supersparc_costs): Likewise.
6672         (hypersparc_costs): Likewise.
6673         (leon_cost): Likewise.
6674         (leon3_costs): Likewise.
6675         (sparclet_costs): Likewise.
6676         (ultrasparc_costs): Likewise.
6677         (ultrasparc_costs): Likewise.
6678         (niagara_costs): Likewise.
6679         (niagara2_costs): Likewise.
6680         (niagara3_costs): Likewise.
6681         (niagara4_costs): Likewise.
6682         (niagara7_costs): Likewise.
6683         (m8_costs): Likewise.
6684         (TARGET_CAN_FOLLOW_JUMP): Define.
6685         (pass_work_around_errata::gate): Minor tweak.
6686         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
6687         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
6688         Automaitcally clear MASK_FSMULD mask for V7 processors.
6689         (sparc_can_follow_jump): New static function.
6690         (output_ubranch): Deal with CROSSING_JUMP_P.
6691         (sparc_use_sched_lookahead): Rewrite using switch statement.
6692         (sparc_issue_rate): Reorder.
6693         (sparc_branch_cost): New function.
6695 2018-09-27  Martin Sebor  <msebor@redhat.com>
6697         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
6698         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
6699         (int_fits_type_p): Same.
6701 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
6703         * config/i386/i386.md (FPCR_REG): Remove.
6704         (UNSPEC_FLDCW): Remove.
6705         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
6706         (x86_fldcw_1): Remove insn pattern.
6707         (fnstenv): Do not clobber FPCR_REG.
6708         (fldenv): Ditto.
6709         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
6710         (CALL_USED_REGISTERS): Ditto.
6711         (REG_ALLOC_ORDER): Ditto.
6712         (REG_CLASS_CONTENTS): Ditto.
6713         (HI_REGISTER_NAMES): Ditto.
6714         (ADDITIONAL_REGISTER_NAMES): Use defines instead
6715         of numerical constants.
6716         * config/i386/i386.c (regclass_map): Remove fpsr register.
6717         (dbx_register_map): Ditto.
6718         (dbx64_register_map): Ditto.
6719         (svr4_dbx_register_map): Ditto.
6720         (print_reg): Do not handle FPCR_REG.
6722 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
6724         PR target/87149
6725         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
6726         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
6727         Delete, always treat as true.
6728         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
6729         Ditto.  Simplify remaining code.
6730         * config/powerpcspe/powerpcspe.h: Ditto.
6731         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
6732         Simplify remaining code.
6733         (rs6000_expand_builtin): Ditto.
6734         * config/rs6000/rs6000.h: Ditto.
6735         * configure.ac: Ditto.
6736         * configure: Regenerate.
6738 2018-09-27  Martin Liska  <mliska@suse.cz>
6740         * coverage.c (get_coverage_counts): Revert the formatting
6741         of missing profile opt info.
6743 2018-09-27  Richard Biener  <rguenther@suse.de>
6745         PR debug/37801
6746         PR debug/87440
6747         * dwarf2out.c (set_block_origin_self): Do not mark outermost
6748         block as we do not output that.
6749         (gen_inlined_subroutine_die): Elide the originally outermost
6750         block, matching what we do for concrete instances.
6751         (decls_for_scope): Add parameter specifying whether to recurse
6752         to subblocks.
6754 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
6755             Tom de Vries  <tom@codesourcery.com>
6757         PR 82089
6759         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
6760         STORE_FLAG_VALUE == 1.
6762 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
6764         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
6765         constant definitions.
6766         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
6767         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
6768         ("speculation_barrier"): New expander definition.
6770 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
6772         PR gcov-profile/86957
6773         * common.opt: New warning option -Wmissing-profile.
6774         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
6775         * doc/invoke.texi: Document -Wmissing-profile.
6777 2018-09-26  Jim Wilson  <jimw@sifive.com>
6779         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
6780         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
6782 2018-09-26  Martin Sebor  <msebor@redhat.com>
6784         * tree.c (zerop): Change return type to bool.
6785         (integer_zerop, integer_onep, integer_each_onep): Same.
6786         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
6787         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
6788         (real_onep, real_minus_onep, chain_index): Same.
6789         (print_type_hash_statistics, type_list_equal): Same.
6790         * tree.h (zerop): Same.
6791         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
6792         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
6793         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
6794         (real_onep, real_minus_onep, chain_index): Same.
6795         (print_type_hash_statistics, type_list_equal): Same.
6797 2018-09-26  Jim Wilson  <jimw@sifive.com>
6799         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
6801 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
6803         PR target/87414
6804         * config/i386/i386.c: Include debug.h and dwarf2out.h.
6805         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
6806         call.
6808 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
6810         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
6812 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
6814         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
6815         and FP_SECOND_SSE_REGS.
6816         (REG_CLASS_NAMES): Ditto.
6817         (REG_CLASS_CONTENTS): Ditto.
6818         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
6819         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
6820         (ix86_preferred_output_reload_class): Ditto.
6821         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
6822         clobber constraint to "=&f".
6823         (fix_truncdi_i387): Ditto.
6824         (lrintxfdi2): Ditto.
6825         (fistdi2_<rounding>): Ditto.
6826         (fpremxf4_i387): Change "=u" constraint to "=f".
6827         (fprem1xf4_i387): Ditto.
6828         (sincosxf3): Ditto.
6829         (fptanxf4_i387): Ditto.
6830         (fxtractxf3_i387): Ditto.
6831         (fscalexf4_i387): Ditto.
6832         (atan2xf3): Change "u" constraint to "f".
6833         (fyl2xxf3_i387): Ditto.
6834         (fyl2xp1xf3_i387): Ditto.
6836 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
6838         PR target/87439
6839         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
6840         for removed I387_MASK_PM entity.
6843 2018-09-26  Jeff Law  <law@redhat.com>
6844         Revert
6845         2018-09-26  Alexey Neyman  <stilor@att.net>
6847         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
6848         headers are no longer pulled in by <isl/val.h>.
6850 2018-09-26  Richard Biener  <rguenther@suse.de>
6852         PR debug/87443
6853         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
6854         or concrete instance DIE to the tree.  Create abstract origin
6855         attributes also for concrete instances.
6857 2018-09-26  Alexey Neyman  <stilor@att.net>
6859         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
6860         headers are no longer pulled in by <isl/val.h>.
6862 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
6864         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
6865         Use new helper functions.
6866         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
6867         Use new helper functions.
6868         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
6869         aarch_mm_needs_release): New declarations.
6870         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
6871         aarch_mm_needs_release): New.
6873 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
6875         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
6876         (arm32_output_mi_thunk): Deal with long calls.
6878 2018-09-26  Richard Biener  <rguenther@suse.de>
6880         PR debug/87428
6881         PR debug/87362
6882         * tree-inline.c (expand_call_inline): When the location
6883         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
6884         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
6885         the inserted BLOCK to make inlined_function_outer_scope_p
6886         recognize it.
6887         * dwarf2out.c (add_call_src_coords_attributes): Do not add
6888         coords for reserved locations.
6890 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
6892         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
6893         (*call_indirect_nonlocal_sysv<mode>): Ditto.
6894         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
6895         (*sibcall_nonlocal_sysv<mode>): Ditto.
6896         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
6897         (<bd>_<mode>): Ditto.
6898         (<bd>tf_<mode>): Ditto.
6900 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
6902         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
6903         control string as a list of templates instead of as C code.
6904         (*altivec_movti): Ditto.
6905         * config/rs6000/darwin.md (movdf_low_di): Ditto.
6907 2018-09-25  Jim Wilson  <jimw@sifive.com>
6909         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
6910         when target symbol is weak.
6912 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6914         PR c/87387
6915         * builtins.c (unterminated_array): Simplify.
6916         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
6917         where pointer arithmetic is safe.
6919 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
6921         PR target/86987
6922         * config/rs6000/altivec.md (altivec_vspltb): Use
6923         const_0_to_15_operand instead of u5bit_cint_operand.
6924         (*altivec_vspltb_internal): Ditto.
6925         (altivec_vspltb_direct): Ditto.
6926         (altivec_vsplth): Use const_0_to_7_operand instead of
6927         u5bit_cint_operand.
6928         (*altivec_vsplth_internal): Ditto.
6929         (altivec_vsplth_direct): Ditto.
6930         (altivec_vspltw): Use const_0_to_3_operand instead of
6931         u5bit_cint_operand.
6932         (*altivec_vspltw_internal): Ditto.
6933         (altivec_vspltw_direct): Ditto.
6934         (altivec_vspltsf): Ditto.
6935         (*altivec_vspltsf_internal): Ditto.
6936         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
6937         various splats with the proper size immediate.  Reorder the various
6938         cases by ascending size of immediate, and put all such together.
6940 2018-09-25  Richard Biener  <rguenther@suse.de>
6942         PR debug/83941
6943         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
6944         GC-ification.
6945         (maybe_create_die_with_external_ref): Do not create
6946         DW_TAG_imported_unit here.
6947         (add_abstract_origin_attribute): Handle external BLOCK refs.
6948         (dwarf2out_abstract_function): Simplify LTO case.
6949         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
6950         rather than using maybe_create_die_with_external_ref.
6952 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
6954         PR target/71278
6955         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
6956         (frndintxf2_mask_pm_i387): Ditto.
6957         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
6958         Enable for !flag_trapping_math.
6959         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
6960         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
6961         Change operand 1 predicate to nonimmediate_operand.
6962         (attr "i387_cw"): Remove mask_pm.
6963         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
6964         (enum ix86_entity): Remove I387_MASK_PM.
6965         * config/i386/i386.c (ix86_i387_mode_needed): Do not
6966         handle I387_MASK_PM.
6967         (ix86_mode_needed): Ditto.
6968         (ix86_mode_after): Ditto.
6969         (ix86_mode_entry): Ditto.
6970         (ix86_mode_exit): Ditto.
6971         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
6973 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
6975         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
6976         to_update_switch_stmts to vNULL instead of calling create on them
6977         immediately.
6979 2018-09-25  Richard Biener  <rguenther@suse.de>
6981         PR tree-optimization/87402
6982         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
6983         (visit_phi): Re-instantiate handling of supposed to be VARYING
6984         but non-VARYING backedge value.
6986 2018-09-25  Richard Biener  <rguenther@suse.de>
6988         PR debug/83941
6989         * dwarf2out.c (struct sym_off_pair): New.
6990         (external_die_map): New global.
6991         (lookup_decl_die): When in LTO create DIEs lazily from the
6992         external_die_map.
6993         (lookup_block_die): New function, create DIEs lazily in LTO.
6994         (equate_block_to_die): New function.
6995         (dwarf2out_die_ref_for_decl): During WPA get the association
6996         from the external DIE map.
6997         (dwarf2out_register_external_die): Record mapping into the
6998         external DIE map.
6999         (maybe_create_die_with_external_ref): New function split out from
7000         DIE generation part of old dwarf2out_register_external_die.
7001         (add_abstract_origin_attribute): Do not return the DIE.  When
7002         in LTO reference externals directly.
7003         (dwarf2out_abstract_function): When in LTO ignore calls for
7004         decls with external DIEs (already present abstract instances).
7005         (gen_call_site_die): Adjust.
7006         (add_high_low_attributes): Likewise.
7007         (gen_lexical_block_die): Likewise.
7008         (gen_inlined_subroutine_die): Likewie.
7009         (gen_block_die): Likewise.
7010         (dwarf2out_inline_entry): Likewise.
7011         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
7012         DIEs.
7014 2018-09-25  Martin Liska  <mliska@suse.cz>
7016         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
7017         integers and not by a float value.
7019 2018-09-25  Martin Liska  <mliska@suse.cz>
7021         PR fortran/87394
7022         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
7023         instead of NULL.
7024         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
7025         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
7026         * godump.c (go_format_type): Remove extra parenthesis.
7028 2018-09-25  Martin Liska  <mliska@suse.cz>
7030         * alias.c (set_dest_equal_p): Remove unused function.
7031         * config/i386/i386.c (def_builtin_pure2): Likewise.
7032         * diagnostic-show-locus.c (class layout): Remove
7033         unused field.
7034         (layout::layout): Likewise here.
7035         * dump-context.h (class temp_dump_context): Likewise.
7036         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
7037         (add_AT_loclistsptr): Likewise.
7038         (add_AT_offset): Likewise.
7039         (get_AT_hi_pc): Likewise.
7040         (is_comdat_die): Likewise.
7041         (type_is_enum): Likewise.
7042         (ceiling): Likewise.
7043         (add_AT_vms_delta): Likewise.
7044         (is_class_die): Likewise.
7045         * edit-context.c (class line_event): Remove unused field.
7046         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
7047         unused function.
7048         * ipa-cp.c (ipa_get_vr_lat): Likewise.
7049         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
7050         (ok_for_base_p_nonstrict): Likewise.
7051         * tree-chrec.c (is_not_constant_evolution): Likewise.
7052         (chrec_fold_poly_cst): Likewise.
7053         * tree-if-conv.c (has_pred_critical_p): Likewise.
7054         * tree-ssa-coalesce.c (print_exprs): Likewise.
7055         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
7056         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
7057         * tree-vrp.c (value_ranges_intersect_p): Likewise.
7058         (value_range_nonnegative_p): Likewise.
7060 2018-09-25  Martin Liska  <mliska@suse.cz>
7062         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
7063         Do not handle "GNU Pascal".
7064         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
7065         Likewise.
7066         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
7067         from documentation. Likewise.
7068         * dbxout.c (dbxout_range_type): Likewise.
7069         * doc/cpp.texi: Likewise.
7070         * doc/extend.texi: Likewise.
7071         * doc/frontends.texi: Likewise.
7072         * doc/invoke.texi: Remove Pascal entry.
7073         * tree.def (CLEANUP_POINT_EXPR): Likewise.
7074         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
7076 2018-09-25  Martin Liska  <mliska@suse.cz>
7078         PR middle-end/86078
7079         * doc/invoke.texi: Document all parameters and remove default
7080         of the parameters.
7082 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
7084         PR bootstrap/87417
7085         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
7086         contains HOST_WIDE_INTs when computing its size.
7088 2018-09-24  Jim Wilson  <jimw@sifive.com>
7090         PR target/87391
7091         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
7092         not TARGET_RVE.
7093         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
7095 2018-09-24  Andrew Pinski  <apinski@marvell.com>
7097         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
7098         access prev before checking it for NULLness in the
7099         AARCH64_FUSE_CMP_BRANCH case.
7101 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
7103         PR target/82699
7104         * config/i386/i386.c (rest_of_insert_endbranch): Set
7105         endbr_queued_at_entrance to true and don't insert ENDBR if
7106         x86_function_profiler will be called.
7107         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
7108         is true.
7109         * config/i386/i386.h (machine_function): Add
7110         endbr_queued_at_entrance.
7112 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
7114         * genattrtab.c (mk_attr_alt): Use alternative_mask.
7115         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
7116         types.
7117         (check_attr_test): Use alternative_mask.
7118         (get_attr_value): Likewise.
7119         (compute_alternative_mask): Use alternative_mask and XWINT.
7120         (make_alternative_compare): Use alternative_mask.
7121         (attr_alt_subset_p): Use XWINT.
7122         (attr_alt_subset_of_compl_p): Likewise.
7123         (attr_alt_intersection): Use alternative_mask and XWINT.
7124         (attr_alt_union): Likewise.
7125         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
7126         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
7127         (simplify_test_exp): Use alternative_mask and XWINT.
7128         (write_test_expr): Use alternative_mask and XWINT, adjust bit
7129         number calculation to support 64 bits.  Generate code that
7130         checks 64-bit masks.
7131         (main): Use alternative_mask.
7132         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
7134 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
7136         PR target/80080
7137         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
7138         RETURN+USE when returning via %r14.
7140 2018-09-24  Martin Liska  <mliska@suse.cz>
7142         * gcov.c (output_lines): Print colorization legend
7143         for both flag_use_colors and flag_use_hotness_colors.
7144         Reword the help.
7146 2018-09-24  Martin Liska  <mliska@suse.cz>
7148         * coverage.c (get_coverage_counts): Use warning_at
7149         with current_function_decl location. Use %qD in warning
7150         message.
7152 2018-09-24  Martin Liska  <mliska@suse.cz>
7154         * memory-block.h (memory_block_pool::release): Annotate with
7155         valgrind that the memory is not accessible.
7157 2018-09-24  Martin Liska  <mliska@suse.cz>
7159         PR sanitizer/85774
7160         * asan.c: Make asan_handled_variables extern.
7161         * asan.h: Likewise.
7162         * cfgexpand.c (expand_stack_vars): Make sure
7163         a representative is unpoison if another
7164         variable in the partition is handled by
7165         use-after-scope sanitization.
7167 2018-09-24  Richard Biener  <rguenther@suse.de>
7169         PR tree-optimization/63155
7170         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
7171         the worklist when the edge of the respective argument isn't
7172         executable.
7174 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
7176         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
7177         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
7178         (MASK_CLASS_P): Update for rename.
7179         (MAYBE_MASK_CLASS_P): Ditto.
7180         (REG_CLASS_NAMES): Update.
7181         (REG_CLASS_CONTENT): Update.
7182         * config/i386/i386.c (regclass_map): Update for MASK_REG
7183         and ALL_MASK_REGS rename.
7184         * config/i386/constraints.md (Yk): Update for rename.
7185         (k): Ditto.
7187 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
7189         * config/i386/i386.h (enum reg_class): Remove
7190         EVEX_SSE_REGS and MOD4_SSE_REGS.
7191         (REG_CLASS_NAMES): Update.
7192         (REG_CLASS_CONTENT): Update.
7193         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
7194         registers as ALL_SSE_REGS.
7195         (ix86_additional_allocno_class_p): Remove.
7196         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
7197         (ix86_register_priority): Lower priority of EVEX SSE registers.
7198         Use IN_RANGE macro where appropriate.
7199         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
7200         AVX-5124VNNIW checks.
7201         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
7202         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
7203         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
7204         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
7205         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
7206         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
7207         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
7208         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
7209         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
7210         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
7211         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
7212         * config/i386/constraints.md (Yh): Remove.
7214 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
7216         * config/i386/i386.c (regclass_map): Declare integer REX registers
7217         as GENERAL_REGS.
7219 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
7221         * doc/service.texi (Service): Switch the fsf.org link to https.
7223 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
7225         PR target/86798
7226         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
7227         Define to speculation_safe_value_not_needed.
7229 2018-09-21  Florian Weimer  <fweimer@redhat.com>
7231         PR middle-end/81035
7232         * doc/extend.texi (Common Function Attributes): Mention that
7233         noreturn suppresses tail call optimization.
7235 2018-09-21  Jeff Law  <law@redhat.com>
7237         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
7238         vr_values::cleanup_edges_and_switches.
7239         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
7240         vr_values class.
7241         (identify_jump_threads): Remove EDGE_IGNORE handling.
7242         (execute_vrp): Move handling of to_remove_edges and
7243         to_update_switch_stmts into vr_values class member functions.
7244         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
7245         (to_update_switch_stmts): Likewise.
7246         * vr-values.c: Include cfghooks.h.
7247         (vr_values::vr_values): Initialize to_remove_edges and
7248         to_update_switch_stmts.
7249         (vr_values::~vr_values): Verify to_remove_edges and
7250         to_update_switch_stmts are empty.
7251         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
7252         (vr_values::cleanup_edges_and_switches): New member function.
7253         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
7254         function.  Add new data members.
7256 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
7258         PR tree-optimization/87309
7259         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
7260         calls with pflags and alt_flags.
7261         (selftest::test_capture_of_dump_calls): Add test of interaction of
7262         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
7264 2018-09-21  Olivier Hainque  <hainque@adacore.com>
7266         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
7268 2018-09-21  Olivier Hainque  <hainque@adacore.com>
7270         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
7272 2018-09-21  Olivier Hainque  <hainque@adacore.com>
7274         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
7275         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
7276         (VXWORKS_LIBS_RTP): Minor reordering.
7278 2018-09-21  Olivier Hainque  <hainque@adacore.com>
7280         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
7281         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
7283 2018-09-21  Olivier Hainque  <hainque@adacore.com>
7285         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
7286         (PTRDIFF_TYPE): Likewise.
7288 2018-09-21  Olivier Hainque  <hainque@adacore.com>
7290         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
7291         triplet, similar to support for VxWorks7.
7292         * config/vxworks-dummy.h: Provide a default definition
7293         of TARGET_VXWORKS64 to 0.
7295 2018-09-21  Olivier Hainque  <hainque@adacore.com>
7297         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
7298         * config/vxworks-dummy.h: here.
7300 2018-09-21  Olivier Hainque  <hainque@adacore.com>
7302         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
7304 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
7305             Bo Zhou  <zbo.zhou@hisilicon.com>
7307         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
7308         * config/aarch64/aarch64-tune.md: Regenerated.
7309         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
7310         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
7311         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
7313 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
7314             Julian Brown  <julian@codesourcery.com>
7316         * builtins.c (get_builtin_sync_mem): Handle address spaces.
7318 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
7320         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
7321         if the call takes a static chain.
7323 2018-09-21  Martin Liska  <mliska@suse.cz>
7325         * auto-profile.c (autofdo_source_profile::read): Do not
7326         set sum_all.
7327         (read_profile): Do not add working sets.
7328         (read_autofdo_file): Remove sum_all.
7329         (afdo_callsite_hot_enough_for_early_inline): Remove const
7330         qualifier.
7331         * coverage.c (struct counts_entry): Remove gcov_summary.
7332         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
7333         do not support GCOV_TAG_PROGRAM_SUMMARY.
7334         (get_coverage_counts): Remove summary and expected
7335         arguments.
7336         * coverage.h (get_coverage_counts): Likewise.
7337         * doc/gcov-dump.texi: Remove -w option.
7338         * gcov-dump.c (dump_working_sets): Remove.
7339         (main): Do not support '-w' option.
7340         (print_usage): Likewise.
7341         (tag_summary): Likewise.
7342         * gcov-io.c (gcov_write_summary): Do not dump
7343         histogram.
7344         (gcov_read_summary): Likewise.
7345         (gcov_histo_index): Remove.
7346         (gcov_histogram_merge): Likewise.
7347         (compute_working_sets): Likewise.
7348         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
7349         it not obsolete.
7350         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
7351         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
7352         (GCOV_HISTOGRAM_SIZE): Remove.
7353         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
7354         (struct gcov_summary): Simplify rapidly just
7355         to runs and sum_max fields.
7356         (gcov_histo_index): Remove.
7357         (NUM_GCOV_WORKING_SETS): Likewise.
7358         (compute_working_sets): Likewise.
7359         * gcov-tool.c (print_overlap_usage_message): Remove
7360         trailing empty line.
7361         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
7362         (output_lines): Remove program related line.
7363         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
7364         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
7365         histogram.
7366         (input_profile_summary): Do not read it.
7367         (merge_profile_summaries): And do not merge it.
7368         (input_symtab): Do not call removed function.
7369         * modulo-sched.c (sms_schedule): Do not print sum_max.
7370         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
7371         removed when histogram method was invented.
7372         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
7373         mode.
7374         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
7375         GCOV coding style.
7376         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
7377         and dump selected value.
7378         * profile.c (add_working_set): Remove.
7379         (get_working_sets): Likewise.
7380         (find_working_set): Likewise.
7381         (get_exec_counts): Do not work with working sets.
7382         (read_profile_edge_counts): Do not inform as sum_max is removed.
7383         (compute_branch_probabilities): Likewise.
7384         (compute_value_histograms): Remove argument for call of
7385         get_coverage_counts.
7386         * profile.h: Do not make gcov_summary const.
7388 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
7390         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
7392 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
7394         PR tree-optimization/86990
7395         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
7396         Check that the entire merged store group is made of constants only for
7397         overlapping stores.
7399 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
7401         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
7402         (VTABLE_VERIFICATION_SPEC): Likewise.
7403         (SANITIZER_EARLY_SPEC): Likewise.
7404         (SANITIZER_SPEC): Likewise.
7405         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
7406         * doc/invoke.texi (Link Options): Document -r.
7408 2018-09-20  Richard Biener <rguenther@suse.de>
7410         PR middle-end/87054
7411         * gimplify.c (gimplify_expr): Retain alignment of
7412         addressable lvalue in dereference.
7414 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
7416         PR bootstrap/87013
7417         * configure.ac: Check for .loc is_stmt support.
7418         * configure, config.in: Rebuilt.
7419         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
7420         if not supported.
7422 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
7424         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
7425         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
7426         -misel=no.
7428 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
7430         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
7431         VECTOR_OTHER.
7432         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
7433         case VECTOR_OTHER.
7435 2018-09-20  Marek Polacek  <polacek@redhat.com>
7437         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
7439 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
7441         PR tree-optimization/87288
7442         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
7443         into account when determining PEELING_FOR_NITERS.
7445 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
7447         PR tree-optimization/86877
7448         * tree-vect-loop.c (vect_analyze_loop_2): Call
7449         vect_verify_datarefs_alignment.
7451 2018-09-19  Marek Polacek  <polacek@redhat.com>
7453         * doc/invoke.texi: Document -Wclass-conversion.
7455 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
7457         * config/pa/pa.c (pa_adjust_priority): Delete.
7458         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
7460         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
7461         (atomic_storehi): Likewise.
7462         (atomic_storesi): Likewise.
7463         (atomic_loaddi): Restore compare and swap exchange loop code.
7465 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
7467         PR rtl-optimization/86902
7468         * combine.c (try_combine): When changing the CC mode used, don't change
7469         an unrelated mode in other_insn to that new CC mode.
7471 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
7473         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
7474         with %T in place of calls to dump_generic_expr.
7475         (prune_runtime_alias_test_list): Likewise.
7476         (create_runtime_alias_checks): Likewise.
7477         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
7478         (vect_analyze_data_ref_dependence): Likewise.
7479         (vect_slp_analyze_data_ref_dependence): Likewise.
7480         (vect_record_base_alignment): Likewise.  Use %G in place of call
7481         to dump_gimple_stmt.
7482         (vect_compute_data_ref_alignment): Likewise.
7483         (verify_data_ref_alignment): Likewise.
7484         (vect_find_same_alignment_drs): Likewise.
7485         (vect_analyze_group_access_1): Likewise.
7486         (vect_analyze_data_ref_accesses): Likewise.
7487         (dependence_distance_ge_vf): Likewise.
7488         (dump_lower_bound): Likewise.
7489         (vect_prune_runtime_alias_test_list): Likewise.
7490         (vect_find_stmt_data_reference): Likewise.
7491         (vect_analyze_data_refs): Likewise.
7492         (vect_create_addr_base_for_vector_ref): Likewise.
7493         (vect_create_data_ref_ptr): Likewise.
7494         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
7495         (vect_can_advance_ivs_p): Likewise.
7496         (vect_update_ivs_after_vectorizer): Likewise.
7497         (vect_gen_prolog_loop_niters): Likewise.
7498         (vect_prepare_for_masked_peels): Likewise.
7499         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
7500         (vect_determine_vectorization_factor): Likewise.
7501         (vect_is_simple_iv_evolution): Likewise.
7502         (vect_analyze_scalar_cycles_1): Likewise.
7503         (vect_analyze_loop_operations): Likewise.
7504         (report_vect_op): Likewise.
7505         (vect_is_slp_reduction): Likewise.
7506         (check_reduction_path): Likewise.
7507         (vect_is_simple_reduction): Likewise.
7508         (vect_create_epilog_for_reduction): Likewise.
7509         (vect_finalize_reduction:): Likewise.
7510         (vectorizable_induction): Likewise.
7511         (vect_transform_loop_stmt): Likewise.
7512         (vect_transform_loop): Likewise.
7513         (optimize_mask_stores): Likewise.
7514         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
7515         (vect_split_statement): Likewise.
7516         (vect_recog_over_widening_pattern): Likewise.
7517         (vect_recog_average_pattern): Likewise.
7518         (vect_determine_min_output_precision_1): Likewise.
7519         (vect_determine_precisions_from_range): Likewise.
7520         (vect_determine_precisions_from_users): Likewise.
7521         (vect_mark_pattern_stmts): Likewise.
7522         (vect_pattern_recog_1): Likewise.
7523         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
7524         (vect_record_max_nunits): Likewise.
7525         (vect_build_slp_tree_1): Likewise.
7526         (vect_build_slp_tree_2): Likewise.
7527         (vect_print_slp_tree): Likewise.
7528         (vect_analyze_slp_instance): Likewise.
7529         (vect_detect_hybrid_slp_stmts): Likewise.
7530         (vect_detect_hybrid_slp_1): Likewise.
7531         (vect_slp_analyze_operations): Likewise.
7532         (vect_slp_analyze_bb_1): Likewise.
7533         (vect_transform_slp_perm_load): Likewise.
7534         (vect_schedule_slp_instance): Likewise.
7535         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
7536         (vect_mark_stmts_to_be_vectorized): Likewise.
7537         (vect_init_vector_1): Likewise.
7538         (vect_get_vec_def_for_operand): Likewise.
7539         (vect_finish_stmt_generation_1): Likewise.
7540         (vect_check_load_store_mask): Likewise.
7541         (vectorizable_call): Likewise.
7542         (vectorizable_conversion): Likewise.
7543         (vectorizable_operation): Likewise.
7544         (vectorizable_load): Likewise.
7545         (vect_analyze_stmt): Likewise.
7546         (vect_is_simple_use): Likewise.
7547         (vect_get_vector_types_for_stmt): Likewise.
7548         (vect_get_mask_type_for_stmt): Likewise.
7549         * tree-vectorizer.c (increase_alignment): Likewise.
7551 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
7553         * doc/rtl.texi: Adjust vec_select description.
7554         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
7555         non-constant selectors.
7557 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
7559         * config/aarch64/aarch64-protos.h
7560         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
7561         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
7562         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
7563         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
7564         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
7565         (AARCH64_FL_PROFILE): Move index so flags are ordered.
7566         (AARCH64_ISA_RCPC8_4): New flag.
7567         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
7568         to aarch64_offset_9bit_signed_unscaled_p.
7569         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
7570         and use stlur.
7571         * config/aarch64/constraints.md (Ust): New constraint.
7572         * config/aarch64/predicates.md.
7573         (aarch64_9bit_offset_memory_operand): New predicate.
7574         (aarch64_rcpc_memory_operand): New predicate.
7576 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
7578         PR rtl-optimization/87361
7579         * rtlanal.c (nonzero_bits1): Revert accidental change.
7581 2018-09-19  Richard Biener  <rguenther@suse.de>
7583         PR tree-optimization/87349
7584         PR tree-optimization/87342
7585         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
7587 2018-09-18  Marek Polacek  <polacek@redhat.com>
7589         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
7590         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
7592 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
7594         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
7596 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
7598         PR rtl-optimization/86882
7599         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
7601 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
7603         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
7604         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
7606 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
7608         PR other/87353
7609         * doc/invoke.texi (Link Options): Fix formatting and grammar.
7611 2018-09-18  Richard Biener  <rguenther@suse.de>
7613         PR middle-end/63155
7614         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
7615         (compute_samebase_partition_bases): Likewise.
7616         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
7617         (gimple_can_coalesce_p): Simplify.
7619 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
7621         Handle a library implementation of ffs calling __builtin_ffs.
7622         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
7623         (mmix_init_libfuncs): New function: make __builtin_ffs expand
7624         to __ffsdi2.
7626 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
7628         * diagnostic-show-locus.c (class layout_range): Add field
7629         "m_original_idx".
7630         (layout_range::layout_range): Add "original_idx" param and use it
7631         to initialize new field.
7632         (make_range): Use 0 for original_idx.
7633         (layout::layout): Pass in index to calls to
7634         maybe_add_location_range.
7635         (layout::maybe_add_location_range): Add param "original_idx" and
7636         pass it on to layout_range.
7637         (layout::print_any_labels): Pass on range->m_original_idx to
7638         get_text call.
7639         (gcc_rich_location::add_location_if_nearby): Use 0 for
7640         original_idx.
7641         * gcc-rich-location.h (text_range_label::get_text): Update for new
7642         param.
7643         (range_label_for_type_mismatch::get_text): Likewise.
7645 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
7647         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
7649 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
7651         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
7652         format_string_diagnostic_t.
7653         (fmtwarn_n): Likewise.
7654         * substring-locations.c
7655         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
7656         (format_warning_n_va): Convert to...
7657         (format_string_diagnostic_t::emit_warning_n_va): ...this.
7658         (format_warning_va): Convert to...
7659         (format_string_diagnostic_t::emit_warning_va): ...this.
7660         (format_warning_at_substring): Convert to...
7661         (format_string_diagnostic_t::emit_warning): ...this.
7662         (format_warning_at_substring_n): Convert to...
7663         (format_string_diagnostic_t::emit_warning_n): ...this.
7664         * substring-locations.h (class format_string_diagnostic_t): New
7665         class.
7666         (format_warning_va): Convert to
7667         format_string_diagnostic_t::emit_warning_va.
7668         (format_warning_n_va): Convert to
7669         format_string_diagnostic_t::emit_warning_n_va.
7670         (format_warning_at_substring): Convert to
7671         format_string_diagnostic_t::emit_warning.
7672         (format_warning_at_substring_n): Convert to
7673         format_string_diagnostic_t::emit_warning_n.
7675 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
7676             Bernd Schmidt <bernds_cb1@t-online.de>
7678         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
7679         SImode args.
7681 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
7683         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
7684         operand 0 predicate to nonimmediate operand.
7685         (rint<mode>2_frndint): Remove insn pattern.
7686         (rint<mode>2): Change operand 1 predicate to general_operand.
7687         Extend operand 1 to XFmode and generate rintxf2 insn.
7688         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
7689         Do not use X87MODEF mode macro.
7690         (frndintxf2_<rounding>_i387): Rename from
7691         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
7692         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
7693         to XFmode and generate significandxf3 insn.
7695 2018-09-17  Richard Biener  <rguenther@suse.de>
7697         PR tree-optimization/87328
7698         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
7699         visiting unexecutable backedges when not iterating.
7700         (do_rpo_vn): Mark all edges not executable even when not
7701         iterating.
7703 2018-09-17  Martin Jambor  <mjambor@suse.cz>
7705         PR c/63886
7706         * doc/invoke.texi (Warning Options): Likewise.
7708 2018-09-17  Richard Biener  <rguenther@suse.de>
7710         PR tree-optimization/87301
7711         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
7712         clean EH info from leftover copy assignments.
7714 2018-09-17  Martin Liska  <mliska@suse.cz>
7716         PR gcov-profile/85871
7717         * gcov.c (output_intermediate_file): Fix out of bounds
7718         access.
7720 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
7722         * config/arc/arc.c: Object attributes for core4 not reflected
7723         correctly.
7724         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
7725         core3).
7727 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
7729         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
7731 2018-09-17  Martin Liska  <mliska@suse.cz>
7733         * doc/gcov.texi: Document new option --use-hotness-colors.
7734         * gcov.c (struct source_info): Declare new field.
7735         (source_info::source_info): Set default for maximum_count.
7736         (print_usage): Add new -q option.
7737         (process_args): Process it.
7738         (accumulate_line_info): Save src->maximum_count.
7739         (output_line_beginning): Make color line number if
7740         flag_use_hotness_colors is set.
7741         (output_line_details): Pass default argument value.
7742         (output_lines): Pass src->maximum_count.
7744 2018-09-17  Martin Liska  <mliska@suse.cz>
7746         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
7747         Use processor_names table.
7748         * config/i386/i386.c (ix86_default_align): Use
7749         processor_cost_table for alignment values.
7750         (ix86_option_override_internal): Use processor_names.
7751         (ix86_function_specific_print): Likewise.
7752         * config/i386/i386.h (struct processor_costs):
7753         Add alignment values.
7754         (struct ptt): Remove and replace with const char *.
7755         * config/i386/x86-tune-costs.h (struct processor_costs):
7756         Declare default alignments for all costs.
7758 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
7760         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
7761         symbolics or VR_VARYING ranges for ABS_EXPR.
7762         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
7763         when range will wrap.
7765 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
7767         PR middle-end/86864
7768         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
7769         before and after a JUMP_TABLE_DATA.
7771 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
7773         PR middle-end/87188
7774         * dojump.c (do_compare_and_jump): Canonicalize function pointers
7775         when one operand is a function pointer.  Use POINTER_TYPE_P and
7776         FUNC_OR_METHOD_TYPE_P.
7777         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
7778         * fold-const.c (build_range_check): Likewise.
7779         * match.pd (simple_comparison): Likewise.
7781 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
7783         PR c/82967
7784         * spellcheck.c (get_edit_distance_cutoff): New function.
7785         (selftest::test_edit_distance_unit_test_oneway): Rename to...
7786         (selftest::test_get_edit_distance_one_way): ...this.
7787         (selftest::test_get_edit_distance_unit): Rename to...
7788         (selftest::test_get_edit_distance_both_ways): ...this.
7789         (selftest::test_edit_distances): Move tests to this new function,
7790         and test some more pairs of strings.  Update for above renaming.
7791         (selftest::get_old_cutoff): New function.
7792         (selftest::test_get_edit_distance_cutoff): New function.
7793         (selftest::assert_suggested_for): New function.
7794         (ASSERT_SUGGESTED_FOR): New macro.
7795         (selftest::assert_not_suggested_for): New function.
7796         (ASSERT_NOT_SUGGESTED_FOR): New macro.
7797         (selftest::test_suggestions): New function.
7798         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
7799         tests to selftest::test_edit_distances and call it.  Add calls to
7800         selftest::test_get_edit_distance_cutoff and
7801         selftest::test_suggestions.
7802         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
7803         (best_match::consider): Replace hard-coded cutoff calculation with
7804         a call to...
7805         (best_match::get_cutoff): New declaration.
7806         (best_match::get_best_meaningful_candidate): Likewise.
7808 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7810         * builtins.c (fold_builtin_strlen): Remove TODO comment.
7812 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7814         revert:
7815         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7817         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
7818         terminated string literal.
7820 2018-09-14  Martin Sebor  <msebor@redhat.com>
7822         * builtins.c (unterminated_array): Handle ARRAY_REF.
7823         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
7824         * builtins.h (unterminated_array): Declare extern.
7825         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
7826         arrays.
7827         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
7828         calls.
7830 2018-09-14  Martin Sebor  <msebor@redhat.com>
7831             Jeff Law  <law@redhat.com>
7833         * builtins.c (unterminated_array): New.
7834         (expand_builtin_strcpy): Adjust.
7835         (expand_builtin_strcpy_args): Detect unterminated arrays.
7836         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
7837         unterminated arrays.
7838         * gimple-fold.h (get_maxval_strlen): Add argument.
7839         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
7841         * gimple-fold.c (get_range_strlen): Add argument.
7842         (get_maxval_strlen): Adjust.
7843         * gimple-fold.h (get_range_strlen): Add argument.
7845 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
7847         * config/i386/movdirintrin.h: Fix copyright year.
7849 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
7851         * reg-stack.c: Include regs.h.
7852         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
7853         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
7854         FIRST_STACK_REG, not DFmode.
7855         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
7856         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
7857         (change stack): Default register mode to the reg_raw_mode of
7858         FIRST_STACK_REG, not DFmode.
7859         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
7860         (*swapxf): Rename from swapxf.
7862 2018-09-14  Carl Love  <cel@us.ibm.com>
7864         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
7865         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
7867 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
7869         PR target/87224
7870         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
7871         alternatives.
7873 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
7875         PR target/85628
7876         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
7878 2018-09-14  Jason Merrill  <jason@redhat.com>
7880         Fix --enable-gather-detailed-mem-stats.
7881         * hash-table.c (hash_table_usage): Change from variable to function.
7882         * hash-table.h: Adjust.
7883         * Makefile.in: Add missing dependencies on hash-table.h.
7885 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7887         PR tree-optimization/87259
7888         PR lto/87283
7889         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
7890         execute_cse_reciprocals_1 has tried transforming.
7892 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
7894         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
7895         VR_VARYING for PLUS/MINUS_EXPR.
7897 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
7899         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
7900         formatting.
7902 2018-09-14  Richard Biener  <rguenther@suse.de>
7904         PR middle-end/63155
7905         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
7906         bits for the merged partition.
7908 2018-09-13  Martin Sebor  <msebor@redhat.com>
7909             Bernd Edlinger  <bernd.edlinger@hotmail.de>
7911         * builtins.h (c_srlen): Add argument.
7912         * builtins.c (warn_string_no_nul): New function.
7913         (c_strlen): Add argument and use it.  Update recursive calls.
7914         Pass DECL argument to string_constant to get info on non
7915         terminated strings.  Update *NONSTR as needed.
7916         (fold_builtin_strlen): Add argument to calls to c_strlen.
7917         Warn for unterminated arrays.
7918         (warn_string_no_null): Add prototype.
7919         * expr.c (string_constant): Update arguments.  Update recursive
7920         calls appropriately.  Detect missing NUL terminator and outermost
7921         declaration its missing in.
7922         Improve checks for arrays with nonzero lower bound or elements
7923         that are not a single byte.  Simplify offset computation.
7924         Simplify checks for non-NUL terminated strings.
7925         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
7926         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
7928 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7930         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
7931         correctly.
7932         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
7933         argument.  Fix range checks.
7934         * fold-const.h (c_getstr): Adjust protoype.
7935         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
7936         string is constant but contains no NUL byte.
7938         * expr.c (string_constant): Adjust function comment.
7939         Remove bogus check for zero termination.
7941         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
7943         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
7944         (get_constant_size): Don't make STRING_CSTs larger than they are.
7945         (check_string_literal): New check function for STRING_CSTs.
7946         (output_constant): Use it.
7948 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
7950         PR target/86812
7951         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
7953 2018-09-13  Richard Biener  <rguenther@suse.de>
7955         PR tree-optimization/87263
7956         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
7957         (struct unwind_state): Add max_rpo field.
7958         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
7959         Compute max_rpo, the max RPO number a block can be backwards reached
7960         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
7961         separating it from the iterating mode.
7963 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
7965         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
7966         (rfs_decision): New scheduling decision.
7968 2018-09-13  Richard Biener  <rguenther@suse.de>
7970         PR bootstrap/87134
7971         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
7972         (vn_nary_op_insert_pieces_predicated): Do not write useless
7973         valid_dominated_by_p entry outside of the allocated storage.
7975 2018-09-13  Omar Sandoval  <osandov@osandov.com>
7976             Tom de Vries  <tdevries@suse.de>
7978         PR debug/86985
7979         * dwarf2out.c (is_c): New function.
7980         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
7982 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
7984         PR target/85628
7985         * config/aarch64/aarch64.md (*aarch64_bfxil):
7986         Define.
7987         * config/aarch64/constraints.md (Ulc): Define.
7988         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
7989         Define.
7990         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
7991         New function.
7993 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
7995         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
7996         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
7997         aarch64_layout_frame call.
7998         (aarch64_expand_epilogue): Likewise.
7999         (aarch64_initial_elimination_offset): Likewise.
8000         (aarch64_get_separate_components): Likewise.
8001         (aarch64_use_return_insn_p): Likewise.
8002         (aarch64_layout_frame): Remove unneeded check.
8004 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
8006         * configure.ac: Only append
8007         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
8008         gcc_config_arguments if it was never reconfigured or last reconfigure
8009         was with different arguments.
8010         * configure: Regenerated.
8012 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
8013             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8015         PR middle-end/87290
8016         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
8017         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
8019 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
8021         PR tree-optimization/87287
8022         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
8023         X % C == 0 to X % (unsigned) C == 0 optimization to ...
8024         * match.pd (X % C == 0): ... here.  New optimization.
8026 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
8028         PR middle-end/82853
8029         * expr.h (maybe_optimize_mod_cmp): Declare.
8030         * expr.c (mod_inv): New function.
8031         (maybe_optimize_mod_cmp): New function.
8032         (do_store_flag): Use it.
8033         * cfgexpand.c (expand_gimple_cond): Likewise.
8035 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
8036             Julian Brown  <julian@codesourcery.com>
8038         PR middle-end/86336
8039         * gimplify.c (gimplify_scan_omp_clauses): Set
8040         target_firstprivatize_array_bases in OpenACC parallel and kernels
8041         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
8042         OpenACC data regions.
8044 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
8046         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
8047         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
8049 2018-09-12  Richard Biener  <rguenther@suse.de>
8051         PR tree-optimization/87280
8052         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
8053         edge but unreachable target.
8054         (do_rpo_vn): For conservatively handling a PHI only mark
8055         the backedge executable but not the block reachable.
8057 2018-09-12  Richard Biener  <rguenther@suse.de>
8059         PR tree-optimization/87266
8060         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
8061         visited blocks.
8063 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
8065         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
8066         constants.
8067         ("trunc<BFP:mode><DFP_ALL:mode>2")
8068         ("trunc<DFP_ALL:mode><BFP:mode>2")
8069         ("extend<BFP:mode><DFP_ALL:mode>2")
8070         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
8071         according to the target operand type.
8073 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
8074             Andreas Krebbel  <krebbel@linux.ibm.com>
8076         PR tree-optimization/86844
8077         * gimple-ssa-store-merging.c
8078         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
8079         there are any overlapping stores in between them, make sure they are
8080         also coalesced or we give up completely.
8082 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
8084         PR middle-end/87248
8085         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
8086         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
8088 2018-09-12  Tom de Vries  <tdevries@suse.de>
8090         * common.opt (gdescribe-dies): Add option.
8091         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
8092         attribute for artifical and nameless decls.
8093         (dwarf2out_register_external_die): Add description attribute to
8094         external reference die.
8095         (add_desc_attribute): New functions.
8096         (gen_subprogram_die): Add description attribute to
8097         DW_TAG_call_site_parameter.
8098         * tree-pretty-print.c (print_generic_expr_to_str): New function.
8099         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
8100         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
8101         -gno-describe-dies.
8102         (@item -gdescribe-dies): Add.
8104 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
8106         * tree-vrp.c (vrp_shift_undefined_p): Remove.
8107         (extract_range_from_binary_expr_1: Call
8108         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
8109         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
8110         depend on sign.
8112 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
8114         * gimple-ssa-warn-alloca.c
8115         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
8116         field for ALLOCA_BOUND_*_LARGE.
8118 2018-09-11  Nathan Sidwell  <nathan@acm.org>
8120         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
8122 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
8124         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
8125         for clobbers.  Remove obsolete comment.
8127 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
8129         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
8130         mpxchk, mpxld and mpxst types.
8131         (define_attr length_immediate): Remove all processing of mpx types.
8132         (define_attr prefix_0f): Ditto.
8133         (define_attr memory): Ditto.
8135 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
8137         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
8138         (log<mode>2): Change operand 1 predicate to general_operand.
8139         Extend operand 1 to XFmode and generate logxf3 insn.
8140         (log10<mode>2): Change operand 1 predicate to general_operand.
8141         Extend operand 1 to XFmode and generate log10xf3 insn.
8142         (log2<mode>2): Change operand 1 predicate to general_operand.
8143         Extend operand 1 to XFmode and generate log2xf3 insn.
8144         (fyl2xp1_extend<mode>xf3_i387): Remove.
8145         (log1p<mode>2): Change operand 1 predicate to general_operand.
8146         Extend operand 1 to XFmode and generate log1pxf3 insn.
8147         (fxtract_extend<mode>xf3_i387): Remove.
8148         (logb<mode>2): Change operand 1 predicate to general_operand.
8149         Extend operand 1 to XFmode and generate logbxf3 insn.
8150         (ilogb<mode>2): Change operand 1 predicate to general_operand.
8151         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
8152         (significand<mode>2): Change operand 1 predicate to general_operand.
8153         Extend operand 1 to XFmode and generate significandxf3 insn.
8155 2018-09-11  Nathan Sidwell  <nathan@acm.org>
8157         * gcc.c (perror_with_name, pfatal_with_name): Delete.
8158         (load_specs): Use fatal_error.
8159         (DELETE_IF_ORDINARY, process_command): Use error.
8160         (execute, run_attempt): Use fatal_error.
8162 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
8164         * diagnostic-core.h (sorry_at): New prototype.
8165         * diagnostic.c (sorry_at): New function.
8167 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
8169         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
8170         by zero as VR_UNDEFINED.
8172 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
8174         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
8175         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
8176         (<sincos>mode2): New expander.
8177         (sincos_extend<mode>xf3_i387): Remove insn pattern.
8178         (sincos -> sin, cos splitters): Remove splitter patterns.
8179         (sincos<mode>3): Change operand 2 predicate to general_operand.
8180         Extend operand 2 to XFmode and generate sincosxf3 insn.
8181         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
8182         Change operand 3 predicate to const1_operand.
8183         (fptan_extend<mode>xf4_i387): Remove insn pattern.
8184         (tanxf2): Update operands in the call to fptanxf4_i387.
8185         (tan<mode>2): Change operand 1 predicate to general_operand.
8186         Extend operand 1 to XFmode and generate tanxf3 insn.
8187         (atan2xf3): Rename from *fpatanxf3_i387.
8188         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
8189         (atan2xf3): Remove expander.
8190         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
8191         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
8192         (atan<mode>2): Change operand 1 predicate to general_operand.
8193         Extend operand 1 to XFmode and generate atanxf3 insn.
8195 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
8197         * config/i386/i386.md (x87/SSE constant load splitter): Use
8198         memory_operand instead of nonimmediate_operand for input operand
8199         predicate.
8201 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
8203         * config/i386/i386.md (float partial SSE register stall splitter): Move
8204         splitter near its instruction pattern.
8205         (float_extend partial SSE register stall splitter): Ditto.
8206         (float_truncate partial SSE register stall splitter): Ditto.
8208 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
8210         PR target/86794
8211         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8212         to speculation_safe_value_not_needed.
8214         PR target/85666
8215         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
8216         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
8217         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
8218         leaf_function_p, instead use has_hard_reg_initial_val.
8220 2018-09-09  Nathan Sidwell  <nathan@acm.org>
8222         * gcc.h (pfatal_with_name): Don't declare here.
8223         * gcc.c (pfatal_with_name): Make static.
8225 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
8227         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
8228         earlyclobber.
8230 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
8232         PR rtl-optimization/85458
8233         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
8234         priority hook to reduce the priority of EXPR.
8236 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
8238         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
8239         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
8240         with X87_ENABLE_FLOAT.  Remove preparation code.
8241         (*float<SWI48:mode><MODEF:mode>2): Rename from
8242         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
8243         math using "enabled" attribute.
8244         (*floatdi<MODEF:mode>2_i387): Rename from
8245         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
8246         enable for 32bit targets only.
8247         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
8248         splitter.
8249         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
8250         as operand 1 predicate.  Rewrite as define_insn_and_split.
8251         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
8253 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
8255         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
8256         to fallthru to FLOAT case.
8258 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
8260         PR target/86731
8261         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
8262         around folding of vec_sl to handle out of range shift values.
8264 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
8266         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
8267         Update callers to gen_fix_trunc<mode>_i387_fisttp
8268         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
8269         nonimmediate_operand.
8270         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
8271         and corresponding splitters.
8272         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
8273         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
8274         (fix_truncdi_i387_with_temp): Remove insn pattern
8275         and corresponding splitters.
8276         (fix_trunc<mode>_i387): Change operand 0 predicate to
8277         nonimmediate_operand.
8278         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
8279         and corresponding splitters.
8280         (*fistdi2_1): Remove.
8281         (fistdi2): Ditto.
8282         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
8283         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
8284         (*fist<mode>2_1): Remove.
8285         (fist<mode>2): Ditto.
8286         (fist<mode>2_with_temp): Remove insn pattern and corresponding
8287         splitters.
8288         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
8289         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
8290         (fistdi2_<rounding>): Change operand 0 predicate to
8291         nonimmediate_operand.
8292         (fistdi2_<rounding>_with_temp): Remove insn pattern
8293         and corresponding splitters.
8294         (fist<mode>2_<rounding>): Change operand 0 predicate to
8295         nonimmediate_operand.
8296         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
8297         and corresponding splitters.
8299         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
8301 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8303         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
8304         the init value.
8306 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
8308         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
8309         early gimple folding of vec_splat().
8310         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
8311         * gimple-fold.h: Add an extern define for tree_vec_extract().
8313 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
8315         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
8316         wrappers around TREE_TYPE comparisons.
8318 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
8320         PR target/80080
8321         * config/s390/predicates.md: Add nonsym_memory_operand.
8322         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
8323         contains a SYMBOL_REF, load it into an intermediate pseudo.
8324         (s390_emit_compare_and_swap): Legitimize operand.
8325         * config/s390/s390.md: Use the new nonsym_memory_operand
8326         with UNSPECV_CAS patterns.
8328 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
8330         PR target/80080
8331         * config/s390/s390-passes.def: New file.
8332         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
8333         declaration.
8334         (make_pass_s390_early_mach): Add declaration.
8335         * config/s390/s390.c (make_pass_s390_early_mach):
8336         (s390_option_override): Remove dynamic registration.
8337         * config/s390/t-s390: Add s390-passes.def.
8339 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
8341         * config/s390/s390.c (s390_decompose_constant_pool_ref):
8342         Remove UNSPEC_LTREL_BASE check.
8343         (annotate_constant_pool_refs): Likewise.
8344         (find_constant_pool_ref): Likewise.
8345         (find_ltrel_base): Removed.
8346         (replace_ltrel_base): Removed.
8347         (s390_mainpool_finish): Remove replace_ltrel_base call.
8348         (s390_chunkify_start): Remove pending LTREL_BASE logic.
8349         (s390_chunkify_finish): Remove replace_ltrel_base call.
8350         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
8352 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
8354         PR target/86779
8355         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
8356         to speculation_safe_value_not_needed.
8358 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
8359             Bernd Schmidt  <bernds_cb1@t-online.de>
8361         * config/nvptx/nvptx-opts.h: New file.
8362         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
8363         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
8364         (ASM_SPEC): Define.
8365         (TARGET_SM35): New macro.
8366         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
8367         correct predicate.
8368         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
8369         values.
8370         (misa=): New option.
8371         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
8373 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
8375         * config/i386/i386.md (truncdfsf2): Remove expander.
8376         (truncdfsf2_with_temp): Ditto.
8377         (truncxf<mode>2): Ditto.
8378         (*truncdfsf_fast_mixed): Remove insn pattern.
8379         (*truncdfsf_fast_i387): Ditto.
8380         (*truncdfsf_mixed): Ditto.
8381         (*truncdfsf_i387): Ditto.
8382         (*truncdfsf2_i387_1): Ditto.
8383         (*truncxfsf2_mixed): Ditto.
8384         (*truncxfdf2_mixed): Ditto.
8385         (*truncxf<mode>2_i387_noop): Ditto. Update callers
8386         to call gen_truncxf<mode>2 instead.
8387         (*truncxf<mode>2_i387): Remove.
8388         (reg->reg splitters): Remove splitter pattern.
8389         (reg->mem splitters): Ditto.
8391         (truncdfsf2): New insn pattern.
8392         (truncxf<mode>2): Ditto.
8394 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8396         * tree-ssa-math-opts.c (is_mult_by): New function.
8397         (is_square_of): Use the above.
8398         (optimize_recip_sqrt): New function.
8399         (pass_cse_reciprocals::execute): Use the above.
8401 2018-09-05  Richard Biener  <rguenther@suse.de>
8403         PR bootstrap/87134
8404         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
8405         to zero-init the emplaced vec.
8407 2018-09-05  Martin Liska  <mliska@suse.cz>
8409         PR tree-optimization/87205
8410         * tree-switch-conversion.c (pass_lower_switch::execute):
8411         Group cases for switch statements.
8413 2018-09-05  Richard Biener  <rguenther@suse.de>
8415         PR tree-optimization/87217
8416         * tree-ssa-sccvn.c (vuse_valueize): New.
8417         (vn_reference_lookup_pieces): Use it.
8418         (vn_reference_lookup): Likewise.
8420 2018-09-05  Nathan Sidwell  <nathan@acm.org>
8422         PR c++/87137
8423         * stor-layout.c (place_field): Scan forwards to check last
8424         bitfield when ms_bitfield_placement is in effect.
8426 2018-09-05  Richard Biener  <rguenther@suse.de>
8428         PR bootstrap/87225
8429         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
8430         return.
8432 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
8433             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
8435         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
8436         * config.gcc (extra_objs): Build it.
8437         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
8438         Likewise.
8439         * config/aarch64/aarch64-passes.def
8440         (pass_tag_collision_avoidance): New pass.
8441         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
8442         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
8443         (aarch64_classify_address): Remove static qualifier.
8444         (aarch64_address_info, aarch64_address_type): Move to...
8445         * config/aarch64/aarch64-protos.h: ... here.
8446         (make_pass_tag_collision_avoidance): New function.
8447         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
8448         New tuning flag.
8450 2018-09-05  Martin Liska  <mliska@suse.cz>
8452         * doc/gcov.texi: Update documentation of humar
8453         readable mode.
8454         * gcov.c (format_count): Print one decimal place, it provides
8455         more fine number of situations like '1G' vs. '1.4G'.
8457 2018-09-05  Martin Liska  <mliska@suse.cz>
8459         PR target/87164
8460         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
8461         * optc-gen.awk: Allow 'Var' for Deprecated options in order
8462         to generate a MASK value.
8464 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
8466         PR debug/86593
8467         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
8468         if frame pointer isn't used.
8469         (compute_frame_pointer_to_fb_displacement): Likewise.
8471 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
8473         PR target/87198
8474         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
8475         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
8476         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
8477         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
8478         and OPTION_MASK_ISA_XSAVEC_UNSET.
8480 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
8482         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
8483         XOR operations in NAND case.
8485 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
8487         * wide-int-range.cc (wide_int_range_convert): New.
8488         * wide-int-range.h (wide_int_range_convert): New.
8489         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
8490         code into wide_int_range_convert.
8491         (extract_range_into_wide_ints): Do not munge anti range constants
8492         into the entire domain.  Just return the range back.
8494 2018-09-04  Martin Liska  <mliska@suse.cz>
8496         * genmatch.c (output_line_directive): Add new argument
8497         fnargs.
8498         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
8500 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
8502         * doc/invoke.texi (Option Summary): Add whitespace.
8504         * doc/invoke.texi (Option Summary): Add -Waligned-new.
8506 2018-09-04  Richard Biener  <rguenther@suse.de>
8508         PR tree-optimization/87211
8509         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
8510         backedge value we're supposed to treat as VARYING also number
8511         the PHI to VARYING in case it got a different value-number already.
8513 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
8515         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
8516         (extract_range_from_binary_expr_1): Do not call
8517         vrp_can_optimize_bit_op.
8518         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
8519         static.
8520         (wide_int_range_get_mask_and_bounds): New.
8521         (wide_int_range_optimize_bit_op): New.
8522         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
8523         (wide_int_range_bit_and): Same.
8524         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
8525         (wide_int_range_optimize_bit_op): New.
8526         (wide_int_range_get_mask_and_bounds): New.
8528 2018-09-04  Richard Biener  <rguenther@suse.de>
8530         PR tree-optimization/87176
8531         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
8532         variable.  When value-numbering a virtual PHI node make sure
8533         to not value-number to the backedge value.
8535 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
8537         * doc/extend.texi (Long Long, Hex Floats): Document support for
8538         long long and hex floats in more recent versions of ISO C++.
8540 2018-09-03  Richard Biener  <rguenther@suse.de>
8542         PR tree-optimization/87177
8543         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
8544         cleanup.
8546 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
8548         * bb-reorder.c (edge_order): Convert to C-qsort-style
8549         tri-state comparator.
8550         (reorder_basic_blocks_simple): Change std::stable_sort to
8551         gcc_stablesort.
8553 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
8555         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
8556         tri-state comparator.
8557         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
8559 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
8561         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
8562         (mergesort): ... here as maximum count for using netsort.
8563         (gcc_qsort): Set nlim to 3 if stable sort is requested.
8564         (gcc_stablesort): New.
8565         * system.h (gcc_stablesort): Declare.
8567 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
8569         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
8570         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
8571         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
8573 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
8575         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
8576         lxsdx and stxsdx alternatives.
8577         (*mov<mode>_hardfloat64): Ditto.
8578         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
8580 2018-09-03  Richard Biener  <rguenther@suse.de>
8582         PR tree-optimization/87200
8583         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
8584         simplify result.
8586 2018-09-03  Martin Liska  <mliska@suse.cz>
8588         PR tree-optimization/87201
8589         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
8590         Fix parenthesis in an expression.
8592 2018-09-03  Richard Biener  <rguenther@suse.de>
8594         PR tree-optimization/87197
8595         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
8596         visited.  CSE the VN_INFO hashtable lookup.
8598         PR tree-optimization/87169
8599         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
8600         iterating make sure there's no extra backedges from irreducible
8601         regions feeding the header.  Mark the destination block
8602         executable.
8604 2018-09-03  Martin Liska  <mliska@suse.cz>
8606         PR driver/83193
8607         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
8608         * common/common-targhooks.c (default_get_valid_option_values):
8609         New function.
8610         * common/common-targhooks.h (default_get_valid_option_values):
8611         Likewise.
8612         * common/config/i386/i386-common.c: Move processor_target_table
8613         from i386.c.
8614         (ix86_get_valid_option_values): New function.
8615         (TARGET_GET_VALID_OPTION_VALUES): New macro.
8616         * config/i386/i386.c (struct ptt): Move to i386-common.c.
8617         (PTA_*): Move all defined masks into i386-common.c.
8618         (ix86_function_specific_restore): Use new processor_cost_table.
8619         * config/i386/i386.h (struct ptt): Moved from i386.c.
8620         (struct pta): Likewise.
8621         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
8622         * doc/tm.texi.in: Likewise.
8623         * opt-suggestions.c (option_proposer::suggest_option):
8624         Pass prefix to build_option_suggestions.
8625         (option_proposer::get_completions): Likewise.
8626         (option_proposer::build_option_suggestions): Use the new target
8627         hook.
8628         * opts.c (struct option_help_tuple): New struct.
8629         (print_filtered_help): Use the new target hook.
8631 2018-09-03  Martin Liska  <mliska@suse.cz>
8633         PR middle-end/59521
8634         * predict.c (set_even_probabilities): Add likely_edges
8635         argument and handle cases where we have precisely one
8636         likely edge.
8637         (combine_predictions_for_bb): Catch also likely_edges.
8638         (tree_predict_by_opcode): Handle gswitch statements.
8639         * tree-cfg.h (find_case_label_for_value): New declaration.
8640         (find_taken_edge_switch_expr): Likewise.
8641         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
8642         Find pivot in decision tree based on probabily, not by number of
8643         nodes.
8645 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
8647         * doc/standards.texi (Standards): Update Objective-C reference.
8649 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
8651         * doc/install.texi (Prerequisites): Update link for MPC.
8653 2018-09-01  Michael Matz  <matz@suse.de>
8655         PR tree-optimization/87074
8656         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
8657         PHIs for outer-loop uses.
8659 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
8661         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
8662         * doc/invoke.texi (C Dialect Options): Ditto.
8664 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
8666         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
8668 2018-08-31  Richard Biener  <rguenther@suse.de>
8670         PR tree-optimization/87168
8671         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
8672         (rpo_elim::eliminate_avail): When OP was not visited it must
8673         be available.
8675 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
8677         * tree-vrp.c (copy_value_range): Convert param "from" from
8678         "value_range *" to "const value_range *".
8679         (range_is_null): Likewise for param "vr".
8680         (range_int_cst_p): Likewise.
8681         (range_int_cst_singleton_p): Likewise.
8682         (symbolic_range_p): Likewise.
8683         (value_ranges_intersect_p): Likewise for both params.
8684         (value_range_nonnegative_p): Likewise for param "vr".
8685         (value_range_constant_singleton): Likewise.
8686         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
8687         (extract_range_into_wide_ints): Likewise for param "vr".
8688         (extract_range_from_multiplicative_op): Likewise for params "vr0"
8689         and "vr1".
8690         (vrp_can_optimize_bit_op): Likewise.
8691         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
8692         "vr1_".
8693         (extract_range_from_unary_expr): Likewise.
8694         (debug_value_range): Likewise for param "vr".
8695         (value_range::dump): Add "const" qualifier.
8696         (vrp_prop::check_array_ref): Convert local "vr" from
8697         "value_range *" to "const value_range *".
8698         (vrp_prop::check_mem_ref): Likewise.
8699         (vrp_prop::visit_stmt): Likewise for local "old_vr".
8700         (vrp_intersect_ranges_1): Likewise for param "vr_1".
8701         (vrp_intersect_ranges): Likewise.
8702         (simplify_stmt_for_jump_threading): Likewise for local "vr".
8703         (vrp_prop::vrp_finalize): Likewise.
8704         * tree-vrp.h (value_range::dump): Add "const" qualifier.
8705         (vrp_intersect_ranges): Add "const" qualifier to params as above.
8706         (extract_range_from_unary_expr): Likewise.
8707         (value_range_constant_singleton): Likewise.
8708         (symbolic_range_p): Likewise.
8709         (copy_value_range): Likewise.
8710         (extract_range_from_binary_expr_1): Likewise.
8711         (range_int_cst_p): Likewise.
8712         (vrp_set_zero_nonzero_bits): Likewise.
8713         (range_int_cst_singleton_p): Likewise.
8715 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
8717         * config/aarch64/arm_neon.h (vabsd_s64): New.
8718         (vnegd_s64): Likewise.
8720 2018-08-31  Martin Jambor  <mjambor@suse.cz>
8722         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
8724 2018-08-31  Martin Liska  <mliska@suse.cz>
8726         * ipa-icf.c (sem_item::add_type): Use
8727         sem_item::m_type_hash_cache.
8728         * ipa-icf.h: Move the cache from sem_item_optimizer
8729         to sem_item.
8731 2018-08-31  Nathan Sidwell  <nathan@acm.org>
8733         * doc/extend.texi (Backwards Compatibility): Remove implicit
8734         extern C leeway of () being (...).
8736 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8738         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
8740 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
8742         PR target/86684
8743         PR target/87149
8744         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
8746 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
8748         PR middle-end/87138
8749         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
8750         gen_int_mode.  Formatting fixes.
8752 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
8754         * target.def (custom_function_descriptors): Improve documentation.
8755         * doc/tm.texi.in (Trampolines): Expand discussion of function
8756         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
8757         beginning of the section.
8758         * doc/tm.texi: Regenerated.
8760 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
8762         * cfg.h (class auto_edge_flag): Spell out the template-id of the
8763         base class in the initializer list.  This is a workaround for
8764         building with older GCC.
8765         (class auto_bb_flag): Likewise.
8767 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
8769         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
8770         (altivec_vcmpequ<VI_char>_p): Remove star.
8771         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
8772         vector load modes.
8773         (expand_strncmp_vec_sequence): New function.
8774         (emit_final_str_compare_vec): New function.
8775         (expand_strn_compare): Add support for vector strncmp.
8776         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
8777         length specification to bytes.
8778         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
8779         (vcmpnezb_p): New pattern.
8780         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
8781         for option -mstring-compare-inline-limit.
8783 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
8785         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
8786         (PTA_SKYLAKE): Add PTA_AES.
8787         (PTA_GOLDMONT): Likewise.
8789 2018-08-29  Jan Hubicka  <jh@suse.cz>
8791         PR lto/86517
8792         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
8793         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
8795 2018-08-29  Jan Hubicka  <jh@suse.cz>
8797         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
8798         TYPE_STUB_DECL.
8799         (hash_tree): Do not visit TYPE_STUB_DECL.
8800         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
8801         stream TYPE_STUB_DECL.
8802         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
8803         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
8804         after free_lang_data.
8805         (type_in_anonymous_namespace_p): Likewise.
8807 2018-08-29  Jan Hubicka  <jh@suse.cz>
8809         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
8810         comment that it has to be even number.
8811         (class sreal): Change m_sig type to int32_t.
8812         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
8813         int64_t for temporary calculations.
8814         (sreal_verify_basics): Drop one bit from minimum and maximum.
8816 2018-08-30  Richard Biener  <rguenther@suse.de>
8818         PR tree-optimization/87147
8819         * tree-ssa-sccvn.c (SSA_VISITED): New function.
8820         (visit_phi): When the degenerate result is from the backedge and
8821         we didn't visit its definition yet drop to VARYING.
8822         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
8824 2018-08-29  Jan Hubicka  <jh@suse.cz>
8826         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
8827         DECL_VINDEX.
8828         (hash_tree): Likewise.
8830 2018-08-29  Jan Hubicka  <jh@suse.cz>
8832         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
8833         and TYPE_NEXT_REF_TO.
8835 2018-08-29  Jan Hubicka  <jh@suse.cz>
8837         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
8838         comment that it has to be even number.
8839         (class sreal): Change m_sig type to int32_t.
8840         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
8841         int64_t for temporary calculations.
8842         (sreal_verify_basics): Drop one bit from minimum and maximum.
8844 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
8846         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
8848 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
8850         PR middle-end/86995
8851         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
8852         if to_add is negative.
8854 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8856         PR middle-end/87053
8857         * builtins.c (c_strlen): Improve range checks.
8859 2018-08-29  Martin Sebor  <msebor@redhat.com>
8860             Jeff Law  <law@redhat.com>
8862         PR tree-optimization/86714
8863         PR tree-optimization/86711
8864         * builtins.c (c_strlen): Add arguments to call to string_constant.
8865         * expr.c (string_constant): Add argument.  Detect missing nul
8866         terminator and outermost declaration it's missing in.
8867         * expr.h (string_constant): Add argument.
8868         * fold-const.c (read_from_constant_string): Add arguments to call to
8869         string_constant.
8870         (c_getstr): Likewise.
8871         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
8872         to string_constant.
8873         * tree-ssa-strlen.c (get_stridx): Likewise.
8875 2018-08-29  Jan Hubicka  <jh@suse.cz>
8877         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
8878         Do not stream DECL_VINDEX.
8879         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
8880         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
8881         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
8883 2018-08-29  Richard Biener  <rguenther@suse.de>
8885         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
8886         virtual operands that are not default defs to honor region
8887         boundaries.
8888         (rpo_vn_valueize): Remove ineffective code here.
8890 2018-08-29  Richard Biener  <rguenther@suse.de>
8892         PR tree-optimization/87132
8893         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
8894         when skipping defs reachable over backedges.
8896 2018-08-29  Richard Biener  <rguenther@suse.de>
8898         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
8899         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
8900         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
8901         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
8902         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
8903         (vn_reference_lookup_3): Remove use of const_parms.
8904         (free_rpo_vn): Do not free const_parms.
8905         (do_rpo_vn): Do not call init_const_parms.
8906         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
8907         SSA_NAME_POINTS_TO_READONLY_MEMORY.
8908         (call_may_clobber_ref_p_1): Likewise.
8910 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
8912         PR other/86726
8913         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
8914         (-O): Ditto.
8915         (-ftree-scev-cprop): Document.
8917 2018-08-29  Jan Hubicka  <jh@suse.cz>
8919         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
8920         parameters.
8921         (sreal constructor): Update.
8922         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
8923         sreal:operator/): Update.
8925 2018-08-29  Martin Liska  <mliska@suse.cz>
8927         * tree-switch-conversion.c (switch_conversion::expand):
8928         Strenghten assumption about gswitch statements.
8930 2018-08-29  Richard Biener  <rguenther@suse.de>
8932         PR tree-optimization/87117
8933         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
8934         re-value-number released SSA VDEFs.
8936 2018-08-29  Richard Biener  <rguenther@suse.de>
8938         PR tree-optimization/87126
8939         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
8941 2018-08-28  Jim Wilson  <jimw@sifive.com>
8943         * config/riscv/pic.md: Rewrite.
8944         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
8945         invalid address.
8946         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
8947         (SOFTF, default_load, softload, softstore): New.
8949 2018-08-28  Jeff Law  <law@redhat.com>
8951         * fold-const.c (fold_binary_loc): Remove recently added assert.
8953 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
8955         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
8956         to OP parmeter of generated function.
8958 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
8960         PR tree-optimization/87009
8961         * match.pd: Add boolean optimizations.
8963 2018-08-28  Martin Sebor  <msebor@redhat.com>
8965         PR middle-end/86631
8966         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
8967         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
8968         (pass_walloca::gate): Use it.
8969         (alloca_call_type): Same.
8970         (pass_walloca::execute): Same.
8971         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
8973 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
8975         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
8976         GCC_VERSION for usage of "__gcc_dump_printf__" format from
8977         >= 3005 to >= 9000.
8979 2018-08-28  Richard Biener  <rguenther@suse.de>
8981         PR tree-optimization/87124
8982         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
8983         constants before looking up avail.
8985 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
8987         PR middle-end/87099
8988         * calls.c (maybe_warn_nonstring_arg): Punt early if
8989         warn_stringop_overflow is zero.  Don't call get_range_strlen
8990         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
8991         Swap comparison operands to have constants on rhs.  Only use
8992         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
8993         increment lenrng[0].
8995 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
8997         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
8998         use of tree_to_shwi.  Remove duplicated test for the size being
8999         a whole number of bytes.
9001 2018-08-28  Richard Biener  <rguenther@suse.de>
9003         PR tree-optimization/87117
9004         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
9005         Handle removed stmt without LHS (GIMPLE_NOP).
9007 2018-08-28  Richard Biener  <rguenther@suse.de>
9009         PR tree-optimization/87117
9010         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
9011         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
9013 2018-08-28  Richard Biener  <rguenther@suse.de>
9015         PR tree-optimization/87117
9016         * tree-ssa-pre.c (compute_avail): Do not make expressions
9017         with predicated values available.
9018         (get_expr_value_id): Assert we do not run into predicated value
9019         expressions.
9021 2018-08-28  Richard Biener  <rguenther@suse.de>
9023         PR tree-optimization/87117
9024         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
9025         get virtual operands.
9026         (get_expr_operands): Handle STRING_CST like other decls.
9028 2018-08-28  Martin Liska  <mliska@suse.cz>
9030         * tree.h: Update documentation of fndecl_built_in_p
9031         functions.
9034 2018-08-27  Jeff Law  <law@redhat.com>
9035         PR tree-optimization/87110
9036         * tree-ssa-dse.c (compute_trims): Handle non-constant
9037         TYPE_SIZE_UNIT.
9039 2018-08-27  Martin Sebor  <msebor@redhat.com>
9041         PR tree-optimization/86914
9042         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
9044 2018-08-27  Martin Sebor  <msebor@redhat.com>
9046         PR tree-optimization/87112
9047         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
9048         the type of the bound argument.
9050 2018-08-27  Jeff Law  <law@redhat.com>
9052         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
9053         type does not have a TYPE_SIZE_UNIT.
9055 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
9057         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
9058         with include of backend.h.
9060 2018-08-27  Richard Biener  <rguenther@suse.de>
9062         PR tree-optimization/86927
9063         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
9064         use const cond reduction code.
9066 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
9068         PR tree-optimization/85758
9069         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
9071 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
9073         PR c++/87091
9074         * diagnostic-show-locus.c (class layout_range): Update for
9075         conversion of show_caret_p to a tri-state.
9076         (layout_range::layout_range): Likewise.
9077         (make_range): Likewise.
9078         (layout::maybe_add_location_range): Likewise.
9079         (layout::should_print_annotation_line_p): Don't show annotation
9080         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
9081         (layout::get_state_at_point): Update for conversion of
9082         show_caret_p to a tri-state.  Bail out early for
9083         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
9084         underlining or source colorization.
9085         (gcc_rich_location::add_location_if_nearby): Update for conversion
9086         of show_caret_p to a tri-state.
9087         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
9088         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
9089         Likewise.
9090         (selftest::test_one_liner_labels): Likewise.
9091         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
9092         conversion of show_caret_p to a tri-state.
9093         * pretty-print.c (text_info::set_location): Likewise.
9094         * pretty-print.h (text_info::set_location): Likewise.
9095         * substring-locations.c (format_warning_n_va): Likewise.
9096         * tree-diagnostic.c (default_tree_printer): Likewise.
9097         * tree-pretty-print.c (newline_and_indent): Likewise.
9099 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
9101         PR c++/87091
9102         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
9103         line above for line-insertion fix-it hints.
9104         (selftest::test_fixit_insert_containing_newline): Update the
9105         expected results, and add a test with line-numbering enabled.
9107 2018-08-27  Martin Liska  <mliska@suse.cz>
9109         PR sanitizer/86962
9110         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
9111         params with DECL_HAS_VALUE_EXPR_P.
9113 2018-08-27  Martin Liska  <mliska@suse.cz>
9115         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
9116         selected expansion strategy.
9118 2018-08-27  Martin Liska  <mliska@suse.cz>
9120         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
9121         * builtins.c (is_builtin_fn): Likewise.
9122         * attribs.c (diag_attr_exclusions): Use new function
9123         fndecl_built_in_p and remove check for FUNCTION_DECL if
9124         possible.
9125         (builtin_mathfn_code): Likewise.
9126         (fold_builtin_expect): Likewise.
9127         (fold_call_expr): Likewise.
9128         (fold_builtin_call_array): Likewise.
9129         (fold_call_stmt): Likewise.
9130         (set_builtin_user_assembler_name): Likewise.
9131         (is_simple_builtin): Likewise.
9132         * calls.c (gimple_alloca_call_p): Likewise.
9133         (maybe_warn_nonstring_arg): Likewise.
9134         * cfgexpand.c (expand_call_stmt): Likewise.
9135         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
9136         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
9137         (cgraph_node::verify_node): Likewise.
9138         * cgraphclones.c (build_function_decl_skip_args): Likewise.
9139         (cgraph_node::create_clone): Likewise.
9140         * config/arm/arm.c (arm_insert_attributes): Likewise.
9141         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
9142         * dse.c (scan_insn): Likewise.
9143         * expr.c (expand_expr_real_1): Likewise.
9144         * fold-const.c (operand_equal_p): Likewise.
9145         (fold_binary_loc): Likewise.
9146         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
9147         * gimple-low.c (lower_stmt): Likewise.
9148         * gimple-pretty-print.c (dump_gimple_call): Likewise.
9149         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
9150         Likewise.
9151         * gimple.c (gimple_build_call_from_tree): Likewise.
9152         (gimple_call_builtin_p): Likewise.
9153         (gimple_call_combined_fn): Likewise.
9154         * gimplify.c (gimplify_call_expr): Likewise.
9155         (gimple_boolify): Likewise.
9156         (gimplify_modify_expr): Likewise.
9157         (gimplify_addr_expr): Likewise.
9158         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
9159         * ipa-cp.c (determine_versionability): Likewise.
9160         * ipa-fnsummary.c (compute_fn_summary): Likewise.
9161         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
9162         * ipa-split.c (visit_bb): Likewise.
9163         (split_function): Likewise.
9164         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
9165         * lto-cgraph.c (input_node): Likewise.
9166         * lto-streamer-out.c (write_symbol): Likewise.
9167         * omp-low.c (setjmp_or_longjmp_p): Likewise.
9168         (lower_omp_1): Likewise.
9169         * predict.c (strip_predict_hints): Likewise.
9170         * print-tree.c (print_node): Likewise.
9171         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
9172         * trans-mem.c (is_tm_irrevocable): Likewise.
9173         (is_tm_load): Likewise.
9174         (is_tm_simple_load): Likewise.
9175         (is_tm_store): Likewise.
9176         (is_tm_simple_store): Likewise.
9177         (is_tm_abort): Likewise.
9178         (tm_region_init_1): Likewise.
9179         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
9180         * tree-cfg.c (verify_gimple_call): Likewise.
9181         (move_stmt_r): Likewise.
9182         (stmt_can_terminate_bb_p): Likewise.
9183         * tree-eh.c (lower_eh_constructs_2): Likewise.
9184         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
9185         * tree-inline.c (remap_gimple_stmt): Likewise.
9186         (copy_bb): Likewise.
9187         (estimate_num_insns): Likewise.
9188         (fold_marked_statements): Likewise.
9189         * tree-sra.c (scan_function): Likewise.
9190         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
9191         (optimize_stack_restore): Likewise.
9192         (pass_fold_builtins::execute): Likewise.
9193         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
9194         (mark_all_reaching_defs_necessary_1): Likewise.
9195         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
9196         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
9197         (pass_forwprop::execute): Likewise.
9198         * tree-ssa-loop-im.c (stmt_cost): Likewise.
9199         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
9200         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
9201         * tree-ssa-strlen.c (get_string_length): Likewise.
9202         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
9203         (find_func_aliases_for_call): Likewise.
9204         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
9205         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
9206         * tree-tailcall.c (find_tail_calls): Likewise.
9207         * tree.c (need_assembler_name_p): Likewise.
9208         (free_lang_data_in_decl): Likewise.
9209         (get_call_combined_fn): Likewise.
9210         * ubsan.c (is_ubsan_builtin_p): Likewise.
9211         * varasm.c (incorporeal_function_p): Likewise.
9212         * tree.h (DECL_BUILT_IN): Remove and replace with
9213         fndecl_built_in_p.
9214         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
9215         (fndecl_built_in_p): New.
9217 2018-08-27  Martin Liska  <mliska@suse.cz>
9219         PR tree-optimization/86847
9220         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
9221         Dump also subtree probability.
9222         (switch_decision_tree::do_jump_if_equal): New function.
9223         (switch_decision_tree::emit_case_nodes): Handle special
9224         situations in balanced tree that can be emitted much simpler.
9225         Fix calculation of probabilities that happen in tree expansion.
9226         * tree-switch-conversion.h (struct cluster): Add
9227         is_single_value_p.
9228         (struct simple_cluster): Likewise.
9229         (struct case_tree_node): Add new function has_child.
9230         (do_jump_if_equal): New.
9232 2018-08-27  Martin Liska  <mliska@suse.cz>
9234         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
9235         Add new argument to bit_test_cluster constructor.
9236         (bit_test_cluster::emit): Set bits really number of values
9237         handlel by a test.
9238         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
9239         probability argument.
9240         * tree-switch-conversion.h (struct bit_test_cluster):
9241         Add m_handles_entire_switch.
9243 2018-08-27  Martin Liska  <mliska@suse.cz>
9245         PR tree-optimization/86702
9246         * tree-switch-conversion.c (jump_table_cluster::emit):
9247         Make probabilities even for values in jump table
9248         according to number of cases handled.
9249         (switch_decision_tree::compute_cases_per_edge): Pass
9250         argument to reset_out_edges_aux function.
9251         (switch_decision_tree::analyze_switch_statement): Likewise.
9252         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
9253         Make it static.
9255 2018-08-27  Martin Liska  <mliska@suse.cz>
9257         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
9258         cfun argument explicitly.
9259         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
9260         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
9261         function gimple_switch_default_bb.
9262         (convert_switch_statements):
9263         (expand_builtins):
9264         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
9265         * stmt.c (label_to_block_fn): Use label_to_block and pass
9266         cfun argument explicitly and use gimple_switch_label_bb.
9267         (expand_case): Likewise.
9268         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
9269         cfun argument explicitly. Likewise.
9270         (make_edges_bb): Likewise.
9271         (make_cond_expr_edges): Likewise.
9272         (get_cases_for_edge): Likewise.
9273         (make_gimple_switch_edges): Likewise.
9274         (label_to_block_fn): Likewise.
9275         (label_to_block): Likewise.
9276         (make_goto_expr_edges): Likewise.
9277         (make_gimple_asm_edges): Likewise.
9278         (main_block_label): Likewise.
9279         (group_case_labels_stmt): Likewise.
9280         (find_taken_edge_computed_goto): Likewise.
9281         (find_taken_edge_switch_expr): Likewise.
9282         (gimple_verify_flow_info): Likewise.
9283         (gimple_redirect_edge_and_branch): Likewise.
9284         (gimple_switch_label_bb): New function.
9285         (gimple_switch_default_bb): Likewise.
9286         (gimple_switch_edge): Likewise.
9287         (gimple_switch_default_edge): Likewise.
9288         * tree-cfg.h (label_to_block_fn): Remove and replace ...
9289         (label_to_block): ... with this.
9290         (gimple_switch_label_bb): New.
9291         (gimple_switch_default_bb): Likewise.
9292         (gimple_switch_edge): Likewise.
9293         (gimple_switch_default_edge): Likewise.
9294         * tree-cfgcleanup.c (convert_single_case_switch): Use
9295         new gimple functions and pass new argument to label_to_block.
9296         (cleanup_control_flow_bb):
9297         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
9298         cfun argument explicitly.
9299         (make_eh_edges): Likewise.
9300         (redirect_eh_dispatch_edge): Likewise.
9301         (lower_resx): Likewise.
9302         (lower_eh_dispatch): Likewise.
9303         (maybe_remove_unreachable_handlers): Likewise.
9304         (unsplit_eh): Likewise.
9305         (cleanup_empty_eh): Likewise.
9306         (verify_eh_edges): Likewise.
9307         (verify_eh_dispatch_edge): Likewise.
9308         * tree-ssa-dom.c (record_edge_info): Likewise.
9309         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
9310         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
9311         (thread_through_normal_block): Likewise.
9312         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
9313         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
9314         * tree-switch-conversion.c (switch_conversion::collect): Use new
9315         gimple functions.
9316         (switch_conversion::check_final_bb): Likewise.
9317         (switch_conversion::gather_default_values): Pass new argument
9318         to label_to_block.
9319         (switch_conversion::build_constructors): Likewise.
9320         (switch_decision_tree::compute_cases_per_edge): Use new
9321         gimple_switch_edge function.
9322         (switch_decision_tree::analyze_switch_statement): Pass new argument
9323         to label_to_block.
9324         (switch_decision_tree::try_switch_expansion): Use
9325         gimple_switch_default_edge.
9326         * tree-vrp.c (find_switch_asserts): Pass new argument
9327         to label_to_block.
9328         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
9329         (vr_values::simplify_switch_using_ranges): Likewise.
9331 2018-08-27  Richard Biener  <rguenther@suse.de>
9333         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
9334         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
9336         * tree-ssa-sccvn.h (struct vn_pval): New structure.
9337         (struct vn_nary_op_s): Add unwind_to member.  Add
9338         predicated_values flag and put result into a union together
9339         with a linked list of vn_pval.
9340         (struct vn_ssa_aux): Add name member to make maintaining
9341         a map of SSA name to vn_ssa_aux possible.  Remove no longer
9342         needed info, dfsnum, low, visited, on_sccstack, use_processed
9343         and range_info_anti_range_p members.
9344         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
9345         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
9346         New functions.
9347         (vn_valueize): New global.
9348         (vn_context_bb): Likewise.
9349         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
9350         VN_INFO_PTR_INFO): Remove.
9351         * tree-ssa-sccvn.c: ... (rewrite)
9352         (pass_fre::execute): For -O2+ initialize loops and run
9353         RPO VN in optimistic mode (iterating).  For -O1 and -Og
9354         run RPO VN in non-optimistic mode.
9355         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
9356         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
9357         * doc/invoke.texi (sccvn-max-scc-size): Remove.
9358         (rpo-vn-max-loop-depth): Document.
9359         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
9360         when valuezing the VUSE signals we walked out of the region.
9361         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
9362         (phi_translate): Set VN context block to use for availability
9363         lookup.
9364         (compute_avail): Likewise.
9365         (pre_valueize): New function.
9366         (pass_pre::execute): Adjust to the RPO VN API.
9368         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
9369         (propagate_constants_for_unrolling): Remove.
9370         (tree_unroll_loops_completely): Perform value-numbering
9371         on the unrolled bodies loop parent.
9373 2018-08-27  Richard Biener  <rguenther@suse.de>
9375         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
9376         for partial antic compute.
9378 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
9380         PR rtl-optimization/87065
9381         * combine.c (simplify_if_then_else): Formatting fix.
9382         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
9383         check.
9384         (known_cond): Don't return const_true_rtx for vector modes.  Use
9385         CONST0_RTX instead of const0_rtx.  Formatting fixes.
9387 2018-08-27  Martin Liska  <mliska@suse.cz>
9389         PR gcov-profile/87069
9390         * gcov.c (process_file): Record files already processed
9391         and warn about a file being processed multiple times.
9393 2018-08-27  Martin Liska  <mliska@suse.cz>
9395         PR driver/83193
9396         * config/aarch64/aarch64.c (aarch64_override_options_internal):
9397         Set default values for x_aarch64_*_string strings.
9398         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
9399         prefix.  For -mabi do not print '=ABI' in help and use
9400         <option_value> format for -msve-vector-bits and -moverride
9401         options.
9403 2018-08-26  Jeff Law  <law@redhat.com>
9405         * config/mips/frame-header-opt.c: Include "backend.h" rather than
9406         "cfg.h"
9408 2018-08-26  Marek Polacek  <polacek@redhat.com>
9410         PR c++/87029, Implement -Wredundant-move.
9411         * doc/invoke.texi: Document -Wredundant-move.
9413 2018-08-25  Martin Sebor  <msebor@redhat.com>
9415         PR tree-optimization/87059
9416         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
9417         to the same type as the other.
9418         * fold-const.c (fold_binary_loc): Assert expectation.
9420 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
9422         * config/darwin.c (machopic_legitimize_pic_address): Clean up
9423         extraneous parentheses, dead code section and formatting.
9425 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
9427         PR c++/87091
9428         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
9429         wide enough for jumps in the line-numbering to be visible.
9430         (layout::print_gap_in_line_numbering): New member function.
9431         (layout::calculate_line_spans): When using line numbering, merge
9432         line spans that are only 1 line apart.
9433         (diagnostic_show_locus): When printing line numbers, show gaps in
9434         line numbering directly, rather than printing headers.
9435         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
9436         line-numbering with multiple line spans.
9437         (selftest::test_fixit_insert_containing_newline_2): Add test of
9438         line-numbering, in which the spans are close enough to be merged.
9440 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
9442         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
9443         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
9444         * tree-vrp.c (range_is_nonnull): Remove.
9445         (range_includes_zero_p): Accept value_range instead of min/max.
9446         (extract_range_from_binary_expr_1): Do not early bail on
9447         POINTER_PLUS_EXPR.
9448         Use range_includes_zero_p instead of range_is_nonnull.
9449         (extract_range_from_unary_expr): Use range_includes_zero_p instead
9450         of range_is_nonnull.
9451         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
9452         special case VR_ANTI_RANGE.
9453         (vrp_finalize): Same.
9454         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
9455         instead of min/max.
9456         (range_is_nonnull): Remove.
9457         * vr-values.c (vrp_stmt_computes_nonzero): Use
9458         range_includes_zero_p instead of range_is_nonnull.
9459         (extract_range_basic): Pass value_range to range_includes_zero_p
9460         instead of range_is_nonnull.
9462 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
9464         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
9465         * emit-rtl.h (rtl_data): Remove return_bnd.
9466         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
9467         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
9468         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
9469         (POINTER_BOUNDS_MODE): Remove definition.
9470         (make_pointer_bounds_mode): Remove.
9471         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
9472         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
9473         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
9474         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
9475         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
9476         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
9477         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
9479         * config/i386/i386-modes.def (BND32, BND64): Remove.
9480         * config/i386/i386.c (dbx_register_map): Remove bound registers.
9481         (dbx64_register_map): Ditto.
9482         (svr4_dbx_register_map): Ditto.
9483         (indirect_thunk_bnd_needed): Remove.
9484         (indirect_thunks_bnd_used): Ditto.
9485         (indirect_return_bnd_needed): Ditto.
9486         (indirect_return_via_cx_bnd): Ditto.
9487         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
9488         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
9489         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
9490         (output_indirect_thunk_function): Remove handling of
9491         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
9492         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
9493         (ix86_save_reg): Remove handling of crtl->return_bnd.
9494         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
9495         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
9496         and UNSPEC_BNDLX_ADDR.
9497         (ix86_output_indirect_branch_via_reg): Remove handling of
9498         indirect_thunk_prefix_bnd.
9499         (ix86_output_indirect_branch_via_push): Ditto.
9500         (ix86_output_function_return): Ditto.
9501         (ix86_output_indirect_function_return): Ditto.
9502         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
9503         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
9504         (CALL_USED_REGISTERS): Ditto.
9505         (REG_ALLOC_ORDER): Update for removal of bound registers.
9506         (HI_REGISTER_NAMES): Ditto.
9507         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
9508         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
9509         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
9510         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
9511         (FIRST_PSEUDO_REG): Update.
9512         (BND): Remove mode iterator.
9513         * config/i386/predicates.md (bnd_mem_operator): Remove.
9515 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
9517         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
9518         vectors.
9520 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
9522         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
9523         the case in which the permute needs only a single element and
9524         repeats for every vector of the result.  Extend that case to
9525         handle variable-length vectors.
9526         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
9528 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
9530         PR debug/79342
9531         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
9532         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
9534 2018-08-24  Richard Biener  <rguenther@suse.de>
9536         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
9537         bb_flags_allocated members.
9538         (auto_flag): New RAII class for allocating flags.
9539         (auto_edge_flag): New RAII class for allocating edge flags.
9540         (auto_bb_flag): New RAII class for allocating bb flags.
9541         * cfgloop.c (verify_loop_structure): Allocate temporary edge
9542         flag dynamically.
9543         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
9544         in favor of temporarily allocated BB flag.
9545         * hsa-brig.c: Re-order includes.
9546         * hsa-dump.c: Likewise.
9547         * hsa-regalloc.c: Likewise.
9548         * print-rtl.c: Likewise.
9549         * profile-count.c: Likewise.
9551 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
9553         PR target/86989
9554         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
9555         the TOC register.
9557 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
9559         PR 87073/bootstrap
9560         * wide-int-range.cc (wide_int_range_div): Do not ignore result
9561         from wide_int_range_multiplicative_op.
9563 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9565         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
9566         "permutaion".
9568 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
9570         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
9571         to 'expanded'.
9573 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
9575         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
9576         full GENERIC expression used for replacement.
9578 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
9580         * tree-vrp.c (abs_extent_range): Remove.
9581         (extract_range_into_wide_ints): Pass wide ints by reference.
9582         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
9583         Pass wide ints by reference in all calls to
9584         extract_range_into_wide_ints.
9585         * wide-int-range.cc (wide_int_range_div): New.
9586         * wide-int-range.h (wide_int_range_div): New.
9587         (wide_int_range_includes_zero_p): New.
9588         (wide_int_range_zero_p): New.
9590 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
9592         * config/aarch64/aarch64.md (arches): New enum.
9593         (arch): New enum attr.
9594         (arch_enabled): New attr.
9595         (enabled): Now uses arch_enabled only.
9596         (simd, sve, fp16): Removed attribute.
9597         (fp): Attr now defined in terms of 'arch'.
9598         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
9599         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
9600         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
9601         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
9602         attributes into 'arch'.
9603         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
9604         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
9605         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
9606         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
9607         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
9608         'simd' attribute into 'arch'.
9609         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
9610         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
9611         Convert use of 'fp' attribute to 'arch'.
9612         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
9613         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
9614         into 'arch'.
9615         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
9616         (different modes) Merge 'fp' and 'simd' into 'arch'.
9617         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
9618         'simd' into 'arch'.
9620 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
9622         PR rtl-optimization/87026
9623         * expmed.c (canonicalize_comparison): If we can no longer create
9624         pseudoregisters, don't.
9626 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
9628         PR target/86951
9629         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
9630         prototype.
9631         * config/arm/arm.c (speculation_barrier_libfunc): New static
9632         variable.
9633         (arm_init_libfuncs): Initialize it.
9634         (arm_emit_speculation_barrier): New function.
9635         * config/arm/arm.md (speculation_barrier): Call
9636         arm_emit_speculation_barrier for architectures that do not have
9637         DSB or ISB.
9638         (speculation_barrier_insn): Only match on Armv7 or later.
9640 2018-08-23  Richard Biener  <rguenther@suse.de>
9642         PR middle-end/87024
9643         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
9644         calls.
9646 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
9648         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
9649         of single-vector TBLs.
9650         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
9651         one input is given.
9653 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
9655         PR target/85910
9656         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
9657         aarch64_evpc_tbl guard.
9659 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9661         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
9662         behaviour.
9664 2018-08-22  Martin Sebor  <msebor@redhat.com>
9666         PR middle-end/87052
9667         * tree-pretty-print.c (pretty_print_string): Add argument.
9668         (dump_generic_node): Call to pretty_print_string with string size.
9670 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
9672         PR rtl-optimization/86771
9673         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
9674         of two SETs into those two SETs, one to be placed at i2, if that SETs
9675         destination is modified between i2 and i3.
9677 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
9679         PR tree-optimization/86725
9680         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
9681         function.
9682         (vect_analyze_scalar_cycles_1): Check it.
9684 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
9686         PR tree-optimization/86725
9687         * tree-vect-loop.c (vect_is_simple_reduction): When treating
9688         an outer loop phi as a double reduction, make sure that the
9689         single user of the phi result is an inner loop phi.
9691 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
9693         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
9694         grouped stores with gaps to a strided group.
9696 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
9698         * tree-vect-stmts.c (get_group_load_store_type)
9699         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
9700         first statement in a group.
9702 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
9704         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
9705         the sequence used in gcc/gcc.c.
9707 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
9709         PR other/704
9710         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
9711         building it.
9713 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
9715         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
9716         Darwin10-specific unwinder-shim.
9717         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
9718         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
9719         New to cater for Darwin10 Rosetta.
9721 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
9723         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
9724         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
9726 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
9728         PR bootstrap/81033
9729         PR target/81733
9730         PR target/52795
9731         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
9732         (dwarf2out_switch_text_section): Generate a local label for the
9733         second function sub-section and apply it as the second FDE start
9734         label.
9735         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
9736         second sub-section start.
9738 2018-08-22  Richard Biener  <rguenther@suse.de>
9740         PR tree-optimization/86988
9741         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
9743 2018-08-22  Richard Biener  <rguenther@suse.de>
9745         PR tree-optimization/86945
9746         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
9748 2018-08-22  Alexandre Oliva <oliva@adacore.com>
9750         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
9751         a comment about how uses of r2 for .sdata2 come about.
9753 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
9755         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
9757 2018-08-21  Marek Polacek  <polacek@redhat.com>
9759         PR c++/86981, Implement -Wpessimizing-move.
9760         * doc/invoke.texi: Document -Wpessimizing-move.
9762 2018-08-21  Jan Hubicka  <jh@suse.cz>
9764         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
9765         * tree.h (is_redundant_typedef): Remove.
9766         * dwarf2out.c (is_redundant_typedef): Turn into static function.
9768 2018-08-21  Jan Hubicka  <jh@suse.cz>
9770         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
9771         when possible.
9773 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
9775         * expmed.c (extract_low_bits): Reject invalid subregs early.
9777 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9779         PR middle-end/86121
9780         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
9781         behaviour.
9783 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
9785         * config/vxworks.h: Guard vxworks_asm_out_constructor and
9786         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
9787         * config/vxworks.c: Likewise.
9789 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
9791         * config/vxworks.c: Set targetm.have_ctors_dtors
9792         if HAVE_INITFINI_ARRAY_SUPPORT.
9793         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
9794         if HAVE_INITFINI_ARRAY_SUPPORT.
9796 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
9798         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
9799         default search path for VxWorks < 7.
9801 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9803         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
9804         (get_format_string): Refer to c_getstr.
9806 2018-08-21  Tom de Vries  <tdevries@suse.de>
9808         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
9809         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
9810         (debuginfo_early_stop): Declare.
9811         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
9812         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
9813         (debuginfo_early_stop): New function.
9814         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
9815         and debuginfo_early_stop.
9816         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
9817         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
9818         (general_init): Call debuginfo_early_init.
9819         (finalize): Call debuginfo_fini.
9820         (do_compile): Call debuginfo_init.
9821         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
9822         -fdump-early-debug.
9823         (@item -fdump-debug, @item -fdump-earlydebug): Add.
9825 2018-08-21  Tom de Vries  <tdevries@suse.de>
9827         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
9828         flag_dump_noaddr and flag_dump_unnumbered.
9830 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
9832         * wide-int-range.cc (wide_int_range_abs): New.
9833         (wide_int_range_order_set): Rename from wide_int_range_min_max.
9834         * wide-int-range.h (wide_int_range_abs): New.
9835         (wide_int_range_min_max): New.
9836         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
9837         case to call wide_int_range_abs.
9838         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
9839         (extract_range_from_abs_expr): Delete.
9841 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
9843         PR target/87033
9844         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
9845         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
9846         for indexed loads.
9848 2018-08-20  Nathan Sidwell  <nathan@acm.org>
9849             Jeff Law <law@redhat.com>
9851         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
9852         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
9854 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
9856         PR other/84889
9857         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
9858         (decl_attributes): Likewise.
9859         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
9860         instance.
9861         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
9862         * diagnostic-core.h (class auto_diagnostic_group): New class.
9863         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
9864         (diagnostic_report_diagnostic): Handle the first diagnostics within
9865         a group.
9866         (emit_diagnostic): Add auto_diagnostic_group instance.
9867         (inform): Likewise.
9868         (inform_n): Likewise.
9869         (warning): Likewise.
9870         (warning_at): Likewise.
9871         (warning_n): Likewise.
9872         (pedwarn): Likewise.
9873         (permerror): Likewise.
9874         (error): Likewise.
9875         (error_n): Likewise.
9876         (error_at): Likewise.
9877         (sorry): Likewise.
9878         (fatal_error): Likewise.
9879         (internal_error): Likewise.
9880         (internal_error_no_backtrace): Likewise.
9881         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
9882         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
9883         * diagnostic.h (struct diagnostic_context): Add fields
9884         "diagnostic_group_nesting_depth",
9885         "diagnostic_group_emission_count", "begin_group_cb",
9886         "end_group_cb".
9887         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
9888         Add auto_diagnostic_group instance(s).
9889         (find_explicit_erroneous_behavior): Likewise.
9890         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
9891         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
9892         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
9893         (gimplify_va_arg_expr): Likewise.
9894         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
9895         (HSA_SORRY_AT): Likewise.
9896         * ipa-devirt.c (compare_virtual_tables): Likewise.
9897         (warn_odr): Likewise.
9898         * multiple_target.c (expand_target_clones): Likewise.
9899         * opts-common.c (cmdline_handle_error): Likewise.
9900         * reginfo.c (globalize_reg): Likewise.
9901         * substring-locations.c (format_warning_n_va): Likewise.
9902         * tree-inline.c (expand_call_inline): Likewise.
9903         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
9904         * tree-ssa-loop-niter.c
9905         (do_warn_aggressive_loop_optimizations): Likewise.
9906         * tree-ssa-uninit.c (warn_uninit): Likewise.
9907         * tree.c (warn_deprecated_use): Likewise.
9909 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
9911         PR target/87014
9912         * config/i386/i386.md (eh_return): Always update EH return
9913         address in word_mode.
9915 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
9917         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
9918         TARGET_SPLIT_COMPLEX_ARG is defined.
9920 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9922         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
9924 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
9926         PR target/86984
9927         * expr.c (expand_assignment): Assert that bitpos is positive.
9928         (store_field): Likewise
9929         (expand_expr_real_1): Make sure that bitpos is positive.
9930         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
9931         integer overflow.
9933 2018-08-20  Nathan Sidwell  <nathan@acm.org>
9935         * Makefile.in (CPP_ID_DATA_H): Delete.
9936         (CPP_INTERNAL_H): Don't add it.
9937         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
9938         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
9940 2018-08-20  Richard Biener  <rguenther@suse.de>
9942         PR tree-optimization/78655
9943         * tree-vrp.c (extract_range_from_binary_expr_1): Make
9944         pointer + offset nonnull if either operand is nonnull work.
9946 2018-08-20  Tom de Vries  <tdevries@suse.de>
9948         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
9949         unless the referenced die describes the added property using
9950         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
9951         Otherwise, add a DW_AT_location to the referenced die.
9953 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
9955         PR target/86994
9956         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
9957         register_operand when calling ix86_set_reg_reg_cost.
9958         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
9959         Set *total to 0 for operands that satisfy x86_64_immediate_operand
9960         predicate and to 1 otherwise.
9962 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
9964         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
9965         emit a diagnostic that it is not supported and reset the option.
9966         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
9967         supported and consume the option.  (ASM_FINAL_SPEC): New.
9969 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
9971         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
9972         a sentence.
9974 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
9976         C-SKY port: Documentation
9978         * doc/extend.texi (C-SKY Function Attributes): New section.
9979         * doc/invoke.texi (Option Summary): Add C-SKY options.
9980         (C-SKY Options): New section.
9981         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
9983 2018-08-17  Jojo  <jijie_rong@c-sky.com>
9984             Huibin Wang  <huibin_wang@c-sky.com>
9985             Sandra Loosemore  <sandra@codesourcery.com>
9986             Chung-Lin Tang  <cltang@codesourcery.com>
9988         C-SKY port: Backend implementation
9990         * config/csky/*: New.
9991         * common/config/csky/*: New.
9993 2018-08-17  Jojo  <jijie_rong@c-sky.com>
9994             Huibin Wang  <huibin_wang@c-sky.com>
9995             Sandra Loosemore  <sandra@codesourcery.com>
9996             Chung-Lin Tang  <cltang@codesourcery.com>
9997             Andrew Jenner  <andrew@codesourcery.com>
9999         C-SKY port: Configury
10001         * config.gcc (csky-*-*): New.
10002         * configure.ac: Add csky to targets for dwarf2 debug_line support.
10003         * configure: Regenerated.
10005 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
10007         * dump-context.h: Include "dumpfile.h".
10008         (dump_context::dump_printf_va): Convert final param from va_list
10009         to va_list *.  Convert from ATTRIBUTE_PRINTF to
10010         ATTRIBUTE_GCC_DUMP_PRINTF.
10011         (dump_context::dump_printf_loc_va): Likewise.
10012         * dumpfile.c: Include "stringpool.h".
10013         (make_item_for_dump_printf_va): Delete.
10014         (make_item_for_dump_printf): Delete.
10015         (class dump_pretty_printer): New class.
10016         (dump_pretty_printer::dump_pretty_printer): New ctor.
10017         (dump_pretty_printer::emit_items): New member function.
10018         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
10019         function.
10020         (dump_pretty_printer::emit_item): New member function.
10021         (dump_pretty_printer::stash_item): New member function.
10022         (dump_pretty_printer::format_decoder_cb): New member function.
10023         (dump_pretty_printer::decode_format): New member function.
10024         (dump_context::dump_printf_va): Reimplement in terms of
10025         dump_pretty_printer.
10026         (dump_context::dump_printf_loc_va): Convert final param from va_list
10027         to va_list *.
10028         (dump_context::begin_scope): Reimplement call to
10029         make_item_for_dump_printf.
10030         (dump_printf): Update for change to dump_printf_va.
10031         (dump_printf_loc): Likewise.
10032         (selftest::test_capture_of_dump_calls): Convert "stmt" from
10033         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
10034         with %T, %E, and %G.
10035         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
10036         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
10037         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
10038         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
10039         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
10040         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
10041         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
10042         within a dump_printf_loc call to "%wu".
10043         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
10044         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
10045         missing space after "=".
10046         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
10047         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
10048         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
10049         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
10050         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
10051         duplicate "vectorized" from message.
10053 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
10055         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
10056         polyNxK_t element's TYPE_STRING_FLAG.
10058 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
10060         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
10061         (they were unnamed before).  Fix comments.
10063 2018-08-17  Nathan Sidwell  <nathan@acm.org>
10065         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
10067 2018-08-17  Richard Biener  <rguenther@suse.de>
10069         PR tree-optimization/86841
10070         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
10072 2018-08-17  Martin Liska  <mliska@suse.cz>
10074         * common.opt: Remove Warn, Init and Report for options with
10075         Ignore/Deprecated flag. Warning is done automatically for
10076         Deprecated flags.
10077         * config/i386/i386.opt: Likewise.
10078         * config/ia64/ia64.opt: Likewise.
10079         * config/rs6000/rs6000.opt: Likewise.
10080         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
10081         Remove usage of flag_check_pointer_bounds.
10082         * lto-wrapper.c (merge_and_complain): Do not handle
10083         OPT_fcheck_pointer_bounds.
10084         (append_compiler_options): Likewise.
10085         * opt-functions.awk: Do not handle Deprecated.
10086         * optc-gen.awk: Check that Var, Report and Init are not
10087         used for an option with Ignore/Deprecated flag.
10088         * opts-common.c (decode_cmdline_option): Do not report
10089         CL_ERR_DEPRECATED.
10090         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
10091         options.
10092         * opts.h (struct cl_option): Remove cl_deprecated flag.
10093         (CL_ERR_DEPRECATED): Remove error enum value.
10095 2018-08-17  Richard Biener  <rguenther@suse.de>
10097         PR middle-end/86505
10098         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
10099         across a va-arg-pack using call adjust its return value accordingly.
10101 2018-08-16  Martin Sebor  <msebor@redhat.com>
10103         PR tree-optimization/86853
10104         * gimple-ssa-sprintf.c (struct format_result): Rename member.
10105         (struct fmtresult): Add member and initialize it in ctors.
10106         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
10107         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
10108         (format_directive): Set POSUNDER4K when MAYFAIL is set.
10109         (parse_directive): Handle %C same as %c.
10110         (sprintf_dom_walker::compute_format_length): Adjust.
10111         (is_call_safe): Adjust.
10113 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10115         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
10116         for determining how to count the elements.
10117         * builtins.h (c_strlen): Adjust prototype.
10118         * expr.c (string_constant): Add new parameter mem_size.
10119         Set *mem_size appropriately.
10120         * expr.h (string_constant): Adjust protoype.
10121         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
10122         * gimple-fold.h (get_range_strlen): Adjust prototype.
10123         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
10124         (format_string): Call get_string_length with eltsize.
10126 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
10128         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
10129         to emit the span, rather than setting it as the prefix.
10131 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
10133         * diagnostic-show-locus.c (layout::start_annotation_line): Add
10134         "margin_char" parameter, defaulting to space.  Use it in place
10135         of pp_space for the initial part of the margin.
10136         (layout::print_leading_fixits): Use '+' when filling the margin
10137         of line-insertion fix-it hints.
10139 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
10141         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
10142         Delete.
10144 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
10146         * config/rs6000/altivec.md: Don't set length attribute to the default
10147         value.
10148         * config/rs6000/darwin.md: Ditto.
10149         * config/rs6000/dfp.md: Ditto.
10150         * config/rs6000/htm.md: Ditto.
10151         * config/rs6000/rs6000.md: Ditto.
10152         * config/rs6000/sync.md: Ditto.
10153         * config/rs6000/vsx.md: Ditto.
10155 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
10157         * config/rs6000/altivec.md: Don't set length attribute to the default
10158         value, for branch instructions.
10159         * config/rs6000/darwin.md: Ditto.
10160         * config/rs6000/rs6000.md: Ditto.
10162 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
10164         * config/rs6000/rs6000.md (length): Always define as const_int 4.
10165         (unnamed conditional branch define_insn): Set length to 4 or 8
10166         depending on offset.
10167         (<bd>_<mode>): Similar, for alternative 0.
10168         (<bd>tf_<mode>): Ditto.
10170 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
10172         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
10174 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
10176         * doc/rtl.texi: Replace old RTX class names with new names.
10179 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
10181         * expmed.h (canonicalize_comparison): New declaration.
10182         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
10183         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
10184         * optabs.c (prepare_cmp_insn): Likewise.
10185         * rtl.h (unsigned_condition_p): New function which checks if a
10186         comparison operator is unsigned.
10188 2018-08-16  Nathan Sidwell  <nathan@acm.org>
10190         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
10191         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
10193 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
10195         PR target/84711
10196         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
10197         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
10198         (mov<mov>): ..this and enable unconditionally.
10200 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
10202         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
10204 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
10206         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
10207         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
10208         "Common" with "Target".
10210 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
10212         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
10213         * doc/invoke.texi (mmitigate-rop): Remove.
10214         * config/i386/i386.c: Do not include "regrename.h".
10215         (ix86_rop_should_change_byte_p, reg_encoded_number)
10216         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
10217         Remove.
10218         (ix86_reorg): Remove call to ix86_mitigate_rop.
10219         * config/i386/i386.md (attr "modrm_class"): Remove.
10220         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
10221         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
10222         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
10224 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
10226         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
10227         allow folding of mergeh() and mergel() for the float and double types.
10228         (fold_mergehl_helper): Rework to handle building a permute tree
10229         for float vectors.
10231 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
10233         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
10234         for TARGET_SSE.
10236 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
10238         * common.opt (fdiagnostics-show-labels): New option.
10239         * diagnostic-show-locus.c (class layout_range): Add field
10240         "m_label".
10241         (class layout): Add field "m_show_labels_p".
10242         (layout_range::layout_range): Add param "label" and use it to
10243         initialize m_label.
10244         (make_range): Pass in NULL for new "label" param of layout_range's
10245         ctor.
10246         (layout::layout): Initialize m_show_labels_p.
10247         (layout::maybe_add_location_range): Pass in loc_range->m_label
10248         when constructing layout_range instances.
10249         (struct line_label): New struct.
10250         (layout::print_any_labels): New member function.
10251         (layout::print_line): Call it if label-printing is enabled.
10252         (selftest::test_one_liner_labels): New test.
10253         (selftest::test_diagnostic_show_locus_one_liner): Call it.
10254         * diagnostic.c (diagnostic_initialize): Initialize
10255         context->show_labels_p.
10256         * diagnostic.h (struct diagnostic_context): Add field
10257         "show_labels_p".
10258         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
10259         -fno-diagnostics-show-labels.
10260         * dwarf2out.c (gen_producer_string): Add
10261         OPT_fdiagnostics_show_labels to the ignored options.
10262         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
10263         param.
10264         (gcc_rich_location::maybe_add_expr): Likewise.
10265         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
10266         label" param, defaulting to NULL.
10267         (gcc_rich_location::add_expr): Add "label" param.
10268         (gcc_rich_location::maybe_add_expr): Likewise.
10269         (class text_range_label): New class.
10270         (class range_label_for_type_mismatch): New class.
10271         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
10272         of format_warning_va.
10273         (fmtwarn_n): Likewise for new params of format_warning_n_va.
10274         * lto-wrapper.c (merge_and_complain): Add
10275         OPT_fdiagnostics_show_labels to the "pick one setting" options.
10276         (append_compiler_options): Likewise to the dropped options.
10277         (append_diag_options): Likewise to the passed-on options.
10278         * opts.c (common_handle_option): Handle the new option.
10279         * selftest-diagnostic.c
10280         (test_diagnostic_context::test_diagnostic_context): Enable
10281         show_labels_p.
10282         * substring-locations.c: Include "gcc-rich-location.h".
10283         (format_warning_n_va): Add "fmt_label" and "param_label" params
10284         and use them as appropriate.
10285         (format_warning_va): Add "fmt_label" and "param_label" params,
10286         passing them on to format_warning_n_va.
10287         (format_warning_at_substring): Likewise.
10288         (format_warning_at_substring_n): Likewise.
10289         * substring-locations.h (format_warning_va): Add "fmt_label" and
10290         "param_label" params.
10291         (format_warning_n_va): Likewise.
10292         (format_warning_at_substring): Likewise.
10293         (format_warning_at_substring_n): Likewise.
10294         * toplev.c (general_init): Initialize global_dc->show_labels_p.
10296 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
10298         PR testsuite/86519
10299         * builtins.c (expand_builtin_memcmp): Do not expand the call
10300         when overflow is detected.
10302 2018-08-15  Martin Sebor  <msebor@redhat.com>
10304         PR tree-optimization/71625
10305         * config/aarch64/aarch64-builtins.c
10306         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
10308 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
10310         * config/s390/s390.c (s390_reorg): Remove loop.
10312 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
10314         * config/darwin.c
10315          (darwin_function_switched_text_sections): Delete.
10316         * gcc/config/darwin.h
10317          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
10319 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
10321         PR target/81685
10322         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
10323         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
10324         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
10326 2018-08-15  Martin Liska  <mliska@suse.cz>
10328         PR tree-optimization/86925
10329         * predict.c (expr_expected_value_1): When taking
10330         later predictor, assign also probability.
10331         Use fold_build2_initializer_loc in order to fold
10332         the expression in -frounding-math.
10334 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
10336         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
10337         patterns.
10338         (expand_vec_perm_1): Try the new method.
10340 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
10342         PR target/86547
10343         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
10344         Check whether lra_live_max_point is 0 before dividing.
10346 2018-08-14  Martin Sebor  <msebor@redhat.com>
10348         PR tree-optimization/86650
10349         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
10350         (vrp_prop::check_mem_ref): Same.
10352 2018-08-13  Liu Hao <lh_mouse@126.com>
10354         * pretty-print.c (eat_esc_sequence): Swap the foreground and
10355         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
10356         and clear it thereafter, as it only works for DBCS.
10358 2018-08-13  Liu Hao <lh_mouse@126.com>
10360         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
10361         handle returned by _get_osf_handle().
10363 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
10365         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
10366         for folding vec_perm.
10368 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
10370         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
10371         Add support for gimple-folding of vec_pack() and vec_unpack()
10372         intrinsics.
10374 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
10376         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
10377         vec_xst variants to the list.
10378         (rs6000_gimple_fold_builtin): Add support for folding unaligned
10379         vector loads and stores.
10381 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
10383         * config.gcc (rs6000-ibm-aix4.x): Delete.
10384         (rs6000-ibm-aix5.1): Delete.
10385         (rs6000-ibm-aix5.2): Delete.
10386         (rs6000-ibm-aix5.3): Delete.
10387         * config/rs6000/aix43.h: Delete.
10388         * config/rs6000/aix51.h: Delete.
10389         * config/rs6000/aix52.h: Delete.
10390         * config/rs6000/t-aix43: Delete.
10392 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
10394         * config/s390/s390.c (s390_decompose_constant_pool_ref):
10395         New function.
10396         (s390_decompose_address): Factor out constant pool ref
10397         decomposition.
10399 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
10401         * config/nds32/nds32-predicates.c
10402         (nds32_can_use_bclr_p): Change return type as bool.
10403         (nds32_can_use_bset_p): Ditto.
10404         (nds32_can_use_btgl_p): Ditto.
10405         (nds32_can_use_bitci_p): Ditto.
10406         * config/nds32/nds32-protos.h
10407         (nds32_can_use_bclr_p): Change declaration.
10408         (nds32_can_use_bset_p): Ditto.
10409         (nds32_can_use_btgl_p): Ditto.
10410         (nds32_can_use_bitci_p): Ditto.
10412 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
10414         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
10415         Support -msched-prolog-epilog option.
10416         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
10418 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
10420         * common/config/nds32/nds32-common.c
10421         (nds32_option_optimization_table): Enalbe -malways-align.
10423 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
10425         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
10426         extra_headers.
10427         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
10428         OPT_misr_secure_ case.
10429         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
10430         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
10431         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
10432         secure attribute.
10433         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
10434         (nds32_isr_info): New field security_level.
10435         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
10436         * config/nds32/nds32.md (return_internal): Consider critical attribute.
10437         * config/nds32/nds32.opt (misr-secure): New option.
10438         * config/nds32/nds32_init.inc: New file.
10439         * config/nds32/nds32_isr.h: New file.
10441 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
10443         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
10444         Update comment for atomic instructions.
10445         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
10446         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
10447         Remove.
10448         (atomic_loaddi): Revise fence expansion to only emit fence prior to
10449         load for __ATOMIC_SEQ_CST model.
10450         (atomic_loaddi_1): Remove float register target.
10451         (atomic_storedi): Handle CONST_INT values.
10452         (atomic_storedi_1): Remove float register source.  Add special case
10453         for zero value.
10454         (memory_barrier): New expander and insn.
10456 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
10458         PR tree-optimization/86835
10459         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
10460         new_stmt after def_gsi, make sure to insert new_square_stmt after
10461         that stmt, not 2 stmts before it.
10463 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
10465         PR target/82418
10466         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
10467         instead of SWI48.
10469 2018-08-10  Martin Liska  <mliska@suse.cz>
10471         PR target/83610
10472         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
10473         function type.
10474         * builtins.c (expand_builtin_expect_with_probability):
10475         New function.
10476         (expand_builtin_expect_with_probability): New function.
10477         (build_builtin_expect_predicate): Add new argumnet probability
10478         for BUILT_IN_EXPECT_WITH_PROBABILITY.
10479         (fold_builtin_expect):
10480         (fold_builtin_2):
10481         (fold_builtin_3):
10482         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
10483         * builtins.h (fold_builtin_expect): Set new argument.
10484         * doc/extend.texi: Document __builtin_expect_with_probability.
10485         * doc/invoke.texi: Likewise.
10486         * gimple-fold.c (gimple_fold_call): Pass new argument.
10487         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
10488         also BUILT_IN_EXPECT_WITH_PROBABILITY.
10489         * predict.c (get_predictor_value): New function.
10490         (expr_expected_value): Add new argument probability. Assume
10491         that predictor and probability are always non-null.
10492         (expr_expected_value_1): Likewise.  For __builtin_expect and
10493         __builtin_expect_with_probability set probability.  Handle
10494         combination in binary expressions.
10495         (tree_predict_by_opcode): Simplify code by simply calling
10496         get_predictor_value.
10497         (pass_strip_predict_hints::execute): Add handling of
10498         BUILT_IN_EXPECT_WITH_PROBABILITY.
10499         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
10500         new predictor.
10501         * tree.h (DECL_BUILT_IN_P): New function.
10503 2018-08-10  Martin Liska  <mliska@suse.cz>
10505         PR tree-optimization/85799
10506         * passes.def: Add argument for pass_strip_predict_hints.
10507         * predict.c (class pass_strip_predict_hints): Add new argument
10508         early_p.
10509         (strip_predictor_early): New function.
10510         (pass_strip_predict_hints::execute): Call the function to
10511         strip predictors.
10512         (strip_predict_hints): New function.
10513         * predict.def: Fix comment.
10515 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
10517         * Makefile.in: Clarify which tm.texi to copy over to assert the
10518         right to grant a GFDL license for all.
10520 2018-08-09  Jeff Law  <law@redhat.com>
10522         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
10523         unused variable.
10525 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
10527         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
10528         prototype.
10530 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
10532         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
10533         reductions for variable-length vectors.
10535 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
10537         PR other/84889
10538         * common.opt (fdiagnostics-show-line-numbers): New option.
10539         * diagnostic-show-locus.c (class layout): Add fields
10540         "m_show_line_numbers_p" and "m_linenum_width";
10541         (num_digits): New function.
10542         (test_num_digits): New function.
10543         (layout::layout): Initialize new fields.  Update m_x_offset
10544         logic to handle any left margin.
10545         (layout::print_source_line): Print line number when requested.
10546         (layout::start_annotation_line): New member function.
10547         (layout::print_annotation_line): Call it.
10548         (layout::print_leading_fixits): Likewise.
10549         (layout::print_trailing_fixits): Likewise.  Update calls to
10550         move_to_column for new parameter.
10551         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
10552         it to potentially call start_annotation_line.
10553         (layout::show_ruler): Call start_annotation_line.
10554         (selftest::test_line_numbers_multiline_range): New selftest.
10555         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
10556         and selftest::test_line_numbers_multiline_range.
10557         * diagnostic.c (diagnostic_initialize): Initialize
10558         show_line_numbers_p.
10559         * diagnostic.h (struct diagnostic_context): Add field
10560         "show_line_numbers_p".
10561         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
10562         -fno-diagnostics-show-line-numbers.
10563         * dwarf2out.c (gen_producer_string): Add
10564         OPT_fdiagnostics_show_line_numbers to the ignored options.
10565         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
10566         one setting" options.
10567         (append_compiler_options): Likewise to the dropped options.
10568         (append_diag_options): Likewise to the passed-on options.
10569         * opts.c (common_handle_option): Handle the new option.
10570         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
10572 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10574         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
10575         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
10576         third argument of type "const signed char" to descriptions of
10577         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
10578         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
10579         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
10580         __builtin_bcdsub_ov functions.
10582 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
10584         PR tree-optimization/86858
10585         * tree-vect-loop.c (vect_is_simple_reduction): Restore
10586         flow_bb_inside_loop_p calls.
10588 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
10590         PR tree-optimization/86871
10591         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
10592         instead of gimple_assign_lhs.
10594 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
10596         PR target/86887
10597         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
10598         register constraint to operand 0.
10599         (add<mode>3_carryinC): Likewise.
10600         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
10602 2018-08-09  Martin Liska  <mliska@suse.cz>
10604         PR c/86895
10605         * common.opt: Remove extra line.
10607 2018-08-09  Martin Liska  <mliska@suse.cz>
10609         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
10610         at the end of a line, make first letter capital and end up
10611         a sentence with a dot.
10612         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
10613         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
10614         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
10615         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
10616         (PARAM_MAX_ISL_OPERATIONS): Likewise.
10617         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
10618         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
10619         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
10620         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
10621         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
10622         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
10623         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
10624         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
10625         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
10626         (PARAM_TREE_REASSOC_WIDTH): Likewise.
10627         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
10628         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
10629         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
10631 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
10633         PR target/84332
10634         * config/s390/s390.c (s390_option_override_internal): Reduce the
10635         stack-clash-protection-probe-interval param if it would be too big
10636         for z900.
10638 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
10640         PR target/46179
10641         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
10642         * config/m68k/m68k.c (handle_move_double): Don't call
10643         m68k_final_prescan_insn.
10644         (m68k_adjust_decorated_operand): Renamed from
10645         m68k_final_prescan_insn, remove first and third operand and
10646         simplify.
10647         (print_operand): Call it.
10648         (print_operand_address): Call it.
10650 2018-08-08  Nathan Sidwell  <nathan@acm.org>
10652         * diagnostic.c (diagnostic_report_current_module): Use
10653         linemap_included_from & linemap_included_from_linemap.
10655 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
10657         * config/aarch64/aarch64-cores.def: Add phecda core.
10658         * config/aarch64/aarch64-tune.md: Regenerate.
10659         * doc/invoke.texi: Add phecda core.
10661 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
10663         PR target/85295
10664         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
10665         definitions.
10666         * config/s390/s390.md ("movti"): Add more alternatives for
10667         constant to GPR copies.
10669 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
10671         * config/s390/s390.c: Fix whitespace damage throughout the file.
10672         * config/s390/s390.h: Likewise.
10673         * config/s390/tpf.h: Likewise.
10675 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
10677         * config/s390/s390.c (s390_loadrelative_operand_p):
10678         Remove TARGET_CPU_ZARCH usages.
10679         (s390_rtx_costs): Likewise.
10680         (s390_legitimate_constant_p): Likewise.
10681         (s390_cannot_force_const_mem): Likewise.
10682         (legitimate_reload_constant_p): Likewise.
10683         (s390_preferred_reload_class): Likewise.
10684         (legitimize_pic_address): Likewise.
10685         (legitimize_tls_address): Likewise.
10686         (s390_split_branches): Removed.
10687         (s390_add_execute): Removed.
10688         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
10689         (s390_mainpool_start): Likewise.
10690         (s390_mainpool_finish): Likewise.
10691         (s390_mainpool_cancel): Removed.
10692         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
10693         (s390_chunkify_cancel): Likewise.
10694         (s390_return_addr_rtx): Likewise.
10695         (s390_register_info): Remove split_branches_pending_p uages.
10696         (s390_optimize_register_info): Likewise.
10697         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
10698         split_branches_pending_p usages.
10699         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
10700         (s390_load_got): Likewise.
10701         (s390_expand_split_stack_prologue): Likewise.
10702         (output_asm_nops): Likewise.
10703         (s390_function_profiler): Likewise.
10704         (s390_emit_call): Likewise.
10705         (s390_conditional_register_usage): Likewise.
10706         (s390_optimize_prologue): Likewise.
10707         (s390_reorg): Remove TARGET_CPU_ZARCH and
10708         split_branches_pending_p usages.
10709         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
10710         usages.
10711         (s390_output_indirect_thunk_function): Likewise.
10712         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
10713         (TARGET_CPU_ZARCH_P): Removed.
10714         (struct machine_function): Remove split_branches_pending_p.
10715         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
10717 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
10719         * common/config/s390/s390-common.c (processor_flags_table):
10720         Remove flags.
10721         * config.gcc: Remove with_arch/with_tune support.
10722         * config/s390/2064.md: Remove cpu attribute comparisons.
10723         * config/s390/driver-native.c (s390_host_detect_local_cpu):
10724         Remove MTN.
10725         * config/s390/linux.h (ASM_SPEC):
10726         Remove -march support.
10727         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
10728         Use a table to get an arch level.
10729         * config/s390/s390-opts.h (enum processor_type):
10730         Remove enum values.
10731         * config/s390/s390.c
10732         (processor_table): Remove entries, add arch_level values.
10733         (s390_issue_rate): Remove cases.
10734         (s390_option_override): Adjust
10735         s390_option_override_internal() call.
10736         (s390_option_override_internal): Remove deprecation warning.
10737         (s390_valid_target_attribute_tree): Adjust
10738         s390_option_override_internal() call.
10739         * config/s390/s390.h (struct s390_processor):
10740         Share with s390-c.c, add arch_level field.
10741         * config/s390/s390.md:
10742         Remove occurrences in cpu attribute.
10743         * config/s390/s390.opt: Remove -march/-mtune support.
10744         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
10745         * doc/invoke.texi: Remove deprecation warning.
10747 2018-08-08  Luis Machado  <luis.machado@linaro.org>
10749         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
10750         global.
10751         (qdf24xx_tunings): Set vector cost structure to
10752         qdf24xx_vector_cost.
10754         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
10755         <register_sextend>: Set to 3.
10757 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
10759         PR target/86838
10760         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
10761         * config/aarch64/aarch64-simd.md
10762         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
10763         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
10764         (aarch64_frecpx<mode>): ...this new pattern.
10765         * config/aarch64/aarch64-simd-builtins.def: Remove comment
10766         about aarch64_frecp<FRECP:frecp_suffix><mode>.
10768 2018-08-07  Martin Liska  <mliska@suse.cz>
10770         PR middle-end/83023
10771         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
10772         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
10773         * predict.def (PRED_MALLOC_NONNULL): New predictor.
10774         * doc/extend.texi: Document that malloc attribute adds
10775         hit to compiler.
10777 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
10779         PR target/86785
10780         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10781         Define to speculation_safe_value_not_needed.
10783 2018-08-06  Jeff Law  <law@redhat.com>
10785         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
10786         the vr_values instance to cprop_into_stmt.
10787         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
10788         (cprop_operand): Also query EVRP to determine if OP is a constant.
10790 2018-08-06  Nathan Sidwell  <nathan@acm.org>
10792         * diagnostic.c (diagnostic_report_current_module): Reroll
10793         included-at loop.  Translate text.
10795 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
10797         * function-tests.c (selftest::test_expansion_to_rtl): Call
10798         free_after_compilation.
10800 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
10802         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
10804 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
10806         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
10807         loops with memory block operations from getting unrolled.
10809 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
10811         PR target/86807
10812         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10813         Define to speculation_safe_value_not_needed.
10815 2018-08-06  Jeff Law  <law@redhat.com>
10817         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
10818         assert.
10820 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
10822         PR target/86662
10823         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
10824         with all enabled __intN types.
10826         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
10828 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
10830         * alias.c (record_set): Check for clobber high.
10831         * cfgexpand.c (expand_gimple_stmt): Likewise.
10832         * combine-stack-adj.c (single_set_for_csa): Likewise.
10833         * combine.c (find_single_use_1): Likewise.
10834         (set_nonzero_bits_and_sign_copies): Likewise.
10835         (get_combine_src_dest): Likewise.
10836         (is_parallel_of_n_reg_sets): Likewise.
10837         (try_combine): Likewise.
10838         (record_dead_and_set_regs_1): Likewise.
10839         (reg_dead_at_p_1): Likewise.
10840         (reg_dead_at_p): Likewise.
10841         * dce.c (deletable_insn_p): Likewise.
10842         (mark_nonreg_stores_1): Likewise.
10843         (mark_nonreg_stores_2): Likewise.
10844         * df-scan.c (df_find_hard_reg_defs): Likewise.
10845         (df_uses_record): Likewise.
10846         (df_get_call_refs): Likewise.
10847         * dwarf2out.c (mem_loc_descriptor): Likewise.
10848         * haifa-sched.c (haifa_classify_rtx): Likewise.
10849         * ira-build.c (create_insn_allocnos): Likewise.
10850         * ira-costs.c (scan_one_insn): Likewise.
10851         * ira.c (equiv_init_movable_p): Likewise.
10852         (rtx_moveable_p): Likewise.
10853         (interesting_dest_for_shprep): Likewise.
10854         * jump.c (mark_jump_label_1): Likewise.
10855         * postreload-gcse.c (record_opr_changes): Likewise.
10856         * postreload.c (reload_cse_simplify): Likewise.
10857         (struct reg_use): Add source expr.
10858         (reload_combine): Check for clobber high.
10859         (reload_combine_note_use): Likewise.
10860         (reload_cse_move2add): Likewise.
10861         (move2add_note_store): Likewise.
10862         * print-rtl.c (print_pattern): Likewise.
10863         * recog.c (decode_asm_operands): Likewise.
10864         (store_data_bypass_p): Likewise.
10865         (if_test_bypass_p): Likewise.
10866         * regcprop.c (kill_clobbered_value): Likewise.
10867         (kill_set_value): Likewise.
10868         * reginfo.c (reg_scan_mark_refs): Likewise.
10869         * reload1.c (maybe_fix_stack_asms): Likewise.
10870         (eliminate_regs_1): Likewise.
10871         (elimination_effects): Likewise.
10872         (mark_not_eliminable): Likewise.
10873         (scan_paradoxical_subregs): Likewise.
10874         (forget_old_reloads_1): Likewise.
10875         * reorg.c (find_end_label): Likewise.
10876         (try_merge_delay_insns): Likewise.
10877         (redundant_insn): Likewise.
10878         (own_thread_p): Likewise.
10879         (fill_simple_delay_slots): Likewise.
10880         (fill_slots_from_thread): Likewise.
10881         (dbr_schedule): Likewise.
10882         * resource.c (update_live_status): Likewise.
10883         (mark_referenced_resources): Likewise.
10884         (mark_set_resources): Likewise.
10885         * rtl.c (copy_rtx): Likewise.
10886         * rtlanal.c (reg_referenced_p): Likewise.
10887         (single_set_2): Likewise.
10888         (noop_move_p): Likewise.
10889         (note_stores): Likewise.
10890         * sched-deps.c (sched_analyze_reg): Likewise.
10891         (sched_analyze_insn): Likewise.
10893 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
10895         * cse.c (invalidate_reg): New function extracted from...
10896         (invalidate): ...here.
10897         (canonicalize_insn): Check for clobber high.
10898         (invalidate_from_clobbers): invalidate clobber highs.
10899         (invalidate_from_sets_and_clobbers): Likewise.
10900         (count_reg_usage): Check for clobber high.
10901         (insn_live_p): Likewise.
10902         * cselib.c (cselib_expand_value_rtx_1):Likewise.
10903         (cselib_invalidate_regno): Check for clobber in setter.
10904         (cselib_invalidate_rtx): Pass through setter.
10905         (cselib_invalidate_rtx_note_stores):
10906         (cselib_process_insn): Check for clobber high.
10907         * cselib.h (cselib_invalidate_rtx): Add operand.
10909 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
10911         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
10912         (mark_not_eliminable): Likewise.
10913         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
10914         * lra-lives.c (process_bb_lives): Check for clobber high.
10915         * lra.c (new_insn_reg): Remember clobber highs.
10916         (collect_non_operand_hard_regs): Check for clobber high.
10917         (lra_set_insn_recog_data): Likewise.
10918         (add_regs_to_insn_regno_info): Likewise.
10919         (lra_update_insn_regno_info): Likewise.
10921 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
10923         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
10924         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
10926 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
10928         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
10929         (copy_insn_1): Likewise.
10930         (gen_hard_reg_clobber_high): New gen function.
10931         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
10932         * genemit.c (gen_exp): Likewise.
10933         (gen_emit_seq): Pass through info.
10934         (gen_insn): Check for CLOBBER_HIGH.
10935         (gen_expand): Pass through info.
10936         (gen_split): Likewise.
10937         (output_add_clobbers): Likewise.
10938         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
10939         (remove_clobbers): Likewise.
10940         * rtl.h (gen_hard_reg_clobber_high): New declaration.
10942 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
10944         * doc/rtl.texi (clobber_high): Add.
10945         (parallel): Add in clobber high
10946         * rtl.c (rtl_check_failed_code3): Add function.
10947         * rtl.def (CLOBBER_HIGH): Add expression.
10948         * rtl.h (RTL_CHECKC3): Add macro.
10949         (rtl_check_failed_code3): Add declaration.
10950         (XC3EXP): Add macro.
10952 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
10954         PR target/86386
10955         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
10956         cfun->machine->max_used_stack_alignment if needed.
10958 2018-08-04  Martin Sebor  <msebor@redhat.com>
10960         PR tree-optimization/86571
10961         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
10962         NaN output to 4.
10964 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
10966         PR target/86799
10967         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10968         Define.
10970 2018-08-03  Jeff Law  <law@redhat.com>
10972         PR target/86795
10973         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
10974         Define to speculation_safe_value_not_needed.
10976 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
10978         * doc/gcov.texi (-x): Remove duplicate "to".
10979         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
10980         (-Wif-not-aligned): Remove duplicate "is".
10981         (-flto): Remove duplicate "the".
10982         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
10983         duplicate "v5.00.b".
10984         (MSP430 Options): Remove duplicate "and" from the description
10985         of "-mgprel-sec=regexp".
10986         (x86 Options): Remove duplicate copies of "vmldLog102" and
10987         vmlsLog104 from description of "-mveclibabi=type".
10989 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
10991         * internal-fn.h (first_commutative_argument): Declare.
10992         * internal-fn.c (first_commutative_argument): New function.
10993         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
10994         restrictions for pattern statements.  Use first_commutative_argument
10995         to look for commutative operands in calls to internal functions.
10997 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
10999         * Makefile.in (wide-int-range.o): New.
11000         * tree-vrp.c: Move all the wide_int_* functions to...
11001         * wide-int-range.cc: ...here.
11002         * tree-vrp.h: Move all the wide_int_* prototypes to...
11003         * wide-int-range.h: ...here.
11005 2018-08-03  Tom de Vries  <tdevries@suse.de>
11007         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
11008         UI_NONE.
11009         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
11010         * except.c (output_function_exception_table): Do early exit if
11011         targetm_common.except_unwind_info (&global_options) == UI_NONE.
11013 2018-08-03  Martin Liska  <mliska@suse.cz>
11015         * predict.c (dump_prediction): Change to 2 digits
11016         in fraction part.
11018 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
11020         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
11021         neon_dup_q to...
11022         (falkor_am_1_gtov_gtov): ... a new insn reservation.
11024 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
11026         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
11027         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
11028         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
11029         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
11030         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
11032 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
11034         * diagnostic-show-locus.c (diagnostic_show_locus): Use
11035         pp_take_prefix when saving the existing prefix.
11036         * diagnostic.c (diagnostic_append_note): Likewise.
11037         * langhooks.c (lhd_print_error_function): Likewise.
11038         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
11039         param's type.  Free the existing prefix.
11040         (pp_take_prefix): New function.
11041         (pretty_printer::pretty_printer): Drop the prefix parameter.
11042         Rename the length parameter to match the comment.
11043         (pretty_printer::~pretty_printer): Free the prefix.
11044         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
11045         parameter.
11046         (struct pretty_printer): Drop the "const" from "prefix" field's
11047         type and clarify memory management.
11048         (pp_set_prefix): Drop the "const" from the 2nd param.
11049         (pp_take_prefix): New decl.
11051 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
11053         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
11054         for word_mode_ok here instead of passing as argument.
11055         (expand_block_compare): Change select_block_compare_mode() call.
11056         (expand_strncmp_gpr_sequence): New function.
11057         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
11059 2018-08-02  Jeff Law  <law@redhat.com>
11061         PR target/86790
11062         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11063         Define to speculation_safe_value_not_needed.
11065         PR target/86784
11066         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11067         Define to speculation_safe_value_not_needed.
11069 2018-08-02  Tom de Vries  <tdevries@suse.de>
11071         PR target/86660
11072         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
11073         function.  Return UI_TARGET unconditionally.
11074         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
11075         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
11077 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
11079         * genemit.c (print_overload_test): Fix typo.
11081 2018-08-02  Richard Biener  <rguenther@suse.de>
11083         PR tree-optimization/86816
11084         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
11085         which checks for value availability before querying it.
11086         (gvn_uses_equal): Use it.
11087         (same_succ_hash): Likewise.
11088         (gimple_equal_p): Likewise.
11090 2018-08-02  Nick Clifton  <nickc@redhat.com>
11092         PR target/86813
11093         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11094         Define to speculation_safe_value_not_needed.
11096         PR target/86810
11097         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11098         Define to speculation_safe_value_not_needed.
11100         PR target/86810
11101         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11102         Define to speculation_safe_value_not_needed.
11104         PR target/86803
11105         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11106         Define to speculation_safe_value_not_needed.
11108         PR target/86797
11109         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11110         Define to speculation_safe_value_not_needed.
11112         PR target/86791
11113         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11114         Define to speculation_safe_value_not_needed.
11116         PR target/86789
11117         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11118         Define to speculation_safe_value_not_needed.
11120         PR target/86787
11121         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
11122         Define to speculation_safe_value_not_needed.
11124         PR target/86782
11125         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
11126         speculation_safe_value_not_needed.
11128         PR target/86781
11129         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
11130         to speculation_safe_value_not_needed.
11132 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
11134         * doc/md.texi: Expand the documentation of instruction names
11135         to mention port-local uses.  Document '@' in pattern names.
11136         * read-md.h (overloaded_instance, overloaded_name): New structs.
11137         (mapping): Declare.
11138         (md_reader::handle_overloaded_name): New member function.
11139         (md_reader::get_overloads): Likewise.
11140         (md_reader::m_first_overload): New member variable.
11141         (md_reader::m_next_overload_ptr): Likewise.
11142         (md_reader::m_overloads_htab): Likewise.
11143         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
11144         m_next_overload_ptr and m_overloads_htab.
11145         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
11146         (get_mode_token, get_code_token, get_int_token): New functions.
11147         (map_attr_string): Add an optional argument that passes back
11148         the associated iterator.
11149         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
11150         (md_reader::handle_overloaded_name, add_overload_instance): New
11151         functions.
11152         (apply_iterators): Handle '@' names.  Report an error if '@'
11153         is used without iterators.
11154         (initialize_iterators): Initialize the new iterator_group fields.
11155         * genopinit.c (handle_overloaded_code_for)
11156         (handle_overloaded_gen): New functions.
11157         (main): Use them to print declarations of maybe_code_for_* and
11158         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
11159         * genemit.c (print_overload_arguments, print_overload_test)
11160         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
11161         (main): Use it to print definitions of maybe_code_for_* and
11162         maybe_gen_* functions.
11163         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
11164         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
11165         instead of explicit mode checks.
11166         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
11167         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
11168         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
11169         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
11170         (aarch64_expand_compare_and_swap): Likewise
11171         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
11172         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
11173         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
11174         (aarch64_constant_pool_reload_icode): Delete.
11175         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
11176         instead of aarch64_constant_pool_reload_icode.  Use
11177         code_for_aarch64_reload_mov instead of explicit mode checks.
11178         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
11179         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
11180         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
11181         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
11182         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
11183         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
11184         (aarch64_atomic_load_op_code): Delete.
11185         (aarch64_emit_atomic_load_op): Likewise.
11186         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
11187         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
11188         instead of aarch64_emit_atomic_load_op.
11189         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
11190         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
11191         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
11192         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
11193         character before the pattern name.
11194         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
11195         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
11196         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
11197         (aarch64_frecps<mode>): Likewise.
11198         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
11199         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
11200         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
11201         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
11202         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
11204 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
11206         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
11207         Allow HFmode constants if TARGET_FP_F16INST.
11209 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
11211         PR target/86014
11212         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
11213         No longer check last store for clobber of address register.
11215 2018-08-02  Martin Liska  <mliska@suse.cz>
11217         PR gcov-profile/86817
11218         * gcov.c (process_all_functions): New function.
11219         (main): Call it.
11220         (process_file): Move functions processing to
11221         process_all_functions.
11223 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
11225         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
11226         "const" to the "gimple *" and "rtx_insn *" parameters.
11227         * dumpfile.h (dump_user_location_t::dump_user_location_t):
11228         Likewise.
11229         (dump_location_t::dump_location_t): Likewise.
11231 2018-08-01  Martin Sebor  <msebor@redhat.com>
11233         PR tree-optimization/86650
11234         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
11235         rather than a "gcall *".  Directly pass the data of interest
11236         to percent_K_format, rather than building a temporary CALL_EXPR
11237         to hold it.
11238         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
11239         (gimple_fold_builtin_strncat): Adjust.
11240         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
11241         gcall* argument with gimple*.
11242         * gimple-ssa-warn-restrict.c (check_call): Same.
11243         (wrestrict_dom_walker::before_dom_children): Same.
11244         (builtin_access::builtin_access): Same.
11245         (check_bounds_or_overlap): Same
11246         (maybe_diag_overlap): Same.
11247         (maybe_diag_offset_bounds): Same.
11248         * tree-diagnostic.c (default_tree_printer): Move usage of
11249         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
11250         to this callsite.
11251         * tree-pretty-print.c (percent_K_format): Add argument.
11252         * tree-pretty-print.h: Add argument.
11253         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
11254         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
11255         (maybe_diag_stxncpy_trunc): Same.
11256         (handle_builtin_stxncpy): Same.
11257         (handle_builtin_strcat): Same.
11259 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11261         * match.pd: Optimise pointer range checks.
11263 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11265         PR tree-optimization/86758
11266         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
11267         to remove pattern statements.
11269 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11271         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
11272         result of dfs_enumerate_from when constructing stmt_vec_infos,
11273         instead of additionally calling get_loop_body.
11275 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11277         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
11278         parameter.
11279         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
11280         When creating an iv, assert that the step is not known to be zero.
11281         (vect_setup_realignment): Update call accordingly.
11282         * tree-vect-stmts.c (vectorizable_store): Likewise.
11283         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
11285 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11287         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
11288         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
11289         (vectorizable_reduction): Likewise.
11290         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
11291         (vect_detect_hybrid_slp_stmts): Likewise.
11292         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
11294 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
11296         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
11297         (wide_int_set_zero_nonzero_bits): ...this.
11298         (zero_nonzero_bits_from_vr): Rename to...
11299         (vrp_set_zero_nonzero_bits): ...this.
11300         (extract_range_from_multiplicative_op_1): Abstract wide int
11301         code...
11302         (wide_int_range_multiplicative_op): ...here.
11303         (extract_range_from_binary_expr_1): Extract wide int binary
11304         operations into their own functions.
11305         (wide_int_range_lshift): New.
11306         (wide_int_range_can_optimize_bit_op): New.
11307         (wide_int_range_shift_undefined_p): New.
11308         (wide_int_range_bit_xor): New.
11309         (wide_int_range_bit_ior): New.
11310         (wide_int_range_bit_and): New.
11311         (wide_int_range_trunc_mod): New.
11312         (extract_range_into_wide_ints): New.
11313         (vrp_shift_undefined_p): New.
11314         (extract_range_from_multiplicative_op): New.
11315         (vrp_can_optimize_bit_op): New.
11316         * tree-vrp.h (value_range::dump): New.
11317         (wide_int_range_multiplicative_op): New.
11318         (wide_int_range_lshift):New.
11319         (wide_int_range_shift_undefined_p): New.
11320         (wide_int_range_bit_xor): New.
11321         (wide_int_range_bit_ior): New.
11322         (wide_int_range_bit_and): New.
11323         (wide_int_range_trunc_mod): New.
11324         (zero_nonzero_bits_from_bounds): Rename to...
11325         (wide_int_set_zero_nonzero_bits): ...this.
11326         (zero_nonzero_bits_from_vr): Rename to...
11327         (vrp_set_zero_nonzero_bits): ...this.
11328         (range_easy_mask_min_max): Rename to...
11329         (wide_int_range_can_optimize_bit_op): this.
11330         * vr-values.c (simplify_bit_ops_using_ranges): Rename
11331         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
11333 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11335         * tree-vectorizer.h (vect_orig_stmt): New function.
11336         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
11337         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
11338         (vect_create_epilog_for_reduction): Likewise.
11339         (vectorizable_live_operation): Likewise.
11340         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
11341         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
11342         * tree-vect-stmts.c (vectorizable_call): Likewise.
11343         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
11345 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11347         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
11348         argument.
11349         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
11350         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
11351         (vect_transform_loop): Likewise.
11352         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
11354 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11356         * tree-vectorizer.h (vect_schedule_slp): Return void.
11357         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
11358         (vect_schedule_slp): Likewise.
11360 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11362         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
11363         argument.
11364         (vect_transform_loop): Update calls accordingly.  Schedule SLP
11365         instances before the main loop, if any exist.
11367 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
11369         PR tree-optimization/86749
11370         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
11371         If the lhs is used in a COND_EXPR, check that it is being used
11372         as the "then" or "else" value.
11374 2018-08-01  Tom de Vries  <tdevries@suse.de>
11376         PR target/86800
11377         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
11378         speculation_safe_value_not_needed.
11380 2018-08-01  Richard Biener  <rguenther@suse.de>
11382         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
11383         as base and offset.
11385 2018-08-01  Martin Liska  <mliska@suse.cz>
11387         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
11388         format how successful transformation is dumped.
11389         (gimple_mod_pow2_value_transform): Likewise.
11390         (gimple_mod_subtract_transform): Likewise.
11391         (gimple_stringops_transform): Likewise.
11393 2018-08-01  Martin Liska  <mliska@suse.cz>
11395         PR value-prof/35543
11396         * value-prof.c (interesting_stringop_to_profile_p):
11397         Simplify the code and add BUILT_IN_MEMMOVE.
11398         (gimple_stringops_transform): Likewise.
11400 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
11402         * config/aarch64/aarch64-simd.md
11403         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
11404         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
11405         use GPI iterator instead of SI mode.
11407 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
11409         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
11410         rs6000_speculation_barrier.
11411         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
11412         new barrier pattern name.
11414 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
11416         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
11417         (speculation_barrier): New insn.
11419 2018-08-01  Richard Biener  <rguenther@suse.de>
11421         PR bootstrap/86724
11422         * graphite.h: Include isl/id.h and isl/space.h to allow build
11423         with ISL 0.20.
11425 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
11427         PR target/86651
11428         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
11429         mode for COFF targets.
11430         * defaults.h (TARGET_COFF): Define.
11431         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
11432         TARGET_COFF): Define.
11433         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
11434         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
11435         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
11437 2018-07-31  Alexandre Oliva <oliva@adacore.com>
11439         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
11440         * gimple-streamer-out.c (output_bb): Save it.
11441         * lto-streamer-in.c (input_struct_function_base): Restore
11442         instance discriminator if available.  Create map on demand.
11443         * lto-streamer-out.c (output_struct_function_base): Save it if
11444         available.
11445         * final.c (decl_to_instance_map): Document LTO strategy.
11447 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
11448             Olivier Hainque  <hainque@adacore.com>
11450         * debug.h (decl_to_instance_map_t): New type.
11451         (decl_to_instance_map): Declare.
11452         (maybe_create_decl_to_instance_map): New inline function.
11453         * final.c (bb_discriminator, last_bb_discriminator): New statics,
11454         to track basic block discriminators.
11455         (final_start_function_1): Initialize them.
11456         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
11457         bb_discriminator.
11458         (decl_to_instance_map): New variable.
11459         (map_decl_to_instance, maybe_set_discriminator): New functions.
11460         (notice_source_line): Set discriminator.
11462 2018-07-31  Ian Lance Taylor  <iant@golang.org>
11464         * targhooks.c (default_have_speculation_safe_value): Add
11465         ATTRIBUTE_UNUSED.
11467 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
11469         * dump-context.h: Include "pretty-print.h".
11470         (dump_context::refresh_dumps_are_enabled): New decl.
11471         (dump_context::emit_item): New decl.
11472         (class dump_context): Add fields "m_test_pp" and
11473         "m_test_pp_flags".
11474         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
11475         (temp_dump_context::get_dumped_text): New decl.
11476         (class temp_dump_context): Add field "m_pp".
11477         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
11478         (dump_context::refresh_dumps_are_enabled): ...and add a test for
11479         m_test_pp.
11480         (set_dump_file): Update for above change.
11481         (set_alt_dump_file): Likewise.
11482         (dump_loc): New overload, taking a pretty_printer *.
11483         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
11484         to any test pretty-printer.
11485         (make_item_for_dump_gimple_stmt): New function, adapted from
11486         optinfo::add_gimple_stmt.
11487         (dump_context::dump_gimple_stmt): Call it, and use the result,
11488         eliminating the direct usage of dump_file and alt_dump_file in
11489         favor of indirectly using them via emit_item.
11490         (make_item_for_dump_gimple_expr): New function, adapted from
11491         optinfo::add_gimple_expr.
11492         (dump_context::dump_gimple_expr): Call it, and use the result,
11493         eliminating the direct usage of dump_file and alt_dump_file in
11494         favor of indirectly using them via emit_item.
11495         (make_item_for_dump_generic_expr): New function, adapted from
11496         optinfo::add_tree.
11497         (dump_context::dump_generic_expr): Call it, and use the result,
11498         eliminating the direct usage of dump_file and alt_dump_file in
11499         favor of indirectly using them via emit_item.
11500         (make_item_for_dump_printf_va): New function, adapted from
11501         optinfo::add_printf_va.
11502         (make_item_for_dump_printf): New function.
11503         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
11504         and use the result, eliminating the direct usage of dump_file and
11505         alt_dump_file in favor of indirectly using them via emit_item.
11506         (make_item_for_dump_dec): New function.
11507         (dump_context::dump_dec): Call it, and use the result,
11508         eliminating the direct usage of dump_file and alt_dump_file in
11509         favor of indirectly using them via emit_item.
11510         (make_item_for_dump_symtab_node): New function, adapted from
11511         optinfo::add_symtab_node.
11512         (dump_context::dump_symtab_node): Call it, and use the result,
11513         eliminating the direct usage of dump_file and alt_dump_file in
11514         favor of indirectly using them via emit_item.
11515         (dump_context::begin_scope): Reimplement, avoiding direct usage
11516         of dump_file and alt_dump_file in favor of indirectly using them
11517         via emit_item.
11518         (dump_context::emit_item): New member function.
11519         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
11520         Set up test pretty-printer on the underlying context.  Call
11521         refresh_dumps_are_enabled.
11522         (temp_dump_context::~temp_dump_context): Call
11523         refresh_dumps_are_enabled.
11524         (temp_dump_context::get_dumped_text): New member function.
11525         (selftest::verify_dumped_text): New function.
11526         (ASSERT_DUMPED_TEXT_EQ): New macro.
11527         (selftest::test_capture_of_dump_calls): Run all tests twice, with
11528         and then without optinfo enabled.  Add uses of
11529         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
11530         * dumpfile.h: Update comment for the dump_* API.
11531         * optinfo-emit-json.cc
11532         (selftest::test_building_json_from_dump_calls): Update for new
11533         param for temp_dump_context ctor.
11534         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
11535         and "m_owned" field.
11536         (optinfo_item::~optinfo_item): Likewise.
11537         (optinfo::add_item): New member function.
11538         (optinfo::emit): Update comment.
11539         (optinfo::add_string): Delete.
11540         (optinfo::add_printf): Delete.
11541         (optinfo::add_printf_va): Delete.
11542         (optinfo::add_gimple_stmt): Delete.
11543         (optinfo::add_gimple_expr): Delete.
11544         (optinfo::add_tree): Delete.
11545         (optinfo::add_symtab_node): Delete.
11546         (optinfo::add_dec): Delete.
11547         * optinfo.h (class dump_context): New forward decl.
11548         (optinfo::add_item): New decl.
11549         (optinfo::add_string): Delete.
11550         (optinfo::add_printf): Delete.
11551         (optinfo::add_printf_va): Delete.
11552         (optinfo::add_gimple_stmt): Delete.
11553         (optinfo::add_gimple_expr): Delete.
11554         (optinfo::add_tree): Delete.
11555         (optinfo::add_symtab_node): Delete.
11556         (optinfo::add_dec): Delete.
11557         (optinfo::add_poly_int): Delete.
11558         (optinfo_item::optinfo_item): Remove "owned" param.
11559         (class optinfo_item): Remove field "m_owned".
11561 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
11563         PR middle-end/86705
11564         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
11565         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
11566         requested variable alignment.
11567         (expand_one_ssa_partition): Likewise.
11568         (expand_one_var): Likewise.
11570 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
11572         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
11573         to speculation_safe_value_not_needed.
11575 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
11577         * targhooks.h (speculation_safe_value_not_needed): New prototype.
11578         * targhooks.c (speculation_safe_value_not_needed): New function.
11579         * target.def (have_speculation_safe_value): Update documentation.
11580         * doc/tm.texi: Regenerated.
11582 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
11584         * config/aarch64/iterators.md (ALLI_TI): New iterator.
11585         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
11586         expand.
11587         (despeculate_copy<ALLI:mode>_insn): New insn.
11588         (despeculate_copyti_insn): New insn.
11589         (despeculate_simple<ALLI:mode>): New insn
11590         (despeculate_simpleti): New insn.
11591         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
11592         function.
11593         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
11594         aarch64_speculation_safe_value.
11595         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
11597 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
11599         * config/aarch64/aarch64-speculation.cc: New file.
11600         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
11601         before pass_reorder_blocks.
11602         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
11603         prototype.
11604         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
11605         X14 and X15 when tracking speculation.
11606         * config/aarch64/aarch64.md (register name constants): Add
11607         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
11608         (unspec): Add UNSPEC_SPECULATION_TRACKER.
11609         (speculation_barrier): New insn attribute.
11610         (cmp<mode>): Allow SP in comparisons.
11611         (speculation_tracker): New insn.
11612         (speculation_barrier): Add speculation_barrier attribute.
11613         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
11614         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
11615         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
11617 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
11619         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
11620         aarch64_track_speculation is true.
11621         (tb<optab><mode>1): Likewise.
11622         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
11623         generate CB[N]Z when tracking speculation.
11624         (aarch64_split_compare_and_swap): Likewise.
11625         (aarch64_split_atomic_op): Likewise.
11627 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
11629         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
11631 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
11633         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
11634         (speculation_barrier): New insn.
11636 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
11638         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
11639         * config/arm/arm.md (speculation_barrier): New expand.
11640         (speculation_barrier_insn): New pattern.
11642 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
11644         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
11645         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
11646         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
11647         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
11648         list.
11649         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
11650         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
11651         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
11652         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
11653         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
11654         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
11655         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
11656         * builtins.c (expand_speculation_safe_value): New function.
11657         (expand_builtin): Call it.
11658         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
11659         * doc/extend.texi: Document __builtin_speculation_safe_value.
11660         * doc/md.texi: Document "speculation_barrier" pattern.
11661         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
11662         TARGET_HAVE_SPECULATION_SAFE_VALUE.
11663         * doc/tm.texi: Regenerated.
11664         * target.def (have_speculation_safe_value, speculation_safe_value): New
11665         hooks.
11666         * targhooks.c (default_have_speculation_safe_value): New function.
11667         (default_speculation_safe_value): New function.
11668         * targhooks.h (default_have_speculation_safe_value): Add prototype.
11669         (default_speculation_safe_value): Add prototype.
11671 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
11673         * dump-context.h (dump_context::dump_loc): New decl.
11674         * dumpfile.c (dump_context::dump_loc): New member function.
11675         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
11676         and dump_gimple_stmt.
11677         (dump_context::dump_gimple_expr_loc): Likewise, using
11678         dump_gimple_expr.
11679         (dump_context::dump_generic_expr_loc): Likewise, using
11680         dump_generic_expr.
11681         (dump_context::dump_printf_loc_va): Likewise, using
11682         dump_printf_va.
11683         (dump_context::begin_scope): Explicitly using the global function
11684         "dump_loc", rather than the member function.
11686 2018-07-31  Martin Sebor  <msebor@redhat.com>
11688         PR tree-optimization/86741
11689         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
11691 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
11693         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
11694         depend on whether prefetch instructions will be emitted or not.
11695         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
11696         will be emitted or not.
11697         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
11698         (TARGET_SETMEM_PFD): New macros.
11700 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11702         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
11703         (NULL_STMT_VEC_INFO): Delete.
11704         (stmt_vec_info::operator*): Likewise.
11705         (stmt_vec_info::operator gimple *): Likewise.
11706         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
11707         of NULL_STMT_VEC_INFO.
11708         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
11709         (vect_reassociating_reduction_p): Likewise.
11710         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
11711         (vectorizable_store): Likewise.
11712         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
11713         (vec_info::free_stmt_vec_infos): Likewise.
11715 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11717         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
11718         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
11720 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11722         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
11723         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
11724         (vec_info::free_stmt_vec_info): New private member functions.
11725         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
11726         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
11727         * tree-parloops.c (gather_scalar_reductions): Remove calls to
11728         set_stmt_vec_info_vec and free_stmt_vec_infos.
11729         * tree-vect-loop.c (_loop_vec_info): Remove call to
11730         set_stmt_vec_info_vec.
11731         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
11732         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
11733         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
11734         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
11735         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
11736         assignments in {vec_info::,}new_stmt_vec_info that are redundant
11737         with the clearing in the xcalloc.
11738         (stmt_vec_info_vec): Delete.
11739         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
11740         (vectorize_loops): Likewise.
11741         (vec_info::~vec_info): Remove argument from call to
11742         free_stmt_vec_infos.
11743         (vec_info::add_stmt): Remove vinfo argument from call to
11744         new_stmt_vec_info.
11746 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11748         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
11749         rather than a gimple stmt.
11750         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
11751         information for pattern statements when passed the original
11752         statement; instead wait to be passed the pattern statement itself.
11753         Don't call set_vinfo_for_stmt here.
11754         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
11755         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
11756         stmt_vec_infos here.
11757         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
11758         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
11759         stmt_vec_infos entry.
11761 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11763         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
11764         * tree-vectorizer.c (vec_info::replace_stmt): New function.
11765         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
11766         * tree-vect-stmts.c (vectorizable_call): Likewise.
11767         (vectorizable_simd_clone_call): Likewise.
11769 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11771         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
11772         * tree-vectorizer.c (vec_info::remove_stmt): New function.
11773         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
11774         * tree-vect-loop.c (vect_transform_loop): Likewise.
11775         * tree-vect-slp.c (vect_schedule_slp): Likewise.
11776         * tree-vect-stmts.c (vect_remove_stores): Likewise.
11778 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11780         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
11781         (vect_dr_stmt): Delete.
11782         * tree-vectorizer.c (vec_info::lookup_dr): New function.
11783         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
11784         of DR_VECT_AUX.
11785         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
11786         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
11787         (vect_verify_datarefs_alignment, vect_peeling_supportable)
11788         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
11789         (vect_analyze_data_refs): Likewise.
11790         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
11791         argument.
11792         (vect_find_same_alignment_drs): Likewise.
11793         (vect_slp_analyze_node_dependences): Update calls accordingly.
11794         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
11795         instead of DR_VECT_AUX.
11796         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
11797         of a vector data references.  Use vec_info::lookup_dr instead of
11798         DR_VECT_AUX.
11799         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
11800         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
11801         instead of DR_VECT_AUX.
11803 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11805         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
11806         dr_vec_info.
11807         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
11808         accordingly.
11809         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11810         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
11811         (vect_gen_prolog_loop_niters): Likewise.
11813 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11815         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
11816         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
11817         (vect_known_alignment_in_bytes, vect_dr_behavior)
11818         (vect_get_scalar_dr_size): Take references as dr_vec_infos
11819         instead of data_references.  Update calls to other routines for
11820         which the same change has been made.
11821         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
11822         dr_vec_infos instead of stmt_vec_infos.
11823         (vect_analyze_data_ref_dependence): Update call accordingly.
11824         (vect_slp_analyze_data_ref_dependence)
11825         (vect_record_base_alignments): Use DR_VECT_AUX.
11826         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
11827         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
11828         (vector_alignment_reachable_p, vect_get_data_access_cost)
11829         (vect_peeling_supportable, vect_analyze_group_access_1)
11830         (vect_analyze_group_access, vect_analyze_data_ref_access)
11831         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
11832         (vect_compile_time_alias, vect_small_gap_p)
11833         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
11834         (vect_supportable_dr_alignment): Take references as dr_vec_infos
11835         instead of data_references.  Update calls to other routines for
11836         which the same change has been made.
11837         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
11838         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
11839         (vect_slp_analyze_and_verify_node_alignment)
11840         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
11841         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
11842         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
11843         above changes.
11844         (_vect_peel_info::dr): Replace with...
11845         (_vect_peel_info::dr_info): ...this new field.
11846         (vect_peeling_hash_get_most_frequent)
11847         (vect_peeling_hash_choose_best_peeling): Update accordingly.
11848         (vect_peeling_hash_get_lowest_cost):
11849         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
11850         routines for which the same change has been made.
11851         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
11852         data_reference.
11853         * tree-vect-loop-manip.c (get_misalign_in_elems)
11854         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
11855         above changes.
11856         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
11857         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
11858         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
11859         (get_group_load_store_type, get_negative_load_store_type)
11860         (vect_get_data_ptr_increment, vectorizable_store)
11861         (vectorizable_load): Likewise.
11862         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
11863         Update calls to other routines for which the same change has been made.
11865 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11867         * tree-vectorizer.h (vec_info::move_dr): New member function.
11868         (dataref_aux): Rename to...
11869         (dr_vec_info): ...this and add "dr" and "stmt" fields.
11870         (_stmt_vec_info::dr_aux): Update accordingly.
11871         (_stmt_vec_info::data_ref_info): Delete.
11872         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
11873         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
11874         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
11875         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
11876         of data_ref.
11877         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
11878         (STMT_VINFO_DR_INFO): New macro.
11879         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
11880         (set_dr_misalignment): Update after rename of dataref_aux.
11881         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
11882         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
11883         initialization of STMT_VINFO_DATA_REF.
11884         * tree-vectorizer.c (vec_info::move_dr): New function.
11885         * tree-vect-patterns.c (vect_recog_bool_pattern)
11886         (vect_recog_mask_conversion_pattern)
11887         (vect_recog_gather_scatter_pattern): Use it.
11888         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
11889         the "dr" and "stmt" fields of dr_vec_info instead of
11890         STMT_VINFO_DATA_REF.
11892 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11894         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
11895         (is_pattern_stmt_p): Use it.
11896         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
11897         on pattern statements.
11899 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11901         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
11902         original stmt as a stmt_vec_info rather than a gimple stmt.
11903         (vect_pattern_recog_1): Take the statement directly as a
11904         stmt_vec_info, rather than via a gimple_stmt_iterator.
11905         Update call to vect_mark_pattern_stmts.
11906         (vect_pattern_recog): Update calls accordingly.
11908 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11910         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
11911         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
11912         a vect_def_type for the first argument.
11913         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
11914         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
11915         operand if it isn't defined by a vectorized statement.
11916         (vect_build_gather_load_calls): Remove the mask_dt argument and
11917         update calls to vect_get_vec_def_for_stmt_copy.
11918         (vectorizable_bswap): Likewise the dt argument.
11919         (vectorizable_call): Update calls to vectorizable_bswap and
11920         vect_get_vec_def_for_stmt_copy.
11921         (vectorizable_simd_clone_call, vectorizable_assignment)
11922         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
11923         (vectorizable_comparison): Update calls to
11924         vect_get_vec_def_for_stmt_copy.
11925         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
11926         vect_is_simple_use.
11927         (vect_get_loop_based_defs): Remove dt argument and update call
11928         to vect_get_vec_def_for_stmt_copy.
11929         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
11930         and vect_get_vec_def_for_stmt_copy.
11931         (vectorizable_load): Update calls to vect_build_gather_load_calls
11932         and vect_get_vec_def_for_stmt_copy.
11933         * tree-vect-loop.c (vect_create_epilog_for_reduction)
11934         (vectorizable_reduction, vectorizable_live_operation): Update calls
11935         to vect_get_vec_def_for_stmt_copy.
11937 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11939         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
11940         and gimple stmt arguments with a stmt_vec_info.
11941         (vect_record_base_alignments): Update calls accordingly.
11942         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
11943         and gimple stmt arguments with a stmt_vec_info.
11944         (vect_build_slp_tree_1): Remove vinfo argument and update call
11945         to vect_record_max_nunits.
11946         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
11947         and vect_record_max_nunits.
11949 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
11951         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
11952         file and take a stmt_vec_info instead of a gimple stmt.
11953         (supportable_widening_operation, vect_finish_replace_stmt)
11954         (vect_finish_stmt_generation, vect_get_store_rhs)
11955         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
11956         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
11957         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
11958         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
11959         (vect_create_data_ref_ptr, bump_vector_ptr)
11960         (vect_permute_store_chain, vect_setup_realignment)
11961         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
11962         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
11963         (vectorizable_reduction, vectorizable_induction)
11964         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
11965         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
11966         than gimple stmts as arguments.
11967         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
11968         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
11969         (can_group_stmts_p, vect_check_gather_scatter)
11970         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
11971         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
11972         (vect_permute_load_chain, vect_shift_permute_load_chain)
11973         (vect_transform_grouped_load)
11974         (vect_record_grouped_load_vectors): Likewise.
11975         * tree-vect-loop.c (vect_fixup_reduc_chain)
11976         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
11977         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
11978         (vectorizable_reduction, vectorizable_induction)
11979         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
11980         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
11981         (vect_get_load_store_mask): Likewise.
11982         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
11983         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
11984         * tree-vect-stmts.c (vect_mark_relevant)
11985         (is_simple_and_all_uses_invariant)
11986         (exist_non_indexing_operands_for_use_p, process_use)
11987         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
11988         (vect_get_vec_def_for_operand, vect_get_vec_defs)
11989         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
11990         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
11991         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
11992         (get_negative_load_store_type, get_load_store_type)
11993         (vect_check_load_store_mask, vect_check_store_rhs)
11994         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
11995         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
11996         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
11997         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
11998         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
11999         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
12000         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
12001         (supportable_widening_operation): Likewise.
12003 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12005         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
12006         a stmt_vec_info instead of a gcall.
12007         (vect_check_gather_scatter): Update call accordingly.
12008         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
12009         of a gphi.
12010         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
12011         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
12012         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
12013         instead of a gimple stmt.
12014         (vect_transform_loop): Update calls accordingly.
12015         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
12016         stmt_vec_infos instead of gimple stmts.
12017         (vect_analyze_slp_instance): Update use accordingly.
12018         * tree-vect-stmts.c (read_vector_array, write_vector_array)
12019         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
12020         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
12021         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
12022         (vect_gen_widened_results_half, vect_get_loop_based_defs)
12023         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
12024         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
12025         down to subroutines.
12027 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12029         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
12030         of the worklist from a vector of gimple stmts to a vector of
12031         stmt_vec_infos.
12032         * tree-vect-stmts.c (vect_mark_relevant, process_use)
12033         (vect_mark_stmts_to_be_vectorized): Likewise
12035 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12037         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
12038         statement before passing it to vect_analyze_stmt.
12039         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
12040         the chain of phi vector definitions.  Track the exit phi via its
12041         stmt_vec_info.
12042         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
12043         STMT_VINFO_REDUC_DEF.
12044         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
12045         stmt_vec_infos to handle the statement chains.
12046         (vect_get_slp_defs): Record the first statement in the node
12047         using a stmt_vec_info.
12048         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
12049         statements here and pass their stmt_vec_info down to subroutines.
12050         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
12051         down to vect_finish_stmt_generation.
12052         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
12053         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
12054         stmt_vec_infos to subroutines.
12055         (vect_remove_stores): Use stmt_vec_infos to handle the statement
12056         chains.
12058 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12060         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
12061         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
12062         (vect_permute_store_chain, vect_setup_realignment)
12063         (vect_permute_load_chain, vect_shift_permute_load_chain)
12064         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
12065         stmts internally, and when passing values to other vectorizer routines.
12066         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
12067         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
12068         (vect_analyze_loop_operations, get_initial_def_for_reduction)
12069         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
12070         (vectorizable_reduction, vectorizable_induction)
12071         (vectorizable_live_operation, vect_transform_loop_stmt)
12072         (vect_transform_loop): Likewise.
12073         * tree-vect-patterns.c (vect_reassociating_reduction_p)
12074         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
12075         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
12076         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12077         (vect_slp_analyze_node_operations_1): Likewise.
12078         * tree-vect-stmts.c (vect_mark_relevant, process_use)
12079         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
12080         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
12081         (vect_finish_stmt_generation_1, get_group_load_store_type)
12082         (get_load_store_type, vect_build_gather_load_calls)
12083         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
12084         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
12085         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12086         (vectorizable_store, vectorizable_load, vectorizable_condition)
12087         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
12088         (supportable_widening_operation): Likewise.
12089         (vect_get_vector_types_for_stmt): Likewise.
12090         * tree-vectorizer.h (vect_dr_behavior): Likewise.
12092 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12094         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12095         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
12096         (vect_permute_store_chain, vect_permute_load_chain)
12097         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
12098         repeated stmt_vec_info lookups.
12099         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
12100         (vect_update_ivs_after_vectorizer): Likewise.
12101         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
12102         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
12103         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
12104         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12105         (vect_bb_slp_scalar_cost): Likewise.
12106         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
12108 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12110         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
12111         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
12112         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
12113         to get gassigns and gcalls, rather than operating on generc gimple
12114         stmts.
12115         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
12116         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
12117         (vectorizable_load, vect_analyze_stmt): Likewise.
12118         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
12120 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12122         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
12123         return stmt_vec_infos rather than gimple stmts.  Do not accept
12124         null arguments.
12125         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
12126         of a gimple stmt.
12127         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
12128         Update use of get_later_stmt.
12129         (vect_get_constant_vectors): Update call accordingly.
12130         (vect_schedule_slp_instance): Likewise
12131         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
12132         (vect_slp_analyze_instance_dependence): Likewise.
12133         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
12135 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12137         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
12138         (stmt_info_for_cost::stmt_info): ...this new field.
12139         (add_stmt_costs): Update accordingly.
12140         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
12141         (vect_get_known_peeling_cost): Likewise.
12142         (vect_estimate_min_profitable_iters): Likewise.
12143         * tree-vect-stmts.c (record_stmt_cost): Likewise.
12145 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12147         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
12148         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12149         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
12150         accordingly.
12151         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
12153 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12155         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
12156         a gimple stmt to a stmt_vec_info.
12157         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
12159 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12161         * tree-vectorizer.h (vec_info::grouped_stores): Change from
12162         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12163         (_loop_vec_info::reduction_chains): Likewise.
12164         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
12165         accordingly.
12166         * tree-vect-slp.c (vect_analyze_slp): Likewise.
12168 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12170         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
12171         a gimple stmt to a stmt_vec_info.
12172         (_stmt_vec_info::next_element): Likewise.
12173         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
12174         (vect_slp_analyze_and_verify_node_alignment)
12175         (vect_analyze_group_access_1, vect_analyze_group_access)
12176         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
12177         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
12178         (vect_supportable_dr_alignment): Update accordingly.
12179         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
12180         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
12181         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
12182         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
12183         * tree-vect-slp.c (vect_build_slp_tree_1)
12184         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
12185         (vect_split_slp_store_group, vect_analyze_slp_instance)
12186         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
12187         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
12188         (get_group_load_store_type, get_load_store_type)
12189         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
12190         (vect_transform_stmt, vect_remove_stores): Likewise.
12192 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12194         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
12195         than a gimple stmt.
12196         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
12197         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
12198         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
12199         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
12200         (vector_alignment_reachable_p, vect_get_data_access_cost)
12201         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
12202         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
12203         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
12204         (vect_analyze_group_access_1, vect_analyze_group_access)
12205         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
12206         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
12207         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
12208         result of vect_dr_stmt and use the stmt_vec_info instead of
12209         the associated gimple stmt.
12210         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
12211         (vect_gen_prolog_loop_niters): Likewise.
12212         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
12214 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12216         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
12217         to a vec<stmt_vec_info>.
12218         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
12219         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
12220         vec<stmt_vec_info>.
12221         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
12222         to a vec<stmt_vec_info>.
12223         (bst_traits::value_type, bst_traits::value_type): Likewise.
12224         (bst_traits::hash): Update accordingly.
12225         (vect_get_and_check_slp_defs): Change the stmts parameter from
12226         a vec<gimple *> to a vec<stmt_vec_info>.
12227         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
12228         (vect_build_slp_tree): Likewise.
12229         (vect_build_slp_tree_2): Likewise.  Update uses of
12230         SLP_TREE_SCALAR_STMTS.
12231         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
12232         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
12233         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
12234         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
12235         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
12236         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
12237         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
12238         (vect_get_constant_vectors, vect_get_slp_defs)
12239         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
12240         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
12241         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
12242         instead of gimple stmts.
12243         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
12244         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
12245         (vect_slp_analyze_instance_dependence): Update uses of
12246         SLP_TREE_SCALAR_STMTS.
12247         (vect_slp_analyze_and_verify_node_alignment): Likewise.
12248         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
12249         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
12250         (get_initial_defs_for_reduction): Likewise.
12251         (vect_create_epilog_for_reduction): Likewise.
12252         (vectorize_fold_left_reduction): Likewise.
12253         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
12254         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
12255         (can_vectorize_live_stmts): Likewise.
12257 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12259         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
12260         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
12261         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
12262         than gimple stmts.
12263         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
12264         of a gimple stmt.
12265         (gather_scalar_reductions): Update after above interface changes.
12266         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
12267         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
12268         than gimple stmts.
12269         (vect_force_simple_reduction): Likewise.
12270         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
12271         LOOP_VINFO_REDUCTIONS.
12272         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
12274 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12276         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
12277         a gimple stmt to a stmt_vec_info.
12278         * tree-vect-loop.c (vect_active_double_reduction_p)
12279         (vect_force_simple_reduction, vectorizable_reduction): Update
12280         accordingly.
12282 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12284         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
12285         vec<gimple *> to a vec<stmt_vec_info>.
12286         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
12287         the reduction_phis argument from a vec<gimple *> to a
12288         vec<stmt_vec_info>.
12289         (vectorizable_reduction): Likewise the phis local variable that
12290         is passed to vect_create_epilog_for_reduction.  Update for new type
12291         of SLP_TREE_VEC_STMTS.
12292         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
12293         (vectorizable_live_operation): Likewise.
12294         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
12295         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
12297 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12299         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
12300         a gimple stmt to a stmt_vec_info.
12301         (vectorizable_condition, vectorizable_live_operation)
12302         (vectorizable_reduction, vectorizable_induction): Pass back the
12303         vectorized statement as a stmt_vec_info.
12304         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
12305         use of STMT_VINFO_VEC_STMT.
12306         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
12307         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
12308         as stmt_vec_infos rather than gimple stmts.
12309         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
12310         to a stmt_vec_info.
12311         (vectorizable_live_operation): Likewise.
12312         (vectorizable_reduction, vectorizable_induction): Likewise,
12313         updating use of STMT_VINFO_VEC_STMT.
12314         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
12315         of STMT_VINFO_VEC_STMT.
12316         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
12317         (vectorizable_simd_clone_call, vectorizable_conversion)
12318         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12319         (vectorizable_store, vectorizable_load, vectorizable_condition)
12320         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
12321         from a gimple stmt to a stmt_vec_info.
12322         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
12323         pointer to a stmt_vec_info to the vectorizable_* routines.
12325 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12327         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
12328         a gimple stmt to a stmt_vec_info.
12329         (is_pattern_stmt_p): Update accordingly.
12330         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
12331         (vect_record_grouped_load_vectors): Likewise.
12332         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
12333         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
12334         (vect_model_reduction_cost): Likewise.
12335         (vect_create_epilog_for_reduction): Likewise.
12336         (vectorizable_reduction, vectorizable_induction): Likewise.
12337         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12338         Return the stmt_vec_info for the pattern statement.
12339         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
12340         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
12341         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
12342         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
12343         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
12344         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
12345         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
12346         (free_stmt_vec_info, vect_is_simple_use): Likewise.
12348 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12350         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
12351         (vect_finish_stmt_generation): Likewise.
12352         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
12353         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
12354         (vect_build_gather_load_calls): Use the return value of the above
12355         functions instead of a separate call to vinfo_for_stmt.  Use narrow
12356         scopes for the input gimple stmt and wider scopes for the associated
12357         stmt_vec_info.  Use vec_info::lookup_def when setting these
12358         stmt_vec_infos from an SSA_NAME definition.
12359         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
12360         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
12361         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
12362         (vectorizable_store, vectorizable_load, vectorizable_condition)
12363         (vectorizable_comparison): Likewise.
12364         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
12365         (vectorizable_reduction): Likewise.
12367 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12369         * tree-vectorizer.h (vect_is_simple_use): Add an optional
12370         stmt_vec_info * parameter before the optional gimple **.
12371         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
12372         (process_use, vect_get_vec_def_for_operand_1): Update callers.
12373         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
12374         * tree-vect-loop.c (vectorizable_reduction): Likewise.
12375         (vectorizable_live_operation): Likewise.
12376         * tree-vect-patterns.c (type_conversion_p): Likewise.
12377         (vect_look_through_possible_promotion): Likewise.
12378         (vect_recog_rotate_pattern): Likewise.
12379         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
12381 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12383         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
12384         a typedef to a wrapper class.
12385         (NULL_STMT_VEC_INFO): New macro.
12386         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
12387         (stmt_vec_info::operator*): New function.
12388         (stmt_vec_info::operator gimple *): Likewise.
12389         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
12390         (add_stmt_costs): Likewise.
12391         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
12392         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
12393         (vect_get_known_peeling_cost): Likewise.
12394         (vect_estimate_min_profitable_iters): Likewise.
12395         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12396         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
12397         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
12398         (vectorizable_store, free_stmt_vec_infos): Likewise.
12399         (new_stmt_vec_info): Change return type of xcalloc to
12400         _stmt_vec_info *.
12402 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12404         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
12405         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
12406         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
12407         a single_imm_use-based sequence.
12408         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
12410 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12412         * tree-vectorizer.h (vec_info::lookup_def): Declare.
12413         * tree-vectorizer.c (vec_info::lookup_def): New function.
12414         * tree-vect-patterns.c (vect_get_internal_def): Use it.
12415         (vect_widened_op_tree): Likewise.
12416         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
12417         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
12418         (vectorizable_reduction): Likewise.
12419         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
12420         of a gimple *.
12421         (vect_is_slp_reduction): Update calls accordingly.  Use
12422         vec_info::lookup_def.
12423         (vect_is_simple_reduction): Likewise
12424         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
12426 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12428         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
12429         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
12430         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
12431         of vinfo_for_stmt.
12432         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
12433         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
12434         (vect_update_vf_for_slp, vect_analyze_loop_operations)
12435         (vect_is_slp_reduction, vectorizable_induction)
12436         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
12437         * tree-vect-patterns.c (vect_init_pattern_stmt):
12438         (vect_determine_min_output_precision_1, vect_determine_precisions)
12439         (vect_pattern_recog): Likewise.
12440         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
12441         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
12442         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
12443         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
12444         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
12445         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
12446         info field from a loop to a loop_vec_info.
12448 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12450         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
12451         (vec_info::add_stmt): Declare.
12452         * tree-vectorizer.c (vec_info::add_stmt): New function.
12453         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
12454         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
12455         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
12456         (vectorizable_induction): Likewise.
12457         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
12458         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
12459         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
12460         (vectorizable_load): Likewise.
12461         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
12462         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
12463         (vect_recog_gather_scatter_pattern): Likewise.
12464         (append_pattern_def_seq): Likewise.  Remove a check that is
12465         performed by add_stmt itself.
12467 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12469         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
12470         which make_ssa_name was called with new_stmt before new_stmt
12471         had been created.
12473 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12475         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
12476         split out from...
12477         (vect_is_slp_reduction): ...here...
12478         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
12479         that are already known to be false.
12481 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12483         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
12484         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
12485         STMT_VINFO_NUM_SLP_USES when it's true.
12486         (vect_free_slp_instance): Add a final_p parameter and pass it to
12487         vect_free_slp_tree.
12488         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
12489         (vect_analyze_slp_instance): Likewise.
12490         (vect_slp_analyze_operations): Likewise.
12491         (vect_slp_analyze_bb_1): Likewise.
12492         * tree-vectorizer.c (vec_info): Likewise.
12493         * tree-vect-loop.c (vect_transform_loop): Likewise.
12495 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12497         * tree-vect-loop.c (vectorizable_reduction): Assert that the
12498         function is not called for second and subsequent members of
12499         a reduction group.
12501 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
12503         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
12504         cases for nested loops from here to ...
12505         (vect_create_epilog_for_reduction): ...here.  Only call
12506         vect_is_simple_use for inner-loop reductions.
12508 2018-07-31  Martin Liska  <mliska@suse.cz>
12510         PR gcov-profile/85338
12511         PR gcov-profile/85350
12512         PR gcov-profile/85372
12513         * profile.c (struct location_triplet): New.
12514         (struct location_triplet_hash): Likewise.
12515         (output_location): Do not output a BB that
12516         is already recorded for a line.
12517         (branch_prob): Use streamed_locations.
12519 2018-07-31  Martin Liska  <mliska@suse.cz>
12521         PR gcov-profile/85370
12522         * coverage.c (coverage_begin_function): Do not mark target
12523         clones as artificial functions.
12525 2018-07-31  Martin Liska  <mliska@suse.cz>
12527         PR gcov-profile/83813
12528         PR gcov-profile/84758
12529         PR gcov-profile/85217
12530         PR gcov-profile/85332
12531         * profile.c (branch_prob): Do not record GOTO expressions
12532         for GIMPLE statements which locations are already streamed.
12534 2018-07-31  Olivier Hainque  <hainque@adacore.com>
12536         * gcc.c (handle_spec_function): Accept a soft_matched_part
12537         argument, as do_spec_1.  Pass it down to ...
12538         (eval_spec_function): Accept a soft_matched_part argument,
12539         and pass it down to ...
12540         (do_spec_2): Accept a soft_matched_part argument, and pass
12541         it down to do_spec_1.
12542         (do_spec_1): Pass soft_matched_part to handle_spec_function.
12543         (handle_braces): Update call to handle_spec_function.
12544         (driver::set_up_specs): Update calls to do_spec_2.
12545         (compare_debug_dump_opt_spec_function): Likewise.
12546         (compare_debug_self_opt_spec_function): Likewise.
12548 2018-07-31  Olivier Hainque  <hainque@adacore.com>
12550         * common.opt (nolibc): New option.
12551         * doc/invoke.texi (Link Options): Document it.
12552         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
12553         * config/alpha/linux.h: Likewise.
12554         * config/arc/elf.h: Likewise.
12555         * config/arm/uclinux-elf.h: Likewise.
12556         * config/arm/unknown-elf.h: Likewise.
12557         * config/avr/avrlibc.h: Likewise.
12558         * config/bfin/bfin.h: Likewise.
12559         * config/bfin/linux.h: Likewise.
12560         * config/bfin/uclinux.h: Likewise.
12561         * config/darwin.h: Likewise.
12562         * config/darwin10.h: Likewise.
12563         * config/darwin12.h: Likewise.
12564         * config/gnu-user.h: Likewise.
12565         * config/lm32/uclinux-elf.h: Likewise.
12566         * config/pa/pa-hpux11.h: Likewise.
12567         * config/pa/pa64-hpux.h: Likewise.
12568         * config/sparc/sparc.h: Likewise.
12570 2018-07-31  Olivier Hainque  <hainque@adacore.com>
12572         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
12573         undefined variables.
12575 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
12577         PR target/86640
12578         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
12579         instead of GEN_INT.
12581 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12583         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
12584         terminated string literal.
12586 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
12588         PR rtl-optimization/85160
12589         * combine.c (is_just_move): New function.
12590         (try_combine): Allow combining two instructions into two if neither of
12591         the original instructions was a move.
12593 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
12595         PR target/86673
12596         * doc/extend.texi (Global Register Variables): Discourage use of type
12597         qualifiers.
12598         (Local Register Variables): Likewise.
12600 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
12602         PR tree-optimization/86506
12603         * hwint.h (ceil_log2): Resync with hwint.c implementation.
12605 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
12607         PR target/86547
12608         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
12609         hard_regno, make sure no insn between `from` and `to` clobbers it.
12611 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
12612             Tom de Vries  <tdevries@suse.de>
12614         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
12615         (PTX_DEFAULT_RUNTIME_DIM): ... this.
12616         (nvptx_goacc_validate_dims): Set default worker and gang dims to
12617         PTX_DEFAULT_RUNTIME_DIM.
12618         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
12620 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
12622         * config/pa/pa.c (pa_output_addr_vec): Align address table.
12623         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
12624         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
12626 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
12628         * config/rs6000/constraints.md (wG constraint): Delete, no longer
12629         used.
12630         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
12631         predicate to reflect toc fusion has been deleted.
12632         (toc_fusion_mem_raw): Delete, no longer used.
12633         (toc_fusion_mem_wrapped): Likewise.
12634         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
12635         fusion mask bit.
12636         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
12637         Delete, no longer used.
12638         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
12639         meant to be used for toc fusion.
12640         (rs6000_debug_print_mode): Delete toc fusion debugging.
12641         (rs6000_debug_reg_global): Likewise.
12642         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
12643         fusion and secondary reload support that were never used.
12644         (rs6000_option_override_internal): Delete TOC fusion, that was only
12645         partially defined, and it did not work unless you also used the
12646         -mcmodel= switch.
12647         (rs6000_legitimate_address_p): Delete TOC fusion support.
12648         (rs6000_opt_masks): Likewise.
12649         (fusion_wrap_memory_address): Delete function, no longer used.
12650         (fusion_split_address); Delete TOC fusion support.
12651         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
12652         longer used with toc fusion being deleted.
12653         (TARGET_TOC_FUSION_FP): Likewise.
12654         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
12655         UNSPEC.
12656         (toc fusion spliter): Delete TOC fusion support.
12657         (toc_fusionload_<mode>): Likewise.
12658         (toc_fusionload_di): Likewise.
12659         (fusion_gpr_load_<mode>): Delete generator function, this insn no
12660         longer needs to be named.  Rename predicate to delete TOC fusion.
12661         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
12662         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
12663         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
12664         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
12665         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
12667 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
12669         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
12670         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
12671         __int128 in built-in function prototypes.
12672         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
12673         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
12675 2018-07-27  Martin Sebor  <msebor@redhat.com>
12677         PR tree-optimization/86696
12678         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
12679         types, including enums.
12680         (handle_char_store): Be prepared for the above function to fail.
12682 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
12684         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
12685         when optimization level is lower than 2 or optimize for size.
12687 2018-07-26  Martin Sebor  <msebor@redhat.com>
12689         PR tree-optimization/86043
12690         PR tree-optimization/86042
12691         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
12692         (get_string_cst_length): Rename...
12693         (get_min_string_length): ...to this.  Add argument.
12694         (handle_char_store): Extend to handle multi-character stores by
12695         MEM_REF.
12696         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
12697         * tree.h (initializer_zerop): Add argument.
12699 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
12701         PR middle-end/86660
12702         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
12703         declare target to variables if they have always,{to,from,tofrom} map
12704         kinds.
12706 2018-07-26  Martin Liska  <mliska@suse.cz>
12708         PR lto/86548
12709         * lto-wrapper.c: Add linker_output as prefix
12710         for ltrans_output_file.
12712 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
12714         PR rtl-optimization/85805
12715         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
12716         value for hard registers if that was written in the same mode.
12718 2018-07-26  Martin Liska  <mliska@suse.cz>
12720         PR gcov-profile/86536
12721         * gcov.c (format_gcov): Use printf format %.*f directly
12722         and do not handle special values.
12724 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
12726         * common/config/arc/arc-common.c (arc_option_optimization_table):
12727         Update default optimizations for size.
12729 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
12731         * config/arc/arc.md (movsf_insn): Add short instruction selection.
12732         * config/arc/constraints.md (CfZ): New constraint.
12733         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
12734         (subsf3_fpu): Likewise.
12735         (cmpsf_fpu): Likewise.
12736         (cmpsf_fpu_uneq): Likewise.
12738 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
12740         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
12741         accesses as well.
12742         (arc_is_uncached_mem_p): uncached applies to both the variable and
12743         the pointer.
12745 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
12747         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
12748         register names.
12750 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
12752         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
12753         field "m_scopes" from vec to auto_vec.
12755 2018-07-25  Martin Liska  <mliska@suse.cz>
12757         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
12758         return type.
12760 2018-07-25  Richard Biener  <rguenther@suse.de>
12762         PR debug/86654
12763         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
12764         special wrt context_die late.
12765         (gen_subprogram_die): Re-use DIEs in local scope.
12767 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
12769         PR tree-optimization/86644
12770         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
12772 2018-07-25  Martin Liska  <mliska@suse.cz>
12774         PR middle-end/86645
12775         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
12776         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
12778 2018-07-25  Martin Liska  <mliska@suse.cz>
12780         PR sanitizer/79635
12781         * params.def: Explain ASan abbreviation and provide
12782         a documentation link.
12784 2018-07-24  Martin Sebor  <msebor@redhat.com>
12786         PR tree-optimization/86622
12787         PR tree-optimization/86532
12788         * builtins.h (string_length): Declare.
12789         * builtins.c (c_strlen): Correct handling of non-constant offsets.
12790         (check_access): Be prepared for non-constant length ranges.
12791         (string_length): Make extern.
12792         * expr.c (string_constant): Only handle the minor non-constant
12793         array index.  Use string_constant to compute the length of
12794         a generic string constant.
12796 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
12798         PR tree-optimization/86618
12799         * tree-vect-stmts.c (vectorizable_call): Don't take the address
12800         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
12802 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
12804         PR tree-optimization/86636
12805         * json.cc (json::object::set): Fix comment.  Add assertions.
12806         (json::array::append): Move here from json.h.  Add comment and an
12807         assertion.
12808         (json::string::string): Likewise.
12809         * json.h (json::array::append): Move to json.cc.
12810         (json::string::string): Likewise.
12811         * optinfo-emit-json.cc
12812         (optrecord_json_writer::impl_location_to_json): Assert that we
12813         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
12814         wrapper around it.  Expand the location once, rather than three
12815         times.
12816         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
12817         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
12818         wrappers.
12819         (optrecord_json_writer::optinfo_to_json): Likewise, in four
12820         places.  Fix some overlong lines.
12822 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
12824         * config/aarch64/aarch64-simd.md
12825         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
12826         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
12827         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
12828         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
12829         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
12830         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
12831         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
12832         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
12833         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
12835 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
12837         PR middle-end/86627
12838         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
12839         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
12840         and abs_d == d, do the power of two handling if profitable.
12842 2018-07-24  Richard Biener  <rguenther@suse.de>
12844         * match.pd: Add BIT_FIELD_REF canonicalizations.
12846 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12848         PR c/86617
12849         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
12851 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12853         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
12854         terminated STRING_CST object.
12856 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
12858         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
12860 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
12862         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
12863         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
12864         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
12865         the elements into a register.
12866         (rs6000_split_v4si_init_di_reg): Delete.
12867         (rs6000_split_v4si_init): Delete.
12868         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
12869         (vsx_init_v4si): Rewrite as a define_expand.
12871 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
12873         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
12874         zero_extend argument from memory): New.
12876 2018-07-22  Martin Sebor  <msebor@redhat.com>
12878         PR bootstrap/86621
12879         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
12880         diagnosing calls with unknown arguments unless -Walloca-larger-than
12881         is restricted to less than PTRDIFF_MAX bytes.
12883 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
12885         * doc/gcov.texi (Invoking Gcov): Editorial changes.
12887 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
12889         * pretty-print.c (text_info::set_location): Remove redundant
12890         "line_table" parameter from call to rich_location::set_range.
12892 2018-07-20  Martin Sebor  <msebor@redhat.com>
12894         PR middle-end/82063
12895         * builtins.c (expand_builtin_alloca): Adjust.
12896         * calls.c (alloc_max_size): Simplify.
12897         * cgraphunit.c (cgraph_node::expand): Adjust.
12898         * common.opt (larger_than_size, warn_frame_larger_than): Remove
12899         variables.
12900         (frame_larger_than_size): Same.
12901         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
12902         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
12903         Initialize.
12904         * doc/invoke.texi (GCC Command Options): Document option arguments.
12905         Explain byte-size arguments and suffixes.
12906         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
12907         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
12908         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
12909         * doc/options.texi (UInteger): Expand.
12910         (Host_Wide_Int, ByteSize): Document new properties.
12911         * final.c (final_start_function_1): Include sizes in an error message.
12912         * function.c (frame_offset_overflow): Same.
12913         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
12914         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
12915         Diagnose unbounded alloca calls only for limits of less than
12916         PTRDIFF_MAX.
12917         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
12918         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
12919         for alloca(0).
12920         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
12921         only for limits of less than PTRDIFF_MAX.
12922         * langhooks-def.h (lhd_handle_option): Change function argument
12923         to HOST_WIDE_INT.
12924         * langhooks.c (lhd_handle_option): Same.
12925         * langhooks.h (handle_option): Same.
12926         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
12927         ByteSize flags.
12928         (var_type, var_type_struct): Same.
12929         (var_set): Handle ByteSize flag.
12930         * optc-gen.awk: Add comments to output to ease debugging.  Make
12931         use of HOST_WIDE_INT where appropriate.
12932         * opts-gen-save.awk:  Use %lx to format unsigned long.
12933         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
12934         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
12935         arguments.  Parse bytes-size suffixes.
12936         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
12937         (enum_value_to_arg): Same.
12938         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
12939         (handle_option): Adjust.
12940         (generate_option): Change function argument to HOST_WIDE_INT.
12941         (cmdline_handle_error): Adjust.
12942         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
12943         (set_option): Change function argument to HOST_WIDE_INT.
12944         (option_enabled): Handle cl_host_wide_int.
12945         (get_option_state): Handle CLVC_SIZE.
12946         (control_warning_option): Same.
12947         * opts.c (common_handle_option): Change function argument to
12948         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
12949         OPT_Wvla_larger_than_.
12950         * opts.h (enum cl_var_type): Add an enumerator.
12951         * stor-layout.c (layout_decl): Print a more meaningful warning.
12952         * toplev.c (output_stack_usage): Adjust.
12954 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
12956         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
12957         call to inline_expand_builtin_string_cmp.
12958         (expand_builtin_strcmp): Likewise.
12959         (expand_builtin_strncmp): Likewise.
12960         (inline_string_cmp): Delete the last parameter, change char_type_node
12961         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
12962         two operands.
12963         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
12964         the inlining expansion on target where the type of the call has same or
12965         narrower precision than unsigned char.
12967 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
12969         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
12970         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
12971         * common.opt (fsave-optimization-record): New option.
12972         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
12973         * doc/invoke.texi (-fsave-optimization-record): New option.
12974         * dumpfile.c: Include "optinfo-emit-json.h".
12975         (struct kv_pair): Move to coretypes.h.
12976         (optgroup_options): Make non-static.
12977         (dump_context::end_scope): Call
12978         optimization_records_maybe_pop_dump_scope.
12979         * dumpfile.h (optgroup_options): New decl.
12980         * json.cc: New file.
12981         * json.h: New file.
12982         * optinfo-emit-json.cc: New file.
12983         * optinfo-emit-json.h: New file.
12984         * optinfo.cc: Include "optinfo-emit-json.h".
12985         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
12986         (optinfo_enabled_p): Check optimization_records_enabled_p.
12987         (optinfo_wants_inlining_info_p): Likewise.
12988         * optinfo.h: Update comment.
12989         * profile-count.c (profile_quality_as_string): New function.
12990         * profile-count.h (profile_quality_as_string): New decl.
12991         (profile_count::quality): New accessor.
12992         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
12993         and optinfo_emit_json_cc_tests.
12994         * selftest.h (selftest::json_cc_tests): New decl.
12995         (selftest::optinfo_emit_json_cc_tests): New decl.
12996         * toplev.c: Include "optinfo-emit-json.h".
12997         (compile_file): Call optimization_records_finish.
12998         (do_compile): Call optimization_records_start.
12999         * tree-ssa-live.c: Include optinfo.h.
13000         (remove_unused_scope_block_p): Retain inlining information if
13001         optinfo_wants_inlining_info_p returns true.
13003 2018-07-20  Richard Biener  <rguenther@suse.de>
13005         PR debug/86585
13006         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
13007         to cover -flto-partition=none.
13009 2018-07-20  Martin Liska  <mliska@suse.cz>
13011         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
13012         (get_decl_source_range): Remove unused function.
13014 2018-07-20  Richard Biener  <rguenther@suse.de>
13016         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
13017         (struct vn_phi_s): Likewise.
13018         (struct vn_reference_s): Likewise.
13019         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
13020         for searching the slot of an entry known to be in the hash itself.
13021         (vn_phi_hasher::equal): Likewise.
13022         (vn_reference_hasher::equal): Likewise.
13023         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
13024         globals.
13025         (optimistic_info, current_info): Remove, keeping only valid_info.
13026         (vn_reference_lookup_1): Remove fallback lookup.
13027         (vn_reference_lookup_2): Likewise.
13028         (vn_nary_op_lookup_1): Likewise.
13029         (vn_phi_lookup): Likewise.
13030         (vn_nary_build_or_lookup_1): Make sure to not chain the built
13031         hash element.
13032         (vn_reference_insert): Adjust, chain the inserted hash element
13033         at last_inserted_ref.
13034         (vn_reference_insert_pieces): Likewise.
13035         (visit_reference_op_call): Likewise.
13036         (vn_nary_op_insert_into): Chain the inserted hash element at
13037         last_inserted_nary.
13038         (vn_nary_op_insert_pieces): Adjust.
13039         (vn_nary_op_insert): Likewise.
13040         (vn_nary_op_insert_stmt): Likewise.
13041         (vn_phi_insert): Adjust, chain the inserted hash element at
13042         last_inserted_phi.
13043         (process_scc): Remove clearing and copying the optimistic
13044         table.  Instead remove elements inserted during an optimistic
13045         iteration from the single table we maintain.
13046         (init_scc_vn): Adjust.
13047         (free_scc_vn): Likewise.
13048         (sccvn_dom_walker::record_cond): Likewise.
13049         (sccvn_dom_walker::after_dom_children): Likewise.
13051 2018-07-19  Martin Sebor  <msebor@redhat.com>
13053         PR tree-optimization/84047
13054         PR tree-optimization/83776
13055         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
13056         (check_array_bounds): Call it.
13058 2018-07-19  Martin Sebor  <msebor@redhat.com>
13060         * align.h (align_flags): Use member initialization.
13062 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
13064         * Makefile.in (OBJS): Add optinfo.o.
13065         * coretypes.h (class symtab_node): New forward decl.
13066         (struct cgraph_node): New forward decl.
13067         (class varpool_node): New forward decl.
13068         * dump-context.h: New file.
13069         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
13070         "tree-pass.h".
13071         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
13072         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
13073         (set_alt_dump_file): Likewise.
13074         (dump_context::~dump_context): New dtor.
13075         (dump_gimple_stmt): Move implementation to...
13076         (dump_context::dump_gimple_stmt): ...this new member function.
13077         Add the stmt to any pending optinfo, creating one if need be.
13078         (dump_gimple_stmt_loc): Move implementation to...
13079         (dump_context::dump_gimple_stmt_loc): ...this new member function.
13080         Start a new optinfo and add the stmt to it.
13081         (dump_gimple_expr): Move implementation to...
13082         (dump_context::dump_gimple_expr): ...this new member function.
13083         Add the stmt to any pending optinfo, creating one if need be.
13084         (dump_gimple_expr_loc): Move implementation to...
13085         (dump_context::dump_gimple_expr_loc): ...this new member function.
13086         Start a new optinfo and add the stmt to it.
13087         (dump_generic_expr): Move implementation to...
13088         (dump_context::dump_generic_expr): ...this new member function.
13089         Add the tree to any pending optinfo, creating one if need be.
13090         (dump_generic_expr_loc): Move implementation to...
13091         (dump_context::dump_generic_expr_loc): ...this new member
13092         function.  Add the tree to any pending optinfo, creating one if
13093         need be.
13094         (dump_printf): Move implementation to...
13095         (dump_context::dump_printf_va): ...this new member function.  Add
13096         the text to any pending optinfo, creating one if need be.
13097         (dump_printf_loc): Move implementation to...
13098         (dump_context::dump_printf_loc_va): ...this new member function.
13099         Start a new optinfo and add the stmt to it.
13100         (dump_dec): Move implementation to...
13101         (dump_context::dump_dec): ...this new member function.  Add the
13102         value to any pending optinfo, creating one if need be.
13103         (dump_context::dump_symtab_node): New member function.
13104         (dump_context::get_scope_depth): New member function.
13105         (dump_context::begin_scope): New member function.
13106         (dump_context::end_scope): New member function.
13107         (dump_context::ensure_pending_optinfo): New member function.
13108         (dump_context::begin_next_optinfo): New member function.
13109         (dump_context::end_any_optinfo): New member function.
13110         (dump_context::s_current): New global.
13111         (dump_context::s_default): New global.
13112         (dump_scope_depth): Delete global.
13113         (dumpfile_ensure_any_optinfo_are_flushed): New function.
13114         (dump_symtab_node): New function.
13115         (get_dump_scope_depth): Reimplement in terms of dump_context.
13116         (dump_begin_scope): Likewise.
13117         (dump_end_scope): Likewise.
13118         (selftest::temp_dump_context::temp_dump_context): New ctor.
13119         (selftest::temp_dump_context::~temp_dump_context): New dtor.
13120         (selftest::verify_item): New function.
13121         (ASSERT_IS_TEXT): New macro.
13122         (ASSERT_IS_TREE): New macro.
13123         (ASSERT_IS_GIMPLE): New macro.
13124         (selftest::test_capture_of_dump_calls): New test.
13125         (selftest::dumpfile_c_tests): Call it.
13126         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
13127         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
13128         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
13129         descriptive comment.
13130         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
13131         (dump_node, dump_bb): Move these unrelated decls.
13132         (class dump_manager): Add leading comment.
13133         * optinfo.cc: New file.
13134         * optinfo.h: New file.
13136 2018-07-19  Michael Collison  <michael.collison@arm.com>
13137             Richard Henderson <rth@redhat.com>
13139         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
13140         (subti): Handle op1 zero.
13141         (subvti4, usub4ti4): New.
13142         (*sub<GPI>3_compare1_imm): New.
13143         (sub<GPI>3_carryinCV): New.
13144         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
13145         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
13147 2018-07-19  Michael Collison  <michael.collison@arm.com>
13148             Richard Henderson <rth@redhat.com>
13150         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
13151         (addti3): Create simpler code if low part is already known to be 0.
13152         (addvti4, uaddvti4): New.
13153         (*add<GPI>3_compareC_cconly_imm): New.
13154         (*add<GPI>3_compareC_cconly): New.
13155         (*add<GPI>3_compareC_imm): New.
13156         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
13157         handle constants within this pattern..
13158         (*add<GPI>3_compareV_cconly_imm): New.
13159         (*add<GPI>3_compareV_cconly): New.
13160         (*add<GPI>3_compareV_imm): New.
13161         (add<GPI>3_compareV): New.
13162         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
13163         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
13164         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
13165         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
13166         with 'comparison' operator.
13167         (*add<GPI>3_compareV_cconly_imm): Ditto.
13168         (*add<GPI>3_compareV_cconly): Ditto.
13169         (*add<GPI>3_compareV_imm): Ditto.
13170         (add<GPI>3_compareV): Ditto.
13171         (add<mode>3_carryinC): Ditto.
13172         (*add<mode>3_carryinC_zero): Ditto.
13173         (*add<mode>3_carryinC): Ditto.
13174         (add<mode>3_carryinV): Ditto.
13175         (*add<mode>3_carryinV_zero): Ditto.
13176         (*add<mode>3_carryinV): Ditto.
13178 2018-07-19  Michael Collison  <michael.collison@arm.com>
13179             Richard Henderson <rth@redhat.com>
13181         * config/aarch64/aarch64-modes.def (CC_V): New.
13182         * config/aarch64/aarch64-protos.h
13183         (aarch64_addti_scratch_regs): Declare
13184         (aarch64_subvti_scratch_regs): Declare.
13185         (aarch64_expand_subvti): Declare.
13186         (aarch64_gen_unlikely_cbranch): Declare
13187         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
13188         for signed overflow using CC_Vmode.
13189         (aarch64_get_condition_code_1): Handle CC_Vmode.
13190         (aarch64_gen_unlikely_cbranch): New function.
13191         (aarch64_addti_scratch_regs): New function.
13192         (aarch64_subvti_scratch_regs): New function.
13193         (aarch64_expand_subvti): New function.
13195 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13197         * config/aarch64/aarch64-option-extensions.def: New entry for profile
13198         extension.
13199         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
13200         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
13201         extension.
13203 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13205         PR target/83009
13206         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
13207         address check not strict.
13209 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
13211         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
13212         Umq with Umn.
13213         (store_pair_lanes<mode>): Likewise.
13214         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
13215         enum value 'ADDR_QUERY_LDP_STP_N'.
13216         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
13217         (aarch64_print_address_internal): Add declaration.
13218         (aarch64_print_ldpstp_address): Remove.
13219         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
13220         (aarch64_print_operand): Change printing of 'y'.
13221         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
13222         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
13223         'true' rather than '1'.
13224         * config/aarch64/constraints.md (Uml): Likewise.
13225         (Uml): Rename to Umn.
13226         (Umq): Remove.
13228 2018-07-19  Richard Biener  <rguenther@suse.de>
13230         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
13231         a trailing array.
13232         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
13233         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
13234         (vn_reference_hasher): Likewise.
13235         (struct vn_tables_s): Remove obstack and alloc-pool members.
13236         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
13237         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
13238         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
13239         (vn_reference_insert_pieces): Likewise.
13240         (alloc_vn_nary_op_noinit): Adjust.
13241         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
13242         (vn_phi_eq): Adjust.
13243         (shared_lookup_phiargs): Remove.
13244         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
13245         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
13246         (visit_reference_op_call): Likewise.
13247         (copy_nary, copy_phi, copy_reference): Remove.
13248         (process_scc): Rewind the obstack when iterating.  Do not
13249         copy the elements to valid_info but just move them from one
13250         hashtable to the other.
13251         (allocate_vn_table): Adjust.
13252         (free_vn_table): Likewise.
13253         (init_scc_vn): Likewise.
13254         (free_scc_vn): Likewise.
13256 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
13258         PR target/86560
13259         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
13260         indirect_return as function type attribute.
13261         (ix86_attribute_table): Change indirect_return to function
13262         type attribute.
13263         * doc/extend.texi: Update indirect_return attribute.
13265 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
13267         * wide-int.h (widest2_int): New.
13268         * gimple-fold.c (arith_overflowed_p): Use it.
13269         * tree.h (widest2_int_cst): New.
13270         * tree-vrp.c (wide_int_binop_overflow): Rename from
13271         vrp_int_const_binop.
13272         Rewrite to work on trees.
13273         (extract_range_from_multiplicative_op_1): Abstract code to...
13274         (wide_int_range_min_max): ...here.
13275         (wide_int_range_cross_product): ...and here.
13276         (extract_range_from_binary_expr_1): Abstract overflow code to...
13277         (wide_int_range_mult_wrapping): ...here.
13278         * tree-vrp.h (wide_int_range_cross_product): New.
13279         (wide_int_range_mult_wrapping): New.
13281 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
13282             Julia Koval  <julia.koval@intel.com>
13284         * config/i386/x86-tune-costs.h (skylake_memcpy,
13285         skylake_memset): Replace rep_prefix with unrolling for size 512.
13287 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
13289         PR middle-end/86544
13290         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
13291         comparision with EQ_EXPR in last stmt.
13293 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13295         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
13296         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
13297         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
13298         previously known as "PowerPC AltiVec Built-in Functions".  Move
13299         some material to new subsubsections "PowerPC AltiVec Built-in
13300         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
13301         ISA 2.07".
13302         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
13303         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
13304         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
13305         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
13307 2018-07-18  Richard Biener  <rguenther@suse.de>
13309         PR tree-optimization/86557
13310         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
13311         EXACT_DIV_EXPR.
13313 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
13315         * config/s390/s390.c (s390_function_profiler): Generate CFI.
13317 2018-07-17  Jeff Law  <law@redhat.com>
13319         * config/arm/arm.c (get_label_padding): Update for recent
13320         changes to label_to_alignment.
13322         PR tree-optimization/86010
13323         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
13325         * config/mips/mips.c (vr4130_align_insns): Update for recent
13326         changes to label_to_alignment.
13328         * config/frv/frv.c (frv_label_align): Update for recent changes
13329         to label_to_alignment.
13331         * config/nios2/nios2.c (nios2_label_align): Update for recent
13332         changes which dropped ALIGN_LABELS_LOG.
13334 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
13336         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
13337         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
13339 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
13341         * config/arc/arc.c (arc_label_align): Use align_labels instead of
13342         deprecated align_labels_log.
13344 2018-07-17  Richard Biener  <rguenther@suse.de>
13346         PR lto/86456
13347         * dwarf2out.c (init_sections_and_labels): Always generate
13348         a debug_line_str_section for early LTO debug.
13349         (dwarf2out_finish): Reset debug_line_str_hash output early.
13350         Bump counter for extra dwarf5 .debug_loc labels to not conflict
13351         with fat LTO part.
13352         (dwarf2out_early_finish): Output debug_line_str.
13354 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
13356         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
13357         index register on z196 or later.
13359 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
13361         * config/s390/s390.c (s390_default_align): Set default function
13362         alignment to 16.
13363         (s390_override_options_after_change): Call s390_default align.
13364         (s390_option_override_internal): Call s390_default_align.
13365         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
13367 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
13369         PR middle-end/86542
13370         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
13371         to _looptemp_ clauses, other than the first two.
13373 2018-07-17  Martin Liska  <mliska@suse.cz>
13375         * opts.c: Do not enable OPT_falign_* for -Os.
13377 2018-07-17  Martin Liska  <mliska@suse.cz>
13379         * align.h (MAX_CODE_ALIGN): New.
13380         (MAX_CODE_ALIGN_VALUE): New.
13381         * common/config/i386/i386-common.c (ix86_handle_option):
13382         (MAX_CODE_ALIGN): Moved to align.h.
13383         * final.c (MAX_CODE_ALIGN): Likewise.
13384         * opts.c (parse_and_check_align_values):
13385         (MAX_CODE_ALIGN): Likewise.
13386         (MAX_CODE_ALIGN_VALUE): Likewise.
13388 2018-07-17  Martin Liska  <mliska@suse.cz>
13390         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
13391         in order to fulfil coding style.
13392         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
13393         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13394         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
13395         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
13396         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
13397         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
13398         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
13399         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
13400         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
13402 2018-07-17  Martin Liska  <mliska@suse.cz>
13404         * align.h: New file.
13405         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
13406         directly.
13407         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
13408         align_flags of label_to_alignment.
13409         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
13410         align_flags class.
13411         * config/m68k/m68k.c: Do not use removed align_labels_value and
13412         align_loops_value.
13413         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
13414         (LOOP_ALIGN): Likewise.
13415         (LABEL_ALIGN): Likewise.
13416         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
13417         Remove not used macro.
13418         (rs6000_loop_align): Change return type to align_flags.
13419         (rs6000_loop_align_max_skip): Remove.
13420         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
13421         Change return type to align_flags.
13422         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
13423         Remove not used macro.
13424         (rs6000_loop_align):  Change return type to align_flags.
13425         (rs6000_loop_align_max_skip): Remove.
13426         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
13427         * config/rx/rx-protos.h (rx_align_for_label): Make it
13428         static function.
13429         * config/rx/rx.c (rx_align_for_label): Change return type
13430         to align_flags.
13431         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
13432         macro definitions.
13433         into align_flags class.
13434         (LABEL_ALIGN): Likewise.
13435         (LOOP_ALIGN): Likewise.
13436         * config/s390/s390.c (s390_label_align): Use align_flags
13437         class member.
13438         (s390_asm_output_function_label): Likewise.
13439         * config/sh/sh.c (sh_override_options_after_change):
13440         Use align_flags class directly without macros.
13441         (find_barrier): Likewise.
13442         (barrier_align): Likewise.
13443         (sh_loop_align): Likewise.
13444         * config/spu/spu.c (spu_option_override):
13445         Use align_flags_tuple::get_value instead of removed macros.
13446         (spu_sched_init): Likewise.
13447         * config/spu/spu.h (GTY): Likewise.
13448         * config/visium/visium.c (visium_option_override):
13449         Set "8" as default secondary alignment.
13450         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
13451         in order to guarantee secondary alignment of 8.
13452         * coretypes.h: Include align.h header file.
13453         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
13454         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
13455         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
13456         * doc/tm.texi.in: Likewise.
13457         * final.c (struct label_alignment): Remove not used structure.
13458         (LABEL_ALIGN): Change type to align_flags.
13459         (LOOP_ALIGN): Likewise.
13460         (JUMP_ALIGN): Likewise.
13461         (default_loop_align_max_skip): Remove.
13462         (default_label_align_max_skip): Likewise.
13463         (default_jump_align_max_skip): Likewise.
13464         (default_label_align_after_barrier_max_skip):
13465         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
13466         (LABEL_TO_MAX_SKIP): Remove.
13467         (label_to_alignment): Return align_flags type instead of integer.
13468         (label_to_max_skip): Remove.
13469         (align_fuzz): Use align_flags type.
13470         (compute_alignments): Use align_flags type and use align_flags::max
13471         to combine multiple alignments.
13472         (grow_label_align): Grow vec instead of C array.
13473         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
13474         (shorten_branches):  Use align_flags type and use align_flags::max
13475         to combine multiple alignments.
13476         (final_scan_insn_1): Remove usage of secondary alignment that comes
13477         from label alignment, but instead use proper secondary alignment
13478         which is computed in grow_label_align.
13479         * flags.h (struct align_flags_tuple): Move to align.h.
13480         (struct align_flags): Likewise.
13481         (state_align_loops): Rename to align_loops.
13482         (state_align_jumps): Rename to align_jumps.
13483         (state_align_labels): Rename to align_labels.
13484         (state_align_functions): Rename to align_functions.
13485         (align_loops_log): Remove.
13486         (align_jumps_log): Remove.
13487         (align_labels_log): Remove.
13488         (align_functions_log): Remove.
13489         (align_loops_max_skip): Remove.
13490         (align_jumps_max_skip): Remove.
13491         (align_labels_max_skip): Remove.
13492         (align_functions_max_skip): Remove.
13493         (align_loops_value): Remove.
13494         (align_jumps_value): Remove.
13495         (align_labels_value): Remove.
13496         (align_functions_value): Remove.
13497         * output.h (label_to_alignment): Change return type to align_flags.
13498         (label_to_max_skip): Remove.
13499         * target.def: Remove loop_align_max_skip, label_align_max_skip,
13500         jump_align_max_skip macros.
13501         * targhooks.h (default_loop_align_max_skip): Remove.
13502         (default_label_align_max_skip): Likewise.
13503         (default_jump_align_max_skip): Likewise.
13504         (default_label_align_after_barrier_max_skip): Remove.
13505         * toplev.c (read_log_maxskip): Use ::normalize function.
13506         (parse_N_M): Remove not used argument and also call ::normalize.
13507         (parse_alignment_opts): Do not pass unused arguments.
13508         * varasm.c (assemble_start_function): Use directly align_functions
13509         instead of removed macros.
13510         * system.h: Do not poison removed macros.
13512 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
13514         PR middle-end/86539
13515         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
13516         and cond temporaries don't have reference type if iterator has
13517         pointer type.  For init use &for_pre_body instead of pre_p if
13518         for_pre_body is non-empty.
13520 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
13522         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
13523         double-double modes to SFmode directly directly.
13524         (trunc<mode>sf2_fprs): Delete.
13526 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
13528         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
13529         for conversions between IFmode and the decimal floating point modes.
13530         (init_float128_ieee): Use the correct names for conversions between
13531         KFmode and the decimal floating point modes.
13533 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
13535         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
13536         for the conversions between TDmode and IFmode.
13537         (init_float128_ieee): Use more correct names for the conversions
13538         between TDmode and KFmode.
13540 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
13542         PR tree-optimization/86526
13543         * builtins.c (expand_builtin_memcmp): Formatting fixes.
13544         (inline_expand_builtin_string_cmp): Likewise.
13545         (inline_string_cmp): Likewise.  Use c_readstr instead of
13546         builtin_memcpy_read_str.  Add unit_mode temporary.
13548 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13550         PR middle-end/86528
13551         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
13552         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
13554 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13556         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
13557         Alphabetize prototypes of built-in functions, separating out
13558         built-in functions that are listed in this section but should be
13559         described elsewhere.
13561 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
13563         PR target/86511
13564         * expmed.c (emit_store_flag): Do not emit setcc followed by a
13565         conditional move when trapping comparison was split to a
13566         non-trapping one (and vice versa).
13568 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
13570         * config/s390/s390.c (s390_function_profiler): Generate nops
13571         instead of profiler call sequences.
13572         * config/s390/s390.opt: Add the new option.
13574 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
13576         * config/s390/s390.c (s390_function_profiler): Generate
13577         __mcount_loc section.
13578         * config/s390/s390.opt: Add the new option.
13580 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
13582         * common.opt: Add the new warning.
13583         * config/s390/s390.c (s390_function_profiler): Emit "brasl
13584         %r0,__fentry__" when -mfentry is specified.
13585         (s390_option_override_internal): Disallow -mfentry for 31-bit
13586         CPUs.
13587         * config/s390/s390.opt: Add the new option.
13589 2018-07-16  Richard Biener  <rguenther@suse.de>
13591         PR lto/86523
13592         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
13593         for function-local FUNCTION_DECL and RESULT_DECL immediately.
13595 2018-07-16  Martin Liska  <mliska@suse.cz>
13597         PR ipa/86529
13598         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
13599         to ::get_create.
13601 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
13603         * config/arc/arcHS.md: Update ARCHS scheduling rules.
13605 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
13607         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
13608         for ARCHS4x.
13609         * config/arc/arc-cpus.def (hs4x): New cpu.
13610         (hs4xd): Likewise.
13611         * config/arc/arc-tables.opt: Regenerate.
13612         * config/arc/arc.c (arc_sched_issue_rate): New function.
13613         (TARGET_SCHED_ISSUE_RATE): Define.
13614         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
13615         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
13616         fpu_cvt.
13617         (attr tune): Add ARCHS4x tune values.
13618         (attr tune_dspmpy): Define.
13619         (*tst): Correct instruction type.
13620         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
13621         * config/arc/arcHS4x.md: New file.
13622         * config/arc/fpu.md: Update instruction type attributes.
13623         * config/arc/t-multilib: Regenerate.
13625 2018-07-16  Tom de Vries  <tdevries@suse.de>
13627         PR debug/86455
13628         * var-tracking.c (vt_initialize): Fix pre_dec handling.
13630 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
13632         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
13633         early clobber.
13635 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
13637         PR tree-optimization/86514
13638         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
13639         conversion to a boolean type from a type with greater precision.
13641 2018-07-16  Tom de Vries  <tdevries@suse.de>
13643         * var-tracking.c (vt_initialize): Print adjusted insn slim if
13644         dump_flags request TDF_SLIM.
13646 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
13648         * fold-const.c (int_const_binop_1): Abstract...
13649         (wide_int_binop): ...wide int code here.
13650         (poly_int_binop): ...poly int code here.
13651         Abstract the rest of int_const_binop_1 into int_const_binop.
13652         * fold-const.h (wide_int_binop): New.
13653         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
13654         Remove useless PLUS/MINUS_EXPR case.
13655         (zero_nonzero_bits_from_vr): Move wide int code...
13656         (zero_nonzero_bits_from_bounds): ...here.
13657         (extract_range_from_binary_expr_1): Move mask optimization code...
13658         (range_easy_mask_min_max): ...here.
13659         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
13660         (range_easy_mask_min_max): New.
13662 2018-07-15  Jeff Law  <law@redhat.com>
13664         PR target/85993
13665         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
13666         block.
13668 2018-07-14  Jim Wilson  <jimw@sifive.com>
13670         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
13672 2018-07-14  Paul Koning  <ni1d@arrl.net>
13674         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
13676 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
13678         * lto-streamer-out.c (copy_function_or_variable): Dump info about
13679         copying section.
13681 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
13682             Steve Munroe  <munroesj52@gmail.com>
13684         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
13685         (_mm_andnot_si128): Likewise.
13686         (_mm_or_si128): Likewise.
13687         (_mm_xor_si128): Likewise.
13689 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
13691         PR middle-end/78809
13692         * builtins.c (expand_builtin_memcmp): Inline the calls first
13693         when result_eq is false.
13694         (expand_builtin_strcmp): Inline the calls first.
13695         (expand_builtin_strncmp): Likewise.
13696         (inline_string_cmp): New routine. Expand a string compare
13697         call by using a sequence of char comparison.
13698         (inline_expand_builtin_string_cmp): New routine. Inline expansion
13699         a call to str(n)cmp/memcmp.
13700         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
13701         New option.
13702         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
13704 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
13706         * config/arm/driver-arm.c: Include arm-native.h.
13707         (host_detect_local_cpu): Use auto-generated data tables.
13708         (vendors, arm_cpu_table): Delete.  Move part information to ...
13709         * config/arm/arm-cpus.in: ... here.
13710         * config/arm/parsecpu.awk (gen_native): New function.
13711         (vendor, part): New CPU fields.
13712         (END): Add support for building the native CPU detection tables.
13713         * config/arm/t-arm (arm-native.h): Add build rule.
13714         (driver-arm.o): Add dependency on arm-native.h.
13716 2018-07-13  Richard Biener  <rguenther@suse.de>
13718         PR middle-end/85974
13719         * match.pd (addr1 - addr2): Allow either of the operand to
13720         have a conversion.
13722 2018-07-13  Tom de Vries  <tdevries@suse.de>
13724         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
13725         in remap_ssa_name.
13727 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
13729         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
13730         arrays instead of numbered variables.
13732 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
13734         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
13735         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
13737 2018-07-13  Richard Biener  <rguenther@suse.de>
13739         PR debug/86452
13740         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
13741         instead of get_context_die.
13743 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
13744             Richard Biener  <rguenther@suse.de>
13746         PR middle-end/86489
13747         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
13748         that the loop latch destination where phi is defined.
13750 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
13752         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
13753         (riscv_expand_epilogue): Add assertion to check interrupt mode.
13754         (riscv_set_current_function): Extract getting interrupt type to new
13755         function.
13756         (riscv_get_interrupt_type): New function.
13757         (riscv_merge_decl_attributes): New function, checking interrupt type is
13758         same.
13759         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
13761 2018-07-12  Paul Koning  <ni1d@arrl.net>
13763         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
13764         directive.
13766 2018-07-12  Paul Koning  <ni1d@arrl.net>
13768         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
13769         zero reference, add doloop_end instead.
13770         * doc/md.texi (decrement_and_branch_until_zero): Remove.
13771         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
13772         detail for doloop_end.
13774 2018-07-12  Martin Sebor  <msebor@redhat.com>
13776         PR c/86453
13777         * attribs.c (decl_attributes): Reject conflicting attributes before
13778         calling attribute handlers.
13780 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
13782         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
13783          parameter.
13784         (gcc::dump_manager::get_dump_file_name): likewise.
13785         (dump_begin): Likewise.
13786         * dumpfile.h (dump_begin): Update prototype.
13787         (gcc::dump_manager::get_dump_file_name,
13788         gcc::dump_manager::get_dump_file_name): Update prototype.
13790 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
13792         * internal-fn.h (vectorizable_internal_fn_p): New function.
13793         * tree-vect-slp.c (compatible_calls_p): Likewise.
13794         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
13795         to internal functions.
13796         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
13798 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
13800         * fold-const.h (inverse_conditions_p): Declare.
13801         * fold-const.c (inverse_conditions_p): New function.
13802         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
13803         that test the inverse condition of a conditional internal function.
13804         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
13805         * internal-fn.c (internal_fn_mask_index): Handle conditional
13806         internal functions.
13807         (vectorized_internal_fn_supported_p): New function.
13808         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
13809         (any_pred_load_store): Replace with...
13810         (need_to_predicate): ...this new variable.
13811         (redundant_ssa_names): New variable.
13812         (ifcvt_can_use_mask_load_store): Move initial checks to...
13813         (ifcvt_can_predicate): ...this new function.  Handle tree codes
13814         for which a conditional internal function exists.
13815         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
13816         instead of ifcvt_can_use_mask_load_store.  Update after variable
13817         name change.
13818         (predicate_load_or_store): New function, split out from
13819         predicate_mem_writes.
13820         (check_redundant_cond_expr): New function.
13821         (value_available_p): Likewise.
13822         (predicate_rhs_code): Likewise.
13823         (predicate_mem_writes): Rename to...
13824         (predicate_statements): ...this.  Use predicate_load_or_store
13825         and predicate_rhs_code.
13826         (combine_blocks, tree_if_conversion): Update after above name changes.
13827         (ifcvt_local_dce): Handle redundant_ssa_names.
13828         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
13829         general conditional functions.
13830         * tree-vect-stmts.c (vectorizable_call): Likewise.
13832 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
13833             Alan Hayward  <alan.hayward@arm.com>
13834             David Sherwood  <david.sherwood@arm.com>
13836         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
13837         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
13838         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
13839         plus and minus and convert them into IFN_COND_FMA-based sequences.
13840         (convert_mult_to_fma): Handle conditional plus and minus.
13842 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
13844         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
13845         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
13846         (cond_fnms_optab): New optabs.
13847         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
13848         internal functions.
13849         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
13850         * internal-fn.h (get_conditional_internal_fn): Declare.
13851         (get_unconditional_internal_fn): Likewise.
13852         * internal-fn.c (cond_ternary_direct): New macro.
13853         (expand_cond_ternary_optab_fn): Likewise.
13854         (direct_cond_ternary_optab_supported_p): Likewise.
13855         (FOR_EACH_COND_FN_PAIR): Likewise.
13856         (get_conditional_internal_fn): New function.
13857         (get_unconditional_internal_fn): Likewise.
13858         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
13859         (gimple_match_op::gimple_match_op): Add a new overload for 5
13860         operands.
13861         (gimple_match_op::set_op): Likewise.
13862         (gimple_resimplify5): Declare.
13863         * genmatch.c (decision_tree::gen): Generate simplifications for
13864         5 operands.
13865         * gimple-match-head.c (gimple_simplify): Define an overload for
13866         5 operands.  Handle calls with 5 arguments in the top-level overload.
13867         (convert_conditional_op): Handle conversions from unconditional
13868         internal functions to conditional ones.
13869         (gimple_resimplify5): New function.
13870         (build_call_internal): Pass a fifth operand.
13871         (maybe_push_res_to_seq): Likewise.
13872         (try_conditional_simplification): Try converting conditional
13873         internal functions to unconditional internal functions.
13874         Handle 3-operand unconditional forms.
13875         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
13876         Define ternary equivalents of the current rules for binary conditional
13877         internal functions.
13878         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
13879         ternary operations.
13880         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
13881         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
13882         (optab): Handle them.
13883         (SVE_COND_FP_TERNARY): New int iterator.
13884         (sve_fmla_op, sve_fmad_op): New int attributes.
13885         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
13886         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
13887         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
13889 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
13891         * target.def (preferred_else_value): New target hook.
13892         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
13893         * doc/tm.texi: Regenerate.
13894         * targhooks.h (default_preferred_else_value): Declare.
13895         * targhooks.c (default_preferred_else_value): New function.
13896         * internal-fn.h (conditional_internal_fn_code): Declare.
13897         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
13898         (get_conditional_internal_fn): Use it.
13899         (conditional_internal_fn_code): New function.
13900         * gimple-match.h (gimple_match_cond): New struct.
13901         (gimple_match_op): Add a cond member function.
13902         (gimple_match_op::gimple_match_op): Update all forms to take a
13903         gimple_match_cond.
13904         * genmatch.c (expr::gen_transform): Use the same condition as res_op
13905         for the suboperation, but don't specify a particular else_value.
13906         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
13907         (visit_nary_op, visit_reference_op_load): Pass
13908         gimple_match_cond::UNCOND to the gimple_match_op constructor.
13909         * gimple-match-head.c: Include tree-eh.h
13910         (convert_conditional_op): New function.
13911         (maybe_resimplify_conditional_op): Likewise.
13912         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
13913         (gimple_resimplify2): Likewise.
13914         (gimple_resimplify3): Likewise.
13915         (gimple_resimplify4): Likewise.
13916         (maybe_push_res_to_seq): Return null for conditional operations.
13917         (try_conditional_simplification): New function.
13918         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
13919         constructor.
13920         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
13921         IFN_COND_* call.
13922         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
13923         function.
13924         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
13926 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
13928         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
13929         DECL_FCONTEXT
13930         (hash_tree): Do not hash DECL_FCONTEXT
13931         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
13932         Do not stream DECL_FCONTEXT.
13933         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
13934         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
13936 2018-07-12  Richard Biener  <rguenther@suse.de>
13938         PR debug/86462
13939         * dwarf2out.c (gen_block_die): Only output blocks when they have
13940         at least one !DECL_IGNORED_P variable.
13942 2018-07-12  Richard Biener  <rguenther@suse.de>
13944         PR target/84829
13945         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
13946         Remove -mieee-fp handling.
13948 2018-07-12  Richard Biener  <rguenther@suse.de>
13950         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
13951         left-over from last patch.
13953 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
13955         PR tree-optimization/86492
13956         * gimple-ssa-store-merging.c
13957         (imm_store_chain_info::coalesce_immediate_stores): Call
13958         check_no_overlap even for the merge_overlapping case.  Formatting fix.
13960 2018-07-12  Richard Biener  <rguenther@suse.de>
13962         PR middle-end/86479
13963         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
13964         move possibly trapping operations into the conditional.
13966 2018-07-12  Richard Biener  <rguenther@suse.de>
13968         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
13969         (vn_lookup_simplify_result): Remove recursion limit applied
13970         here.
13971         (vn_nary_build_or_lookup_1): Adjust.
13972         (try_to_simplify): Likewise.
13973         * gimple-match-head.c (gimple_resimplify1): Instead apply one
13974         here.
13975         (gimple_resimplify2): Likewise.
13976         (gimple_resimplify3): Likewise.
13977         (gimple_resimplify4): Likewise.
13979 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
13981         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
13982         Use __mmask64 type instead of __mmask8 for __M argument.
13983         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
13984         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
13985         __U argument.
13986         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
13987         __mmask16 for __M argument.
13988         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
13989         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
13990         to __mmask16 instead of __mmask8.
13991         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
13992         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
13993         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
13994         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
13995         instead of __mmask16 for __U argument.
13996         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
13997         __mmask16 instead of __mmask8 for __U argument.
13998         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
13999         __U argument.
14000         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
14001         __mmask16.
14002         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
14003         argument.
14004         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
14005         __U argument.
14006         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
14007         __mmask16.
14008         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
14009         of __mmask16.
14010         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
14011         __U argument.
14012         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
14013         __U argument.
14014         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
14015         __U argument.
14016         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
14017         __U argument.
14018         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
14019         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
14020         return type as well as __M argument type and all casts from __mmask8
14021         to __mmask32.
14022         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
14023         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
14024         return type as well as __M argument type and all casts from __mmask8
14025         to __mmask16.
14026         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
14027         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
14028         return type as well as __M argument type and all casts from __mmask8
14029         to __mmask32.
14030         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
14031         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
14032         return type as well as __M argument type and all casts from __mmask8
14033         to __mmask16.
14034         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
14035         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
14036         __mmask16.
14038 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
14040         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
14041         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
14042         for __U argument.
14044 2018-07-11  Paul Koning  <ni1d@arrl.net>
14046         * doc/md.texi (define_subst): Document how multiple occurrences of
14047         the same argument in the replacement pattern are handled.
14049 2018-07-11  Paul Koning  <ni1d@arrl.net>
14051         * doc/extend.texi (Common Variable Attributes): Move "mode" into
14052         alphabetical order.
14053         (Common Type Attributes): Add "mode" attribute.
14055 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
14057         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
14058         stream DECL_ORIGINAL_TYPE.
14059         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
14060         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
14061         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
14062         Do not walk original type.
14063         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
14064         external decls.
14065         (write_ts_decl_non_common_tree_pointers): Do not stream
14066         DECL_ORIGINAL_TYPE
14067         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
14068         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
14070 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
14072         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
14073         thread twice from the same starting edge.
14075 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
14077         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
14078         * gimple.c (gimple_call_nonnull_result_p): ...here...
14079         (gimple_call_nonnull_arg): ...and here.
14080         * gimple.h (gimple_call_nonnull_result_p): New.
14081         (gimple_call_nonnull_arg): New.
14083 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
14085         * config/arm/arm-cpus.in: Move information from fpu field of each
14086         cpu definition to the isa field.
14087         * config/arm/parsecpu.awk (fpu): Delete match rule.
14088         (gen_comm_data): Don't add bits from the CPU's FPU entry.
14090 2018-07-11  Richard Biener  <rguenther@suse.de>
14092         PR debug/86457
14093         * dwarf2out.c (init_sections_and_labels): Use
14094         output_asm_line_debug_info consistently.
14095         (dwarf2out_early_finish): Likewise.
14096         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
14097         type units.
14099 2018-07-11  Richard Biener  <rguenther@suse.de>
14101         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
14102         Rework father_bb setting in a way to avoid propagating constants
14103         multiple times on a loop body.
14105 2018-07-10  Mark Wielaard  <mark@klomp.org>
14107         PR debug/86459
14108         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
14110 2018-07-10  Richard Biener  <rguenther@suse.de>
14112         * hash-map.h (hash_map::iterator::operator*): Return
14113         references to key and value.
14115 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
14117         PR c++/86443
14118         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
14119         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
14120         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
14121         (gimplify_omp_for): For composite loops, move outer
14122         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
14123         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
14124         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
14125         TREE_LIST for both the original class iterator and the "last" helper
14126         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
14127         loop, remember has_decl_expr from outer composite loops for the
14128         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
14130 2018-07-09  Martin Sebor  <msebor@redhat.com>
14132         PR middle-end/77357
14133         PR middle-end/86428
14134         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
14135         accessing implicitly initialized array elements.
14136         * expr.c (string_constant): Handle string initializers of
14137         character arrays within aggregates.
14138         * gimple-fold.c (fold_array_ctor_reference): Add argument.
14139         Store element offset.  As a special case, handle zero size.
14140         (fold_nonarray_ctor_reference): Same.
14141         (fold_ctor_reference): Add argument.  Store subobject offset.
14142         * gimple-fold.h (fold_ctor_reference): Add argument.
14144 2018-07-09  Paul Koning  <ni1d@arrl.net>
14146         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
14147         (pdp11_insn_cost): New function.
14148         (pdp11_md_asm_adjust): New function.
14149         (TARGET_INVALID_WITHIN_DOLOOP): Define.
14150         (pdp11_rtx_costs): Update to match machine better.
14151         (output_addr_const_pdp11): Correct format mismatch warnings.
14152         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
14153         * config/pdp11/pdp11.md: General change to add base_cost and/or
14154         length attributes for use by new pdp11_insn_cost function.
14155         (MIN_BRANCH): Correct definition.
14156         (MIN_SOB): Ditto.
14157         (doloop_end): Use standard pattern name for looping pattern.
14158         (doloop_end_nocc): New.
14159         (movsf): Add another constraint alternative.
14160         (zero_extendqihi2): Add constraint alternatives for not in place
14161         extend.
14162         (zero_extendhisi2): Remove.
14163         (shift patterns): Add CC handling variants.
14164         (bswaphi2): New.
14165         (bswapsi2): New.
14166         (rothi3): New.
14167         (define_peephole2): New peephole to recognize mov that sets CC for
14168         subsequent test.
14170 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14172         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
14173         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
14174         wi::add.
14176 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
14178         PR c/86420
14179         * real.c (real_nextafter): Return true if result is denormal.
14181 2018-07-09  Martin Liska  <mliska@suse.cz>
14183         * common.opt: Add back wrongly removed attribute.
14185 2018-07-09  Richard Biener  <rguenther@suse.de>
14187         PR debug/86413
14188         * dwarf2out.c (gen_block_die): For an early generated DIE
14189         always output high/low PC attributes.
14191 2018-07-09  Tom de Vries  <tdevries@suse.de>
14193         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
14194         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
14195         onto VAR_DECL with abstract origin.
14197 2018-07-07  Jim Wilson  <jimw@sifive.com>
14199         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
14201 2018-07-07  Tom de Vries  <tdevries@suse.de>
14203         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
14205 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
14207         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
14208         overflow_type.
14209         (combine_bound): Use wide-int overflow calculation instead of
14210         rolling our own.
14211         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
14212         overflow_type.
14213         * fold-const.c (int_const_binop_2): Same.
14214         (extract_muldiv_1): Same.
14215         (fold_div_compare): Same.
14216         (fold_abs_const): Same.
14217         * match.pd: Same.
14218         * poly-int.h (add): Same.
14219         (sub): Same.
14220         (neg): Same.
14221         (mul): Same.
14222         * predict.c (predict_iv_comparison): Same.
14223         * profile-count.c (slow_safe_scale_64bit): Same.
14224         * simplify-rtx.c (simplify_const_binary_operation): Same.
14225         * tree-chrec.c (tree_fold_binomial): Same.
14226         * tree-data-ref.c (split_constant_offset_1): Same.
14227         * tree-if-conv.c (idx_within_array_bound): Same.
14228         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
14229         * tree-ssa-phiopt.c (minmax_replacement): Same.
14230         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
14231         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
14232         * vr-values.c (vr_values::adjust_range_with_scev): Same.
14233         * wide-int.cc (wi::add_large): Same.
14234         (wi::mul_internal): Same.
14235         (wi::sub_large): Same.
14236         (wi::divmod_internal): Same.
14237         * wide-int.h: Change overflow type to overflow_type for neg, add,
14238         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
14239         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
14240         mul_internal, divmod_internal.
14241         (overflow_type): New enum.
14242         (accumulate_overflow): New.
14244 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
14246         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
14247         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
14249 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
14251         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
14252         argument is checked for zero before entering loop, avoid checking again.
14254 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
14256         * gimplify.h (generic_expr_could_trap_p): Set as global function.
14257         * gimplify.h (generic_expr_could_trap_p): Likwise.
14258         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
14260 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
14262         PR tree-optimization/86401
14263         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
14264         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
14265         (fold_bit_and_mask): ... here.  New helper function for match.pd.
14266         * fold-const.h (fold_bit_and_mask): Declare.
14267         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
14269 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
14271         PR target/86324
14272         * target.def (translate_mode_attribute): New hook.
14273         * targhooks.h (default_translate_mode_attribute): Declare.
14274         * targhooks.c (default_translate_mode_attribute): New function.
14275         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
14276         * doc/tm.texi: Regenerate.
14277         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
14278         (rs6000_translate_mode_attribute): New function.
14280 2018-07-06  Paul Koning  <ni1d@arrl.net>
14282         * doc/md.texi (define_split): Document DONE and FAIL.
14283         (define_peephole2): Ditto.
14285 2018-07-05  Jeff Law  <law@redhat.com>
14287         PR tree-optimization/86010
14288         * tree-ssa-dse.c (compute_trims): More aggressively trim at
14289         both the head and tail of mem* and str* calls.
14291 2018-07-05  Jim Wilson  <jimw@sifive.com>
14293         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
14295 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
14297         * config/aarch64/aarch64-simd.md: correct flags text for
14298         MIN_EXPR replacement.
14300 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
14302         * configure: Regenerated.
14304 2018-07-05  Carl Love  <cel@us.ibm.com>
14306         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
14307         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
14308         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
14309         VSX_BUILTIN_DOUBLEL_V4SF.
14311 2018-07-05  Martin Sebor  <msebor@redhat.com>
14313         PR c++/86400
14314         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
14315         than its domain to compute its the upper bound of a char array.
14317 2018-07-05  Nathan Sidwell  <nathan@acm.org>
14319         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
14320         * doc/cpp.texi: Update comment.
14321         * doc/tm.texi: Rebuilt.
14322         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
14323         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
14324         * doc/extend.texi (Backwards Compatibility): Clarify it is system
14325         headers affected by extern "C".
14326         * system.h: Poison NO_IMPLICIT_EXTERN_C.
14327         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
14328         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
14329         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
14330         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
14331         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
14332         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
14333         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
14334         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
14335         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
14336         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
14337         config/sparc/sp64-elf.h, config/spu/spu.h,
14338         config/stormy16/stormy16.h, config/v850/v850.h,
14339         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
14340         define NO_IMPLICIT_EXTERN_C.
14341         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
14343 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
14345         PR target/84711
14346         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
14347         instead of GET_MODE_SIZE when comparing Units.
14349 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
14351         PR target/84711
14352         * rtlanal.c (set_noop_p): Constrain on mode change,
14353         include hard-reg-set.h
14355 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
14357         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
14359 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
14361         Revert
14362         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
14364         PR sanitizer/84250
14365         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
14366         libasan.
14367         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
14369 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
14371         PR sanitizer/84250
14372         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
14373         libasan.
14374         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
14376 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
14378         PR middle-end/86380
14379         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
14381 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
14383         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
14384         neg_*_op* variables.
14386 2018-07-04  Martin Liska  <mliska@suse.cz>
14388         * tree-switch-conversion.c: Define
14389         max_ratio_for_speed and max_ratio_for_size constants.
14391 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
14392             Martin Liska  <mliska@suse.cz>
14394         PR middle-end/66240
14395         PR target/45996
14396         PR c/84100
14397         * common.opt: Rename align options with 'str_' prefix.
14398         * common/config/i386/i386-common.c (set_malign_value): New
14399         function.
14400         (ix86_handle_option): Use it to set -falign-* options/
14401         * config/aarch64/aarch64-protos.h (struct tune_params): Change
14402         type from int to string.
14403         * config/aarch64/aarch64.c: Update default values from int
14404         to string.
14405         * config/alpha/alpha.c (alpha_override_options_after_change):
14406         Likewise.
14407         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
14408         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14409         max skip conditionally.
14410         * config/i386/freebsd.h (SUBALIGN_LOG): New.
14411         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14412         max skip conditionally.
14413         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14414         max skip conditionally.
14415         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
14416         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14417         max skip conditionally.
14418         * config/i386/i386.c (struct ptt): Change type from int to
14419         string.
14420         (ix86_default_align): Set default values.
14421         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
14422         max skip conditionally.
14423         * config/i386/iamcu.h (SUBALIGN_LOG): New.
14424         (ASM_OUTPUT_MAX_SKIP_ALIGN):
14425         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
14426         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14427         max skip conditionally.
14428         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
14429         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
14430         * config/i386/x86-64.h (SUBALIGN_LOG): New.
14431         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
14432         max skip conditionally.
14433         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
14434         * config/ia64/ia64.c (ia64_option_override): Set default values
14435         for alignment options.
14436         * config/m68k/m68k.c: Handle new str_align_* options.
14437         * config/mips/mips.c (mips_set_compression_mode): Change
14438         type of constants.
14439         (mips_option_override): Set default values for options.
14440         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
14441         Likewise.
14442         * config/rs6000/rs6000.c (rs6000_option_override_internal):
14443         Likewise.
14444         * config/rx/rx.c (rx_option_override): Likewise.
14445         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
14446         (LABEL_ALIGN): Use align_labels_log.
14447         (LOOP_ALIGN): Use align_loops_align.
14448         * config/s390/s390.c (s390_asm_output_function_label): Use new
14449         macros.
14450         * config/sh/sh.c (sh_override_options_after_change):
14451         Change type of constants.
14452         * config/spu/spu.c (spu_sched_init): Likewise.
14453         * config/sparc/sparc.c (sparc_option_override): Set default
14454         values for options.
14455         * config/visium/visium.c (visium_option_override): Likewise.
14456         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
14457         emit p2align format with last argument if it's not needed.
14458         * doc/invoke.texi: Document extended format of -falign-*.
14459         * final.c: Use align_labels alignment.
14460         * flags.h (struct target_flag_state): Change type to use
14461         align_flags.
14462         (struct align_flags_tuple): New.
14463         (struct align_flags): Likewise.
14464         (align_loops_log): Redefine macro to use new types.
14465         (align_loops_max_skip): Redefine macro to use new types.
14466         (align_jumps_log): Redefine macro to use new types.
14467         (align_jumps_max_skip): Redefine macro to use new types.
14468         (align_labels_log): Redefine macro to use new types.
14469         (align_labels_max_skip): Redefine macro to use new types.
14470         (align_functions_log): Redefine macro to use new types.
14471         (align_loops): Redefine macro to use new types.
14472         (align_jumps): Redefine macro to use new types.
14473         (align_labels): Redefine macro to use new types.
14474         (align_functions): Redefine macro to use new types.
14475         (align_functions_max_skip): Redefine macro to use new types.
14476         (align_loops_value): New macro.
14477         (align_jumps_value): New macro.
14478         (align_labels_value): New macro.
14479         (align_functions_value): New macro.
14480         * function.c (invoke_set_current_function_hook): Propagate
14481         alignment values from flags to global variables default in
14482         topleev.h.
14483         * ipa-icf.c (sem_function::equals_wpa): Use
14484         cl_optimization_option_eq instead of memcmp.
14485         * lto-streamer.h (cl_optimization_stream_out): Support streaming
14486         of string types.
14487         (cl_optimization_stream_in): Likewise.
14488         * optc-save-gen.awk: Support strings in cl_optimization.
14489         * opth-gen.awk: Likewise.
14490         * opts.c (finish_options): Remove error checking of invalid
14491         value ranges.
14492         (MAX_CODE_ALIGN): Remove.
14493         (MAX_CODE_ALIGN_VALUE): Likewise.
14494         (parse_and_check_align_values): New function.
14495         (check_alignment_argument): Likewise.
14496         (common_handle_option): Use check_alignment_argument.
14497         * opts.h (parse_and_check_align_values): Declare.
14498         * toplev.c (init_alignments): Remove.
14499         (read_log_maxskip): New.
14500         (parse_N_M): Likewise.
14501         (parse_alignment_opts): Likewise.
14502         (backend_init_target): Remove usage of init_alignments.
14503         * toplev.h (parse_alignment_opts): Declare.
14504         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
14505         argument.
14506         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
14507         * tree.c (cl_option_hasher::equal): New.
14508         * varasm.c: Use new global macros.
14510 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
14512         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
14513         Use a simpler align directive also if MAXSKIP = ALIGN-1.
14514         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14515         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14516         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14517         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
14518         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
14519         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
14520         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
14521         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14522         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14523         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14524         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
14526 2018-07-04  Martin Liska  <mliska@suse.cz>
14527             Jonathan Wakely  <jwakely@redhat.com>
14529         * coverage.c: Use correct type.
14530         * doc/invoke.texi: Language correction.
14532 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
14534         PR target/85620
14535         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
14536         ENDBRANCH for non-tail call which may return via indirect branch.
14537         * doc/extend.texi: Document indirect_return attribute.
14539 2018-07-03  Martin Sebor  <msebor@redhat.com>
14541         PR tree-optimization/86274
14542         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
14543         precondition.
14544         (format_floating): Correct handling of infinities and NaNs.
14546 2018-07-03  Martin Sebor  <msebor@redhat.com>
14548         * print-tree.c (print_real_cst): New function.
14549         (print_node_brief): Call it.
14550         (print_node): Ditto.
14552 2018-07-03  Jeff Law  <law@redhat.com>
14554         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
14555         into a single pattern.
14557         * config/h8300/h8300.md (ors code_iterator): New.
14558         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
14559         a single pattern and single splitter.
14560         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
14561         (iorqi3_1, xorqi3_1): Likewise.
14562         (iorqi3, xorqi3 expanders): Similarly.
14564         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
14565         (movmd_internal) into a single pattern using the P mode iterator.
14566         (movmd splitters): Similarly.
14567         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
14568         (movsd splitters): Similarly.
14570         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
14571         ADDB, ADDW and ADDL into a single ADD attribute which selects the
14572         right table based on the size of the operand.
14573         * config/h8300/h8300.md (length_table): Corresponding changes. All
14574         references to "addb", "addw" and "addl" changed to "add".
14575         (btst patterns): Merge two variants into a single pattern.
14576         (tstqi, tsthi): Likewise.
14577         (addhi3_incdec, addsi3_incdec): Likewise.
14578         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
14579         (mulhi3, mulsi3): Likewise.
14580         (udivhi3, udivsi3): Likewise.
14581         (divhi3, divsi3): Likewise.
14582         (andorqi3, andorhi3, andorsi3): Likewise.
14584 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
14586         PR target/85694
14587         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
14588         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
14590 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
14592         PR tree-optimization/85694
14593         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
14594         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
14595         UNSPEC_URHADD.
14596         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
14597         (<u>avg<mode>3_ceil): New patterns.
14599 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
14601         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
14602         scan-tree-dump directive.
14603         * gcc.dg/vect/slp-perm-2.c: Likewise.
14604         * gcc.dg/vect/slp-perm-3.c: Likewise.
14605         * gcc.dg/vect/slp-perm-5.c: Likewise.
14606         * gcc.dg/vect/slp-perm-6.c: Likewise.
14607         * gcc.dg/vect/slp-perm-7.c: Likewise.
14608         * gcc.dg/vect/slp-perm-8.c: Likewise.
14610 2018-07-03  Marek Polacek  <polacek@redhat.com>
14612         PR middle-end/86202
14613         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
14615 2018-07-03  Richard Biener  <rguenther@suse.de>
14617         PR ipa/86389
14618         * tree-ssa-structalias.c (find_func_clobbers): Properly
14619         handle indirect calls.
14621 2018-07-03  Jeff Law  <law@redhat.com>
14623         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
14624         (shifts): New code iterator.
14625         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
14626         expander.  Fix HImode handling on H8/SX.
14627         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
14628         (subqi3, subhi3, subsi3 expanders): Likewise.
14629         (andqi3, andhi3, andsi3 expanders): Likewise.
14630         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
14631         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
14632         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
14633         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
14634         (zero_extendqihi2, zero_extendqisi2): Likewise.
14635         (extendqihi2, extendqisi2): Likewise.
14636         (rotlqi3, rotlhi3, rotlsi3): Likewise.
14637         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
14638         (rotlqi3_1, rotlhi3_1): Likewise.
14639         (logicalhi3_sn, logicalsi3_sn): Likewise.
14640         (logicalhi3, logicalsi3): Likewise.
14642 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
14644         * tree-vect-patterns.c (vect_recog_rotate_pattern)
14645         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
14646         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
14647         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
14648         type to append_pattern_def_seq instead of creating a stmt_vec_info
14649         directly.
14650         (build_mask_conversion): Likewise.  Remove vinfo argument.
14651         (vect_add_conversion_to_patterm): Likewise, renaming to...
14652         (vect_add_conversion_to_pattern): ...this.
14653         (vect_recog_mask_conversion_pattern): Update call to
14654         build_mask_conversion.  Pass the vector type to
14655         append_pattern_def_seq here too.
14656         (vect_recog_gather_scatter_pattern): Update call to
14657         vect_add_conversion_to_pattern.
14659 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
14661         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
14662         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14663         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
14664         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
14665         STMT_VINFO_PATTERN_DEF_SEQ to null here.
14666         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
14667         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
14668         append_pattern_def_seq instead of new_pattern_def_seq.
14669         (vect_recog_divmod_pattern): Do both of the above.
14670         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
14671         is null.
14673 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
14675         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
14676         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
14677         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
14678         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
14679         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
14680         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
14681         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
14682         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
14683         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
14684         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
14685         parameter with a single stmt_vec_info.
14686         (vect_recog_func_ptr): Likewise.
14687         (vect_recog_gather_scatter_pattern): Likewise, folding in...
14688         (vect_try_gather_scatter_pattern): ...this.
14689         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
14690         the stmt_vec_info of the statement to be matched.  Don't clear
14691         STMT_VINFO_RELATED_STMT.
14692         (vect_pattern_recog): Update call accordingly.
14694 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
14696         PR tree-optimization/85694
14697         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
14698         (uavgM3_ceil): Document new optabs.
14699         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
14700         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
14701         functions.
14702         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
14703         (savg_ceil_optab): New optabs.
14704         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
14705         (vect_vect_recog_func_ptrs): Add it.
14706         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
14707         constant directly from the associated lhs.
14709 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
14711         * tree-vect-patterns.c (vect_split_statement): New function.
14712         (vect_convert_input): Use it to try to split an existing cast.
14714 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
14716         * poly-int.h (print_hex): New function.
14717         * dumpfile.h (dump_dec, dump_hex): Declare.
14718         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
14719         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
14720         min_input_precision, operation_precision and operation_sign.
14721         * tree-vect-patterns.c (vect_get_range_info): New function.
14722         (vect_same_loop_or_bb_p, vect_single_imm_use)
14723         (vect_operation_fits_smaller_type): Delete.
14724         (vect_look_through_possible_promotion): Add an optional
14725         single_use_p parameter.
14726         (vect_recog_over_widening_pattern): Rewrite to use new
14727         stmt_vec_info infomration.  Handle one operation at a time.
14728         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
14729         (vect_truncatable_operation_p, vect_set_operation_type)
14730         (vect_set_min_input_precision): New functions.
14731         (vect_determine_min_output_precision_1): Likewise.
14732         (vect_determine_min_output_precision): Likewise.
14733         (vect_determine_precisions_from_range): Likewise.
14734         (vect_determine_precisions_from_users): Likewise.
14735         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
14736         (vect_vect_recog_func_ptrs): Put over_widening first.
14737         Add cast_forwprop.
14738         (vect_pattern_recog): Call vect_determine_precisions.
14740 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
14742         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
14743         statements that have been replaced by further pattern statements.
14744         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
14746 2018-07-03  Richard Biener  <rguenther@suse.de>
14748         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
14749         always set *dt.  Dump vectype in vectype overload.
14750         * dumpfile.h (dump_gimple_expr): New function.
14751         (dump_gimple_expr_loc): Likewise.
14752         * dumpfile.c (dump_gimple_expr): New function.
14753         (dump_gimple_expr_loc): Likewise.
14755 2018-07-02  Jeff Law  <law@redhat.com>
14757         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
14758         the H8/300, H8/300H and H8/S variants into a single pattern.
14759         (movhi_h8300, movqi_h8300hs): Similarly.
14760         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
14761         (QHI mode iterator): New.
14763         * config/h8300/h8300.md: Remove trailing whitespace.
14765 2018-07-02  Jim Wilson  <jimw@sifive.com>
14767         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
14768         instead of emit_insn for interrupt returns.
14769         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
14770         (riscv_sret, riscv_uret): Likewise.
14772 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
14774         * pretty-print.c (selftest::test_pp_format): Move save and restore
14775         of quotes to class auto_fix_quotes, and add an instance.
14776         * selftest.c: Include "intl.h".
14777         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
14778         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
14779         * selftest.h (selftest::auto_fix_quotes): New class.
14781 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
14783         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
14784         (aarch64_sve_prepare_conditional_op): Remove.
14785         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
14786         Allow aarch64_simd_reg_or_zero as select operand; remove
14787         the aarch64_sve_prepare_conditional_op call.
14788         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
14789         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
14790         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
14791         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
14792         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
14793         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
14794         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
14795         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
14796         and a splitters to match all of the *_any patterns.
14797         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
14799         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
14800         (SVE_COND_FP_BINARY_REV): Remove.
14801         (sve_int_op_rev, sve_fp_op_rev): New.
14802         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
14803         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
14804         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
14805         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
14806         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
14807         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
14808         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
14809         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
14810         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
14812         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
14813         Remove match_dup 1 from the inner unspec.
14814         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
14816         * config/aarch64/aarch64.md (movprfx): New attr.
14817         (length): Default movprfx to 8.
14818         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
14819         (*madd<SVE_I>, *msub<SVE_I): Likewise.
14820         (*<su>mul<SVE_I>3_highpart): Likewise.
14821         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
14822         (*v<ASHIFT><SVE_I>3): Likewise.
14823         (*<su><MAXMIN><SVE_I>3): Likewise.
14824         (*<su><MAXMIN><SVE_F>3): Likewise.
14825         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
14826         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
14827         (*div<SVE_F>4): Likewise.
14829 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
14831         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
14832         in dump string.
14834 2018-07-02  Richard Biener  <rguenther@suse.de>
14836         PR tree-optimization/86363
14837         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
14838         memset argument refers to a non-variable address.
14840 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
14842         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
14843         {PLUS,MINUS}_EXPR code to...
14844         (adjust_symbolic_bound): ...here,
14845         (combine_bound): ...here,
14846         (set_value_range_with_overflow): ...and here.
14848 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
14850         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
14851         code...
14852         (extract_range_from_abs_expr): ...here.
14854 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
14856         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
14857         -fno-omit-frame-pointer when not optimizing.
14859 2018-07-02  Martin Liska  <mliska@suse.cz>
14861         PR ipa/86279
14862         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
14863         (propagate_nothrow): Likewise.
14865 2018-07-02  Martin Liska  <mliska@suse.cz>
14867         PR ipa/86323
14868         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
14870 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
14872         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
14873         function in r262149, changing "loc" param from source_location to
14874         const dump_location_t &.
14875         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
14876         declaration, as above.
14878 2018-07-01  Paul Koning  <ni1d@arrl.net>
14880         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
14881         -munit-asm, -mgnu-asm, -mdec-asm.
14882         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
14883         (pdp11_output_labelref): New.
14884         (pdp11_output_def): New.
14885         (pdp11_output_addr_vec_elt): New.
14886         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
14887         %# and %@ format codes.
14888         (pdp11_option_override): New.
14889         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
14890         (pdp11_output_ident): New.
14891         (pdp11_asm_named_section): New.
14892         (pdp11_asm_init_sections): New.
14893         (pdp11_file_start): New.
14894         (pdp11_file_end): New.
14895         (output_ascii): Use .ascii/.asciz for -mdec-asm.
14896         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
14897         %o, like %c but octal.
14898         (pdp11_option_override): New.
14899         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
14900         -mdec-asm.
14901         (DATA_SECTION_ASM_OP): Ditto.
14902         (READONLY_DATA_SECTION_ASM_OP): New.
14903         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
14904         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
14905         (ASM_OUTPUT_LABELREF): Ditto.
14906         (ASM_OUTPUT_DEF): Ditto.
14907         (ASM_OUTPUT_EXTERNAL): New.
14908         (ASM_OUTPUT_SOURCE_FILENAME): New.
14909         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
14910         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
14911         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
14912         %# and %@ format codes.
14913         * config/pdp11/pdp11.opt (mgnu-asm): New.
14914         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
14915         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
14916         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
14918 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
14920         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
14921         dereferencing path[] beyond its length.
14922         (debug_path): New.
14923         (debug_all_paths): New.
14924         (rewire_first_differing_edge): New.
14925         (adjust_paths_after_duplication): New.
14926         (duplicate_thread_path): Call adjust_paths_after_duplication.
14927         Add new argument.
14928         (thread_through_all_blocks): Add new argument to
14929         duplicate_thread_path.
14931 2018-06-30  Jim Wilson  <jimw@sifive.com>
14933         * config/riscv/predicates.md (p2m1_shift_operand): New.
14934         (high_mask_shift_operand): New.
14935         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
14936         pattern using p2m1_shift_operand.
14937         (lshsi3_zero_extend_3+2): New combiner pattern using
14938         high_mask_shift_operand.
14940 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
14942         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
14943         split out from...
14944         (vect_recog_rotate_pattern): ...here.
14945         (vect_convert_input): Try to insert casts of invariants in the
14946         preheader.
14947         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
14948         preheader to be empty.
14950 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
14952         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
14953         vector type.  If given, install it in the new statement's
14954         STMT_VINFO_VECTYPE.
14955         (vect_element_precision): New function.
14956         (vect_unpromoted_value): New struct.
14957         (vect_unpromoted_value::vect_unpromoted_value): New function.
14958         (vect_unpromoted_value::set_op): Likewise.
14959         (vect_look_through_possible_promotion): Likewise.
14960         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
14961         (vect_widened_op_tree, vect_convert_input): Likewise.
14962         (vect_convert_inputs, vect_convert_output): Likewise.
14963         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
14964         to handle the optional cast of the multiplication result and
14965         vect_widened_op_tree to detect the widened multiplication itself.
14966         Do not require the input and output of promotion casts to have
14967         the same sign, but base the signedness of the operation on the
14968         input rather than the result.  If the pattern includes two
14969         promotions, check that those promotions have the same sign.
14970         Do not restrict the MULT_EXPR handling to a double-width result;
14971         handle quadruple-width results and wider.  Use vect_convert_inputs
14972         to convert the inputs to the common type.
14973         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
14974         to handle the optional cast of the ABS result.  Also allow a sign
14975         change or a sign extension between the ABS and MINUS.
14976         Use vect_widened_op_tree to detect the widened subtraction and use
14977         vect_convert_inputs to convert the inputs to the common type.
14978         (vect_handle_widen_op_by_const): Delete.
14979         (vect_recog_widen_op_pattern): New function.
14980         (vect_recog_widen_mult_pattern): Use it.
14981         (vect_recog_widen_shift_pattern): Likewise.
14982         (vect_recog_widen_sum_pattern): Use
14983         vect_look_through_possible_promotion to handle the promoted
14984         PLUS_EXPR operand.
14986 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
14988         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
14989         the containing gimple_seq *.
14990         * gimple-iterator.h (gsi_for_stmt): Declare it.
14991         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
14992         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
14993         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
14994         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
14995         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
14996         checks.
14997         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
14998         split out from...
14999         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
15000         statement being replaced is part of an existing pattern
15001         definition sequence, inserting the new pattern statements before
15002         the original one.
15003         (vect_pattern_recog_1): Don't return a bool.  If the statement
15004         is already part of a pattern, instead apply pattern matching
15005         to the pattern definition statements.  Don't clear the
15006         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
15007         (vect_pattern_recog): Don't break after the first match;
15008         continue processing the pattern definition statements instead.
15009         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
15011 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
15013         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
15014         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
15015         (vect_recog_widen_sum_pattern): Use it.
15017 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
15019         * tree-vect-loop.c (vectorizable_reduction): Assert that the
15020         phi is not a pattern statement and has not been replaced by
15021         a pattern statement.
15022         * tree-vect-patterns.c (type_conversion_p): Don't check
15023         STMT_VINFO_IN_PATTERN_P.
15024         (vect_recog_vector_vector_shift_pattern): Likewise.
15025         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
15026         the pattern statement rather than the original statement; check
15027         directly for a WIDEN_MULT_EXPR here.
15028         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
15029         vect_is_simple_use to return the pattern statement rather
15030         than the original statement; use is_pattern_stmt_p to check
15031         for such a pattern statement.
15032         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
15033         to return the pattern statement rather than the original statement;
15034         don't do the same transformation here.
15035         (vect_is_simple_use): If the defining statement has been replaced
15036         by a pattern statement, return the pattern statement instead.
15037         Remove the corresponding (local) transformation from the vectype
15038         overload.
15040 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
15042         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
15043         end and default to null.
15044         * tree-vect-loop.c (vect_create_epilog_for_reduction)
15045         (vectorizable_reduction): Update calls accordingly, dropping the
15046         gimple ** argument if the passed-back statement isn't needed.
15047         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
15048         (vect_recog_rotate_pattern): Likewise.
15049         (vect_recog_mask_conversion_pattern): Likewise.
15050         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
15051         (vect_mask_constant_operand_p): Likewise.
15052         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
15053         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
15054         (get_group_load_store_type, get_load_store_type): Likewise.
15055         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
15056         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
15057         (vectorizable_conversion, vectorizable_assignment): Likewise.
15058         (vectorizable_shift, vectorizable_operation): Likewise.
15059         (vectorizable_store, vect_is_simple_cond): Likewise.
15060         (vectorizable_condition, vectorizable_comparison): Likewise.
15061         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
15062         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
15063         and move it to the end.  Cope with null def_stmt_outs.
15065 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
15067         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
15069 2018-06-29  Jeff Law  <law@redhat.com>
15071         * config/v850/v850.c (v850_legitimate_address_p): Handle large
15072         displacements for TARGET_V850E2V3 and newer.
15073         (TARGET_LRA_P): Remove.  Defaults to LRA now.
15074         * config/v850/v850.md (sign23byte_load): Remove.
15075         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
15076         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
15078 2018-06-29  Martin Liska  <mliska@suse.cz>
15080         PR lto/85759
15081         * coverage.c (coverage_init): Mangle full path name.
15082         * doc/invoke.texi: Document the change.
15083         * gcov-io.c (mangle_path): New.
15084         * gcov-io.h (mangle_path): Likewise.
15085         * gcov.c (mangle_name): Use mangle_path for path mangling.
15087 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15089         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
15090         if starting source register is not even.
15092 2018-06-29  Martin Liska  <mliska@suse.cz>
15094         PR tree-optimization/86263
15095         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
15096         Make edge redirection.
15098 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
15100         * dumpfile.c (dump_loc): Add indentation based on scope depth.
15101         (dump_scope_depth): New variable.
15102         (get_dump_scope_depth): New function.
15103         (dump_begin_scope): New function.
15104         (dump_end_scope): New function.
15105         * dumpfile.h (get_dump_scope_depth): New declaration.
15106         (dump_begin_scope): New declaration.
15107         (dump_end_scope): New declaration.
15108         (class auto_dump_scope): New class.
15109         (AUTO_DUMP_SCOPE): New macro.
15110         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
15111         AUTO_DUMP_SCOPE.
15113 2018-06-29  Richard Biener  <rguenther@suse.de>
15115         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
15116         compute_all_dependences succeeds.
15117         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
15118         exceed --param loop-max-datarefs-for-datadeps.
15120 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
15122         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
15124 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
15126         PR target/86348
15127         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
15128         alternative 0 in preferred_for_speed attribute.
15130 2018-06-28  Paul Koning  <ni1d@arrl.net>
15132         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
15133         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
15134         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
15135         * config/pdp11/pdp11.md: Correct "length" attribute calculation
15136         for shift insn patterns.
15138 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
15140         * cgraph.c (cgraph_node::get_body): Replace assignments to
15141         "dump_file" with calls to set_dump_file.
15142         * dumpfile.c (alt_dump_file): Make static, and group with...
15143         (alt_flags): ...this definition.
15144         (dumps_are_enabled): New variable.
15145         (refresh_dumps_are_enabled): New function.
15146         (set_dump_file): New function.
15147         (set_alt_dump_file): New function.
15148         (gcc::dump_manager::dump_start): Replace assignments to
15149         "dump_file" and "alt_dump_file" with calls to set_dump_file and
15150         set_alt_dump_file.
15151         (gcc::dump_manager::dump_finish): Likewise.
15152         * dumpfile.h (alt_dump_file): Delete decl.
15153         (dumps_are_enabled): New variable decl.
15154         (set_dump_file): New function decl.
15155         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
15156         global.
15157         * tree-nested.c (lower_nested_functions): Replace assignments to
15158         "dump_file" with calls to set_dump_file.
15160 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
15162         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
15163         goto_locus of each outgoing edge of each basic block.
15165 2018-06-28  Richard Biener  <rguenther@suse.de>
15167         * dwarf2out.c (decl_scope_table): Remove.
15168         (push_decl_scope): Likewise.
15169         (pop_decl_scope): Likewise.
15170         (gen_type_die_for_member): Do not call push/pop_decl_scope.
15171         (gen_struct_or_union_type_die): Likewise.
15172         (gen_tagged_type_die): Likewise.
15173         (dwarf2out_init): Do not initialize decl_scope_table.
15174         (dwarf2out_c_finalize): Do not free it.
15176 2018-06-28  Richard Biener  <rguenther@suse.de>
15178         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
15179         deciding whether to not re-use a DIE.
15181 2018-06-28  Richard Biener  <rguenther@suse.de>
15183         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
15184         DW_AT_abstract_origin attribute.
15186 2018-06-28  Martin Liska  <mliska@suse.cz>
15188         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
15189         Use newly introduced constants.
15190         * tree-switch-conversion.h (struct jump_table_cluster):
15191         Define max_ratio_for_size and max_ratio_for_speed.
15193 2018-06-28  Martin Liska  <mliska@suse.cz>
15195         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15196         Add new checking assert to catch invalid state.
15197         (jump_table_cluster::can_be_handled): Handle single case
15198         clusters.
15199         (jump_table_cluster::is_beneficial): Bail out for such case.
15200         (bit_test_cluster::find_bit_tests):
15201         Add new checking assert to catch invalid state.
15202         (bit_test_cluster::can_be_handled): Handle single case
15203         clusters.
15204         (bit_test_cluster::is_beneficial): Bail out for such case.
15205         (switch_decision_tree::analyze_switch_statement):
15206         Fix comment.
15208 2018-06-28  Martin Liska  <mliska@suse.cz>
15210         * common.opt: Introduce -completion option.
15211         * gcc.c (driver_handle_option): Handle it.
15212         (driver::main): Print completions if completion
15213         is set.
15214         * opt-suggestions.c (option_proposer::get_completions):
15215         New function.
15216         (option_proposer::suggest_completion): Likewise.
15217         (option_proposer::find_param_completions): Likewise.
15218         (verify_autocompletions): Likewise.
15219         (test_completion_valid_options): Likewise.
15220         (test_completion_valid_params): Likewise.
15221         (in_completion_p): Likewise.
15222         (empty_completion_p): Likewise.
15223         (test_completion_partial_match): Likewise.
15224         (test_completion_garbage): Likewise.
15225         (opt_proposer_c_tests): Likewise.
15226         * opt-suggestions.h: Declare new functions.
15227         * opts.c (common_handle_option): Handle OPT__completion_.
15228         * selftest-run-tests.c (selftest::run_tests): Add
15229         opt_proposer_c_tests.
15230         * selftest.c (assert_str_startswith): New.
15231         * selftest.h (assert_str_startswith): Likewise.
15232         (opt_proposer_c_tests): New.
15233         (ASSERT_STR_STARTSWITH): Likewise.
15235 2018-06-28  Martin Liska  <mliska@suse.cz>
15237         * Makefile.in: Add opt-suggestions.o.
15238         * gcc-main.c: Include opt-suggestions.h.
15239         * gcc.c (driver::driver): Likewise.
15240         (driver::~driver): Remove m_option_suggestions.
15241         (driver::build_option_suggestions): Moved to option_proposer.
15242         (driver::suggest_option): Likewise.
15243         (driver::handle_unrecognized_options): Use option_proposer.
15244         * gcc.h (class driver): Add new memver m_option_proposer.
15245         * opt-suggestions.c: New file.
15246         * opt-suggestions.h: New file.
15248 2018-06-28  Martin Liska  <mliska@suse.cz>
15250         * vec.h (class auto_string_vec): New (moved from auto_argvec).
15251         (auto_string_vec::~auto_string_vec): Likewise.
15253 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
15255         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
15256         prevent_decl_creation_for_types fields up and add reset_location field.
15257         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
15258         statement if id->reset_location is true.
15259         (copy_edges_for_bb): Do not set goto_locus on the new edges if
15260         id->reset_location is true.
15261         (copy_phis_for_bb): Force input_location on the arguments if
15262         id->reset_location is true.
15263         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
15264         is set on the function to be inlined.
15266 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
15268         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
15270 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
15272         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
15273         registers for Pmode.
15274         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
15275         hard registers for the clobbered pseudo.
15277 2018-06-27  Paul Koning  <ni1d@arrl.net>
15279         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
15280         mutually exclusive options.
15281         * config/pdp11/constraints.md (h): New constraint.
15282         (O): Update definition to match shift code generation.
15283         (D): New constraint.
15284         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
15285         (CCFP): Remove.
15286         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
15287         function.
15288         (output_jump): Change arguments.
15289         (pdp11_fixed_cc_regs): New function.
15290         (pdp11_cc_mode): Ditto.
15291         (pdp11_expand_shift): Ditto.
15292         (pdp11_assemble_shift): Ditto.
15293         (pdp11_small_shift): Ditto.
15294         (pdp11_branch_cost): Remove.
15295         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
15296         from output.
15297         (pdp11_register_move_cost): Update for CC registers.
15298         (pdp11_rtx_costs): Add case for LSHIFTRT.
15299         (pdp11_output_jump): Add CCNZ mode conditional branches.
15300         (notice_update_cc_on_set): Remove.
15301         (pdp11_cc_mode): New function.
15302         (simple_memory_operand): Correct pre/post decrement case.
15303         (no_side_effect_operand): New function.
15304         (pdp11_regno_reg_class): Add CC_REGS class.
15305         (pdp11_fixed_cc_regs): New function.
15306         (pdp11_small_shift): New function.
15307         (pdp11_expand_shift): New function to expand shift insns.
15308         (pdp11_assemble_shift): New function to output shifts.
15309         (pdp11_branch_cost): Remove.
15310         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
15311         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
15312         (WCHAR_TYPE): Ditto.
15313         (PTRDIFF_TYPE): Ditto.
15314         (ADJUST_INSN_LENGTH): New macro.
15315         (FIXED_REGISTERS): Add CC registers.
15316         (CALL_USED_REGISTERS): Ditto.
15317         (reg_class): Ditto.
15318         (REG_CLASS_NAMES): Ditto.
15319         (REG_CLASS_CONTENTS): Ditto.
15320         (SELECT_CC_MODE): Use new function.
15321         (TARGET_FLAGS_REGNUM): New macro.
15322         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
15323         (cc0_reg_rtx): Remove.
15324         (CC_STATUS_MDEP): Remove.
15325         (CC_STATUS_MDEFP_INIT): Remove.
15326         (CC_IN_FPU): Remove.
15327         (NOTICE_UPDATE_CC): Remove.
15328         (REGISTER_NAMES): Add CC registers.
15329         (BRANCH_COST): Change to constant 1.
15330         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
15331         handling.
15332         * config/pdp11/pdp11.opt (mbcopy): Remove.
15333         (mbcopy-builtin): Remove.
15334         (mbranch-cheap): Remove.
15335         (mbranch-expensive): Remove.
15336         * config/pdp11/predicates.md (expand_shift_operand): Update to
15337         match shift code generation.
15338         (ccnz_operator): New predicate.
15339         * doc/invoke.texi (PDP-11 Options): Remove deleted options
15340         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
15341         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
15342         exclusive options.
15343         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
15344         description of O constraint.
15346 2018-06-27  Jeff Law  <law@redhat.com>
15347             Austin Law  <austinklaw@gmail.com>
15349         * config/v850/v850.md (addsi3_set_flags): New pattern.
15350         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
15351         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
15352         (zero_extendhisi2_v850_set_flags): Likewise.
15353         (zero_extendqisi2_v850_set_flags): Likewise.
15354         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
15355         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
15356         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
15358         * config/v850/v850-protos.h (notice_update_cc): Remove.
15359         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
15360         (v850_print_operand): Handle 'D' and "d".
15361         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
15362         Add handling of arithmetic/logical operations compared against zero.
15363         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
15364         Do not look at v850_compare_op, instead get mode from last argument.
15365         (v850_gen_compare): Remove
15366         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
15367         after reload for prologue insns.
15368         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
15369         patterns.
15370         (construct_save_jarl): Likewise.
15371         (TARGET_FLAGS_REGNUM): Define.
15372         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
15373         (NOTICE_UPDATE_CC): Remove.
15374         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
15375         than cc0.  Conditionalize on reload_completed.
15376         (cmpsi_insn, setfcc_insn): Likewise.
15377         (tst1 splitter): Turn into define_and_split which sets the flags
15378         after reload.
15379         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
15380         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
15381         (cstoresf4, cstoredf4): Clobber the flags.
15382         (cmpsi, cmpsf, cmpdf): Remove expanders.
15383         (setf_insn): Remove pattern.
15384         (addsi3): Turn into define_and_split which clobbers the flags after
15385         reload and a suitable pattern (addsi3_clobber_flags) for use after
15386         reload.
15387         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
15388         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
15389         (ashrsi3, ashrsi3_v850e2): Likewise.
15390         (bins): Clobber the flags.
15391         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
15392         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
15393         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
15394         (call_value_internal_short, call_value_internal_long): Likewise.
15395         (callt_save_interrupt, callt_return_interrupt): Likewise.
15396         (save_interrupt, return_interrupt): Likewise.
15397         (callt_save_all_interrupt, save_all_interrupt): Likewise.
15398         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
15399         (restore_all_interrupt, _restore_all_interrupt): Likewise.
15400         (All FP comparisons): Only allow after reload has completed.
15401         (trfsr): Likewise.
15402         (divh, divhu): Tweak output template.
15403         (branch_z_normal, branch_z_invert): Remove
15404         (branch_nz_normal, branch_nz_invert): Likewise.
15405         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
15407         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
15408         * config/v850/v850.c (notice_update_cc): Remove.
15409         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
15410         (CC_NO_CARRY): Likewise.
15411         (NOTICE_UPDATE_CC): Define to nothing.
15412         * config/v850/v850.md: Remove block comment on cc0 handling
15413         Remove "cc" attribute from all patterns.  Remove cc_status handling
15414         from all patterns.  Minor formatting fixes.
15416 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15418         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
15419         (cortex-a76.cortex-a55): Likewise.
15420         * config/aarch64/aarch64-tune.md: Regenerate.
15421         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
15422         cortex-a76.cortex-a55.
15424 2018-06-27  Jeff Law  <law@redhat.com>
15426         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
15427         (MULTILIB_DIRNAMES): Similarly.
15429 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
15431         * gimple.h (gimple_return_retbnd): Delete.
15432         (gimple_return_set_retbnd): Likewise.
15433         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
15434         gimple_return_set_retbnd.
15435         * gimple-pretty-print.c (dump_gimple_return): Remove call to
15436         gimple_return_retbnd and adjust.
15437         * tree-inline.h (struct copy_body_data): Remove retbnd field.
15438         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
15439         Explicitly return NULL in a couple more cases.  Move assertion
15440         on debug statements and remove unreachable code.
15441         (reset_debug_binding): Do not test id->retbnd.
15442         (expand_call_inline): Do not set it.
15444 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
15446         * configure.ac: Add --disable-gcov option.
15447         * configure: Regenerate.
15448         * Makefile.in: Honour @enable_gcov@.
15449         * doc/install.texi: Document --disable-gcov.
15451 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15453         * config/arm/arm-cpus.in (cortex-a76): New entry.
15454         (cortex-a76.cortex-a55): Likewise.
15455         * config/arm/arm-tables.opt: Regenerate.
15456         * config/arm/arm-tune.md: Likewise.
15457         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
15458         * doc/invoke.texi (ARM Options): Document cortex-a76 and
15459         cortex-a76.cortex-a55.
15461 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
15463         PR target/85769
15464         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
15466 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
15468         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
15469         comment.
15470         (EPILOGUE_USES): Likewise.
15472 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
15474         * tree-inline.c (remap_location): New function extracted from...
15475         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
15476         (copy_phis_for_bb): ...here.  Call remap_location.
15477         (copy_cfg_body): Adjust call to copy_edges_for_bb.
15479 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
15481         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
15482         unaligned vsx for 16B memset.
15484 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
15486         PR target/86285
15487         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
15488         ieee128_float_type_node to long_double_type_node unless
15489         TARGET_LONG_DOUBLE_128 is set.
15491 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
15493         * cfgloop.c (get_loop_location): Convert return type from
15494         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
15495         by implicit construction from rtx_insn *, and using
15496         dump_user_location_t::from_function_decl for the fallback case.
15497         * cfgloop.h (get_loop_location): Convert return type from
15498         location_t to dump_user_location_t.
15499         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
15500         dump_printf_loc to pass in a dump_location_t rather than a
15501         location_t, via the gimple stmt.
15502         * coverage.c (get_coverage_counts): Update calls to
15503         dump_printf_loc to pass in dump_location_t rather than a
15504         location_t.
15505         * doc/optinfo.texi (Dump types): Convert example of
15506         dump_printf_loc from taking "locus" to taking "insn".  Update
15507         description of the "_loc" calls to cover dump_location_t.
15508         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
15509         "selftest.h".
15510         (dump_user_location_t::dump_user_location_t): New constructors,
15511         from gimple *stmt and rtx_insn *.
15512         (dump_user_location_t::from_function_decl): New function.
15513         (dump_loc): Make static.
15514         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
15515         const dump_location_t &.
15516         (dump_generic_expr_loc): Delete.
15517         (dump_printf_loc): Convert param "loc" from location_t to
15518         const dump_location_t &.
15519         (selftest::test_impl_location): New function.
15520         (selftest::dumpfile_c_tests): New function.
15521         * dumpfile.h: Include "profile-count.h".
15522         (class dump_user_location_t): New class.
15523         (struct dump_impl_location_t): New struct.
15524         (class dump_location_t): New class.
15525         (dump_printf_loc): Convert 2nd param from source_location to
15526         const dump_location_t &.
15527         (dump_generic_expr_loc): Delete.
15528         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
15529         const dump_location_t &.
15530         * gimple-fold.c (fold_gimple_assign): Update call to
15531         dump_printf_loc to pass in a dump_location_t rather than a
15532         location_t, via the gimple stmt.
15533         (gimple_fold_call): Likewise.
15534         * gimple-loop-interchange.cc
15535         (loop_cand::analyze_iloop_reduction_var): Update for change to
15536         check_reduction_path.
15537         (tree_loop_interchange::interchange): Update for change to
15538         find_loop_location.
15539         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
15540         change in return-type of find_loop_location.
15541         (graphite_regenerate_ast_isl): Likewise.
15542         * graphite-optimize-isl.c (optimize_isl): Likewise.
15543         * graphite.c (graphite_transform_loops): Likewise.
15544         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
15545         pass in a dump_location_t rather than a location_t, via the
15546         gimple stmt.
15547         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15548         * ipa.c (walk_polymorphic_call_targets): Likewise.
15549         * loop-unroll.c (report_unroll): Convert "locus" param from
15550         location_t to dump_location_t.
15551         (decide_unrolling): Update for change to get_loop_location's
15552         return type.
15553         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
15554         location_t to dump_user_location_t.
15555         (grid_find_single_omp_among_assignments_1): Updates calls to
15556         dump_printf_loc to pass in a dump_location_t rather than a
15557         location_t, via the gimple stmt.
15558         (grid_parallel_clauses_gridifiable): Convert "tloc" from
15559         location_t to dump_location_t.  Updates calls to dump_printf_loc
15560         to pass in a dump_location_t rather than a location_t, via the
15561         gimple stmt.
15562         (grid_inner_loop_gridifiable_p): Likewise.
15563         (grid_dist_follows_simple_pattern): Likewise.
15564         (grid_gfor_follows_tiling_pattern): Likewise.
15565         (grid_target_follows_gridifiable_pattern): Likewise.
15566         (grid_attempt_target_gridification): Convert initialization
15567         of local "grid" from memset to zero-initialization; FIXME: does
15568         this require C++11?  Update call to dump_printf_loc to pass in a
15569         optinfo_location rather than a location_t, via the gimple stmt.
15570         * profile.c (read_profile_edge_counts): Updates call to
15571         dump_printf_loc to pass in a dump_location_t rather than a
15572         location_t
15573         (compute_branch_probabilities): Likewise.
15574         * selftest-run-tests.c (selftest::run_tests): Call
15575         dumpfile_c_tests.
15576         * selftest.h (dumpfile_c_tests): New decl.
15577         * tree-loop-distribution.c (pass_loop_distribution::execute):
15578         Update for change in return type of find_loop_location.
15579         * tree-parloops.c (parallelize_loops): Likewise.
15580         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
15581         "locus" from location_t to dump_user_location_t.
15582         (canonicalize_loop_induction_variables): Likewise.
15583         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
15584         for change in return type of find_loop_location.
15585         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
15586         to dump_printf_loc to pass in a dump_location_t rather than a
15587         location_t, via the stmt.
15588         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
15589         Likewise.
15590         * tree-vect-loop-manip.c (find_loop_location): Convert return
15591         type from source_location to dump_user_location_t.
15592         (vect_do_peeling): Update for above change.
15593         (vect_loop_versioning): Update for change in type of
15594         vect_location.
15595         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
15596         from location_t to dump_user_location_t.
15597         (vect_estimate_min_profitable_iters): Update for change in type
15598         of vect_location.
15599         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
15600         location_t to dump_location_t.
15601         (vect_slp_bb): Update for change in type of vect_location.
15602         * tree-vectorizer.c (vect_location): Convert from source_location
15603         to dump_user_location_t.
15604         (try_vectorize_loop_1): Update for change in vect_location's type.
15605         (vectorize_loops): Likewise.
15606         (increase_alignment): Likewise.
15607         * tree-vectorizer.h (vect_location): Convert from source_location
15608         to dump_user_location_t.
15609         (find_loop_location): Convert return type from source_location to
15610         dump_user_location_t.
15611         (check_reduction_path): Convert 1st param from location_t to
15612         dump_user_location_t.
15613         * value-prof.c (check_counter): Update call to dump_printf_loc to
15614         pass in a dump_user_location_t rather than a location_t; update
15615         call to error_at for change in type of "locus".
15616         (check_ic_target): Update call to dump_printf_loc to
15617         pass in a dump_user_location_t rather than a location_t, via the
15618         call_stmt.
15620 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
15622         * config/s390/s390.h (enum processor_flags): Do not use
15623         default tune parameter when -march was specified.
15625 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
15627         PR target/86314
15628         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
15629         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
15630         operands.
15632 2018-06-26  Richard Biener  <rguenther@suse.de>
15634         PR tree-optimization/86287
15635         PR bootstrap/86316
15636         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
15637         (vect_analyze_loop): Initialize n_stmts.
15639 2018-06-26  Richard Biener  <rguenther@suse.de>
15641         PR middle-end/86271
15642         * fold-const.c (fold_convertible_p): Pointer extension
15643         isn't valid.
15645 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
15647         PR debug/86064
15648         * dwarf2out.c (loc_list_has_views): Adjust comments.
15649         (dw_loc_list): Split single cross-partition range with
15650         nonzero locview.
15652 2018-06-25  Jeff Law  <law@redhat.com>
15654         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
15655         on -mbig-switch by default.
15657         * config/v850/predicates.md (const_float_1_operand): Fix match_code
15658         test.
15659         (const_float_0_operand): Remove unused predicate.
15660         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
15661         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
15662         (recipsf2): New expander.  Original pattern now called
15663         (recipsf2_insn).
15664         (recipdf2, recipdf2_insn): Similarly.
15665         (rsqrtsf2, rsqrtsf2_insn): Similarly
15666         (rsqrtdf2, rsqrtdf2_insn): Similarly
15668 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
15670         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
15671         Simplify logic for FreeBSD (twice).
15673 2018-06-25  Martin Sebor  <msebor@redhat.com>
15675         PR tree-optimization/86204
15676         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
15677         a strnlen result if it's less than the length of the string.
15679 2018-06-25  Martin Sebor  <msebor@redhat.com>
15681         PR tree-optimization/85700
15682         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
15683         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
15684         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
15686 2018-06-25  Martin Sebor  <msebor@redhat.com>
15688         * doc/extend.texi (Zero-length arrays): Update and clarify.
15690 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
15692         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
15693         added IEEE/IBM long double multilib support on PowerPC little
15694         endian Linux systems.
15695         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
15696         (MULTILIB_DEFAULTS): Likewise.
15697         * config/rs6000/rs6000.c (rs6000_option_override_internal):
15698         Likewise.
15699         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
15700         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
15701         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
15703 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
15705         PR middle-end/86311
15706         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
15707         (REORDER_45): Likewise.
15709 2018-06-25  Jeff Law  <law@redhat.com>
15711         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
15712         dividend to 32 bits.  Adjust length.
15713         (udivmodhi4): Cleanup output template.  Fix length.
15715 2018-06-25  Carl Love  <cel@us.ibm.com>
15717         * config/rs6000/vsx.md: Change word selector to prefered location.
15719 2018-06-25  Richard Biener  <rguenther@suse.de>
15721         PR tree-optimization/86304
15722         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
15723         epilogue-if-converted loops as well.
15725 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
15727         * lto-section-out.c (lto_begin_section): Do not print section
15728         name for noaddr and unnumbered dumps.
15730 2018-06-25  Richard Biener  <rguenther@suse.de>
15732         * tree-vectorizer.h (struct vec_info_shared): New structure
15733         with parts split out from struct vec_info and loop_nest from
15734         struct _loop_vec_info.
15735         (struct vec_info): Adjust accordingly.
15736         (struct _loop_vec_info): Likewise.
15737         (LOOP_VINFO_LOOP_NEST): Adjust.
15738         (LOOP_VINFO_DATAREFS): Likewise.
15739         (LOOP_VINFO_DDRS): Likewise.
15740         (struct _bb_vec_info): Likewise.
15741         (BB_VINFO_DATAREFS): Likewise.
15742         (BB_VINFO_DDRS): Likewise.
15743         (struct _stmt_vec_info): Add dr_aux member.
15744         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
15745         (DR_MISALIGNMENT_UNINITIALIZED): New.
15746         (set_dr_misalignment): Adjust.
15747         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
15748         (vect_analyze_loop): Adjust prototype.
15749         (vect_analyze_loop_form): Likewise.
15750         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
15751         Compute dependences lazily.
15752         (vect_record_base_alignments): Use shared datarefs/ddrs.
15753         (vect_verify_datarefs_alignment): Likewise.
15754         (vect_analyze_data_refs_alignment): Likewise.
15755         (vect_analyze_data_ref_accesses): Likewise.
15756         (vect_analyze_data_refs): Likewise.
15757         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
15758         constructor parameter for shared part.
15759         (vect_analyze_loop_form): Pass in shared part and adjust.
15760         (vect_analyze_loop_2): Pass in storage for the number of
15761         stmts.  Move loop nest finding to the caller.  Compute
15762         datarefs lazily.
15763         (vect_analyze_loop): Pass in shared part.
15764         (vect_transform_loop): Verify shared datarefs are unchanged.
15765         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
15766         constructor parameter for shared part.
15767         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
15768         (vect_slp_bb): Verify shared datarefs are unchanged before
15769         transform.
15770         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
15771         change.
15772         (new_stmt_vec_info): Initialize DR_AUX misalignment to
15773         DR_MISALIGNMENT_UNINITIALIZED.
15774         * tree-vectorizer.c (vec_info::vec_info): Add constructor
15775         parameter for shared part.
15776         (vec_info::~vec_info): Adjust.
15777         (vec_info_shared::vec_info_shared): New.
15778         (vec_info_shared::~vec_info_shared): Likewise.
15779         (vec_info_shared::save_datarefs): Likewise.
15780         (vec_info_shared::check_datarefs): Likewise.
15781         (try_vectorize_loop_1): Construct shared part live for analyses
15782         of a single loop for multiple vector sizes.
15783         * tree-parloops.c (gather_scalar_reductions): Adjust.
15785 2018-06-25  Richard Biener  <rguenther@suse.de>
15787         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
15788         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
15789         (vect_analyze_data_refs): Remove similar code from here and
15790         simplify accordingly.
15792 2018-06-25  Richard Biener  <rguenther@suse.de>
15794         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
15795         for reverse storage order accesses rather than asserting
15796         they cannot happen here.
15798 2018-06-25  Tom de Vries  <tdevries@suse.de>
15800         PR debug/86257
15801         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
15802         Use data16 instead of .byte for insn prefix.
15804 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
15806         PR C++/86082
15807         * parser.c (make_char_string_pack): Pass this literal chars
15808         through cpp_interpret_string.
15809         (cp_parser_userdef_numeric_literal): Check the result of
15810         make_char_string_pack.
15812 2018-06-24  Maya Rashish  <coypu@sdf.org>
15814         * ginclude/stddef.h: Simplify conditions around avoiding
15815         re-definition of __size_t.
15817 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
15819         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
15820         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
15822 2018-06-22  Maya Rashish  <coypu@sdf.org>
15824         * doc/invoke.texi (mno-fancy-math-387): Update for changes
15825         made to OpenBSD and NetBSD through the years.
15827 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15829         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
15830         behavior of vec_pack (vector double, vector double) to match
15831         behavior of vec_float2 (vector double, vector double).
15833 2018-06-22  Olivier Hainque  <hainque@adacore.com>
15835         * gimplify.c (gimplify_function_tree): Prevent creation
15836         of a trampoline for the address of the current function
15837         passed to entry/exit instrumentation hooks.
15839 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
15841         PR target/86222
15842         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
15843         correctly.
15845 2018-06-22  Martin Liska  <mliska@suse.cz>
15847         PR tree-optimization/86263
15848         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
15849         Bail out if is_enabled is false.
15850         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
15851         New declaration.
15852         (jump_table_cluster::is_enabled): New function.
15854 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
15856         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
15857         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
15858         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
15859         (lto_input_ts_binfo_tree_pointers): Likewise.
15860         * tree-streamer-out.c (streamer_write_tree_bitfields,
15861         write_ts_binfo_tree_pointers): Likewise.
15862         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
15864 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
15866         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
15868 2018-06-22  Martin Liska  <mliska@suse.cz>
15870         * symbol-summary.h (get): Make it pure and inline move
15871         functionality from ::get function.
15872         (get): Remove and inline into ::get and ::get_create.
15873         (get_create): Move code from ::get function.
15875 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15877         PR target/85994
15878         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
15879         -x assembler-with-cpp.
15881 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
15883         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
15884         _FILE_OFFSET_BITS=64 for C++.
15886 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
15888         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
15889         conversion insn that shows up when pr85657-3.c is compiled using
15890         IEEE 128-bit long double.
15891         (neg<mode>2_internal): Use the correct mode to check whether the
15892         mode is IBM extended.
15893         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
15894         multiply and divide external functions from being created more
15895         than once.
15897 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
15899         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
15900         functions.
15901         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
15902         the edge can be forwarded.
15903         (cfg_layout_merge_blocks): Likewise.
15905 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
15907         * except.c (finish_eh_generation): Commit edge insertions only after
15908         the EH edges have been redirected from post-landing to landing pads.
15910 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
15912         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
15913         create_tmp_var_for to create the FRAME decl.
15914         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
15916 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
15918         * tree-inline.c (copy_edges_for_bb): Minor tweak.
15919         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
15920         debug statement when resetting its value.
15921         (expand_call_inline): Copy the locus of the call onto the assignment
15922         of the return value, if any.  Use local variable in more cases.
15924 2018-06-21  Martin Liska  <mliska@suse.cz>
15926         * ipa-pure-const.c (propagate_nothrow): Use
15927         funct_state_summaries->get.
15928         (dump_malloc_lattice): Likewise.
15929         (propagate_malloc): Likewise.
15931 2018-06-21  Richard Biener  <rguenther@suse.de>
15933         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
15934         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
15935         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
15936         comment.
15937         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
15938         BLOCK_ABSTRACT_ORIGIN unconditionally.
15940 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
15942         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
15943         deleting it.
15944         * ipa-reference.c (ipa_reference_c_finalize): Delete
15945         ipa_ref_opt_sum_summaries and set it to NULL.
15947 2018-06-21  Tom de Vries  <tdevries@suse.de>
15949         PR tree-optimization/85859
15950         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
15951         test with comment from bb_no_side_effects_p.
15953 2018-06-21  Richard Biener  <rguenther@suse.de>
15955         PR tree-optimization/86232
15956         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
15957         max for constant niter.
15959 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
15961         * config/aarch64/aarch64-simd.md
15962         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
15964 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
15966         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
15967         Make opernads of the unspec commutative.
15969 2018-06-21  Richard Biener  <rguenther@suse.de>
15971         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
15972         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
15973         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
15974         (vect_analyze_data_ref_dependence): Re-order checks to deal with
15975         NULL DR_STEP.
15976         (vect_record_base_alignments): Do not record base alignment
15977         for gathers or scatters.
15978         (vect_compute_data_ref_alignment): Drop return value that is always
15979         true.  Bail out early for gathers or scatters.
15980         (vect_enhance_data_refs_alignment): Bail out early for gathers
15981         or scatters.
15982         (vect_find_same_alignment_drs): Likewise.
15983         (vect_analyze_data_refs_alignment): Remove dead code.
15984         (vect_slp_analyze_and_verify_node_alignment): Likewise.
15985         (vect_analyze_data_refs): For possible gathers or scatters do
15986         not create an alternate DR, just check their possible validity
15987         and mark them.  Adjust DECL_NONALIASED handling to not rely
15988         on DR_BASE_ADDRESS.
15989         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
15990         update inits of gathers or scatters.
15991         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
15992         Also copy gather/scatter flag to pattern vinfo.
15994 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
15996         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
15997         behavior of vec_packsu (vector unsigned long long, vector unsigned
15998         long long) to match behavior of vec_packs with same signature.
16000 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
16001             Thomas Schwinge <thomas@codesourcery.com>
16002             Cesar Philippidis  <cesar@codesourcery.com>
16004         * gimplify.c (gimplify_scan_omp_clauses): Add support for
16005         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
16006         (gimplify_adjust_omp_clauses): Likewise.
16007         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
16008         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
16009         (gimplify_omp_target_update): Update handling of acc update and
16010         enter/exit data.
16011         * omp-low.c (install_var_field): Remove unused parameter
16012         base_pointers_restrict.
16013         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
16014         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
16015         FINALIZE}
16016         (omp_target_base_pointers_restrict_p): Delete.
16017         (scan_omp_target): Update call to scan_sharing_clauses.
16018         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
16019         FINALIZE}.
16020         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
16021         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
16022         (convert_local_omp_clauses): Likewise.
16023         * tree-pretty-print.c (dump_omp_clause): Likewise.
16024         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
16025         FINALIZE}.
16026         (omp_clause_code_name): Likewise.
16028 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
16030         PR debug/86194
16031         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
16032         be narrowed.
16034         PR tree-optimization/86231
16035         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
16036         anti-range don't overwrite *vr0min before using it to compute *vr0max.
16038 2018-06-20  Tom de Vries  <tdevries@suse.de>
16040         PR tree-optimization/86097
16041         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
16042         iv type if signedness of iv type is not the same as that of *nit.
16044 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
16046         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
16047         EDGE_EH edges, verify they are all EDGE_EH.
16049 2018-06-20  Maya Rashish  <coypu@sdf.org>
16051         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
16053 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16055         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
16056         * config/aarch64/aarch64.c (xgene1_tunings): Add
16057         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
16058         (aarch64_mode_valid_for_sched_fusion_p):
16059         Allow 16-byte modes.
16060         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
16061         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
16062         128-bit modes.
16063         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
16064         New pattern.
16065         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
16066         * config/aarch64/iterators.md (VQ2): New mode iterator.
16068 2018-06-20  Martin Liska  <mliska@suse.cz>
16070         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
16071         Change default ratio from 10 to 8.
16073 2018-06-20  Martin Liska  <mliska@suse.cz>
16075         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
16076         New.
16077         (bit_test_cluster::find_bit_tests): Likewise.
16078         (switch_decision_tree::analyze_switch_statement): Find clusters.
16079         * tree-switch-conversion.h (struct jump_table_cluster): Document
16080         hierarchy.
16082 2018-06-20  Martin Liska  <mliska@suse.cz>
16084         * tree-switch-conversion.c (switch_conversion::collect):
16085         Record m_uniq property.
16086         (switch_conversion::expand): Bail out for special conditions.
16087         (group_cluster::~group_cluster): New.
16088         (group_cluster::group_cluster): Likewise.
16089         (group_cluster::dump): Likewise.
16090         (jump_table_cluster::emit): New.
16091         (switch_decision_tree::fix_phi_operands_for_edges): New.
16092         (struct case_node): Remove struct.
16093         (jump_table_cluster::can_be_handled): New.
16094         (case_values_threshold): Moved to header.
16095         (reset_out_edges_aux): Likewise.
16096         (jump_table_cluster::is_beneficial): New.
16097         (bit_test_cluster::can_be_handled): Likewise.
16098         (add_case_node): Remove.
16099         (bit_test_cluster::is_beneficial): New.
16100         (case_bit_test::cmp): New.
16101         (bit_test_cluster::emit): New.
16102         (expand_switch_as_decision_tree_p): Remove.
16103         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
16104         (fix_phi_operands_for_edge): Likewise.
16105         (switch_decision_tree::analyze_switch_statement): New.
16106         (compute_cases_per_edge): Move ...
16107         (switch_decision_tree::compute_cases_per_edge): ... here.
16108         (try_switch_expansion): Likewise.
16109         (switch_decision_tree::try_switch_expansion): Likewise.
16110         (record_phi_operand_mapping): Likewise.
16111         (switch_decision_tree::record_phi_operand_mapping): Likewise.
16112         (emit_case_decision_tree): Likewise.
16113         (switch_decision_tree::emit): Likewise.
16114         (balance_case_nodes): Likewise.
16115         (switch_decision_tree::balance_case_nodes): Likewise.
16116         (dump_case_nodes): Likewise.
16117         (switch_decision_tree::dump_case_nodes): Likewise.
16118         (emit_jump): Likewise.
16119         (switch_decision_tree::emit_jump): Likewise.
16120         (emit_cmp_and_jump_insns): Likewise.
16121         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
16122         (emit_case_nodes): Likewise.
16123         (switch_decision_tree::emit_case_nodes): Likewise.
16124         (conditional_probability): Remove.
16125         * tree-switch-conversion.h (enum cluster_type): New.
16126         (PRINT_CASE): New.
16127         (struct cluster): Likewise.
16128         (cluster::cluster): Likewise.
16129         (struct simple_cluster): Likewise.
16130         (simple_cluster::simple_cluster): Likewise.
16131         (struct group_cluster): Likewise.
16132         (struct jump_table_cluster): Likewise.
16133         (struct bit_test_cluster): Likewise.
16134         (struct min_cluster_item): Likewise.
16135         (struct case_tree_node): Likewise.
16136         (case_tree_node::case_tree_node): Likewise.
16137         (jump_table_cluster::case_values_threshold): Likewise.
16138         (struct case_bit_test): Likewise.
16139         (struct switch_decision_tree): Likewise.
16140         (struct switch_conversion): Likewise.
16141         (switch_decision_tree::reset_out_edges_aux): Likewise.
16143 2018-06-20  Martin Liska  <mliska@suse.cz>
16145         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
16146         (hoist_edge_and_branch_if_true): Likewise.
16147         (expand_switch_using_bit_tests_p): Likewise.
16148         (struct case_bit_test): Likewise.
16149         (case_bit_test_cmp): Likewise.
16150         (emit_case_bit_tests): Likewise.
16151         (switch_conversion::switch_conversion): New class.
16152         (struct switch_conv_info): Remove old struct.
16153         (collect_switch_conv_info): More to ...
16154         (switch_conversion::collect): ... this.
16155         (check_range): Likewise.
16156         (switch_conversion::check_range): Likewise.
16157         (check_all_empty_except_final): Likewise.
16158         (switch_conversion::check_all_empty_except_final): Likewise.
16159         (check_final_bb): Likewise.
16160         (switch_conversion::check_final_bb): Likewise.
16161         (create_temp_arrays): Likewise.
16162         (switch_conversion::create_temp_arrays): Likewise.
16163         (free_temp_arrays): Likewise.
16164         (gather_default_values): Likewise.
16165         (switch_conversion::gather_default_values): Likewise.
16166         (build_constructors): Likewise.
16167         (switch_conversion::build_constructors): Likewise.
16168         (constructor_contains_same_values_p): Likewise.
16169         (switch_conversion::contains_same_values_p): Likewise.
16170         (array_value_type): Likewise.
16171         (switch_conversion::array_value_type): Likewise.
16172         (build_one_array): Likewise.
16173         (switch_conversion::build_one_array): Likewise.
16174         (build_arrays): Likewise.
16175         (switch_conversion::build_arrays): Likewise.
16176         (gen_def_assigns): Likewise.
16177         (switch_conversion::gen_def_assigns): Likewise.
16178         (prune_bbs): Likewise.
16179         (switch_conversion::prune_bbs): Likewise.
16180         (fix_phi_nodes): Likewise.
16181         (switch_conversion::fix_phi_nodes): Likewise.
16182         (gen_inbound_check): Likewise.
16183         (switch_conversion::gen_inbound_check): Likewise.
16184         (process_switch): Use the newly created class.
16185         (switch_conversion::expand): New.
16186         (switch_conversion::~switch_conversion): New.
16187         * tree-switch-conversion.h: New file.
16189 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16191         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
16192         tree-vect-patterns.c.
16193         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
16194         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
16195         (vect_recog_sad_pattern): Likewise.
16196         (vect_recog_widen_sum_pattern): Likewise.
16197         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
16198         (vect_recog_widen_shift_pattern): Remove the type_in argument.
16199         (vect_recog_rotate_pattern): Likewise.
16200         (vect_recog_mult_pattern): Likewise.
16201         (vect_recog_vector_vector_shift_pattern): Likewise.
16202         (vect_recog_divmod_pattern): Likewise.
16203         (vect_recog_mixed_size_cond_pattern): Likewise.
16204         (vect_recog_bool_pattern): Likewise.
16205         (vect_recog_mask_conversion_pattern): Likewise.
16206         (vect_try_gather_scatter_pattern): Likewise.
16207         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
16208         (vect_recog_over_widening_pattern): Likewise.
16209         (vect_recog_gather_scatter_pattern): Likewise.
16210         (vect_recog_func_ptr): Move from tree-vectorizer.h
16211         (vect_vect_recog_func_ptrs): Move further down the file.
16212         (vect_recog_func): Likewise.  Remove the third argument.
16213         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
16214         (vect_pattern_recog_1): Expect the pattern function to do any
16215         necessary target tests.  Also expect it to provide a vector type.
16216         Remove the type_in handling.
16218 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16220         * tree-vect-patterns.c (vect_pattern_detected): New function.
16221         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
16222         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
16223         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
16224         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
16225         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
16226         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
16227         (vect_recog_mask_conversion_pattern)
16228         (vect_try_gather_scatter_pattern): Likewise.
16230 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16232         * tree-vect-patterns.c (vect_get_internal_def): New function.
16233         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
16234         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
16235         (search_type_for_mask_1): Use it.
16237 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16239         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
16240         redundant WIDEN_SUM_EXPR handling.
16241         (vect_recog_sad_pattern): Likewise.
16243 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16245         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
16246         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
16247         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
16248         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
16249         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
16251 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16253         * tree-vect-stmts.c (vectorizable_call): Make sure that we
16254         use the stmt_vec_info of the original bb statement for the
16255         new zero assignment, even if the call is part of a pattern.
16257 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16259         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
16260         that the sequence is attached to the original statement rather
16261         than the pattern statement.
16262         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
16263         PATTERN_DEF_SEQ from the original statement rather than
16264         the main pattern statement.
16265         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
16266         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
16267         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
16269 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
16271         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
16272         definition statements before the early exit for statements that aren't
16273         live or relevant.
16274         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
16275         split out from...
16276         (vect_transform_loop): ...here.  Process pattern definition
16277         statements without first checking whether the main pattern
16278         statement is live or relevant.
16280 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
16282         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
16283         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
16285 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
16287         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
16288         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
16289         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
16290         (expand_block_compare): Change select_block_compare_mode call.
16291         (expand_strncmp_align_check): Use new functions, fix comment.
16292         (emit_final_str_compare_gpr): New function.
16293         (expand_strn_compare): Refactor and clean up code.
16294         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
16296 2018-06-19  Tony Reix  <tony.reix@atos.com>
16297             Damien Bergamini  <damien.bergamini@atos.com>
16298             David Edelsohn  <dje.gcc@gmail.com>
16300         * collect2.c (static_obj): New variable.
16301         (static_libs): New variable.
16302         (is_in_list): Uncomment declaration.
16303         (main): Track AIX libraries linked statically.
16304         (is_in_list): Uncomment definition.
16305         (scan_prog_file): Don't add AIX shared libraries initializer
16306         to constructor list if linking statically.
16308 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
16310         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
16311         constant.
16312         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
16314 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
16316         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
16317         blocks.
16319 2018-06-19  Martin Liska  <mliska@suse.cz>
16321         * config/i386/i386.c (ix86_can_inline_p): Do not use
16322         ipa_fn_summaries::get_create.
16323         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
16324         get.
16325         (devirtualization_time_bonus): Likewise.
16326         (ipcp_propagate_stage): Likewise.
16327         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
16328         (edge_set_predicate): Likewise.
16329         (evaluate_conditions_for_known_args): Likewise.
16330         (evaluate_properties_for_edge): Likewise.
16331         (ipa_call_summary::reset): Tranform to ...
16332         (ipa_call_summary::~ipa_call_summary): ... this.
16333         (ipa_fn_summary::reset): Transform to ...
16334         (ipa_fn_summary::~ipa_fn_summary): ... this.
16335         (ipa_fn_summary_t::remove): Rename to ...
16336         (ipa_fn_summary_t::remove_callees): ... this.
16337         (ipa_fn_summary_t::duplicate): Use placement new
16338         instead of memory copy.
16339         (ipa_call_summary_t::duplicate): Likewise.
16340         (ipa_call_summary_t::remove): Remove.
16341         (dump_ipa_call_summary): Change get_create to get.
16342         (ipa_dump_fn_summary): Dump only when summary exists.
16343         (analyze_function_body): Use symbol_summary::get instead
16344         of get_create.
16345         (compute_fn_summary): Likewise.
16346         (estimate_edge_devirt_benefit): Likewise.
16347         (estimate_edge_size_and_time): Likewise.
16348         (inline_update_callee_summaries): Likewise.
16349         (remap_edge_change_prob): Likewise.
16350         (remap_edge_summaries): Likewise.
16351         (ipa_merge_fn_summary_after_inlining): Likewise.
16352         (write_ipa_call_summary): Likewise.
16353         (ipa_fn_summary_write): Likewise.
16354         (ipa_free_fn_summary): Likewise.
16355         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
16356         (struct ipa_call_summary): Likewise.
16357         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
16358         of get_create.
16359         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
16360         (estimate_size_after_inlining): Likewise.
16361         (estimate_growth): Likewise.
16362         (growth_likely_positive): Likewise.
16363         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
16364         (inline_call): Likewise.
16365         * ipa-inline.c (caller_growth_limits): Likewise.
16366         (can_inline_edge_p): Likewise.
16367         (can_inline_edge_by_limits_p): Likewise.
16368         (compute_uninlined_call_time): Likewise.
16369         (compute_inlined_call_time): Likewise.
16370         (want_inline_small_function_p): Likewise.
16371         (edge_badness): Likewise.
16372         (update_caller_keys): Likewise.
16373         (update_callee_keys): Likewise.
16374         (inline_small_functions): Likewise.
16375         (inline_to_all_callers_1): Likewise.
16376         (dump_overall_stats): Likewise.
16377         (early_inline_small_functions): Likewise.
16378         (early_inliner): Likewise.
16379         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
16380         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
16381         * ipa-pure-const.c (malloc_candidate_p): Likewise.
16382         * ipa-split.c (execute_split_functions): Likewise.
16383         * symbol-summary.h: Likewise.
16384         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
16386 2018-06-19  Richard Biener  <rguenther@suse.de>
16388         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
16389         (vectorize_loops): ... here.  Fix dbgcnt handling.
16390         (try_vectorize_loop): Wrap try_vectorize_loop_1.
16392 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
16394         PR target/86197
16395         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
16396         ieee128 argument takes up only one (vector) register, not two (floating
16397         point) registers.
16399 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
16401         * gimplify.c (gimplify_init_constructor): Really never clear for an
16402         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
16404 2018-06-19  Richard Biener  <rguenther@suse.de>
16406         PR tree-optimization/86179
16407         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
16408         after failed recognition.
16410 2018-06-18  Martin Sebor  <msebor@redhat.com>
16412         PR middle-end/85602
16413         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
16414         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
16415         Handle integer subtraction.
16416         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
16417         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
16419 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
16421         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
16422         param from rtx to rtx_insn *.
16423         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
16424         param.
16425         (frv_ifcvt_modify_insn): Likwise.
16426         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
16427         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
16428         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
16429         as_a <rtx_insn *> cast to local "unprotected_region" once
16430         it's been established that it's not NULL or pc_rtx.
16431         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
16432         param "sethi" from rtx to rtx_insn *.
16433         (nds32_group_float_insns): Likewise for param "insn".
16434         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
16435         param.
16436         (vax_output_int_subtract): Likewise.
16437         * config/vax/vax.c (vax_output_int_add): Likewise for param
16438         "insn".
16439         (vax_output_int_subtract): Likewise.
16440         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
16441         (emit_pattern_after): Likewise for param "after".
16442         (emit_insn_after): Likewise.
16443         (emit_jump_insn_after): Likewise.
16444         (emit_call_insn_after): Likewise.
16445         (emit_debug_insn_after): Likewise.
16446         (emit_pattern_before): Likewise for param "before".
16447         (emit_insn_before): Likewise.
16448         (emit_jump_insn_before): Likewise.
16449         * final.c (get_insn_template): Likewise for param "insn", removing
16450         a cast.
16451         * output.h (get_insn_template): Likewise for 2nd param.
16452         * rtl.h (emit_insn_before): Likewise.
16453         (emit_jump_insn_before): Likewise.
16454         (emit_debug_insn_before_noloc): Likewise.
16455         (emit_insn_after): Likewise.
16456         (emit_jump_insn_after): Likewise.
16457         (emit_call_insn_after): Likewise.
16458         (emit_debug_insn_after): Likewise.
16459         (set_insn_deleted): Likewise for param.
16461 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
16463         PR target/85358
16464         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
16465         floating point modes, so that IFmode is numerically greater than
16466         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
16467         to declare the ordering.  This prevents IFmode from being
16468         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
16469         machine.  Include rs6000-modes.h to share the fractional values
16470         between genmodes* and the rest of the compiler.
16471         (IFmode): Likewise.
16472         (KFmode): Likewise.
16473         (TFmode): Likewise.
16474         * config/rs6000/rs6000-modes.h: New file.
16475         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
16476         meaning of rs6000_long_double_size so that 126..128 selects an
16477         appropriate 128-bit floating point type.
16478         (rs6000_option_override_internal): Likewise.
16479         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
16480         (TARGET_LONG_DOUBLE_128): Change the meaning of
16481         rs6000_long_double_size so that 126..128 selects an appropriate
16482         128-bit floating point type.
16483         (LONG_DOUBLE_TYPE_SIZE): Update comment.
16484         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
16485         source and destination to match the standard usage.
16486         (truncifkf2): Likewise.
16487         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
16488         ISA 2.07 to use an explicit clobber, instead of passing in a
16489         temporary.
16490         (copysign<mode>3_soft): Likewise.
16492 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
16494         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
16495         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
16496         (vect_slp_analyze_instance_dependence): Likewise.
16497         (vect_enhance_data_refs_alignment): Likewise.
16498         (vect_analyze_data_refs_alignment): Likewise.
16499         (vect_slp_analyze_and_verify_instance_alignment
16500         (vect_analyze_data_ref_accesses): Likewise.
16501         (vect_prune_runtime_alias_test_list): Likewise.
16502         (vect_analyze_data_refs): Likewise.
16503         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
16504         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
16505         (vect_analyze_scalar_cycles_1): Likewise.
16506         (vect_get_loop_niters): Likewise.
16507         (vect_analyze_loop_form_1): Likewise.
16508         (vect_update_vf_for_slp): Likewise.
16509         (vect_analyze_loop_operations): Likewise.
16510         (vect_analyze_loop): Likewise.
16511         (vectorizable_induction): Likewise.
16512         (vect_transform_loop): Likewise.
16513         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
16514         * tree-vect-slp.c (vect_analyze_slp): Likewise.
16515         (vect_make_slp_decision): Likewise.
16516         (vect_detect_hybrid_slp): Likewise.
16517         (vect_slp_analyze_operations): Likewise.
16518         (vect_slp_bb): Likewise.
16519         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
16520         (vectorizable_bswap): Likewise.
16521         (vectorizable_call): Likewise.
16522         (vectorizable_simd_clone_call): Likewise.
16523         (vectorizable_conversion): Likewise.
16524         (vectorizable_assignment): Likewise.
16525         (vectorizable_shift): Likewise.
16526         (vectorizable_operation): Likewise.
16527         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
16529 2018-06-18  Martin Sebor  <msebor@redhat.com>
16531         PR tree-optimization/81384
16532         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
16533         * builtins.c (expand_builtin_strnlen): New function.
16534         (expand_builtin): Call it.
16535         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
16536         * builtins.def (BUILT_IN_STRNLEN): New.
16537         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
16538         Warn for bounds in excess of maximum object size.
16539         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
16540         single-value ranges.  Handle strnlen.
16541         (handle_builtin_strlen): Handle strnlen.
16542         (strlen_check_and_optimize_stmt): Same.
16543         * doc/extend.texi (Other Builtins): Document strnlen.
16545 2018-06-18  Maya Rashish  <coypu@sdf.org>
16547         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
16548         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
16549         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
16551         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
16552         here to ...
16553         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
16555 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
16557         * tree.c (escaped_string::escape): Replace cast to char * by
16558         const_cast<char *> (unescaped).
16560 2018-06-18  Nick Clifton  <nickc@redhat.com>
16562         PR 84195
16563         * tree.c (escaped_string): New class.  Converts an unescaped
16564         string into its escaped equivalent.
16565         (warn_deprecated_use): Use the new class to convert the
16566         deprecation message, if present.
16567         (test_escaped_strings): New self test.
16568         (test_c_tests): Add test_escaped_strings.
16569         * doc/extend.texi (deprecated): Add a note that the
16570         deprecation message is affected by the -fmessage-length
16571         option, and that control characters will be escaped.
16572         (#pragma GCC error): Document this pragma.
16573         (#pragma GCC warning): Likewise.
16574         * doc/invoke.texi (-fmessage-length): Document this option's
16575         effect on the #warning and #error preprocessor directives and
16576         the deprecated attribute.
16578 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
16580         * tree.c (decl_value_expr_lookup): Revert latest change.
16581         (decl_value_expr_insert): Likewise.
16583 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
16585         * gimplify.c (nonlocal_vlas): Delete.
16586         (nonlocal_vla_vars): Likewise.
16587         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
16588         referenced VLAs.
16589         (gimplify_body): Do not create and destroy nonlocal_vlas.
16590         * tree-nested.c: Include diagnostic.h.
16591         (use_pointer_in_frame): Tweak.
16592         (lookup_field_for_decl): Add assertion and declare the transformation.
16593         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
16594         internal error when the reference is in a wrong context.  Do not
16595         create a debug decl by default.
16596         (note_nonlocal_block_vlas): Delete.
16597         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
16598         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
16599         create a debug decl by default.
16600         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
16601         call is in a wrong context.
16602         (fixup_vla_decls): New function.
16603         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
16604         debug variables were created.
16605         * tree.c (decl_value_expr_lookup): Add checking assertion.
16606         (decl_value_expr_insert): Likewise.
16608 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
16610         PR middle-end/82479
16611         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
16612         * tree-scalar-evolution.c (interpret_expr): Likewise.
16613         (expression_expensive_p): Likewise.
16614         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
16615         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
16616         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
16617         (ssa_defined_by_minus_one_stmt_p): New.
16619 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
16621         PR middle-end/64946
16622         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
16623         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
16624         * dojump.c (do_jump): Likewise.
16625         * expr.c (expand_expr_real_2): Check operand type's sign.
16626         * fold-const.c (const_unop): Handle ABSU_EXPR.
16627         (fold_abs_const): Likewise.
16628         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
16629         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
16630         (strip_sign_op_1): Likesise.
16631         * match.pd: Add new pattern to generate ABSU_EXPR.
16632         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
16633         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
16634         * tree-eh.c (operation_could_trap_helper_p): Likewise.
16635         * tree-inline.c (estimate_operator_cost): Likewise.
16636         * tree-pretty-print.c (dump_generic_node): Likewise.
16637         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
16638         * tree.def (ABSU_EXPR): New.
16640 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
16642         PR middle-end/86095
16643         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
16644         documented as preserved for backward compatibility only.
16645         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
16647         PR rtl-optimization/86108
16648         * bb-reorder.c (create_forwarder_block): Renamed to ...
16649         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
16650         jump from new landing pad to the second part.
16651         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
16652         Adjust callers.
16654 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
16656         PR middle-end/85878
16657         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
16658         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
16659         Only call store_expr for halves if the mode is the same.
16661         PR middle-end/86123
16662         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
16663         Fix up comment formatting.
16665 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
16667         * typed-splay-tree.h (typed_splay_tree::remove): New function.
16668         (typed_splay_tree::closure,
16669         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
16670         (typed_splay_tree::typed_splay_tree,
16671         typed_splay_tree::operator =): Declared private.
16672         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
16673         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
16674         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
16675         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
16676         typed_splay_tree::splay_tree_splay,
16677         typed_splay_tree::splay_tree_foreach_helper,
16678         typed_splay_tree::splay_tree_insert,
16679         typed_splay_tree::splay_tree_remove,
16680         typed_splay_tree::splay_tree_lookup,
16681         typed_splay_tree::splay_tree_predecessor,
16682         typed_splay_tree::splay_tree_successor,
16683         typed_splay_tree::splay_tree_min,
16684         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
16685         (typed_splay_tree::root, typed_splay_tree::comp,
16686         typed_splay_tree::delete_key,
16687         typed_splay_tree::delete_value): New data members.
16688         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
16689         typed_splay_tree::remove.
16691 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
16693         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
16694         -mginv and -mno-ginv to the assembler.
16695         * config/mips/mips.opt (-mcrc): New option.
16696         (-mginv): Likewise.
16697         * doc/invoke.text (-mcrc): Document.
16698         (-mginv): Likewise.
16700 2018-06-15  Nick Clifton  <nickc@redhat.com>
16702         PR 84195
16703         * tree.c (escaped_string): New class.  Converts an unescaped
16704         string into its escaped equivalent.
16705         (warn_deprecated_use): Use the new class to convert the
16706         deprecation message, if present.
16707         (test_escaped_strings): New self test.
16708         (test_c_tests): Add test_escaped_strings.
16709         * doc/extend.texi (deprecated): Add a note that the
16710         deprecation message is affected by the -fmessage-length
16711         option, and that control characters will be escaped.
16712         (#pragma GCC error): Document this pragma.
16713         (#pragma GCC warning): Likewise.
16714         * doc/invoke.texi (-fmessage-length): Document this option's
16715         effect on the #warning and #error preprocessor directives and
16716         the deprecated attribute.
16718 2018-06-15  Richard Biener  <rguenther@suse.de>
16720         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
16721         here, also noting vector size used.
16722         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
16723         size used in MSG_OPTIMIZED_LOCATIONS dump.
16724         (pass_slp_vectorize::execute): Adjust.
16726 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
16728         PR target/85968
16729         * config/arc/arc.c (arc_return_address_register): Fix
16730         if-condition.
16732 2018-06-15  Richard Biener  <rguenther@suse.de>
16734         PR middle-end/86159
16735         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
16736         leave useless conversion stripping to force_gimple_operand_gsi.
16737         (gimplify_build2): Likewise.
16738         (gimplify_build1): Likewise.
16740 2018-06-15  Richard Biener  <rguenther@suse.de>
16742         PR middle-end/86076
16743         * tree-cfg.c (move_stmt_op): unshare invariant addresses
16744         before adjusting their block.
16746 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
16748         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
16749         multilibs for *-*-rtems*.
16750         * config/riscv/t-rtems: New file.
16752 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
16754         PR middle-end/86122
16755         * match.pd ((A +- CST1) +- CST2): Punt if last resort
16756         unsigned_type_for returns NULL.
16758         PR target/85945
16759         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
16760         subregs of multi-word pseudos unless the float mode has word size.
16762 2018-06-14  Richard Biener  <rguenther@suse.de>
16764         PR middle-end/86139
16765         * tree-vect-generic.c (build_word_mode_vector_type): Remove
16766         duplicate and harmful type_hash_canon.
16767         * tree.c (type_hash_canon): Assert we didn't find ourselves.
16769 2018-06-14  Richard Biener  <rguenther@suse.de>
16771         PR ipa/86124
16772         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
16773         NULL cgraph_node.
16775 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
16777         * config/rtems.h (STDINT_LONG32): Define.
16779 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
16780             Prachi Godbole  <prachi.godbole@imgtec.com>
16782         * config/mips/mips-cpus.def: Define P6600.
16783         * config/mips/mips-tables.opt: Regenerate.
16784         * config/mips/mips.c (mips_ucbranch_type): New enum.
16785         (mips_rtx_cost_data): Add support for P6600.
16786         (mips_issue_rate): Likewise.
16787         (mips_multipass_dfa_lookahead): Likewise.
16788         (mips_avoid_hazard): Likewise.
16789         (mips_reorg_process_insns): Likewise.
16790         (mips_classify_branch_p6600): New function.
16791         * config/mips/mips.h (TUNE_P6600): New define.
16792         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
16793         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
16794         * config/mips/mips.md: Include p6600.md.
16795         (processor): Add p6600.
16796         * config/mips/p6600.md: New file.
16797         * doc/invoke.texi: Add p6600 to supported architectures.
16799 2018-06-13  Martin Sebor  <msebor@redhat.com>
16801         PR tree-optimization/86114
16802         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
16803         of integer types.
16804         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
16806 2018-06-13  Richard Biener  <rguenther@suse.de>
16808         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
16809         Properly set vector type of the intermediate stmt.
16810         * tree-vect-stmts.c (vectorizable_operation): The destination
16811         var always has vectype_out type.
16813 2018-06-13  Jeff Law  <law@redhat.com>
16815         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
16816         integer 0 for argument to print_rtl_with_bb.
16817         (rl78_reorg): Likewise.
16819 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
16821         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
16822         from rtx to rtx_insn *.
16823         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
16824         "label".
16825         (add_sched_insns_for_speculation): Likewise for local "target",
16826         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
16827         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
16828         from rtx_insn ** to rtx_code_label **.
16829         (reorg_emit_nops): Likewise.
16830         (c6x_reorg): Likewise for local "call_labels".
16831         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
16832         rtx to rtx_insn *.
16833         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
16834         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
16835         the loops over LABEL_REFS.
16836         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
16837         braf_label.
16838         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
16839         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
16840         (split_branches): Strengthen local "olabel" from rtx to
16841         rtx_insn *, adding a safe_as_a cast.
16842         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
16843         to "rtx_insn *".
16844         (add_insn_after): Likewise for first two params.
16845         (add_insn_before): Likewise.
16846         (remove_insn): Likewise for param.
16847         (emit_pattern_before_noloc): Likewise for second and third params.
16848         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
16849         (emit_call_insn_before_noloc): Likewise.
16850         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
16851         to "rtx_insn *".
16852         (emit_barrier_before): Likewise.
16853         (emit_label_before): Strengthen "label" param from "rtx" to
16854         "rtx_code_label *".  Strengthen "before" param from "rtx" to
16855         "rtx_insn *".
16856         (emit_insn_after_1): Strengthen "after" param from "rtx" to
16857         "rtx_insn *".
16858         (emit_pattern_after_noloc): Likewise.
16859         (emit_insn_after_noloc): Likewise.
16860         (emit_jump_insn_after_noloc): Likewise.
16861         (emit_call_insn_after_noloc): Likewise.
16862         (emit_debug_insn_after_noloc): Likewise.
16863         (emit_barrier_after): Likewise.
16864         (emit_label_after): Likewise for both params.
16865         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
16866         "loc" param from "int" to "location_t".
16867         (emit_insn_after_setloc): Likewise.
16868         (emit_jump_insn_after_setloc): Likewise.
16869         (emit_call_insn_after_setloc): Likewise.
16870         (emit_debug_insn_after_setloc): Likewise.
16871         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
16872         "loc" param from "int" to "location_t".
16873         (emit_pattern_before): Convert NULL_RTX to NULL.
16874         (emit_insn_before_setloc): Convert "loc" param from "int" to
16875         "location_t".
16876         (emit_jump_insn_before_setloc): Likewise.
16877         (emit_call_insn_before_setloc): Likewise.
16878         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
16879         rtx_insn *.  Convert "loc" param from "int" to "location_t".
16880         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
16881         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
16882         Convert 3rd param from "int" to "location_t".
16883         (emit_barrier_before, emit_barrier_after, next_real_insn):
16884         Strengthen param from rtx to rtx_insn *.
16885         (emit_label_before): Strengthen 1st param from "rtx" to
16886         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
16887         "rtx_insn *".
16888         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
16889         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
16890         Strengthen 2nd param from "rtx" to "rtx_insn *".
16891         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
16892         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
16893         Likewise. Convert 3rd param from "int" to "location_t".
16894         (emit_label_after): Strengthen 1st param from "rtx" to
16895         "rtx_code_label *".
16896         (next_real_insn, remove_insn): Strengthen param from "rtx" to
16897         "rtx_insn *".
16898         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
16899         from "rtx" to "rtx_insn *".
16901 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
16903         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
16904         bodies streamed in with -Q.
16905         * dumpfile.c (dump_files): Add lto-stream-out dump file.
16906         * dumpfile.h (tree_dump_index): Add lto_stream_out.
16907         * gimple-streamer-out.c: Include gimple-pretty-print.h
16908         (output_bb): Dump stmts streamed.
16909         * lto-section-out.c: Include print-tree.h
16910         (lto_begin_section): Dump sections created.
16911         (lto_output_decl_index): Dump decl encoded.
16912         * lto-streamer-out.c: Include print-tree.h
16913         (create_output_block): Dump output block created.
16914         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
16915         (output_function): Dump function output.
16916         (output_constructor): Dump constructor streamed.
16917         (write_global_stream): Output indexes encoded.
16918         (produce_asm_for_decls): Dump streams encoded.
16919         * lto-streamer.c (streamer_dump_file): New global var.
16920         * lto-streamer.h (streamer_dump_file): Declare.
16921         * passes.c (ipa_write_summaries): Initialize streamer dump.
16922         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
16923         in.
16925 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
16927         PR target/86048
16928         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
16929         offsets for register save directives.  Emit a second batch of save
16930         directives, if need be, when the function accesses prior frames.
16932 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
16934         * config/arc/fpu.md (fmasf4): Force operand to register.
16935         (fnmasf4): Likewise.
16937 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
16939         * config/arc/arc-protos.h (arc_pad_return): Remove.
16940         * config/arc/arc.c (machine_function): Remove force_short_suffix
16941         and size_reason.
16942         (arc_print_operand): Adjust printing of '&'.
16943         (arc_verify_short): Remove conditional printing of short suffix.
16944         (arc_final_prescan_insn): Remove reference to size_reason.
16945         (pad_return): New function.
16946         (arc_reorg): Call pad_return.
16947         (arc_pad_return): Remove.
16948         (arc_init_machine_status): Remove reference to force_short_suffix.
16949         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
16950         (attr length): When attribute iscompact is true force to 2
16951         regardless; in the case of maybe check if we want to force the
16952         instruction to have 4 bytes length.
16953         (nopv): Change it to generate 4 byte long nop as well.
16954         (blockage): New pattern.
16955         (simple_return): Remove call to arc_pad_return.
16956         (p_return_i): Likewise.
16958 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
16960         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
16962 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
16964         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
16965         ARC cores.
16967 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
16969         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
16970         for ARC700 and ARCv2.
16972 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
16974         PR target/86076
16975         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
16976         operands[2] instead of operands[1].
16979 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
16981         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
16982         case, check whether the outer register overlaps an unallocatable
16983         register, not just whether it fits the required class.
16985 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
16987         * poly-int.h (can_div_trunc_p): Add new overload in which all values
16988         are poly_ints.
16989         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
16990         (memrefs_conflict_p): Likewise.
16991         (init_alias_analysis): Likewise.
16992         * cfgexpand.c (expand_debug_expr): Likewise.
16993         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
16994         * cse.c (fold_rtx): Likewise.
16995         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
16996         * expr.c (emit_block_move_hints): Likewise.
16997         (clear_storage_hints, push_block, emit_push_insn): Likewise.
16998         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
16999         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
17000         (emit_group_store): Likewise.
17001         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
17002         to read the PRE/POST_MODIFY increment.
17003         * calls.c (store_one_arg): Use strip_offset.
17004         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
17005         poly_int_rtx_p.
17006         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
17007         by a VEC_SELECT.
17008         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
17009         (simplify_binary_operation_1): Extend CONST_INT handling to
17010         poly_int_rtx_p.
17011         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
17012         than a HOST_WIDE_INT.
17013         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
17014         poly_int64.
17015         (adjust_mems, add_stores): Update accodingly.
17016         (vt_canonicalize_addr): Track polynomial offsets.
17017         (emit_note_insn_var_location): Likewise.
17018         (vt_add_function_parameter): Likewise.
17019         (vt_initialize): Likewise.
17021 2018-06-12  Jeff Law  <law@redhat.com>
17023         * config.gcc (alpha*-*-freebsd*): Remove.
17024         * config/alpha/freebsd.h: Remove.
17026 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
17028         PR other/69968
17029         * spellcheck-tree.c (levenshtein_distance): Rename to...
17030         (get_edit_distance): ...this, and update for underlying renaming.
17031         * spellcheck-tree.h (levenshtein_distance): Rename to...
17032         (get_edit_distance): ...this.
17033         * spellcheck.c (levenshtein_distance): Rename to...
17034         (get_edit_distance): ...this.  Convert from Levenshtein distance
17035         to Damerau-Levenshtein distance by supporting transpositions of
17036         adjacent characters.  Rename "v1" to "v_next" and "v0" to
17037         "v_one_ago".
17038         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
17039         (selftest::test_edit_distance_unit_test_oneway): ...this, and
17040         update for underlying renaming.
17041         (selftest::levenshtein_distance_unit_test): Rename to...
17042         (selftest::test_get_edit_distance_unit): ...this, and update for
17043         underlying renaming.
17044         (selftest::test_find_closest_string): Add example from PR 69968
17045         where transposition helps
17046         (selftest::test_metric_conditions): Update for renaming.
17047         (selftest::test_metric_conditions): Likewise.
17048         (selftest::spellcheck_c_tests): Likewise.
17049         * spellcheck.h (levenshtein_distance): Rename both overloads to...
17050         (get_edit_distance): ...this.
17051         (best_match::consider): Update for renaming.
17053 2018-06-12  Martin Sebor  <msebor@redhat.com>
17055         PR tree-optimization/85259
17056         * builtins.c (compute_objsize): Handle constant offsets.
17057         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
17058         true iff a warning has been issued.
17059         * gimple.h (gimple_nonartificial_location): New function.
17060         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
17061         gimple_nonartificial_location and handle -Wno-system-headers.
17062         (handle_builtin_stxncpy): Same.
17064 2018-06-12  Martin Sebor  <msebor@redhat.com>
17066         PR c/85931
17067         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
17069 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
17071         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
17072         BUILTIN_VEC_XST entries for pointer to double and long long.
17074 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
17076         PR target/85990
17077         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
17078         Update comments.
17079         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
17080         Likewise.
17082 2018-06-12  Martin Liska  <mliska@suse.cz>
17084         * doc/options.texi: Document IntegerRange.
17086 2018-06-12  Martin Liska  <mliska@suse.cz>
17088         * config/i386/i386.opt: Make MPX-related options as Deprecated.
17089         * opt-functions.awk: Handle Deprecated flag.
17090         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
17091         and report error.
17092         (read_cmdline_option): Report warning for a deprecated option.
17093         * opts.h (struct cl_option): Add new field cl_deprecated.
17094         (CL_ERR_DEPRECATED): New.
17096 2018-06-12  Martin Liska  <mliska@suse.cz>
17098         * doc/options.texi: Document Deprecated option flag.
17100 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
17102         * config/arc/arc-arch.h (arc_extras): New enum.
17103         (arc_cpu_t):Add field extra.
17104         (arc_cpu_types): Consider the extras.
17105         * config/arc/arc-cpus.def: Add extras info.
17106         * config/arc/arc-opts.h (processor_type): Consider extra field.
17107         * config/arc/arc.c (arc_override_options): Handle extra field.
17109 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
17111         * config/arc/arc-arch.h: Update ARC_OPTX macro.
17112         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
17113         field.
17114         * config/arc/arc.c (arc_init): Update pic warning.
17115         (irq_range): Update irq range parsing warnings.
17116         (arc_override_options): Update various warning messages.
17117         (arc_handle_aux_attribute): Likewise.
17119 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
17121         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
17123 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
17125         * doc/sourcebuild.texi: Document usage of line number 0 in verify
17126         compiler messages directives.
17128 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
17130         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
17131         * config/mips/mips-tables.opt: Regenerate.
17132         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
17133         mips64r6.
17134         * doc/invoke.texi: Document -march=i6500.
17136 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
17138         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
17139         (i6400_gpmul): Add cpu_unit.
17140         (i6400_gpdiv): Likewise.
17141         (i6400_msa_add_d): Update reservations.
17142         (i6400_msa_int_add) Likewise.
17143         (i6400_msa_short_logic3) Likewise.
17144         (i6400_msa_short_logic2) Likewise.
17145         (i6400_msa_short_logic) Likewise.
17146         (i6400_msa_move) Likewise.
17147         (i6400_msa_cmp) Likewise.
17148         (i6400_msa_short_float2) Likewise.
17149         (i6400_msa_div_d) Likewise.
17150         (i6400_msa_long_logic1) Likewise.
17151         (i6400_msa_long_logic2) Likewise.
17152         (i6400_msa_mult) Likewise.
17153         (i6400_msa_long_float2) Likewise.
17154         (i6400_msa_long_float4) Likewise.
17155         (i6400_msa_long_float5) Likewise.
17156         (i6400_msa_long_float8) Likewise.
17157         (i6400_fpu_fadd): Include frint type.
17158         (i6400_fpu_store): New define_insn_reservation.
17159         (i6400_fpu_load): Likewise.
17160         (i6400_fpu_move): Likewise.
17161         (i6400_fpu_fcmp): Likewise.
17162         (i6400_fpu_fmadd): Likewise.
17163         (i6400_int_mult): Include imul3nc type and update reservation.
17164         (i6400_int_div): Include idiv3 type and update reservation.
17165         (i6400_int_load): Update to check type not move_type.
17166         (i6400_int_store): Likewise.
17167         (i6400_int_prefetch): Set zero latency.
17169 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
17171         * gcc.c: Document new %@{...} sequence.
17172         (LINK_COMMAND_SPEC): Use it for the -L switches.
17173         (cpp_unique_options): Use it for the -I switches.
17174         (at_file_argbuf): New global variable.
17175         (in_at_file): Likewise.
17176         (alloc_args): Create at_file_argbuf.
17177         (clear_args): Truncate at_file_argbuf.
17178         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
17179         (open_at_file): New function.
17180         (close_at_file): Likewise.
17181         (create_at_file): Delete.
17182         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
17183         <'o'>: Likewise.
17184         <'@'>: New case.
17185         (validate_switches_from_spec): Deal with %@{...} sequence.
17186         (validate_switches): Likewise.
17187         (driver::finalize): Call clear_args.
17189 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
17191         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
17193 2018-06-11  Martin Sebor  <msebor@redhat.com>
17195         * doc/invoke.texi (-Wall): List -Wc++17-compat.
17196         (Wno-class-memaccess): Add @opindex.
17197         (Wno-templates, Wno-multiple-inheritance): Same.
17198         (Wno-virtual-inheritance, Wno-namespaces): Same.
17199         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
17200         (Wno-format-overflow, Wno-format-truncation): Same.
17201         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
17202         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
17203         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
17204         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
17205         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
17206         (Wno-misspelled-isr): Same.
17208 2018-06-11  Martin Sebor  <msebor@redhat.com>
17210         * PR tree-optimization/86083
17211         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
17213 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
17215         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
17217 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
17219         PR target/85755
17220         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
17221         on the correct operand.
17222         (*movdi_internal64): Ditto.
17224 2018-06-11  Martin Liska  <mliska@suse.cz>
17226         PR tree-optimization/86089
17227         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
17229 2018-06-11  Julia Koval  <julia.koval@intel.com>
17231         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
17232         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
17233         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
17235 2018-06-11  Olivier Hainque  <hainque@adacore.com>
17237         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
17238         for Ada with strict dwarf2.
17240 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
17242         PR target/85755
17243         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
17244         addresses.
17246 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
17248         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
17250 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
17252         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
17253         TARGET_ELF.
17255 2018-06-08  Martin Liska  <mliska@suse.cz>
17257         * tree-cfg.h (debug_function): Fix argument type to match
17258         implementation.
17260 2018-06-08  Martin Liska  <mliska@suse.cz>
17262         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
17263         Remove usage of MPX-related (and removed) fields.
17264         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
17266 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
17268         * cfg.c (debug): Use TDF_NONE rather than 0.
17269         * cfghooks.c (debug): Likewise.
17270         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
17271         (struct dump_option_value_info): Convert to...
17272         (struct kv_pair): ...this template type.
17273         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
17274         rather than 0.
17275         (optinfo_verbosity_options): Likewise.
17276         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
17277         OPTGROUP_NONE.
17278         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
17279         than int for "optgroup_flags" param.
17280         (dump_generic_expr_loc): Use dump_flags_t rather than int for
17281         "dump_kind" param.
17282         (dump_dec): Likewise.
17283         (dump_finish): Use TDF_NONE rather than 0.
17284         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
17285         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
17286         than 0.  Update for change to option_ptr.
17287         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
17288         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
17289         0.  Update for changes to optinfo_verbosity_options and
17290         optgroup_options.
17291         (opt_info_switch_p): Convert optgroup_flags from int to
17292         optgroup_flags_t.
17293         (dump_basic_block): Use dump_flags_t rather than int
17294         for "dump_kind" param.
17295         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
17296         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
17297         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
17298         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
17299         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
17300         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
17301         TDF_NONE): Convert from macros to...
17302         (enum dump_flag): ...this new enum.
17303         (dump_flags_t): Update to use enum.
17304         (operator|, operator&, operator~, operator|=, operator&=):
17305         Implement for dump_flags_t.
17306         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
17307         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
17308         Convert from macros to...
17309         (enum optgroup_flag): ...this new enum.
17310         (optgroup_flags_t): New typedef.
17311         (operator|, operator|=): Implement for optgroup_flags_t.
17312         (struct dump_file_info): Convert field "alt_flags" to
17313         dump_flags_t.  Convert field "optgroup_flags" to
17314         optgroup_flags_t.
17315         (dump_basic_block): Use dump_flags_t rather than int for param.
17316         (dump_generic_expr_loc): Likewise.
17317         (dump_dec): Likewise.
17318         (dump_register): Convert param "optgroup_flags" to
17319         optgroup_flags_t.
17320         (opt_info_enable_passes): Likewise.
17321         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
17322         than 0.
17323         * gimple-pretty-print.c (debug): Likewise.
17324         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
17325         (merged_store_group::apply_stores): Likewise.
17326         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
17327         * gimple.c (verify_gimple_pp): Likewise.
17328         * graphite-poly.c (print_pbb_body): Likewise.
17329         * passes.c (pass_manager::register_one_dump_file): Convert
17330         local "optgroup_flags" to optgroup_flags_t.
17331         * print-tree.c (print_node): Use TDF_NONE rather than 0.
17332         (debug): Likewise.
17333         (debug_body): Likewise.
17334         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
17335         to optgroup_flags_t.
17336         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
17337         than 0.
17338         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
17339         (convert_mult_to_fma): Likewise.
17340         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
17341         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
17342         * tree-vect-data-refs.c (dump_lower_bound): Convert param
17343         "dump_kind" to dump_flags_t.
17345 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
17347         * config/rs6000/rs6000.c (min, max): Delete.
17349 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
17351         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
17352         -mabi=spe and -mabi=no-spe.
17354 2018-06-08  Martin Liska  <mliska@suse.cz>
17356         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
17357         where we expect an existing summary.
17359 2018-06-08  Martin Liska  <mliska@suse.cz>
17361         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
17362         * ipa-inline.h (estimate_edge_growth): Likewise.
17364 2018-06-08  Martin Liska  <mliska@suse.cz>
17366         * cgraph.c (function_version_hasher::hash): Use
17367         cgraph_node::get_uid ().
17368         (function_version_hasher::equal):
17369         * cgraph.h (cgraph_node::get_uid): New method.
17370         * ipa-inline.c (update_caller_keys): Use
17371         cgraph_node::get_uid ().
17372         (update_callee_keys): Likewise.
17373         * ipa-utils.c (searchc): Likewise.
17374         (ipa_reduced_postorder): Likewise.
17375         * lto-cgraph.c (input_node): Likewise.
17376         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
17377         * symbol-summary.h (symtab_insertion): Likewise.
17378         (symtab_removal): Likewise.
17379         (symtab_duplication): Likewise.
17380         * tree-pretty-print.c (dump_function_header): Likewise.
17381         * tree-sra.c (convert_callers_for_node): Likewise.
17383 2018-06-08  Martin Liska  <mliska@suse.cz>
17385         * cgraph.c (symbol_table::create_edge): Always assign a new
17386         unique number.
17387         (symbol_table::free_edge): Do not recycle numbers.
17388         * cgraph.h (cgraph_edge::get): New method.
17389         * symbol-summary.h (symtab_removal): Use it.
17390         (symtab_duplication): Likewise.
17391         (call_summary::hashable_uid): Remove.
17393 2018-06-08  Martin Liska  <mliska@suse.cz>
17395         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
17396         (initialize_growth_caches): Remove.
17397         (free_growth_caches): Likewise.
17398         (do_estimate_edge_time): Use edge_growth_cache.
17399         (do_estimate_edge_size): Likewise.
17400         (do_estimate_edge_hints): Likewise.
17401         * ipa-inline.c (reset_edge_caches): Likewise.
17402         (recursive_inlining): Likewise.
17403         (inline_small_functions): Likewise.
17404         * ipa-inline.h (initialize_growth_caches): Remove.
17405         (estimate_edge_size): Likewise.
17406         (estimate_edge_time): Likewise.
17407         (estimate_edge_hints): Likewise.
17408         (reset_edge_growth_cache): Likewise.
17409         * symbol-summary.h (call_summary::remove): New method.
17411 2018-06-08  Martin Liska  <mliska@suse.cz>
17413         * ipa-cp.c (class edge_clone_summary): New summary.
17414         (grow_edge_clone_vectors): Remove.
17415         (ipcp_edge_duplication_hook): Remove.
17416         (class edge_clone_summary_t): New call_summary class.
17417         (ipcp_edge_removal_hook): Remove.
17418         (edge_clone_summary_t::duplicate): New function.
17419         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
17420         (create_specialized_node): Likewise.
17421         (ipcp_driver): Initialize edge_clone_summaries and do not
17422         register hooks.
17424 2018-06-08  Martin Liska  <mliska@suse.cz>
17426         * symbol-summary.h (get): New function.
17427         (call_summary::m_initialize_when_cloning): New class member.
17429 2018-06-08  Martin Liska  <mliska@suse.cz>
17431         * cgraph.c (cgraph_node::remove): Do not recycle uid.
17432         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
17433         (symbol_table::allocate_cgraph_symbol): Do not set uid.
17434         * passes.c (uid_hash_t): Record removed_nodes by their uids.
17435         (remove_cgraph_node_from_order): Use the removed_nodes set.
17436         (do_per_function_toporder): Likwise.
17437         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
17438         instead of summary_uid.
17439         (symtab_removal): Likewise.
17440         (symtab_duplication): Likewise.
17442 2018-06-08  Martin Liska  <mliska@suse.cz>
17444         * ipa-cp.c (ipcp_store_bits_results): Use
17445         ipcp_transformation_sum.
17446         (ipcp_store_vr_results): Likewise.
17447         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
17448         to ...
17449         (ipcp_transformation_initialize): ... this.
17450         (ipa_set_node_agg_value_chain):
17451         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
17452         (write_ipcp_transformation_info): Likewise.
17453         (read_ipcp_transformation_info): Likewise.
17454         (ipcp_update_bits): Likewise.
17455         (ipcp_update_vr): Likewise.
17456         (ipcp_transform_function): Likewise.
17457         * ipa-prop.h: Rename ipcp_transformation_summary to
17458         ipcp_transformation.
17459         (class ipcp_transformation_t): New function summary.
17460         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
17461         (ipa_get_agg_replacements_for_node): Likewise.
17463 2018-06-08  Martin Liska  <mliska@suse.cz>
17465         * ipa-pure-const.c (struct funct_state_d): Do it class instead
17466         of struct.
17467         (class funct_state_summary_t): New function_summary class.
17468         (has_function_state): Remove.
17469         (get_function_state): Likewise.
17470         (set_function_state): Likewise.
17471         (add_new_function): Likewise.
17472         (funct_state_summary_t::insert): New function.
17473         (duplicate_node_data): Remove.
17474         (remove_node_data): Remove.
17475         (funct_state_summary_t::duplicate): New function.
17476         (register_hooks): Create new funct_state_summaries.
17477         (pure_const_generate_summary): Use it.
17478         (pure_const_write_summary): Likewise.
17479         (pure_const_read_summary): Likewise.
17480         (propagate_pure_const): Likewise.
17481         (propagate_nothrow): Likewise.
17482         (dump_malloc_lattice): Likewise.
17483         (propagate_malloc): Likewise.
17484         (execute): Do not register hooks, just remove summary
17485         instead.
17486         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
17487         constructor.
17489 2018-06-08  Martin Liska  <mliska@suse.cz>
17491         * ipa-reference.c (remove_node_data): Remove.
17492         (duplicate_node_data): Likewise.
17493         (class ipa_ref_var_info_summary_t): New class.
17494         (class ipa_ref_opt_summary_t): Likewise.
17495         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
17496         (get_reference_optimization_summary): Use
17497         ipa_ref_opt_sum_summaries.
17498         (set_reference_vars_info): Remove.
17499         (set_reference_optimization_summary): Likewise.
17500         (ipa_init): Create summaries.
17501         (init_function_info): Use function summary.
17502         (ipa_ref_opt_summary_t::duplicate): New function.
17503         (ipa_ref_opt_summary_t::remove): New function.
17504         (get_read_write_all_from_node): Fix GNU coding style.
17505         (propagate): Use function summary.
17506         (write_node_summary_p): Fix GNU coding style.
17507         (stream_out_bitmap): Likewise.
17508         (ipa_reference_read_optimization_summary): Use function summary.
17509         (ipa_reference_c_finalize): Do not release hooks.
17511 2018-06-08  Martin Liska  <mliska@suse.cz>
17513         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
17514         (analyze_function_body): Extract multiple calls of get_create.
17515         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
17516         * ipa-inline.c (recursive_inlining): Use ::get method.
17517         * ipa-inline.h (estimate_edge_growth): Likewise.
17519 2018-06-08  Martin Liska  <mliska@suse.cz>
17521         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
17522         HSA_INVALID.
17523         (hsa_function_summary::hsa_function_summary): Use the new enum
17524         value.
17525         (hsa_gpu_implementation_p): Use hsa_summaries::get.
17526         * hsa-gen.c (hsa_get_host_function): Likewise.
17527         (get_brig_function_name): Likewise.
17528         * ipa-hsa.c (process_hsa_functions): Likewise.
17529         (ipa_hsa_write_summary): Likewise.
17530         * symbol-summary.h (symtab_duplication): Use ::get function/
17531         (get): New function.
17533 2018-06-08  Martin Liska  <mliska@suse.cz>
17535         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
17536         of get.
17537         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
17538         (hsa_register_kernel): Likewise.
17539         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
17540         * hsa-gen.c (hsa_get_host_function): Likewise.
17541         (get_brig_function_name): Likewise.
17542         (generate_hsa): Likewise.
17543         (pass_gen_hsail::execute): Likewise.
17544         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
17545         (devirtualization_time_bonus): Likewise.
17546         (ipcp_propagate_stage): Likewise.
17547         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
17548         (edge_set_predicate): Likewise.
17549         (evaluate_conditions_for_known_args): Likewise.
17550         (evaluate_properties_for_edge): Likewise.
17551         (ipa_fn_summary::reset): Likewise.
17552         (ipa_fn_summary_t::duplicate): Likewise.
17553         (dump_ipa_call_summary): Likewise.
17554         (ipa_dump_fn_summary): Likewise.
17555         (analyze_function_body): Likewise.
17556         (compute_fn_summary): Likewise.
17557         (estimate_edge_devirt_benefit): Likewise.
17558         (estimate_edge_size_and_time): Likewise.
17559         (estimate_calls_size_and_time): Likewise.
17560         (estimate_node_size_and_time): Likewise.
17561         (inline_update_callee_summaries): Likewise.
17562         (remap_edge_change_prob): Likewise.
17563         (remap_edge_summaries): Likewise.
17564         (ipa_merge_fn_summary_after_inlining): Likewise.
17565         (ipa_update_overall_fn_summary): Likewise.
17566         (read_ipa_call_summary): Likewise.
17567         (inline_read_section): Likewise.
17568         (write_ipa_call_summary): Likewise.
17569         (ipa_fn_summary_write): Likewise.
17570         (ipa_free_fn_summary): Likewise.
17571         * ipa-hsa.c (process_hsa_functions): Likewise.
17572         (ipa_hsa_write_summary): Likewise.
17573         (ipa_hsa_read_section): Likewise.
17574         * ipa-icf.c (sem_function::merge): Likewise.
17575         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
17576         (do_estimate_edge_time): Likewise.
17577         (estimate_size_after_inlining): Likewise.
17578         (estimate_growth): Likewise.
17579         (growth_likely_positive): Likewise.
17580         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
17581         (inline_call): Likewise.
17582         * ipa-inline.c (caller_growth_limits): Likewise.
17583         (can_inline_edge_p): Likewise.
17584         (can_inline_edge_by_limits_p): Likewise.
17585         (compute_uninlined_call_time): Likewise.
17586         (compute_inlined_call_time): Likewise.
17587         (want_inline_small_function_p): Likewise.
17588         (edge_badness): Likewise.
17589         (update_caller_keys): Likewise.
17590         (update_callee_keys): Likewise.
17591         (recursive_inlining): Likewise.
17592         (inline_small_functions): Likewise.
17593         (inline_to_all_callers_1): Likewise.
17594         (dump_overall_stats): Likewise.
17595         (early_inline_small_functions): Likewise.
17596         (early_inliner): Likewise.
17597         * ipa-inline.h (estimate_edge_growth): Likewise.
17598         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
17599         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
17600         * ipa-prop.h (IPA_NODE_REF): Likewise.
17601         (IPA_EDGE_REF): Likewise.
17602         * ipa-pure-const.c (malloc_candidate_p): Likewise.
17603         (propagate_malloc): Likewise.
17604         * ipa-split.c (execute_split_functions): Likewise.
17605         * symbol-summary.h: Rename get to get_create.
17606         (get): Likewise.
17607         (get_create): Likewise.
17608         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
17610 2018-06-08  Martin Liska  <mliska@suse.cz>
17612         * symbol-summary.h (release): Move definition out of class
17613         declaration.
17614         (symtab_removal): Likewise.
17615         (symtab_duplication): Likewise.
17617 2018-06-08  Martin Liska  <mliska@suse.cz>
17619         * symbol-summary.h (function_summary): Move constructor
17620         implementation out of class declaration.
17621         (release): Likewise.
17622         (symtab_insertion): Likewise.
17623         (symtab_removal): Likewise.
17624         (symtab_duplication): Likewise.
17625         (get): Likewise.
17627 2018-06-08  Martin Liska  <mliska@suse.cz>
17629         * Makefile.in: Remove support for MPX (macros, related functions,
17630         fields in cgraph_node, ...).
17631         * builtin-types.def (BT_BND): Likewise.
17632         (BT_FN_BND_CONST_PTR): Likewise.
17633         (BT_FN_CONST_PTR_BND): Likewise.
17634         (BT_FN_VOID_PTR_BND): Likewise.
17635         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
17636         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
17637         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
17638         (expand_builtin_mempcpy_with_bounds): Likewise.
17639         (expand_builtin_memset_with_bounds): Likewise.
17640         (expand_builtin_memset_args): Likewise.
17641         (std_expand_builtin_va_start): Likewise.
17642         (expand_builtin): Likewise.
17643         (expand_builtin_with_bounds): Likewise.
17644         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
17645         (DEF_LIB_BUILTIN_CHKP): Likewise.
17646         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
17647         (DEF_CHKP_BUILTIN): Likewise.
17648         (BUILT_IN_MEMCPY): Likewise.
17649         (BUILT_IN_MEMMOVE): Likewise.
17650         (BUILT_IN_MEMPCPY): Likewise.
17651         (BUILT_IN_MEMSET): Likewise.
17652         (BUILT_IN_STPCPY): Likewise.
17653         (BUILT_IN_STRCAT): Likewise.
17654         (BUILT_IN_STRCHR): Likewise.
17655         (BUILT_IN_STRCPY): Likewise.
17656         (BUILT_IN_STRLEN): Likewise.
17657         (BUILT_IN_MEMCPY_CHK): Likewise.
17658         (BUILT_IN_MEMMOVE_CHK): Likewise.
17659         (BUILT_IN_MEMPCPY_CHK): Likewise.
17660         (BUILT_IN_MEMSET_CHK): Likewise.
17661         (BUILT_IN_STPCPY_CHK): Likewise.
17662         (BUILT_IN_STRCAT_CHK): Likewise.
17663         (BUILT_IN_STRCPY_CHK): Likewise.
17664         * calls.c (store_bounds): Likewise.
17665         (emit_call_1): Likewise.
17666         (special_function_p): Likewise.
17667         (maybe_warn_nonstring_arg): Likewise.
17668         (initialize_argument_information): Likewise.
17669         (finalize_must_preallocate): Likewise.
17670         (compute_argument_addresses): Likewise.
17671         (expand_call): Likewise.
17672         * cfgexpand.c (expand_call_stmt): Likewise.
17673         (expand_return): Likewise.
17674         (expand_gimple_stmt_1): Likewise.
17675         (pass_expand::execute): Likewise.
17676         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
17677         (cgraph_node::remove): Likewise.
17678         (cgraph_node::dump): Likewise.
17679         (cgraph_node::verify_node): Likewise.
17680         * cgraph.h (chkp_function_instrumented_p): Likewise.
17681         (symtab_node::get_alias_target): Likewise.
17682         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
17683         (cgraph_local_p): Likewise.
17684         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
17685         (cgraph_edge::rebuild_references): Likewise.
17686         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
17687         (walk_polymorphic_call_targets): Likewise.
17688         (cgraph_node::expand_thunk): Likewise.
17689         (symbol_table::output_weakrefs): Likewise.
17690         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
17691         (ix86_handle_option): Likewise.
17692         * config/i386/constraints.md: Likewise.
17693         * config/i386/i386-builtin-types.def (BND): Likewise.
17694         (VOID): Likewise.
17695         (PVOID): Likewise.
17696         (ULONG): Likewise.
17697         * config/i386/i386-builtin.def (BDESC_END): Likewise.
17698         (BDESC_FIRST): Likewise.
17699         (BDESC): Likewise.
17700         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
17701         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
17702         * config/i386/i386.c (enum reg_class): Likewise.
17703         (ix86_target_string): Likewise.
17704         (ix86_option_override_internal): Likewise.
17705         (ix86_conditional_register_usage): Likewise.
17706         (ix86_valid_target_attribute_inner_p): Likewise.
17707         (ix86_set_indirect_branch_type): Likewise.
17708         (ix86_set_current_function): Likewise.
17709         (ix86_function_arg_regno_p): Likewise.
17710         (init_cumulative_args): Likewise.
17711         (ix86_function_arg_advance): Likewise.
17712         (ix86_function_arg): Likewise.
17713         (ix86_pass_by_reference): Likewise.
17714         (ix86_function_value_regno_p): Likewise.
17715         (ix86_function_value_1): Likewise.
17716         (ix86_function_value_bounds): Likewise.
17717         (ix86_return_in_memory): Likewise.
17718         (ix86_setup_incoming_vararg_bounds): Likewise.
17719         (ix86_va_start): Likewise.
17720         (indirect_thunk_need_prefix): Likewise.
17721         (print_reg): Likewise.
17722         (ix86_print_operand): Likewise.
17723         (ix86_expand_call): Likewise.
17724         (ix86_output_function_return): Likewise.
17725         (reg_encoded_number): Likewise.
17726         (BDESC_VERIFYS): Likewise.
17727         (ix86_init_mpx_builtins): Likewise.
17728         (ix86_init_builtins): Likewise.
17729         (ix86_emit_cmove): Likewise.
17730         (ix86_emit_move_max): Likewise.
17731         (ix86_expand_builtin): Likewise.
17732         (ix86_builtin_mpx_function): Likewise.
17733         (ix86_get_arg_address_for_bt): Likewise.
17734         (ix86_load_bounds): Likewise.
17735         (ix86_store_bounds): Likewise.
17736         (ix86_load_returned_bounds): Likewise.
17737         (ix86_store_returned_bounds): Likewise.
17738         (ix86_class_likely_spilled_p): Likewise.
17739         (ix86_hard_regno_mode_ok): Likewise.
17740         (x86_order_regs_for_local_alloc): Likewise.
17741         (ix86_mitigate_rop): Likewise.
17742         (ix86_bnd_prefixed_insn_p): Likewise.
17743         (ix86_mpx_bound_mode): Likewise.
17744         (ix86_make_bounds_constant): Likewise.
17745         (ix86_initialize_bounds): Likewise.
17746         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
17747         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
17748         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
17749         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
17750         (TARGET_CHKP_BOUND_MODE): Likewise.
17751         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
17752         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
17753         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
17754         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
17755         * config/i386/i386.h (TARGET_MPX): Likewise.
17756         (TARGET_MPX_P): Likewise.
17757         (VALID_BND_REG_MODE): Likewise.
17758         (FIRST_BND_REG): Likewise.
17759         (LAST_BND_REG): Likewise.
17760         (enum reg_class): Likewise.
17761         (BND_REG_P): Likewise.
17762         (BND_REGNO_P): Likewise.
17763         (BNDmode): Likewise.
17764         (ADJUST_INSN_LENGTH): Likewise.
17765         * config/i386/i386.md: Likewise.
17766         * config/i386/i386.opt: Likewise.
17767         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
17768         (defined): Likewise.
17769         (LINK_MPX): Likewise.
17770         (MPX_SPEC): Likewise.
17771         (LIBMPX_SPEC): Likewise.
17772         (LIBMPXWRAPPERS_SPEC): Likewise.
17773         (CHKP_SPEC): Likewise.
17774         * config/i386/predicates.md: Likewise.
17775         * dbxout.c (dbxout_type): Likewise.
17776         * doc/extend.texi: Likewise.
17777         * doc/invoke.texi: Likewise.
17778         * doc/md.texi: Likewise.
17779         * doc/tm.texi: Likewise.
17780         * doc/tm.texi.in: Likewise.
17781         * dwarf2out.c (is_base_type): Likewise.
17782         (gen_formal_types_die): Likewise.
17783         (gen_subprogram_die): Likewise.
17784         (gen_type_die_with_usage): Likewise.
17785         (gen_decl_die): Likewise.
17786         (dwarf2out_late_global_decl): Likewise.
17787         * expr.c (expand_assignment): Likewise.
17788         (emit_storent_insn): Likewise.
17789         (store_expr_with_bounds): Likewise.
17790         (store_expr): Likewise.
17791         (expand_expr_real_1): Likewise.
17792         * expr.h (store_expr_with_bounds): Likewise.
17793         * function.c (use_register_for_decl): Likewise.
17794         (struct bounds_parm_data): Likewise.
17795         (assign_parms_augmented_arg_list): Likewise.
17796         (assign_parm_find_entry_rtl): Likewise.
17797         (assign_parm_is_stack_parm): Likewise.
17798         (assign_parm_load_bounds): Likewise.
17799         (assign_bounds): Likewise.
17800         (assign_parms): Likewise.
17801         (expand_function_start): Likewise.
17802         * gcc.c (CHKP_SPEC): Likewise.
17803         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
17804         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
17805         (wrestrict_dom_walker::check_call): Likewise.
17806         * gimple.c (gimple_build_call_from_tree): Likewise.
17807         * gimple.h (enum gf_mask): Likewise.
17808         (gimple_call_with_bounds_p): Likewise.
17809         (gimple_call_set_with_bounds): Likewise.
17810         * gimplify.c (gimplify_init_constructor): Likewise.
17811         * ipa-cp.c (initialize_node_lattices): Likewise.
17812         (propagate_constants_across_call): Likewise.
17813         (find_more_scalar_values_for_callers_subset): Likewise.
17814         * ipa-hsa.c (process_hsa_functions): Likewise.
17815         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
17816         * ipa-icf.c (sem_function::merge): Likewise.
17817         * ipa-inline.c (early_inliner): Likewise.
17818         * ipa-pure-const.c (warn_function_noreturn): Likewise.
17819         (warn_function_cold): Likewise.
17820         (propagate_pure_const): Likewise.
17821         * ipa-ref.h (enum GTY): Likewise.
17822         * ipa-split.c (find_retbnd): Likewise.
17823         (consider_split): Likewise.
17824         (split_function): Likewise.
17825         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
17826         * ipa.c (walk_polymorphic_call_targets): Likewise.
17827         (symbol_table::remove_unreachable_nodes): Likewise.
17828         (process_references): Likewise.
17829         (cgraph_build_static_cdtor_1): Likewise.
17830         * lto-cgraph.c (lto_output_node): Likewise.
17831         (output_refs): Likewise.
17832         (compute_ltrans_boundary): Likewise.
17833         (input_overwrite_node): Likewise.
17834         (input_node): Likewise.
17835         (input_cgraph_1): Likewise.
17836         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
17837         * passes.c (pass_manager::execute_early_local_passes): Likewise.
17838         (class pass_chkp_instrumentation_passes): Likewise.
17839         (make_pass_chkp_instrumentation_passes): Likewise.
17840         * passes.def: Likewise.
17841         * rtl.h (struct GTY): Likewise.
17842         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
17843         * stor-layout.c (layout_type): Likewise.
17844         * symtab.c: Likewise.
17845         * target.def: Likewise.
17846         * targhooks.c (default_chkp_bound_type): Likewise.
17847         (default_chkp_bound_mode): Likewise.
17848         (default_builtin_chkp_function): Likewise.
17849         (default_chkp_function_value_bounds): Likewise.
17850         (default_chkp_make_bounds_constant): Likewise.
17851         (default_chkp_initialize_bounds): Likewise.
17852         * targhooks.h (default_chkp_bound_type): Likewise.
17853         (default_chkp_bound_mode): Likewise.
17854         (default_builtin_chkp_function): Likewise.
17855         (default_chkp_function_value_bounds): Likewise.
17856         (default_chkp_make_bounds_constant): Likewise.
17857         (default_chkp_initialize_bounds): Likewise.
17858         * toplev.c (compile_file): Likewise.
17859         (process_options): Likewise.
17860         * tree-core.h (DEF_BUILTIN): Likewise.
17861         (DEF_BUILTIN_CHKP): Likewise.
17862         * tree-inline.c (declare_return_variable): Likewise.
17863         (remap_gimple_stmt): Likewise.
17864         (copy_bb): Likewise.
17865         (initialize_inlined_parameters): Likewise.
17866         (expand_call_inline): Likewise.
17867         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
17868         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
17869         (make_pass_ipa_chkp_produce_thunks): Likewise.
17870         (make_pass_chkp): Likewise.
17871         (make_pass_chkp_opt): Likewise.
17872         (make_pass_chkp_instrumentation_passes): Likewise.
17873         * tree-pretty-print.c (dump_generic_node): Likewise.
17874         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
17875         * tree-ssa-dce.c (propagate_necessity): Likewise.
17876         (eliminate_unnecessary_stmts): Likewise.
17877         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
17878         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
17879         * tree-ssa-sccvn.h: Likewise.
17880         * tree-ssa-strlen.c (get_string_length): Likewise.
17881         (valid_builtin_call): Likewise.
17882         (adjust_last_stmt): Likewise.
17883         (handle_builtin_strchr): Likewise.
17884         (handle_builtin_strcpy): Likewise.
17885         (handle_builtin_stxncpy): Likewise.
17886         (handle_builtin_memcpy): Likewise.
17887         (handle_builtin_strcat): Likewise.
17888         (strlen_check_and_optimize_stmt): Likewise.
17889         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
17890         * tree-streamer-in.c: Likewise.
17891         * tree-streamer.c (record_common_node): Likewise.
17892         * tree.c (tree_code_size): Likewise.
17893         (wide_int_to_tree_1): Likewise.
17894         (type_contains_placeholder_1): Likewise.
17895         (build_common_tree_nodes): Likewise.
17896         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
17897         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
17898         (POINTER_BOUNDS_P): Likewise.
17899         (BOUNDED_TYPE_P): Likewise.
17900         (BOUNDED_P): Likewise.
17901         (CALL_WITH_BOUNDS_P): Likewise.
17902         (pointer_bounds_type_node): Likewise.
17903         * value-prof.c (gimple_ic): Likewise.
17904         * var-tracking.c (vt_add_function_parameters): Likewise.
17905         * varasm.c (make_decl_rtl): Likewise.
17906         (assemble_start_function): Likewise.
17907         (output_constant): Likewise.
17908         (maybe_assemble_visibility): Likewise.
17909         * varpool.c (ctor_for_folding): Likewise.
17910         * chkp-builtins.def: Remove.
17911         * ipa-chkp.c: Remove.
17912         * ipa-chkp.h: Remove.
17913         * rtl-chkp.c: Remove.
17914         * rtl-chkp.h: Remove.
17915         * tree-chkp-opt.c: Remove.
17916         * tree-chkp.c: Remove.
17917         * tree-chkp.h: Remove.
17919 2018-06-07  Carl Love  <cel@us.ibm.com>
17921         * config/rs6000/vsx.md (vextract_fp_from_shorth,
17922         vextract_fp_from_shortl): Add BE support.
17924 2018-06-07  Paul Koning  <ni1d@arrl.net>
17926         * compare-elim.c (try_merge_compare): Don't merge compare if
17927         address contains a side effect.
17928         (try_eliminate_compare): Likewise.
17930 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
17932         * config.gcc: Support "tremont".
17933         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
17934         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
17935         PROCESSOR_TREMONT.
17936         * config/i386/i386.c (m_TREMONT): Define.
17937         (processor_target_table): Add "tremont".
17938         (PTA_TREMONT): Define.
17939         (ix86_lea_outperforms): Add TARGET_TREMONT.
17940         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
17941         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
17942         and M_INTEL_GOLDMONT_PLUS.
17943         (fold_builtin_cpu): Add "tremont".
17944         (ix86_add_stmt_cost): Add TARGET_TREMONT.
17945         (ix86_option_override_internal): Add "tremont".
17946         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
17947         (processor_type): Add PROCESSOR_TREMONT.
17948         * config/i386/x86-tune.def: Add m_TREMONT.
17949         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
17951 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
17953         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
17954         symbol defined for msp430i* devices to be lower case.
17956 2018-06-07  Richard Biener  <rguenther@suse.de>
17958         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
17959         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
17960         Properly wrap signed arithmetic if overflow wraps.
17962 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
17964         PR tree-optimization/69615
17965         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
17966         of a cast from a same precision integral SSA_NAME in a bb dominated
17967         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
17968         cast to utype if rhs2 has already a compatible type.
17970 2018-06-07  Richard Biener  <rguenther@suse.de>
17972         PR tree-optimization/85935
17973         * graphite-scop-detection.c (find_params_in_bb): Analyze
17974         condition operands with respect to the correct loop.  Assert
17975         the analysis doesn't fail.
17977 2018-06-04  Carl Love  <cel@us.ibm.com>
17979         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
17980         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
17981         as it is slightly cheaper.
17982         (first_match_or_eos_index_<mode>):
17983         Calculate index using natural element order.
17984         (first_match_index_<mode>):
17985         Calculate index using natural element order.
17986         (first_match_or_eos_index_<mode>):
17987         Calculate index using natural order.
17988         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
17989         for BE and LE modes.
17990         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
17991         P9V_BUILTIN_VCLZLSBB_V16QI.
17992         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
17993         specific.
17995 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
17997         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
17998         indentation and line wrap for many prototypes.  Add missing
17999         @smallexample directives around block of prototypes for vec_xl and
18000         vec_xst.
18002 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
18004         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
18005         track if we pass or return IEEE 128-bit floating point.
18006         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
18007         C++ mangling that is compatible with GCC 8.1.
18008         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
18009         (init_cumulative_args): Note if we pass or return IEEE 128-bit
18010         floating point types.
18011         (rs6000_function_arg_advance_1): Likewise.
18012         (rs6000_mangle_type): Optionally generate mangled names that match
18013         what GCC 8.1 generated for IEEE 128-bit floating point types.
18014         (rs6000_globalize_decl_name): If we have an external function that
18015         passes or returns IEEE 128-bit types, generate a weak reference
18016         from the mangled name used in GCC 8.1 to the current mangled
18017         name.
18018         (rs6000_init_builtins): Make __ibm128 use the long double type if
18019         long double is IBM extended double.  Make __float128 use the long
18020         double type if long double is IEEE 128-bit.
18022         PR target/85657
18023         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
18024         macro for __ibm128 built-in functions.
18025         (PACK_IF): Add __ibm128 pack/unpack functions.
18026         (UNPACK_IF): Likewise.
18027         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
18028         enable long double built-in functions if long double is IEEE
18029         128-bit floating point.
18030         (rs6000_invalid_builtin): Update long double built-in function
18031         error message.
18032         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
18033         functions, adjust the built-in function to use the long double
18034         built-in function if __ibm128 and long double are the same type.
18035         * doc/extend.texi (PowerPC builtins): Update documention for
18036         __builtin_{,un}pack_longdouble.  Add documentation for
18037         __builtin_{,un}pack_ibm128.
18039 2018-06-06  Jim Wilson  <jimw@sifive.com>
18041         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
18042         (struct machine_function): New field interrupt_mode.
18043         (riscv_handle_type_attribute): New function.  Add forward declaration.
18044         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
18045         (riscv_expand_epilogue): Check interrupt_mode field.
18046         (riscv_set_current_function): Check interrupt attribute args and
18047         set interrupt_mode field.
18048         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
18049         (riscv_sret, riscv_uret): New.
18050         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
18051         new arguments to interrupt attribute.
18053 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
18055         PR target/63177
18056         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
18057         Don't handle -mcpu=power8 if -mpower9-vector is also used.
18059 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18061         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
18062         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
18063         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
18064         several redundant entries.
18066 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
18068         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
18069         type from "rtx" to "rtx_insn *".
18070         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
18071         for local "call_insn", removing cast.
18072         (ix86_expand_call): Likewise, introducing a "call_insn" local.
18074 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
18076         PR tree-optimization/86066
18077         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
18078         for BIT_INSERT_EXPR stores.
18080 2018-06-06  Richard Biener  <rguenther@suse.de>
18082         PR tree-optimization/86062
18083         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
18084         component refs ontop
18085         of to be offsetted base.
18087 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
18089         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
18090         to be static and remove check on interrupt attribute name.
18092 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18094         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
18095         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
18097 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
18099         PR target/79924
18100         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
18101         second argument.
18102         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
18103         Remove second argument, change how error is called.
18104         (aarch64_layout_arg): Remove second argument from
18105         aarch64_err_no_fpadvsimd call.
18106         (aarch64_init_cumulative_args): Ditto.
18107         (aarch64_gimplify_va_arg_expr): Ditto.
18108         * config/aarch64/aarch64.md (mov<mode>): Ditto.
18110 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
18112         * config/i386/i386.md (simple_return_indirect_internal): New expander.
18113         (*simple_return_indirect_internal<mode>): Rename from
18114         simple_return_indirect_internal.  Use W mode iterator.
18115         (rstorssp): New expander.
18116         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
18117         (clrssbsy): New expander.
18118         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
18120 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
18122         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
18123         __typeof__.
18124         (cmse_check_pointed_object): Likewise.
18126 2018-06-05  Martin Liska  <mliska@suse.cz>
18128         PR gcov-profile/47618
18129         * doc/invoke.texi: Document how -fprofile-dir format
18130         is extended.
18132 2018-06-05  Richard Biener  <rguenther@suse.de>
18134         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
18135         removal pretend DOM info isn't available so we do not update
18136         it and only remove edges, not dominated blocks.  Actually free
18137         DOM info in case we removed something.  Remove unreachable blocks.
18138         (mfb_keep_latches): Work with either DOM info or marked backedges.
18139         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
18140         first.  Mark backedges if DOM info isn't available.
18141         (Re-)compute DOM info after cleanup_control_flow_pre.
18143 2018-06-05  Richard Biener  <rguenther@suse.de>
18145         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
18146         (locus_discrim_hasher::hash): Adjust.
18147         (locus_discrim_hasher::equal): Likewise.
18148         (next_discriminator_for_locus): Work on line directly.
18149         (same_line_p): Pass in expanded locus1 as well.
18150         (assign_discriminators): Avoid redundant location expansions.
18152 2018-06-05  Richard Biener  <rguenther@suse.de>
18154         PR tree-optimization/86046
18155         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
18156         if required after clearing TREE_ADDRESSABLE.
18158 2018-06-05  Richard Biener  <rguenther@suse.de>
18160         PR tree-optimization/86047
18161         * tree-ssa-loop.c (for_each_index): Glob handling of all
18162         decls and constants and really handle all of them.
18164 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18166         PR target/81497
18167         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
18168         qualifier_void_pointer and qualifier_const_void_pointer.
18169         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
18170         (arm_init_builtins): Handle the above.
18171         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
18172         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
18173         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
18174         void intrinsics.
18176 2018-06-05  Martin Liska  <mliska@suse.cz>
18178         * auto-profile.c (read_autofdo_file): Do not use
18179         gcov_ctr_summary struct.
18180         (afdo_callsite_hot_enough_for_early_inline): Likewise.
18181         * coverage.c (struct counts_entry): Likewise.
18182         (read_counts_file): Read just single summary entry.
18183         (get_coverage_counts): Use gcov_summary struct.
18184         * coverage.h (get_coverage_counts): Likewise.
18185         * gcov-dump.c (dump_working_sets): Likewise.
18186         (tag_summary): Dump just single summary.
18187         * gcov-io.c (gcov_write_summary): Write just histogram
18188         summary.
18189         (gcov_read_summary): Read just single summary.
18190         (compute_working_sets): Use gcov_summary struct.
18191         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
18192         of GCOV_COUNTERS_SUMMABLE.
18193         (GCOV_COUNTERS_SUMMABLE): Remove.
18194         (GCOV_FIRST_VALUE_COUNTER): Replace with
18195         GCOV_COUNTER_V_INTERVAL.
18196         (struct gcov_ctr_summary): Remove.
18197         (struct gcov_summary): Directly use fields of former
18198         gcov_ctr_summary.
18199         (compute_working_sets): Use gcov_summary struct.
18200         * gcov.c (read_count_file): Do not use ctrs fields.
18201         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
18202         struct.
18203         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
18204         struct.
18205         * profile.c: Likewise.
18206         * profile.h: Likewise.
18208 2018-06-05  Martin Liska  <mliska@suse.cz>
18210         PR gcov-profile/84846
18211         * gcov.c (output_lines): Print working directory only
18212         in intermediate format.
18214 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
18216         * config/s390/s390-builtin-types.def: Add void function type.
18217         * config/s390/s390-builtins.def: Use the function type for the
18218         tbeginc builtin.
18220 2018-06-04  Jim Wilson  <jimw@sifive.com>
18222         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
18223         to int.
18224         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
18225         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
18226         handle EH_RETURN_DATA_REGNO registers properly.
18227         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
18228         (riscv_expand_epilogue): Update comment.  Change argument name and
18229         type.  Update code to use new name and type.  Pass new args to
18230         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
18231         EXCEPTION_RETURN.
18232         * config/riscv/riscv.md (NORMAL_RETURN): New.
18233         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
18234         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
18235         (eh_return): Call gen_eh_return_internal and emit barrier.
18236         (eh_return_internal): Call riscv_expand_epilogue.
18238 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
18240         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
18241         bit_insertion field and declare can_be_merged_into method.
18242         (merged_store_group::can_be_merged_into): New method.
18243         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
18244         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
18245         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
18247 2018-06-04  Richard Biener  <rguenther@suse.de>
18249         PR tree-optimization/85955
18250         * builtins.c (fold_builtin_sincos): Convert pointers to
18251         destination to appropriate type before dereferencing.
18253 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
18255         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
18257 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
18259         * expr.c (expand_expr_real_1): Force the operand into memory if
18260         its TYPE_MODE is BLKmode and if there is no integer mode for
18261         the number of bits being extracted.
18263 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
18265         PR target/85832
18266         PR target/86036
18267         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
18268         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
18270 2018-06-04  Richard Biener  <rguenther@suse.de>
18272         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
18273         (cleanup_tree_cfg_noloop): ... single caller.  Do
18274         start_recording_case_labels later.
18276 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
18278         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
18279         to _IMMINTRIN_H_INCLUDED.
18280         * config/i386/pconfigintrin.h: Ditto.
18281         * config/i386/waitpkgintrin.h: Ditto.
18282         * config/i386/immintrin.h: Add includes for sgxintrin.h,
18283         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
18284         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
18285         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
18286         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
18287         waitpkgintrin.h and cldemoteintrin.h.
18289 2018-06-04  Richard Biener  <rguenther@suse.de>
18291         PR tree-optimization/86038
18292         * tracer.c (find_best_successor): Check probability for
18293         being initialized, bail out if not.
18295 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
18297         PR target/86003
18298         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
18299         of bits to ignore when comparing architectures.
18301 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
18303         PR tree-optimization/69615
18304         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
18305         maximum or minimum of the type, try to merge it also as if
18306         range1 is + [-, x - 1] or + [x + 1, -].
18308         PR c++/86025
18309         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
18311 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
18313         PR tree-optimization/86034
18314         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
18315         the unsigned bitfield type in a bit insertion sequence if it does not
18316         have a larger precision than the bitfield size.
18317         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
18319 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
18321         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
18323 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
18325         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
18326         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
18327         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
18328         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
18330 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
18332         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
18333         Disable -fdelete-null-pointer-checks for ELF toolchain.
18335 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
18336             Kito Cheng  <kito.cheng@gmail.com>
18338         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
18339         (nds32le-*-*, nds32be-*-*): Integrate checking process.
18340         (nds32*-*-*): Add glibc and uclibc conditions.
18341         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
18342         (TARGET_EXCEPT_UNWIND_INFO): Define.
18343         * config/nds32/elf.h: New file.
18344         * config/nds32/linux.h: New file.
18345         * config/nds32/nds32-elf.opt: New file.
18346         * config/nds32/nds32-linux.opt: New file.
18347         * config/nds32/nds32-fp-as-gp.c
18348         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
18349         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
18350         TARGET_LINUX_ABI.
18351         (nds32_asm_file_end): Ditto.
18352         (nds32_print_operand): Ditto.
18353         (nds32_insert_attributes): Ditto.
18354         (nds32_init_libfuncs): New function.
18355         (TARGET_HAVE_TLS): Define.
18356         (TARGET_INIT_LIBFUNCS): Define.
18357         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
18358         spec content.
18359         (TARGET_ELF): Apply different mcmodel setting.
18360         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
18361         been migrated into elf.h and linux.h files.
18362         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
18363         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
18364         (mcmodel): The content has been migrated into nds32-elf.opt and
18365         nds32-linux.opt files.
18366         * config/nds32/t-elf: New file.
18367         * config/nds32/t-linux: New file.
18369 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
18370             Shiva Chen  <shiva0217@gmail.com>
18372         * config/nds32/constants.md (unspec_volatile_element): Add
18373         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
18374         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
18375         optimization.
18376         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
18377         (make_pass_nds32_fp_as_gp): Declare.
18378         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
18379         optmization pass.
18380         (nds32_asm_function_end_prologue): Remove unused asm output.
18381         (nds32_asm_function_begin_epilogue): Remove unused asm output.
18382         (nds32_asm_file_start): Output necessary fp_as_gp information.
18383         (nds32_option_override): Adjust register usage.
18384         (nds32_expand_prologue): Consider fp_as_gp situation.
18385         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
18386         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
18387         (epilogue): Ditto.
18388         (return): Ditto.
18389         (simple_return): Ditto.
18390         (omit_fp_begin): Output special directive for fp_as_gp.
18391         (omit_fp_end): Output special directive for fp_as_gp.
18392         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
18393         mforbid-fp-as-gp): New options.
18395 2018-06-01  Mark Wielaard  <mark@klomp.org>
18397         * dwarf2out.c (dwarf2out_finish): Remove generation of
18398         DW_AT_loclists_base.
18400 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
18402         * gimple-ssa-store-merging.c: Include gimple-fold.h.
18403         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
18404         (struct merged_store_group): Add bit_insertion field.
18405         (dump_char_array): Use standard hexadecimal format.
18406         (merged_store_group::merged_store_group): Set bit_insertion to false.
18407         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
18408         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
18409         also print the mask in the dump file.
18410         (pass_store_merging::gate): Minor tweak.
18411         (imm_store_chain_info::coalesce_immediate): Fix wrong association
18412         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
18413         stores with INTEGER_CST stores.
18414         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
18415         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
18416         and use it throughout.  Generate bit insertion sequences if need be.
18417         (pass_store_merging::process_store): Remove redundant condition.
18418         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
18420 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
18422         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
18423         the 128-bit floating point types.  Fix function comment.
18425 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18427         * config/aarch64/aarch64-simd.md
18428         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
18429         mnemonics.
18430         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
18431         mnemonics.
18433 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
18435         PR tree-optimization/85989
18436         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
18437         variable.
18438         (backprop::intersect_uses): Check it when deciding whether this
18439         is a backedge reference.
18440         (backprop::process_block): Add each phi to m_visited_phis
18441         after visiting it, then clear it at the end.
18443 2018-06-01  Richard Biener  <rguenther@suse.de>
18445         * tree-vectorizer.h (vect_dr_stmt): New function.
18446         (vect_get_load_cost): Adjust.
18447         (vect_get_store_cost): Likewise.
18448         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
18449         Use vect_dr_stmt instead of DR_SMTT.
18450         (vect_record_base_alignments): Likewise.
18451         (vect_calculate_target_alignment): Likewise.
18452         (vect_compute_data_ref_alignment): Likewise and make static.
18453         (vect_update_misalignment_for_peel): Likewise.
18454         (vect_verify_datarefs_alignment): Likewise.
18455         (vector_alignment_reachable_p): Likewise.
18456         (vect_get_data_access_cost): Likewise.  Pass down
18457         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
18458         (vect_get_peeling_costs_all_drs): Likewise.
18459         (vect_peeling_hash_get_lowest_cost): Likewise.
18460         (vect_enhance_data_refs_alignment): Likewise.
18461         (vect_find_same_alignment_drs): Likewise.
18462         (vect_analyze_data_refs_alignment): Likewise.
18463         (vect_analyze_group_access_1): Likewise.
18464         (vect_analyze_group_access): Likewise.
18465         (vect_analyze_data_ref_access): Likewise.
18466         (vect_analyze_data_ref_accesses): Likewise.
18467         (vect_vfa_segment_size): Likewise.
18468         (vect_small_gap_p): Likewise.
18469         (vectorizable_with_step_bound_p): Likewise.
18470         (vect_prune_runtime_alias_test_list): Likewise.
18471         (vect_analyze_data_refs): Likewise.
18472         (vect_supportable_dr_alignment): Likewise.
18473         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
18474         (vect_gen_prolog_loop_niters): Likewise.
18475         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
18476         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
18477         modify DR_STMT.
18478         (vect_recog_mask_conversion_pattern): Likewise.
18479         (vect_try_gather_scatter_pattern): Likewise.
18480         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
18481         to vect_get_store_cost.
18482         (vect_get_store_cost): Get stmt_info instead of DR.
18483         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
18484         (vect_get_load_cost): Get stmt_info instead of DR.
18486 2018-06-01  Richard Biener  <rguenther@suse.de>
18488         PR middle-end/86017
18489         * gimple-fold.c (var_decl_component_p): Also allow offsetted
18490         vars wrapped in MEM_REFs.
18492 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
18494         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
18495         Fix subreg tests so that we only return a choice between
18496         GENERAL_REGS and FP_REGS if the original classes included both.
18498 2018-06-01  Richard Biener  <rguenther@suse.de>
18500         PR ipa/85960
18501         * tree-ssa-structalias.c (get_function_part_constraint):
18502         Handle NULL fi->decl.
18503         (find_func_aliases_for_call): Properly handle indirect
18504         fi from direct call.
18505         (find_func_clobbers): Likewise.
18506         (ipa_pta_execute): Likewise.
18507         (create_variable_info_for): For functions that are ifunc_resolver
18508         resolve to a varinfo that contains the result of the resolver call.
18509         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
18510         aliases.
18512 2018-05-31  Michael Collison  <michael.collison@arm.com>
18514         * config/aarch64/aarch64.md:
18515         (*fix_to_zero_extenddfdi2): New pattern.
18516         * gcc.target/aarch64/fix_extend1.c: New testcase.
18518 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
18520         PR middle-end/78809
18521         PR middle-end/83026
18522         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
18523         and BUILT_IN_STRNCMP_EQ.
18524         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
18525         BUILT_IN_STRNCMP_EQ.
18526         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
18527         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
18528         (gimple_fold_builtin): Likewise.
18529         * tree-ssa-strlen.c (compute_string_length): New function.
18530         (determine_min_obsize): New function.
18531         (handle_builtin_string_cmp): New function to handle calls to
18532         string compare functions.
18533         (strlen_optimize_stmt): Add handling to builtin string compare
18534         calls.
18535         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
18536         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
18537         * tree.c (build_common_builtin_nodes): Add new defines of
18538         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
18540 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
18542         PR target/85984
18543         * bb-reorder.c (pass_partition_blocks::gate): Return false for
18544         functions with naked attribute.
18546 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
18548         * config/i386/sse.md (avx_vec_concat<mode>):
18549         Substitute concat_tg_mode mode attribute with xtg_mode.
18550         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
18551         (concat_tg_mode): Remove mode attribute.
18553 2018-05-31  Martin Sebor  <msebor@redhat.com>
18555         PR c/82063
18556         * calls.c (alloc_max_size): Correct a logic error/typo.
18557         Treat excessive arguments as infinite.  Warn for invalid arguments.
18558         * doc/invoke.texi (-Walloc-size-larger-than): Update.
18560 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
18562         PR target/85829
18563         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
18564         and movx for Haswell.
18566 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
18567             Cesar Philippidis  <cesar@codesourcery.com>
18569         PR middle-end/85879
18570         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
18571         when emitting error on private/firstprivate reductions.
18572         * omp-low.c (lower_omp_target): Avoid reference-type processing
18573         on pointers for firstprivate clause.
18575 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
18577         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
18578         (st1x2): Likewise.
18579         (st1x3): Likewise.
18580         * config/aarch64/aarch64-simd.md
18581         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
18582         (aarch64_ld1_x3_<mode>): Likewise
18583         (aarch64_st1x2<VALLDIF:mode>): Likewise
18584         (aarch64_st1_x2_<mode>): Likewise
18585         (aarch64_st1x3<VALLDIF:mode>): Likewise
18586         (aarch64_st1_x3_<mode>): Likewise
18587         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
18588         (vld1_s8_x3): Likewise.
18589         (vld1_u16_x3): Likewise.
18590         (vld1_s16_x3): Likewise.
18591         (vld1_u32_x3): Likewise.
18592         (vld1_s32_x3): Likewise.
18593         (vld1_u64_x3): Likewise.
18594         (vld1_s64_x3): Likewise.
18595         (vld1_f16_x3): Likewise.
18596         (vld1_f32_x3): Likewise.
18597         (vld1_f64_x3): Likewise.
18598         (vld1_p8_x3): Likewise.
18599         (vld1_p16_x3): Likewise.
18600         (vld1_p64_x3): Likewise.
18601         (vld1q_u8_x3): Likewise.
18602         (vld1q_s8_x3): Likewise.
18603         (vld1q_u16_x3): Likewise.
18604         (vld1q_s16_x3): Likewise.
18605         (vld1q_u32_x3): Likewise.
18606         (vld1q_s32_x3): Likewise.
18607         (vld1q_u64_x3): Likewise.
18608         (vld1q_s64_x3): Likewise.
18609         (vld1q_f16_x3): Likewise.
18610         (vld1q_f32_x3): Likewise.
18611         (vld1q_f64_x3): Likewise.
18612         (vld1q_p8_x3): Likewise.
18613         (vld1q_p16_x3): Likewise.
18614         (vld1q_p64_x3): Likewise.
18615         (vst1_s64_x2): Likewise.
18616         (vst1_u64_x2): Likewise.
18617         (vst1_f64_x2): Likewise.
18618         (vst1_s8_x2): Likewise.
18619         (vst1_p8_x2): Likewise.
18620         (vst1_s16_x2): Likewise.
18621         (vst1_p16_x2): Likewise.
18622         (vst1_s32_x2): Likewise.
18623         (vst1_u8_x2): Likewise.
18624         (vst1_u16_x2): Likewise.
18625         (vst1_u32_x2): Likewise.
18626         (vst1_f16_x2): Likewise.
18627         (vst1_f32_x2): Likewise.
18628         (vst1_p64_x2): Likewise.
18629         (vst1q_s8_x2): Likewise.
18630         (vst1q_p8_x2): Likewise.
18631         (vst1q_s16_x2): Likewise.
18632         (vst1q_p16_x2): Likewise.
18633         (vst1q_s32_x2): Likewise.
18634         (vst1q_s64_x2): Likewise.
18635         (vst1q_u8_x2): Likewise.
18636         (vst1q_u16_x2): Likewise.
18637         (vst1q_u32_x2): Likewise.
18638         (vst1q_u64_x2): Likewise.
18639         (vst1q_f16_x2): Likewise.
18640         (vst1q_f32_x2): Likewise.
18641         (vst1q_f64_x2): Likewise.
18642         (vst1q_p64_x2): Likewise.
18643         (vst1_s64_x3): Likewise.
18644         (vst1_u64_x3): Likewise.
18645         (vst1_f64_x3): Likewise.
18646         (vst1_s8_x3): Likewise.
18647         (vst1_p8_x3): Likewise.
18648         (vst1_s16_x3): Likewise.
18649         (vst1_p16_x3): Likewise.
18650         (vst1_s32_x3): Likewise.
18651         (vst1_u8_x3): Likewise.
18652         (vst1_u16_x3): Likewise.
18653         (vst1_u32_x3): Likewise.
18654         (vst1_f16_x3): Likewise.
18655         (vst1_f32_x3): Likewise.
18656         (vst1_p64_x3): Likewise.
18657         (vst1q_s8_x3): Likewise.
18658         (vst1q_p8_x3): Likewise.
18659         (vst1q_s16_x3): Likewise.
18660         (vst1q_p16_x3): Likewise.
18661         (vst1q_s32_x3): Likewise.
18662         (vst1q_s64_x3): Likewise.
18663         (vst1q_u8_x3): Likewise.
18664         (vst1q_u16_x3): Likewise.
18665         (vst1q_u32_x3): Likewise.
18666         (vst1q_u64_x3): Likewise.
18667         (vst1q_f16_x3): Likewise.
18668         (vst1q_f32_x3): Likewise.
18669         (vst1q_f64_x3): Likewise.
18670         (vst1q_p64_x3): Likewise.
18672 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
18674         * config/msp430/msp430.c (msp430_output_labelref): Prepend
18675         user_label_prefix to name.
18677         * tree-core.h: Update comment about the format of NAME string
18678         passed to handler in attribute_spec.
18680         * config/msp430/msp430.md: Remove erroneous subreg expression from
18681         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
18682         zero_extend{q,h}isi2.
18684 2018-05-30  Borislav Petkov  <bp@suse.de>
18686         * doc/extend.texi: Document some architecture specific
18687         constraints and sort entries.
18689 2018-05-30  Martin Sebor  <msebor@redhat.com>
18691         PR middle-end/85369
18692         * builtins.c (expand_builtin_stpcpy_1): New function.
18693         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
18694         only if the former succeeds.
18696 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
18698         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
18699         in saphira.
18701 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
18703         * doc/invoke.texi (-flinker-output): Document
18705 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
18707         * passes.c (ipa_write_summaries): Only modify statements if body
18708         is in memory.
18709         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
18710         incrementally linking.
18711         (ipa_passes): Likewise.
18712         * lto-cgraph.c (lto_output_node): When incrementally linking do not
18713         pass down resolution info.
18714         * common.opt (flag_incremental_link): Update info.
18715         * gcc.c (plugin specs): Turn flinker-output=* to
18716         -plugin-opt=-linker-output-known
18717         * toplev.c (compile_file): Also cut compilation when doing incremental
18718         link.
18719         * flag-types. (enum lto_partition_model): Add
18720         LTO_LINKER_OUTPUT_NOLTOREL.
18721         (invoke.texi): Add -flinker-output docs.
18722         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
18723         link same way as WPA; do not stream in dead initializers.
18725         * dwarf2out.c (dwarf2out_die_ref_for_decl,
18726         darf2out_register_external_decl): Support incremental link.
18728 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
18730         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
18732 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
18734         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
18735         it down to simple_object_copy_lto_debug_sections.
18736         (run_gcc): Determine incremental LTO link time and configure
18737         lto1 into non-wpa mode, disable renaming of debug sections.
18739 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18741         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
18742         descriptions of various incorrectly documented functions.
18744 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
18746         Revert:
18747         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
18748         address check not strict.
18750 2018-05-30  Richard Biener  <rguenther@suse.de>
18752         PR tree-optimization/85964
18753         * tracer.c (better_p): Drop initialized count check, we only
18754         call the function with initialized counts now.
18755         (find_best_successor): Do find a best edge if one
18756         has uninitialized count.
18757         (find_best_predecessor): Likewise.  Do BB frequency check only
18758         if count is initialized.
18760 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
18762         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
18763         (aarch64_ldrstr_offset_compare): New.
18764         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
18765         load/store orderings.
18766         (aarch64_gen_adjusted_ldpstp): Likewise.
18768 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
18770         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
18771         Check for subset of GENERAL_REGS and FP_REGS.
18772         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
18773         r=w alternative.
18775 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
18777         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
18778         and wi::to_poly_offset.  Add the current offset and then check
18779         whether the sum fits, rather than using an unchecked addition of
18780         a checked term.  Check for a shwi rather than a uhwi.
18781         * expr.c (get_bit_range): Use tree_to_poly_uint64.
18782         (store_constructor): Use poly_int_tree_p.
18783         (expand_expr_real_1): Likewise.
18784         * function.c (assign_temp): Likewise.
18785         * fold-const.c (const_binop): Use poly_int_tree_p and
18786         wi::to_poly_offset.
18787         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
18788         division.
18789         * ipa-icf-gimple.c (func_checker::compare_operand): Use
18790         to_poly_offset for MEM offsets.
18791         * ipa-icf.c (sem_variable::equals): Likewise.
18792         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
18793         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
18794         wi::to_poly_offset for BIT_FIELD_REF offsets.
18795         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
18796         wi::to_poly_offset.
18797         * var-tracking.c (emit_note_insn_var_location): Use
18798         tree_to_poly_uint64.
18800 2018-05-29  Jim Wilson  <jimw@sifive.com>
18802         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
18804 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
18806         PR target/85950
18807         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
18808         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
18809         sequence.
18810         (sse4_1_round<mode>2): Use nonimmediate_operand
18811         for operand 1 predicate.
18813 2018-05-29  Martin Sebor  <msebor@redhat.com>
18814             Richard Biener  <rguenther@suse.de>
18816         PR testsuite/85888
18817         * calls.c (get_size_range): Call determine_value_range instead
18818         of get_value_range..
18819         * tree-vrp.h (determine_value_range): Declared new function.
18820         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
18822 2018-05-29  Richard Biener  <rguenther@suse.de>
18824         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
18825         sure to use non-pattern stmts for get_earlier_stmt arguments.
18826         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
18827         called on pattern stmts.
18828         (get_later_stmt): Likewise.
18830 2018-05-29  Martin Liska  <mliska@suse.cz>
18832         PR gcov-profile/85759
18833         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
18834         env variables.
18836 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
18838         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
18839         VEC_UNPACK_*_EXPR.
18840         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
18841         VEC_PACK_*_EXPR.
18843         PR target/85918
18844         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
18845         VEC_PACK_FLOAT_EXPR): New tree codes.
18846         * tree-pretty-print.c (op_code_prio): Handle
18847         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
18848         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
18849         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
18850         * tree-inline.c (estimate_operator_cost): Likewise.
18851         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
18852         * fold-const.c (const_binop): Likewise.
18853         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
18854         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
18855         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
18856         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
18857         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
18858         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
18859         * expr.c (expand_expr_real_2): Likewise.
18860         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
18861         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
18862         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
18863         optabs.
18864         * optabs.c (expand_widen_pattern_expr): For
18865         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
18866         sign from result type rather than operand's type.
18867         (expand_binop_directly): For vec_packu_float_optab and
18868         vec_packs_float_optab allow result type to be different from operand's
18869         type.
18870         * optabs-tree.c (optab_for_tree_code): Handle
18871         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
18872         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
18873         * tree-vect-generic.c (expand_vector_operations_1):  Handle
18874         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
18875         VEC_PACK_FLOAT_EXPR.
18876         * tree-vect-stmts.c (supportable_widening_operation): Handle
18877         FIX_TRUNC_EXPR.
18878         (supportable_narrowing_operation): Handle FLOAT_EXPR.
18879         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
18880         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
18881         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
18882         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
18883         mode attributes.
18884         (vec_pack<floatprefix>_float_<mode>): New expander.
18885         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
18886         attributes.
18887         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
18888         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
18889         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
18890         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
18891         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
18892         Document.
18893         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
18894         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
18895         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
18896         VEC_PACK_FLOAT_EXPR): Document.
18898 2018-05-29  Richard Biener  <rguenther@suse.de>
18900         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
18901         member.
18902         (stmt_vec_info_vec): Make pointer.
18903         (init_stmt_vec_info_vec): Remove.
18904         (free_stmt_vec_info_vec): Likewise.
18905         (set_stmt_vec_info_vec): New function.
18906         (free_stmt_vec_infos): Likewise.
18907         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
18908         (set_vinfo_for_stmt): Likewise.
18909         (get_earlier_stmt): Likewise.
18910         (get_later_stmt): Likewise.
18911         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
18912         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
18913         (vec_info::~vec_info): Free stmt_vec_infos.
18914         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
18915         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
18916         (pass_slp_vectorize::execute): Likewise.
18917         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
18918         (free_stmt_vec_info_vec): Likewise.
18919         (set_stmt_vec_info_vec): New function.
18920         (free_stmt_vec_infos): Likewise.
18921         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
18922         the global stmt_vec_info_vec.
18923         * tree-parloops.c (gather_scalar_reductions): Use
18924         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
18925         vector.
18927 2018-05-29  Richard Biener  <rguenther@suse.de>
18929         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
18931 2018-05-29  Martin Liska  <mliska@suse.cz>
18932             David Malcolm  <dmalcolm@redhat.com>
18934         * vec.c (test_reverse): New.
18935         (vec_c_tests): Add new test.
18936         * vec.h (vl_ptr>::reverse): New function.
18938 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
18940         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
18942         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
18943         and later.
18945 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
18947         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
18949 2018-05-28  Richard Biener  <rguenther@suse.de>
18951         PR tree-optimization/85933
18952         * tree-vect-data-refs.c (vect_record_base_alignments): Only
18953         look at stmts marked as vectorizable.
18955 2018-05-28  Richard Biener  <rguenther@suse.de>
18957         PR tree-optimization/85934
18958         * tree-vect-generic.c (expand_vector_operations_1): Hoist
18959         vector boolean check before scalar optimization.
18961 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
18963         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
18964         for armv5te.
18966 2018-05-28  Mark Wielaard  <mark@klomp.org>
18968         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
18969         if it is an expression containing a minus sign.
18971 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
18973         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
18975 2018-05-27  Paul Koning  <ni1d@arrl.net>
18977         * config/pdp11/pdp11.md (truncsihi2): Remove.
18979 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
18980             Chung-Ju Wu  <jasonwucj@gmail.com>
18982         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
18983         implementation.
18984         (unaligned_store_dw): Ditto.
18985         * config/nds32/nds32-memory-manipulation.c
18986         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
18987         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
18988         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
18989         (emit_setmem_word_loop): Rename to ...
18990         (emit_setmem_doubleword_loop): ... this.
18991         (nds32_gen_dup_4_byte_to_word_value): New function.
18992         (nds32_gen_dup_8_byte_to_double_word_value): New function.
18993         (nds32_expand_setmem_loop): Refine implementation.
18994         (nds32_expand_setmem_loop_v3m): Ditto.
18995         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
18996         pattern.
18998 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
19000         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
19002 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
19004         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
19005         (nds32_init_machine_status): Initialize machine->attr_naked_p and
19006         machine->attr_no_prologue_p.
19007         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
19008         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
19009         (nds32_expand_epilogue): Consider attr_naked_p.
19010         (nds32_expand_epilogue_v3pop): Likewise.
19011         (nds32_can_use_return_insn): Likewise.
19012         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
19013         attr_no_prologue_p fields.
19014         * config/nds32/nds32.opt (mret-in-naked-func): New option.
19016 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
19018         PR target/85918
19019         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
19020         attributes.
19021         * config/i386/sse.md
19022         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
19023         Rename to ...
19024         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
19025         ... this.
19026         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
19027         Rename to ...
19028         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
19029         ... this.
19030         (*<floatsuffix>floatv2div2sf2): Rename to ...
19031         (*float<floatunssuffix>v2div2sf2): ... this.
19032         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
19033         (float<floatunssuffix>v2div2sf2_mask): ... this.
19034         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
19035         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
19036         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
19037         to ...
19038         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
19039         ... this.
19040         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
19041         Rename to ...
19042         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
19043         ... this.
19044         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
19045         Rename to ...
19046         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
19047         ... this.
19048         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
19049         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
19050         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
19051         gen_ufix_truncv8dfv8si2.
19052         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
19053         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
19054         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
19055         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
19056         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
19057         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
19058         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
19059         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
19061 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
19063         PR target/85900
19064         PR target/85345
19065         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
19067 2018-05-25  Jim Wilson  <jimw@sifive.com>
19069         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
19070         * config/riscv/riscv.c (struct machine_function): Add
19071         interrupt_handler_p and attribute_checked_p fields.
19072         (riscv_attribute_table): Add interrupt.
19073         (riscv_interrupt_type_p): New.
19074         (riscv_save_reg_p): Save extra regs for interrupt handler.
19075         (riscv_use_save_libcall): Return false  for interrupt handler.
19076         (riscv_first_stack_step): Add forward declaration.
19077         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
19078         for interrupt handler with large frame.  Use it for saved reg list.
19079         (riscv_expand_prologue): Move flag_stack_usage_info support to
19080         eliminate duplication.
19081         (riscv_expand_epilogue): Generate mret for interrupt handler.
19082         (riscv_epilogue_uses): New.
19083         (riscv_can_use_return_insn): Return false for interrupt handler.
19084         (riscv_function_ok_for_sibcall): Likewise.
19085         (riscv_set_current_function): Add interrupt handler support.
19086         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
19087         * config/riscv/riscv.md (UNSPECV_MRET): New.
19088         (GP_REGNUM): New.
19089         (riscv_frflags, riscv_fsflags): Use tab after opcode.
19090         (riscv_mret): New.
19091         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
19093 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
19095         PR tree-optimization/85712
19096         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
19097         this candidate has already been replaced in-situ by a copy.
19099 2018-05-25  Jason Merrill  <jason@redhat.com>
19101         PR c++/80485 - inline function non-zero address.
19102         * symtab.c (nonzero_address): Check DECL_COMDAT.
19104 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
19106         PR target/83628
19107         * config/alpha/alpha.md (ashlsi3): New insn pattern.
19108         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
19109         extension of SImode operation.  Use const123_operand predicate.
19110         (*saddsi_1): Remove.
19111         (*saddl_se_1): Ditto.
19112         (*ssubsi_1): Ditto.
19113         (*ssubl_se_1): Ditto.
19114         * config/alpha/predicates.md (const123_operand): New predicate.
19115         * config/alpha/constraints.md (P): Use IN_RANGE.
19117 2018-05-25  Richard Biener  <rguenther@suse.de>
19119         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
19120         defaulted to true.
19121         (ref_maybe_used_by_stmt_p): Likewise.
19122         (stmt_may_clobber_ref_p): Likewise.
19123         (stmt_may_clobber_ref_p_1): Likewise.
19124         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
19125         and pass it along.
19126         (ref_maybe_used_by_stmt_p): Likewise.
19127         (stmt_may_clobber_ref_p): Likewise.
19128         (stmt_may_clobber_ref_p_1): Likewise.
19129         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
19130         the alias oracle to disambiguate DRs with stmts DR analysis
19131         couldn't handle.
19132         (vect_analyze_data_refs): Do not give up on not analyzable
19133         DRs for BB vectorization.  Remove code truncating the dataref
19134         vector.
19136 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
19138         PR target/85832
19139         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
19140         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
19141         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
19143 2018-05-25  Richard Biener  <rguenther@suse.de>
19145         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
19146         function, combining stmt data ref gathering and fatal analysis
19147         parts.
19148         (vect_analyze_data_refs): Remove now redudnant code and simplify.
19149         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
19150         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
19151         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
19152         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
19154 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
19156         PR tree-optimization/85720
19157         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
19158         SCC if all partitions are builtins.
19159         (version_loop_by_alias_check): New parameter.  Generate cancelable
19160         runtime alias check if all partitions are builtins.
19161         (distribute_loop): Update call to above function.
19163 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
19165         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
19166         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
19167         (parm_default_def_partition_arg): Ditto.
19168         (set_parm_default_def_partition): Ditto.
19169         (get_parm_default_def_partitions): Ditto and make it static.
19170         (get_undefined_value_partitions): Ditto and make it static.
19171         (remove_ssa_form): Refactor call to init_var_map here.
19172         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
19173         computation for loop region.
19174         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
19175         (register_default_def): Delete.
19176         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
19177         (parm_default_def_partition_arg): Ditto.
19178         (set_parm_default_def_partition): Ditto.
19179         (get_parm_default_def_partitions): Ditto and make it static.
19180         (get_undefined_value_partitions): Ditto and make it static.
19181         (coalesce_with_default, coalesce_with_default): Update comment.
19182         (create_coalesce_list_for_region): New func factored out from
19183         create_outofssa_var_map.
19184         (populate_coalesce_list_for_outofssa): New func factored out from
19185         create_outofssa_var_map and coalesce_ssa_name.
19186         (create_outofssa_var_map): Delete.
19187         (coalesce_ssa_name): Refactor to support live range computation.
19188         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
19189         (get_parm_default_def_partitions): Delete.
19190         (get_undefined_value_partitions): Ditto.
19191         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
19192         computation for loop region.
19193         (new_tree_live_info, loe_visit_block): Ditto.
19194         (live_worklist, set_var_live_on_entry): Ditto.
19195         (calculate_live_on_exit, verify_live_on_entry): Ditto.
19196         * tree-ssa-live.h (struct _var_map): New fields.
19197         (init_var_map): Change decl.
19198         (region_contains_p): New.
19200 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
19202         * tree-ssa-live.h (live_merge_and_clear): Delete.
19204 2018-05-25  Richard Biener  <rguenther@suse.de>
19206         PR c++/85912
19207         * tree-dump.c (dequeue_and_dump): Remove access to removed
19208         operand 2 of a SWITCH_EXPR.
19210 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
19212         * doc/sourcebuild.texi (vect_double_cond_arith): Include
19213         multiplication and division.
19214         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
19215         (cond_udiv@var{m}, cond_umod@var{m}): Document.
19216         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
19217         (cond_udiv_optab, cond_umod_optab): New optabs.
19218         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
19219         (IFN_COND_RDIV): New internal functions.
19220         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
19221         TRUNC_MOD_EXPR and RDIV_EXPR.
19222         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
19223         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
19224         New unspecs.
19225         (SVE_INT_BINARY): Include mult.
19226         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
19227         (optab, sve_int_op): Handle mult.
19228         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
19229         UNSPEC_COND_DIV.
19230         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
19231         for SVE_INT_BINARY_SD.
19233 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
19235         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
19236         (optab, sve_int_op): Handle div and udiv.
19237         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
19238         for SVE_INT_BINARY_SD.
19239         (*<optab><mode>3): New insn for the same.
19241 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
19243         * tree-vect-patterns.c: Include predict.h.
19244         (vect_recog_divmod_pattern): Restrict check for division support
19245         to when optimizing for size.
19247 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
19249         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
19250         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
19251         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
19252         (gimple_match_op::set_op): Likewise.
19253         (gimple_resimplify4): Declare.
19254         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
19255         (expr::gen_transform): Likewise.
19256         (decision_tree::gen): Generate a simplification routine for 4 operands.
19257         * gimple-match-head.c (gimple_simplify): Add an overload for
19258         4 operands.  In the top-level function, handle up to 4 call
19259         arguments and call gimple_resimplify4.
19260         (gimple_resimplify4): New function.
19261         (build_call_internal): Pass a fourth operand.
19262         (maybe_push_to_seq): Likewise.
19263         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
19264         Fold VEC_COND_EXPRs of an operation and a default value into
19265         an IFN_COND_* function if possible.
19266         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
19267         New unspecs.
19268         (SVE_COND_FP_BINARY): Include them.
19269         (optab, sve_fp_op): Handle them.
19270         (SVE_INT_BINARY_REV): New code iterator.
19271         (SVE_COND_FP_BINARY_REV): New int iterator.
19272         (commutative): New int attribute.
19273         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
19274         Declare.
19275         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
19276         function.
19277         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
19278         (*cond_<optab><mode>): New patterns for reversed operands.
19280 2018-05-25  Richard Biener  <rguenther@suse.de>
19282         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
19283         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
19284         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
19285         (STMT_VINFO_GROUPED_ACCESS): Adjust.
19286         * tree-vect-data-refs.c (everywhere): Adjust users.
19287         * tree-vect-loop.c (everywhere): Likewise.
19288         * tree-vect-slp.c (everywhere): Likewise.
19289         * tree-vect-stmts.c (everywhere): Likewise.
19290         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
19292 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
19294         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
19295         Rename to...
19296         (gcc_cv_as_section_exclude): ... this.
19297         Try Solaris as #exclude syntax.
19298         * configure: Regenerate.
19299         * config.in: Regenerate.
19300         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
19301         SECTION_EXCLUDE.
19302         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
19303         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
19305         * varasm.c (default_elf_asm_named_section): Don't check if
19306         HAVE_GAS_SECTION_EXCLUDE is defined.
19308 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
19310         * doc/md.texi: Update the documentation of the cond_* optabs
19311         to mention the new final operand.  Fix GET_MODE_NUNITS call.
19312         Describe the scalar case too.
19313         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
19314         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
19315         instead of 2.
19316         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
19317         (get_conditional_internal_fn): Update comment.
19318         * tree-vect-loop.c (vectorizable_reduction): Pass the original
19319         accumulator value as a final argument to conditional functions.
19320         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
19321         a define_expand and add an "else" operand.  Assert for now that
19322         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
19323         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
19324         (*cond_<optab><mode>): New patterns.
19325         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
19326         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
19327         (UNSPEC_COND_EOR): Delete.
19328         (optab): Remove associated mappings.
19329         (SVE_INT_BINARY): New code iterator.
19330         (sve_int_op): Remove int attribute and add "minus" to the code
19331         attribute.
19332         (SVE_COND_INT_OP): Delete.
19333         (SVE_COND_FP_OP): Rename to...
19334         (SVE_COND_FP_BINARY): ...this.
19336 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
19338         * optabs.c (can_reuse_operands_p): New function.
19339         (maybe_legitimize_operands): Try to reuse the results for
19340         earlier operands.
19342 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
19344         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
19345         Add {q} suffix to insn mnemonic.
19347 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
19349         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
19350         (msp430_warn_func_return): New.
19352 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
19354         * fold-const.c (tree_nonzero_bits): New function.
19355         * fold-const.h (tree_nonzero_bits): Likewise.
19356         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
19357         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
19359 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
19361         PR target/85900
19362         PR target/85345
19363         * varasm.c (assemble_alias): Check ifunc_resolver only on
19364         FUNCTION_DECL.
19366 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
19368         PR target/85903
19369         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
19370         when memory input operand is handled.
19372 2018-05-24  Luis Machado  <luis.machado@linaro.org>
19374         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
19375         global.
19376         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
19378 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
19380         * match.pd: Delay FMA folds until after vectorization.
19382 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
19384         PR target/83009
19385         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
19386         address check not strict.
19388 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
19390         * gimple-match.h (gimple_match_op): New class.
19391         (mprts_hook): Replace parameters with a gimple_match_op *.
19392         (maybe_build_generic_op): Likewise.
19393         (gimple_simplified_result_is_gimple_val): Replace parameters with
19394         a const gimple_match_op *.
19395         (gimple_simplify): Replace code_helper * and tree * parameters with
19396         a gimple_match_op * parameter.
19397         (gimple_resimplify1): Replace code_helper *, tree and tree *
19398         parameters with a gimple_match_op * parameter.
19399         (gimple_resimplify2): Likewise.
19400         (gimple_resimplify3): Likewise.
19401         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
19402         parameters with a gimple_match_op * parameter.
19403         * gimple-match-head.c (gimple_simplify): Change prototypes of
19404         auto-generated functions to take a gimple_match_op * instead of
19405         separate code_helper * and tree * parameters.  Make the same
19406         change in the top-level overload and update calls to the
19407         gimple_resimplify routines.  Update calls to the auto-generated
19408         functions and to maybe_push_res_to_seq in the publicly-facing
19409         operation-specific gimple_simplify overloads.
19410         (gimple_match_op::MAX_NUM_OPS): Define.
19411         (gimple_resimplify1): Replace rcode and ops with a single res_op
19412         parameter.  Update call to gimple_simplify.
19413         (gimple_resimplify2): Likewise.
19414         (gimple_resimplify3): Likewise.
19415         (mprts_hook): Replace parameters with a gimple_match_op *.
19416         (maybe_build_generic_op): Likewise.
19417         (build_call_internal): Replace type, nargs and ops with
19418         a gimple_match_op *.
19419         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
19420         with a single gimple_match_op *.  Update calls to mprts_hook,
19421         build_call_internal and gimple_simplified_result_is_gimple_val.
19422         Factor out code that is common to the tree_code and combined_fn cases.
19423         * genmatch.c (expr::gen_transform): Replace tem_code and
19424         tem_ops with a gimple_match_op called tem_op.  Update calls
19425         to the gimple_resimplify functions and maybe_push_res_to_seq.
19426         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
19427         res_ops.  Update call to the gimple_resimplify functions.
19428         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
19429         (decision_tree::gen): Make the functions take a gimple_match_op *
19430         called res_op instead of separate res_code and res_ops parameters.
19431         Update call accordingly.
19432         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
19433         and ops with a single res_op parameter.  Update calls to
19434         maybe_build_generic_op and maybe_push_res_to_seq.
19435         (fold_stmt_1): Update calls to gimple_simplify and
19436         replace_stmt_with_simplification.
19437         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
19438         and gimple_simplified_result_is_gimple_val.
19439         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
19440         gimple_simplify.
19441         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
19442         with a gimple_match_op *.
19443         (vn_nary_build_or_lookup): Likewise.  Update call to
19444         vn_nary_build_or_lookup_1.
19445         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
19446         gimple_match_op *.  Update calls to the gimple_resimplify routines
19447         and to gimple_simplified_result_is_gimple_val.
19448         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
19449         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
19450         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
19451         (visit_nary_op): Likewise.
19452         (visit_reference_op_load): Likewise.
19454 2018-05-23  Luis Machado  <luis.machado@linaro.org>
19456         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
19457         modifier for printing the step amount.
19459 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
19461         PR target/78849
19462         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
19463         types.
19465 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
19467         * doc/sourcebuild.texi (Endianness): New subsubsection.
19469 2018-05-23  Luis Machado  <luis.machado@linaro.org>
19471         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19472         <prefetch_dynamic_strides>: New const bool field.
19473         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19474         prefetch_dynamic_strides.
19475         (exynosm1_prefetch_tune): Likewise.
19476         (thunderxt88_prefetch_tune): Likewise.
19477         (thunderx_prefetch_tune): Likewise.
19478         (thunderx2t99_prefetch_tune): Likewise.
19479         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
19480         false.
19481         (aarch64_override_options_internal): Update to set
19482         PARAM_PREFETCH_DYNAMIC_STRIDES.
19483         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19484         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19485         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19486         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19487         prefetch-dynamic-strides setting.
19489 2018-05-23  Luis Machado  <luis.machado@linaro.org>
19491         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19492         <minimum_stride>: New const int field.
19493         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19494         minimum_stride field defaulting to -1.
19495         (exynosm1_prefetch_tune): Likewise.
19496         (thunderxt88_prefetch_tune): Likewise.
19497         (thunderx_prefetch_tune): Likewise.
19498         (thunderx2t99_prefetch_tune): Likewise.
19499         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
19500         <default_opt_level>: Set to 3.
19501         (aarch64_override_options_internal): Update to set
19502         PARAM_PREFETCH_MINIMUM_STRIDE.
19503         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19504         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19505         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19506         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19507         stride is constant and is below the minimum stride threshold.
19509 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19511         * config/arm/arm-cpus.in (mode26): Delete.
19512         (armv4): Delete mode26 reference.
19513         * config/arm/arm.c (arm_configure_build_target): Delete use of
19514         isa_bit_mode26.
19516 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
19518         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
19519         New insn pattern.
19520         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
19521         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
19522         for non-SSE modes.
19523         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
19524         (floatunsdidf2): Ditto.
19526 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
19528         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
19529         (fixuns_trunc<mode>si2_avx512f): Ditto.
19530         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
19531         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
19532         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
19534 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
19536         PR rtl-optimization/79985
19537         * df-scan.c (df_insn_refs_collect): Remove special case for
19538         global registers and asm statements.
19540 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
19542         * extend.texi (Global Register Variables): Rewrite the bullet list.
19543         Note that the register is available for allocation. Note that access
19544         via inline asm must use constraints. Add note about async-signal
19545         handlers. Remove paragraph about automagic register selection.
19547 2018-05-23  Richard Biener  <rguenther@suse.de>
19549         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
19550         of fixed offset from memset VN.
19552 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
19554         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
19555         first_interp field.
19556         (alloc_cand_and_find_basis): Initialize first_interp field.
19557         (slsr_process_mul): Modify first_interp field.
19558         (slsr_process_add): Likewise.
19559         (slsr_process_cast): Modify first_interp field for each new
19560         interpretation.
19561         (slsr_process_copy): Likewise.
19562         (dump_candidate): Dump first_interp field.
19563         (replace_mult_candidate): Process all interpretations, not just
19564         subsequent ones.
19565         (replace_rhs_if_not_dup): Likewise.
19566         (replace_one_candidate): Likewise.
19568 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
19570         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
19571         Add new boolean.
19572         (aarch64_needs_frame_chain): New function.
19573         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
19575 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
19577         PR target/84882
19578         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
19579         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
19580         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
19581         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
19582         as true for strict-align.
19583         (aarch64_can_inline_p): Perform checks even when callee has no
19584         attributes to check for strict alignment.
19585         * doc/extend.texi (AArch64 Function Attributes): Document
19586         no-strict-align.
19587         * doc/invoke.texi: (AArch64 Options): Likewise.
19589 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
19591         PR tree-optimization/85853
19592         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
19593         the handling of the root of the node to...
19594         (vect_slp_analyze_node_operations_1): ...this new function,
19595         and run the whole thing with the child nodes' def types
19596         set according to their SLP node's def type.
19598 2018-05-23  Richard Biener  <rguenther@suse.de>
19600         PR middle-end/85874
19601         * tree-data-ref.c (create_runtime_alias_checks): Defer
19602         and ignore overflow warnings.
19604 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
19606         PR tree-optimization/85822
19607         * tree-vrp.c (is_masked_range_test): Fix handling of negative
19608         constants.
19610 2018-05-23  Richard Biener  <rguenther@suse.de>
19612         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
19613         memset constants via native_interpret_expr.
19615 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
19617         PR target/85345
19618         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
19619         attribute.
19620         (cgraph_node::create_alias): Likewise.
19621         (cgraph_node::get_availability): Check ifunc_resolver instead
19622         of looking up ifunc attribute.
19623         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
19624         * varasm.c (do_assemble_alias): Likewise.
19625         (assemble_alias): Likewise.
19626         (default_binds_local_p_3): Likewise.
19627         * cgraph.h (cgraph_node): Add ifunc_resolver.
19628         (cgraph_node::only_called_directly_or_aliased_p): Return false
19629         for IFUNC resolver.
19630         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
19631         attribute.
19632         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
19633         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
19634         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
19635         instead of looking up ifunc attribute.
19637 2018-05-22  Luis Machado  <luis.machado@linaro.org>
19639         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
19641 2018-05-22  Martin Sebor  <msebor@redhat.com>
19643         PR middle-end/85359
19644         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
19645         only when expasion succeeds.
19646         (expand_builtin_strcmp): Same.
19647         (expand_builtin_strncmp): Same.
19649 2018-05-22  Martin Sebor  <msebor@redhat.com>
19651         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
19653 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
19654             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19656         * config/aarch64/aarch64-ldpstp.md: Replace uses of
19657         aarch64_mem_pair_operand with memory_operand and delete operand swapping
19658         code.
19659         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
19660         Add check for legitimate_address.
19661         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
19662         (aarch64_swap_ldrstr_operands): New.
19663         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
19664         Define prototype.
19666 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
19667             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19669         * config/aarch64/aarch64.md: New patterns to generate stp
19670         and ldp.
19671         (store_pair_sw, store_pair_dw): New patterns to generate stp for
19672         single words and double words.
19673         (load_pair_sw, load_pair_dw): Likewise.
19674         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
19675         Delete.
19676         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
19677         Delete.
19678         * config/aarch64/aarch64-ldpstp.md: Modify peephole
19679         for different mode ldpstp and add peephole for merged zero stores.
19680         Likewise for loads.
19681         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
19682         Add size check.
19683         (aarch64_gen_store_pair): Rename calls to match new patterns.
19684         (aarch64_gen_load_pair): Rename calls to match new patterns.
19685         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
19686         (load_pair<DREG:mode><DREG2:mode>): ... This.
19687         (store_pair<mode>): Rename to...
19688         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
19689         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
19690         New mode iterators.
19691         (V_INT_EQUIV): Handle SImode.
19692         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
19693         New predicate.
19695 2018-05-22  Martin Sebor  <msebor@redhat.com>
19697         PR c/85623
19698         * calls.c (maybe_warn_nonstring_arg): Use string length to set
19699         or ajust the presumed bound on an operation to avoid unnecessary
19700         warnings.
19702 2018-05-22  Martin Sebor  <msebor@redhat.com>
19704         PR tree-optimization/85826
19705         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
19706         assuming that a DECL necesarily has a constant size.
19708 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
19710         PR middle-end/85862
19711         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
19713 2018-05-22  Richard Biener  <rguenther@suse.de>
19715         PR tree-optimization/85834
19716         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
19717         non-constant and non-zero memset arguments.
19719 2018-05-22  Martin Liska  <mliska@suse.cz>
19721         PR ipa/85607
19722         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
19724 2018-05-22  Richard Biener  <rguenther@suse.de>
19726         PR tree-optimization/85863
19727         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
19728         comparisons when vectype is specified.
19729         (vectorizable_condition): Do not specify vectype for
19730         vect_is_simple_cond when SLP vectorizing.
19732 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
19734         PR target/85657
19735         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
19736         define __ibm128 as long double.
19737         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
19738         as a distinct type when IEEE 128-bit support is enabled.
19739         (init_float128_ieee): Fix up conversions between IFmode and IEEE
19740         128-bit types to use the correct functions.
19741         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
19742         convert between 128-bit floating point types that have different
19743         modes but the same representation, instead of using gen_lowpart to
19744         makean alias.
19745         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
19746         KFmode.
19747         (IFKF_reg): New attributes to give the register constraints for
19748         IFmode and KFmode.
19749         (extend<mode>tf2_internal): New insns to mark an explicit
19750         conversion between 128-bit floating point types that have a
19751         different mode but share the same representation.
19753 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
19755         PR tree-optimization/85814
19756         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
19757         a null return from get_strinfo when unsharing the next
19758         strinfo in the chain.
19760 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
19762         PR gcc/84923
19763         * varasm.c (weak_finish): Clean up weak_decls.
19765 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19767         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
19768         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
19769         UNSPEC_UADALP values.
19770         * config/aarch64/iterators.md (ABAL): New int iterator.
19771         (ABDL2): Likewise.
19772         (ADALP): Likewise.
19773         (sur): Add mappings for the above.
19774         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
19775         New define_insn.
19776         (aarch64_<sur>abal<mode>_4): Likewise.
19777         (aarch64_<sur>adalp<mode>_3): Likewise.
19778         (<sur>sadv16qi): New define_expand.
19780 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
19782         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
19783         (*movdf_internal): Ditto.
19784         (*rcpsf2_sse): Ditto.
19785         (*rsqrtsf2_sse): Ditto.
19786         (*sqrt<mode>2_sse): Ditto.
19788 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
19790         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
19791         eor3q<mode>4.
19792         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
19793         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
19794         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
19795         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
19796         vbcaxq_s64): New.
19797         * config/aarch64/arm_neon.h: Likewise.
19798         * config/aarch64/iterators.md (VQ_I): New.
19800 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
19802         * config.gcc: Add arc/t-multilib-linux to tmake_file for
19803         arc*-*-linux*.
19804         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
19805         MULTILIB_DIRNAMES
19807 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
19809         * config/nds32/constraints.md (S): New constraint.
19810         * config/nds32/nds32.md (call_internal): Use constraint S.
19811         (call_value_internal): Likewise.
19812         (sibcall_internal): Likewise.
19813         (sibcall_value_internal): Likewise.
19815 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
19816             Chung-Ju Wu  <jasonwucj@gmail.com>
19818         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
19819         into consideration.
19821 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
19822             Chung-Ju Wu  <jasonwucj@gmail.com>
19824         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
19825         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
19826         (nds32_rtx_costs_impl): Simplify.
19827         (nds32_address_cost_impl): Simplify.
19828         (nds32_init_rtx_costs): New function.
19829         (nds32_rtx_costs_speed_prefer): Likewise.
19830         (nds32_rtx_costs_size_prefer): Likewise.
19831         (nds32_address_cost_speed_prefer): Likewise.
19832         (nds32_address_cost_speed_fwprop): Likewise.
19833         (nds32_address_cost_size_prefer): Likewise.
19834         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
19835         * config/nds32/nds32.c (nds32_option_override): Use
19836         nds32_init_rtx_costs function.
19838 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
19840         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
19841         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
19842         (TARGET_PIPELINE_N8): Likewise.
19843         (TARGET_PIPELINE_N10): Likewise.
19844         (TARGET_PIPELINE_N13): Likewise.
19845         (TARGET_PIPELINE_GRAYWOLF): Likewise.
19847 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
19849         * config/nds32/nds32-fpu.md: Update copyright year.
19851 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
19853         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
19855 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
19857         * config/nds32/nds32.c
19858         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
19859         * config/nds32/nds32.opt (minline-asm-r15): New option.
19861 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
19863         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
19864         MASK_HW_ABS.
19865         * config/nds32/nds32.md (abssi2): New pattern.
19867 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
19869         * config/i386/i386.md (rex64namesuffix): New mode attribute.
19870         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
19871         Merge insn pattern from sse_cvtsi2ss<round_name> and
19872         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
19873         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
19874         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
19875         using SWI48 mode iterator.
19876         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
19877         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
19878         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
19879         pattern from sse_cvttss2si<round_saeonly_name>
19880         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
19881         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
19882         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
19883         using SWI48 mode iterator.
19884         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
19885         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
19886         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
19887         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
19888         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
19889         using SWI48 mode iterator.
19890         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
19891         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
19892         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
19893         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
19894         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
19895         SWI48 mode iterator.
19896         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
19897         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
19898         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
19899         pattern from sse_cvttsd2si<round_saeonly_name>
19900         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
19902 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
19904         * config/nds32/nds32-md-auxiliary.c
19905         (nds32_valid_smw_lwm_base_p): Refine.
19906         (nds32_output_smw_single_word): Refine.
19907         (nds32_output_smw_double_word): New.
19908         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
19910 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
19912         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
19913         (nds32_output_stack_pop): Refine.
19914         (nds32_expand_unaligned_load): Refine.
19915         (nds32_expand_unaligned_store): Refine.
19917 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
19918             Chung-Ju Wu  <jasonwucj@gmail.com>
19920         * config/nds32/constants.md: Add TP_REGNUM constant.
19921         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
19922         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
19923         UNSPEC_ADD32.
19924         * config/nds32/nds32-doubleword.md: Consider flag_pic.
19925         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
19926         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
19927         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
19928         and PIC code generation.
19929         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
19930         code generation.
19931         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
19932         optimization.
19933         * config/nds32/nds32.md: Support TLS and PIC.
19934         * config/nds32/nds32.c: Support TLS and PIC.
19935         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
19936         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
19937         predicate.
19939 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
19941         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
19942         mode with E_ prefix.
19944 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
19945             Chung-Ju Wu  <jasonwucj@gmail.com>
19947         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
19948         * config/nds32/nds32-md-auxiliary.c
19949         (symbolic_reference_mentioned_p): New.
19950         (nds32_legitimize_ict_address): New.
19951         (nds32_expand_ict_move): New.
19952         (nds32_indirect_call_referenced_p): New.
19953         (nds32_symbol_binds_local_p): Delete.
19954         (nds32_long_call_p): Modify.
19955         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
19956         * config/nds32/nds32-protos.h
19957         (symbolic_reference_mentioned_p): Declare.
19958         (nds32_legitimize_ict_address): Declare.
19959         (nds32_expand_ict_move): Declare.
19960         (nds32_indirect_call_referenced_p): Declare.
19961         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
19962         (nds32_relax_group): Use nds32_ict_const_p as condition.
19963         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
19964         (nds32_asm_file_start): Output ict_model directive in asm code.
19965         (nds32_legitimate_address_p): Consider indirect call.
19966         (nds32_print_operand): Consider indirect call.
19967         (nds32_print_operand_address): Consider indirect call.
19968         (nds32_insert_attributes): Handle "indirect_call" attribute.
19969         (TARGET_LEGITIMATE_ADDRESS_P): Define.
19970         (TARGET_LEGITIMATE_CONSTANT_P): Define.
19971         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
19972         (TARGET_DELEGITIMIZE_ADDRESS): Define.
19973         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
19974         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
19975         (TARGET_ICT_MODEL_SMALL): Define.
19976         (TARGET_ICT_MODEL_LARGE): Define.
19977         * config/nds32/nds32.md (movsi): Consider ict model.
19978         (call, call_value): Consider ict model.
19979         (sibcall, sibcall_value): Consider ict model.
19980         * config/nds32/nds32.opt (mict-model): New option.
19981         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
19982         model.
19984 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
19985             Monk Chiang  <sh.chiang04@gmail.com>
19986             Jim Wilson <jimw@sifive.com>
19988         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
19989         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
19990         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
19991         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
19992         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
19993         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
19994         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
19995         compute save_libcall_adjustment properly.
19996         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
19997         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
19998         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
19999         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
20000         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
20001         (ABI_SPEC): Handle mabi=ilp32e.
20002         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
20003         (RVE): Add RVE mask.
20004         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
20005         <-march>: Add rv32e as an example.
20007 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
20009         PR c++/82899
20010         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
20011         (intra_create_variable_infos): Handle C++ constructors.
20013 2018-05-18  Martin Liska  <mliska@suse.cz>
20015         * passes.def: Remove a redundant pass.
20017 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
20019         PR bootstrap/85838
20020         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
20022 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20024         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
20025         (ARMv4): Update.
20026         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
20027         (ARMv6m): Update.
20028         (armv2, armv2a, armv3, armv3m): Delete architectures.
20029         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
20030         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
20031         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
20032         Delete cpus.
20033         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
20034         (*mulsidi3adddi): Likewise.
20035         (mulsidi3): Likewise.
20036         (*mulsidi3_nov6): Likewise.
20037         (umulsidi3): Likewise.
20038         (umulsidi3_nov6): Likewise.
20039         (umaddsidi4): Likewise.
20040         (*umulsidi3adddi): Likewise.
20041         (smulsi3_highpart): Likewise.
20042         (*smulsi3_highpart_nov6): Likewise.
20043         (umulsi3_highpart): Likewise.
20044         (*umulsi3_highpart_nov6): Likewise.
20045         * config/arm/arm.h (arm_arch3m): Delete.
20046         * config/arm/arm.c (arm_arch3m): Delete.
20047         (arm_option_override_internal): Update armv3-related comment.
20048         (arm_configure_build_target): Delete use of isa_bit_mode32.
20049         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
20050         (arm_rtx_costs_internal): Delete check of arm_arch3m.
20051         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
20052         (mulsa3): Likewise.
20053         (mulusa3): Likewise.
20054         * config/arm/arm-protos.h (arm_arch3m): Delete.
20055         * config/arm/arm-tables.opt: Regenerate.
20056         * config/arm/arm-tune.md: Likewise.
20057         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
20058         deleted architectures.
20060 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20062         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
20063         (armv5t, armv5te): New features.
20064         (ARMv5, ARMv5e): Delete fgroups.
20065         (ARMv5t, ARMv5te): Adjust for above changes.
20066         (ARMv6m): Likewise.
20067         (armv5, armv5e): Delete arches.
20068         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
20069         arm_arch5.
20070         (*call_reg_arm): Likewise.
20071         (*call_value_reg_armv5): Likewise.
20072         (*call_value_reg_arm): Likewise.
20073         (*call_symbol): Likewise.
20074         (*call_value_symbol): Likewise.
20075         (*sibcall_insn): Likewise.
20076         (*sibcall_value_insn): Likewise.
20077         (clzsi2): Likewise.
20078         (prefetch): Likewise.
20079         (define_split and define_peephole2 dependent on arm_arch5):
20080         Likewise.
20081         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
20082         arm_arch5e.
20083         (TARGET_ARM_QBIT): Likewise.
20084         (TARGET_DSP_MULTIPLY): Likewise.
20085         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
20086         (arm_arch5, arm_arch5e): Delete.
20087         (arm_arch5t, arm_arch5te): Declare.
20088         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
20089         (arm_arch5t): Declare.
20090         (arm_option_reconfigure_globals): Update for the above.
20091         (arm_options_perform_arch_sanity_checks): Update comment, replace
20092         use of arm_arch5 with arm_arch5t.
20093         (use_return_insn): Likewise.
20094         (arm_emit_call_insn): Likewise.
20095         (output_return_instruction): Likewise.
20096         (arm_final_prescan_insn): Likewise.
20097         (arm_coproc_builtin_available): Likewise.
20098         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
20099         arm_arch5e with arm_arch5t and arm_arch5te.
20100         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
20101         (arm_arch5t, arm_arch5te): Declare.
20102         * config/arm/arm-tables.opt: Regenerate.
20103         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
20104         * config/arm/t-multilib: Likewise.
20105         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
20106         instead of arm_arch5.
20107         (*call_reg_thumb1): Likewise.
20108         (*call_value_reg_thumb1_v5): Likewise.
20109         (*call_value_reg_thumb1): Likewise.
20110         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
20111         unreachable path.
20112         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
20114 2018-05-18  Martin Liska  <mliska@suse.cz>
20116         PR gcov-profile/84846
20117         * doc/gcov.texi: Document -t option of gcov tool.
20119 2018-05-18  Martin Liska  <mliska@suse.cz>
20121         PR gcov-profile/84846
20122         * gcov.c (print_usage): Add new -t option.
20123         (process_args): Handle the option.
20124         (generate_results): Use stdout as output when requested by
20125         the option.
20127 2018-05-18  Martin Liska  <mliska@suse.cz>
20129         PR gcov-profile/84846
20130         * coverage.c (coverage_init): Write PWD to .gcno file.
20131         * doc/gcov.texi: Document how working directory is printed.
20132         * gcov-dump.c (dump_gcov_file): Print PWD.
20133         * gcov.c (output_intermediate_file): Likewise.
20134         (read_graph_file): Read PWD string.
20135         (output_lines): Print PWD.
20137 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20139         PR middle-end/85817
20140         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
20141         for retval and return false if all args to phi are zero.
20143 2018-05-18  Richard Biener  <rguenther@suse.de>
20145         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
20146         method.
20147         (evrp_dom_walker::before_dom_children): Call it.
20149 2018-05-18  Richard Biener  <rguenther@suse.de>
20151         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
20152         results when processing array refs with variable index.
20154 2018-05-18  Toon Moene  <toon@moene.org>
20156         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
20157         directly after that of -floop-interchange. Indicate that both
20158         options are enabled by default when specifying -O3.
20160 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20162         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
20163         iterator.  Delete separate integer-mode vec_set<mode> expander.
20164         (aarch64_simd_vec_setv2di): Delete.
20165         (vec_setv2di): Delete.
20166         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
20167         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
20168         the "w, r" alternative.
20170 2018-05-18  Martin Liska  <mliska@suse.cz>
20172         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
20173         * tree-pass.h (make_pass_lower_switch_O0): New function.
20174         * tree-switch-conversion.c (node_has_low_bound): Remove.
20175         (node_has_high_bound): Likewise.
20176         (node_is_bounded): Likewise.
20177         (class pass_lower_switch): Make it a template type and create
20178         two instances.
20179         (pass_lower_switch::execute): Add template argument.
20180         (make_pass_lower_switch): New function.
20181         (make_pass_lower_switch_O0): New function.
20182         (do_jump_if_equal): Remove.
20183         (emit_case_nodes): Simplify to just handle all 3 cases and leave
20184         all the hard work to tree optimization passes.
20186 2018-05-18  Martin Liska  <mliska@suse.cz>
20188         * dbgcnt.c (limit_low): Renamed from limit.
20189         (limit_high): New variable.
20190         (dbg_cnt_is_enabled): Check for upper limit.
20191         (dbg_cnt): Adjust dumping.
20192         (dbg_cnt_set_limit_by_index): Add new argument for high
20193         value.
20194         (dbg_cnt_set_limit_by_name): Likewise.
20195         (dbg_cnt_process_single_pair): Parse new format.
20196         (dbg_cnt_process_opt): Use strtok.
20197         (dbg_cnt_list_all_counters): Remove 'value' and add
20198         'limit_high'.
20199         * doc/invoke.texi: Document changes.
20201 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
20203         * doc/sourcebuild.texi (scalar_all_fma): Document.
20204         * tree.def (FMA_EXPR): Delete.
20205         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
20206         * internal-fn.c (ternary_direct): New macro.
20207         (expand_ternary_optab_fn): Likewise.
20208         (direct_ternary_optab_supported_p): Likewise.
20209         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
20210         * builtins.c (fold_builtin_fma): Delete.
20211         (fold_builtin_3): Don't call it.
20212         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
20213         * expr.c (expand_expr_real_2): Likewise.
20214         * fold-const.c (operand_equal_p): Likewise.
20215         (fold_ternary_loc): Likewise.
20216         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
20217         * gimple.c (DEFTREECODE): Likewise.
20218         * gimplify.c (gimplify_expr): Likewise.
20219         * optabs-tree.c (optab_for_tree_code): Likewise.
20220         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
20221         * tree-eh.c (operation_could_trap_p): Likewise.
20222         (stmt_could_throw_1_p): Likewise.
20223         * tree-inline.c (estimate_operator_cost): Likewise.
20224         * tree-pretty-print.c (dump_generic_node): Likewise.
20225         (op_code_prio): Likewise.
20226         * tree-ssa-loop-im.c (stmt_cost): Likewise.
20227         * tree-ssa-operands.c (get_expr_operands): Likewise.
20228         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
20229         * fold-const-call.h (fold_fma): Delete.
20230         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
20231         CFN_FNMA and CFN_FNMS.
20232         (fold_fma): Delete.
20233         * genmatch.c (combined_fn): New enum.
20234         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
20235         (commutative_op): New function.
20236         (commutate): Use it.  Handle more than 2 operands.
20237         (dt_operand::gen_gimple_expr): Use commutative_op.
20238         (parser::parse_expr): Allow :c to be used with non-binary
20239         operators if the commutative operand is known.
20240         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
20241         CFN_FMS, CFN_FNMA and CFN_FNMS.
20242         (backprop::process_assign_use): Remove FMA_EXPR handling.
20243         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
20244         (gen_hsa_fma): New function.
20245         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
20246         IFN_FNMA and IFN_FNMS.
20247         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
20248         * gimple-fold.h (follow_all_ssa_edges): Declare.
20249         * gimple-fold.c (follow_all_ssa_edges): New function.
20250         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
20251         gimple_build interface and use follow_all_ssa_edges to fold the result.
20252         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
20253         instead of checking for optabs directly.
20254         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
20255         rather than FMA_EXPRs.
20256         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
20257         call to IFN_FMA instead of an FMA_EXPR.
20259 2018-05-17  Jim Wilson  <jimw@sifive.com>
20261         * expr.c (do_tablejump): When converting index to Pmode, if we have a
20262         sign extended promoted subreg, and the range does not have the sign bit
20263         set, then do a sign extend.
20265         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
20266         test, check for sign extended subreg and/or constant operands, and
20267         do a sign extend in that case.
20269 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
20271         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
20272         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
20273         Add untyped.
20274         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
20275         Change logics_shift_reg to logics_shift_imm.
20276         (thunderx2t99_fp_loadpair_basic): Delete.
20277         (thunderx2t99_fp_storepair_basic): Delete.
20278         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
20279         (thunderx2t99_asimd_polynomial): Delete.
20280         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
20281         and neon_fp_mul_d_scalar_q.
20282         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
20283         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
20284         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
20285         (thunderx2t99_asimd_lut): Add missing tbl types.
20286         (thunderx2t99_asimd_ext): Delete.
20287         (thunderx2t99_asimd_load1_1_mult): Delete.
20288         (thunderx2t99_asimd_load1_2_mult): Delete.
20289         (thunderx2t99_asimd_load1_ldp): New.
20290         (thunderx2t99_asimd_load1): New.
20291         (thunderx2t99_asimd_load2): Add missing *load2* types.
20292         (thunderx2t99_asimd_load3): New.
20293         (thunderx2t99_asimd_load4): New.
20294         (thunderx2t99_asimd_store1_1_mult): Delete.
20295         (thunderx2t99_asimd_store1_2_mult): Delete.
20296         (thunderx2t99_asimd_store2_mult): Delete.
20297         (thunderx2t99_asimd_store2_onelane): Delete.
20298         (thunderx2t99_asimd_store_stp): New.
20299         (thunderx2t99_asimd_store1): New.
20300         (thunderx2t99_asimd_store2): New.
20301         (thunderx2t99_asimd_store3): New.
20302         (thunderx2t99_asimd_store4): New.
20304 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
20306         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
20307         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
20309 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
20310             Segher Boessenkool  <segher@kernel.crashing.org>
20312         PR target/85698
20313         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
20314         operand.
20316 2018-05-17  Richard Biener  <rguenther@suse.de>
20318         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
20319         for pruning loop and prune defs feeding only already visited PHIs.
20321 2018-05-17  Richard Biener  <rguenther@suse.de>
20323         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
20325 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
20326             Richard Biener  <rguenther@suse.de>
20328         PR tree-optimization/85793
20329         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
20330         for VMAT_ELEMENTWISE.
20332 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
20334         * internal-fn.h (lookup_internal_fn): Declare
20335         * internal-fn.c (lookup_internal_fn): New function.
20336         * gimple.c (gimple_build_call_from_tree): Handle calls to
20337         internal functions.
20338         * gimple-pretty-print.c (dump_gimple_call): Print "." before
20339         internal function names.
20340         * tree-pretty-print.c (dump_generic_node): Likewise.
20341         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
20343 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
20345         * gimple-fold.h (gimple_build): Make the function forms take
20346         combined_fn rather than built_in_function.
20347         (gimple_simplify): Likewise.
20348         * gimple-match-head.c (gimple_simplify): Likewise.
20349         * gimple-fold.c (gimple_build): Likewise.
20350         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
20351         rather than gimple_build_call_internal.
20352         (get_initial_defs_for_reduction): Likewise.
20353         (vect_create_epilog_for_reduction): Likewise.
20354         (vectorizable_live_operation): Likewise.
20356 2018-05-17  Martin Liska  <mliska@suse.cz>
20358         * gimple-ssa-sprintf.c (format_directive): Do not use
20359         space in between 'G_' and '('.
20361 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
20363         PR target/85323
20364         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
20365         even if the mask is not all ones.
20367         PR target/85323
20368         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
20369         vector.
20370         (ix86_gimple_fold_builtin): Likewise.
20372         PR target/85323
20373         * config/i386/i386.c: Include tree-vector-builder.h.
20374         (ix86_vector_shift_count): New function.
20375         (ix86_fold_builtin): Fold shift builtins by scalar count.
20376         (ix86_gimple_fold_builtin): Likewise.
20378         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
20379         _mm512_setzero): New intrinsics.
20381 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
20382             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20384         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
20385         code generation for cases where splatting a value is not useful.
20386         * simplify-rtx.c (simplify_ternary_operation): Simplify
20387         vec_merge across a vec_duplicate and a paradoxical subreg forming
20388         a vector mode to a vec_concat.
20390 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
20392         * config.gcc: Support "goldmont-plus".
20393         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
20394         "goldmont-plus".
20395         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20396         PROCESSOR_GOLDMONT_PLUS.
20397         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
20398         (processor_target_table): Add "goldmont-plus".
20399         (PTA_GOLDMONT_PLUS): Define.
20400         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
20401         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
20402         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
20403         (fold_builtin_cpu): Add "goldmont-plus".
20404         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
20405         (ix86_option_override_internal): Add "goldmont-plus".
20406         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
20407         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
20408         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
20409         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
20411 2018-05-17  Richard Biener  <rguenther@suse.de>
20413         PR tree-optimization/85757
20414         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
20415         remove defs that only feed that PHI from further processing.
20417 2018-05-16  Jim Wilson  <jimw@sifive.com>
20419         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
20420         asterisk to name.
20421         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
20423 2018-05-16  Mark Wielaard  <mark@klomp.org>
20425         * dwarf2out.c (count_index_strings): New function.
20426         (output_indirect_strings): Call count_index_strings and generate
20427         header for dwarf_version >= 5.
20429 2018-05-16  Mark Wielaard  <mark@klomp.org>
20431         * dwarf2out.c (dwarf_FORM): New function.
20432         (set_indirect_string): Use dwarf_FORM.
20433         (reset_indirect_string): Likewise.
20434         (size_of_die): Likewise.
20435         (value_format): Likewise.
20436         (output_die): Likewise.
20437         (add_skeleton_AT_string): Likewise.
20438         (output_macinfo_op): Likewise.
20439         (index_string): Likewise.
20440         (output_index_string_offset): Likewise.
20441         (output_index_string): Likewise.
20442         (count_index_strings): Likewise.
20444 2018-05-16  Carl Love  <cel@us.ibm.com>
20446         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
20447         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
20449 2018-05-16  Martin Jambor  <mjambor@suse.cz>
20451         * ipa-prop.c (ipa_free_all_edge_args): Remove.
20452         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
20454 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
20456         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
20457         (fnma<mode>4): Likewise.
20458         (fms<mode>4): Likewise.
20459         (fnms<mode>4): Likewise.
20460         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
20461         (aarch64_fnma<mode>4): Likewise.
20462         (aarch64_fms<mode>4): Likewise.
20463         (aarch64_fnms<mode>4): Likewise.
20464         (aarch64_fnmadd<mode>4): Likewise.
20466 2018-05-16  Jason Merrill  <jason@redhat.com>
20468         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
20470 2018-05-16  Richard Biener  <rguenther@suse.de>
20472         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
20473         (dump_stmt_cost): Declare.
20474         (add_stmt_cost): Dump cost we add.
20475         (add_stmt_costs): New function.
20476         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
20477         No longer exported.
20478         (vect_analyze_stmt): Adjust prototype.
20479         (vectorizable_condition): Likewise.
20480         (vectorizable_live_operation): Likewise.
20481         (vectorizable_reduction): Likewise.
20482         (vectorizable_induction): Likewise.
20483         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
20484         cost vector to pass to vectorizable_ and record afterwards.
20485         (vect_model_reduction_cost): Take cost vector argument and adjust.
20486         (vect_model_induction_cost): Likewise.
20487         (vectorizable_reduction): Likewise.
20488         (vectorizable_induction): Likewise.
20489         (vectorizable_live_operation): Likewise.
20490         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
20491         SLP_TREE_NUMBER_OF_VEC_STMTS.
20492         (vect_analyze_slp_cost_1): Remove.
20493         (vect_analyze_slp_cost): Likewise.
20494         (vect_slp_analyze_node_operations): Take visited args and
20495         a target cost vector.  Avoid processing already visited stmt sets.
20496         (vect_slp_analyze_operations): Use a local cost vector to gather
20497         costs and register those of non-discarded instances.
20498         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
20499         (vect_schedule_slp_instance): Remove copying of
20500         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
20501         zero.
20502         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
20503         adding cost.  Record cost entry location.
20504         (vect_prologue_cost_for_slp_op): Function to compute cost of
20505         a constant or invariant generated for SLP vect in the prologue,
20506         split out from vect_analyze_slp_cost_1.
20507         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
20508         (vect_model_promotion_demotion_cost): Likewise.
20509         (vect_model_store_cost): Likewise, make static.
20510         (vect_model_load_cost): Likewise.
20511         (vectorizable_bswap): Add cost vector arg and adjust.
20512         (vectorizable_call): Likewise.
20513         (vectorizable_simd_clone_call): Likewise.
20514         (vectorizable_conversion): Likewise.
20515         (vectorizable_assignment): Likewise.
20516         (vectorizable_shift): Likewise.
20517         (vectorizable_operation): Likewise.
20518         (vectorizable_store): Likewise.
20519         (vectorizable_load): Likewise.
20520         (vectorizable_condition): Likewise.
20521         (vectorizable_comparison): Likewise.
20522         (can_vectorize_live_stmts): Likewise.
20523         (vect_analyze_stmt): Likewise.
20524         (vect_transform_stmt): Adjust calls to vectorizable_*.
20525         * tree-vectorizer.c: Include gimple-pretty-print.h.
20526         (dump_stmt_cost): New function.
20528 2018-05-16  Richard Biener  <rguenther@suse.de>
20530         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
20531         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
20532         * tree-ssa-dse.c: Include tree-ssa-loop.h.
20533         (check_name): New callback.
20534         (dse_classify_store): Track cycles via a visited bitmap of PHI
20535         defs and simplify handling of in-loop and across loop dead stores
20536         and properly fail for loop-variant refs.  Handle byte-tracking with
20537         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
20538         limiting the walk.
20540 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
20542         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
20543         (vect_get_mask_type_for_stmt): Likewise.
20544         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
20545         split out from...
20546         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
20547         to determine the statement's vector type and the vector type that
20548         should be used for calculating nunits.  Deal with cases in which
20549         the type has to be deferred.
20550         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
20551         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
20552         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
20553         (vect_determine_vf_for_stmt): New functions, split out from...
20554         (vect_determine_vectorization_factor): ...here.
20555         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
20556         (vect_get_mask_type_for_stmt): New functions, split out from
20557         vect_determine_vectorization_factor.
20559 2018-05-16  Richard Biener  <rguenther@suse.de>
20561         * tree-cfg.c (verify_gimple_assign_ternary): Properly
20562         verify the [VEC_]COND_EXPR embedded comparison.
20564 2018-05-15  Martin Sebor  <msebor@redhat.com>
20566         PR tree-optimization/85753
20567         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
20568         RECORD_TYPE in addition to ARRAY_TYPE.
20570 2018-05-15  Martin Sebor  <msebor@redhat.com>
20572         PR middle-end/85643
20573         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
20575 2018-05-15  Richard Biener  <rguenther@suse.de>
20577         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
20578         add by_clobber_p one.  Change algorithm to collect all defs
20579         representing uses we need to walk and try reducing them to
20580         a single one before failing.
20581         (dse_dom_walker::dse_optimize_stmt): Adjust.
20583 2018-05-13  Mark Wielaard  <mark@klomp.org>
20585         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
20586         (size_of_loc_descr): Likewise.
20587         (output_loc_operands): Likewise.
20588         (output_loc_operands_raw): Likewise.
20589         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
20590         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
20591         (hash_loc_operands): Likewise.
20592         (compare_loc_operands): Likewise.
20594 2018-05-14  Mark Wielaard  <mark@klomp.org>
20596         * dwarf2out.c (count_index_addrs): New function.
20597         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
20599 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20601         PR tree-optimization/83648
20602         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
20603         return value as malloc candidate.
20605 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
20607         PR ipa/85734
20608         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
20609         param as true in call to suggest_attribute.
20611 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
20613         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
20614         -mreadonly-in-sdata.
20616 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20618         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
20619         New pattern.
20620         (aarch64_crypto_aesd_fused): Likewise.
20622 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
20624         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
20625         (movsi_aarch64): Likewise.
20626         (load_pairsi): Likewise.
20627         (load_pairdi): Likewise.
20628         (store_pairsi): Likewise.
20629         (store_pairdi): Likewise.
20630         (load_pairsf): Likewise.
20631         (load_pairdf): Likewise.
20632         (store_pairsf): Likewise.
20633         (store_pairdf): Likewise.
20634         (zero_extend): Likewise.
20635         (trunc): Swap alternatives.
20636         (fcvt_target): Add '?' to prefer w over r.
20638 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
20640         PR target/85756
20641         * config/i386/i386.md: Disallow non-commutative arithmetics in
20642         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
20643         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
20644         in the peephole2 before it.
20646 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
20648         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
20649         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
20650         (ix86_handle_option): Handle -mcldemote.
20651         * config.gcc: New header.
20652         * config/i386/cldemoteintrin.h: New file.
20653         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
20654         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
20655         -mcldemote.
20656         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20657         OPTION_MASK_ISA_CLDEMOTE.
20658         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
20659         (ix86_valid_target_attribute_inner_p): Ditto.
20660         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
20661         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
20662         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
20663         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
20664         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
20665         (cldemote): New.
20666         * config/i386/i386.opt: Add -mcldemote.
20667         * config/i386/x86intrin.h: New header.
20668         * doc/invoke.texi: Add -mcldemote.
20670 2018-05-14  Richard Biener  <rguenther@suse.de>
20672         * doc/match-and-simplify.texi: Adjust :s documentation.
20674 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
20676         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
20677         intended memcpy size.
20678         (REORDER_45): Likewise.
20680 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
20682         * sort.cc: New file.
20683         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
20684         * vec.c (qsort_chk): Use gcc_qsort.
20685         * Makefile.in (OBJS-libcommon): Add sort.o.
20686         (build/sort.o): New target.  Use it...
20687         (BUILD_RTL): ... here, and...
20688         (build/gencfn-macros): ... here, and...
20689         (build/genmatch): ... here.
20691 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
20692             Chung-Ju Wu  <jasonwucj@gmail.com>
20694         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
20695         * config/nds32/nds32-graywolf.md: New file.
20696         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
20697         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
20698         pipeline.
20699         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
20700         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
20701         * config/nds32/nds32.md (pipeline_model): Add graywolf.
20702         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
20703         * config/nds32/pipelines.md: Include n15 settings.
20705 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
20706             Chung-Ju Wu  <jasonwucj@gmail.com>
20708         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
20709         * config/nds32/nds32-n13.md: New file.
20710         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
20711         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
20712         pipeline.
20713         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
20714         * config/nds32/nds32.md (pipeline_model): Add n13.
20715         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
20716         * config/nds32/pipelines.md: Include n13 settings.
20718 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
20719             Chung-Ju Wu  <jasonwucj@gmail.com>
20721         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
20722         * config/nds32/nds32-n10.md: New file.
20723         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
20724         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
20725         pipeline.
20726         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
20727         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
20728         * config/nds32/nds32.md (pipeline_model): Add n10.
20729         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
20730         * config/nds32/pipelines.md: Include n10 settings.
20732 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
20733             Kito Cheng  <kito.cheng@gmail.com>
20734             Chung-Ju Wu  <jasonwucj@gmail.com>
20736         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
20737         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
20738         Add enum values for DSP extension instructions.
20739         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
20740         New constraints.
20741         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
20742         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
20743         New code iterators.
20744         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
20745         * config/nds32/nds32-dspext.md: New file for DSP implementation.
20746         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
20747         * config/nds32/nds32-intrinsic.md: Likewise.
20748         * config/nds32/nds32_intrinsic.h: Likewise.
20749         * config/nds32/nds32-md-auxiliary.c: Likewise.
20750         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
20751         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
20752         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
20753         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
20754         * config/nds32/nds32-protos.h: New declarations for DSP extension.
20755         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
20756         TYPE_DMAC in switch statement.
20757         * config/nds32/nds32.c: New checking and implementation for DSP
20758         extension instructions.
20759         * config/nds32/nds32.h: Likewise.
20760         * config/nds32/nds32.md: Likewise.
20761         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
20762         * config/nds32/predicates.md: Implement new predicates for DSP
20763         extension.
20765 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
20767         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
20768         Reformat alternatives and attributes so it is easier to identify
20769         which constraints/attributes go with which instruction.
20770         (mov<mode>_hardfloat32, FMOVE64): Likewise.
20771         (mov<mode>_softfloat32, FMOVE64): Likewise.
20772         (mov<mode>_hardfloat64, FMOVE64): Likewise.
20773         (mov<mode>_softfloat64, FMOVE64): Likewise.
20775 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20777         * doc/extend.texi (PowerPC Built-in Functions): Rename this
20778         subsection.
20779         (Basic PowerPC Built-in Functions): The new name of the
20780         subsection previously known as "PowerPC Built-in Functions".
20781         (Basic PowerPC Built-in Functions Available on all Configurations):
20782         New subsubsection.
20783         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
20784         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
20785         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
20786         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
20788 2018-05-11  Martin Jambor  <mjambor@suse.cz>
20790         PR ipa/85655
20791         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
20792         single const.
20794 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
20796         PR target/85733
20797         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
20799 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
20801         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
20802         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
20803         (ix86_handle_option): Handle -mwaitpkg.
20804         * config.gcc: New header.
20805         * config/i386/cpuid.h (bit_WAITPKG): New bit.
20806         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
20807         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
20808         function type.
20809         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20810         OPTION_MASK_ISA_WAITPKG.
20811         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
20812         (ix86_option_override_internal): Add PTA_WAITPKG.
20813         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
20814         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
20815         IX86_BUILTIN_TPAUSE.
20816         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
20817         __builtin_ia32_umwait and __builtin_ia32_tpause.
20818         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
20819         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
20820         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
20821         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
20822         UNSPECV_TPAUSE): New.
20823         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
20824         * config/i386/i386.opt: Add -mwaitpkg.
20825         * config/i386/waitpkgintrin.h: New file.
20826         * config/i386/x86intrin.h: New header.
20827         * doc/invoke.texi: Add -mwaitpkg.
20829 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
20831         PR target/85606
20832         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
20833         equivalent.
20834         (cortex-m0): Use armv6s-m isa.
20835         (cortex-m0plus): Likewise.
20836         (cortex-m1): Likewise.
20837         (cortex-m0.small-multiply): Likewise.
20838         (cortex-m0plus.small-multiply): Likewise.
20839         (cortex-m1.small-multiply): Likewise.
20841 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
20842             Jakub Jelinek  <jakub@redhat.com>
20844         PR tree-optimization/85692
20845         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
20846         source permute as well.
20848 2018-05-11  Martin Liska  <mliska@suse.cz>
20850         PR sanitizer/85556
20851         * doc/extend.texi: Document LLVM style format for no_sanitize
20852         attribute.
20854 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
20856         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
20857         mode_supports_vsx_dform_quad to mode_supports_dq_form.
20858         (mode_supports_vsx_dform_quad): Likewise.
20859         (mode_supports_vmx_dform): Move these functions to be next to the
20860         other mode_supports functions.
20861         (mode_supports_dq_form): Likewise.
20862         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
20863         mode_supports_dq_form.
20864         (reg_offset_addressing_ok_p): Likewise.
20865         (offsettable_ok_by_alignment): Likewise.
20866         (rs6000_legitimate_offset_address_p): Likewise.
20867         (legitimate_lo_sum_address_p): Likewise.
20868         (rs6000_legitimize_address): Likewise.
20869         (rs6000_legitimize_reload_address): Likewise.
20870         (rs6000_secondary_reload_inner): Likewise.
20871         (rs6000_preferred_reload_class): Likewise.
20872         (rs6000_output_move_128bit): Likewise.
20874 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
20876         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
20877         Generate SImode target register for null target.
20878         <case IX86_BUILTIN_XGETBV>: Ditto.
20879         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
20880         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
20882 2018-05-10  Carl Love  <cel@us.ibm.com>
20884         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
20885         dcbtt and dcbtstt if operands[2] is 0.
20887 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
20889         PR target/85693
20890         * config/i386/sse.md (usadv64qi): New expander.
20892 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
20894         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
20895         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
20896         -maltivec=be support.
20897         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
20898         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
20899         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
20900         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
20901         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
20902         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
20903         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
20904         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
20905         altivec_vsumsws): Adjust.
20906         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
20907         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
20908         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
20909         support.
20910         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
20911         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
20912         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
20913         (altivec_lve<VI_char>x): Delete expand.
20914         (*altivec_lve<VI_char>x_internal): Rename to...
20915         (altivec_lve<VI_char>x): ... this.
20916         (altivec_lvxl_<mode>): Delete expand.
20917         (*altivec_lvxl_<mode>_internal): Rename to ...
20918         (altivec_lvxl_<mode>): ... this.
20919         (altivec_stvxl_<mode>): Delete expand.
20920         (*altivec_stvxl_<mode>_internal): Rename to ...
20921         (altivec_stvxl_<mode>): ... this.
20922         (altivec_stve<VI_char>x): Delete expand.
20923         (*altivec_stve<VI_char>x_internal): Rename to ...
20924         (altivec_stve<VI_char>x): ... this.
20925         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
20926         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
20927         reduc_plus_scal_<mode>): Adjust.
20928         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
20929         comment.
20930         (rs6000_cpu_cpp_builtins): Adjust.
20931         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
20932         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
20933         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
20934         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
20935         -maltivec=be support.
20936         (rs6000_split_vec_extract_var): Adjust.
20937         (rs6000_split_v4si_init): Adjust.
20938         (swap_selector_for_mode): Delete.
20939         (altivec_expand_lvx_be, altivec_expand_stvx_be,
20940         altivec_expand_stvex_be): Delete.
20941         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
20942         -maltivec=be support.
20943         (rs6000_gimple_fold_builtin): Ditto.
20944         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
20945         Adjust.
20946         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
20947         (TARGET_DIRECT_MOVE_64BIT): Adjust.
20948         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
20949         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
20950         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
20951         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
20952         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
20953         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
20954         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
20955         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
20956         anonymous split): Adjust.
20957         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
20958         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
20960 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
20962         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
20963         when --with-gxx-include-dir is also specified.
20964         * configure: Regenerate.
20966 2018-05-09  Jim Wilson  <jimw@sifive.com>
20968         PR target/84797
20969         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
20970         * config/riscv/t-withmultilib: New.
20971         * config/riscv/withmultilib.h: New.
20972         * doc/install.texi: Document RISC-V --with-multilib-list support.
20974 2018-05-09  Richard Biener  <rguenther@suse.de>
20976         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
20977         vector.
20978         (vect_bb_vectorization_profitable_p): Adjust.  Compute
20979         actual scalar cost using the cost vector and the add_stmt_cost
20980         machinery.
20982 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
20984         PR rtl-optimization/85645
20985         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
20986         in the REG_CFA_REGISTER note for LR, don't leave it empty.
20988 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
20990         PR rtl-optimization/85645
20991         * shrink-wrap.c (spread_components): Return a boolean saying if
20992         anything was changed.
20993         (try_shrink_wrapping_separate): Iterate spread_components until
20994         nothing changes anymore.
20996 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
20998         PR rtl-optimization/85645
20999         * regrename.c (build_def_use): Also kill the chains that include the
21000         destination of a REG_CFA_REGISTER note.
21002 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
21004         PR rtl-optimization/85645
21005         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
21006         insn that has a REG_CFA_REGISTER note.
21008 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
21010         * cfgexpand.c (expand_clobber): New function.
21011         (expand_gimple_stmt_1): Use it.
21012         * tree-vect-stmts.c (vect_clobber_variable): New function,
21013         split out from...
21014         (vectorizable_simd_clone_call): ...here.
21015         (vectorizable_store): Emit a clobber either side of an
21016         IFN_STORE_LANES sequence.
21017         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
21019 2018-05-09  Tom de Vries  <tom@codesourcery.com>
21021         PR target/85626
21022         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
21023         (define_insn "trap_if_false"): Add exit after trap.
21025 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
21027         PR rtl-optimization/85638
21028         * bb-reorder.c: Include common/common-target.h.
21029         (create_forwarder_block): New function extracted from...
21030         (fix_up_crossing_landing_pad): ...here.  Rename into...
21031         (dw2_fix_up_crossing_landing_pad): ...this.
21032         (sjlj_fix_up_crossing_landing_pad): New function.
21033         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
21034         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
21035         from both partitions and exit the loop after one iteration.
21037 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21039         Revert:
21040         * doc/extend.texi (PowerPC Built-in Functions): Rename this
21041         subsection.
21042         (Basic PowerPC Built-in Functions): The new name of the
21043         subsection previously known as "PowerPC Built-in Functions".
21044         (Basic PowerPC Built-in Functions Available on all Configurations):
21045         New subsubsection.
21046         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
21047         subsubsection.
21048         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
21049         subsubsection.
21050         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
21051         subsubsection.
21052         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
21053         subsubsection.
21055 2018-05-08  Jim Wilson  <jimw@sifive.com>
21057         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
21058         (LD_EMUL_SUFFIX): New.
21059         (LINK_SPEC): Use it.
21061 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21063         * doc/extend.texi (PowerPC Built-in Functions): Rename this
21064         subsection.
21065         (Basic PowerPC Built-in Functions): The new name of the
21066         subsection previously known as "PowerPC Built-in Functions".
21067         (Basic PowerPC Built-in Functions Available on all Configurations):
21068         New subsubsection.
21069         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
21070         subsubsection.
21071         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
21072         subsubsection.
21073         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
21074         subsubsection.
21075         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
21076         subsubsection.
21078 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
21080         PR target/85683
21081         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
21082         after cmpelim optimization.
21084 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
21086         * config.gcc: Support "goldmont".
21087         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
21088         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
21089         PROCESSOR_GOLDMONT.
21090         * config/i386/i386.c (m_GOLDMONT): Define.
21091         (processor_target_table): Add "goldmont".
21092         (PTA_GOLDMONT): Define.
21093         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
21094         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
21095         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
21096         (fold_builtin_cpu): Add "goldmont".
21097         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
21098         (ix86_option_override_internal): Add "goldmont".
21099         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
21100         (processor_type): Add PROCESSOR_GOLDMONT.
21101         * config/i386/i386.md: Add CPU "glm".
21102         * config/i386/glm.md: New file.
21103         * config/i386/x86-tune.def: Add m_GOLDMONT.
21104         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
21106 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
21108         PR target/85572
21109         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
21110         E_V4DImode.
21111         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
21112         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
21113         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
21115         PR target/85317
21116         * config/i386/i386.c (ix86_fold_builtin): Handle
21117         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
21119         PR target/85480
21120         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
21121         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
21123 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
21125         PR target/85658
21126         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
21127         (check_arch): Likewise.
21128         (check_fpu): Return the result rather than printing it.
21129         (end arch): Fix operator precedence.
21130         (end cpu): Likewise.
21131         (END): Print the result from check_fpu.
21133 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
21134             Alan Hayward  <alan.hayward@arm.com>
21135             David Sherwood  <david.sherwood@arm.com>
21137         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
21138         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
21139         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
21140         (*fcmuo<mode>_and): New patterns.
21142 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
21144         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
21145         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
21146         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
21147         (cmp_op, sve_imm_con): New code attributes.
21148         (SVE_COND_INT_CMP, imm_con): Delete.
21149         (cmp_op): Remove above unspecs from int attribute.
21150         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
21151         to...
21152         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
21153         comparison-specific unspecs.
21154         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
21155         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
21156         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
21157         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
21158         (*vec_fcm<cmp_op><mode>): Rename to...
21159         (*fcm<cmp_op><mode>): ...this and adjust likewise.
21160         (*vec_fcmuo<mode>): Rename to...
21161         (*fcmuo<mode>): ...this and adjust likewise.
21162         (*pred_fcm<cmp_op><mode>): New pattern.
21163         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
21164         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
21165         functions.
21166         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
21167         and UNORDERED.
21168         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
21169         (aarch64_emit_sve_predicated_cond): New function.
21170         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
21171         (aarch64_emit_unspec_cond_or): Replace with...
21172         (aarch64_emit_sve_or_conds): ...this new function.  Use
21173         aarch64_emit_sve_ptrue_op for the individual comparisons and
21174         aarch64_emit_binop to OR them together.
21175         (aarch64_emit_inverted_unspec_cond): Replace with...
21176         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
21177         aarch64_emit_sve_ptrue_op for the comparison and
21178         aarch64_emit_unop to invert the result.
21179         (aarch64_expand_sve_vec_cmp_float): Update after the above
21180         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
21182 2018-05-07  Nathan Sidwell  <nathan@acm.org>
21184         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
21185         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
21186         (Backwards Compatibility): Likewise.
21188 2018-05-07  Luis Machado  <luis.machado@linaro.org>
21190         PR bootstrap/85681
21191         Revert:
21192         2018-05-07  Luis Machado  <luis.machado@linaro.org>
21194         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21195         <prefetch_dynamic_strides>: New const bool field.
21196         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21197         prefetch_dynamic_strides.
21198         (exynosm1_prefetch_tune): Likewise.
21199         (thunderxt88_prefetch_tune): Likewise.
21200         (thunderx_prefetch_tune): Likewise.
21201         (thunderx2t99_prefetch_tune): Likewise.
21202         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
21203         to false.
21204         (aarch64_override_options_internal): Update to set
21205         PARAM_PREFETCH_DYNAMIC_STRIDES.
21206         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
21207         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
21208         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
21209         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
21210         prefetch-dynamic-strides setting.
21212         2018-05-07  Luis Machado  <luis.machado@linaro.org>
21214         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21215         <minimum_stride>: New const int field.
21216         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21217         minimum_stride field.
21218         (exynosm1_prefetch_tune): Likewise.
21219         (thunderxt88_prefetch_tune): Likewise.
21220         (thunderx_prefetch_tune): Likewise.
21221         (thunderx2t99_prefetch_tune): Likewise.
21222         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
21223         (aarch64_override_options_internal): Update to set
21224         PARAM_PREFETCH_MINIMUM_STRIDE.
21225         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
21226         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
21227         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
21228         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
21229         stride is constant and is below the minimum stride threshold.
21231 2018-05-07  Luis Machado  <luis.machado@linaro.org>
21233         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
21234         to 512.
21236 2018-05-07  Luis Machado  <luis.machado@linaro.org>
21238         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21239         <prefetch_dynamic_strides>: New const bool field.
21240         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21241         prefetch_dynamic_strides.
21242         (exynosm1_prefetch_tune): Likewise.
21243         (thunderxt88_prefetch_tune): Likewise.
21244         (thunderx_prefetch_tune): Likewise.
21245         (thunderx2t99_prefetch_tune): Likewise.
21246         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
21247         to false.
21248         (aarch64_override_options_internal): Update to set
21249         PARAM_PREFETCH_DYNAMIC_STRIDES.
21250         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
21251         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
21252         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
21253         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
21254         prefetch-dynamic-strides setting.
21256 2018-05-07  Luis Machado  <luis.machado@linaro.org>
21258         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
21259         <minimum_stride>: New const int field.
21260         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
21261         minimum_stride field.
21262         (exynosm1_prefetch_tune): Likewise.
21263         (thunderxt88_prefetch_tune): Likewise.
21264         (thunderx_prefetch_tune): Likewise.
21265         (thunderx2t99_prefetch_tune): Likewise.
21266         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
21267         (aarch64_override_options_internal): Update to set
21268         PARAM_PREFETCH_MINIMUM_STRIDE.
21269         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
21270         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
21271         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
21272         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
21273         stride is constant and is below the minimum stride threshold.
21275 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
21277         PR c++/85659
21278         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
21279         the type is addressable.  Don't force op into register if it has
21280         BLKmode.
21282 2018-05-05  Roland McGrath  <mcgrathr@google.com>
21284         PR other/77609
21285         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
21286         any section for which we don't know a specific type it should have,
21287         regardless of name.  Previously this was done only for the exact
21288         names ".init_array", ".fini_array", and ".preinit_array".
21289         (default_elf_asm_named_section): Add comment about
21290         relationship with default_section_type_flags and SECTION_NOTYPE.
21291         (get_section): Don't consider it a type conflict if one side has
21292         SECTION_NOTYPE and the other doesn't, as long as neither has the
21293         SECTION_BSS et al used in the default_section_type_flags logic.
21295 2018-05-05  Tom de Vries  <tom@codesourcery.com>
21297         PR target/85653
21298         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
21299         (workaround_barsyncs): New function.
21300         (nvptx_reorg): Use workaround_barsyncs.
21301         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
21302         (define_expand "nvptx_membar_cta"): New define_expand.
21303         (define_insn "*nvptx_membar_cta"): New insn.
21305 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
21307         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
21308         To improve optimization opportunities.
21309         * builtin-types.def: The new needed builtin types for the above.
21311 2018-05-04  Richard Biener  <rguenther@suse.de>
21313         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
21314         * gimple-ssa-store-merging.c
21315         (imm_store_chain_info::output_merged_store): Remove redundant create,
21316         release split_store vector contents on failure.
21317         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
21318         scalar stmt vector on cache hit.
21320 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
21322         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
21323         Xilinx FP support.
21324         * config.gcc (powerpc-xilinx-eabi*): Remove.
21325         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
21326         support.
21327         (fusion_addis_mem_combo_load): Ditto.
21328         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
21329         FP support.
21330         (rs6000_cpu_cpp_builtins): Ditto.
21331         * config/rs6000/rs6000-linux.c
21332         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
21333         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
21334         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
21335         support.
21336         (rs6000_setup_reg_addr_masks): Ditto.
21337         (rs6000_init_hard_regno_mode_ok): Ditto.
21338         (rs6000_option_override_internal): Ditto.
21339         (legitimate_lo_sum_address_p): Ditto.
21340         (rs6000_legitimize_address): Ditto.
21341         (rs6000_legitimize_reload_address): Ditto.
21342         (rs6000_legitimate_address_p): Ditto.
21343         (abi_v4_pass_in_fpr): Ditto.
21344         (setup_incoming_varargs): Ditto.
21345         (rs6000_gimplify_va_arg): Ditto.
21346         (rs6000_split_multireg_move): Ditto.
21347         (rs6000_savres_strategy): Ditto.
21348         (rs6000_emit_prologue_components): Ditto.
21349         (rs6000_emit_epilogue_components): Ditto.
21350         (rs6000_emit_prologue): Ditto.
21351         (rs6000_emit_epilogue): Ditto.
21352         (rs6000_elf_file_end): Ditto.
21353         (rs6000_function_value): Ditto.
21354         (rs6000_libcall_value): Ditto.
21355         * config/rs6000/rs6000.h: Ditto.
21356         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
21357         (TARGET_MINMAX): ... this.  New.
21358         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
21359         * config/rs6000/rs6000.md: Remove Xilinx FP support.
21360         (*movsi_internal1_single): Delete.
21361         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
21362         mfpu=, mxilinx-fpu): Delete.
21363         * config/rs6000/singlefp.h: Delete.
21364         * config/rs6000/sysv4.h: Remove Xilinx FP support.
21365         * config/rs6000/t-rs6000: Ditto.
21366         * config/rs6000/t-xilinx: Delete.
21367         * config/rs6000/titan.md: Adjust for fp_type removal.
21368         * config/rs6000/vsx.md: Remove Xilinx FP support.
21369         (VStype_simple): Delete.
21370         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
21371         * config/rs6000/xfpu.h: Delete.
21372         * config/rs6000/xfpu.md: Delete.
21373         * config/rs6000/xilinx.h: Delete.
21374         * config/rs6000/xilinx.opt: Delete.
21375         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
21376         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
21378 2018-05-04  Tom de Vries  <tom@codesourcery.com>
21380         PR libgomp/85639
21381         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
21382         if ignore == 0.
21384 2018-05-04  Richard Biener  <rguenther@suse.de>
21386         PR middle-end/85627
21387         * tree-complex.c (update_complex_assignment): We are always in SSA form.
21388         (expand_complex_div_wide): Likewise.
21389         (expand_complex_operations_1): Likewise.
21390         (expand_complex_libcall): Preserve EH info of the original stmt.
21391         (tree_lower_complex): Handle removed blocks.
21392         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
21393         on complex multiplication and division libcall builtins.
21395 2018-05-04  Richard Biener  <rguenther@suse.de>
21397         PR middle-end/85574
21398         * fold-const.c (negate_expr_p): Restrict negation of operand
21399         zero of a division to when we know that can happen without
21400         overflow.
21401         (fold_negate_expr_1): Likewise.
21403 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
21405         PR libstdc++/85466
21406         * real.h (real_nextafter): Declare.
21407         * real.c (real_nextafter): New function.
21408         * fold-const-call.c (fold_const_nextafter): New function.
21409         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
21410         CASE_CFN_NEXTTOWARD.
21411         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
21412         even when arg1_mode is different from arg0_mode.
21414 2018-05-03  Nathan Sidwell  <nathan@acm.org>
21416         * doc/extend.texi (Deprecated Features): Remove
21417         -ffriend-injection.
21418         (Backwards Compatibility): Likewise.
21419         * doc/invoke.texi (C++ Language Options): Likewise.
21420         (C++ Dialect Options): Likewise.
21422 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
21424         PR target/85530
21425         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
21426         _mm512_mask_mullox_epi64): New intrinsics.
21428 2018-05-03  Tom de Vries  <tom@codesourcery.com>
21430         PR testsuite/85106
21431         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
21432         dump files): Add offload-tree.
21434 2018-05-03  Richard Biener  <rguenther@suse.de>
21436         PR tree-optimization/85615
21437         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
21438         to loops not nested in BBs loop father to avoid creating multi-entry
21439         loops.
21441 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21443         PR tree-optimization/70291
21444         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
21445         arguments.  Change return type to tree.  Emit libcall as a new
21446         statement rather than replacing existing one when inplace_p is true.
21447         (expand_complex_multiplication_components): New function.
21448         (expand_complex_multiplication): Expand floating-point complex
21449         multiplication using the above.
21450         (expand_complex_division): Rename inner_type parameter to type.
21451         Update expand_complex_libcall call-site.
21452         (expand_complex_operations_1): Update expand_complex_multiplication
21453         and expand_complex_division call-sites.
21455 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
21457         PR target/85582
21458         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
21459         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
21460         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
21461         the highest significant bit of the shift count mask is clear.  In
21462         check whether and[sq]i3 is needed verify that all significant bits
21463         of the shift count other than the highest are set.
21465 2018-05-02  Tom de Vries  <tom@codesourcery.com>
21467         PR libgomp/82428
21468         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
21469         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
21470         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
21471         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
21472         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
21473         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
21474         __builtin_goacc_parlevel_size.
21476 2018-05-02  Richard Biener  <rguenther@suse.de>
21478         PR tree-optimization/85597
21479         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
21480         do not use split vect_get_vec_defs call but call vect_get_slp_defs
21481         directly.
21483 2018-05-02  Tom de Vries  <tom@codesourcery.com>
21485         PR testsuite/85106
21486         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
21487         dump files): Add ltrans-tree.
21489 2018-05-02  Tom de Vries  <tom@codesourcery.com>
21491         PR testsuite/85106
21492         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
21493         dump files): Add wpa-ipa.
21495 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
21497         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
21498         powerpc*-*-linux*paired* target.
21499         * config/rs6000/750cl.h: Delete.
21500         * config/rs6000/paired.h: Delete.
21501         * config/rs6000/paired.md: Delete.
21502         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
21503         float support.
21504         * config/rs6000/rs6000-builtin.def: Remove paired float support.
21505         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
21506         comment.  Remove paired float support.
21507         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
21508         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
21509         VECTOR_PAIRED.
21510         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
21511         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
21512         declarations.
21513         * config/rs6000/rs6000.c: Remove paired float support.
21514         (paired_expand_vector_init, paired_expand_vector_move,
21515         paired_emit_vector_compare, paired_emit_vector_cond_expr,
21516         (paired_expand_lv_builtin, paired_expand_stv_builtin,
21517         paired_expand_builtin, paired_expand_predicate_builtin,
21518         paired_init_builtins): Delete.
21519         * config/rs6000/rs6000.h: Remove paired float support.
21520         * config/rs6000/rs6000.md: Remove paired float support.
21521         (move_from_CR_ov_bit): Delete.
21522         * config/rs6000/rs6000.opt (mpaired): Delete.
21523         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
21524         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
21526 2018-05-02  Richard Biener  <rguenther@suse.de>
21528         PR middle-end/85567
21529         * gimplify.c (gimplify_save_expr): When in SSA form allow
21530         SAVE_EXPRs to compute to SSA vars.
21532 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
21534         PR target/85582
21535         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
21536         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
21537         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
21538         clobber operands[2], instead use a new pseudo.  Formatting fixes.
21540 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
21542         PR tree-optimization/85586
21543         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
21544         exit early for statements in the same group if the accesses are
21545         not strided.
21547 2018-05-02  Tom de Vries  <tom@codesourcery.com>
21549         PR lto/85451
21550         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
21551         error message.
21553 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
21555         PR tree-optimization/85143
21556         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
21558 2018-05-01  Tom de Vries  <tom@codesourcery.com>
21560         PR lto/85451
21561         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
21562         not found" error message.
21564 2018-05-01  Tom de Vries  <tom@codesourcery.com>
21566         PR other/83786
21567         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
21568         * vec.c (test_ordered_remove_if): New function.
21569         (vec_c_tests): Call test_ordered_remove_if.
21570         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
21571         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
21572         * tree-vect-patterns.c (vect_pattern_recog_1): Use
21573         VEC_ORDERED_REMOVE_IF.
21575 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21577         PR tree-optimization/82665
21578         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
21579         pointer subtraction where arguments come from a memchr call.
21581 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
21583         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
21584         --push-state --as-needed and --pop-state instead of --as-needed and
21585         --no-as-needed if ld supports it.
21586         * configure: Regenerated.
21588         PR web/85578
21589         * doc/install.texi2html: Replace _002d with - and _002a with * in
21590         generated html files using sed.
21592 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
21594         PR c++/85523
21595         * gcc-rich-location.c (blank_line_before_p): New function.
21596         (use_new_line): New function.
21597         (gcc_rich_location::add_fixit_insert_formatted): New function.
21598         * gcc-rich-location.h
21599         (gcc_rich_location::add_fixit_insert_formatted): New function.
21601 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
21603         * selftest.c (assert_streq): Rename "expected" and "actual" to
21604         "val1" and "val2".  Extend NULL-handling to cover both inputs
21605         symmetrically, while still requiring both to be non-NULL for a pass.
21606         * selftest.h (assert_streq): Rename "expected" and "actual" to
21607         "val1" and "val2".
21608         (ASSERT_EQ): Likewise.
21609         (ASSERT_EQ_AT): Likewise.
21610         (ASSERT_KNOWN_EQ): Likewise.
21611         (ASSERT_KNOWN_EQ_AT): Likewise.
21612         (ASSERT_NE): Likewise.
21613         (ASSERT_MAYBE_NE): Likewise.
21614         (ASSERT_MAYBE_NE_AT): Likewise.
21615         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
21616         the assertion to pass.
21617         (ASSERT_STREQ_AT): Likewise.
21619 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
21621         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
21622         interaction with -pie.
21624 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
21626         * selftest.h: Fix alphabetization of per-source-file selftest
21627         declarations.
21629 2018-04-30  Jason Merrill  <jason@redhat.com>
21631         PR c++/61982 - dead stores to destroyed objects.
21632         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
21633         of clobber.
21635 2018-04-30  Jason Merrill  <jason@redhat.com>
21637         * tree.c (build_clobber): New.
21638         * tree.h: Declare it.
21639         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
21641 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
21643         * diagnostic-show-locus.c (layout::layout): Update for
21644         location_get_source_line returning a char_span.
21645         (struct char_span): Move to input.h.
21646         (struct correction): Update for fields in char_span becoming
21647         private.
21648         (struct source_line): Update for location_get_source_line
21649         returning a char_span.
21650         (layout::print_line): Likewise.
21651         * edit-context.c (edited_file::print_content): Likewise.
21652         (edited_file::print_diff_hunk): Likewise.
21653         (edited_file::print_run_of_changed_lines): Likewise.
21654         (edited_file::get_num_lines): Likewise.
21655         (edited_line::edited_line): Likewise.
21656         * final.c (asm_show_source): Likewise.
21657         * input.c (location_get_source_line): Convert return type
21658         from const char * to char_span, losing the final "line_len"
21659         param.
21660         (dump_location_info): Update for the above.
21661         (get_substring_ranges_for_loc): Likewise.  Use a char_span
21662         when handling the literal within the line.
21663         (test_reading_source_line): Update for location_get_source_line
21664         returning a char_span.
21665         * input.h (class char_span): Move here from
21666         diagnostic-show-locus.c, converting from a struct to a class.
21667         Make data members private.
21668         (char_span::operator bool): New.
21669         (char_span::length): New.
21670         (char_span::get_buffer): New.
21671         (char_span::operator[]): New.
21672         (char_span::subspan): Make const.
21673         (char_span::xstrdup): New.
21674         (location_get_source_line): Convert return type from const char *
21675         to char_span, losing the final "line_size" param.
21677 2018-04-30  Jan Hubicka  <jh@suse.cz>
21679         * lto-wrapper.c (ltrans_priorities): New static var.
21680         (cmp_priority): New.
21681         (run_gcc): Read priorities and if doing parallel build order
21682         the Makefile by them.
21684 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
21686         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
21688 2018-04-30  Richard Biener  <rguenther@suse.de>
21690         * tree-cfg.c (verify_address): Remove base argument, add
21691         flag whether to check TREE_ADDRESSABLE and do that.
21692         (verify_expr): Remove.
21693         (verify_types_in_gimple_reference): Add pieces from verify_expr.
21694         (verify_gimple_assign_single): Likewise.
21695         (verify_gimple_switch): Likewise.
21696         (verify_expr_location_1): Dereference tp once.  Add (disabled)
21697         piece from verify_expr.
21698         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
21700 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
21702         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
21704 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
21706         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
21707         (small_data_pattern): Likewise.
21708         (arc_rewrite_small_data): Likewise.
21709         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
21710         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
21711         (get_symbol_alignment): New function.
21712         (legitimate_small_data_address_p): Likewise.
21713         (legitimate_scaled_address): Update, call
21714         legitimate_small_data_address_p.
21715         (output_sdata): New static variable.
21716         (arc_print_operand): Update how we handle small data operands.
21717         (arc_print_operand_address): Likewise.
21718         (arc_legitimate_address_p): Update, use
21719         legitimate_small_data_address_p.
21720         (arc_rewrite_small_data_p): Remove.
21721         (arc_rewrite_small_data_1): Likewise.
21722         (arc_rewrite_small_data): Likewise.
21723         (small_data_pattern): Likewise.
21724         (compact_sda_memory_operand): Update to use
21725         legitimate_small_data_address_p and get_symbol_alignment.
21726         (prepare_move_operands): Don't rewite sdata pattern.
21727         (prepare_extend_operands): Remove.
21728         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
21729         pattern.
21730         (zero_extendqisi2): Likewise.
21731         (zero_extendhisi2): Likewise.
21732         (extendqihi2): Likewise.
21733         (extendqisi2): Likewise.
21734         (extendhisi2): Likewise.
21735         (addsi3): Likewise.
21736         (subsi3): Likewise.
21737         (andsi3): Likewise.
21738         * config/arc/constraints.md (Usd): Change it to memory constraint.
21740 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
21742         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
21743         as source of std instructions.
21744         * config/arc/arc.md (movsi_insn): Update pattern predicate to
21745         allow 6-bit constants as source for store instructions.
21746         (movdi_insn): Update instruction pattern to allow 6-bit constants
21747         as source for store instructions.
21749 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
21751         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
21753 2018-04-30  Nathan Sidwell  <nathan@acm.org>
21754             Sandra Loosemore <sandra@codesourcery.com>
21756         * dumpfile.c (dump_open): Allow '-' for stdout.
21757         * doc/invoke.texi (Developer Options): Document dump filename
21758         determination early.  Document stdin/stdout selection.
21760 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
21762         Microblaze Target: PIC data text relative
21764         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
21765         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
21766         Add declaration.
21767         * config/microblaze/microblaze.h (microblaze_constant_address_p):
21768         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
21769         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
21770         New addressing mode for data-text relative position indepenedent code.
21771         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
21772         'ADDRESS_SYMBOLIC_TXT_REL'.
21773         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
21774         (microblaze_legitimate_pic_operand): Exclude function calls from
21775         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
21776         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
21777         addresses cases.
21778         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
21779         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
21780         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
21781         for 'address + offset'.
21782         (microblaze_expand_prologue): Add new function prologue call for
21783         'r20' assignation.
21784         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
21785         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
21786         table in case of TARGET_PIC_DATA_TEXT_REL.
21787         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
21788         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
21789         Add new macros 'UNSPEC_TEXT',
21790         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
21791         + exclude function calls from 'UNSPEC_PLT' in case of data text
21792         relative mode.
21793         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
21794         new target hook for generating address diff vector tables in case of
21795         flag_pic.
21796         * doc/tm.texi : Regenerate.
21797         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
21798         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
21799         of addr diff vector generation.
21800         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
21801         target hook definition.
21802         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
21803         Add default function for generate_pic_addr_diff_vec -> flag_pic.
21804         * doc/invoke.texi (Add new pic option): Add new microblaze pic
21805         option for data text relative.
21807 2018-04-30  Richard Biener  <rguenther@suse.de>
21809         * tree-chrec.h (evolution_function_is_constant_p): Remove
21810         redundant check.
21811         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
21813 2018-04-30  Richard Biener  <rguenther@suse.de>
21815         PR bootstrap/85571
21816         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
21818 2018-04-30  Richard Biener  <rguenther@suse.de>
21820         PR tree-optimization/28364
21821         PR tree-optimization/85275
21822         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
21823         copying first exit test.
21825 2018-04-28  Mark Wielaard  <mark@klomp.org>
21827         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
21828         dwarf_version >= 5.
21829         (dwarf_AT): Handle DW_AT_addr_base.
21830         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
21832 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
21834         PR target/84431
21835         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
21836         (*ashl<dwi>3_doubleword_mask_1): Ditto.
21837         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
21838         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
21840 2018-04-28  Richard Biener  <rguenther@suse.de>
21842         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
21843         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
21844         to reflect use.  Only add interesting stmts.
21846 2018-04-27  Martin Jambor  <mjambor@suse.cz>
21848         PR ipa/85549
21849         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
21850         the jump function allows for passing through aggregate values.
21852 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
21854         * input.h (in_system_header_at): Convert from macro to inline
21855         function.
21856         (from_macro_expansion_at): Likewise.
21857         (from_macro_definition_at): Likewise.
21859 2018-04-27  Jeff Law  <law@redhat.com>
21861         * config.gcc: Mark tile* targets as deprecated/obsolete.
21863 2018-04-27  Richard Biener  <rguenther@suse.de>
21865         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
21866         fix for ILP32.
21868 2018-04-27  Richard Biener  <rguenther@suse.de>
21870         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
21872 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
21874         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
21875         with Yd constraint. Set "preferred_for_speed" attribute from
21876         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
21877         with Yd constraint.
21878         (*movdi_internal): Ditto.
21879         (movti_interunit splitters): Remove
21880         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
21881         (movdi_interunit splitters): Ditto.
21882         * config/i386/constraints.md (Ye): Remove.
21883         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
21885 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21887         PR target/85512
21888         * config/aarch64/constraints.md (Usg): Limit to 31.
21889         (Usj): Limit to 63.
21891 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
21893         PR tree-optimization/85529
21894         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
21895         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
21896         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
21897         zero extension or masking of the MSB bit.
21898         (optimize_range_tests): Add FIRST_BB argument, pass it through
21899         to optimize_range_tests_var_bound.
21900         (maybe_optimize_range_tests, reassociate_bb): Adjust
21901         optimize_range_tests callers.
21903 2018-04-26  Richard Biener  <rguenther@suse.de>
21904             Jakub Jelinek  <jakub@redhat.com>
21906         * cgraph.h (symbol_table): Just declare debug method here.
21907         * symtab.c (symbol_table::debug): Define.
21909 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
21911         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
21913 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
21915         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
21916         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
21917         (*movdi_internal): Substitute Yi and Yj constraint with x
21918         and Ym and Yn constraint with y constraint.  Update "isa"
21919         attribute and set "preferred_for_speed" attribute from
21920         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
21921         (*movsi_internal): Ditto.
21922         (*movdf_internal): Ditto.
21923         (*movsf_internal): Ditto.
21924         (*zero_extendsidi2): Ditto.
21925         * config/i386/sse.md (vec_set<mode>_0): Ditto.
21926         (sse2_loadld): Ditto.
21927         (*vec_extract<ssevecmodelower>_0): Ditto.
21928         (*vec_extractv4si_0_zext_sse4): Ditto.
21929         (vec_concatv2di): Ditto.
21930         (*vec_dup<mode>): Ditto.
21931         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
21932         * config/i386/constraints.md (Yi): Remove.
21933         (Yj): Remove.
21934         (Ym): Remove.
21935         (Yn): Remove.
21937 2018-04-26  Nathan Sidwell  <nathan@acm.org>
21939         * dumpfile.c (dump_open): New.
21940         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
21941         (dump_finish): Detect stdio/stderr by value not name.
21943 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
21945         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
21947 2018-04-26  Tom de Vries  <tom@codesourcery.com>
21949         PR target/84952
21950         * config/nvptx/nvptx.c (verify_neutering_jumps)
21951         (verify_neutering_labels): New function
21952         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
21954 2018-04-26  Tom de Vries  <tom@codesourcery.com>
21956         PR target/84025
21957         * config/nvptx/nvptx.c (needs_neutering_p): New function.
21958         (nvptx_single): Use needs_neutering_p to skip over insns that do not
21959         need neutering.
21961 2018-04-26  Richard Biener <rguenther@suse.de>
21962             Tom de Vries  <tom@codesourcery.com>
21964         PR lto/85422
21965         * lto-streamer-out.c (output_function): Fixup loops if required to match
21966         discovery done in the reader.
21968 2018-04-26  Richard Biener  <rguenther@suse.de>
21970         PR tree-optimization/85116
21971         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
21972         have a loop exit from the single latch predecessor.  Remove
21973         case of header with just condition.
21974         (ch_base::copy_headers): Exclude infinite loops from any
21975         processing.
21976         (pass_ch::execute): Record exits.
21978 2018-04-26  Richard Biener  <rguenther@suse.de>
21980         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
21981         prologue cost vector and pass it to vect_get_load_cost.
21982         (vect_get_peeling_costs_all_drs): Likewise.
21983         (vect_peeling_hash_get_lowest_cost): Likewise.
21984         (vect_enhance_data_refs_alignment): Likewise.
21986 2018-04-26  Richard Biener  <rguenther@suse.de>
21988         PR middle-end/85450
21989         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
21990         checking of integer<->pointer conversions.
21991         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
21992         sign-/zero-extending pointer types.
21993         (expand_omp_for_static_chunk): Likewise.
21995 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
21996             Jean Lee  <xiaoyur347@gmail.com>
21998         * config/mips/mips.c (mips_asan_shadow_offset): New function.
21999         (TARGET_ASAN_SHADOW_OFFSET): Define.
22000         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
22001         true for -fsanitize=address.
22003 2018-04-25  Mark Wielaard  <mark@klomp.org>
22005         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
22006         shorter ones.
22008 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
22010         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
22011         than "alu", remove explicit "memory" and "imm_disp" attributes.
22012         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
22014         PR middle-end/85414
22015         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
22016         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
22017         gen_lowpart_no_emit.
22019 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
22021         PR target/85473
22022         * config/i386/i386.c (ix86_expand_builtin): Change memory
22023         operand to XI, extend p0 to Pmode.
22024         * config/i386/i386.md: Change unspec volatile and operand
22025         1 mode to XI, change operand 0 mode to P.
22027 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
22029         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
22030         GET_MODE_MASK before any checking.
22031         (nds32_can_use_bset_p): Likewise.
22032         (nds32_can_use_btgl_p): Likewise.
22034 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
22036         * config/nds32/nds32-doubleword.md: New define_split pattern for
22037         illegal register number.
22039 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
22041         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
22043 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
22045         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
22047 2018-04-25  Richard Biener  <rguenther@suse.de>
22049         * lto-streamer.h (LTO_major_version): Bump to 8.
22051 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
22053         * BASE-VER: Set to 9.0.0.
22055 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
22057         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
22058         in __abskf2 and __powikf2.
22060 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22062         PR target/85512
22063         * config/aarch64/constraints.md (Usg, Usj): New constraints.
22064         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
22065         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
22066         Use the above on operand 2.  Reindent.
22067         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
22069 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
22071         PR target/85485
22072         * common/config/i386/i386-common.c (ix86_handle_option): Don't
22073         handle OPT_mcet.
22074         * config/i386/i386.opt (mcet): Removed.
22075         * doc/install.texi: Remove -mcet documentation.
22076         * doc/invoke.texi: Likewise.
22078 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
22080         PR target/85485
22081         * doc/install.texi: Remove -mcet from bootstrap-cet.
22083 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
22085         PR target/85511
22086         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
22087         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
22088         if TARGET_64BIT.
22090         PR target/85503
22091         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
22092         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
22093         containing a CONST_VECTOR.
22095 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
22097         * doc/install.texi: Update newlib dependency for nvptx.
22099 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
22101         PR target/85508
22102         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
22103         instead of INTVAL when shifting x left.
22105 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
22107         PR tree-optimization/85478
22108         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
22109         vect_grouped_store_supported for single element vectors.
22111 2018-04-24  Richard Biener  <rguenther@suse.de>
22113         PR target/85491
22114         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
22115         load cost increase to the case of non-constant step.
22117 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
22119         PR target/84828
22120         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
22121         destination if any_malformed_asm.
22123 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
22125         PR middle-end/85496
22126         * expr.c (store_field): In the bitfield case, if the value comes from
22127         a function call and is returned in registers by means of a PARALLEL,
22128         do not change the mode of the temporary unless BLKmode and VOIDmode.
22130 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
22132         PR rtl-optimization/85423
22133         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
22134         dependencies to debug insns when the previous insn is non-debug.
22136 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
22138         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
22139         enums into a single definition.
22140         (fls): Fix predicates and printing.
22141         (seti): Likewise.
22143 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
22145         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
22146         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
22147         and short u6 immediate.
22148         (check_if_valid_sleep_operand): Remove.
22149         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
22151 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
22153         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
22154         flag_always_save_lp condition.
22155         * config/nds32/nds32.opt (malways-save-lp): New option.
22157 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
22159         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
22160         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
22161         * config/nds32/nds32.h
22162         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
22163         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
22165 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
22167         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
22168         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
22170 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
22171             Chung-Ju Wu  <jasonwucj@gmail.com>
22173         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
22174         Declare.
22175         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
22176         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
22178 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
22180         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
22182 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
22184         * config/nds32/nds32-protos.h (nds32_data_alignment,
22185         nds32_local_alignment): Declare.
22186         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
22187         nds32_local_alignment): New functions.
22188         (TARGET_CONSTANT_ALIGNMENT): Define.
22189         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
22191 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
22193         * config/nds32/nds32.c
22194         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
22195         (TARGET_MODES_TIEABLE_P): Likewise.
22197 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
22199         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
22200         level Ofast and Og.
22202 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
22203             Chung-Ju Wu  <jasonwucj@gmail.com>
22205         * config/nds32/constants.md (unspec_volatile_element): Add enum values
22206         for unaligned access.
22207         * config/nds32/nds32-intrinsic.c: Implementation of expanding
22208         unaligned access.
22209         * config/nds32/nds32-intrinsic.md: Likewise.
22210         * config/nds32/nds32_intrinsic.h: Likewise.
22211         * config/nds32/nds32.h (nds32_builtins): Likewise.
22212         * config/nds32/nds32.opt (munaligned-access): New option.
22213         * config/nds32/nds32.c (nds32_asm_file_start): Display
22214         flag_unaligned_access status.
22216 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
22218         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
22219         -mno-relax is present.
22220         * config/riscv/linux.h (LINK_SPEC): Ditto.
22222 2018-04-20  Martin Sebor  <msebor@redhat.com>
22224         PR c/85365
22225         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
22226         for null pointers.
22227         (gimple_fold_builtin_stxcpy_chk): Same.
22228         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
22230 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
22232         PR target/85456
22233         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
22234         __powikf2 when long double is IEEE 128-bit.
22236 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
22238         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
22239         step to make sure stack always aligned.
22241 2018-04-20  Carl Love  <cel@us.ibm.com>
22243         PR target/83402
22244         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
22245         size check for arg0.
22247 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
22248             Tom de Vries  <tom@codesourcery.com>
22250         PR target/85445
22251         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
22252         Emit insns for calls too.
22253         (nvptx_find_par): Always look for worker-level predecessor insn.
22254         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
22255         calls.
22256         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
22257         (nvptx_process_pars): Propagate frames for calls.
22259 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
22261         PR target/85469
22262         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
22263         Removed.
22264         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
22265         (ix86_handle_option): Don't handle OPT_mibt.
22266         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
22267         __SHSTK__.
22268         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
22269         has_ibt and ibt.
22270         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
22271         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
22272         (ix86_target_macros): Define __CET__ with flag_cf_protection
22273         for -fcf-protection.
22274         * config/i386/i386.c (isa2_opts): Remove -mibt.
22275         * config/i386/i386.h (TARGET_IBT): Removed.
22276         (TARGET_IBT_P): Likewise.
22277         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
22278         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
22279         * config/i386/i386.opt (mcet): Update help message.
22280         (mshstk): Likewise.
22281         (mibt): Removed.
22282         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
22283         -mcet as an alias for -mshstk.
22285 2018-04-20  Richard Biener <rguenther@suse.de>
22287         PR middle-end/85475
22288         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
22289         complexity by forcing a single use of the multiply operand.
22291 2018-04-20  Martin Jambor  <mjambor@suse.cz>
22293         ipa/85449
22294         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
22295         recursion dependency to only apply to non-clones.
22297 2018-04-20  Martin Jambor  <mjambor@suse.cz>
22299         ipa/85447
22300         * ipa-cp.c (create_specialized_node): Check that clones of
22301         self-recursive edges exist during IPA-CP.
22303 2018-04-19  Toon Moene  <toon@moene.org>
22305         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
22306         by -O3.
22308 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
22310         PR tree-optimization/85467
22311         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
22312         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
22313         VECTOR_CST element to type.
22315 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
22317         PR target/85397
22318         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
22319         * config/i386/i386.md (builtin_setjmp_setup): Removed.
22320         (builtin_longjmp): Likewise.
22321         (save_stack_nonlocal): New pattern.
22322         (restore_stack_nonlocal): Likewise.
22324 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
22326         PR target/85404
22327         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
22328         Replace ASM_OUTPUT_LABEL with fprintf.
22330 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
22332         PR target/85417
22333         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
22334         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
22335         * config/i386/i386-c.c (ix86_target_macros_internal): Also
22336         define __IBT__ and __SHSTK__ for -fcf-protection.
22337         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
22338         TARGET_IBT.
22339         (ix86_trampoline_init): Likewise.
22340         (x86_output_mi_thunk): Likewise.
22341         (ix86_notrack_prefixed_insn_p): Likewise.
22342         (ix86_option_override_internal): Don't disallow -fcf-protection.
22343         * config/i386/i386.md (rdssp<mode>): Also enable for
22344         -fcf-protection.
22345         (incssp<mode>): Likewise.
22346         (nop_endbr): Likewise.
22347         * config/i386/i386.opt (mcet): Change help message to built-in
22348         functions only.
22349         (mibt): Likewise.
22350         (mshstk): Likewise.
22351         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
22352         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
22353         enable CET built-in functions.
22355 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
22357         * common/config/i386/i386-common.c
22358         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
22359         OPTION_MASK_ISA_MOVDIRI_UNSET,
22360         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
22361         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
22362         * config.gcc (movdirintrin.h): New header.
22363         * config/i386/cpuid.h (bit_MOVDIRI,
22364         bit_MOVDIR64B): New bits.
22365         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
22366         and -mmvodir64b.
22367         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
22368         (VOID, PVOID, PCVOID)): New function types.
22369         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
22370         __builtin_ia32_directstoreu_u64,
22371         __builtin_ia32_movdir64b): New builtins.
22372         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
22373         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
22374         and -mmovdiri.
22375         (ix86_valid_target_attribute_inner_p): Ditto.
22376         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
22377         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
22378         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
22379         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
22380         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
22381         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
22382         (movdiri<mode>, movdir64b_<mode>): New.
22383         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
22384         * config/i386/immintrin.h: Include movdirintrin.h.
22385         * config/i386/movdirintrin.h: New file.
22386         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
22388 2018-04-19  Richard Biener  <rguenther@suse.de>
22390         PR middle-end/85455
22391         * cfg.c (clear_bb_flags): When loop state says we have
22392         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
22394 2018-04-19  Richard Biener  <rguenther@suse.de>
22396         PR tree-optimization/84737
22397         * tree-vect-data-refs.c (vect_copy_ref_info): New function
22398         copying restrict info.
22399         (vect_setup_realignment): Use it.
22400         * tree-vectorizer.h (vect_copy_ref_info): Declare.
22401         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
22402         the first DR to all generated stores.
22403         (vectorizable_load): Likewise for loads.
22405 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
22407         PR tree-optimization/85446
22408         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
22409         the integral and pointer types to have the same precision.
22411         * doc/install.texi: Document --disable-cet being the default and
22412         --enable-cet=auto.
22414 2018-04-18  Martin Liska  <mliska@suse.cz>
22416         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
22417         style.
22419 2018-04-18  Martin Liska  <mliska@suse.cz>
22421         Revert
22422         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
22424         PR ipa/83983
22425         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
22426         arguments if they are comparable.
22428 2018-04-18  Martin Liska  <mliska@suse.cz>
22430         Revert
22431         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
22433         PR lto/84805
22434         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
22435         incomplete types.
22437 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
22439         PR target/85388
22440         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
22441         ENDBR after calling __morestack.
22443 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
22445         PR jit/85384
22446         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
22447         by using gcc_base_ver to generate a gcc_driver_version, and use
22448         it when generating GCC_DRIVER_NAME.
22449         * configure: Regenerate.
22451 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
22453         PR target/81084
22454         * config.gcc: Obsolete powerpc*-*-*spe*.
22456 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
22458         PR debug/84637
22459         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
22460         (stabstr_D): Change type of unum from unsigned int to
22461         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
22462         type.
22464 2018-04-17  Jim Wilson  <jimw@sifive.com>
22466         PR 84856
22467         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
22468         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
22469         Set arg_pointer_offset after using pretend_args_size.
22471 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
22473         PR rtl-optimization/85431
22474         * dse.c (record_store): Ignore zero width stores.
22476         PR sanitizer/85230
22477         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
22478         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
22479         __builtin_stack_restore rather than after it.
22480         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
22481         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
22482         argument instead of virtual_dynamic_stack_rtx.
22484 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22486         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
22487         New prototype.
22488         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
22489         Add note to error message to explain internal mapping of overloaded
22490         built-in function name to non-overloaded built-in function name.
22491         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
22492         function.
22494 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
22496         PR target/85424
22497         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
22498         where the inputs overlap with the output.
22500 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
22502         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
22503         (=v, v) alternative and explicit "memory" attribute.
22504         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
22505         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
22506         attributes.
22507         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
22508         "sselog1" type instead of "sselog".
22509         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
22510         "sselog".  Remove explicit "memory" attribute.
22511         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
22512         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
22513         attributes.
22514         (vec_extract_hi_v32hi): Merge all alternatives into one, use
22515         "sselog1" type instead of "sselog".  Remove explicit "memory"
22516         attribute.
22517         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
22518         use "sselog1" type instead of "sselog".  Remove explicit "memory"
22519         attribute.
22520         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
22521         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
22522         attributes.
22523         (vec_extract_hi_v64qi): Merge all alternatives into one, use
22524         "sselog1" type instead of "sselog".  Remove explicit "memory"
22525         attribute.
22526         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
22527         use "sselog1" type instead of "sselog".  Remove explicit "memory"
22528         attribute.
22530         PR target/85430
22531         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
22533         PR middle-end/85414
22534         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
22535         on a SUBREG.
22537 2018-04-17  Martin Jambor  <mjambor@suse.cz>
22539         PR ipa/85421
22540         * ipa-cp.c (create_specialized_node): Call
22541         expand_all_artificial_thunks if necessary.
22543 2018-04-17  Martin Liska  <mliska@suse.cz>
22545         PR lto/85405
22546         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
22547         in message, remote space in between '_G' and '('.
22549 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
22551         PR target/85281
22552         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
22553         avx512f_vmcmp<mode>3<round_saeonly_name>,
22554         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
22555         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
22556         avx512f_rndscale<mode><round_saeonly_name>,
22557         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
22558         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
22559         Use %<iptr>2 instead of %2 for -masm=intel.
22560         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
22561         avx512f_vcvttss2usi<round_saeonly_name>,
22562         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
22563         -masm=intel.
22564         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
22565         avx512f_vcvttsd2usi<round_saeonly_name>,
22566         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
22567         Use %q1 instead of %1 for -masm=intel.
22568         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
22569         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
22570         of %3 for -masm=intel.
22571         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
22572         -masm=intel.
22573         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
22574         -masm=intel.
22575         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
22576         -masm=intel.
22577         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
22578         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
22579         %g1.
22580         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
22581         -masm=intel.
22582         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
22583         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
22584         %g1 and one with %0 and %1.
22585         (avx512er_vmrcp28<mode><round_saeonly_name>,
22586         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
22587         %1 for -masm=intel.
22588         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
22589         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
22590         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
22591         of %0 and %{%4%} for -masm=intel.
22592         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
22593         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
22594         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
22595         order of %0 and %{%5%}%{z%} for -masm=intel.
22597 2018-04-17  Jan Hubicka  <jh@suse.cz>
22599         PR lto/85405
22600         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
22602 2018-04-17  Martin Liska  <mliska@suse.cz>
22604         PR ipa/85329
22605         * multiple_target.c (create_dispatcher_calls): Set apostrophes
22606         for target_clone error message.  Make default implementation
22607         clone to be a local declaration.
22608         (separate_attrs): Add new argument and check for an empty
22609         string.
22610         (expand_target_clones): Handle it.
22611         (ipa_target_clone): Make redirection just for target_clones
22612         functions.
22614 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
22615             Tom de Vries  <tom@codesourcery.com>
22617         PR middle-end/84955
22618         * omp-expand.c (expand_oacc_for): Add dummy false branch for
22619         tiled basic blocks without omp continue statements.
22621 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
22623         PR target/83660
22624         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
22625         vec_extract expression as having side effects to make sure it gets
22626         a cleanup point.
22628 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
22630         PR target/85403
22631         * config/i386/i386.c (get_builtin_code_for_version): Check
22632         error_mark_node.
22634 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
22636         PR target/84331
22637         * config.gcc: Support "skylake".
22638         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
22639         PROCESSOR_SKYLAKE.
22640         * config/i386/i386.c (m_SKYLAKE): Define.
22641         (processor_target_table): Add "skylake".
22642         (ix86_option_override_internal): Add "skylake".
22643         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
22644         PROCESSOR_CANNONLAKE.
22645         (get_builtin_code_for_version): Fix priority for
22646         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
22647         PROCESSOR_SKYLAKE-AVX512.
22648         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
22649         (processor_type): Add PROCESSOR_SKYLAKE.
22651 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
22652             Jason Merrill  <jason@redhat.com>
22654         PR c++/85112
22655         * convert.c (convert_to_integer_1): Use direct recursion for
22656         enumeral types and types with a precision less than the number
22657         of bits in their mode.
22659 2018-04-16  Julia Koval  <julia.koval@intel.com>
22661         PR target/84413
22662         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
22663         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
22665 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
22667         PR target/85293
22668         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
22669         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
22670         and -mno-direct-move.
22672 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
22674         PR target/83402
22675         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
22676         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
22677         Ensure negative shifts result in {0}.
22679 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
22681         PR rtl-optimization/79916
22682         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
22683         regs (if any) to define how to gnerate SD moves when LRA is in
22684         progress.
22686 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
22688         PR rtl-optimization/85393
22689         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
22690         * except.c (expand_dw2_landing_pad_for_region): Make static.
22691         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
22692         a label and unconditional jump to old_bb, rather than
22693         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
22694         basic block.
22696         PR rtl-optimization/85376
22697         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
22698         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
22699         instead of a specific value.
22701 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
22702             Bin Cheng  <bin.cheng@arm.com>
22704         PR tree-optimization/82965
22705         PR tree-optimization/83991
22706         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
22707         by_profile_only parameter.
22708         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
22709         information if the loop was predicted to iterate too many times.
22710         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
22712 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
22714         PR lto/71991
22715         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
22716         always inline.
22718 2018-04-13  Martin Liska  <mliska@suse.cz>
22719             Jakub Jelinek  <jakub@redhat.com>
22721         PR middle-end/81657
22722         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
22723         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
22724         * builtins.c (expand_builtin_memory_copy_args): Use
22725         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
22726         handle dest_addr == pc_rtx.
22728 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
22730         PR target/85291
22731         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
22732         asked to not generate direct moves.
22733         (fix_trunc<mode>si2_stfiwx): Similar.
22734         (fix_trunc<mode>si2_internal): Similar.
22736 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
22738         PR debug/83157
22739         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
22740         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
22741         lookup if dest in some wider mode is known to be const0_rtx and
22742         if so, record permanent equivalence for it to be ZERO_EXTEND of
22743         the narrower mode destination.
22745 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
22747         * lto-streamer-out.c (output_function): Revert 259346.
22748         * omp-expand.c (expand_oacc_for): Likewise.
22750 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
22752         PR rtl-optimization/85354
22753         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
22754         * sel-sched.c (sel_global_init): ... here.
22756 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
22758         PR target/85238
22759         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
22760         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
22761         mode for PE-COFF targets.
22762         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
22763         (i386_pe_asm_lto_end): Likewise.
22764         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
22765         (TARGET_ASM_LTO_END): Likewise.
22766         * config/i386/winnt.c (saved_debug_info_level): New static variable.
22767         (i386_pe_asm_lto_start): New function.
22768         (i386_pe_asm_lto_end): Likewise.
22770 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
22771             Richard Biener  <rguenther@suse.de>
22773         PR middle-end/84955
22774         * lto-streamer-out.c (output_function): Fix CFG loop state before
22775         streaming out.
22776         * omp-expand.c (expand_oacc_for): Handle calls to internal
22777         functions like regular functions.
22779 2018-04-12  Richard Biener  <rguenther@suse.de>
22781         PR lto/85371
22782         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
22783         for the early LTO debug to properly generate references to it
22784         during DIE emission.  Do not re-use that for the skeleton for
22785         split-dwarf.
22786         (dwarf2out_early_finish): Likewise.
22788 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
22790         PR target/85328
22791         * config/i386/sse.md
22792         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
22793         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
22794         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
22795         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
22796         and output is a reg, avoid creating invalid lowpart subreg, but
22797         instead split into a 512-bit move.  Don't split if not AVX512VL,
22798         input is xmm16+ reg and output is a mem.
22799         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
22800         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
22801         xmm16+ reg and output is a mem.
22803 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22805         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
22806         also for flag_dwarf2_cfi_asm.
22808 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
22810         PR rtl-optimization/85342
22811         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
22812         a bool scalar var inside of the loop instead.  Don't try to update
22813         recog_data.operand after failed apply_change_group.
22815 2018-04-12  Tom de Vries  <tom@codesourcery.com>
22817         PR target/85296
22818         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
22819         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
22820         array with flexible array member as array without given dimension.
22821         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
22822         argument for undefined param to true.
22824 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
22826         PR target/85321
22827         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
22828         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
22829         from PowerPC section.
22830         * config/rs6000/sysv4.opt (mcall-): Improve help text.
22831         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
22832         help text that is too long.
22833         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
22834         help text that is too long.
22835         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
22836         help text that is too long.
22838 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
22840         * config/alpha/alpha.md (stack_probe_internal): Rename
22841         from "probe_stack".  Update all callers.
22843 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
22845         PR rtl-optimization/84566
22846         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
22847         sched_macro_fuse_insns.
22849 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
22851         PR target/84301
22852         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
22853         (compute_block_dependences): ... from here.
22855 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
22857         PR tree-optimization/85331
22858         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
22859         from int to HOST_WIDE_INT.
22861 2018-04-11  Martin Jambor  <mjambor@suse.cz>
22863         PR ipa/84149
22864         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
22865         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
22866         not the same as the source val.
22867         (cgraph_edge_brings_value_p): New parameter.
22868         (gather_edges_for_value): Pass destination value to
22869         cgraph_edge_brings_value_p.
22870         (perhaps_add_new_callers): Likewise.
22871         (get_info_about_necessary_edges): Likewise and exclude values brought
22872         only by self-recursive edges.
22873         (create_specialized_node): Redirect only clones of self-calling edges.
22874         (+self_recursive_pass_through_p): New function.
22875         (find_more_scalar_values_for_callers_subset): Use it.
22876         (find_aggregate_values_for_callers_subset): Likewise.
22877         (known_aggs_to_agg_replacement_list): Removed.
22878         (decide_whether_version_node): Re-calculate known constants for all
22879         remaining context clones.
22881 2018-04-11  Richard Biener  <rguenther@suse.de>
22883         PR lto/85339
22884         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
22885         from early DWARF output.
22886         (dwarf2out_early_finish): Output line info unconditionally into
22887         early DWARF and add reference to it.
22889 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
22891         PR target/85281
22892         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
22893         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
22894         other than V2DFmode using iptr mode attribute.
22895         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
22897 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
22899         PR rtl-optimization/84659
22900         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
22902 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
22904         PR debug/85302
22905         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
22906         SIZEP is NULL.
22907         (output_loc_list): Pass address of a dummy size variable even in the
22908         locview handling loop.
22909         (index_location_lists): Add comment on why skip_loc_list_entry can't
22910         call size_of_locs.
22912 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
22914         PR target/85261
22915         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
22916         into register.
22918 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
22920         PR target/85321
22921         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
22922         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
22923         and -mstring-compare-inline-limit.
22925 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
22927         PR target/85287
22928         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
22929         for stack clash protection in a register whenever we need it to be in
22930         a register.
22932 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
22934         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
22935         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
22937 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
22939         PR target/85321
22940         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
22941         the help text.
22942         (mlong-double-): Ditto.
22943         * config/rs6000/sysv4.opt (msdata=): Ditto.
22944         (mtls-size=): Ditto.
22946 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22948         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
22949         erroneous entries for
22950         "vector int vec_ldl (int, long int *)", and
22951         "vector unsigned int vec_ldl (int, unsigned long int *)".
22952         Add comments and entries for
22953         "vector bool char vec_ldl (int, bool char *)",
22954         "vector bool short vec_ldl (int, bool short *)",
22955         "vector bool int vec_ldl (int, bool int *)",
22956         "vector bool long long vec_ldl (int, bool long long *)",
22957         "vector pixel vec_ldl (int, pixel *)",
22958         "vector long long vec_ldl (int, long long *)",
22959         "vector unsigned long long vec_ldl (int, unsigned long long *)".
22960         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
22961         type tree bool_long_long_type_node and correct definition of
22962         bool_V2DI_type_node to make reference to this new type tree.
22963         (rs6000_mangle_type): Replace erroneous reference to
22964         bool_long_type_node with bool_long_long_type_node.
22965         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
22966         comments to emphasize sign distinctions for char and int types and
22967         replace RS6000_BTI_bool_long constant with
22968         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
22969         use of RS6000_BTI_pixel.
22970         (bool_long_type_node): Remove this macro definition.
22971         (bool_long_long_type_node): New macro definition
22973 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
22975         PR rtl-optimization/85300
22976         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
22977         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
22978         simplify_unary_operation fails.
22980 2018-04-10  Martin Liska  <mliska@suse.cz>
22982         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
22983         cgraph_edge and ipa_ref.
22985 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
22987         PR target/85177
22988         PR target/85255
22989         * config/i386/sse.md
22990         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
22991         computation of the VEC_MERGE selector from mask.
22992         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
22993         Fix decoding of the VEC_MERGE selector into mask.
22995 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
22997         PR tree-optimization/85286
22998         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
23000 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
23002         * final.c (final_1): Set insn_last_address as well as
23003         insn_current_address.
23005 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23007         PR target/85173
23008         * explow.c (emit_stack_probe): Call validize_mem on memory location
23009         before passing it to gen_probe_stack.  Create address operand and
23010         legitimize it for the probe_stack_address case.
23012 2018-04-09  Jan Hubicka  <jh@suse.cz>
23014         PR lto/85078
23015         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
23016         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
23017         * tree.c (free_lang_data_in_type): Fix handling of binfos;
23018         walk basetypes.
23019         (free_lang_data): Rebuild type inheritance graph.
23021 2018-04-09  Martin Sebor  <msebor@redhat.com>
23023         * invoke.texi (-finline-small-functions): Mention other optimization
23024         options.
23025         (-findirect-inlining, -fpartial-inlining): Same.
23026         (-finline-functions-called-once): Same.
23027         (-freorder-blocks-and-partition): Same.
23029 2018-04-09  Jan Hubicka  <jh@suse.cz>
23031         PR rtl/84058
23032         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
23033         jumps; choose last target that matches the criteria (i.e.
23034         no partition changes for non-crossing jumps).
23035         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
23036         support for redirecting crossing jumps to non-crossing.
23038 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
23040         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
23041         also for naked functions.
23043 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
23045         * config/arc/arc.md (add_shift): New pattern.
23046         (add_shift2): Likewise.
23047         (sub_shift): Likewise.
23048         (sub_shift_cmp0_noout): Likewise.
23049         (compare_si_ashiftsi): Likewise.
23050         (xbfu_cmp0_noout): New combine pattern.
23051         (xbfu_cmp0"): Likewise.
23052         (movsi_set_cc_insn): Place the predicable variant first.
23053         (commutative_binary_cmp0_noout): Remove clobber.
23054         (commutative_binary_cmp0): New pattern.
23055         (noncommutative_binary_cmp0): Likewise.
23056         (noncommutative_binary_cmp0_noout): Likewise.
23057         (noncommutative_binary_comparison_result_used): Removed.
23058         (rsub_cmp0): New pattern.
23059         (rsub_cmp0_noout): Likewise.
23060         (extzvsi): Changed, keep only meaningful variants.
23061         (SQH, SEZ): New iterators.
23062         (SQH_postfix): New mode attribute.
23063         (SEZ_prefix): New code attribute.
23064         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
23065         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
23066         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
23067         of numerical value.
23068         (noncommutative_operator): Check the availability of barrel
23069         shifter option.
23071 2018-04-09  Richard Biener  <rguenther@suse.de>
23073         PR tree-optimization/85284
23074         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
23075         Only use the niter constraining form of simple_iv when the exit
23076         is always executed.
23078 2018-04-09  Tom de Vries  <tom@codesourcery.com>
23080         PR target/84041
23081         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
23082         (define_expand "*memory_barrier"): New define_expand.
23083         (define_insn "memory_barrier"): New insn.
23085 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
23087         PR rtl-optimization/80463
23088         PR rtl-optimization/83972
23089         PR rtl-optimization/83480
23091         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
23092         correct producer for the insn.
23093         (tidy_control_flow): Fixup seqnos in case of debug insns.
23095 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
23097         PR rtl-optimization/83913
23099         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
23100         different sched-times when merging exprs.
23102 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
23104         PR rtl-optimization/83962
23106         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
23107         tidy_fallthru_edge and tidy_control_flow.
23109 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
23111         PR rtl-optimization/83530
23113         * sel-sched.c (force_next_insn): New global variable.
23114         (remove_insn_for_debug): When force_next_insn is true, also leave only
23115         next insn in the ready list.
23116         (sel_sched_region): When the region wasn't scheduled, make another pass
23117         over it with force_next_insn set to 1.
23119 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
23121         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
23122         into tm_file.
23123         * config/nds32/constants.md (unspec_volatile_element): Add enum values
23124         for interrupt control.
23125         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
23126         functions for interrupt control.
23127         * config/nds32/nds32-intrinsic.md: Likewise.
23128         * config/nds32/nds32_intrinsic.h: Likewise.
23129         * config/nds32/nds32.h (nds32_builtins): Likewise.
23131 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
23133         * config/nds32/nds32.c (nds32_init_machine_status,
23134         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
23135         strict_aligned_p field.
23136         (nds32_expand_to_rtl_hook): New function.
23137         (TARGET_EXPAND_TO_RTL_HOOK): Define.
23138         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
23140 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
23141             Chung-Ju Wu  <jasonwucj@gmail.com>
23143         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
23144         * config/nds32/nds32-n7.md: New file.
23145         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
23146         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
23147         pipeline.
23148         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
23149         * config/nds32/nds32.md (pipeline_model): Add n7.
23150         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
23151         * config/nds32/pipelines.md: Include n7 settings.
23153 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
23154             Chung-Ju Wu  <jasonwucj@gmail.com>
23156         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
23157         * config/nds32/nds32-e8.md: New file.
23158         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
23159         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
23160         pipeline.
23161         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
23162         * config/nds32/nds32.md (pipeline_model): Add e8.
23163         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
23164         * config/nds32/pipelines.md: Include e8 settings.
23166 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
23167             Chung-Ju Wu  <jasonwucj@gmail.com>
23169         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
23170         * config/nds32/nds32-n8.md: New file.
23171         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
23172         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
23173         pipeline.
23174         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
23175         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
23176         * config/nds32/nds32.md (pipeline_model): Add n8.
23177         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
23178         * config/nds32/pipelines.md: Include n8 settings.
23180 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
23181             Chung-Ju Wu  <jasonwucj@gmail.com>
23183         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
23184         * config/nds32/nds32-n9-2r1w.md: New file.
23185         * config/nds32/nds32-n9-3r2w.md: New file.
23186         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
23187         nds32_register_ports): New or modify for cpu n9.
23188         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
23189         pipeline.
23190         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
23191         * config/nds32/nds32-utils.c: New file.
23192         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
23193         TARGET_MUL_SLOW): Define.
23194         * config/nds32/nds32.md (pipeline_model): New attribute.
23195         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
23196         New options that support cpu n9.
23197         * config/nds32/pipelines.md: Include n9 settings.
23198         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
23200 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
23202         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
23203         information if necessary.
23204         (output_cond_branch_compare_zero): Likewise.
23205         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
23206         (nds32_target_alignment): Refine for alignment.
23207         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
23208         (FUNCTION_BOUNDARY): Modify.
23209         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
23210         align case.
23211         * config/nds32/nds32.opt (malways-align, malign-functions): New.
23213 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
23215         * config/nds32/constants.md (unspec_volatile_element): Add values for
23216         TLB operation and data prefetch.
23217         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
23218         functions for TLB operation and data prefetch.
23219         * config/nds32/nds32-intrinsic.md: Likewise.
23220         * config/nds32/nds32_intrinsic.h: Likewise.
23221         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
23222         (nds32_print_operand): Likewise.
23223         * config/nds32/nds32.h (nds32_builtins): Likewise.
23225 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
23226         Andrew Pinski <pinsika@gcc.gnu.org>
23228         PR middle-end/82976
23229         * match.pd: Use constant_boolean_node of correct type instead of
23230         boolean_true_node or boolean_false_node for simplifying
23231         pointer comparisons to zero.
23233 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
23235         PR tree-optimization/80021
23236         * tree.c (verify_type_variant): Make error call in verify_variant_match
23237         translatable and remove final full stop.
23239 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
23241         * config/nds32/constants.md (unspec_volatile_element): Add
23242         UNSPEC_VOLATILE_EH_RETURN.
23243         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
23244         nds32_output_stack_pop): Support dwarf exception handling process.
23245         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
23246         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
23247         exception handling process.
23248         (nds32_compute_stack_frame): Likewise.
23249         (nds32_return_addr_rtx): Likewise.
23250         (nds32_initial_elimination_offset): Likewise.
23251         (nds32_expand_prologue): Likewise.
23252         (nds32_expand_epilogue): Likewise.
23253         (nds32_dynamic_chain_address): New function.
23254         * config/nds32/nds32.h (machine_function): Add fields for dwarf
23255         exception handling.
23256         (DYNAMIC_CHAIN_ADDRESS): Define.
23257         (EH_RETURN_DATA_REGNO): Define.
23258         (EH_RETURN_STACKADJ_RTX): Define.
23259         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
23260         patterns for dwarf exception handling.
23262 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
23264         * config/nds32/nds32.h: Clean up obsolete macros.
23266 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
23268         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
23269         Add enum values for particular instructions.
23270         * config/nds32/nds32-intrinsic.c: Implementation of expanding
23271         particular intrinsic functions.
23272         * config/nds32/nds32-intrinsic.md: Likewise.
23273         * config/nds32/nds32_intrinsic.h: Likewise.
23274         * config/nds32/nds32.h (nds32_builtins): Likewise.
23275         * config/nds32/nds32.md (type): Add pbsad and pbsada.
23276         (btst, ave): New patterns for particular instructions.
23278 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
23280         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
23281         Add enum values for atomic load/store and memory sync.
23282         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
23283         and memory sync.
23284         * config/nds32/nds32-intrinsic.md: Likewise.
23285         * config/nds32/nds32_intrinsic.h: Likewise.
23286         * config/nds32/nds32.h (nds32_builtins): Likewise.
23288 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
23290         PR tree-optimization/85257
23291         * fold-const.c (native_encode_vector): If not all elts could fit
23292         and off is -1, return 0 rather than offset.
23293         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
23294         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
23295         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
23296         adjust buffer in native_interpret_expr call.
23298 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
23300         * config/nds32/constants.md (unspec_volatile_element): Add cache
23301         control enum values.
23302         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
23303         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
23304         * config/nds32/nds32.c (nds32_cctl_names): New.
23305         (nds32_print_operand): Handle cache control register names.
23306         * config/nds32/nds32.h (nds32_builtins): New enum values.
23307         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
23308         macros.
23309         * config/nds32/nds32.md (type): Add mmu.
23310         * config/nds32/pipelines.md (simple_insn): Add mmu.
23312 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
23314         * config/nds32/nds32.md (type): Remove call.
23315         * config/nds32/pipelines.md (simple_insn): Likewise.
23317 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
23319         * config/nds32/constants.md (unspec_volatile_element): Add
23320         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
23321         UNSPEC_VOLATILE_FMFCFG.
23322         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
23323         description for fmfcfg and fmfcsr.
23324         (bdesc_1arg): Add fmtcsr.
23325         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
23326         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
23327         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
23328         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
23329         unspec_fmfcfg): New patterns.
23330         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
23331         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
23332         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
23333         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
23334         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
23335         __nds32__fmfcfg): Define.
23337 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
23339         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
23340         intrinsic register names.
23341         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
23342         intrinsic register enum values and macros.
23344 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
23346         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
23347         for load/store addressing form.
23348         (nds32_print_operand_address): Likewise.
23350 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
23352         PR target/85196
23353         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
23354         based on LABEL_REF.  Remove useless assertion.
23355         (pic_address_needs_scratch): Fix formatting.
23356         (sparc_legitimize_pic_address): Minor tweaks.
23357         (sparc_delegitimize_address): Adjust assertion accordingly.
23358         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
23359         into symbolic_operand.
23360         (movsi_high_pic_label_ref): Likewise.
23361         (movsi_lo_sum_pic_label_ref): Likewise.
23362         (movdi_pic_label_ref): Likewise.
23363         (movdi_high_pic_label_ref): Likewise.
23364         (movdi_lo_sum_pic_label_ref): Likewise.
23366 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
23368         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
23369         custom LIB_SPEC setup.
23371 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
23372             Kito Cheng  <kito.cheng@gmail.com>
23374         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
23375         * config/riscv/freebsd.h: New.
23377 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
23379         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
23380         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
23381         file.
23383 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
23384             Kito Cheng  <kito.cheng@gmail.com>
23386         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
23387         nds32_output_call, nds32_symbol_binds_local_p): New functions.
23388         * config/nds32/nds32-protos.h (nds32_output_call,
23389         nds32_output_return): Declare.
23390         * config/nds32/nds32.md: Refine all the call and return patterns.
23392 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
23394         PR debug/85252
23395         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
23396         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
23398         PR rtl-optimization/84872
23399         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
23400         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
23401         EDGE_CROSSING edge.
23403 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
23405         * expr.c (copy_blkmode_to_reg): Revert 254862.
23406         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
23408 2018-04-06  Richard Biener  <rguenther@suse.de>
23410         PR middle-end/85244
23411         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
23412         after seeing a component reference with an adjacent field.  Treat
23413         refs to arrays at struct end of external decls similar to
23414         refs to unconstrained commons.
23416 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
23418         PR sanitizer/85213
23419         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
23420         look through SAVE_EXPRs with non-side-effects argument.  Adjust
23421         recursive calls.
23422         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
23423         save_p here.
23425 2018-04-06  Richard Biener  <rguenther@suse.de>
23427         PR middle-end/85180
23428         * alias.c (find_base_term): New wrapper around find_base_term
23429         unwinding CSELIB_VAL_PTR changes.
23430         (find_base_term): Do not restore CSELIB_VAL_PTR during the
23431         recursion.
23433 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
23435         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
23436         instructions.
23437         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
23438         constant definitions.
23439         ("nop"): lr 0,0 -> nopr r0
23440         ("nop_lr0", "nop_lr1"): New insn definitions.
23442 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
23444         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
23445         NDS32_V3PUSH_AVAILABLE_P macro.
23447 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
23448             Chung-Ju Wu  <jasonwucj@gmail.com>
23450         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
23451         (nds32*-*-*): Add float and fpu_config into supported_defaults.
23452         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
23453         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
23454         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
23455         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
23456         * config/nds32/constraints.md: New constraints and checking for hard
23457         float configuration.
23458         * config/nds32/iterators.md: New mode iterator and attribute for hard
23459         float configuration.
23460         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
23461         patterns.
23462         * config/nds32/nds32-fpu.md: New file.
23463         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
23464         deal with hard float code generation.
23465         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
23466         ARCH_V3S.
23467         (abi_type, float_reg_number): New enum type.
23468         * config/nds32/nds32-predicates.c: New predicates for hard float.
23469         * config/nds32/nds32-protos.h: Declare functions for hard float.
23470         * config/nds32/nds32.c: Implementation for hard float configuration.
23471         * config/nds32/nds32.h: Definitions for hard float configuration.
23472         * config/nds32/nds32.md: Include hard float machine description and
23473         modify patterns for hard float configuration.
23474         * config/nds32/nds32.opt: New options for hard float configuration.
23475         * config/nds32/predicates.md: New predicates for hard float
23476         configuration.
23478 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
23480         * common/config/nds32/nds32-common.c
23481         (nds32_option_optimization_table): Enable -mreleax-hint by default.
23483 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
23485         PR middle-end/85195
23486         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
23487         CONSTRUCTOR_ELT (ctor, ...)->value.
23489 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
23491         PR target/85193
23492         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
23494 2018-04-05  Tom de Vries  <tom@codesourcery.com>
23496         PR target/85204
23497         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
23498         cond jump.
23500 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
23501             Kito Cheng  <kito.cheng@gmail.com>
23503         * config/nds32/constraints.md (U33): Fine-tune checking condition.
23504         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
23505         * config/nds32/nds32.h (nds32_16bit_address_type): Add
23506         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
23508 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
23509             Kito Cheng  <kito.cheng@gmail.com>
23511         * config/nds32/constraints.md (Ufe): New memory constraint.
23512         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
23513         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
23514         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
23515         operands.
23516         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
23517         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
23519 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
23521         * config/nds32/nds32.md: Use optimize_size in the condition for
23522         alu-shift instructions.
23524 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
23526         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
23528 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
23530         * config/nds32/nds32.md (negsi2): Refine pattern.
23532 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
23533             Chung-Ju Wu  <jasonwucj@gmail.com>
23535         * config/nds32/iterators.md (shift_rotate): New code iterator.
23536         (shift): New code attribute.
23537         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
23538         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
23539         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
23540         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
23541         bit-wise operations.
23542         (andsi3, *andsi3): Ditto.
23543         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
23544         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
23545         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
23546         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
23547         nds32_ior_operand, nds32_xor_operand): New predicates.
23549 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
23551         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
23552         (addsi3, subsi3): ... this.
23554 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
23556         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
23558 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
23560         * config/nds32/nds32.md: Adjust indention.
23562 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
23564         * config/nds32/nds32.md (feature): New attribute.
23566 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
23568         * config/nds32/nds32.md (subtype): New attribute.
23570 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23572         PR target/85203
23573         * config/arm/arm-builtins.c (arm_expand_builtin): Change
23574         expansion to perform a bitwise AND of the argument followed by a
23575         boolean negation of the result.
23577 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
23579         PR rtl-optimization/84878
23580         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
23581         the basic block.  Assert the use reference is not artificial and that
23582         it has an associated insn.
23584 2018-04-04  Michael Matz  <matz@suse.de>
23586         * builtins.c (compute_objsize): Pass correct operand
23587         to array_at_struct_end_p.
23589 2018-04-04  Richard Biener  <rguenther@suse.de>
23591         PR lto/85176
23592         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
23593         from contexts for DINFO_LEVEL_TERSE and below.
23595 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
23597         * config/nds32/nds32-doubleword.md (move_<mode>): Require
23598         resiter_operand condition.
23599         * config/nds32/nds32.md (*move<mode>): Ditto.
23601 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
23602             Monk Chiang  <sh.chiang04@gmail.com>
23604         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
23606 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
23608         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
23610 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
23611             Kito Cheng  <kito.cheng@gmail.com>
23613         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
23614         nds32_cond_code_str, output_cond_branch,
23615         output_cond_branch_compare_zero, nds32_expand_cbranch,
23616         nds32_expand_cstore, nds32_expand_movcc,
23617         nds32_output_cbranchsi4_equality_zero,
23618         nds32_output_cbranchsi4_equality_reg,
23619         nds32_output_cbranchsi4_equality_reg_or_const_int,
23620         nds32_output_cbranchsi4_greater_less_zero: New functions.
23621         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
23622         nds32_expand_cstore, nds32_expand_movcc,
23623         nds32_output_cbranchsi4_equality_zero,
23624         nds32_output_cbranchsi4_equality_reg,
23625         nds32_output_cbranchsi4_equality_reg_or_const_int,
23626         nds32_output_cbranchsi4_greater_less_zero): Declare.
23627         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
23628         nds32_rimm11s_operand): New predicates.
23629         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
23630         * config/nds32/nds32.md: Rewrite all the branch and conditional move
23631         patterns.
23633 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
23635         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
23636         * config/nds32/nds32.md: Ditto.
23637         * config/nds32/pipelines.md: Ditto.
23639 2018-04-04  Richard Biener  <rguenther@suse.de>
23641         PR tree-optimization/85168
23642         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
23643         propagating abnormals.
23645 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
23647         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
23649 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
23650             Kito Cheng  <kito.cheng@gmail.com>
23652         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
23653         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
23654         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
23655         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
23656         * config/nds32/nds32.md (sibcall_internal): New.
23657         (sibcall_register): Remove.
23658         (sibcall_immediate): Remove.
23659         (sibcall_value_internal): New.
23660         (sibcall_value_register): Remove.
23661         (sibcall_value_immediate): Remove.
23662         * config/nds32/predicates.md (nds32_general_register_operand): New.
23663         (nds32_call_address_operand): New.
23665 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
23667         PR rtl-optimization/85167
23668         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
23669         bb_defs if *split_p, instead preinitialize it to NULL.
23671         PR tree-optimization/85156
23672         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
23673         evaluating the argument multiple times.
23675 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
23677         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
23678         than vector.
23679         (_mm_cvtpd_ps): Likewise.
23680         (_mm_cvttpd_epi32): Likewise.
23681         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
23682         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
23683         vector, pixel, and bool following altivec.h include.
23685 2018-04-03  Martin Sebor  <msebor@redhat.com>
23687         * doc/extend.texi (Common Function Attributes): Clarify.
23688         (const attribute): Likewise.
23689         (pure attribute): Likewise.
23691 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
23693         PR target/85169
23694         * config/i386/i386.c (ix86_expand_vector_set): Use
23695         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
23697 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
23699         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
23700         instructions when changing rounding bits to preserve precision bits
23701         in the x87 control word.
23703 2018-04-03  Martin Liska  <mliska@suse.cz>
23705         PR tree-optimization/82491
23706         * rtl.h (strip_offset_and_add): Replace += suboffset with
23707         poly_uint64 () + suboffset.
23709 2018-03-29  Martin Liska  <mliska@suse.cz>
23710             Martin Jambor  <mjambor@suse.cz>
23712         PR ipa/84947
23713         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
23714         param_type is not an integral or pointer type.
23716 2018-04-03  Richard Biener  <rguenther@suse.de>
23718         * sese.h (recompute_all_dominators): Remove.
23720 2018-04-02  Martin Sebor  <msebor@redhat.com>
23722         * doc/invoke.texi (-Wrestrict): Fix typos.
23724 2018-04-02  Jim Wilson  <jimw@sifive.com>
23726         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
23727         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
23728         (<optab>di3, <optab>si3_extend): Likewise.
23729         (<optab>si3_mask, <optab>si3_mask_1): New.
23730         (<optab>di3_mask, <optab>di3_mask_1): New.
23731         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
23732         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
23733         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
23735 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
23737         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
23738         example.
23740 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
23742         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
23743         (nds32_canonicalize_comparison): New function.
23745 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
23746             Kito Cheng  <kito.cheng@gmail.com>
23747             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
23749         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
23750         * config/nds32/constants.md (unspec_volatile_element): Add
23751         UNSPEC_VOLATILE_RELAX_GROUP.
23752         * config/nds32/nds32-relax-opt.c: New file.
23753         * config/nds32/nds32-predicates.c
23754         (nds32_symbol_load_store_p): New function.
23755         * config/nds32/nds32-protos.h
23756         (nds32_symbol_load_store_p): Declare function.
23757         (make_pass_nds32_relax_opt): Declare new rtl pass function.
23758         * config/nds32/nds32.c
23759         (nds32_register_pass): New function to register pass.
23760         (nds32_register_passes): New function to register passes.
23761         * config/nds32/nds32.md (relax_group): New pattern.
23762         * config/nds32/nds32.opt (mrelax-hint): New option.
23763         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
23765 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
23767         * config/nds32/t-nds32: Modify files dependency.
23769 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
23771         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
23772         (PROFILE_HOOK): Define its implementation.
23774 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
23776         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
23777         type and 32-bit size.
23779 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
23781         PR middle-end/85090
23782         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
23783         (V_128_256): New mode iterator.
23784         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
23785         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
23786         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
23787         of V.
23788         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
23789         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
23791 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
23793         PR target/83315
23794         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
23795         NaN inputs correctly.
23797 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
23799         PR target/80546
23800         * config/rs6000/vsx.md (??r): New mode attribute.
23801         (*vsx_mov<mode>_64bit): Use it.
23802         (*vsx_mov<mode>_32bit): Likewise.
23804 2018-03-30  Martin Sebor  <msebor@redhat.com>
23806         PR tree-optimization/84818
23807         * builtins.c (check_access): Use warning_n.
23809 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
23811         PR target/83822
23812         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
23813         condition.
23814         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
23815         condition.
23817 2018-03-30  Julia Koval  <julia.koval@intel.com>
23819         PR target/84413
23820         * x86-tune.def (movx, partial_reg_dependency): Enable for
23821         m_SKYLAKE_AVX512.
23823 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
23825         PR inline-asm/84985
23826         * lra-constraints.c (process_alt_operands): Move setting
23827         this_alternative_matches below.
23829 2018-03-29  Martin Liska  <mliska@suse.cz>
23831         PR lto/84995.
23832         * doc/invoke.texi: Document how LTO works with debug info.
23833         Describe auto-load support of binutils.  Mention 'x86-64'
23834         as valid option value of -march option.
23836 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
23838         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
23840         PR c/85094
23841         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
23842         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
23843         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
23844         checking.
23846 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
23848         PR target/84912
23849         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
23850         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
23851         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
23852         for RS6000_BTM_POWERPC64.
23853         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
23854         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
23855         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
23856         definition.
23857         (DIVDE): Use it.
23858         (DIVDEU): Likewise.
23860 2018-03-28  Carl Love  <cel@us.ibm.com>
23862         Revert
23863         2017-09-27  Carl Love  <cel@us.ibm.com>
23865         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
23866         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
23867         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
23868         fctiw instruction.
23870 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23872         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
23873         instead of __vector bool.
23874         (_mm_max_pu8): Likewise.
23875         (_mm_min_pi16): Likewise.
23877 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
23879         PR target/84912
23880         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
23881         (DIVWEUO): Likewise.
23882         (DIVDEO): Likewise.
23883         (DIVDEUO): Likewise.
23884         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
23885         DIVWEUO and DIVDEUO.
23886         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
23887         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
23888         (div_extend): Likewise.
23889         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
23890         builtin function.
23891         (__builtin_divweuo): Likewise.
23892         (__builtin_divdeo): Likewise.
23893         (__builtin_divdeuo): Likewise.
23895 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
23897         PR target/85095
23898         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
23899         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
23901         PR tree-optimization/82004
23902         * gimple-match-head.c (optimize_pow_to_exp): New function.
23903         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
23904         Don't fold to exp if optimize_pow_to_exp is false.
23906 2018-03-28  Martin Liska  <mliska@suse.cz>
23908         PR other/84819
23909         * calls.c (initialize_argument_information): Fix trailing space.
23910         * common.opt: Fix typo and provide better explanation for
23911         -fsanitize-coverage option.
23912         * config/i386/i386.opt: Fix typo.
23914 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
23915             Martin Liska  <mliska@suse.cz>
23917         PR sanitizer/85081
23918         * gimplify.c (asan_poison_variable): Don't do the check for
23919         gimplify_omp_ctxp here.
23920         (gimplify_decl_expr): Do it here.
23921         (gimplify_target_expr): Likewise.
23923 2018-03-28  Martin Liska  <mliska@suse.cz>
23925         PR target/84988
23926         * config/i386/i386.c (ix86_function_arg_advance): Do not call
23927         chkp_type_bounds_count if MPX is not enabled.
23929 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
23931         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
23933 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
23935         PR target/84914
23936         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
23937         function to create the function decl for complex long double
23938         multiply and divide for -mabi=ieeelongdouble.
23939         (init_float128_ieee): Call it.
23941 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
23943         PR target/85044
23944         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
23945         -fcf-protection=branch -mibt.
23946         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
23948 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
23950         PR target/81863
23951         * config/arm/arm.c (arm_valid_symbolic_address): Handle
23952         arm_word_relocations.
23954 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
23956         PR target/85056
23957         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
23958         extern array declarations.
23960 2018-03-27  Richard Biener  <rguenther@suse.de>
23962         PR middle-end/84067
23963         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
23964         explicit single_use checks.
23966 2018-03-27  Richard Biener  <rguenther@suse.de>
23968         PR tree-optimization/85082
23969         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
23970         Valueize the VUSE.
23972 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
23974         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
23975         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
23976         Turn on fasynchronous-unwind-tables and funwind-tables.
23978 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
23980         PR target/85073
23981         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
23982         (*bmi_blsr_<mode>_ccz): Ditto.
23984 2018-03-26  Tom de Vries  <tom@codesourcery.com>
23986         PR tree-optimization/85063
23987         * omp-general.c (offloading_function_p): New function.  Factor out
23988         of ...
23989         * omp-offload.c (pass_omp_target_link::gate): ... here.
23990         * omp-general.h (offloading_function_p): Declare.
23991         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
23992         with attribute omp declare target for offloading functions.
23994 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
23996         PR tree-optimization/84005
23997         * tree-data-ref.h (get_base_for_alignment): Declare.
23998         * tree-data-ref.c (get_base_for_alignment_1): New function.
23999         (get_base_for_alignment): Likewise.
24000         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
24001         get_base_for_alignment to find a suitable base object, instead
24002         of always using drb->base_address.
24004 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
24006         PR inline-asm/85022
24007         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
24008         known size by default.
24010 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
24012         PR inline-asm/85030
24013         * lra-constraints.c (process_alt_operands): Don't match BLKmode
24014         and non BLKmode operands.
24016 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24018         PR target/85026
24019         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
24020         Clean up attributes.
24022 2018-03-23  Richard Biener  <rguenther@suse.de>
24024         PR debug/85020
24025         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
24026         we are going to emit early debug for LTO.
24028 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
24030         PR inline-asm/85034
24031         * function.c (match_asm_constraints_1): Don't optimize if input
24032         doesn't satisfy general_operand predicate for output's mode.
24034         PR inline-asm/85022
24035         * alias.c (write_dependence_p): Don't require for x_canonicalized
24036         non-VOIDmode if x has VOIDmode.
24038         PR sanitizer/85029
24039         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
24040         just don't try to optimize it rather than assert it never happens.
24042 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24044         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
24045         macro expansions for definition of ST_INTERNAL_<mode> and
24046         LD_INTERNAL_<mode> builtins.
24047         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
24048         Remove prototype.
24049         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
24050         function.
24051         (altivec_expand_st_builtin): Likewise.
24052         (altivec_expand_builtin): Remove calls to deleted functions.
24053         (rs6000_address_for_altivec): Delete this function.
24054         * config/rs6000/vector.md: Remove expands for
24055         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
24057 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
24059         PR target/84826
24060         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
24061         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
24062         re-computing once computed.
24063         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
24064         (arm_init_machine_status): Initialize
24065         machine->static_chain_stack_bytes.
24067 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24069         PR target/84760
24070         * doc/extend.texi: Add four new prototypes for vec_ld.
24071         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
24072         definitions for more logical presentation.
24073         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
24074         entries for V1TI variants of __builtin_altivec_ld builtin.
24075         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
24076         handling of V1TI variant of LVX icode pattern.
24077         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
24078         (rs6000_gimple_fold_builtin): Likewise.
24079         (altivec_init_builtins): Add code to define
24080         __builtin_altivec_lvx_v1ti function.
24082 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
24084         PR inline-asm/84941
24085         * function.c (match_asm_constraints_1): Don't do the optimization
24086         if input isn't a REG, SUBREG, MEM or constant.
24088 2018-03-22  Tom de Vries  <tom@codesourcery.com>
24090         PR tree-optimization/84956
24091         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
24092         bb_has_abnormal_pred.
24094 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
24096         PR sanitizer/85018
24097         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
24098         DECL_INITIAL (decl) to decl at the end.
24099         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
24100         adjust the comment.
24102 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
24104         * doc/extend.texi (__builtin_tgmath): Document when complex
24105         integer types are treated as _Complex _Float64.
24107 2018-03-21  Tom de Vries  <tom@codesourcery.com>
24109         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
24111 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
24113         PR tree-optimization/84960
24114         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
24115         if it is ENTRY block, move them into single succ of ENTRY in that case.
24117 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
24119         PR tree-optimization/84811
24120         * poly-int.h (poly_span_traits): Remove the T3 parameter and
24121         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
24122         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
24123         (known_subrange_p): Update accordingly.  Cast each value involved
24124         in the size comparison, rather than casting the result of the
24125         subtraction.
24127 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
24129         PR tree-optimization/84982
24130         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
24131         by flipping the least significant bit rather than all bits from
24132         bitpos to bitpos + bitsize - 1.
24134 2018-03-21  Nathan Sidwell  <nathan@acm.org>
24136         * doc/extend.texi (Deprecated Features): Remove mention of
24137         long-deleted deprecations.
24139 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
24141         PR jit/84288
24142         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
24143         * configure: Regenerate.
24145 2018-03-21  Tom de Vries  <tom@codesourcery.com>
24147         PR tree-optimization/83126
24148         * tree-parloops.c (num_phis): New function.
24149         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
24151 2018-03-21  Nathan Sidwell  <nathan@acm.org>
24153         * doc/extend.texi (Deprecated Features): Update deprecated flags,
24154         mention anon-struct/union members and trailing attributes.
24156 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
24158         PR tree-optimization/84969
24159         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
24160         builtin memset partitions if they set different rhs values.
24162 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
24164         PR rtl-optimization/84989
24165         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
24166         VEC_DUPLICATE with scalar result mode.
24168 2018-03-21  Martin Liska  <mliska@suse.cz>
24170         PR ipa/84963
24171         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
24172         not intended return statement.
24174 2018-03-21  Martin Liska  <mliska@suse.cz>
24176         PR target/84988
24177         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
24178         (chkp_find_bound_slots_1): Limit number of iterations.
24180 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
24182         PR target/84838
24183         * Minor grammar fixes for x86 options.
24185 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
24187         PR debug/84875
24188         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
24189         holding REG_CFA_RESTORE notes, instead turn them into a USE.
24191 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
24193         PR target/83789
24194         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
24195         (altivec_lvx_<mode>_1op): Likewise.
24196         (altivec_stvx_<mode>_2op): Likewise.
24197         (altivec_stvx_<mode>_1op): Likewise.
24198         (altivec_lvx_<VM2:mode>): New define_expand.
24199         (altivec_stvx_<VM2:mode>): Likewise.
24200         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
24201         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
24202         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
24203         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
24204         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
24205         (rs6000_gen_lvx): Likewise.
24206         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
24207         (altivec_expand_stv_builtin): Likewise.
24208         (altivec_expand_builtin): Likewise.
24209         * config/rs6000/vector.md: Likewise.
24211 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24213         PR target/82518
24214         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
24215         BYTES_BIG_ENDIAN.
24217 2018-03-20  Richard Biener  <rguenther@suse.de>
24219         PR target/84986
24220         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
24221         sign-conversions as zero, fall back to standard scalar_stmt
24222         cost for the rest.
24224 2018-03-20  Martin Liska  <mliska@suse.cz>
24226         PR ipa/84825
24227         * predict.c (rebuild_frequencies): Handle case when we have
24228         PROFILE_ABSENT, but flag_guess_branch_prob is false.
24230 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
24232         PR target/84990
24233         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
24234         flag_section_anchors.
24235         * varasm.c (use_blocks_for_decl_p): Remove hack for
24236         dw2_force_const_mem.
24238         PR target/84845
24239         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
24240         to ...
24241         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
24242         be created, use lowpart_subreg of operands[0] rather than operands[0]
24243         itself.
24244         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
24245         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
24246         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
24247         and n constraint instead of aarch64_shift_imm_di and Usd.
24248         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
24249         (*aarch64_<optab>_reg_minus<mode>3): ... this.
24251 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
24253         PR target/82989
24254         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
24255         to favor GPR over NEON registers.
24256         (<shift>di3_neon): Likewise.
24258 2018-03-20  Tom de Vries  <tom@codesourcery.com>
24260         PR target/84952
24261         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
24262         (nvptx_process_pars): Emit bar.sync asap and alap.
24264 2018-03-20  Tom de Vries  <tom@codesourcery.com>
24266         PR target/84954
24267         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
24268         seen_label if seen_label is already set.
24270 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
24272         PR target/84945
24273         * config/i386/i386.c (fold_builtin_cpu): For features above 31
24274         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
24275         Use 1U instead of 1.  Formatting fixes.
24277         PR c/84953
24278         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
24279         instead of TREE_TYPE (s1) for the return value.
24281 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
24283         PR tree-optimization/84946
24284         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
24285         bitsize + bitsize in poly_uint64 rather than poly_int64.
24287         PR sanitizer/78651
24288         * dwarf2asm.c: Include fold-const.c.
24289         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
24290         of decl rather than decl itself.
24292         PR rtl-optimization/84643
24293         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
24295 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
24297         PR sanitizer/78651
24298         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
24299         calling assemble_variable.
24301 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
24303         PR target/81647
24304         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
24305         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
24307 2018-03-19  Jim Wilson  <jimw@sifive.com>
24309         PR bootstrap/84856
24310         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
24311         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
24312         (riscv_first_stack_step): Likewise.
24313         (riscv_option_override): Use STACK_BOUNDARY instead of
24314         MIN_STACK_BOUNDARY.
24315         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
24316         MIN_STACK_BOUNDARY.
24317         (BIGGEST_ALIGNMENT): Set to 128.
24318         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
24319         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
24320         STACK_BOUNDARY.
24322 2018-03-19  Richard Biener  <rguenther@suse.de>
24324         PR tree-optimization/84933
24325         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
24326         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
24328 2018-03-19  Richard Biener  <rguenther@suse.de>
24330         PR tree-optimization/84859
24331         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
24332         (cond_if_else_store_replacement): Perform sinking operation on
24333         single-store BBs regardless of MAX_STORES_TO_SINK setting.
24334         Generalize what a BB with a single eligible store is.
24336 2018-03-19  Richard Biener  <rguenther@suse.de>
24338         PR tree-optimization/84929
24339         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
24340         chrec_is_positive against non-chrec arg.
24342 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
24344         PR target/84711
24345         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
24347 2018-03-18  Martin Liska  <mliska@suse.cz>
24349         PR rtl-optimization/84635
24350         * regrename.c (build_def_use): Use matches_mode only when
24351         matches >= 0.
24353 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
24355         PR tree-optimization/84913
24356         * tree-vect-loop.c (vectorizable_reduction): Don't try to
24357         vectorize chains of COND_EXPRs.
24359 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
24361         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
24363 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
24365         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
24367 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
24369         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
24371 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
24372             Kito Cheng  <kito.cheng@gmail.com>
24374         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
24375         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
24376         (nds32_adjust_reg_alloc_order): New function.
24377         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
24379 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
24381         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
24382         nds32_print_operand, nds32_print_operand_address): Use
24383         HOST_WIDE_INT_PRINT_DEC instead.
24385 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
24387         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
24389 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
24391         PR target/84902
24392         * config/i386/i386.c (initial_ix86_tune_features,
24393         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
24394         unsigned long long.
24395         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
24396         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
24397         rather than 1u << ix86_tune.  Formatting fix.
24398         (ix86_option_override_internal): Change ix86_arch_mask from
24399         unsigned int to unsigned HOST_WIDE_INT, initialize to
24400         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
24401         (ix86_function_specific_restore): Likewise.
24403 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
24405         PR target/84899
24406         * postreload.c (reload_combine_recognize_pattern): Perform
24407         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
24408         truncate_int_for_mode the result for the destination's mode.
24410         PR c/84909
24411         * hsa-gen.c (mem_type_for_type): Fix comment typo.
24412         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
24413         Likewise.
24414         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
24415         Likewise.
24417 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
24419         PR target/84876
24420         * lra-assigns.c (lra_split_hard_reg_for): Don't use
24421         regno_allocno_class_array and sorted_pseudos.
24422         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
24423         insns where regno is used.
24425 2018-03-16  Martin Liska  <mliska@suse.cz>
24427         PR ipa/84833
24428         * multiple_target.c (create_dispatcher_calls): Redirect
24429         reference in the symbol table.
24431 2018-03-16  Martin Liska  <mliska@suse.cz>
24433         PR ipa/84722
24434         * multiple_target.c (create_dispatcher_calls): Redirect also
24435         an alias.
24437 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
24439         PR c++/79937
24440         PR c++/82410
24441         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
24442         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
24443         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
24445 2018-03-16  Julia Koval  <julia.koval@intel.com>
24447         * doc/invoke.texi (Skylake Server): Add CLWB.
24448         Cannonlake): Remove CLWB.
24450 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
24452         PR tree-optimization/84841
24453         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
24454         1 << 3.
24455         (FLOAT_ONE_CONST_TYPE): Define.
24456         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
24457         (sort_by_operand_rank): Put entries with higher constant_type last
24458         rather than first to match comments.
24460 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
24462         * config/nios2/nios2.md (movsi_internal): Fix thinko in
24463         split predicate.
24465 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
24467         PR c++/79085
24468         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
24469         check and use address of target always.
24471 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
24473         PR target/84574
24474         * config/i386/i386.c (indirect_thunk_needed): Update comments.
24475         (indirect_thunk_bnd_needed): Likewise.
24476         (indirect_thunks_used): Likewise.
24477         (indirect_thunks_bnd_used): Likewise.
24478         (indirect_return_needed): New.
24479         (indirect_return_bnd_needed): Likewise.
24480         (output_indirect_thunk_function): Add a bool argument for
24481         function return.
24482         (output_indirect_thunk_function): Don't generate alias for
24483         function return thunk.
24484         (ix86_code_end): Call output_indirect_thunk_function to generate
24485         function return thunks.
24486         (ix86_output_function_return): Set indirect_return_bnd_needed
24487         and indirect_return_needed instead of indirect_thunk_bnd_needed
24488         and indirect_thunk_needed.
24490 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
24492         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
24493         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
24494         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
24496 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
24497             Paul Hua <paul.hua.gm@gmail.com>
24499         PR c/84852
24500         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
24502 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
24504         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
24505         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
24506         resp. SFmode cases.
24508 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
24510         PR target/84711
24511         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
24512         instead of GET_MODE_SIZE when comparing Units.
24514 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
24516         PR target/68256
24517         * varasm.c (hash_section): Return an unchangeble hash value
24518         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
24519         Return !aarch64_can_use_per_function_literal_pools_p ().
24521 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
24523         PR target/84860
24524         * optabs.c (emit_conditional_move): Pass address of cmode's copy
24525         rather than address of cmode as last argument to prepare_cmp_insn.
24527 2018-03-15  Julia Koval  <julia.koval@intel.com>
24529         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
24530         F_AVX512VNNI, F_AVX512BITALG): New.
24532 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
24534         PR target/83451
24535         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
24536         insn for floating-point loads and stores.
24538 2018-03-14  Carl Love  <cel@us.ibm.com>
24540         * config/rs6000/rs6000-c.c: Add macro definitions for
24541         ALTIVEC_BUILTIN_VEC_PERMXOR.
24542         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
24543         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
24544         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
24545         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
24546         UNSPEC_VPERMXOR.
24547         * config/doc/extend.texi: Add prototypes for vec_permxor.
24549 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
24551         PR c/84852
24552         * diagnostic-show-locus.c (class layout_point): Convert m_line
24553         from int to linenum_type.
24554         (line_span::comparator): Use linenum "compare" function when
24555         comparing line numbers.
24556         (test_line_span): New function.
24557         (layout_range::contains_point): Convert param "row" from int to
24558         linenum_type.
24559         (layout_range::intersects_line_p): Likewise.
24560         (layout::will_show_line_p): Likewise.
24561         (layout::print_source_line): Likewise.
24562         (layout::should_print_annotation_line_p): Likewise.
24563         (layout::print_annotation_line): Likewise.
24564         (layout::print_leading_fixits): Likewise.
24565         (layout::annotation_line_showed_range_p): Likewise.
24566         (struct line_corrections): Likewise for field m_row.
24567         (line_corrections::line_corrections): Likewise for param "row".
24568         (layout::print_trailing_fixits): Likewise.
24569         (layout::get_state_at_point): Likewise.
24570         (layout::get_x_bound_for_row): Likewise.
24571         (layout::print_line): Likewise.
24572         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
24573         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
24574         * input.c (selftest::test_linenum_comparisons): New function.
24575         (selftest::input_c_tests): Call it.
24576         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
24577         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
24578         * selftest.h (ASSERT_GT): New macro.
24579         (ASSERT_GT_AT): New macro.
24580         (ASSERT_LT): New macro.
24581         (ASSERT_LT_AT): New macro.
24583 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
24585         PR rtl-optimization/84780
24586         * combine.c (distribute_links): Don't make a link based on pc_rtx.
24588 2018-03-14  Martin Liska  <mliska@suse.cz>
24590         * tree.c (record_node_allocation_statistics): Use
24591         get_stats_node_kind.
24592         (get_stats_node_kind): New function extracted from
24593         record_node_allocation_statistics.
24594         (free_node): Use get_stats_node_kind.
24596 2018-03-14  Richard Biener  <rguenther@suse.de>
24598         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
24599         that the value-set of ANTIC_IN doesn't grow.
24601         Revert
24602         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
24603         member.
24604         (BB_VISITED_WITH_VISITED_SUCCS): New define.
24605         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
24607 2018-03-14  Julia Koval  <julia.koval@intel.com>
24609         * config.gcc (icelake-client, icelake-server): New.
24610         (icelake): Remove.
24611         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
24612         (initial_ix86_arch_features): Ditto.
24613         (PTA_SKYLAKE): Add SGX.
24614         (PTA_ICELAKE): Remove.
24615         (PTA_ICELAKE_CLIENT): New.
24616         (PTA_ICELAKE_SERVER): New.
24617         (ix86_option_override_internal): Split up icelake on icelake client and
24618         icelake server.
24619         (get_builtin_code_for_version): Ditto.
24620         (fold_builtin_cpu): Ditto.
24621         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
24622         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
24623         * config/i386/i386.h (processor_type): Ditto.
24624         * doc/invoke.texi: Ditto.
24626 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
24628         PR sanitizer/83392
24629         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
24630         INTEGER_CST offset, add it together with bitpos / 8 and
24631         sign extend based on POINTER_SIZE.
24633         PR target/84844
24634         Revert
24635         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
24637         PR target/78090
24638         * config/i386/constraints.md (Yc): New register constraint.
24639         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
24640         Use Yc constraint for alternative 2 of operand 0.  Remove
24641         preferred_for_speed attribute.
24643 2018-03-14  Richard Biener  <rguenther@suse.de>
24645         PR tree-optimization/84830
24646         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
24647         with the old one to avoid oscillations.
24649 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
24651         PR target/83712
24652         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
24653         pseudos.
24654         (assign_by_spills): Return a flag of reload assignment failure.
24655         Do not process the reload assignment failures.  Do not spill other
24656         reload pseudos if they has the same reg class.  Update n if
24657         necessary.
24658         (lra_assign): Add a return arg.  Set up from the result of
24659         assign_by_spills call.
24660         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24661         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
24662         usage_insns if it is not NULL.
24663         (spill_hard_reg_in_range): New function.
24664         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24665         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24666         function prototypes.
24667         (lra_assign): Change prototype.
24668         * lra.c (lra): Add code to deal with fails by splitting hard reg
24669         live ranges.
24671 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
24673         * config/riscv/riscv.opt (mrelax): New option.
24674         * config/riscv/riscv.c (riscv_file_start): Emit ".option
24675         "norelax" when riscv_mrelax is disabled.
24676         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
24678 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24680         PR target/84743
24681         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
24682         reassociation for int modes.
24684 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
24686         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
24687         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
24688         for big-endian.
24689         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
24690         * config/aarch64/aarch64-sve.md
24691         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
24692         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
24693         (*extend<mode><Vwide>2): Rename to...
24694         (aarch64_sve_extend<mode><Vwide>2): ...this.
24695         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
24696         renaming the old pattern to...
24697         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
24698         unsigned packs.
24699         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
24700         define_expand, renaming the old pattern to...
24701         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
24702         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
24703         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
24704         account when deciding which SVE instruction the optab should use.
24705         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
24707 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
24709         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
24710         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
24711         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
24712         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
24713         (tlsdesc_small_<mode>): Turn a define_expand and use
24714         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
24715         (tlsdesc_small_advsimd_<mode>): ...this.
24716         (tlsdesc_small_sve_<mode>): New pattern.
24718 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
24720         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
24721         (UNSPEC_UMUL_HIGHPART): New constants.
24722         (MUL_HIGHPART): New int iteraor.
24723         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
24724         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
24725         define_expand.
24726         (*<su>mul<mode>3_highpart): New define_insn.
24728 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
24730         PR lto/84805
24731         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
24732         incomplete types.
24734 2018-03-13  Martin Liska  <mliska@suse.cz>
24736         PR ipa/84658.
24737         * (sem_item_optimizer::sem_item_optimizer): Initialize new
24738         vector.
24739         (sem_item_optimizer::~sem_item_optimizer): Release it.
24740         (sem_item_optimizer::merge_classes): Register variable aliases.
24741         (sem_item_optimizer::fixup_pt_set): New function.
24742         (sem_item_optimizer::fixup_points_to_sets): Likewise.
24743         * ipa-icf.h: Declare new variables and functions.
24745 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
24747         PR middle-end/84834
24748         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
24749         integer_pow2p@2 and test integer_pow2p in condition.
24750         (A < 0 ? C : 0): Similarly for @1.
24752         PR middle-end/84831
24753         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
24754         characters starting at p contain '\0' character, don't look beyond
24755         that.
24757         PR target/84827
24758         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
24759         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
24761         PR target/84828
24762         * reg-stack.c (change_stack): Change update_end var from int to
24763         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
24764         also call set_block_for_insn on the newly added insns and rescan.
24766         PR target/84786
24767         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
24768         on the last operand.
24770         PR c++/84704
24771         * tree.c (stabilize_reference_1): Return save_expr (e) for
24772         STATEMENT_LIST even if it doesn't have side-effects.
24774 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
24776         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
24778 2018-03-12  Renlin Li  <renlin.li@arm.com>
24780         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
24781         aarch64_output_scalar_simd_mov_immediate.
24783 2018-03-12  Martin Sebor  <msebor@redhat.com>
24785         PR tree-optimization/83456
24786         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
24787         for perfectly overlapping calls to memcpy.
24788         (gimple_fold_builtin_memory_chk): Same.
24789         (gimple_fold_builtin_strcpy): Handle no-warning.
24790         (gimple_fold_builtin_stxcpy_chk): Same.
24791         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
24793 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
24795         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
24796         parameter.  Use it for SFmode.
24797         (rs6000_function_arg_advance_1): Adjust.
24798         (rs6000_function_arg): Adjust.
24799         (rs6000_gimplify_va_arg): Pass false for that new parameter.
24801 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
24803         PR rtl-optimization/84169
24804         PR rtl-optimization/84780
24805         * combine.c (can_combine_p): Check for a 2-insn combination whether
24806         the destination register is used between the two insns, too.
24808 2018-03-12  Richard Biener  <rguenther@suse.de>
24810         PR tree-optimization/84803
24811         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
24812         for refs DR analysis didn't process.
24814 2018-03-12  Richard Biener  <rguenther@suse.de>
24816         PR tree-optimization/84777
24817         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
24818         force-vectorize loops ignore whether we are optimizing for size.
24820 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
24822         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
24823         (TARGET_MD_ASM_ADJUST): Define.
24825 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
24826             Kito Cheng  <kito.cheng@gmail.com>
24827             Chung-Ju Wu  <jasonwucj@gmail.com>
24829         * config/nds32/nds32.c (nds32_compute_stack_frame,
24830         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
24831         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
24832         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
24833         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
24834         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
24835         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
24836         * config/nds32/nds32.md (prologue, epilogue): Use macro
24837         NDS32_V3PUSH_AVAILABLE_P to do checking.
24839 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
24841         PR debug/58150
24842         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
24843         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
24844         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
24845         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
24846         addition of most attributes on !orig_type_die or the attribute not
24847         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
24849 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
24850             Chung-Ju Wu  <jasonwucj@gmail.com>
24852         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
24853         __NDS32_VH__ macro.
24854         * config/nds32/nds32.opt (mvh): New option.
24856 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
24857             Chung-Ju Wu  <jasonwucj@gmail.com>
24859         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
24860         function.
24861         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
24862         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
24863         definition.
24865 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
24866             Chung-Ju Wu  <jasonwucj@gmail.com>
24868         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
24869         function.
24870         * config/nds32/nds32-multiple.md (strlensi): New pattern.
24871         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
24873 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
24874             Kito Cheng  <kito.cheng@gmail.com>
24875             Chung-Ju Wu  <jasonwucj@gmail.com>
24877         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
24878         UNSPEC_FFMISM and UNSPEC_FLMISM.
24879         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
24880         for ffb, ffmism and flmism.
24881         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
24882         (unspec_ffmism): Ditto.
24883         (unspec_flmism): Ditto.
24884         (nds32_expand_builtin_impl): Check if string extension is available.
24885         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
24886         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
24888 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
24890         Reverting patch:
24891         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
24893         PR target/83712
24894         * lra-assigns.c (assign_by_spills): Return a flag of reload
24895         assignment failure.  Do not process the reload assignment
24896         failures.  Do not spill other reload pseudos if they has the same
24897         reg class.
24898         (lra_assign): Add a return arg.  Set up from the result of
24899         assign_by_spills call.
24900         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24901         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
24902         usage_insns if it is not NULL.
24903         (spill_hard_reg_in_range): New function.
24904         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24905         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24906         function prototypes.
24907         (lra_assign): Change prototype.
24908         * lra.c (lra): Add code to deal with fails by splitting hard reg
24909         live ranges.
24911 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
24913         PR target/84807
24914         * config/i386/i386.opt: Replace Enforcment with Enforcement.
24916 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
24918         PR debug/84620
24919         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
24920         (dw_val_node): Add val_symbolic_view.
24921         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
24922         (symview_upper_bound): New.
24923         (new_line_info_table): Initialize symviews_since_reset.
24924         (dwarf2out_source_line): Count symviews_since_reset and set
24925         symview_upper_bound.
24926         (dw_val_equal_p): Handle symview.
24927         (add_AT_symview): New.
24928         (print_dw_val): Handle symview.
24929         (attr_checksum, attr_checksum_ordered): Likewise.
24930         (same_dw_val_p, size_of_die): Likewise.
24931         (value_format, output_die): Likewise.
24932         (add_high_low_attributes): Use add_AT_symview for entry_view.
24933         (dwarf2out_finish): Reset symview_upper_bound, clear
24934         zero_view_p.
24936 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
24938         PR target/83969
24939         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
24940         Add strict argument and use it.
24941         (rs6000_split_multireg_move): Update for new strict argument.
24942         (mem_operand_gpr): Disallow all non-offsettable addresses.
24943         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
24945 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
24947         PR target/84772
24948         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
24949         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
24950         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
24952         PR c++/84767
24953         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
24954         decl, use remap_type if we want to use the type.
24956 2018-03-09  Martin Sebor  <msebor@redhat.com>
24958         PR tree-optimization/84526
24959         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
24960         Remove dead code.
24961         (builtin_access::generic_overlap): Be prepared to handle non-array
24962         base objects.
24964 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
24966         PR rtl-optimization/84682
24967         * lra-constraints.c (process_address_1): Check is_address flag
24968         for address constraints.
24969         (process_alt_operands): Likewise.
24970         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
24971         preprocess_constraints.
24972         * recog.h (preprocess_constraints): Add oploc parameter.
24973         Adjust callers.
24974         * recog.c (preprocess_constraints): Test address_operand for
24975         CT_ADDRESS constraints.
24977 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
24979         PR target/83712
24980         * lra-assigns.c (assign_by_spills): Return a flag of reload
24981         assignment failure.  Do not process the reload assignment
24982         failures.  Do not spill other reload pseudos if they has the same
24983         reg class.
24984         (lra_assign): Add a return arg.  Set up from the result of
24985         assign_by_spills call.
24986         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
24987         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
24988         usage_insns if it is not NULL.
24989         (spill_hard_reg_in_range): New function.
24990         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
24991         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
24992         function prototypes.
24993         (lra_assign): Change prototype.
24994         * lra.c (lra): Add code to deal with fails by splitting hard reg
24995         live ranges.
24997 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
24999         PR target/83193
25000         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
25001         Accept complain bool parameter.  Only emit errors if it is true.
25002         (arm_parse_cpu_option_name): Likewise.
25003         (arm_target_thumb_only): Adjust callers of the above.
25004         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
25005         prototype to take a default true bool parameter.
25006         (arm_parse_arch_option_name): Likewise.
25008 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
25009             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
25011         PR jit/64089
25012         PR jit/84288
25013         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
25014         * configure: Regenerate.
25015         * configure.ac ("linker --version-script option"): New.
25016         ("linker soname option"): New.
25018 2018-03-09  Richard Biener  <rguenther@suse.de>
25020         PR tree-optimization/84775
25021         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
25022         immediate uses of predicate stmts and mark them modified.
25024         Revert
25025         PR tree-optimization/84178
25026         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
25027         to caller.
25028         (version_loop_for_if_conversion): Delay update_ssa call.
25029         (tree_if_conversion): Delay update_ssa until after predicate
25030         insertion.
25032 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
25034         PR target/84763
25035         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
25036         when the function accesses prior frames.
25038 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
25040         PR debug/84456
25041         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
25042         gen_llsym, otherwise call maybe_gen_llsym.
25044         PR inline-asm/84742
25045         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
25046         has ',' character inside of it.
25048 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25050         PR target/84748
25051         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
25052         as clobbering CC_REGNUM.
25054 2018-03-08  Richard Biener  <rguenther@suse.de>
25056         PR middle-end/84552
25057         * tree-scalar-evolution.c: Include tree-into-ssa.h.
25058         (follow_copies_to_constant): Do not follow SSA names registered
25059         for update.
25061 2018-03-08  Richard Biener  <rguenther@suse.de>
25063         PR tree-optimization/84178
25064         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
25065         to caller.
25066         (version_loop_for_if_conversion): Delay update_ssa call.
25067         (tree_if_conversion): Delay update_ssa until after predicate
25068         insertion.
25070 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
25072         PR tree-optimization/84178
25073         * tree-if-conv.c (release_bb_predicate): Remove the
25074         the assertion that the stmts have NULL use_ops.
25075         Discard the statements, asserting that they haven't
25076         yet been added to a BB.
25078 2018-03-08  Richard Biener  <rguenther@suse.de>
25080         PR tree-optimization/84746
25081         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
25082         (phi_translate): Pass in destination ANTIC_OUT set.
25083         (phi_translate_1): Likewise.  For a simplified result lookup
25084         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
25085         (phi_translate_set): Adjust.
25086         (do_pre_regular_insertion): Likewise.
25087         (do_pre_partial_partial_insertion): Likewise.
25089 2018-03-08  Martin Liska  <mliska@suse.cz>
25091         PR gcov-profile/84735
25092         * doc/gcov.texi: Document usage of profile files.
25093         * gcov-io.h: Document changes in the format.
25095 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
25097         PR debug/84404
25098         PR debug/84408
25099         * dwarf2out.c (struct dw_line_info_table): Update comments for
25100         view == -1.
25101         (FORCE_RESET_NEXT_VIEW): New.
25102         (FORCE_RESETTING_VIEW_P): New.
25103         (RESETTING_VIEW_P): Check for -1 too.
25104         (ZERO_VIEW_P): Likewise.
25105         (new_line_info_table): Force-reset next view.
25106         (dwarf2out_begin_function): Likewise.
25107         (dwarf2out_source_line): Simplify zero_view_p initialization.
25108         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
25109         view directly.  Omit view when omitting .loc at line 0.
25111 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
25113         PR tree-optimization/84740
25114         * tree-switch-conversion.c (process_switch): Call build_constructors
25115         only if info.phi_count is non-zero.
25117         PR tree-optimization/84739
25118         * tree-tailcall.c (find_tail_calls): Check call arguments against
25119         DECL_ARGUMENTS (current_function_decl) rather than
25120         DECL_ARGUMENTS (func) when checking for tail recursion.
25122 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
25124         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
25125         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
25126         Volker Reichelt's entry and add entries for people that perform
25127         GCC fuzzy testing and report numerous bugs.
25129 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
25131         PR target/82411
25132         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
25133         readonly data in sdata, if that is disabled.
25134         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
25135         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
25136         -mreadonly-in-sdata option.
25138 2018-03-07  Martin Sebor  <msebor@redhat.com>
25140         PR tree-optimization/84468
25141         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
25142         basic block when looking for nul assignment.
25144 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
25146         PR target/84277
25147         * except.h (output_function_exception_table): Adjust prototype.
25148         * except.c (output_function_exception_table): Remove FNNAME parameter
25149         and add SECTION parameter.  Ouput one part of the table at a time.
25150         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
25151         the first part of the exception table and emit unwind directives.
25152         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
25153         (i386_pe_seh_cold_init): Likewise.
25154         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
25155         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
25156         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
25157         (ix86_output_call_insn): Emit a nop in one more case for SEH.
25158         * config/i386/winnt.c: Include except.h.
25159         (struct seh_frame_state): Add reg_offset, after_prologue and
25160         in_cold_section fields.
25161         (i386_pe_seh_end_prologue): Set seh->after_prologue.
25162         (i386_pe_seh_cold_init): New function.
25163         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
25164         to seh->in_cold_section.
25165         (seh_emit_push): Record the offset of the push.
25166         (seh_emit_save): Record the offet of the save.
25167         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
25168         Test seh->after_prologue to disregard the epilogue.
25169         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
25170         (i386_pe_end_cold_function): New function.
25172 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
25174         PR fortran/84565
25175         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
25176         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
25178         PR c++/84704
25179         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
25180         on tmp_var.
25181         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
25182         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
25184         PR middle-end/84723
25185         * multiple_target.c: Include tree-inline.h and intl.h.
25186         (expand_target_clones): Diagnose and fail if node->definition and
25187         !tree_versionable_function_p (node->decl).
25189 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
25191         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
25192         sprint_ul.
25193         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
25194         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
25195         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
25197 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
25199         PR target/84710
25200         * combine.c (try_combine): Use reg_or_subregno instead of handling
25201         just paradoxical SUBREGs and REGs.
25203 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
25205         * config/arc/arc.c (arc_finalize_pic): Remove function.
25206         (arc_must_save_register): We use single base PIC register, remove
25207         checks to save/restore the PIC register.
25208         (arc_expand_prologue): Likewise.
25209         * config/arc/arc-protos.h (arc_set_default_type_attributes):
25210         Remove.
25211         (arc_verify_short): Likewise.
25212         (arc_attr_type): Likewise.
25213         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
25214         (walk_stores): Likewise.
25215         (arc_address_cost): Make it static.
25216         (arc_verify_short): Likewise.
25217         (branch_dest): Likewise.
25218         (arc_attr_type): Likewise.
25219         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
25220         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
25221         (arc_final_prescan_insn): Remove inserting the nops due to
25222         hardware hazards.  It is done in reorg step.
25223         (insn_length_variant_t): Remove.
25224         (insn_length_parameters_t): Likewise.
25225         (arc_insn_length_parameters): Likewise.
25226         (arc_get_insn_variants): Likewise.
25227         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
25229 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
25231         PR inline-asm/84683
25232         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
25233         assertion failure.
25235         PR tree-optimization/84687
25236         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
25237         on new_node->decl.
25238         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
25240 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25242         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
25243         Rename to ppc_speculation_barrier.
25244         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
25245         __builtin_ppc_speculation_barrier.
25247 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
25249         PR target/84700
25250         * combine.c (combine_simplify_rtx): Don't try to simplify if
25251         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
25252         are equal to x.
25254 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
25256         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
25257         to 32 bytes when compiling for POWER9.
25259 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
25261         PR target/84564
25262         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
25263         regparm >= 3 with no arg reg available also for calls with
25264         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
25266         PR target/84524
25267         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
25268         orig,vex.
25269         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
25271 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
25273         PR target/84264
25274         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
25276 2018-03-05  Richard Biener  <rguenther@suse.de>
25278         PR tree-optimization/84486
25279         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
25280         When inserting a __builtin_assume_aligned call set the LHS
25281         SSA name alignment info accordingly.
25283 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
25285         PR tree-optimization/84114
25286         * config/aarch64/aarch64.c (aarch64_reassociation_width)
25287         Avoid reassociation of FLOAT_MODE addition.
25289 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
25291         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
25292         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
25293         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
25294         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
25295         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
25296         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
25297         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
25298         and -mwbnoinvd.
25299         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
25300         __builtin_ia32_wbinvd): New builtins.
25301         (SPECIAL_ARGS2): New.
25302         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
25303         (SPECIAL_ARGS2): New.
25304         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
25305         (ix86_valid_target_attribute_inner_p): Ditto.
25306         (ix86_init_mmx_sse_builtins): Add special_args2.
25307         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
25308         TARGET_WBNOINVD_P): New.
25309         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
25310         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
25311         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
25312         * config/i386/immintrin.h (_wbinvd): New intrinsic.
25313         * config/i386/pconfigintrin.h: New file.
25314         * config/i386/wbnoinvdintrin.h: Ditto.
25315         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
25316         wbnoinvdintrin.h.
25317         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
25319 2018-03-05  Richard Biener  <rguenther@suse.de>
25321         PR tree-optimization/84670
25322         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
25323         member.
25324         (BB_VISITED_WITH_VISITED_SUCCS): New define.
25325         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
25326         (compute_antic_aux): Only assert the number of values in ANTIC_IN
25327         doesn't grow if all successors (recursively) were visited at least
25328         once.
25330 2018-03-05  Richard Biener  <rguenther@suse.de>
25332         PR tree-optimization/84650
25333         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
25334         if executed in the loop pipeline.
25336 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
25338         * doc/configfiles.texi (Configuration Files): Move info about
25339         conditionalizing $target-protos.h to...
25340         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
25341         differs from $target-protos.h.
25343 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
25344             Chung-Ju Wu  <jasonwucj@gmail.com>
25346         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
25347         * config/nds32/nds32-multiple.md (setmemsi): Define.
25348         * config/nds32/nds32-memory-manipulation.c
25349         (nds32_gen_dup_4_byte_to_word_value): New.
25350         (emit_setmem_word_loop): New.
25351         (emit_setmem_byte_loop): New.
25352         (nds32_expand_setmem_loop): New.
25353         (nds32_expand_setmem_loop_v3m): New.
25354         (nds32_expand_setmem_unroll): New.
25355         (nds32_expand_setmem): New.
25357 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
25358             Chung-Ju Wu  <jasonwucj@gmail.com>
25360         * config/nds32/nds32-memory-manipulation.c
25361         (nds32_emit_load_store): New.
25362         (nds32_emit_post_inc_load_store): New.
25363         (nds32_emit_mem_move): New.
25364         (nds32_emit_mem_move_block): New.
25365         (nds32_expand_movmemsi_loop_unknown_size): New.
25366         (nds32_expand_movmemsi_loop_known_size): New.
25367         (nds32_expand_movmemsi_loop): New.
25368         (nds32_expand_movmemsi_unroll): New.
25369         (nds32_expand_movmemqi): Rename ...
25370         (nds32_expand_movmemsi): ... to this.
25371         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
25372         (movmemsi): ... to this.
25373         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
25374         (nds32_expand_movmemsi): ... to this.
25376 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
25377             Monk Chiang  <sh.chiang04@gmail.com>
25378             Chung-Ju Wu  <jasonwucj@gmail.com>
25380         * config/nds32/nds32-protos.h
25381         (nds32_expand_load_multiple): New arguments.
25382         (nds32_expand_store_multiple): Ditto.
25383         (nds32_valid_multiple_load_store): Rename ...
25384         (nds32_valid_multiple_load_store_p): ... to this.
25385         * config/nds32/nds32-memory-manipulation.c
25386         (nds32_expand_load_multiple): Refine implementation.
25387         (nds32_expand_store_multiple): Ditto.
25388         * config/nds32/nds32-multiple.md
25389         (load_multiple): Update nds32_expand_load_multiple interface.
25390         (store_multiple): Update nds32_expand_store_multiple interface.
25391         * config/nds32/nds32-predicates.c
25392         (nds32_valid_multiple_load_store): Rename ...
25393         (nds32_valid_multiple_load_store_p): ... to this and refine
25394         implementation.
25395         * config/nds32/predicates.md
25396         (nds32_load_multiple_and_update_address_operation): New predicate.
25397         (nds32_store_multiple_and_update_address_operation): New predicate.
25399 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
25400             Chung-Ju Wu  <jasonwucj@gmail.com>
25402         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
25403         (combo): New attribute.
25404         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
25406 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
25408         * config/nds32/nds32.opt: Change -mcmodel= default value.
25410 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
25411             Monk Chiang  <sh.chiang04@gmail.com>
25412             Chung-Ju Wu  <jasonwucj@gmail.com>
25414         * config/nds32/constants.md (unspec_element): New enum.
25415         * config/nds32/constraints.md (Umw): New constraint.
25416         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
25417         * config/nds32/nds32-intrinsic.md: Likewise.
25418         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
25419         (nds32_valid_smw_lwm_base_p): New.
25420         (nds32_output_smw_single_word): New.
25421         (nds32_output_lmw_single_word): New.
25422         (nds32_expand_unaligned_load): New.
25423         (nds32_expand_unaligned_store): New.
25424         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
25425         (nds32_output_smw_single_word): Declare.
25426         (nds32_output_lmw_single_word): Declare.
25427         (nds32_expand_unaligned_load): Declare.
25428         (nds32_expand_unaligned_store): Declare.
25429         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
25430         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
25431         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
25432         NDS32_BUILTIN_UASTORE_DW.
25433         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
25434         predicate.
25436 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
25437             Kito Cheng  <kito.cheng@gmail.com>
25438             Chung-Ju Wu  <jasonwucj@gmail.com>
25440         * config/nds32/nds32-intrinsic.c
25441         (nds32_expand_builtin_null_ftype_reg): Delete.
25442         (nds32_expand_builtin_reg_ftype_imm): Ditto.
25443         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
25444         (nds32_read_argument): New.
25445         (nds32_legitimize_target): Ditto.
25446         (nds32_legitimize_argument): Ditto.
25447         (nds32_check_constant_argument): Ditto.
25448         (nds32_expand_unop_builtin): Ditto.
25449         (nds32_expand_unopimm_builtin): Ditto.
25450         (nds32_expand_binop_builtin): Ditto.
25451         (nds32_builtin_decl_impl): Ditto.
25452         (builtin_description): Ditto.
25453         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
25454         (nds32_init_builtins_impl): Ditto.
25455         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
25456         (nds32_builtin_decl): New.
25457         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
25458         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
25460 2018-03-02  Jeff Law  <law@redhat.com>
25462         * reorg.c (stop_search_p): Handle DEBUG_INSN.
25463         (redundant_insn, fill_simple_delay_slots): Likewise.
25464         (fill_slots_from_thread): Likewise.
25465         * resource.c (mark_referenced_resources): Likewise.
25466         (mark_set_resources, find_dead_or_set_registers): Likewise.
25468 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
25470         * substring-locations.h (format_warning_va): Formatting fix for
25471         ATTRIBUTE_GCC_DIAG.
25472         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
25473         argument.
25474         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
25475         * substring-locations.c: Include intl.h.
25476         (format_warning_va): Turned into small wrapper around
25477         format_warning_n_va, renamed to ...
25478         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
25479         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
25480         use ngettext.
25481         (format_warning_at_substring_n): New function.
25482         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
25483         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
25484         format_warning_at_substring with just a shorter name instead of
25485         const function pointer.
25486         (fmtwarn_n): New function.
25487         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
25488         appropriate, get rid of all the fmtstr temporaries, move conditionals
25489         with G_() wrapped string literals directly into fmtwarn arguments,
25490         cast dir.len to (int), formatting fixes.
25492 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
25494         * doc/invoke.texi: Remove "Cilk Plus" references.
25496 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
25497             Richard Biener  <rguenther@suse.de>
25499         PR ipa/84628
25500         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
25501         for error or warning attributes if CALL_FROM_THUNK_P is set.
25502         Formatting fixes.
25504 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
25506         PR target/56540
25507         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
25508         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
25510         PR target/56540
25511         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
25512         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
25514         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
25515         instead of -1U in last predictors element's probability member.
25517 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
25519         PR ipa/83983
25520         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
25521         arguments if they are comparable.
25523 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
25525         PR tree-optimization/84634
25526         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
25527         masks and masked_loop_p with a single loop_masks, making sure it's
25528         null for bb vectorization.
25530 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
25532         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
25533         (vect_analyze_data_ref_access): Use loop->safe_len rather than
25534         loop->force_vectorize to check whether there is no alias.
25536 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
25538         PR target/84614
25539         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
25540         prototypes.
25541         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
25542         comments.
25543         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
25544         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
25545         instead of a loop around prev_real_insn.
25546         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
25547         prev_real_insn.
25549         PR inline-asm/84625
25550         * config/i386/i386.c (ix86_print_operand): Use conditional
25551         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
25552         zero vector.
25554 2018-03-02  Richard Biener  <rguenther@suse.de>
25556         PR tree-optimization/84427
25557         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
25558         (bitmap_set_subtract_values): Rewrite to handle multiple
25559         exprs per value.
25560         (clean): Likewise.
25561         (prune_clobbered_mems): Likewise.
25562         (phi_translate): Take edge instead of pred/phiblock.
25563         (phi_translate_1): Likewise.
25564         (phi_translate_set): Likewise.  Insert all translated
25565         exprs for a value into the set, keeping possibly multiple
25566         expressions per value.
25567         (compute_antic_aux): Adjust for phi_translate changes.
25568         When intersecting union the expressions and prune those
25569         not in the final value set, keeping possibly multiple
25570         expressions per value.  Do not use value-insertion
25571         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
25572         all expressions.  Add verification that the value-sets
25573         only shrink during iteration.
25574         (compute_partial_antic_aux): Adjust for the phi_translate changes.
25575         (do_pre_regular_insertion): Likewise.
25576         (do_pre_partial_partial_insertion): Likewise.
25578 2018-03-02  Richard Biener  <rguenther@suse.de>
25580         PR target/82005
25581         * config/darwin.c (saved_debug_info_level): New static global.
25582         (darwin_asm_lto_start): Disable debug info generation for LTO out.
25583         (darwin_asm_lto_end): Restore debug info generation settings.
25585 2018-03-01  Martin Liska  <mliska@suse.cz>
25587         PR sanitizer/82484
25588         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
25589         volatile arguments.
25591 2018-03-01  Richard Biener  <rguenther@suse.de>
25593         PR debug/84645
25594         * dwarf2out.c (gen_variable_die): Properly handle late VLA
25595         type annotation with LTO when debug was disabled at compile-time.
25597 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
25599         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
25600         XINT with INTVAL.
25601         (mips_final_postscan_insn): Likewise.
25603 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
25605         PR rtl-optimization/84528
25606         * alias.c (init_alias_target): Add commentary.
25607         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
25608         a unique base value if the frame pointer is not eliminated
25609         to the stack pointer.
25611 2018-03-01  Tom de Vries  <tom@codesourcery.com>
25613         PR rtl-optimization/83327
25614         * lra-int.h (hard_regs_spilled_into): Declare.
25615         * lra.c (hard_regs_spilled_into): Define.
25616         (init_reg_info): Init hard_regs_spilled_into.
25617         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
25618         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
25619         (process_bb_lives): Handle hard_regs_spilled_into.
25620         (lra_create_live_ranges_1): Before doing liveness propagation, clear
25621         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
25623 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
25625         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
25626         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
25627         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
25628         * config/rs6000/aix72.h: New file.
25630 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
25632         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
25633         instead of warning_at with conditional singular and plural messages
25634         where possible.
25636         PR target/52991
25637         * stor-layout.c (update_alignment_for_field): For
25638         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
25639         && !DECL_PACKED (field), do the alignment update, just use
25640         only desired_align instead of MAX (type_align, desired_align)
25641         as the alignment.
25642         (place_field): Don't do known_align < desired_align handling
25643         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
25644         is non-NULL, instead do it after rli->prev_field handling and
25645         only if not within a bitfield word.  For DECL_PACKED (field)
25646         use type_align of BITS_PER_UNIT.
25648 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
25650         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
25651         superfluous parentheses and trailing spaces.
25653 2018-02-28  Richard Biener  <rguenther@suse.de>
25655         PR tree-optimization/84584
25656         * graphite-scop-detection.c (scop_detection::add_scop): Discard
25657         SCoPs with fake exit edge.
25659 2018-02-28  Martin Liska  <mliska@suse.cz>
25661         PR testsuite/84597
25662         * timevar.c (timer::print): Fix format to properly print 100%
25663         values.
25665 2018-02-28  Richard Biener  <rguenther@suse.de>
25667         PR middle-end/84607
25668         * genmatch.c (capture_info::walk_match): Do not mark
25669         captured expressions without operands as expr_p given
25670         they act more like predicates and should be subject to
25671         "lost tail" side-effect preserving.
25673 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
25675         PR rtl-optimization/81611
25676         * auto-inc-dec.c (attempt_change): Move dead note from
25677         mem_insn if it's the next use of regno
25678         (find_address): Take address use of reg holding
25679         non-incremented value.  Add parm to limit search to the named
25680         reg only.
25681         (merge_in_block): Attempt to use a mem insn that is the next
25682         use of the original regno.
25684 2018-02-27  Martin Sebor  <msebor@redhat.com>
25686         PR c++/83871
25687         * doc/invoke.texi (-Wmissing-attributes): New option.
25688         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
25690 2018-02-27  Martin Sebor  <msebor@redhat.com>
25692         PR translation/84207
25693         * diagnostic-core.h (warning_n, error_n, inform_n): Change
25694         n argument to unsigned HOST_WIDE_INT.
25695         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
25696         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
25697         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
25698         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
25700 2018-02-27  Richard Biener  <rguenther@suse.de>
25702         PR tree-optimization/84512
25703         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
25704         Do not use the estimate returned from record_stmt_cost for
25705         the scalar iteration cost but sum properly using add_stmt_cost.
25707 2018-02-27  Richard Biener  <rguenther@suse.de>
25709         PR tree-optimization/84466
25710         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
25711         Adjust last change to less strictly validate use operands.
25713 2018-02-27  Martin Liska  <mliska@suse.cz>
25715         PR gcov-profile/84548
25716         * gcov.c (process_file): Allow partial overlap and consider it
25717         also as group functions.
25718         (output_lines): Properly calculate range of lines for a group.
25720 2018-02-27  Martin Liska  <mliska@suse.cz>
25722         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
25723         'ggc' suffixes.  Change first column width.
25724         (timer::print): Fix formatting of the column.
25726 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
25728         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
25729         preserve inline entry blocks for the sake of debug inline
25730         entry point markers alone.
25731         (remove_unused_locals): Suggest in comments a better place to
25732         force the preservation of inline entry blocks that are
25733         otherwise unused, but do not preserve them.
25735 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
25737         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
25739 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
25741         PR target/84039
25742         * config/i386/constraints.md (Bs): Replace
25743         ix86_indirect_branch_register with
25744         TARGET_INDIRECT_BRANCH_REGISTER.
25745         (Bw): Likewise.
25746         * config/i386/i386.md (indirect_jump): Likewise.
25747         (tablejump): Likewise.
25748         (*sibcall_memory): Likewise.
25749         (*sibcall_value_memory): Likewise.
25750         Peepholes of indirect call and jump via memory: Likewise.
25751         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
25752         (*sibcall_value_GOT_32): Likewise.
25753         * config/i386/predicates.md (indirect_branch_operand): Likewise.
25754         (GOT_memory_operand): Likewise.
25755         (call_insn_operand): Likewise.
25756         (sibcall_insn_operand): Likewise.
25757         (GOT32_symbol_operand): Likewise.
25758         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
25760 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
25762         PR rtl-optimization/83496
25763         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
25764         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
25765         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
25766         redundant insn, if any.
25767         (relax_delay_slots): Likewise.
25768         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
25770 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
25772         PR tree-optimization/83965
25773         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
25774         that grouped statements are part of a reduction chain.  Return
25775         true if the statement is not marked as a reduction itself but
25776         is part of a group.
25777         (vect_recog_dot_prod_pattern): Don't check whether the statement
25778         is part of a group here.
25779         (vect_recog_sad_pattern): Likewise.
25780         (vect_recog_widen_sum_pattern): Likewise.
25782 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
25784         PR debug/84545
25785         * final.c (rest_of_clean_state): Also look for calls inside sequences.
25787 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
25789         PR target/84530
25790         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
25791         the bool argument.
25792         (ix86_output_indirect_function_return): New prototype.
25793         (ix86_split_simple_return_pop_internal): Likewise.
25794         * config/i386/i386.c (indirect_return_via_cx): New.
25795         (indirect_return_via_cx_bnd): Likewise.
25796         (indirect_thunk_name): Handle return va CX_REG.
25797         (output_indirect_thunk_function): Create alias for
25798         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
25799         (ix86_output_indirect_jmp): Remove the bool argument.
25800         (ix86_output_indirect_function_return): New function.
25801         (ix86_split_simple_return_pop_internal): Likewise.
25802         * config/i386/i386.md (*indirect_jump): Don't pass false
25803         to ix86_output_indirect_jmp.
25804         (*tablejump_1): Likewise.
25805         (simple_return_pop_internal): Change it to define_insn_and_split.
25806         Call ix86_split_simple_return_pop_internal to split it for
25807         -mfunction-return=.
25808         (simple_return_indirect_internal): Call
25809         ix86_output_indirect_function_return instead of
25810         ix86_output_indirect_jmp.
25812 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
25814         PR bootstrap/84405
25815         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
25816         memset and value initialization afterwards.
25818 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
25820         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
25822 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
25824         PR target/84521
25825         * common/config/aarch64/aarch64-common.c
25826         (aarch_option_optimization_table[]): Switch
25827         off fomit-frame-pointer
25829 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
25830             Chung-Ju Wu  <jasonwucj@gmail.com>
25832         * config/nds32/nds32-multiple.md (load_multiple): Disallow
25833         volatile memory.
25834         (store_multiple): Ditto.
25836 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
25838         * config.gcc: Add --with-cpu support for nds32 target.
25839         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
25840         * config/nds32/nds32.opt: Add -mcpu= option.
25842 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
25844         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
25845         isel=yes): Warn for these deprecated options.
25847 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
25849         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
25850         ISA_2_5_MASKS_EMBEDDED.
25852 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
25854         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
25855         p->max as pointers rather than using iterative_hash_expr.
25857 2018-02-23  Carl Love  <cel@us.ibm.com>
25859         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
25860         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
25861         BU_P8V_OVERLOAD_2.
25862         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
25863         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
25864         P8V_BUILTIN_VEC_VUNSIGNED2.
25866 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
25868         PR target/81572
25869         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
25870         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
25871         LRA_UNKNOWN_ALT.
25872         * lra-constraints.c (curr_insn_transform): Set up
25873         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
25874         LRA_UNKNOWN_ALT.
25875         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
25876         * lra-eliminations.c (spill_pseudos): Ditto.
25877         (process_insn_for_elimination): Ditto.
25878         * lra-lives.c (reg_early_clobber_p): Use the new macros.
25879         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
25880         LRA_NON_CLOBBERED_ALT.
25882 2018-02-22  Martin Sebor  <msebor@redhat.com>
25884         PR tree-optimization/84480
25885         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
25886         to maybe_diag_stxncpy_trunc.  Call it.
25887         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
25888         from gimple_fold_builtin_strcpy.  Print inlining stack.
25889         (handle_builtin_stxncpy): Print inlining stack.
25890         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
25892 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
25894         PR target/84176
25895         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
25896         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
25897         and -fcheck-pointer-bounds are used together.
25898         (indirect_thunk_prefix): New enum.
25899         (indirect_thunk_need_prefix): New function.
25900         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
25901         "_nt" instead of "_bnd" for NOTRACK prefix.
25902         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
25903         (output_indirect_thunk_function): Likewise.
25904         (): Likewise.
25905         (ix86_code_end): Update output_indirect_thunk_function calls.
25906         (ix86_output_indirect_branch_via_reg): Replace
25907         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
25908         (ix86_output_indirect_branch_via_push): Likewise.
25909         (ix86_output_function_return): Likewise.
25910         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
25911         incompatible with -fcf-protection=branch and
25912         -fcheck-pointer-bounds.
25914 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
25916         PR target/83335
25917         * config/aarch64/aarch64.c (aarch64_print_address_internal):
25918         Change gcc_assert call to output_operand_lossage.
25920 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
25922         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
25924 2018-02-22  DJ Delorie  <dj@redhat.com>
25925             Sebastian Perta  <sebastian.perta@renesas.com>
25926             Oleg Endo  <olegendo@gcc.gnu.org>
25928         * config/rx/rx.c (rx_rtx_costs): New function.
25929         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
25931 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
25933         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
25935 2018-02-22  Martin Liska  <mliska@suse.cz>
25937         PR driver/83193
25938         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
25939         Add "native" as a possible value.
25941 2018-02-22  Martin Liska  <mliska@suse.cz>
25943         PR driver/83193
25944         * config/i386/i386.c (ix86_option_override_internal):
25945         Add "native" as a possible value for -march and -mtune.
25947 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
25949         PR target/84502
25950         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
25951         to all type variants.
25953         PR tree-optimization/84503
25954         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
25955         width as info->bitpos + info->bitsize - start.
25956         (merged_store_group::merge_overlapping): Simplify width computation.
25957         (check_no_overlap): New function.
25958         (imm_store_chain_info::try_coalesce_bswap): Compute expected
25959         start + width and last_order of the group, fail if check_no_overlap
25960         fails.
25961         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
25962         to group if check_no_overlap fails.
25964 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
25966         * config/rs6000/altivec.md: Delete contraint arguments to
25967         define_expand, define_split, and define_peephole2, and in
25968         define_insn_and_split if always unused.
25969         * config/rs6000/darwin.md: Ditto.
25970         * config/rs6000/dfp.md: Ditto.
25971         * config/rs6000/rs6000.md: Ditto.
25972         * config/rs6000/sync.md: Ditto.
25973         * config/rs6000/vector.md: Ditto.
25974         * config/rs6000/vsx.md: Ditto.
25976 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
25978         * config/rs6000/altivec.md: Write output control strings as braced
25979         blocks instead of double-quoted strings.
25980         * config/rs6000/darwin.md: Ditto.
25981         * config/rs6000/rs6000.md: Ditto.
25982         * config/rs6000/vector.md: Ditto.
25983         * config/rs6000/vsx.md: Ditto.
25985 2018-02-21  Jason Merrill  <jason@redhat.com>
25987         PR c++/84314 - ICE with templates and fastcall attribute.
25988         * attribs.c (build_type_attribute_qual_variant): Remove assert.
25990 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
25992         * ipa-cp.c (determine_versionability): Fix comment typos.
25994 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
25996         PR c/84229
25997         * ipa-cp.c (determine_versionability): Do not version functions caling
25998         va_arg_pack.
26000 2018-02-21  Martin Liska  <mliska@suse.cz>
26002         PR driver/83193
26003         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
26004         Add "native" as a possible value.
26005         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
26006         the macro when native cpu detection is available.
26008 2018-02-21  Martin Liska  <mliska@suse.cz>
26010         PR driver/83193
26011         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
26012         Add "native" as a possible value.
26013         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
26014         when native cpu detection is available.
26016 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
26017             Martin Sebor  <msebor@redhat.com>
26019         PR tree-optimization/84478
26020         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
26021         false.
26022         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
26023         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
26024         support which is conservatively correct, for 2 only stay conservative
26025         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
26026         argument to the 2 argument get_range_strlen, adjust 6 arg
26027         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
26028         false.
26029         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
26030         (gimple_fold_builtin_strlen): Pass true as last argument to
26031         get_range_strlen.
26033 2018-02-20  Martin Sebor  <msebor@redhat.com>
26035         PR middle-end/84095
26036         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
26037         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
26038         (builtin_memref::builtin_memref): Factor out parts into
26039         set_base_and_offset and call it.
26041 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
26043         PR middle-end/84406
26044         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
26045         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
26046         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
26047         search at the associated MODE_INT.
26049 2018-02-20  Jeff Law  <law@redhat.com>
26051         PR middle-end/82123
26052         PR tree-optimization/81592
26053         PR middle-end/79257
26054         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
26055         for range data rather than using global data.
26056         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
26057         range data rather than using global data.
26058         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
26059         pass it to children as needed.
26060         (struct directive::fmtresult): Similarly.
26061         (struct directive::set_width): Similarly.
26062         (struct directive::set_precision): Similarly.
26063         (format_integer, format_directive, parse_directive): Similarly.
26064         (format_none): Accept unnamed vr_values parameter.
26065         (format_percent, format_floating, format_character): Similarly.
26066         (format_string, format_plain): Similarly.
26067         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
26068         the EVRP range analyzer for range data rather than using global data.
26069         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
26070         gimple-ssa-evrp-analyze.h
26071         (class sprintf_dom_walker): Add after_dom_children member function.
26072         Add evrp_range_analyzer member.
26073         (sprintf_dom_walker::before_dom_children): Call into the EVRP
26074         range analyzer as needed.
26075         (sprintf_dom_walker::after_dom_children): New member function.
26076         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
26077         if not optimizing.
26078         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
26079         (evrp_range_analyzer::pop_to_marker): Likewise.
26081 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
26083         PR tree-optimization/84419
26084         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
26085         with the required type if its current type is compatible but
26086         different.
26088 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
26090         PR middle-end/82004
26091         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
26092         after vectorization.
26094 2018-02-20  Martin Liska  <mliska@suse.cz>
26096         PR driver/83193
26097         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
26098         possible values if we don't have a hint.
26100 2018-02-20  Martin Liska  <mliska@suse.cz>
26102         PR c/84310
26103         PR target/79747
26104         * final.c (shorten_branches): Build align_tab array with one
26105         more element.
26106         * opts.c (finish_options): Add alignment option limit check.
26107         (MAX_CODE_ALIGN): Likewise.
26108         (MAX_CODE_ALIGN_VALUE): Likewise.
26109         * doc/invoke.texi: Document maximum allowed option value for
26110         all -falign-* options.
26112 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
26114         PR target/84146
26115         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
26116         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
26117         * var-tracking.c (emit_note_insn_var_location): Remove all references
26118         to NOTE_INSN_CALL_ARG_LOCATION.
26119         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
26120         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
26121         Use copy_rtx_if_shared.
26122         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
26123         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
26124         (dwarf2out_var_location): Remove handling of
26125         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
26126         on call_insn.
26127         * final.c (final_scan_insn): Remove all references to
26128         NOTE_INSN_CALL_ARG_LOCATION.
26129         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
26130         before dumping final insns.
26131         * except.c (emit_note_eh_region_end): Remove all references to
26132         NOTE_INSN_CALL_ARG_LOCATION.
26133         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
26134         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
26135         * config/arc/arc.c (hwloop_optimize): Likewise.
26136         * config/arm/arm.c (create_fix_barrier): Likewise.
26137         * config/s390/s390.c (s390_chunkify_start): Likewise.
26138         * config/sh/sh.c (find_barrier): Likewise.
26139         * config/i386/i386.c (rest_of_insert_endbranch,
26140         ix86_seh_fixup_eh_fallthru): Likewise.
26141         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
26142         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
26143         * config/frv/frv.c (frv_function_prologue): Likewise.
26144         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
26145         reg note.
26146         (note_outside_basic_block_p): Remove all references to
26147         NOTE_INSN_CALL_ARG_LOCATION.
26148         * gengtype.c (adjust_field_rtx_def): Likewise.
26149         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
26150         Likewise.
26151         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
26152         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
26154         PR c++/84444
26155         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
26156         is ADDR_EXPR.
26158         PR tree-optimization/84452
26159         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
26160         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
26161         is NULL.
26163 2018-02-19  Martin Liska  <mliska@suse.cz>
26165         PR sanitizer/82183
26166         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
26168 2018-02-19  Martin Liska  <mliska@suse.cz>
26169             Richard Sandiford  <richard.sandiford@linaro.org>
26171         PR tree-optimization/82491
26172         * gimple-fold.c (get_base_constructor): Make earlier bail out
26173         to prevent ubsan.
26175 2018-02-19  Carl Love  <cel@us.ibm.com>
26177         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
26178         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
26179         BU_P8V_OVERLOAD_1.
26180         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
26181         P8V_BUILTIN_VEC_NEG.
26183 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
26185         * config/rl78/rl78.md (movdf): New define expand.
26187 2018-02-19  Martin Liska  <mliska@suse.cz>
26189         PR other/80589
26190         * doc/invoke.texi: Fix typo.
26191         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
26193 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
26195         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
26196         handle rs6000_single_float and rs6000_double_float specially for
26197         e500 family CPUs.
26199 2018-02-16  Jeff Law  <law@redhat.com>
26201         * config/rx/rx.c (add_pop_cfi_notes): New function.;
26202         (pop_regs): Use it.
26204 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
26206         PR ipa/84425
26207         * ipa-inline.c (inline_small_functions): Fix a typo.
26209 2018-02-16  Nathan Sidwell  <nathan@acm.org>
26211         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
26213 2018-02-16  Carl Love  <cel@us.ibm.com>
26215         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
26216         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
26217         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
26218         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
26219         expansion to P8V_BUILTIN_VEC_FLOAT2.
26221 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
26223         PR rtl-optimization/70023
26224         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
26225         src_regno into account.
26227 2018-02-16  Carl Love  <cel@us.ibm.com>
26229         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
26230         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
26231         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
26232         * config/rs6000/rs6000.c: Remove case statements for
26233         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
26234         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
26235         and P9V_BUILTIN_VEC_VINSERT4B.
26236         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
26237         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
26238         * config/rs6000/vsx.md:
26239         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
26240         vec_insert4b.
26242 2018-02-16  Carl Love  <cel@us.ibm.com>
26244         * config/rs6000/altivec.h: Add builtin names vec_extract4b
26245         vec_insert4b.
26246         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
26247         definitions.
26248         * config/rs6000/rs6000-c.c: Add the definitions for
26249         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
26250         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
26251         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
26252         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
26253         definition for insert4b and define insn *insert3b_internal.
26254         * doc/extend.texi: Add documentation for vec_extract4b.
26256 2018-02-16  Nathan Sidwell  <nathan@acm.org>
26258         * doc/extend.texi (Backwards Compatibility): Mention friend
26259         injection.  Note for-scope is deprecated.
26260         * doc/invoke.texi (-ffriend-injection): Deprecate.
26262 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
26264         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
26265         that moved to I2, also allow destinations that are a paradoxical
26266         subreg (instead of a normal reg).
26268 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
26270         PR target/83831
26271         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
26272         to QImode.
26274 2018-02-16  Richard Biener  <rguenther@suse.de>
26276         PR tree-optimization/84037
26277         PR tree-optimization/84016
26278         PR target/82862
26279         * config/i386/i386.c (ix86_builtin_vectorization_cost):
26280         Adjust vec_construct for the fact we need additional higher latency
26281         128bit inserts for AVX256 and AVX512 vector builds.
26282         (ix86_add_stmt_cost): Scale vector construction cost for
26283         elementwise loads.
26285 2018-02-16  Richard Biener  <rguenther@suse.de>
26287         PR tree-optimization/84417
26288         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
26289         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
26290         (non_rewritable_lvalue_p): Likewise, use poly-ints.
26292 2018-02-16  Martin Liska  <mliska@suse.cz>
26294         PR sanitizer/84307
26295         * internal-fn.def (ASAN_CHECK): Set proper flags.
26296         (ASAN_MARK): Likewise.
26298 2018-02-16  Julia Koval  <julia.koval@intel.com>
26300         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
26301         from PTA_CANNONLAKE.
26303 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
26305         PR target/84272
26306         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
26307         Use ++iter rather than iter++ for std::list iterators.
26308         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
26309         defer deleting them until all nodes in the forest are processed.  Do
26310         free even leaf nodes.  Change to_process into auto_vec.
26312         PR bootstrap/84405
26313         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
26314         * vec.h (vec_default_construct): Use memset instead of placement new
26315         if BROKEN_VALUE_INITIALIZATION is defined.
26316         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
26317         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
26318         is defined.
26320         PR rtl-optimization/83723
26321         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
26322         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
26323         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
26324         recursive calls.
26325         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
26326         callers.
26327         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
26329 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
26331         PR rtl-optimization/81443
26332         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
26333         from inner REGs to paradoxical SUBREGs.
26335 2018-02-16  Richard Biener  <rguenther@suse.de>
26337         PR tree-optimization/84399
26338         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
26339         For operands we can analyze at their definition make sure we can
26340         analyze them at each use as well.
26342 2018-02-16  Richard Biener  <rguenther@suse.de>
26344         PR tree-optimization/84190
26345         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
26346         volatile accesses if the decl isn't volatile.
26348 2018-02-15  Jason Merrill  <jason@redhat.com>
26350         PR c++/84314 - ICE with templates and fastcall attribute.
26351         * attribs.c (build_type_attribute_qual_variant): Don't clobber
26352         TYPE_CANONICAL on an existing type.
26354 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
26356         PR tree-optimization/84383
26357         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
26358         dstoff nor call operand_equal_p if dstbase is NULL.
26360         PR tree-optimization/84334
26361         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
26362         also a CONSTANT_CLASS_P, punt.
26364 2018-02-14  Jim Wilson  <jimw@sifive.com>
26366         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
26367         first SMALL_OPERAND check.  New local min_second_step.  Move assert
26368         to where locals are set.  Add TARGET_RVC support.
26369         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
26371 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
26373         * doc/invoke.texi: Correct -Wformat-overflow code sample.
26375 2018-02-14  Martin Sebor  <msebor@redhat.com>
26377         PR tree-optimization/83698
26378         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
26379         arrays constrain the offset range to their bounds.
26380         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
26381         (builtin_access::overlap): Avoid setting the size of overlap if it's
26382         already been set.
26383         (maybe_diag_overlap): Also consider arrays when deciding what values
26384         of offsets to include in diagnostics.
26386 2018-02-14  Martin Sebor  <msebor@redhat.com>
26388         PR c/84108
26389         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
26390         that correspond to the kind of a declaration.
26392 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
26394         PR target/83984
26395         * config/pa/pa.md: Load address of PIC label using the linkage table
26396         if the label is nonlocal.
26398 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
26400         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
26401         warning message if user requests -maltivec=be.
26402         * doc/invoke.texi: Document deprecation of -maltivec=be.
26404 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
26406         PR target/84220
26407         * config/rs6000/rs6000-c.c: Update definitions for
26408         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
26409         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
26411 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
26413         PR target/84239
26414         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
26415         add _get_ssp intrinsics. Remove argument from
26416         __builtin_ia32_rdssp[d|q].
26417         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
26418         * config/i386/i386-builtin.def: Remove argument from
26419         __builtin_ia32_rdssp[d|q].
26420         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
26421         ix86_expand_special_args_builtin for _rdssp[d|q].
26422         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
26423         Clear register before usage.
26424         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
26425         Add documentation for new _get_ssp and _inc_ssp intrinsics.
26427 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
26429         PR tree-optimization/84357
26430         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
26431         operand 1 of an ARRAY_REF too.
26433 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
26435         PR target/83831
26436         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
26437         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
26438         declarations.
26439         (set_of_reg): New struct.
26440         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
26441         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
26442         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
26443         functions.
26444         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
26445         Split into bitclr, bitset, bitinvert patterns if appropriate.
26446         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
26447         use rx_fuse_in_memory_bitop.
26448         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
26449         to named insn, correct maximum insn length.
26451 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
26453         PR target/79242
26454         * machmode.def: Define a complex mode for PARTIAL_INT.
26455         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
26456         MODE_PARTIAL_INT.
26457         * doc/rtl.texi: Document CSPImode.
26458         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
26459         handling.
26460         (msp430_hard_regno_nregs_with_padding): Likewise.
26462 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
26464         PR target/84279
26465         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
26467 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
26469         PR rtl-optimization/84169
26470         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
26471         we generated a parallel as new i3 and we split that to new i2 and i3
26472         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
26473         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
26474         those to i2, not i1.  Partially rewrite this scan code.
26476 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
26478         PR c/82210
26479         * stor-layout.c (place_field): For variable length fields, adjust
26480         offset_align afterwards not just based on the field's alignment,
26481         but also on the size.
26483         PR middle-end/84309
26484         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
26485         of exps and logs in the use_exp2 case.
26487 2018-02-13  Jeff Law  <law@redhat.com>
26489         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
26490         entry for "vector".
26492         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
26493         ARGS as unused.
26495 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
26497         PR debug/84342
26498         PR debug/84319
26499         * common.opt (gas-loc-support, gas-locview-support): New.
26500         (ginline-points, ginternal-reset-location-views): New.
26501         * doc/invoke.texi: Document them.  Use @itemx where intended.
26502         (gvariable-location-views): Adjust.
26503         * target.def (reset_location_view): New.
26504         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
26505         (TARGET_RESET_LOCATION_VIEW): New.
26506         * doc/tm.texi: Rebuilt.
26507         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
26508         (dwarf2out_default_as_locview_support): New.
26509         (output_asm_line_debug_info): Use option variables.
26510         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
26511         (output_loc_list): Likewise.
26512         (add_high_low_attributes): Check option variables.
26513         Don't output entry view attribute in strict mode.
26514         (gen_inlined_subroutine_die): Check option variables.
26515         (dwarf2out_inline_entry): Likewise.
26516         (init_sections_and_labels): Likewise.
26517         (dwarf2out_early_finish): Likewise.
26518         (maybe_reset_location_view): New, from...
26519         (dwarf2out_var_location): ... here.  Call it.
26520         * debug.h (dwarf2out_default_as_loc_support): Declare.
26521         (dwarf2out_default_as_locview_support): Declare.
26522         * hooks.c (hook_int_rtx_insn_0): New.
26523         * hooks.h (hook_int_rtx_insn_0): Declare.
26524         * toplev.c (process_options): Take -gas-loc-support and
26525         -gas-locview-support from dwarf2out.  Enable
26526         -gvariable-location-views by default only with locview
26527         assembler support.  Enable -ginternal-reset-location-views by
26528         default only if the target defines the corresponding hook.
26529         Enable -ginline-points by default if location views are
26530         enabled; force it disabled if statement frontiers are
26531         disabled.
26532         * tree-inline.c (expand_call_inline): Check option variables.
26533         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
26535 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
26537         PR tree-optimization/84321
26538         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
26539         handling.  Also check whether the anti-range contains any values
26540         that satisfy the mask; switch to a VR_RANGE if not.
26542 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
26544         PR sanitizer/84340
26545         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
26547 2018-02-13  Martin Jambor  <mjambor@suse.cz>
26549         PR c++/83990
26550         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
26551         of call statements, also set location of a load to a temporary.
26553 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
26555         * config/rl78/rl78.c (add_vector_labels): New function.
26556         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
26557         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
26558         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
26559         which checks that no arguments are passed.
26560         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
26561         * doc/extend.texi: Documentation for the new attribute.
26563 2018-02-13  Andreas Schwab  <schwab@suse.de>
26565         * config/riscv/linux.h (CPP_SPEC): Define.
26567 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
26569         PR target/84335
26570         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
26571         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
26572         OPTION_MASK_ISA_AES as first argument to def_builtin_const
26573         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
26574         instead of OPTION_MASK_ISA_PCLMUL as first argument to
26575         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
26576         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
26577         temporarily for AES and PCLMUL builtins.
26579         PR tree-optimization/84339
26580         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
26581         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
26582         Formatting fixes.
26584         PR middle-end/84309
26585         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
26586         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
26587         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
26588         inline function.
26589         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
26590         inline function.
26591         * omp-simd-clone.h: New file.
26592         * omp-simd-clone.c: Include omp-simd-clone.h.
26593         (expand_simd_clones): No longer static.
26594         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
26595         cgraph.h and omp-simd-clone.h.
26596         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
26597         (vect_recog_widen_shift_pattern): Formatting fix.
26598         (vect_pattern_recog_1): Don't check optab for calls.
26600         PR target/84336
26601         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
26602         operands[2] into a REG before using gen_lowpart on it.
26604 2018-02-12  Jeff Law  <law@redhat.com>
26606         PR target/83760
26607         * config/sh/sh.c (find_barrier): Consider a sibling call
26608         a barrier as well.
26610         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
26611         successfully back substituting a reg.
26613 2018-02-12  Richard Biener  <rguenther@suse.de>
26615         PR tree-optimization/84037
26616         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
26617         parameter, move visited init to caller.
26618         (vect_slp_analyze_operations): Separate cost from validity
26619         check, initialize visited once for all instances.
26620         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
26621         for all instances.
26622         * tree-vect-stmts.c (vect_model_simple_cost): Make early
26623         out an assert.
26624         (vect_model_promotion_demotion_cost): Likewise.
26625         (vectorizable_bswap): Guard cost modeling with !slp_node
26626         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
26627         SLP stmts.
26628         (vectorizable_call): Likewise.
26629         (vectorizable_conversion): Likewise.
26630         (vectorizable_assignment): Likewise.
26631         (vectorizable_shift): Likewise.
26632         (vectorizable_operation): Likewise.
26633         (vectorizable_store): Likewise.
26634         (vectorizable_load): Likewise.
26635         (vectorizable_condition): Likewise.
26636         (vectorizable_comparison): Likewise.
26638 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
26640         PR sanitizer/84307
26641         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
26642         (ASAN_MARK): Fix fnspec to account for return value, change pointer
26643         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
26645 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
26647         PR middle-end/83665
26648         * params.def (inline-min-speedup): Increase from 8 to 15.
26649         (max-inline-insns-auto): Decrease from 40 to 30.
26650         * ipa-split.c (consider_split): Add some buffer for function to
26651         be considered inlining candidate.
26652         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
26653         default values.
26655 2018-02-12  Richard Biener  <rguenther@suse.de>
26657         PR tree-optimization/84037
26658         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
26659         matched stmts if we cannot swap the non-matched ones.
26661 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
26663         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
26664         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
26665         _mm_maskz_scalef_round_ss): New intrinsics.
26666         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
26667         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
26668         __builtin_ia32_scalefss_round): Remove.
26669         (__builtin_ia32_scalefsd_mask_round,
26670         __builtin_ia32_scalefss_mask_round): New intrinsics.
26671         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
26672         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
26673         ((match_operand:VF_128 2 "<round_nimm_predicate>"
26674         "<round_constraint>")): Changed to ...
26675         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
26676         "<round_scalar_constraint>")): ... this.
26677         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
26678         %0, %1, %2<round_op3>}"): Changed to ...
26679         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
26680         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
26681         %2<round_scalar_mask_op3>}"): ... this.
26682         * config/i386/subst.md (round_scalar_nimm_predicate): New.
26684 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
26686         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
26687         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
26688         (_mm_maskz_sqrt_round_ss): New intrinsics.
26689         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
26690         (__builtin_ia32_sqrtsd_mask_round)
26691         (__builtin_ia32_sqrtss_mask_round): New builtins.
26692         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
26693         (__builtin_ia32_sqrtss_round): Remove.
26694         (__builtin_ia32_sqrtsd_mask_round)
26695         (__builtin_ia32_sqrtss_mask_round): New builtins.
26696         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
26697         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
26698         ((match_operand:VF_128 1 "vector_operand"
26699         "xBm,<round_constraint>")): Changed to ...
26700         ((match_operand:VF_128 1 "vector_operand"
26701         "xBm,<round_scalar_constraint>")): ... this.
26702         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
26703         %0, %2, %<iptr>1<round_op3>}): Changed to ...
26704         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
26705         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
26706         %<iptr>1<round_scalar_mask_op3>}): ... this.
26707         ((set_attr "prefix" "<round_prefix>")): Changed to ...
26708         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
26710 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
26712         PR target/84266
26713         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
26714         Cast vec_cmpeq result to correct type.
26715         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
26716         Cast vec_cmpgt result to correct type.
26718 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
26720         * final.c (final_scan_insn_1): Renamed from...
26721         (final_scan_insn): ... this.  New wrapper, to recover
26722         seen from the outermost call in recursive ones.
26723         * config/sparc/sparc.c (output_return): Drop seen from call.
26724         (output_sibcall): Likewise.
26725         * config/visium/visium.c (output_branch): Likewise.
26727 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
26729         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
26730         function label.
26732 2018-02-10  Alan Modra  <amodra@gmail.com>
26734         PR target/84300
26735         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
26736         Specify LR as an input.
26738 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
26740         PR sanitizer/83987
26741         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
26742         remove_member_access_dummy_vars): New functions.
26743         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
26744         lower_omp_1, execute_lower_omp): Use them.
26746         PR rtl-optimization/84308
26747         * shrink-wrap.c (spread_components): Release todo vector.
26749 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
26751         PR rtl-optimization/57193
26752         * ira-color.c (struct allocno_color_data): Add member
26753         conflict_allocno_hard_prefs.
26754         (update_conflict_allocno_hard_prefs): New.
26755         (bucket_allocno_compare_func): Add a preference based on
26756         conflict_allocno_hard_prefs.
26757         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
26758         (color_allocnos): Remove a dead code.  Initiate
26759         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
26761 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
26763         PR target/84226
26764         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
26765         constraint from =wa to wa.  Avoid a subreg on the output operand,
26766         instead use a pseudo and subreg it in a move.
26767         (p9_xxbrd_<mode>): Changed to ...
26768         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
26769         (p9_xxbrd_v2df): New expander.
26770         (p9_xxbrw_<mode>): Changed to ...
26771         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
26772         (p9_xxbrw_v4sf): New expander.
26774 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
26776         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
26778 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
26780         PR target/83926
26781         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
26782         multiply in 32-bit mode.
26783         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
26784         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
26785         mode.
26787 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
26789         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
26790         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
26791         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
26792         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
26794 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
26796         PR lto/84213
26797         * dwarf2out.c (is_trivial_indirect_ref): New function.
26798         (dwarf2out_late_global_decl): Do not generate a location
26799         attribute for variables that have a non-trivial DECL_VALUE_EXPR
26800         and that are not defined in the current unit.
26802 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
26804         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
26805         instead of a libcall for UNORDERED.
26807 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
26809         PR target/82641
26810         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
26811         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
26813 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
26815         PR target/PR84295
26816         * config/s390/s390.c (s390_set_current_function): Invoke
26817         s390_indirect_branch_settings also if fndecl didn't change.
26819 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
26821         * config/rs6000/rs6000.md (blockage): Set length to zero.
26823 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
26825         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
26827 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
26829         PR sanitizer/84285
26830         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
26831         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
26832         -static-lib*san.
26834         PR debug/84252
26835         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
26836         PARALLEL incoming that failed vt_get_decl_and_offset check.
26838         PR middle-end/84237
26839         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
26840         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
26841         TREE_READONLY bit.
26842         (get_variable_section): For decls in named .bss* sections pass true as
26843         second argument to bss_initializer_p.
26845 2018-02-09  Marek Polacek  <polacek@redhat.com>
26846             Jakub Jelinek  <jakub@redhat.com>
26848         PR c++/83659
26849         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
26850         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
26851         Sync some changes from cxx_fold_indirect_ref.
26853 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
26855         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
26856         markers.
26857         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
26858         (BLOCK_INLINE_ENTRY_LABEL): New.
26859         (dwarf2out_var_location): Disregard inline entry markers.
26860         (inline_entry_data): New struct.
26861         (inline_entry_data_hasher): New hashtable type.
26862         (inline_entry_data_hasher::hash): New.
26863         (inline_entry_data_hasher::equal): New.
26864         (inline_entry_data_table): New variable.
26865         (add_high_low_attributes): Add DW_AT_entry_pc and
26866         DW_AT_GNU_entry_view attributes if a pending entry is found
26867         in inline_entry_data_table.  Add old entry_pc attribute only
26868         if debug nonbinding markers are disabled.
26869         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
26870         markers are enabled.
26871         (block_within_block_p, dwarf2out_inline_entry): New.
26872         (dwarf2out_finish): Check that no entries remained in
26873         inline_entry_data_table.
26874         * final.c (reemit_insn_block_notes): Handle inline entry notes.
26875         (final_scan_insn, notice_source_line): Likewise.
26876         (rest_of_clean_state): Skip inline entry markers.
26877         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
26878         markers.
26879         * gimple.c (gimple_build_debug_inline_entry): New.
26880         * gimple.h (enum gimple_debug_subcode): Add
26881         GIMPLE_DEBUG_INLINE_ENTRY.
26882         (gimple_build_debug_inline_entry): Declare.
26883         (gimple_debug_inline_entry_p): New.
26884         (gimple_debug_nonbind_marker_p): Adjust.
26885         * insn-notes.def (INLINE_ENTRY): New.
26886         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
26887         inline entry marker notes.
26888         (print_insn): Likewise.
26889         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
26890         (INSN_DEBUG_MARKER_KIND): Likewise.
26891         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
26892         * tree-inline.c (expand_call_inline): Build and insert
26893         debug_inline_entry stmt.
26894         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
26895         inline entry blocks early, if nonbind markers are enabled.
26896         (dump_scope_block): Dump fragment info.
26897         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
26898         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
26899         (gimple_build_debug_inline_entry): New.
26900         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
26901         Enable/disable inline entry points too.
26902         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
26903         (DEBUG_INSN): Describe inline entry markers.
26905         * common.opt (gvariable-location-views): New.
26906         (gvariable-location-views=incompat5): New.
26907         * config.in: Rebuilt.
26908         * configure: Rebuilt.
26909         * configure.ac: Test assembler for view support.
26910         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
26911         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
26912         * dwarf2out.c (var_loc_view): New typedef.
26913         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
26914         (dwarf2out_locviews_in_attribute): New.
26915         (dwarf2out_locviews_in_loclist): New.
26916         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
26917         (enum dw_line_info_opcode): Add LI_adv_address.
26918         (struct dw_line_info_table): Add view.
26919         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
26920         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
26921         (zero_view_p): New variable.
26922         (ZERO_VIEW_P): New macro.
26923         (output_asm_line_debug_info): New.
26924         (struct var_loc_node): Add view.
26925         (add_AT_view_list, AT_loc_list): New.
26926         (add_var_loc_to_decl): Add view param.  Test it against last.
26927         (new_loc_list): Add view params.  Record them.
26928         (AT_loc_list_ptr): Handle loc and view lists.
26929         (view_list_to_loc_list_val_node): New.
26930         (print_dw_val): Handle dw_val_class_view_list.
26931         (size_of_die): Likewise.
26932         (value_format): Likewise.
26933         (loc_list_has_views): New.
26934         (gen_llsym): Set vl_symbol too.
26935         (maybe_gen_llsym, skip_loc_list_entry): New.
26936         (dwarf2out_maybe_output_loclist_view_pair): New.
26937         (output_loc_list): Output view list or entries too.
26938         (output_view_list_offset): New.
26939         (output_die): Handle dw_val_class_view_list.
26940         (output_dwarf_version): New.
26941         (output_compilation_unit_header): Use it.
26942         (output_skeleton_debug_sections): Likewise.
26943         (output_rnglists, output_line_info): Likewise.
26944         (output_pubnames, output_aranges): Update version comments.
26945         (output_one_line_info_table): Output view numbers in asm comments.
26946         (dw_loc_list): Determine current endview, pass it to new_loc_list.
26947         Call maybe_gen_llsym.
26948         (loc_list_from_tree_1): Adjust.
26949         (add_AT_location_description): Create view list attribute if
26950         needed, check it's absent otherwise.
26951         (convert_cfa_to_fb_loc_list): Adjust.
26952         (maybe_emit_file): Call output_asm_line_debug_info for test.
26953         (dwarf2out_var_location): Reset views as needed.  Precompute
26954         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
26955         attribute.  Set view.
26956         (new_line_info_table): Reset next view.
26957         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
26958         (dwarf2out_source_line): Likewise.  Output view resets and labels to
26959         the assembler, or select appropriate line info opcodes.
26960         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
26961         (optimize_string_length): Catch it.  Adjust.
26962         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
26963         dw_val_class_view_list, and remove it if no longer needed.
26964         (hash_loc_list): Hash view numbers.
26965         (loc_list_hasher::equal): Compare them.
26966         (optimize_location_lists): Check whether a view list symbol is
26967         needed, and whether the locview attribute is present, and
26968         whether they match.  Remove the locview attribute if no longer
26969         needed.
26970         (index_location_lists): Call skip_loc_list_entry for test.
26971         (dwarf2out_finish): Call output_asm_line_debug_info for test.
26972         Use output_dwarf_version.
26973         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
26974         (struct dw_val_node): Add val_view_list.
26975         * final.c (SEEN_NEXT_VIEW): New.
26976         (set_next_view_needed): New.
26977         (clear_next_view_needed): New.
26978         (maybe_output_next_view): New.
26979         (final_start_function): Rename to...
26980         (final_start_function_1): ... this.  Take pointer to FIRST,
26981         add SEEN parameter.  Emit param bindings in the initial view.
26982         (final_start_function): Reintroduce SEEN-less interface.
26983         (final): Rename to...
26984         (final_1): ... this.  Take SEEN parameter.  Output final pending
26985         next view at the end.
26986         (final): Reintroduce seen-less interface.
26987         (final_scan_insn): Output pending next view before switching
26988         sections or ending a block.  Mark the next view as needed when
26989         outputting variable locations.  Notify debug backend of section
26990         changes, and of location view changes.
26991         (rest_of_handle_final): Adjust.
26992         * toplev.c (process_options): Autodetect value for debug variable
26993         location views option.  Warn on incompat5 without -gdwarf-5.
26994         * doc/invoke.texi (gvariable-location-views): New.
26995         (gvariable-location-views=incompat5): New.
26996         (gno-variable-location-views): New.
26998 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
27000         PR tree-optimization/84136
27001         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
27002         that the result of find_edge is non-NULL.
27004 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
27006         PR target/83008
27007         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
27008         storing integer register in SImode.  Fix cost of 256 and 512
27009         byte aligned SSE register store.
27011 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
27013         * config/i386/i386.c (ix86_multiplication_cost): Fix
27014         multiplication cost for TARGET_AVX512DQ.
27016 2018-02-08  Marek Polacek  <polacek@redhat.com>
27018         PR tree-optimization/84238
27019         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
27020         get_range_strlen.
27022 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
27024         PR tree-optimization/84265
27025         * tree-vect-stmts.c (vectorizable_store): Don't treat
27026         VMAT_CONTIGUOUS accesses as grouped.
27027         (vectorizable_load): Likewise.
27029 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
27031         PR tree-optimization/81635
27032         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
27033         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
27034         (test_round_for_mask): New functions.
27035         (wide_int_cc_tests): Call test_round_for_mask.
27036         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
27037         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
27038         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
27039         range returned by get_range_info.
27041 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
27043         PR ipa/81360
27044         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
27045         * symtab.c: Include builtins.h
27046         (symtab_node::output_to_lto_symbol_table_p): Move here
27047         from lto-streamer-out.c:output_symbol_p.
27048         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
27049         (output_symbol_p): Move all logic to symtab.c
27050         (produce_symtab): Update.
27052 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
27054         * config/s390/s390-opts.h (enum indirect_branch): Define.
27055         * config/s390/s390-protos.h (s390_return_addr_from_memory)
27056         (s390_indirect_branch_via_thunk)
27057         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
27058         (enum s390_indirect_branch_type): Define.
27059         * config/s390/s390.c (struct s390_frame_layout, struct
27060         machine_function): Remove.
27061         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
27062         (indirect_branch_table_label_no, indirect_branch_table_name):
27063         Define variables.
27064         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
27065         (enum s390_indirect_branch_option): Define.
27066         (s390_return_addr_from_memory): New function.
27067         (s390_handle_string_attribute): New function.
27068         (s390_attribute_table): Add new attribute handler.
27069         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
27070         (s390_indirect_branch_via_thunk): New function.
27071         (s390_indirect_branch_via_inline_thunk): New function.
27072         (s390_function_ok_for_sibcall): When jumping via thunk disallow
27073         sibling call optimization for non z10 compiles.
27074         (s390_emit_call): Force indirect branch target to be a single
27075         register.  Add r1 clobber for non-z10 compiles.
27076         (s390_emit_epilogue): Emit return jump via return_use expander.
27077         (s390_reorg): Handle JUMP_INSNs as execute targets.
27078         (s390_option_override_internal): Perform validity checks for the
27079         new command line options.
27080         (s390_indirect_branch_attrvalue): New function.
27081         (s390_indirect_branch_settings): New function.
27082         (s390_set_current_function): Invoke s390_indirect_branch_settings.
27083         (s390_output_indirect_thunk_function):  New function.
27084         (s390_code_end): Implement target hook.
27085         (s390_case_values_threshold): Implement target hook.
27086         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
27087         macros.
27088         * config/s390/s390.h (struct s390_frame_layout)
27089         (struct machine_function): Move here from s390.c.
27090         (TARGET_INDIRECT_BRANCH_NOBP_RET)
27091         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
27092         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
27093         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
27094         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
27095         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
27096         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
27097         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
27098         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
27099         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
27100         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
27101         (mnemonic attribute): Add values which aren't recognized
27102         automatically.
27103         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
27104         pattern for branch conversion.  Fix mnemonic attribute.
27105         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
27106         indirect branch via thunk if requested.
27107         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
27108         ("*indirect_jump"): Disable for branch conversion using out of
27109         line thunks.
27110         ("indirect_jump_via_thunk<mode>_z10")
27111         ("indirect_jump_via_thunk<mode>")
27112         ("indirect_jump_via_inlinethunk<mode>_z10")
27113         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
27114         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
27115         ("casesi_jump_via_inlinethunk<mode>_z10")
27116         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
27117         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
27118         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
27119         ("*indirect2_jump"): Disable for branch conversion.
27120         ("casesi_jump"): Turn into expander and expand patterns for branch
27121         conversion.
27122         ("return_use"): New expander.
27123         ("*return"): Emit return via thunk and rename it to ...
27124         ("*return<mode>"): ... this one.
27125         * config/s390/s390.opt: Add new options and and enum for the
27126         option values.
27128 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
27130         * lra-constraints.c (match_reload): Unconditionally use
27131         gen_lowpart_SUBREG, rather than selecting between that
27132         and equivalent gen_rtx_SUBREG code.
27134 2018-02-08  Richard Biener  <rguenther@suse.de>
27136         PR tree-optimization/84233
27137         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
27138         changed flag instead of boguously re-using phi_inserted.
27140 2018-02-08  Martin Jambor  <mjambor@suse.cz>
27142         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
27143         static local variables.
27145 2018-02-08  Richard Biener  <rguenther@suse.de>
27147         PR tree-optimization/84278
27148         * tree-vect-stmts.c (vectorizable_store): When looking for
27149         smaller vector types to perform grouped strided loads/stores
27150         make sure the mode is supported by the target.
27151         (vectorizable_load): Likewise.
27153 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
27155         * config/aarch64/aarch64.c (aarch64_components_for_bb):
27156         Increase LDP/STP opportunities by adding adjacent callee-saves.
27158 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
27160         PR rtl-optimization/84068
27161         PR rtl-optimization/83459
27162         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
27164 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
27166         PR tree-optimization/84224
27167         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
27168         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
27169         non-zero arguments.
27171 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
27173         PR target/84113
27174         * config/rs6000/altivec.md (*restore_world): Remove LR use.
27175         * config/rs6000/predicates.md (restore_world_operation): Adjust op
27176         count, remove one USE.
27178 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
27180         * doc/install.texi (Configuration): Document the
27181         --with-long-double-format={ibm,ieee} PowerPC configuration
27182         options.
27184         PR target/84154
27185         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
27186         Convert from define_expand to be define_insn_and_split.  Rework
27187         float/double/_Float128 conversions to QI/HI/SImode to work with
27188         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
27189         conversions to QI/HImode types did a store and then a load to
27190         truncate the value.  For conversions to VSX registers, don't split
27191         the insn, instead emit the code directly.  Use the code iterator
27192         any_fix to combine signed and unsigned conversions.
27193         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
27194         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
27195         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
27196         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
27197         (fix_<mode>di2_hw): Likewise.
27198         (fixuns_<mode>di2_hw): Likewise.
27199         (fix_<mode>si2_hw): Likewise.
27200         (fixuns_<mode>si2_hw): Likewise.
27201         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
27202         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
27203         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
27204         fix<uns>_trunc<SFDF:mode>si2_p8.
27205         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
27206         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
27207         (fix<uns>_<mode>_mem): Likewise.
27208         (fctiw<u>z_<mode>_mem): Likewise.
27209         (fix<uns>_<mode>_mem): Likewise.
27210         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
27211         the register allocator from doing a direct move to the GPRs to do
27212         a store, and instead use the ISA 3.0 store byte/half-word from
27213         vector register instruction.  For IEEE 128-bit floating point,
27214         also optimize stores of 32-bit ints.
27215         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
27217 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
27219         * genextract.c (push_pathstr_operand): New function to support
27220         [a-zA-Z].
27221         (walk_rtx): Call push_pathstr_operand.
27222         (print_path): Support [a-zA-Z].
27224 2018-02-07  Richard Biener  <rguenther@suse.de>
27226         PR tree-optimization/84037
27227         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
27228         (cse_and_gimplify_to_preheader): Declare.
27229         (vect_get_place_in_interleaving_chain): Likewise.
27230         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
27231         ivexpr_map.
27232         (_loop_vec_info::~_loop_vec_info): Delete it.
27233         (cse_and_gimplify_to_preheader): New function.
27234         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
27235         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
27236         (vectorizable_load): Likewise.  For grouped stores always base
27237         the IV on the first element.
27238         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
27239         condition before gimplifying.
27241 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
27243         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
27244         *DIV_EXPR and *MOD_EXPR.
27246 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
27248         PR target/84248
27249         * config/i386/i386.c (ix86_option_override_internal): Mask out
27250         the CF_SET bit when checking -fcf-protection.
27252 2018-02-07  Tom de Vries  <tom@codesourcery.com>
27254         PR libgomp/84217
27255         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
27256         enough.
27258 2018-02-07  Richard Biener  <rguenther@suse.de>
27260         PR tree-optimization/84204
27261         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
27262         this place.
27264         PR tree-optimization/84205
27265         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
27266         special-case isl_ast_op_zdiv_r.
27268         PR tree-optimization/84223
27269         * graphite-scop-detection.c (gather_bbs::before_dom_children):
27270         Only add conditions from within the region.
27271         (gather_bbs::after_dom_children): Adjust.
27273 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
27275         PR target/84209
27276         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
27277         * config/avr/avr.md: Only post-reload split REG-REG moves if
27278         either register is GENERAL_REG_P.
27280 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
27282         PR tree-optimization/84235
27283         * tree-ssa-scopedtables.c
27284         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
27285         if the subtraction is performed in floating point type where NaNs are
27286         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
27287         build 1.  Formatting fix.
27289 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
27291         PR target/84146
27292         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
27293         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
27294         and skip it regardless of bb boundaries.  Use CALL_P macro,
27295         don't test INSN_P (insn) together with CALL_P or JUMP_P check
27296         unnecessarily, formatting fix.
27298 2018-02-06  Michael Collison  <michael.collison@arm.com>
27300         * config/arm/thumb2.md:
27301         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
27302         (*thumb_mov_notscc): Ditto.
27304 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
27306         PR target/84154
27307         * config/rs6000/rs6000.md (su code attribute): Use "u" for
27308         unsigned_fix, not "s".
27310 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
27312         * configure.ac (gcc_fn_eh_frame_ro): New function.
27313         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
27314         correct .eh_frame permissions.
27315         * configure: Regenerate.
27317 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
27319         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
27320         irrelevant options.
27322 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
27324         * config/rs6000/rs6000.c (rs6000_option_override_internal):
27325         Display warning message for -mno-speculate-indirect-jumps.
27327 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
27329         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
27330         Undocumented.
27331         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
27333 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
27335         PR tree-optimization/84225
27336         * tree-eh.c (find_trapping_overflow): Only call
27337         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
27339 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
27341         PR target/84145
27342         * config/i386/i386.c: Reimplement the check of possible options
27343         -mibt/-mshstk conbination. Change error messages.
27344         * doc/invoke.texi: Fix a typo: remove extra '='.
27346 2018-02-06  Marek Polacek  <polacek@redhat.com>
27348         PR tree-optimization/84228
27349         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
27351 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
27353         PR target/82641
27354         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
27355         emitted arch directives.
27356         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
27357         __ARM_FEATURE_COPROC before changing architectures.
27359 2018-02-06  Richard Biener  <rguenther@suse.de>
27361         * config/i386/i386.c (print_reg): Fix typo.
27362         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
27364 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
27366         * configure: Regenerate.
27368 2018-02-05  Martin Sebor  <msebor@redhat.com>
27370         PR tree-optimization/83369
27371         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
27372         inlining context.
27374 2018-02-05  Martin Liska  <mliska@suse.cz>
27376         * doc/invoke.texi: Cherry-pick upstream r323995.
27378 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
27380         * ira.c (ira_init_register_move_cost): Adjust comment.
27382 2018-02-05  Martin Liska  <mliska@suse.cz>
27384         PR gcov-profile/84137
27385         * doc/gcov.texi: Fix typo in documentation.
27387 2018-02-05  Martin Liska  <mliska@suse.cz>
27389         PR gcov-profile/83879
27390         * doc/gcov.texi: Document necessity of --dynamic-list-data when
27391         using dlopen functionality.
27393 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
27395         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
27396         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
27397         _mm_maskz_range_ss, _mm_mask_range_round_ss,
27398         _mm_maskz_range_round_ss): New intrinsics.
27399         (__builtin_ia32_rangesd128_round)
27400         (__builtin_ia32_rangess128_round): Remove.
27401         (__builtin_ia32_rangesd128_mask_round,
27402         __builtin_ia32_rangess128_mask_round): New builtins.
27403         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
27404         __builtin_ia32_rangess128_round): Remove.
27405         (__builtin_ia32_rangesd128_mask_round,
27406         __builtin_ia32_rangess128_mask_round): New builtins.
27407         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
27408         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
27409         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
27410         "<round_saeonly_constraint>")): Changed to ...
27411         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
27412         "<round_saeonly_scalar_constraint>")): ... this.
27413         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
27414         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
27415         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
27416         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
27417         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
27419 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
27421         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
27422         options.
27423         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
27424         Remove all values except native, 8540 and 8548.
27426 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
27428         * config/i386/i386.c (ix86_output_function_return): Pass
27429         INVALID_REGNUM, instead of -1, as invalid register number to
27430         indirect_thunk_name and output_indirect_thunk.
27432 2018-02-02  Julia Koval  <julia.koval@intel.com>
27434         * config.gcc: Add -march=icelake.
27435         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
27436         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
27437         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
27438         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
27439         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
27440         (processor_target_table): Add icelake.
27441         (ix86_option_override_internal): Handle new PTAs.
27442         (get_builtin_code_for_version): Handle icelake.
27443         (M_INTEL_COREI7_ICELAKE): New.
27444         (fold_builtin_cpu): Handle icelake.
27445         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
27446         * doc/invoke.texi: Add -march=icelake.
27448 2018-02-02  Julia Koval  <julia.koval@intel.com>
27450         * config/i386/i386.c (ix86_option_override_internal): Change flags type
27451         to wide_int_bitmask.
27452         * wide-int-bitmask.h: New.
27454 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
27456         PR target/84066
27457         * config/i386/i386.md: Replace Pmode with word_mode in
27458         builtin_setjmp_setup and builtin_longjmp to support x32.
27460 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
27462         PR target/56010
27463         PR target/83743
27464         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
27465         #include "opts.h".
27466         (rs6000_supported_cpu_names): New static variable.
27467         (linux_cpu_translation_table): Likewise.
27468         (elf_platform) <cpu>: Define new static variable and use it.
27469         Translate kernel AT_PLATFORM name to canonical name if needed.
27470         Error if platform name is unknown.
27472 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
27474         PR target/84089
27475         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
27477 2018-02-01  Jeff Law  <law@redhat.com>
27479         PR target/84128
27480         * config/i386/i386.c (release_scratch_register_on_entry): Add new
27481         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
27482         the scratch if RELEASE_VIA_POP is false.
27483         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
27484         If we have to save a temporary register, decrement SIZE appropriately.
27485         Pass new arguments to release_scratch_register_on_entry.
27486         (ix86_adjust_stack_and_probe): Likewise.
27487         (ix86_emit_probe_stack_range): Pass new arguments to
27488         release_scratch_register_on_entry.
27490 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
27492         PR rtl-optimization/84157
27493         * combine.c (change_zero_ext): Use REG_P predicate in
27494         front of HARD_REGISTER_P predicate.
27496 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
27498         * config/avr/avr.c (avr_option_override): Move disabling of
27499         -fdelete-null-pointer-checks to...
27500         * common/config/avr/avr-common.c (avr_option_optimization_table):
27501         ...here.
27503 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
27505         PR tree-optimization/81635
27506         * tree-data-ref.c (split_constant_offset_1): For types that
27507         wrap on overflow, try to use range info to prove that wrapping
27508         cannot occur.
27510 2018-02-01  Renlin Li  <renlin.li@arm.com>
27512         PR target/83370
27513         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
27514         TAILCALL_ADDR_REGS.
27515         (aarch64_register_move_cost): Likewise.
27516         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
27517         TAILCALL_ADDR_REGS.
27518         (REG_CLASS_NAMES): Likewise.
27519         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
27520         TAILCALL_ADDR_REGS. Remove IP registers.
27521         * config/aarch64/aarch64.md (Ucs): Update register constraint.
27523 2018-02-01  Richard Biener  <rguenther@suse.de>
27525         * domwalk.h (dom_walker::dom_walker): Add additional constructor
27526         for specifying RPO order and allow NULL for that.
27527         * domwalk.c (dom_walker::dom_walker): Likewise.
27528         (dom_walker::walk): Handle NULL RPO order.
27529         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
27530         in RPO order.
27531         (rewrite_update_dom_walker): Likewise.
27532         (mark_def_dom_walker): Likewise.
27534 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
27536         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
27537         (aarch64_maybe_expand_sve_subreg_move): Declare.
27538         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
27539         * config/aarch64/predicates.md (aarch64_any_register_operand): New
27540         predicate.
27541         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
27542         that are semantically a reverse operation.
27543         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
27544         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
27545         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
27546         functions.
27547         (aarch64_can_change_mode_class): For big-endian, forbid changes
27548         between two SVE modes if they have different element sizes.
27550 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
27552         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
27553         the TImode handling for big-endian targets.
27555 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
27557         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
27558         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
27559         not just bytes.
27560         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
27561         Remove BSWAP handing for big-endian targets and use the form of
27562         LD1RQ appropariate for the mode.
27564 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
27566         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
27567         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
27568         duplicated element.
27570 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
27572         PR tearget/83845
27573         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
27574         check for operands that need to go through aarch64_sve_reload_be.
27576 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
27578         PR tree-optimization/81661
27579         PR tree-optimization/84117
27580         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
27581         * tree-eh.c: Include gimplify.h.
27582         (find_trapping_overflow, replace_trapping_overflow,
27583         rewrite_to_non_trapping_overflow): New functions.
27584         * tree-vect-loop.c: Include tree-eh.h.
27585         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
27586         * tree-data-ref.c: Include tree-eh.h.
27587         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
27589 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
27591         PR rtl-optimization/84123
27592         * combine.c (change_zero_ext): Check if hard register satisfies
27593         can_change_dest_mode before calling gen_lowpart_SUBREG.
27595 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
27597         PR target/82444
27598         * ira.c (ira_init_register_move_cost): Remove assert.
27600 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
27602         PR rtl-optimization/84071
27603         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
27604         * doc/tm.texi: Regenerate.
27606 2018-01-31  Richard Biener  <rguenther@suse.de>
27608         PR tree-optimization/84132
27609         * tree-data-ref.c (analyze_miv_subscript): Properly
27610         check whether evolution_function_is_affine_multivariate_p
27611         before calling gcd_of_steps_may_divide_p.
27613 2018-01-31  Julia Koval  <julia.koval@intel.com>
27615         PR target/83618
27616         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
27617         * config/i386/i386.md (rdpid_rex64) New.
27618         (rdpid): Make 32bit only.
27620 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
27622         PR lto/84105
27623         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
27624         an IDENTIFIER_NODE for FUNCTION_TYPE's.
27626 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
27628         Revert
27629         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
27631         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
27633 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
27635         PR rtl-optimization/84071
27636         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
27637         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
27639 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
27641         * config/arc/arc.c (arc_handle_aux_attribute): New function.
27642         (arc_attribute_table): Add 'aux' attribute.
27643         (arc_in_small_data_p): Consider aux like variables.
27644         (arc_is_aux_reg_p): New function.
27645         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
27646         (arc_get_aux_arg): New function.
27647         (prepare_move_operands): Handle aux-register access.
27648         (arc_handle_aux_attribute): New function.
27649         * doc/extend.texi (ARC Variable attributes): Add subsection.
27651 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
27653         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
27654         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
27655         (arc_attribute_table): Add 'uncached' attribute.
27656         (arc_print_operand): Print '.di' flag for uncached memory
27657         accesses.
27658         (arc_in_small_data_p): Do not consider for small data the uncached
27659         types.
27660         (arc_is_uncached_mem_p): New function.
27661         * config/arc/predicates.md (compact_store_memory_operand): Check
27662         for uncached memory accesses.
27663         (nonvol_nonimm_operand): Likewise.
27664         * doc/extend.texi (ARC Type Attribute): New subsection.
27666 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
27668         PR c/84100
27669         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
27670         falign-loops=): Add Optimization flag.
27672 2018-01-30  Jeff Law  <law@redhat.com>
27674         PR target/84064
27675         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
27676         INT_REGISTERS_SAVED.  Check it prior to calling
27677         get_scratch_register_on_entry.
27678         (ix86_adjust_stack_and_probe): Similarly.
27679         (ix86_emit_probe_stack_range): Similarly.
27680         (ix86_expand_prologue): Corresponding changes.
27682 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
27684         PR target/40411
27685         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
27686         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
27688 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
27690         PR target/84112
27691         * lra-constraints.c (curr_insn_transform): Process AND in the
27692         address.
27694 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
27696         PR rtl-optimization/83986
27697         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
27698         dependence against last_pending_memory_flush in addition to
27699         pending_jump_insns.
27701 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
27703         PR tree-optimization/81611
27704         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
27705         copies.
27707 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
27709         PR target/83758
27710         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
27711         a reg rtx.
27713 2018-01-30  Richard Biener  <rguenther@suse.de>
27714             Jakub Jelinek  <jakub@redhat.com>
27716         PR tree-optimization/84111
27717         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
27718         inner loops added during recursion, as they don't have up-to-date
27719         SSA form.
27721 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
27723         PR ipa/81360
27724         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
27725         (can_inline_edge_by_limits_p): ... here.
27726         (can_early_inline_edge_p, check_callers,
27727         update_caller_keys, update_callee_keys, recursive_inlining,
27728         add_new_edges_to_heap, speculation_useful_p,
27729         inline_small_functions,
27730         inline_small_functions, flatten_function,
27731         inline_to_all_callers_1): Update.
27733 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
27735         * profile-count.c (profile_count::combine_with_ipa_count): Handle
27736         zeros correctly.
27738 2018-01-30  Richard Biener  <rguenther@suse.de>
27740         PR tree-optimization/83008
27741         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
27742         invariant and constant vector uses in stmts when they need
27743         more than one stmt.
27745 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
27747         PR bootstrap/84017
27748         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
27749         * configure: Regenerate.
27751 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
27753         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
27754         pattern.
27755         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
27756         Use gen_rtx_REG rather than gen_lowpart.
27758 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
27760         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
27761         rather than 0 when creating partial subregs.
27763 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
27765         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
27766         of usage.
27768 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
27770         PR target/81550
27771         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
27772         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
27773         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
27774         flags.  This restores the settings used before the 2017-07-24.
27775         Turning off pre increment/decrement/modify allows IVOPTS to
27776         optimize DF/SF loops where the index is an int.
27778 2018-01-29  Richard Biener  <rguenther@suse.de>
27779             Kelvin Nilsen  <kelvin@gcc.gnu.org>
27781         PR bootstrap/80867
27782         * tree-vect-stmts.c (vectorizable_call): Don't call
27783         targetm.vectorize_builtin_md_vectorized_function if callee is
27784         NULL.
27786 2018-01-22  Carl Love  <cel@us.ibm.com>
27788         * doc/extend.tex: Fix typo in second arg in
27789         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
27791 2018-01-29  Richard Biener  <rguenther@suse.de>
27793         PR tree-optimization/84086
27794         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
27795         (flush_ssaname_freelist): When SSA names were released reset
27796         the SCEV hash table.
27798 2018-01-29  Richard Biener  <rguenther@suse.de>
27800         PR tree-optimization/84057
27801         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
27802         removed paths when removing edges.
27804 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
27806         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
27807         -mfunction-return=@var{choice}.
27809 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
27811         PR diagnostic/84034
27812         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
27813         Handle CR like TAB.
27814         (layout::print_source_line): Likewise.
27815         (test_get_line_width_without_trailing_whitespace): Add test cases.
27817 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
27819         PR middle-end/84040
27820         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
27821         debug insns.
27823 2018-01-26  Jim Wilson  <jimw@sifive.com>
27825         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
27827         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
27828         specified.
27830 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27832         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
27833         and CMP + SUB-immediate -> SUBS.
27835 2018-01-26  Martin Sebor  <msebor@redhat.com>
27837         PR tree-optimization/83896
27838         * tree-ssa-strlen.c (get_string_len): Rename...
27839         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
27840         Avoid assuming length is constant.
27841         (handle_char_store): Use HOST_WIDE_INT for string length.
27843 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
27845         PR target/81763
27846         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
27847         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
27849 2018-01-26  Richard Biener  <rguenther@suse.de>
27851         PR rtl-optimization/84003
27852         * dse.c (record_store): Only record redundant stores when
27853         the earlier store aliases at least all accesses the later one does.
27855 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
27857         PR rtl-optimization/83985
27858         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
27859         REG_CFA_RESTORE insns.
27860         (delete_unmarked_insns): Don't ignore separate shrink wrapping
27861         REG_CFA_RESTORE insns here.
27863         PR c/83989
27864         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
27865         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
27867 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
27869         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
27870         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
27871         (arc_init): Likewise.
27872         (arc_override_options): Likewise.
27873         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
27874         value.
27875         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
27876         support.
27877         * config/arc/arc.h (TARGET_DBNZ): Define.
27878         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
27879         properly set the tune attribute.
27880         (dbnz): Use TARGET_DBNZ guard.
27881         * config/arc/arc.opt (mtune): Add core3 option.
27883 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
27885         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
27886         recognize new pic like addresses.
27887         (arc_delegitimize_address): Clean up.
27889 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
27891         * config/arc/arc-arches.def: Option mrf16 valid for all
27892         architectures.
27893         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
27894         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
27895         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
27896         * config/arc/arc-tables.opt: Regenerate.
27897         * config/arc/arc.c (arc_conditional_register_usage): Handle
27898         reduced register file case.
27899         (arc_file_start): Set must have build attributes.
27900         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
27901         mrf16 option value.
27902         * config/arc/arc.opt (mrf16): Add new option.
27903         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
27904         * config/arc/genmultilib.awk: Handle new mrf16 option.
27905         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
27906         * config/arc/t-multilib: Regenerate.
27907         * doc/invoke.texi (ARC Options): Document mrf16 option.
27909 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
27911         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
27912         * config/arc/arc.c (arc_handle_secure_attribute): New function.
27913         (arc_attribute_table): Add 'secure_call' attribute.
27914         (arc_print_operand): Print secure call operand.
27915         (arc_function_ok_for_sibcall): Don't optimize tail calls when
27916         secure.
27917         (arc_is_secure_call_p): New function.  * config/arc/arc.md
27918         (call_i): Add support for sjli instruction.
27919         (call_value_i): Likewise.
27920         * config/arc/constraints.md (Csc): New constraint.
27922 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
27923             John Eric Martin  <John.Martin@emmicro-us.com>
27925         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
27926         * config/arc/arc.c (_arc_jli_section): New struct.
27927         (arc_jli_section): New type.
27928         (rc_jli_sections): New static variable.
27929         (arc_handle_jli_attribute): New function.
27930         (arc_attribute_table): Add jli_always and jli_fixed attribute.
27931         (arc_file_end): New function.
27932         (TARGET_ASM_FILE_END): Define.
27933         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
27934         (arc_add_jli_section): New function.
27935         (jli_call_scan): Likewise.
27936         (arc_reorg): Call jli_call_scan.
27937         (arc_output_addsi): Remove 'S' from printing asm operand.
27938         (arc_is_jli_call_p): New function.
27939         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
27940         operand.
27941         (movhi_insn): Likewise.
27942         (movsi_insn): Likewise.
27943         (movsi_set_cc_insn): Likewise.
27944         (loadqi_update): Likewise.
27945         (load_zeroextendqisi_update): Likewise.
27946         (load_signextendqisi_update): Likewise.
27947         (loadhi_update): Likewise.
27948         (load_zeroextendhisi_update): Likewise.
27949         (load_signextendhisi_update): Likewise.
27950         (loadsi_update): Likewise.
27951         (loadsf_update): Likewise.
27952         (movsicc_insn): Likewise.
27953         (bset_insn): Likewise.
27954         (bxor_insn): Likewise.
27955         (bclr_insn): Likewise.
27956         (bmsk_insn): Likewise.
27957         (bicsi3_insn): Likewise.
27958         (cmpsi_cc_c_insn): Likewise.
27959         (movsi_ne): Likewise.
27960         (movsi_cond_exec): Likewise.
27961         (clrsbsi2): Likewise.
27962         (norm_f): Likewise.
27963         (normw): Likewise.
27964         (swap): Likewise.
27965         (divaw): Likewise.
27966         (flag): Likewise.
27967         (sr): Likewise.
27968         (kflag): Likewise.
27969         (ffs): Likewise.
27970         (ffs_f): Likewise.
27971         (fls): Likewise.
27972         (call_i): Remove 'S' asm letter, add jli instruction.
27973         (call_value_i): Likewise.
27974         * config/arc/arc.op (mjli-always): New option.
27975         * config/arc/constraints.md (Cji): New constraint.
27976         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
27977         operand.
27978         (subsf3_fpx): Likewise.
27979         (mulsf3_fpx): Likewise.
27980         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
27981         asm operand.
27982         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
27983         function attrbutes.
27984         * doc/invoke.texi (ARC): Document mjli-always option.
27986 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
27988         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
27989         avoid addition with 0 and use incw and decw where possible.
27991 2018-01-26  Richard Biener  <rguenther@suse.de>
27993         PR tree-optimization/81082
27994         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
27995         association if it requires casting to unsigned.
27996         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
27997         from fold_plusminus_mult_expr to catch important cases late when
27998         range info is available.
28000 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
28002         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
28003         * configure.ac (hidden_linkonce): New test.
28004         * configure: Regenerate.
28005         * config.in: Regenerate.
28007 2018-01-26  Julia Koval  <julia.koval@intel.com>
28009         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
28010         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
28011         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
28012         _mm_mask_bitshuffle_epi64_mask): Fix type.
28013         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
28014         USI_FTYPE_V4DI_V4DI_USI): Remove.
28015         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
28016         __builtin_ia32_vpshufbitqmb256_mask,
28017         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
28018         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
28019         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
28021 2018-01-26  Alan Modra  <amodra@gmail.com>
28023         PR target/84033
28024         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
28025         UNSPEC_VBPERMQ.  Sort other unspecs.
28027 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
28029         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
28031 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
28033         PR middle-end/83055
28034         * predict.c (drop_profile): Do not push/pop cfun; update also
28035         node->count.
28036         (handle_missing_profiles): Fix logic looking for zero profiles.
28038 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
28040         PR middle-end/83977
28041         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
28042         on functions with #pragma omp declare simd or functions with simd
28043         attribute.
28044         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
28045         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
28046         Remove trailing \n from warning_at calls.
28048 2018-01-25  Tom de Vries  <tom@codesourcery.com>
28050         PR target/84028
28051         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
28052         for neutered workers.
28054 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
28056         PR target/68467
28057         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
28058         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
28060 2018-01-24  Jeff Law  <law@redhat.com>
28062         PR target/83994
28063         * i386.c (get_probe_interval): Move to earlier point.
28064         (ix86_compute_frame_layout): If -fstack-clash-protection and
28065         the frame is larger than the probe interval, then use pushes
28066         to save registers rather than reg->mem moves.
28067         (ix86_expand_prologue): Remove conditional for int_registers_saved
28068         assertion.
28070 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
28072         PR target/84014
28073         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
28074         min/max for never referenced object.
28076 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
28078         PR middle-end/83977
28079         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
28080         here.
28081         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
28082         attributes from DECL_ATTRIBUTES (decl) without affecting
28083         DECL_ATTRIBUTES (current_function_decl).
28084         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
28085         functions with non-NULL DECL_ABSTRACT_ORIGIN.
28087 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
28089         PR tree-optimization/83979
28090         * fold-const.c (fold_comparison): Use constant_boolean_node
28091         instead of boolean_{true,false}_node.
28093 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
28095         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
28096         with zero counts.
28098 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28100         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
28101         Simplify the clause that sets the length attribute.
28102         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
28103         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
28104         clause that sets the length attribute.
28105         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
28107 2018-01-24  Tom de Vries  <tom@codesourcery.com>
28109         PR target/83589
28110         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
28111         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
28112         Add strict parameter.
28113         (prevent_branch_around_nothing): Insert dummy insn between branch to
28114         label and label with no ptx insn inbetween.
28115         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
28117 2018-01-24  Tom de Vries  <tom@codesourcery.com>
28119         PR target/81352
28120         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
28121         for neutered threads in warp.
28122         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
28124 2018-01-24  Richard Biener  <rguenther@suse.de>
28126         PR tree-optimization/83176
28127         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
28128         operands.
28130 2018-01-24  Richard Biener  <rguenther@suse.de>
28132         PR tree-optimization/82819
28133         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
28134         code generating pluses that are no-ops in the target precision.
28136 2018-01-24  Richard Biener  <rguenther@suse.de>
28138         PR middle-end/84000
28139         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
28141 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
28143         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
28144         to merge probabilities.
28145         * predict.c (probably_never_executed): Also mark as cold functions
28146         with global 0 profile and guessed local profile.
28147         * profile-count.c (profile_probability::combine_with_count): New
28148         member function.
28149         * profile-count.h (profile_probability::operator*,
28150         profile_probability::operator*=, profile_probability::operator/,
28151         profile_probability::operator/=): Reduce precision to adjusted
28152         and set value to guessed on contradictory divisions.
28153         (profile_probability::combine_with_freq): Remove.
28154         (profile_probability::combine_wiht_count): Declare.
28155         (profile_count::force_nonzero):: Set to adjusted.
28156         (profile_count::probability_in):: Set quality to adjusted.
28157         * tree-ssa-tail-merge.c (replace_block_by): Use
28158         combine_with_count.
28160 2018-01-23  Andrew Waterman  <andrew@sifive.com>
28161             Jim Wilson  <jimw@sifive.com>
28163         * config/riscv/riscv.c (riscv_stack_boundary): New.
28164         (riscv_option_override): Set riscv_stack_boundary.  Handle
28165         riscv_preferred_stack_boundary_arg.
28166         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
28167         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
28168         (STACK_BOUNDARY): Set to riscv_stack_boundary.
28169         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
28170         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
28171         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
28173 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
28175         PR target/83905
28176         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
28177         of struct ix86_frame.
28178         (ix86_expand_epilogue): Likewise.  Add a local variable for
28179         the reg_save_offset field in struct ix86_frame.
28181 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
28183         PR tree-optimization/82604
28184         * tree-loop-distribution.c (enum partition_kind): New enum item
28185         PKIND_PARTIAL_MEMSET.
28186         (partition_builtin_p): Support above new enum item.
28187         (generate_code_for_partition): Ditto.
28188         (compute_access_range): Differentiate cases that equality can be
28189         proven at all loops, the innermost loops or no loops.
28190         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
28191         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
28192         (finalize_partitions, distribute_loop): Don't fuse partition of
28193         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
28194         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
28195         parloop is enabled.
28197 2018-01-23  Martin Liska  <mliska@suse.cz>
28199         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
28200         order to ignore the predictor.
28201         (PRED_POLYMORPHIC_CALL): Likewise.
28202         (PRED_RECURSIVE_CALL): Likewise.
28204 2018-01-23  Martin Liska  <mliska@suse.cz>
28206         * tree-profile.c (tree_profiling): Print function header to
28207         aware reader which function we are working on.
28208         * value-prof.c (gimple_find_values_to_profile): Do not print
28209         not interesting value histograms.
28211 2018-01-23  Martin Liska  <mliska@suse.cz>
28213         * profile-count.h (enum profile_quality): Add
28214         profile_uninitialized as the first value. Do not number values
28215         as they are zero based.
28216         (profile_count::verify): Update sanity check.
28217         (profile_probability::verify): Likewise.
28219 2018-01-23  Nathan Sidwell  <nathan@acm.org>
28221         * doc/invoke.texi (ffor-scope): Deprecate.
28223 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
28225         PR tree-optimization/83510
28226         * domwalk.c (set_all_edges_as_executable): New function.
28227         (dom_walker::dom_walker): Convert bool param
28228         "skip_unreachable_blocks" to enum reachability.  Move setup of
28229         edge flags to set_all_edges_as_executable and only do it when
28230         reachability is REACHABLE_BLOCKS.
28231         * domwalk.h (enum dom_walker::reachability): New enum.
28232         (dom_walker::dom_walker): Convert bool param
28233         "skip_unreachable_blocks" to enum reachability.
28234         (set_all_edges_as_executable): New decl.
28235         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
28236         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
28237         "reachability".
28238         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
28239         but converting true to REACHABLE_BLOCKS.
28240         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
28241         * tree-vrp.c
28242         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
28243         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
28244         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
28245         REACHABLE_BLOCKS.
28246         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
28247         if check_all_array_refs will be called.
28249 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
28251         * tree.c (selftest::test_location_wrappers): Add more test
28252         coverage.
28254 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
28256         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
28257         (selftest::test_bit_in_range): Likewise.
28259 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
28261         PR testsuite/83888
28262         * doc/sourcebuild.texi (vect_float): Say that the selector
28263         only describes the situation when -funsafe-math-optimizations is on.
28264         (vect_float_strict): Document.
28266 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
28268         PR tree-optimization/83965
28269         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
28270         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
28271         instead of checking only for a reduction.
28272         (vect_recog_widen_sum_pattern): Likewise.
28274 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
28276         * predict.c (probably_never_executed): Only use precise profile info.
28277         (compute_function_frequency): Skip after inlining hack since we now
28278         have quality checking.
28280 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
28282         * profile-count.h (profile_probability::very_unlikely,
28283         profile_probability::unlikely, profile_probability::even): Set
28284         precision to guessed.
28286 2018-01-23  Richard Biener  <rguenther@suse.de>
28288         PR tree-optimization/83963
28289         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
28290         Properly terminate dominator walk when crossing the exit edge not
28291         when visiting its source block.
28293 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
28295         PR c++/83918
28296         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
28297         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
28299 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
28301         PR tree-optimization/83957
28302         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
28303         semicolon after for body surrounded by braces.
28305         PR tree-optimization/83081
28306         * profile-count.h (profile_probability::split): New method.
28307         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
28308         Use profile_probability::split.
28309         (do_compare_rtx_and_jump): Fix adjustment of probabilities
28310         when splitting a single conditional jump into 2.
28312 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
28314         PR tree-optimization/69452
28315         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
28316         decl.
28318 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
28320         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
28321         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
28322         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
28324 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
28326         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
28327         declaration.
28328         * config/rl78/rl78.md (movdi): New define_expand.
28329         * config/rl78/rl78.c (rl78_split_movdi): New function.
28331 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
28333         PR target/83862
28334         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
28335         no longer used.
28336         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
28337         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
28338         128-bit to produce an UNSPEC move to get the double word with the
28339         signbit and then a shift directly to do signbit.
28340         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
28341         implementation with a new version that just does either a direct
28342         move or a regular move.  Move memory interface to separate insns.
28343         Move insns so they are next to the expander.
28344         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
28345         with signbit move.  Split big and little endian case.
28346         (signbit<mode>2_dm_mem_le): Likewise.
28347         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
28348         (signbit<mode>2_dm2): Likewise.
28350 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
28352         * config/rl78/rl78.md (anddi3): New define_expand.
28354 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
28356         * config/rl78/rl78.md (umindi3): New define_expand.
28358 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
28360         * config/rl78/rl78.md (smindi3): New define_expand.
28362 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
28364         * config/rl78/rl78.md (smaxdi3): New define_expand.
28366 2018-01-22  Carl Love  <cel@us.ibm.com>
28368         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
28369         LVX_V1TI): Add macro expansion.
28370         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
28371         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
28372         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
28373         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
28374         Change check to determine if the instruction is a byte reversing
28375         entry.  Fix typo in comment.
28376         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
28377         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
28378         Add def_builtin calls for new builtins.
28379         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
28380         Add define_insn expansion.
28382 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
28384         * config/rl78/rl78.md (umaxdi3): New define_expand.
28386 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
28388         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
28389         for non-QImode registers.
28391 2018-01-22  Richard Biener  <rguenther@suse.de>
28393         PR tree-optimization/83963
28394         * graphite-scop-detection.c (scop_detection::get_sese): Delay
28395         including the loop exit block.
28396         (scop_detection::merge_sese): Likewise.
28397         (scop_detection::add_scop): Do it here instead.
28399 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28401         * doc/sourcebuild.texi (arm_softfloat): Document.
28403 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
28405         PR gcc/77734
28406         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
28407         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
28408         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
28410 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28411             David Edelsohn  <dje.gcc@gmail.com>
28413         PR target/83946
28414         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
28415         Change "crset eq" to "crset 2".
28416         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
28417         (*call_indirect_aix<mode>_nospec): Likewise.
28418         (*call_value_indirect_aix<mode>_nospec): Likewise.
28419         (*call_indirect_elfv2<mode>_nospec): Likewise.
28420         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
28421         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
28422         change assembly output from . to $.
28423         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
28424         (indirect_jump<mode>_nospec): Change assembly output from . to $.
28425         (*tablejump<mode>_internal1_nospec): Likewise.
28427 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
28429         PR target/80870
28430         * config/sh/sh_optimize_sett_clrt.cc:
28431         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
28433 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
28435         PR tree-optimization/83940
28436         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
28437         offset_dt to vect_constant_def rather than vect_unknown_def_type.
28438         (vect_check_load_store_mask): Add a mask_dt_out parameter and
28439         use it to pass back the definition type.
28440         (vect_check_store_rhs): Likewise rhs_dt_out.
28441         (vect_build_gather_load_calls): Add a mask_dt argument and use
28442         it instead of a call to vect_is_simple_use.
28443         (vectorizable_store): Update calls to vect_check_load_store_mask
28444         and vect_check_store_rhs.  Use the dt returned by the latter instead
28445         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
28446         instead of calls to vect_is_simple_use.  Pass the scalar rather
28447         than the vector operand to vect_is_simple_use when handling
28448         second and subsequent copies of an rhs value.
28449         (vectorizable_load): Update calls to vect_check_load_store_mask
28450         and vect_build_gather_load_calls.  Use the cached mask_dt and
28451         gs_info.offset_dt instead of calls to vect_is_simple_use.
28453 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
28455         PR middle-end/83945
28456         * tree-emutls.c: Include gimplify.h.
28457         (lower_emutls_2): New function.
28458         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
28459         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
28460         it before further processing.
28462         PR target/83930
28463         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
28464         UINTVAL (trueop1) instead of INTVAL (op1).
28466 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
28468         PR debug/81570
28469         PR debug/83728
28470         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
28471         INCOMING_FRAME_SP_OFFSET if not defined.
28472         (scan_trace): Add ENTRY argument.  If true and
28473         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
28474         emit a note to adjust the CFA offset.
28475         (create_cfi_notes): Adjust scan_trace callers.
28476         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
28477         INCOMING_FRAME_SP_OFFSET in the CIE.
28478         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
28479         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
28480         Likewise.
28481         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
28482         * doc/tm.texi: Regenerated.
28484 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
28486         PR rtl-optimization/83147
28487         * lra-constraints.c (remove_inheritance_pseudos): Use
28488         lra_substitute_pseudo_within_insn.
28490 2018-01-19  Tom de Vries  <tom@codesourcery.com>
28491             Cesar Philippidis  <cesar@codesourcery.com>
28493         PR target/83920
28494         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
28496 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
28498         PR target/83790
28499         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
28500         spaces for function labels.
28502 2018-01-19  Martin Liska  <mliska@suse.cz>
28504         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
28505         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
28506         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
28507         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
28508         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
28509         (PRED_CONST_RETURN): Change from 69 to 65.
28510         (PRED_NULL_RETURN): Change from 91 to 71.
28511         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
28512         (PRED_LOOP_GUARD): Change from 66 to 73.
28514 2018-01-19  Martin Liska  <mliska@suse.cz>
28516         * predict.c (predict_insn_def): Add new assert.
28517         (struct branch_predictor): Change type to signed integer.
28518         (test_prediction_value_range): Amend test to cover
28519         PROB_UNINITIALIZED.
28520         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
28521         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
28522         (PRED_LOOP_ITERATIONS_MAX): Likewise.
28523         (PRED_LOOP_IV_COMPARE): Likewise.
28524         * predict.h (PROB_UNINITIALIZED): Define new constant.
28526 2018-01-19  Martin Liska  <mliska@suse.cz>
28528         * predict.c (dump_prediction): Add new format for
28529         analyze_brprob.py script which is enabled with -details
28530         suboption.
28531         * profile-count.h (precise_p): New function.
28533 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
28535         PR tree-optimization/83922
28536         * tree-vect-loop.c (vect_verify_full_masking): Return false if
28537         there are no statements that need masking.
28538         (vect_active_double_reduction_p): New function.
28539         (vect_analyze_loop_operations): Use it when handling phis that
28540         are not in the loop header.
28542 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
28544         PR tree-optimization/83914
28545         * tree-vect-loop.c (vectorizable_induction): Don't convert
28546         init_expr or apply the peeling adjustment for inductions
28547         that are nested within the vectorized loop.
28549 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28551         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
28552         instead of NEG.
28554 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
28556         PR sanitizer/81715
28557         PR testsuite/83882
28558         * function.h (gimplify_parameters): Add gimple_seq * argument.
28559         * function.c: Include gimple.h and options.h.
28560         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
28561         for the added local temporaries if needed.
28562         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
28563         if there are any parameter cleanups, wrap whole body into a
28564         try/finally with the cleanups.
28566 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
28568         PR target/82964
28569         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
28570         Use GET_MODE_CLASS for scalar floating point.
28572 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
28574         PR ipa/82256
28575         patch by PaX Team
28576         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
28577         Fix call of call_cgraph_insertion_hooks.
28579 2018-01-18  Martin Sebor  <msebor@redhat.com>
28581         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
28583 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
28585         PR ipa/83619
28586         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
28587         frequencies.
28589 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
28591         PR other/70268
28592         * common.opt: (-ffile-prefix-map): New option.
28593         * opts.c (common_handle_option): Defer it.
28594         * opts-global.c (handle_common_deferred_options): Handle it.
28595         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
28596         * file-prefix-map.h: New file.
28597         (remap_debug_filename, add_debug_prefix_map): ...here.
28598         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
28599         * final.c (debug_prefix_map, add_debug_prefix_map
28600         remap_debug_filename): Move to...
28601         * file-prefix-map.c: New file.
28602         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
28603         generalize, get rid of alloca(), use strrchr() instead of strchr().
28604         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
28605         Implement in terms of add_prefix_map().
28606         (remap_macro_filename, remap_debug_filename): Implement in term of
28607         remap_filename().
28608         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
28609         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
28610         * dbxout.c: Include file-prefix-map.h.
28611         * varasm.c: Likewise.
28612         * vmsdbgout.c: Likewise.
28613         * xcoffout.c: Likewise.
28614         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
28615         * doc/cppopts.texi (-fmacro-prefix-map): Document.
28616         * doc/invoke.texi (-ffile-prefix-map): Document.
28617         (-fdebug-prefix-map): Update description.
28619 2018-01-18  Martin Liska  <mliska@suse.cz>
28621         * config/i386/i386.c (indirect_thunk_name): Document that also
28622         lfence is emitted.
28623         (output_indirect_thunk): Document why both instructions
28624         (pause and lfence) are generated.
28626 2018-01-18  Richard Biener  <rguenther@suse.de>
28628         PR tree-optimization/83887
28629         * graphite-scop-detection.c
28630         (scop_detection::get_nearest_dom_with_single_entry): Remove.
28631         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
28632         (scop_detection::merge_sese): Re-implement with a flood-fill
28633         algorithm that properly finds a SESE region if it exists.
28635 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
28637         PR c/61240
28638         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
28639         pointer_diff optimizations use view_convert instead of convert.
28641 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28643         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
28644         Generate different code for -mno-speculate-indirect-jumps.
28645         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
28646         (*call_indirect_aix<mode>): Disable for
28647         -mno-speculate-indirect-jumps.
28648         (*call_indirect_aix<mode>_nospec): New define_insn.
28649         (*call_value_indirect_aix<mode>): Disable for
28650         -mno-speculate-indirect-jumps.
28651         (*call_value_indirect_aix<mode>_nospec): New define_insn.
28652         (*sibcall_nonlocal_sysv<mode>): Generate different code for
28653         -mno-speculate-indirect-jumps.
28654         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
28656 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
28658         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
28659         long double type, set the flags for noting the default long double
28660         type, even if we don't pass or return a long double type.
28662 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
28664         PR ipa/83051
28665         * ipa-inline.c (flatten_function): Do not overwrite final inlining
28666         failure.
28668 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
28670         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
28671         support for merge[hl].
28672         (fold_mergehl_helper): New helper function.
28673         (tree-vector-builder.h): New #include for tree_vector_builder usage.
28674         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
28675         (altivec_vmrglw_direct): Add xxmrglw insn.
28677 2018-01-17  Andrew Waterman  <andrew@sifive.com>
28679         * config/riscv/riscv.c (riscv_conditional_register_usage): If
28680         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
28682 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
28684         PR lto/83121
28685         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
28686         call the lto_location_cache before reading the
28687         DECL_SOURCE_LOCATION of the types.
28689 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
28690             Richard Sandiford  <richard.sandiford@linaro.org>
28692         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
28693         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
28694         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
28695         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
28696         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
28697         Add declaration.
28698         * config/aarch64/constraints.md (aarch64_movti_operand):
28699         Limit immediates.
28700         * config/aarch64/predicates.md (Uti): Add new constraint.
28702 2018-01-17  Carl Love  <cel@us.ibm.com>
28704         * config/rs6000/vsx.md (define_expand xl_len_r,
28705         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
28706         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
28707         lxvll.
28708         (define_expand, define_insn): Move the shift left from  the
28709         define_insn to the define_expand for lxvl and stxvl instructions.
28710         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
28711         and XL_LEN_R definitions to PURE.
28713 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
28715         * config/i386/i386.c (indirect_thunk_name): Declare regno
28716         as unsigned int.  Compare regno with INVALID_REGNUM.
28717         (output_indirect_thunk): Ditto.
28718         (output_indirect_thunk_function): Ditto.
28719         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
28720         in the call to output_indirect_thunk_function.
28722 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
28724         PR middle-end/83884
28725         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
28726         rather than the size of inner_type to determine the stack slot size
28727         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
28729 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
28731         PR target/83546
28732         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
28733         to PTA_SILVERMONT.
28735 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
28737         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
28738         endian Linux systems to optionally enable multilibs for selecting
28739         the long double type if the user configured an explicit type.
28740         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
28741         have no long double multilibs if not defined.
28742         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
28743         warn if the user used -mabi={ieee,ibm}longdouble and we built
28744         multilibs for long double.
28745         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
28746         appropriate multilib option.
28747         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
28748         multilib options.
28749         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
28750         for building long double multilibs.
28751         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
28753 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
28755         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
28756         copies.
28758         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
28759         64 bits.
28760         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
28761         128 bits.
28763         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
28764         variables.
28766         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
28767         return value.
28769 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
28771         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
28772         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
28774 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
28776         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
28777         different rtl trees depending on TARGET_64BIT.
28778         (rs6000_gen_lvx): Likewise.
28780 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
28782         * config/visium/visium.md (nop): Tweak comment.
28783         (hazard_nop): Likewise.
28785 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28787         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
28788         -mspeculate-indirect-jumps.
28789         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
28790         for -mno-speculate-indirect-jumps.
28791         (*call_indirect_elfv2<mode>_nospec): New define_insn.
28792         (*call_value_indirect_elfv2<mode>): Disable for
28793         -mno-speculate-indirect-jumps.
28794         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
28795         (indirect_jump): Emit different RTL for
28796         -mno-speculate-indirect-jumps.
28797         (*indirect_jump<mode>): Disable for
28798         -mno-speculate-indirect-jumps.
28799         (*indirect_jump<mode>_nospec): New define_insn.
28800         (tablejump): Emit different RTL for
28801         -mno-speculate-indirect-jumps.
28802         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
28803         (tablejumpsi_nospec): New define_expand.
28804         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
28805         (tablejumpdi_nospec): New define_expand.
28806         (*tablejump<mode>_internal1): Disable for
28807         -mno-speculate-indirect-jumps.
28808         (*tablejump<mode>_internal1_nospec): New define_insn.
28809         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
28810         option.
28812 2018-01-16  Artyom Skrobov tyomitch@gmail.com
28814         * caller-save.c (insert_save): Drop unnecessary parameter.  All
28815         callers updated.
28817 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
28818             Richard Biener  <rguenth@suse.de>
28820         PR libgomp/83590
28821         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
28822         return early, inline manually is_gimple_sizepos.  Make sure if we
28823         call gimplify_expr we don't end up with a gimple constant.
28824         * tree.c (variably_modified_type_p): Don't return true for
28825         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
28826         * gimplify.h (is_gimple_sizepos): Remove.
28828 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
28830         PR tree-optimization/83857
28831         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
28832         vectorizable_live_operation for pure SLP statements.
28833         (vectorizable_live_operation): Handle PHIs.
28835 2018-01-16  Richard Biener  <rguenther@suse.de>
28837         PR tree-optimization/83867
28838         * tree-vect-stmts.c (vect_transform_stmt): Precompute
28839         nested_in_vect_loop_p since the scalar stmt may get invalidated.
28841 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
28843         PR c/83844
28844         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
28845         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
28846         If off is not INTEGER_CST, issue a may not be aligned warning
28847         rather than isn't aligned.  Use isn%'t rather than isn't.
28848         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
28849         into MULT_EXPR.
28850         <case MULT_EXPR>: Improve the case when bottom and one of the
28851         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
28852         operand, in that case check if the other operand is multiple of
28853         bottom divided by the INTEGER_CST operand.
28855 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
28857         PR target/83858
28858         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
28859         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
28860         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
28861         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
28862         * config/pa/pa.c (pa_function_arg_advance): Likewise.
28863         (pa_function_arg, pa_arg_partial_bytes): Likewise.
28864         (pa_function_arg_size): New function.
28866 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
28868         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
28869         in a separate statement.
28871 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
28873         PR tree-optimization/83847
28874         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
28875         group gathers and scatters.
28877 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
28879         PR rtl-optimization/86620
28880         * params.def (max-sched-ready-insns): Bump minimum value to 1.
28882         PR rtl-optimization/83213
28883         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
28884         to last if both are JUMP_INSNs.
28886         PR tree-optimization/83843
28887         * gimple-ssa-store-merging.c
28888         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
28889         store_immediate_info for bswap/nop orig_stores.
28891 2018-01-15  Andrew Waterman  <andrew@sifive.com>
28893         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
28894         !TARGET_MUL.
28895         <UDIV>: Increase cost if !TARGET_DIV.
28897 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
28899         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
28900         (define_attr "cr_logical_3op"): New.
28901         (cceq_ior_compare): Adjust.
28902         (cceq_ior_compare_complement): Adjust.
28903         (*cceq_rev_compare): Adjust.
28904         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
28905         (is_cracked_insn): Adjust.
28906         (insn_must_be_first_in_group): Adjust.
28907         * config/rs6000/40x.md: Adjust.
28908         * config/rs6000/440.md: Adjust.
28909         * config/rs6000/476.md: Adjust.
28910         * config/rs6000/601.md: Adjust.
28911         * config/rs6000/603.md: Adjust.
28912         * config/rs6000/6xx.md: Adjust.
28913         * config/rs6000/7450.md: Adjust.
28914         * config/rs6000/7xx.md: Adjust.
28915         * config/rs6000/8540.md: Adjust.
28916         * config/rs6000/cell.md: Adjust.
28917         * config/rs6000/e300c2c3.md: Adjust.
28918         * config/rs6000/e500mc.md: Adjust.
28919         * config/rs6000/e500mc64.md: Adjust.
28920         * config/rs6000/e5500.md: Adjust.
28921         * config/rs6000/e6500.md: Adjust.
28922         * config/rs6000/mpc.md: Adjust.
28923         * config/rs6000/power4.md: Adjust.
28924         * config/rs6000/power5.md: Adjust.
28925         * config/rs6000/power6.md: Adjust.
28926         * config/rs6000/power7.md: Adjust.
28927         * config/rs6000/power8.md: Adjust.
28928         * config/rs6000/power9.md: Adjust.
28929         * config/rs6000/rs64.md: Adjust.
28930         * config/rs6000/titan.md: Adjust.
28932 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
28934         * config/i386/predicates.md (indirect_branch_operand): Rewrite
28935         ix86_indirect_branch_register logic.
28937 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
28939         * config/i386/constraints.md (Bs): Update
28940         ix86_indirect_branch_register check.  Don't check
28941         ix86_indirect_branch_register with GOT_memory_operand.
28942         (Bw): Likewise.
28943         * config/i386/predicates.md (GOT_memory_operand): Don't check
28944         ix86_indirect_branch_register here.
28945         (GOT32_symbol_operand): Likewise.
28947 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
28949         * config/i386/predicates.md (constant_call_address_operand):
28950         Rewrite ix86_indirect_branch_register logic.
28951         (sibcall_insn_operand): Likewise.
28953 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
28955         * config/i386/constraints.md (Bs): Replace
28956         ix86_indirect_branch_thunk_register with
28957         ix86_indirect_branch_register.
28958         (Bw): Likewise.
28959         * config/i386/i386.md (indirect_jump): Likewise.
28960         (tablejump): Likewise.
28961         (*sibcall_memory): Likewise.
28962         (*sibcall_value_memory): Likewise.
28963         Peepholes of indirect call and jump via memory: Likewise.
28964         * config/i386/i386.opt: Likewise.
28965         * config/i386/predicates.md (indirect_branch_operand): Likewise.
28966         (GOT_memory_operand): Likewise.
28967         (call_insn_operand): Likewise.
28968         (sibcall_insn_operand): Likewise.
28969         (GOT32_symbol_operand): Likewise.
28971 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
28973         PR middle-end/83837
28974         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
28975         type rather than type addr's type points to.
28976         (expand_omp_atomic_mutex): Likewise.
28977         (expand_omp_atomic): Likewise.
28979 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
28981         PR target/83839
28982         * config/i386/i386.c (output_indirect_thunk_function): Use
28983         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
28984         for  __x86_return_thunk.
28986 2018-01-15  Richard Biener  <rguenther@suse.de>
28988         PR middle-end/83850
28989         * expmed.c (extract_bit_field_1): Fix typo.
28991 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28993         PR target/83687
28994         * config/arm/iterators.md (VF): New mode iterator.
28995         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
28996         Remove integer-related logic from pattern.
28997         (neon_vabd<mode>_3): Likewise.
28999 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
29001         PR middle-end/82694
29002         * common.opt (fstrict-overflow): No longer an alias.
29003         (fwrapv-pointer): New option.
29004         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
29005         also for pointer types based on flag_wrapv_pointer.
29006         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
29007         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
29008         opts->x_flag_wrapv got set.
29009         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
29010         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
29011         POINTER_TYPE_OVERFLOW_UNDEFINED.
29012         * match.pd: Likewise in address comparison pattern.
29013         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
29015 2018-01-15  Richard Biener  <rguenther@suse.de>
29017         PR lto/83804
29018         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
29019         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
29020         Reset type names to their identifier if their TYPE_DECL doesn't
29021         have linkage (and thus is used for ODR and devirt).
29022         (save_debug_info_for_decl): Remove.
29023         (save_debug_info_for_type): Likewise.
29024         (add_tree_to_fld_list): Adjust.
29025         * tree-pretty-print.c (dump_generic_node): Make dumping of
29026         type names more robust.
29028 2018-01-15  Richard Biener  <rguenther@suse.de>
29030         * BASE-VER: Bump to 8.0.1.
29032 2018-01-14  Martin Sebor  <msebor@redhat.com>
29034         PR other/83508
29035         * builtins.c (check_access): Avoid warning when the no-warning bit
29036         is set.
29038 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
29040         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
29041         * ira-color (allocno_hard_regs_compare): Likewise.
29043 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
29045         PR target/83013
29046         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
29047         Use .pushsection/.popsection.
29049 2018-01-14  Martin Sebor  <msebor@redhat.com>
29051         PR c++/81327
29052         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
29054 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
29056         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
29057         entry from extra_headers.
29058         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
29059         extra_headers, make the list bitwise identical to the i?86-*-* one.
29061 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
29063         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
29064         -mcmodel=large with -mindirect-branch=thunk,
29065         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
29066         -mfunction-return=thunk-extern.
29067         * doc/invoke.texi: Document -mcmodel=large is incompatible with
29068         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
29069         -mfunction-return=thunk and -mfunction-return=thunk-extern.
29071 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
29073         * config/i386/i386.c (print_reg): Print the name of the full
29074         integer register without '%'.
29075         (ix86_print_operand): Handle 'V'.
29076         * doc/extend.texi: Document 'V' modifier.
29078 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
29080         * config/i386/constraints.md (Bs): Disallow memory operand for
29081         -mindirect-branch-register.
29082         (Bw): Likewise.
29083         * config/i386/predicates.md (indirect_branch_operand): Likewise.
29084         (GOT_memory_operand): Likewise.
29085         (call_insn_operand): Likewise.
29086         (sibcall_insn_operand): Likewise.
29087         (GOT32_symbol_operand): Likewise.
29088         * config/i386/i386.md (indirect_jump): Call convert_memory_address
29089         for -mindirect-branch-register.
29090         (tablejump): Likewise.
29091         (*sibcall_memory): Likewise.
29092         (*sibcall_value_memory): Likewise.
29093         Disallow peepholes of indirect call and jump via memory for
29094         -mindirect-branch-register.
29095         (*call_pop): Replace m with Bw.
29096         (*call_value_pop): Likewise.
29097         (*sibcall_pop_memory): Replace m with Bs.
29098         * config/i386/i386.opt (mindirect-branch-register): New option.
29099         * doc/invoke.texi: Document -mindirect-branch-register option.
29101 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
29103         * config/i386/i386-protos.h (ix86_output_function_return): New.
29104         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
29105         set function_return_type.
29106         (indirect_thunk_name): Add ret_p to indicate thunk for function
29107         return.
29108         (output_indirect_thunk_function): Pass false to
29109         indirect_thunk_name.
29110         (ix86_output_indirect_branch_via_reg): Likewise.
29111         (ix86_output_indirect_branch_via_push): Likewise.
29112         (output_indirect_thunk_function): Create alias for function
29113         return thunk if regno < 0.
29114         (ix86_output_function_return): New function.
29115         (ix86_handle_fndecl_attribute): Handle function_return.
29116         (ix86_attribute_table): Add function_return.
29117         * config/i386/i386.h (machine_function): Add
29118         function_return_type.
29119         * config/i386/i386.md (simple_return_internal): Use
29120         ix86_output_function_return.
29121         (simple_return_internal_long): Likewise.
29122         * config/i386/i386.opt (mfunction-return=): New option.
29123         (indirect_branch): Mention -mfunction-return=.
29124         * doc/extend.texi: Document function_return function attribute.
29125         * doc/invoke.texi: Document -mfunction-return= option.
29127 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
29129         * config/i386/i386-opts.h (indirect_branch): New.
29130         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
29131         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
29132         with local indirect jump when converting indirect call and jump.
29133         (ix86_set_indirect_branch_type): New.
29134         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
29135         (indirectlabelno): New.
29136         (indirect_thunk_needed): Likewise.
29137         (indirect_thunk_bnd_needed): Likewise.
29138         (indirect_thunks_used): Likewise.
29139         (indirect_thunks_bnd_used): Likewise.
29140         (INDIRECT_LABEL): Likewise.
29141         (indirect_thunk_name): Likewise.
29142         (output_indirect_thunk): Likewise.
29143         (output_indirect_thunk_function): Likewise.
29144         (ix86_output_indirect_branch_via_reg): Likewise.
29145         (ix86_output_indirect_branch_via_push): Likewise.
29146         (ix86_output_indirect_branch): Likewise.
29147         (ix86_output_indirect_jmp): Likewise.
29148         (ix86_code_end): Call output_indirect_thunk_function if needed.
29149         (ix86_output_call_insn): Call ix86_output_indirect_branch if
29150         needed.
29151         (ix86_handle_fndecl_attribute): Handle indirect_branch.
29152         (ix86_attribute_table): Add indirect_branch.
29153         * config/i386/i386.h (machine_function): Add indirect_branch_type
29154         and has_local_indirect_jump.
29155         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
29156         to true.
29157         (tablejump): Likewise.
29158         (*indirect_jump): Use ix86_output_indirect_jmp.
29159         (*tablejump_1): Likewise.
29160         (simple_return_indirect_internal): Likewise.
29161         * config/i386/i386.opt (mindirect-branch=): New option.
29162         (indirect_branch): New.
29163         (keep): Likewise.
29164         (thunk): Likewise.
29165         (thunk-inline): Likewise.
29166         (thunk-extern): Likewise.
29167         * doc/extend.texi: Document indirect_branch function attribute.
29168         * doc/invoke.texi: Document -mindirect-branch= option.
29170 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
29172         PR ipa/83051
29173         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
29175 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
29177         * ipa-inline.c (want_inline_small_function_p): Return false if
29178         inlining has already failed with CIF_FINAL_ERROR.
29179         (update_caller_keys): Call want_inline_small_function_p before
29180         can_inline_edge_p.
29181         (update_callee_keys): Likewise.
29183 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
29185         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
29186         New function.
29187         (rs6000_quadword_masked_address_p): Likewise.
29188         (quad_aligned_load_p): Likewise.
29189         (quad_aligned_store_p): Likewise.
29190         (const_load_sequence_p): Add comment to describe the outer-most loop.
29191         (mimic_memory_attributes_and_flags): New function.
29192         (rs6000_gen_stvx): Likewise.
29193         (replace_swapped_aligned_store): Likewise.
29194         (rs6000_gen_lvx): Likewise.
29195         (replace_swapped_aligned_load): Likewise.
29196         (replace_swapped_load_constant): Capitalize argument name in
29197         comment describing this function.
29198         (rs6000_analyze_swaps): Add a third pass to search for vector loads
29199         and stores that access quad-word aligned addresses and replace
29200         with stvx or lvx instructions when appropriate.
29201         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
29202         New function prototype.
29203         (rs6000_quadword_masked_address_p): Likewise.
29204         (rs6000_gen_lvx): Likewise.
29205         (rs6000_gen_stvx): Likewise.
29206         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
29207         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
29208         when memory address is aligned.
29209         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
29210         this split to select lvx instruction when memory address is aligned.
29211         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
29212         instruction when memory address is aligned.
29213         (*vsx_le_perm_load_v16qi): Likewise.
29214         (four unnamed splitters): Modify to select the stvx instruction
29215         when memory is aligned.
29217 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
29219         * predict.c (determine_unlikely_bbs): Handle correctly BBs
29220         which appears in the queue multiple times.
29222 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29223             Alan Hayward  <alan.hayward@arm.com>
29224             David Sherwood  <david.sherwood@arm.com>
29226         * tree-vectorizer.h (vec_lower_bound): New structure.
29227         (_loop_vec_info): Add check_nonzero and lower_bounds.
29228         (LOOP_VINFO_CHECK_NONZERO): New macro.
29229         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
29230         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
29231         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
29232         fields.  Make seg_len the distance travelled, not including the
29233         access size.
29234         (dr_direction_indicator): Declare.
29235         (dr_zero_step_indicator): Likewise.
29236         (dr_known_forward_stride_p): Likewise.
29237         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
29238         tree-ssanames.h.
29239         (runtime_alias_check_p): Allow runtime alias checks with
29240         variable strides.
29241         (operator ==): Compare access_size and align.
29242         (prune_runtime_alias_test_list): Rework for new distinction between
29243         the access_size and seg_len.
29244         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
29245         segment lengths.
29246         (get_segment_min_max): New function.
29247         (create_intersect_range_checks): Use it.
29248         (dr_step_indicator): New function.
29249         (dr_direction_indicator): Likewise.
29250         (dr_zero_step_indicator): Likewise.
29251         (dr_known_forward_stride_p): Likewise.
29252         * tree-loop-distribution.c (data_ref_segment_size): Return
29253         DR_STEP * (niters - 1).
29254         (compute_alias_check_pairs): Update call to the dr_with_seg_len
29255         constructor.
29256         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
29257         (vect_preserves_scalar_order_p): New function, split out from...
29258         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
29259         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
29260         (vect_vfa_access_size): New function.
29261         (vect_vfa_align): Likewise.
29262         (vect_compile_time_alias): Take access_size_a and access_b arguments.
29263         (dump_lower_bound): New function.
29264         (vect_check_lower_bound): Likewise.
29265         (vect_small_gap_p): Likewise.
29266         (vectorizable_with_step_bound_p): Likewise.
29267         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
29268         depencies if the vectorization factor is 1.  Convert the checks
29269         for nonzero steps into checks on the bounds of DR_STEP.  Try using
29270         a bunds check for variable steps if the minimum required step is
29271         relatively small. Update calls to the dr_with_seg_len
29272         constructor and to vect_compile_time_alias.
29273         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
29274         function.
29275         (vect_loop_versioning): Call it.
29276         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
29277         when retrying.
29278         (vect_estimate_min_profitable_iters): Account for any bounds checks.
29280 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29281             Alan Hayward  <alan.hayward@arm.com>
29282             David Sherwood  <david.sherwood@arm.com>
29284         * doc/sourcebuild.texi (vect_scatter_store): Document.
29285         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
29286         optabs.
29287         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
29288         Document.
29289         * genopinit.c (main): Add supports_vec_scatter_store and
29290         supports_vec_scatter_store_cached to target_optabs.
29291         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
29292         IFN_MASK_SCATTER_STORE.
29293         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
29294         functions.
29295         * internal-fn.h (internal_store_fn_p): Declare.
29296         (internal_fn_stored_value_index): Likewise.
29297         * internal-fn.c (scatter_store_direct): New macro.
29298         (expand_scatter_store_optab_fn): New function.
29299         (direct_scatter_store_optab_supported_p): New macro.
29300         (internal_store_fn_p): New function.
29301         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
29302         IFN_MASK_SCATTER_STORE.
29303         (internal_fn_mask_index): Likewise.
29304         (internal_fn_stored_value_index): New function.
29305         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
29306         for scatter stores.
29307         * optabs-query.h (supports_vec_scatter_store_p): Declare.
29308         * optabs-query.c (supports_vec_scatter_store_p): New function.
29309         * tree-vectorizer.h (vect_get_store_rhs): Declare.
29310         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
29311         true for scatter stores.
29312         (vect_gather_scatter_fn_p): Handle scatter stores too.
29313         (vect_check_gather_scatter): Consider using scatter stores if
29314         supports_vec_scatter_store_p.
29315         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
29316         scatter stores too.
29317         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
29318         internal_fn_stored_value_index.
29319         (check_load_store_masking): Handle scatter stores too.
29320         (vect_get_store_rhs): Make public.
29321         (vectorizable_call): Use internal_store_fn_p.
29322         (vectorizable_store): Handle scatter store internal functions.
29323         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
29324         when deciding whether the end of the group has been reached.
29325         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
29326         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
29327         (mask_scatter_store<mode>): New insns.
29329 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29330             Alan Hayward  <alan.hayward@arm.com>
29331             David Sherwood  <david.sherwood@arm.com>
29333         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
29334         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
29335         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
29336         function.
29337         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
29338         Use vect_truncate_gather_scatter_offset if we can't treat the
29339         operation as a normal gather load or scatter store.
29340         (get_group_load_store_type): Take the gather_scatter_info
29341         as argument.  Try using a gather load or scatter store for
29342         single-element groups.
29343         (get_load_store_type): Update calls to get_group_load_store_type
29344         and vect_use_strided_gather_scatters_p.
29346 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29347             Alan Hayward  <alan.hayward@arm.com>
29348             David Sherwood  <david.sherwood@arm.com>
29350         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
29351         optional tree argument.
29352         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
29353         null target hooks.
29354         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
29355         but continue to use the current value as a fallback.
29356         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
29357         to compare the updates.
29358         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
29359         (get_load_store_type): Use it when handling a strided access.
29360         (vect_get_strided_load_store_ops): New function.
29361         (vect_get_data_ptr_increment): Likewise.
29362         (vectorizable_load): Handle strided gather loads.  Always pass
29363         a step to vect_create_data_ref_ptr and bump_vector_ptr.
29365 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29366             Alan Hayward  <alan.hayward@arm.com>
29367             David Sherwood  <david.sherwood@arm.com>
29369         * doc/md.texi (gather_load@var{m}): Document.
29370         (mask_gather_load@var{m}): Likewise.
29371         * genopinit.c (main): Add supports_vec_gather_load and
29372         supports_vec_gather_load_cached to target_optabs.
29373         * optabs-tree.c (init_tree_optimization_optabs): Use
29374         ggc_cleared_alloc to allocate target_optabs.
29375         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
29376         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
29377         functions.
29378         * internal-fn.h (internal_load_fn_p): Declare.
29379         (internal_gather_scatter_fn_p): Likewise.
29380         (internal_fn_mask_index): Likewise.
29381         (internal_gather_scatter_fn_supported_p): Likewise.
29382         * internal-fn.c (gather_load_direct): New macro.
29383         (expand_gather_load_optab_fn): New function.
29384         (direct_gather_load_optab_supported_p): New macro.
29385         (direct_internal_fn_optab): New function.
29386         (internal_load_fn_p): Likewise.
29387         (internal_gather_scatter_fn_p): Likewise.
29388         (internal_fn_mask_index): Likewise.
29389         (internal_gather_scatter_fn_supported_p): Likewise.
29390         * optabs-query.c (supports_at_least_one_mode_p): New function.
29391         (supports_vec_gather_load_p): Likewise.
29392         * optabs-query.h (supports_vec_gather_load_p): Declare.
29393         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
29394         and memory_type field.
29395         (NUM_PATTERNS): Bump to 15.
29396         * tree-vect-data-refs.c: Include internal-fn.h.
29397         (vect_gather_scatter_fn_p): New function.
29398         (vect_describe_gather_scatter_call): Likewise.
29399         (vect_check_gather_scatter): Try using internal functions for
29400         gather loads.  Recognize existing calls to a gather load function.
29401         (vect_analyze_data_refs): Consider using gather loads if
29402         supports_vec_gather_load_p.
29403         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
29404         (vect_get_gather_scatter_offset_type): Likewise.
29405         (vect_convert_mask_for_vectype): Likewise.
29406         (vect_add_conversion_to_patterm): Likewise.
29407         (vect_try_gather_scatter_pattern): Likewise.
29408         (vect_recog_gather_scatter_pattern): New pattern recognizer.
29409         (vect_vect_recog_func_ptrs): Add it.
29410         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
29411         internal_fn_mask_index and internal_gather_scatter_fn_p.
29412         (check_load_store_masking): Take the gather_scatter_info as an
29413         argument and handle gather loads.
29414         (vect_get_gather_scatter_ops): New function.
29415         (vectorizable_call): Check internal_load_fn_p.
29416         (vectorizable_load): Likewise.  Handle gather load internal
29417         functions.
29418         (vectorizable_store): Update call to check_load_store_masking.
29419         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
29420         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
29421         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
29422         (aarch64_gather_scale_operand_d): New predicates.
29423         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
29424         (mask_gather_load<mode>): New insns.
29426 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29427             Alan Hayward  <alan.hayward@arm.com>
29428             David Sherwood  <david.sherwood@arm.com>
29430         * optabs.def (fold_left_plus_optab): New optab.
29431         * doc/md.texi (fold_left_plus_@var{m}): Document.
29432         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
29433         * internal-fn.c (fold_left_direct): Define.
29434         (expand_fold_left_optab_fn): Likewise.
29435         (direct_fold_left_optab_supported_p): Likewise.
29436         * fold-const-call.c (fold_const_fold_left): New function.
29437         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
29438         * tree-parloops.c (valid_reduction_p): New function.
29439         (gather_scalar_reductions): Use it.
29440         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
29441         (vect_finish_replace_stmt): Declare.
29442         * tree-vect-loop.c (fold_left_reduction_fn): New function.
29443         (needs_fold_left_reduction_p): New function, split out from...
29444         (vect_is_simple_reduction): ...here.  Accept reductions that
29445         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
29446         (vect_force_simple_reduction): Also store the reduction type in
29447         the assignment's STMT_VINFO_REDUC_TYPE.
29448         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
29449         (merge_with_identity): New function.
29450         (vect_expand_fold_left): Likewise.
29451         (vectorize_fold_left_reduction): Likewise.
29452         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
29453         scalar phi in place for it.  Check for target support and reject
29454         cases that would reassociate the operation.  Defer the transform
29455         phase to vectorize_fold_left_reduction.
29456         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
29457         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
29458         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
29460 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29462         * tree-if-conv.c (predicate_mem_writes): Remove redundant
29463         call to ifc_temp_var.
29465 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29466             Alan Hayward  <alan.hayward@arm.com>
29467             David Sherwood  <david.sherwood@arm.com>
29469         * target.def (legitimize_address_displacement): Take the original
29470         offset as a poly_int.
29471         * targhooks.h (default_legitimize_address_displacement): Update
29472         accordingly.
29473         * targhooks.c (default_legitimize_address_displacement): Likewise.
29474         * doc/tm.texi: Regenerate.
29475         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
29476         as an argument, moving assert of ad->disp == ad->disp_term to...
29477         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
29478         Try calling targetm.legitimize_address_displacement before expanding
29479         the address rather than afterwards, and adjust for the new interface.
29480         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
29481         Match the new hook interface.  Handle SVE addresses.
29482         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
29483         new hook interface.
29485 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29487         * Makefile.in (OBJS): Add early-remat.o.
29488         * target.def (select_early_remat_modes): New hook.
29489         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
29490         * doc/tm.texi: Regenerate.
29491         * targhooks.h (default_select_early_remat_modes): Declare.
29492         * targhooks.c (default_select_early_remat_modes): New function.
29493         * timevar.def (TV_EARLY_REMAT): New timevar.
29494         * passes.def (pass_early_remat): New pass.
29495         * tree-pass.h (make_pass_early_remat): Declare.
29496         * early-remat.c: New file.
29497         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
29498         function.
29499         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
29501 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29502             Alan Hayward  <alan.hayward@arm.com>
29503             David Sherwood  <david.sherwood@arm.com>
29505         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
29506         vfm1 with a bound_epilog parameter.
29507         (vect_do_peeling): Update calls accordingly, and move the prologue
29508         call earlier in the function.  Treat the base bound_epilog as 0 for
29509         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
29510         this base when peeling for gaps.
29511         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
29512         with fully-masked loops.
29513         (vect_estimate_min_profitable_iters): Handle the single peeled
29514         iteration in that case.
29516 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29517             Alan Hayward  <alan.hayward@arm.com>
29518             David Sherwood  <david.sherwood@arm.com>
29520         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
29521         single-element interleaving even if the size is not a power of 2.
29522         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
29523         accesses for single-element interleaving if the group size is
29524         not a power of 2.
29526 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29527             Alan Hayward  <alan.hayward@arm.com>
29528             David Sherwood  <david.sherwood@arm.com>
29530         * doc/md.texi (fold_extract_last_@var{m}): Document.
29531         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
29532         * optabs.def (fold_extract_last_optab): New optab.
29533         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
29534         * internal-fn.c (fold_extract_direct): New macro.
29535         (expand_fold_extract_optab_fn): Likewise.
29536         (direct_fold_extract_optab_supported_p): Likewise.
29537         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
29538         * tree-vect-loop.c (vect_model_reduction_cost): Handle
29539         EXTRACT_LAST_REDUCTION.
29540         (get_initial_def_for_reduction): Do not create an initial vector
29541         for EXTRACT_LAST_REDUCTION reductions.
29542         (vectorizable_reduction): Leave the scalar phi in place for
29543         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
29544         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
29545         epilogue code for EXTRACT_LAST_REDUCTION and defer the
29546         transform phase to vectorizable_condition.
29547         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
29548         split out from...
29549         (vect_finish_stmt_generation): ...here.
29550         (vect_finish_replace_stmt): New function.
29551         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
29552         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
29553         pattern.
29554         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
29556 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29557             Alan Hayward  <alan.hayward@arm.com>
29558             David Sherwood  <david.sherwood@arm.com>
29560         * doc/md.texi (extract_last_@var{m}): Document.
29561         * optabs.def (extract_last_optab): New optab.
29562         * internal-fn.def (EXTRACT_LAST): New internal function.
29563         * internal-fn.c (cond_unary_direct): New macro.
29564         (expand_cond_unary_optab_fn): Likewise.
29565         (direct_cond_unary_optab_supported_p): Likewise.
29566         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
29567         loops using EXTRACT_LAST.
29568         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
29569         (extract_last_<mode>): ...this optab.
29570         (vec_extract<mode><Vel>): Update accordingly.
29572 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29573             Alan Hayward  <alan.hayward@arm.com>
29574             David Sherwood  <david.sherwood@arm.com>
29576         * target.def (empty_mask_is_expensive): New hook.
29577         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
29578         * doc/tm.texi: Regenerate.
29579         * targhooks.h (default_empty_mask_is_expensive): Declare.
29580         * targhooks.c (default_empty_mask_is_expensive): New function.
29581         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
29582         if the target says that empty masks are expensive.
29583         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
29584         New function.
29585         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
29587 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29588             Alan Hayward  <alan.hayward@arm.com>
29589             David Sherwood  <david.sherwood@arm.com>
29591         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
29592         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
29593         (vect_use_loop_mask_for_alignment_p): New function.
29594         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
29595         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
29596         niters_skip argument.  Make sure that the first niters_skip elements
29597         of the first iteration are inactive.
29598         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
29599         Update call to vect_set_loop_masks_directly.
29600         (get_misalign_in_elems): New function, split out from...
29601         (vect_gen_prolog_loop_niters): ...here.
29602         (vect_update_init_of_dr): Take a code argument that specifies whether
29603         the adjustment should be added or subtracted.
29604         (vect_update_init_of_drs): Likewise.
29605         (vect_prepare_for_masked_peels): New function.
29606         (vect_do_peeling): Skip prologue peeling if we're using a mask
29607         instead.  Update call to vect_update_inits_of_drs.
29608         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
29609         mask_skip_niters.
29610         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
29611         alignment.  Do not include the number of peeled iterations in
29612         the minimum threshold in that case.
29613         (vectorizable_induction): Adjust the start value down by
29614         LOOP_VINFO_MASK_SKIP_NITERS iterations.
29615         (vect_transform_loop): Call vect_prepare_for_masked_peels.
29616         Take the number of skipped iterations into account when calculating
29617         the loop bounds.
29618         * tree-vect-stmts.c (vect_gen_while_not): New function.
29620 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29621             Alan Hayward  <alan.hayward@arm.com>
29622             David Sherwood  <david.sherwood@arm.com>
29624         * doc/sourcebuild.texi (vect_fully_masked): Document.
29625         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
29626         default value to 0.
29627         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
29628         split out from...
29629         (vect_analyze_loop_2): ...here. Don't check the vectorization
29630         factor against the number of loop iterations if the loop is
29631         fully-masked.
29633 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29634             Alan Hayward  <alan.hayward@arm.com>
29635             David Sherwood  <david.sherwood@arm.com>
29637         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
29638         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
29639         (dump_groups): Update accordingly.
29640         (iv_use::mem_type): New member variable.
29641         (address_p): New function.
29642         (record_use): Add a mem_type argument and initialize the new
29643         mem_type field.
29644         (record_group_use): Add a mem_type argument.  Use address_p.
29645         Remove obsolete null checks of base_object.  Update call to record_use.
29646         (find_interesting_uses_op): Update call to record_group_use.
29647         (find_interesting_uses_cond): Likewise.
29648         (find_interesting_uses_address): Likewise.
29649         (get_mem_type_for_internal_fn): New function.
29650         (find_address_like_use): Likewise.
29651         (find_interesting_uses_stmt): Try find_address_like_use before
29652         calling find_interesting_uses_op.
29653         (addr_offset_valid_p): Use the iv mem_type field as the type
29654         of the addressed memory.
29655         (add_autoinc_candidates): Likewise.
29656         (get_address_cost): Likewise.
29657         (split_small_address_groups_p): Use address_p.
29658         (split_address_groups): Likewise.
29659         (add_iv_candidate_for_use): Likewise.
29660         (autoinc_possible_for_pair): Likewise.
29661         (rewrite_groups): Likewise.
29662         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
29663         (determine_group_iv_cost): Update after split of USE_ADDRESS.
29664         (get_alias_ptr_type_for_ptr_address): New function.
29665         (rewrite_use_address): Rewrite address uses in calls that were
29666         identified by find_address_like_use.
29668 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29669             Alan Hayward  <alan.hayward@arm.com>
29670             David Sherwood  <david.sherwood@arm.com>
29672         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
29673         TARGET_MEM_REFs.
29674         * gimple-expr.h (is_gimple_addressable: Likewise.
29675         * gimple-expr.c (is_gimple_address): Likewise.
29676         * internal-fn.c (expand_call_mem_ref): New function.
29677         (expand_mask_load_optab_fn): Use it.
29678         (expand_mask_store_optab_fn): Likewise.
29680 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29681             Alan Hayward  <alan.hayward@arm.com>
29682             David Sherwood  <david.sherwood@arm.com>
29684         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
29685         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
29686         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
29687         (cond_umax@var{mode}): Document.
29688         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
29689         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
29690         (cond_umin_optab, cond_umax_optab): New optabs.
29691         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
29692         (COND_IOR, COND_XOR): New internal functions.
29693         * internal-fn.h (get_conditional_internal_fn): Declare.
29694         * internal-fn.c (cond_binary_direct): New macro.
29695         (expand_cond_binary_optab_fn): Likewise.
29696         (direct_cond_binary_optab_supported_p): Likewise.
29697         (get_conditional_internal_fn): New function.
29698         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
29699         Cope with reduction statements that are vectorized as calls rather
29700         than assignments.
29701         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
29702         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
29703         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
29704         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
29705         (UNSPEC_COND_EOR): New unspecs.
29706         (optab): Add mappings for them.
29707         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
29708         (sve_int_op, sve_fp_op): New int attributes.
29710 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29711             Alan Hayward  <alan.hayward@arm.com>
29712             David Sherwood  <david.sherwood@arm.com>
29714         * optabs.def (while_ult_optab): New optab.
29715         * doc/md.texi (while_ult@var{m}@var{n}): Document.
29716         * internal-fn.def (WHILE_ULT): New internal function.
29717         * internal-fn.h (direct_internal_fn_supported_p): New override
29718         that takes two types as argument.
29719         * internal-fn.c (while_direct): New macro.
29720         (expand_while_optab_fn): New function.
29721         (convert_optab_supported_p): Likewise.
29722         (direct_while_optab_supported_p): New macro.
29723         * wide-int.h (wi::udiv_ceil): New function.
29724         * tree-vectorizer.h (rgroup_masks): New structure.
29725         (vec_loop_masks): New typedef.
29726         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
29727         and fully_masked_p.
29728         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
29729         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
29730         (vect_max_vf): New function.
29731         (slpeel_make_loop_iterate_ntimes): Delete.
29732         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
29733         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
29734         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
29735         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
29736         internal-fn.h, stor-layout.h and optabs-query.h.
29737         (vect_set_loop_mask): New function.
29738         (add_preheader_seq): Likewise.
29739         (add_header_seq): Likewise.
29740         (interleave_supported_p): Likewise.
29741         (vect_maybe_permute_loop_masks): Likewise.
29742         (vect_set_loop_masks_directly): Likewise.
29743         (vect_set_loop_condition_masked): Likewise.
29744         (vect_set_loop_condition_unmasked): New function, split out from
29745         slpeel_make_loop_iterate_ntimes.
29746         (slpeel_make_loop_iterate_ntimes): Rename to..
29747         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
29748         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
29749         (vect_do_peeling): Update call accordingly.
29750         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
29751         loops.
29752         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
29753         mask_compare_type, can_fully_mask_p and fully_masked_p.
29754         (release_vec_loop_masks): New function.
29755         (_loop_vec_info): Use it to free the loop masks.
29756         (can_produce_all_loop_masks_p): New function.
29757         (vect_get_max_nscalars_per_iter): Likewise.
29758         (vect_verify_full_masking): Likewise.
29759         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
29760         retries, and free the mask rgroups before retrying.  Check loop-wide
29761         reasons for disallowing fully-masked loops.  Make the final decision
29762         about whether use a fully-masked loop or not.
29763         (vect_estimate_min_profitable_iters): Do not assume that peeling
29764         for the number of iterations will be needed for fully-masked loops.
29765         (vectorizable_reduction): Disable fully-masked loops.
29766         (vectorizable_live_operation): Likewise.
29767         (vect_halve_mask_nunits): New function.
29768         (vect_double_mask_nunits): Likewise.
29769         (vect_record_loop_mask): Likewise.
29770         (vect_get_loop_mask): Likewise.
29771         (vect_transform_loop): Handle the case in which the final loop
29772         iteration might handle a partial vector.  Call vect_set_loop_condition
29773         instead of slpeel_make_loop_iterate_ntimes.
29774         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
29775         (check_load_store_masking): New function.
29776         (prepare_load_store_mask): Likewise.
29777         (vectorizable_store): Handle fully-masked loops.
29778         (vectorizable_load): Likewise.
29779         (supportable_widening_operation): Use vect_halve_mask_nunits for
29780         booleans.
29781         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
29782         (vect_gen_while): New function.
29783         * config/aarch64/aarch64.md (umax<mode>3): New expander.
29784         (aarch64_uqdec<mode>): New insn.
29786 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29787             Alan Hayward  <alan.hayward@arm.com>
29788             David Sherwood  <david.sherwood@arm.com>
29790         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
29791         (reduc_xor_scal_optab): New optabs.
29792         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
29793         (reduc_xor_scal_@var{m}): Document.
29794         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
29795         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
29796         internal functions.
29797         * fold-const-call.c (fold_const_call): Handle them.
29798         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
29799         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
29800         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
29801         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
29802         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
29803         (UNSPEC_XORV): New unspecs.
29804         (optab): Add entries for them.
29805         (BITWISEV): New int iterator.
29806         (bit_reduc_op): New int attributes.
29808 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29809             Alan Hayward  <alan.hayward@arm.com>
29810             David Sherwood  <david.sherwood@arm.com>
29812         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
29813         * internal-fn.def (VEC_SHL_INSERT): New internal function.
29814         * optabs.def (vec_shl_insert_optab): New optab.
29815         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
29816         (duplicate_and_interleave): Likewise.
29817         * tree-vect-loop.c: Include internal-fn.h.
29818         (neutral_op_for_slp_reduction): New function, split out from
29819         get_initial_defs_for_reduction.
29820         (get_initial_def_for_reduction): Handle option 2 for variable-length
29821         vectors by loading the neutral value into a vector and then shifting
29822         the initial value into element 0.
29823         (get_initial_defs_for_reduction): Replace the code argument with
29824         the neutral value calculated by neutral_op_for_slp_reduction.
29825         Use gimple_build_vector for constant-length vectors.
29826         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
29827         but the first group_size elements have a neutral value.
29828         Use duplicate_and_interleave otherwise.
29829         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
29830         Update call to get_initial_defs_for_reduction.  Handle SLP
29831         reductions for variable-length vectors by creating one vector
29832         result for each scalar result, with the elements associated
29833         with other scalar results stubbed out with the neutral value.
29834         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
29835         Require IFN_VEC_SHL_INSERT for double reductions on
29836         variable-length vectors, or SLP reductions that have
29837         a neutral value.  Require can_duplicate_and_interleave_p
29838         support for variable-length unchained SLP reductions if there
29839         is no neutral value, such as for MIN/MAX reductions.  Also require
29840         the number of vector elements to be a multiple of the number of
29841         SLP statements when doing variable-length unchained SLP reductions.
29842         Update call to vect_create_epilog_for_reduction.
29843         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
29844         and remove initial values.
29845         (duplicate_and_interleave): Make public.
29846         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
29847         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
29849 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29850             Alan Hayward  <alan.hayward@arm.com>
29851             David Sherwood  <david.sherwood@arm.com>
29853         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
29854         (can_duplicate_and_interleave_p): New function.
29855         (vect_get_and_check_slp_defs): Take the vector of statements
29856         rather than just the current one.  Remove excess parentheses.
29857         Restriction rejectinon of vect_constant_def and vect_external_def
29858         for variable-length vectors to boolean types, or types for which
29859         can_duplicate_and_interleave_p is false.
29860         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
29861         (duplicate_and_interleave): New function.
29862         (vect_get_constant_vectors): Use gimple_build_vector for
29863         constant-length vectors and suitable variable-length constant
29864         vectors.  Use duplicate_and_interleave for other variable-length
29865         vectors.  Don't defer the update when inserting new statements.
29867 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29868             Alan Hayward  <alan.hayward@arm.com>
29869             David Sherwood  <david.sherwood@arm.com>
29871         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
29872         min_profitable_iters doesn't go negative.
29874 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29875             Alan Hayward  <alan.hayward@arm.com>
29876             David Sherwood  <david.sherwood@arm.com>
29878         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
29879         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
29880         * optabs.def (vec_mask_load_lanes_optab): New optab.
29881         (vec_mask_store_lanes_optab): Likewise.
29882         * internal-fn.def (MASK_LOAD_LANES): New internal function.
29883         (MASK_STORE_LANES): Likewise.
29884         * internal-fn.c (mask_load_lanes_direct): New macro.
29885         (mask_store_lanes_direct): Likewise.
29886         (expand_mask_load_optab_fn): Handle masked operations.
29887         (expand_mask_load_lanes_optab_fn): New macro.
29888         (expand_mask_store_optab_fn): Handle masked operations.
29889         (expand_mask_store_lanes_optab_fn): New macro.
29890         (direct_mask_load_lanes_optab_supported_p): Likewise.
29891         (direct_mask_store_lanes_optab_supported_p): Likewise.
29892         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
29893         parameter.
29894         (vect_load_lanes_supported): Likewise.
29895         * tree-vect-data-refs.c (strip_conversion): New function.
29896         (can_group_stmts_p): Likewise.
29897         (vect_analyze_data_ref_accesses): Use it instead of checking
29898         for a pair of assignments.
29899         (vect_store_lanes_supported): Take a masked_p parameter.
29900         (vect_load_lanes_supported): Likewise.
29901         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
29902         vect_store_lanes_supported and vect_load_lanes_supported.
29903         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
29904         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
29905         parameter.  Don't allow gaps for masked accesses.
29906         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
29907         and vect_load_lanes_supported.
29908         (get_load_store_type): Take a masked_p parameter and update
29909         call to get_group_load_store_type.
29910         (vectorizable_store): Update call to get_load_store_type.
29911         Handle IFN_MASK_STORE_LANES.
29912         (vectorizable_load): Update call to get_load_store_type.
29913         Handle IFN_MASK_LOAD_LANES.
29915 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29916             Alan Hayward  <alan.hayward@arm.com>
29917             David Sherwood  <david.sherwood@arm.com>
29919         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
29920         modes for SVE.
29921         * config/aarch64/aarch64-protos.h
29922         (aarch64_sve_struct_memory_operand_p): Declare.
29923         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
29924         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
29925         (VPRED, vpred): Handle SVE structure modes.
29926         * config/aarch64/constraints.md (Utx): New constraint.
29927         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
29928         (aarch64_sve_struct_nonimmediate_operand): New predicates.
29929         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
29930         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
29931         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
29932         structure modes.  Split into pieces after RA.
29933         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
29934         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
29935         New patterns.
29936         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
29937         SVE structure modes.
29938         (aarch64_classify_address): Likewise.
29939         (sizetochar): Move earlier in file.
29940         (aarch64_print_operand): Handle SVE register lists.
29941         (aarch64_array_mode): New function.
29942         (aarch64_sve_struct_memory_operand_p): Likewise.
29943         (TARGET_ARRAY_MODE): Redefine.
29945 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29946             Alan Hayward  <alan.hayward@arm.com>
29947             David Sherwood  <david.sherwood@arm.com>
29949         * target.def (array_mode): New target hook.
29950         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
29951         * doc/tm.texi: Regenerate.
29952         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
29953         * hooks.c (hook_optmode_mode_uhwi_none): New function.
29954         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
29955         targetm.array_mode.
29956         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
29957         type sizes.
29959 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29960             Alan Hayward  <alan.hayward@arm.com>
29961             David Sherwood  <david.sherwood@arm.com>
29963         * fold-const.c (fold_binary_loc): Check the argument types
29964         rather than the result type when testing for a vector operation.
29966 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29968         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
29969         * doc/tm.texi: Regenerate.
29971 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
29972             Alan Hayward  <alan.hayward@arm.com>
29973             David Sherwood  <david.sherwood@arm.com>
29975         * doc/invoke.texi (-msve-vector-bits=): Document new option.
29976         (sve): Document new AArch64 extension.
29977         * doc/md.texi (w): Extend the description of the AArch64
29978         constraint to include SVE vectors.
29979         (Upl, Upa): Document new AArch64 predicate constraints.
29980         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
29981         enum.
29982         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
29983         (msve-vector-bits=): New option.
29984         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
29985         SVE when these are disabled.
29986         (sve): New extension.
29987         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
29988         modes.  Adjust their number of units based on aarch64_sve_vg.
29989         (MAX_BITSIZE_MODE_ANY_MODE): Define.
29990         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
29991         aarch64_addr_query_type.
29992         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
29993         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
29994         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
29995         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
29996         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
29997         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
29998         (aarch64_simd_imm_zero_p): Delete.
29999         (aarch64_check_zero_based_sve_index_immediate): Declare.
30000         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
30001         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
30002         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
30003         (aarch64_sve_float_mul_immediate_p): Likewise.
30004         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
30005         rather than an rtx.
30006         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
30007         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
30008         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
30009         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
30010         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
30011         (aarch64_regmode_natural_size): Likewise.
30012         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
30013         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
30014         left one place.
30015         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
30016         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
30017         for VG and the SVE predicate registers.
30018         (V_ALIASES): Add a "z"-prefixed alias.
30019         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
30020         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
30021         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
30022         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
30023         (REG_CLASS_NAMES): Add entries for them.
30024         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
30025         and the predicate registers.
30026         (aarch64_sve_vg): Declare.
30027         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
30028         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
30029         (REGMODE_NATURAL_SIZE): Define.
30030         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
30031         SVE macros.
30032         * config/aarch64/aarch64.c: Include cfgrtl.h.
30033         (simd_immediate_info): Add a constructor for series vectors,
30034         and an associated step field.
30035         (aarch64_sve_vg): New variable.
30036         (aarch64_dbx_register_number): Handle VG and the predicate registers.
30037         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
30038         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
30039         (VEC_ANY_DATA, VEC_STRUCT): New constants.
30040         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
30041         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
30042         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
30043         (aarch64_get_mask_mode): New functions.
30044         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
30045         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
30046         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
30047         predicate modes and predicate registers.  Explicitly restrict
30048         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
30049         to store a vector mode if it is recognized by
30050         aarch64_classify_vector_mode.
30051         (aarch64_regmode_natural_size): New function.
30052         (aarch64_hard_regno_caller_save_mode): Return the original mode
30053         for predicates.
30054         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
30055         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
30056         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
30057         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
30058         functions.
30059         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
30060         does not overlap dest if the function is frame-related.  Handle
30061         SVE constants.
30062         (aarch64_split_add_offset): New function.
30063         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
30064         them aarch64_add_offset.
30065         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
30066         and update call to aarch64_sub_sp.
30067         (aarch64_add_cfa_expression): New function.
30068         (aarch64_expand_prologue): Pass extra temporary registers to the
30069         functions above.  Handle the case in which we need to emit new
30070         DW_CFA_expressions for registers that were originally saved
30071         relative to the stack pointer, but now have to be expressed
30072         relative to the frame pointer.
30073         (aarch64_output_mi_thunk): Pass extra temporary registers to the
30074         functions above.
30075         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
30076         IP0 and IP1 values for SVE frames.
30077         (aarch64_expand_vec_series): New function.
30078         (aarch64_expand_sve_widened_duplicate): Likewise.
30079         (aarch64_expand_sve_const_vector): Likewise.
30080         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
30081         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
30082         into the register, rather than emitting a SET directly.
30083         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
30084         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
30085         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
30086         (offset_9bit_signed_scaled_p): New functions.
30087         (aarch64_replicate_bitmask_imm): New function.
30088         (aarch64_bitmask_imm): Use it.
30089         (aarch64_cannot_force_const_mem): Reject expressions involving
30090         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
30091         (aarch64_classify_index): Handle SVE indices, by requiring
30092         a plain register index with a scale that matches the element size.
30093         (aarch64_classify_address): Handle SVE addresses.  Assert that
30094         the mode of the address is VOIDmode or an integer mode.
30095         Update call to aarch64_classify_symbol.
30096         (aarch64_classify_symbolic_expression): Update call to
30097         aarch64_classify_symbol.
30098         (aarch64_const_vec_all_in_range_p): New function.
30099         (aarch64_print_vector_float_operand): Likewise.
30100         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
30101         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
30102         and the FP immediates 1.0 and 0.5.
30103         (aarch64_print_address_internal): Handle SVE addresses.
30104         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
30105         (aarch64_regno_regclass): Handle predicate registers.
30106         (aarch64_secondary_reload): Handle big-endian reloads of SVE
30107         data modes.
30108         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
30109         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
30110         (aarch64_convert_sve_vector_bits): New function.
30111         (aarch64_override_options): Use it to handle -msve-vector-bits=.
30112         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
30113         rather than an rtx.
30114         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
30115         Handle SVE vector and predicate modes.  Accept VL-based constants
30116         that need only one temporary register, and VL offsets that require
30117         no temporary registers.
30118         (aarch64_conditional_register_usage): Mark the predicate registers
30119         as fixed if SVE isn't available.
30120         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
30121         Return true for SVE vector and predicate modes.
30122         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
30123         rather than an unsigned int.  Handle SVE modes.
30124         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
30125         SVE modes.
30126         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
30127         if SVE is enabled.
30128         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
30129         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
30130         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
30131         (aarch64_sve_float_mul_immediate_p): New functions.
30132         (aarch64_sve_valid_immediate): New function.
30133         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
30134         Explicitly reject structure modes.  Check for INDEX constants.
30135         Handle PTRUE and PFALSE constants.
30136         (aarch64_check_zero_based_sve_index_immediate): New function.
30137         (aarch64_simd_imm_zero_p): Delete.
30138         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
30139         vector modes.  Accept constants in the range of CNT[BHWD].
30140         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
30141         ask for an Advanced SIMD mode.
30142         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
30143         (aarch64_simd_vector_alignment): Handle SVE predicates.
30144         (aarch64_vectorize_preferred_vector_alignment): New function.
30145         (aarch64_simd_vector_alignment_reachable): Use it instead of
30146         the vector size.
30147         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
30148         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
30149         functions.
30150         (MAX_VECT_LEN): Delete.
30151         (expand_vec_perm_d): Add a vec_flags field.
30152         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
30153         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
30154         (aarch64_evpc_ext): Don't apply a big-endian lane correction
30155         for SVE modes.
30156         (aarch64_evpc_rev): Rename to...
30157         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
30158         (aarch64_evpc_rev_global): New function.
30159         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
30160         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
30161         MAX_VECT_LEN.
30162         (aarch64_evpc_sve_tbl): New function.
30163         (aarch64_expand_vec_perm_const_1): Update after rename of
30164         aarch64_evpc_rev.  Handle SVE permutes too, trying
30165         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
30166         than aarch64_evpc_tbl.
30167         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
30168         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
30169         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
30170         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
30171         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
30172         (aarch64_expand_sve_vcond): New functions.
30173         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
30174         of aarch64_vector_mode_p.
30175         (aarch64_dwarf_poly_indeterminate_value): New function.
30176         (aarch64_compute_pressure_classes): Likewise.
30177         (aarch64_can_change_mode_class): Likewise.
30178         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
30179         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
30180         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
30181         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
30182         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
30183         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
30184         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
30185         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
30186         constraints.
30187         (Dn, Dl, Dr): Accept const as well as const_vector.
30188         (Dz): Likewise.  Compare against CONST0_RTX.
30189         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
30190         of "vector" where appropriate.
30191         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
30192         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
30193         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
30194         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
30195         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
30196         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
30197         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
30198         (v_int_equiv): Extend to SVE modes.
30199         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
30200         mode attributes.
30201         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
30202         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
30203         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
30204         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
30205         (SVE_COND_FP_CMP): New int iterators.
30206         (perm_hilo): Handle the new unpack unspecs.
30207         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
30208         attributes.
30209         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
30210         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
30211         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
30212         (aarch64_equality_operator, aarch64_constant_vector_operand)
30213         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
30214         (aarch64_sve_nonimmediate_operand): Likewise.
30215         (aarch64_sve_general_operand): Likewise.
30216         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
30217         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
30218         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
30219         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
30220         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
30221         (aarch64_sve_float_arith_immediate): Likewise.
30222         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
30223         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
30224         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
30225         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
30226         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
30227         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
30228         (aarch64_sve_float_arith_operand): Likewise.
30229         (aarch64_sve_float_arith_with_sub_operand): Likewise.
30230         (aarch64_sve_float_mul_operand): Likewise.
30231         (aarch64_sve_vec_perm_operand): Likewise.
30232         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
30233         (aarch64_mov_operand): Accept const_poly_int and const_vector.
30234         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
30235         as well as const_vector.
30236         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
30237         in file.  Use CONST0_RTX and CONSTM1_RTX.
30238         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
30239         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
30240         Use aarch64_simd_imm_zero.
30241         * config/aarch64/aarch64-sve.md: New file.
30242         * config/aarch64/aarch64.md: Include it.
30243         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
30244         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
30245         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
30246         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
30247         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
30248         (sve): New attribute.
30249         (enabled): Disable instructions with the sve attribute unless
30250         TARGET_SVE.
30251         (movqi, movhi): Pass CONST_POLY_INT operaneds through
30252         aarch64_expand_mov_immediate.
30253         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
30254         CNT[BHSD] immediates.
30255         (movti): Split CONST_POLY_INT moves into two halves.
30256         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
30257         Split additions that need a temporary here if the destination
30258         is the stack pointer.
30259         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
30260         (*add<mode>3_poly_1): New instruction.
30261         (set_clobber_cc): New expander.
30263 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30265         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
30266         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
30267         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
30268         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
30269         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
30270         Change innermode from fixed_mode_size to machine_mode.
30271         (simplify_subreg): Update call accordingly.  Handle a constant-sized
30272         subreg of a variable-length CONST_VECTOR.
30274 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
30275             Alan Hayward  <alan.hayward@arm.com>
30276             David Sherwood  <david.sherwood@arm.com>
30278         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
30279         (add_offset_to_base): New function, split out from...
30280         (create_mem_ref): ...here.  When handling a scale other than 1,
30281         check first whether the address is valid without the offset.
30282         Add it into the base if so, leaving the index and scale as-is.
30284 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
30286         PR c++/83778
30287         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
30288         fold_for_warn before checking if arg2 is INTEGER_CST.
30290 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
30292         * config/rs6000/predicates.md (load_multiple_operation): Delete.
30293         (store_multiple_operation): Delete.
30294         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
30295         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
30296         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
30297         guarded by TARGET_STRING.
30298         (rs6000_output_load_multiple): Delete.
30299         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
30300         OPTION_MASK_STRING / TARGET_STRING handling.
30301         (print_operand) <'N', 'O'>: Add comment that these are unused now.
30302         (const rs6000_opt_masks) <"string">: Change mask to 0.
30303         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
30304         (MASK_STRING): Delete.
30305         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
30306         parts.  Simplify.
30307         (load_multiple): Delete.
30308         (*ldmsi8): Delete.
30309         (*ldmsi7): Delete.
30310         (*ldmsi6): Delete.
30311         (*ldmsi5): Delete.
30312         (*ldmsi4): Delete.
30313         (*ldmsi3): Delete.
30314         (store_multiple): Delete.
30315         (*stmsi8): Delete.
30316         (*stmsi7): Delete.
30317         (*stmsi6): Delete.
30318         (*stmsi5): Delete.
30319         (*stmsi4): Delete.
30320         (*stmsi3): Delete.
30321         (movmemsi_8reg): Delete.
30322         (corresponding unnamed define_insn): Delete.
30323         (movmemsi_6reg): Delete.
30324         (corresponding unnamed define_insn): Delete.
30325         (movmemsi_4reg): Delete.
30326         (corresponding unnamed define_insn): Delete.
30327         (movmemsi_2reg): Delete.
30328         (corresponding unnamed define_insn): Delete.
30329         (movmemsi_1reg): Delete.
30330         (corresponding unnamed define_insn): Delete.
30331         * config/rs6000/rs6000.opt (mno-string): New.
30332         (mstring): Replace by deprecation warning stub.
30333         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
30335 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
30337         * regrename.c (regrename_do_replace): If replacing the same
30338         reg multiple times, try to reuse last created gen_raw_REG.
30340         PR debug/81155
30341         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
30342         main to workaround a bug in GDB.
30344 2018-01-12  Tom de Vries  <tom@codesourcery.com>
30346         PR target/83737
30347         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
30349 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
30351         PR rtl-optimization/80481
30352         * ira-color.c (get_cap_member): New function.
30353         (allocnos_conflict_by_live_ranges_p): Use it.
30354         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
30355         (setup_slot_coalesced_allocno_live_ranges): Ditto.
30357 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
30359         PR target/83628
30360         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
30361         (*saddl_se_1): Ditto.
30362         (*ssubsi_1): Ditto.
30363         (*ssubl_se_1): Ditto.
30365 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
30367         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
30368         rather than wi::to_widest for DR_INITs.
30369         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
30370         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
30371         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
30372         INTEGER_CSTs.
30373         (vect_analyze_group_access_1): Note that here.
30375 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
30377         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
30378         polynomial type sizes.
30380 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
30382         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
30383         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
30384         (gimple_add_tmp_var): Likewise.
30386 2018-01-12  Martin Liska  <mliska@suse.cz>
30388         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
30389         (gimple_alloc_sizes): Likewise.
30390         (dump_gimple_statistics): Use PRIu64 in printf format.
30391         * gimple.h: Change uint64_t to int.
30393 2018-01-12  Martin Liska  <mliska@suse.cz>
30395         * tree-core.h: Use uint64_t instead of int.
30396         * tree.c (tree_node_counts): Likewise.
30397         (tree_node_sizes): Likewise.
30398         (dump_tree_statistics): Use PRIu64 in printf format.
30400 2018-01-12  Martin Liska  <mliska@suse.cz>
30402         * Makefile.in: As qsort_chk is implemented in vec.c, add
30403         vec.o to linkage of gencfn-macros.
30404         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
30405         passing the info to record_node_allocation_statistics.
30406         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
30407         and pass the info.
30408         * ggc-common.c (struct ggc_usage): Add operator== and use
30409         it in operator< and compare function.
30410         * mem-stats.h (struct mem_usage): Likewise.
30411         * vec.c (struct vec_usage): Remove operator< and compare
30412         function. Can be simply inherited.
30414 2018-01-12  Martin Jambor  <mjambor@suse.cz>
30416         PR target/81616
30417         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
30418         * tree-ssa-math-opts.c: Include domwalk.h.
30419         (convert_mult_to_fma_1): New function.
30420         (fma_transformation_info): New type.
30421         (fma_deferring_state): Likewise.
30422         (cancel_fma_deferring): New function.
30423         (result_of_phi): Likewise.
30424         (last_fma_candidate_feeds_initial_phi): Likewise.
30425         (convert_mult_to_fma): Added deferring logic, split actual
30426         transformation to convert_mult_to_fma_1.
30427         (math_opts_dom_walker): New type.
30428         (math_opts_dom_walker::after_dom_children): New method, body moved
30429         here from pass_optimize_widening_mul::execute, added deferring logic
30430         bits.
30431         (pass_optimize_widening_mul::execute): Moved most of code to
30432         math_opts_dom_walker::after_dom_children.
30433         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
30434         * config/i386/i386.c (ix86_option_override_internal): Added
30435         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
30437 2018-01-12  Richard Biener  <rguenther@suse.de>
30439         PR debug/83157
30440         * dwarf2out.c (gen_variable_die): Do not reset old_die for
30441         inline instance vars.
30443 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
30445         PR target/81819
30446         * config/rx/rx.c (rx_is_restricted_memory_address):
30447         Handle SUBREG case.
30449 2018-01-12  Richard Biener  <rguenther@suse.de>
30451         PR tree-optimization/80846
30452         * target.def (split_reduction): New target hook.
30453         * targhooks.c (default_split_reduction): New function.
30454         * targhooks.h (default_split_reduction): Declare.
30455         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
30456         target requests first reduce vectors by combining low and high
30457         parts.
30458         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
30459         (get_vectype_for_scalar_type_and_size): Export.
30460         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
30461         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
30462         * doc/tm.texi: Regenerate.
30463         * config/i386/i386.c (ix86_split_reduction): Implement
30464         TARGET_VECTORIZE_SPLIT_REDUCTION.
30466 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
30468         PR target/83368
30469         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
30470         in PIC mode except for TARGET_VXWORKS_RTP.
30471         * config/sparc/sparc.c: Include cfgrtl.h.
30472         (TARGET_INIT_PIC_REG): Define.
30473         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
30474         (sparc_pic_register_p): New predicate.
30475         (sparc_legitimate_address_p): Use it.
30476         (sparc_legitimize_pic_address): Likewise.
30477         (sparc_delegitimize_address): Likewise.
30478         (sparc_mode_dependent_address_p): Likewise.
30479         (gen_load_pcrel_sym): Remove 4th parameter.
30480         (load_got_register): Adjust call to above.  Remove obsolete stuff.
30481         (sparc_expand_prologue): Do not call load_got_register here.
30482         (sparc_flat_expand_prologue): Likewise.
30483         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
30484         (sparc_use_pseudo_pic_reg): New function.
30485         (sparc_init_pic_reg): Likewise.
30486         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
30487         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
30489 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
30491         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
30492         Add item for branch_cost.
30494 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
30496         PR rtl-optimization/83565
30497         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
30498         not extend the result to a larger mode for rotate operations.
30499         (num_sign_bit_copies1): Likewise.
30501 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
30503         PR target/40411
30504         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
30505         -symbolic.
30506         Use values-Xc.o for -pedantic.
30507         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
30509 2018-01-12  Martin Liska  <mliska@suse.cz>
30511         PR ipa/83054
30512         * ipa-devirt.c (final_warning_record::grow_type_warnings):
30513         New function.
30514         (possible_polymorphic_call_targets): Use it.
30515         (ipa_devirt): Likewise.
30517 2018-01-12  Martin Liska  <mliska@suse.cz>
30519         * profile-count.h (enum profile_quality): Use 0 as invalid
30520         enum value of profile_quality.
30522 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
30524         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
30525         -mext-string options.
30527 2018-01-12  Richard Biener  <rguenther@suse.de>
30529         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
30530         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
30531         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
30532         Likewise.
30533         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
30535 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
30537         * configure.ac (--with-long-double-format): Add support for the
30538         configuration option to change the default long double format on
30539         PowerPC systems.
30540         * config.gcc (powerpc*-linux*-*): Likewise.
30541         * configure: Regenerate.
30542         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
30543         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
30544         used without modification.
30546 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30548         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
30549         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
30550         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
30551         MISC_BUILTIN_SPEC_BARRIER.
30552         (rs6000_init_builtins): Likewise.
30553         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
30554         enum value.
30555         (speculation_barrier): New define_insn.
30556         * doc/extend.texi: Document __builtin_speculation_barrier.
30558 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
30560         PR target/83203
30561         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
30562         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
30563         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
30564         iterators.
30565         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
30566         integral modes instead of "ss" and "sd".
30567         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
30568         vectors with 32-bit and 64-bit elements.
30569         (vecdupssescalarmodesuffix): New mode attribute.
30570         (vec_dup<mode>): Use it.
30572 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
30574         PR target/83330
30575         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
30576         frame if argument is passed on stack.
30578 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
30580         PR target/82682
30581         * ree.c (combine_reaching_defs): Optimize also
30582         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
30583         reg2=any_extend(exp); reg1=reg2;, formatting fix.
30585 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
30587         PR middle-end/83189
30588         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
30590 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
30592         PR middle-end/83718
30593         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
30594         after they are computed.
30596 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
30598         PR tree-optimization/83695
30599         * gimple-loop-linterchange.cc
30600         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
30601         reset cached scev information after interchange.
30602         (pass_linterchange::execute): Remove call to scev_reset_htab.
30604 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30606         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
30607         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
30608         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
30609         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
30610         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
30611         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
30612         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
30613         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
30614         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
30615         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
30616         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
30617         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
30618         (V_lane_reg): Likewise.
30619         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
30620         New define_expand.
30621         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
30622         (vfmal_lane_low<mode>_intrinsic,
30623         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
30624         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
30625         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
30626         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
30627         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
30628         vfmsl_lane_high<mode>_intrinsic): New define_insns.
30630 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30632         * config/arm/arm-cpus.in (fp16fml): New feature.
30633         (ALL_SIMD): Add fp16fml.
30634         (armv8.2-a): Add fp16fml as an option.
30635         (armv8.3-a): Likewise.
30636         (armv8.4-a): Add fp16fml as part of fp16.
30637         * config/arm/arm.h (TARGET_FP16FML): Define.
30638         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
30639         when appropriate.
30640         * config/arm/arm-modes.def (V2HF): Define.
30641         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
30642         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
30643         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
30644         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
30645         vfmsl_low, vfmsl_high): New set of builtins.
30646         * config/arm/iterators.md (PLUSMINUS): New code iterator.
30647         (vfml_op): New code attribute.
30648         (VFMLHALVES): New int iterator.
30649         (VFML, VFMLSEL): New mode attributes.
30650         (V_reg): Define mapping for V2HF.
30651         (V_hi, V_lo): New mode attributes.
30652         (VF_constraint): Likewise.
30653         (vfml_half, vfml_half_selector): New int attributes.
30654         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
30655         define_expand.
30656         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
30657         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
30658         New define_insn.
30659         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
30660         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
30661         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
30662         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
30663         documentation.
30664         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
30665         Document new effective target and option set.
30667 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
30669         * config/arm/arm-cpus.in (armv8_4): New feature.
30670         (ARMv8_4a): New fgroup.
30671         (armv8.4-a): New arch.
30672         * config/arm/arm-tables.opt: Regenerate.
30673         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
30674         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
30675         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
30676         Add matching rules for -march=armv8.4-a and extensions.
30677         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
30679 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
30681         PR target/81821
30682         * config/rx/rx.md (BW): New mode attribute.
30683         (sync_lock_test_and_setsi): Add mode suffix to insn output.
30685 2018-01-11  Richard Biener  <rguenther@suse.de>
30687         PR tree-optimization/83435
30688         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
30689         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
30690         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
30692 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
30693             Alan Hayward  <alan.hayward@arm.com>
30694             David Sherwood  <david.sherwood@arm.com>
30696         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
30697         field.
30698         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
30699         (aarch64_print_address_internal): Use it to check for a zero offset.
30701 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
30702             Alan Hayward  <alan.hayward@arm.com>
30703             David Sherwood  <david.sherwood@arm.com>
30705         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
30706         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
30707         Return a poly_int64 rather than a HOST_WIDE_INT.
30708         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
30709         rather than a HOST_WIDE_INT.
30710         * config/aarch64/aarch64.h (aarch64_frame): Protect with
30711         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
30712         hard_fp_offset, frame_size, initial_adjust, callee_offset and
30713         final_offset from HOST_WIDE_INT to poly_int64.
30714         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
30715         to_constant when getting the number of units in an Advanced SIMD
30716         mode.
30717         (aarch64_builtin_vectorized_function): Check for a constant number
30718         of units.
30719         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
30720         GET_MODE_SIZE.
30721         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
30722         attribute instead of GET_MODE_NUNITS.
30723         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
30724         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
30725         GET_MODE_SIZE for fixed-size registers.
30726         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
30727         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
30728         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
30729         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
30730         (aarch64_print_operand, aarch64_print_address_internal)
30731         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
30732         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
30733         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
30734         Handle polynomial GET_MODE_SIZE.
30735         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
30736         wider than SImode without modification.
30737         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
30738         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
30739         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
30740         passing and returning SVE modes.
30741         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
30742         rather than GEN_INT.
30743         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
30744         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
30745         (aarch64_allocate_and_probe_stack_space): Likewise.
30746         (aarch64_layout_frame): Cope with polynomial offsets.
30747         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
30748         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
30749         polynomial offsets.
30750         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
30751         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
30752         poly_int64 rather than a HOST_WIDE_INT.
30753         (aarch64_get_separate_components, aarch64_process_components)
30754         (aarch64_expand_prologue, aarch64_expand_epilogue)
30755         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
30756         (aarch64_anchor_offset): New function, split out from...
30757         (aarch64_legitimize_address): ...here.
30758         (aarch64_builtin_vectorization_cost): Handle polynomial
30759         TYPE_VECTOR_SUBPARTS.
30760         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
30761         GET_MODE_NUNITS.
30762         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
30763         number of elements from the PARALLEL rather than the mode.
30764         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
30765         rather than GET_MODE_BITSIZE.
30766         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
30767         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
30768         (aarch64_expand_vec_perm_const_1): Handle polynomial
30769         d->perm.length () and d->perm elements.
30770         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
30771         Apply to_constant to d->perm elements.
30772         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
30773         polynomial CONST_VECTOR_NUNITS.
30774         (aarch64_move_pointer): Take amount as a poly_int64 rather
30775         than an int.
30776         (aarch64_progress_pointer): Avoid temporary variable.
30777         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
30778         the mode attribute instead of GET_MODE.
30780 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
30781             Alan Hayward  <alan.hayward@arm.com>
30782             David Sherwood  <david.sherwood@arm.com>
30784         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
30785         x exists before using it.
30786         (aarch64_add_constant_internal): Rename to...
30787         (aarch64_add_offset_1): ...this.  Replace regnum with separate
30788         src and dest rtxes.  Handle the case in which they're different,
30789         including when the offset is zero.  Replace scratchreg with an rtx.
30790         Use 2 additions if there is no spare register into which we can
30791         move a 16-bit constant.
30792         (aarch64_add_constant): Delete.
30793         (aarch64_add_offset): Replace reg with separate src and dest
30794         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
30795         Use aarch64_add_offset_1.
30796         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
30797         an rtx rather than an int.  Take the delta as a poly_int64
30798         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
30799         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
30800         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
30801         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
30802         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
30803         and aarch64_add_sp.
30804         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
30805         aarch64_add_constant.
30807 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
30809         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
30810         Use scalar_float_mode.
30812 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
30814         * config/aarch64/aarch64-simd.md
30815         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
30816         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
30817         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
30818         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
30819         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
30820         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
30821         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
30822         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
30823         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
30824         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
30826 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
30828         PR target/83514
30829         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
30830         targ_options->x_arm_arch_string is non NULL.
30832 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
30834         * config/aarch64/aarch64.h
30835         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
30837 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
30839         PR target/82096
30840         * expmed.c (emit_store_flag_force): Swap if const op0
30841         and change VOIDmode to mode of op0.
30843 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
30845         PR rtl-optimization/83761
30846         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
30847         than bytes to mode_for_size.
30849 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
30851         PR middle-end/83189
30852         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
30853         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
30854         profile.
30856 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
30858         PR middle-end/83575
30859         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
30860         when in layout mode.
30861         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
30862         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
30863         partition fixup.
30865 2018-01-10  Michael Collison  <michael.collison@arm.com>
30867         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
30868         * config/aarch64/aarch64-option-extension.def: Add
30869         AARCH64_OPT_EXTENSION of 'fp16fml'.
30870         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30871         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
30872         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
30873         * config/aarch64/constraints.md (Ui7): New constraint.
30874         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
30875         (VFMLA_SEL_W): Ditto.
30876         (f16quad): Ditto.
30877         (f16mac1): Ditto.
30878         (VFMLA16_LOW): New int iterator.
30879         (VFMLA16_HIGH): Ditto.
30880         (UNSPEC_FMLAL): New unspec.
30881         (UNSPEC_FMLSL): Ditto.
30882         (UNSPEC_FMLAL2): Ditto.
30883         (UNSPEC_FMLSL2): Ditto.
30884         (f16mac): New code attribute.
30885         * config/aarch64/aarch64-simd-builtins.def
30886         (aarch64_fmlal_lowv2sf): Ditto.
30887         (aarch64_fmlsl_lowv2sf): Ditto.
30888         (aarch64_fmlalq_lowv4sf): Ditto.
30889         (aarch64_fmlslq_lowv4sf): Ditto.
30890         (aarch64_fmlal_highv2sf): Ditto.
30891         (aarch64_fmlsl_highv2sf): Ditto.
30892         (aarch64_fmlalq_highv4sf): Ditto.
30893         (aarch64_fmlslq_highv4sf): Ditto.
30894         (aarch64_fmlal_lane_lowv2sf): Ditto.
30895         (aarch64_fmlsl_lane_lowv2sf): Ditto.
30896         (aarch64_fmlal_laneq_lowv2sf): Ditto.
30897         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
30898         (aarch64_fmlalq_lane_lowv4sf): Ditto.
30899         (aarch64_fmlsl_lane_lowv4sf): Ditto.
30900         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
30901         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
30902         (aarch64_fmlal_lane_highv2sf): Ditto.
30903         (aarch64_fmlsl_lane_highv2sf): Ditto.
30904         (aarch64_fmlal_laneq_highv2sf): Ditto.
30905         (aarch64_fmlsl_laneq_highv2sf): Ditto.
30906         (aarch64_fmlalq_lane_highv4sf): Ditto.
30907         (aarch64_fmlsl_lane_highv4sf): Ditto.
30908         (aarch64_fmlalq_laneq_highv4sf): Ditto.
30909         (aarch64_fmlsl_laneq_highv4sf): Ditto.
30910         * config/aarch64/aarch64-simd.md:
30911         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
30912         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
30913         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
30914         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
30915         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
30916         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
30917         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
30918         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
30919         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
30920         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
30921         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
30922         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
30923         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
30924         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
30925         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
30926         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
30927         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
30928         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
30929         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
30930         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
30931         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
30932         (vfmlsl_low_u32): Ditto.
30933         (vfmlalq_low_u32): Ditto.
30934         (vfmlslq_low_u32): Ditto.
30935         (vfmlal_high_u32): Ditto.
30936         (vfmlsl_high_u32): Ditto.
30937         (vfmlalq_high_u32): Ditto.
30938         (vfmlslq_high_u32): Ditto.
30939         (vfmlal_lane_low_u32): Ditto.
30940         (vfmlsl_lane_low_u32): Ditto.
30941         (vfmlal_laneq_low_u32): Ditto.
30942         (vfmlsl_laneq_low_u32): Ditto.
30943         (vfmlalq_lane_low_u32): Ditto.
30944         (vfmlslq_lane_low_u32): Ditto.
30945         (vfmlalq_laneq_low_u32): Ditto.
30946         (vfmlslq_laneq_low_u32): Ditto.
30947         (vfmlal_lane_high_u32): Ditto.
30948         (vfmlsl_lane_high_u32): Ditto.
30949         (vfmlal_laneq_high_u32): Ditto.
30950         (vfmlsl_laneq_high_u32): Ditto.
30951         (vfmlalq_lane_high_u32): Ditto.
30952         (vfmlslq_lane_high_u32): Ditto.
30953         (vfmlalq_laneq_high_u32): Ditto.
30954         (vfmlslq_laneq_high_u32): Ditto.
30955         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
30956         (AARCH64_FL_FOR_ARCH8_4): New.
30957         (AARCH64_ISA_F16FML): New ISA flag.
30958         (TARGET_F16FML): New feature flag for fp16fml.
30959         (doc/invoke.texi): Document new fp16fml option.
30961 2018-01-10  Michael Collison  <michael.collison@arm.com>
30963         * config/aarch64/aarch64-builtins.c:
30964         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
30965         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
30966         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
30967         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
30968         (AARCH64_ISA_SHA3): New ISA flag.
30969         (TARGET_SHA3): New feature flag for sha3.
30970         * config/aarch64/iterators.md (sha512_op): New int attribute.
30971         (CRYPTO_SHA512): New int iterator.
30972         (UNSPEC_SHA512H): New unspec.
30973         (UNSPEC_SHA512H2): Ditto.
30974         (UNSPEC_SHA512SU0): Ditto.
30975         (UNSPEC_SHA512SU1): Ditto.
30976         * config/aarch64/aarch64-simd-builtins.def
30977         (aarch64_crypto_sha512hqv2di): New builtin.
30978         (aarch64_crypto_sha512h2qv2di): Ditto.
30979         (aarch64_crypto_sha512su0qv2di): Ditto.
30980         (aarch64_crypto_sha512su1qv2di): Ditto.
30981         (aarch64_eor3qv8hi): Ditto.
30982         (aarch64_rax1qv2di): Ditto.
30983         (aarch64_xarqv2di): Ditto.
30984         (aarch64_bcaxqv8hi): Ditto.
30985         * config/aarch64/aarch64-simd.md:
30986         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
30987         (aarch64_crypto_sha512su0qv2di): Ditto.
30988         (aarch64_crypto_sha512su1qv2di): Ditto.
30989         (aarch64_eor3qv8hi): Ditto.
30990         (aarch64_rax1qv2di): Ditto.
30991         (aarch64_xarqv2di): Ditto.
30992         (aarch64_bcaxqv8hi): Ditto.
30993         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
30994         (vsha512h2q_u64): Ditto.
30995         (vsha512su0q_u64): Ditto.
30996         (vsha512su1q_u64): Ditto.
30997         (veor3q_u16): Ditto.
30998         (vrax1q_u64): Ditto.
30999         (vxarq_u64): Ditto.
31000         (vbcaxq_u16): Ditto.
31001         * config/arm/types.md (crypto_sha512): New type attribute.
31002         (crypto_sha3): Ditto.
31003         (doc/invoke.texi): Document new sha3 option.
31005 2018-01-10  Michael Collison  <michael.collison@arm.com>
31007         * config/aarch64/aarch64-builtins.c:
31008         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
31009         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31010         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
31011         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
31012         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
31013         (AARCH64_ISA_SM4): New ISA flag.
31014         (TARGET_SM4): New feature flag for sm4.
31015         * config/aarch64/aarch64-simd-builtins.def
31016         (aarch64_sm3ss1qv4si): Ditto.
31017         (aarch64_sm3tt1aq4si): Ditto.
31018         (aarch64_sm3tt1bq4si): Ditto.
31019         (aarch64_sm3tt2aq4si): Ditto.
31020         (aarch64_sm3tt2bq4si): Ditto.
31021         (aarch64_sm3partw1qv4si): Ditto.
31022         (aarch64_sm3partw2qv4si): Ditto.
31023         (aarch64_sm4eqv4si): Ditto.
31024         (aarch64_sm4ekeyqv4si): Ditto.
31025         * config/aarch64/aarch64-simd.md:
31026         (aarch64_sm3ss1qv4si): Ditto.
31027         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
31028         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
31029         (aarch64_sm4eqv4si): Ditto.
31030         (aarch64_sm4ekeyqv4si): Ditto.
31031         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
31032         (sm3part_op): Ditto.
31033         (CRYPTO_SM3TT): Ditto.
31034         (CRYPTO_SM3PART): Ditto.
31035         (UNSPEC_SM3SS1): New unspec.
31036         (UNSPEC_SM3TT1A): Ditto.
31037         (UNSPEC_SM3TT1B): Ditto.
31038         (UNSPEC_SM3TT2A): Ditto.
31039         (UNSPEC_SM3TT2B): Ditto.
31040         (UNSPEC_SM3PARTW1): Ditto.
31041         (UNSPEC_SM3PARTW2): Ditto.
31042         (UNSPEC_SM4E): Ditto.
31043         (UNSPEC_SM4EKEY): Ditto.
31044         * config/aarch64/constraints.md (Ui2): New constraint.
31045         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
31046         * config/arm/types.md (crypto_sm3): New type attribute.
31047         (crypto_sm4): Ditto.
31048         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
31049         (vsm3tt1aq_u32): Ditto.
31050         (vsm3tt1bq_u32): Ditto.
31051         (vsm3tt2aq_u32): Ditto.
31052         (vsm3tt2bq_u32): Ditto.
31053         (vsm3partw1q_u32): Ditto.
31054         (vsm3partw2q_u32): Ditto.
31055         (vsm4eq_u32): Ditto.
31056         (vsm4ekeyq_u32): Ditto.
31057         (doc/invoke.texi): Document new sm4 option.
31059 2018-01-10  Michael Collison  <michael.collison@arm.com>
31061         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
31062         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
31063         (AARCH64_FL_FOR_ARCH8_4): New.
31064         (AARCH64_FL_V8_4): New flag.
31065         (doc/invoke.texi): Document new armv8.4-a option.
31067 2018-01-10  Michael Collison  <michael.collison@arm.com>
31069         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
31070         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
31071         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
31072         * config/aarch64/aarch64-option-extension.def: Add
31073         AARCH64_OPT_EXTENSION of 'sha2'.
31074         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
31075         (crypto): Disable sha2 and aes if crypto disabled.
31076         (crypto): Enable aes and sha2 if enabled.
31077         (simd): Disable sha2 and aes if simd disabled.
31078         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
31079         New flags.
31080         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
31081         (TARGET_SHA2): New feature flag for sha2.
31082         (TARGET_AES): New feature flag for aes.
31083         * config/aarch64/aarch64-simd.md:
31084         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
31085         conditional on TARGET_AES.
31086         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
31087         (aarch64_crypto_sha1hsi): Make pattern conditional
31088         on TARGET_SHA2.
31089         (aarch64_crypto_sha1hv4si): Ditto.
31090         (aarch64_be_crypto_sha1hv4si): Ditto.
31091         (aarch64_crypto_sha1su1v4si): Ditto.
31092         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
31093         (aarch64_crypto_sha1su0v4si): Ditto.
31094         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
31095         (aarch64_crypto_sha256su0v4si): Ditto.
31096         (aarch64_crypto_sha256su1v4si): Ditto.
31097         (doc/invoke.texi): Document new aes and sha2 options.
31099 2018-01-10  Martin Sebor  <msebor@redhat.com>
31101         PR tree-optimization/83781
31102         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
31103         as string arrays.
31105 2018-01-11  Martin Sebor  <msebor@gmail.com>
31106             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
31108         PR tree-optimization/83501
31109         PR tree-optimization/81703
31111         * tree-ssa-strlen.c (get_string_cst): Rename...
31112         (get_string_len): ...to this.  Handle global constants.
31113         (handle_char_store): Adjust.
31115 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
31116             Jim Wilson  <jimw@sifive.com>
31118         * config/riscv/riscv-protos.h (riscv_output_return): New.
31119         * config/riscv/riscv.c (struct machine_function): New naked_p field.
31120         (riscv_attribute_table, riscv_output_return),
31121         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
31122         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
31123         (riscv_compute_frame_info): Only compute frame->mask if not a naked
31124         function.
31125         (riscv_expand_prologue): Add early return for naked function.
31126         (riscv_expand_epilogue): Likewise.
31127         (riscv_function_ok_for_sibcall): Return false for naked function.
31128         (riscv_set_current_function): New.
31129         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
31130         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
31131         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
31132         * doc/extend.texi (RISC-V Function Attributes): New.
31134 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
31136         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
31137         check for 128-bit long double before checking TCmode.
31138         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
31139         128-bit long doubles before checking TFmode or TCmode.
31140         (FLOAT128_IBM_P): Likewise.
31142 2018-01-10  Martin Sebor  <msebor@redhat.com>
31144         PR tree-optimization/83671
31145         * builtins.c (c_strlen): Unconditionally return zero for the empty
31146         string.
31147         Use -Warray-bounds for warnings.
31148         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
31149         for non-constant array indices with COMPONENT_REF, arrays of
31150         arrays, and pointers to arrays.
31151         (gimple_fold_builtin_strlen): Determine and set length range for
31152         non-constant character arrays.
31154 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
31156         PR middle-end/81897
31157         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
31158         empty blocks.
31160 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
31162         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
31164 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
31166         PR target/83399
31167         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
31168         VECTOR_MEM_ALTIVEC_OR_VSX_P.
31169         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
31170         indexed_or_indirect_operand predicate.
31171         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
31172         (*vsx_le_perm_load_v8hi): Likewise.
31173         (*vsx_le_perm_load_v16qi): Likewise.
31174         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
31175         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
31176         (*vsx_le_perm_store_v8hi): Likewise.
31177         (*vsx_le_perm_store_v16qi): Likewise.
31178         (eight unnamed splitters): Likewise.
31180 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
31182         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
31183         * config/rs6000/emmintrin.h: Likewise.
31184         * config/rs6000/mmintrin.h: Likewise.
31185         * config/rs6000/xmmintrin.h: Likewise.
31187 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
31189         PR c++/43486
31190         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
31191         "public_flag".
31192         * tree.c (tree_nop_conversion): Return true for location wrapper
31193         nodes.
31194         (maybe_wrap_with_location): New function.
31195         (selftest::check_strip_nops): New function.
31196         (selftest::test_location_wrappers): New function.
31197         (selftest::tree_c_tests): Call it.
31198         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
31199         (maybe_wrap_with_location): New decl.
31200         (EXPR_LOCATION_WRAPPER_P): New macro.
31201         (location_wrapper_p): New inline function.
31202         (tree_strip_any_location_wrapper): New inline function.
31204 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
31206         PR target/83735
31207         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
31208         stack_realign_offset for the largest alignment of stack slot
31209         actually used.
31210         (ix86_find_max_used_stack_alignment): New function.
31211         (ix86_finalize_stack_frame_flags): Use it.  Set
31212         max_used_stack_alignment if we don't realign stack.
31213         * config/i386/i386.h (machine_function): Add
31214         max_used_stack_alignment.
31216 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
31218         * config/arm/arm.opt (-mbranch-cost): New option.
31219         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
31220         account.
31222 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
31224         PR target/83629
31225         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
31226         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
31228 2018-01-10  Richard Biener  <rguenther@suse.de>
31230         PR debug/83765
31231         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
31232         early out so it also covers the case where we have a non-NULL
31233         origin.
31235 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
31237         PR tree-optimization/83753
31238         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
31239         for non-strided grouped accesses if the number of elements is 1.
31241 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
31243         PR target/81616
31244         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
31245         * i386.h (TARGET_USE_GATHER): Define.
31246         * x86-tune.def (X86_TUNE_USE_GATHER): New.
31248 2018-01-10  Martin Liska  <mliska@suse.cz>
31250         PR bootstrap/82831
31251         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
31252         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
31253         partitioning.
31254         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
31255         CLEANUP_NO_PARTITIONING is not set.
31257 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
31259         * doc/rtl.texi: Remove documentation of (const ...) wrappers
31260         for vectors, as a partial revert of r254296.
31261         * rtl.h (const_vec_p): Delete.
31262         (const_vec_duplicate_p): Don't test for vector CONSTs.
31263         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
31264         * expmed.c (make_tree): Likewise.
31266         Revert:
31267         * common.md (E, F): Use CONSTANT_P instead of checking for
31268         CONST_VECTOR.
31269         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
31270         checking for CONST_VECTOR.
31272 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
31274         PR middle-end/83575
31275         * predict.c (force_edge_cold): Handle in more sane way edges
31276         with no prediction.
31278 2018-01-09  Carl Love  <cel@us.ibm.com>
31280         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
31281         V4SI, V4SF types.
31282         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
31283         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
31284         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
31285         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
31286         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
31287         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
31288         * config/rs6000/rs6000-protos.h: Add extern defition for
31289         rs6000_generate_float2_double_code.
31290         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
31291         function.
31292         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
31293         (float2_v2df): Add define_expand.
31295 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
31297         PR target/83628
31298         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
31299         op_mode in the force_to_mode call.
31301 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
31303         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
31304         instead of checking each element individually.
31305         (aarch64_evpc_uzp): Likewise.
31306         (aarch64_evpc_zip): Likewise.
31307         (aarch64_evpc_ext): Likewise.
31308         (aarch64_evpc_rev): Likewise.
31309         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
31310         instead of checking each element individually.  Return true without
31311         generating rtl if
31312         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
31313         whether all selected elements come from the same input, instead of
31314         checking each element individually.  Remove calls to gen_rtx_REG,
31315         start_sequence and end_sequence and instead assert that no rtl is
31316         generated.
31318 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
31320         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
31321         order of HIGH and CONST checks.
31323 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
31325         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
31326         if the destination isn't an SSA_NAME.
31328 2018-01-09  Richard Biener  <rguenther@suse.de>
31330         PR tree-optimization/83668
31331         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
31332         move prologue...
31333         (canonicalize_loop_form): ... here, renamed from ...
31334         (canonicalize_loop_closed_ssa_form): ... this and amended to
31335         swap successor edges for loop exit blocks to make us use
31336         the RPO order we need for initial schedule generation.
31338 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
31340         PR tree-optimization/64811
31341         * match.pd: When optimizing comparisons with Inf, avoid
31342         introducing or losing exceptions from comparisons with NaN.
31344 2018-01-09  Martin Liska  <mliska@suse.cz>
31346         PR sanitizer/82517
31347         * asan.c (shadow_mem_size): Add gcc_assert.
31349 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
31351         Don't save registers in main().
31353         PR target/83738
31354         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
31355         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
31356         * config/avr/avr.c (avr_set_current_function): Don't error if
31357         naked, OS_task or OS_main are specified at the same time.
31358         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
31359         OS_main.
31360         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
31361         attribute.
31362         * common/config/avr/avr-common.c (avr_option_optimization_table):
31363         Switch on -mmain-is-OS_task for optimizing compilations.
31365 2018-01-09  Richard Biener  <rguenther@suse.de>
31367         PR tree-optimization/83572
31368         * graphite.c: Include cfganal.h.
31369         (graphite_transform_loops): Connect infinite loops to exit
31370         and remove fake edges at the end.
31372 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
31374         * ipa-inline.c (edge_badness): Revert accidental checkin.
31376 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
31378         PR ipa/80763
31379         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
31380         symbols; not inline clones.
31382 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
31384         PR target/83507
31385         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
31386         hard registers.  Formatting fixes.
31388         PR preprocessor/83722
31389         * gcc.c (try_generate_repro): Pass
31390         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
31391         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
31392         do_report_bug.
31394 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
31395             Kito Cheng  <kito.cheng@gmail.com>
31397         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
31398         (riscv_leaf_function_p): Delete.
31399         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
31401 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
31403         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
31404         function.
31405         (do_ifelse): New function.
31406         (do_isel): New function.
31407         (do_sub3): New function.
31408         (do_add3): New function.
31409         (do_load_mask_compare): New function.
31410         (do_overlap_load_compare): New function.
31411         (expand_compare_loop): New function.
31412         (expand_block_compare): Call expand_compare_loop() when appropriate.
31413         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
31414         option description.
31415         (-mblock-compare-inline-loop-limit): New option.
31417 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31419         PR target/83677
31420         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
31421         Reverse order of second and third operands in first alternative.
31422         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
31423         of first and second elements in UNSPEC_VPERMR vector.
31424         (altivec_expand_vec_perm_le): Likewise.
31426 2018-01-08  Jeff Law  <law@redhat.com>
31428         PR rtl-optimizatin/81308
31429         * tree-switch-conversion.c (cfg_altered): New file scoped static.
31430         (process_switch): If group_case_labels makes a change, then set
31431         cfg_altered.
31432         (pass_convert_switch::execute): If a switch is converted, then
31433         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
31435         PR rtl-optimization/81308
31436         * recog.c (split_all_insns): Conditionally cleanup the CFG after
31437         splitting insns.
31439 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
31441         PR target/83663 - Revert r255946
31442         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
31443         generation for cases where splatting a value is not useful.
31444         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
31445         across a vec_duplicate and a paradoxical subreg forming a vector
31446         mode to a vec_concat.
31448 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
31450         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
31451         -march=armv8.3-a variants.
31452         * config/arm/t-multilib: Likewise.
31453         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
31455 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
31457         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
31458         to generate rtl.
31459         (cceq_ior_compare_complement): Give it a name so I can use it, and
31460         change boolean_or_operator predicate to boolean_operator so it can
31461         be used to generate a crand.
31462         (eqne): New code iterator.
31463         (bd/bd_neg): New code_attrs.
31464         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
31465         a single define_insn.
31466         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
31467         decrement (bdnzt/bdnzf/bdzt/bdzf).
31468         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
31469         with the new names of the branch decrement patterns, and added the
31470         names of the branch decrement conditional patterns.
31472 2018-01-08  Richard Biener  <rguenther@suse.de>
31474         PR tree-optimization/83563
31475         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
31476         cache.
31478 2018-01-08  Richard Biener  <rguenther@suse.de>
31480         PR middle-end/83713
31481         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
31483 2018-01-08  Richard Biener  <rguenther@suse.de>
31485         PR tree-optimization/83685
31486         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
31487         references to abnormals.
31489 2018-01-08  Richard Biener  <rguenther@suse.de>
31491         PR lto/83719
31492         * dwarf2out.c (output_indirect_strings): Handle empty
31493         skeleton_debug_str_hash.
31494         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
31496 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
31498         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
31499         (emit_store_direct): Likewise.
31500         (arc_trampoline_adjust_address): Likewise.
31501         (arc_asm_trampoline_template): New function.
31502         (arc_initialize_trampoline): Use asm_trampoline_template.
31503         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
31504         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
31505         * config/arc/arc.md (flush_icache): Delete pattern.
31507 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
31509         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
31510         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
31511         munaligned-access.
31513 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
31515         PR target/83681
31516         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
31517         by not USED_FOR_TARGET.
31518         (make_pass_resolve_sw_modes): Likewise.
31520 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
31522         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
31523         USED_FOR_TARGET.
31525 2018-01-08  Richard Biener  <rguenther@suse.de>
31527         PR middle-end/83580
31528         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
31530 2018-01-08  Richard Biener  <rguenther@suse.de>
31532         PR middle-end/83517
31533         * match.pd ((t * 2) / 2) -> t): Add missing :c.
31535 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
31537         PR middle-end/81897
31538         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
31539         basic blocks with a small number of successors.
31540         (convert_control_dep_chain_into_preds): Improve handling of
31541         forwarder blocks.
31542         (dump_predicates): Split apart into...
31543         (dump_pred_chain): ...here...
31544         (dump_pred_info): ...and here.
31545         (can_one_predicate_be_invalidated_p): Add debugging printfs.
31546         (can_chain_union_be_invalidated_p): Improve check for invalidation
31547         of paths.
31548         (uninit_uses_cannot_happen): Avoid unnecessary if
31549         convert_control_dep_chain_into_preds yielded nothing.
31551 2018-01-06  Martin Sebor  <msebor@redhat.com>
31553         PR tree-optimization/83640
31554         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
31555         subtracting negative offset from size.
31556         (builtin_access::overlap): Adjust offset bounds of the access to fall
31557         within the size of the object if possible.
31559 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
31561         PR rtl-optimization/83699
31562         * expmed.c (extract_bit_field_1): Restrict the vector usage of
31563         extract_bit_field_as_subreg to cases in which the extracted
31564         value is also a vector.
31566         * lra-constraints.c (process_alt_operands): Test for the equivalence
31567         substitutions when detecting a possible reload cycle.
31569 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
31571         PR debug/83480
31572         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
31573         by default if flag_selective_schedling{,2}.  Formatting fixes.
31575         PR rtl-optimization/83682
31576         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
31577         if it has non-VECTOR_MODE element mode.
31578         (vec_duplicate_p): Likewise.
31580         PR middle-end/83694
31581         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
31582         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
31584 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
31586         PR target/83604
31587         * config/i386/i386-builtin.def
31588         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
31589         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
31590         Require also OPTION_MASK_ISA_AVX512F in addition to
31591         OPTION_MASK_ISA_GFNI.
31592         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
31593         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
31594         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
31595         to OPTION_MASK_ISA_GFNI.
31596         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
31597         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
31598         OPTION_MASK_ISA_AVX512BW.
31599         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
31600         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
31601         addition to OPTION_MASK_ISA_GFNI.
31602         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
31603         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
31604         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
31605         to OPTION_MASK_ISA_GFNI.
31606         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
31607         a requirement for all ISAs rather than any of them with a few
31608         exceptions.
31609         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
31610         processing.
31611         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
31612         bitmasks to be enabled with 3 exceptions, instead of requiring any
31613         enabled ISA with lots of exceptions.
31614         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
31615         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
31616         Change avx512bw in isa attribute to avx512f.
31617         * config/i386/sgxintrin.h: Add license boilerplate.
31618         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
31619         to __AVX512F__ and __AVX512VL to __AVX512VL__.
31620         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
31621         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
31622         defined.
31623         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
31624         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
31625         temporarily sse2 rather than sse if not enabled already.
31627         PR target/83604
31628         * config/i386/sse.md (VI248_VLBW): Rename to ...
31629         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
31630         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
31631         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
31632         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
31633         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
31634         mode iterator instead of VI248_VLBW.
31636 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
31638         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
31639         (record_modified): Skip clobbers; add debug output.
31640         (param_change_prob): Use sreal frequencies.
31642 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
31644         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
31645         punt for user-aligned variables.
31647 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
31649         * tree-chrec.c (chrec_contains_symbols): Return true for
31650         POLY_INT_CST.
31652 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
31654         PR target/82439
31655         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
31656         of (x|y) == x for BICS pattern.
31658 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
31660         PR tree-optimization/83605
31661         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
31662         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
31663         can throw.
31665 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
31667         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
31668         * config/epiphany/rtems.h: New file.
31670 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
31671             Uros Bizjak  <ubizjak@gmail.com>
31673         PR target/83554
31674         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
31675         QIreg_operand instead of register_operand predicate.
31676         * config/i386/i386.c (ix86_rop_should_change_byte_p,
31677         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
31678         comments instead of -fmitigate[-_]rop.
31680 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
31682         PR bootstrap/81926
31683         * cgraphunit.c (symbol_table::compile): Switch to text_section
31684         before calling assembly_start debug hook.
31685         * run-rtl-passes.c (run_rtl_passes): Likewise.
31686         Include output.h.
31688 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
31690         * tree-vrp.c (extract_range_from_binary_expr_1): Check
31691         range_int_cst_p rather than !symbolic_range_p before calling
31692         extract_range_from_multiplicative_op_1.
31694 2018-01-04  Jeff Law  <law@redhat.com>
31696         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
31697         redundant test in assertion.
31699 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
31701         * doc/rtl.texi: Document machine_mode wrapper classes.
31703 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
31705         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
31706         using tree_to_uhwi.
31708 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
31710         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
31711         the VEC_PERM_EXPR fold to fail.
31713 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
31715         PR debug/83585
31716         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
31717         to switched_sections.
31719 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
31721         PR target/83680
31722         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
31723         test for d.testing.
31725 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
31727         PR target/83387
31728         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
31729         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
31731 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
31733         PR debug/83666
31734         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
31735         is BLKmode and bitpos not zero or mode change is needed.
31737 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
31739         PR target/83675
31740         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
31741         TARGET_VIS2.
31743 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
31745         PR target/83628
31746         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
31747         instead of MULT rtx.  Update all corresponding splitters.
31748         (*saddl_se): Ditto.
31749         (*ssub<modesuffix>): Ditto.
31750         (*ssubl_se): Ditto.
31751         (*cmp_sadd_di): Update split patterns.
31752         (*cmp_sadd_si): Ditto.
31753         (*cmp_sadd_sidi): Ditto.
31754         (*cmp_ssub_di): Ditto.
31755         (*cmp_ssub_si): Ditto.
31756         (*cmp_ssub_sidi): Ditto.
31757         * config/alpha/predicates.md (const23_operand): New predicate.
31758         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
31759         Look for ASHIFT, not MULT inner operand.
31760         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
31762 2018-01-04  Martin Liska  <mliska@suse.cz>
31764         PR gcov-profile/83669
31765         * gcov.c (output_intermediate_file): Add version to intermediate
31766         gcov file.
31767         * doc/gcov.texi: Document new field 'version' in intermediate
31768         file format. Fix location of '-k' option of gcov command.
31770 2018-01-04  Martin Liska  <mliska@suse.cz>
31772         PR ipa/82352
31773         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
31775 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
31777         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
31779 2018-01-03  Martin Sebor  <msebor@redhat.com>
31781         PR tree-optimization/83655
31782         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
31783         checking calls with invalid arguments.
31785 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31787         * tree-vect-stmts.c (vect_get_store_rhs): New function.
31788         (vectorizable_mask_load_store): Delete.
31789         (vectorizable_call): Return false for masked loads and stores.
31790         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
31791         instead of gimple_assign_rhs1.
31792         (vectorizable_load): Handle IFN_MASK_LOAD.
31793         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
31795 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31797         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
31798         split out from..,
31799         (vectorizable_mask_load_store): ...here.
31800         (vectorizable_load): ...and here.
31802 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31804         * tree-vect-stmts.c (vect_build_all_ones_mask)
31805         (vect_build_zero_merge_argument): New functions, split out from...
31806         (vectorizable_load): ...here.
31808 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31810         * tree-vect-stmts.c (vect_check_store_rhs): New function,
31811         split out from...
31812         (vectorizable_mask_load_store): ...here.
31813         (vectorizable_store): ...and here.
31815 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31817         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
31818         split out from...
31819         (vectorizable_mask_load_store): ...here.
31821 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31823         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
31824         (vect_model_store_cost): Take a vec_load_store_type instead of a
31825         vect_def_type.
31826         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
31827         (vect_model_store_cost): Take a vec_load_store_type instead of a
31828         vect_def_type.
31829         (vectorizable_mask_load_store): Update accordingly.
31830         (vectorizable_store): Likewise.
31831         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
31833 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31835         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
31836         IFN_MASK_LOAD calls here rather than...
31837         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
31839 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31840             Alan Hayward  <alan.hayward@arm.com>
31841             David Sherwood  <david.sherwood@arm.com>
31843         * expmed.c (extract_bit_field_1): For vector extracts,
31844         fall back to extract_bit_field_as_subreg if vec_extract
31845         isn't available.
31847 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31848             Alan Hayward  <alan.hayward@arm.com>
31849             David Sherwood  <david.sherwood@arm.com>
31851         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
31852         they are variable or constant sized.
31853         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
31854         slots for constant-sized data.
31856 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31857             Alan Hayward  <alan.hayward@arm.com>
31858             David Sherwood  <david.sherwood@arm.com>
31860         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
31861         handling COND_EXPRs with boolean comparisons, try to find a better
31862         basis for the mask type than the boolean itself.
31864 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31866         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
31867         is calculated and how it can be overridden.
31868         * genmodes.c (max_bitsize_mode_any_mode): New variable.
31869         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
31870         if defined.
31871         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
31872         if nonzero.
31874 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31875             Alan Hayward  <alan.hayward@arm.com>
31876             David Sherwood  <david.sherwood@arm.com>
31878         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
31879         Remove the mode argument.
31880         (aarch64_simd_valid_immediate): Remove the mode and inverse
31881         arguments.
31882         * config/aarch64/iterators.md (bitsize): New iterator.
31883         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
31884         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
31885         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
31886         aarch64_simd_valid_immediate.
31887         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
31888         (aarch64_reg_or_bic_imm): Likewise.
31889         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
31890         with an insn_type enum and msl with a modifier_type enum.
31891         Replace element_width with a scalar_mode.  Change the shift
31892         to unsigned int.  Add constructors for scalar_float_mode and
31893         scalar_int_mode elements.
31894         (aarch64_vect_float_const_representable_p): Delete.
31895         (aarch64_can_const_movi_rtx_p)
31896         (aarch64_simd_scalar_immediate_valid_for_move)
31897         (aarch64_simd_make_constant): Update call to
31898         aarch64_simd_valid_immediate.
31899         (aarch64_advsimd_valid_immediate_hs): New function.
31900         (aarch64_advsimd_valid_immediate): Likewise.
31901         (aarch64_simd_valid_immediate): Remove mode and inverse
31902         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
31903         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
31904         and aarch64_float_const_representable_p on the result.
31905         (aarch64_output_simd_mov_immediate): Remove mode argument.
31906         Update call to aarch64_simd_valid_immediate and use of
31907         simd_immediate_info.
31908         (aarch64_output_scalar_simd_mov_immediate): Update call
31909         accordingly.
31911 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31912             Alan Hayward  <alan.hayward@arm.com>
31913             David Sherwood  <david.sherwood@arm.com>
31915         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
31916         (mode_nunits): Likewise CONST_MODE_NUNITS.
31917         * machmode.def (ADJUST_NUNITS): Document.
31918         * genmodes.c (mode_data::need_nunits_adj): New field.
31919         (blank_mode): Update accordingly.
31920         (adj_nunits): New variable.
31921         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
31922         parameter.
31923         (emit_mode_size_inline): Set need_bytesize_adj for all modes
31924         listed in adj_nunits.
31925         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
31926         listed in adj_nunits.  Don't emit case statements for such modes.
31927         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
31928         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
31929         nothing if adj_nunits is nonnull.
31930         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
31931         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
31932         (emit_mode_fbit): Update use of print_maybe_const_decl.
31933         (emit_move_size): Likewise.  Treat the array as non-const
31934         if adj_nunits.
31935         (emit_mode_adjustments): Handle adj_nunits.
31937 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31939         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
31940         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
31941         (VECTOR_MODES): Use it.
31942         (make_vector_modes): Take the prefix as an argument.
31944 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31945             Alan Hayward  <alan.hayward@arm.com>
31946             David Sherwood  <david.sherwood@arm.com>
31948         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
31949         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
31950         for MODE_VECTOR_BOOL.
31951         * machmode.def (VECTOR_BOOL_MODE): Document.
31952         * genmodes.c (VECTOR_BOOL_MODE): New macro.
31953         (make_vector_bool_mode): New function.
31954         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
31955         MODE_VECTOR_BOOL.
31956         * lto-streamer-in.c (lto_input_mode_table): Likewise.
31957         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
31958         Likewise.
31959         * stor-layout.c (int_mode_for_mode): Likewise.
31960         * tree.c (build_vector_type_for_mode): Likewise.
31961         * varasm.c (output_constant_pool_2): Likewise.
31962         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
31963         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
31964         for MODE_VECTOR_BOOL.
31965         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
31966         of mode class checks.
31967         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
31968         instead of a list of mode class checks.
31969         (expand_vector_scalar_condition): Likewise.
31970         (type_for_widest_vector_mode): Handle BImode as an inner mode.
31972 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31973             Alan Hayward  <alan.hayward@arm.com>
31974             David Sherwood  <david.sherwood@arm.com>
31976         * machmode.h (mode_size): Change from unsigned short to
31977         poly_uint16_pod.
31978         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
31979         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
31980         or if measurement_type is not polynomial.
31981         (fixed_size_mode::includes_p): Check for constant-sized modes.
31982         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
31983         return a poly_uint16 rather than an unsigned short.
31984         (emit_mode_size): Change the type of mode_size from unsigned short
31985         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
31986         (emit_mode_adjustments): Cope with polynomial vector sizes.
31987         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
31988         for GET_MODE_SIZE.
31989         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
31990         for GET_MODE_SIZE.
31991         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
31992         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
31993         * caller-save.c (setup_save_areas): Likewise.
31994         (replace_reg_with_saved_mem): Likewise.
31995         * calls.c (emit_library_call_value_1): Likewise.
31996         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
31997         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
31998         (gen_lowpart_for_combine): Likewise.
31999         * convert.c (convert_to_integer_1): Likewise.
32000         * cse.c (equiv_constant, cse_insn): Likewise.
32001         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
32002         (cselib_subst_to_values): Likewise.
32003         * dce.c (word_dce_process_block): Likewise.
32004         * df-problems.c (df_word_lr_mark_ref): Likewise.
32005         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
32006         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
32007         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
32008         (rtl_for_decl_location): Likewise.
32009         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
32010         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
32011         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
32012         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
32013         (expand_expr_real_1): Likewise.
32014         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
32015         (pad_below): Likewise.
32016         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
32017         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
32018         * ira.c (get_subreg_tracking_sizes): Likewise.
32019         * ira-build.c (ira_create_allocno_objects): Likewise.
32020         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
32021         (ira_sort_regnos_for_alter_reg): Likewise.
32022         * ira-costs.c (record_operand_costs): Likewise.
32023         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
32024         (resolve_simple_move): Likewise.
32025         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
32026         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
32027         (lra_constraints): Likewise.
32028         (CONST_POOL_OK_P): Reject variable-sized modes.
32029         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
32030         (add_pseudo_to_slot, lra_spill): Likewise.
32031         * omp-low.c (omp_clause_aligned_alignment): Likewise.
32032         * optabs-query.c (get_best_extraction_insn): Likewise.
32033         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
32034         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
32035         (expand_mult_highpart, valid_multiword_target_p): Likewise.
32036         * recog.c (offsettable_address_addr_space_p): Likewise.
32037         * regcprop.c (maybe_mode_change): Likewise.
32038         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
32039         * regrename.c (build_def_use): Likewise.
32040         * regstat.c (dump_reg_info): Likewise.
32041         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
32042         (find_reloads, find_reloads_subreg_address): Likewise.
32043         * reload1.c (eliminate_regs_1): Likewise.
32044         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
32045         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
32046         (simplify_binary_operation_1, simplify_subreg): Likewise.
32047         * targhooks.c (default_function_arg_padding): Likewise.
32048         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
32049         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
32050         (verify_gimple_assign_ternary): Likewise.
32051         * tree-inline.c (estimate_move_cost): Likewise.
32052         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32053         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
32054         (get_address_cost_ainc): Likewise.
32055         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
32056         (vect_supportable_dr_alignment): Likewise.
32057         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
32058         (vectorizable_reduction): Likewise.
32059         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
32060         (vectorizable_operation, vectorizable_load): Likewise.
32061         * tree.c (build_same_sized_truth_vector_type): Likewise.
32062         * valtrack.c (cleanup_auto_inc_dec): Likewise.
32063         * var-tracking.c (emit_note_insn_var_location): Likewise.
32064         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
32065         (ADDR_VEC_ALIGN): Likewise.
32067 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32068             Alan Hayward  <alan.hayward@arm.com>
32069             David Sherwood  <david.sherwood@arm.com>
32071         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
32072         unsigned short.
32073         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
32074         or if measurement_type is polynomial.
32075         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
32076         * combine.c (make_extraction): Likewise.
32077         * dse.c (find_shift_sequence): Likewise.
32078         * dwarf2out.c (mem_loc_descriptor): Likewise.
32079         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
32080         (extract_bit_field, extract_low_bits): Likewise.
32081         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
32082         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
32083         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
32084         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
32085         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
32086         * reload.c (find_reloads): Likewise.
32087         * reload1.c (alter_reg): Likewise.
32088         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
32089         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
32090         * tree-if-conv.c (predicate_mem_writes): Likewise.
32091         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
32092         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
32093         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
32094         * valtrack.c (dead_debug_insert_temp): Likewise.
32095         * varasm.c (mergeable_constant_section): Likewise.
32096         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
32098 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32099             Alan Hayward  <alan.hayward@arm.com>
32100             David Sherwood  <david.sherwood@arm.com>
32102         * expr.c (expand_assignment): Cope with polynomial mode sizes
32103         when assigning to a CONCAT.
32105 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32106             Alan Hayward  <alan.hayward@arm.com>
32107             David Sherwood  <david.sherwood@arm.com>
32109         * machmode.h (mode_precision): Change from unsigned short to
32110         poly_uint16_pod.
32111         (mode_to_precision): Return a poly_uint16 rather than an unsigned
32112         short.
32113         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
32114         or if measurement_type is not polynomial.
32115         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
32116         in which the mode is already known to be a scalar_int_mode.
32117         * genmodes.c (emit_mode_precision): Change the type of mode_precision
32118         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
32119         initializer.
32120         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
32121         for GET_MODE_PRECISION.
32122         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
32123         for GET_MODE_PRECISION.
32124         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
32125         as polynomial.
32126         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
32127         (expand_field_assignment, make_extraction): Likewise.
32128         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
32129         (get_last_value): Likewise.
32130         * convert.c (convert_to_integer_1): Likewise.
32131         * cse.c (cse_insn): Likewise.
32132         * expr.c (expand_expr_real_1): Likewise.
32133         * lra-constraints.c (simplify_operand_subreg): Likewise.
32134         * optabs-query.c (can_atomic_load_p): Likewise.
32135         * optabs.c (expand_atomic_load): Likewise.
32136         (expand_atomic_store): Likewise.
32137         * ree.c (combine_reaching_defs): Likewise.
32138         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
32139         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
32140         * tree.h (type_has_mode_precision_p): Likewise.
32141         * ubsan.c (instrument_si_overflow): Likewise.
32143 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32144             Alan Hayward  <alan.hayward@arm.com>
32145             David Sherwood  <david.sherwood@arm.com>
32147         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
32148         polynomial numbers of units.
32149         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
32150         (valid_vector_subparts_p): New function.
32151         (build_vector_type): Remove temporary shim and take the number
32152         of units as a poly_uint64 rather than an int.
32153         (build_opaque_vector_type): Take the number of units as a
32154         poly_uint64 rather than an int.
32155         * tree.c (build_vector_from_ctor): Handle polynomial
32156         TYPE_VECTOR_SUBPARTS.
32157         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
32158         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
32159         (build_vector_from_val): If the number of units is variable,
32160         use build_vec_duplicate_cst for constant operands and
32161         VEC_DUPLICATE_EXPR otherwise.
32162         (make_vector_type): Remove temporary is_constant ().
32163         (build_vector_type, build_opaque_vector_type): Take the number of
32164         units as a poly_uint64 rather than an int.
32165         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
32166         VECTOR_CST_NELTS.
32167         * cfgexpand.c (expand_debug_expr): Likewise.
32168         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
32169         (store_constructor, expand_expr_real_1): Likewise.
32170         (const_scalar_mask_from_tree): Likewise.
32171         * fold-const-call.c (fold_const_reduction): Likewise.
32172         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
32173         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
32174         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
32175         (fold_relational_const): Likewise.
32176         (native_interpret_vector): Likewise.  Change the size from an
32177         int to an unsigned int.
32178         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
32179         TYPE_VECTOR_SUBPARTS.
32180         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
32181         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
32182         duplicating a non-constant operand into a variable-length vector.
32183         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
32184         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
32185         * ipa-icf.c (sem_variable::equals): Likewise.
32186         * match.pd: Likewise.
32187         * omp-simd-clone.c (simd_clone_subparts): Likewise.
32188         * print-tree.c (print_node): Likewise.
32189         * stor-layout.c (layout_type): Likewise.
32190         * targhooks.c (default_builtin_vectorization_cost): Likewise.
32191         * tree-cfg.c (verify_gimple_comparison): Likewise.
32192         (verify_gimple_assign_binary): Likewise.
32193         (verify_gimple_assign_ternary): Likewise.
32194         (verify_gimple_assign_single): Likewise.
32195         * tree-pretty-print.c (dump_generic_node): Likewise.
32196         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
32197         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
32198         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
32199         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
32200         (vect_shift_permute_load_chain): Likewise.
32201         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
32202         (expand_vector_condition, optimize_vector_constructor): Likewise.
32203         (lower_vec_perm, get_compute_type): Likewise.
32204         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
32205         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
32206         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
32207         (vect_recog_mask_conversion_pattern): Likewise.
32208         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
32209         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
32210         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
32211         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
32212         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
32213         (vectorizable_shift, vectorizable_operation, vectorizable_store)
32214         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
32215         (supportable_widening_operation): Likewise.
32216         (supportable_narrowing_operation): Likewise.
32217         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
32218         Likewise.
32219         * varasm.c (output_constant): Likewise.
32221 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32222             Alan Hayward  <alan.hayward@arm.com>
32223             David Sherwood  <david.sherwood@arm.com>
32225         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
32226         so that both the length == 3 and length != 3 cases set up their
32227         own permute vectors.  Add comments explaining why we know the
32228         number of elements is constant.
32229         (vect_permute_load_chain): Likewise.
32231 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32232             Alan Hayward  <alan.hayward@arm.com>
32233             David Sherwood  <david.sherwood@arm.com>
32235         * machmode.h (mode_nunits): Change from unsigned char to
32236         poly_uint16_pod.
32237         (ONLY_FIXED_SIZE_MODES): New macro.
32238         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
32239         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
32240         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
32241         New typedefs.
32242         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
32243         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
32244         or if measurement_type is not polynomial.
32245         * genmodes.c (ZERO_COEFFS): New macro.
32246         (emit_mode_nunits_inline): Make mode_nunits_inline return a
32247         poly_uint16.
32248         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
32249         Use ZERO_COEFFS when emitting initializers.
32250         * data-streamer.h (bp_pack_poly_value): New function.
32251         (bp_unpack_poly_value): Likewise.
32252         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
32253         for GET_MODE_NUNITS.
32254         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
32255         for GET_MODE_NUNITS.
32256         * tree.c (make_vector_type): Remove temporary shim and make
32257         the real function take the number of units as a poly_uint64
32258         rather than an int.
32259         (build_vector_type_for_mode): Handle polynomial nunits.
32260         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
32261         * emit-rtl.c (const_vec_series_p_1): Likewise.
32262         (gen_rtx_CONST_VECTOR): Likewise.
32263         * fold-const.c (test_vec_duplicate_folding): Likewise.
32264         * genrecog.c (validate_pattern): Likewise.
32265         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
32266         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
32267         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
32268         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
32269         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
32270         * rtlanal.c (subreg_get_info): Likewise.
32271         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
32272         (vect_grouped_load_supported): Likewise.
32273         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
32274         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
32275         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
32276         (simplify_const_unary_operation, simplify_binary_operation_1)
32277         (simplify_const_binary_operation, simplify_ternary_operation)
32278         (test_vector_ops_duplicate, test_vector_ops): Likewise.
32279         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
32280         instead of CONST_VECTOR_NUNITS.
32281         * varasm.c (output_constant_pool_2): Likewise.
32282         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
32283         explicit-encoded elements in the XVEC for variable-length vectors.
32285 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32287         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
32289 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32290             Alan Hayward  <alan.hayward@arm.com>
32291             David Sherwood  <david.sherwood@arm.com>
32293         * coretypes.h (fixed_size_mode): Declare.
32294         (fixed_size_mode_pod): New typedef.
32295         * builtins.h (target_builtins::x_apply_args_mode)
32296         (target_builtins::x_apply_result_mode): Change type to
32297         fixed_size_mode_pod.
32298         * builtins.c (apply_args_size, apply_result_size, result_vector)
32299         (expand_builtin_apply_args_1, expand_builtin_apply)
32300         (expand_builtin_return): Update accordingly.
32302 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32304         * cse.c (hash_rtx_cb): Hash only the encoded elements.
32305         * cselib.c (cselib_hash_rtx): Likewise.
32306         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
32307         CONST_VECTOR encoding.
32309 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
32310             Jeff Law  <law@redhat.com>
32312         PR target/83641
32313         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
32314         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
32315         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
32316         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
32318         PR target/83641
32319         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
32320         explicitly probe *sp in a noreturn function if there were any callee
32321         register saves or frame pointer is needed.
32323 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
32325         PR debug/83621
32326         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
32327         BLKmode for ternary, binary or unary expressions.
32329         PR debug/83645
32330         * var-tracking.c (delete_vta_debug_insn): New inline function.
32331         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
32332         insns from get_insns () to NULL instead of each bb separately.
32333         Use delete_vta_debug_insn.  No longer static.
32334         (vt_debug_insns_local, variable_tracking_main_1): Adjust
32335         delete_vta_debug_insns callers.
32336         * rtl.h (delete_vta_debug_insns): Declare.
32337         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
32338         instead of variable_tracking_main.
32340 2018-01-03  Martin Sebor  <msebor@redhat.com>
32342         PR tree-optimization/83603
32343         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
32344         arguments past the endof the argument list in functions declared
32345         without a prototype.
32346         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
32347         Avoid checking when arguments are null.
32349 2018-01-03  Martin Sebor  <msebor@redhat.com>
32351         PR c/83559
32352         * doc/extend.texi (attribute const): Fix a typo.
32353         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
32354         issuing -Wsuggest-attribute for void functions.
32356 2018-01-03  Martin Sebor  <msebor@redhat.com>
32358         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
32359         offset_int::from instead of wide_int::to_shwi.
32360         (maybe_diag_overlap): Remove assertion.
32361         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
32362         * gimple-ssa-sprintf.c (format_directive): Same.
32363         (parse_directive): Same.
32364         (sprintf_dom_walker::compute_format_length): Same.
32365         (try_substitute_return_value): Same.
32367 2018-01-03  Jeff Law  <law@redhat.com>
32369         PR middle-end/83654
32370         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
32371         non-constant residual for zero at runtime and avoid probing in
32372         that case.  Reorganize code for trailing problem to mirror handling
32373         of the residual.
32375 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
32377         PR tree-optimization/83501
32378         * tree-ssa-strlen.c (get_string_cst): New.
32379         (handle_char_store): Call get_string_cst.
32381 2018-01-03  Martin Liska  <mliska@suse.cz>
32383         PR tree-optimization/83593
32384         * tree-ssa-strlen.c: Include tree-cfg.h.
32385         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
32386         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
32387         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
32388         to false.
32389         (strlen_dom_walker::before_dom_children): Call
32390         gimple_purge_dead_eh_edges. Dump tranformation with details
32391         dump flags.
32392         (strlen_dom_walker::before_dom_children): Update call by adding
32393         new argument cleanup_eh.
32394         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
32396 2018-01-03  Martin Liska  <mliska@suse.cz>
32398         PR ipa/83549
32399         * cif-code.def (VARIADIC_THUNK): New enum value.
32400         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
32401         thunks.
32403 2018-01-03  Jan Beulich  <jbeulich@suse.com>
32405         * sse.md (mov<mode>_internal): Tighten condition for when to use
32406         vmovdqu<ssescalarsize> for TI and OI modes.
32408 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
32410         Update copyright years.
32412 2018-01-03  Martin Liska  <mliska@suse.cz>
32414         PR ipa/83594
32415         * ipa-visibility.c (function_and_variable_visibility): Skip
32416         functions with noipa attribure.
32418 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
32420         * gcc.c (process_command): Update copyright notice dates.
32421         * gcov-dump.c (print_version): Ditto.
32422         * gcov.c (print_version): Ditto.
32423         * gcov-tool.c (print_version): Ditto.
32424         * gengtype.c (create_file): Ditto.
32425         * doc/cpp.texi: Bump @copying's copyright year.
32426         * doc/cppinternals.texi: Ditto.
32427         * doc/gcc.texi: Ditto.
32428         * doc/gccint.texi: Ditto.
32429         * doc/gcov.texi: Ditto.
32430         * doc/install.texi: Ditto.
32431         * doc/invoke.texi: Ditto.
32433 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32435         * vector-builder.h (vector_builder::m_full_nelts): Change from
32436         unsigned int to poly_uint64.
32437         (vector_builder::full_nelts): Update prototype accordingly.
32438         (vector_builder::new_vector): Likewise.
32439         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
32440         (vector_builder::operator ==): Likewise.
32441         (vector_builder::finalize): Likewise.
32442         * int-vector-builder.h (int_vector_builder::int_vector_builder):
32443         Take the number of elements as a poly_uint64 rather than an
32444         unsigned int.
32445         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
32446         from unsigned int to poly_uint64.
32447         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
32448         (vec_perm_indices::new_vector): Likewise.
32449         (vec_perm_indices::length): Likewise.
32450         (vec_perm_indices::nelts_per_input): Likewise.
32451         (vec_perm_indices::input_nelts): Likewise.
32452         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
32453         number of elements per input as a poly_uint64 rather than an
32454         unsigned int.  Use the original encoding for variable-length
32455         vectors, rather than clamping each individual element.
32456         For the second and subsequent elements in each pattern,
32457         clamp the step and base before clamping their sum.
32458         (vec_perm_indices::series_p): Handle polynomial element counts.
32459         (vec_perm_indices::all_in_range_p): Likewise.
32460         (vec_perm_indices_to_tree): Likewise.
32461         (vec_perm_indices_to_rtx): Likewise.
32462         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
32463         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
32464         (tree_vector_builder::new_binary_operation): Handle polynomial
32465         element counts.  Return false if we need to know the number
32466         of elements at compile time.
32467         * fold-const.c (fold_vec_perm): Punt if the number of elements
32468         isn't known at compile time.
32470 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32472         * vec-perm-indices.h (vec_perm_builder): Change element type
32473         from HOST_WIDE_INT to poly_int64.
32474         (vec_perm_indices::element_type): Update accordingly.
32475         (vec_perm_indices::clamp): Handle polynomial element_types.
32476         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
32477         (vec_perm_indices::all_in_range_p): Likewise.
32478         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
32479         than shwi trees.
32480         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
32481         polynomial vec_perm_indices element types.
32482         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
32483         * fold-const.c (fold_vec_perm): Likewise.
32484         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
32485         * tree-vect-generic.c (lower_vec_perm): Likewise.
32486         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
32487         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
32488         element type to HOST_WIDE_INT.
32490 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32491             Alan Hayward  <alan.hayward@arm.com>
32492             David Sherwood  <david.sherwood@arm.com>
32494         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
32495         rather than an int.  Use plus_constant.
32496         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
32497         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
32499 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32500             Alan Hayward  <alan.hayward@arm.com>
32501             David Sherwood  <david.sherwood@arm.com>
32503         * calls.c (emit_call_1, expand_call): Change struct_value_size from
32504         a HOST_WIDE_INT to a poly_int64.
32506 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32507             Alan Hayward  <alan.hayward@arm.com>
32508             David Sherwood  <david.sherwood@arm.com>
32510         * calls.c (load_register_parameters): Cope with polynomial
32511         mode sizes.  Require a constant size for BLKmode parameters
32512         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
32513         forces a parameter to be padded at the lsb end in order to
32514         fill a complete number of words, require the parameter size
32515         to be ordered wrt UNITS_PER_WORD.
32517 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32518             Alan Hayward  <alan.hayward@arm.com>
32519             David Sherwood  <david.sherwood@arm.com>
32521         * reload1.c (spill_stack_slot_width): Change element type
32522         from unsigned int to poly_uint64_pod.
32523         (alter_reg): Treat mode sizes as polynomial.
32525 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32526             Alan Hayward  <alan.hayward@arm.com>
32527             David Sherwood  <david.sherwood@arm.com>
32529         * reload.c (complex_word_subreg_p): New function.
32530         (reload_inner_reg_of_subreg, push_reload): Use it.
32532 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32533             Alan Hayward  <alan.hayward@arm.com>
32534             David Sherwood  <david.sherwood@arm.com>
32536         * lra-constraints.c (process_alt_operands): Reject matched
32537         operands whose sizes aren't ordered.
32538         (match_reload): Refer to this check here.
32540 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32541             Alan Hayward  <alan.hayward@arm.com>
32542             David Sherwood  <david.sherwood@arm.com>
32544         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
32545         that the mode size is in the set {1, 2, 4, 8, 16}.
32547 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32548             Alan Hayward  <alan.hayward@arm.com>
32549             David Sherwood  <david.sherwood@arm.com>
32551         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
32552         Use plus_constant instead of gen_rtx_PLUS.
32554 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32555             Alan Hayward  <alan.hayward@arm.com>
32556             David Sherwood  <david.sherwood@arm.com>
32558         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
32559         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
32560         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
32561         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
32562         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
32563         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
32564         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
32565         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
32566         * config/i386/i386.c (ix86_push_rounding): ...this new function.
32567         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
32568         a poly_int64.
32569         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
32570         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
32571         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
32572         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
32573         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
32574         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
32575         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
32576         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
32577         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
32578         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
32579         function.
32580         * expr.c (emit_move_resolve_push): Treat the input and result
32581         of PUSH_ROUNDING as a poly_int64.
32582         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
32583         (emit_push_insn): Likewise.
32584         * lra-eliminations.c (mark_not_eliminable): Likewise.
32585         * recog.c (push_operand): Likewise.
32586         * reload1.c (elimination_effects): Likewise.
32587         * rtlanal.c (nonzero_bits1): Likewise.
32588         * calls.c (store_one_arg): Likewise.  Require the padding to be
32589         known at compile time.
32591 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32592             Alan Hayward  <alan.hayward@arm.com>
32593             David Sherwood  <david.sherwood@arm.com>
32595         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
32596         Use plus_constant instead of gen_rtx_PLUS.
32598 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32599             Alan Hayward  <alan.hayward@arm.com>
32600             David Sherwood  <david.sherwood@arm.com>
32602         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
32603         rather than an int.
32605 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32606             Alan Hayward  <alan.hayward@arm.com>
32607             David Sherwood  <david.sherwood@arm.com>
32609         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
32610         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
32611         via stack temporaries.  Treat the mode size as polynomial too.
32613 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32614             Alan Hayward  <alan.hayward@arm.com>
32615             David Sherwood  <david.sherwood@arm.com>
32617         * expr.c (expand_expr_real_2): When handling conversions involving
32618         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
32619         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
32620         as a poly_uint64 too.
32622 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32623             Alan Hayward  <alan.hayward@arm.com>
32624             David Sherwood  <david.sherwood@arm.com>
32626         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
32628 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32629             Alan Hayward  <alan.hayward@arm.com>
32630             David Sherwood  <david.sherwood@arm.com>
32632         * combine.c (can_change_dest_mode): Handle polynomial
32633         REGMODE_NATURAL_SIZE.
32634         * expmed.c (store_bit_field_1): Likewise.
32635         * expr.c (store_constructor): Likewise.
32636         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
32637         and polynomial REGMODE_NATURAL_SIZE.
32638         (gen_lowpart_common): Likewise.
32639         * reginfo.c (record_subregs_of_mode): Likewise.
32640         * rtlanal.c (read_modify_subreg_p): Likewise.
32642 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32643             Alan Hayward  <alan.hayward@arm.com>
32644             David Sherwood  <david.sherwood@arm.com>
32646         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
32647         numbers of elements.
32649 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32650             Alan Hayward  <alan.hayward@arm.com>
32651             David Sherwood  <david.sherwood@arm.com>
32653         * match.pd: Cope with polynomial numbers of vector elements.
32655 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32656             Alan Hayward  <alan.hayward@arm.com>
32657             David Sherwood  <david.sherwood@arm.com>
32659         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
32660         in a POINTER_PLUS_EXPR.
32662 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32663             Alan Hayward  <alan.hayward@arm.com>
32664             David Sherwood  <david.sherwood@arm.com>
32666         * omp-simd-clone.c (simd_clone_subparts): New function.
32667         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
32668         (ipa_simd_modify_function_body): Likewise.
32670 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32671             Alan Hayward  <alan.hayward@arm.com>
32672             David Sherwood  <david.sherwood@arm.com>
32674         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
32675         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
32676         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
32677         (expand_vector_condition, vector_element): Likewise.
32678         (subparts_gt): New function.
32679         (get_compute_type): Use subparts_gt.
32680         (count_type_subparts): Delete.
32681         (expand_vector_operations_1): Use subparts_gt instead of
32682         count_type_subparts.
32684 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32685             Alan Hayward  <alan.hayward@arm.com>
32686             David Sherwood  <david.sherwood@arm.com>
32688         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
32689         (vect_compile_time_alias): ...this new function.  Do the calculation
32690         on poly_ints rather than trees.
32691         (vect_prune_runtime_alias_test_list): Update call accordingly.
32693 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32694             Alan Hayward  <alan.hayward@arm.com>
32695             David Sherwood  <david.sherwood@arm.com>
32697         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
32698         numbers of units.
32699         (vect_schedule_slp_instance): Likewise.
32701 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32702             Alan Hayward  <alan.hayward@arm.com>
32703             David Sherwood  <david.sherwood@arm.com>
32705         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
32706         constant and extern definitions for variable-length vectors.
32707         (vect_get_constant_vectors): Note that the number of units
32708         is known to be constant.
32710 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32711             Alan Hayward  <alan.hayward@arm.com>
32712             David Sherwood  <david.sherwood@arm.com>
32714         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
32715         of units as polynomial.  Choose between WIDE and NARROW based
32716         on multiple_p.
32718 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32719             Alan Hayward  <alan.hayward@arm.com>
32720             David Sherwood  <david.sherwood@arm.com>
32722         * tree-vect-stmts.c (simd_clone_subparts): New function.
32723         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
32725 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32726             Alan Hayward  <alan.hayward@arm.com>
32727             David Sherwood  <david.sherwood@arm.com>
32729         * tree-vect-stmts.c (vectorizable_call): Treat the number of
32730         vectors as polynomial.  Use build_index_vector for
32731         IFN_GOMP_SIMD_LANE.
32733 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32734             Alan Hayward  <alan.hayward@arm.com>
32735             David Sherwood  <david.sherwood@arm.com>
32737         * tree-vect-stmts.c (get_load_store_type): Treat the number of
32738         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
32739         for variable-length vectors.
32740         (vectorizable_mask_load_store): Treat the number of units as
32741         polynomial, asserting that it is constant if the condition has
32742         already been enforced.
32743         (vectorizable_store, vectorizable_load): Likewise.
32745 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32746             Alan Hayward  <alan.hayward@arm.com>
32747             David Sherwood  <david.sherwood@arm.com>
32749         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
32750         of units as polynomial.  Punt if we can't tell at compile time
32751         which vector contains the final result.
32753 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32754             Alan Hayward  <alan.hayward@arm.com>
32755             David Sherwood  <david.sherwood@arm.com>
32757         * tree-vect-loop.c (vectorizable_induction): Treat the number
32758         of units as polynomial.  Punt on SLP inductions.  Use an integer
32759         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
32760         cast of such a series for variable-length floating-point
32761         reductions.
32763 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32764             Alan Hayward  <alan.hayward@arm.com>
32765             David Sherwood  <david.sherwood@arm.com>
32767         * tree.h (build_index_vector): Declare.
32768         * tree.c (build_index_vector): New function.
32769         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
32770         of units as polynomial, forcibly converting it to a constant if
32771         vectorizable_reduction has already enforced the condition.
32772         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
32773         to create a {1,2,3,...} vector.
32774         (vectorizable_reduction): Treat the number of units as polynomial.
32775         Choose vectype_in based on the largest scalar element size rather
32776         than the smallest number of units.  Enforce the restrictions
32777         relied on above.
32779 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32780             Alan Hayward  <alan.hayward@arm.com>
32781             David Sherwood  <david.sherwood@arm.com>
32783         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
32784         number of units as polynomial.
32786 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32787             Alan Hayward  <alan.hayward@arm.com>
32788             David Sherwood  <david.sherwood@arm.com>
32790         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
32791         * target.def (autovectorize_vector_sizes): Return the vector sizes
32792         by pointer, using vector_sizes rather than a bitmask.
32793         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
32794         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
32795         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
32796         Likewise.
32797         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
32798         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
32799         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
32800         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
32801         * omp-general.c (omp_max_vf): Likewise.
32802         * omp-low.c (omp_clause_aligned_alignment): Likewise.
32803         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
32804         * tree-vect-loop.c (vect_analyze_loop): Likewise.
32805         * tree-vect-slp.c (vect_slp_bb): Likewise.
32806         * doc/tm.texi: Regenerate.
32807         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
32808         to a poly_uint64.
32809         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
32810         the vector size as a poly_uint64 rather than an unsigned int.
32811         (current_vector_size): Change from an unsigned int to a poly_uint64.
32812         (get_vectype_for_scalar_type): Update accordingly.
32813         * tree.h (build_truth_vector_type): Take the size and number of
32814         units as a poly_uint64 rather than an unsigned int.
32815         (build_vector_type): Add a temporary overload that takes
32816         the number of units as a poly_uint64 rather than an unsigned int.
32817         * tree.c (make_vector_type): Likewise.
32818         (build_truth_vector_type): Take the number of units as a poly_uint64
32819         rather than an unsigned int.
32821 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32822             Alan Hayward  <alan.hayward@arm.com>
32823             David Sherwood  <david.sherwood@arm.com>
32825         * target.def (get_mask_mode): Take the number of units and length
32826         as poly_uint64s rather than unsigned ints.
32827         * targhooks.h (default_get_mask_mode): Update accordingly.
32828         * targhooks.c (default_get_mask_mode): Likewise.
32829         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
32830         * doc/tm.texi: Regenerate.
32832 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32833             Alan Hayward  <alan.hayward@arm.com>
32834             David Sherwood  <david.sherwood@arm.com>
32836         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
32837         * omp-general.c (omp_max_vf): Likewise.
32838         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
32839         (expand_omp_simd): Handle polynomial safelen.
32840         * omp-low.c (omplow_simd_context): Add a default constructor.
32841         (omplow_simd_context::max_vf): Change from int to poly_uint64.
32842         (lower_rec_simd_input_clauses): Update accordingly.
32843         (lower_rec_input_clauses): Likewise.
32845 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32846             Alan Hayward  <alan.hayward@arm.com>
32847             David Sherwood  <david.sherwood@arm.com>
32849         * tree-vectorizer.h (vect_nunits_for_cost): New function.
32850         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
32851         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
32852         (vect_analyze_slp_cost): Likewise.
32853         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
32854         (vect_model_load_cost): Likewise.
32856 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32857             Alan Hayward  <alan.hayward@arm.com>
32858             David Sherwood  <david.sherwood@arm.com>
32860         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
32861         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
32862         from an unsigned int * to a poly_uint64_pod *.
32863         (calculate_unrolling_factor): New function.
32864         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
32866 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32867             Alan Hayward  <alan.hayward@arm.com>
32868             David Sherwood  <david.sherwood@arm.com>
32870         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
32871         from an unsigned int to a poly_uint64.
32872         (_loop_vec_info::slp_unrolling_factor): Likewise.
32873         (_loop_vec_info::vectorization_factor): Change from an int
32874         to a poly_uint64.
32875         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
32876         (vect_get_num_vectors): New function.
32877         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
32878         (vect_get_num_copies): Use vect_get_num_vectors.
32879         (vect_analyze_data_ref_dependences): Change max_vf from an int *
32880         to an unsigned int *.
32881         (vect_analyze_data_refs): Change min_vf from an int * to a
32882         poly_uint64 *.
32883         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
32884         than an unsigned HOST_WIDE_INT.
32885         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
32886         (vect_analyze_data_ref_dependence): Change max_vf from an int *
32887         to an unsigned int *.
32888         (vect_analyze_data_ref_dependences): Likewise.
32889         (vect_compute_data_ref_alignment): Handle polynomial vf.
32890         (vect_enhance_data_refs_alignment): Likewise.
32891         (vect_prune_runtime_alias_test_list): Likewise.
32892         (vect_shift_permute_load_chain): Likewise.
32893         (vect_supportable_dr_alignment): Likewise.
32894         (dependence_distance_ge_vf): Take the vectorization factor as a
32895         poly_uint64 rather than an unsigned HOST_WIDE_INT.
32896         (vect_analyze_data_refs): Change min_vf from an int * to a
32897         poly_uint64 *.
32898         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
32899         vfm1 as a poly_uint64 rather than an int.  Make the same change
32900         for the returned bound_scalar.
32901         (vect_gen_vector_loop_niters): Handle polynomial vf.
32902         (vect_do_peeling): Likewise.  Update call to
32903         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
32904         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
32905         be constant.
32906         * tree-vect-loop.c (vect_determine_vectorization_factor)
32907         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
32908         (vect_get_known_peeling_cost): Likewise.
32909         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
32910         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
32911         (vect_transform_loop): Likewise.  Use the lowest possible VF when
32912         updating the upper bounds of the loop.
32913         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
32914         rather than an int.
32915         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
32916         polynomial unroll factors.
32917         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
32918         (vect_make_slp_decision): Likewise.
32919         (vect_supported_load_permutation_p): Likewise, and polynomial
32920         vf too.
32921         (vect_analyze_slp_cost): Handle polynomial vf.
32922         (vect_slp_analyze_node_operations): Likewise.
32923         (vect_slp_analyze_bb_1): Likewise.
32924         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
32925         than an unsigned HOST_WIDE_INT.
32926         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
32927         (vectorizable_load): Handle polynomial vf.
32928         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
32929         a poly_uint64.
32930         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
32932 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32933             Alan Hayward  <alan.hayward@arm.com>
32934             David Sherwood  <david.sherwood@arm.com>
32936         * match.pd: Handle bit operations involving three constants
32937         and try to fold one pair.
32939 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
32941         * tree-vect-loop-manip.c: Include gimple-fold.h.
32942         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
32943         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
32944         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
32945         Add a path that uses a step of VF instead of 1, but disable it
32946         for now.
32947         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
32948         and niters_no_overflow parameters.  Update calls to
32949         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
32950         Create a new SSA name if the latter choses to use a ste other
32951         than zero, and return it via niters_vector_mult_vf_var.
32952         * tree-vect-loop.c (vect_transform_loop): Update calls to
32953         vect_do_peeling, vect_gen_vector_loop_niters and
32954         slpeel_make_loop_iterate_ntimes.
32955         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
32956         (vect_gen_vector_loop_niters): Update declarations after above changes.
32958 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
32960         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
32961         128-bit round to integer instructions.
32962         (ceil<mode>2): Likewise.
32963         (btrunc<mode>2): Likewise.
32964         (round<mode>2): Likewise.
32966 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
32968         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
32969         unaligned VSX load/store on P8/P9.
32970         (expand_block_clear): Allow the use of unaligned VSX
32971         load/store on P8/P9.
32973 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
32975         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
32976         New function.
32977         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
32978         swap associated with both a load and a store.
32980 2018-01-02  Andrew Waterman  <andrew@sifive.com>
32982         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
32983         * config/riscv/riscv.md (clear_cache): Use it.
32985 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
32987         * web.c: Remove out-of-date comment.
32989 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32991         * expr.c (fixup_args_size_notes): Check that any existing
32992         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
32993         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
32994         (emit_single_push_insn): ...here.
32996 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
32998         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
32999         (const_vector_encoded_nelts): New function.
33000         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
33001         (const_vector_int_elt, const_vector_elt): Declare.
33002         * emit-rtl.c (const_vector_int_elt_1): New function.
33003         (const_vector_elt): Likewise.
33004         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
33005         of CONST_VECTOR_ELT.
33007 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33009         * expr.c: Include rtx-vector-builder.h.
33010         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
33011         directly on the tree encoding.
33012         (const_vector_from_tree): Likewise.
33013         * optabs.c: Include rtx-vector-builder.h.
33014         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
33015         sequence of "u" values.
33016         * vec-perm-indices.c: Include rtx-vector-builder.h.
33017         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
33018         directly on the vec_perm_indices encoding.
33020 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33022         * doc/rtl.texi (const_vector): Describe new encoding scheme.
33023         * Makefile.in (OBJS): Add rtx-vector-builder.o.
33024         * rtx-vector-builder.h: New file.
33025         * rtx-vector-builder.c: Likewise.
33026         * rtl.h (rtx_def::u2): Add a const_vector field.
33027         (CONST_VECTOR_NPATTERNS): New macro.
33028         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
33029         (CONST_VECTOR_DUPLICATE_P): Likewise.
33030         (CONST_VECTOR_STEPPED_P): Likewise.
33031         (CONST_VECTOR_ENCODED_ELT): Likewise.
33032         (const_vec_duplicate_p): Check for a duplicated vector encoding.
33033         (unwrap_const_vec_duplicate): Likewise.
33034         (const_vec_series_p): Check for a non-duplicated vector encoding.
33035         Say that the function only returns true for integer vectors.
33036         * emit-rtl.c: Include rtx-vector-builder.h.
33037         (gen_const_vec_duplicate_1): Delete.
33038         (gen_const_vector): Call gen_const_vec_duplicate instead of
33039         gen_const_vec_duplicate_1.
33040         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
33041         (gen_const_vec_duplicate): Use rtx_vector_builder.
33042         (gen_const_vec_series): Likewise.
33043         (gen_rtx_CONST_VECTOR): Likewise.
33044         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
33045         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
33046         Build a new vector rather than modifying a CONST_VECTOR in-place.
33047         (handle_special_swappables): Update call accordingly.
33048         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
33049         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
33050         Build a new vector rather than modifying a CONST_VECTOR in-place.
33051         (handle_special_swappables): Update call accordingly.
33053 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33055         * simplify-rtx.c (simplify_const_binary_operation): Use
33056         CONST_VECTOR_ELT instead of XVECEXP.
33058 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33060         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
33061         the selector elements to be different from the data elements
33062         if the selector is a VECTOR_CST.
33063         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
33064         ssizetype for the selector.
33066 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33068         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
33069         before testing each element individually.
33070         * tree-vect-generic.c (lower_vec_perm): Likewise.
33072 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33074         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
33075         * selftest-run-tests.c (selftest::run_tests): Call it.
33076         * vector-builder.h (vector_builder::operator ==): New function.
33077         (vector_builder::operator !=): Likewise.
33078         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
33079         (vec_perm_indices::all_from_input_p): New function.
33080         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
33081         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
33082         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
33083         instead of reading the VECTOR_CST directly.  Detect whether both
33084         vector inputs are the same before constructing the vec_perm_indices,
33085         and update the number of inputs argument accordingly.  Use the
33086         utility functions added above.  Only construct sel2 if we need to.
33088 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33090         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
33091         the broadcast of the low byte.
33092         (expand_mult_highpart): Use an explicit encoding for the permutes.
33093         * optabs-query.c (can_mult_highpart_p): Likewise.
33094         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
33095         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33096         (vectorizable_bswap): Likewise.
33097         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
33098         explicit encoding for the power-of-2 permutes.
33099         (vect_permute_store_chain): Likewise.
33100         (vect_grouped_load_supported): Likewise.
33101         (vect_permute_load_chain): Likewise.
33103 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33105         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
33106         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
33107         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
33108         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
33109         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
33110         (vect_gen_perm_mask_any): Likewise.
33112 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33114         * int-vector-builder.h: New file.
33115         * vec-perm-indices.h: Include int-vector-builder.h.
33116         (vec_perm_indices): Redefine as an int_vector_builder.
33117         (auto_vec_perm_indices): Delete.
33118         (vec_perm_builder): Redefine as a stand-alone class.
33119         (vec_perm_indices::vec_perm_indices): New function.
33120         (vec_perm_indices::clamp): Likewise.
33121         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
33122         (vec_perm_indices::new_vector): New function.
33123         (vec_perm_indices::new_expanded_vector): Update for new
33124         vec_perm_indices class.
33125         (vec_perm_indices::rotate_inputs): New function.
33126         (vec_perm_indices::all_in_range_p): Operate directly on the
33127         encoded form, without computing elided elements.
33128         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
33129         encoding.  Update for new vec_perm_indices class.
33130         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
33131         the given vec_perm_builder.
33132         (expand_vec_perm_var): Update vec_perm_builder constructor.
33133         (expand_mult_highpart): Use vec_perm_builder instead of
33134         auto_vec_perm_indices.
33135         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
33136         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
33137         or double series encoding as appropriate.
33138         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
33139         vec_perm_indices instead of auto_vec_perm_indices.
33140         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33141         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
33142         (vect_permute_store_chain): Likewise.
33143         (vect_grouped_load_supported): Likewise.
33144         (vect_permute_load_chain): Likewise.
33145         (vect_shift_permute_load_chain): Likewise.
33146         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
33147         (vect_transform_slp_perm_load): Likewise.
33148         (vect_schedule_slp_instance): Likewise.
33149         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33150         (vectorizable_mask_load_store): Likewise.
33151         (vectorizable_bswap): Likewise.
33152         (vectorizable_store): Likewise.
33153         (vectorizable_load): Likewise.
33154         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
33155         vec_perm_indices instead of auto_vec_perm_indices.  Use
33156         tree_to_vec_perm_builder to read the vector from a tree.
33157         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
33158         vec_perm_builder instead of a vec_perm_indices.
33159         (have_whole_vector_shift): Use vec_perm_builder and
33160         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
33161         truncation to calc_vec_perm_mask_for_shift.
33162         (vect_create_epilog_for_reduction): Likewise.
33163         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
33164         from auto_vec_perm_indices to vec_perm_indices.
33165         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
33166         instead of changing individual elements.
33167         (aarch64_vectorize_vec_perm_const): Use new_vector to install
33168         the vector in d.perm.
33169         * config/arm/arm.c (expand_vec_perm_d::perm): Change
33170         from auto_vec_perm_indices to vec_perm_indices.
33171         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
33172         instead of changing individual elements.
33173         (arm_vectorize_vec_perm_const): Use new_vector to install
33174         the vector in d.perm.
33175         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
33176         Update vec_perm_builder constructor.
33177         (rs6000_expand_interleave): Likewise.
33178         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
33179         (rs6000_expand_interleave): Likewise.
33181 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33183         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
33184         to qimode could truncate the indices.
33185         * optabs.c (expand_vec_perm_var): Likewise.
33187 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33189         * Makefile.in (OBJS): Add vec-perm-indices.o.
33190         * vec-perm-indices.h: New file.
33191         * vec-perm-indices.c: Likewise.
33192         * target.h (vec_perm_indices): Replace with a forward class
33193         declaration.
33194         (auto_vec_perm_indices): Move to vec-perm-indices.h.
33195         * optabs.h: Include vec-perm-indices.h.
33196         (expand_vec_perm): Delete.
33197         (selector_fits_mode_p, expand_vec_perm_var): Declare.
33198         (expand_vec_perm_const): Declare.
33199         * target.def (vec_perm_const_ok): Replace with...
33200         (vec_perm_const): ...this new hook.
33201         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
33202         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
33203         * doc/tm.texi: Regenerate.
33204         * optabs.def (vec_perm_const): Delete.
33205         * doc/md.texi (vec_perm_const): Likewise.
33206         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
33207         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
33208         expand_vec_perm for constant permutation vectors.  Assert that
33209         the mode of variable permutation vectors is the integer equivalent
33210         of the mode that is being permuted.
33211         * optabs-query.h (selector_fits_mode_p): Declare.
33212         * optabs-query.c: Include vec-perm-indices.h.
33213         (selector_fits_mode_p): New function.
33214         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
33215         is defined, instead of checking whether the vec_perm_const_optab
33216         exists.  Use targetm.vectorize.vec_perm_const instead of
33217         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
33218         fit in the vector mode before using a variable permute.
33219         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
33220         vec_perm_indices instead of an rtx.
33221         (expand_vec_perm): Replace with...
33222         (expand_vec_perm_const): ...this new function.  Take the selector
33223         as a vec_perm_indices rather than an rtx.  Also take the mode of
33224         the selector.  Update call to shift_amt_for_vec_perm_mask.
33225         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
33226         Use vec_perm_indices::new_expanded_vector to expand the original
33227         selector into bytes.  Check whether the indices fit in the vector
33228         mode before using a variable permute.
33229         (expand_vec_perm_var): Make global.
33230         (expand_mult_highpart): Use expand_vec_perm_const.
33231         * fold-const.c: Includes vec-perm-indices.h.
33232         * tree-ssa-forwprop.c: Likewise.
33233         * tree-vect-data-refs.c: Likewise.
33234         * tree-vect-generic.c: Likewise.
33235         * tree-vect-loop.c: Likewise.
33236         * tree-vect-slp.c: Likewise.
33237         * tree-vect-stmts.c: Likewise.
33238         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
33239         Delete.
33240         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
33241         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
33242         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
33243         (aarch64_vectorize_vec_perm_const): ...this new function.
33244         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33245         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33246         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
33247         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
33248         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33249         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33250         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
33251         into...
33252         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
33253         check for NEON modes.
33254         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
33255         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
33256         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
33257         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
33258         into...
33259         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
33260         the old VEC_PERM_CONST conditions.
33261         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
33262         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
33263         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
33264         (ia64_vectorize_vec_perm_const_ok): Merge into...
33265         (ia64_vectorize_vec_perm_const): ...this new function.
33266         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
33267         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
33268         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
33269         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
33270         * config/mips/mips.c (mips_expand_vec_perm_const)
33271         (mips_vectorize_vec_perm_const_ok): Merge into...
33272         (mips_vectorize_vec_perm_const): ...this new function.
33273         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
33274         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
33275         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
33276         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
33277         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
33278         (rs6000_expand_vec_perm_const): Delete.
33279         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
33280         Delete.
33281         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33282         (altivec_expand_vec_perm_const_le): Take each operand individually.
33283         Operate on constant selectors rather than rtxes.
33284         (altivec_expand_vec_perm_const): Likewise.  Update call to
33285         altivec_expand_vec_perm_const_le.
33286         (rs6000_expand_vec_perm_const): Delete.
33287         (rs6000_vectorize_vec_perm_const_ok): Delete.
33288         (rs6000_vectorize_vec_perm_const): New function.
33289         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
33290         an element count and rtx array.
33291         (rs6000_expand_extract_even): Update call accordingly.
33292         (rs6000_expand_interleave): Likewise.
33293         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
33294         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
33295         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
33296         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
33297         (rs6000_expand_vec_perm_const): Delete.
33298         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
33299         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33300         (altivec_expand_vec_perm_const_le): Take each operand individually.
33301         Operate on constant selectors rather than rtxes.
33302         (altivec_expand_vec_perm_const): Likewise.  Update call to
33303         altivec_expand_vec_perm_const_le.
33304         (rs6000_expand_vec_perm_const): Delete.
33305         (rs6000_vectorize_vec_perm_const_ok): Delete.
33306         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
33307         reference to the SPE evmerge intructions.
33308         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
33309         an element count and rtx array.
33310         (rs6000_expand_extract_even): Update call accordingly.
33311         (rs6000_expand_interleave): Likewise.
33312         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
33313         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
33314         new function.
33315         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
33317 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33319         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
33320         vector mode and that that mode matches the mode of the data
33321         being permuted.
33322         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
33323         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
33324         directly using expand_vec_perm_1 when forcing selectors into
33325         registers.
33326         (expand_vec_perm_var): New function, split out from expand_vec_perm.
33328 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33330         * optabs-query.h (can_vec_perm_p): Delete.
33331         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
33332         * optabs-query.c (can_vec_perm_p): Split into...
33333         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
33334         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
33335         particular selector is valid.
33336         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
33337         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
33338         (vect_grouped_load_supported): Likewise.
33339         (vect_shift_permute_load_chain): Likewise.
33340         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
33341         (vect_transform_slp_perm_load): Likewise.
33342         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
33343         (vectorizable_bswap): Likewise.
33344         (vect_gen_perm_mask_checked): Likewise.
33345         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
33346         implementations of variable permutation vectors into account
33347         when deciding which selector to use.
33348         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
33349         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
33350         with a false third argument.
33351         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
33352         to test whether the constant selector is valid and can_vec_perm_var_p
33353         to test whether a variable selector is valid.
33355 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33357         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
33358         * optabs-query.c (can_vec_perm_p): Likewise.
33359         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
33360         instead of vec_perm_indices.
33361         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
33362         (vect_gen_perm_mask_checked): Likewise,
33363         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
33364         (vect_gen_perm_mask_checked): Likewise,
33366 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
33368         * optabs-query.h (qimode_for_vec_perm): Declare.
33369         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
33370         (qimode_for_vec_perm): ...this new function.
33371         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
33373 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
33375         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
33376         does not have a conditional at the top.
33378 2018-01-02  Richard Biener  <rguenther@suse.de>
33380         * ipa-inline.c (big_speedup_p): Fix expression.
33382 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
33384         PR target/81616
33385         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
33386         for generic 4->6.
33388 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
33390         PR target/81616
33391         Generic tuning.
33392         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
33393         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
33394         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
33395         cond_taken_branch_cost 3->4.
33397 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
33399         PR tree-optimization/83581
33400         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
33401         TODO_cleanup_cfg if any changes have been made.
33403         PR middle-end/83608
33404         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
33405         convert_modes if target mode has the right side, but different mode
33406         class.
33408         PR middle-end/83609
33409         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
33410         last argument when extracting from CONCAT.  If either from_real or
33411         from_imag is NULL, use expansion through memory.  If result is not
33412         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
33413         the parts directly to inner mode, if even that fails, use expansion
33414         through memory.
33416         PR middle-end/83623
33417         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
33418         check for bswap in mode rather than HImode and use that in expand_unop
33419         too.
33421 Copyright (C) 2018 Free Software Foundation, Inc.
33423 Copying and distribution of this file, with or without modification,
33424 are permitted in any medium without royalty provided the copyright
33425 notice and this notice are preserved.