configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only when --with-gxx...
[official-gcc.git] / gcc / ChangeLog
blobb48117f7569e3aa5c6dbd080c6b37dbed0b00262
1 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
3         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
4         when --with-gxx-include-dir is also specified.
5         * configure: Regenerate.
7 2018-05-09  Jim Wilson  <jimw@sifive.com>
9         PR target/84797
10         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
11         * config/riscv/t-withmultilib: New.
12         * config/riscv/withmultilib.h: New.
13         * doc/install.texi: Document RISC-V --with-multilib-list support.
15 2018-05-09  Richard Biener  <rguenther@suse.de>
17         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
18         vector.
19         (vect_bb_vectorization_profitable_p): Adjust.  Compute
20         actual scalar cost using the cost vector and the add_stmt_cost
21         machinery.
23 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
25         PR rtl-optimization/85645
26         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
27         in the REG_CFA_REGISTER note for LR, don't leave it empty.
29 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
31         PR rtl-optimization/85645
32         * shrink-wrap.c (spread_components): Return a boolean saying if
33         anything was changed.
34         (try_shrink_wrapping_separate): Iterate spread_components until
35         nothing changes anymore.
37 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
39         PR rtl-optimization/85645
40         * regrename.c (build_def_use): Also kill the chains that include the
41         destination of a REG_CFA_REGISTER note.
43 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
45         PR rtl-optimization/85645
46         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
47         insn that has a REG_CFA_REGISTER note.
49 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
51         * cfgexpand.c (expand_clobber): New function.
52         (expand_gimple_stmt_1): Use it.
53         * tree-vect-stmts.c (vect_clobber_variable): New function,
54         split out from...
55         (vectorizable_simd_clone_call): ...here.
56         (vectorizable_store): Emit a clobber either side of an
57         IFN_STORE_LANES sequence.
58         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
60 2018-05-09  Tom de Vries  <tom@codesourcery.com>
62         PR target/85626
63         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
64         (define_insn "trap_if_false"): Add exit after trap.
66 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
68         PR rtl-optimization/85638
69         * bb-reorder.c: Include common/common-target.h.
70         (create_forwarder_block): New function extracted from...
71         (fix_up_crossing_landing_pad): ...here.  Rename into...
72         (dw2_fix_up_crossing_landing_pad): ...this.
73         (sjlj_fix_up_crossing_landing_pad): New function.
74         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
75         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
76         from both partitions and exit the loop after one iteration.
78 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
80         Revert:
81         * doc/extend.texi (PowerPC Built-in Functions): Rename this
82         subsection.
83         (Basic PowerPC Built-in Functions): The new name of the
84         subsection previously known as "PowerPC Built-in Functions".
85         (Basic PowerPC Built-in Functions Available on all Configurations):
86         New subsubsection.
87         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
88         subsubsection.
89         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
90         subsubsection.
91         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
92         subsubsection.
93         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
94         subsubsection.
96 2018-05-08  Jim Wilson  <jimw@sifive.com>
98         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
99         (LD_EMUL_SUFFIX): New.
100         (LINK_SPEC): Use it.
102 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
104         * doc/extend.texi (PowerPC Built-in Functions): Rename this
105         subsection.
106         (Basic PowerPC Built-in Functions): The new name of the
107         subsection previously known as "PowerPC Built-in Functions".
108         (Basic PowerPC Built-in Functions Available on all Configurations):
109         New subsubsection.
110         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
111         subsubsection.
112         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
113         subsubsection.
114         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
115         subsubsection.
116         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
117         subsubsection.
119 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
121         PR target/85683
122         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
123         after cmpelim optimization.
125 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
127         * config.gcc: Support "goldmont".
128         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
129         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
130         PROCESSOR_GOLDMONT.
131         * config/i386/i386.c (m_GOLDMONT): Define.
132         (processor_target_table): Add "goldmont".
133         (PTA_GOLDMONT): Define.
134         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
135         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
136         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
137         (fold_builtin_cpu): Add "goldmont".
138         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
139         (ix86_option_override_internal): Add "goldmont".
140         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
141         (processor_type): Add PROCESSOR_GOLDMONT.
142         * config/i386/i386.md: Add CPU "glm".
143         * config/i386/glm.md: New file.
144         * config/i386/x86-tune.def: Add m_GOLDMONT.
145         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
147 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
149         PR target/85572
150         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
151         E_V4DImode.
152         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
153         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
154         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
156         PR target/85317
157         * config/i386/i386.c (ix86_fold_builtin): Handle
158         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
160         PR target/85480
161         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
162         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
164 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
166         PR target/85658
167         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
168         (check_arch): Likewise.
169         (check_fpu): Return the result rather than printing it.
170         (end arch): Fix operator precedence.
171         (end cpu): Likewise.
172         (END): Print the result from check_fpu.
174 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
175             Alan Hayward  <alan.hayward@arm.com>
176             David Sherwood  <david.sherwood@arm.com>
178         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
179         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
180         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
181         (*fcmuo<mode>_and): New patterns.
183 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
185         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
186         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
187         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
188         (cmp_op, sve_imm_con): New code attributes.
189         (SVE_COND_INT_CMP, imm_con): Delete.
190         (cmp_op): Remove above unspecs from int attribute.
191         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
192         to...
193         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
194         comparison-specific unspecs.
195         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
196         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
197         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
198         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
199         (*vec_fcm<cmp_op><mode>): Rename to...
200         (*fcm<cmp_op><mode>): ...this and adjust likewise.
201         (*vec_fcmuo<mode>): Rename to...
202         (*fcmuo<mode>): ...this and adjust likewise.
203         (*pred_fcm<cmp_op><mode>): New pattern.
204         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
205         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
206         functions.
207         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
208         and UNORDERED.
209         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
210         (aarch64_emit_sve_predicated_cond): New function.
211         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
212         (aarch64_emit_unspec_cond_or): Replace with...
213         (aarch64_emit_sve_or_conds): ...this new function.  Use
214         aarch64_emit_sve_ptrue_op for the individual comparisons and
215         aarch64_emit_binop to OR them together.
216         (aarch64_emit_inverted_unspec_cond): Replace with...
217         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
218         aarch64_emit_sve_ptrue_op for the comparison and
219         aarch64_emit_unop to invert the result.
220         (aarch64_expand_sve_vec_cmp_float): Update after the above
221         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
223 2018-05-07  Nathan Sidwell  <nathan@acm.org>
225         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
226         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
227         (Backwards Compatibility): Likewise.
229 2018-05-07  Luis Machado  <luis.machado@linaro.org>
231         PR bootstrap/85681
232         Revert:
233         2018-05-07  Luis Machado  <luis.machado@linaro.org>
235         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
236         <prefetch_dynamic_strides>: New const bool field.
237         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
238         prefetch_dynamic_strides.
239         (exynosm1_prefetch_tune): Likewise.
240         (thunderxt88_prefetch_tune): Likewise.
241         (thunderx_prefetch_tune): Likewise.
242         (thunderx2t99_prefetch_tune): Likewise.
243         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
244         (aarch64_override_options_internal): Update to set
245         PARAM_PREFETCH_DYNAMIC_STRIDES.
246         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
247         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
248         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
249         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
250         prefetch-dynamic-strides setting.
252         2018-05-07  Luis Machado  <luis.machado@linaro.org>
254         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
255         <minimum_stride>: New const int field.
256         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
257         minimum_stride field.
258         (exynosm1_prefetch_tune): Likewise.
259         (thunderxt88_prefetch_tune): Likewise.
260         (thunderx_prefetch_tune): Likewise.
261         (thunderx2t99_prefetch_tune): Likewise.
262         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
263         (aarch64_override_options_internal): Update to set
264         PARAM_PREFETCH_MINIMUM_STRIDE.
265         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
266         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
267         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
268         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
269         stride is constant and is below the minimum stride threshold.
271 2018-05-07  Luis Machado  <luis.machado@linaro.org>
273         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
274         to 512.
276 2018-05-07  Luis Machado  <luis.machado@linaro.org>
278         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
279         <prefetch_dynamic_strides>: New const bool field.
280         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
281         prefetch_dynamic_strides.
282         (exynosm1_prefetch_tune): Likewise.
283         (thunderxt88_prefetch_tune): Likewise.
284         (thunderx_prefetch_tune): Likewise.
285         (thunderx2t99_prefetch_tune): Likewise.
286         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
287         (aarch64_override_options_internal): Update to set
288         PARAM_PREFETCH_DYNAMIC_STRIDES.
289         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
290         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
291         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
292         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
293         prefetch-dynamic-strides setting.
295 2018-05-07  Luis Machado  <luis.machado@linaro.org>
297         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
298         <minimum_stride>: New const int field.
299         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
300         minimum_stride field.
301         (exynosm1_prefetch_tune): Likewise.
302         (thunderxt88_prefetch_tune): Likewise.
303         (thunderx_prefetch_tune): Likewise.
304         (thunderx2t99_prefetch_tune): Likewise.
305         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
306         (aarch64_override_options_internal): Update to set
307         PARAM_PREFETCH_MINIMUM_STRIDE.
308         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
309         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
310         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
311         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
312         stride is constant and is below the minimum stride threshold.
314 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
316         PR c++/85659
317         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
318         the type is addressable.  Don't force op into register if it has
319         BLKmode.
321 2018-05-05  Roland McGrath  <mcgrathr@google.com>
323         PR other/77609
324         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
325         any section for which we don't know a specific type it should have,
326         regardless of name.  Previously this was done only for the exact
327         names ".init_array", ".fini_array", and ".preinit_array".
328         (default_elf_asm_named_section): Add comment about
329         relationship with default_section_type_flags and SECTION_NOTYPE.
330         (get_section): Don't consider it a type conflict if one side has
331         SECTION_NOTYPE and the other doesn't, as long as neither has the
332         SECTION_BSS et al used in the default_section_type_flags logic.
334 2018-05-05  Tom de Vries  <tom@codesourcery.com>
336         PR target/85653
337         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
338         (workaround_barsyncs): New function.
339         (nvptx_reorg): Use workaround_barsyncs.
340         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
341         (define_expand "nvptx_membar_cta"): New define_expand.
342         (define_insn "*nvptx_membar_cta"): New insn.
344 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
346         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
347         To improve optimization opportunities.
348         * builtin-types.def: The new needed builtin types for the above.
350 2018-05-04  Richard Biener  <rguenther@suse.de>
352         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
353         * gimple-ssa-store-merging.c
354         (imm_store_chain_info::output_merged_store): Remove redundant create,
355         release split_store vector contents on failure.
356         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
357         scalar stmt vector on cache hit.
359 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
361         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
362         Xilinx FP support.
363         * config.gcc (powerpc-xilinx-eabi*): Remove.
364         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
365         support.
366         (fusion_addis_mem_combo_load): Ditto.
367         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
368         FP support.
369         (rs6000_cpu_cpp_builtins): Ditto.
370         * config/rs6000/rs6000-linux.c
371         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
372         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
373         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
374         support.
375         (rs6000_setup_reg_addr_masks): Ditto.
376         (rs6000_init_hard_regno_mode_ok): Ditto.
377         (rs6000_option_override_internal): Ditto.
378         (legitimate_lo_sum_address_p): Ditto.
379         (rs6000_legitimize_address): Ditto.
380         (rs6000_legitimize_reload_address): Ditto.
381         (rs6000_legitimate_address_p): Ditto.
382         (abi_v4_pass_in_fpr): Ditto.
383         (setup_incoming_varargs): Ditto.
384         (rs6000_gimplify_va_arg): Ditto.
385         (rs6000_split_multireg_move): Ditto.
386         (rs6000_savres_strategy): Ditto.
387         (rs6000_emit_prologue_components): Ditto.
388         (rs6000_emit_epilogue_components): Ditto.
389         (rs6000_emit_prologue): Ditto.
390         (rs6000_emit_epilogue): Ditto.
391         (rs6000_elf_file_end): Ditto.
392         (rs6000_function_value): Ditto.
393         (rs6000_libcall_value): Ditto.
394         * config/rs6000/rs6000.h: Ditto.
395         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
396         (TARGET_MINMAX): ... this.  New.
397         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
398         * config/rs6000/rs6000.md: Remove Xilinx FP support.
399         (*movsi_internal1_single): Delete.
400         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
401         mfpu=, mxilinx-fpu): Delete.
402         * config/rs6000/singlefp.h: Delete.
403         * config/rs6000/sysv4.h: Remove Xilinx FP support.
404         * config/rs6000/t-rs6000: Ditto.
405         * config/rs6000/t-xilinx: Delete.
406         * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
407         * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
408         (VStype_simple): Delete.
409         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
410         * config/rs6000/xfpu.h: Delete.
411         * config/rs6000/xfpu.md: Delete.
412         * config/rs6000/xilinx.h: Delete.
413         * config/rs6000/xilinx.opt: Delete.
414         * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
415         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
417 2018-05-04  Tom de Vries  <tom@codesourcery.com>
419         PR libgomp/85639
420         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
421         if ignore == 0.
423 2018-05-04  Richard Biener  <rguenther@suse.de>
425         PR middle-end/85627
426         * tree-complex.c (update_complex_assignment): We are always in SSA form.
427         (expand_complex_div_wide): Likewise.
428         (expand_complex_operations_1): Likewise.
429         (expand_complex_libcall): Preserve EH info of the original stmt.
430         (tree_lower_complex): Handle removed blocks.
431         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
432         on complex multiplication and division libcall builtins.
434 2018-05-04  Richard Biener  <rguenther@suse.de>
436         PR middle-end/85574
437         * fold-const.c (negate_expr_p): Restrict negation of operand
438         zero of a division to when we know that can happen without
439         overflow.
440         (fold_negate_expr_1): Likewise.
442 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
444         PR libstdc++/85466
445         * real.h (real_nextafter): Declare.
446         * real.c (real_nextafter): New function.
447         * fold-const-call.c (fold_const_nextafter): New function.
448         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
449         CASE_CFN_NEXTTOWARD.
450         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
451         even when arg1_mode is different from arg0_mode.
453 2018-05-03  Nathan Sidwell  <nathan@acm.org>
455         * doc/extend.texi (Deprecated Features): Remove
456         -ffriend-injection.
457         (Backwards Compatibility): Likewise.
458         * doc/invoke.texi (C++ Language Options): Likewise.
459         (C++ Dialect Options): Likewise.
461 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
463         PR target/85530
464         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
465         _mm512_mask_mullox_epi64): New intrinsics.
467 2018-05-03  Tom de Vries  <tom@codesourcery.com>
469         PR testsuite/85106
470         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
471         dump files): Add offload-tree.
473 2018-05-03  Richard Biener  <rguenther@suse.de>
475         PR tree-optimization/85615
476         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
477         to loops not nested in BBs loop father to avoid creating multi-entry
478         loops.
480 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
482         PR tree-optimization/70291
483         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
484         arguments.  Change return type to tree.  Emit libcall as a new
485         statement rather than replacing existing one when inplace_p is true.
486         (expand_complex_multiplication_components): New function.
487         (expand_complex_multiplication): Expand floating-point complex
488         multiplication using the above.
489         (expand_complex_division): Rename inner_type parameter to type.
490         Update expand_complex_libcall call-site.
491         (expand_complex_operations_1): Update expand_complex_multiplication
492         and expand_complex_division call-sites.
494 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
496         PR target/85582
497         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
498         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
499         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
500         the highest significant bit of the shift count mask is clear.  In
501         check whether and[sq]i3 is needed verify that all significant bits
502         of the shift count other than the highest are set.
504 2018-05-02  Tom de Vries  <tom@codesourcery.com>
506         PR libgomp/82428
507         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
508         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
509         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
510         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
511         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
512         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
513         __builtin_goacc_parlevel_size.
515 2018-05-02  Richard Biener  <rguenther@suse.de>
517         PR tree-optimization/85597
518         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
519         do not use split vect_get_vec_defs call but call vect_get_slp_defs
520         directly.
522 2018-05-02  Tom de Vries  <tom@codesourcery.com>
524         PR testsuite/85106
525         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
526         dump files): Add ltrans-tree.
528 2018-05-02  Tom de Vries  <tom@codesourcery.com>
530         PR testsuite/85106
531         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
532         dump files): Add wpa-ipa.
534 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
536         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
537         powerpc*-*-linux*paired* target.
538         * config/rs6000/750cl.h: Delete.
539         * config/rs6000/paired.h: Delete.
540         * config/rs6000/paired.md: Delete.
541         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
542         float support.
543         * config/rs6000/rs6000-builtin.def: Remove paired float support.
544         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
545         comment.  Remove paired float support.
546         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
547         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
548         VECTOR_PAIRED.
549         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
550         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
551         declarations.
552         * config/rs6000/rs6000.c: Remove paired float support.
553         (paired_expand_vector_init, paired_expand_vector_move,
554         paired_emit_vector_compare, paired_emit_vector_cond_expr,
555         (paired_expand_lv_builtin, paired_expand_stv_builtin,
556         paired_expand_builtin, paired_expand_predicate_builtin,
557         paired_init_builtins): Delete.
558         * config/rs6000/rs6000.h: Remove paired float support.
559         * config/rs6000/rs6000.md: Remove paired float support.
560         (move_from_CR_ov_bit): Delete.
561         * config/rs6000/rs6000.opt (mpaired): Delete.
562         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
563         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
565 2018-05-02  Richard Biener  <rguenther@suse.de>
567         PR middle-end/85567
568         * gimplify.c (gimplify_save_expr): When in SSA form allow
569         SAVE_EXPRs to compute to SSA vars.
571 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
573         PR target/85582
574         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
575         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
576         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
577         clobber operands[2], instead use a new pseudo.  Formatting fixes.
579 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
581         PR tree-optimization/85586
582         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
583         exit early for statements in the same group if the accesses are
584         not strided.
586 2018-05-02  Tom de Vries  <tom@codesourcery.com>
588         PR lto/85451
589         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
590         error message.
592 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
594         PR tree-optimization/85143
595         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
597 2018-05-01  Tom de Vries  <tom@codesourcery.com>
599         PR lto/85451
600         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
601         not found" error message.
603 2018-05-01  Tom de Vries  <tom@codesourcery.com>
605         PR other/83786
606         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
607         * vec.c (test_ordered_remove_if): New function.
608         (vec_c_tests): Call test_ordered_remove_if.
609         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
610         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
611         * tree-vect-patterns.c (vect_pattern_recog_1): Use
612         VEC_ORDERED_REMOVE_IF.
614 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
616         PR tree-optimization/82665
617         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
618         pointer subtraction where arguments come from a memchr call.
620 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
622         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
623         --push-state --as-needed and --pop-state instead of --as-needed and
624         --no-as-needed if ld supports it.
625         * configure: Regenerated.
627         PR web/85578
628         * doc/install.texi2html: Replace _002d with - and _002a with * in
629         generated html files using sed.
631 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
633         PR c++/85523
634         * gcc-rich-location.c (blank_line_before_p): New function.
635         (use_new_line): New function.
636         (gcc_rich_location::add_fixit_insert_formatted): New function.
637         * gcc-rich-location.h
638         (gcc_rich_location::add_fixit_insert_formatted): New function.
640 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
642         * selftest.c (assert_streq): Rename "expected" and "actual" to
643         "val1" and "val2".  Extend NULL-handling to cover both inputs
644         symmetrically, while still requiring both to be non-NULL for a pass.
645         * selftest.h (assert_streq): Rename "expected" and "actual" to
646         "val1" and "val2".
647         (ASSERT_EQ): Likewise.
648         (ASSERT_EQ_AT): Likewise.
649         (ASSERT_KNOWN_EQ): Likewise.
650         (ASSERT_KNOWN_EQ_AT): Likewise.
651         (ASSERT_NE): Likewise.
652         (ASSERT_MAYBE_NE): Likewise.
653         (ASSERT_MAYBE_NE_AT): Likewise.
654         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
655         the assertion to pass.
656         (ASSERT_STREQ_AT): Likewise.
658 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
660         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
661         interaction with -pie.
663 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
665         * selftest.h: Fix alphabetization of per-source-file selftest
666         declarations.
668 2018-04-30  Jason Merrill  <jason@redhat.com>
670         PR c++/61982 - dead stores to destroyed objects.
671         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
672         of clobber.
674 2018-04-30  Jason Merrill  <jason@redhat.com>
676         * tree.c (build_clobber): New.
677         * tree.h: Declare it.
678         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
680 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
682         * diagnostic-show-locus.c (layout::layout): Update for
683         location_get_source_line returning a char_span.
684         (struct char_span): Move to input.h.
685         (struct correction): Update for fields in char_span becoming
686         private.
687         (struct source_line): Update for location_get_source_line
688         returning a char_span.
689         (layout::print_line): Likewise.
690         * edit-context.c (edited_file::print_content): Likewise.
691         (edited_file::print_diff_hunk): Likewise.
692         (edited_file::print_run_of_changed_lines): Likewise.
693         (edited_file::get_num_lines): Likewise.
694         (edited_line::edited_line): Likewise.
695         * final.c (asm_show_source): Likewise.
696         * input.c (location_get_source_line): Convert return type
697         from const char * to char_span, losing the final "line_len"
698         param.
699         (dump_location_info): Update for the above.
700         (get_substring_ranges_for_loc): Likewise.  Use a char_span
701         when handling the literal within the line.
702         (test_reading_source_line): Update for location_get_source_line
703         returning a char_span.
704         * input.h (class char_span): Move here from
705         diagnostic-show-locus.c, converting from a struct to a class.
706         Make data members private.
707         (char_span::operator bool): New.
708         (char_span::length): New.
709         (char_span::get_buffer): New.
710         (char_span::operator[]): New.
711         (char_span::subspan): Make const.
712         (char_span::xstrdup): New.
713         (location_get_source_line): Convert return type from const char *
714         to char_span, losing the final "line_size" param.
716 2018-04-30  Jan Hubicka  <jh@suse.cz>
718         * lto-wrapper.c (ltrans_priorities): New static var.
719         (cmp_priority): New.
720         (run_gcc): Read priorities and if doing parallel build order
721         the Makefile by them.
723 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
725         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
727 2018-04-30  Richard Biener  <rguenther@suse.de>
729         * tree-cfg.c (verify_address): Remove base argument, add
730         flag whether to check TREE_ADDRESSABLE and do that.
731         (verify_expr): Remove.
732         (verify_types_in_gimple_reference): Add pieces from verify_expr.
733         (verify_gimple_assign_single): Likewise.
734         (verify_gimple_switch): Likewise.
735         (verify_expr_location_1): Dereference tp once.  Add (disabled)
736         piece from verify_expr.
737         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
739 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
741         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
743 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
745         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
746         (small_data_pattern): Likewise.
747         (arc_rewrite_small_data): Likewise.
748         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
749         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
750         (get_symbol_alignment): New function.
751         (legitimate_small_data_address_p): Likewise.
752         (legitimate_scaled_address): Update, call
753         legitimate_small_data_address_p.
754         (output_sdata): New static variable.
755         (arc_print_operand): Update how we handle small data operands.
756         (arc_print_operand_address): Likewise.
757         (arc_legitimate_address_p): Update, use
758         legitimate_small_data_address_p.
759         (arc_rewrite_small_data_p): Remove.
760         (arc_rewrite_small_data_1): Likewise.
761         (arc_rewrite_small_data): Likewise.
762         (small_data_pattern): Likewise.
763         (compact_sda_memory_operand): Update to use
764         legitimate_small_data_address_p and get_symbol_alignment.
765         (prepare_move_operands): Don't rewite sdata pattern.
766         (prepare_extend_operands): Remove.
767         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
768         pattern.
769         (zero_extendqisi2): Likewise.
770         (zero_extendhisi2): Likewise.
771         (extendqihi2): Likewise.
772         (extendqisi2): Likewise.
773         (extendhisi2): Likewise.
774         (addsi3): Likewise.
775         (subsi3): Likewise.
776         (andsi3): Likewise.
777         * config/arc/constraints.md (Usd): Change it to memory constraint.
779 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
781         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
782         as source of std instructions.
783         * config/arc/arc.md (movsi_insn): Update pattern predicate to
784         allow 6-bit constants as source for store instructions.
785         (movdi_insn): Update instruction pattern to allow 6-bit constants
786         as source for store instructions.
788 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
790         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
792 2018-04-30  Nathan Sidwell  <nathan@acm.org>
793             Sandra Loosemore <sandra@codesourcery.com>
795         * dumpfile.c (dump_open): Allow '-' for stdout.
796         * doc/invoke.texi (Developer Options): Document dump filename
797         determination early.  Document stdin/stdout selection.
799 2018-04-30 Andrew Sadek  <andrew.sadek.se@gmail.com>
801         Microblaze Target: PIC data text relative
803         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
804         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
805         Add declaration.
806         * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
807         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
808         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
809         New addressing mode for data-text relative position indepenedent code.
810         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
811         'ADDRESS_SYMBOLIC_TXT_REL'.
812         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
813         (microblaze_legitimate_pic_operand): Exclude function calls from
814         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
815         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
816         addresses cases.
817         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
818         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
819         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
820         for 'address + offset'.
821         (microblaze_expand_prologue): Add new function prologue call for
822         'r20' assignation.
823         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
824         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
825         table in case of TARGET_PIC_DATA_TEXT_REL.
826         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
827         * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
828         Add new macros 'UNSPEC_TEXT',
829         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
830         + exclude function calls from 'UNSPEC_PLT' in case of data text
831         relative mode.
832         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
833         new target hook for generating address diff vector tables in case of
834         flag_pic.
835         * doc/tm.texi : Regenerate.
836         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
837         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
838         of addr diff vector generation.
839         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
840         target hook definition.
841         * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
842         Add default function for generate_pic_addr_diff_vec -> flag_pic.
843         * doc/invoke.texi (Add new pic option): Add new microblaze pic
844         option for data text relative.
846 2018-04-30  Richard Biener  <rguenther@suse.de>
848         * tree-chrec.h (evolution_function_is_constant_p): Remove
849         redundant check.
850         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
852 2018-04-30  Richard Biener  <rguenther@suse.de>
854         PR bootstrap/85571
855         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
857 2018-04-30  Richard Biener  <rguenther@suse.de>
859         PR tree-optimization/28364
860         PR tree-optimization/85275
861         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
862         copying first exit test.
864 2018-04-28  Mark Wielaard  <mark@klomp.org>
866         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
867         dwarf_version >= 5.
868         (dwarf_AT): Handle DW_AT_addr_base.
869         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
871 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
873         PR target/84431
874         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
875         (*ashl<dwi>3_doubleword_mask_1): Ditto.
876         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
877         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
879 2018-04-28  Richard Biener  <rguenther@suse.de>
881         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
882         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
883         to reflect use.  Only add interesting stmts.
885 2018-04-27  Martin Jambor  <mjambor@suse.cz>
887         PR ipa/85549
888         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
889         the jump function allows for passing through aggregate values.
891 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
893         * input.h (in_system_header_at): Convert from macro to inline
894         function.
895         (from_macro_expansion_at): Likewise.
896         (from_macro_definition_at): Likewise.
898 2018-04-27  Jeff Law  <law@redhat.com>
900         * config.gcc: Mark tile* targets as deprecated/obsolete.
902 2018-04-27  Richard Biener  <rguenther@suse.de>
904         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
905         fix for ILP32.
907 2018-04-27  Richard Biener  <rguenther@suse.de>
909         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
911 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
913         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
914         with Yd constraint. Set "preferred_for_speed" attribute from
915         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
916         with Yd constraint.
917         (*movdi_internal): Ditto.
918         (movti_interunit splitters): Remove
919         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
920         (movdi_interunit splitters): Ditto.
921         * config/i386/constraints.md (Ye): Remove.
922         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
924 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
926         PR target/85512
927         * config/aarch64/constraints.md (Usg): Limit to 31.
928         (Usj): Limit to 63.
930 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
932         PR tree-optimization/85529
933         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
934         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
935         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
936         zero extension or masking of the MSB bit.
937         (optimize_range_tests): Add FIRST_BB argument, pass it through
938         to optimize_range_tests_var_bound.
939         (maybe_optimize_range_tests, reassociate_bb): Adjust
940         optimize_range_tests callers.
942 2018-04-26  Richard Biener  <rguenther@suse.de>
943             Jakub Jelinek  <jakub@redhat.com>
945         * cgraph.h (symbol_table): Just declare debug method here.
946         * symtab.c (symbol_table::debug): Define.
948 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
950         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
952 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
954         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
955         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
956         (*movdi_internal): Substitute Yi and Yj constraint with x
957         and Ym and Yn constraint with y constraint.  Update "isa"
958         attribute and set "preferred_for_speed" attribute from
959         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
960         (*movsi_internal): Ditto.
961         (*movdf_internal): Ditto.
962         (*movsf_internal): Ditto.
963         (*zero_extendsidi2): Ditto.
964         * config/i386/sse.md (vec_set<mode>_0): Ditto.
965         (sse2_loadld): Ditto.
966         (*vec_extract<ssevecmodelower>_0): Ditto.
967         (*vec_extractv4si_0_zext_sse4): Ditto.
968         (vec_concatv2di): Ditto.
969         (*vec_dup<mode>): Ditto.
970         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
971         * config/i386/constraints.md (Yi): Remove.
972         (Yj): Remove.
973         (Ym): Remove.
974         (Yn): Remove.
976 2018-04-26  Nathan Sidwell  <nathan@acm.org>
978         * dumpfile.c (dump_open): New.
979         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
980         (dump_finish): Detect stdio/stderr by value not name.
982 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
984         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
986 2018-04-26  Tom de Vries  <tom@codesourcery.com>
988         PR target/84952
989         * config/nvptx/nvptx.c (verify_neutering_jumps)
990         (verify_neutering_labels): New function
991         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
993 2018-04-26  Tom de Vries  <tom@codesourcery.com>
995         PR target/84025
996         * config/nvptx/nvptx.c (needs_neutering_p): New function.
997         (nvptx_single): Use needs_neutering_p to skip over insns that do not
998         need neutering.
1000 2018-04-26  Richard Biener <rguenther@suse.de>
1001             Tom de Vries  <tom@codesourcery.com>
1003         PR lto/85422
1004         * lto-streamer-out.c (output_function): Fixup loops if required to match
1005         discovery done in the reader.
1007 2018-04-26  Richard Biener  <rguenther@suse.de>
1009         PR tree-optimization/85116
1010         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
1011         have a loop exit from the single latch predecessor.  Remove
1012         case of header with just condition.
1013         (ch_base::copy_headers): Exclude infinite loops from any
1014         processing.
1015         (pass_ch::execute): Record exits.
1017 2018-04-26  Richard Biener  <rguenther@suse.de>
1019         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
1020         prologue cost vector and pass it to vect_get_load_cost.
1021         (vect_get_peeling_costs_all_drs): Likewise.
1022         (vect_peeling_hash_get_lowest_cost): Likewise.
1023         (vect_enhance_data_refs_alignment): Likewise.
1025 2018-04-26  Richard Biener  <rguenther@suse.de>
1027         PR middle-end/85450
1028         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
1029         checking of integer<->pointer conversions.
1030         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
1031         sign-/zero-extending pointer types.
1032         (expand_omp_for_static_chunk): Likewise.
1034 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
1035             Jean Lee  <xiaoyur347@gmail.com>
1037         * config/mips/mips.c (mips_asan_shadow_offset): New function.
1038         (TARGET_ASAN_SHADOW_OFFSET): Define.
1039         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
1040         true for -fsanitize=address.
1042 2018-04-25  Mark Wielaard  <mark@klomp.org>
1044         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
1045         shorter ones.
1047 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
1049         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
1050         than "alu", remove explicit "memory" and "imm_disp" attributes.
1051         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
1053         PR middle-end/85414
1054         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
1055         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
1056         gen_lowpart_no_emit.
1058 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
1060         PR target/85473
1061         * config/i386/i386.c (ix86_expand_builtin): Change memory
1062         operand to XI, extend p0 to Pmode.
1063         * config/i386/i386.md: Change unspec volatile and operand
1064         1 mode to XI, change operand 0 mode to P.
1066 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
1068         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
1069         GET_MODE_MASK before any checking.
1070         (nds32_can_use_bset_p): Likewise.
1071         (nds32_can_use_btgl_p): Likewise.
1073 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
1075         * config/nds32/nds32-doubleword.md: New define_split pattern for
1076         illegal register number.
1078 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
1080         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
1082 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
1084         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
1086 2018-04-25  Richard Biener  <rguenther@suse.de>
1088         * lto-streamer.h (LTO_major_version): Bump to 8.
1090 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
1092         * BASE-VER: Set to 9.0.0.
1094 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
1096         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
1097         in __abskf2 and __powikf2.
1099 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
1101         PR target/85512
1102         * config/aarch64/constraints.md (Usg, Usj): New constraints.
1103         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
1104         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
1105         Use the above on operand 2.  Reindent.
1106         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
1108 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
1110         PR target/85485
1111         * common/config/i386/i386-common.c (ix86_handle_option): Don't
1112         handle OPT_mcet.
1113         * config/i386/i386.opt (mcet): Removed.
1114         * doc/install.texi: Remove -mcet documentation.
1115         * doc/invoke.texi: Likewise.
1117 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
1119         PR target/85485
1120         * doc/install.texi: Remove -mcet from bootstrap-cet.
1122 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
1124         PR target/85511
1125         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
1126         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
1127         if TARGET_64BIT.
1129         PR target/85503
1130         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
1131         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
1132         containing a CONST_VECTOR.
1134 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
1136         * doc/install.texi: Update newlib dependency for nvptx.
1138 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
1140         PR target/85508
1141         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
1142         instead of INTVAL when shifting x left.
1144 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
1146         PR tree-optimization/85478
1147         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
1148         vect_grouped_store_supported for single element vectors.
1150 2018-04-24  Richard Biener  <rguenther@suse.de>
1152         PR target/85491
1153         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
1154         load cost increase to the case of non-constant step.
1156 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
1158         PR target/84828
1159         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
1160         destination if any_malformed_asm.
1162 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
1164         PR middle-end/85496
1165         * expr.c (store_field): In the bitfield case, if the value comes from
1166         a function call and is returned in registers by means of a PARALLEL,
1167         do not change the mode of the temporary unless BLKmode and VOIDmode.
1169 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
1171         PR rtl-optimization/85423
1172         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
1173         dependencies to debug insns when the previous insn is non-debug.
1175 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
1177         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
1178         enums into a single definition.
1179         (fls): Fix predicates and printing.
1180         (seti): Likewise.
1182 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
1184         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
1185         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
1186         and short u6 immediate.
1187         (check_if_valid_sleep_operand): Remove.
1188         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
1190 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
1192         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
1193         flag_always_save_lp condition.
1194         * config/nds32/nds32.opt (malways-save-lp): New option.
1196 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
1198         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
1199         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
1200         * config/nds32/nds32.h
1201         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
1202         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
1204 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
1206         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
1207         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
1209 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
1210             Chung-Ju Wu  <jasonwucj@gmail.com>
1212         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
1213         Declare.
1214         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
1215         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
1217 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
1219         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
1221 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
1223         * config/nds32/nds32-protos.h (nds32_data_alignment,
1224         nds32_local_alignment): Declare.
1225         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
1226         nds32_local_alignment): New functions.
1227         (TARGET_CONSTANT_ALIGNMENT): Define.
1228         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
1230 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
1232         * config/nds32/nds32.c
1233         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
1234         (TARGET_MODES_TIEABLE_P): Likewise.
1236 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
1238         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
1239         level Ofast and Og.
1241 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
1242             Chung-Ju Wu  <jasonwucj@gmail.com>
1244         * config/nds32/constants.md (unspec_volatile_element): Add enum values
1245         for unaligned access.
1246         * config/nds32/nds32-intrinsic.c: Implementation of expanding
1247         unaligned access.
1248         * config/nds32/nds32-intrinsic.md: Likewise.
1249         * config/nds32/nds32_intrinsic.h: Likewise.
1250         * config/nds32/nds32.h (nds32_builtins): Likewise.
1251         * config/nds32/nds32.opt (munaligned-access): New option.
1252         * config/nds32/nds32.c (nds32_asm_file_start): Display
1253         flag_unaligned_access status.
1255 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
1257         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
1258         -mno-relax is present.
1259         * config/riscv/linux.h (LINK_SPEC): Ditto.
1261 2018-04-20  Martin Sebor  <msebor@redhat.com>
1263         PR c/85365
1264         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
1265         for null pointers.
1266         (gimple_fold_builtin_stxcpy_chk): Same.
1267         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
1269 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
1271         PR target/85456
1272         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
1273         __powikf2 when long double is IEEE 128-bit.
1275 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
1277         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
1278         step to make sure stack always aligned.
1280 2018-04-20  Carl Love  <cel@us.ibm.com>
1282         PR target/83402
1283         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
1284         size check for arg0.
1286 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
1287             Tom de Vries  <tom@codesourcery.com>
1289         PR target/85445
1290         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
1291         Emit insns for calls too.
1292         (nvptx_find_par): Always look for worker-level predecessor insn.
1293         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
1294         calls.
1295         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
1296         (nvptx_process_pars): Propagate frames for calls.
1298 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
1300         PR target/85469
1301         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
1302         Removed.
1303         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
1304         (ix86_handle_option): Don't handle OPT_mibt.
1305         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
1306         __SHSTK__.
1307         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
1308         has_ibt and ibt.
1309         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
1310         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
1311         (ix86_target_macros): Define __CET__ with flag_cf_protection
1312         for -fcf-protection.
1313         * config/i386/i386.c (isa2_opts): Remove -mibt.
1314         * config/i386/i386.h (TARGET_IBT): Removed.
1315         (TARGET_IBT_P): Likewise.
1316         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
1317         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
1318         * config/i386/i386.opt (mcet): Update help message.
1319         (mshstk): Likewise.
1320         (mibt): Removed.
1321         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
1322         -mcet as an alias for -mshstk.
1324 2018-04-20  Richard Biener <rguenther@suse.de>
1326         PR middle-end/85475
1327         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
1328         complexity by forcing a single use of the multiply operand.
1330 2018-04-20  Martin Jambor  <mjambor@suse.cz>
1332         ipa/85449
1333         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
1334         recursion dependency to only apply to non-clones.
1336 2018-04-20  Martin Jambor  <mjambor@suse.cz>
1338         ipa/85447
1339         * ipa-cp.c (create_specialized_node): Check that clones of
1340         self-recursive edges exist during IPA-CP.
1342 2018-04-19  Toon Moene  <toon@moene.org>
1344         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
1345         by -O3. 
1347 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
1349         PR tree-optimization/85467
1350         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
1351         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
1352         VECTOR_CST element to type.
1354 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
1356         PR target/85397
1357         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
1358         * config/i386/i386.md (builtin_setjmp_setup): Removed.
1359         (builtin_longjmp): Likewise.
1360         (save_stack_nonlocal): New pattern.
1361         (restore_stack_nonlocal): Likewise.
1363 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
1365         PR target/85404
1366         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
1367         Replace ASM_OUTPUT_LABEL with fprintf.
1369 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
1371         PR target/85417
1372         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
1373         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
1374         * config/i386/i386-c.c (ix86_target_macros_internal): Also
1375         define __IBT__ and __SHSTK__ for -fcf-protection.
1376         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
1377         TARGET_IBT.
1378         (ix86_trampoline_init): Likewise.
1379         (x86_output_mi_thunk): Likewise.
1380         (ix86_notrack_prefixed_insn_p): Likewise.
1381         (ix86_option_override_internal): Don't disallow -fcf-protection.
1382         * config/i386/i386.md (rdssp<mode>): Also enable for
1383         -fcf-protection.
1384         (incssp<mode>): Likewise.
1385         (nop_endbr): Likewise.
1386         * config/i386/i386.opt (mcet): Change help message to built-in
1387         functions only.
1388         (mibt): Likewise.
1389         (mshstk): Likewise.
1390         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
1391         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
1392         enable CET built-in functions.
1394 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
1396         * common/config/i386/i386-common.c 
1397         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
1398         OPTION_MASK_ISA_MOVDIRI_UNSET,
1399         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
1400         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
1401         * config.gcc (movdirintrin.h): New header.
1402         * config/i386/cpuid.h (bit_MOVDIRI,
1403         bit_MOVDIR64B): New bits.
1404         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
1405         and -mmvodir64b.
1406         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
1407         (VOID, PVOID, PCVOID)): New function types.
1408         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
1409         __builtin_ia32_directstoreu_u64,
1410          __builtin_ia32_movdir64b): New builtins.
1411         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
1412         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
1413         and -mmovdiri.
1414         (ix86_valid_target_attribute_inner_p): Ditto.
1415         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
1416         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
1417         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
1418         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
1419         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
1420         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
1421         (movdiri<mode>, movdir64b_<mode>): New.
1422         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
1423         * config/i386/immintrin.h: Include movdirintrin.h.
1424         * config/i386/movdirintrin.h: New file.
1425         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
1427 2018-04-19  Richard Biener  <rguenther@suse.de>
1429         PR middle-end/85455
1430         * cfg.c (clear_bb_flags): When loop state says we have
1431         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
1433 2018-04-19  Richard Biener  <rguenther@suse.de>
1435         PR tree-optimization/84737
1436         * tree-vect-data-refs.c (vect_copy_ref_info): New function
1437         copying restrict info.
1438         (vect_setup_realignment): Use it.
1439         * tree-vectorizer.h (vect_copy_ref_info): Declare.
1440         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
1441         the first DR to all generated stores.
1442         (vectorizable_load): Likewise for loads.
1444 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
1446         PR tree-optimization/85446
1447         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
1448         the integral and pointer types to have the same precision.
1450         * doc/install.texi: Document --disable-cet being the default and
1451         --enable-cet=auto.
1453 2018-04-18  Martin Liska  <mliska@suse.cz>
1455         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
1456         style.
1458 2018-04-18  Martin Liska  <mliska@suse.cz>
1460         Revert
1461         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
1463         PR ipa/83983
1464         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
1465         arguments if they are comparable.
1467 2018-04-18  Martin Liska  <mliska@suse.cz>
1469         Revert
1470         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
1472         PR lto/84805
1473         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
1474         incomplete types.
1476 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
1478         PR target/85388
1479         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
1480         ENDBR after calling __morestack.
1482 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
1484         PR jit/85384
1485         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
1486         by using gcc_base_ver to generate a gcc_driver_version, and use
1487         it when generating GCC_DRIVER_NAME.
1488         * configure: Regenerate.
1490 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
1492         PR target/81084
1493         * config.gcc: Obsolete powerpc*-*-*spe*.
1495 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
1497         PR debug/84637
1498         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
1499         (stabstr_D): Change type of unum from unsigned int to
1500         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
1501         type.
1503 2018-04-17  Jim Wilson  <jimw@sifive.com>
1505         PR 84856
1506         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
1507         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
1508         Set arg_pointer_offset after using pretend_args_size.
1510 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
1512         PR rtl-optimization/85431
1513         * dse.c (record_store): Ignore zero width stores.
1515         PR sanitizer/85230
1516         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
1517         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
1518         __builtin_stack_restore rather than after it.
1519         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
1520         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
1521         argument instead of virtual_dynamic_stack_rtx.
1523 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1525         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
1526         New prototype.
1527         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
1528         Add note to error message to explain internal mapping of overloaded
1529         built-in function name to non-overloaded built-in function name.
1530         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
1531         function.
1533 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
1535         PR target/85424
1536         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
1537         where the inputs overlap with the output.
1539 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
1541         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
1542         (=v, v) alternative and explicit "memory" attribute.
1543         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
1544         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
1545         attributes.
1546         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
1547         "sselog1" type instead of "sselog".
1548         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
1549         "sselog".  Remove explicit "memory" attribute.
1550         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
1551         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
1552         attributes.
1553         (vec_extract_hi_v32hi): Merge all alternatives into one, use
1554         "sselog1" type instead of "sselog".  Remove explicit "memory"
1555         attribute.
1556         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
1557         use "sselog1" type instead of "sselog".  Remove explicit "memory"
1558         attribute.
1559         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
1560         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
1561         attributes.
1562         (vec_extract_hi_v64qi): Merge all alternatives into one, use
1563         "sselog1" type instead of "sselog".  Remove explicit "memory"
1564         attribute.
1565         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
1566         use "sselog1" type instead of "sselog".  Remove explicit "memory"
1567         attribute.
1569         PR target/85430
1570         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
1572         PR middle-end/85414
1573         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
1574         on a SUBREG.
1576 2018-04-17  Martin Jambor  <mjambor@suse.cz>
1578         PR ipa/85421
1579         * ipa-cp.c (create_specialized_node): Call
1580         expand_all_artificial_thunks if necessary.
1582 2018-04-17  Martin Liska  <mliska@suse.cz>
1584         PR lto/85405
1585         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
1586         in message, remote space in between '_G' and '('.
1588 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
1590         PR target/85281
1591         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
1592         avx512f_vmcmp<mode>3<round_saeonly_name>,
1593         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
1594         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
1595         avx512f_rndscale<mode><round_saeonly_name>,
1596         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
1597         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
1598         Use %<iptr>2 instead of %2 for -masm=intel.
1599         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
1600         avx512f_vcvttss2usi<round_saeonly_name>,
1601         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
1602         -masm=intel.
1603         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
1604         avx512f_vcvttsd2usi<round_saeonly_name>,
1605         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
1606         Use %q1 instead of %1 for -masm=intel.
1607         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
1608         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
1609         of %3 for -masm=intel.
1610         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
1611         -masm=intel.
1612         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
1613         -masm=intel.
1614         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
1615         -masm=intel.
1616         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
1617         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
1618         %g1.
1619         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
1620         -masm=intel.
1621         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
1622         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
1623         %g1 and one with %0 and %1.
1624         (avx512er_vmrcp28<mode><round_saeonly_name>,
1625         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
1626         %1 for -masm=intel.
1627         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
1628         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
1629         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
1630         of %0 and %{%4%} for -masm=intel.
1631         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
1632         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
1633         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
1634         order of %0 and %{%5%}%{z%} for -masm=intel.
1636 2018-04-17  Jan Hubicka  <jh@suse.cz>
1638         PR lto/85405
1639         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
1641 2018-04-17  Martin Liska  <mliska@suse.cz>
1643         PR ipa/85329
1644         * multiple_target.c (create_dispatcher_calls): Set apostrophes
1645         for target_clone error message.  Make default implementation
1646         clone to be a local declaration.
1647         (separate_attrs): Add new argument and check for an empty
1648         string.
1649         (expand_target_clones): Handle it.
1650         (ipa_target_clone): Make redirection just for target_clones
1651         functions.
1653 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
1654             Tom de Vries  <tom@codesourcery.com>
1656         PR middle-end/84955
1657         * omp-expand.c (expand_oacc_for): Add dummy false branch for
1658         tiled basic blocks without omp continue statements.
1660 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
1662         PR target/83660
1663         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
1664         vec_extract expression as having side effects to make sure it gets
1665         a cleanup point.
1667 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
1669         PR target/85403
1670         * config/i386/i386.c (get_builtin_code_for_version): Check
1671         error_mark_node.
1673 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
1675         PR target/84331
1676         * gcc/config.gcc: Support "skylake".
1677         * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
1678         PROCESSOR_SKYLAKE.
1679         * gcc/config/i386/i386.c (m_SKYLAKE): Define.
1680         (processor_target_table): Add "skylake".
1681         (ix86_option_override_internal): Add "skylake".
1682         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
1683         PROCESSOR_CANNONLAKE.
1684         (get_builtin_code_for_version): Fix priority for
1685         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
1686         PROCESSOR_SKYLAKE-AVX512.
1687         * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
1688         (processor_type): Add PROCESSOR_SKYLAKE.
1690 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
1691             Jason Merrill  <jason@redhat.com>
1693         PR c++/85112
1694         * convert.c (convert_to_integer_1): Use direct recursion for
1695         enumeral types and types with a precision less than the number
1696         of bits in their mode.
1698 2018-04-16  Julia Koval  <julia.koval@intel.com>
1700         PR target/84413
1701         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
1702         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
1704 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
1706         PR target/85293
1707         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
1708         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
1709         and -mno-direct-move.
1711 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
1713         PR target/83402
1714         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
1715         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
1716         Ensure negative shifts result in {0}.
1718 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
1720         PR rtl-optimization/79916
1721         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
1722         regs (if any) to define how to gnerate SD moves when LRA is in
1723         progress.
1725 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
1727         PR rtl-optimization/85393
1728         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
1729         * except.c (expand_dw2_landing_pad_for_region): Make static.
1730         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
1731         a label and unconditional jump to old_bb, rather than
1732         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
1733         basic block.
1735         PR rtl-optimization/85376
1736         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
1737         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
1738         instead of a specific value.
1740 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
1741             Bin Cheng  <bin.cheng@arm.com>
1743         PR tree-optimization/82965
1744         PR tree-optimization/83991
1745         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
1746         by_profile_only parameter.
1747         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
1748         information if the loop was predicted to iterate too many times.
1749         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
1751 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
1753         PR lto/71991
1754         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
1755         always inline.
1757 2018-04-13  Martin Liska  <mliska@suse.cz>
1758             Jakub Jelinek  <jakub@redhat.com>
1760         PR middle-end/81657
1761         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
1762         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
1763         * builtins.c (expand_builtin_memory_copy_args): Use
1764         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
1765         handle dest_addr == pc_rtx.
1767 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
1769         PR target/85291
1770         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
1771         asked to not generate direct moves.
1772         (fix_trunc<mode>si2_stfiwx): Similar.
1773         (fix_trunc<mode>si2_internal): Similar.
1775 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
1777         PR debug/83157
1778         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
1779         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
1780         lookup if dest in some wider mode is known to be const0_rtx and
1781         if so, record permanent equivalence for it to be ZERO_EXTEND of
1782         the narrower mode destination.
1784 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
1786         * lto-streamer-out.c (output_function): Revert 259346.
1787         * omp-expand.c (expand_oacc_for): Likewise.
1789 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
1791         PR rtl-optimization/85354
1792         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
1793         * sel-sched.c (sel_global_init): ... here.
1795 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
1797         PR target/85238
1798         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
1799         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
1800         mode for PE-COFF targets.
1801         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
1802         (i386_pe_asm_lto_end): Likewise.
1803         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
1804         (TARGET_ASM_LTO_END): Likewise.
1805         * config/i386/winnt.c (saved_debug_info_level): New static variable.
1806         (i386_pe_asm_lto_start): New function.
1807         (i386_pe_asm_lto_end): Likewise.
1809 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
1810             Richard Biener  <rguenther@suse.de>
1812         PR middle-end/84955
1813         * lto-streamer-out.c (output_function): Fix CFG loop state before
1814         streaming out.
1815         * omp-expand.c (expand_oacc_for): Handle calls to internal
1816         functions like regular functions.
1818 2018-04-12  Richard Biener  <rguenther@suse.de>
1820         PR lto/85371
1821         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
1822         for the early LTO debug to properly generate references to it
1823         during DIE emission.  Do not re-use that for the skeleton for
1824         split-dwarf.
1825         (dwarf2out_early_finish): Likewise.
1827 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
1829         PR target/85328
1830         * config/i386/sse.md
1831         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
1832         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
1833         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
1834         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
1835         and output is a reg, avoid creating invalid lowpart subreg, but
1836         instead split into a 512-bit move.  Don't split if not AVX512VL,
1837         input is xmm16+ reg and output is a mem.
1838         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
1839         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
1840         xmm16+ reg and output is a mem.
1842 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
1844         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
1845         also for flag_dwarf2_cfi_asm.
1847 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
1849         PR rtl-optimization/85342
1850         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
1851         a bool scalar var inside of the loop instead.  Don't try to update
1852         recog_data.operand after failed apply_change_group.
1854 2018-04-12  Tom de Vries  <tom@codesourcery.com>
1856         PR target/85296
1857         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
1858         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
1859         array with flexible array member as array without given dimension.
1860         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
1861         argument for undefined param to true.
1863 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
1865         PR target/85321
1866         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
1867         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
1868         from PowerPC section.
1869         * config/rs6000/sysv4.opt (mcall-): Improve help text.
1870         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
1871         help text that is too long.
1872         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
1873         help text that is too long.
1874         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
1875         help text that is too long.
1877 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
1879         * config/alpha/alpha.md (stack_probe_internal): Rename
1880         from "probe_stack".  Update all callers.
1882 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
1884         PR rtl-optimization/84566
1885         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
1886         sched_macro_fuse_insns.
1888 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
1890         PR target/84301
1891         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
1892         (compute_block_dependences): ... from here.
1894 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
1896         PR tree-optimization/85331
1897         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
1898         from int to HOST_WIDE_INT.
1900 2018-04-11  Martin Jambor  <mjambor@suse.cz>
1902         PR ipa/84149
1903         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
1904         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
1905         not the same as the source val.
1906         (cgraph_edge_brings_value_p): New parameter.
1907         (gather_edges_for_value): Pass destination value to
1908         cgraph_edge_brings_value_p.
1909         (perhaps_add_new_callers): Likewise.
1910         (get_info_about_necessary_edges): Likewise and exclude values brought
1911         only by self-recursive edges.
1912         (create_specialized_node): Redirect only clones of self-calling edges.
1913         (+self_recursive_pass_through_p): New function.
1914         (find_more_scalar_values_for_callers_subset): Use it.
1915         (find_aggregate_values_for_callers_subset): Likewise.
1916         (known_aggs_to_agg_replacement_list): Removed.
1917         (decide_whether_version_node): Re-calculate known constants for all
1918         remaining context clones.
1920 2018-04-11  Richard Biener  <rguenther@suse.de>
1922         PR lto/85339
1923         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
1924         from early DWARF output.
1925         (dwarf2out_early_finish): Output line info unconditionally into
1926         early DWARF and add reference to it.
1928 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
1930         PR target/85281
1931         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
1932         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
1933         other than V2DFmode using iptr mode attribute.
1934         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
1936 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
1938         PR rtl-optimization/84659
1939         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
1941 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
1943         PR debug/85302
1944         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
1945         SIZEP is NULL.
1946         (output_loc_list): Pass address of a dummy size variable even in the
1947         locview handling loop.
1948         (index_location_lists): Add comment on why skip_loc_list_entry can't
1949         call size_of_locs.
1951 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
1953         PR target/85261
1954         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
1955         into register.
1957 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
1959         PR target/85321
1960         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
1961         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
1962         and -mstring-compare-inline-limit.
1964 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
1966         PR target/85287
1967         * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
1968         for stack clash protection in a register whenever we need it to be in
1969         a register.
1971 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
1973         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
1974         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
1976 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
1978         PR target/85321
1979         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
1980         the help text.
1981         (mlong-double-): Ditto.
1982         * config/rs6000/sysv4.opt (msdata=): Ditto.
1983         (mtls-size=): Ditto.
1985 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
1987         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
1988         erroneous entries for
1989         "vector int vec_ldl (int, long int *)", and
1990         "vector unsigned int vec_ldl (int, unsigned long int *)".
1991         Add comments and entries for
1992         "vector bool char vec_ldl (int, bool char *)",
1993         "vector bool short vec_ldl (int, bool short *)",
1994         "vector bool int vec_ldl (int, bool int *)",
1995         "vector bool long long vec_ldl (int, bool long long *)",
1996         "vector pixel vec_ldl (int, pixel *)",
1997         "vector long long vec_ldl (int, long long *)",
1998         "vector unsigned long long vec_ldl (int, unsigned long long *)".
1999         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
2000         type tree bool_long_long_type_node and correct definition of
2001         bool_V2DI_type_node to make reference to this new type tree.
2002         (rs6000_mangle_type): Replace erroneous reference to
2003         bool_long_type_node with bool_long_long_type_node.
2004         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
2005         comments to emphasize sign distinctions for char and int types and
2006         replace RS6000_BTI_bool_long constant with
2007         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
2008         use of RS6000_BTI_pixel.
2009         (bool_long_type_node): Remove this macro definition.
2010         (bool_long_long_type_node): New macro definition
2012 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
2014         PR rtl-optimization/85300
2015         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
2016         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
2017         simplify_unary_operation fails.
2019 2018-04-10  Martin Liska  <mliska@suse.cz>
2021         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
2022         cgraph_edge and ipa_ref.
2024 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
2026         PR target/85177
2027         PR target/85255
2028         * config/i386/sse.md
2029         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
2030         computation of the VEC_MERGE selector from mask.
2031         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
2032         Fix decoding of the VEC_MERGE selector into mask.
2034 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
2036         PR tree-optimization/85286
2037         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
2039 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
2041         * final.c (final_1): Set insn_last_address as well as
2042         insn_current_address.
2044 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2046         PR target/85173
2047         * explow.c (emit_stack_probe): Call validize_mem on memory location
2048         before passing it to gen_probe_stack.  Create address operand and
2049         legitimize it for the probe_stack_address case.
2051 2018-04-09  Jan Hubicka  <jh@suse.cz>
2053         PR lto/85078
2054         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
2055         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
2056         * tree.c (free_lang_data_in_type): Fix handling of binfos;
2057         walk basetypes.
2058         (free_lang_data): Rebuild type inheritance graph.
2060 2018-04-09  Martin Sebor  <msebor@redhat.com>
2062         * invoke.texi (-finline-small-functions): Mention other optimization
2063         options.
2064         (-findirect-inlining, -fpartial-inlining): Same.
2065         (-finline-functions-called-once): Same.
2066         (-freorder-blocks-and-partition): Same.
2068 2018-04-09  Jan Hubicka  <jh@suse.cz>
2070         PR rtl/84058
2071         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
2072         jumps; choose last target that matches the criteria (i.e.
2073         no partition changes for non-crossing jumps).
2074         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
2075         support for redirecting crossing jumps to non-crossing.
2077 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
2079         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
2080         also for naked functions.
2082 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
2084         * config/arc/arc.md (add_shift): New pattern.
2085         (add_shift2): Likewise.
2086         (sub_shift): Likewise.
2087         (sub_shift_cmp0_noout): Likewise.
2088         (compare_si_ashiftsi): Likewise.
2089         (xbfu_cmp0_noout): New combine pattern.
2090         (xbfu_cmp0"): Likewise.
2091         (movsi_set_cc_insn): Place the predicable variant first.
2092         (commutative_binary_cmp0_noout): Remove clobber.
2093         (commutative_binary_cmp0): New pattern.
2094         (noncommutative_binary_cmp0): Likewise.
2095         (noncommutative_binary_cmp0_noout): Likewise.
2096         (noncommutative_binary_comparison_result_used): Removed.
2097         (rsub_cmp0): New pattern.
2098         (rsub_cmp0_noout): Likewise.
2099         (extzvsi): Changed, keep only meaningful variants.
2100         (SQH, SEZ): New iterators.
2101         (SQH_postfix): New mode attribute.
2102         (SEZ_prefix): New code attribute.
2103         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
2104         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
2105         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
2106         of numerical value.
2107         (noncommutative_operator): Check the availability of barrel
2108         shifter option.
2110 2018-04-09  Richard Biener  <rguenther@suse.de>
2112         PR tree-optimization/85284
2113         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
2114         Only use the niter constraining form of simple_iv when the exit
2115         is always executed.
2117 2018-04-09  Tom de Vries  <tom@codesourcery.com>
2119         PR target/84041
2120         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
2121         (define_expand "*memory_barrier"): New define_expand.
2122         (define_insn "memory_barrier"): New insn.
2124 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
2126         PR rtl-optimization/80463
2127         PR rtl-optimization/83972
2128         PR rtl-optimization/83480
2130         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
2131         correct producer for the insn.
2132         (tidy_control_flow): Fixup seqnos in case of debug insns.
2134 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
2136         PR rtl-optimization/83913
2138         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
2139         different sched-times when merging exprs.
2141 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
2143         PR rtl-optimization/83962
2145         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
2146         tidy_fallthru_edge and tidy_control_flow.
2148 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
2150         PR rtl-optimization/83530
2152         * sel-sched.c (force_next_insn): New global variable.
2153         (remove_insn_for_debug): When force_next_insn is true, also leave only
2154         next insn in the ready list.
2155         (sel_sched_region): When the region wasn't scheduled, make another pass
2156         over it with force_next_insn set to 1.
2158 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
2160         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
2161         into tm_file.
2162         * config/nds32/constants.md (unspec_volatile_element): Add enum values
2163         for interrupt control.
2164         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
2165         functions for interrupt control.
2166         * config/nds32/nds32-intrinsic.md: Likewise.
2167         * config/nds32/nds32_intrinsic.h: Likewise.
2168         * config/nds32/nds32.h (nds32_builtins): Likewise.
2170 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
2172         * config/nds32/nds32.c (nds32_init_machine_status,
2173         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
2174         strict_aligned_p field.
2175         (nds32_expand_to_rtl_hook): New function.
2176         (TARGET_EXPAND_TO_RTL_HOOK): Define.
2177         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
2179 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
2180             Chung-Ju Wu  <jasonwucj@gmail.com>
2182         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
2183         * config/nds32/nds32-n7.md: New file.
2184         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
2185         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
2186         pipeline.
2187         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
2188         * config/nds32/nds32.md (pipeline_model): Add n7.
2189         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
2190         * config/nds32/pipelines.md: Include n7 settings.
2192 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
2193             Chung-Ju Wu  <jasonwucj@gmail.com>
2195         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
2196         * config/nds32/nds32-e8.md: New file.
2197         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
2198         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
2199         pipeline.
2200         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
2201         * config/nds32/nds32.md (pipeline_model): Add e8.
2202         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
2203         * config/nds32/pipelines.md: Include e8 settings.
2205 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
2206             Chung-Ju Wu  <jasonwucj@gmail.com>
2208         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
2209         * config/nds32/nds32-n8.md: New file.
2210         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
2211         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
2212         pipeline.
2213         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
2214         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
2215         * config/nds32/nds32.md (pipeline_model): Add n8.
2216         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
2217         * config/nds32/pipelines.md: Include n8 settings.
2219 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
2220             Chung-Ju Wu  <jasonwucj@gmail.com>
2222         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
2223         * config/nds32/nds32-n9-2r1w.md: New file.
2224         * config/nds32/nds32-n9-3r2w.md: New file.
2225         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
2226         nds32_register_ports): New or modify for cpu n9.
2227         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
2228         pipeline.
2229         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
2230         * config/nds32/nds32-utils.c: New file.
2231         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
2232         TARGET_MUL_SLOW): Define.
2233         * config/nds32/nds32.md (pipeline_model): New attribute.
2234         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
2235         New options that support cpu n9.
2236         * config/nds32/pipelines.md: Include n9 settings.
2237         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
2239 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
2241         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
2242         information if necessary.
2243         (output_cond_branch_compare_zero): Likewise.
2244         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
2245         (nds32_target_alignment): Refine for alignment.
2246         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
2247         (FUNCTION_BOUNDARY): Modify.
2248         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
2249         align case.
2250         * config/nds32/nds32.opt (malways-align, malign-functions): New.
2252 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
2254         * config/nds32/constants.md (unspec_volatile_element): Add values for
2255         TLB operation and data prefetch.
2256         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
2257         functions for TLB operation and data prefetch.
2258         * config/nds32/nds32-intrinsic.md: Likewise.
2259         * config/nds32/nds32_intrinsic.h: Likewise.
2260         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
2261         (nds32_print_operand): Likewise.
2262         * config/nds32/nds32.h (nds32_builtins): Likewise.
2264 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
2265         Andrew Pinski <pinsika@gcc.gnu.org>
2267         PR middle-end/82976
2268         * match.pd: Use constant_boolean_node of correct type instead of
2269         boolean_true_node or boolean_false_node for simplifying
2270         pointer comparisons to zero.
2272 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
2274         PR tree-optimization/80021
2275         * tree.c (verify_type_variant): Make error call in verify_variant_match
2276         translatable and remove final full stop.
2278 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
2280         * config/nds32/constants.md (unspec_volatile_element): Add
2281         UNSPEC_VOLATILE_EH_RETURN.
2282         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
2283         nds32_output_stack_pop): Support dwarf exception handling process.
2284         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
2285         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
2286         exception handling process.
2287         (nds32_compute_stack_frame): Likewise.
2288         (nds32_return_addr_rtx): Likewise.
2289         (nds32_initial_elimination_offset): Likewise.
2290         (nds32_expand_prologue): Likewise.
2291         (nds32_expand_epilogue): Likewise.
2292         (nds32_dynamic_chain_address): New function.
2293         * config/nds32/nds32.h (machine_function): Add fields for dwarf
2294         exception handling.
2295         (DYNAMIC_CHAIN_ADDRESS): Define.
2296         (EH_RETURN_DATA_REGNO): Define.
2297         (EH_RETURN_STACKADJ_RTX): Define.
2298         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
2299         patterns for dwarf exception handling.
2301 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
2303         * config/nds32/nds32.h: Clean up obsolete macros.
2305 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
2307         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
2308         Add enum values for particular instructions.
2309         * config/nds32/nds32-intrinsic.c: Implementation of expanding
2310         particular intrinsic functions.
2311         * config/nds32/nds32-intrinsic.md: Likewise.
2312         * config/nds32/nds32_intrinsic.h: Likewise.
2313         * config/nds32/nds32.h (nds32_builtins): Likewise.
2314         * config/nds32/nds32.md (type): Add pbsad and pbsada.
2315         (btst, ave): New patterns for particular instructions.
2317 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
2319         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
2320         Add enum values for atomic load/store and memory sync.
2321         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
2322         and memory sync.
2323         * config/nds32/nds32-intrinsic.md: Likewise.
2324         * config/nds32/nds32_intrinsic.h: Likewise.
2325         * config/nds32/nds32.h (nds32_builtins): Likewise.
2327 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
2329         PR tree-optimization/85257
2330         * fold-const.c (native_encode_vector): If not all elts could fit
2331         and off is -1, return 0 rather than offset.
2332         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
2333         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
2334         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
2335         adjust buffer in native_interpret_expr call.
2337 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
2339         * config/nds32/constants.md (unspec_volatile_element): Add cache
2340         control enum values.
2341         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
2342         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
2343         * config/nds32/nds32.c (nds32_cctl_names): New.
2344         (nds32_print_operand): Handle cache control register names.
2345         * config/nds32/nds32.h (nds32_builtins): New enum values.
2346         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
2347         macros.
2348         * config/nds32/nds32.md (type): Add mmu.
2349         * config/nds32/pipelines.md (simple_insn): Add mmu.
2351 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
2353         * config/nds32/nds32.md (type): Remove call.
2354         * config/nds32/pipelines.md (simple_insn): Likewise.
2356 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
2358         * config/nds32/constants.md (unspec_volatile_element): Add
2359         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
2360         UNSPEC_VOLATILE_FMFCFG.
2361         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
2362         description for fmfcfg and fmfcsr.
2363         (bdesc_1arg): Add fmtcsr.
2364         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
2365         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
2366         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
2367         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
2368         unspec_fmfcfg): New patterns.
2369         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
2370         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
2371         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
2372         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
2373         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
2374         __nds32__fmfcfg): Define.
2376 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
2378         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
2379         intrinsic register names.
2380         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
2381         intrinsic register enum values and macros.
2383 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
2385         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
2386         for load/store addressing form.
2387         (nds32_print_operand_address): Likewise.
2389 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
2391         PR target/85196
2392         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
2393         based on LABEL_REF.  Remove useless assertion.
2394         (pic_address_needs_scratch): Fix formatting.
2395         (sparc_legitimize_pic_address): Minor tweaks.
2396         (sparc_delegitimize_address): Adjust assertion accordingly.
2397         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
2398         into symbolic_operand.
2399         (movsi_high_pic_label_ref): Likewise.
2400         (movsi_lo_sum_pic_label_ref): Likewise.
2401         (movdi_pic_label_ref): Likewise.
2402         (movdi_high_pic_label_ref): Likewise.
2403         (movdi_lo_sum_pic_label_ref): Likewise.
2405 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
2407         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
2408         custom LIB_SPEC setup.
2410 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
2411             Kito Cheng  <kito.cheng@gmail.com>
2413         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
2414         * config/riscv/freebsd.h: New.
2416 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
2418         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
2419         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
2420         file.
2422 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
2423             Kito Cheng  <kito.cheng@gmail.com>
2425         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
2426         nds32_output_call, nds32_symbol_binds_local_p): New functions.
2427         * config/nds32/nds32-protos.h (nds32_output_call,
2428         nds32_output_return): Declare.
2429         * config/nds32/nds32.md: Refine all the call and return patterns.
2431 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
2433         PR debug/85252
2434         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
2435         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
2437         PR rtl-optimization/84872
2438         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
2439         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
2440         EDGE_CROSSING edge.
2442 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
2444         * expr.c (copy_blkmode_to_reg): Revert 254862.
2445         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
2447 2018-04-06  Richard Biener  <rguenther@suse.de>
2449         PR middle-end/85244
2450         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
2451         after seeing a component reference with an adjacent field.  Treat
2452         refs to arrays at struct end of external decls similar to
2453         refs to unconstrained commons.
2455 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
2457         PR sanitizer/85213
2458         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
2459         look through SAVE_EXPRs with non-side-effects argument.  Adjust
2460         recursive calls.
2461         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
2462         save_p here.
2464 2018-04-06  Richard Biener  <rguenther@suse.de>
2466         PR middle-end/85180
2467         * alias.c (find_base_term): New wrapper around find_base_term
2468         unwinding CSELIB_VAL_PTR changes.
2469         (find_base_term): Do not restore CSELIB_VAL_PTR during the
2470         recursion.
2472 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2474         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
2475         instructions.
2476         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
2477         constant definitions.
2478         ("nop"): lr 0,0 -> nopr r0
2479         ("nop_lr0", "nop_lr1"): New insn definitions.
2481 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
2483         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
2484         NDS32_V3PUSH_AVAILABLE_P macro.
2486 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
2487             Chung-Ju Wu  <jasonwucj@gmail.com>
2489         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
2490         (nds32*-*-*): Add float and fpu_config into supported_defaults.
2491         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
2492         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
2493         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
2494         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
2495         * config/nds32/constraints.md: New constraints and checking for hard
2496         float configuration.
2497         * config/nds32/iterators.md: New mode iterator and attribute for hard
2498         float configuration.
2499         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
2500         patterns.
2501         * config/nds32/nds32-fpu.md: New file.
2502         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
2503         deal with hard float code generation.
2504         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
2505         ARCH_V3S.
2506         (abi_type, float_reg_number): New enum type.
2507         * config/nds32/nds32-predicates.c: New predicates for hard float.
2508         * config/nds32/nds32-protos.h: Declare functions for hard float.
2509         * config/nds32/nds32.c: Implementation for hard float configuration.
2510         * config/nds32/nds32.h: Definitions for hard float configuration.
2511         * config/nds32/nds32.md: Include hard float machine description and
2512         modify patterns for hard float configuration.
2513         * config/nds32/nds32.opt: New options for hard float configuration.
2514         * config/nds32/predicates.md: New predicates for hard float
2515         configuration.
2517 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
2519         * common/config/nds32/nds32-common.c
2520         (nds32_option_optimization_table): Enable -mreleax-hint by default.
2522 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
2524         PR middle-end/85195
2525         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
2526         CONSTRUCTOR_ELT (ctor, ...)->value.
2528 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
2530         PR target/85193
2531         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
2533 2018-04-05  Tom de Vries  <tom@codesourcery.com>
2535         PR target/85204
2536         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
2537         cond jump.
2539 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
2540             Kito Cheng  <kito.cheng@gmail.com>
2542         * config/nds32/constraints.md (U33): Fine-tune checking condition.
2543         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
2544         * config/nds32/nds32.h (nds32_16bit_address_type): Add
2545         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
2547 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
2548             Kito Cheng  <kito.cheng@gmail.com>
2550         * config/nds32/constraints.md (Ufe): New memory constraint.
2551         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
2552         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
2553         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
2554         operands.
2555         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
2556         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
2558 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
2560         * config/nds32/nds32.md: Use optimize_size in the condition for
2561         alu-shift instructions.
2563 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
2565         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
2567 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
2569         * config/nds32/nds32.md (negsi2): Refine pattern.
2571 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
2572             Chung-Ju Wu  <jasonwucj@gmail.com>
2574         * config/nds32/iterators.md (shift_rotate): New code iterator.
2575         (shift): New code attribute.
2576         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
2577         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
2578         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
2579         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
2580         bit-wise operations.
2581         (andsi3, *andsi3): Ditto.
2582         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
2583         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
2584         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
2585         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
2586         nds32_ior_operand, nds32_xor_operand): New predicates.
2588 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
2590         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
2591         (addsi3, subsi3): ... this.
2593 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
2595         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
2597 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
2599         * config/nds32/nds32.md: Adjust indention.
2601 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
2603         * config/nds32/nds32.md (feature): New attribute.
2605 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
2607         * config/nds32/nds32.md (subtype): New attribute.
2609 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
2611         PR target/85203
2612         * config/arm/arm-builtins.c (arm_expand_builtin): Change
2613         expansion to perform a bitwise AND of the argument followed by a
2614         boolean negation of the result.
2616 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
2618         PR rtl-optimization/84878
2619         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
2620         the basic block.  Assert the use reference is not artificial and that
2621         it has an associated insn.
2623 2018-04-04  Michael Matz  <matz@suse.de>
2625         * builtins.c (compute_objsize): Pass correct operand
2626         to array_at_struct_end_p.
2628 2018-04-04  Richard Biener  <rguenther@suse.de>
2630         PR lto/85176
2631         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
2632         from contexts for DINFO_LEVEL_TERSE and below.
2634 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
2636         * config/nds32/nds32-doubleword.md (move_<mode>): Require
2637         resiter_operand condition.
2638         * config/nds32/nds32.md (*move<mode>): Ditto.
2640 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
2641             Monk Chiang  <sh.chiang04@gmail.com>
2643         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
2645 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
2647         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
2649 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
2650             Kito Cheng  <kito.cheng@gmail.com>
2652         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
2653         nds32_cond_code_str, output_cond_branch,
2654         output_cond_branch_compare_zero, nds32_expand_cbranch,
2655         nds32_expand_cstore, nds32_expand_movcc,
2656         nds32_output_cbranchsi4_equality_zero,
2657         nds32_output_cbranchsi4_equality_reg,
2658         nds32_output_cbranchsi4_equality_reg_or_const_int,
2659         nds32_output_cbranchsi4_greater_less_zero: New functions.
2660         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
2661         nds32_expand_cstore, nds32_expand_movcc,
2662         nds32_output_cbranchsi4_equality_zero,
2663         nds32_output_cbranchsi4_equality_reg,
2664         nds32_output_cbranchsi4_equality_reg_or_const_int,
2665         nds32_output_cbranchsi4_greater_less_zero): Declare.
2666         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
2667         nds32_rimm11s_operand): New predicates.
2668         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
2669         * config/nds32/nds32.md: Rewrite all the branch and conditional move
2670         patterns.
2672 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
2674         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
2675         * config/nds32/nds32.md: Ditto.
2676         * config/nds32/pipelines.md: Ditto.
2678 2018-04-04  Richard Biener  <rguenther@suse.de>
2680         PR tree-optimization/85168
2681         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
2682         propagating abnormals.
2684 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
2686         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
2688 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
2689             Kito Cheng  <kito.cheng@gmail.com>
2691         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
2692         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
2693         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
2694         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
2695         * config/nds32/nds32.md (sibcall_internal): New.
2696         (sibcall_register): Remove.
2697         (sibcall_immediate): Remove.
2698         (sibcall_value_internal): New.
2699         (sibcall_value_register): Remove.
2700         (sibcall_value_immediate): Remove.
2701         * config/nds32/predicates.md (nds32_general_register_operand): New.
2702         (nds32_call_address_operand): New.
2704 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
2706         PR rtl-optimization/85167
2707         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
2708         bb_defs if *split_p, instead preinitialize it to NULL.
2710         PR tree-optimization/85156
2711         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
2712         evaluating the argument multiple times.
2714 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
2716         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
2717         than vector.
2718         (_mm_cvtpd_ps): Likewise.
2719         (_mm_cvttpd_epi32): Likewise.
2720         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
2721         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
2722         vector, pixel, and bool following altivec.h include.
2724 2018-04-03  Martin Sebor  <msebor@redhat.com>
2726         * doc/extend.texi (Common Function Attributes): Clarify.
2727         (const attribute): Likewise.
2728         (pure attribute): Likewise.
2730 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
2732         PR target/85169
2733         * config/i386/i386.c (ix86_expand_vector_set): Use
2734         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
2736 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
2738         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
2739         instructions when changing rounding bits to preserve precision bits
2740         in the x87 control word.
2742 2018-04-03  Martin Liska  <mliska@suse.cz>
2744         PR tree-optimization/82491
2745         * rtl.h (strip_offset_and_add): Replace += suboffset with
2746         poly_uint64 () + suboffset.
2748 2018-03-29  Martin Liska  <mliska@suse.cz>
2749             Martin Jambor  <mjambor@suse.cz>
2751         PR ipa/84947
2752         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
2753         param_type is not an integral or pointer type.
2755 2018-04-03  Richard Biener  <rguenther@suse.de>
2757         * sese.h (recompute_all_dominators): Remove.
2759 2018-04-02  Martin Sebor  <msebor@redhat.com>
2761         * doc/invoke.texi (-Wrestrict): Fix typos.
2763 2018-04-02  Jim Wilson  <jimw@sifive.com>
2765         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
2766         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
2767         (<optab>di3, <optab>si3_extend): Likewise.
2768         (<optab>si3_mask, <optab>si3_mask_1): New.
2769         (<optab>di3_mask, <optab>di3_mask_1): New.
2770         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
2771         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
2772         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
2774 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
2776         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
2777         example.
2779 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
2781         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
2782         (nds32_canonicalize_comparison): New function.
2784 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
2785             Kito Cheng  <kito.cheng@gmail.com>
2786             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
2788         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
2789         * config/nds32/constants.md (unspec_volatile_element): Add
2790         UNSPEC_VOLATILE_RELAX_GROUP.
2791         * config/nds32/nds32-relax-opt.c: New file.
2792         * config/nds32/nds32-predicates.c
2793         (nds32_symbol_load_store_p): New function.
2794         * config/nds32/nds32-protos.h
2795         (nds32_symbol_load_store_p): Declare function.
2796         (make_pass_nds32_relax_opt): Declare new rtl pass function.
2797         * config/nds32/nds32.c
2798         (nds32_register_pass): New function to register pass.
2799         (nds32_register_passes): New function to register passes.
2800         * config/nds32/nds32.md (relax_group): New pattern.
2801         * config/nds32/nds32.opt (mrelax-hint): New option.
2802         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
2804 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
2806         * config/nds32/t-nds32: Modify files dependency.
2808 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
2810         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
2811         (PROFILE_HOOK): Define its implementation.
2813 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
2815         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
2816         type and 32-bit size.
2818 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
2820         PR middle-end/85090
2821         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
2822         (V_128_256): New mode iterator.
2823         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
2824         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
2825         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
2826         of V.
2827         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
2828         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
2830 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
2832         PR target/83315
2833         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
2834         NaN inputs correctly.
2836 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
2838         PR target/80546
2839         * config/rs6000/vsx.md (??r): New mode attribute.
2840         (*vsx_mov<mode>_64bit): Use it.
2841         (*vsx_mov<mode>_32bit): Likewise.
2843 2018-03-30  Martin Sebor  <msebor@redhat.com>
2845         PR tree-optimization/84818
2846         * builtins.c (check_access): Use warning_n.
2848 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
2850         PR target/83822
2851         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
2852         condition.
2853         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
2854         condition.
2856 2018-03-30  Julia Koval  <julia.koval@intel.com>
2858         PR target/84413
2859         * x86-tune.def (movx, partial_reg_dependency): Enable for
2860         m_SKYLAKE_AVX512.
2862 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
2864         PR inline-asm/84985
2865         * lra-constraints.c (process_alt_operands): Move setting
2866         this_alternative_matches below.
2868 2018-03-29  Martin Liska  <mliska@suse.cz>
2870         PR lto/84995.
2871         * doc/invoke.texi: Document how LTO works with debug info.
2872         Describe auto-load support of binutils.  Mention 'x86-64'
2873         as valid option value of -march option.
2875 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
2877         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
2879         PR c/85094
2880         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
2881         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
2882         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
2883         checking.
2885 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
2887         PR target/84912
2888         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
2889         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
2890         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
2891         for RS6000_BTM_POWERPC64.
2892         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
2893         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
2894         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
2895         definition.
2896         (DIVDE): Use it.
2897         (DIVDEU): Likewise.
2899 2018-03-28 Carl Love  <cel@us.ibm.com>
2901         Revert
2902         2017-09-27  Carl Love  <cel@us.ibm.com>
2904         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
2905         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
2906         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
2907         fctiw instruction.
2909 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
2911         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
2912         instead of __vector bool.
2913         (_mm_max_pu8): Likewise.
2914         (_mm_min_pi16): Likewise.
2916 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
2918         PR target/84912
2919         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
2920         (DIVWEUO): Likewise.
2921         (DIVDEO): Likewise.
2922         (DIVDEUO): Likewise.
2923         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
2924         DIVWEUO and DIVDEUO.
2925         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
2926         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
2927         (div_extend): Likewise.
2928         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
2929         builtin function.
2930         (__builtin_divweuo): Likewise.
2931         (__builtin_divdeo): Likewise.
2932         (__builtin_divdeuo): Likewise.
2934 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
2936         PR target/85095
2937         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
2938         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
2940         PR tree-optimization/82004
2941         * gimple-match-head.c (optimize_pow_to_exp): New function.
2942         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
2943         Don't fold to exp if optimize_pow_to_exp is false.
2945 2018-03-28  Martin Liska  <mliska@suse.cz>
2947         PR other/84819
2948         * calls.c (initialize_argument_information): Fix trailing space.
2949         * common.opt: Fix typo and provide better explanation for
2950         -fsanitize-coverage option.
2951         * config/i386/i386.opt: Fix typo.
2953 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
2954             Martin Liska  <mliska@suse.cz>
2956         PR sanitizer/85081
2957         * gimplify.c (asan_poison_variable): Don't do the check for
2958         gimplify_omp_ctxp here.
2959         (gimplify_decl_expr): Do it here.
2960         (gimplify_target_expr): Likewise.
2962 2018-03-28  Martin Liska  <mliska@suse.cz>
2964         PR target/84988
2965         * config/i386/i386.c (ix86_function_arg_advance): Do not call
2966         chkp_type_bounds_count if MPX is not enabled.
2968 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
2970         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
2972 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
2974         PR target/84914
2975         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
2976         function to create the function decl for complex long double
2977         multiply and divide for -mabi=ieeelongdouble.
2978         (init_float128_ieee): Call it.
2980 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
2982         PR target/85044
2983         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
2984         -fcf-protection=branch -mibt.
2985         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
2987 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
2989         PR target/81863
2990         * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
2992 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
2994         PR target/85056
2995         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
2996         extern array declarations.
2998 2018-03-27  Richard Biener  <rguenther@suse.de>
3000         PR middle-end/84067
3001         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
3002         explicit single_use checks.
3004 2018-03-27  Richard Biener  <rguenther@suse.de>
3006         PR tree-optimization/85082
3007         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
3008         Valueize the VUSE.
3010 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3012         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
3013         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
3014         Turn on fasynchronous-unwind-tables and funwind-tables.
3016 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
3018         PR target/85073
3019         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
3020         (*bmi_blsr_<mode>_ccz): Ditto.
3022 2018-03-26  Tom de Vries  <tom@codesourcery.com>
3024         PR tree-optimization/85063
3025         * omp-general.c (offloading_function_p): New function.  Factor out
3026         of ...
3027         * omp-offload.c (pass_omp_target_link::gate): ... here.
3028         * omp-general.h (offloading_function_p): Declare.
3029         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
3030         with attribute omp declare target for offloading functions.
3032 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
3034         PR tree-optimization/84005
3035         * tree-data-ref.h (get_base_for_alignment): Declare.
3036         * tree-data-ref.c (get_base_for_alignment_1): New function.
3037         (get_base_for_alignment): Likewise.
3038         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
3039         get_base_for_alignment to find a suitable base object, instead
3040         of always using drb->base_address.
3042 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
3044         PR inline-asm/85022
3045         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
3046         known size by default.
3048 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
3050         PR inline-asm/85030
3051         * lra-constraints.c (process_alt_operands): Don't match BLKmode
3052         and non BLKmode operands.
3054 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3056         PR target/85026
3057         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
3058         Clean up attributes.
3060 2018-03-23  Richard Biener  <rguenther@suse.de>
3062         PR debug/85020
3063         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
3064         we are going to emit early debug for LTO.
3066 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
3068         PR inline-asm/85034
3069         * function.c (match_asm_constraints_1): Don't optimize if input
3070         doesn't satisfy general_operand predicate for output's mode.
3072         PR inline-asm/85022
3073         * alias.c (write_dependence_p): Don't require for x_canonicalized
3074         non-VOIDmode if x has VOIDmode.
3076         PR sanitizer/85029
3077         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
3078         just don't try to optimize it rather than assert it never happens.
3080 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3082         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
3083         macro expansions for definition of ST_INTERNAL_<mode> and
3084         LD_INTERNAL_<mode> builtins.
3085         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
3086         Remove prototype.
3087         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
3088         function.
3089         (altivec_expand_st_builtin): Likewise.
3090         (altivec_expand_builtin): Remove calls to deleted functions.
3091         (rs6000_address_for_altivec): Delete this function.
3092         * config/rs6000/vector.md: Remove expands for
3093         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
3095 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
3097         PR target/84826
3098         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
3099         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
3100         re-computing once computed.
3101         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
3102         (arm_init_machine_status): Initialize
3103         machine->static_chain_stack_bytes.
3105 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
3107         PR target/84760
3108         * doc/extend.texi: Add four new prototypes for vec_ld.
3109         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
3110         definitions for more logical presentation.
3111         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
3112         entries for V1TI variants of __builtin_altivec_ld builtin.
3113         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
3114         handling of V1TI variant of LVX icode pattern.
3115         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
3116         (rs6000_gimple_fold_builtin): Likewise.
3117         (altivec_init_builtins): Add code to define
3118         __builtin_altivec_lvx_v1ti function.
3120 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
3122         PR inline-asm/84941
3123         * function.c (match_asm_constraints_1): Don't do the optimization
3124         if input isn't a REG, SUBREG, MEM or constant.
3126 2018-03-22  Tom de Vries  <tom@codesourcery.com>
3128         PR tree-optimization/84956
3129         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
3130         bb_has_abnormal_pred.
3132 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
3134         PR sanitizer/85018
3135         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
3136         DECL_INITIAL (decl) to decl at the end.
3137         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
3138         adjust the comment.
3140 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
3142         * doc/extend.texi (__builtin_tgmath): Document when complex
3143         integer types are treated as _Complex _Float64.
3145 2018-03-21  Tom de Vries  <tom@codesourcery.com>
3147         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
3149 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
3151         PR tree-optimization/84960
3152         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
3153         if it is ENTRY block, move them into single succ of ENTRY in that case.
3155 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
3157         PR tree-optimization/84811
3158         * poly-int.h (poly_span_traits): Remove the T3 parameter and
3159         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
3160         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
3161         (known_subrange_p): Update accordingly.  Cast each value involved
3162         in the size comparison, rather than casting the result of the
3163         subtraction.
3165 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
3167         PR tree-optimization/84982
3168         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
3169         by flipping the least significant bit rather than all bits from
3170         bitpos to bitpos + bitsize - 1.
3172 2018-03-21  Nathan Sidwell  <nathan@acm.org>
3174         * doc/extend.texi (Deprecated Features): Remove mention of
3175         long-deleted deprecations.
3177 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3179         PR jit/84288
3180         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
3181         * configure: Regenerate.
3183 2018-03-21  Tom de Vries  <tom@codesourcery.com>
3185         PR tree-optimization/83126
3186         * tree-parloops.c (num_phis): New function.
3187         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
3189 2018-03-21  Nathan Sidwell  <nathan@acm.org>
3191         * doc/extend.texi (Deprecated Features): Update deprecated flags,
3192         mention anon-struct/union members and trailing attributes.
3194 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
3196         PR tree-optimization/84969
3197         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
3198         builtin memset partitions if they set different rhs values.
3200 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
3202         PR rtl-optimization/84989
3203         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
3204         VEC_DUPLICATE with scalar result mode.
3206 2018-03-21  Martin Liska  <mliska@suse.cz>
3208         PR ipa/84963
3209         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
3210         not intended return statement.
3212 2018-03-21  Martin Liska  <mliska@suse.cz>
3214         PR target/84988
3215         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
3216         (chkp_find_bound_slots_1): Limit number of iterations.
3218 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
3220         PR target/84838
3221         * Minor grammar fixes for x86 options.
3223 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
3225         PR debug/84875
3226         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
3227         holding REG_CFA_RESTORE notes, instead turn them into a USE.
3229 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
3231         PR target/83789
3232         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
3233         (altivec_lvx_<mode>_1op): Likewise.
3234         (altivec_stvx_<mode>_2op): Likewise.
3235         (altivec_stvx_<mode>_1op): Likewise.
3236         (altivec_lvx_<VM2:mode>): New define_expand.
3237         (altivec_stvx_<VM2:mode>): Likewise.
3238         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
3239         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
3240         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
3241         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
3242         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
3243         (rs6000_gen_lvx): Likewise.
3244         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
3245         (altivec_expand_stv_builtin): Likewise.
3246         (altivec_expand_builtin): Likewise.
3247         * config/rs6000/vector.md: Likewise.
3249 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3251         PR target/82518
3252         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
3253         BYTES_BIG_ENDIAN.
3255 2018-03-20  Richard Biener  <rguenther@suse.de>
3257         PR target/84986
3258         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
3259         sign-conversions as zero, fall back to standard scalar_stmt
3260         cost for the rest.
3262 2018-03-20  Martin Liska  <mliska@suse.cz>
3264         PR ipa/84825
3265         * predict.c (rebuild_frequencies): Handle case when we have
3266         PROFILE_ABSENT, but flag_guess_branch_prob is false.
3268 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
3270         PR target/84990
3271         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
3272         flag_section_anchors.
3273         * varasm.c (use_blocks_for_decl_p): Remove hack for
3274         dw2_force_const_mem.
3276         PR target/84845
3277         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
3278         to ...
3279         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
3280         be created, use lowpart_subreg of operands[0] rather than operands[0]
3281         itself.
3282         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
3283         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
3284         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
3285         and n constraint instead of aarch64_shift_imm_di and Usd.
3286         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
3287         (*aarch64_<optab>_reg_minus<mode>3): ... this.
3289 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
3291         PR target/82989
3292         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
3293         to favor GPR over NEON registers.
3294         (<shift>di3_neon): Likewise.
3296 2018-03-20  Tom de Vries  <tom@codesourcery.com>
3298         PR target/84952
3299         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
3300         (nvptx_process_pars): Emit bar.sync asap and alap.
3302 2018-03-20  Tom de Vries  <tom@codesourcery.com>
3304         PR target/84954
3305         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
3306         seen_label if seen_label is already set.
3308 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
3310         PR target/84945
3311         * config/i386/i386.c (fold_builtin_cpu): For features above 31
3312         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
3313         Use 1U instead of 1.  Formatting fixes.
3315         PR c/84953
3316         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
3317         instead of TREE_TYPE (s1) for the return value.
3319 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
3321         PR tree-optimization/84946
3322         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
3323         bitsize + bitsize in poly_uint64 rather than poly_int64.
3325         PR sanitizer/78651
3326         * dwarf2asm.c: Include fold-const.c.
3327         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
3328         of decl rather than decl itself.
3330         PR rtl-optimization/84643
3331         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
3333 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
3335         PR sanitizer/78651
3336         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
3337         calling assemble_variable.
3339 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
3341         PR target/81647
3342         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
3343         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
3345 2018-03-19  Jim Wilson  <jimw@sifive.com>
3347         PR bootstrap/84856
3348         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
3349         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
3350         (riscv_first_stack_step): Likewise.
3351         (riscv_option_override): Use STACK_BOUNDARY instead of
3352         MIN_STACK_BOUNDARY.
3353         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
3354         MIN_STACK_BOUNDARY.
3355         (BIGGEST_ALIGNMENT): Set to 128.
3356         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
3357         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
3358         STACK_BOUNDARY.
3360 2018-03-19  Richard Biener  <rguenther@suse.de>
3362         PR tree-optimization/84933
3363         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
3364         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
3366 2018-03-19  Richard Biener  <rguenther@suse.de>
3368         PR tree-optimization/84859
3369         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
3370         (cond_if_else_store_replacement): Perform sinking operation on
3371         single-store BBs regardless of MAX_STORES_TO_SINK setting.
3372         Generalize what a BB with a single eligible store is.
3374 2018-03-19  Richard Biener  <rguenther@suse.de>
3376         PR tree-optimization/84929
3377         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
3378         chrec_is_positive against non-chrec arg.
3380 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
3382         PR target/84711
3383         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
3385 2018-03-18  Martin Liska  <mliska@suse.cz>
3387         PR rtl-optimization/84635
3388         * regrename.c (build_def_use): Use matches_mode only when
3389         matches >= 0.
3391 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
3393         PR tree-optimization/84913
3394         * tree-vect-loop.c (vectorizable_reduction): Don't try to
3395         vectorize chains of COND_EXPRs.
3397 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
3399         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
3401 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
3403         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
3405 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
3407         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
3409 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
3410             Kito Cheng  <kito.cheng@gmail.com>
3412         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
3413         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
3414         (nds32_adjust_reg_alloc_order): New function.
3415         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
3417 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
3419         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
3420         nds32_print_operand, nds32_print_operand_address): Use
3421         HOST_WIDE_INT_PRINT_DEC instead.
3423 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
3425         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
3427 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
3429         PR target/84902
3430         * config/i386/i386.c (initial_ix86_tune_features,
3431         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
3432         unsigned long long.
3433         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
3434         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
3435         rather than 1u << ix86_tune.  Formatting fix.
3436         (ix86_option_override_internal): Change ix86_arch_mask from
3437         unsigned int to unsigned HOST_WIDE_INT, initialize to
3438         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
3439         (ix86_function_specific_restore): Likewise.
3441 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
3443         PR target/84899
3444         * postreload.c (reload_combine_recognize_pattern): Perform
3445         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
3446         truncate_int_for_mode the result for the destination's mode.
3448         PR c/84909
3449         * hsa-gen.c (mem_type_for_type): Fix comment typo.
3450         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
3451         Likewise.
3452         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
3453         Likewise.
3455 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
3457         PR target/84876
3458         * lra-assigns.c (lra_split_hard_reg_for): Don't use
3459         regno_allocno_class_array and sorted_pseudos.
3460         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
3461         insns where regno is used.
3463 2018-03-16  Martin Liska  <mliska@suse.cz>
3465         PR ipa/84833
3466         * multiple_target.c (create_dispatcher_calls): Redirect
3467         reference in the symbol table.
3469 2018-03-16  Martin Liska  <mliska@suse.cz>
3471         PR ipa/84722
3472         * multiple_target.c (create_dispatcher_calls): Redirect also
3473         an alias.
3475 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
3477         PR c++/79937
3478         PR c++/82410
3479         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
3480         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
3481         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
3483 2018-03-16  Julia Koval  <julia.koval@intel.com>
3485         * doc/invoke.texi (Skylake Server): Add CLWB.
3486         Cannonlake): Remove CLWB.
3488 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
3490         PR tree-optimization/84841
3491         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
3492         1 << 3.
3493         (FLOAT_ONE_CONST_TYPE): Define.
3494         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
3495         (sort_by_operand_rank): Put entries with higher constant_type last
3496         rather than first to match comments.
3498 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
3500         * config/nios2/nios2.md (movsi_internal): Fix thinko in 
3501         split predicate.
3503 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
3505         PR c++/79085
3506         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
3507         check and use address of target always.
3509 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
3511         PR target/84574
3512         * config/i386/i386.c (indirect_thunk_needed): Update comments.
3513         (indirect_thunk_bnd_needed): Likewise.
3514         (indirect_thunks_used): Likewise.
3515         (indirect_thunks_bnd_used): Likewise.
3516         (indirect_return_needed): New.
3517         (indirect_return_bnd_needed): Likewise.
3518         (output_indirect_thunk_function): Add a bool argument for
3519         function return.
3520         (output_indirect_thunk_function): Don't generate alias for
3521         function return thunk.
3522         (ix86_code_end): Call output_indirect_thunk_function to generate
3523         function return thunks.
3524         (ix86_output_function_return): Set indirect_return_bnd_needed
3525         and indirect_return_needed instead of indirect_thunk_bnd_needed
3526         and indirect_thunk_needed.
3528 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
3530         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
3531         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
3532         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
3534 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
3535             Paul Hua <paul.hua.gm@gmail.com>
3537         PR c/84852
3538         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
3540 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
3542         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
3543         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
3544         resp. SFmode cases.
3546 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
3548         PR target/84711
3549         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
3550         instead of GET_MODE_SIZE when comparing Units.
3552 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
3554         PR target/68256
3555         * varasm.c (hash_section): Return an unchangeble hash value
3556         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
3557         Return !aarch64_can_use_per_function_literal_pools_p ().
3559 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
3561         PR target/84860
3562         * optabs.c (emit_conditional_move): Pass address of cmode's copy
3563         rather than address of cmode as last argument to prepare_cmp_insn.
3565 2018-03-15  Julia Koval  <julia.koval@intel.com>
3567         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
3568         F_AVX512VNNI, F_AVX512BITALG): New.
3570 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
3572         PR target/83451
3573         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
3574         insn for floating-point loads and stores.
3576 2018-03-14  Carl Love  <cel@us.ibm.com>
3578         * config/rs6000/rs6000-c.c: Add macro definitions for
3579         ALTIVEC_BUILTIN_VEC_PERMXOR.
3580         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
3581         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
3582         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
3583         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
3584         UNSPEC_VPERMXOR.
3585         * config/doc/extend.texi: Add prototypes for vec_permxor.
3587 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
3589         PR c/84852
3590         * diagnostic-show-locus.c (class layout_point): Convert m_line
3591         from int to linenum_type.
3592         (line_span::comparator): Use linenum "compare" function when
3593         comparing line numbers.
3594         (test_line_span): New function.
3595         (layout_range::contains_point): Convert param "row" from int to
3596         linenum_type.
3597         (layout_range::intersects_line_p): Likewise.
3598         (layout::will_show_line_p): Likewise.
3599         (layout::print_source_line): Likewise.
3600         (layout::should_print_annotation_line_p): Likewise.
3601         (layout::print_annotation_line): Likewise.
3602         (layout::print_leading_fixits): Likewise.
3603         (layout::annotation_line_showed_range_p): Likewise.
3604         (struct line_corrections): Likewise for field m_row.
3605         (line_corrections::line_corrections): Likewise for param "row".
3606         (layout::print_trailing_fixits): Likewise.
3607         (layout::get_state_at_point): Likewise.
3608         (layout::get_x_bound_for_row): Likewise.
3609         (layout::print_line): Likewise.
3610         (diagnostic_show_locus): Likewise for locals "last_line" and
3611         "row".
3612         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
3613         * input.c (selftest::test_linenum_comparisons): New function.
3614         (selftest::input_c_tests): Call it.
3615         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
3616         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
3617         * selftest.h (ASSERT_GT): New macro.
3618         (ASSERT_GT_AT): New macro.
3619         (ASSERT_LT): New macro.
3620         (ASSERT_LT_AT): New macro.
3622 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
3624         PR rtl-optimization/84780
3625         * combine.c (distribute_links): Don't make a link based on pc_rtx.
3627 2018-03-14  Martin Liska  <mliska@suse.cz>
3629         * tree.c (record_node_allocation_statistics): Use
3630         get_stats_node_kind.
3631         (get_stats_node_kind): New function extracted from
3632         record_node_allocation_statistics.
3633         (free_node): Use get_stats_node_kind.
3635 2018-03-14  Richard Biener  <rguenther@suse.de>
3637         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
3638         that the value-set of ANTIC_IN doesn't grow.
3640         Revert
3641         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
3642         member.
3643         (BB_VISITED_WITH_VISITED_SUCCS): New define.
3644         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
3646 2018-03-14  Julia Koval  <julia.koval@intel.com>
3648         * config.gcc (icelake-client, icelake-server): New.
3649         (icelake): Remove.
3650         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
3651         (initial_ix86_arch_features): Ditto.
3652         (PTA_SKYLAKE): Add SGX.
3653         (PTA_ICELAKE): Remove.
3654         (PTA_ICELAKE_CLIENT): New.
3655         (PTA_ICELAKE_SERVER): New.
3656         (ix86_option_override_internal): Split up icelake on icelake client and
3657         icelake server.
3658         (get_builtin_code_for_version): Ditto.
3659         (fold_builtin_cpu): Ditto.
3660         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
3661         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
3662         * config/i386/i386.h (processor_type): Ditto.
3663         * doc/invoke.texi: Ditto.
3665 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
3667         PR sanitizer/83392
3668         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
3669         INTEGER_CST offset, add it together with bitpos / 8 and
3670         sign extend based on POINTER_SIZE.
3672         PR target/84844
3673         Revert
3674         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
3676         PR target/78090
3677         * config/i386/constraints.md (Yc): New register constraint.
3678         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
3679         Use Yc constraint for alternative 2 of operand 0.  Remove
3680         preferred_for_speed attribute.
3682 2018-03-14  Richard Biener  <rguenther@suse.de>
3684         PR tree-optimization/84830
3685         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
3686         with the old one to avoid oscillations.
3688 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
3690         PR target/83712
3691         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
3692         pseudos.
3693         (assign_by_spills): Return a flag of reload assignment failure.
3694         Do not process the reload assignment failures.  Do not spill other
3695         reload pseudos if they has the same reg class.  Update n if
3696         necessary.
3697         (lra_assign): Add a return arg.  Set up from the result of
3698         assign_by_spills call.
3699         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
3700         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
3701         usage_insns if it is not NULL.
3702         (spill_hard_reg_in_range): New function.
3703         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
3704         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
3705         function prototypes.
3706         (lra_assign): Change prototype.
3707         * lra.c (lra): Add code to deal with fails by splitting hard reg
3708         live ranges.
3710 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
3712         * config/riscv/riscv.opt (mrelax): New option.
3713         * config/riscv/riscv.c (riscv_file_start): Emit ".option
3714         "norelax" when riscv_mrelax is disabled.
3715         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
3717 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
3719         PR target/84743
3720         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
3721         reassociation for int modes.
3723 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
3725         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
3726         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
3727         for big-endian.
3728         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
3729         * config/aarch64/aarch64-sve.md
3730         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
3731         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
3732         (*extend<mode><Vwide>2): Rename to...
3733         (aarch64_sve_extend<mode><Vwide>2): ...this.
3734         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
3735         renaming the old pattern to...
3736         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
3737         unsigned packs.
3738         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
3739         define_expand, renaming the old pattern to...
3740         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
3741         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
3742         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
3743         account when deciding which SVE instruction the optab should use.
3744         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
3746 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
3748         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
3749         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
3750         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
3751         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
3752         (tlsdesc_small_<mode>): Turn a define_expand and use
3753         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
3754         (tlsdesc_small_advsimd_<mode>): ...this.
3755         (tlsdesc_small_sve_<mode>): New pattern.
3757 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
3759         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
3760         (UNSPEC_UMUL_HIGHPART): New constants.
3761         (MUL_HIGHPART): New int iteraor.
3762         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
3763         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
3764         define_expand.
3765         (*<su>mul<mode>3_highpart): New define_insn.
3767 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
3769         PR lto/84805
3770         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
3771         incomplete types.
3773 2018-03-13  Martin Liska  <mliska@suse.cz>
3775         PR ipa/84658.
3776         * (sem_item_optimizer::sem_item_optimizer): Initialize new
3777         vector.
3778         (sem_item_optimizer::~sem_item_optimizer): Release it.
3779         (sem_item_optimizer::merge_classes): Register variable aliases.
3780         (sem_item_optimizer::fixup_pt_set): New function.
3781         (sem_item_optimizer::fixup_points_to_sets): Likewise.
3782         * ipa-icf.h: Declare new variables and functions.
3784 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
3786         PR middle-end/84834
3787         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
3788         integer_pow2p@2 and test integer_pow2p in condition.
3789         (A < 0 ? C : 0): Similarly for @1.
3791         PR middle-end/84831
3792         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
3793         characters starting at p contain '\0' character, don't look beyond
3794         that.
3796         PR target/84827
3797         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
3798         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
3800         PR target/84828
3801         * reg-stack.c (change_stack): Change update_end var from int to
3802         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
3803         also call set_block_for_insn on the newly added insns and rescan.
3805         PR target/84786
3806         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
3807         on the last operand.
3809         PR c++/84704
3810         * tree.c (stabilize_reference_1): Return save_expr (e) for
3811         STATEMENT_LIST even if it doesn't have side-effects.
3813 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
3815         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
3817 2018-03-12  Renlin Li  <renlin.li@arm.com>
3819         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
3820         aarch64_output_scalar_simd_mov_immediate.
3822 2018-03-12  Martin Sebor  <msebor@redhat.com>
3824         PR tree-optimization/83456
3825         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
3826         for perfectly overlapping calls to memcpy.
3827         (gimple_fold_builtin_memory_chk): Same.
3828         (gimple_fold_builtin_strcpy): Handle no-warning.
3829         (gimple_fold_builtin_stxcpy_chk): Same.
3830         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
3832 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
3834         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
3835         parameter.  Use it for SFmode.
3836         (rs6000_function_arg_advance_1): Adjust.
3837         (rs6000_function_arg): Adjust.
3838         (rs6000_gimplify_va_arg): Pass false for that new parameter.
3840 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
3842         PR rtl-optimization/84169
3843         PR rtl-optimization/84780
3844         * combine.c (can_combine_p): Check for a 2-insn combination whether
3845         the destination register is used between the two insns, too.
3847 2018-03-12  Richard Biener  <rguenther@suse.de>
3849         PR tree-optimization/84803
3850         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
3851         for refs DR analysis didn't process.
3853 2018-03-12  Richard Biener  <rguenther@suse.de>
3855         PR tree-optimization/84777
3856         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
3857         force-vectorize loops ignore whether we are optimizing for size.
3859 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
3861         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
3862         (TARGET_MD_ASM_ADJUST): Define.
3864 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
3865             Kito Cheng  <kito.cheng@gmail.com>
3866             Chung-Ju Wu  <jasonwucj@gmail.com>
3868         * config/nds32/nds32.c (nds32_compute_stack_frame,
3869         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
3870         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
3871         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
3872         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
3873         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
3874         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
3875         * config/nds32/nds32.md (prologue, epilogue): Use macro
3876         NDS32_V3PUSH_AVAILABLE_P to do checking.
3878 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
3880         PR debug/58150
3881         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
3882         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
3883         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
3884         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
3885         addition of most attributes on !orig_type_die or the attribute not
3886         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
3888 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
3889             Chung-Ju Wu  <jasonwucj@gmail.com>
3891         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
3892         __NDS32_VH__ macro.
3893         * config/nds32/nds32.opt (mvh): New option.
3895 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
3896             Chung-Ju Wu  <jasonwucj@gmail.com>
3898         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
3899         function.
3900         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
3901         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
3902         definition.
3904 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
3905             Chung-Ju Wu  <jasonwucj@gmail.com>
3907         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
3908         function.
3909         * config/nds32/nds32-multiple.md (strlensi): New pattern.
3910         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
3912 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
3913             Kito Cheng  <kito.cheng@gmail.com>
3914             Chung-Ju Wu  <jasonwucj@gmail.com>
3916         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
3917         UNSPEC_FFMISM and UNSPEC_FLMISM.
3918         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
3919         for ffb, ffmism and flmism.
3920         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
3921         (unspec_ffmism): Ditto.
3922         (unspec_flmism): Ditto.
3923         (nds32_expand_builtin_impl): Check if string extension is available.
3924         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
3925         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
3927 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
3929         Reverting patch:
3930         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
3932         PR target/83712
3933         * lra-assigns.c (assign_by_spills): Return a flag of reload
3934         assignment failure.  Do not process the reload assignment
3935         failures.  Do not spill other reload pseudos if they has the same
3936         reg class.
3937         (lra_assign): Add a return arg.  Set up from the result of
3938         assign_by_spills call.
3939         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
3940         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
3941         usage_insns if it is not NULL.
3942         (spill_hard_reg_in_range): New function.
3943         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
3944         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
3945         function prototypes.
3946         (lra_assign): Change prototype.
3947         * lra.c (lra): Add code to deal with fails by splitting hard reg
3948         live ranges.
3950 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
3952         PR target/84807
3953         * config/i386/i386.opt: Replace Enforcment with Enforcement.
3955 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
3957         PR debug/84620
3958         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
3959         (dw_val_node): Add val_symbolic_view.
3960         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
3961         (symview_upper_bound): New.
3962         (new_line_info_table): Initialize symviews_since_reset.
3963         (dwarf2out_source_line): Count symviews_since_reset and set
3964         symview_upper_bound.
3965         (dw_val_equal_p): Handle symview.
3966         (add_AT_symview): New.
3967         (print_dw_val): Handle symview.
3968         (attr_checksum, attr_checksum_ordered): Likewise.
3969         (same_dw_val_p, size_of_die): Likewise.
3970         (value_format, output_die): Likewise.
3971         (add_high_low_attributes): Use add_AT_symview for entry_view.
3972         (dwarf2out_finish): Reset symview_upper_bound, clear
3973         zero_view_p.
3975 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
3977         PR target/83969
3978         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
3979         Add strict argument and use it.
3980         (rs6000_split_multireg_move): Update for new strict argument.
3981         (mem_operand_gpr): Disallow all non-offsettable addresses.
3982         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
3984 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
3986         PR target/84772
3987         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
3988         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
3989         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
3991         PR c++/84767
3992         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
3993         decl, use remap_type if we want to use the type.
3995 2018-03-09  Martin Sebor  <msebor@redhat.com>
3997         PR tree-optimization/84526
3998         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
3999         Remove dead code.
4000         (builtin_access::generic_overlap): Be prepared to handle non-array
4001         base objects.
4003 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
4005         PR rtl-optimization/84682
4006         * lra-constraints.c (process_address_1): Check is_address flag
4007         for address constraints.
4008         (process_alt_operands): Likewise.
4009         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
4010         preprocess_constraints.
4011         * recog.h (preprocess_constraints): Add oploc parameter.
4012         Adjust callers.
4013         * recog.c (preprocess_constraints): Test address_operand for
4014         CT_ADDRESS constraints.
4016 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
4018         PR target/83712
4019         * lra-assigns.c (assign_by_spills): Return a flag of reload
4020         assignment failure.  Do not process the reload assignment
4021         failures.  Do not spill other reload pseudos if they has the same
4022         reg class.
4023         (lra_assign): Add a return arg.  Set up from the result of
4024         assign_by_spills call.
4025         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
4026         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
4027         usage_insns if it is not NULL.
4028         (spill_hard_reg_in_range): New function.
4029         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
4030         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
4031         function prototypes.
4032         (lra_assign): Change prototype.
4033         * lra.c (lra): Add code to deal with fails by splitting hard reg
4034         live ranges.
4036 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4038         PR target/83193
4039         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
4040         Accept complain bool parameter.  Only emit errors if it is true.
4041         (arm_parse_cpu_option_name): Likewise.
4042         (arm_target_thumb_only): Adjust callers of the above.
4043         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
4044         prototype to take a default true bool parameter.
4045         (arm_parse_arch_option_name): Likewise.
4047 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
4048             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
4050         PR jit/64089
4051         PR jit/84288
4052         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
4053         * configure: Regenerate.
4054         * configure.ac ("linker --version-script option"): New.
4055         ("linker soname option"): New.
4057 2018-03-09  Richard Biener  <rguenther@suse.de>
4059         PR tree-optimization/84775
4060         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
4061         immediate uses of predicate stmts and mark them modified.
4063         Revert
4064         PR tree-optimization/84178
4065         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
4066         to caller.
4067         (version_loop_for_if_conversion): Delay update_ssa call.
4068         (tree_if_conversion): Delay update_ssa until after predicate
4069         insertion.
4071 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
4073         PR target/84763
4074         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
4075         when the function accesses prior frames.
4077 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
4079         PR debug/84456
4080         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
4081         gen_llsym, otherwise call maybe_gen_llsym.
4083         PR inline-asm/84742
4084         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
4085         has ',' character inside of it.
4087 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
4089         PR target/84748
4090         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
4091         as clobbering CC_REGNUM.
4093 2018-03-08  Richard Biener  <rguenther@suse.de>
4095         PR middle-end/84552
4096         * tree-scalar-evolution.c: Include tree-into-ssa.h.
4097         (follow_copies_to_constant): Do not follow SSA names registered
4098         for update.
4100 2018-03-08  Richard Biener  <rguenther@suse.de>
4102         PR tree-optimization/84178
4103         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
4104         to caller.
4105         (version_loop_for_if_conversion): Delay update_ssa call.
4106         (tree_if_conversion): Delay update_ssa until after predicate
4107         insertion.
4109 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
4111         PR tree-optimization/84178
4112         * tree-if-conv.c (release_bb_predicate): Remove the
4113         the assertion that the stmts have NULL use_ops.
4114         Discard the statements, asserting that they haven't
4115         yet been added to a BB.
4117 2018-03-08  Richard Biener  <rguenther@suse.de>
4119         PR tree-optimization/84746
4120         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
4121         (phi_translate): Pass in destination ANTIC_OUT set.
4122         (phi_translate_1): Likewise.  For a simplified result lookup
4123         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
4124         (phi_translate_set): Adjust.
4125         (do_pre_regular_insertion): Likewise.
4126         (do_pre_partial_partial_insertion): Likewise.
4128 2018-03-08  Martin Liska  <mliska@suse.cz>
4130         PR gcov-profile/84735
4131         * doc/gcov.texi: Document usage of profile files.
4132         * gcov-io.h: Document changes in the format.
4134 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
4136         PR debug/84404
4137         PR debug/84408
4138         * dwarf2out.c (struct dw_line_info_table): Update comments for
4139         view == -1.
4140         (FORCE_RESET_NEXT_VIEW): New.
4141         (FORCE_RESETTING_VIEW_P): New.
4142         (RESETTING_VIEW_P): Check for -1 too.
4143         (ZERO_VIEW_P): Likewise.
4144         (new_line_info_table): Force-reset next view.
4145         (dwarf2out_begin_function): Likewise.
4146         (dwarf2out_source_line): Simplify zero_view_p initialization.
4147         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
4148         view directly.  Omit view when omitting .loc at line 0.
4150 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
4152         PR tree-optimization/84740
4153         * tree-switch-conversion.c (process_switch): Call build_constructors
4154         only if info.phi_count is non-zero.
4156         PR tree-optimization/84739
4157         * tree-tailcall.c (find_tail_calls): Check call arguments against
4158         DECL_ARGUMENTS (current_function_decl) rather than
4159         DECL_ARGUMENTS (func) when checking for tail recursion.
4161 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
4163         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
4164         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
4165         Volker Reichelt's entry and add entries for people that perform
4166         GCC fuzzy testing and report numerous bugs.
4168 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
4170         PR target/82411
4171         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
4172         readonly data in sdata, if that is disabled.
4173         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
4174         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
4175         -mreadonly-in-sdata option.
4177 2018-03-07  Martin Sebor  <msebor@redhat.com>
4179         PR tree-optimization/84468
4180         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
4181         basic block when looking for nul assignment.
4183 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
4185         PR target/84277
4186         * except.h (output_function_exception_table): Adjust prototype.
4187         * except.c (output_function_exception_table): Remove FNNAME parameter
4188         and add SECTION parameter.  Ouput one part of the table at a time.
4189         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
4190         the first part of the exception table and emit unwind directives.
4191         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
4192         (i386_pe_seh_cold_init): Likewise.
4193         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
4194         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
4195         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
4196         (ix86_output_call_insn): Emit a nop in one more case for SEH.
4197         * config/i386/winnt.c: Include except.h.
4198         (struct seh_frame_state): Add reg_offset, after_prologue and
4199         in_cold_section fields.
4200         (i386_pe_seh_end_prologue): Set seh->after_prologue.
4201         (i386_pe_seh_cold_init): New function.
4202         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
4203         to seh->in_cold_section.
4204         (seh_emit_push): Record the offset of the push.
4205         (seh_emit_save): Record the offet of the save.
4206         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
4207         Test seh->after_prologue to disregard the epilogue.
4208         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
4209         (i386_pe_end_cold_function): New function.
4211 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
4213         PR fortran/84565
4214         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
4215         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
4217         PR c++/84704
4218         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
4219         on tmp_var.
4220         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
4221         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
4223         PR middle-end/84723
4224         * multiple_target.c: Include tree-inline.h and intl.h.
4225         (expand_target_clones): Diagnose and fail if node->definition and
4226         !tree_versionable_function_p (node->decl).
4228 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
4230         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
4231         sprint_ul.
4232         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
4233         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
4234         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
4236 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
4238         PR target/84710
4239         * combine.c (try_combine): Use reg_or_subregno instead of handling
4240         just paradoxical SUBREGs and REGs.
4242 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
4244          * config/arc/arc.c (arc_finalize_pic): Remove function.
4245          (arc_must_save_register): We use single base PIC register, remove
4246          checks to save/restore the PIC register.
4247          (arc_expand_prologue): Likewise.
4248          * config/arc/arc-protos.h (arc_set_default_type_attributes):
4249          Remove.
4250          (arc_verify_short): Likewise.
4251          (arc_attr_type): Likewise.
4252          * config/arc/arc.c (arc_set_default_type_attributes): Remove.
4253          (walk_stores): Likewise.
4254          (arc_address_cost): Make it static.
4255          (arc_verify_short): Likewise.
4256          (branch_dest): Likewise.
4257          (arc_attr_type): Likewise.
4258          * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
4259          (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
4260          (arc_final_prescan_insn): Remove inserting the nops due to
4261          hardware hazards.  It is done in reorg step.
4262          (insn_length_variant_t): Remove.
4263          (insn_length_parameters_t): Likewise.
4264          (arc_insn_length_parameters): Likewise.
4265          (arc_get_insn_variants): Likewise.
4266          * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
4268 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
4270         PR inline-asm/84683
4271         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
4272         assertion failure.
4274         PR tree-optimization/84687
4275         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
4276         on new_node->decl.
4277         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
4279 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
4281         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
4282         Rename to ppc_speculation_barrier.
4283         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
4284         __builtin_ppc_speculation_barrier.
4286 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
4288         PR target/84700
4289         * combine.c (combine_simplify_rtx): Don't try to simplify if
4290         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
4291         are equal to x.
4293 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
4295         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
4296         to 32 bytes when compiling for POWER9.
4298 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
4300         PR target/84564
4301         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
4302         regparm >= 3 with no arg reg available also for calls with
4303         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
4305         PR target/84524
4306         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
4307         orig,vex.
4308         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
4310 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
4312         PR target/84264
4313         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
4315 2018-03-05  Richard Biener  <rguenther@suse.de>
4317         PR tree-optimization/84486
4318         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
4319         When inserting a __builtin_assume_aligned call set the LHS
4320         SSA name alignment info accordingly.
4322 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
4324         PR tree-optimization/84114
4325         * config/aarch64/aarch64.c (aarch64_reassociation_width)
4326         Avoid reassociation of FLOAT_MODE addition.
4328 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
4330         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
4331         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
4332         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
4333         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
4334         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
4335         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
4336         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
4337         and -mwbnoinvd.
4338         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
4339         __builtin_ia32_wbinvd): New builtins.
4340         (SPECIAL_ARGS2): New.
4341         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
4342         (SPECIAL_ARGS2): New.
4343         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
4344         (ix86_valid_target_attribute_inner_p): Ditto.
4345         (ix86_init_mmx_sse_builtins): Add special_args2.
4346         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
4347         TARGET_WBNOINVD_P): New.
4348         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
4349         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
4350         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
4351         * config/i386/immintrin.h (_wbinvd): New intrinsic.
4352         * config/i386/pconfigintrin.h: New file.
4353         * config/i386/wbnoinvdintrin.h: Ditto.
4354         * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
4355         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
4357 2018-03-05  Richard Biener  <rguenther@suse.de>
4359         PR tree-optimization/84670
4360         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
4361         member.
4362         (BB_VISITED_WITH_VISITED_SUCCS): New define.
4363         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
4364         (compute_antic_aux): Only assert the number of values in ANTIC_IN
4365         doesn't grow if all successors (recursively) were visited at least
4366         once.
4368 2018-03-05  Richard Biener  <rguenther@suse.de>
4370         PR tree-optimization/84650
4371         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
4372         if executed in the loop pipeline.
4374 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
4376         * doc/configfiles.texi (Configuration Files): Move info about
4377         conditionalizing $target-protos.h to...
4378         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
4379         differs from $target-protos.h.
4381 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
4382             Chung-Ju Wu  <jasonwucj@gmail.com>
4384         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
4385         * config/nds32/nds32-multiple.md (setmemsi): Define.
4386         * config/nds32/nds32-memory-manipulation.c
4387         (nds32_gen_dup_4_byte_to_word_value): New.
4388         (emit_setmem_word_loop): New.
4389         (emit_setmem_byte_loop): New.
4390         (nds32_expand_setmem_loop): New.
4391         (nds32_expand_setmem_loop_v3m): New.
4392         (nds32_expand_setmem_unroll): New.
4393         (nds32_expand_setmem): New.
4395 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
4396             Chung-Ju Wu  <jasonwucj@gmail.com>
4398         * config/nds32/nds32-memory-manipulation.c
4399         (nds32_emit_load_store): New.
4400         (nds32_emit_post_inc_load_store): New.
4401         (nds32_emit_mem_move): New.
4402         (nds32_emit_mem_move_block): New.
4403         (nds32_expand_movmemsi_loop_unknown_size): New.
4404         (nds32_expand_movmemsi_loop_known_size): New.
4405         (nds32_expand_movmemsi_loop): New.
4406         (nds32_expand_movmemsi_unroll): New.
4407         (nds32_expand_movmemqi): Rename ...
4408         (nds32_expand_movmemsi): ... to this.
4409         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
4410         (movmemsi): ... to this.
4411         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
4412         (nds32_expand_movmemsi): ... to this.
4414 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
4415             Monk Chiang  <sh.chiang04@gmail.com>
4416             Chung-Ju Wu  <jasonwucj@gmail.com>
4418         * config/nds32/nds32-protos.h
4419         (nds32_expand_load_multiple): New arguments.
4420         (nds32_expand_store_multiple): Ditto.
4421         (nds32_valid_multiple_load_store): Rename ...
4422         (nds32_valid_multiple_load_store_p): ... to this.
4423         * config/nds32/nds32-memory-manipulation.c
4424         (nds32_expand_load_multiple): Refine implementation.
4425         (nds32_expand_store_multiple): Ditto.
4426         * config/nds32/nds32-multiple.md
4427         (load_multiple): Update nds32_expand_load_multiple interface.
4428         (store_multiple): Update nds32_expand_store_multiple interface.
4429         * config/nds32/nds32-predicates.c
4430         (nds32_valid_multiple_load_store): Rename ...
4431         (nds32_valid_multiple_load_store_p): ... to this and refine
4432         implementation.
4433         * config/nds32/predicates.md
4434         (nds32_load_multiple_and_update_address_operation): New predicate.
4435         (nds32_store_multiple_and_update_address_operation): New predicate.
4437 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
4438             Chung-Ju Wu  <jasonwucj@gmail.com>
4440         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
4441         (combo): New attribute.
4442         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
4444 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
4446         * config/nds32/nds32.opt: Change -mcmodel= default value.
4448 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
4449             Monk Chiang  <sh.chiang04@gmail.com>
4450             Chung-Ju Wu  <jasonwucj@gmail.com>
4452         * config/nds32/constants.md (unspec_element): New enum.
4453         * config/nds32/constraints.md (Umw): New constraint.
4454         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
4455         * config/nds32/nds32-intrinsic.md: Likewise.
4456         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
4457         (nds32_valid_smw_lwm_base_p): New.
4458         (nds32_output_smw_single_word): New.
4459         (nds32_output_lmw_single_word): New.
4460         (nds32_expand_unaligned_load): New.
4461         (nds32_expand_unaligned_store): New.
4462         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
4463         (nds32_output_smw_single_word): Declare.
4464         (nds32_output_lmw_single_word): Declare.
4465         (nds32_expand_unaligned_load): Declare.
4466         (nds32_expand_unaligned_store): Declare.
4467         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
4468         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
4469         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
4470         NDS32_BUILTIN_UASTORE_DW.
4471         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
4472         predicate.
4474 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
4475             Kito Cheng  <kito.cheng@gmail.com>
4476             Chung-Ju Wu  <jasonwucj@gmail.com>
4478         * config/nds32/nds32-intrinsic.c
4479         (nds32_expand_builtin_null_ftype_reg): Delete.
4480         (nds32_expand_builtin_reg_ftype_imm): Ditto.
4481         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
4482         (nds32_read_argument): New.
4483         (nds32_legitimize_target): Ditto.
4484         (nds32_legitimize_argument): Ditto.
4485         (nds32_check_constant_argument): Ditto.
4486         (nds32_expand_unop_builtin): Ditto.
4487         (nds32_expand_unopimm_builtin): Ditto.
4488         (nds32_expand_binop_builtin): Ditto.
4489         (nds32_builtin_decl_impl): Ditto.
4490         (builtin_description): Ditto.
4491         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
4492         (nds32_init_builtins_impl): Ditto.
4493         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
4494         (nds32_builtin_decl): New.
4495         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
4496         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
4498 2018-03-02  Jeff Law  <law@redhat.com>
4500         * reorg.c (stop_search_p): Handle DEBUG_INSN.
4501         (redundant_insn, fill_simple_delay_slots): Likewise.
4502         (fill_slots_from_thread): Likewise.
4503         * resource.c (mark_referenced_resources): Likewise.
4504         (mark_set_resources, find_dead_or_set_registers): Likewise.
4506 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
4508         * substring-locations.h (format_warning_va): Formatting fix for
4509         ATTRIBUTE_GCC_DIAG.
4510         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
4511         argument.
4512         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
4513         * substring-locations.c: Include intl.h.
4514         (format_warning_va): Turned into small wrapper around
4515         format_warning_n_va, renamed to ...
4516         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
4517         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
4518         use ngettext.
4519         (format_warning_at_substring_n): New function.
4520         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
4521         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
4522         format_warning_at_substring with just a shorter name instead of
4523         const function pointer.
4524         (fmtwarn_n): New function.
4525         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
4526         appropriate, get rid of all the fmtstr temporaries, move conditionals
4527         with G_() wrapped string literals directly into fmtwarn arguments,
4528         cast dir.len to (int), formatting fixes.
4530 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
4532         * doc/invoke.texi: Remove "Cilk Plus" references.
4534 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
4535             Richard Biener  <rguenther@suse.de>
4537         PR ipa/84628
4538         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
4539         for error or warning attributes if CALL_FROM_THUNK_P is set.
4540         Formatting fixes.
4542 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
4544         PR target/56540
4545         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
4546         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
4548         PR target/56540
4549         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
4550         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
4552         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
4553         instead of -1U in last predictors element's probability member.
4555 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
4557         PR ipa/83983
4558         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
4559         arguments if they are comparable.
4561 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
4563         PR tree-optimization/84634
4564         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
4565         masks and masked_loop_p with a single loop_masks, making sure it's
4566         null for bb vectorization.
4568 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
4570         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
4571         (vect_analyze_data_ref_access): Use loop->safe_len rather than
4572         loop->force_vectorize to check whether there is no alias.
4574 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
4576         PR target/84614
4577         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
4578         prototypes.
4579         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
4580         comments.
4581         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
4582         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
4583         instead of a loop around prev_real_insn.
4584         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
4585         prev_real_insn.
4587         PR inline-asm/84625
4588         * config/i386/i386.c (ix86_print_operand): Use conditional
4589         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
4590         zero vector.
4592 2018-03-02  Richard Biener  <rguenther@suse.de>
4594         PR tree-optimization/84427
4595         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
4596         (bitmap_set_subtract_values): Rewrite to handle multiple
4597         exprs per value.
4598         (clean): Likewise.
4599         (prune_clobbered_mems): Likewise.
4600         (phi_translate): Take edge instead of pred/phiblock.
4601         (phi_translate_1): Likewise.
4602         (phi_translate_set): Likewise.  Insert all translated
4603         exprs for a value into the set, keeping possibly multiple
4604         expressions per value.
4605         (compute_antic_aux): Adjust for phi_translate changes.
4606         When intersecting union the expressions and prune those
4607         not in the final value set, keeping possibly multiple
4608         expressions per value.  Do not use value-insertion
4609         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
4610         all expressions.  Add verification that the value-sets
4611         only shrink during iteration.
4612         (compute_partial_antic_aux): Adjust for the phi_translate changes.
4613         (do_pre_regular_insertion): Likewise.
4614         (do_pre_partial_partial_insertion): Likewise.
4616 2018-03-02  Richard Biener  <rguenther@suse.de>
4618         PR target/82005
4619         * config/darwin.c (saved_debug_info_level): New static global.
4620         (darwin_asm_lto_start): Disable debug info generation for LTO out.
4621         (darwin_asm_lto_end): Restore debug info generation settings.
4623 2018-03-01  Martin Liska  <mliska@suse.cz>
4625         PR sanitizer/82484
4626         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
4627         volatile arguments.
4629 2018-03-01  Richard Biener  <rguenther@suse.de>
4631         PR debug/84645
4632         * dwarf2out.c (gen_variable_die): Properly handle late VLA
4633         type annotation with LTO when debug was disabled at compile-time.
4635 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
4637         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
4638         XINT with INTVAL.
4639         (mips_final_postscan_insn): Likewise.
4641 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
4643         PR rtl-optimization/84528
4644         * alias.c (init_alias_target): Add commentary.
4645         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
4646         a unique base value if the frame pointer is not eliminated
4647         to the stack pointer.
4649 2018-03-01  Tom de Vries  <tom@codesourcery.com>
4651         PR rtl-optimization/83327
4652         * lra-int.h (hard_regs_spilled_into): Declare.
4653         * lra.c (hard_regs_spilled_into): Define.
4654         (init_reg_info): Init hard_regs_spilled_into.
4655         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
4656         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
4657         (process_bb_lives): Handle hard_regs_spilled_into.
4658         (lra_create_live_ranges_1): Before doing liveness propagation, clear
4659         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
4661 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
4663         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
4664         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
4665         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
4666         * config/rs6000/aix72.h: New file.
4668 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
4670         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
4671         instead of warning_at with conditional singular and plural messages
4672         where possible.
4674         PR target/52991
4675         * stor-layout.c (update_alignment_for_field): For
4676         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
4677         && !DECL_PACKED (field), do the alignment update, just use
4678         only desired_align instead of MAX (type_align, desired_align)
4679         as the alignment.
4680         (place_field): Don't do known_align < desired_align handling
4681         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
4682         is non-NULL, instead do it after rli->prev_field handling and
4683         only if not within a bitfield word.  For DECL_PACKED (field)
4684         use type_align of BITS_PER_UNIT.
4686 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
4688         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
4689         superfluous parentheses and trailing spaces.
4691 2018-02-28  Richard Biener  <rguenther@suse.de>
4693         PR tree-optimization/84584
4694         * graphite-scop-detection.c (scop_detection::add_scop): Discard
4695         SCoPs with fake exit edge.
4697 2018-02-28  Martin Liska  <mliska@suse.cz>
4699         PR testsuite/84597
4700         * timevar.c (timer::print): Fix format to properly print 100%
4701         values.
4703 2018-02-28  Richard Biener  <rguenther@suse.de>
4705         PR middle-end/84607
4706         * genmatch.c (capture_info::walk_match): Do not mark
4707         captured expressions without operands as expr_p given
4708         they act more like predicates and should be subject to
4709         "lost tail" side-effect preserving.
4711 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
4713         PR rtl-optimization/81611
4714         * auto-inc-dec.c (attempt_change): Move dead note from
4715         mem_insn if it's the next use of regno
4716         (find_address): Take address use of reg holding
4717         non-incremented value.  Add parm to limit search to the named
4718         reg only.
4719         (merge_in_block): Attempt to use a mem insn that is the next
4720         use of the original regno.
4722 2018-02-27  Martin Sebor  <msebor@redhat.com>
4724         PR c++/83871
4725         * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
4726         * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
4728 2018-02-27  Martin Sebor  <msebor@redhat.com>
4730         PR translation/84207
4731         * diagnostic-core.h (warning_n, error_n, inform_n): Change
4732         n argument to unsigned HOST_WIDE_INT.
4733         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
4734         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
4735         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
4736         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
4738 2018-02-27  Richard Biener  <rguenther@suse.de>
4740         PR tree-optimization/84512
4741         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
4742         Do not use the estimate returned from record_stmt_cost for
4743         the scalar iteration cost but sum properly using add_stmt_cost.
4745 2018-02-27  Richard Biener  <rguenther@suse.de>
4747         PR tree-optimization/84466
4748         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
4749         Adjust last change to less strictly validate use operands.
4751 2018-02-27  Martin Liska  <mliska@suse.cz>
4753         PR gcov-profile/84548
4754         * gcov.c (process_file): Allow partial overlap and consider it
4755         also as group functions.
4756         (output_lines): Properly calculate range of lines for a group.
4758 2018-02-27  Martin Liska  <mliska@suse.cz>
4760         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
4761         'ggc' suffixes.  Change first column width.
4762         (timer::print): Fix formatting of the column.
4764 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
4766         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
4767         preserve inline entry blocks for the sake of debug inline
4768         entry point markers alone.
4769         (remove_unused_locals): Suggest in comments a better place to
4770         force the preservation of inline entry blocks that are
4771         otherwise unused, but do not preserve them.
4773 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
4775         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
4777 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
4779         PR target/84039
4780         * config/i386/constraints.md (Bs): Replace
4781         ix86_indirect_branch_register with
4782         TARGET_INDIRECT_BRANCH_REGISTER.
4783         (Bw): Likewise.
4784         * config/i386/i386.md (indirect_jump): Likewise.
4785         (tablejump): Likewise.
4786         (*sibcall_memory): Likewise.
4787         (*sibcall_value_memory): Likewise.
4788         Peepholes of indirect call and jump via memory: Likewise.
4789         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
4790         (*sibcall_value_GOT_32): Likewise.
4791         * config/i386/predicates.md (indirect_branch_operand): Likewise.
4792         (GOT_memory_operand): Likewise.
4793         (call_insn_operand): Likewise.
4794         (sibcall_insn_operand): Likewise.
4795         (GOT32_symbol_operand): Likewise.
4796         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
4798 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
4800         PR rtl-optimization/83496
4801         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
4802         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
4803         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
4804         redundant insn, if any.
4805         (relax_delay_slots): Likewise.
4806         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
4808 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
4810         PR tree-optimization/83965
4811         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
4812         that grouped statements are part of a reduction chain.  Return
4813         true if the statement is not marked as a reduction itself but
4814         is part of a group.
4815         (vect_recog_dot_prod_pattern): Don't check whether the statement
4816         is part of a group here.
4817         (vect_recog_sad_pattern): Likewise.
4818         (vect_recog_widen_sum_pattern): Likewise.
4820 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
4822         PR debug/84545
4823         * final.c (rest_of_clean_state): Also look for calls inside sequences.
4825 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
4827         PR target/84530
4828         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
4829         the bool argument.
4830         (ix86_output_indirect_function_return): New prototype.
4831         (ix86_split_simple_return_pop_internal): Likewise.
4832         * config/i386/i386.c (indirect_return_via_cx): New.
4833         (indirect_return_via_cx_bnd): Likewise.
4834         (indirect_thunk_name): Handle return va CX_REG.
4835         (output_indirect_thunk_function): Create alias for
4836         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
4837         (ix86_output_indirect_jmp): Remove the bool argument.
4838         (ix86_output_indirect_function_return): New function.
4839         (ix86_split_simple_return_pop_internal): Likewise.
4840         * config/i386/i386.md (*indirect_jump): Don't pass false
4841         to ix86_output_indirect_jmp.
4842         (*tablejump_1): Likewise.
4843         (simple_return_pop_internal): Change it to define_insn_and_split.
4844         Call ix86_split_simple_return_pop_internal to split it for
4845         -mfunction-return=.
4846         (simple_return_indirect_internal): Call
4847         ix86_output_indirect_function_return instead of
4848         ix86_output_indirect_jmp.
4850 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
4852         PR bootstrap/84405
4853         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
4854         memset and value initialization afterwards.
4856 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
4858         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
4860 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4862         PR target/84521
4863         * common/config/aarch64/aarch64-common.c
4864         (aarch_option_optimization_table[]): Switch
4865         off fomit-frame-pointer
4867 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
4868             Chung-Ju Wu  <jasonwucj@gmail.com>
4870         * config/nds32/nds32-multiple.md (load_multiple): Disallow
4871         volatile memory.
4872         (store_multiple): Ditto.
4874 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
4876         * config.gcc: Add --with-cpu support for nds32 target.
4877         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
4878         * config/nds32/nds32.opt: Add -mcpu= option.
4880 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
4882         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
4883         isel=yes): Warn for these deprecated options.
4885 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
4887         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
4888         ISA_2_5_MASKS_EMBEDDED.
4890 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
4892         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
4893         p->max as pointers rather than using iterative_hash_expr.
4895 2018-02-23  Carl Love  <cel@us.ibm.com>
4897         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
4898         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
4899         BU_P8V_OVERLOAD_2.
4900         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
4901         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
4902         P8V_BUILTIN_VEC_VUNSIGNED2.
4904 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
4906         PR target/81572
4907         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
4908         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
4909         LRA_UNKNOWN_ALT.
4910         * lra-constraints.c (curr_insn_transform): Set up
4911         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
4912         LRA_UNKNOWN_ALT.
4913         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
4914         * lra-eliminations.c (spill_pseudos): Ditto.
4915         (process_insn_for_elimination): Ditto.
4916         * lra-lives.c (reg_early_clobber_p): Use the new macros.
4917         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
4918         LRA_NON_CLOBBERED_ALT.
4920 2018-02-22  Martin Sebor  <msebor@redhat.com>
4922         PR tree-optimization/84480
4923         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
4924         to maybe_diag_stxncpy_trunc.  Call it.
4925         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
4926         from gimple_fold_builtin_strcpy.  Print inlining stack.
4927         (handle_builtin_stxncpy): Print inlining stack.
4928         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
4930 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
4932         PR target/84176
4933         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
4934         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
4935         and -fcheck-pointer-bounds are used together.
4936         (indirect_thunk_prefix): New enum.
4937         (indirect_thunk_need_prefix): New function.
4938         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
4939         "_nt" instead of "_bnd" for NOTRACK prefix.
4940         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
4941         (output_indirect_thunk_function): Likewise.
4942         (): Likewise.
4943         (ix86_code_end): Update output_indirect_thunk_function calls.
4944         (ix86_output_indirect_branch_via_reg): Replace
4945         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
4946         (ix86_output_indirect_branch_via_push): Likewise.
4947         (ix86_output_function_return): Likewise.
4948         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
4949         incompatible with -fcf-protection=branch and
4950         -fcheck-pointer-bounds.
4952 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
4954         PR target/83335
4955         * config/aarch64/aarch64.c (aarch64_print_address_internal):
4956         Change gcc_assert call to output_operand_lossage.
4958 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
4960         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
4962 2018-02-22  DJ Delorie  <dj@redhat.com>
4963             Sebastian Perta  <sebastian.perta@renesas.com>
4964             Oleg Endo  <olegendo@gcc.gnu.org>
4966         * config/rx/rx.c (rx_rtx_costs): New function.
4967         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
4969 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
4971         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
4973 2018-02-22  Martin Liska  <mliska@suse.cz>
4975         PR driver/83193
4976         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
4977         Add "native" as a possible value.
4979 2018-02-22  Martin Liska  <mliska@suse.cz>
4981         PR driver/83193
4982         * config/i386/i386.c (ix86_option_override_internal):
4983         Add "native" as a possible value for -march and -mtune.
4985 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
4987         PR target/84502
4988         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
4989         to all type variants.
4991         PR tree-optimization/84503
4992         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
4993         width as info->bitpos + info->bitsize - start.
4994         (merged_store_group::merge_overlapping): Simplify width computation.
4995         (check_no_overlap): New function.
4996         (imm_store_chain_info::try_coalesce_bswap): Compute expected
4997         start + width and last_order of the group, fail if check_no_overlap
4998         fails.
4999         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
5000         to group if check_no_overlap fails.
5002 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
5004         * config/rs6000/altivec.md: Delete contraint arguments to
5005         define_expand, define_split, and define_peephole2, and in
5006         define_insn_and_split if always unused.
5007         * config/rs6000/darwin.md: Ditto.
5008         * config/rs6000/dfp.md: Ditto.
5009         * config/rs6000/rs6000.md: Ditto.
5010         * config/rs6000/sync.md: Ditto.
5011         * config/rs6000/vector.md: Ditto.
5012         * config/rs6000/vsx.md: Ditto.
5014 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
5016         * config/rs6000/altivec.md: Write output control strings as braced
5017         blocks instead of double-quoted strings.
5018         * config/rs6000/darwin.md: Ditto.
5019         * config/rs6000/rs6000.md: Ditto.
5020         * config/rs6000/vector.md: Ditto.
5021         * config/rs6000/vsx.md: Ditto.
5023 2018-02-21  Jason Merrill  <jason@redhat.com>
5025         PR c++/84314 - ICE with templates and fastcall attribute.
5026         * attribs.c (build_type_attribute_qual_variant): Remove assert.
5028 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
5030         * ipa-cp.c (determine_versionability): Fix comment typos.
5032 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
5034         PR c/84229
5035         * ipa-cp.c (determine_versionability): Do not version functions caling
5036         va_arg_pack.
5038 2018-02-21  Martin Liska  <mliska@suse.cz>
5040         PR driver/83193
5041         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
5042         Add "native" as a possible value.
5043         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
5044         the macro when native cpu detection is available.
5046 2018-02-21  Martin Liska  <mliska@suse.cz>
5048         PR driver/83193
5049         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
5050         Add "native" as a possible value.
5051         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
5052         when native cpu detection is available.
5054 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
5055             Martin Sebor  <msebor@redhat.com>
5057         PR tree-optimization/84478
5058         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
5059         false.
5060         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
5061         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
5062         support which is conservatively correct, for 2 only stay conservative
5063         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
5064         argument to the 2 argument get_range_strlen, adjust 6 arg
5065         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
5066         false.
5067         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
5068         (gimple_fold_builtin_strlen): Pass true as last argument to
5069         get_range_strlen.
5071 2018-02-20  Martin Sebor  <msebor@redhat.com>
5073         PR middle-end/84095
5074         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
5075         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
5076         (builtin_memref::builtin_memref): Factor out parts into
5077         set_base_and_offset and call it.
5079 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
5081         PR middle-end/84406
5082         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
5083         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
5084         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
5085         search at the associated MODE_INT.
5087 2018-02-20  Jeff Law  <law@redhat.com>
5089         PR middle-end/82123
5090         PR tree-optimization/81592
5091         PR middle-end/79257
5092         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
5093         for range data rather than using global data.
5094         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
5095         range data rather than using global data.
5096         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
5097         pass it to children as needed.
5098         (struct directive::fmtresult): Similarly.
5099         (struct directive::set_width): Similarly.
5100         (struct directive::set_precision): Similarly.
5101         (format_integer, format_directive, parse_directive): Similarly.
5102         (format_none): Accept unnamed vr_values parameter.
5103         (format_percent, format_floating, format_character): Similarly.
5104         (format_string, format_plain): Similarly.
5105         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
5106         the EVRP range analyzer for range data rather than using global data.
5107         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and 
5108         gimple-ssa-evrp-analyze.h
5109         (class sprintf_dom_walker): Add after_dom_children member function.
5110         Add evrp_range_analyzer member.
5111         (sprintf_dom_walker::before_dom_children): Call into the EVRP
5112         range analyzer as needed.
5113         (sprintf_dom_walker::after_dom_children): New member function.
5114         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
5115         if not optimizing.
5116         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
5117         (evrp_range_analyzer::pop_to_marker): Likewise.
5119 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
5121         PR tree-optimization/84419
5122         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
5123         with the required type if its current type is compatible but
5124         different.
5126 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
5128         PR middle-end/82004
5129         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
5130         after vectorization.
5132 2018-02-20  Martin Liska  <mliska@suse.cz>
5134         PR driver/83193
5135         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
5136         possible values if we don't have a hint.
5138 2018-02-20  Martin Liska  <mliska@suse.cz>
5140         PR c/84310
5141         PR target/79747
5142         * final.c (shorten_branches): Build align_tab array with one
5143         more element.
5144         * opts.c (finish_options): Add alignment option limit check.
5145         (MAX_CODE_ALIGN): Likewise.
5146         (MAX_CODE_ALIGN_VALUE): Likewise.
5147         * doc/invoke.texi: Document maximum allowed option value for
5148         all -falign-* options.
5150 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
5152         PR target/84146
5153         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
5154         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
5155         * var-tracking.c (emit_note_insn_var_location): Remove all references
5156         to NOTE_INSN_CALL_ARG_LOCATION.
5157         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
5158         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
5159         Use copy_rtx_if_shared.
5160         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
5161         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
5162         (dwarf2out_var_location): Remove handling of
5163         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
5164         on call_insn.
5165         * final.c (final_scan_insn): Remove all references to
5166         NOTE_INSN_CALL_ARG_LOCATION.
5167         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
5168         before dumping final insns.
5169         * except.c (emit_note_eh_region_end): Remove all references to
5170         NOTE_INSN_CALL_ARG_LOCATION.
5171         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
5172         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
5173         * config/arc/arc.c (hwloop_optimize): Likewise.
5174         * config/arm/arm.c (create_fix_barrier): Likewise.
5175         * config/s390/s390.c (s390_chunkify_start): Likewise.
5176         * config/sh/sh.c (find_barrier): Likewise.
5177         * config/i386/i386.c (rest_of_insert_endbranch,
5178         ix86_seh_fixup_eh_fallthru): Likewise.
5179         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
5180         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
5181         * config/frv/frv.c (frv_function_prologue): Likewise.
5182         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
5183         reg note.
5184         (note_outside_basic_block_p): Remove all references to
5185         NOTE_INSN_CALL_ARG_LOCATION.
5186         * gengtype.c (adjust_field_rtx_def): Likewise.
5187         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
5188         Likewise.
5189         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
5190         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
5192         PR c++/84444
5193         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
5194         is ADDR_EXPR.
5196         PR tree-optimization/84452
5197         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
5198         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
5199         is NULL.
5201 2018-02-19  Martin Liska  <mliska@suse.cz>
5203         PR sanitizer/82183
5204         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
5206 2018-02-19  Martin Liska  <mliska@suse.cz>
5207             Richard Sandiford  <richard.sandiford@linaro.org>
5209         PR tree-optimization/82491
5210         * gimple-fold.c (get_base_constructor): Make earlier bail out
5211         to prevent ubsan.
5213 2018-02-19  Carl Love  <cel@us.ibm.com>
5215         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
5216         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
5217         BU_P8V_OVERLOAD_1.
5218         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
5219         P8V_BUILTIN_VEC_NEG.
5221 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
5223         * config/rl78/rl78.md (movdf): New define expand.
5225 2018-02-19  Martin Liska  <mliska@suse.cz>
5227         PR other/80589
5228         * doc/invoke.texi: Fix typo.
5229         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
5231 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
5233         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
5234         handle rs6000_single_float and rs6000_double_float specially for
5235         e500 family CPUs.
5237 2018-02-16  Jeff Law  <law@redhat.com>
5239         * config/rx/rx.c (add_pop_cfi_notes): New function.;
5240         (pop_regs): Use it.
5242 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
5244         PR ipa/84425
5245         * ipa-inline.c (inline_small_functions): Fix a typo.
5247 2018-02-16  Nathan Sidwell  <nathan@acm.org>
5249         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
5251 2018-02-16  Carl Love  <cel@us.ibm.com>
5253         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
5254         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
5255         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
5256         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
5257         expansion to P8V_BUILTIN_VEC_FLOAT2.
5259 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
5261         PR rtl-optimization/70023
5262         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
5263         src_regno into account.
5265 2018-02-16  Carl Love  <cel@us.ibm.com>
5267         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
5268         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
5269         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
5270         * config/rs6000/rs6000.c: Remove case statements for
5271         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
5272         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
5273         and P9V_BUILTIN_VEC_VINSERT4B.
5274         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
5275         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
5276         * config/rs6000/vsx.md:
5277         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
5278         vec_insert4b.
5280 2018-02-16  Carl Love  <cel@us.ibm.com>
5282         * config/rs6000/altivec.h: Add builtin names vec_extract4b
5283         vec_insert4b.
5284         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
5285         definitions.
5286         * config/rs6000/rs6000-c.c: Add the definitions for
5287         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
5288         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
5289         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
5290         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
5291         definition for insert4b and define insn *insert3b_internal.
5292         * doc/extend.texi: Add documentation for vec_extract4b.
5294 2018-02-16  Nathan Sidwell  <nathan@acm.org>
5296         * doc/extend.texi (Backwards Compatibility): Mention friend
5297         injection.  Note for-scope is deprecated.
5298         * doc/invoke.texi (-ffriend-injection): Deprecate.
5300 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
5302         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
5303         that moved to I2, also allow destinations that are a paradoxical
5304         subreg (instead of a normal reg).
5306 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
5308         PR target/83831
5309         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
5310         to QImode.
5312 2018-02-16  Richard Biener  <rguenther@suse.de>
5314         PR tree-optimization/84037
5315         PR tree-optimization/84016
5316         PR target/82862
5317         * config/i386/i386.c (ix86_builtin_vectorization_cost):
5318         Adjust vec_construct for the fact we need additional higher latency
5319         128bit inserts for AVX256 and AVX512 vector builds.
5320         (ix86_add_stmt_cost): Scale vector construction cost for
5321         elementwise loads.
5323 2018-02-16  Richard Biener  <rguenther@suse.de>
5325         PR tree-optimization/84417
5326         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
5327         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
5328         (non_rewritable_lvalue_p): Likewise, use poly-ints.
5330 2018-02-16  Martin Liska  <mliska@suse.cz>
5332         PR sanitizer/84307
5333         * internal-fn.def (ASAN_CHECK): Set proper flags.
5334         (ASAN_MARK): Likewise.
5336 2018-02-16  Julia Koval  <julia.koval@intel.com>
5338         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
5339         from PTA_CANNONLAKE.
5341 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
5343         PR target/84272
5344         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
5345         Use ++iter rather than iter++ for std::list iterators.
5346         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
5347         defer deleting them until all nodes in the forest are processed.  Do
5348         free even leaf nodes.  Change to_process into auto_vec.
5350         PR bootstrap/84405
5351         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
5352         * vec.h (vec_default_construct): Use memset instead of placement new
5353         if BROKEN_VALUE_INITIALIZATION is defined.
5354         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
5355         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
5356         is defined.
5358         PR rtl-optimization/83723
5359         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
5360         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
5361         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
5362         recursive calls.
5363         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
5364         callers.
5365         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
5367 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
5369         PR rtl-optimization/81443
5370         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
5371         from inner REGs to paradoxical SUBREGs.
5373 2018-02-16  Richard Biener  <rguenther@suse.de>
5375         PR tree-optimization/84399
5376         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
5377         For operands we can analyze at their definition make sure we can
5378         analyze them at each use as well.
5380 2018-02-16  Richard Biener  <rguenther@suse.de>
5382         PR tree-optimization/84190
5383         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
5384         volatile accesses if the decl isn't volatile.
5386 2018-02-15  Jason Merrill  <jason@redhat.com>
5388         PR c++/84314 - ICE with templates and fastcall attribute.
5389         * attribs.c (build_type_attribute_qual_variant): Don't clobber
5390         TYPE_CANONICAL on an existing type.
5392 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
5394         PR tree-optimization/84383
5395         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
5396         dstoff nor call operand_equal_p if dstbase is NULL.
5398         PR tree-optimization/84334
5399         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
5400         also a CONSTANT_CLASS_P, punt.
5402 2018-02-14  Jim Wilson  <jimw@sifive.com>
5404         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
5405         first SMALL_OPERAND check.  New local min_second_step.  Move assert
5406         to where locals are set.  Add TARGET_RVC support.
5407         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
5409 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
5411         * doc/invoke.texi: Correct -Wformat-overflow code sample.
5413 2018-02-14  Martin Sebor  <msebor@redhat.com>
5415         PR tree-optimization/83698
5416         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
5417         arrays constrain the offset range to their bounds.
5418         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
5419         (builtin_access::overlap): Avoid setting the size of overlap if it's
5420         already been set.
5421         (maybe_diag_overlap): Also consider arrays when deciding what values
5422         of offsets to include in diagnostics.
5424 2018-02-14  Martin Sebor  <msebor@redhat.com>
5426         PR c/84108
5427         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
5428         that correspond to the kind of a declaration.
5430 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
5432         PR target/83984
5433         * config/pa/pa.md: Load address of PIC label using the linkage table
5434         if the label is nonlocal.
5436 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
5438         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
5439         warning message if user requests -maltivec=be.
5440         * doc/invoke.texi: Document deprecation of -maltivec=be.
5442 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
5444         PR target/84220
5445         * config/rs6000/rs6000-c.c: Update definitions for
5446         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
5447         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
5449 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
5451         PR target/84239
5452         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
5453         add _get_ssp intrinsics. Remove argument from
5454         __builtin_ia32_rdssp[d|q].
5455         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
5456         * config/i386/i386-builtin.def: Remove argument from
5457         __builtin_ia32_rdssp[d|q].
5458         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
5459         ix86_expand_special_args_builtin for _rdssp[d|q].
5460         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
5461         Clear register before usage.
5462         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
5463         Add documentation for new _get_ssp and _inc_ssp intrinsics.
5465 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
5467         PR tree-optimization/84357
5468         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
5469         operand 1 of an ARRAY_REF too.
5471 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
5473         PR target/83831
5474         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
5475         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
5476         declarations.
5477         (set_of_reg): New struct.
5478         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
5479         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
5480         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
5481         functions.
5482         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
5483         Split into bitclr, bitset, bitinvert patterns if appropriate.
5484         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
5485         use rx_fuse_in_memory_bitop.
5486         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
5487         to named insn, correct maximum insn length.
5489 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
5491         PR target/79242
5492         * machmode.def: Define a complex mode for PARTIAL_INT.
5493         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
5494         MODE_PARTIAL_INT.
5495         * doc/rtl.texi: Document CSPImode.
5496         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
5497         handling.
5498         (msp430_hard_regno_nregs_with_padding): Likewise.
5500 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
5502         PR target/84279
5503         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
5505 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
5507         PR rtl-optimization/84169
5508         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
5509         we generated a parallel as new i3 and we split that to new i2 and i3
5510         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
5511         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
5512         those to i2, not i1.  Partially rewrite this scan code.
5514 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
5516         PR c/82210
5517         * stor-layout.c (place_field): For variable length fields, adjust
5518         offset_align afterwards not just based on the field's alignment,
5519         but also on the size.
5521         PR middle-end/84309
5522         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
5523         of exps and logs in the use_exp2 case.
5525 2018-02-13  Jeff Law  <law@redhat.com>
5527         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
5528         entry for "vector".
5530         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
5531         ARGS as unused.
5533 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
5535         PR debug/84342
5536         PR debug/84319
5537         * common.opt (gas-loc-support, gas-locview-support): New.
5538         (ginline-points, ginternal-reset-location-views): New.
5539         * doc/invoke.texi: Document them.  Use @itemx where intended.
5540         (gvariable-location-views): Adjust.
5541         * target.def (reset_location_view): New.
5542         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
5543         (TARGET_RESET_LOCATION_VIEW): New.
5544         * doc/tm.texi: Rebuilt.
5545         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
5546         (dwarf2out_default_as_locview_support): New.
5547         (output_asm_line_debug_info): Use option variables.
5548         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
5549         (output_loc_list): Likewise.
5550         (add_high_low_attributes): Check option variables.
5551         Don't output entry view attribute in strict mode.
5552         (gen_inlined_subroutine_die): Check option variables.
5553         (dwarf2out_inline_entry): Likewise.
5554         (init_sections_and_labels): Likewise.
5555         (dwarf2out_early_finish): Likewise.
5556         (maybe_reset_location_view): New, from...
5557         (dwarf2out_var_location): ... here.  Call it.
5558         * debug.h (dwarf2out_default_as_loc_support): Declare.
5559         (dwarf2out_default_as_locview_support): Declare.
5560         * hooks.c (hook_int_rtx_insn_0): New.
5561         * hooks.h (hook_int_rtx_insn_0): Declare.
5562         * toplev.c (process_options): Take -gas-loc-support and
5563         -gas-locview-support from dwarf2out.  Enable
5564         -gvariable-location-views by default only with locview
5565         assembler support.  Enable -ginternal-reset-location-views by
5566         default only if the target defines the corresponding hook.
5567         Enable -ginline-points by default if location views are
5568         enabled; force it disabled if statement frontiers are
5569         disabled.
5570         * tree-inline.c (expand_call_inline): Check option variables.
5571         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
5573 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
5575         PR tree-optimization/84321
5576         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
5577         handling.  Also check whether the anti-range contains any values
5578         that satisfy the mask; switch to a VR_RANGE if not.
5580 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
5582         PR sanitizer/84340
5583         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
5585 2018-02-13  Martin Jambor  <mjambor@suse.cz>
5587         PR c++/83990
5588         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
5589         of call statements, also set location of a load to a temporary.
5591 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
5593         * config/rl78/rl78.c (add_vector_labels): New function.
5594         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
5595         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
5596         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert 
5597         which checks that no arguments are passed.
5598         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
5599         * doc/extend.texi: Documentation for the new attribute.
5601 2018-02-13  Andreas Schwab  <schwab@suse.de>
5603         * config/riscv/linux.h (CPP_SPEC): Define.
5605 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
5607         PR target/84335
5608         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
5609         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
5610         OPTION_MASK_ISA_AES as first argument to def_builtin_const
5611         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
5612         instead of OPTION_MASK_ISA_PCLMUL as first argument to
5613         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
5614         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
5615         temporarily for AES and PCLMUL builtins.
5617         PR tree-optimization/84339
5618         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
5619         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
5620         Formatting fixes.
5622         PR middle-end/84309
5623         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
5624         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
5625         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
5626         inline function.
5627         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
5628         inline function.
5629         * omp-simd-clone.h: New file.
5630         * omp-simd-clone.c: Include omp-simd-clone.h.
5631         (expand_simd_clones): No longer static.
5632         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
5633         cgraph.h and omp-simd-clone.h.
5634         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
5635         (vect_recog_widen_shift_pattern): Formatting fix.
5636         (vect_pattern_recog_1): Don't check optab for calls.
5638         PR target/84336
5639         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
5640         operands[2] into a REG before using gen_lowpart on it.
5642 2018-02-12  Jeff Law  <law@redhat.com>
5644         PR target/83760
5645         * config/sh/sh.c (find_barrier): Consider a sibling call
5646         a barrier as well.
5648         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
5649         successfully back substituting a reg.
5651 2018-02-12  Richard Biener  <rguenther@suse.de>
5653         PR tree-optimization/84037
5654         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
5655         parameter, move visited init to caller.
5656         (vect_slp_analyze_operations): Separate cost from validity
5657         check, initialize visited once for all instances.
5658         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
5659         for all instances.
5660         * tree-vect-stmts.c (vect_model_simple_cost): Make early
5661         out an assert.
5662         (vect_model_promotion_demotion_cost): Likewise.
5663         (vectorizable_bswap): Guard cost modeling with !slp_node
5664         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
5665         SLP stmts.
5666         (vectorizable_call): Likewise.
5667         (vectorizable_conversion): Likewise.
5668         (vectorizable_assignment): Likewise.
5669         (vectorizable_shift): Likewise.
5670         (vectorizable_operation): Likewise.
5671         (vectorizable_store): Likewise.
5672         (vectorizable_load): Likewise.
5673         (vectorizable_condition): Likewise.
5674         (vectorizable_comparison): Likewise.
5676 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
5678         PR sanitizer/84307
5679         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
5680         (ASAN_MARK): Fix fnspec to account for return value, change pointer
5681         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
5683 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
5685         PR middle-end/83665
5686         * params.def (inline-min-speedup): Increase from 8 to 15.
5687         (max-inline-insns-auto): Decrease from 40 to 30.
5688         * ipa-split.c (consider_split): Add some buffer for function to
5689         be considered inlining candidate.
5690         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
5691         default values.
5693 2018-02-12  Richard Biener  <rguenther@suse.de>
5695         PR tree-optimization/84037
5696         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
5697         matched stmts if we cannot swap the non-matched ones.
5699 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
5701         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
5702         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
5703         _mm_maskz_scalef_round_ss): New intrinsics.
5704         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
5705         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
5706         __builtin_ia32_scalefss_round): Remove.
5707         (__builtin_ia32_scalefsd_mask_round,
5708         __builtin_ia32_scalefss_mask_round): New intrinsics.
5709         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
5710         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
5711         ((match_operand:VF_128 2 "<round_nimm_predicate>"
5712         "<round_constraint>")): Changed to ...
5713         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
5714         "<round_scalar_constraint>")): ... this.
5715         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
5716         %0, %1, %2<round_op3>}"): Changed to ...
5717         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
5718         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
5719         %2<round_scalar_mask_op3>}"): ... this.
5720         * config/i386/subst.md (round_scalar_nimm_predicate): New.
5722 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
5724         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
5725         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
5726         (_mm_maskz_sqrt_round_ss): New intrinsics.
5727         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
5728         (__builtin_ia32_sqrtsd_mask_round)
5729         (__builtin_ia32_sqrtss_mask_round): New builtins.
5730         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
5731         (__builtin_ia32_sqrtss_round): Remove.
5732         (__builtin_ia32_sqrtsd_mask_round)
5733         (__builtin_ia32_sqrtss_mask_round): New builtins.
5734         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
5735         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
5736         ((match_operand:VF_128 1 "vector_operand"
5737         "xBm,<round_constraint>")): Changed to ...
5738         ((match_operand:VF_128 1 "vector_operand"
5739         "xBm,<round_scalar_constraint>")): ... this.
5740         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
5741         %0, %2, %<iptr>1<round_op3>}): Changed to ...
5742         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
5743         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
5744         %<iptr>1<round_scalar_mask_op3>}): ... this.
5745         ((set_attr "prefix" "<round_prefix>")): Changed to ...
5746         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
5748 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
5750         PR target/84266
5751         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
5752         Cast vec_cmpeq result to correct type.
5753         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
5754         Cast vec_cmpgt result to correct type.
5756 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
5758         * final.c (final_scan_insn_1): Renamed from...
5759         (final_scan_insn): ... this.  New wrapper, to recover
5760         seen from the outermost call in recursive ones.
5761         * config/sparc/sparc.c (output_return): Drop seen from call.
5762         (output_sibcall): Likewise.
5763         * config/visium/visium.c (output_branch): Likewise.
5765 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
5767         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
5768         function label.
5770 2018-02-10  Alan Modra  <amodra@gmail.com>
5772         PR target/84300
5773         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
5774         Specify LR as an input.
5776 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
5778         PR sanitizer/83987
5779         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
5780         remove_member_access_dummy_vars): New functions.
5781         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
5782         lower_omp_1, execute_lower_omp): Use them.
5784         PR rtl-optimization/84308
5785         * shrink-wrap.c (spread_components): Release todo vector.
5787 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
5789         PR rtl-optimization/57193
5790         * ira-color.c (struct allocno_color_data): Add member
5791         conflict_allocno_hard_prefs.
5792         (update_conflict_allocno_hard_prefs): New.
5793         (bucket_allocno_compare_func): Add a preference based on
5794         conflict_allocno_hard_prefs.
5795         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
5796         (color_allocnos): Remove a dead code.  Initiate
5797         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
5799 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
5801         PR target/84226
5802         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
5803         constraint from =wa to wa.  Avoid a subreg on the output operand,
5804         instead use a pseudo and subreg it in a move.
5805         (p9_xxbrd_<mode>): Changed to ...
5806         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
5807         (p9_xxbrd_v2df): New expander.
5808         (p9_xxbrw_<mode>): Changed to ...
5809         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
5810         (p9_xxbrw_v4sf): New expander.
5812 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
5814         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
5816 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
5818         PR target/83926
5819         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
5820         multiply in 32-bit mode.
5821         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
5822         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
5823         mode.
5825 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
5827         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
5828         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
5829         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
5830         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
5832 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
5834         PR lto/84213
5835         * dwarf2out.c (is_trivial_indirect_ref): New function.
5836         (dwarf2out_late_global_decl): Do not generate a location
5837         attribute for variables that have a non-trivial DECL_VALUE_EXPR
5838         and that are not defined in the current unit.
5840 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
5842         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
5843         instead of a libcall for UNORDERED.
5845 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
5847         PR target/82641
5848         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
5849         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
5851 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
5853         PR target/PR84295
5854         * config/s390/s390.c (s390_set_current_function): Invoke
5855         s390_indirect_branch_settings also if fndecl didn't change.
5857 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
5859         * config/rs6000/rs6000.md (blockage): Set length to zero.
5861 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
5863         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
5865 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
5867         PR sanitizer/84285
5868         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
5869         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
5870         -static-lib*san.
5872         PR debug/84252
5873         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
5874         PARALLEL incoming that failed vt_get_decl_and_offset check.
5876         PR middle-end/84237
5877         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
5878         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
5879         TREE_READONLY bit.
5880         (get_variable_section): For decls in named .bss* sections pass true as
5881         second argument to bss_initializer_p.
5883 2018-02-09  Marek Polacek  <polacek@redhat.com>
5884             Jakub Jelinek  <jakub@redhat.com>
5886         PR c++/83659
5887         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
5888         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
5889         Sync some changes from cxx_fold_indirect_ref.
5891 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
5893         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
5894         markers.
5895         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
5896         (BLOCK_INLINE_ENTRY_LABEL): New.
5897         (dwarf2out_var_location): Disregard inline entry markers.
5898         (inline_entry_data): New struct.
5899         (inline_entry_data_hasher): New hashtable type.
5900         (inline_entry_data_hasher::hash): New.
5901         (inline_entry_data_hasher::equal): New.
5902         (inline_entry_data_table): New variable.
5903         (add_high_low_attributes): Add DW_AT_entry_pc and
5904         DW_AT_GNU_entry_view attributes if a pending entry is found
5905         in inline_entry_data_table.  Add old entry_pc attribute only
5906         if debug nonbinding markers are disabled.
5907         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
5908         markers are enabled.
5909         (block_within_block_p, dwarf2out_inline_entry): New.
5910         (dwarf2out_finish): Check that no entries remained in
5911         inline_entry_data_table.
5912         * final.c (reemit_insn_block_notes): Handle inline entry notes.
5913         (final_scan_insn, notice_source_line): Likewise.
5914         (rest_of_clean_state): Skip inline entry markers.
5915         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
5916         markers.
5917         * gimple.c (gimple_build_debug_inline_entry): New.
5918         * gimple.h (enum gimple_debug_subcode): Add
5919         GIMPLE_DEBUG_INLINE_ENTRY.
5920         (gimple_build_debug_inline_entry): Declare.
5921         (gimple_debug_inline_entry_p): New.
5922         (gimple_debug_nonbind_marker_p): Adjust.
5923         * insn-notes.def (INLINE_ENTRY): New.
5924         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
5925         inline entry marker notes.
5926         (print_insn): Likewise.
5927         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
5928         (INSN_DEBUG_MARKER_KIND): Likewise.
5929         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
5930         * tree-inline.c (expand_call_inline): Build and insert
5931         debug_inline_entry stmt.
5932         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
5933         inline entry blocks early, if nonbind markers are enabled.
5934         (dump_scope_block): Dump fragment info.
5935         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
5936         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
5937         (gimple_build_debug_inline_entry): New.
5938         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
5939         Enable/disable inline entry points too.
5940         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
5941         (DEBUG_INSN): Describe inline entry markers.
5943         * common.opt (gvariable-location-views): New.
5944         (gvariable-location-views=incompat5): New.
5945         * config.in: Rebuilt.
5946         * configure: Rebuilt.
5947         * configure.ac: Test assembler for view support.
5948         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
5949         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
5950         * dwarf2out.c (var_loc_view): New typedef.
5951         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
5952         (dwarf2out_locviews_in_attribute): New.
5953         (dwarf2out_locviews_in_loclist): New.
5954         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
5955         (enum dw_line_info_opcode): Add LI_adv_address.
5956         (struct dw_line_info_table): Add view.
5957         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
5958         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
5959         (zero_view_p): New variable.
5960         (ZERO_VIEW_P): New macro.
5961         (output_asm_line_debug_info): New.
5962         (struct var_loc_node): Add view.
5963         (add_AT_view_list, AT_loc_list): New.
5964         (add_var_loc_to_decl): Add view param.  Test it against last.
5965         (new_loc_list): Add view params.  Record them.
5966         (AT_loc_list_ptr): Handle loc and view lists.
5967         (view_list_to_loc_list_val_node): New.
5968         (print_dw_val): Handle dw_val_class_view_list.
5969         (size_of_die): Likewise.
5970         (value_format): Likewise.
5971         (loc_list_has_views): New.
5972         (gen_llsym): Set vl_symbol too.
5973         (maybe_gen_llsym, skip_loc_list_entry): New.
5974         (dwarf2out_maybe_output_loclist_view_pair): New.
5975         (output_loc_list): Output view list or entries too.
5976         (output_view_list_offset): New.
5977         (output_die): Handle dw_val_class_view_list.
5978         (output_dwarf_version): New.
5979         (output_compilation_unit_header): Use it.
5980         (output_skeleton_debug_sections): Likewise.
5981         (output_rnglists, output_line_info): Likewise.
5982         (output_pubnames, output_aranges): Update version comments.
5983         (output_one_line_info_table): Output view numbers in asm comments.
5984         (dw_loc_list): Determine current endview, pass it to new_loc_list.
5985         Call maybe_gen_llsym.
5986         (loc_list_from_tree_1): Adjust.
5987         (add_AT_location_description): Create view list attribute if
5988         needed, check it's absent otherwise.
5989         (convert_cfa_to_fb_loc_list): Adjust.
5990         (maybe_emit_file): Call output_asm_line_debug_info for test.
5991         (dwarf2out_var_location): Reset views as needed.  Precompute
5992         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
5993         attribute.  Set view.
5994         (new_line_info_table): Reset next view.
5995         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
5996         (dwarf2out_source_line): Likewise.  Output view resets and labels to
5997         the assembler, or select appropriate line info opcodes.
5998         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
5999         (optimize_string_length): Catch it.  Adjust.
6000         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
6001         dw_val_class_view_list, and remove it if no longer needed.
6002         (hash_loc_list): Hash view numbers.
6003         (loc_list_hasher::equal): Compare them.
6004         (optimize_location_lists): Check whether a view list symbol is
6005         needed, and whether the locview attribute is present, and
6006         whether they match.  Remove the locview attribute if no longer
6007         needed.
6008         (index_location_lists): Call skip_loc_list_entry for test.
6009         (dwarf2out_finish): Call output_asm_line_debug_info for test.
6010         Use output_dwarf_version.
6011         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
6012         (struct dw_val_node): Add val_view_list.
6013         * final.c (SEEN_NEXT_VIEW): New.
6014         (set_next_view_needed): New.
6015         (clear_next_view_needed): New.
6016         (maybe_output_next_view): New.
6017         (final_start_function): Rename to...
6018         (final_start_function_1): ... this.  Take pointer to FIRST,
6019         add SEEN parameter.  Emit param bindings in the initial view.
6020         (final_start_function): Reintroduce SEEN-less interface.
6021         (final): Rename to...
6022         (final_1): ... this.  Take SEEN parameter.  Output final pending
6023         next view at the end.
6024         (final): Reintroduce seen-less interface.
6025         (final_scan_insn): Output pending next view before switching
6026         sections or ending a block.  Mark the next view as needed when
6027         outputting variable locations.  Notify debug backend of section
6028         changes, and of location view changes.
6029         (rest_of_handle_final): Adjust.
6030         * toplev.c (process_options): Autodetect value for debug variable
6031         location views option.  Warn on incompat5 without -gdwarf-5.
6032         * doc/invoke.texi (gvariable-location-views): New.
6033         (gvariable-location-views=incompat5): New.
6034         (gno-variable-location-views): New.
6036 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
6038         PR tree-optimization/84136
6039         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
6040         that the result of find_edge is non-NULL.
6042 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
6044         PR target/83008
6045         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
6046         storing integer register in SImode.  Fix cost of 256 and 512
6047         byte aligned SSE register store.
6049 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
6051         * config/i386/i386.c (ix86_multiplication_cost): Fix
6052         multiplication cost for TARGET_AVX512DQ.
6054 2018-02-08  Marek Polacek  <polacek@redhat.com>
6056         PR tree-optimization/84238
6057         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
6058         get_range_strlen.
6060 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
6062         PR tree-optimization/84265
6063         * tree-vect-stmts.c (vectorizable_store): Don't treat
6064         VMAT_CONTIGUOUS accesses as grouped.
6065         (vectorizable_load): Likewise.
6067 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
6069         PR tree-optimization/81635
6070         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
6071         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
6072         (test_round_for_mask): New functions.
6073         (wide_int_cc_tests): Call test_round_for_mask.
6074         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
6075         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
6076         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
6077         range returned by get_range_info.
6079 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
6081         PR ipa/81360
6082         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
6083         * symtab.c: Include builtins.h
6084         (symtab_node::output_to_lto_symbol_table_p): Move here
6085         from lto-streamer-out.c:output_symbol_p.
6086         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
6087         (output_symbol_p): Move all logic to symtab.c
6088         (produce_symtab): Update.
6090 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
6092         * config/s390/s390-opts.h (enum indirect_branch): Define.
6093         * config/s390/s390-protos.h (s390_return_addr_from_memory)
6094         (s390_indirect_branch_via_thunk)
6095         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
6096         (enum s390_indirect_branch_type): Define.
6097         * config/s390/s390.c (struct s390_frame_layout, struct
6098         machine_function): Remove.
6099         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
6100         (indirect_branch_table_label_no, indirect_branch_table_name):
6101         Define variables.
6102         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
6103         (enum s390_indirect_branch_option): Define.
6104         (s390_return_addr_from_memory): New function.
6105         (s390_handle_string_attribute): New function.
6106         (s390_attribute_table): Add new attribute handler.
6107         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
6108         (s390_indirect_branch_via_thunk): New function.
6109         (s390_indirect_branch_via_inline_thunk): New function.
6110         (s390_function_ok_for_sibcall): When jumping via thunk disallow
6111         sibling call optimization for non z10 compiles.
6112         (s390_emit_call): Force indirect branch target to be a single
6113         register.  Add r1 clobber for non-z10 compiles.
6114         (s390_emit_epilogue): Emit return jump via return_use expander.
6115         (s390_reorg): Handle JUMP_INSNs as execute targets.
6116         (s390_option_override_internal): Perform validity checks for the
6117         new command line options.
6118         (s390_indirect_branch_attrvalue): New function.
6119         (s390_indirect_branch_settings): New function.
6120         (s390_set_current_function): Invoke s390_indirect_branch_settings.
6121         (s390_output_indirect_thunk_function):  New function.
6122         (s390_code_end): Implement target hook.
6123         (s390_case_values_threshold): Implement target hook.
6124         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
6125         macros.
6126         * config/s390/s390.h (struct s390_frame_layout)
6127         (struct machine_function): Move here from s390.c.
6128         (TARGET_INDIRECT_BRANCH_NOBP_RET)
6129         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
6130         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
6131         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
6132         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
6133         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
6134         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
6135         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
6136         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
6137         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
6138         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
6139         (mnemonic attribute): Add values which aren't recognized
6140         automatically.
6141         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
6142         pattern for branch conversion.  Fix mnemonic attribute.
6143         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
6144         indirect branch via thunk if requested.
6145         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
6146         ("*indirect_jump"): Disable for branch conversion using out of
6147         line thunks.
6148         ("indirect_jump_via_thunk<mode>_z10")
6149         ("indirect_jump_via_thunk<mode>")
6150         ("indirect_jump_via_inlinethunk<mode>_z10")
6151         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
6152         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
6153         ("casesi_jump_via_inlinethunk<mode>_z10")
6154         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
6155         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
6156         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
6157         ("*indirect2_jump"): Disable for branch conversion.
6158         ("casesi_jump"): Turn into expander and expand patterns for branch
6159         conversion.
6160         ("return_use"): New expander.
6161         ("*return"): Emit return via thunk and rename it to ...
6162         ("*return<mode>"): ... this one.
6163         * config/s390/s390.opt: Add new options and and enum for the
6164         option values.
6166 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
6168         * lra-constraints.c (match_reload): Unconditionally use
6169         gen_lowpart_SUBREG, rather than selecting between that
6170         and equivalent gen_rtx_SUBREG code.
6172 2018-02-08  Richard Biener  <rguenther@suse.de>
6174         PR tree-optimization/84233
6175         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
6176         changed flag instead of boguously re-using phi_inserted.
6178 2018-02-08  Martin Jambor  <mjambor@suse.cz>
6180         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
6181         static local variables.
6183 2018-02-08  Richard Biener  <rguenther@suse.de>
6185         PR tree-optimization/84278
6186         * tree-vect-stmts.c (vectorizable_store): When looking for
6187         smaller vector types to perform grouped strided loads/stores
6188         make sure the mode is supported by the target.
6189         (vectorizable_load): Likewise.
6191 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
6193         * config/aarch64/aarch64.c (aarch64_components_for_bb):
6194         Increase LDP/STP opportunities by adding adjacent callee-saves.
6196 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
6198         PR rtl-optimization/84068
6199         PR rtl-optimization/83459
6200         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
6202 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
6204         PR tree-optimization/84224
6205         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
6206         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
6207         non-zero arguments.
6209 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
6211         PR target/84113
6212         * config/rs6000/altivec.md (*restore_world): Remove LR use.
6213         * config/rs6000/predicates.md (restore_world_operation): Adjust op
6214         count, remove one USE.
6216 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
6218         * doc/install.texi (Configuration): Document the
6219         --with-long-double-format={ibm,ieee} PowerPC configuration
6220         options.
6222         PR target/84154
6223         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
6224         Convert from define_expand to be define_insn_and_split.  Rework
6225         float/double/_Float128 conversions to QI/HI/SImode to work with
6226         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
6227         conversions to QI/HImode types did a store and then a load to
6228         truncate the value.  For conversions to VSX registers, don't split
6229         the insn, instead emit the code directly.  Use the code iterator
6230         any_fix to combine signed and unsigned conversions.
6231         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
6232         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
6233         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
6234         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
6235         (fix_<mode>di2_hw): Likewise.
6236         (fixuns_<mode>di2_hw): Likewise.
6237         (fix_<mode>si2_hw): Likewise.
6238         (fixuns_<mode>si2_hw): Likewise.
6239         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
6240         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
6241         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
6242         fix<uns>_trunc<SFDF:mode>si2_p8.
6243         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
6244         used.
6245         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
6246         (fix<uns>_<mode>_mem): Likewise.
6247         (fctiw<u>z_<mode>_mem): Likewise.
6248         (fix<uns>_<mode>_mem): Likewise.
6249         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
6250         the register allocator from doing a direct move to the GPRs to do
6251         a store, and instead use the ISA 3.0 store byte/half-word from
6252         vector register instruction.  For IEEE 128-bit floating point,
6253         also optimize stores of 32-bit ints.
6254         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
6256 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
6258         * genextract.c (push_pathstr_operand): New function to support
6259         [a-zA-Z].
6260         (walk_rtx): Call push_pathstr_operand.
6261         (print_path): Support [a-zA-Z].
6263 2018-02-07  Richard Biener  <rguenther@suse.de>
6265         PR tree-optimization/84037
6266         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
6267         (cse_and_gimplify_to_preheader): Declare.
6268         (vect_get_place_in_interleaving_chain): Likewise.
6269         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
6270         ivexpr_map.
6271         (_loop_vec_info::~_loop_vec_info): Delete it.
6272         (cse_and_gimplify_to_preheader): New function.
6273         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
6274         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
6275         (vectorizable_load): Likewise.  For grouped stores always base
6276         the IV on the first element.
6277         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
6278         condition before gimplifying.
6280 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
6282         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
6283         *DIV_EXPR and *MOD_EXPR.
6285 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
6287         PR target/84248
6288         * config/i386/i386.c (ix86_option_override_internal): Mask out
6289         the CF_SET bit when checking -fcf-protection.
6291 2018-02-07  Tom de Vries  <tom@codesourcery.com>
6293         PR libgomp/84217
6294         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
6295         enough.
6297 2018-02-07  Richard Biener  <rguenther@suse.de>
6299         PR tree-optimization/84204
6300         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
6301         this place.
6303         PR tree-optimization/84205
6304         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
6305         special-case isl_ast_op_zdiv_r.
6307         PR tree-optimization/84223
6308         * graphite-scop-detection.c (gather_bbs::before_dom_children):
6309         Only add conditions from within the region.
6310         (gather_bbs::after_dom_children): Adjust.
6312 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
6314         PR target/84209
6315         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
6316         * config/avr/avr.md: Only post-reload split REG-REG moves if
6317         either register is GENERAL_REG_P.
6319 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
6321         PR tree-optimization/84235
6322         * tree-ssa-scopedtables.c
6323         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
6324         if the subtraction is performed in floating point type where NaNs are
6325         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
6326         build 1.  Formatting fix.
6328 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
6330         PR target/84146
6331         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
6332         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
6333         and skip it regardless of bb boundaries.  Use CALL_P macro,
6334         don't test INSN_P (insn) together with CALL_P or JUMP_P check
6335         unnecessarily, formatting fix.
6337 2018-02-06  Michael Collison  <michael.collison@arm.com>
6339         * config/arm/thumb2.md:
6340         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
6341         (*thumb_mov_notscc): Ditto.
6343 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
6345         PR target/84154
6346         * config/rs6000/rs6000.md (su code attribute): Use "u" for
6347         unsigned_fix, not "s".
6349 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6351         * configure.ac (gcc_fn_eh_frame_ro): New function.
6352         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
6353         correct .eh_frame permissions.
6354         * configure: Regenerate.
6356 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
6358         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
6359         irrelevant options.
6361 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6363         * config/rs6000/rs6000.c (rs6000_option_override_internal):
6364         Display warning message for -mno-speculate-indirect-jumps.
6366 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
6368         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
6369         Undocumented.
6370         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
6372 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
6374         PR tree-optimization/84225
6375         * tree-eh.c (find_trapping_overflow): Only call
6376         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
6378 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
6380         PR target/84145
6381         * config/i386/i386.c: Reimplement the check of possible options
6382         -mibt/-mshstk conbination. Change error messages.
6383         * doc/invoke.texi: Fix a typo: remove extra '='.
6385 2018-02-06  Marek Polacek  <polacek@redhat.com>
6387         PR tree-optimization/84228
6388         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
6390 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
6392         PR target/82641
6393         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
6394         emitted arch directives.
6395         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
6396         __ARM_FEATURE_COPROC before changing architectures.
6398 2018-02-06  Richard Biener  <rguenther@suse.de>
6400         * config/i386/i386.c (print_reg): Fix typo.
6401         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
6403 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
6405         * configure: Regenerate.
6407 2018-02-05  Martin Sebor  <msebor@redhat.com>
6409         PR tree-optimization/83369
6410         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
6411         inlining context.
6413 2018-02-05  Martin Liska  <mliska@suse.cz>
6415         * doc/invoke.texi: Cherry-pick upstream r323995.
6417 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
6419         * ira.c (ira_init_register_move_cost): Adjust comment.
6421 2018-02-05  Martin Liska  <mliska@suse.cz>
6423         PR gcov-profile/84137
6424         * doc/gcov.texi: Fix typo in documentation.
6426 2018-02-05  Martin Liska  <mliska@suse.cz>
6428         PR gcov-profile/83879
6429         * doc/gcov.texi: Document necessity of --dynamic-list-data when
6430         using dlopen functionality.
6432 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
6434         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
6435         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
6436         _mm_maskz_range_ss, _mm_mask_range_round_ss,
6437         _mm_maskz_range_round_ss): New intrinsics.
6438         (__builtin_ia32_rangesd128_round)
6439         (__builtin_ia32_rangess128_round): Remove.
6440         (__builtin_ia32_rangesd128_mask_round,
6441         __builtin_ia32_rangess128_mask_round): New builtins.
6442         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
6443         __builtin_ia32_rangess128_round): Remove.
6444         (__builtin_ia32_rangesd128_mask_round,
6445         __builtin_ia32_rangess128_mask_round): New builtins.
6446         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
6447         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
6448         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
6449         "<round_saeonly_constraint>")): Changed to ...
6450         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
6451         "<round_saeonly_scalar_constraint>")): ... this.
6452         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
6453         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
6454         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
6455         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
6456         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
6458 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
6460         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
6461         options.
6462         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
6463         Remove all values except native, 8540 and 8548.
6465 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
6467         * config/i386/i386.c (ix86_output_function_return): Pass
6468         INVALID_REGNUM, instead of -1, as invalid register number to
6469         indirect_thunk_name and output_indirect_thunk.
6471 2018-02-02  Julia Koval  <julia.koval@intel.com>
6473         * config.gcc: Add -march=icelake.
6474         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
6475         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
6476         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
6477         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
6478         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
6479         (processor_target_table): Add icelake.
6480         (ix86_option_override_internal): Handle new PTAs.
6481         (get_builtin_code_for_version): Handle icelake.
6482         (M_INTEL_COREI7_ICELAKE): New.
6483         (fold_builtin_cpu): Handle icelake.
6484         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
6485         * doc/invoke.texi: Add -march=icelake.
6487 2018-02-02  Julia Koval  <julia.koval@intel.com>
6489         * config/i386/i386.c (ix86_option_override_internal): Change flags type
6490         to wide_int_bitmask.
6491         * wide-int-bitmask.h: New.
6493 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
6495         PR target/84066
6496         * config/i386/i386.md: Replace Pmode with word_mode in
6497         builtin_setjmp_setup and builtin_longjmp to support x32.
6499 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
6501         PR target/56010
6502         PR target/83743
6503         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
6504         #include "opts.h".
6505         (rs6000_supported_cpu_names): New static variable.
6506         (linux_cpu_translation_table): Likewise.
6507         (elf_platform) <cpu>: Define new static variable and use it.
6508         Translate kernel AT_PLATFORM name to canonical name if needed.
6509         Error if platform name is unknown.
6511 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
6513         PR target/84089
6514         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
6516 2018-02-01  Jeff Law  <law@redhat.com>
6518         PR target/84128
6519         * config/i386/i386.c (release_scratch_register_on_entry): Add new
6520         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
6521         the scratch if RELEASE_VIA_POP is false.
6522         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
6523         If we have to save a temporary register, decrement SIZE appropriately.
6524         Pass new arguments to release_scratch_register_on_entry.
6525         (ix86_adjust_stack_and_probe): Likewise.
6526         (ix86_emit_probe_stack_range): Pass new arguments to
6527         release_scratch_register_on_entry.
6529 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
6531         PR rtl-optimization/84157
6532         * combine.c (change_zero_ext): Use REG_P predicate in
6533         front of HARD_REGISTER_P predicate.
6535 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
6537         * config/avr/avr.c (avr_option_override): Move disabling of
6538         -fdelete-null-pointer-checks to...
6539         * common/config/avr/avr-common.c (avr_option_optimization_table):
6540         ...here.
6542 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
6544         PR tree-optimization/81635
6545         * tree-data-ref.c (split_constant_offset_1): For types that
6546         wrap on overflow, try to use range info to prove that wrapping
6547         cannot occur.
6549 2018-02-01  Renlin Li  <renlin.li@arm.com>
6551         PR target/83370
6552         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
6553         TAILCALL_ADDR_REGS.
6554         (aarch64_register_move_cost): Likewise.
6555         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
6556         TAILCALL_ADDR_REGS.
6557         (REG_CLASS_NAMES): Likewise.
6558         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
6559         TAILCALL_ADDR_REGS. Remove IP registers.
6560         * config/aarch64/aarch64.md (Ucs): Update register constraint.
6562 2018-02-01  Richard Biener  <rguenther@suse.de>
6564         * domwalk.h (dom_walker::dom_walker): Add additional constructor
6565         for specifying RPO order and allow NULL for that.
6566         * domwalk.c (dom_walker::dom_walker): Likewise.
6567         (dom_walker::walk): Handle NULL RPO order.
6568         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
6569         in RPO order.
6570         (rewrite_update_dom_walker): Likewise.
6571         (mark_def_dom_walker): Likewise.
6573 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
6575         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
6576         (aarch64_maybe_expand_sve_subreg_move): Declare.
6577         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
6578         * config/aarch64/predicates.md (aarch64_any_register_operand): New
6579         predicate.
6580         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
6581         that are semantically a reverse operation.
6582         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
6583         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
6584         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
6585         functions.
6586         (aarch64_can_change_mode_class): For big-endian, forbid changes
6587         between two SVE modes if they have different element sizes.
6589 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
6591         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
6592         the TImode handling for big-endian targets.
6594 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
6596         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
6597         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
6598         not just bytes.
6599         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
6600         Remove BSWAP handing for big-endian targets and use the form of
6601         LD1RQ appropariate for the mode.
6603 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
6605         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
6606         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
6607         duplicated element.
6609 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
6611         PR tearget/83845
6612         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
6613         check for operands that need to go through aarch64_sve_reload_be.
6615 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
6617         PR tree-optimization/81661
6618         PR tree-optimization/84117
6619         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
6620         * tree-eh.c: Include gimplify.h.
6621         (find_trapping_overflow, replace_trapping_overflow,
6622         rewrite_to_non_trapping_overflow): New functions.
6623         * tree-vect-loop.c: Include tree-eh.h.
6624         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
6625         * tree-data-ref.c: Include tree-eh.h.
6626         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
6628 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
6630         PR rtl-optimization/84123
6631         * combine.c (change_zero_ext): Check if hard register satisfies
6632         can_change_dest_mode before calling gen_lowpart_SUBREG.
6634 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
6636         PR target/82444
6637         * ira.c (ira_init_register_move_cost): Remove assert.
6639 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
6641         PR rtl-optimization/84071
6642         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
6643         * doc/tm.texi: Regenerate.
6645 2018-01-31  Richard Biener  <rguenther@suse.de>
6647         PR tree-optimization/84132
6648         * tree-data-ref.c (analyze_miv_subscript): Properly
6649         check whether evolution_function_is_affine_multivariate_p
6650         before calling gcd_of_steps_may_divide_p.
6652 2018-01-31  Julia Koval  <julia.koval@intel.com>
6654         PR target/83618
6655         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
6656         * config/i386/i386.md (rdpid_rex64) New.
6657         (rdpid): Make 32bit only.
6659 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
6661         PR lto/84105
6662         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
6663         an IDENTIFIER_NODE for FUNCTION_TYPE's.
6665 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
6667         Revert
6668         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
6670         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
6672 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
6674         PR rtl-optimization/84071
6675         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
6676         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
6678 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
6680         * config/arc/arc.c (arc_handle_aux_attribute): New function.
6681         (arc_attribute_table): Add 'aux' attribute.
6682         (arc_in_small_data_p): Consider aux like variables.
6683         (arc_is_aux_reg_p): New function.
6684         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
6685         (arc_get_aux_arg): New function.
6686         (prepare_move_operands): Handle aux-register access.
6687         (arc_handle_aux_attribute): New function.
6688         * doc/extend.texi (ARC Variable attributes): Add subsection.
6690 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
6692         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
6693         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
6694         (arc_attribute_table): Add 'uncached' attribute.
6695         (arc_print_operand): Print '.di' flag for uncached memory
6696         accesses.
6697         (arc_in_small_data_p): Do not consider for small data the uncached
6698         types.
6699         (arc_is_uncached_mem_p): New function.
6700         * config/arc/predicates.md (compact_store_memory_operand): Check
6701         for uncached memory accesses.
6702         (nonvol_nonimm_operand): Likewise.
6703         * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
6705 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
6707         PR c/84100
6708         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
6709         falign-loops=): Add Optimization flag.
6711 2018-01-30  Jeff Law  <law@redhat.com>
6713         PR target/84064
6714         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
6715         INT_REGISTERS_SAVED.  Check it prior to calling
6716         get_scratch_register_on_entry.
6717         (ix86_adjust_stack_and_probe): Similarly.
6718         (ix86_emit_probe_stack_range): Similarly.
6719         (ix86_expand_prologue): Corresponding changes.
6721 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6723         PR target/40411
6724         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
6725         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
6727 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
6729         PR target/84112
6730         * lra-constraints.c (curr_insn_transform): Process AND in the
6731         address.
6733 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
6735         PR rtl-optimization/83986
6736         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
6737         dependence against last_pending_memory_flush in addition to
6738         pending_jump_insns.
6740 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
6742         PR tree-optimization/81611
6743         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
6744         copies.
6746 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
6748         PR target/83758
6749         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
6750         a reg rtx.
6752 2018-01-30  Richard Biener  <rguenther@suse.de>
6753             Jakub Jelinek  <jakub@redhat.com>
6755         PR tree-optimization/84111
6756         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
6757         inner loops added during recursion, as they don't have up-to-date
6758         SSA form.
6760 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
6762         PR ipa/81360
6763         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
6764         (can_inline_edge_by_limits_p): ... here.
6765         (can_early_inline_edge_p, check_callers,
6766         update_caller_keys, update_callee_keys, recursive_inlining,
6767         add_new_edges_to_heap, speculation_useful_p,
6768         inline_small_functions,
6769         inline_small_functions, flatten_function,
6770         inline_to_all_callers_1): Update.
6772 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
6774         * profile-count.c (profile_count::combine_with_ipa_count): Handle
6775         zeros correctly.
6777 2018-01-30  Richard Biener  <rguenther@suse.de>
6779         PR tree-optimization/83008
6780         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
6781         invariant and constant vector uses in stmts when they need
6782         more than one stmt.
6784 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6786         PR bootstrap/84017
6787         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
6788         * configure: Regenerate.
6790 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
6792         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
6793         pattern.
6794         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
6795         Use gen_rtx_REG rather than gen_lowpart.
6797 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
6799         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
6800         rather than 0 when creating partial subregs.
6802 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
6804         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
6805         of usage.
6807 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
6809         PR target/81550
6810         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
6811         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
6812         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
6813         flags.  This restores the settings used before the 2017-07-24.
6814         Turning off pre increment/decrement/modify allows IVOPTS to
6815         optimize DF/SF loops where the index is an int.
6817 2018-01-29  Richard Biener  <rguenther@suse.de>
6818             Kelvin Nilsen  <kelvin@gcc.gnu.org>
6820         PR bootstrap/80867
6821         * tree-vect-stmts.c (vectorizable_call): Don't call
6822         targetm.vectorize_builtin_md_vectorized_function if callee is
6823         NULL.
6825 2018-01-22  Carl Love  <cel@us.ibm.com>
6827         * doc/extend.tex: Fix typo in second arg in
6828         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
6830 2018-01-29  Richard Biener  <rguenther@suse.de>
6832         PR tree-optimization/84086
6833         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
6834         (flush_ssaname_freelist): When SSA names were released reset
6835         the SCEV hash table.
6837 2018-01-29  Richard Biener  <rguenther@suse.de>
6839         PR tree-optimization/84057
6840         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
6841         removed paths when removing edges.
6843 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
6845         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
6846         -mfunction-return=@var{choice}.
6848 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6850         PR diagnostic/84034
6851         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
6852         Handle CR like TAB.
6853         (layout::print_source_line): Likewise.
6854         (test_get_line_width_without_trailing_whitespace): Add test cases.
6856 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
6858         PR middle-end/84040
6859         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
6860         debug insns.
6862 2018-01-26  Jim Wilson  <jimw@sifive.com>
6864         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
6866         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
6867         specified.
6869 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6871         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
6872         and CMP + SUB-immediate -> SUBS.
6874 2018-01-26  Martin Sebor  <msebor@redhat.com>
6876         PR tree-optimization/83896
6877         * tree-ssa-strlen.c (get_string_len): Rename...
6878         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
6879         Avoid assuming length is constant.
6880         (handle_char_store): Use HOST_WIDE_INT for string length.
6882 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
6884         PR target/81763
6885         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
6886         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
6888 2018-01-26  Richard Biener  <rguenther@suse.de>
6890         PR rtl-optimization/84003
6891         * dse.c (record_store): Only record redundant stores when
6892         the earlier store aliases at least all accesses the later one does.
6894 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
6896         PR rtl-optimization/83985
6897         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
6898         REG_CFA_RESTORE insns.
6899         (delete_unmarked_insns): Don't ignore separate shrink wrapping
6900         REG_CFA_RESTORE insns here.
6902         PR c/83989
6903         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
6904         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
6906 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
6908         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
6909         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
6910         (arc_init): Likewise.
6911         (arc_override_options): Likewise.
6912         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
6913         value.
6914         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
6915         support.
6916         * config/arc/arc.h (TARGET_DBNZ): Define.
6917         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
6918         properly set the tune attribute.
6919         (dbnz): Use TARGET_DBNZ guard.
6920         * config/arc/arc.opt (mtune): Add core3 option.
6922 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
6924         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
6925         recognize new pic like addresses.
6926         (arc_delegitimize_address): Clean up.
6928 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
6930         * config/arc/arc-arches.def: Option mrf16 valid for all
6931         architectures.
6932         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
6933         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
6934         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
6935         * config/arc/arc-tables.opt: Regenerate.
6936         * config/arc/arc.c (arc_conditional_register_usage): Handle
6937         reduced register file case.
6938         (arc_file_start): Set must have build attributes.
6939         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
6940         mrf16 option value.
6941         * config/arc/arc.opt (mrf16): Add new option.
6942         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
6943         * config/arc/genmultilib.awk: Handle new mrf16 option.
6944         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
6945         * config/arc/t-multilib: Regenerate.
6946         * doc/invoke.texi (ARC Options): Document mrf16 option.
6948 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
6950         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
6951         * config/arc/arc.c (arc_handle_secure_attribute): New function.
6952         (arc_attribute_table): Add 'secure_call' attribute.
6953         (arc_print_operand): Print secure call operand.
6954         (arc_function_ok_for_sibcall): Don't optimize tail calls when
6955         secure.
6956         (arc_is_secure_call_p): New function.  * config/arc/arc.md
6957         (call_i): Add support for sjli instruction.
6958         (call_value_i): Likewise.
6959         * config/arc/constraints.md (Csc): New constraint.
6961 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
6962             John Eric Martin  <John.Martin@emmicro-us.com>
6964         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
6965         * config/arc/arc.c (_arc_jli_section): New struct.
6966         (arc_jli_section): New type.
6967         (rc_jli_sections): New static variable.
6968         (arc_handle_jli_attribute): New function.
6969         (arc_attribute_table): Add jli_always and jli_fixed attribute.
6970         (arc_file_end): New function.
6971         (TARGET_ASM_FILE_END): Define.
6972         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
6973         (arc_add_jli_section): New function.
6974         (jli_call_scan): Likewise.
6975         (arc_reorg): Call jli_call_scan.
6976         (arc_output_addsi): Remove 'S' from printing asm operand.
6977         (arc_is_jli_call_p): New function.
6978         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
6979         operand.
6980         (movhi_insn): Likewise.
6981         (movsi_insn): Likewise.
6982         (movsi_set_cc_insn): Likewise.
6983         (loadqi_update): Likewise.
6984         (load_zeroextendqisi_update): Likewise.
6985         (load_signextendqisi_update): Likewise.
6986         (loadhi_update): Likewise.
6987         (load_zeroextendhisi_update): Likewise.
6988         (load_signextendhisi_update): Likewise.
6989         (loadsi_update): Likewise.
6990         (loadsf_update): Likewise.
6991         (movsicc_insn): Likewise.
6992         (bset_insn): Likewise.
6993         (bxor_insn): Likewise.
6994         (bclr_insn): Likewise.
6995         (bmsk_insn): Likewise.
6996         (bicsi3_insn): Likewise.
6997         (cmpsi_cc_c_insn): Likewise.
6998         (movsi_ne): Likewise.
6999         (movsi_cond_exec): Likewise.
7000         (clrsbsi2): Likewise.
7001         (norm_f): Likewise.
7002         (normw): Likewise.
7003         (swap): Likewise.
7004         (divaw): Likewise.
7005         (flag): Likewise.
7006         (sr): Likewise.
7007         (kflag): Likewise.
7008         (ffs): Likewise.
7009         (ffs_f): Likewise.
7010         (fls): Likewise.
7011         (call_i): Remove 'S' asm letter, add jli instruction.
7012         (call_value_i): Likewise.
7013         * config/arc/arc.op (mjli-always): New option.
7014         * config/arc/constraints.md (Cji): New constraint.
7015         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
7016         operand.
7017         (subsf3_fpx): Likewise.
7018         (mulsf3_fpx): Likewise.
7019         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
7020         asm operand.
7021         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
7022         function attrbutes.
7023         * doc/invoke.texi (ARC): Document mjli-always option.
7025 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
7027         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const 
7028         avoid addition with 0 and use incw and decw where possible.
7030 2018-01-26  Richard Biener  <rguenther@suse.de>
7032         PR tree-optimization/81082
7033         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
7034         association if it requires casting to unsigned.
7035         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
7036         from fold_plusminus_mult_expr to catch important cases late when
7037         range info is available.
7039 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7041         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
7042         * configure.ac (hidden_linkonce): New test.
7043         * configure: Regenerate.
7044         * config.in: Regenerate.
7046 2018-01-26  Julia Koval  <julia.koval@intel.com>
7048         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
7049         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
7050         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
7051         _mm_mask_bitshuffle_epi64_mask): Fix type.
7052         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
7053         USI_FTYPE_V4DI_V4DI_USI): Remove.
7054         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
7055         __builtin_ia32_vpshufbitqmb256_mask,
7056         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
7057         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
7058         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
7060 2018-01-26  Alan Modra  <amodra@gmail.com>
7062         PR target/84033
7063         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
7064         UNSPEC_VBPERMQ.  Sort other unspecs.
7066 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
7068         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
7070 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
7072         PR middle-end/83055
7073         * predict.c (drop_profile): Do not push/pop cfun; update also
7074         node->count.
7075         (handle_missing_profiles): Fix logic looking for zero profiles.
7077 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
7079         PR middle-end/83977
7080         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
7081         on functions with #pragma omp declare simd or functions with simd
7082         attribute.
7083         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
7084         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
7085         Remove trailing \n from warning_at calls.
7087 2018-01-25  Tom de Vries  <tom@codesourcery.com>
7089         PR target/84028
7090         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
7091         for neutered workers.
7093 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
7095         PR target/68467
7096         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
7097         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
7099 2018-01-24  Jeff Law  <law@redhat.com>
7101         PR target/83994
7102         * i386.c (get_probe_interval): Move to earlier point.
7103         (ix86_compute_frame_layout): If -fstack-clash-protection and
7104         the frame is larger than the probe interval, then use pushes
7105         to save registers rather than reg->mem moves.
7106         (ix86_expand_prologue): Remove conditional for int_registers_saved
7107         assertion.
7109 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
7111         PR target/84014
7112         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
7113         min/max for never referenced object.
7115 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
7117         PR middle-end/83977
7118         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
7119         here.
7120         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
7121         attributes from DECL_ATTRIBUTES (decl) without affecting
7122         DECL_ATTRIBUTES (current_function_decl).
7123         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
7124         functions with non-NULL DECL_ABSTRACT_ORIGIN.
7126 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
7128         PR tree-optimization/83979
7129         * fold-const.c (fold_comparison): Use constant_boolean_node
7130         instead of boolean_{true,false}_node.
7132 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
7134         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
7135         with zero counts.
7137 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7139         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
7140         Simplify the clause that sets the length attribute.
7141         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
7142         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
7143         clause that sets the length attribute.
7144         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
7146 2018-01-24  Tom de Vries  <tom@codesourcery.com>
7148         PR target/83589
7149         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
7150         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
7151         Add strict parameter.
7152         (prevent_branch_around_nothing): Insert dummy insn between branch to
7153         label and label with no ptx insn inbetween.
7154         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
7156 2018-01-24  Tom de Vries  <tom@codesourcery.com>
7158         PR target/81352
7159         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
7160         for neutered threads in warp.
7161         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
7163 2018-01-24  Richard Biener  <rguenther@suse.de>
7165         PR tree-optimization/83176
7166         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
7167         operands.
7169 2018-01-24  Richard Biener  <rguenther@suse.de>
7171         PR tree-optimization/82819
7172         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
7173         code generating pluses that are no-ops in the target precision.
7175 2018-01-24  Richard Biener  <rguenther@suse.de>
7177         PR middle-end/84000
7178         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
7180 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
7182         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
7183         to merge probabilities.
7184         * predict.c (probably_never_executed): Also mark as cold functions
7185         with global 0 profile and guessed local profile.
7186         * profile-count.c (profile_probability::combine_with_count): New
7187         member function.
7188         * profile-count.h (profile_probability::operator*,
7189         profile_probability::operator*=, profile_probability::operator/,
7190         profile_probability::operator/=): Reduce precision to adjusted
7191         and set value to guessed on contradictory divisions.
7192         (profile_probability::combine_with_freq): Remove.
7193         (profile_probability::combine_wiht_count): Declare.
7194         (profile_count::force_nonzero):: Set to adjusted.
7195         (profile_count::probability_in):: Set quality to adjusted.
7196         * tree-ssa-tail-merge.c (replace_block_by): Use
7197         combine_with_count.
7199 2018-01-23  Andrew Waterman  <andrew@sifive.com>
7200             Jim Wilson  <jimw@sifive.com>
7202         * config/riscv/riscv.c (riscv_stack_boundary): New.
7203         (riscv_option_override): Set riscv_stack_boundary.  Handle
7204         riscv_preferred_stack_boundary_arg.
7205         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
7206         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
7207         (STACK_BOUNDARY): Set to riscv_stack_boundary.
7208         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
7209         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
7210         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
7212 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
7214         PR target/83905
7215         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
7216         of struct ix86_frame.
7217         (ix86_expand_epilogue): Likewise.  Add a local variable for
7218         the reg_save_offset field in struct ix86_frame.
7220 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
7222         PR tree-optimization/82604
7223         * tree-loop-distribution.c (enum partition_kind): New enum item
7224         PKIND_PARTIAL_MEMSET.
7225         (partition_builtin_p): Support above new enum item.
7226         (generate_code_for_partition): Ditto.
7227         (compute_access_range): Differentiate cases that equality can be
7228         proven at all loops, the innermost loops or no loops.
7229         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
7230         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
7231         (finalize_partitions, distribute_loop): Don't fuse partition of
7232         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
7233         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
7234         parloop is enabled.
7236 2018-01-23  Martin Liska  <mliska@suse.cz>
7238         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
7239         order to ignore the predictor.
7240         (PRED_POLYMORPHIC_CALL): Likewise.
7241         (PRED_RECURSIVE_CALL): Likewise.
7243 2018-01-23  Martin Liska  <mliska@suse.cz>
7245         * tree-profile.c (tree_profiling): Print function header to
7246         aware reader which function we are working on.
7247         * value-prof.c (gimple_find_values_to_profile): Do not print
7248         not interesting value histograms.
7250 2018-01-23  Martin Liska  <mliska@suse.cz>
7252         * profile-count.h (enum profile_quality): Add
7253         profile_uninitialized as the first value. Do not number values
7254         as they are zero based.
7255         (profile_count::verify): Update sanity check.
7256         (profile_probability::verify): Likewise.
7258 2018-01-23  Nathan Sidwell  <nathan@acm.org>
7260         * doc/invoke.texi (ffor-scope): Deprecate.
7262 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
7264         PR tree-optimization/83510
7265         * domwalk.c (set_all_edges_as_executable): New function.
7266         (dom_walker::dom_walker): Convert bool param
7267         "skip_unreachable_blocks" to enum reachability.  Move setup of
7268         edge flags to set_all_edges_as_executable and only do it when
7269         reachability is REACHABLE_BLOCKS.
7270         * domwalk.h (enum dom_walker::reachability): New enum.
7271         (dom_walker::dom_walker): Convert bool param
7272         "skip_unreachable_blocks" to enum reachability.
7273         (set_all_edges_as_executable): New decl.
7274         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
7275         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
7276         "reachability".
7277         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
7278         but converting true to REACHABLE_BLOCKS.
7279         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
7280         * tree-vrp.c
7281         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
7282         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
7283         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
7284         REACHABLE_BLOCKS.
7285         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
7286         if check_all_array_refs will be called.
7288 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
7290         * tree.c (selftest::test_location_wrappers): Add more test
7291         coverage.
7293 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
7295         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
7296         (selftest::test_bit_in_range): Likewise.
7298 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
7300         PR testsuite/83888
7301         * doc/sourcebuild.texi (vect_float): Say that the selector
7302         only describes the situation when -funsafe-math-optimizations is on.
7303         (vect_float_strict): Document.
7305 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
7307         PR tree-optimization/83965
7308         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7309         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
7310         instead of checking only for a reduction.
7311         (vect_recog_widen_sum_pattern): Likewise.
7313 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
7315         * predict.c (probably_never_executed): Only use precise profile info.
7316         (compute_function_frequency): Skip after inlining hack since we now
7317         have quality checking.
7319 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
7321         * profile-count.h (profile_probability::very_unlikely,
7322         profile_probability::unlikely, profile_probability::even): Set
7323         precision to guessed.
7325 2018-01-23  Richard Biener  <rguenther@suse.de>
7327         PR tree-optimization/83963
7328         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
7329         Properly terminate dominator walk when crossing the exit edge not
7330         when visiting its source block.
7332 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
7334         PR c++/83918
7335         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
7336         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
7338 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
7340         PR tree-optimization/83957
7341         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
7342         semicolon after for body surrounded by braces.
7344         PR tree-optimization/83081
7345         * profile-count.h (profile_probability::split): New method.
7346         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
7347         Use profile_probability::split.
7348         (do_compare_rtx_and_jump): Fix adjustment of probabilities
7349         when splitting a single conditional jump into 2.
7351 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
7353         PR tree-optimization/69452
7354         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
7355         decl.
7357 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
7359         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
7360         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
7361         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
7363 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
7365         * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
7366         * config/rl78/rl78.md (movdi): New define_expand.
7367         * config/rl78/rl78.c (rl78_split_movdi): New function.
7369 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
7371         PR target/83862
7372         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
7373         no longer used.
7374         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
7375         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
7376         128-bit to produce an UNSPEC move to get the double word with the
7377         signbit and then a shift directly to do signbit.
7378         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
7379         implementation with a new version that just does either a direct
7380         move or a regular move.  Move memory interface to separate insns.
7381         Move insns so they are next to the expander.
7382         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
7383         with signbit move.  Split big and little endian case.
7384         (signbit<mode>2_dm_mem_le): Likewise.
7385         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
7386         (signbit<mode>2_dm2): Likewise.
7388 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
7390         * config/rl78/rl78.md (anddi3): New define_expand.
7392 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
7394         * config/rl78/rl78.md (umindi3): New define_expand.
7396 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
7398         * config/rl78/rl78.md (smindi3): New define_expand.
7400 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
7402         * config/rl78/rl78.md (smaxdi3): New define_expand.
7404 2018-01-22  Carl Love  <cel@us.ibm.com>
7406         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
7407         LVX_V1TI): Add macro expansion.
7408         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
7409         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
7410         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
7411         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
7412         Change check to determine if the instruction is a byte reversing
7413         entry.  Fix typo in comment.
7414         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
7415         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
7416         Add def_builtin calls for new builtins.
7417         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
7418         Add define_insn expansion.
7420 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
7422         * config/rl78/rl78.md (umaxdi3): New define_expand.
7424 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
7426         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
7427         for non-QImode registers.
7429 2018-01-22  Richard Biener  <rguenther@suse.de>
7431         PR tree-optimization/83963
7432         * graphite-scop-detection.c (scop_detection::get_sese): Delay
7433         including the loop exit block.
7434         (scop_detection::merge_sese): Likewise.
7435         (scop_detection::add_scop): Do it here instead.
7437 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7439         * doc/sourcebuild.texi (arm_softfloat): Document.
7441 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
7443         PR gcc/77734
7444         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
7445         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
7446         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
7448 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7449             David Edelsohn  <dje.gcc@gmail.com>
7451         PR target/83946
7452         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
7453         Change "crset eq" to "crset 2".
7454         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
7455         (*call_indirect_aix<mode>_nospec): Likewise.
7456         (*call_value_indirect_aix<mode>_nospec): Likewise.
7457         (*call_indirect_elfv2<mode>_nospec): Likewise.
7458         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
7459         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
7460         change assembly output from . to $.
7461         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
7462         (indirect_jump<mode>_nospec): Change assembly output from . to $.
7463         (*tablejump<mode>_internal1_nospec): Likewise.
7465 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
7467         PR target/80870
7468         * config/sh/sh_optimize_sett_clrt.cc:
7469         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
7471 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
7473         PR tree-optimization/83940
7474         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
7475         offset_dt to vect_constant_def rather than vect_unknown_def_type.
7476         (vect_check_load_store_mask): Add a mask_dt_out parameter and
7477         use it to pass back the definition type.
7478         (vect_check_store_rhs): Likewise rhs_dt_out.
7479         (vect_build_gather_load_calls): Add a mask_dt argument and use
7480         it instead of a call to vect_is_simple_use.
7481         (vectorizable_store): Update calls to vect_check_load_store_mask
7482         and vect_check_store_rhs.  Use the dt returned by the latter instead
7483         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
7484         instead of calls to vect_is_simple_use.  Pass the scalar rather
7485         than the vector operand to vect_is_simple_use when handling
7486         second and subsequent copies of an rhs value.
7487         (vectorizable_load): Update calls to vect_check_load_store_mask
7488         and vect_build_gather_load_calls.  Use the cached mask_dt and
7489         gs_info.offset_dt instead of calls to vect_is_simple_use.
7491 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
7493         PR middle-end/83945
7494         * tree-emutls.c: Include gimplify.h.
7495         (lower_emutls_2): New function.
7496         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
7497         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
7498         it before further processing.
7500         PR target/83930
7501         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
7502         UINTVAL (trueop1) instead of INTVAL (op1).
7504 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
7506         PR debug/81570
7507         PR debug/83728
7508         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
7509         INCOMING_FRAME_SP_OFFSET if not defined.
7510         (scan_trace): Add ENTRY argument.  If true and
7511         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
7512         emit a note to adjust the CFA offset.
7513         (create_cfi_notes): Adjust scan_trace callers.
7514         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
7515         INCOMING_FRAME_SP_OFFSET in the CIE.
7516         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
7517         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
7518         Likewise.
7519         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
7520         * doc/tm.texi: Regenerated.
7522 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
7524         PR rtl-optimization/83147
7525         * lra-constraints.c (remove_inheritance_pseudos): Use
7526         lra_substitute_pseudo_within_insn.
7528 2018-01-19  Tom de Vries  <tom@codesourcery.com>
7529             Cesar Philippidis  <cesar@codesourcery.com>
7531         PR target/83920
7532         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
7534 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
7536         PR target/83790
7537         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
7538         spaces for function labels.
7540 2018-01-19  Martin Liska  <mliska@suse.cz>
7542         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
7543         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
7544         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
7545         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
7546         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
7547         (PRED_CONST_RETURN): Change from 69 to 65.
7548         (PRED_NULL_RETURN): Change from 91 to 71.
7549         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
7550         (PRED_LOOP_GUARD): Change from 66 to 73.
7552 2018-01-19  Martin Liska  <mliska@suse.cz>
7554         * predict.c (predict_insn_def): Add new assert.
7555         (struct branch_predictor): Change type to signed integer.
7556         (test_prediction_value_range): Amend test to cover
7557         PROB_UNINITIALIZED.
7558         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
7559         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
7560         (PRED_LOOP_ITERATIONS_MAX): Likewise.
7561         (PRED_LOOP_IV_COMPARE): Likewise.
7562         * predict.h (PROB_UNINITIALIZED): Define new constant.
7564 2018-01-19  Martin Liska  <mliska@suse.cz>
7566         * predict.c (dump_prediction): Add new format for
7567         analyze_brprob.py script which is enabled with -details
7568         suboption.
7569         * profile-count.h (precise_p): New function.
7571 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
7573         PR tree-optimization/83922
7574         * tree-vect-loop.c (vect_verify_full_masking): Return false if
7575         there are no statements that need masking.
7576         (vect_active_double_reduction_p): New function.
7577         (vect_analyze_loop_operations): Use it when handling phis that
7578         are not in the loop header.
7580 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
7582         PR tree-optimization/83914
7583         * tree-vect-loop.c (vectorizable_induction): Don't convert
7584         init_expr or apply the peeling adjustment for inductions
7585         that are nested within the vectorized loop.
7587 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7589         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
7590         instead of NEG.
7592 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
7594         PR sanitizer/81715
7595         PR testsuite/83882
7596         * function.h (gimplify_parameters): Add gimple_seq * argument.
7597         * function.c: Include gimple.h and options.h.
7598         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
7599         for the added local temporaries if needed.
7600         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
7601         if there are any parameter cleanups, wrap whole body into a
7602         try/finally with the cleanups.
7604 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
7606         PR target/82964
7607         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
7608         Use GET_MODE_CLASS for scalar floating point.
7610 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
7612         PR ipa/82256
7613         patch by PaX Team
7614         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
7615         Fix call of call_cgraph_insertion_hooks.
7617 2018-01-18  Martin Sebor  <msebor@redhat.com>
7619         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
7621 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
7623         PR ipa/83619
7624         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
7625         frequencies.
7627 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
7629         PR other/70268
7630         * common.opt: (-ffile-prefix-map): New option.
7631         * opts.c (common_handle_option): Defer it.
7632         * opts-global.c (handle_common_deferred_options): Handle it.
7633         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
7634         * file-prefix-map.h: New file.
7635         (remap_debug_filename, add_debug_prefix_map): ...here.
7636         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
7637         * final.c (debug_prefix_map, add_debug_prefix_map
7638         remap_debug_filename): Move to...
7639         * file-prefix-map.c: New file.
7640         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
7641         generalize, get rid of alloca(), use strrchr() instead of strchr().
7642         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
7643         Implement in terms of add_prefix_map().
7644         (remap_macro_filename, remap_debug_filename): Implement in term of
7645         remap_filename().
7646         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
7647         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
7648         * dbxout.c: Include file-prefix-map.h.
7649         * varasm.c: Likewise.
7650         * vmsdbgout.c: Likewise.
7651         * xcoffout.c: Likewise.
7652         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
7653         * doc/cppopts.texi (-fmacro-prefix-map): Document.
7654         * doc/invoke.texi (-ffile-prefix-map): Document.
7655         (-fdebug-prefix-map): Update description.
7657 2018-01-18  Martin Liska  <mliska@suse.cz>
7659         * config/i386/i386.c (indirect_thunk_name): Document that also
7660         lfence is emitted.
7661         (output_indirect_thunk): Document why both instructions
7662         (pause and lfence) are generated.
7664 2018-01-18  Richard Biener  <rguenther@suse.de>
7666         PR tree-optimization/83887
7667         * graphite-scop-detection.c
7668         (scop_detection::get_nearest_dom_with_single_entry): Remove.
7669         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
7670         (scop_detection::merge_sese): Re-implement with a flood-fill
7671         algorithm that properly finds a SESE region if it exists.
7673 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
7675         PR c/61240
7676         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
7677         pointer_diff optimizations use view_convert instead of convert.
7679 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7681         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
7682         Generate different code for -mno-speculate-indirect-jumps.
7683         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
7684         (*call_indirect_aix<mode>): Disable for
7685         -mno-speculate-indirect-jumps.
7686         (*call_indirect_aix<mode>_nospec): New define_insn.
7687         (*call_value_indirect_aix<mode>): Disable for
7688         -mno-speculate-indirect-jumps.
7689         (*call_value_indirect_aix<mode>_nospec): New define_insn.
7690         (*sibcall_nonlocal_sysv<mode>): Generate different code for
7691         -mno-speculate-indirect-jumps.
7692         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
7694 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
7696         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
7697         long double type, set the flags for noting the default long double
7698         type, even if we don't pass or return a long double type.
7700 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
7702         PR ipa/83051
7703         * ipa-inline.c (flatten_function): Do not overwrite final inlining
7704         failure.
7706 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
7708         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
7709         support for merge[hl].
7710         (fold_mergehl_helper): New helper function.
7711         (tree-vector-builder.h): New #include for tree_vector_builder usage.
7712         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
7713         (altivec_vmrglw_direct): Add xxmrglw insn.
7715 2018-01-17  Andrew Waterman  <andrew@sifive.com>
7717         * config/riscv/riscv.c (riscv_conditional_register_usage): If
7718         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
7720 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
7722         PR lto/83121
7723         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
7724         call the lto_location_cache before reading the
7725         DECL_SOURCE_LOCATION of the types.
7727 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
7728             Richard Sandiford  <richard.sandiford@linaro.org>
7730         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
7731         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
7732         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
7733         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
7734         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
7735         Add declaration.
7736         * config/aarch64/constraints.md (aarch64_movti_operand):
7737         Limit immediates.
7738         * config/aarch64/predicates.md (Uti): Add new constraint.
7740 2018-01-17 Carl Love  <cel@us.ibm.com>
7742         * config/rs6000/vsx.md (define_expand xl_len_r,
7743         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
7744         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
7745         lxvll.
7746         (define_expand, define_insn): Move the shift left from  the
7747         define_insn to the define_expand for lxvl and stxvl instructions.
7748         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
7749         and XL_LEN_R definitions to PURE.
7751 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
7753         * config/i386/i386.c (indirect_thunk_name): Declare regno
7754         as unsigned int.  Compare regno with INVALID_REGNUM.
7755         (output_indirect_thunk): Ditto.
7756         (output_indirect_thunk_function): Ditto.
7757         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
7758         in the call to output_indirect_thunk_function.
7760 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
7762         PR middle-end/83884
7763         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
7764         rather than the size of inner_type to determine the stack slot size
7765         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
7767 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
7769         PR target/83546
7770         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
7771         to PTA_SILVERMONT.
7773 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
7775         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
7776         endian Linux systems to optionally enable multilibs for selecting
7777         the long double type if the user configured an explicit type.
7778         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
7779         have no long double multilibs if not defined.
7780         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
7781         warn if the user used -mabi={ieee,ibm}longdouble and we built
7782         multilibs for long double.
7783         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
7784         appropriate multilib option.
7785         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
7786         multilib options.
7787         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
7788         for building long double multilibs.
7789         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
7791 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
7793         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
7794         copies.
7796         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
7797         64 bits.
7798         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
7799         128 bits.
7801         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
7802         variables.
7804         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
7805         return value.
7807 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
7809         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
7810         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
7812 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
7814         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
7815         different rtl trees depending on TARGET_64BIT.
7816         (rs6000_gen_lvx): Likewise.
7818 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
7820         * config/visium/visium.md (nop): Tweak comment.
7821         (hazard_nop): Likewise.
7823 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
7825         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
7826         -mspeculate-indirect-jumps.
7827         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
7828         for -mno-speculate-indirect-jumps.
7829         (*call_indirect_elfv2<mode>_nospec): New define_insn.
7830         (*call_value_indirect_elfv2<mode>): Disable for
7831         -mno-speculate-indirect-jumps.
7832         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
7833         (indirect_jump): Emit different RTL for
7834         -mno-speculate-indirect-jumps.
7835         (*indirect_jump<mode>): Disable for
7836         -mno-speculate-indirect-jumps.
7837         (*indirect_jump<mode>_nospec): New define_insn.
7838         (tablejump): Emit different RTL for
7839         -mno-speculate-indirect-jumps.
7840         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
7841         (tablejumpsi_nospec): New define_expand.
7842         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
7843         (tablejumpdi_nospec): New define_expand.
7844         (*tablejump<mode>_internal1): Disable for
7845         -mno-speculate-indirect-jumps.
7846         (*tablejump<mode>_internal1_nospec): New define_insn.
7847         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
7848         option.
7850 2018-01-16  Artyom Skrobov tyomitch@gmail.com
7852         * caller-save.c (insert_save): Drop unnecessary parameter.  All
7853         callers updated.
7855 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
7856             Richard Biener  <rguenth@suse.de>
7858         PR libgomp/83590
7859         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
7860         return early, inline manually is_gimple_sizepos.  Make sure if we
7861         call gimplify_expr we don't end up with a gimple constant.
7862         * tree.c (variably_modified_type_p): Don't return true for
7863         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
7864         * gimplify.h (is_gimple_sizepos): Remove.
7866 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
7868         PR tree-optimization/83857
7869         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
7870         vectorizable_live_operation for pure SLP statements.
7871         (vectorizable_live_operation): Handle PHIs.
7873 2018-01-16  Richard Biener  <rguenther@suse.de>
7875         PR tree-optimization/83867
7876         * tree-vect-stmts.c (vect_transform_stmt): Precompute
7877         nested_in_vect_loop_p since the scalar stmt may get invalidated.
7879 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
7881         PR c/83844
7882         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
7883         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
7884         If off is not INTEGER_CST, issue a may not be aligned warning
7885         rather than isn't aligned.  Use isn%'t rather than isn't.
7886         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
7887         into MULT_EXPR.
7888         <case MULT_EXPR>: Improve the case when bottom and one of the
7889         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
7890         operand, in that case check if the other operand is multiple of
7891         bottom divided by the INTEGER_CST operand.
7893 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
7895         PR target/83858
7896         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
7897         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
7898         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
7899         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
7900         * config/pa/pa.c (pa_function_arg_advance): Likewise.
7901         (pa_function_arg, pa_arg_partial_bytes): Likewise.
7902         (pa_function_arg_size): New function.
7904 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
7906         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
7907         in a separate statement.
7909 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
7911         PR tree-optimization/83847
7912         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
7913         group gathers and scatters.
7915 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
7917         PR rtl-optimization/86620
7918         * params.def (max-sched-ready-insns): Bump minimum value to 1.
7920         PR rtl-optimization/83213
7921         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
7922         to last if both are JUMP_INSNs.
7924         PR tree-optimization/83843
7925         * gimple-ssa-store-merging.c
7926         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
7927         store_immediate_info for bswap/nop orig_stores.
7929 2018-01-15  Andrew Waterman  <andrew@sifive.com>
7931         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
7932         !TARGET_MUL.
7933         <UDIV>: Increase cost if !TARGET_DIV.
7935 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
7937         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
7938         (define_attr "cr_logical_3op"): New.
7939         (cceq_ior_compare): Adjust.
7940         (cceq_ior_compare_complement): Adjust.
7941         (*cceq_rev_compare): Adjust.
7942         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
7943         (is_cracked_insn): Adjust.
7944         (insn_must_be_first_in_group): Adjust.
7945         * config/rs6000/40x.md: Adjust.
7946         * config/rs6000/440.md: Adjust.
7947         * config/rs6000/476.md: Adjust.
7948         * config/rs6000/601.md: Adjust.
7949         * config/rs6000/603.md: Adjust.
7950         * config/rs6000/6xx.md: Adjust.
7951         * config/rs6000/7450.md: Adjust.
7952         * config/rs6000/7xx.md: Adjust.
7953         * config/rs6000/8540.md: Adjust.
7954         * config/rs6000/cell.md: Adjust.
7955         * config/rs6000/e300c2c3.md: Adjust.
7956         * config/rs6000/e500mc.md: Adjust.
7957         * config/rs6000/e500mc64.md: Adjust.
7958         * config/rs6000/e5500.md: Adjust.
7959         * config/rs6000/e6500.md: Adjust.
7960         * config/rs6000/mpc.md: Adjust.
7961         * config/rs6000/power4.md: Adjust.
7962         * config/rs6000/power5.md: Adjust.
7963         * config/rs6000/power6.md: Adjust.
7964         * config/rs6000/power7.md: Adjust.
7965         * config/rs6000/power8.md: Adjust.
7966         * config/rs6000/power9.md: Adjust.
7967         * config/rs6000/rs64.md: Adjust.
7968         * config/rs6000/titan.md: Adjust.
7970 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
7972         * config/i386/predicates.md (indirect_branch_operand): Rewrite
7973         ix86_indirect_branch_register logic.
7975 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
7977         * config/i386/constraints.md (Bs): Update
7978         ix86_indirect_branch_register check.  Don't check
7979         ix86_indirect_branch_register with GOT_memory_operand.
7980         (Bw): Likewise.
7981         * config/i386/predicates.md (GOT_memory_operand): Don't check
7982         ix86_indirect_branch_register here.
7983         (GOT32_symbol_operand): Likewise.
7985 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
7987         * config/i386/predicates.md (constant_call_address_operand):
7988         Rewrite ix86_indirect_branch_register logic.
7989         (sibcall_insn_operand): Likewise.
7991 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
7993         * config/i386/constraints.md (Bs): Replace
7994         ix86_indirect_branch_thunk_register with
7995         ix86_indirect_branch_register.
7996         (Bw): Likewise.
7997         * config/i386/i386.md (indirect_jump): Likewise.
7998         (tablejump): Likewise.
7999         (*sibcall_memory): Likewise.
8000         (*sibcall_value_memory): Likewise.
8001         Peepholes of indirect call and jump via memory: Likewise.
8002         * config/i386/i386.opt: Likewise.
8003         * config/i386/predicates.md (indirect_branch_operand): Likewise.
8004         (GOT_memory_operand): Likewise.
8005         (call_insn_operand): Likewise.
8006         (sibcall_insn_operand): Likewise.
8007         (GOT32_symbol_operand): Likewise.
8009 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
8011         PR middle-end/83837
8012         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
8013         type rather than type addr's type points to.
8014         (expand_omp_atomic_mutex): Likewise.
8015         (expand_omp_atomic): Likewise.
8017 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
8019         PR target/83839
8020         * config/i386/i386.c (output_indirect_thunk_function): Use
8021         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
8022         for  __x86_return_thunk.
8024 2018-01-15  Richard Biener  <rguenther@suse.de>
8026         PR middle-end/83850
8027         * expmed.c (extract_bit_field_1): Fix typo.
8029 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
8031         PR target/83687
8032         * config/arm/iterators.md (VF): New mode iterator.
8033         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
8034         Remove integer-related logic from pattern.
8035         (neon_vabd<mode>_3): Likewise.
8037 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
8039         PR middle-end/82694
8040         * common.opt (fstrict-overflow): No longer an alias.
8041         (fwrapv-pointer): New option.
8042         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
8043         also for pointer types based on flag_wrapv_pointer.
8044         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
8045         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
8046         opts->x_flag_wrapv got set.
8047         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
8048         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
8049         POINTER_TYPE_OVERFLOW_UNDEFINED.
8050         * match.pd: Likewise in address comparison pattern.
8051         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
8053 2018-01-15  Richard Biener  <rguenther@suse.de>
8055         PR lto/83804
8056         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
8057         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
8058         Reset type names to their identifier if their TYPE_DECL doesn't
8059         have linkage (and thus is used for ODR and devirt).
8060         (save_debug_info_for_decl): Remove.
8061         (save_debug_info_for_type): Likewise.
8062         (add_tree_to_fld_list): Adjust.
8063         * tree-pretty-print.c (dump_generic_node): Make dumping of
8064         type names more robust.
8066 2018-01-15  Richard Biener  <rguenther@suse.de>
8068         * BASE-VER: Bump to 8.0.1.
8070 2018-01-14  Martin Sebor  <msebor@redhat.com>
8072         PR other/83508
8073         * builtins.c (check_access): Avoid warning when the no-warning bit
8074         is set.
8076 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
8078         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
8079         * ira-color (allocno_hard_regs_compare): Likewise.
8081 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
8083         PR target/83013
8084         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
8085         Use .pushsection/.popsection.
8087 2018-01-14  Martin Sebor  <msebor@redhat.com>
8089         PR c++/81327
8090         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
8092 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
8094         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
8095         entry from extra_headers.
8096         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
8097         extra_headers, make the list bitwise identical to the i?86-*-* one.
8099 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
8101         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
8102         -mcmodel=large with -mindirect-branch=thunk,
8103         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
8104         -mfunction-return=thunk-extern.
8105         * doc/invoke.texi: Document -mcmodel=large is incompatible with
8106         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
8107         -mfunction-return=thunk and -mfunction-return=thunk-extern.
8109 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
8111         * config/i386/i386.c (print_reg): Print the name of the full
8112         integer register without '%'.
8113         (ix86_print_operand): Handle 'V'.
8114          * doc/extend.texi: Document 'V' modifier.
8116 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
8118         * config/i386/constraints.md (Bs): Disallow memory operand for
8119         -mindirect-branch-register.
8120         (Bw): Likewise.
8121         * config/i386/predicates.md (indirect_branch_operand): Likewise.
8122         (GOT_memory_operand): Likewise.
8123         (call_insn_operand): Likewise.
8124         (sibcall_insn_operand): Likewise.
8125         (GOT32_symbol_operand): Likewise.
8126         * config/i386/i386.md (indirect_jump): Call convert_memory_address
8127         for -mindirect-branch-register.
8128         (tablejump): Likewise.
8129         (*sibcall_memory): Likewise.
8130         (*sibcall_value_memory): Likewise.
8131         Disallow peepholes of indirect call and jump via memory for
8132         -mindirect-branch-register.
8133         (*call_pop): Replace m with Bw.
8134         (*call_value_pop): Likewise.
8135         (*sibcall_pop_memory): Replace m with Bs.
8136         * config/i386/i386.opt (mindirect-branch-register): New option.
8137         * doc/invoke.texi: Document -mindirect-branch-register option.
8139 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
8141         * config/i386/i386-protos.h (ix86_output_function_return): New.
8142         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
8143         set function_return_type.
8144         (indirect_thunk_name): Add ret_p to indicate thunk for function
8145         return.
8146         (output_indirect_thunk_function): Pass false to
8147         indirect_thunk_name.
8148         (ix86_output_indirect_branch_via_reg): Likewise.
8149         (ix86_output_indirect_branch_via_push): Likewise.
8150         (output_indirect_thunk_function): Create alias for function
8151         return thunk if regno < 0.
8152         (ix86_output_function_return): New function.
8153         (ix86_handle_fndecl_attribute): Handle function_return.
8154         (ix86_attribute_table): Add function_return.
8155         * config/i386/i386.h (machine_function): Add
8156         function_return_type.
8157         * config/i386/i386.md (simple_return_internal): Use
8158         ix86_output_function_return.
8159         (simple_return_internal_long): Likewise.
8160         * config/i386/i386.opt (mfunction-return=): New option.
8161         (indirect_branch): Mention -mfunction-return=.
8162         * doc/extend.texi: Document function_return function attribute.
8163         * doc/invoke.texi: Document -mfunction-return= option.
8165 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
8167         * config/i386/i386-opts.h (indirect_branch): New.
8168         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
8169         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
8170         with local indirect jump when converting indirect call and jump.
8171         (ix86_set_indirect_branch_type): New.
8172         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
8173         (indirectlabelno): New.
8174         (indirect_thunk_needed): Likewise.
8175         (indirect_thunk_bnd_needed): Likewise.
8176         (indirect_thunks_used): Likewise.
8177         (indirect_thunks_bnd_used): Likewise.
8178         (INDIRECT_LABEL): Likewise.
8179         (indirect_thunk_name): Likewise.
8180         (output_indirect_thunk): Likewise.
8181         (output_indirect_thunk_function): Likewise.
8182         (ix86_output_indirect_branch_via_reg): Likewise.
8183         (ix86_output_indirect_branch_via_push): Likewise.
8184         (ix86_output_indirect_branch): Likewise.
8185         (ix86_output_indirect_jmp): Likewise.
8186         (ix86_code_end): Call output_indirect_thunk_function if needed.
8187         (ix86_output_call_insn): Call ix86_output_indirect_branch if
8188         needed.
8189         (ix86_handle_fndecl_attribute): Handle indirect_branch.
8190         (ix86_attribute_table): Add indirect_branch.
8191         * config/i386/i386.h (machine_function): Add indirect_branch_type
8192         and has_local_indirect_jump.
8193         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
8194         to true.
8195         (tablejump): Likewise.
8196         (*indirect_jump): Use ix86_output_indirect_jmp.
8197         (*tablejump_1): Likewise.
8198         (simple_return_indirect_internal): Likewise.
8199         * config/i386/i386.opt (mindirect-branch=): New option.
8200         (indirect_branch): New.
8201         (keep): Likewise.
8202         (thunk): Likewise.
8203         (thunk-inline): Likewise.
8204         (thunk-extern): Likewise.
8205         * doc/extend.texi: Document indirect_branch function attribute.
8206         * doc/invoke.texi: Document -mindirect-branch= option.
8208 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
8210         PR ipa/83051
8211         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
8213 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
8215         * ipa-inline.c (want_inline_small_function_p): Return false if
8216         inlining has already failed with CIF_FINAL_ERROR.
8217         (update_caller_keys): Call want_inline_small_function_p before
8218         can_inline_edge_p.
8219         (update_callee_keys): Likewise.
8221 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8223         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
8224         New function.
8225         (rs6000_quadword_masked_address_p): Likewise.
8226         (quad_aligned_load_p): Likewise.
8227         (quad_aligned_store_p): Likewise.
8228         (const_load_sequence_p): Add comment to describe the outer-most loop.
8229         (mimic_memory_attributes_and_flags): New function.
8230         (rs6000_gen_stvx): Likewise.
8231         (replace_swapped_aligned_store): Likewise.
8232         (rs6000_gen_lvx): Likewise.
8233         (replace_swapped_aligned_load): Likewise.
8234         (replace_swapped_load_constant): Capitalize argument name in
8235         comment describing this function.
8236         (rs6000_analyze_swaps): Add a third pass to search for vector loads
8237         and stores that access quad-word aligned addresses and replace
8238         with stvx or lvx instructions when appropriate.
8239         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
8240         New function prototype.
8241         (rs6000_quadword_masked_address_p): Likewise.
8242         (rs6000_gen_lvx): Likewise.
8243         (rs6000_gen_stvx): Likewise.
8244         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
8245         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
8246         when memory address is aligned.
8247         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
8248         this split to select lvx instruction when memory address is aligned.
8249         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
8250         instruction when memory address is aligned.
8251         (*vsx_le_perm_load_v16qi): Likewise.
8252         (four unnamed splitters): Modify to select the stvx instruction
8253         when memory is aligned.
8255 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
8257         * predict.c (determine_unlikely_bbs): Handle correctly BBs
8258         which appears in the queue multiple times.
8260 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8261             Alan Hayward  <alan.hayward@arm.com>
8262             David Sherwood  <david.sherwood@arm.com>
8264         * tree-vectorizer.h (vec_lower_bound): New structure.
8265         (_loop_vec_info): Add check_nonzero and lower_bounds.
8266         (LOOP_VINFO_CHECK_NONZERO): New macro.
8267         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
8268         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
8269         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
8270         fields.  Make seg_len the distance travelled, not including the
8271         access size.
8272         (dr_direction_indicator): Declare.
8273         (dr_zero_step_indicator): Likewise.
8274         (dr_known_forward_stride_p): Likewise.
8275         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
8276         tree-ssanames.h.
8277         (runtime_alias_check_p): Allow runtime alias checks with
8278         variable strides.
8279         (operator ==): Compare access_size and align.
8280         (prune_runtime_alias_test_list): Rework for new distinction between
8281         the access_size and seg_len.
8282         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
8283         segment lengths.
8284         (get_segment_min_max): New function.
8285         (create_intersect_range_checks): Use it.
8286         (dr_step_indicator): New function.
8287         (dr_direction_indicator): Likewise.
8288         (dr_zero_step_indicator): Likewise.
8289         (dr_known_forward_stride_p): Likewise.
8290         * tree-loop-distribution.c (data_ref_segment_size): Return
8291         DR_STEP * (niters - 1).
8292         (compute_alias_check_pairs): Update call to the dr_with_seg_len
8293         constructor.
8294         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
8295         (vect_preserves_scalar_order_p): New function, split out from...
8296         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
8297         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
8298         (vect_vfa_access_size): New function.
8299         (vect_vfa_align): Likewise.
8300         (vect_compile_time_alias): Take access_size_a and access_b arguments.
8301         (dump_lower_bound): New function.
8302         (vect_check_lower_bound): Likewise.
8303         (vect_small_gap_p): Likewise.
8304         (vectorizable_with_step_bound_p): Likewise.
8305         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
8306         depencies if the vectorization factor is 1.  Convert the checks
8307         for nonzero steps into checks on the bounds of DR_STEP.  Try using
8308         a bunds check for variable steps if the minimum required step is
8309         relatively small. Update calls to the dr_with_seg_len
8310         constructor and to vect_compile_time_alias.
8311         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
8312         function.
8313         (vect_loop_versioning): Call it.
8314         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
8315         when retrying.
8316         (vect_estimate_min_profitable_iters): Account for any bounds checks.
8318 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8319             Alan Hayward  <alan.hayward@arm.com>
8320             David Sherwood  <david.sherwood@arm.com>
8322         * doc/sourcebuild.texi (vect_scatter_store): Document.
8323         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
8324         optabs.
8325         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
8326         Document.
8327         * genopinit.c (main): Add supports_vec_scatter_store and
8328         supports_vec_scatter_store_cached to target_optabs.
8329         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
8330         IFN_MASK_SCATTER_STORE.
8331         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
8332         functions.
8333         * internal-fn.h (internal_store_fn_p): Declare.
8334         (internal_fn_stored_value_index): Likewise.
8335         * internal-fn.c (scatter_store_direct): New macro.
8336         (expand_scatter_store_optab_fn): New function.
8337         (direct_scatter_store_optab_supported_p): New macro.
8338         (internal_store_fn_p): New function.
8339         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
8340         IFN_MASK_SCATTER_STORE.
8341         (internal_fn_mask_index): Likewise.
8342         (internal_fn_stored_value_index): New function.
8343         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
8344         for scatter stores.
8345         * optabs-query.h (supports_vec_scatter_store_p): Declare.
8346         * optabs-query.c (supports_vec_scatter_store_p): New function.
8347         * tree-vectorizer.h (vect_get_store_rhs): Declare.
8348         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
8349         true for scatter stores.
8350         (vect_gather_scatter_fn_p): Handle scatter stores too.
8351         (vect_check_gather_scatter): Consider using scatter stores if
8352         supports_vec_scatter_store_p.
8353         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
8354         scatter stores too.
8355         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
8356         internal_fn_stored_value_index.
8357         (check_load_store_masking): Handle scatter stores too.
8358         (vect_get_store_rhs): Make public.
8359         (vectorizable_call): Use internal_store_fn_p.
8360         (vectorizable_store): Handle scatter store internal functions.
8361         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
8362         when deciding whether the end of the group has been reached.
8363         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
8364         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
8365         (mask_scatter_store<mode>): New insns.
8367 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8368             Alan Hayward  <alan.hayward@arm.com>
8369             David Sherwood  <david.sherwood@arm.com>
8371         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
8372         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
8373         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
8374         function.
8375         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
8376         Use vect_truncate_gather_scatter_offset if we can't treat the
8377         operation as a normal gather load or scatter store.
8378         (get_group_load_store_type): Take the gather_scatter_info
8379         as argument.  Try using a gather load or scatter store for
8380         single-element groups.
8381         (get_load_store_type): Update calls to get_group_load_store_type
8382         and vect_use_strided_gather_scatters_p.
8384 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8385             Alan Hayward  <alan.hayward@arm.com>
8386             David Sherwood  <david.sherwood@arm.com>
8388         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
8389         optional tree argument.
8390         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
8391         null target hooks.
8392         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
8393         but continue to use the current value as a fallback.
8394         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
8395         to compare the updates.
8396         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
8397         (get_load_store_type): Use it when handling a strided access.
8398         (vect_get_strided_load_store_ops): New function.
8399         (vect_get_data_ptr_increment): Likewise.
8400         (vectorizable_load): Handle strided gather loads.  Always pass
8401         a step to vect_create_data_ref_ptr and bump_vector_ptr.
8403 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8404             Alan Hayward  <alan.hayward@arm.com>
8405             David Sherwood  <david.sherwood@arm.com>
8407         * doc/md.texi (gather_load@var{m}): Document.
8408         (mask_gather_load@var{m}): Likewise.
8409         * genopinit.c (main): Add supports_vec_gather_load and
8410         supports_vec_gather_load_cached to target_optabs.
8411         * optabs-tree.c (init_tree_optimization_optabs): Use
8412         ggc_cleared_alloc to allocate target_optabs.
8413         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
8414         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
8415         functions.
8416         * internal-fn.h (internal_load_fn_p): Declare.
8417         (internal_gather_scatter_fn_p): Likewise.
8418         (internal_fn_mask_index): Likewise.
8419         (internal_gather_scatter_fn_supported_p): Likewise.
8420         * internal-fn.c (gather_load_direct): New macro.
8421         (expand_gather_load_optab_fn): New function.
8422         (direct_gather_load_optab_supported_p): New macro.
8423         (direct_internal_fn_optab): New function.
8424         (internal_load_fn_p): Likewise.
8425         (internal_gather_scatter_fn_p): Likewise.
8426         (internal_fn_mask_index): Likewise.
8427         (internal_gather_scatter_fn_supported_p): Likewise.
8428         * optabs-query.c (supports_at_least_one_mode_p): New function.
8429         (supports_vec_gather_load_p): Likewise.
8430         * optabs-query.h (supports_vec_gather_load_p): Declare.
8431         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
8432         and memory_type field.
8433         (NUM_PATTERNS): Bump to 15.
8434         * tree-vect-data-refs.c: Include internal-fn.h.
8435         (vect_gather_scatter_fn_p): New function.
8436         (vect_describe_gather_scatter_call): Likewise.
8437         (vect_check_gather_scatter): Try using internal functions for
8438         gather loads.  Recognize existing calls to a gather load function.
8439         (vect_analyze_data_refs): Consider using gather loads if
8440         supports_vec_gather_load_p.
8441         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
8442         (vect_get_gather_scatter_offset_type): Likewise.
8443         (vect_convert_mask_for_vectype): Likewise.
8444         (vect_add_conversion_to_patterm): Likewise.
8445         (vect_try_gather_scatter_pattern): Likewise.
8446         (vect_recog_gather_scatter_pattern): New pattern recognizer.
8447         (vect_vect_recog_func_ptrs): Add it.
8448         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
8449         internal_fn_mask_index and internal_gather_scatter_fn_p.
8450         (check_load_store_masking): Take the gather_scatter_info as an
8451         argument and handle gather loads.
8452         (vect_get_gather_scatter_ops): New function.
8453         (vectorizable_call): Check internal_load_fn_p.
8454         (vectorizable_load): Likewise.  Handle gather load internal
8455         functions.
8456         (vectorizable_store): Update call to check_load_store_masking.
8457         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
8458         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
8459         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
8460         (aarch64_gather_scale_operand_d): New predicates.
8461         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
8462         (mask_gather_load<mode>): New insns.
8464 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8465             Alan Hayward  <alan.hayward@arm.com>
8466             David Sherwood  <david.sherwood@arm.com>
8468         * optabs.def (fold_left_plus_optab): New optab.
8469         * doc/md.texi (fold_left_plus_@var{m}): Document.
8470         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
8471         * internal-fn.c (fold_left_direct): Define.
8472         (expand_fold_left_optab_fn): Likewise.
8473         (direct_fold_left_optab_supported_p): Likewise.
8474         * fold-const-call.c (fold_const_fold_left): New function.
8475         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
8476         * tree-parloops.c (valid_reduction_p): New function.
8477         (gather_scalar_reductions): Use it.
8478         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
8479         (vect_finish_replace_stmt): Declare.
8480         * tree-vect-loop.c (fold_left_reduction_fn): New function.
8481         (needs_fold_left_reduction_p): New function, split out from...
8482         (vect_is_simple_reduction): ...here.  Accept reductions that
8483         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
8484         (vect_force_simple_reduction): Also store the reduction type in
8485         the assignment's STMT_VINFO_REDUC_TYPE.
8486         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
8487         (merge_with_identity): New function.
8488         (vect_expand_fold_left): Likewise.
8489         (vectorize_fold_left_reduction): Likewise.
8490         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
8491         scalar phi in place for it.  Check for target support and reject
8492         cases that would reassociate the operation.  Defer the transform
8493         phase to vectorize_fold_left_reduction.
8494         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
8495         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
8496         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
8498 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8500         * tree-if-conv.c (predicate_mem_writes): Remove redundant
8501         call to ifc_temp_var.
8503 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8504             Alan Hayward  <alan.hayward@arm.com>
8505             David Sherwood  <david.sherwood@arm.com>
8507         * target.def (legitimize_address_displacement): Take the original
8508         offset as a poly_int.
8509         * targhooks.h (default_legitimize_address_displacement): Update
8510         accordingly.
8511         * targhooks.c (default_legitimize_address_displacement): Likewise.
8512         * doc/tm.texi: Regenerate.
8513         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
8514         as an argument, moving assert of ad->disp == ad->disp_term to...
8515         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
8516         Try calling targetm.legitimize_address_displacement before expanding
8517         the address rather than afterwards, and adjust for the new interface.
8518         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
8519         Match the new hook interface.  Handle SVE addresses.
8520         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
8521         new hook interface.
8523 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8525         * Makefile.in (OBJS): Add early-remat.o.
8526         * target.def (select_early_remat_modes): New hook.
8527         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
8528         * doc/tm.texi: Regenerate.
8529         * targhooks.h (default_select_early_remat_modes): Declare.
8530         * targhooks.c (default_select_early_remat_modes): New function.
8531         * timevar.def (TV_EARLY_REMAT): New timevar.
8532         * passes.def (pass_early_remat): New pass.
8533         * tree-pass.h (make_pass_early_remat): Declare.
8534         * early-remat.c: New file.
8535         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
8536         function.
8537         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
8539 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8540             Alan Hayward  <alan.hayward@arm.com>
8541             David Sherwood  <david.sherwood@arm.com>
8543         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
8544         vfm1 with a bound_epilog parameter.
8545         (vect_do_peeling): Update calls accordingly, and move the prologue
8546         call earlier in the function.  Treat the base bound_epilog as 0 for
8547         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
8548         this base when peeling for gaps.
8549         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
8550         with fully-masked loops.
8551         (vect_estimate_min_profitable_iters): Handle the single peeled
8552         iteration in that case.
8554 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8555             Alan Hayward  <alan.hayward@arm.com>
8556             David Sherwood  <david.sherwood@arm.com>
8558         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
8559         single-element interleaving even if the size is not a power of 2.
8560         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
8561         accesses for single-element interleaving if the group size is
8562         not a power of 2.
8564 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8565             Alan Hayward  <alan.hayward@arm.com>
8566             David Sherwood  <david.sherwood@arm.com>
8568         * doc/md.texi (fold_extract_last_@var{m}): Document.
8569         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
8570         * optabs.def (fold_extract_last_optab): New optab.
8571         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
8572         * internal-fn.c (fold_extract_direct): New macro.
8573         (expand_fold_extract_optab_fn): Likewise.
8574         (direct_fold_extract_optab_supported_p): Likewise.
8575         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
8576         * tree-vect-loop.c (vect_model_reduction_cost): Handle
8577         EXTRACT_LAST_REDUCTION.
8578         (get_initial_def_for_reduction): Do not create an initial vector
8579         for EXTRACT_LAST_REDUCTION reductions.
8580         (vectorizable_reduction): Leave the scalar phi in place for
8581         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
8582         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
8583         epilogue code for EXTRACT_LAST_REDUCTION and defer the
8584         transform phase to vectorizable_condition.
8585         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
8586         split out from...
8587         (vect_finish_stmt_generation): ...here.
8588         (vect_finish_replace_stmt): New function.
8589         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
8590         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
8591         pattern.
8592         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
8594 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8595             Alan Hayward  <alan.hayward@arm.com>
8596             David Sherwood  <david.sherwood@arm.com>
8598         * doc/md.texi (extract_last_@var{m}): Document.
8599         * optabs.def (extract_last_optab): New optab.
8600         * internal-fn.def (EXTRACT_LAST): New internal function.
8601         * internal-fn.c (cond_unary_direct): New macro.
8602         (expand_cond_unary_optab_fn): Likewise.
8603         (direct_cond_unary_optab_supported_p): Likewise.
8604         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
8605         loops using EXTRACT_LAST.
8606         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
8607         (extract_last_<mode>): ...this optab.
8608         (vec_extract<mode><Vel>): Update accordingly.
8610 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8611             Alan Hayward  <alan.hayward@arm.com>
8612             David Sherwood  <david.sherwood@arm.com>
8614         * target.def (empty_mask_is_expensive): New hook.
8615         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
8616         * doc/tm.texi: Regenerate.
8617         * targhooks.h (default_empty_mask_is_expensive): Declare.
8618         * targhooks.c (default_empty_mask_is_expensive): New function.
8619         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
8620         if the target says that empty masks are expensive.
8621         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
8622         New function.
8623         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
8625 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8626             Alan Hayward  <alan.hayward@arm.com>
8627             David Sherwood  <david.sherwood@arm.com>
8629         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
8630         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
8631         (vect_use_loop_mask_for_alignment_p): New function.
8632         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
8633         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
8634         niters_skip argument.  Make sure that the first niters_skip elements
8635         of the first iteration are inactive.
8636         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
8637         Update call to vect_set_loop_masks_directly.
8638         (get_misalign_in_elems): New function, split out from...
8639         (vect_gen_prolog_loop_niters): ...here.
8640         (vect_update_init_of_dr): Take a code argument that specifies whether
8641         the adjustment should be added or subtracted.
8642         (vect_update_init_of_drs): Likewise.
8643         (vect_prepare_for_masked_peels): New function.
8644         (vect_do_peeling): Skip prologue peeling if we're using a mask
8645         instead.  Update call to vect_update_inits_of_drs.
8646         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
8647         mask_skip_niters.
8648         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
8649         alignment.  Do not include the number of peeled iterations in
8650         the minimum threshold in that case.
8651         (vectorizable_induction): Adjust the start value down by
8652         LOOP_VINFO_MASK_SKIP_NITERS iterations.
8653         (vect_transform_loop): Call vect_prepare_for_masked_peels.
8654         Take the number of skipped iterations into account when calculating
8655         the loop bounds.
8656         * tree-vect-stmts.c (vect_gen_while_not): New function.
8658 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8659             Alan Hayward  <alan.hayward@arm.com>
8660             David Sherwood  <david.sherwood@arm.com>
8662         * doc/sourcebuild.texi (vect_fully_masked): Document.
8663         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
8664         default value to 0.
8665         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
8666         split out from...
8667         (vect_analyze_loop_2): ...here. Don't check the vectorization
8668         factor against the number of loop iterations if the loop is
8669         fully-masked.
8671 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8672             Alan Hayward  <alan.hayward@arm.com>
8673             David Sherwood  <david.sherwood@arm.com>
8675         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
8676         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
8677         (dump_groups): Update accordingly.
8678         (iv_use::mem_type): New member variable.
8679         (address_p): New function.
8680         (record_use): Add a mem_type argument and initialize the new
8681         mem_type field.
8682         (record_group_use): Add a mem_type argument.  Use address_p.
8683         Remove obsolete null checks of base_object.  Update call to record_use.
8684         (find_interesting_uses_op): Update call to record_group_use.
8685         (find_interesting_uses_cond): Likewise.
8686         (find_interesting_uses_address): Likewise.
8687         (get_mem_type_for_internal_fn): New function.
8688         (find_address_like_use): Likewise.
8689         (find_interesting_uses_stmt): Try find_address_like_use before
8690         calling find_interesting_uses_op.
8691         (addr_offset_valid_p): Use the iv mem_type field as the type
8692         of the addressed memory.
8693         (add_autoinc_candidates): Likewise.
8694         (get_address_cost): Likewise.
8695         (split_small_address_groups_p): Use address_p.
8696         (split_address_groups): Likewise.
8697         (add_iv_candidate_for_use): Likewise.
8698         (autoinc_possible_for_pair): Likewise.
8699         (rewrite_groups): Likewise.
8700         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
8701         (determine_group_iv_cost): Update after split of USE_ADDRESS.
8702         (get_alias_ptr_type_for_ptr_address): New function.
8703         (rewrite_use_address): Rewrite address uses in calls that were
8704         identified by find_address_like_use.
8706 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8707             Alan Hayward  <alan.hayward@arm.com>
8708             David Sherwood  <david.sherwood@arm.com>
8710         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
8711         TARGET_MEM_REFs.
8712         * gimple-expr.h (is_gimple_addressable: Likewise.
8713         * gimple-expr.c (is_gimple_address): Likewise.
8714         * internal-fn.c (expand_call_mem_ref): New function.
8715         (expand_mask_load_optab_fn): Use it.
8716         (expand_mask_store_optab_fn): Likewise.
8718 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8719             Alan Hayward  <alan.hayward@arm.com>
8720             David Sherwood  <david.sherwood@arm.com>
8722         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
8723         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
8724         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
8725         (cond_umax@var{mode}): Document.
8726         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
8727         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
8728         (cond_umin_optab, cond_umax_optab): New optabs.
8729         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
8730         (COND_IOR, COND_XOR): New internal functions.
8731         * internal-fn.h (get_conditional_internal_fn): Declare.
8732         * internal-fn.c (cond_binary_direct): New macro.
8733         (expand_cond_binary_optab_fn): Likewise.
8734         (direct_cond_binary_optab_supported_p): Likewise.
8735         (get_conditional_internal_fn): New function.
8736         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
8737         Cope with reduction statements that are vectorized as calls rather
8738         than assignments.
8739         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
8740         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
8741         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
8742         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
8743         (UNSPEC_COND_EOR): New unspecs.
8744         (optab): Add mappings for them.
8745         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
8746         (sve_int_op, sve_fp_op): New int attributes.
8748 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8749             Alan Hayward  <alan.hayward@arm.com>
8750             David Sherwood  <david.sherwood@arm.com>
8752         * optabs.def (while_ult_optab): New optab.
8753         * doc/md.texi (while_ult@var{m}@var{n}): Document.
8754         * internal-fn.def (WHILE_ULT): New internal function.
8755         * internal-fn.h (direct_internal_fn_supported_p): New override
8756         that takes two types as argument.
8757         * internal-fn.c (while_direct): New macro.
8758         (expand_while_optab_fn): New function.
8759         (convert_optab_supported_p): Likewise.
8760         (direct_while_optab_supported_p): New macro.
8761         * wide-int.h (wi::udiv_ceil): New function.
8762         * tree-vectorizer.h (rgroup_masks): New structure.
8763         (vec_loop_masks): New typedef.
8764         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
8765         and fully_masked_p.
8766         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
8767         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
8768         (vect_max_vf): New function.
8769         (slpeel_make_loop_iterate_ntimes): Delete.
8770         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
8771         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
8772         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
8773         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
8774         internal-fn.h, stor-layout.h and optabs-query.h.
8775         (vect_set_loop_mask): New function.
8776         (add_preheader_seq): Likewise.
8777         (add_header_seq): Likewise.
8778         (interleave_supported_p): Likewise.
8779         (vect_maybe_permute_loop_masks): Likewise.
8780         (vect_set_loop_masks_directly): Likewise.
8781         (vect_set_loop_condition_masked): Likewise.
8782         (vect_set_loop_condition_unmasked): New function, split out from
8783         slpeel_make_loop_iterate_ntimes.
8784         (slpeel_make_loop_iterate_ntimes): Rename to..
8785         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
8786         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
8787         (vect_do_peeling): Update call accordingly.
8788         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
8789         loops.
8790         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
8791         mask_compare_type, can_fully_mask_p and fully_masked_p.
8792         (release_vec_loop_masks): New function.
8793         (_loop_vec_info): Use it to free the loop masks.
8794         (can_produce_all_loop_masks_p): New function.
8795         (vect_get_max_nscalars_per_iter): Likewise.
8796         (vect_verify_full_masking): Likewise.
8797         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
8798         retries, and free the mask rgroups before retrying.  Check loop-wide
8799         reasons for disallowing fully-masked loops.  Make the final decision
8800         about whether use a fully-masked loop or not.
8801         (vect_estimate_min_profitable_iters): Do not assume that peeling
8802         for the number of iterations will be needed for fully-masked loops.
8803         (vectorizable_reduction): Disable fully-masked loops.
8804         (vectorizable_live_operation): Likewise.
8805         (vect_halve_mask_nunits): New function.
8806         (vect_double_mask_nunits): Likewise.
8807         (vect_record_loop_mask): Likewise.
8808         (vect_get_loop_mask): Likewise.
8809         (vect_transform_loop): Handle the case in which the final loop
8810         iteration might handle a partial vector.  Call vect_set_loop_condition
8811         instead of slpeel_make_loop_iterate_ntimes.
8812         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
8813         (check_load_store_masking): New function.
8814         (prepare_load_store_mask): Likewise.
8815         (vectorizable_store): Handle fully-masked loops.
8816         (vectorizable_load): Likewise.
8817         (supportable_widening_operation): Use vect_halve_mask_nunits for
8818         booleans.
8819         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
8820         (vect_gen_while): New function.
8821         * config/aarch64/aarch64.md (umax<mode>3): New expander.
8822         (aarch64_uqdec<mode>): New insn.
8824 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8825             Alan Hayward  <alan.hayward@arm.com>
8826             David Sherwood  <david.sherwood@arm.com>
8828         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
8829         (reduc_xor_scal_optab): New optabs.
8830         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
8831         (reduc_xor_scal_@var{m}): Document.
8832         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
8833         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
8834         internal functions.
8835         * fold-const-call.c (fold_const_call): Handle them.
8836         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
8837         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
8838         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
8839         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
8840         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
8841         (UNSPEC_XORV): New unspecs.
8842         (optab): Add entries for them.
8843         (BITWISEV): New int iterator.
8844         (bit_reduc_op): New int attributes.
8846 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8847             Alan Hayward  <alan.hayward@arm.com>
8848             David Sherwood  <david.sherwood@arm.com>
8850         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
8851         * internal-fn.def (VEC_SHL_INSERT): New internal function.
8852         * optabs.def (vec_shl_insert_optab): New optab.
8853         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
8854         (duplicate_and_interleave): Likewise.
8855         * tree-vect-loop.c: Include internal-fn.h.
8856         (neutral_op_for_slp_reduction): New function, split out from
8857         get_initial_defs_for_reduction.
8858         (get_initial_def_for_reduction): Handle option 2 for variable-length
8859         vectors by loading the neutral value into a vector and then shifting
8860         the initial value into element 0.
8861         (get_initial_defs_for_reduction): Replace the code argument with
8862         the neutral value calculated by neutral_op_for_slp_reduction.
8863         Use gimple_build_vector for constant-length vectors.
8864         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
8865         but the first group_size elements have a neutral value.
8866         Use duplicate_and_interleave otherwise.
8867         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
8868         Update call to get_initial_defs_for_reduction.  Handle SLP
8869         reductions for variable-length vectors by creating one vector
8870         result for each scalar result, with the elements associated
8871         with other scalar results stubbed out with the neutral value.
8872         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
8873         Require IFN_VEC_SHL_INSERT for double reductions on
8874         variable-length vectors, or SLP reductions that have
8875         a neutral value.  Require can_duplicate_and_interleave_p
8876         support for variable-length unchained SLP reductions if there
8877         is no neutral value, such as for MIN/MAX reductions.  Also require
8878         the number of vector elements to be a multiple of the number of
8879         SLP statements when doing variable-length unchained SLP reductions.
8880         Update call to vect_create_epilog_for_reduction.
8881         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
8882         and remove initial values.
8883         (duplicate_and_interleave): Make public.
8884         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
8885         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
8887 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8888             Alan Hayward  <alan.hayward@arm.com>
8889             David Sherwood  <david.sherwood@arm.com>
8891         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
8892         (can_duplicate_and_interleave_p): New function.
8893         (vect_get_and_check_slp_defs): Take the vector of statements
8894         rather than just the current one.  Remove excess parentheses.
8895         Restriction rejectinon of vect_constant_def and vect_external_def
8896         for variable-length vectors to boolean types, or types for which
8897         can_duplicate_and_interleave_p is false.
8898         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
8899         (duplicate_and_interleave): New function.
8900         (vect_get_constant_vectors): Use gimple_build_vector for
8901         constant-length vectors and suitable variable-length constant
8902         vectors.  Use duplicate_and_interleave for other variable-length
8903         vectors.  Don't defer the update when inserting new statements.
8905 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8906             Alan Hayward  <alan.hayward@arm.com>
8907             David Sherwood  <david.sherwood@arm.com>
8909         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
8910         min_profitable_iters doesn't go negative.
8912 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8913             Alan Hayward  <alan.hayward@arm.com>
8914             David Sherwood  <david.sherwood@arm.com>
8916         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
8917         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
8918         * optabs.def (vec_mask_load_lanes_optab): New optab.
8919         (vec_mask_store_lanes_optab): Likewise.
8920         * internal-fn.def (MASK_LOAD_LANES): New internal function.
8921         (MASK_STORE_LANES): Likewise.
8922         * internal-fn.c (mask_load_lanes_direct): New macro.
8923         (mask_store_lanes_direct): Likewise.
8924         (expand_mask_load_optab_fn): Handle masked operations.
8925         (expand_mask_load_lanes_optab_fn): New macro.
8926         (expand_mask_store_optab_fn): Handle masked operations.
8927         (expand_mask_store_lanes_optab_fn): New macro.
8928         (direct_mask_load_lanes_optab_supported_p): Likewise.
8929         (direct_mask_store_lanes_optab_supported_p): Likewise.
8930         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
8931         parameter.
8932         (vect_load_lanes_supported): Likewise.
8933         * tree-vect-data-refs.c (strip_conversion): New function.
8934         (can_group_stmts_p): Likewise.
8935         (vect_analyze_data_ref_accesses): Use it instead of checking
8936         for a pair of assignments.
8937         (vect_store_lanes_supported): Take a masked_p parameter.
8938         (vect_load_lanes_supported): Likewise.
8939         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
8940         vect_store_lanes_supported and vect_load_lanes_supported.
8941         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
8942         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
8943         parameter.  Don't allow gaps for masked accesses.
8944         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
8945         and vect_load_lanes_supported.
8946         (get_load_store_type): Take a masked_p parameter and update
8947         call to get_group_load_store_type.
8948         (vectorizable_store): Update call to get_load_store_type.
8949         Handle IFN_MASK_STORE_LANES.
8950         (vectorizable_load): Update call to get_load_store_type.
8951         Handle IFN_MASK_LOAD_LANES.
8953 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8954             Alan Hayward  <alan.hayward@arm.com>
8955             David Sherwood  <david.sherwood@arm.com>
8957         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
8958         modes for SVE.
8959         * config/aarch64/aarch64-protos.h
8960         (aarch64_sve_struct_memory_operand_p): Declare.
8961         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
8962         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
8963         (VPRED, vpred): Handle SVE structure modes.
8964         * config/aarch64/constraints.md (Utx): New constraint.
8965         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
8966         (aarch64_sve_struct_nonimmediate_operand): New predicates.
8967         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
8968         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
8969         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
8970         structure modes.  Split into pieces after RA.
8971         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
8972         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
8973         New patterns.
8974         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
8975         SVE structure modes.
8976         (aarch64_classify_address): Likewise.
8977         (sizetochar): Move earlier in file.
8978         (aarch64_print_operand): Handle SVE register lists.
8979         (aarch64_array_mode): New function.
8980         (aarch64_sve_struct_memory_operand_p): Likewise.
8981         (TARGET_ARRAY_MODE): Redefine.
8983 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8984             Alan Hayward  <alan.hayward@arm.com>
8985             David Sherwood  <david.sherwood@arm.com>
8987         * target.def (array_mode): New target hook.
8988         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
8989         * doc/tm.texi: Regenerate.
8990         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
8991         * hooks.c (hook_optmode_mode_uhwi_none): New function.
8992         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
8993         targetm.array_mode.
8994         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
8995         type sizes.
8997 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
8998             Alan Hayward  <alan.hayward@arm.com>
8999             David Sherwood  <david.sherwood@arm.com>
9001         * fold-const.c (fold_binary_loc): Check the argument types
9002         rather than the result type when testing for a vector operation.
9004 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
9006         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
9007         * doc/tm.texi: Regenerate.
9009 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
9010             Alan Hayward  <alan.hayward@arm.com>
9011             David Sherwood  <david.sherwood@arm.com>
9013         * doc/invoke.texi (-msve-vector-bits=): Document new option.
9014         (sve): Document new AArch64 extension.
9015         * doc/md.texi (w): Extend the description of the AArch64
9016         constraint to include SVE vectors.
9017         (Upl, Upa): Document new AArch64 predicate constraints.
9018         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
9019         enum.
9020         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
9021         (msve-vector-bits=): New option.
9022         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
9023         SVE when these are disabled.
9024         (sve): New extension.
9025         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
9026         modes.  Adjust their number of units based on aarch64_sve_vg.
9027         (MAX_BITSIZE_MODE_ANY_MODE): Define.
9028         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
9029         aarch64_addr_query_type.
9030         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
9031         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
9032         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
9033         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
9034         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
9035         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
9036         (aarch64_simd_imm_zero_p): Delete.
9037         (aarch64_check_zero_based_sve_index_immediate): Declare.
9038         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
9039         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
9040         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
9041         (aarch64_sve_float_mul_immediate_p): Likewise.
9042         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
9043         rather than an rtx.
9044         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
9045         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
9046         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
9047         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
9048         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
9049         (aarch64_regmode_natural_size): Likewise.
9050         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
9051         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
9052         left one place.
9053         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
9054         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
9055         for VG and the SVE predicate registers.
9056         (V_ALIASES): Add a "z"-prefixed alias.
9057         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
9058         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
9059         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
9060         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
9061         (REG_CLASS_NAMES): Add entries for them.
9062         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
9063         and the predicate registers.
9064         (aarch64_sve_vg): Declare.
9065         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
9066         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
9067         (REGMODE_NATURAL_SIZE): Define.
9068         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
9069         SVE macros.
9070         * config/aarch64/aarch64.c: Include cfgrtl.h.
9071         (simd_immediate_info): Add a constructor for series vectors,
9072         and an associated step field.
9073         (aarch64_sve_vg): New variable.
9074         (aarch64_dbx_register_number): Handle VG and the predicate registers.
9075         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
9076         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
9077         (VEC_ANY_DATA, VEC_STRUCT): New constants.
9078         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
9079         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
9080         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
9081         (aarch64_get_mask_mode): New functions.
9082         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
9083         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
9084         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
9085         predicate modes and predicate registers.  Explicitly restrict
9086         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
9087         to store a vector mode if it is recognized by
9088         aarch64_classify_vector_mode.
9089         (aarch64_regmode_natural_size): New function.
9090         (aarch64_hard_regno_caller_save_mode): Return the original mode
9091         for predicates.
9092         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
9093         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
9094         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
9095         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
9096         functions.
9097         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
9098         does not overlap dest if the function is frame-related.  Handle
9099         SVE constants.
9100         (aarch64_split_add_offset): New function.
9101         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
9102         them aarch64_add_offset.
9103         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
9104         and update call to aarch64_sub_sp.
9105         (aarch64_add_cfa_expression): New function.
9106         (aarch64_expand_prologue): Pass extra temporary registers to the
9107         functions above.  Handle the case in which we need to emit new
9108         DW_CFA_expressions for registers that were originally saved
9109         relative to the stack pointer, but now have to be expressed
9110         relative to the frame pointer.
9111         (aarch64_output_mi_thunk): Pass extra temporary registers to the
9112         functions above.
9113         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
9114         IP0 and IP1 values for SVE frames.
9115         (aarch64_expand_vec_series): New function.
9116         (aarch64_expand_sve_widened_duplicate): Likewise.
9117         (aarch64_expand_sve_const_vector): Likewise.
9118         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
9119         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
9120         into the register, rather than emitting a SET directly.
9121         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
9122         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
9123         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
9124         (offset_9bit_signed_scaled_p): New functions.
9125         (aarch64_replicate_bitmask_imm): New function.
9126         (aarch64_bitmask_imm): Use it.
9127         (aarch64_cannot_force_const_mem): Reject expressions involving
9128         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
9129         (aarch64_classify_index): Handle SVE indices, by requiring
9130         a plain register index with a scale that matches the element size.
9131         (aarch64_classify_address): Handle SVE addresses.  Assert that
9132         the mode of the address is VOIDmode or an integer mode.
9133         Update call to aarch64_classify_symbol.
9134         (aarch64_classify_symbolic_expression): Update call to
9135         aarch64_classify_symbol.
9136         (aarch64_const_vec_all_in_range_p): New function.
9137         (aarch64_print_vector_float_operand): Likewise.
9138         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
9139         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
9140         and the FP immediates 1.0 and 0.5.
9141         (aarch64_print_address_internal): Handle SVE addresses.
9142         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
9143         (aarch64_regno_regclass): Handle predicate registers.
9144         (aarch64_secondary_reload): Handle big-endian reloads of SVE
9145         data modes.
9146         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
9147         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
9148         (aarch64_convert_sve_vector_bits): New function.
9149         (aarch64_override_options): Use it to handle -msve-vector-bits=.
9150         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
9151         rather than an rtx.
9152         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
9153         Handle SVE vector and predicate modes.  Accept VL-based constants
9154         that need only one temporary register, and VL offsets that require
9155         no temporary registers.
9156         (aarch64_conditional_register_usage): Mark the predicate registers
9157         as fixed if SVE isn't available.
9158         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
9159         Return true for SVE vector and predicate modes.
9160         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
9161         rather than an unsigned int.  Handle SVE modes.
9162         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
9163         SVE modes.
9164         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
9165         if SVE is enabled.
9166         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
9167         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
9168         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
9169         (aarch64_sve_float_mul_immediate_p): New functions.
9170         (aarch64_sve_valid_immediate): New function.
9171         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
9172         Explicitly reject structure modes.  Check for INDEX constants.
9173         Handle PTRUE and PFALSE constants.
9174         (aarch64_check_zero_based_sve_index_immediate): New function.
9175         (aarch64_simd_imm_zero_p): Delete.
9176         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
9177         vector modes.  Accept constants in the range of CNT[BHWD].
9178         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
9179         ask for an Advanced SIMD mode.
9180         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
9181         (aarch64_simd_vector_alignment): Handle SVE predicates.
9182         (aarch64_vectorize_preferred_vector_alignment): New function.
9183         (aarch64_simd_vector_alignment_reachable): Use it instead of
9184         the vector size.
9185         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
9186         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
9187         functions.
9188         (MAX_VECT_LEN): Delete.
9189         (expand_vec_perm_d): Add a vec_flags field.
9190         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
9191         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
9192         (aarch64_evpc_ext): Don't apply a big-endian lane correction
9193         for SVE modes.
9194         (aarch64_evpc_rev): Rename to...
9195         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
9196         (aarch64_evpc_rev_global): New function.
9197         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
9198         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
9199         MAX_VECT_LEN.
9200         (aarch64_evpc_sve_tbl): New function.
9201         (aarch64_expand_vec_perm_const_1): Update after rename of
9202         aarch64_evpc_rev.  Handle SVE permutes too, trying
9203         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
9204         than aarch64_evpc_tbl.
9205         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
9206         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
9207         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
9208         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
9209         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
9210         (aarch64_expand_sve_vcond): New functions.
9211         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
9212         of aarch64_vector_mode_p.
9213         (aarch64_dwarf_poly_indeterminate_value): New function.
9214         (aarch64_compute_pressure_classes): Likewise.
9215         (aarch64_can_change_mode_class): Likewise.
9216         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
9217         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
9218         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
9219         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
9220         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
9221         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
9222         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
9223         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
9224         constraints.
9225         (Dn, Dl, Dr): Accept const as well as const_vector.
9226         (Dz): Likewise.  Compare against CONST0_RTX.
9227         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
9228         of "vector" where appropriate.
9229         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
9230         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
9231         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
9232         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
9233         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
9234         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
9235         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
9236         (v_int_equiv): Extend to SVE modes.
9237         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
9238         mode attributes.
9239         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
9240         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
9241         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
9242         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
9243         (SVE_COND_FP_CMP): New int iterators.
9244         (perm_hilo): Handle the new unpack unspecs.
9245         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
9246         attributes.
9247         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
9248         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
9249         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
9250         (aarch64_equality_operator, aarch64_constant_vector_operand)
9251         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
9252         (aarch64_sve_nonimmediate_operand): Likewise.
9253         (aarch64_sve_general_operand): Likewise.
9254         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
9255         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
9256         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
9257         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
9258         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
9259         (aarch64_sve_float_arith_immediate): Likewise.
9260         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
9261         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
9262         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
9263         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
9264         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
9265         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
9266         (aarch64_sve_float_arith_operand): Likewise.
9267         (aarch64_sve_float_arith_with_sub_operand): Likewise.
9268         (aarch64_sve_float_mul_operand): Likewise.
9269         (aarch64_sve_vec_perm_operand): Likewise.
9270         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
9271         (aarch64_mov_operand): Accept const_poly_int and const_vector.
9272         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
9273         as well as const_vector.
9274         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
9275         in file.  Use CONST0_RTX and CONSTM1_RTX.
9276         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
9277         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
9278         Use aarch64_simd_imm_zero.
9279         * config/aarch64/aarch64-sve.md: New file.
9280         * config/aarch64/aarch64.md: Include it.
9281         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
9282         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
9283         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
9284         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
9285         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
9286         (sve): New attribute.
9287         (enabled): Disable instructions with the sve attribute unless
9288         TARGET_SVE.
9289         (movqi, movhi): Pass CONST_POLY_INT operaneds through
9290         aarch64_expand_mov_immediate.
9291         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
9292         CNT[BHSD] immediates.
9293         (movti): Split CONST_POLY_INT moves into two halves.
9294         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
9295         Split additions that need a temporary here if the destination
9296         is the stack pointer.
9297         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
9298         (*add<mode>3_poly_1): New instruction.
9299         (set_clobber_cc): New expander.
9301 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
9303         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
9304         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
9305         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
9306         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
9307         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
9308         Change innermode from fixed_mode_size to machine_mode.
9309         (simplify_subreg): Update call accordingly.  Handle a constant-sized
9310         subreg of a variable-length CONST_VECTOR.
9312 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
9313             Alan Hayward  <alan.hayward@arm.com>
9314             David Sherwood  <david.sherwood@arm.com>
9316         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
9317         (add_offset_to_base): New function, split out from...
9318         (create_mem_ref): ...here.  When handling a scale other than 1,
9319         check first whether the address is valid without the offset.
9320         Add it into the base if so, leaving the index and scale as-is.
9322 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
9324         PR c++/83778
9325         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
9326         fold_for_warn before checking if arg2 is INTEGER_CST.
9328 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
9330         * config/rs6000/predicates.md (load_multiple_operation): Delete.
9331         (store_multiple_operation): Delete.
9332         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
9333         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
9334         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
9335         guarded by TARGET_STRING.
9336         (rs6000_output_load_multiple): Delete.
9337         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
9338         OPTION_MASK_STRING / TARGET_STRING handling.
9339         (print_operand) <'N', 'O'>: Add comment that these are unused now.
9340         (const rs6000_opt_masks) <"string">: Change mask to 0.
9341         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
9342         (MASK_STRING): Delete.
9343         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
9344         parts.  Simplify.
9345         (load_multiple): Delete.
9346         (*ldmsi8): Delete.
9347         (*ldmsi7): Delete.
9348         (*ldmsi6): Delete.
9349         (*ldmsi5): Delete.
9350         (*ldmsi4): Delete.
9351         (*ldmsi3): Delete.
9352         (store_multiple): Delete.
9353         (*stmsi8): Delete.
9354         (*stmsi7): Delete.
9355         (*stmsi6): Delete.
9356         (*stmsi5): Delete.
9357         (*stmsi4): Delete.
9358         (*stmsi3): Delete.
9359         (movmemsi_8reg): Delete.
9360         (corresponding unnamed define_insn): Delete.
9361         (movmemsi_6reg): Delete.
9362         (corresponding unnamed define_insn): Delete.
9363         (movmemsi_4reg): Delete.
9364         (corresponding unnamed define_insn): Delete.
9365         (movmemsi_2reg): Delete.
9366         (corresponding unnamed define_insn): Delete.
9367         (movmemsi_1reg): Delete.
9368         (corresponding unnamed define_insn): Delete.
9369         * config/rs6000/rs6000.opt (mno-string): New.
9370         (mstring): Replace by deprecation warning stub.
9371         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
9373 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
9375         * regrename.c (regrename_do_replace): If replacing the same
9376         reg multiple times, try to reuse last created gen_raw_REG.
9378         PR debug/81155
9379         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
9380         main to workaround a bug in GDB.
9382 2018-01-12  Tom de Vries  <tom@codesourcery.com>
9384         PR target/83737
9385         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
9387 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
9389         PR rtl-optimization/80481
9390         * ira-color.c (get_cap_member): New function.
9391         (allocnos_conflict_by_live_ranges_p): Use it.
9392         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
9393         (setup_slot_coalesced_allocno_live_ranges): Ditto.
9395 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
9397         PR target/83628
9398         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
9399         (*saddl_se_1): Ditto.
9400         (*ssubsi_1): Ditto.
9401         (*ssubl_se_1): Ditto.
9403 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
9405         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
9406         rather than wi::to_widest for DR_INITs.
9407         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
9408         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
9409         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
9410         INTEGER_CSTs.
9411         (vect_analyze_group_access_1): Note that here.
9413 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
9415         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
9416         polynomial type sizes.
9418 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
9420         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
9421         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
9422         (gimple_add_tmp_var): Likewise.
9424 2018-01-12  Martin Liska  <mliska@suse.cz>
9426         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
9427         (gimple_alloc_sizes): Likewise.
9428         (dump_gimple_statistics): Use PRIu64 in printf format.
9429         * gimple.h: Change uint64_t to int.
9431 2018-01-12  Martin Liska  <mliska@suse.cz>
9433         * tree-core.h: Use uint64_t instead of int.
9434         * tree.c (tree_node_counts): Likewise.
9435         (tree_node_sizes): Likewise.
9436         (dump_tree_statistics): Use PRIu64 in printf format.
9438 2018-01-12  Martin Liska  <mliska@suse.cz>
9440         * Makefile.in: As qsort_chk is implemented in vec.c, add
9441         vec.o to linkage of gencfn-macros.
9442         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
9443         passing the info to record_node_allocation_statistics.
9444         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
9445         and pass the info.
9446         * ggc-common.c (struct ggc_usage): Add operator== and use
9447         it in operator< and compare function.
9448         * mem-stats.h (struct mem_usage): Likewise.
9449         * vec.c (struct vec_usage): Remove operator< and compare
9450         function. Can be simply inherited.
9452 2018-01-12  Martin Jambor  <mjambor@suse.cz>
9454         PR target/81616
9455         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
9456         * tree-ssa-math-opts.c: Include domwalk.h.
9457         (convert_mult_to_fma_1): New function.
9458         (fma_transformation_info): New type.
9459         (fma_deferring_state): Likewise.
9460         (cancel_fma_deferring): New function.
9461         (result_of_phi): Likewise.
9462         (last_fma_candidate_feeds_initial_phi): Likewise.
9463         (convert_mult_to_fma): Added deferring logic, split actual
9464         transformation to convert_mult_to_fma_1.
9465         (math_opts_dom_walker): New type.
9466         (math_opts_dom_walker::after_dom_children): New method, body moved
9467         here from pass_optimize_widening_mul::execute, added deferring logic
9468         bits.
9469         (pass_optimize_widening_mul::execute): Moved most of code to
9470         math_opts_dom_walker::after_dom_children.
9471         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
9472         * config/i386/i386.c (ix86_option_override_internal): Added
9473         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
9475 2018-01-12  Richard Biener  <rguenther@suse.de>
9477         PR debug/83157
9478         * dwarf2out.c (gen_variable_die): Do not reset old_die for
9479         inline instance vars.
9481 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
9483         PR target/81819
9484         * config/rx/rx.c (rx_is_restricted_memory_address):
9485         Handle SUBREG case.
9487 2018-01-12  Richard Biener  <rguenther@suse.de>
9489         PR tree-optimization/80846
9490         * target.def (split_reduction): New target hook.
9491         * targhooks.c (default_split_reduction): New function.
9492         * targhooks.h (default_split_reduction): Declare.
9493         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
9494         target requests first reduce vectors by combining low and high
9495         parts.
9496         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
9497         (get_vectype_for_scalar_type_and_size): Export.
9498         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
9499         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
9500         * doc/tm.texi: Regenerate.
9501         * config/i386/i386.c (ix86_split_reduction): Implement
9502         TARGET_VECTORIZE_SPLIT_REDUCTION.
9504 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
9506         PR target/83368
9507         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
9508         in PIC mode except for TARGET_VXWORKS_RTP.
9509         * config/sparc/sparc.c: Include cfgrtl.h.
9510         (TARGET_INIT_PIC_REG): Define.
9511         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
9512         (sparc_pic_register_p): New predicate.
9513         (sparc_legitimate_address_p): Use it.
9514         (sparc_legitimize_pic_address): Likewise.
9515         (sparc_delegitimize_address): Likewise.
9516         (sparc_mode_dependent_address_p): Likewise.
9517         (gen_load_pcrel_sym): Remove 4th parameter.
9518         (load_got_register): Adjust call to above.  Remove obsolete stuff.
9519         (sparc_expand_prologue): Do not call load_got_register here.
9520         (sparc_flat_expand_prologue): Likewise.
9521         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
9522         (sparc_use_pseudo_pic_reg): New function.
9523         (sparc_init_pic_reg): Likewise.
9524         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
9525         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
9527 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
9529         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
9530         Add item for branch_cost.
9532 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
9534         PR rtl-optimization/83565
9535         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
9536         not extend the result to a larger mode for rotate operations.
9537         (num_sign_bit_copies1): Likewise.
9539 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9541         PR target/40411
9542         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
9543         -symbolic.
9544         Use values-Xc.o for -pedantic.
9545         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
9547 2018-01-12  Martin Liska  <mliska@suse.cz>
9549         PR ipa/83054
9550         * ipa-devirt.c (final_warning_record::grow_type_warnings):
9551         New function.
9552         (possible_polymorphic_call_targets): Use it.
9553         (ipa_devirt): Likewise.
9555 2018-01-12  Martin Liska  <mliska@suse.cz>
9557         * profile-count.h (enum profile_quality): Use 0 as invalid
9558         enum value of profile_quality.
9560 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
9562         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
9563         -mext-string options.
9565 2018-01-12  Richard Biener  <rguenther@suse.de>
9567         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
9568         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
9569         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
9570         Likewise.
9571         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
9573 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
9575         * configure.ac (--with-long-double-format): Add support for the
9576         configuration option to change the default long double format on
9577         PowerPC systems.
9578         * config.gcc (powerpc*-linux*-*): Likewise.
9579         * configure: Regenerate.
9580         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
9581         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
9582         used without modification.
9584 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
9586         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
9587         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
9588         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
9589         MISC_BUILTIN_SPEC_BARRIER.
9590         (rs6000_init_builtins): Likewise.
9591         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
9592         enum value.
9593         (speculation_barrier): New define_insn.
9594         * doc/extend.texi: Document __builtin_speculation_barrier.
9596 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
9598         PR target/83203
9599         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
9600         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
9601         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
9602         iterators.
9603         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
9604         integral modes instead of "ss" and "sd".
9605         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
9606         vectors with 32-bit and 64-bit elements.
9607         (vecdupssescalarmodesuffix): New mode attribute.
9608         (vec_dup<mode>): Use it.
9610 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
9612         PR target/83330
9613         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
9614         frame if argument is passed on stack.
9616 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
9618         PR target/82682
9619         * ree.c (combine_reaching_defs): Optimize also
9620         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
9621         reg2=any_extend(exp); reg1=reg2;, formatting fix.
9623 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
9625         PR middle-end/83189
9626         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
9628 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
9630         PR middle-end/83718
9631         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
9632         after they are computed.
9634 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
9636         PR tree-optimization/83695
9637         * gimple-loop-linterchange.cc
9638         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
9639         reset cached scev information after interchange.
9640         (pass_linterchange::execute): Remove call to scev_reset_htab.
9642 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9644         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
9645         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
9646         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
9647         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
9648         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
9649         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
9650         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
9651         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
9652         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
9653         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
9654         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
9655         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
9656         (V_lane_reg): Likewise.
9657         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
9658         New define_expand.
9659         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
9660         (vfmal_lane_low<mode>_intrinsic,
9661         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
9662         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
9663         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
9664         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
9665         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
9666         vfmsl_lane_high<mode>_intrinsic): New define_insns.
9668 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9670         * config/arm/arm-cpus.in (fp16fml): New feature.
9671         (ALL_SIMD): Add fp16fml.
9672         (armv8.2-a): Add fp16fml as an option.
9673         (armv8.3-a): Likewise.
9674         (armv8.4-a): Add fp16fml as part of fp16.
9675         * config/arm/arm.h (TARGET_FP16FML): Define.
9676         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
9677         when appropriate.
9678         * config/arm/arm-modes.def (V2HF): Define.
9679         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
9680         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
9681         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
9682         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
9683         vfmsl_low, vfmsl_high): New set of builtins.
9684         * config/arm/iterators.md (PLUSMINUS): New code iterator.
9685         (vfml_op): New code attribute.
9686         (VFMLHALVES): New int iterator.
9687         (VFML, VFMLSEL): New mode attributes.
9688         (V_reg): Define mapping for V2HF.
9689         (V_hi, V_lo): New mode attributes.
9690         (VF_constraint): Likewise.
9691         (vfml_half, vfml_half_selector): New int attributes.
9692         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
9693         define_expand.
9694         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
9695         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
9696         New define_insn.
9697         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
9698         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
9699         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
9700         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
9701         documentation.
9702         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
9703         Document new effective target and option set.
9705 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
9707         * config/arm/arm-cpus.in (armv8_4): New feature.
9708         (ARMv8_4a): New fgroup.
9709         (armv8.4-a): New arch.
9710         * config/arm/arm-tables.opt: Regenerate.
9711         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
9712         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
9713         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
9714         Add matching rules for -march=armv8.4-a and extensions.
9715         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
9717 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
9719         PR target/81821
9720         * config/rx/rx.md (BW): New mode attribute.
9721         (sync_lock_test_and_setsi): Add mode suffix to insn output.
9723 2018-01-11  Richard Biener  <rguenther@suse.de>
9725         PR tree-optimization/83435
9726         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
9727         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
9728         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
9730 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
9731             Alan Hayward  <alan.hayward@arm.com>
9732             David Sherwood  <david.sherwood@arm.com>
9734         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
9735         field.
9736         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
9737         (aarch64_print_address_internal): Use it to check for a zero offset.
9739 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
9740             Alan Hayward  <alan.hayward@arm.com>
9741             David Sherwood  <david.sherwood@arm.com>
9743         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
9744         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
9745         Return a poly_int64 rather than a HOST_WIDE_INT.
9746         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
9747         rather than a HOST_WIDE_INT.
9748         * config/aarch64/aarch64.h (aarch64_frame): Protect with
9749         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
9750         hard_fp_offset, frame_size, initial_adjust, callee_offset and
9751         final_offset from HOST_WIDE_INT to poly_int64.
9752         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
9753         to_constant when getting the number of units in an Advanced SIMD
9754         mode.
9755         (aarch64_builtin_vectorized_function): Check for a constant number
9756         of units.
9757         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
9758         GET_MODE_SIZE.
9759         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
9760         attribute instead of GET_MODE_NUNITS.
9761         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
9762         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
9763         GET_MODE_SIZE for fixed-size registers.
9764         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
9765         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
9766         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
9767         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
9768         (aarch64_print_operand, aarch64_print_address_internal)
9769         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
9770         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
9771         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
9772         Handle polynomial GET_MODE_SIZE.
9773         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
9774         wider than SImode without modification.
9775         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
9776         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
9777         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
9778         passing and returning SVE modes.
9779         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
9780         rather than GEN_INT.
9781         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
9782         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
9783         (aarch64_allocate_and_probe_stack_space): Likewise.
9784         (aarch64_layout_frame): Cope with polynomial offsets.
9785         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
9786         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
9787         polynomial offsets.
9788         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
9789         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
9790         poly_int64 rather than a HOST_WIDE_INT.
9791         (aarch64_get_separate_components, aarch64_process_components)
9792         (aarch64_expand_prologue, aarch64_expand_epilogue)
9793         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
9794         (aarch64_anchor_offset): New function, split out from...
9795         (aarch64_legitimize_address): ...here.
9796         (aarch64_builtin_vectorization_cost): Handle polynomial
9797         TYPE_VECTOR_SUBPARTS.
9798         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
9799         GET_MODE_NUNITS.
9800         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
9801         number of elements from the PARALLEL rather than the mode.
9802         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
9803         rather than GET_MODE_BITSIZE.
9804         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
9805         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
9806         (aarch64_expand_vec_perm_const_1): Handle polynomial
9807         d->perm.length () and d->perm elements.
9808         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
9809         Apply to_constant to d->perm elements.
9810         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
9811         polynomial CONST_VECTOR_NUNITS.
9812         (aarch64_move_pointer): Take amount as a poly_int64 rather
9813         than an int.
9814         (aarch64_progress_pointer): Avoid temporary variable.
9815         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
9816         the mode attribute instead of GET_MODE.
9818 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
9819             Alan Hayward  <alan.hayward@arm.com>
9820             David Sherwood  <david.sherwood@arm.com>
9822         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
9823         x exists before using it.
9824         (aarch64_add_constant_internal): Rename to...
9825         (aarch64_add_offset_1): ...this.  Replace regnum with separate
9826         src and dest rtxes.  Handle the case in which they're different,
9827         including when the offset is zero.  Replace scratchreg with an rtx.
9828         Use 2 additions if there is no spare register into which we can
9829         move a 16-bit constant.
9830         (aarch64_add_constant): Delete.
9831         (aarch64_add_offset): Replace reg with separate src and dest
9832         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
9833         Use aarch64_add_offset_1.
9834         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
9835         an rtx rather than an int.  Take the delta as a poly_int64
9836         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
9837         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
9838         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
9839         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
9840         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
9841         and aarch64_add_sp.
9842         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
9843         aarch64_add_constant.
9845 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
9847         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
9848         Use scalar_float_mode.
9850 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
9852         * config/aarch64/aarch64-simd.md
9853         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
9854         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
9855         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
9856         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
9857         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
9858         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
9859         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
9860         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
9861         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
9862         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
9864 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9866         PR target/83514
9867         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
9868         targ_options->x_arm_arch_string is non NULL.
9870 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
9872         * config/aarch64/aarch64.h
9873         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
9875 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
9877         PR target/82096
9878         * expmed.c (emit_store_flag_force): Swap if const op0
9879         and change VOIDmode to mode of op0.
9881 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
9883         PR rtl-optimization/83761
9884         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
9885         than bytes to mode_for_size.
9887 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
9889         PR middle-end/83189
9890         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
9891         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
9892         profile.
9894 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
9896         PR middle-end/83575
9897         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
9898         when in layout mode.
9899         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
9900         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
9901         partition fixup.
9903 2018-01-10  Michael Collison  <michael.collison@arm.com>
9905         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
9906         * config/aarch64/aarch64-option-extension.def: Add
9907         AARCH64_OPT_EXTENSION of 'fp16fml'.
9908         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
9909         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
9910         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
9911         * config/aarch64/constraints.md (Ui7): New constraint.
9912         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
9913         (VFMLA_SEL_W): Ditto.
9914         (f16quad): Ditto.
9915         (f16mac1): Ditto.
9916         (VFMLA16_LOW): New int iterator.
9917         (VFMLA16_HIGH): Ditto.
9918         (UNSPEC_FMLAL): New unspec.
9919         (UNSPEC_FMLSL): Ditto.
9920         (UNSPEC_FMLAL2): Ditto.
9921         (UNSPEC_FMLSL2): Ditto.
9922         (f16mac): New code attribute.
9923         * config/aarch64/aarch64-simd-builtins.def
9924         (aarch64_fmlal_lowv2sf): Ditto.
9925         (aarch64_fmlsl_lowv2sf): Ditto.
9926         (aarch64_fmlalq_lowv4sf): Ditto.
9927         (aarch64_fmlslq_lowv4sf): Ditto.
9928         (aarch64_fmlal_highv2sf): Ditto.
9929         (aarch64_fmlsl_highv2sf): Ditto.
9930         (aarch64_fmlalq_highv4sf): Ditto.
9931         (aarch64_fmlslq_highv4sf): Ditto.
9932         (aarch64_fmlal_lane_lowv2sf): Ditto.
9933         (aarch64_fmlsl_lane_lowv2sf): Ditto.
9934         (aarch64_fmlal_laneq_lowv2sf): Ditto.
9935         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
9936         (aarch64_fmlalq_lane_lowv4sf): Ditto.
9937         (aarch64_fmlsl_lane_lowv4sf): Ditto.
9938         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
9939         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
9940         (aarch64_fmlal_lane_highv2sf): Ditto.
9941         (aarch64_fmlsl_lane_highv2sf): Ditto.
9942         (aarch64_fmlal_laneq_highv2sf): Ditto.
9943         (aarch64_fmlsl_laneq_highv2sf): Ditto.
9944         (aarch64_fmlalq_lane_highv4sf): Ditto.
9945         (aarch64_fmlsl_lane_highv4sf): Ditto.
9946         (aarch64_fmlalq_laneq_highv4sf): Ditto.
9947         (aarch64_fmlsl_laneq_highv4sf): Ditto.
9948         * config/aarch64/aarch64-simd.md:
9949         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
9950         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
9951         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
9952         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
9953         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
9954         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
9955         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
9956         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
9957         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
9958         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
9959         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
9960         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
9961         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
9962         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
9963         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
9964         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
9965         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
9966         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
9967         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
9968         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
9969         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
9970         (vfmlsl_low_u32): Ditto.
9971         (vfmlalq_low_u32): Ditto.
9972         (vfmlslq_low_u32): Ditto.
9973         (vfmlal_high_u32): Ditto.
9974         (vfmlsl_high_u32): Ditto.
9975         (vfmlalq_high_u32): Ditto.
9976         (vfmlslq_high_u32): Ditto.
9977         (vfmlal_lane_low_u32): Ditto.
9978         (vfmlsl_lane_low_u32): Ditto.
9979         (vfmlal_laneq_low_u32): Ditto.
9980         (vfmlsl_laneq_low_u32): Ditto.
9981         (vfmlalq_lane_low_u32): Ditto.
9982         (vfmlslq_lane_low_u32): Ditto.
9983         (vfmlalq_laneq_low_u32): Ditto.
9984         (vfmlslq_laneq_low_u32): Ditto.
9985         (vfmlal_lane_high_u32): Ditto.
9986         (vfmlsl_lane_high_u32): Ditto.
9987         (vfmlal_laneq_high_u32): Ditto.
9988         (vfmlsl_laneq_high_u32): Ditto.
9989         (vfmlalq_lane_high_u32): Ditto.
9990         (vfmlslq_lane_high_u32): Ditto.
9991         (vfmlalq_laneq_high_u32): Ditto.
9992         (vfmlslq_laneq_high_u32): Ditto.
9993         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
9994         (AARCH64_FL_FOR_ARCH8_4): New.
9995         (AARCH64_ISA_F16FML): New ISA flag.
9996         (TARGET_F16FML): New feature flag for fp16fml.
9997         (doc/invoke.texi): Document new fp16fml option.
9999 2018-01-10  Michael Collison  <michael.collison@arm.com>
10001         * config/aarch64/aarch64-builtins.c:
10002         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
10003         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
10004         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
10005         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
10006         (AARCH64_ISA_SHA3): New ISA flag.
10007         (TARGET_SHA3): New feature flag for sha3.
10008         * config/aarch64/iterators.md (sha512_op): New int attribute.
10009         (CRYPTO_SHA512): New int iterator.
10010         (UNSPEC_SHA512H): New unspec.
10011         (UNSPEC_SHA512H2): Ditto.
10012         (UNSPEC_SHA512SU0): Ditto.
10013         (UNSPEC_SHA512SU1): Ditto.
10014         * config/aarch64/aarch64-simd-builtins.def
10015         (aarch64_crypto_sha512hqv2di): New builtin.
10016         (aarch64_crypto_sha512h2qv2di): Ditto.
10017         (aarch64_crypto_sha512su0qv2di): Ditto.
10018         (aarch64_crypto_sha512su1qv2di): Ditto.
10019         (aarch64_eor3qv8hi): Ditto.
10020         (aarch64_rax1qv2di): Ditto.
10021         (aarch64_xarqv2di): Ditto.
10022         (aarch64_bcaxqv8hi): Ditto.
10023         * config/aarch64/aarch64-simd.md:
10024         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
10025         (aarch64_crypto_sha512su0qv2di): Ditto.
10026         (aarch64_crypto_sha512su1qv2di): Ditto.
10027         (aarch64_eor3qv8hi): Ditto.
10028         (aarch64_rax1qv2di): Ditto.
10029         (aarch64_xarqv2di): Ditto.
10030         (aarch64_bcaxqv8hi): Ditto.
10031         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
10032         (vsha512h2q_u64): Ditto.
10033         (vsha512su0q_u64): Ditto.
10034         (vsha512su1q_u64): Ditto.
10035         (veor3q_u16): Ditto.
10036         (vrax1q_u64): Ditto.
10037         (vxarq_u64): Ditto.
10038         (vbcaxq_u16): Ditto.
10039         * config/arm/types.md (crypto_sha512): New type attribute.
10040         (crypto_sha3): Ditto.
10041         (doc/invoke.texi): Document new sha3 option.
10043 2018-01-10  Michael Collison  <michael.collison@arm.com>
10045         * config/aarch64/aarch64-builtins.c:
10046         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
10047         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
10048         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
10049         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
10050         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
10051         (AARCH64_ISA_SM4): New ISA flag.
10052         (TARGET_SM4): New feature flag for sm4.
10053         * config/aarch64/aarch64-simd-builtins.def
10054         (aarch64_sm3ss1qv4si): Ditto.
10055         (aarch64_sm3tt1aq4si): Ditto.
10056         (aarch64_sm3tt1bq4si): Ditto.
10057         (aarch64_sm3tt2aq4si): Ditto.
10058         (aarch64_sm3tt2bq4si): Ditto.
10059         (aarch64_sm3partw1qv4si): Ditto.
10060         (aarch64_sm3partw2qv4si): Ditto.
10061         (aarch64_sm4eqv4si): Ditto.
10062         (aarch64_sm4ekeyqv4si): Ditto.
10063         * config/aarch64/aarch64-simd.md:
10064         (aarch64_sm3ss1qv4si): Ditto.
10065         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
10066         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
10067         (aarch64_sm4eqv4si): Ditto.
10068         (aarch64_sm4ekeyqv4si): Ditto.
10069         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
10070         (sm3part_op): Ditto.
10071         (CRYPTO_SM3TT): Ditto.
10072         (CRYPTO_SM3PART): Ditto.
10073         (UNSPEC_SM3SS1): New unspec.
10074         (UNSPEC_SM3TT1A): Ditto.
10075         (UNSPEC_SM3TT1B): Ditto.
10076         (UNSPEC_SM3TT2A): Ditto.
10077         (UNSPEC_SM3TT2B): Ditto.
10078         (UNSPEC_SM3PARTW1): Ditto.
10079         (UNSPEC_SM3PARTW2): Ditto.
10080         (UNSPEC_SM4E): Ditto.
10081         (UNSPEC_SM4EKEY): Ditto.
10082         * config/aarch64/constraints.md (Ui2): New constraint.
10083         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
10084         * config/arm/types.md (crypto_sm3): New type attribute.
10085         (crypto_sm4): Ditto.
10086         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
10087         (vsm3tt1aq_u32): Ditto.
10088         (vsm3tt1bq_u32): Ditto.
10089         (vsm3tt2aq_u32): Ditto.
10090         (vsm3tt2bq_u32): Ditto.
10091         (vsm3partw1q_u32): Ditto.
10092         (vsm3partw2q_u32): Ditto.
10093         (vsm4eq_u32): Ditto.
10094         (vsm4ekeyq_u32): Ditto.
10095         (doc/invoke.texi): Document new sm4 option.
10097 2018-01-10  Michael Collison  <michael.collison@arm.com>
10099         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
10100         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
10101         (AARCH64_FL_FOR_ARCH8_4): New.
10102         (AARCH64_FL_V8_4): New flag.
10103         (doc/invoke.texi): Document new armv8.4-a option.
10105 2018-01-10  Michael Collison  <michael.collison@arm.com>
10107         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
10108         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
10109         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
10110         * config/aarch64/aarch64-option-extension.def: Add
10111         AARCH64_OPT_EXTENSION of 'sha2'.
10112         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
10113         (crypto): Disable sha2 and aes if crypto disabled.
10114         (crypto): Enable aes and sha2 if enabled.
10115         (simd): Disable sha2 and aes if simd disabled.
10116         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
10117         New flags.
10118         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
10119         (TARGET_SHA2): New feature flag for sha2.
10120         (TARGET_AES): New feature flag for aes.
10121         * config/aarch64/aarch64-simd.md:
10122         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
10123         conditional on TARGET_AES.
10124         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
10125         (aarch64_crypto_sha1hsi): Make pattern conditional
10126         on TARGET_SHA2.
10127         (aarch64_crypto_sha1hv4si): Ditto.
10128         (aarch64_be_crypto_sha1hv4si): Ditto.
10129         (aarch64_crypto_sha1su1v4si): Ditto.
10130         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
10131         (aarch64_crypto_sha1su0v4si): Ditto.
10132         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
10133         (aarch64_crypto_sha256su0v4si): Ditto.
10134         (aarch64_crypto_sha256su1v4si): Ditto.
10135         (doc/invoke.texi): Document new aes and sha2 options.
10137 2018-01-10  Martin Sebor  <msebor@redhat.com>
10139         PR tree-optimization/83781
10140         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
10141         as string arrays.
10143 2018-01-11  Martin Sebor  <msebor@gmail.com>
10144             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
10146         PR tree-optimization/83501
10147         PR tree-optimization/81703
10149         * tree-ssa-strlen.c (get_string_cst): Rename...
10150         (get_string_len): ...to this.  Handle global constants.
10151         (handle_char_store): Adjust.
10153 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
10154             Jim Wilson  <jimw@sifive.com>
10156         * config/riscv/riscv-protos.h (riscv_output_return): New.
10157         * config/riscv/riscv.c (struct machine_function): New naked_p field.
10158         (riscv_attribute_table, riscv_output_return),
10159         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
10160         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
10161         (riscv_compute_frame_info): Only compute frame->mask if not a naked
10162         function.
10163         (riscv_expand_prologue): Add early return for naked function.
10164         (riscv_expand_epilogue): Likewise.
10165         (riscv_function_ok_for_sibcall): Return false for naked function.
10166         (riscv_set_current_function): New.
10167         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
10168         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
10169         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
10170         * doc/extend.texi (RISC-V Function Attributes): New.
10172 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
10174         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
10175         check for 128-bit long double before checking TCmode.
10176         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
10177         128-bit long doubles before checking TFmode or TCmode.
10178         (FLOAT128_IBM_P): Likewise.
10180 2018-01-10  Martin Sebor  <msebor@redhat.com>
10182         PR tree-optimization/83671
10183         * builtins.c (c_strlen): Unconditionally return zero for the empty
10184         string.
10185         Use -Warray-bounds for warnings.
10186         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
10187         for non-constant array indices with COMPONENT_REF, arrays of
10188         arrays, and pointers to arrays.
10189         (gimple_fold_builtin_strlen): Determine and set length range for
10190         non-constant character arrays.
10192 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
10194         PR middle-end/81897
10195         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
10196         empty blocks.
10198 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
10200         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
10202 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
10204         PR target/83399
10205         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
10206         VECTOR_MEM_ALTIVEC_OR_VSX_P.
10207         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
10208         indexed_or_indirect_operand predicate.
10209         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
10210         (*vsx_le_perm_load_v8hi): Likewise.
10211         (*vsx_le_perm_load_v16qi): Likewise.
10212         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
10213         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
10214         (*vsx_le_perm_store_v8hi): Likewise.
10215         (*vsx_le_perm_store_v16qi): Likewise.
10216         (eight unnamed splitters): Likewise.
10218 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
10220         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
10221         * config/rs6000/emmintrin.h: Likewise.
10222         * config/rs6000/mmintrin.h: Likewise.
10223         * config/rs6000/xmmintrin.h: Likewise.
10225 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
10227         PR c++/43486
10228         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
10229         "public_flag".
10230         * tree.c (tree_nop_conversion): Return true for location wrapper
10231         nodes.
10232         (maybe_wrap_with_location): New function.
10233         (selftest::check_strip_nops): New function.
10234         (selftest::test_location_wrappers): New function.
10235         (selftest::tree_c_tests): Call it.
10236         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
10237         (maybe_wrap_with_location): New decl.
10238         (EXPR_LOCATION_WRAPPER_P): New macro.
10239         (location_wrapper_p): New inline function.
10240         (tree_strip_any_location_wrapper): New inline function.
10242 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
10244         PR target/83735
10245         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
10246         stack_realign_offset for the largest alignment of stack slot
10247         actually used.
10248         (ix86_find_max_used_stack_alignment): New function.
10249         (ix86_finalize_stack_frame_flags): Use it.  Set
10250         max_used_stack_alignment if we don't realign stack.
10251         * config/i386/i386.h (machine_function): Add
10252         max_used_stack_alignment.
10254 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
10256         * config/arm/arm.opt (-mbranch-cost): New option.
10257         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
10258         account.
10260 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
10262         PR target/83629
10263         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
10264         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
10266 2018-01-10  Richard Biener  <rguenther@suse.de>
10268         PR debug/83765
10269         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
10270         early out so it also covers the case where we have a non-NULL
10271         origin.
10273 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
10275         PR tree-optimization/83753
10276         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
10277         for non-strided grouped accesses if the number of elements is 1.
10279 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
10281         PR target/81616
10282         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
10283         * i386.h (TARGET_USE_GATHER): Define.
10284         * x86-tune.def (X86_TUNE_USE_GATHER): New.
10286 2018-01-10  Martin Liska  <mliska@suse.cz>
10288         PR bootstrap/82831
10289         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
10290         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
10291         partitioning.
10292         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
10293         CLEANUP_NO_PARTITIONING is not set.
10295 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
10297         * doc/rtl.texi: Remove documentation of (const ...) wrappers
10298         for vectors, as a partial revert of r254296.
10299         * rtl.h (const_vec_p): Delete.
10300         (const_vec_duplicate_p): Don't test for vector CONSTs.
10301         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
10302         * expmed.c (make_tree): Likewise.
10304         Revert:
10305         * common.md (E, F): Use CONSTANT_P instead of checking for
10306         CONST_VECTOR.
10307         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
10308         checking for CONST_VECTOR.
10310 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
10312         PR middle-end/83575
10313         * predict.c (force_edge_cold): Handle in more sane way edges
10314         with no prediction.
10316 2018-01-09  Carl Love  <cel@us.ibm.com>
10318         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
10319         V4SI, V4SF types.
10320         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
10321         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
10322         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
10323         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
10324         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
10325         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
10326         * config/rs6000/rs6000-protos.h: Add extern defition for
10327         rs6000_generate_float2_double_code.
10328         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
10329         function.
10330         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
10331         (float2_v2df): Add define_expand.
10333 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
10335         PR target/83628
10336         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
10337         op_mode in the force_to_mode call.
10339 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
10341         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
10342         instead of checking each element individually.
10343         (aarch64_evpc_uzp): Likewise.
10344         (aarch64_evpc_zip): Likewise.
10345         (aarch64_evpc_ext): Likewise.
10346         (aarch64_evpc_rev): Likewise.
10347         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
10348         instead of checking each element individually.  Return true without
10349         generating rtl if
10350         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
10351         whether all selected elements come from the same input, instead of
10352         checking each element individually.  Remove calls to gen_rtx_REG,
10353         start_sequence and end_sequence and instead assert that no rtl is
10354         generated.
10356 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
10358         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
10359         order of HIGH and CONST checks.
10361 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
10363         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
10364         if the destination isn't an SSA_NAME.
10366 2018-01-09  Richard Biener  <rguenther@suse.de>
10368         PR tree-optimization/83668
10369         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
10370         move prologue...
10371         (canonicalize_loop_form): ... here, renamed from ...
10372         (canonicalize_loop_closed_ssa_form): ... this and amended to
10373         swap successor edges for loop exit blocks to make us use
10374         the RPO order we need for initial schedule generation.
10376 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
10378         PR tree-optimization/64811
10379         * match.pd: When optimizing comparisons with Inf, avoid
10380         introducing or losing exceptions from comparisons with NaN.
10382 2018-01-09  Martin Liska  <mliska@suse.cz>
10384         PR sanitizer/82517
10385         * asan.c (shadow_mem_size): Add gcc_assert.
10387 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
10389         Don't save registers in main().
10391         PR target/83738
10392         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
10393         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
10394         * config/avr/avr.c (avr_set_current_function): Don't error if
10395         naked, OS_task or OS_main are specified at the same time.
10396         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
10397         OS_main.
10398         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
10399         attribute.
10400         * common/config/avr/avr-common.c (avr_option_optimization_table):
10401         Switch on -mmain-is-OS_task for optimizing compilations.
10403 2018-01-09  Richard Biener  <rguenther@suse.de>
10405         PR tree-optimization/83572
10406         * graphite.c: Include cfganal.h.
10407         (graphite_transform_loops): Connect infinite loops to exit
10408         and remove fake edges at the end.
10410 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
10412         * ipa-inline.c (edge_badness): Revert accidental checkin.
10414 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
10416         PR ipa/80763
10417         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
10418         symbols; not inline clones.
10420 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
10422         PR target/83507
10423         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
10424         hard registers.  Formatting fixes.
10426         PR preprocessor/83722
10427         * gcc.c (try_generate_repro): Pass
10428         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
10429         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
10430         do_report_bug.
10432 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
10433             Kito Cheng  <kito.cheng@gmail.com>
10435         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
10436         (riscv_leaf_function_p): Delete.
10437         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
10439 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
10441         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
10442         function.
10443         (do_ifelse): New function.
10444         (do_isel): New function.
10445         (do_sub3): New function.
10446         (do_add3): New function.
10447         (do_load_mask_compare): New function.
10448         (do_overlap_load_compare): New function.
10449         (expand_compare_loop): New function.
10450         (expand_block_compare): Call expand_compare_loop() when appropriate.
10451         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
10452         option description.
10453         (-mblock-compare-inline-loop-limit): New option.
10455 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
10457         PR target/83677
10458         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
10459         Reverse order of second and third operands in first alternative.
10460         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
10461         of first and second elements in UNSPEC_VPERMR vector.
10462         (altivec_expand_vec_perm_le): Likewise.
10464 2018-01-08  Jeff Law  <law@redhat.com>
10466         PR rtl-optimizatin/81308
10467         * tree-switch-conversion.c (cfg_altered): New file scoped static.
10468         (process_switch): If group_case_labels makes a change, then set
10469         cfg_altered.
10470         (pass_convert_switch::execute): If a switch is converted, then
10471         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
10473         PR rtl-optimization/81308
10474         * recog.c (split_all_insns): Conditionally cleanup the CFG after
10475         splitting insns.
10477 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
10479         PR target/83663 - Revert r255946
10480         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
10481         generation for cases where splatting a value is not useful.
10482         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
10483         across a vec_duplicate and a paradoxical subreg forming a vector
10484         mode to a vec_concat.
10486 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
10488         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
10489         -march=armv8.3-a variants.
10490         * config/arm/t-multilib: Likewise.
10491         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
10493 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
10495         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
10496         to generate rtl.
10497         (cceq_ior_compare_complement): Give it a name so I can use it, and
10498         change boolean_or_operator predicate to boolean_operator so it can
10499         be used to generate a crand.
10500         (eqne): New code iterator.
10501         (bd/bd_neg): New code_attrs.
10502         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
10503         a single define_insn.
10504         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
10505         decrement (bdnzt/bdnzf/bdzt/bdzf).
10506         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
10507         with the new names of the branch decrement patterns, and added the
10508         names of the branch decrement conditional patterns.
10510 2018-01-08  Richard Biener  <rguenther@suse.de>
10512         PR tree-optimization/83563
10513         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
10514         cache.
10516 2018-01-08  Richard Biener  <rguenther@suse.de>
10518         PR middle-end/83713
10519         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
10521 2018-01-08  Richard Biener  <rguenther@suse.de>
10523         PR tree-optimization/83685
10524         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
10525         references to abnormals.
10527 2018-01-08  Richard Biener  <rguenther@suse.de>
10529         PR lto/83719
10530         * dwarf2out.c (output_indirect_strings): Handle empty
10531         skeleton_debug_str_hash.
10532         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
10534 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
10536         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
10537         (emit_store_direct): Likewise.
10538         (arc_trampoline_adjust_address): Likewise.
10539         (arc_asm_trampoline_template): New function.
10540         (arc_initialize_trampoline): Use asm_trampoline_template.
10541         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
10542         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
10543         * config/arc/arc.md (flush_icache): Delete pattern.
10545 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
10547         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
10548         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
10549         munaligned-access.
10551 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
10553         PR target/83681
10554         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
10555         by not USED_FOR_TARGET.
10556         (make_pass_resolve_sw_modes): Likewise.
10558 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
10560         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
10561         USED_FOR_TARGET.
10563 2018-01-08  Richard Biener  <rguenther@suse.de>
10565         PR middle-end/83580
10566         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
10568 2018-01-08  Richard Biener  <rguenther@suse.de>
10570         PR middle-end/83517
10571         * match.pd ((t * 2) / 2) -> t): Add missing :c.
10573 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
10575         PR middle-end/81897
10576         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
10577         basic blocks with a small number of successors.
10578         (convert_control_dep_chain_into_preds): Improve handling of
10579         forwarder blocks.
10580         (dump_predicates): Split apart into...
10581         (dump_pred_chain): ...here...
10582         (dump_pred_info): ...and here.
10583         (can_one_predicate_be_invalidated_p): Add debugging printfs.
10584         (can_chain_union_be_invalidated_p): Improve check for invalidation
10585         of paths.
10586         (uninit_uses_cannot_happen): Avoid unnecessary if
10587         convert_control_dep_chain_into_preds yielded nothing.
10589 2018-01-06  Martin Sebor  <msebor@redhat.com>
10591         PR tree-optimization/83640
10592         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
10593         subtracting negative offset from size.
10594         (builtin_access::overlap): Adjust offset bounds of the access to fall
10595         within the size of the object if possible.
10597 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
10599         PR rtl-optimization/83699
10600         * expmed.c (extract_bit_field_1): Restrict the vector usage of
10601         extract_bit_field_as_subreg to cases in which the extracted
10602         value is also a vector.
10604         * lra-constraints.c (process_alt_operands): Test for the equivalence
10605         substitutions when detecting a possible reload cycle.
10607 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
10609         PR debug/83480
10610         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
10611         by default if flag_selective_schedling{,2}.  Formatting fixes.
10613         PR rtl-optimization/83682
10614         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
10615         if it has non-VECTOR_MODE element mode.
10616         (vec_duplicate_p): Likewise.
10618         PR middle-end/83694
10619         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
10620         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
10622 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
10624         PR target/83604
10625         * config/i386/i386-builtin.def
10626         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
10627         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
10628         Require also OPTION_MASK_ISA_AVX512F in addition to
10629         OPTION_MASK_ISA_GFNI.
10630         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
10631         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
10632         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
10633         to OPTION_MASK_ISA_GFNI.
10634         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
10635         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
10636         OPTION_MASK_ISA_AVX512BW.
10637         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
10638         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
10639         addition to OPTION_MASK_ISA_GFNI.
10640         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
10641         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
10642         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
10643         to OPTION_MASK_ISA_GFNI.
10644         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
10645         a requirement for all ISAs rather than any of them with a few
10646         exceptions.
10647         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
10648         processing.
10649         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
10650         bitmasks to be enabled with 3 exceptions, instead of requiring any
10651         enabled ISA with lots of exceptions.
10652         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
10653         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
10654         Change avx512bw in isa attribute to avx512f.
10655         * config/i386/sgxintrin.h: Add license boilerplate.
10656         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
10657         to __AVX512F__ and __AVX512VL to __AVX512VL__.
10658         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
10659         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
10660         defined.
10661         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
10662         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
10663         temporarily sse2 rather than sse if not enabled already.
10665         PR target/83604
10666         * config/i386/sse.md (VI248_VLBW): Rename to ...
10667         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
10668         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
10669         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
10670         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
10671         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
10672         mode iterator instead of VI248_VLBW.
10674 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
10676         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
10677         (record_modified): Skip clobbers; add debug output.
10678         (param_change_prob): Use sreal frequencies.
10680 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
10682         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
10683         punt for user-aligned variables.
10685 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
10687         * tree-chrec.c (chrec_contains_symbols): Return true for
10688         POLY_INT_CST.
10690 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
10692         PR target/82439
10693         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
10694         of (x|y) == x for BICS pattern.
10696 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
10698         PR tree-optimization/83605
10699         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
10700         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
10701         can throw.
10703 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
10705         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
10706         * config/epiphany/rtems.h: New file.
10708 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
10709             Uros Bizjak  <ubizjak@gmail.com>
10711         PR target/83554
10712         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
10713         QIreg_operand instead of register_operand predicate.
10714         * config/i386/i386.c (ix86_rop_should_change_byte_p,
10715         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
10716         comments instead of -fmitigate[-_]rop.
10718 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10720         PR bootstrap/81926
10721         * cgraphunit.c (symbol_table::compile): Switch to text_section
10722         before calling assembly_start debug hook.
10723         * run-rtl-passes.c (run_rtl_passes): Likewise.
10724         Include output.h.
10726 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
10728         * tree-vrp.c (extract_range_from_binary_expr_1): Check
10729         range_int_cst_p rather than !symbolic_range_p before calling
10730         extract_range_from_multiplicative_op_1.
10732 2018-01-04  Jeff Law  <law@redhat.com>
10734         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
10735         redundant test in assertion.
10737 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
10739         * doc/rtl.texi: Document machine_mode wrapper classes.
10741 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
10743         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
10744         using tree_to_uhwi.
10746 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
10748         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
10749         the VEC_PERM_EXPR fold to fail.
10751 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
10753         PR debug/83585
10754         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
10755         to switched_sections.
10757 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
10759         PR target/83680
10760         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
10761         test for d.testing.
10763 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
10765         PR target/83387
10766         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
10767         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
10769 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
10771         PR debug/83666
10772         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
10773         is BLKmode and bitpos not zero or mode change is needed.
10775 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
10777         PR target/83675
10778         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
10779         TARGET_VIS2.
10781 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
10783         PR target/83628
10784         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
10785         instead of MULT rtx.  Update all corresponding splitters.
10786         (*saddl_se): Ditto.
10787         (*ssub<modesuffix>): Ditto.
10788         (*ssubl_se): Ditto.
10789         (*cmp_sadd_di): Update split patterns.
10790         (*cmp_sadd_si): Ditto.
10791         (*cmp_sadd_sidi): Ditto.
10792         (*cmp_ssub_di): Ditto.
10793         (*cmp_ssub_si): Ditto.
10794         (*cmp_ssub_sidi): Ditto.
10795         * config/alpha/predicates.md (const23_operand): New predicate.
10796         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
10797         Look for ASHIFT, not MULT inner operand.
10798         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
10800 2018-01-04  Martin Liska  <mliska@suse.cz>
10802         PR gcov-profile/83669
10803         * gcov.c (output_intermediate_file): Add version to intermediate
10804         gcov file.
10805         * doc/gcov.texi: Document new field 'version' in intermediate
10806         file format. Fix location of '-k' option of gcov command.
10808 2018-01-04  Martin Liska  <mliska@suse.cz>
10810         PR ipa/82352
10811         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
10813 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
10815         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
10817 2018-01-03  Martin Sebor  <msebor@redhat.com>
10819         PR tree-optimization/83655
10820         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
10821         checking calls with invalid arguments.
10823 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
10825         * tree-vect-stmts.c (vect_get_store_rhs): New function.
10826         (vectorizable_mask_load_store): Delete.
10827         (vectorizable_call): Return false for masked loads and stores.
10828         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
10829         instead of gimple_assign_rhs1.
10830         (vectorizable_load): Handle IFN_MASK_LOAD.
10831         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
10833 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
10835         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
10836         split out from..,
10837         (vectorizable_mask_load_store): ...here.
10838         (vectorizable_load): ...and here.
10840 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
10842         * tree-vect-stmts.c (vect_build_all_ones_mask)
10843         (vect_build_zero_merge_argument): New functions, split out from...
10844         (vectorizable_load): ...here.
10846 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
10848         * tree-vect-stmts.c (vect_check_store_rhs): New function,
10849         split out from...
10850         (vectorizable_mask_load_store): ...here.
10851         (vectorizable_store): ...and here.
10853 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
10855         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
10856         split out from...
10857         (vectorizable_mask_load_store): ...here.
10859 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
10861         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
10862         (vect_model_store_cost): Take a vec_load_store_type instead of a
10863         vect_def_type.
10864         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
10865         (vect_model_store_cost): Take a vec_load_store_type instead of a
10866         vect_def_type.
10867         (vectorizable_mask_load_store): Update accordingly.
10868         (vectorizable_store): Likewise.
10869         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
10871 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
10873         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
10874         IFN_MASK_LOAD calls here rather than...
10875         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
10877 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
10878             Alan Hayward  <alan.hayward@arm.com>
10879             David Sherwood  <david.sherwood@arm.com>
10881         * expmed.c (extract_bit_field_1): For vector extracts,
10882         fall back to extract_bit_field_as_subreg if vec_extract
10883         isn't available.
10885 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
10886             Alan Hayward  <alan.hayward@arm.com>
10887             David Sherwood  <david.sherwood@arm.com>
10889         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
10890         they are variable or constant sized.
10891         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
10892         slots for constant-sized data.
10894 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
10895             Alan Hayward  <alan.hayward@arm.com>
10896             David Sherwood  <david.sherwood@arm.com>
10898         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
10899         handling COND_EXPRs with boolean comparisons, try to find a better
10900         basis for the mask type than the boolean itself.
10902 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
10904         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
10905         is calculated and how it can be overridden.
10906         * genmodes.c (max_bitsize_mode_any_mode): New variable.
10907         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
10908         if defined.
10909         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
10910         if nonzero.
10912 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
10913             Alan Hayward  <alan.hayward@arm.com>
10914             David Sherwood  <david.sherwood@arm.com>
10916         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
10917         Remove the mode argument.
10918         (aarch64_simd_valid_immediate): Remove the mode and inverse
10919         arguments.
10920         * config/aarch64/iterators.md (bitsize): New iterator.
10921         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
10922         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
10923         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
10924         aarch64_simd_valid_immediate.
10925         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
10926         (aarch64_reg_or_bic_imm): Likewise.
10927         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
10928         with an insn_type enum and msl with a modifier_type enum.
10929         Replace element_width with a scalar_mode.  Change the shift
10930         to unsigned int.  Add constructors for scalar_float_mode and
10931         scalar_int_mode elements.
10932         (aarch64_vect_float_const_representable_p): Delete.
10933         (aarch64_can_const_movi_rtx_p)
10934         (aarch64_simd_scalar_immediate_valid_for_move)
10935         (aarch64_simd_make_constant): Update call to
10936         aarch64_simd_valid_immediate.
10937         (aarch64_advsimd_valid_immediate_hs): New function.
10938         (aarch64_advsimd_valid_immediate): Likewise.
10939         (aarch64_simd_valid_immediate): Remove mode and inverse
10940         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
10941         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
10942         and aarch64_float_const_representable_p on the result.
10943         (aarch64_output_simd_mov_immediate): Remove mode argument.
10944         Update call to aarch64_simd_valid_immediate and use of
10945         simd_immediate_info.
10946         (aarch64_output_scalar_simd_mov_immediate): Update call
10947         accordingly.
10949 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
10950             Alan Hayward  <alan.hayward@arm.com>
10951             David Sherwood  <david.sherwood@arm.com>
10953         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
10954         (mode_nunits): Likewise CONST_MODE_NUNITS.
10955         * machmode.def (ADJUST_NUNITS): Document.
10956         * genmodes.c (mode_data::need_nunits_adj): New field.
10957         (blank_mode): Update accordingly.
10958         (adj_nunits): New variable.
10959         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
10960         parameter.
10961         (emit_mode_size_inline): Set need_bytesize_adj for all modes
10962         listed in adj_nunits.
10963         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
10964         listed in adj_nunits.  Don't emit case statements for such modes.
10965         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
10966         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
10967         nothing if adj_nunits is nonnull.
10968         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
10969         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
10970         (emit_mode_fbit): Update use of print_maybe_const_decl.
10971         (emit_move_size): Likewise.  Treat the array as non-const
10972         if adj_nunits.
10973         (emit_mode_adjustments): Handle adj_nunits.
10975 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
10977         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
10978         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
10979         (VECTOR_MODES): Use it.
10980         (make_vector_modes): Take the prefix as an argument.
10982 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
10983             Alan Hayward  <alan.hayward@arm.com>
10984             David Sherwood  <david.sherwood@arm.com>
10986         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
10987         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
10988         for MODE_VECTOR_BOOL.
10989         * machmode.def (VECTOR_BOOL_MODE): Document.
10990         * genmodes.c (VECTOR_BOOL_MODE): New macro.
10991         (make_vector_bool_mode): New function.
10992         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
10993         MODE_VECTOR_BOOL.
10994         * lto-streamer-in.c (lto_input_mode_table): Likewise.
10995         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
10996         Likewise.
10997         * stor-layout.c (int_mode_for_mode): Likewise.
10998         * tree.c (build_vector_type_for_mode): Likewise.
10999         * varasm.c (output_constant_pool_2): Likewise.
11000         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
11001         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
11002         for MODE_VECTOR_BOOL.
11003         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
11004         of mode class checks.
11005         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
11006         instead of a list of mode class checks.
11007         (expand_vector_scalar_condition): Likewise.
11008         (type_for_widest_vector_mode): Handle BImode as an inner mode.
11010 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11011             Alan Hayward  <alan.hayward@arm.com>
11012             David Sherwood  <david.sherwood@arm.com>
11014         * machmode.h (mode_size): Change from unsigned short to
11015         poly_uint16_pod.
11016         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
11017         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
11018         or if measurement_type is not polynomial.
11019         (fixed_size_mode::includes_p): Check for constant-sized modes.
11020         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
11021         return a poly_uint16 rather than an unsigned short.
11022         (emit_mode_size): Change the type of mode_size from unsigned short
11023         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
11024         (emit_mode_adjustments): Cope with polynomial vector sizes.
11025         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
11026         for GET_MODE_SIZE.
11027         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
11028         for GET_MODE_SIZE.
11029         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
11030         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
11031         * caller-save.c (setup_save_areas): Likewise.
11032         (replace_reg_with_saved_mem): Likewise.
11033         * calls.c (emit_library_call_value_1): Likewise.
11034         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
11035         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
11036         (gen_lowpart_for_combine): Likewise.
11037         * convert.c (convert_to_integer_1): Likewise.
11038         * cse.c (equiv_constant, cse_insn): Likewise.
11039         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
11040         (cselib_subst_to_values): Likewise.
11041         * dce.c (word_dce_process_block): Likewise.
11042         * df-problems.c (df_word_lr_mark_ref): Likewise.
11043         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
11044         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
11045         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
11046         (rtl_for_decl_location): Likewise.
11047         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
11048         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
11049         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
11050         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
11051         (expand_expr_real_1): Likewise.
11052         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
11053         (pad_below): Likewise.
11054         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
11055         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
11056         * ira.c (get_subreg_tracking_sizes): Likewise.
11057         * ira-build.c (ira_create_allocno_objects): Likewise.
11058         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
11059         (ira_sort_regnos_for_alter_reg): Likewise.
11060         * ira-costs.c (record_operand_costs): Likewise.
11061         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
11062         (resolve_simple_move): Likewise.
11063         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
11064         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
11065         (lra_constraints): Likewise.
11066         (CONST_POOL_OK_P): Reject variable-sized modes.
11067         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
11068         (add_pseudo_to_slot, lra_spill): Likewise.
11069         * omp-low.c (omp_clause_aligned_alignment): Likewise.
11070         * optabs-query.c (get_best_extraction_insn): Likewise.
11071         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
11072         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
11073         (expand_mult_highpart, valid_multiword_target_p): Likewise.
11074         * recog.c (offsettable_address_addr_space_p): Likewise.
11075         * regcprop.c (maybe_mode_change): Likewise.
11076         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
11077         * regrename.c (build_def_use): Likewise.
11078         * regstat.c (dump_reg_info): Likewise.
11079         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
11080         (find_reloads, find_reloads_subreg_address): Likewise.
11081         * reload1.c (eliminate_regs_1): Likewise.
11082         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
11083         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
11084         (simplify_binary_operation_1, simplify_subreg): Likewise.
11085         * targhooks.c (default_function_arg_padding): Likewise.
11086         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
11087         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
11088         (verify_gimple_assign_ternary): Likewise.
11089         * tree-inline.c (estimate_move_cost): Likewise.
11090         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
11091         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
11092         (get_address_cost_ainc): Likewise.
11093         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
11094         (vect_supportable_dr_alignment): Likewise.
11095         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11096         (vectorizable_reduction): Likewise.
11097         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
11098         (vectorizable_operation, vectorizable_load): Likewise.
11099         * tree.c (build_same_sized_truth_vector_type): Likewise.
11100         * valtrack.c (cleanup_auto_inc_dec): Likewise.
11101         * var-tracking.c (emit_note_insn_var_location): Likewise.
11102         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
11103         (ADDR_VEC_ALIGN): Likewise.
11105 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11106             Alan Hayward  <alan.hayward@arm.com>
11107             David Sherwood  <david.sherwood@arm.com>
11109         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
11110         unsigned short.
11111         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
11112         or if measurement_type is polynomial.
11113         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
11114         * combine.c (make_extraction): Likewise.
11115         * dse.c (find_shift_sequence): Likewise.
11116         * dwarf2out.c (mem_loc_descriptor): Likewise.
11117         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
11118         (extract_bit_field, extract_low_bits): Likewise.
11119         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
11120         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
11121         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
11122         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
11123         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
11124         * reload.c (find_reloads): Likewise.
11125         * reload1.c (alter_reg): Likewise.
11126         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
11127         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
11128         * tree-if-conv.c (predicate_mem_writes): Likewise.
11129         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
11130         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
11131         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
11132         * valtrack.c (dead_debug_insert_temp): Likewise.
11133         * varasm.c (mergeable_constant_section): Likewise.
11134         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
11136 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11137             Alan Hayward  <alan.hayward@arm.com>
11138             David Sherwood  <david.sherwood@arm.com>
11140         * expr.c (expand_assignment): Cope with polynomial mode sizes
11141         when assigning to a CONCAT.
11143 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11144             Alan Hayward  <alan.hayward@arm.com>
11145             David Sherwood  <david.sherwood@arm.com>
11147         * machmode.h (mode_precision): Change from unsigned short to
11148         poly_uint16_pod.
11149         (mode_to_precision): Return a poly_uint16 rather than an unsigned
11150         short.
11151         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
11152         or if measurement_type is not polynomial.
11153         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
11154         in which the mode is already known to be a scalar_int_mode.
11155         * genmodes.c (emit_mode_precision): Change the type of mode_precision
11156         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
11157         initializer.
11158         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
11159         for GET_MODE_PRECISION.
11160         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
11161         for GET_MODE_PRECISION.
11162         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
11163         as polynomial.
11164         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
11165         (expand_field_assignment, make_extraction): Likewise.
11166         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
11167         (get_last_value): Likewise.
11168         * convert.c (convert_to_integer_1): Likewise.
11169         * cse.c (cse_insn): Likewise.
11170         * expr.c (expand_expr_real_1): Likewise.
11171         * lra-constraints.c (simplify_operand_subreg): Likewise.
11172         * optabs-query.c (can_atomic_load_p): Likewise.
11173         * optabs.c (expand_atomic_load): Likewise.
11174         (expand_atomic_store): Likewise.
11175         * ree.c (combine_reaching_defs): Likewise.
11176         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
11177         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
11178         * tree.h (type_has_mode_precision_p): Likewise.
11179         * ubsan.c (instrument_si_overflow): Likewise.
11181 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11182             Alan Hayward  <alan.hayward@arm.com>
11183             David Sherwood  <david.sherwood@arm.com>
11185         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
11186         polynomial numbers of units.
11187         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
11188         (valid_vector_subparts_p): New function.
11189         (build_vector_type): Remove temporary shim and take the number
11190         of units as a poly_uint64 rather than an int.
11191         (build_opaque_vector_type): Take the number of units as a
11192         poly_uint64 rather than an int.
11193         * tree.c (build_vector_from_ctor): Handle polynomial
11194         TYPE_VECTOR_SUBPARTS.
11195         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
11196         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
11197         (build_vector_from_val): If the number of units is variable,
11198         use build_vec_duplicate_cst for constant operands and
11199         VEC_DUPLICATE_EXPR otherwise.
11200         (make_vector_type): Remove temporary is_constant ().
11201         (build_vector_type, build_opaque_vector_type): Take the number of
11202         units as a poly_uint64 rather than an int.
11203         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
11204         VECTOR_CST_NELTS.
11205         * cfgexpand.c (expand_debug_expr): Likewise.
11206         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
11207         (store_constructor, expand_expr_real_1): Likewise.
11208         (const_scalar_mask_from_tree): Likewise.
11209         * fold-const-call.c (fold_const_reduction): Likewise.
11210         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
11211         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
11212         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
11213         (fold_relational_const): Likewise.
11214         (native_interpret_vector): Likewise.  Change the size from an
11215         int to an unsigned int.
11216         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
11217         TYPE_VECTOR_SUBPARTS.
11218         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
11219         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
11220         duplicating a non-constant operand into a variable-length vector.
11221         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
11222         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
11223         * ipa-icf.c (sem_variable::equals): Likewise.
11224         * match.pd: Likewise.
11225         * omp-simd-clone.c (simd_clone_subparts): Likewise.
11226         * print-tree.c (print_node): Likewise.
11227         * stor-layout.c (layout_type): Likewise.
11228         * targhooks.c (default_builtin_vectorization_cost): Likewise.
11229         * tree-cfg.c (verify_gimple_comparison): Likewise.
11230         (verify_gimple_assign_binary): Likewise.
11231         (verify_gimple_assign_ternary): Likewise.
11232         (verify_gimple_assign_single): Likewise.
11233         * tree-pretty-print.c (dump_generic_node): Likewise.
11234         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
11235         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
11236         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
11237         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
11238         (vect_shift_permute_load_chain): Likewise.
11239         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
11240         (expand_vector_condition, optimize_vector_constructor): Likewise.
11241         (lower_vec_perm, get_compute_type): Likewise.
11242         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11243         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
11244         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
11245         (vect_recog_mask_conversion_pattern): Likewise.
11246         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
11247         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
11248         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
11249         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
11250         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
11251         (vectorizable_shift, vectorizable_operation, vectorizable_store)
11252         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
11253         (supportable_widening_operation): Likewise.
11254         (supportable_narrowing_operation): Likewise.
11255         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
11256         Likewise.
11257         * varasm.c (output_constant): Likewise.
11259 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11260             Alan Hayward  <alan.hayward@arm.com>
11261             David Sherwood  <david.sherwood@arm.com>
11263         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
11264         so that both the length == 3 and length != 3 cases set up their
11265         own permute vectors.  Add comments explaining why we know the
11266         number of elements is constant.
11267         (vect_permute_load_chain): Likewise.
11269 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11270             Alan Hayward  <alan.hayward@arm.com>
11271             David Sherwood  <david.sherwood@arm.com>
11273         * machmode.h (mode_nunits): Change from unsigned char to
11274         poly_uint16_pod.
11275         (ONLY_FIXED_SIZE_MODES): New macro.
11276         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
11277         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
11278         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
11279         New typedefs.
11280         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
11281         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
11282         or if measurement_type is not polynomial.
11283         * genmodes.c (ZERO_COEFFS): New macro.
11284         (emit_mode_nunits_inline): Make mode_nunits_inline return a
11285         poly_uint16.
11286         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
11287         Use ZERO_COEFFS when emitting initializers.
11288         * data-streamer.h (bp_pack_poly_value): New function.
11289         (bp_unpack_poly_value): Likewise.
11290         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
11291         for GET_MODE_NUNITS.
11292         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
11293         for GET_MODE_NUNITS.
11294         * tree.c (make_vector_type): Remove temporary shim and make
11295         the real function take the number of units as a poly_uint64
11296         rather than an int.
11297         (build_vector_type_for_mode): Handle polynomial nunits.
11298         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
11299         * emit-rtl.c (const_vec_series_p_1): Likewise.
11300         (gen_rtx_CONST_VECTOR): Likewise.
11301         * fold-const.c (test_vec_duplicate_folding): Likewise.
11302         * genrecog.c (validate_pattern): Likewise.
11303         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
11304         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
11305         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
11306         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
11307         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
11308         * rtlanal.c (subreg_get_info): Likewise.
11309         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
11310         (vect_grouped_load_supported): Likewise.
11311         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
11312         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
11313         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
11314         (simplify_const_unary_operation, simplify_binary_operation_1)
11315         (simplify_const_binary_operation, simplify_ternary_operation)
11316         (test_vector_ops_duplicate, test_vector_ops): Likewise.
11317         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
11318         instead of CONST_VECTOR_NUNITS.
11319         * varasm.c (output_constant_pool_2): Likewise.
11320         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
11321         explicit-encoded elements in the XVEC for variable-length vectors.
11323 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11325         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
11327 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11328             Alan Hayward  <alan.hayward@arm.com>
11329             David Sherwood  <david.sherwood@arm.com>
11331         * coretypes.h (fixed_size_mode): Declare.
11332         (fixed_size_mode_pod): New typedef.
11333         * builtins.h (target_builtins::x_apply_args_mode)
11334         (target_builtins::x_apply_result_mode): Change type to
11335         fixed_size_mode_pod.
11336         * builtins.c (apply_args_size, apply_result_size, result_vector)
11337         (expand_builtin_apply_args_1, expand_builtin_apply)
11338         (expand_builtin_return): Update accordingly.
11340 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11342         * cse.c (hash_rtx_cb): Hash only the encoded elements.
11343         * cselib.c (cselib_hash_rtx): Likewise.
11344         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
11345         CONST_VECTOR encoding.
11347 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
11348             Jeff Law  <law@redhat.com>
11350         PR target/83641
11351         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
11352         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
11353         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
11354         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
11356         PR target/83641
11357         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
11358         explicitly probe *sp in a noreturn function if there were any callee
11359         register saves or frame pointer is needed.
11361 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
11363         PR debug/83621
11364         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
11365         BLKmode for ternary, binary or unary expressions.
11367         PR debug/83645
11368         * var-tracking.c (delete_vta_debug_insn): New inline function.
11369         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
11370         insns from get_insns () to NULL instead of each bb separately.
11371         Use delete_vta_debug_insn.  No longer static.
11372         (vt_debug_insns_local, variable_tracking_main_1): Adjust
11373         delete_vta_debug_insns callers.
11374         * rtl.h (delete_vta_debug_insns): Declare.
11375         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
11376         instead of variable_tracking_main.
11378 2018-01-03  Martin Sebor  <msebor@redhat.com>
11380         PR tree-optimization/83603
11381         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
11382         arguments past the endof the argument list in functions declared
11383         without a prototype.
11384         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
11385         Avoid checking when arguments are null.
11387 2018-01-03  Martin Sebor  <msebor@redhat.com>
11389         PR c/83559
11390         * doc/extend.texi (attribute const): Fix a typo.
11391         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
11392         issuing -Wsuggest-attribute for void functions.
11394 2018-01-03  Martin Sebor  <msebor@redhat.com>
11396         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
11397         offset_int::from instead of wide_int::to_shwi.
11398         (maybe_diag_overlap): Remove assertion.
11399         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
11400         * gimple-ssa-sprintf.c (format_directive): Same.
11401         (parse_directive): Same.
11402         (sprintf_dom_walker::compute_format_length): Same.
11403         (try_substitute_return_value): Same.
11405 2018-01-03  Jeff Law  <law@redhat.com>
11407         PR middle-end/83654
11408         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
11409         non-constant residual for zero at runtime and avoid probing in
11410         that case.  Reorganize code for trailing problem to mirror handling
11411         of the residual.
11413 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
11415         PR tree-optimization/83501
11416         * tree-ssa-strlen.c (get_string_cst): New.
11417         (handle_char_store): Call get_string_cst.
11419 2018-01-03  Martin Liska  <mliska@suse.cz>
11421         PR tree-optimization/83593
11422         * tree-ssa-strlen.c: Include tree-cfg.h.
11423         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
11424         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
11425         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
11426         to false.
11427         (strlen_dom_walker::before_dom_children): Call
11428         gimple_purge_dead_eh_edges. Dump tranformation with details
11429         dump flags.
11430         (strlen_dom_walker::before_dom_children): Update call by adding
11431         new argument cleanup_eh.
11432         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
11434 2018-01-03  Martin Liska  <mliska@suse.cz>
11436         PR ipa/83549
11437         * cif-code.def (VARIADIC_THUNK): New enum value.
11438         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
11439         thunks.
11441 2018-01-03  Jan Beulich  <jbeulich@suse.com>
11443         * sse.md (mov<mode>_internal): Tighten condition for when to use
11444         vmovdqu<ssescalarsize> for TI and OI modes.
11446 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
11448         Update copyright years.
11450 2018-01-03  Martin Liska  <mliska@suse.cz>
11452         PR ipa/83594
11453         * ipa-visibility.c (function_and_variable_visibility): Skip
11454         functions with noipa attribure.
11456 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
11458         * gcc.c (process_command): Update copyright notice dates.
11459         * gcov-dump.c (print_version): Ditto.
11460         * gcov.c (print_version): Ditto.
11461         * gcov-tool.c (print_version): Ditto.
11462         * gengtype.c (create_file): Ditto.
11463         * doc/cpp.texi: Bump @copying's copyright year.
11464         * doc/cppinternals.texi: Ditto.
11465         * doc/gcc.texi: Ditto.
11466         * doc/gccint.texi: Ditto.
11467         * doc/gcov.texi: Ditto.
11468         * doc/install.texi: Ditto.
11469         * doc/invoke.texi: Ditto.
11471 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11473         * vector-builder.h (vector_builder::m_full_nelts): Change from
11474         unsigned int to poly_uint64.
11475         (vector_builder::full_nelts): Update prototype accordingly.
11476         (vector_builder::new_vector): Likewise.
11477         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
11478         (vector_builder::operator ==): Likewise.
11479         (vector_builder::finalize): Likewise.
11480         * int-vector-builder.h (int_vector_builder::int_vector_builder):
11481         Take the number of elements as a poly_uint64 rather than an
11482         unsigned int.
11483         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
11484         from unsigned int to poly_uint64.
11485         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
11486         (vec_perm_indices::new_vector): Likewise.
11487         (vec_perm_indices::length): Likewise.
11488         (vec_perm_indices::nelts_per_input): Likewise.
11489         (vec_perm_indices::input_nelts): Likewise.
11490         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
11491         number of elements per input as a poly_uint64 rather than an
11492         unsigned int.  Use the original encoding for variable-length
11493         vectors, rather than clamping each individual element.
11494         For the second and subsequent elements in each pattern,
11495         clamp the step and base before clamping their sum.
11496         (vec_perm_indices::series_p): Handle polynomial element counts.
11497         (vec_perm_indices::all_in_range_p): Likewise.
11498         (vec_perm_indices_to_tree): Likewise.
11499         (vec_perm_indices_to_rtx): Likewise.
11500         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
11501         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
11502         (tree_vector_builder::new_binary_operation): Handle polynomial
11503         element counts.  Return false if we need to know the number
11504         of elements at compile time.
11505         * fold-const.c (fold_vec_perm): Punt if the number of elements
11506         isn't known at compile time.
11508 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11510         * vec-perm-indices.h (vec_perm_builder): Change element type
11511         from HOST_WIDE_INT to poly_int64.
11512         (vec_perm_indices::element_type): Update accordingly.
11513         (vec_perm_indices::clamp): Handle polynomial element_types.
11514         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
11515         (vec_perm_indices::all_in_range_p): Likewise.
11516         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
11517         than shwi trees.
11518         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
11519         polynomial vec_perm_indices element types.
11520         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
11521         * fold-const.c (fold_vec_perm): Likewise.
11522         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
11523         * tree-vect-generic.c (lower_vec_perm): Likewise.
11524         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
11525         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
11526         element type to HOST_WIDE_INT.
11528 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11529             Alan Hayward  <alan.hayward@arm.com>
11530             David Sherwood  <david.sherwood@arm.com>
11532         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
11533         rather than an int.  Use plus_constant.
11534         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
11535         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
11537 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11538             Alan Hayward  <alan.hayward@arm.com>
11539             David Sherwood  <david.sherwood@arm.com>
11541         * calls.c (emit_call_1, expand_call): Change struct_value_size from
11542         a HOST_WIDE_INT to a poly_int64.
11544 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11545             Alan Hayward  <alan.hayward@arm.com>
11546             David Sherwood  <david.sherwood@arm.com>
11548         * calls.c (load_register_parameters): Cope with polynomial
11549         mode sizes.  Require a constant size for BLKmode parameters
11550         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
11551         forces a parameter to be padded at the lsb end in order to
11552         fill a complete number of words, require the parameter size
11553         to be ordered wrt UNITS_PER_WORD.
11555 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11556             Alan Hayward  <alan.hayward@arm.com>
11557             David Sherwood  <david.sherwood@arm.com>
11559         * reload1.c (spill_stack_slot_width): Change element type
11560         from unsigned int to poly_uint64_pod.
11561         (alter_reg): Treat mode sizes as polynomial.
11563 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11564             Alan Hayward  <alan.hayward@arm.com>
11565             David Sherwood  <david.sherwood@arm.com>
11567         * reload.c (complex_word_subreg_p): New function.
11568         (reload_inner_reg_of_subreg, push_reload): Use it.
11570 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11571             Alan Hayward  <alan.hayward@arm.com>
11572             David Sherwood  <david.sherwood@arm.com>
11574         * lra-constraints.c (process_alt_operands): Reject matched
11575         operands whose sizes aren't ordered.
11576         (match_reload): Refer to this check here.
11578 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11579             Alan Hayward  <alan.hayward@arm.com>
11580             David Sherwood  <david.sherwood@arm.com>
11582         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
11583         that the mode size is in the set {1, 2, 4, 8, 16}.
11585 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11586             Alan Hayward  <alan.hayward@arm.com>
11587             David Sherwood  <david.sherwood@arm.com>
11589         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
11590         Use plus_constant instead of gen_rtx_PLUS.
11592 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11593             Alan Hayward  <alan.hayward@arm.com>
11594             David Sherwood  <david.sherwood@arm.com>
11596         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
11597         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
11598         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
11599         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
11600         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
11601         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
11602         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
11603         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
11604         * config/i386/i386.c (ix86_push_rounding): ...this new function.
11605         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
11606         a poly_int64.
11607         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
11608         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
11609         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
11610         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
11611         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
11612         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
11613         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
11614         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
11615         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
11616         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
11617         function.
11618         * expr.c (emit_move_resolve_push): Treat the input and result
11619         of PUSH_ROUNDING as a poly_int64.
11620         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
11621         (emit_push_insn): Likewise.
11622         * lra-eliminations.c (mark_not_eliminable): Likewise.
11623         * recog.c (push_operand): Likewise.
11624         * reload1.c (elimination_effects): Likewise.
11625         * rtlanal.c (nonzero_bits1): Likewise.
11626         * calls.c (store_one_arg): Likewise.  Require the padding to be
11627         known at compile time.
11629 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11630             Alan Hayward  <alan.hayward@arm.com>
11631             David Sherwood  <david.sherwood@arm.com>
11633         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
11634         Use plus_constant instead of gen_rtx_PLUS.
11636 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11637             Alan Hayward  <alan.hayward@arm.com>
11638             David Sherwood  <david.sherwood@arm.com>
11640         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
11641         rather than an int.
11643 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11644             Alan Hayward  <alan.hayward@arm.com>
11645             David Sherwood  <david.sherwood@arm.com>
11647         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
11648         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
11649         via stack temporaries.  Treat the mode size as polynomial too.
11651 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11652             Alan Hayward  <alan.hayward@arm.com>
11653             David Sherwood  <david.sherwood@arm.com>
11655         * expr.c (expand_expr_real_2): When handling conversions involving
11656         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
11657         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
11658         as a poly_uint64 too.
11660 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11661             Alan Hayward  <alan.hayward@arm.com>
11662             David Sherwood  <david.sherwood@arm.com>
11664         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
11666 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11667             Alan Hayward  <alan.hayward@arm.com>
11668             David Sherwood  <david.sherwood@arm.com>
11670         * combine.c (can_change_dest_mode): Handle polynomial
11671         REGMODE_NATURAL_SIZE.
11672         * expmed.c (store_bit_field_1): Likewise.
11673         * expr.c (store_constructor): Likewise.
11674         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
11675         and polynomial REGMODE_NATURAL_SIZE.
11676         (gen_lowpart_common): Likewise.
11677         * reginfo.c (record_subregs_of_mode): Likewise.
11678         * rtlanal.c (read_modify_subreg_p): Likewise.
11680 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11681             Alan Hayward  <alan.hayward@arm.com>
11682             David Sherwood  <david.sherwood@arm.com>
11684         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
11685         numbers of elements.
11687 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11688             Alan Hayward  <alan.hayward@arm.com>
11689             David Sherwood  <david.sherwood@arm.com>
11691         * match.pd: Cope with polynomial numbers of vector elements.
11693 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11694             Alan Hayward  <alan.hayward@arm.com>
11695             David Sherwood  <david.sherwood@arm.com>
11697         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
11698         in a POINTER_PLUS_EXPR.
11700 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11701             Alan Hayward  <alan.hayward@arm.com>
11702             David Sherwood  <david.sherwood@arm.com>
11704         * omp-simd-clone.c (simd_clone_subparts): New function.
11705         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
11706         (ipa_simd_modify_function_body): Likewise.
11708 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11709             Alan Hayward  <alan.hayward@arm.com>
11710             David Sherwood  <david.sherwood@arm.com>
11712         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
11713         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
11714         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
11715         (expand_vector_condition, vector_element): Likewise.
11716         (subparts_gt): New function.
11717         (get_compute_type): Use subparts_gt.
11718         (count_type_subparts): Delete.
11719         (expand_vector_operations_1): Use subparts_gt instead of
11720         count_type_subparts.
11722 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11723             Alan Hayward  <alan.hayward@arm.com>
11724             David Sherwood  <david.sherwood@arm.com>
11726         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
11727         (vect_compile_time_alias): ...this new function.  Do the calculation
11728         on poly_ints rather than trees.
11729         (vect_prune_runtime_alias_test_list): Update call accordingly.
11731 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11732             Alan Hayward  <alan.hayward@arm.com>
11733             David Sherwood  <david.sherwood@arm.com>
11735         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
11736         numbers of units.
11737         (vect_schedule_slp_instance): Likewise.
11739 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11740             Alan Hayward  <alan.hayward@arm.com>
11741             David Sherwood  <david.sherwood@arm.com>
11743         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
11744         constant and extern definitions for variable-length vectors.
11745         (vect_get_constant_vectors): Note that the number of units
11746         is known to be constant.
11748 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11749             Alan Hayward  <alan.hayward@arm.com>
11750             David Sherwood  <david.sherwood@arm.com>
11752         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
11753         of units as polynomial.  Choose between WIDE and NARROW based
11754         on multiple_p.
11756 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11757             Alan Hayward  <alan.hayward@arm.com>
11758             David Sherwood  <david.sherwood@arm.com>
11760         * tree-vect-stmts.c (simd_clone_subparts): New function.
11761         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
11763 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11764             Alan Hayward  <alan.hayward@arm.com>
11765             David Sherwood  <david.sherwood@arm.com>
11767         * tree-vect-stmts.c (vectorizable_call): Treat the number of
11768         vectors as polynomial.  Use build_index_vector for
11769         IFN_GOMP_SIMD_LANE.
11771 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11772             Alan Hayward  <alan.hayward@arm.com>
11773             David Sherwood  <david.sherwood@arm.com>
11775         * tree-vect-stmts.c (get_load_store_type): Treat the number of
11776         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
11777         for variable-length vectors.
11778         (vectorizable_mask_load_store): Treat the number of units as
11779         polynomial, asserting that it is constant if the condition has
11780         already been enforced.
11781         (vectorizable_store, vectorizable_load): Likewise.
11783 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11784             Alan Hayward  <alan.hayward@arm.com>
11785             David Sherwood  <david.sherwood@arm.com>
11787         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
11788         of units as polynomial.  Punt if we can't tell at compile time
11789         which vector contains the final result.
11791 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11792             Alan Hayward  <alan.hayward@arm.com>
11793             David Sherwood  <david.sherwood@arm.com>
11795         * tree-vect-loop.c (vectorizable_induction): Treat the number
11796         of units as polynomial.  Punt on SLP inductions.  Use an integer
11797         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
11798         cast of such a series for variable-length floating-point
11799         reductions.
11801 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11802             Alan Hayward  <alan.hayward@arm.com>
11803             David Sherwood  <david.sherwood@arm.com>
11805         * tree.h (build_index_vector): Declare.
11806         * tree.c (build_index_vector): New function.
11807         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
11808         of units as polynomial, forcibly converting it to a constant if
11809         vectorizable_reduction has already enforced the condition.
11810         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
11811         to create a {1,2,3,...} vector.
11812         (vectorizable_reduction): Treat the number of units as polynomial.
11813         Choose vectype_in based on the largest scalar element size rather
11814         than the smallest number of units.  Enforce the restrictions
11815         relied on above.
11817 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11818             Alan Hayward  <alan.hayward@arm.com>
11819             David Sherwood  <david.sherwood@arm.com>
11821         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
11822         number of units as polynomial.
11824 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11825             Alan Hayward  <alan.hayward@arm.com>
11826             David Sherwood  <david.sherwood@arm.com>
11828         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
11829         * target.def (autovectorize_vector_sizes): Return the vector sizes
11830         by pointer, using vector_sizes rather than a bitmask.
11831         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
11832         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
11833         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
11834         Likewise.
11835         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
11836         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
11837         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
11838         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
11839         * omp-general.c (omp_max_vf): Likewise.
11840         * omp-low.c (omp_clause_aligned_alignment): Likewise.
11841         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
11842         * tree-vect-loop.c (vect_analyze_loop): Likewise.
11843         * tree-vect-slp.c (vect_slp_bb): Likewise.
11844         * doc/tm.texi: Regenerate.
11845         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
11846         to a poly_uint64.
11847         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
11848         the vector size as a poly_uint64 rather than an unsigned int.
11849         (current_vector_size): Change from an unsigned int to a poly_uint64.
11850         (get_vectype_for_scalar_type): Update accordingly.
11851         * tree.h (build_truth_vector_type): Take the size and number of
11852         units as a poly_uint64 rather than an unsigned int.
11853         (build_vector_type): Add a temporary overload that takes
11854         the number of units as a poly_uint64 rather than an unsigned int.
11855         * tree.c (make_vector_type): Likewise.
11856         (build_truth_vector_type): Take the number of units as a poly_uint64
11857         rather than an unsigned int.
11859 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11860             Alan Hayward  <alan.hayward@arm.com>
11861             David Sherwood  <david.sherwood@arm.com>
11863         * target.def (get_mask_mode): Take the number of units and length
11864         as poly_uint64s rather than unsigned ints.
11865         * targhooks.h (default_get_mask_mode): Update accordingly.
11866         * targhooks.c (default_get_mask_mode): Likewise.
11867         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
11868         * doc/tm.texi: Regenerate.
11870 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11871             Alan Hayward  <alan.hayward@arm.com>
11872             David Sherwood  <david.sherwood@arm.com>
11874         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
11875         * omp-general.c (omp_max_vf): Likewise.
11876         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
11877         (expand_omp_simd): Handle polynomial safelen.
11878         * omp-low.c (omplow_simd_context): Add a default constructor.
11879         (omplow_simd_context::max_vf): Change from int to poly_uint64.
11880         (lower_rec_simd_input_clauses): Update accordingly.
11881         (lower_rec_input_clauses): Likewise.
11883 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11884             Alan Hayward  <alan.hayward@arm.com>
11885             David Sherwood  <david.sherwood@arm.com>
11887         * tree-vectorizer.h (vect_nunits_for_cost): New function.
11888         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
11889         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
11890         (vect_analyze_slp_cost): Likewise.
11891         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
11892         (vect_model_load_cost): Likewise.
11894 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11895             Alan Hayward  <alan.hayward@arm.com>
11896             David Sherwood  <david.sherwood@arm.com>
11898         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
11899         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
11900         from an unsigned int * to a poly_uint64_pod *.
11901         (calculate_unrolling_factor): New function.
11902         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
11904 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11905             Alan Hayward  <alan.hayward@arm.com>
11906             David Sherwood  <david.sherwood@arm.com>
11908         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
11909         from an unsigned int to a poly_uint64.
11910         (_loop_vec_info::slp_unrolling_factor): Likewise.
11911         (_loop_vec_info::vectorization_factor): Change from an int
11912         to a poly_uint64.
11913         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
11914         (vect_get_num_vectors): New function.
11915         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
11916         (vect_get_num_copies): Use vect_get_num_vectors.
11917         (vect_analyze_data_ref_dependences): Change max_vf from an int *
11918         to an unsigned int *.
11919         (vect_analyze_data_refs): Change min_vf from an int * to a
11920         poly_uint64 *.
11921         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
11922         than an unsigned HOST_WIDE_INT.
11923         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
11924         (vect_analyze_data_ref_dependence): Change max_vf from an int *
11925         to an unsigned int *.
11926         (vect_analyze_data_ref_dependences): Likewise.
11927         (vect_compute_data_ref_alignment): Handle polynomial vf.
11928         (vect_enhance_data_refs_alignment): Likewise.
11929         (vect_prune_runtime_alias_test_list): Likewise.
11930         (vect_shift_permute_load_chain): Likewise.
11931         (vect_supportable_dr_alignment): Likewise.
11932         (dependence_distance_ge_vf): Take the vectorization factor as a
11933         poly_uint64 rather than an unsigned HOST_WIDE_INT.
11934         (vect_analyze_data_refs): Change min_vf from an int * to a
11935         poly_uint64 *.
11936         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
11937         vfm1 as a poly_uint64 rather than an int.  Make the same change
11938         for the returned bound_scalar.
11939         (vect_gen_vector_loop_niters): Handle polynomial vf.
11940         (vect_do_peeling): Likewise.  Update call to
11941         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
11942         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
11943         be constant.
11944         * tree-vect-loop.c (vect_determine_vectorization_factor)
11945         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
11946         (vect_get_known_peeling_cost): Likewise.
11947         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
11948         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
11949         (vect_transform_loop): Likewise.  Use the lowest possible VF when
11950         updating the upper bounds of the loop.
11951         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
11952         rather than an int.
11953         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
11954         polynomial unroll factors.
11955         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
11956         (vect_make_slp_decision): Likewise.
11957         (vect_supported_load_permutation_p): Likewise, and polynomial
11958         vf too.
11959         (vect_analyze_slp_cost): Handle polynomial vf.
11960         (vect_slp_analyze_node_operations): Likewise.
11961         (vect_slp_analyze_bb_1): Likewise.
11962         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
11963         than an unsigned HOST_WIDE_INT.
11964         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
11965         (vectorizable_load): Handle polynomial vf.
11966         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
11967         a poly_uint64.
11968         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
11970 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11971             Alan Hayward  <alan.hayward@arm.com>
11972             David Sherwood  <david.sherwood@arm.com>
11974         * match.pd: Handle bit operations involving three constants
11975         and try to fold one pair.
11977 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
11979         * tree-vect-loop-manip.c: Include gimple-fold.h.
11980         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
11981         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
11982         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
11983         Add a path that uses a step of VF instead of 1, but disable it
11984         for now.
11985         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
11986         and niters_no_overflow parameters.  Update calls to
11987         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
11988         Create a new SSA name if the latter choses to use a ste other
11989         than zero, and return it via niters_vector_mult_vf_var.
11990         * tree-vect-loop.c (vect_transform_loop): Update calls to
11991         vect_do_peeling, vect_gen_vector_loop_niters and
11992         slpeel_make_loop_iterate_ntimes.
11993         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
11994         (vect_gen_vector_loop_niters): Update declarations after above changes.
11996 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
11998         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
11999         128-bit round to integer instructions.
12000         (ceil<mode>2): Likewise.
12001         (btrunc<mode>2): Likewise.
12002         (round<mode>2): Likewise.
12004 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12006         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
12007         unaligned VSX load/store on P8/P9.
12008         (expand_block_clear): Allow the use of unaligned VSX
12009         load/store on P8/P9.
12011 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12013         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
12014         New function.
12015         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
12016         swap associated with both a load and a store.
12018 2018-01-02  Andrew Waterman  <andrew@sifive.com>
12020         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
12021         * config/riscv/riscv.md (clear_cache): Use it.
12023 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
12025         * web.c: Remove out-of-date comment.
12027 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
12029         * expr.c (fixup_args_size_notes): Check that any existing
12030         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
12031         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
12032         (emit_single_push_insn): ...here.
12034 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
12036         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
12037         (const_vector_encoded_nelts): New function.
12038         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
12039         (const_vector_int_elt, const_vector_elt): Declare.
12040         * emit-rtl.c (const_vector_int_elt_1): New function.
12041         (const_vector_elt): Likewise.
12042         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
12043         of CONST_VECTOR_ELT.
12045 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
12047         * expr.c: Include rtx-vector-builder.h.
12048         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
12049         directly on the tree encoding.
12050         (const_vector_from_tree): Likewise.
12051         * optabs.c: Include rtx-vector-builder.h.
12052         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
12053         sequence of "u" values.
12054         * vec-perm-indices.c: Include rtx-vector-builder.h.
12055         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
12056         directly on the vec_perm_indices encoding.
12058 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
12060         * doc/rtl.texi (const_vector): Describe new encoding scheme.
12061         * Makefile.in (OBJS): Add rtx-vector-builder.o.
12062         * rtx-vector-builder.h: New file.
12063         * rtx-vector-builder.c: Likewise.
12064         * rtl.h (rtx_def::u2): Add a const_vector field.
12065         (CONST_VECTOR_NPATTERNS): New macro.
12066         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
12067         (CONST_VECTOR_DUPLICATE_P): Likewise.
12068         (CONST_VECTOR_STEPPED_P): Likewise.
12069         (CONST_VECTOR_ENCODED_ELT): Likewise.
12070         (const_vec_duplicate_p): Check for a duplicated vector encoding.
12071         (unwrap_const_vec_duplicate): Likewise.
12072         (const_vec_series_p): Check for a non-duplicated vector encoding.
12073         Say that the function only returns true for integer vectors.
12074         * emit-rtl.c: Include rtx-vector-builder.h.
12075         (gen_const_vec_duplicate_1): Delete.
12076         (gen_const_vector): Call gen_const_vec_duplicate instead of
12077         gen_const_vec_duplicate_1.
12078         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
12079         (gen_const_vec_duplicate): Use rtx_vector_builder.
12080         (gen_const_vec_series): Likewise.
12081         (gen_rtx_CONST_VECTOR): Likewise.
12082         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
12083         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
12084         Build a new vector rather than modifying a CONST_VECTOR in-place.
12085         (handle_special_swappables): Update call accordingly.
12086         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
12087         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
12088         Build a new vector rather than modifying a CONST_VECTOR in-place.
12089         (handle_special_swappables): Update call accordingly.
12091 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
12093         * simplify-rtx.c (simplify_const_binary_operation): Use
12094         CONST_VECTOR_ELT instead of XVECEXP.
12096 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
12098         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
12099         the selector elements to be different from the data elements
12100         if the selector is a VECTOR_CST.
12101         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
12102         ssizetype for the selector.
12104 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
12106         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
12107         before testing each element individually.
12108         * tree-vect-generic.c (lower_vec_perm): Likewise.
12110 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
12112         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
12113         * selftest-run-tests.c (selftest::run_tests): Call it.
12114         * vector-builder.h (vector_builder::operator ==): New function.
12115         (vector_builder::operator !=): Likewise.
12116         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
12117         (vec_perm_indices::all_from_input_p): New function.
12118         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
12119         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
12120         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
12121         instead of reading the VECTOR_CST directly.  Detect whether both
12122         vector inputs are the same before constructing the vec_perm_indices,
12123         and update the number of inputs argument accordingly.  Use the
12124         utility functions added above.  Only construct sel2 if we need to.
12126 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
12128         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
12129         the broadcast of the low byte.
12130         (expand_mult_highpart): Use an explicit encoding for the permutes.
12131         * optabs-query.c (can_mult_highpart_p): Likewise.
12132         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
12133         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
12134         (vectorizable_bswap): Likewise.
12135         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
12136         explicit encoding for the power-of-2 permutes.
12137         (vect_permute_store_chain): Likewise.
12138         (vect_grouped_load_supported): Likewise.
12139         (vect_permute_load_chain): Likewise.
12141 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
12143         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
12144         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
12145         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
12146         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
12147         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
12148         (vect_gen_perm_mask_any): Likewise.
12150 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
12152         * int-vector-builder.h: New file.
12153         * vec-perm-indices.h: Include int-vector-builder.h.
12154         (vec_perm_indices): Redefine as an int_vector_builder.
12155         (auto_vec_perm_indices): Delete.
12156         (vec_perm_builder): Redefine as a stand-alone class.
12157         (vec_perm_indices::vec_perm_indices): New function.
12158         (vec_perm_indices::clamp): Likewise.
12159         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
12160         (vec_perm_indices::new_vector): New function.
12161         (vec_perm_indices::new_expanded_vector): Update for new
12162         vec_perm_indices class.
12163         (vec_perm_indices::rotate_inputs): New function.
12164         (vec_perm_indices::all_in_range_p): Operate directly on the
12165         encoded form, without computing elided elements.
12166         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
12167         encoding.  Update for new vec_perm_indices class.
12168         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
12169         the given vec_perm_builder.
12170         (expand_vec_perm_var): Update vec_perm_builder constructor.
12171         (expand_mult_highpart): Use vec_perm_builder instead of
12172         auto_vec_perm_indices.
12173         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
12174         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
12175         or double series encoding as appropriate.
12176         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
12177         vec_perm_indices instead of auto_vec_perm_indices.
12178         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
12179         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
12180         (vect_permute_store_chain): Likewise.
12181         (vect_grouped_load_supported): Likewise.
12182         (vect_permute_load_chain): Likewise.
12183         (vect_shift_permute_load_chain): Likewise.
12184         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
12185         (vect_transform_slp_perm_load): Likewise.
12186         (vect_schedule_slp_instance): Likewise.
12187         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
12188         (vectorizable_mask_load_store): Likewise.
12189         (vectorizable_bswap): Likewise.
12190         (vectorizable_store): Likewise.
12191         (vectorizable_load): Likewise.
12192         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
12193         vec_perm_indices instead of auto_vec_perm_indices.  Use
12194         tree_to_vec_perm_builder to read the vector from a tree.
12195         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
12196         vec_perm_builder instead of a vec_perm_indices.
12197         (have_whole_vector_shift): Use vec_perm_builder and
12198         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
12199         truncation to calc_vec_perm_mask_for_shift.
12200         (vect_create_epilog_for_reduction): Likewise.
12201         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
12202         from auto_vec_perm_indices to vec_perm_indices.
12203         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
12204         instead of changing individual elements.
12205         (aarch64_vectorize_vec_perm_const): Use new_vector to install
12206         the vector in d.perm.
12207         * config/arm/arm.c (expand_vec_perm_d::perm): Change
12208         from auto_vec_perm_indices to vec_perm_indices.
12209         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
12210         instead of changing individual elements.
12211         (arm_vectorize_vec_perm_const): Use new_vector to install
12212         the vector in d.perm.
12213         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
12214         Update vec_perm_builder constructor.
12215         (rs6000_expand_interleave): Likewise.
12216         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
12217         (rs6000_expand_interleave): Likewise.
12219 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
12221         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
12222         to qimode could truncate the indices.
12223         * optabs.c (expand_vec_perm_var): Likewise.
12225 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
12227         * Makefile.in (OBJS): Add vec-perm-indices.o.
12228         * vec-perm-indices.h: New file.
12229         * vec-perm-indices.c: Likewise.
12230         * target.h (vec_perm_indices): Replace with a forward class
12231         declaration.
12232         (auto_vec_perm_indices): Move to vec-perm-indices.h.
12233         * optabs.h: Include vec-perm-indices.h.
12234         (expand_vec_perm): Delete.
12235         (selector_fits_mode_p, expand_vec_perm_var): Declare.
12236         (expand_vec_perm_const): Declare.
12237         * target.def (vec_perm_const_ok): Replace with...
12238         (vec_perm_const): ...this new hook.
12239         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
12240         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
12241         * doc/tm.texi: Regenerate.
12242         * optabs.def (vec_perm_const): Delete.
12243         * doc/md.texi (vec_perm_const): Likewise.
12244         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
12245         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
12246         expand_vec_perm for constant permutation vectors.  Assert that
12247         the mode of variable permutation vectors is the integer equivalent
12248         of the mode that is being permuted.
12249         * optabs-query.h (selector_fits_mode_p): Declare.
12250         * optabs-query.c: Include vec-perm-indices.h.
12251         (selector_fits_mode_p): New function.
12252         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
12253         is defined, instead of checking whether the vec_perm_const_optab
12254         exists.  Use targetm.vectorize.vec_perm_const instead of
12255         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
12256         fit in the vector mode before using a variable permute.
12257         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
12258         vec_perm_indices instead of an rtx.
12259         (expand_vec_perm): Replace with...
12260         (expand_vec_perm_const): ...this new function.  Take the selector
12261         as a vec_perm_indices rather than an rtx.  Also take the mode of
12262         the selector.  Update call to shift_amt_for_vec_perm_mask.
12263         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
12264         Use vec_perm_indices::new_expanded_vector to expand the original
12265         selector into bytes.  Check whether the indices fit in the vector
12266         mode before using a variable permute.
12267         (expand_vec_perm_var): Make global.
12268         (expand_mult_highpart): Use expand_vec_perm_const.
12269         * fold-const.c: Includes vec-perm-indices.h.
12270         * tree-ssa-forwprop.c: Likewise.
12271         * tree-vect-data-refs.c: Likewise.
12272         * tree-vect-generic.c: Likewise.
12273         * tree-vect-loop.c: Likewise.
12274         * tree-vect-slp.c: Likewise.
12275         * tree-vect-stmts.c: Likewise.
12276         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
12277         Delete.
12278         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
12279         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
12280         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
12281         (aarch64_vectorize_vec_perm_const): ...this new function.
12282         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
12283         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
12284         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
12285         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
12286         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
12287         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
12288         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
12289         into...
12290         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
12291         check for NEON modes.
12292         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
12293         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
12294         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
12295         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
12296         into...
12297         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
12298         the old VEC_PERM_CONST conditions.
12299         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
12300         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
12301         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
12302         (ia64_vectorize_vec_perm_const_ok): Merge into...
12303         (ia64_vectorize_vec_perm_const): ...this new function.
12304         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
12305         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
12306         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
12307         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
12308         * config/mips/mips.c (mips_expand_vec_perm_const)
12309         (mips_vectorize_vec_perm_const_ok): Merge into...
12310         (mips_vectorize_vec_perm_const): ...this new function.
12311         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
12312         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
12313         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
12314         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
12315         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
12316         (rs6000_expand_vec_perm_const): Delete.
12317         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
12318         Delete.
12319         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
12320         (altivec_expand_vec_perm_const_le): Take each operand individually.
12321         Operate on constant selectors rather than rtxes.
12322         (altivec_expand_vec_perm_const): Likewise.  Update call to
12323         altivec_expand_vec_perm_const_le.
12324         (rs6000_expand_vec_perm_const): Delete.
12325         (rs6000_vectorize_vec_perm_const_ok): Delete.
12326         (rs6000_vectorize_vec_perm_const): New function.
12327         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
12328         an element count and rtx array.
12329         (rs6000_expand_extract_even): Update call accordingly.
12330         (rs6000_expand_interleave): Likewise.
12331         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
12332         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
12333         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
12334         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
12335         (rs6000_expand_vec_perm_const): Delete.
12336         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
12337         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
12338         (altivec_expand_vec_perm_const_le): Take each operand individually.
12339         Operate on constant selectors rather than rtxes.
12340         (altivec_expand_vec_perm_const): Likewise.  Update call to
12341         altivec_expand_vec_perm_const_le.
12342         (rs6000_expand_vec_perm_const): Delete.
12343         (rs6000_vectorize_vec_perm_const_ok): Delete.
12344         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
12345         reference to the SPE evmerge intructions.
12346         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
12347         an element count and rtx array.
12348         (rs6000_expand_extract_even): Update call accordingly.
12349         (rs6000_expand_interleave): Likewise.
12350         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
12351         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
12352         new function.
12353         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
12355 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
12357         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
12358         vector mode and that that mode matches the mode of the data
12359         being permuted.
12360         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
12361         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
12362         directly using expand_vec_perm_1 when forcing selectors into
12363         registers.
12364         (expand_vec_perm_var): New function, split out from expand_vec_perm.
12366 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
12368         * optabs-query.h (can_vec_perm_p): Delete.
12369         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
12370         * optabs-query.c (can_vec_perm_p): Split into...
12371         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
12372         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
12373         particular selector is valid.
12374         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
12375         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
12376         (vect_grouped_load_supported): Likewise.
12377         (vect_shift_permute_load_chain): Likewise.
12378         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
12379         (vect_transform_slp_perm_load): Likewise.
12380         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
12381         (vectorizable_bswap): Likewise.
12382         (vect_gen_perm_mask_checked): Likewise.
12383         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
12384         implementations of variable permutation vectors into account
12385         when deciding which selector to use.
12386         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
12387         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
12388         with a false third argument.
12389         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
12390         to test whether the constant selector is valid and can_vec_perm_var_p
12391         to test whether a variable selector is valid.
12393 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
12395         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
12396         * optabs-query.c (can_vec_perm_p): Likewise.
12397         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
12398         instead of vec_perm_indices.
12399         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
12400         (vect_gen_perm_mask_checked): Likewise,
12401         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
12402         (vect_gen_perm_mask_checked): Likewise,
12404 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
12406         * optabs-query.h (qimode_for_vec_perm): Declare.
12407         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
12408         (qimode_for_vec_perm): ...this new function.
12409         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
12411 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
12413         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
12414         does not have a conditional at the top.
12416 2018-01-02  Richard Biener  <rguenther@suse.de>
12418         * ipa-inline.c (big_speedup_p): Fix expression.
12420 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
12422         PR target/81616
12423         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
12424         for generic 4->6.
12426 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
12428         PR target/81616
12429         Generic tuning.
12430         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
12431         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
12432         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
12433         cond_taken_branch_cost 3->4.
12435 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
12437         PR tree-optimization/83581
12438         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
12439         TODO_cleanup_cfg if any changes have been made.
12441         PR middle-end/83608
12442         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
12443         convert_modes if target mode has the right side, but different mode
12444         class.
12446         PR middle-end/83609
12447         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
12448         last argument when extracting from CONCAT.  If either from_real or
12449         from_imag is NULL, use expansion through memory.  If result is not
12450         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
12451         the parts directly to inner mode, if even that fails, use expansion
12452         through memory.
12454         PR middle-end/83623
12455         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
12456         check for bswap in mode rather than HImode and use that in expand_unop
12457         too.
12459 Copyright (C) 2018 Free Software Foundation, Inc.
12461 Copying and distribution of this file, with or without modification,
12462 are permitted in any medium without royalty provided the copyright
12463 notice and this notice are preserved.