2018-11-12 Richard Biener <rguenther@suse.de>
[official-gcc.git] / gcc / ChangeLog
blob47571e4390a06e799d51713571f7bdb211c1777c
1 2018-11-12  Richard Biener  <rguenther@suse.de>
3         * tree-vrp.h (value_range_base::symbolic_p,
4         value_range_base::constant_p, value_range_base::zero_p,
5         value_range_base::singleton_p): Move from value_range.
6         (value_range::dump): Add.
7         * gimple-ssa-evrp-analyze.c
8         (evrp_range_analyzer::record_ranges_from_phis): Use set_varying.
9         * ipa-cp.c (ipcp_vr_lattice::print): Use dump_value_range.
10         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
11         Use set_varying.
12         * tree-vrp.c (value_range::symbolic_p): Move to value_range_base.
13         (value_range::constant_p): Likewise.
14         (value_range::singleton_p): Likewise.
15         (value_range_base::dump): Add.
16         (set_value_range_to_undefined): Remove.
17         (set_value_range_to_varying): Likewise.
18         (range_int_cst_p): Take value_range_base argument.
19         (range_int_cst_singleton_p): Likewise.
20         (value_range_constant_singleton): Likewise.
21         (vrp_set_zero_nonzero_bits): Likewise.
22         (extract_range_from_multiplicative_op): Use set_varying.
23         (extract_range_from_binary_expr_1): Likewise. Use set_undefined.
24         (extract_range_from_unary_expr): Likewise.
25         (dump_value_range_base): Change to overload of dump_value_range.
26         (vrp_prop::vrp_initialize): Use set_varying and set_undefined.
27         (vrp_prop::visit_stmt): Likewise.
28         (value_range::intersect_helper): Likewise.
29         (value_range::union_helper): Likewise.
30         (determine_value_range_1): Likewise.
32 2018-11-12  Richard Biener  <rguenther@suse.de>
34         * tree-vrp.c (set_value_range_to_nonnull): Clear equiv.
35         (set_value_range_to_null): Likewise.
36         * vr-values.c (vr_values::extract_range_from_comparison):
37         Clear equiv for constant singleton ranges.
39 2018-11-12 Wei Xiao <wei3.xiao@intel.com>
41         * config/i386/sse.md: Combine VFIXUPIMM* patterns
42         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
43         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
44         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Remove.
45         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
46         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
47         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Remove.
49 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
51         PR c/69502
52         * doc/extend.texi (Common Type Attributes): For the align type
53         attribute, copy language about decreasing alignment from the
54         corresponding variable attribute.
56 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
58         * config/csky/csky.md (*fpuv2_nmulsf3_1, *fpuv2_nmuldf3_1): Handle
59         -frounding-math.
61 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
63         PR c++/43105
64         * doc/invoke.texi (C++ Dialect Options): Add warning about mixing
65         -frtti and -fno-rtti code.
67 2018-11-11  Sandra Loosemore  <sandra@codesourcery.com>
69         PR c/26366
70         * doc/extend.texi (Other Builtins): Document probability associated
71         with __builtin_expect.
73 2018-11-11  Uros Bizjak  <ubizjak@gmail.com>
75         PR target/87928
76         * config/i386/i386.h (STACK_BOUNDARY): Use TARGET_64BIT_MS_ABI
77         instead of (TARGET_64BIT && ix86_abi == MS_ABI).
78         * config/i386/darwin.h (STACK_BOUNDARY): Ditto.
79         * config/i386/cygming.h (STACK_BOUNDARY): Remove.
81 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
83         * config/csky/csky-linux-elf.h (CC1_SPEC): Support -profile.
85 2018-11-11  Xianmiao Qu  <xianmiao_qu@c-sky.com>
87         * config/csky/csky.h (ASM_PREFERRED_EH_DATA_FORMAT): Define.
89 2018-11-11  Richard Biener  <rguenther@suse.de>
91         * tree-vrp.h (class value_range_base): New base class for
92         value_range containing all but the m_equiv member.
93         (dump_value_range_base): Add.
94         (range_includes_zero_p): Work on value_range_base.
95         * tree-vrp.c (value_range_base::set): Split out base handling
96         from...
97         (value_range::set): this.
98         (value_range::set_equiv): New.
99         (value_range_base::value_range_base): New constructors.
100         (value_range_base::check): Split out base handling from...
101         (value_range::check): this.
102         (value_range::equal_p): Refactor in terms of
103         ignore_equivs_equal_p which is now member of the base.
104         (value_range_base::set_undefined): New.
105         (value_range_base::set_varying): Likewise.
106         (value_range_base::dump):Split out base handling from...
107         (value_range::dump): this.
108         (value_range_base::set_and_canonicalize): Split out base handling
109         from...
110         (value_range::set_and_canonicalize): this.
111         (value_range_base::union_): New.
112         * ipa-prop.h (struct ipa_jump_func): Use value_range_base *
113         for m_vr.
114         * ipa-cp.c (class ipcp_vr_lattice): Use value_range_base
115         instead of value_range everywhere.
116         (ipcp_vr_lattice::print): Use dump_value_range_base.
117         (ipcp_vr_lattice::meet_with): Adjust.
118         (ipcp_vr_lattice::meet_with_1): Likewise.
119         (ipa_vr_operation_and_type_effects): Likewise.
120         (propagate_vr_across_jump_function): Likewise.
121         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Likewise.
122         (ipa_get_value_range): Likewise.
123         (ipa_set_jfunc_vr): Likewise.
124         (ipa_compute_jump_functions_for_edge): Likewise.
126 2018-11-10  Sandra Loosemore  <sandra@codesourcery.com>
128         PR middle-end/65703
129         * doc/invoke.texi (Optimize Options): Add @opindex entries
130         for the positive forms of -fno-xxx and -mno-xxx options
131         that were lacking them.
133 2018-11-10  Segher Boessenkool  <segher@kernel.crashing.org>
135         * combine.c (make_more_copies): Only make an intermediate copy if the
136         dest of a move is a pseudo.
138 2018-11-09  Maya Rashish  <coypu@sdf.org>
140         PR target/87221
141         * config/netbsd-elf.h (NETBSD_STARTFILE_SPEC): Use crtbeginS.o for PIE.
142         (NETBSD_ENDFILE_SPEC): Use crtendS.o for PIE.
144 2018-11-09  Sandra Loosemore  <sandra@codesourcery.com>
146         PR driver/41179
147         PR middle-end/65703
148         * doc/invoke.texi (Optimize Options): Clarify default behavior
149         for -fno-toplevel-reorder, -fno-defer-pop, and -fno-branch-count-reg.
151 2018-11-09  Bernd Edlinger  <bernd.edlinger@hotmail.de>
153         PR tree-optimization/87940
154         * expr.c (string_constant): Don't strip NOPS in subexpressions.
155         Fold PLUS_EXPR correctly.
157 2018-11-09  Ilya Leoshkevich  <iii@linux.ibm.com>
159         PR target/87762
160         * config/s390/s390.c (s390_safe_relative_long_p): New function.
161         (annotate_constant_pool_refs): Skip insns which support
162         relative addressing.
163         (annotate_constant_pool_refs_1): New helper function.
164         (find_constant_pool_ref): Skip insns which support relative
165         addression.
166         (find_constant_pool_ref_1): New helper function.
167         (replace_constant_pool_ref): Skip insns which support
168         relative addressing.
169         (replace_constant_pool_ref_1): New helper function.
170         (s390_mainpool_start): Adapt to the new signature.
171         (s390_mainpool_finish): Likewise.
172         (s390_chunkify_start): Likewise.
173         (s390_chunkify_finish): Likewise.
174         (pass_s390_early_mach::execute): Likewise.
175         (s390_prologue_plus_offset): Likewise.
176         (s390_emit_prologue): Likewise.
177         (s390_emit_epilogue): Likewise.
179 2018-11-09  Jakub Jelinek  <jakub@redhat.com>
181         * gimplify.c (gimplify_scan_omp_clauses): Call sorry_at for valid
182         but unsupported lastprivate with conditional modifier.
184 2018-11-09  Jeff Law  <law@redhat.com>
186         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): Handle
187         unused argument better.  Add gcc_unreachable to silence warning.
189 2018-11-09  Martin Sebor  <msebor@redhat.com>
191         PR middle-end/81824
192         * attribs.c (has_attribute): New helper function.
193         (decls_mismatched_attributes, maybe_diag_alias_attributes): Same.
194         * attribs.h (decls_mismatched_attributes): Declare.
195         * cgraphunit.c (handle_alias_pairs): Call maybe_diag_alias_attributes.
196         (maybe_diag_incompatible_alias): Use OPT_Wattribute_alias_.
197         * common.opt (-Wattribute-alias): Take an argument.
198         (-Wno-attribute-alias): New option.
199         * doc/extend.texi (Common Function Attributes): Document copy.
200         (Common Variable Attributes): Same.
201         * doc/invoke.texi (-Wmissing-attributes): Document enhancement.
202         (-Wattribute-alias): Document new option argument.
204 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
206         * config/arm/parsecpu.awk (/alias/): Tighten invisible alias
207         matching criteria.  Remove unused array initializer.
209 2018-11-09  Bill Schmidt  <wschmidt@linux.ibm.com>
210             Jinsong Ji  <jji@us.ibm.com>
212         * config/rs6000/xmmintrin.h (_mm_cvtss_si32): Fix incorrect
213         constraints by introducing a new temporary.
214         (_mm_cvtss_si64): Likewise.
216 2018-11-09  Martin Liska  <mliska@suse.cz>
218         * common.opt: Add -fipa-stack-alignment flag.
219         * doc/invoke.texi: Document it.
220         * final.c (rest_of_clean_state): Guard stack
221         shrinking with flag.
223 2018-11-09  Martin Liska  <mliska@suse.cz>
225         * cgraph.h (ipa_discover_readonly_nonaddressable_vars): Rename
226         to ...
227         (ipa_discover_variable_flags): ... this.
228         * common.opt: Come up with new flag -fipa-reference-addressable.
229         * doc/invoke.texi: Document it.
230         * ipa-reference.c (propagate): Call the renamed fn.
231         * ipa-visibility.c (whole_program_function_and_variable_visibility):
232         Likewise.
233         * ipa.c (ipa_discover_readonly_nonaddressable_vars): Renamed to
234         ...
235         (ipa_discover_variable_flags): ... this.  Discover
236         non-addressable variables only with the newly added flag.
237         * opts.c: Enable the newly added flag with -O1 and higher
238         optimization level.
240 2018-11-09  David Malcolm  <dmalcolm@redhat.com>
242         * json.cc (selftest::test_writing_literals): Fix comment.
244 2018-11-09  Martin Liska  <mliska@suse.cz>
246         * config/aarch64/aarch64.c (aarch64_parse_arch): Do not copy
247         string to a stack buffer.
248         (aarch64_parse_cpu): Likewise.
249         (aarch64_parse_tune): Likewise.
251 2018-11-09  Richard Biener  <rguenther@suse.de>
253         PR tree-optimization/87953
254         * tree-vect-loop.c (vectorizable_reduction): For analysis
255         always pass ops[0] to vectorizable_condition.
257 2018-11-09  Stafford Horne  <shorne@gmail.com>
258             Richard Henderson  <rth@twiddle.net>
259             Joel Sherrill  <joel@rtems.org>
261         * common/config/or1k/or1k-common.c: New file.
262         * config/or1k/*: New.
263         * config.gcc (or1k*-*-*): New.
264         * configure.ac (or1k*-*-*): New test for openrisc tls.
265         * configure: Regenerated.
266         * doc/install.texi: Document OpenRISC triplets.
267         * doc/invoke.texi: Document OpenRISC arguments.
268         * doc/md.texi: Document OpenRISC.
270 2018-11-09  Richard Earnshaw  <rearnsha@arm.com>
272         * config/arm/arm-cpus.in (arm7tdmi): Add an alias for arm7tdmi-s.
273         (arm7tdmi-s): Delete CPU.
274         (arm710t): Add aliases for arm720t and arm740t.
275         (arm720t, arm740t): Delete CPUs.
276         (arm920t): Add aliases for arm920, arm922t and arm940t.
277         (arm920, arm922t, arm940t): Delete CPUs.
278         (arm10tdmi): Add alias for arm1020t.
279         (arm1020t): Delete CPU.
280         (arm9e): Add aliases for arm946e-s, arm966e-s and arm968e-s.
281         (arm946e-s, arm966e-s, arm968e-s): Delete CPUs.
282         (arm10e): Add aliases for arm1020e and arm1022e.
283         (arm1020e, arm1022e): Delete CPU.
284         * config/arm/arm.md (generic_sched): Remove entries that are now
285         handled by aliases.
286         (generic_vfp): Likewise.
287         * config/arm/arm1020e.md: Simplify tuning selection based on alias
288         changes.
289         * config/arm/arm-tune.md: Regenerated.
290         * config/arm/arm-tables.opt: Regenerated.
292 2018-11-09  Richard Biener  <rguenther@suse.de>
294         PR tree-optimization/87621
295         * tree-vect-loop.c (vectorizable_reduction): Handle reduction
296         op with only phi inputs.
297         * tree-ssa-loop-ch.c: Include tree-ssa-sccvn.h.
298         (ch_base::copy_headers): Run CSE on copied loop headers.
299         (pass_ch_vect::process_loop_p): Simplify.
301 2018-11-09  Alexandre Oliva <oliva@adacore.com>
303         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Adjust
304         for non-w64 x86_64 biarch.
306 2018-11-09  Alexandre Oliva <aoliva@redhat.com>
308         PR rtl-optimization/86438
309         * compare-elim.c (try_eliminate_compare): Use SET_SRC instead
310         of in_b for the compare if in_b is SET_DEST.
312         PR target/87793
313         * config/i386/i386.c (ix86_const_not_ok_for_debug_p): Reject
314         non-toplevel UNSPEC.
316 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
318         * tree-vrp.c (value_range::check): Do not access internals
319         directly.
320         (value_range::singleton_p): Same.
321         (value_range::type): Same.
322         (vrp_finalize): Use value_range API.
324 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
326         * tree-vrp.c (may_contain_p): Do not access m_min/m_max directly.
328 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
330         * vr-values.c (vr_values::get_value_range): Use value_range API
331         instead of piecing together ranges.
332         (vr_values::update_value_range): Same.
334 2018-11-08  Aldy Hernandez  <aldyh@redhat.com>
336         * gimple-fold.c (size_must_be_zero_p): Use value_range API instead
337         of performing ad-hoc calculations.
338         * tree-ssanames.c (set_range_info): New overloaded function
339         accepting value_range &.
340         (get_range_info): Same.
341         * tree-ssanames.h (set_range_info_raw): Remove.
342         (set_range_info): New prototype.
343         (get_range_info): Same.
344         * tree-vrp.h (value_range::null_p): Rename to zero_p.
345         * tree-vrp.c (value_range::null_p): Same.
347 2018-11-09  Jan Hubicka  <jh@suse.cz>
349         * tree.c (fld_type_variant_equal_p): Test user align flag.
350         (flt_type_variant): Copy user align flag.
351         (fld_incomplete_type_of): Clear it.
353 2018-11-09  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
355         * config/arm/neon.md (div<mode>3): New pattern.
357 2018-11-08  Andi Kleen  <ak@linux.intel.com>
359         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET): New.
360         (OPTION_MASK_ISA_PTWRITE_UNSET): New.
361         (ix86_handle_option): Handle OPT_mptwrite.
362         * config/i386/cpuid.h (bit_PTWRITE): Add.
363         * config/i386/driver-i386.c (host_detect_local_cpu): Detect ptwrite.
364         * config/i386/i386-builtin.def (BDESC): Add ptwrite32/64.
365         * config/i386/i386-c.c (ix86_target_macros_internal): Define __PTWRITE__.
366         * config/i386/i386.c (ix86_target_string): Handle ptwrite.
367         (ix86_option_override_internal): Handle PTA_PTWRITE.
368         (ix86_valid_target_attribute_inner_p): Define ptwrite.
369         (def_builtin2): Force UINT64 to be 64bit only.
370         * config/i386/i386.h (TARGET_PTWRITE): Add.
371         (TARGET_PTWRITE_P): Add.
372         (PTA_PTWRITE): Add.
373         * config/i386/i386.md: Define ptwrite.
374         * config/i386/i386.opt: Add -mptwrite.
375         * config/i386/immintrin.h (_ptwrite64): Add.
376         (_ptwrite32): Add
377         * doc/extend.texi: Document __builtin_ia32_ptwrite*.
378         * doc/invoke.texi: Document -mptwrite.
380 2018-11-08  Peter Bergner  <bergner@linux.ibm.com>
382         PR rtl-optimization/87600
383         * cfgexpand.c (expand_asm_stmt): Catch illegal asm constraint usage.
384         * lra-constraints.c (process_alt_operands): Skip illegal hard
385         register usage.  Prefer reloading non hard register operands.
387 2018-11-08  Sandra Loosemore  <sandra@codesourcery.com>
389         PR other/36572
390         * doc/invoke.texi (Optimize Options): Clarify default behavior
391         for -fno-sched-interblock and -fno-sched-spec.
393 2018-11-08  Roman Geissler  <roman.geissler@amadeus.com>
395         * collect2.c (linker_select):  Add USE_LLD_LD.
396         (ld_suffixes): Add ld.lld.
397         (main): Handle -fuse-ld=lld.
398         * common.opt (-fuse-ld=lld): New option.
399         * doc/invoke.texi (-fuse-ld=lld): Document.
400         * opts.c (common_handle_option): Handle OPT_fuse_ld_lld.
402 2018-11-08  Paul Koning  <ni1d@arrl.net>
404         * config/pdp11/constraints.md: Add "Z" series constraints for use
405         with pre-dec and post-inc addressing.
406         * config/pdp11/pdp11-protos.m (expand_block_move): Delete.
407         (pdp11_expand_operands): Add int argument (word count).
408         (pdp11_sp_frame_offset): Delete.
409         (pdp11_cmp_length): New function.
410         (pushpop_regeq): New function.
411         * config/pdp11/pdp11.c (TARGET_STACK_PROTECT_RUNTIME_ENABLED_P):
412         Add hook.
413         (pdp11_expand_prologue, pdp11_expand_epilogue): Rewrite for new
414         frame layout.
415         (pdp11_initial_elimination_offset): Ditto.
416         (pdp11_expand_operands): Add word count argument.  Bugfixes.
417         (output_move_multiple): Change how pointer adjustment is done.
418         (pdp11_gen_int_label): Correct format.
419         (output_ascii): Ditto.
420         (pdp11_asm_output_var): Add code for DEC assembler case.
421         (pdp11_asm_print_operand): Bugfix for CONST_DOUBLE holding integer
422         value.
423         (legitimate_const_double_p): Ditto.
424         (pdp11_register_move_cost): Adjust for new register classes.
425         (pdp11_regno_reg_class): Ditto.
426         (expand_block_move): Delete.
427         (pushpop_regeq): New function.
428         (pdp11_legitimate_address_p): Bugfix in check for constant
429         offset.
430         (pdp11_sp_frame_offset): Delete.
431         (pdp11_reg_save_size): New helper function for new frame layout.
432         (output_addr_const_pdp11): Remove CONST_DOUBLE case.
433         (pdp11_expand_shift): Bugfix in check for constant shift count.
434         (pdp11_shift_length): Ditto.
435         (pdp11_assemble_shift): Copy input to pdp11_expand_operands.
436         (pdp11_cmp_length): New function.
437         * config/pdp11/pdp11.h (TARGET_CPU_CPP_BUILTINS): Add macros for
438         some compile options.
439         (FIXED_REGISTERS): Remove HARD_FRAME_POINTER_REGNUM.
440         (CALL_USED_REGISTERS): Ditto.
441         (ELIMINABLE_REGS): Ditto.
442         (REGISTER_NAMES): Ditto.
443         (reg_class): Add classes NOTR0_REG through NOTSP_REG for use by Z
444         constraints.
445         (REG_CLASS_NAMES): Ditto.
446         (REG_CLASS_CONTENTS): Ditto.  Also remove
447         HARD_FRAME_POINTER_REGNUM.
448         (CPU_REG_CLASS): New macro.
449         (CLASS_MAX_NREGS): Adjust for new register classes.
450         (FUNCTION_PROFILER): Make no-op.
451         (may_call_alloca): Remove unused declaration.
452         (ASM_OUTPUT_ALIGN): Add workaround for PR87795.
453         (ASM_OUTPUT_SKIP): Fix format.
454         * config/pdp11/pdp11.md (unspecv): Add UNSPECV_MOVMEM.
455         (HARD_FRAME_POINTER_REGNUM): Remove.
456         (return): Delete.
457         (*rts): Rename.  Remove epilogue related checks.
458         (cmpsi, cmpdi): New insn.
459         (cbranch<mode>4): Change to apply to SI and DI modes as well.
460         (mov<mode>): Change constraints to enforce that push/pop
461         destination cannot use the same register as source.
462         (*mov<mode><cc_cc>): Ditto.
463         (movmemhi, movmemhi1, movmemhi_nocc): Change to expand block move
464         at assembly output rather than as RTL expander.
465         (zero_extendqihi2): Bugfix in check for same registers.
466         (adddi3_nocc): Bugfix in check for constant operand.
467         (addsi3_nocc): Ditto.
468         (subdi3_nocc): Ditto.
469         (subsi3_nocc): Ditto.
470         (negdi2_nocc): Copy input to pdp11_expand_operands.
471         (negsi2_nocc): Ditto.
472         (bswap2_nocc): Ditto.
473         * config/pdp11/pdp11.opt (mlra): Fix documentation.
474         * config/pdp11/t-pdp11: Use -Os.
476 2018-11-08  Richard Earnshaw  <rearnsha@arm.com>
478         * config/arm/parsecpu.awk (/alias/): New parsing rule.
479         (/begin cpu/): Check that the cpu name hasn't been previously defined.
480         (gen_comm_data): Print out CPU alias tables.
481         (check_cpu): Match aliases when checking the CPU name.
482         * config/arm/arm-protos.h (cpu_alias): New structure.
483         (cpu_option): Add entry for aliases.
484         * config/arm/arm-cpus.in (strongarm): Add aliases for strongarm110
485         strongarm1100 and strongarm1110.
486         (strongarm110, strongarm1100, strongarm1110): Delete CPU entries.
487         (config/arm/arm-generic.md): Remove redundant references to
488         strongarm110, strongarm1100 and strongarm1110.
489         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
490         Scan aliases for additional hints.
491         (arm_parse_cpu_option_name): Also match a cpu name against the list
492         of aliases.
493         * config/arm/arm-tables.opt: Regenerated.
494         * config/arm/arm-tune.md: Regenerated.
496 2018-11-08  Jakub Jelinek  <jakub@redhat.com>
498         * builtin-types.def (BT_FN_VOID_BOOL, BT_FN_VOID_SIZE_SIZE_PTR,
499         BT_FN_UINT_UINT_PTR_PTR, BT_FN_UINT_OMPFN_PTR_UINT_UINT,
500         BT_FN_BOOL_UINT_LONGPTR_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
501         BT_FN_BOOL_UINT_ULLPTR_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR,
502         BT_FN_BOOL_LONG_LONG_LONG_LONG_LONG_LONGPTR_LONGPTR_PTR_PTR,
503         BT_FN_BOOL_BOOL_ULL_ULL_ULL_LONG_ULL_ULLPTR_ULLPTR_PTR_PTR): New.
504         * gengtype.c (open_base_files): Add omp-general.h.
505         * gimple.c (gimple_build_omp_critical):
506         (gimple_build_omp_taskgroup): Add CLAUSES argument.  Call
507         gimple_omp_taskgroup_set_clauses.
508         (gimple_build_omp_atomic_load): Add mo argument, call
509         gimple_omp_atomic_set_memory_order.
510         (gimple_build_omp_atomic_store): Likewise.
511         (gimple_copy): Adjust handling of GIMPLE_OMP_TASKGROUP.
512         * gimple.def (GIMPLE_OMP_TASKGROUP): Use GSS_OMP_SINGLE_LAYOUT
513         instead of GSS_OMP.
514         (GIMPLE_OMP_TEAMS): Use GSS_OMP_PARALLEL_LAYOUT instead
515         of GSS_OMP_SINGLE_LAYOUT, adjust comments.
516         * gimple.h (enum gf_mask): Add GF_OMP_TEAMS_HOST, GF_OMP_TASK_TASKWAIT
517         and GF_OMP_ATOMIC_MEMORY_ORDER.  Remove GF_OMP_ATOMIC_SEQ_CST, use
518         different value for GF_OMP_ATOMIC_NEED_VALUE.
519         (struct gimple_statement_omp_taskreg): Add GIMPLE_OMP_TEAMS to
520         comments.
521         (struct gimple_statement_omp_single_layout): And remove here.
522         (struct gomp_teams): Inherit from gimple_statement_omp_taskreg rather
523         than gimple_statement_omp_single_layout.
524         (is_a_helper <gimple_statement_omp_taskreg *>::test): Allow
525         GIMPLE_OMP_TEAMS.
526         (is_a_helper <const gimple_statement_omp_taskreg *>::test): Likewise.
527         (gimple_omp_subcode): Formatting fix.
528         (gimple_omp_teams_child_fn, gimple_omp_teams_child_fn_ptr,
529         gimple_omp_teams_set_child_fn, gimple_omp_teams_data_arg,
530         gimple_omp_teams_data_arg_ptr, gimple_omp_teams_set_data_arg,
531         gimple_omp_teams_host, gimple_omp_teams_set_host,
532         gimple_omp_task_taskwait_p, gimple_omp_task_set_taskwait_p,
533         gimple_omp_taskgroup_clauses, gimple_omp_taskgroup_clauses_ptr,
534         gimple_omp_taskgroup_set_clauses): New inline functions.
535         (gimple_build_omp_atomic_load): Add enum omp_memory_order argument.
536         (gimple_build_omp_atomic_store): Likewise.
537         (gimple_omp_atomic_seq_cst_p): Remove.
538         (gimple_omp_atomic_memory_order): New function.
539         (gimple_omp_atomic_set_seq_cst): Remove.
540         (gimple_omp_atomic_set_memory_order): New function.
541         (gimple_build_omp_taskgroup): Add clauses argument.
542         * gimple-pretty-print.c (dump_gimple_omp_taskgroup): New function.
543         (dump_gimple_omp_task): Print taskwait with depend clauses.
544         (dump_gimple_omp_atomic_load, dump_gimple_omp_atomic_store): Use
545         dump_omp_atomic_memory_order.
546         (pp_gimple_stmt_1): Handle GIMPLE_OMP_TASKGROUP.
547         * gimplify.c (enum gimplify_omp_var_data): Add GOVD_MAP_ALLOC_ONLY,
548         GOVD_MAP_FROM_ONLY and GOVD_NONTEMPORAL.
549         (enum omp_region_type): Reserve bits 1 and 2 for auxiliary flags,
550         renumber values of most of ORT_* enumerators, add ORT_HOST_TEAMS,
551         ORT_COMBINED_HOST_TEAMS, ORT_TASKGROUP, ORT_TASKLOOP and
552         ORT_UNTIED_TASKLOOP enumerators.
553         (enum gimplify_defaultmap_kind): New.
554         (struct gimplify_omp_ctx): Remove target_map_scalars_firstprivate and
555         target_map_pointers_as_0len_arrays members, add defaultmap.
556         (new_omp_context): Initialize defaultmap member.
557         (gimple_add_tmp_var): Handle ORT_TASKGROUP like ORT_WORKSHARE.
558         (maybe_fold_stmt): Don't fold even in host teams regions.
559         (omp_firstprivatize_variable): Handle ORT_TASKGROUP like
560         ORT_WORKSHARE.  Test ctx->defaultmap[GDMK_SCALAR] instead of
561         ctx->omp_firstprivatize_variable.
562         (omp_add_variable): Don't add private/firstprivate for VLAs in
563         ORT_TASKGROUP.
564         (omp_default_clause): Print "taskloop" rather than "task" if
565         ORT_*TASKLOOP.
566         (omp_notice_variable): Handle ORT_TASKGROUP like ORT_WORKSHARE.
567         Handle new defaultmap clause kinds.
568         (omp_is_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.  Allow simd
569         iterator to be lastprivate or private.  Fix up diagnostics if linear
570         is used on collapse>1 simd iterator.
571         (omp_check_private): Handle ORT_TASKGROUP like ORT_WORKSHARE.
572         (gimplify_omp_depend): New function.
573         (gimplify_scan_omp_clauses): Add shared clause on parallel for
574         combined parallel master taskloop{, simd} if taskloop has
575         firstprivate, lastprivate or reduction clause.  Handle
576         OMP_CLAUSE_REDUCTION_TASK diagnostics.  Adjust tests for
577         ORT_COMBINED_TEAMS.  Gimplify depend clauses with iterators.  Handle
578         cancel and simd OMP_CLAUSE_IF_MODIFIERs.  Handle
579         OMP_CLAUSE_NONTEMPORAL.  Handle new defaultmap clause kinds.  Handle
580         OMP_CLAUSE_{TASK,IN}_REDUCTION.  Diagnose invalid conditional
581         lastprivate.
582         (gimplify_adjust_omp_clauses_1): Ignore GOVD_NONTEMPORAL.  Handle
583         GOVD_MAP_ALLOC_ONLY and GOVD_MAP_FROM_ONLY.  
584         (gimplify_adjust_omp_clauses): Handle OMP_CLAUSE_NONTEMPORAL.  Handle
585         OMP_CLAUSE_{TASK,IN}_REDUCTION.
586         (gimplify_omp_task): Handle taskwait with depend clauses.
587         (gimplify_omp_for): Add shared clause on parallel for combined
588         parallel master taskloop{, simd} if taskloop has firstprivate,
589         lastprivate or reduction clause.  Use ORT_TASKLOOP or
590         ORT_UNTIED_TASKLOOP instead of ORT_TASK or ORT_UNTIED_TASK.  Adjust
591         tests for ORT_COMBINED_TEAMS.  Handle C++ range for loops with
592         NULL TREE_PURPOSE in OMP_FOR_ORIG_DECLS.  Firstprivatize
593         __for_end and __for_range temporaries on OMP_PARALLEL for
594         distribute parallel for{, simd}.  Move OMP_CLAUSE_REDUCTION
595         and OMP_CLAUSE_IN_REDUCTION from taskloop to the task construct
596         sandwiched in between two taskloops.
597         (computable_teams_clause): Test ctx->defaultmap[GDMK_SCALAR]
598         instead of ctx->omp_firstprivatize_variable.
599         (gimplify_omp_workshare): Set ort to ORT_HOST_TEAMS or
600         ORT_COMBINED_HOST_TEAMS if not inside of target construct.  If
601         host teams, use gimplify_and_return_first etc. for body like
602         for target or target data constructs, and at the end call
603         gimple_omp_teams_set_host on the GIMPLE_OMP_TEAMS object.
604         (gimplify_omp_atomic): Use OMP_ATOMIC_MEMORY_ORDER instead
605         of OMP_ATOMIC_SEQ_CST, pass it as new argument to
606         gimple_build_omp_atomic_load and gimple_build_omp_atomic_store, remove
607         gimple_omp_atomic_set_seq_cst calls.
608         (gimplify_expr) <case OMP_TASKGROUP>: Move handling into a separate
609         case, handle taskgroup clauses.
610         * lto-streamer-out.c (hash_tree): Handle
611         OMP_CLAUSE_{TASK,IN}_REDUCTION.
612         * Makefile.in (GTFILES): Add omp-general.h.
613         * omp-builtins.def (BUILT_IN_GOMP_TASKWAIT_DEPEND,
614         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_START,
615         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_START,
616         BUILT_IN_GOMP_LOOP_START, BUILT_IN_GOMP_LOOP_ORDERED_START,
617         BUILT_IN_GOMP_LOOP_DOACROSS_START,
618         BUILT_IN_GOMP_LOOP_NONMONOTONIC_RUNTIME_NEXT,
619         BUILT_IN_GOMP_LOOP_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
620         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_START,
621         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_START,
622         BUILT_IN_GOMP_LOOP_ULL_START, BUILT_IN_GOMP_LOOP_ULL_ORDERED_START,
623         BUILT_IN_GOMP_LOOP_ULL_DOACROSS_START,
624         BUILT_IN_GOMP_LOOP_ULL_NONMONOTONIC_RUNTIME_NEXT,
625         BUILT_IN_GOMP_LOOP_ULL_MAYBE_NONMONOTONIC_RUNTIME_NEXT,
626         BUILT_IN_GOMP_PARALLEL_LOOP_NONMONOTONIC_RUNTIME,
627         BUILT_IN_GOMP_PARALLEL_LOOP_MAYBE_NONMONOTONIC_RUNTIME,
628         BUILT_IN_GOMP_PARALLEL_REDUCTIONS, BUILT_IN_GOMP_SECTIONS2_START,
629         BUILT_IN_GOMP_TEAMS_REG, BUILT_IN_GOMP_TASKGROUP_REDUCTION_REGISTER,
630         BUILT_IN_GOMP_TASKGROUP_REDUCTION_UNREGISTER,
631         BUILT_IN_GOMP_TASK_REDUCTION_REMAP,
632         BUILT_IN_GOMP_WORKSHARE_TASK_REDUCTION_UNREGISTER): New builtins.
633         * omp-expand.c (workshare_safe_to_combine_p): Return false for
634         non-worksharing loops.
635         (omp_adjust_chunk_size): Don't adjust anything if chunk_size is zero.
636         (determine_parallel_type): Don't combine parallel with worksharing
637         which has _reductemp_ clause.
638         (expand_parallel_call): Emit the GOMP_*nonmonotonic_runtime* or
639         GOMP_*maybe_nonmonotonic_runtime* builtins instead of GOMP_*runtime*
640         if there is nonmonotonic modifier or if there is no modifier and no
641         ordered clause.  For dynamic and guided schedule without monotonic
642         and nonmonotonic modifier, default to nonmonotonic.
643         (expand_omp_for): Likewise.  Adjust expand_omp_for_generic caller, use
644         GOMP_loop{,_ull}{,_ordered,_doacross}_start builtins if there are
645         task reductions.
646         (expand_task_call): Add GOMP_TASK_FLAG_REDUCTION flag to flags if
647         there are any reduction clauses.
648         (expand_taskwait_call): New function.
649         (expand_teams_call): New function.
650         (expand_omp_taskreg): Allow GIMPLE_OMP_TEAMS and call
651         expand_teams_call for it.  Formatting fix.  Handle taskwait with
652         depend clauses.
653         (expand_omp_for_generic): Add SCHED_ARG argument.  Handle expansion
654         of worksharing loops with task reductions.
655         (expand_omp_for_static_nochunk, expand_omp_for_static_chunk): Handle
656         expansion of worksharing loops with task reductions.
657         (expand_omp_sections): Handle expansion of sections with task
658         reductions.
659         (expand_omp_synch): For host teams call expand_omp_taskreg.
660         (omp_memory_order_to_memmodel): New function.
661         (expand_omp_atomic_load, expand_omp_atomic_store,
662         expand_omp_atomic_fetch_op): Use it and gimple_omp_atomic_memory_order
663         instead of gimple_omp_atomic_seq_cst_p.
664         (build_omp_regions_1, omp_make_gimple_edges): Treat taskwait with
665         depend clauses as a standalone directive.
666         * omp-general.c (enum omp_requires): New variable.
667         (omp_extract_for_data): Initialize have_reductemp member.  Allow
668         NE_EXPR even in OpenMP loops, transform them into LT_EXPR or
669         GT_EXPR loops depending on incr sign.  Formatting fixes.
670         * omp-general.h (struct omp_for_data): Add have_reductemp member.
671         (enum omp_requires): New enum.
672         (omp_requires_mask): Declare.
673         * omp-grid.c (grid_eliminate_combined_simd_part): Formatting fix.
674         Fix comment typos.
675         * omp-low.c (struct omp_context): Add task_reductions and
676         task_reduction_map fields.
677         (is_host_teams_ctx): New function.
678         (is_taskreg_ctx): Return true also if is_host_teams_ctx.
679         (use_pointer_for_field): Use is_global_var instead of
680         TREE_STATIC || DECL_EXTERNAL, and apply only if not privatized
681         in outer contexts.
682         (build_outer_var_ref): Ignore taskgroup outer contexts.
683         (delete_omp_context): Release task_reductions and task_reduction_map.
684         (scan_sharing_clauses): Don't add any fields for reduction clause on
685         taskloop.  Handle OMP_CLAUSE__REDUCTEMP_.  Handle
686         OMP_CLAUSE_{IN,TASK}_REDUCTION and OMP_CLAUSE_REDUCTION with task
687         modifier.  Don't ignore shared clauses in is_host_teams_ctx contexts.
688         Handle OMP_CLAUSE_NONTEMPORAL.
689         (add_taskreg_looptemp_clauses): Add OMP_CLAUSE__REDUCTEMP_ clause if
690         needed.
691         (scan_omp_parallel): Add _reductemp_ clause if there are any reduction
692         clauses with task modifier.
693         (scan_omp_task): Handle taskwait with depend clauses.
694         (finish_taskreg_scan): Move field corresponding to _reductemp_ clause
695         first.  Move also OMP_CLAUSE__REDUCTEMP_ clause in front if present.
696         Handle GIMPLE_OMP_TEAMS like GIMPLE_OMP_PARALLEL.
697         (scan_omp_for): Fix comment formatting.
698         (scan_omp_teams): Handle host teams constructs.
699         (check_omp_nesting_restrictions): Allow teams with no outer
700         OpenMP context.  Adjust diagnostics for teams strictly nested into
701         some explicit OpenMP construct other than target.  Allow OpenMP atomics
702         inside of simd regions.
703         (scan_omp_1_stmt): Call scan_sharing_clauses for taskgroups.
704         (scan_omp_1_stmt) <case GIMPLE_OMP_TEAMS>: Temporarily bump
705         taskreg_nesting_level while scanning host teams construct.
706         (task_reduction_read): New function.
707         (lower_rec_input_clauses): Handle OMP_CLAUSE_REDUCTION on taskloop
708         construct.  Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE__REDUCTEMP_
709         clauses.  Handle OMP_CLAUSE_REDUCTION with task modifier.  Remove
710         second argument create_tmp_var if it is NULL.  Don't ignore shared
711         clauses in is_host_teams_ctx contexts.  Handle
712         OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE on OMP_CLAUSE_FIRSTPRIVATE
713         clauses.
714         (lower_reduction_clauses): Ignore reduction clauses with task
715         modifier.  Remove second argument create_tmp_var if it is NULL.
716         Initialize OMP_ATOMIC_MEMORY_ORDER to relaxed.
717         (lower_send_clauses): Ignore reduction clauses with task modifier.
718         Handle OMP_CLAUSE__REDUCTEMP_.  Don't send anything for
719         OMP_CLAUSE_REDUCTION on taskloop.  Handle OMP_CLAUSE_IN_REDUCTION.
720         (maybe_add_implicit_barrier_cancel): Add OMP_RETURN argument, don't
721         rely that it is the last stmt in body so far.  Ignore outer taskgroup
722         contexts.
723         (omp_task_reductions_find_first, omp_task_reduction_iterate,
724         lower_omp_task_reductions): New functions.
725         (lower_omp_sections): Handle reduction clauses with taskgroup
726         modifiers.  Adjust maybe_add_implicit_barrier_cancel caller.
727         (lower_omp_single): Adjust maybe_add_implicit_barrier_cancel caller.
728         (lower_omp_for): Likewise.  Handle reduction clauses with taskgroup
729         modifiers.
730         (lower_omp_taskgroup): Handle taskgroup reductions.
731         (create_task_copyfn): Copy over OMP_CLAUSE__REDUCTEMP_ pointer.
732         Handle OMP_CLAUSE_IN_REDUCTION and OMP_CLAUSE_REDUCTION clauses.
733         (lower_depend_clauses): If there are any
734         OMP_CLAUSE_DEPEND_DEPOBJ or OMP_CLAUSE_DEPEND_MUTEXINOUTSET
735         depend clauses, use a new array format.  If OMP_CLAUSE_DEPEND_LAST is
736         seen, assume lowering is done already and return early.  Set kind
737         on artificial depend clause to OMP_CLAUSE_DEPEND_LAST.
738         (lower_omp_taskreg): Handle reduction clauses with task modifier on
739         parallel construct.  Handle reduction clause on taskloop construct.
740         Handle taskwait with depend clauses.
741         (lower_omp_1): Use lower_omp_taskreg instead of lower_omp_teams
742         for host teams constructs.
743         * tree.c (omp_clause_num_ops): Add in_reduction, task_reduction,
744         nontemporal and _reductemp_ clause entries.
745         (omp_clause_code_name): Likewise.
746         (walk_tree_1): Handle OMP_CLAUSE_{IN,TASK}_REDUCTION,
747         OMP_CLAUSE_NONTEMPORAL and OMP_CLAUSE__REDUCTEMP_.
748         * tree-core.h (enum omp_clause_code): Add
749         OMP_CLAUSE_{{IN,TASK}_REDUCTION,NONTEMPORAL,_REDUCTEMP_}.
750         (enum omp_clause_defaultmap_kind, enum omp_memory_order): New.
751         (struct tree_base): Add omp_atomic_memory_order field into union.
752         Remove OMP_ATOMIC_SEQ_CST comment.
753         (enum omp_clause_depend_kind): Add OMP_CLAUSE_DEPEND_MUTEXINOUTSET
754         and OMP_CLAUSE_DEPEND_DEPOBJ.
755         (struct tree_omp_clause): Add subcode.defaultmap_kind.
756         * tree.def (OMP_TASKGROUP): Add another operand, move next to other
757         OpenMP constructs with body and clauses operands.
758         * tree.h (OMP_BODY): Use OMP_MASTER instead of OMP_TASKGROUP.
759         (OMP_CLAUSES): Use OMP_TASKGROUP instead of OMP_SINGLE.
760         (OMP_TASKGROUP_CLAUSES): Define.
761         (OMP_CLAUSE_DECL): Use OMP_CLAUSE__REDUCTEMP_ instead of
762         OMP_CLAUSE__LOOPTEMP_.
763         (OMP_ATOMIC_SEQ_CST): Remove.
764         (OMP_ATOMIC_MEMORY_ORDER, OMP_CLAUSE_FIRSTPRIVATE_NO_REFERENCE,
765         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL): Define.
766         (OMP_CLAUSE_REDUCTION_CODE, OMP_CLAUSE_REDUCTION_INIT,
767         OMP_CLAUSE_REDUCTION_MERGE, OMP_CLAUSE_REDUCTION_PLACEHOLDER,
768         OMP_CLAUSE_REDUCTION_DECL_PLACEHOLDER,
769         OMP_CLAUSE_REDUCTION_OMP_ORIG_REF): Handle
770         OMP_CLAUSE_{,IN_,TASK_}REDUCTION.
771         (OMP_CLAUSE_REDUCTION_TASK, OMP_CLAUSE_REDUCTION_INSCAN,
772         OMP_CLAUSE_DEFAULTMAP_KIND, OMP_CLAUSE_DEFAULTMAP_CATEGORY,
773         OMP_CLAUSE_DEFAULTMAP_BEHAVIOR, OMP_CLAUSE_DEFAULTMAP_SET_KIND):
774         Define.
775         * tree-inline.c (remap_gimple_stmt): Remap taskgroup clauses.
776         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
777         OMP_CLAUSE__REDUCTEMP_, OMP_CLAUSE_NONTEMPORAL.
778         (convert_local_omp_clauses): Likewise.  Remove useless test.
779         * tree-parloops.c (create_call_for_reduction_1): Pass
780         OMP_MEMORY_ORDER_RELAXED as new argument to
781         dump_gimple_omp_atomic_load and dump_gimple_omp_atomic_store.
782         * tree-pretty-print.c (dump_omp_iterators): New function.
783         (dump_omp_clause): Handle OMP_CLAUSE__REDUCTEMP_,
784         OMP_CLAUSE_NONTEMPORAL, OMP_CLAUSE_{TASK,IN}_REDUCTION.  Print
785         reduction modifiers.  Handle OMP_CLAUSE_DEPEND_DEPOBJ and
786         OMP_CLAUSE_DEPEND_MUTEXINOUTSET.  Print iterators in depend clauses.
787         Print __internal__ for OMP_CLAUSE_DEPEND_LAST.  Handle cancel and
788         simd OMP_CLAUSE_IF_MODIFIERs.  Handle new kinds of
789         OMP_CLAUSE_DEFAULTMAP. Print conditional: for
790         OMP_CLAUSE_LASTPRIVATE_CONDITIONAL.
791         (dump_omp_atomic_memory_order): New function.
792         (dump_generic_node): Use it.  Print taskgroup clauses.  Print
793         taskwait with depend clauses.
794         * tree-pretty-print.h (dump_omp_atomic_memory_order): Declare.
795         * tree-streamer-in.c (unpack_ts_omp_clause_value_fields):
796         Handle OMP_CLAUSE_{TASK,IN}_REDUCTION.
797         * tree-streamer-out.c (pack_ts_omp_clause_value_fields,
798         write_ts_omp_clause_tree_pointers): Likewise.
800 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
802         PR ipa/86395
803         * doc/invoke.texi (-fdump-ipa-): Document the "-optimized",
804         "-missed", "-note", and "-all" sub-options.
805         * ipa-inline.c (caller_growth_limits): Port from fprintf to dump
806         API.
807         (can_early_inline_edge_p): Likewise.
808         (want_early_inline_function_p): Likewise.
809         (want_inline_self_recursive_call_p): Likewise.
810         (recursive_inlining): Likewise.
811         (inline_small_functions): Likewise.
812         (flatten_function): Likewise.
813         (ipa_inline): Likewise.
814         (inline_always_inline_functions): Likewise.
815         (early_inline_small_functions): Likewise.
816         (early_inliner): Likewise.
817         * tree-inline.c (expand_call_inline): Likewise.
819 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
821         * pretty-print.c (pp_format): Handle %f.
822         (selftest::test_pp_format): Add test of %f.
823         * pretty-print.h (pp_double): New macro.
825 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
827         * dump-context.h (ASSERT_IS_CGRAPH_NODE): New macro.
828         * dumpfile.c (make_item_for_dump_cgraph_node): Move to before...
829         (dump_pretty_printer::decode_format): Implement "%C" for
830         cgraph_node *.
831         (selftest::test_capture_of_dump_calls): Rename "where" to
832         "stmt_loc".  Convert test_decl to a function decl and set its
833         location.  Add a symbol_table_test RAII instance and a
834         cgraph_node, using it to test "%C" and dump_symtab_node.
836 2018-11-08  Eric Botcazou  <ebotcazou@adacore.com>
838         PR middle-end/87916
839         * cgraphclones.c (duplicate_thunk_for_node): Also set DECL_IGNORED_P.
841 2018-11-08  David Malcolm  <dmalcolm@redhat.com>
843         * cgraph.c: Include "selftest.h".
844         (saved_symtab): New variable.
845         (selftest::symbol_table_test::symbol_table_test): New ctor.
846         (selftest::symbol_table_test::~symbol_table_test): New dtor.
847         (selftest::test_symbol_table_test): New test.
848         (selftest::cgraph_c_tests): New.
849         * cgraph.h (saved_symtab): New decl.
850         (selftest::symbol_table_test): New class.
851         * selftest-run-tests.c (selftest::run_tests): Call
852         selftest::cgraph_c_tests.
853         * selftest.h (selftest::cgraph_c_tests): New decl.
855 2018-11-08  Richard Biener  <rguenther@suse.de>
857         * tree-data-ref.h (lambda_int): New typedef.
858         (lambda_vector_gcd): Adjust.
859         (lambda_vector_new): Likewise.
860         (lambda_matrix_new): Likewise.
861         * tree-data-ref.c  (print_lambda_vector): Adjust.
863 2018-11-08  Richard Biener  <rguenther@suse.de>
865         PR tree-optimization/87929
866         * tree-complex.c (expand_complex_comparison): Clean EH.
868 2018-11-08  Martin Liska  <mliska@suse.cz>
870         * doc/extend.texi: Reword.
871         * predict.c (expr_expected_value_1): Likewise.
873 2018-11-08  Richard Biener  <rguenther@suse.de>
875         PR tree-optimization/87913
876         * tree-ssa-phiopt.c (minmax_replacement): Turn EQ/NE compares
877         of extreme values to ordered comparisons.
879 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
881         PR middle-end/42726
882         * doc/invoke.texi (Code Gen Options): Clarify -fno-common behavior.
884 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
886         * doc/invoke.texi: Remove leading dash from @opindex entries
887         throughout the file.
889 2018-11-07  Sandra Loosemore  <sandra@codesourcery.com>
891         PR driver/80828
892         * doc/invoke.texi (Option Summary): Add -e and --entry.
893         (Link Options): Likewise.
895 2018-11-07  Nathan Sidwell  <nathan@acm.org>
897         PR 87926
898         * Makefile.in (bitmap.o-warn): Add -Wno-error to unbreak
899         --disable-checking bootstrap.
901 2018-11-07  Hafiz Abid Qadeer  <abidh@codesourcery.com>
903         * configure: Regenerated.
905 2018-11-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
907         PR c/87691
908         * stor-layout.c (compute_record_mode): Set TYPE_MODE of UNION_TYPE
909         to the mode of the widest field iff the widest field has mode class
910         MODE_INT, or MODE_PARTIAL_INT and the union would be passed by
911         reference.
913 2018-11-07  Nikolai Merinov  <n.merinov@inango-systems.com>
915         * common.opt: Add -Wattribute-warning.
916         * doc/invoke.texi: Add documentation for -Wno-attribute-warning.
917         * expr.c (expand_expr_real_1): Add new attribute to warning_at
918         call to allow user configure behavior of "warning" attribute.
920 2018-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
922         * target.def: Put @: after every vs., e.g., and i.e. where it is
923         followed by whitespace.
924         * doc/extend.texi: Ditto.
925         * doc/fragments.texi: Ditto.
926         * doc/gimple.texi: Ditto.
927         * doc/implement-c.texi: Ditto.
928         * doc/install.texi: Ditto.
929         * doc/invoke.texi: Ditto.
930         * doc/md.texi: Ditto.
931         * doc/plugins.texi: Ditto.
932         * doc/rtl.texi: Ditto.
933         * doc/sourcebuild.texi: Ditto.
934         * doc/tm.texi.in: Ditto.
935         * doc/ux.texi: Ditto.
936         * doc/tm.texi: Regenerate.
938 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
940         * config/arm/arm-cpus.in (ares): New entry.
941         * config/arm/arm-tables.opt: Regenerate.
942         * config/arm/arm-tune.md: Likewise.
943         * doc/invoke.texi (ARM Options): Document ares.
945 2018-11-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
947         * config/aarch64/aarch64-cores.def (ares): Define.
948         * config/aarch64/aarch64-tune.md: Regenerate.
949         * doc/invoke.texi (AArch64 Options): Document ares value for mtune.
951 2018-11-07  Jan Hubicka  <jh@suse.cz>
953         * tree.c (fld_incomplete_type_of): Clear TREE_ADDRESSABLE.
954         (free_lang_data_in_decl): Set TREE_ADDRESSABLE for public vars and
955         functions; clear TYPE_DECL_SUPPRESS_DEBUG and DECL_MODE for
956         TYPE_DECL.
958 2018-11-07  Richard Biener  <rguenther@suse.de>
960         PR tree-optimization/87914
961         * tree-vect-loop.c (vect_is_simple_reduction): Improve detection
962         of nested cycles.
963         (vectorizable_reduction): Handle shifts and rotates by dispatching
964         to vectorizable_shift.
965         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Handle
966         in-loop uses of vect_nested_cycle defs.  Merge cycle and internal
967         def cases.
968         (vectorizable_shift): Export and handle being called as
969         vect_nested_cycle.
970         (vect_analyze_stmt): Call vectorizable_shift after
971         vectorizable_reduction.
972         * tree-vectorizer.h (vectorizable_shift): Declare.
974 2018-11-07  Jan Hubicka  <jh@suse.cz>
976         * ipa-devirt.c (odr_types_equivalent_p): Expect constants
977         than const decls in TREE_VALUE of enum.
978         (dump_type_inheritance_graph): Improve duplicate dumping.
979         (free_enum_values): New.
980         (build_type_inheritance_graph): Use it.
981         * tree.c (free_lang_data_in_type): Free TYPE_VALUES of enums
982         which are not main variants or not ODR types.
983         (verify_type_variant): Expect variants to have no TYPE_VALUES.
985 2018-11-07  Richard Biener  <rguenther@suse.de>
987         * ipa-inline.c (want_inline_small_function_p): Compute
988         big_speedup_p lazily and last.
990 2018-11-07  Jan Hubicka  <jh@suse.cz>
992         * tree.c (fld_type_variant_equal_p): Skip TYPE_ALIGN check when
993         building incomplete variant of complete type.
994         (fld_type_variant): Do not copy TYPE_ALIGN when building incomplete
995         variant of complete type.
997 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
999         * config/mips/mips.c: Fix typo in documentation of
1000         mips_loongson_ext2_prefetch_cookie.
1001         (mips_option_override): fix brain twister logical.
1002         * config/mips/mips.h: Fix typo in documentation of
1003         ISA_HAS_CTZ_CTO and define pattern.
1004         * config/mips/mips.md (prefetch): Hoist EXT2 above
1005         the 2EF/EXT block.
1006         (prefetch_indexed): Hoist EXT2 above the EXT block.
1008 2018-11-07  Jan Hubicka  <jh@suse.cz>
1010         * tree.c (free_lang_data_in_type): Add fld parameter; simplify
1011         return and parameter types of function and method types.
1012         (free_lang_data_in_cgraph): Update.
1014 2018-11-07  Martin Liska  <mliska@suse.cz>
1016         PR rtl-optimization/87868
1017         * postreload-gcse.c (eliminate_partially_redundant_load): Set
1018         threshold to max_count if we would overflow.
1019         * profile-count.h: Make max_count a public constant.
1021 2018-11-07  Martin Liska  <mliska@suse.cz>
1023         * mem-stats.h: Fix GNU coding style.
1025 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1027         * config/mips/gs264e.md: New.
1028         * config/mips/mips-cpus.def: Define gs264e.
1029         * config/mips/mips-tables.opt: Regenerate.
1030         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
1031         gs264e.
1032         (mips_issue_rate): Add support for gs264e.
1033         (mips_multipass_dfa_lookahead): Likewise.
1034         * config/mips/mips.h: Define TARGET_GS264E and TUNE_GS264E.
1035         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs264e.
1036         (MIPS_ASE_MSA_SPEC): New.
1037         (BASE_DRIVER_SELF_SPECS): march=gs264e implies -mmsa.
1038         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS264E.
1039         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS264E.
1040         * config/mips/mips.md: Include gs264e.md.
1041         (processor): Add gs264e.
1042         * config/mips/mips.opt (MSA): Use Mask instead of Var.
1043         * doc/invoke.texi: Add gs264e to supported architectures.
1045 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1047         * config/mips/gs464e.md: New.
1048         * config/mips/mips-cpus.def: Define gs464e.
1049         * config/mips/mips-tables.opt: Regenerate.
1050         * config/mips/mips.c (mips_rtx_cost_data): Add DEFAULT_COSTS for
1051         gs464e.
1052         (mips_issue_rate): Add support for gs464e.
1053         (mips_multipass_dfa_lookahead): Likewise.
1054         (mips_option_override): Enable MMI, EXT and EXT2 for gs464e.
1055         * config/mips/mips.h: Define TARGET_GS464E and TUNE_GS464E.
1056         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464e.
1057         (ISA_HAS_FUSED_MADD4): Enable for TARGET_GS464E.
1058         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_GS464E.
1059         * config/mips/mips.md: Include gs464e.md.
1060         (processor): Add gs464e.
1061         * doc/invoke.texi: Add gs464e to supported architectures.
1063 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1065         * config/mips/loongson3a.md: Rename to ...
1066         * config/mips/gs464.md: ... here.
1067         * config/mips/mips-cpus.def: Define gs464; Add loongson3a
1068         as an alias of gs464 processor.
1069         * config/mips/mips-tables.opt: Regenerate.
1070         * config/mips/mips.c (mips_issue_rate): Use PROCESSOR_GS464
1071         instead of PROCESSOR_LOONGSON_3A.
1072         (mips_multipass_dfa_lookahead): Use TUNE_GS464 instead of
1073         TUNE_LOONGSON_3A.
1074         (mips_option_override): Enable MMI and EXT for gs464.
1075         * config/mips/mips.h: Rename TARGET_LOONGSON_3A to TARGET_GS464;
1076         Rename TUNE_LOONGSON_3A to TUNE_GS464.
1077         (MIPS_ISA_LEVEL_SPEC): Infer mips64r2 from gs464.
1078         (ISA_HAS_ODD_SPREG, ISA_AVOID_DIV_HILO, ISA_HAS_FUSED_MADD4,
1079         ISA_HAS_UNFUSED_MADD4): Use TARGET_GS464 instead of
1080         TARGET_LOONGSON_3A.
1081         * config/mips/mips.md: Include gs464.md instead of loongson3a.md.
1082         (processor): Add gs464;
1083         * doc/invoke.texi: Add gs464 to supported architectures.
1085 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1087         * config/mips/mips-protos.h
1088         (mips_loongson_ext2_prefetch_cookie): New prototype.
1089         * config/mips/mips.c (mips_loongson_ext2_prefetch_cookie): New.
1090         (mips_option_override): Enable TARGET_LOONGSON_EXT when
1091         TARGET_LOONGSON_EXT2 is true.
1092         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Define
1093         __mips_loongson_ext2, __mips_loongson_ext_rev=2.
1094         (ISA_HAS_CTZ_CTO): New, true if TARGET_LOONGSON_EXT2.
1095         (ISA_HAS_PREFETCH): Include TARGET_LOONGSON_EXT and
1096         TARGET_LOONGSON_EXT2.
1097         (ASM_SPEC): Add mloongson-ext2 and mno-loongson-ext2.
1098         (define_insn "ctz<mode>2"): New insn pattern.
1099         (define_insn "prefetch"): Include TARGET_LOONGSON_EXT2.
1100         (define_insn "prefetch_indexed_<mode>"): Include
1101         TARGET_LOONGSON_EXT and TARGET_LOONGSON_EXT2.
1102         * config/mips/mips.opt (-mloongson-ext2): Add option.
1103         * gcc/doc/invoke.texi (-mloongson-ext2): Document.
1105 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1107         * config/mips/mips.h (TARGET_CPU_CPP_BUILTINS): Add
1108         __mips_loongson_ext.
1109         (MIPS_ASE_LOONGSON_EXT_SPEC): New.
1110         (BASE_DRIVER_SELF_SPECS): march=loongson3a implies
1111         -mloongson-ext.
1112         (ASM_SPEC): Add mloongson-ext and mno-loongson-ext.
1113         * config/mips/mips.md (mul<mode>3, mul<mode>3_mul3_nohilo,
1114         <u>div<mode>3, <u>mod<mode>3, prefetch): Use TARGET_LOONGSON_EXT
1115         instead of TARGET_LOONGSON_3A.
1116         * config/mips/mips.opt (-mloongson-ext): Add option.
1117         * gcc/doc/invoke.texi (-mloongson-ext): Document.
1119 2018-11-07  Chenghua Xu  <paul.hua.gm@gmail.com>
1121         * config.gcc (extra_headers): Add loongson-mmiintrin.h.
1122         * config/mips/loongson.md: Move to ...
1123         * config/mips/loongson-mmi.md: here; Adjustment.
1124         * config/mips/loongson.h: Move to ...
1125         State as deprecated. Include loongson-mmiintrin.h for back
1126         compatibility and warning.
1127         * config/mips/loongson-mmiintrin.h: ... here.
1128         * config/mips/mips.c (mips_hard_regno_mode_ok_uncached,
1129         mips_vector_mode_supported_p, AVAIL_NON_MIPS16): Use
1130         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1131         (mips_option_override): Make sure MMI use hard float;
1132         (mips_shift_truncation_mask, mips_expand_vpc_loongson_even_odd,
1133         mips_expand_vpc_loongson_pshufh, mips_expand_vpc_loongson_bcast,
1134         mips_expand_vector_init): Use TARGET_LOONGSON_MMI instead of
1135         TARGET_LOONGSON_VECTORS.
1136         * gcc/config/mips/mips.h (TARGET_LOONGSON_VECTORS): Delete.
1137         (TARGET_CPU_CPP_BUILTINS): Add __mips_loongson_mmi.
1138         (MIPS_ASE_DSP_SPEC, MIPS_ASE_LOONGSON_MMI_SPEC): New.
1139         (BASE_DRIVER_SELF_SPECS): march=loongson2e/2f/3a implies
1140         -mloongson-mmi.
1141         (SHIFT_COUNT_TRUNCATED): Use TARGET_LOONGSON_MMI instead of
1142         TARGET_LOONGSON_VECTORS.
1143         * gcc/config/mips/mips.md (MOVE64, MOVE128): Use
1144         TARGET_LOONGSON_MMI instead of TARGET_LOONGSON_VECTORS.
1145         (Loongson MMI patterns): Include loongson-mmi.md instead of
1146         loongson.md.
1147         * gcc/config/mips/mips.opt (-mloongson-mmi): New option.
1148         * gcc/doc/invoke.texi (-mloongson-mmi): Document.
1150 2018-11-07  Richard Biener  <rguenther@suse.de>
1152         PR lto/87906
1153         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Fixup
1154         BLOCK_ABSTRACT_ORIGIN to be the ultimate origin.
1156 2018-11-07  Alexandre Oliva <aoliva@redhat.com>
1158         PR rtl-optimization/87874
1159         * lra.c (lra_substitute_pseudo): Do not create a subreg for
1160         const wide ints.
1162 2018-11-06  Aaron Sawdey  <acsawdey@linux.ibm.com>
1164         * config/rs6000/rs6000.md (bswap<mode>2): Force address into register
1165         if not in indexed or indirect form.
1166         (bswap<mode>2_load): Change predicate to indexed_or_indirect_operand.
1167         (bswap<mode>2_store): Ditto.
1169 2018-11-06  Richard Earnshaw  <rearnsha@arm.com>
1171         * config/aarch64/aarch64.md (speculation_tracker): Set the mode for
1172         the UNSPEC.
1174 2018-11-06  Richard Biener  <rguenther@suse.de>
1176         PR tree-optimization/86850
1177         * vec.h (vec<T, va_heap, vl_ptr>::splice): Check src.length ()
1178         instead of src.m_vec.
1180 2018-11-06  Jan Hubicka  <jh@suse.cz>
1182         * tree.c (fld_simplified_type_name): Break out form ...
1183         (free_lang_data_in_type): ... here.
1184         (fld_type_variant_equal_p): Use it.
1186 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1188         * config/default-d.c: Include memmodel.h.
1190         * config/sol2-d.c: New file.
1191         * config/t-sol2 (sol2-d.o): New rule.
1192         * config.gcc <*-*-solaris2*>: Set d_target_objs,
1193         target_has_targetdm.
1195 2018-11-06  Jan Hubicka  <jh@suse.cz>
1197         * tree.c (fld_type_variant): Also copy alignment; be sure that
1198         new variant is equal.
1200 2018-11-06  Ilya Leoshkevich  <iii@linux.ibm.com>
1202         PR target/87762
1203         * config/s390/s390.md: Add relative_long attribute.
1205 2018-11-06  Jan Hubicka  <jh@suse.cz>
1207         * ipa-pure-const.c (check_decl): Do not test TYPE_NEEDS_CONSTRUCTING.
1208         * lto-streamer-out.c (hash_tree): Do not hash TYPE_NEEDS_CONSTRUCTING.
1209         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Do not
1210         stream TYPE_NEEDS_CONSTRUCTING.
1211         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
1212         * tree.c (free_lang_data_in_type): Clear TYPE_NEEDS_CONSTRUCTING.
1214 2018-11-06  Richard Biener  <rguenther@suse.de>
1216         * tree-vect-slp.c (vect_slp_bb): Move opening of vect_slp_analyze_bb
1217         dump-scope ...
1218         (vect_slp_analyze_bb_1): ... here to avoid hiding optimized locations.
1220 2018-11-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
1222         * gcc/config/msp430/msp430.h (REG_CLASS_CONTENTS): Add R0 to
1223         REG_CLASS_CONTENTS[GEN_REGS].
1224         (REGNO_REG_CLASS): Return NO_REGS for R2 and R3.
1226 2018-11-06  Jan Hubicka  <jh@suse.cz>
1228          * tree.c (fld_simplified_type_of): Clear TYPELESS_STORAGE flag.
1230 2018-11-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1232         PR sanitizer/80953
1233         * config/sol2.h (ASAN_CC1_SPEC): Define.
1234         (LD_WHOLE_ARCHIVE_OPTION): Define.
1235         (LD_NO_WHOLE_ARCHIVE_OPTION): Define.
1236         (ASAN_REJECT_SPEC): Provide default.
1237         (LIBASAN_EARLY_SPEC): Define.
1238         (LIBTSAN_EARLY_SPEC): Define.
1239         (LIBLSAN_EARLY_SPEC): Define.
1240         * config/i386/sol2.h (CC1_SPEC): Redefine.
1241         (ASAN_REJECT_SPEC): Define.
1243         * config/sparc/sparc.c (sparc_asan_shadow_offset): Declare.
1244         (TARGET_ASAN_SHADOW_OFFSET): Define.
1245         (sparc_asan_shadow_offset): New function.
1246         * config/sparc/sol2.h (CC1_SPEC): Append ASAN_CC1_SPEC.
1247         (ASAN_REJECT_SPEC): Define.
1249 2018-11-06  Jan Hubicka  <jh@suse.cz>
1251         * tree.c (fld_type_variant): Copy canonical type.
1252         (fld_incomplete_type_of): Check that canonical types looks sane;
1253         copy canonical type.
1254         (verify_type): Accept when incomplete type has complete canonical type.
1256 2018-11-06  Jan Hubicka  <jh@suse.cz>
1258         * tree.c (free_lang_data): Reset overwite_assembler_name,
1259         print_xnode, print_decl, print_type and print_identifier of
1260         langhooks.
1262 2018-11-06  Richard Biener  <rguenther@suse.de>
1264         PR tree-optimization/87889
1265         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
1266         Do nothing if old and new arg are the same
1268 2018-11-06  Andreas Krebbel  <krebbel@linux.ibm.com>
1270         PR target/87723
1271         * config/s390/s390.md ("*r<noxa>sbg_di_rotl"): Remove mode
1272         attributes for operands 3 and 4.
1274 2018-11-06  Richard Biener  <rguenther@suse.de>
1276         PR middle-end/18041
1277         * simplify-rtx.c (simplify_binary_operation_1): Add pattern
1278         matching bitfield insertion.
1280 2018-11-06  Alexandre Oliva <aoliva@redhat.com>
1282         * auto-inc-dec.c: Include valtrack.h.  Improve comments.
1283         (reg_next_debug_use): New.
1284         (attempt_change): Propagate adjusted expression into affected
1285         debug insns.
1286         (merge_in_block): Track uses in debug insns.
1287         (pass_inc_dec::execute): Allocate and release
1288         reg_next_debug_use.
1290 2018-11-06 Wei Xiao <wei3.xiao@intel.com>
1292         * config/i386/avx512fintrin.h: Update VFIXUPIMM* intrinsics.
1293         (_mm512_fixupimm_round_pd): Update parameters and builtin.
1294         (_mm512_maskz_fixupimm_round_pd): Ditto.
1295         (_mm512_fixupimm_round_ps): Ditto.
1296         (_mm512_maskz_fixupimm_round_ps): Ditto.
1297         (_mm_fixupimm_round_sd): Ditto.
1298         (_mm_maskz_fixupimm_round_sd): Ditto.
1299         (_mm_fixupimm_round_ss): Ditto.
1300         (_mm_maskz_fixupimm_round_ss): Ditto.
1301         (_mm512_fixupimm_pd): Ditto.
1302         (_mm512_maskz_fixupimm_pd): Ditto.
1303         (_mm512_fixupimm_ps): Ditto.
1304         (_mm512_maskz_fixupimm_ps): Ditto.
1305         (_mm_fixupimm_sd): Ditto.
1306         (_mm_maskz_fixupimm_sd): Ditto.
1307         (_mm_fixupimm_ss): Ditto.
1308         (_mm_maskz_fixupimm_ss): Ditto.
1309         (_mm512_mask_fixupimm_round_pd): Update builtin.
1310         (_mm512_mask_fixupimm_round_ps): Ditto.
1311         (_mm_mask_fixupimm_round_sd): Ditto.
1312         (_mm_mask_fixupimm_round_ss): Ditto.
1313         (_mm512_mask_fixupimm_pd): Ditto.
1314         (_mm512_mask_fixupimm_ps): Ditto.
1315         (_mm_mask_fixupimm_sd): Ditto.
1316         (_mm_mask_fixupimm_ss): Ditto.
1317         * config/i386/avx512vlintrin.h:
1318         (_mm256_fixupimm_pd): Update parameters and builtin.
1319         (_mm256_maskz_fixupimm_pd): Ditto.
1320         (_mm256_fixupimm_ps): Ditto.
1321         (_mm256_maskz_fixupimm_ps): Ditto.
1322         (_mm_fixupimm_pd): Ditto.
1323         (_mm_maskz_fixupimm_pd): Ditto.
1324         (_mm_fixupimm_ps): Ditto.
1325         (_mm_maskz_fixupimm_ps): Ditto.
1326         (_mm256_mask_fixupimm_pd): Update builtin.
1327         (_mm256_mask_fixupimm_ps): Ditto.
1328         (_mm_mask_fixupimm_pd): Ditto.
1329         (_mm_mask_fixupimm_ps): Ditto.
1330         * config/i386/i386-builtin-types.def: Add new types and remove useless ones.
1331         * config/i386/i386-builtin.def: Update builtin definitions.
1332         * config/i386/i386.c: Handle new builtin types and remove useless ones.
1333         * config/i386/sse.md: Update VFIXUPIMM* patterns.
1334         (<avx512>_fixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1335         (<avx512>_fixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1336         (<avx512>_fixupimm<mode>_mask<round_saeonly_name>): Update.
1337         (avx512f_sfixupimm<mode>_maskz<round_saeonly_expand_name>): Update.
1338         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>): Update.
1339         (avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Update.
1340         * config/i386/subst.md:
1341         (round_saeonly_sd_mask_operand4): Add new subst_attr.
1342         (round_saeonly_sd_mask_op4): Ditto.
1343         (round_saeonly_expand_operand5): Ditto.
1344         (round_saeonly_expand): Update.
1346 2018-11-05  Max Filippov  <jcmvbkbc@gmail.com>
1348         * config/xtensa/uclinux.h (XTENSA_ALWAYS_PIC): Change to 0.
1350 2018-11-05  Segher Boessenkool  <segher@kernel.crashing.org>
1352         PR rtl-optimization/87871
1353         * combine.c (make_more_copies): Skip if dest is frame_pointer_rtx.
1355 2018-11-05  Paul Koning  <ni1d@arrl.net>
1357         * doc/sourcebuild.texi (target attributes): Document new "inf"
1358         effective target keyword.
1360 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
1362         * config/s390/s390.c (s390_register_move_cost): Increase costs for
1363         moves involving the CC reg.
1365 2018-11-05  Richard Biener  <rguenther@suse.de>
1367         PR tree-optimization/87873
1368         * tree-ssa-loop-manip.h (split_loop_exit_edge): Add copy_constants_p
1369         argument.
1370         * tree-ssa-loop-manip.c (split_loop_exit_edge): Likewise.
1371         * tree-vect-loop.c (vect_transform_loop): When splitting the
1372         loop exit also create forwarder PHIs for constants.
1373         * tree-vect-loop-manip.c (slpeel_duplicate_current_defs_from_edges):
1374         Handle constant to_arg, add extra checking we match up the correct
1375         PHIs.
1377 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
1379         * config/s390/s390.md: QImode and HImode for load on condition.
1381 2018-11-05  Robin Dapp  <rdapp@linux.ibm.com>
1383         * config/s390/predicates.md: Fix typo.
1384         * config/s390/s390.md: Allow immediates for load on condition.
1386 2018-11-05  Martin Liska  <mliska@suse.cz>
1388         * alloc-pool.h (struct pool_usage): Use SIZE_AMOUNT.
1389         * bitmap.h (struct bitmap_usage): Likewise.
1390         * ggc-common.c (SCALE): Remove.
1391         (LABEL): Likewise.
1392         (struct ggc_usage): Use SIZE_AMOUNT. And update
1393         compare method.
1394         * ggc-page.c (SCALE): Remove.
1395         (STAT_LABEL): Remove.
1396         (ggc_print_statistics): Use SIZE_AMOUNT.
1397         * gimple.h (SCALE): Remove.
1398         (LABEL): Likewise.
1399         * input.c (ONE_K): Remove.
1400         (ONE_M): Likewise.
1401         (SCALE): Likewise.
1402         (STAT_LABEL): Likewise.
1403         (FORMAT_AMOUNT): Likewise.
1404         (dump_line_table_statistics): Use SIZE_AMOUNT.
1405         * mem-stats.h (struct mem_usage): Likewise.
1406         * rtl.c (dump_rtx_statistics): Likewise.
1407         (rtx_alloc_counts): Change type to size_t.
1408         (rtx_alloc_sizes): Likewise.
1409         (rtx_count_cmp): New.
1410         (dump_rtx_statistics): Sort first based on counts.
1411         * tree.c (tree_nodes_cmp): New.
1412         (tree_codes_cmp): New.
1413         (dump_tree_statistics): Sort first based on counts.
1414         * system.h (ONE_K): New.
1415         (ONE_M): Likewise.
1416         (SIZE_SCALE): Likewise.
1417         (SIZE_LABEL): Likewise.
1418         (SIZE_AMOUNT): Likewise.
1419         * tree-cfg.c (dump_cfg_stats): Use SIZE_AMOUNT.
1420         * tree-dfa.c (dump_dfa_stats): Likewise.
1421         * tree-phinodes.c (phinodes_print_statistics): Likewise.
1422         * tree-ssanames.c (ssanames_print_statistics): Likewise.
1423         * tree.c (dump_tree_statistics): Likewise.
1424         * vec.c (struct vec_usage): Likewise.
1425         * trans-mem.c (tm_mangle): Enlarge buffer in order to not
1426         trigger a -Werror=format-overflow with
1427         --enable-gather-detailed-stats.
1429 2018-11-05  Martin Liska  <mliska@suse.cz>
1431         * mem-stats.h (mem_alloc_description::release_instance_overhead):
1432         Return T *.
1433         * vec.c (struct vec_usage): Register m_element_size.
1434         (vec_prefix::register_overhead): New arguments: elements and
1435         element_size.
1436         (vec_prefix::release_overhead): Subtract elements.
1437         * vec.h (struct vec_prefix): Change signature.
1438         (va_heap::reserve): Pass proper arguments.
1439         (va_heap::release): Likewise.
1441 2018-11-05  Martin Liska  <mliska@suse.cz>
1443         * mem-stats.h (mem_alloc_description::get_list): Fix GNU coding
1444         style.
1445         * vec.c: Likewise.
1447 2018-11-05  Richard Biener  <rguenther@suse.de>
1449         * tree-scalar-evolution.h (final_value_replacement_loop): Update
1450         prototype.
1451         * tree-scalar-evolution.c (final_value_replacement_loop): Return
1452         whether anything was done.
1453         (scev_const_prop): Remove constant propagation part, fold
1454         remains into ...
1455         * tree-ssa-loop.c (pass_scev_cprop::execute): ... here.
1456         (pass_data_scev_cprop): TODO_cleanup_cfg is now done
1457         conditionally.
1459 2018-11-05  Jakub Jelinek  <jakub@redhat.com>
1461         PR tree-optimization/87859
1462         * gimple-ssa-store-merging.c (struct merged_store_group): Add
1463         only_constants and first_nonmergeable_order members.
1464         (merged_store_group::merged_store_group): Initialize them.
1465         (merged_store_group::do_merge): Clear only_constants member if
1466         adding something other than INTEGER_CST store.
1467         (imm_store_chain_info::coalesce_immediate_stores): Don't merge
1468         stores with order >= first_nonmergeable_order.  Use
1469         merged_store->only_constants instead of always recomputing it.
1470         Set merged_store->first_nonmergeable_order if we've skipped any
1471         stores.  Attempt to merge overlapping INTEGER_CST stores that
1472         we would otherwise skip.
1474         PR sanitizer/87837
1475         * match.pd (X + Y < X): Don't optimize if TYPE_OVERFLOW_SANITIZED.
1477 2018-11-05  Xuepeng Guo  <xuepeng.guo@intel.com>
1479         PR target/87853
1480         * config/i386/emmintrin.h (__v16qs): New to cope with option
1481         -funsigned-char.
1482         (_mm_cmpeq_epi8): Replace __v16qi with __v16qs.
1483         (_mm_cmplt_epi8): Likewise.
1484         (_mm_cmpgt_epi8): Likewise.
1486 2018-11-05  Richard Biener  <rguenther@suse.de>
1488         PR rtl-optimization/87852
1489         * fwprop.c (use_killed_between): Only consider single-defs of the
1490         use whose definition statement dominates the use.
1492 2018-11-05  Martin Liska  <mliska@suse.cz>
1494         PR web/87829
1495         * doc/invoke.texi: Remove options that are
1496         not disabled with -Os.
1498 2018-11-05  Martin Liska  <mliska@suse.cz>
1500         PR c/87811
1501         * doc/extend.texi: Update constrain about the last argument
1502         of __builtin_expect_with_probability.
1504 2018-11-05  Martin Liska  <mliska@suse.cz>
1506         PR c/87811
1507         * predict.c (expr_expected_value_1): Verify
1508         that last argument is a real constants and emit
1509         error.
1511 2018-11-05  Martin Liska  <mliska@suse.cz>
1513         PR gcov-profile/77698
1514         * ipa-profile.c (ipa_profile): Adjust hotness threshold
1515         only in LTO mode.
1517 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1519         PR tree-optimization/86572
1520         * builtins.c (c_strlen): Handle negative offsets in a safe way.
1522 2018-11-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
1524         PR tree-optimization/87672
1525         * gimple-fold.c (gimple_fold_builtin_stxcpy_chk): Gimplify.
1526         * tree-ssa-strlen.c (handle_builtin_strcat): Adjust object size.
1528 2018-11-04  Uros Bizjak  <ubizjak@gmail.com>
1530         PR middle-end/58372
1531         * cfgexpand.c (pass_expand::execute): Move the call to
1532         finish_eh_generation in front of the call to expand_stack_alignment.
1534 2018-11-04  Venkataramanan Kumar <venkataramanan.kumar@amd.com>
1536         * common/config/i386/i386-common.c (processor_alias_table): Add
1537         znver2 entry.
1538         * config.gcc (i[34567]86-*-linux* | ...): Add znver2.
1539         (case ${target}): Add znver2.
1540         * config/i386/driver-i386.c: (host_detect_local_cpu): Let
1541         -march=native recognize znver2 processors.
1542         * config/i386/i386-c.c (ix86_target_macros_internal): Add znver2.
1543         * config/i386/i386.c (m_znver2): New definition.
1544         (m_ZNVER): New definition.
1545         (m_AMD_MULTIPLE): Includes m_znver2.
1546         (processor_cost_table): Add znver2 entry.
1547         (processor_target_table): Add znver2 entry.
1548         (get_builtin_code_for_version): Set priority for
1549         PROCESSOR_ZNVER2.
1550         (processor_model): Add M_AMDFAM17H_ZNVER2.
1551         (arch_names_table): Ditto.
1552         (ix86_reassociation_width): Include znver2.
1553         * config/i386/i386.h (TARGET_znver2): New definition.
1554         (struct ix86_size_cost): Add TARGET_ZNVER2.
1555         (enum processor_type): Add PROCESSOR_ZNVER2.
1556         * config/i386/i386.md (define_attr "cpu"): Add znver2.
1557         * config/i386/x86-tune-costs.h: (processor_costs) Add znver2 costs.
1558         * config/i386/x86-tune-sched.c: (ix86_issue_rate): Add znver2.
1559         (ix86_adjust_cost): Add znver2.
1560         * config/i386/x86-tune.def:  Replace m_ZNVER1 by m_ZNVER.
1561         * gcc/doc/extend.texi: Add details about znver2.
1562         * gcc/doc/invoke.texi: Add details about znver2.
1564 2018-11-03  Sandra Loosemore  <sandra@codesourcery.com>
1566         PR target/87079
1568         * config/nios2/nios2.c (nios2_rtx_costs): Recognize <mul>sidi3
1569         pattern.
1571 2018-11-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
1573         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Pay
1574         attention to TARGET_AVOID_XFORM and BYTES_BIG_ENDIAN.
1576 2018-11-02  Richard Earnshaw  <rearnsha@arm.com>
1578         * config/aarch64/aarch64.c ((aarch64_override_options): Disable
1579         shrink-wrapping when -mtrack-speculation.
1581 2018-11-02  Richard Biener  <rguenther@suse.de>
1583         * tree-ssa-coalesce.c (struct coalesce_list): Add obstack member.
1584         (pop_cost_one_pair): Do not free pair.
1585         (pop_best_coalesce): Likewise.
1586         (create_coalesce_list): Initialize obstack.
1587         (delete_coalesce_list): Free obstack.
1588         (find_coalesce_pair): Obstack-allocate coalesce pairs.
1589         (add_cost_one_coalesce): Likewise.
1590         (struct live_track): Remove bitmap pointer indirections.
1591         (new_live_track): Adjust.
1592         (delete_live_track): Likewise.
1593         (live_track_remove_partition): Likewise.
1594         (live_track_add_partition): Likewise.
1595         (live_track_live_p): Likewise.
1596         (live_track_process_def): Likewise.
1597         (live_track_clear_base_vars): Likewise.
1599 2018-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1601         * configure.ac (gcc_cv_as_sparc_register_op): Remove.
1602         * configure: Regenerate.
1603         * config.in: Regenerate.
1604         * config/sparc/sparc.c (sparc_output_scratch_registers): Remove
1605         HAVE_AS_REGISTER_PSEUDO_OP guard.
1606         * config/sparc/sparc.h (ASM_ARCH64_SPEC): Remove
1607         !HAVE_AS_REGISTER_PSEUDO_OP support.
1608         (ASM_DECLARE_REGISTER_GLOBAL): Remove HAVE_AS_REGISTER_PSEUDO_OP
1609         guard.
1611 2018-11-02  Richard Biener  <rguenther@suse.de>
1613         * dwarf2out.c (build_abbrev_table): Guard lookup_external_ref call
1614         with is_type_die.
1616 2018-11-02  Richard Biener  <rguenther@suse.de>
1618         PR tree-optimization/87776
1619         * tree-ssa-sccvn.c (do_rpo_vn): Do not mark backedges
1620         executable when iterating but running into rpo-vn-max-loop-depth
1621         and not eliding the iteration.
1623 2018-11-30  Jan Hubicka  <jh@suse.cz>
1625         * tree.c (free_lang_data_in_decl): Free TREE_TYPE and alignment of
1626         TYPE_DECL.
1628 2018-11-01  Aaron Sawdey  <acsawdey@linux.ibm.com>
1630         * config/rs6000/rs6000-protos.h (rs6000_address_for_fpconvert): Remove
1631         prototype.
1632         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem):
1633         Combine with rs6000_address_for_fpconvert.
1634         (rs6000_address_for_fpconvert): Combine with
1635         rs6000_force_indexed_or_indirect_mem.
1636         (rs6000_expand_vector_init): Change function call from
1637         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
1638         * config/rs6000/rs6000.md (floatsi<mode>2_lfiwax): Change call from
1639         rs6000_address_for_fpconvert to rs6000_force_indexed_or_indirect_mem.
1640         (floatsi<mode>2_lfiwax_mem): Ditto.
1641         (floatunssi<mode>2_lfiwzx): Ditto.
1642         (floatunssi<mode>2_lfiwzx_mem): Ditto.
1643         (float<QHI:mode><FP_ISA3:mode>2): Ditto.
1644         (floatuns<QHI:mode><FP_ISA3:mode>2): Ditto.
1645         (fix_trunc<mode>si2_stfiwx): Ditto.
1646         (fixuns_trunc<mode>si2_stfiwx): Ditto.
1647         (float_<mode>si2_hw): Ditto.
1648         (floatuns_<mode>si2_hw): Ditto.
1649         * config/rs6000/vsx.md (*vsx_extract_si): Ditto.
1650         (vsx_splat_<mode>): Ditto.
1652 2018-11-01  Joseph Myers  <joseph@codesourcery.com>
1654         * configure.ac (gcc_cv_as_ia64_ltoffx_ldxmov_relocs): Add newline
1655         at end of assembler input text.
1656         * configure: Regenerate.
1658 2018-11-01  Jakub Jelinek  <jakub@redhat.com>
1660         PR tree-optimization/87826
1661         * gimple-ssa-store-merging.c (do_shift_rotate): Punt if count is
1662         negative or larger or equal to type's precision.
1664 2018-10-31  Alexandre Oliva <aoliva@redhat.com>
1666         * opts.c (default_options_table): Do not enable
1667         OPT_fdelayed_branch at -Og.
1668         * doc/invoke.texi (-fdelayed-branch): Document it.
1670 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
1672         * optabs-libfuncs.c (build_libfunc_function_visibility):
1673         New, split out from...
1674         (build_libfunc_function): ... here.
1675         (init_one_libfunc_visibility): New, split out from ...
1676         (init_one_libfunc): ... here.
1678         * config/aarch64/atomics.md (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse):
1679         scratch register need not be early-clobber.  Document the reason
1680         why we cannot use ST<OP>.
1682 2018-10-31  Joseph Myers  <joseph@codesourcery.com>
1684         PR bootstrap/82856
1685         * configure.ac: Remove AC_PREREQ.  Use AC_LANG_SOURCE.  Use single
1686         line for second argument of AC_DEFINE_UNQUOTED.
1687         * doc/install.texi (Tools/packages necessary for modifying GCC):
1688         Update to autoconf 2.69 and automake 1.15.1.
1689         * aclocal.m4, config.in, configure: Regenerate.
1691 2018-10-31  Pat Haugen  <pthaugen@us.ibm.com>
1693         * tree-ssa-loop-ivcanon.c (try_peel_loop): Fix typo and remove dead
1694         initialization.
1696 2018-10-31  Martin Liska  <mliska@suse.cz>
1698         PR driver/83193
1699         * common/config/aarch64/aarch64-common.c (aarch64_parse_extension):
1700         Add new argument invalid_extension.
1701         (aarch64_get_all_extension_candidates): New function.
1702         (aarch64_rewrite_selected_cpu): Add NULL to function call.
1703         * config/aarch64/aarch64-protos.h (aarch64_parse_extension): Add
1704         new argument.
1705         (aarch64_get_all_extension_candidates): New function.
1706         * config/aarch64/aarch64.c (aarch64_parse_arch): Add new
1707         argument invalid_extension.
1708         (aarch64_parse_cpu): Likewise.
1709         (aarch64_print_hint_for_extensions): New function.
1710         (aarch64_validate_mcpu): Provide hint about invalid extension.
1711         (aarch64_validate_march): Likewise.
1712         (aarch64_handle_attr_arch): Pass new argument.
1713         (aarch64_handle_attr_cpu): Provide hint about invalid extension.
1714         (aarch64_handle_attr_isa_flags): Likewise.
1716 2018-10-31  Richard Biener  <rguenther@suse.de>
1718         PR middle-end/70359
1719         PR middle-end/86270
1720         * tree-outof-ssa.c (insert_backedge_copies): Restrict
1721         copy generation to useful cases.  Place the copy before
1722         the definition of the backedge value when possible.
1724 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
1726         * config/arc/arc-arch.h (ARC_TUNE_ARC7XX): New tune value.
1727         * config/arc/arc.c (arc_active_insn): New function.
1728         (check_store_cacheline_hazard): Likewise.
1729         (workaround_arc_anomaly): Use check_store_cacheline_hazard.
1730         (arc_override_options): Disable delay slot scheduler for older
1731         A7.
1732         (arc_store_addr_hazard_p): New implementation, old one renamed to
1733         ...
1734         (arc_store_addr_hazard_internal_p): Renamed.
1735         (arc_reorg): Don't combine into brcc instructions which are part
1736         of hardware hazard solution.
1737         * config/arc/arc.md (attr tune): Consider new arc7xx tune value.
1738         (tune_arc700): Likewise.
1739         * config/arc/arc.opt (arc7xx): New tune value.
1740         * config/arc/arc700.md: Improve A7 scheduler.
1742 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
1744         * config/arc/arc.c (arc_override_options): Remove
1745         TARGET_COMPACT_CASESI.
1746         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Update.
1747         (CASE_VECTOR_MODE): Likewise.
1748         (CASE_VECTOR_PC_RELATIVE): Likewise.
1749         (CASE_VECTOR_SHORTEN_MODE): Likewise.
1750         (CASE_VECTOR_SHORTEN_MODE1): Delete.
1751         (ADDR_VEC_ALIGN): Update.
1752         (ASM_OUTPUT_CASE_LABEL): Undefine.
1753         (ASM_OUTPUT_BEFORE_CASE_LABEL): Undefine.
1754         (TARGET_BI_BIH): Define.
1755         (DEFAULT_BRANCH_INDEX): Likewise.
1756         * config/arc/arc.md (casesi): Rework to accept BI/BIH
1757         instructions, remove compact_casesi use case.
1758         (casesi_compact_jump): Remove.
1759         (casesi_dispatch): New pattern.
1760         * config/arc/arc.opt: Add mbranch-index option. Deprecate
1761         compact_casesi option.
1762         * doc/invoke.texi: Document mbranch-index option.
1764 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
1766         * config/arc/arc.c (arc_get_tp): Remove function.
1767         (arc_emit_call_tls_get_addr): Likewise.
1768         (arc_call_tls_get_addr): New function.
1769         (arc_legitimize_tls_address): Make use of arc_call_tls_get_addr.
1770         * config/arc/arc.md (tls_load_tp_soft): Remove.
1771         (tls_gd_get_addr): Likewise.
1773 2018-10-31  Claudiu Zissulescu  <claziss@synopsys.com>
1775         * config/arc/arc.md (mulsi3): Remove call to mulsi_600_lib.
1776         (mulsi3_600_lib): Remove pattern.
1777         (umulsi3_highpart_600_lib_le): Likewise.
1778         (umulsi3_highpart): Remove call to umulsi3_highpart_600_lib_le.
1779         (umulsidi3): Remove call to umulsidi3_600_lib.
1780         (umulsidi3_600_lib): Remove pattern.
1781         (peephole2): Remove peephole using the above deprecated patterns.
1783 2018-10-31  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
1785         PR target/87374
1786         * config/arm/arm.c (arm_option_check_internal): Disable the combined
1787         use of -mslow-flash-data and -mword-relocations.
1788         (arm_option_override): Enable -mword-relocations if -fpic or -fPIC.
1789         * config/arm/arm.md (SYMBOL_REF MOVT splitter): Stop checking for
1790         flag_pic.
1791         * doc/invoke.texi (-mword-relocations): Mention conflict with
1792         -mslow-flash-data.
1793         (-mslow-flash-data): Reciprocally.
1795 2018-10-31  Richard Henderson  <richard.henderson@linaro.org>
1797         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Force
1798         16-byte modes held in GP registers to use an even regno.
1800         * config/aarch64/aarch64.c (aarch64_emit_bic): Remove.
1801         (aarch64_atomic_ldop_supported_p): Remove.
1802         (aarch64_gen_atomic_ldop): Remove.
1803         * config/aarch64/atomic.md (atomic_<atomic_optab><ALLI>):
1804         Fully expand LSE operations here.
1805         (atomic_fetch_<atomic_optab><ALLI>): Likewise.
1806         (atomic_<atomic_optab>_fetch<ALLI>): Likewise.
1807         (aarch64_atomic_<ATOMIC_LDOP><ALLI>_lse): Drop atomic_op iterator
1808         and use ATOMIC_LDOP instead; use register_operand for the input;
1809         drop the split and emit insns directly.
1810         (aarch64_atomic_fetch_<ATOMIC_LDOP><ALLI>_lse): Likewise.
1811         (aarch64_atomic_<atomic_op>_fetch<ALLI>_lse): Remove.
1812         (@aarch64_atomic_load<ATOMIC_LDOP><ALLI>): Remove.
1814         * config/aarch64/aarch64.c (aarch64_emit_atomic_swap): Remove.
1815         (aarch64_gen_atomic_ldop): Don't call it.
1816         * config/aarch64/atomics.md (atomic_exchange<ALLI>):
1817         Use aarch64_reg_or_zero.
1818         (aarch64_atomic_exchange<ALLI>): Likewise.
1819         (aarch64_atomic_exchange<ALLI>_lse): Remove split; remove & from
1820         operand 0; use aarch64_reg_or_zero for input; merge ...
1821         (@aarch64_atomic_swp<ALLI>): ... this and remove.
1823         * config/aarch64/aarch64.c (aarch64_gen_compare_reg_maybe_ze): New.
1824         (aarch64_split_compare_and_swap): Use it.
1825         (aarch64_expand_compare_and_swap): Likewise.  Remove convert_modes;
1826         test oldval against the proper predicate.
1827         * config/aarch64/atomics.md (@atomic_compare_and_swap<ALLI>):
1828         Use nonmemory_operand for expected.
1829         (cas_short_expected_pred): New.
1830         (@aarch64_compare_and_swap<SHORT>): Use it; use "rn" not "rI" to match.
1831         (@aarch64_compare_and_swap<GPI>): Use "rn" not "rI" for expected.
1832         * config/aarch64/predicates.md (aarch64_plushi_immediate): New.
1833         (aarch64_plushi_operand): New.
1835         * config/aarch64/aarch64.c (aarch64_expand_compare_and_swap):
1836         Force oldval into the rval register for TARGET_LSE; emit the compare
1837         during initial expansion so that it may be deleted if unused.
1838         (aarch64_gen_atomic_cas): Remove.
1839         * config/aarch64/atomics.md (@aarch64_compare_and_swap<SHORT>_lse):
1840         Change =&r to +r for operand 0; use match_dup for operand 2;
1841         remove is_weak and mod_f operands as unused.  Drop the split
1842         and merge with...
1843         (@aarch64_atomic_cas<SHORT>): ... this pattern's output; remove.
1844         (@aarch64_compare_and_swap<GPI>_lse): Similarly.
1845         (@aarch64_atomic_cas<GPI>): Similarly.
1847 2018-10-31  Richard Biener  <rguenther@suse.de>
1849         * tree-eh.c (replace_trapping_overflow): Simplify ABS_EXPR case
1850         using ABSU_EXPR.
1852 2018-10-31 Sameera Deshpande <sameera.deshpande@linaro.org>
1854         * config/aarch64/aarch64-cores.def (saphira): Use saphira pipeline.
1855         * config/aarch64/aarch64.md: Include saphira.md
1856         * config/aarch64/saphira.md: New file for pipeline description.
1858 2018-10-30  Martin Sebor  <msebor@redhat.com>
1860         PR middle-end/87041
1861         * gimple-ssa-sprintf.c (format_directive): Use %G to include
1862         inlining context.
1863         (sprintf_dom_walker::compute_format_length):
1864         Avoid setting POSUNDER4K here.
1865         (get_destination_size): Handle null argument values.
1866         (get_user_idx_format): New function.
1867         (sprintf_dom_walker::handle_gimple_call): Handle all printf-like
1868         functions, including user-defined with attribute format printf.
1869         Use %G to include inlining context.
1870         Set POSUNDER4K here.
1872 2018-10-30  Jan Hubicka  <jh@suse.cz>
1874         * params.def (lto-partitions): Bump from 32 to 128.
1876 2018-10-30  Jan Hubicka  <jh@suse.cz>
1878         * tree.c
1879         (free_lang_data_d, add_tree_to_fld_list, fld_worklist_push): Move
1880         head in file.
1881         (free_lang_data_in_type): Forward declare.
1882         (fld_type_variant_equal_p): New function.
1883         (fld_type_variant): New function
1884         (fld_incomplete_types): New hash.
1885         (fld_incomplete_type_of): New function
1886         (fld_simplfied-type): New function.
1887         (free_lang_data_in_decl): Add fld parameter; simplify type of FIELD_DECL
1888         (free_lang_data): Allocate and free fld_incomplete_type; update call
1889         of free_lang_data_in_decl.
1891 2018-10-30  Eric Botcazou  <ebotcazou@adacore.com>
1893         * gcov.c (output_lines): Remove duplicate line.
1895 2018-10-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
1897         * config/rs6000/rs6000.md (bswapdi2): Force address into register
1898         if not in indexed or indirect form.
1899         (bswapdi2_load): Change predicate to indexed_or_indirect_operand.
1900         (bswapdi2_store): Ditto.
1901         * config/rs6000/rs6000.c (rs6000_force_indexed_or_indirect_mem): New
1902         helper function.
1903         * config/rs6000/rs6000-protos.h (rs6000_force_indexed_or_indirect_mem):
1904         Prototype for helper function.
1906 2018-10-30  Martin Sebor  <msebor@redhat.com>
1908         * doc/extend.texi (optimize): Clarify/expand attribute documentation.
1909         (target, pragma GCC optimize, pragma GCC target): Ditto.
1911 2018-10-30  Jonathan Wakely  <jwakely@redhat.com>
1913         * doc/extend.texi: Fix prototype and description of
1914         __builtin_expect_with_probability.
1916 2018-10-30  Michael Ploujnikov  <michael.ploujnikov@oracle.com>
1918         * cgraph.h (clone_function_name_1): Replaced by new
1919           clone_function_name_numbered that takes name as string; for
1920           privatize_symbol_name_1 use only.
1921           (clone_function_name): Renamed to
1922           clone_function_name_numbered to be explicit about numbering.
1923           (clone_function_name): New two-argument function that does
1924           not number its output.
1925           (clone_function_name): New three-argument function that
1926           takes a number to append to its output.
1927         * cgraphclones.c (duplicate_thunk_for_node):
1928           (clone_function_name_1): Renamed.
1929           (clone_function_name_numbered): Two new functions.
1930           (clone_function_name): Improved documentation.
1931           (cgraph_node::create_virtual_clone): Use clone_function_name_numbered.
1932         * config/rs6000/rs6000.c (make_resolver_func): Ditto.
1933         * final.c (final_scan_insn_1): Use the new clone_function_name
1934           without numbering.
1935         * multiple_target.c (create_dispatcher_calls): Ditto.
1936           (create_target_clone): Ditto.
1937         * omp-expand.c (grid_expand_target_grid_body): Ditto.
1938         * omp-low.c (create_omp_child_function_name): Ditto.
1939         * omp-simd-clone.c (simd_clone_create): Ditto.
1940         * symtab.c (simd_symtab_node::noninterposable_alias): Use the
1941           new clone_function_name without numbering.
1943 2018-10-30  Richard Earnshaw  <rearnsha@arm.com>
1945         * alloc-pool.h (base_pool_allocator <TBlockAllocator>::initialize):
1946         Assert that the allocation size is not zero.
1948 2018-10-30  Richard Biener  <rguenther@suse.de>
1950         PR tree-optimization/87800
1951         * tree-vect-slp.c (vect_build_slp_tree_2): Reject any
1952         non-induction or reduction PHIs.
1954 2018-10-30 Sameera Deshpande <sameera.deshpande@linaro.org
1956         * config/aarch64/falkor-tag-collision-avoidance.c
1957         (execute_tag_collision_avoidance): Call df_note_add_problem.
1959 2018-10-30  Martin Liska  <mliska@suse.cz>
1961         * doc/extend.texi: Fix typo in documentation
1962         of __builtin_expect_with_probability.
1964 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
1966         PR c++/87721
1967         * input.c (get_substring_ranges_for_loc): Detect if
1968         linemap_resolve_location gives us a NULL map, and reject
1969         this case.
1971 2018-10-29  Iain Buclaw  <ibuclaw@gdcproject.org>
1973         * config.gcc (xstormy16-*-elf): Set tm_d_file.
1975 2018-10-29  David Malcolm  <dmalcolm@redhat.com>
1976             Martin Sebor  <msebor@redhat.com>
1977             Manuel Lopez-Ibanez  <manu@gcc.gnu.org>
1979         * doc/ux.texi (Quoting): New subsection, adapted from material at
1980         https://gcc.gnu.org/wiki/DiagnosticsGuidelines written by
1981         MartinSebor and ManuelLopezIbanez.
1982         (Fix-it hints): Note that fix-it hints shouldn't be marked for
1983         translation.
1985 2018-10-29  Kugan Vivekanandarajah  <kuganv@linaro.org>
1987         PR middle-end/87469
1988         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Fix niter
1989         max value.
1991 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
1993         * gcc.target/powerpc/ssse3-check.h: Remove inaccurate comment.
1995 2018-10-29  Paul Koning  <ni1d@arrl.net>
1997         * doc/rtl.texi (CONST_WIDE_INT_ELT): Give correct macro name.
1999 2018-10-29  Paul A. Clarke  <pc@us.ibm.com>
2001         * gcc/config/rs6000/mmintrin.h (_mm_packs_pi16, _mm_packs_pi32,
2002         _mm_packs_pu16, _mm_unpackhi_pi8, _mm_unpacklo_pi8, _mm_add_pi8,
2003         _mm_add_pi16, _mm_add_pi32, _mm_sub_pi8, _mm_sub_pi16, _mm_sub_pi32,
2004         _mm_cmpgt_pi8, _mm_cmpeq_pi16, _mm_cmpgt_pi16, _mm_cmpeq_pi32,
2005         _mm_cmpgt_pi32, _mm_adds_pi8, _mm_adds_pi16, _mm_adds_pu8,
2006         _mm_adds_pu16, _mm_subs_pi8, _mm_subs_pi16, _mm_subs_pu8,
2007         _mm_subs_pu16, _mm_madd_pi16, _mm_mulhi_pi16, _mm_mullo_pi16,
2008         _mm_sll_pi16, _mm_sra_pi16, _mm_srl_pi16, _mm_set1_pi16, _mm_set1_pi8):
2009         Change 'vector' to '__vector'.
2010         * gcc/config/rs6000/xmmintrin.h (_mm_cvtps_pi32, _mm_cvttps_pi32,
2011         _mm_cvtps_pi16, _mm_cvtps_pi8, _mm_max_pi16, _mm_max_pu8, _mm_min_pi16,
2012         _mm_min_pu8, _mm_mulhi_pu16, _mm_shuffle_pi16, _mm_avg_pu8,
2013         _mm_avg_pu16): Likewise.  And, whitespace corrections.
2015 2018-10-29  Richard Biener  <rguenther@suse.de>
2017         PR tree-optimization/87785
2018         * tree-vect-slp.c (vect_gather_slp_loads): Only gather
2019         internal defs.
2021 2018-10-29  Olivier Hainque  <hainque@adacore.com>
2023         * VXWORKS_NET_LIBS_RTP: New macro, network part of VXWORKS_LIBS_RTP.
2025 2018-10-29  Olivier Hainque  <hainque@adacore.com>
2027         * config/vxworks.h (VXWORKS_PERSONALITY): New VxWorks
2028         ports configuration macro, defaults to "gnu".
2029         (VXWORKS_OS_CPP_BUILTINS): Use it. Feed TOOL and
2030         TOOL_FAMILY instead of _VX_TOOL/_VXTOOL_FAMILY.
2032 2018-10-29  Olivier Hainque  <hainque@adacore.com>
2034         * config/vxworks.h (CLEAR_INSN_CACHE): #undef before #define.
2036 2018-10-29  Richard Biener  <rguenther@suse.de>
2038         PR tree-optimization/87790
2039         * tree-vect-slp.c (vect_mark_slp_stmts): Simplify.
2040         (vect_make_slp_decision): Adjust.
2041         (vect_slp_analyze_bb_1): Likewise.
2042         (vect_detect_hybrid_slp_stmts): Properly union SLP type over
2043         edges.
2045 2018-10-29  Richard Biener  <rguenther@suse.de>
2047         PR tree-optimization/87785
2048         * tree-vect-slp.c (vect_build_slp_tree_2): Remove loads argument
2049         and processing.
2050         (vect_build_slp_tree): Likewise.
2051         (vect_gather_slp_loads): New function.
2052         (vect_analyze_slp_instance): Gather loads separately from the
2053         SLP tree build.
2055 2018-10-29  Martin Liska  <mliska@suse.cz>
2057         * Makefile.in: Make dependency to json.o.
2058         * doc/gcov.texi: Document new JSON format, remove
2059         old intermediate format documentation.
2060         * gcov.c (struct function_info): Come up with m_name and
2061         m_demangled_name.
2062         (function_info::function_info): Initialize it.
2063         (function_info::~function_info): Release it.
2064         (main): Rename flag_intermediate_format to flag_json_format.
2065         (print_usage): Describe --json-format.
2066         (process_args): Set flag_json_format.
2067         (output_intermediate_line): Remove.
2068         (output_intermediate_json_line): Likewise.
2069         (get_gcov_intermediate_filename): Return new extension
2070         ".gcov.json.gz".
2071         (output_intermediate_file): Implement JSON emission.
2072         (output_json_intermediate_file): Implement JSON emission.
2073         (generate_results): Use ::get_name for function name.
2074         Handle JSON output file.
2075         (read_graph_file): Use ::get_name instead of cplus_demangle.
2076         (read_count_file): Likewise.
2077         (solve_flow_graph): Likewise.
2078         (add_line_counts): Likewise.
2079         (accumulate_line_counts): Use new flag_json_format.
2080         (output_function_details): Use ::get_name instead of cplus_demangle.
2081         (output_lines): Likewise.
2082         * json.cc (test_writing_literals): Add new tests.
2083         * json.h (class literal): Add new boolean constructor.
2085 2018-10-29  Segher Boessenkool  <segher@kernel.crashing.org>
2087         PR rtl-optimization/87701
2088         PR rtl-optimization/87780
2089         * combine.c (make_more_copies): Rewrite.
2091 2018-10-28  Kugan Vivekanandarajah  <kuganv@linaro.org>
2093         * doc/generic.texi (ABSU_EXPR): Document.
2094         * match.pd (absu(x)*absu(x) -> x*x): Handle.
2095         (absu(absu(X)) -> absu(X)): Likewise.
2096         (absu(-X) -> absu(X)): Likewise.
2097         (absu(X)  where X is nonnegative -> X): Likewise.
2099 2018-10-28  Iain Buclaw  <ibuclaw@gdcproject.org>
2101         * Makefile.in (tm_d_file_list, tm_d_include_list): New variables.
2102         (TM_D_H, D_TARGET_DEF, D_TARGET_H, D_TARGET_OBJS): New variables.
2103         (tm_d.h, cs-tm_d.h, default-d.o): New rules.
2104         (d/d-target-hooks-def.h, s-d-target-hooks-def-h): New rules.
2105         (s-tm-texi): Also check timestamp on d-target.def.
2106         (generated_files): Add TM_D_H and d-target-hooks-def.h.
2107         (build/genhooks.o): Also depend on D_TARGET_DEF.
2108         * config.gcc (tm_d_file, d_target_objs, target_has_targetdm): New
2109         variables.
2110         * config/aarch64/aarch64-d.c: New file.
2111         * config/aarch64/aarch64-linux.h (GNU_USER_TARGET_D_CRITSEC_SIZE):
2112         Define.
2113         * config/aarch64/aarch64-protos.h (aarch64_d_target_versions): New
2114         prototype.
2115         * config/aarch64/aarch64.h (TARGET_D_CPU_VERSIONS): Define.
2116         * config/aarch64/t-aarch64 (aarch64-d.o): New rule.
2117         * config/arm/arm-d.c: New file.
2118         * config/arm/arm-protos.h (arm_d_target_versions): New prototype.
2119         * config/arm/arm.h (TARGET_D_CPU_VERSIONS): Define.
2120         * config/arm/linux-eabi.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2121         * config/arm/t-arm (arm-d.o): New rule.
2122         * config/default-d.c: New file.
2123         * config/glibc-d.c: New file.
2124         * config/gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2125         * config/i386/i386-d.c: New file.
2126         * config/i386/i386-protos.h (ix86_d_target_versions): New prototype.
2127         * config/i386/i386.h (TARGET_D_CPU_VERSIONS): Define.
2128         * config/i386/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2129         (GNU_USER_TARGET_D_CRITSEC_SIZE): Define.
2130         * config/i386/t-i386 (i386-d.o): New rule.
2131         * config/kfreebsd-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2132         * config/kopensolaris-gnu.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2133         * config/linux-android.h (ANDROID_TARGET_D_OS_VERSIONS): Define.
2134         * config/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2135         * config/mips/linux-common.h (EXTRA_TARGET_D_OS_VERSIONS): Define.
2136         * config/mips/mips-d.c: New file.
2137         * config/mips/mips-protos.h (mips_d_target_versions): New prototype.
2138         * config/mips/mips.h (TARGET_D_CPU_VERSIONS): Define.
2139         * config/mips/t-mips (mips-d.o): New rule.
2140         * config/powerpcspe/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2141         * config/powerpcspe/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2142         * config/powerpcspe/powerpcspe-d.c: New file.
2143         * config/powerpcspe/powerpcspe-protos.h (rs6000_d_target_versions):
2144         New prototype.
2145         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
2146         Support GNU D by using 0 as the language type.
2147         * config/powerpcspe/powerpcspe.h (TARGET_D_CPU_VERSIONS): Define.
2148         * config/powerpcspe/t-powerpcspe (powerpcspe-d.o): New rule.
2149         * config/riscv/riscv-d.c: New file.
2150         * config/riscv/riscv-protos.h (riscv_d_target_versions): New
2151         prototype.
2152         * config/riscv/riscv.h (TARGET_D_CPU_VERSIONS): Define.
2153         * config/riscv/t-riscv (riscv-d.o): New rule.
2154         * config/rs6000/linux.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2155         * config/rs6000/linux64.h (GNU_USER_TARGET_D_OS_VERSIONS): Define.
2156         * config/rs6000/rs6000-d.c: New file.
2157         * config/rs6000/rs6000-protos.h (rs6000_d_target_versions): New
2158         prototype.
2159         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
2160         Support GNU D by using 0 as the language type.
2161         * config/rs6000/rs6000.h (TARGET_D_CPU_VERSIONS): Define.
2162         * config/rs6000/t-rs6000 (rs6000-d.o): New rule.
2163         * config/s390/s390-d.c: New file.
2164         * config/s390/s390-protos.h (s390_d_target_versions): New prototype.
2165         * config/s390/s390.h (TARGET_D_CPU_VERSIONS): Define.
2166         * config/s390/t-s390 (s390-d.o): New rule.
2167         * config/sparc/sparc-d.c: New file.
2168         * config/sparc/sparc-protos.h (sparc_d_target_versions): New
2169         prototype.
2170         * config/sparc/sparc.h (TARGET_D_CPU_VERSIONS): Define.
2171         * config/sparc/t-sparc (sparc-d.o): New rule.
2172         * config/t-glibc (glibc-d.o): New rule.
2173         * configure: Regenerated.
2174         * configure.ac (tm_d_file): New variable.
2175         (tm_d_file_list, tm_d_include_list, d_target_objs): Add substitutes.
2176         * doc/contrib.texi (Contributors): Add self for the D frontend.
2177         * doc/frontends.texi (G++ and GCC): Mention D as a supported language.
2178         * doc/install.texi (Configuration): Mention libphobos as an option for
2179         --enable-shared.  Mention d as an option for --enable-languages.
2180         (Testing): Mention check-d as a target.
2181         * doc/invoke.texi (Overall Options): Mention .d, .dd, and .di as file
2182         name suffixes.  Mention d as a -x option.
2183         * doc/sourcebuild.texi (Top Level): Mention libphobos.
2184         * doc/standards.texi (Standards): Add section on D language.
2185         * doc/tm.texi: Regenerated.
2186         * doc/tm.texi.in: Add @node for D language and ABI, and @hook for
2187         TARGET_CPU_VERSIONS, TARGET_D_OS_VERSIONS, and TARGET_D_CRITSEC_SIZE.
2188         * dwarf2out.c (is_dlang): New function.
2189         (gen_compile_unit_die): Use DW_LANG_D for D.
2190         (declare_in_namespace): Return module die for D, instead of adding
2191         extra declarations into the namespace.
2192         (gen_namespace_die): Generate DW_TAG_module for D.
2193         (gen_decl_die): Handle CONST_DECLSs for D.
2194         (dwarf2out_decl): Likewise.
2195         (prune_unused_types_walk_local_classes): Handle DW_tag_interface_type.
2196         (prune_unused_types_walk): Handle DW_tag_interface_type same as other
2197         kinds of aggregates.
2198         * gcc.c (default_compilers): Add entries for .d, .dd and .di.
2199         * genhooks.c: Include d/d-target.def.
2201 2018-10-28  Iain Sandoe  <iain@sandoe.co.uk>
2203         PR target/85669
2204         * config/rs6000/darwin.h (STACK_BOUNDARY): New.
2205         (RS6000_STARTING_FRAME_OFFSET): Adjust to preserve 16byte alignment.
2206         (STACK_DYNAMIC_OFFSET): Likewise.
2208 2018-10-27  Sandra Loosemore  <sandra@codesourcery.com>
2210         PR target/80024
2211         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Fix
2212         error message.
2214 2018-10-26  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
2216         * doc/extend.texi (PowerPC builtins): Fix __builtin_unpack_ibm128
2217         return type and other typos.
2219 2018-10-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
2221         * config/rs6000/rs6000-string.c (expand_strncmp_gpr_sequence): Change to
2222         a shorter sequence with fewer branches.
2223         (emit_final_str_compare_gpr): Ditto.
2225 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
2227         * config/rs6000/tmmintrin.h: New file.
2228         * config.gcc (powerpc*-*-*): Add tmmintrin.h to extra_headers.
2230 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
2232         * config/rs6000/mmintrin.h: Enable 32bit compilation.
2233         * config/rs6000/xmmintrin.h: Likewise.
2235 2018-10-26  Paul A. Clarke  <pc@us.ibm.com>
2237         * config/rs6000/xmmintrin.h (_mm_extract_pi16): Fix for big-endian.
2239 2018-10-26  Richard Biener  <rguenther@suse.de>
2241         * tree-vect-slp.c (vect_mark_slp_stmts): Add visited hash_set
2242         and wrapper.
2243         (vect_mark_slp_stmts_relevant): Likewise.
2244         (vect_detect_hybrid_slp_stmts): Likewise.
2245         (vect_bb_slp_scalar_cost): Likewise.
2246         (vect_remove_slp_scalar_calls): Likewise.
2248 2018-10-26  Jan Hubicka  <jh@suse.cz>
2250         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix recursion.
2251         (warn_types_mismatch): Fix walk of DECL_NAME.
2252         (odr_types_equivalent_p): Fix overactive assert.
2254 2018-10-26  Richard Biener  <rguenther@suse.de>
2256         PR tree-optimization/87105
2257         * tree-vectorizer.h (_slp_tree::refcnt): New member.
2258         * tree-vect-slp.c (vect_free_slp_tree): Decrement and honor
2259         refcnt.
2260         (vect_create_new_slp_node): Initialize refcnt to one.
2261         (bst_traits): Move.
2262         (scalar_stmts_set_t, bst_fail): Remove.
2263         (vect_build_slp_tree_2): Add bst_map argument and adjust calls.
2264         (vect_build_slp_tree): Add bst_map argument and lookup
2265         already created SLP nodes.
2266         (vect_print_slp_tree): Handle a SLP graph, print SLP node
2267         addresses.
2268         (vect_slp_rearrange_stmts): Handle a SLP graph.
2269         (vect_analyze_slp_instance): Adjust and free SLP nodes from
2270         the CSE map.  Fix indenting.
2271         (vect_schedule_slp_instance): Add short-cut.
2273 2018-10-26  Martin Liska  <mliska@suse.cz>
2275         PR testsuite/86158
2276         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Hash with
2277         addr_expr and not with pointers.
2279 2018-10-26  Jan Hubicka  <jh@suse.cz>
2281         * tree.c (free_lang_data_in_type): Only check main variants.
2282         * ipa-devirt.c (warn_odr): Make static.
2283         (types_same_for_odr): Drop strict variant.
2284         (types_odr_comparable): Likewise.
2285         (odr_or_derived_type_p): Look for main variants.
2286         (odr_name_hasher::equal): Cleanup comment.
2287         (odr_subtypes_equivalent): Add warn and warned arguments; check main
2288         variants.
2289         (type_variants_equivalent_p): break out from ...
2290         (odr_types_equivalent): ... here; go for main variants where needed.
2291         (warn_odr): ... here; turn static.
2292         (warn_types_mismatch): Compare mangled names of main variants.
2293         * ipa-utils.h (types_odr_comparable): Drop strict parameter.
2294         (type_with_linkage_p): Sanity check that we look at main variant.
2295         * lto.c (lto_read_decls): Only consider main variant to be ODR type.
2296         * tree.h (types_same_for_odr): Drop strict argument.
2298 2018-10-26  Richard Biener  <rguenther@suse.de>
2300         PR tree-optimization/87746
2301         * tree-vect-data-refs.c (vect_update_misalignment_for_peel):
2302         Simplify and fix WRT strided store groups with size not
2303         equal to step in element count.
2304         (vect_analyze_group_access_1): Dump the whole group.
2306 2018-10-25  Carl Love  <cel@us.ibm.com>
2308         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_VSCEDPGT,
2309         P9V_BUILTIN_VEC_VSCEDPLT, P9V_BUILTIN_VEC_VSCEDPEQ,
2310         P9V_BUILTIN_VEC_VSCEDPUO): Rename base overloaded name.  Add quad
2311         precicion entry for each overloaded builtin.
2312         * config/rs6000/rs6000-builtin.def (VSCEDPGT, VSCEDPLT, VSCEDPEQ,
2313         VSCEDPUO): Rename overloaded name.
2314         (VSCEDPGT, VSCEQPGT, VSCEDPLT, VSCEQPLT, VSCEDPEQ, VSCEQPEQ,
2315         VSCEDPUO, VSCEQPUO): Add defitions for overloaded builtins.
2316         * config/rs6000/vsx.md (xscmpexpqp_<code>_<mode>): Add
2317         define_expand for xscmpexqp instruction.
2318         (*xscmpexpqp): Add define_insn for the xscmpexqp instruction.
2320 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
2321             Jinsong Ji <jji@us.ibm.com>
2323         * config/rs6000/emmintrin.h (_mm_slli_epi16): Replace deprecated
2324         function with vec_sl.
2325         (_mm_slli_epi32): Likewise.
2326         (_mm_slli_epi64): Likewise.
2327         (_mm_srai_epi16): Replace deprecated function with vec_sra.
2328         (_mm_srai_epi32): Likewise.
2329         (_mm_srli_epi16): Replace deprecated function with vec_sr.
2330         (_mm_srli_epi32): Likewise.
2331         (_mm_srli_epi64): Likewise.
2332         (_mm_sll_epi16): Replace deprecated function with vec_sl.
2333         (_mm_sll_epi32): Likewise.
2334         (_mm_sll_epi64): Likewise.
2335         (_mm_sra_epi16): Replace deprecated function with vec_sra.
2336         (_mm_sra_epi32): Likewise.
2337         (_mm_srl_epi16): Replace deprecated function with vec_sr.
2338         (_mm_srl_epi32): Likewise.
2339         (_mm_srl_epi64): Likewise.
2341 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
2342             Jinsong Ji <jji@us.ibm.com>
2344         * gcc/config/rs6000/emmintrin.h (_mm_sll_epi16): Replace
2345         comparison operators with vec_cmp* for compatibility due to
2346         unfortunate history; clean up formatting and use types more
2347         appropriately.
2348         (_mm_sll_epi32): Likewise.
2349         (_mm_sll_epi64): Likewise.
2350         (_mm_srl_epi16): Likewise.
2351         (_mm_srl_epi32): Likewise.
2352         (_mm_srl_epi64): Likewise.
2354 2018-10-25  Bill Schmidt  <wschmidt@linux.ibm.com>
2355             Jinsong Ji <jji@us.ibm.com>
2357         * config/rs6000/emmintrin.h (_mm_sll_epi64): Remove wrong cast.
2358         * config/rs6000/xmmintrin.h (_mm_min_ps): Change m's type to
2359         __vector __bool int.  Use vec_cmpgt in preference to deprecated
2360         function vec_vcmpgtfp.
2361         (_mm_max_ps): Likewise.
2363 2018-10-25  Jeff Law  <law@redhat.com>
2365         * config/rl78/rl78.c (insn_ok_now): Always re-recognize the insn
2366         if returning false.
2368 2018-10-25  Martin Sebor  <msebor@redhat.com>
2370         * doc/extend.texi (aligned): Expand attribute description.
2371         (Alignment): Rename section.  Discuss function arguments.
2373 2018-10-25  Jan Hubicka  <jh@suse.cz>
2375         * ipa-devirt.c (main_odr_variant): Remove.
2376         (hash_odr_name, types_same_for_odr, types_odr_comparable,
2377         odr_name_hasher::equal, odr_subtypes_equivalent_p):
2378         Drop use of main_odr_variant.
2379         (add_type_duplicate): Silence confused warnings on integer types.
2380         (get_odr_type): Always look for main variant.
2381         (register_odr_type): Simplify.
2383 2018-10-25  Richard Biener  <rguenther@suse.de>
2385         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses):
2386         Initialize ng to silence error with release checking bootstrap.
2388 2018-10-25  Richard Biener  <rguenther@suse.de>
2390         * tree-if-conv.c: Include tree-ssa-sccvn.h.
2391         (tree_if_conversion): Run CSE on the if-converted loop body.
2393 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
2395         * config/s390/constraints.md (ZL): New constraint.
2396         * config/s390/s390.c (legitimate_pic_operand_p): Accept LARL
2397         operands.
2398         * config/s390/s390.md (movdi_larl): Remove.
2399         (movdi_64): Add the LARL alternative.
2401 2018-10-25  Ilya Leoshkevich  <iii@linux.ibm.com>
2403         PR bootstrap/87747
2404         * rtl.c (RTX_CODE_HWINT_P_1): New helper macro.
2405         (RTX_CODE_HWINT_P): New macro.
2406         (rtx_code_size): Use RTX_CODE_HWINT_P ().
2408 2018-10-25  Jan Hubicka  <jh@suse.cz>
2410         * ipa-devirt.c (odr_types_equivalent_p): Do not ICE if one of types
2411         is anonymous.
2413 2018-10-25  Richard Biener  <rguenther@suse.de>
2415         PR tree-optimization/87665
2416         PR tree-optimization/87745
2417         * tree-vectorizer.h (get_earlier_stmt): Remove.
2418         (get_later_stmt): Pick up UID from the original non-pattern stmt.
2420 2018-10-25  Sam Tebbs  <sam.tebbs@arm.com>
2422         * options.texi (Deprecated): Move list to Var section.
2424 2018-10-24  Bill Schmidt  <wschmidt@linux.ibm.com>
2425             Jinsong Ji <jji@us.ibm.com>
2427         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Change deprecated
2428         __vector long to __vector long long.
2429         (_mm_cvtpd_ps): Likewise.
2430         (_mm_cvttpd_epi32): Likewise.
2431         (_mm_cvtpi32_pd): Likewise.
2432         (_mm_unpackhi_epi64): Likewise.
2433         (_mm_unpacklo_epi64): Likewise.
2435 2018-10-24  Segher Boessenkool  <segher@kernel.crashing.org>
2437         PR rtl-optimization/87720
2438         * combine.c (make_more_copies): Skip if the dest is pc_rtx.
2440 2018-10-24  Alexandre Oliva <aoliva@redhat.com>
2442         * gimple-ssa-isolate-paths.c
2443         (find_implicit_erroneous_behavior): Do not change code if the
2444         pass is running for warnings only.
2445         (find_explicit_erroneous_behavior): Likewise.
2447 2018-10-24  Michael Meissner  <meissner@linux.ibm.com>
2449         * config/rs6000/rs6000.c (TARGET_MANGLE_DECL_ASSEMBLER_NAME):
2450         Define as rs6000_mangle_decl_assembler_name.
2451         (rs6000_mangle_decl_assembler_name): If the user switched from IBM
2452         long double to IEEE long double, switch the names of the long
2453         double built-in functions to be <func>f128 instead of <func>l.
2455 2018-10-24  Martin Sebor  <msebor@redhat.com>
2457         * doc/extend.texi (nonnull): List no-argument form.  Reference
2458         -fno-delete-null-pointer-checks and -fisolate-erroneous-paths-attribute.
2460 2018-10-24  Richard Biener  <rguenther@suse.de>
2462         * tree-ssa-sccvn.c (do_rpo_vn): Free rpo_state.
2464 2018-10-24  Martin Liska  <mliska@suse.cz>
2466         PR tree-optimization/84436
2467         * tree-switch-conversion.c (switch_conversion::contains_same_values_p):
2468         Remove.
2469         (switch_conversion::contains_linear_function_p): New.
2470         (switch_conversion::build_one_array): Support linear
2471         transformation on input.
2472         * tree-switch-conversion.h (struct switch_conversion): Add
2473         contains_linear_function_p declaration.
2475 2018-10-24  Richard Biener  <rguenther@suse.de>
2477         * varasm.c (const_hash_1): Return hash of ADDR_EXPR
2478         if its argument is CONSTANT_CLASS_P.
2480 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
2482         * ipa-utils.h (type_with_linkage_p): No longer check for TYPE_STUB_DECL;
2483         it is wrong for forward declarations.
2485 2018-10-24  Ilya Leoshkevich  <iii@linux.ibm.com>
2487         * config/s390/s390.c (s390_check_qrst_address): Add the missing
2488         SYMBOL_REF_P () check.
2490 2018-10-24  Richard Biener  <rguenther@suse.de>
2492         PR tree-optimization/87105
2493         * tree-vect-data-refs.c (vect_analyze_group_access_1): Adjust
2494         dump classification.
2495         (vect_analyze_data_ref_accesses): Handle duplicate loads and
2496         stores by splitting the affected group after the fact.
2497         * tree-vect-slp.c (vect_build_slp_tree_2): Dump when we
2498         fail the SLP build because of size constraints.
2500 2018-10-24  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
2502         * configure.ac (gcc_cv_ld_aligned_shf_merge): New test.
2503         * configure: Regenerate.
2504         * config.in: Regenerate.
2505         * varasm.c (mergeable_string_section): Use readonly_data_section
2506         if linker doesn't support SHF_MERGE with alignment > 8.
2507         (mergeable_constant_section): Likewise.
2509 2018-10-24  Richard Biener  <rguenther@suse.de>
2511         PR tree-optimization/84013
2512         * tree-ssa-structalias.c (struct msdi_data): New struct for
2513         marshalling data to walk_stmt_load_store_ops.
2514         (maybe_set_dependence_info): Refactor as callback for
2515         walk_stmt_load_store_ops.
2516         (compute_dependence_clique): Set restrict info on all stmt kinds.
2518 2018-10-24  Martin Liska  <mliska@suse.cz>
2520         * cgraph.c (cgraph_node::dump):
2521         Remove reduntant dumps and make tp_first_run dump more compact.
2523 2018-10-24  Richard Biener  <rguenther@suse.de>
2525         PR tree-optimization/87665
2526         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Adjust
2527         to reflect reality.
2529 2018-10-12  Jeff Law  <law@redhat.com>
2531         * config/h8300/h8300.c (h8300_expand_prologue): Fix stm generation
2532         for H8/S.
2534 2018-10-23  Richard Biener  <rguenther@suse.de>
2536         * tree-vrp.c (add_assert_info): Guard dump_printf with
2537         dump_enabled_p.
2538         * gimple-ssa-evrp-analyze.c
2539         (evrp_range_analyzer::record_ranges_from_incoming_edge):
2540         Use value_range::ignore_equivs_equal_p.
2542 2018-10-23  Richard Biener  <rguenther@suse.de>
2544         PR tree-optimization/87105
2545         PR tree-optimization/87608
2546         * passes.def (pass_all_early_optimizations): Add early phi-opt
2547         after dce.
2548         * tree-ssa-phiopt.c (value_replacement): Ignore NOPs and predicts in
2549         addition to debug stmts.
2550         (tree_ssa_phiopt_worker): Add early_p argument, do only min/max
2551         and abs replacement early.
2552         * tree-cfg.c (gimple_empty_block_p): Likewise.
2554 2018-10-23  Richard Earnshaw  <rearnsha@arm.com>
2556         PR target/86383
2557         * config.gcc (arm*-*-netbsdelf*): Default to StrongARM if no CPU
2558         specified to configure.
2559         (arm*-*-*): Use ARM7TDMI as the target CPU if no default provided.
2561 2018-10-23  Richard Biener  <rguenther@suse.de>
2563         PR tree-optimization/87700
2564         * tree-ssa-copy.c (set_copy_of_val): Fix change detection logic.
2566 2018-10-23  Jakub Jelinek  <jakub@redhat.com>
2568         PR target/87674
2569         * config/i386/avx512vlintrin.h (_mm_mask_mullo_epi32): Change type of
2570         second argument from __mmask16 to __mmask8.
2571         * config/i386/avx512vlbwintrin.h (_mm_mask_packus_epi32,
2572         _mm_mask_packs_epi32): Likewise.
2573         * config/i386/avx512pfintrin.h (_mm512_mask_prefetch_i64scatter_ps):
2574         Likewise.
2575         (_mm512_mask_prefetch_i64scatter_pd): Likewise.  Formatting fix.
2577 2018-10-23  Richard Biener  <rguenther@suse.de>
2579         * tree-vect-stmts.c (vect_analyze_stmt): Fix typo in comment.
2581 2018-10-23  Richard Biener  <rguenther@suse.de>
2583         PR tree-optimization/86144
2584         * tree-vect-stmts.c (vect_analyze_stmt): Prefer -mveclibabi
2585         over simd attribute.
2587 2018-10-23  Richard Biener  <rguenther@suse.de>
2589         PR tree-optimization/87693
2590         * tree-ssa-threadedge.c (thread_around_empty_blocks): Handle
2591         the case we do not find the taken edge.
2593 2018-10-22  Bill Schmidt  <wschmidt@linux.ibm.com>
2594             Jinsong Ji  <jji@us.ibm.com>
2596         * config/rs6000/emmintrin.h (_MM_SHUFFLE2): Comment cleanup.
2597         (_mm_store_pd): Use unaligned vector type for pointer cast.
2598         (_mm_maskmoveu_si128): Likewise.
2599         * config/rs6000/xmmintrin.h (__m128_u): New typedef.
2600         (_mm_store_ps): Use unaligned vector type for pointer cast.
2602 2018-10-22  Paul Koning  <ni1d@arrl.net>
2604         * symtab.c (symtab_node::increase_alignment): Correct max
2605         alignment check.
2607 2018-10-22  Yury Gribov  <tetra2005@gmail.com>
2609         PR tree-optimization/87633
2610         * match.pd: Do not generate unordered integer comparisons.
2612 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
2614         PR rtl-optimization/87600
2615         * combine.c: Add include of expr.h.
2616         (cant_combine_insn_p): Do not combine moves from any hard non-fixed
2617         register to a pseudo.
2618         (make_more_copies): New function, add a copy to a new pseudo after
2619         the moves from hard registers into pseudos.
2620         (rest_of_handle_combine): Declare rebuild_jump_labels_after_combine
2621         later.  Call make_more_copies.
2623 2018-10-22  Andrew Stubbs  <ams@codesourcery.com>
2625         * lra-constraints.c (process_alt_operands): New local array,
2626         matching_early_clobber.  Check matching_early_clobber before
2627         decrementing reject, and set matching_early_clobber after.
2629 2018-10-22  Segher Boessenkool  <segher@kernel.crashing.org>
2631         PR target/87598
2632         * config/rs6000/rs6000.c (print_operand_address): For unexpected RTL
2633         call output_addr_const and hope for the best.
2635 2018-10-22  Richard Biener  <rguenther@suse.de>
2637         * gimple-ssa-evrp-analyze.c
2638         (evrp_range_analyzer::record_ranges_from_incoming_edge): Be
2639         smarter about what ranges to use.
2640         * tree-vrp.c (add_assert_info): Dump here.
2641         (register_edge_assert_for_2): Instead of here at multiple but
2642         not all places.
2644         * gcc.dg/tree-ssa/evrp12.c: New testcase.
2645         * gcc.dg/predict-6.c: Adjust.
2646         * gcc.dg/tree-ssa/vrp33.c: Disable EVRP.
2647         * gcc.dg/tree-ssa/vrp02.c: Likewise.
2648         * gcc.dg/tree-ssa/cunroll-9.c: Likewise.
2650 2018-10-22  Steven Bosscher <steven@gcc.gnu.org>
2651         Richard Biener  <rguenther@suse.de>
2653         * bitmap.h: Update data structure documentation, including a
2654         description of bitmap views as either linked-lists or splay trees.
2655         (struct bitmap_element_def): Update comments for splay tree bitmaps.
2656         (struct bitmap_head_def): Likewise.
2657         (bitmap_list_view, bitmap_tree_view): New prototypes.
2658         (bitmap_initialize_stat): Initialize a bitmap_head's indx and
2659         tree_form fields.
2660         (bmp_iter_set_init): Assert the iterated bitmaps are in list form.
2661         (bmp_iter_and_init, bmp_iter_and_compl_init): Likewise.
2662         * bitmap.c (bitmap_elem_to_freelist): Unregister overhead of a
2663         released bitmap element here.
2664         (bitmap_element_free): Remove.
2665         (bitmap_elt_clear_from): Work on splay tree bitmaps.
2666         (bitmap_list_link_element): Renamed from bitmap_element_link.  Move
2667         this function similar ones such that linked-list bitmap implementation
2668         functions are grouped.
2669         (bitmap_list_unlink_element): Renamed from bitmap_element_unlink,
2670         and moved for grouping.
2671         (bitmap_list_insert_element_after): Renamed from
2672         bitmap_elt_insert_after, and moved for grouping.
2673         (bitmap_list_find_element): New function spliced from bitmap_find_bit.
2674         (bitmap_tree_link_left, bitmap_tree_link_right,
2675         bitmap_tree_rotate_left, bitmap_tree_rotate_right, bitmap_tree_splay,
2676         bitmap_tree_link_element, bitmap_tree_unlink_element,
2677         bitmap_tree_find_element): New functions for splay-tree bitmap
2678         implementation.
2679         (bitmap_element_link, bitmap_element_unlink, bitmap_elt_insert_after):
2680         Renamed and moved, see above entries.
2681         (bitmap_tree_listify_from): New function to convert part of a splay
2682         tree bitmap to a linked-list bitmap.
2683         (bitmap_list_view): Convert a splay tree bitmap to linked-list form.
2684         (bitmap_tree_view): Convert a linked-list bitmap to splay tree form.
2685         (bitmap_find_bit): Remove.
2686         (bitmap_clear, bitmap_clear_bit, bitmap_set_bit,
2687         bitmap_single_bit_set_p, bitmap_first_set_bit, bitmap_last_set_bit):
2688         Handle splay tree bitmaps.
2689         (bitmap_copy, bitmap_count_bits, bitmap_and, bitmap_and_into,
2690         bitmap_elt_copy, bitmap_and_compl, bitmap_and_compl_into,
2691         bitmap_compl_and_into, bitmap_elt_ior, bitmap_ior, bitmap_ior_into,
2692         bitmap_xor, bitmap_xor_into, bitmap_equal_p, bitmap_intersect_p,
2693         bitmap_intersect_compl_p, bitmap_ior_and_compl,
2694         bitmap_ior_and_compl_into, bitmap_set_range, bitmap_clear_range,
2695         bitmap_hash): Reject trying to act on splay tree bitmaps.  Make
2696         corresponding changes to use linked-list specific bitmap_element
2697         manipulation functions as applicable for efficiency.
2698         (bitmap_tree_to_vec): New function.
2699         (debug_bitmap_elt_file): New function split out from ...
2700         (debug_bitmap_file): ... here.  Handle splay tree bitmaps.
2701         (bitmap_print): Likewise.
2703         PR tree-optimization/63155
2704         * tree-ssa-propagate.c (ssa_prop_init): Use tree-view for the
2705         SSA edge worklists.
2706         * tree-ssa-coalesce.c (coalesce_ssa_name): Populate used_in_copies
2707         in tree-view.
2709 2018-10-22  Martin Liska  <mliska@suse.cz>
2711         PR tree-optimization/87686
2712         Revert
2713         2018-08-29  Martin Liska  <mliska@suse.cz>
2715         * tree-switch-conversion.c (switch_conversion::expand):
2716         Strenghten assumption about gswitch statements.
2718 2018-10-22  Martin Liska  <mliska@suse.cz>
2720         * ipa-icf.c (sem_item::compare_attributes): Remove.
2721         (sem_item::compare_referenced_symbol_properties): Use
2722         attribute_list_equal instead.
2723         (sem_function::equals_wpa): Likewise.
2724         * ipa-icf.h: Remove compare_attributes.
2726 2018-10-22  Richard Biener  <rguenther@suse.de>
2728         PR middle-end/87682
2729         * mem-stats.h (mem_usage::operator==): Fix pasto.
2731 2018-10-22  Richard Biener  <rguenther@suse.de>
2733         PR tree-optimization/87640
2734         * tree-vrp.c (set_value_range_with_overflow): Decompose
2735         incomplete result.
2736         (extract_range_from_binary_expr_1): Adjust.
2738 2018-10-22  Martin Jambor  <mjambor@suse.cz>
2740         * tree-eh.h (stmt_could_throw_p): Add function parameter.
2741         (stmt_can_throw_external): Likewise.
2742         (stmt_can_throw_internal): Likewise.
2743         * tree-eh.c (lower_eh_constructs_2): Pass cfun to stmt_could_throw_p.
2744         (lower_eh_constructs_2): Likewise.
2745         (stmt_could_throw_p): Add fun parameter, use it instead of cfun.
2746         (stmt_can_throw_external): Likewise.
2747         (stmt_can_throw_internal): Likewise.
2748         (maybe_clean_eh_stmt_fn): Pass cfun to stmt_could_throw_p.
2749         (maybe_clean_or_replace_eh_stmt): Pass cfun to stmt_could_throw_p.
2750         (maybe_duplicate_eh_stmt_fn): Pass new_fun to stmt_could_throw_p.
2751         (maybe_duplicate_eh_stmt): Pass cfun to stmt_could_throw_p.
2752         (pass_lower_eh_dispatch::execute): Pass cfun to
2753         stmt_can_throw_external.
2754         (cleanup_empty_eh): Likewise.
2755         (verify_eh_edges): Pass cfun to stmt_could_throw_p.
2756         * cgraph.c (cgraph_edge::set_call_stmt): Pass a function to
2757         stmt_can_throw_external instead of pushing it to cfun.
2758         (symbol_table::create_edge): Likewise.
2759         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Pass cfun to
2760         stmt_can_throw_internal.
2761         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Pass cfun
2762         to stmt_could_throw_p.
2763         * gimple-ssa-store-merging.c (handled_load): Pass cfun to
2764         stmt_can_throw_internal.
2765         (pass_store_merging::execute): Likewise.
2766         * gimple-ssa-strength-reduction.c
2767         (find_candidates_dom_walker::before_dom_children): Pass cfun to
2768         stmt_could_throw_p.
2769         * gimplify-me.c (gimple_regimplify_operands): Pass cfun to
2770         stmt_can_throw_internal.
2771         * ipa-pure-const.c (check_call): Pass cfun to stmt_could_throw_p and
2772         to stmt_can_throw_external.
2773         (check_stmt): Pass cfun to stmt_could_throw_p.
2774         (check_stmt): Pass cfun to stmt_can_throw_external.
2775         (pass_nothrow::execute): Likewise.
2776         * trans-mem.c (expand_call_tm): Pass cfun to stmt_can_throw_internal.
2777         * tree-cfg.c (is_ctrl_altering_stmt): Pass cfun to
2778         stmt_can_throw_internal.
2779         (verify_gimple_in_cfg): Pass cfun to stmt_could_throw_p.
2780         (stmt_can_terminate_bb_p): Pass cfun to stmt_can_throw_external.
2781         (gimple_purge_dead_eh_edges): Pass cfun to stmt_can_throw_internal.
2782         * tree-complex.c (expand_complex_libcall): Pass cfun to
2783         stmt_could_throw_p and to stmt_can_throw_internal.
2784         (expand_complex_multiplication): Pass cfun to stmt_can_throw_internal.
2785         * tree-inline.c (copy_edges_for_bb): Likewise.
2786         (maybe_move_debug_stmts_to_successors): Likewise.
2787         * tree-outof-ssa.c (ssa_is_replaceable_p): Pass cfun to
2788         stmt_could_throw_p.
2789         * tree-parloops.c (oacc_entry_exit_ok_1): Likewise.
2790         * tree-sra.c (scan_function): Pass cfun to stmt_can_throw_external.
2791         * tree-ssa-alias.c (stmt_kills_ref_p): Pass cfun to
2792         stmt_can_throw_internal.
2793         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise.
2794         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Pass cfun to
2795         stmt_could_throw_p.
2796         (mark_aliased_reaching_defs_necessary_1): Pass cfun to
2797         stmt_can_throw_internal.
2798         * tree-ssa-forwprop.c (pass_forwprop::execute): Likewise.
2799         * tree-ssa-loop-im.c (movement_possibility): Pass cfun to
2800         stmt_could_throw_p.
2801         * tree-ssa-loop-ivopts.c (find_givs_in_stmt_scev): Likewise.
2802         (add_autoinc_candidates): Pass cfun to stmt_can_throw_internal.
2803         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
2804         (convert_mult_to_fma_1): Likewise.
2805         (convert_to_divmod): Likewise.
2806         * tree-ssa-phiprop.c (propagate_with_phi): Likewise.
2807         * tree-ssa-pre.c (compute_avail): Pass cfun to stmt_could_throw_p.
2808         * tree-ssa-propagate.c
2809         (substitute_and_fold_dom_walker::before_dom_children): Likewise.
2810         * tree-ssa-reassoc.c (suitable_cond_bb): Likewise.
2811         (maybe_optimize_range_tests): Likewise.
2812         (linearize_expr_tree): Likewise.
2813         (reassociate_bb): Likewise.
2814         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
2815         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Likewise.
2816         * tree-ssa-strlen.c (adjust_last_stmt): Likewise.
2817         (handle_char_store): Likewise.
2818         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Pass cfun to
2819         stmt_can_throw_internal.
2820         * tree-vect-patterns.c (check_bool_pattern): Pass cfun to
2821         stmt_could_throw_p.
2822         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
2823         (vectorizable_call): Pass cfun to stmt_can_throw_internal.
2824         (vectorizable_simd_clone_call): Likewise.
2825         * value-prof.c (gimple_ic): Pass cfun to stmt_could_throw_p.
2826         (gimple_stringop_fixed_value): Likewise.
2828 2018-10-22  Ilya Leoshkevich  <iii@linux.ibm.com>
2830         * config/s390/s390.c (s390_loadrelative_operand_p): Accept
2831         literal pool references.
2832         (s390_check_qrst_address): Adapt to the new behavior of
2833         s390_loadrelative_operand_p ().
2835 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
2837         PR target/72782
2838         * config/i386/sse.md (*andnot<mode>3_bcst): New.
2840 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
2842         PR target/72782
2843         * config/i386/sse.md (*<code><mode>3_bcst): New.
2845 2018-10-22  H.J. Lu  <hongjiu.lu@intel.com>
2847         PR target/72782
2848         * config/i386/sse.md (avx512bcst): Updated for V4SI, V2DI, V8SI,
2849         V4DI, V16SI and V8DI.
2850         (*sub<mode>3<mask_name>_bcst): New.
2851         (*add<mode>3<mask_name>_bcst): Likewise.
2853 2018-10-21  Bill Schmidt  <wschmidt@linux.ibm.com>
2854             Jinsong Ji  <jji@us.ibm.com>
2856         * config/rs6000/emmintrin.h (_mm_movemask_pd): Replace __vector
2857         __m64 with __vector unsigned long long for compatibility.
2858         (_mm_movemask_epi8): Likewise.
2859         * config/rs6000/xmmintrin.h (_mm_cvtps_pi32): Likewise.
2860         (_mm_cvttps_pi32): Likewise.
2861         (_mm_cvtpi32_ps): Likewise.
2862         (_mm_cvtps_pi16): Likewise.
2863         (_mm_loadh_pi): Likewise.
2864         (_mm_storeh_pi): Likewise.
2865         (_mm_movehl_ps): Likewise.
2866         (_mm_movelh_ps): Likewise.
2867         (_mm_loadl_pi): Likewise.
2868         (_mm_storel_pi): Likewise.
2869         (_mm_movemask_ps): Likewise.
2870         (_mm_shuffle_pi16): Likewise.
2872 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
2874         PR target/72782
2875         * config/i386/avx512fintrin.h (_mm512_fnmsub_round_pd): Use
2876         __builtin_ia32_vfnmsubpd512_mask.
2877         (_mm512_mask_fnmsub_round_pd): Likewise.
2878         (_mm512_fnmsub_pd): Likewise.
2879         (_mm512_mask_fnmsub_pd): Likewise.
2880         (_mm512_maskz_fnmsub_round_pd): Use
2881         __builtin_ia32_vfnmsubpd512_maskz.
2882         (_mm512_maskz_fnmsub_pd): Likewise.
2883         (_mm512_fnmsub_round_ps): Use __builtin_ia32_vfnmsubps512_mask.
2884         (_mm512_mask_fnmsub_round_ps): Likewise.
2885         (_mm512_fnmsub_ps): Likewise.
2886         (_mm512_mask_fnmsub_ps): Likewise.
2887         (_mm512_maskz_fnmsub_round_ps): Use
2888         __builtin_ia32_vfnmsubps512_maskz.
2889         (_mm512_maskz_fnmsub_ps): Likewise.
2890         * config/i386/avx512vlintrin.h (_mm256_mask_fnmsub_pd): Use
2891         __builtin_ia32_vfnmsubpd256_mask.
2892         (_mm256_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256_maskz.
2893         (_mm_mask_fnmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
2894         (_mm_maskz_fnmsub_pd): Use __builtin_ia32_vfnmsubpd128_maskz.
2895         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
2896         (_mm256_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_mask.
2897         (_mm256_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps256_maskz.
2898         (_mm_mask_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_mask.
2899         (_mm_maskz_fnmsub_ps): Use __builtin_ia32_vfnmsubps128_maskz.
2900         * config/i386/fmaintrin.h (_mm_fnmsub_pd): Use
2901         __builtin_ia32_vfnmsubpd.
2902         (_mm256_fnmsub_pd): Use __builtin_ia32_vfnmsubpd256.
2903         (_mm_fnmsub_ps): Use __builtin_ia32_vfnmsubps.
2904         (_mm256_fnmsub_ps): Use __builtin_ia32_vfnmsubps256.
2905         (_mm_fnmsub_sd): Use __builtin_ia32_vfnmsubsd3.
2906         (_mm_fnmsub_ss): Use __builtin_ia32_vfnmsubss3.
2907         * config/i386/i386-builtin.def: Add
2908         __builtin_ia32_vfnmsubpd256_mask,
2909         __builtin_ia32_vfnmsubpd256_maskz,
2910         __builtin_ia32_vfnmsubpd128_mask,
2911         __builtin_ia32_vfnmsubpd128_maskz,
2912         __builtin_ia32_vfnmsubps256_mask,
2913         __builtin_ia32_vfnmsubps256_maskz,
2914         __builtin_ia32_vfnmsubps128_mask,
2915         __builtin_ia32_vfnmsubps128_maskz,
2916         __builtin_ia32_vfnmsubpd512_mask,
2917         __builtin_ia32_vfnmsubpd512_maskz,
2918         __builtin_ia32_vfnmsubps512_mask,
2919         __builtin_ia32_vfnmsubps512_maskz, __builtin_ia32_vfnmsubss3,
2920         __builtin_ia32_vfnmsubsd3, __builtin_ia32_vfnmsubps,
2921         __builtin_ia32_vfnmsubpd, __builtin_ia32_vfnmsubps256 and.
2922         __builtin_ia32_vfnmsubpd256.
2923         * config/i386/sse.md (fma4i_fnmsub_<mode>): New.
2924         (<avx512>_fnmsub_<mode>_maskz<round_expand_name>): Likewise.
2925         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_1):
2926         Likewise.
2927         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_2):
2928         Likewise.
2929         (*<sd_mask_codefor>fma_fnmsub_<mode><sd_maskz_name>_bcst_3):
2930         Likewise.
2931         (fmai_vmfnmsub_<mode><round_name>): Likewise.
2933 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
2935         PR target/72782
2936         * config/i386/avx512fintrin.h (_mm512_fnmadd_round_pd): Use
2937         __builtin_ia32_vfnmaddpd512_mask.
2938         (_mm512_mask_fnmadd_round_pd): Likewise.
2939         (_mm512_fnmadd_pd): Likewise.
2940         (_mm512_mask_fnmadd_pd): Likewise.
2941         (_mm512_maskz_fnmadd_round_pd): Use
2942         __builtin_ia32_vfnmaddpd512_maskz.
2943         (_mm512_maskz_fnmadd_pd): Likewise.
2944         (_mm512_fnmadd_round_ps): Use __builtin_ia32_vfnmaddps512_mask.
2945         (_mm512_mask_fnmadd_round_ps): Likewise.
2946         (_mm512_fnmadd_ps): Likewise.
2947         (_mm512_mask_fnmadd_ps): Likewise.
2948         (_mm512_maskz_fnmadd_round_ps): Use
2949         __builtin_ia32_vfnmaddps512_maskz.
2950         (_mm512_maskz_fnmadd_ps): Likewise.
2951         * config/i386/avx512vlintrin.h (_mm256_mask_fnmadd_pd): Use
2952         __builtin_ia32_vfnmaddpd256_mask.
2953         (_mm256_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256_maskz.
2954         (_mm_mask_fnmadd_pd): Use __builtin_ia32_vfmaddpd128_mask
2955         (_mm_maskz_fnmadd_pd): Use __builtin_ia32_vfnmaddpd128_maskz.
2956         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
2957         (_mm256_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_mask.
2958         (_mm256_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps256_maskz.
2959         (_mm_mask_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_mask.
2960         (_mm_maskz_fnmadd_ps): Use __builtin_ia32_vfnmaddps128_maskz.
2961         * config/i386/fmaintrin.h (_mm_fnmadd_pd): Use
2962         __builtin_ia32_vfnmaddpd.
2963         (_mm256_fnmadd_pd): Use __builtin_ia32_vfnmaddpd256.
2964         (_mm_fnmadd_ps): Use __builtin_ia32_vfnmaddps.
2965         (_mm256_fnmadd_ps): Use __builtin_ia32_vfnmaddps256.
2966         (_mm_fnmadd_sd): Use __builtin_ia32_vfnmaddsd3.
2967         (_mm_fnmadd_ss): Use __builtin_ia32_vfnmaddss3.
2968         * config/i386/i386-builtin.def: Add
2969         __builtin_ia32_vfnmaddpd256_mask,
2970         __builtin_ia32_vfnmaddpd256_maskz,
2971         __builtin_ia32_vfnmaddpd128_mask,
2972         __builtin_ia32_vfnmaddpd128_maskz,
2973         __builtin_ia32_vfnmaddps256_mask,
2974         __builtin_ia32_vfnmaddps256_maskz,
2975         __builtin_ia32_vfnmaddps128_mask,
2976         __builtin_ia32_vfnmaddps128_maskz,
2977         __builtin_ia32_vfnmaddpd512_mask,
2978         __builtin_ia32_vfnmaddpd512_maskz,
2979         __builtin_ia32_vfnmaddps512_mask,
2980         __builtin_ia32_vfnmaddps512_maskz, __builtin_ia32_vfnmaddss3,
2981         __builtin_ia32_vfnmaddsd3, __builtin_ia32_vfnmaddps,
2982         __builtin_ia32_vfnmaddpd, __builtin_ia32_vfnmaddps256 and.
2983         __builtin_ia32_vfnmaddpd256.
2984         * config/i386/sse.md (fma4i_fnmadd_<mode>): New.
2985         (<avx512>_fnmadd_<mode>_maskz<round_expand_name>): Likewise.
2986         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_1):
2987         Likewise.
2988         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_2):
2989         Likewise.
2990         (*<sd_mask_codefor>fma_fnmadd_<mode><sd_maskz_name>_bcst_3):
2991         Likewise.
2992         (fmai_vmfnmadd_<mode><round_name>): Likewise.
2994 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
2996         PR target/72782
2997         * config/i386/avx512fintrin.h (_mm512_fmsub_round_pd): Use
2998         __builtin_ia32_vfmsubpd512_mask.
2999         (_mm512_mask_fmsub_round_pd): Likewise.
3000         (_mm512_fmsub_pd): Likewise.
3001         (_mm512_mask_fmsub_pd): Likewise.
3002         (_mm512_maskz_fmsub_round_pd): Use
3003         __builtin_ia32_vfmsubpd512_maskz.
3004         (_mm512_maskz_fmsub_pd): Likewise.
3005         (_mm512_fmsub_round_ps): Use __builtin_ia32_vfmsubps512_mask.
3006         (_mm512_mask_fmsub_round_ps): Likewise.
3007         (_mm512_fmsub_ps): Likewise.
3008         (_mm512_mask_fmsub_ps): Likewise.
3009         (_mm512_maskz_fmsub_round_ps): Use
3010         __builtin_ia32_vfmsubps512_maskz.
3011         (_mm512_maskz_fmsub_ps): Likewise.
3012         * config/i386/avx512vlintrin.h (_mm256_mask_fmsub_pd): Use
3013         __builtin_ia32_vfmsubpd256_mask.
3014         (_mm256_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd256_maskz.
3015         (_mm_mask_fmsub_pd): Use __builtin_ia32_vfmaddpd128_mask
3016         (_mm_maskz_fmsub_pd): Use __builtin_ia32_vfmsubpd128_maskz.
3017         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
3018         (_mm256_mask_fmsub_ps): Use __builtin_ia32_vfmsubps256_mask.
3019         (_mm256_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps256_maskz.
3020         (_mm_mask_fmsub_ps): Use __builtin_ia32_vfmsubps128_mask.
3021         (_mm_maskz_fmsub_ps): Use __builtin_ia32_vfmsubps128_maskz.
3022         * config/i386/fmaintrin.h (_mm_fmsub_pd): Use
3023         __builtin_ia32_vfmsubpd.
3024         (_mm256_fmsub_pd): Use __builtin_ia32_vfmsubpd256.
3025         (_mm_fmsub_ps): Use __builtin_ia32_vfmsubps.
3026         (_mm256_fmsub_ps): Use __builtin_ia32_vfmsubps256.
3027         (_mm_fmsub_sd): Use __builtin_ia32_vfmsubsd3.
3028         (_mm_fmsub_ss): Use __builtin_ia32_vfmsubss3.
3029         * config/i386/i386-builtin.def: Add
3030         __builtin_ia32_vfmsubpd256_mask,
3031         __builtin_ia32_vfmsubpd256_maskz,
3032         __builtin_ia32_vfmsubpd128_mask,
3033         __builtin_ia32_vfmsubpd128_maskz,
3034         __builtin_ia32_vfmsubps256_mask,
3035         __builtin_ia32_vfmsubps256_maskz,
3036         __builtin_ia32_vfmsubps128_mask,
3037         __builtin_ia32_vfmsubps128_maskz,
3038         __builtin_ia32_vfmsubpd512_mask,
3039         __builtin_ia32_vfmsubpd512_maskz,
3040         __builtin_ia32_vfmsubps512_mask,
3041         __builtin_ia32_vfmsubps512_maskz, __builtin_ia32_vfmsubss3,
3042         __builtin_ia32_vfmsubsd3, __builtin_ia32_vfmsubps,
3043         __builtin_ia32_vfmsubpd, __builtin_ia32_vfmsubps256 and.
3044         __builtin_ia32_vfmsubpd256.
3045         * config/i386/sse.md (fma4i_fmsub_<mode>): New.
3046         (<avx512>_fmsub_<mode>_maskz<round_expand_name>): Likewise.
3047         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_1):
3048         Likewise.
3049         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_2):
3050         Likewise.
3051         (*<sd_mask_codefor>fma_fmsub_<mode><sd_maskz_name>_bcst_3):
3052         Likewise.
3053         (fmai_vmfmsub_<mode><round_name>): Likewise.
3055 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3057         * config/i386/sse.md (*<plusminus_insn><mode>3<mask_name>_bcst_1):
3058         Remove plus.  Renamed to ...
3059         (*sub<mode>3<mask_name>_bcst): This.
3060         (*add<mode>3<mask_name>_bcst_2): Renamede to ...
3061         (*add<mode>3<mask_name>_bcst): This.
3063 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3065         PR target/72782
3066         * config/i386/sse.md (*mul<mode>3<mask_name>_bcst): New.
3068 2018-10-21  H.J. Lu  <hongjiu.lu@intel.com>
3070         PR target/87662
3071         * i386/avx512vlintrin.h (_mm256_or_epi32): New.
3072         (_mm_or_epi32): Likewise.
3073         (_mm256_xor_epi32): Likewise.
3074         (_mm_xor_epi32): Likewise.
3075         (_mm256_or_epi64): Likewise.
3076         (_mm_or_epi64): Likewise.
3077         (_mm256_xor_epi64): Likewise.
3078         (_mm_xor_epi64): Likewise.
3080 2018-10-20  H.J. Lu  <hongjiu.lu@intel.com>
3082         PR target/72782
3083         * config/i386/sse.md (*<avx512>_div<mode>3<mask_name>_bcst): New.
3085 2018-10-20  Jakub Jelinek  <jakub@redhat.com>
3087         PR middle-end/87647
3088         * varasm.c (decode_addr_const): Handle COMPOUND_LITERAL_EXPR.
3090 2018-10-20  Andreas Schwab  <schwab@linux-m68k.org>
3092         * doc/ux.texi: Move @section directly after @node.
3094 2018-10-19  Jakub Jelinek  <jakub@redhat.com>
3096         PR middle-end/85488
3097         PR middle-end/87649
3098         * omp-low.c (check_omp_nesting_restrictions): Diagnose ordered without
3099         depend closely nested inside of loop with ordered clause with
3100         a parameter.
3102 2018-10-19  David Malcolm  <dmalcolm@redhat.com>
3104         * Makefile.in (TEXI_GCCINT_FILES): Add ux.texi.
3105         * doc/gccint.texi: Include ux.texi and use it in top-level menu.
3106         * doc/ux.texi: New file.
3108 2018-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
3110         * config/rs6000/rs6000.h (REG_ALLOC_ORDER): Move 68 (that is, CR0) to
3111         be the first CR field allocated.
3113 2018-10-19  Richard Biener  <rguenther@suse.de>
3115         PR target/87657
3116         * config/i386/i386.c (ix86_builtin_vectorization_cost): Use
3117         TYPE_VECTOR_SUBPARTS and avoid relying on vector mode.
3119 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
3121         PR target/72782
3122         * config/i386/sse.md
3123         (*<plusminus_insn><mode>3<mask_name>_bcst_1): New.
3124         (*add<mode>3<mask_name>_bcst_2): Likewise.
3126 2018-10-19  H.J. Lu  <hongjiu.lu@intel.com>
3128         * config/i386/sse.md
3129         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3130         Replace nonimmediate_operand with register_operand.
3131         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3132         Likewise.
3133         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3134         Likewise.
3136 2018-10-19  Ilya Leoshkevich  <iii@linux.ibm.com>
3138         PR rtl-optimization/87596
3139         * lra-constraints.c (spill_hard_reg_in_range): Use INSN_P () +
3140         lra_get_insn_recog_data () instead of lra_insn_recog_data[]
3141         for instructions in FROM..TO range.
3143 2018-10-19  Eric Botcazou  <ebotcazou@adacore.com>
3145         * cfgexpand.c (expand_one_var): Use specific wording in error message
3146         for non-local frame variables.
3147         * stor-layout.c (layout_decl): Do not issue a warning for them.
3149 2018-10-19  Robin Dapp  <rdapp@linux.ibm.com>
3151         * haifa-sched.c (priority): Add force_recompute parameter.
3152         (apply_replacement): Call priority () with force_recompute = true.
3153         (restore_pattern): Likewise.
3155 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
3157         * simplify-rtx.c (simplify_subreg): Limit mask of vec_merge to
3158         HOST_BITS_PER_WIDE_INT.
3159         (test_vector_ops_duplicate): Likewise.
3161 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
3163         PR target/72782
3164         * config/i386/sse.md (VF_AVX512): New.
3165         (avx512bcst): Likewise.
3166         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_1):
3167         Likewise.
3168         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_2):
3169         Likewise.
3170         (*<sd_mask_codefor>fma_fmadd_<mode><sd_maskz_name>_bcst_3):
3171         Likewise.
3173 2018-10-18  Jonathan Wakely  <jwakely@redhat.com>
3175         * doc/invoke.texi (-dumpversion): Improve grammar.
3176         (-dumpfullversion): Make more consistent with -dumpversion.
3178 2018-10-18  Uros Bizjak  <ubizjak@gmail.com>
3180         * config/i386/i386.c (ix86_emit_fp_unordered_jump):
3181         Set JUMP_LABEL to the jump insn.
3182         (ix86_emit_i387_log1p): Use ix86_expand_branch to expand branch.
3183         Predict emitted jump and add label to jump insn.
3185 2018-10-18  David Malcolm  <dmalcolm@redhat.com>
3187         PR tree-optimization/87562
3188         * input.c (get_substring_ranges_for_loc): Use
3189         LRK_SPELLING_LOCATION rather than LRK_MACRO_EXPANSION_POINT when
3190         getting the linemap for the endpoint.  Verify that it's either
3191         in the same linemap as the start point's spelling location, or
3192         at least in the same file.
3194 2018-10-18  Richard Biener  <rguenther@suse.de>
3196         * config/i386/i386.c (ix86_builtin_vectorization_cost): Do not
3197         feed width-specific load/store costs through ix86_vec_cost.
3198         * config/i386/x86-tune-costs.h (athlon_cost): Adjust.
3199         (k8_cost): Likewise.
3200         (bdver_cost): Likewise.
3201         (znver1_cost): Likewise.
3202         (btver1_cost): Likewise.
3203         (btver2_cost): Likewise.
3205 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
3207         * simplify-rtx.c (simplify_subreg): Call simplify_gen_subreg
3208         to simplify subreg of vec_merge.
3210 2018-10-18  Richard Biener  <rguenther@suse.de>
3212         * config/i386/i386.c: Fix costing of vector FMA.
3214 2018-10-18  Richard Biener  <rguenther@suse.de>
3216         * config/i386/i386.c (ix86_vec_cost): Remove !parallel path
3217         and argument.
3218         (ix86_builtin_vectorization_cost): For vec_construct properly
3219         cost insertion into SSE regs.
3220         (...): Adjust calls to ix86_vec_cost.
3222 2018-10-18  Richard Biener  <rguenther@suse.de>
3224         PR middle-end/87087
3225         Revert
3226         2018-02-07  Richard Biener  <rguenther@suse.de>
3228         PR tree-optimization/84204
3229         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
3230         this place.
3232 2018-10-18  H.J. Lu  <hongjiu.lu@intel.com>
3234         PR target/87537
3235         * simplify-rtx.c (simplify_subreg): Simplify subreg of vec_merge
3236         of vec_duplicate.
3237         (test_vector_ops_duplicate): Add test for a scalar subreg of a
3238         VEC_MERGE of a VEC_DUPLICATE.
3240 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
3242         * doc/cpp.texi (__STDC_VERSION__): Document C2X handling.
3243         * doc/invoke.texi (-std=c2x, -std=gnu2x): Document new options.
3244         * doc/standards.texi (C Language): Document C2X.
3245         * dwarf2out.c (highest_c_language), config/rl78/rl78.c
3246         (rl78_option_override): Handle "GNU C2X" language name.
3248 2018-10-17  Joseph Myers  <joseph@codesourcery.com>
3250         * doc/invoke.texi (-std=c17), doc/standards.texi (C Language):
3251         Document C17 as published in 2018.
3253 2018-10-17  Eric Botcazou  <ebotcazou@adacore.com>
3255         PR middle-end/87623
3256         * fold-const.c (fold_truth_andor_1): If the right side is not constant,
3257         bail out if both sides do not have the same storage order.
3259 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
3261         * bitmap.c (bitmap_head::dump): New.
3262         * bitmap.h (bitmap_head): Add dump().
3263         * gimple-ssa-evrp-analyze.c
3264         (evrp_range_analyzer::try_find_new_range): Adjust for value_range API.
3265         (evrp_range_analyzer::set_ssa_range_info): Same.
3266         (evrp_range_analyzer::record_ranges_from_phis): Same.
3267         (evrp_range_analyzer::record_ranges_from_stmt): Same.
3268         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Same.
3269         * gimple-ssa-sprintf.c (get_int_range): Same.
3270         (format_integer): Same.
3271         (sprintf_dom_walker::handle_gimple_call): Same.
3272         * ipa-cp.c (ipcp_vr_lattice::meet_with_1): Same.
3273         (ipcp_vr_lattice::top_p): Same.
3274         (ipcp_vr_lattice::bottom_p): Same.
3275         (ipcp_vr_lattice::set_to_bottom): Same.
3276         (ipa_vr_operation_and_type_effects): Same.
3277         (propagate_vr_across_jump_function): Same.
3278         (ipcp_store_vr_results): Same.
3279         * ipa-prop.c (struct ipa_vr_ggc_hash_traits): Same.
3280         (ipa_print_node_jump_functions_for_edge): Same.
3281         (ipa_get_value_range): Same.
3282         (ipa_compute_jump_functions_for_edge): Same.
3283         (ipa_write_jump_function): Same.
3284         * tree-ssa-dom.c (simplify_stmt_for_jump_threading): Same.
3285         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis):
3286         Same.
3287         * vr-values.c (set_value_range_to_nonnegative): Same.
3288         (set_value_range_to_truthvalue): Same.
3289         (vr_values::get_value_range): Same.
3290         (vr_values::set_defs_to_varying): Same.
3291         (vr_values::update_value_range): Same.
3292         (symbolic_range_based_on_p): Same.
3293         (vr_values::op_with_boolean_value_range_p): Same.
3294         (vr_values::extract_range_for_var_from_comparison_expr): Same.
3295         (vr_values::extract_range_from_ssa_name): Same.
3296         (vr_values::extract_range_from_binary_expr): Same.
3297         (vr_values::extract_range_from_unary_expr): Same.
3298         (vr_values::extract_range_from_cond_expr): Same.
3299         (vr_values::extract_range_from_comparison): Same.
3300         (vr_values::check_for_binary_op_overflow): Same.
3301         (vr_values::extract_range_basic): Same.
3302         (vr_values::extract_range_from_assignment): Same.
3303         (compare_ranges): Same.
3304         (compare_range_with_value): Same.
3305         (vr_values::adjust_range_with_scev): Same.
3306         (vrp_valueize): Same.
3307         (vrp_valueize_1): Same.
3308         (vr_values::get_vr_for_comparison): Same.
3309         (vr_values::compare_name_with_value): Same.
3310         (vr_values::compare_names): Same.
3311         (vr_values::vrp_evaluate_conditional): Same.
3312         (find_case_label_ranges): Same.
3313         (vr_values::vrp_visit_switch_stmt): Same.
3314         (vr_values::extract_range_from_phi_node): Same.
3315         (vr_values::simplify_div_or_mod_using_ranges): Same.
3316         (vr_values::simplify_bit_ops_using_ranges): Same.
3317         (test_for_singularity): Same.
3318         (range_fits_type_p): Same.
3319         (vr_values::simplify_cond_using_ranges_1): Same.
3320         (vr_values::simplify_switch_using_ranges): Same.
3321         (vr_values::simplify_float_conversion_using_ranges): Same.
3322         (vr_values::two_valued_val_range_p): Same.
3323         (vr_values::add_equivalence): Move to value_range::equiv_add.
3324         * vr-values.h (vr_values::add_equivalence): Remove.
3325         (VR_INITIALIZER): Remove.
3326         * tree-vrp.c (value_range::set): New.
3327         (value_range::equiv_add): New.
3328         (value_range::value_range): New.
3329         (value_range::deep_copy): New.
3330         (value_range::check): New.
3331         (value_range::equal_p): New.
3332         (value_range::ignore_equivs_equal_p): New.
3333         (value_range::operator==): New.
3334         (value_range::operator!=): New.
3335         (value_range::symbolic_p): New.
3336         (value_range::numeric_p): New.
3337         (value_range::set_undefined): New.
3338         (value_range::set_varying): New.
3339         (value_range::may_contain_p): New.
3340         (value_range::equiv_clear): New.
3341         (value_range::singleton_p): New.
3342         (value_range::intersect): New.
3343         (value_range::dump): New.
3344         (value_range::set_and_canonicalize): New.
3345         (set_value_range): Adjust for value_range API.
3346         (set_value_range_to_undefined): Same.
3347         (set_value_range_to_varying): Same.
3348         (set_and_canonicalize_value_range): Same.
3349         (set_value_range_to_nonnull): Same.
3350         (set_value_range_to_null): Same.
3351         (range_is_null): Same.
3352         (range_is_nonnull): Same.
3353         (range_int_cst_p): Same.
3354         (range_int_cst_singleton_p): Same.
3355         (symbolic_range_p): Same.
3356         (range_includes_zero_p): Same.
3357         (value_range_constant_singleton): Same.
3358         (vrp_set_zero_nonzero_bits): Same.
3359         (ranges_from_anti_range): Same.
3360         (extract_range_into_wide_ints): Same.
3361         (extract_range_from_multiplicative_op): Same.
3362         (set_value_range_with_overflow): Same.
3363         (extract_range_from_binary_expr_1): Same.
3364         (extract_range_from_unary_expr): Same.
3365         (dump_value_range): Same.
3366         (debug_value_range): Same.
3367         (vrp_prop::check_array_ref): Same.
3368         (vrp_prop::check_mem_ref): Same.
3369         (vrp_prop::vrp_initialize): Same.
3370         (vrp_prop::visit_stmt): Same.
3371         (intersect_ranges): Same.
3372         (vrp_prop::visit_phi): Same.
3373         (vrp_prop::vrp_finalize): Same.
3374         (determine_value_range_1): Same.
3375         (determine_value_range): Same.
3376         (vrp_intersect_ranges_1): Rename to...
3377         (vrp_intersect_1): this.
3378         (vrp_intersect_ranges): Rename to...
3379         (value_range::intersect_helper): ...this.
3380         (vrp_meet_1): Rename to...
3381         (value_range::union_helper): ...this.
3382         (vrp_meet): Rename to...
3383         (value_range::union_): ...this.
3384         (copy_value_range): Remove.
3385         * tree-vrp.h (struct value_range): Rewrite into a proper class.
3386         (value_range::vrtype): New.
3387         (value_range::type): New.
3388         (value_range::equiv): New.
3389         (value_range::min): New.
3390         (value_range::max): New.
3391         (value_range::varying_p): New.
3392         (value_range::undefined_p): New.
3393         (value_range::null_p): New.
3394         (value_range::equiv_add): New.
3395         (copy_value_range): Remove.
3397 2018-10-17  David Malcolm  <dmalcolm@redhat.com>
3399         * Makefile.in (SELFTEST_TARGETS): New.
3400         (selftest) Change from s-selftest-c to $(SELFTEST_TARGETS).
3401         (C_SELFTEST_FLAGS, C_SELFTEST_DEPS, s-selftest-c, selftest-c-gdb)
3402         (selftest-gdb, selftest-c-valgrind, selftest-valgrind): Move to
3403         c/Make-lang.in.
3404         (CPP_SELFTEST_FLAGS, CPP_SELFTEST_DEPS, s-selftest-c++)
3405         (selftest-c++-gdb, selftest-c++-valgrind): Move to
3406         cp/Make-lang.in.
3407         * configure: Regenerate.
3408         * configure.ac (selftest_languages): New.
3410 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
3412         * tree-vrp.c (extract_range_from_multiplicative_op): Remove
3413         overflow wraps argument.
3414         (extract_range_from_binary_expr_1): Do not pass overflow wraps to
3415         wide_int_range_multiplicative_op.
3416         * wide-int-range.cc (wide_int_range_mult_wrapping): Remove
3417         overflow wraps argument.
3418         (wide_int_range_multiplicative_op): Same.
3419         (wide_int_range_lshift): Same.
3420         (wide_int_range_div): Same.
3421         * wide-int-range.h (wide_int_range_multiplicative_op): Same.
3422         (wide_int_range_lshift): Same.
3423         (wide_int_range_div): Same.
3425 2018-10-17  Aldy Hernandez  <aldyh@redhat.com>
3427         * wide-int-range.h (wide_int_range_shift_undefined_p): Adjust to
3428         use sign as argument.
3429         * tree-vrp.c (extract_range_from_binary_expr_1): Pass sign to
3430         wide_int_range_shift_undefined_p.
3432 2018-10-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
3434         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>):
3435         Rename to...
3436         (@despeculate_copy<ALLI_TI:mode>): ... This.
3437         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): Remove
3438         switch statement.
3440 2018-10-16  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3442         * config.gcc: Obsolete *-*-solaris2.10*.
3443         * doc/install.texi (Specific, *-*-solaris2*): Document it.
3445 2018-10-12  Jeff Law  <law@redhat.com>
3447         * config/ft32/ft32.md (ft32_general_movsrc_operand): Disable
3448         reg + sym +- const_int addressing modes.
3450 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
3452         * common.opt (fdiagnostics-minimum-margin-width=): New option.
3453         * diagnostic-show-locus.c (layout::layout): Apply the minimum
3454         margin width.
3455         (layout::start_annotation_line): Only print up to 3 of the
3456         margin character, to avoid touching the left-hand side.
3457         (selftest::test_diagnostic_show_locus_fixit_lines): Update for
3458         minimum margin width, as set by test_diagnostic_context's ctor.
3459         (selftest::test_fixit_insert_containing_newline): Likewise.
3460         (selftest::test_fixit_insert_containing_newline_2): Likewise.
3461         (selftest::test_line_numbers_multiline_range): Clear
3462         dc.min_margin_width.
3463         * diagnostic.c (diagnostic_initialize): Initialize
3464         min_margin_width.
3465         * diagnostic.h (struct diagnostic_context): Add field
3466         "min_margin_width".
3467         * doc/invoke.texi: Add -fdiagnostics-minimum-margin-width=.
3468         * opts.c (common_handle_option): Handle
3469         OPT_fdiagnostics_minimum_margin_width_.
3470         * selftest-diagnostic.c
3471         (selftest::test_diagnostic_context::test_diagnostic_context):
3472         Initialize min_margin_width to 6.
3473         * toplev.c (general_init): Initialize global_dc->min_margin_width.
3475 2018-10-15  David Malcolm  <dmalcolm@redhat.com>
3477         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
3478         Fix usage of "error_at_rich_loc" in the comment.
3480 2018-10-15  Renlin Li  <renlin.li@arm.com>
3482         PR target/87563
3483         * tree-vectorizer.c (try_vectorize_loop_1): Don't use
3484         if-conversioned loop when it contains ifn with types not
3485         supported by backend.
3486         * internal-fn.c (expand_direct_optab_fn): Add an assert.
3487         (direct_internal_fn_supported_p): New helper function.
3488         * internal-fn.h (direct_internal_fn_supported_p): Declare.
3490 2018-10-15  Jakub Jelinek  <jakub@redhat.com>
3492         PR target/87572
3493         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
3494         Remove OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
3495         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
3497 2018-10-15  Bin Cheng  <bin.cheng@linux.alibaba.com>
3499         PR tree-optimization/87022
3500         * tree-loop-distribution.c (pg_add_dependence_edges): Check all
3501         bits in dist vector rather than the first one.
3503 2018-10-15  Richard Biener  <rguenther@suse.de>
3505         PR middle-end/87610
3506         * tree-ssa-structalias.c (struct vls_data): Add escaped_p member.
3507         (visit_loadstore): When a used restrict tag escaped verify that
3508         the points-to solution of "other" pointers do not include
3509         escaped.
3510         (compute_dependence_clique): If a used restrict tag escaped
3511         communicated that down to visit_loadstore.
3513 2018-10-15  Andreas Krebbel  <krebbel@linux.ibm.com>
3515         * config/s390/s390.c (s390_expand_vec_init): Force vector element
3516         into reg if it isn't a general operand.
3518 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
3520         PR target/87599
3521         * config/i386/sse.md (*vec_dupv2di): Add register source to
3522         movddup.
3524 2018-10-14  H.J. Lu  <hongjiu.lu@intel.com>
3526         PR target/87572
3527         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512F_UNSET):
3528         Add OPTION_MASK_ISA_AVX512IFMA_UNSET,
3529         OPTION_MASK_ISA_AVX5124FMAPS_UNSET and
3530         OPTION_MASK_ISA_AVX5124VNNIW_UNSET.
3532 2018-10-13  Eric Botcazou  <ebotcazou@adacore.com>
3534         * dwarf2cfi.c (struct dw_trace_info): Add args_size_defined_for_eh.
3535         (notice_args_size): Set it in the current trace if no insn that can
3536         throw internally has been seen yet.
3537         (connect_traces): When connecting args_size between traces, allow the
3538         incoming values not to match if there is an insn setting it before the
3539         first insn that can throw internally; in that case, force the creation
3540         of a CFI note on this latter insn.
3542 2018-10-13  Jonathan Wakely  <jwakely@redhat.com>
3544         * opt-problem.h (opt_wrapper): Use template-argument-list when naming
3545         the base class, because using the injected-class-name was not clearly
3546         specified until DR 176.
3548 2018-10-12  Paul Koning  <ni1d@arrl.net>
3550         * config/pdp11/pdp11.md (doloop_end): New expander.
3551         (doloop_end_insn): renamed from "doloop_end".
3552         (addqi3): New pattern.
3553         (subqi3): New pattern.
3554         * config/pdp11/predicates.md (incdec_operand): New predicate.
3556 2018-10-12  Yury Gribov  <tetra2005@gmail.com>
3558         PR middle-end/81376
3559         * real.c (format_helper::can_represent_integral_type_p): New function
3560         * real.h (format_helper::can_represent_integral_type_p): Ditto.
3561         * match.pd: New pattern.
3563 2018-10-12  Alexandre Oliva <oliva@adacore.com>
3565         * configure.ac: Introduce --enable-large-address-aware
3566         to define MINGW_DEFAULT_LARGE_ADDR_AWARE.
3567         * doc/install.texi: Document it.
3568         * configure, config.in: Rebuilt.
3569         * config/i386/mingw32.h (LINK_SPEC_LARGE_ADDR_AWARE): Define,
3570         based on MINGW_DEFAULT_LARGE_ADDR_AWARE.
3571         (LINK_SPEC): Insert it.
3572         * config/i386/mingw-w64.h: Likewise.
3574         * cygming.h (HAVE_GAS_ALIGNED_COMM): Fallback-define.
3576 2018-10-12  Peter Bergner  <bergner@linux.ibm.com>
3578         PR rtl-optimization/87600
3579         * ira-lives (non_conflicting_reg_copy_p): Disable for non LRA targets.
3581 2018-10-12  Paul Koning  <ni1d@arrl.net>
3583         * doc/md.texi (doloop_end): Document that the pattern code may
3584         need to check operand mode.
3586 2018-10-12  Wilco Dijkstra  <wdijkstr@arm.com>
3588         * config/aarch64/aarch64.md (zero_extendsidi2_aarch64): Add alternatives
3589         to zero-extend between int and floating-point registers.
3590         (load_pair_zero_extendsidi2_aarch64): Add alternative for zero-extended
3591         ldp into floating-point registers.  Add type and arch attributes.
3592         (zero_extend<SHORT:mode><GPI:mode>2_aarch64): Add arch attribute.
3593         Use f_loads for type attribute.
3595 2018-10-11  Martin Sebor  <msebor@redhat.com>
3597         * doc/extend.texi (attribute packed): Correct typos.
3599 2018-10-11  Martin Sebor  <msebor@redhat.com>
3601         * doc/extend.texi (attribute flatten): Mention interaction with
3602         noinline.
3604 2018-10-11  Jan Hubicka  <hubicka@ucw.cz>
3606         PR target/87156
3607         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
3608         Set new_decl virtual flag to zero.
3610 2018-10-11  Martin Sebor  <msebor@redhat.com>
3612         PR middle-end/87593
3613         * doc/extend.texi (attribute format_arg): Discuss using multiple
3614         attributes on a single function.
3616 2018-10-11  Giuliano Belinassi  <giuliano.belinassi@usp.br>
3618         PR tree-optimization/86829
3619         * match.pd (sin (atan (x))): New simplification rules.
3620         (cos (atan (x))): Likewise.
3621         * real.c (build_sinatan_real): New function.
3622         * real.h (build_sinatan_real): Prototype.
3624 2018-10-11  Will Schmidt <will_schmidt@vnet.ibm.com>
3626         * config/rs6000/rs6000.c (map_to_integral_tree_type): New helper
3627         function.
3628         (fold_mergeeo_helper): New helper function.
3629         (rs6000_gimple_fold_builtin): Add hooks for vec_mergee and vec_mergeo
3630         intrinsics.  Correct some whitespace indentation issues.
3632 2018-10-11  Wilco Dijkstra  <wdijkstr@arm.com>
3634         PR target/87511
3635         * config/aarch64/aarch64.c (aarch64_mask_and_shift_for_ubfiz_p):
3636         Use HOST_WIDE_INT_1U for shift.
3638 2018-10-11  Doug Rupp  <rupp@adacore.com>
3639             Olivier Hainque  <hainque@adacore.com>
3641         * config/rs6000/vxworks.h (VXWORKS_RELAX_LINK_SPEC): New macro.
3642         Pass --relax to the linker for RTPs.
3643         (LINK_SPEC): Append VXWORKS_RELAX_LINK_SPEC.
3645 2018-10-11  Andrew Stubbs  <ams@codesourcery.com>
3646             Jan Hubicka  <jh@suse.cz>
3647             Martin Jambor  <mjambor@suse.cz>
3649         * print-rtl.c (print_rtx_operand_codes_E_and_V): Print how many times
3650         the same elements are repeated rather than printing all of them.
3651         * read-rtl.c (rtx_reader::read_rtx_operand): Recognize and expand
3652         "repeated" elements.
3653         * read-rtl-function.c (test_loading_repeat): New function.
3654         (read_rtl_function_c_tests): Call test_loading_repeat.
3655         * rtl-tests.c (test_dumping_repeat): New function.
3656         (rtl_tests_c_tests): Call test_dumping_repeat.
3658 2018-10-11  Richard Biener  <rguenther@suse.de>
3660         * config/i386/x86-tune-costs.h (bdver?_memcpy, bdver?_memset,
3661         bdver?_cost): Unify to ...
3662         (bdver_memcpy, bdver_memset, bdver_cost): ... this.
3663         * config/i386/i386.c (processor_cost_table): Adjust.
3665 2018-10-10  Eric Botcazou  <ebotcazou@adacore.com>
3667         PR middle-end/87574
3668         * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on
3669         the thunk when expanding to GIMPLE.
3671 2018-10-10  Bernd Edlinger  <bernd.edlinger@hotmail.de>
3673         * varasm.c (mergeable_string_section): Don't try to move zero-length
3674         strings to the merge section.
3676 2018-10-10  Uros Bizjak  <ubizjak@gmail.com>
3678         PR target/87573
3679         * config/i386/mmx.md (const_vector 0 -> mem splitter): New splitter.
3681 2018-10-10  Jakub Jelinek  <jakub@redhat.com>
3683         PR target/87550
3684         * config/i386/i386-builtin.def (IX86_BUILTIN_RDPMC): Move from args set
3685         to special_args set.
3687 2018-10-10  Richard Biener  <rguenther@suse.de>
3689         * config/i386/sse.md (reduc_plus_scal_v8df, reduc_plus_scal_v4df,
3690         reduc_plus_scal_v2df, reduc_plus_scal_v16sf, reduc_plus_scal_v8sf,
3691         reduc_plus_scal_v4sf): Merge into pattern reducing to half width
3692         and recursing and pattern terminating the recursion on SSE
3693         vector width using ix86_expand_reduc.
3694         (reduc_sminmax_scal_<mode>): Split into part reducing to half
3695         width and recursing and SSE2 vector variant doing the final
3696         reduction with ix86_expand_reduc.
3697         (reduc_uminmax_scal_<mode>): Likewise for the AVX512 variants
3698         with terminating the recursion at AVX level, splitting that
3699         to SSE there.
3701 2018-10-09  David Malcolm  <dmalcolm@redhat.com>
3703         * genmatch.c (error_cb): Rename to...
3704         (diagnostic_cb): ...this, converting int params to enums.
3705         (fatal_at): Update for renaming.
3706         (warning_at): Likewise.
3707         (main): Likewise.
3708         * input.c (selftest::ebcdic_execution_charset::apply):
3709         Update for renaming of...
3710         (selftest::ebcdic_execution_charset::on_error): ...this, renaming
3711         to...
3712         (selftest::ebcdic_execution_charset::on_diagnostic): ...this,
3713         converting level and reason to enums.
3714         (class selftest::lexer_error_sink): Rename to...
3715         (class selftest::lexer_test_options): ...this, renaming field
3716         "m_errors" to "m_diagnostics".
3717         (selftest::lexer_test_options::apply): Update for renaming of...
3718         (selftest::lexer_test_options::on_error): ...this, renaming to...
3719         (selftest::lexer_test_options::on_diagnostic): ...this
3720         converting level and reason to enums.
3721         (selftest::test_lexer_string_locations_raw_string_unterminated):
3722         Update for renamings.
3723         * opth-gen.awk (struct cpp_reason_option_codes_t): Use enum for
3724         "reason".
3726 2018-10-09  Paul A. Clarke  <pc@us.ibm.com>
3728         * config.gcc (powerpc*-*-*): Add pmmintrin.h to extra_headers.
3729         * config/rs6000/pmmintrin.h: New file.
3731 2018-10-09  Eric Botcazou  <ebotcazou@adacore.com>
3733         PR tree-optimization/86659
3734         * gimple-match.h (gimple_match_op constructors): Initialize reverse.
3736 2018-10-09  Richard Biener  <rguenther@suse.de>
3738         PR tree-optimization/63155
3739         * tree-ssa-structalias.c: Include tree-ssa.h.
3740         (get_constraint_for_ssa_var): For undefs return nothing_id.
3741         (find_func_aliases): Cleanup PHI handling.
3743 2018-10-09  Richard Biener  <rguenther@suse.de>
3745         * tree-vectorizer.c (dump_stmt_cost): Fix cut&paste missing
3746         replacements.
3748 2018-10-09  Martin Liska  <mliska@suse.cz>
3750         * asan.c (asan_emit_stack_protection): If a stack variable
3751         is located in a same file as current function, then emit
3752         line info into variable definition string.
3754 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
3756         * print-rtl.c (rtx_writer::print_rtx_operand_code_i): Print column
3757         information.
3759 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
3761         * cgraphunit.c (cgraph_node::expand_thunk): Do not force DECL_IGNORED_P
3762         on the thunk.
3764 2018-10-08  Eric Botcazou  <ebotcazou@adacore.com>
3766         PR tree-optimization/86659
3767         * gimple-match.h (struct gimple_match_op): Add reverse field.
3768         (gimple_match_op::set_op): New overloaded method.
3769         * gimple-match-head.c (maybe_build_generic_op) <BIT_FIELD_REF>: Set
3770         the REF_REVERSE_STORAGE_ORDER flag on the value.
3771         (gimple_simplify) <GIMPLE_ASSIGN>: For BIT_FIELD_REF, propagate the
3772         REF_REVERSE_STORAGE_ORDER flag and avoid simplifying if it is set.
3773         
3774 2018-10-08  Richard Sandiford  <richard.sandiford@arm.com>
3776         PR middle-end/63155
3777         * gimple-ssa-backprop.c (backprop::intersect_uses): Use
3778         FOR_EACH_IMM_USE_FAST instead of FOR_EACH_IMM_USE_STMT.
3780 2018-10-08  H.J. Lu  <hongjiu.lu@intel.com>
3782         PR target/87517
3783         * config/i386/avx512fintrin.h (_mm512_mask_fmaddsub_round_pd):
3784         Defined with __builtin_ia32_vfmaddsubpd512_mask.
3786 2018-10-08  Richard Biener  <rguenther@suse.de>
3788         * config/i386/x86-tune-costs.h (znver1_cost): Make AVX256 vector loads
3789         cost the same as AVX128 ones.
3791 2018-10-08  Paul Koning  <ni1d@arrl.net>
3793         * config/pdp11/pdp11-protos.h (output_block_move): Remove.
3794         (expand_block_move): New function.
3795         * config/pdp11/pdp11.c (output_block_move): Remove.
3796         (expand_block_move): New function.
3797         * config/pdp11/pdp11.h (MOVE_RATIO): New definition.
3798         * config/pdp11/pdp11.md (movmemhi): Use expand_block_move.
3799         (*movmemhi1): Remove.
3801 2018-10-08  Robin Dapp  <rdapp@linux.ibm.com>
3803         * config/s390/2827.md: Increase latencies for some FP instructions.
3805 2018-10-08  Richard Biener  <rguenther@suse.de>
3807         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
3808         Open a dump scope.
3809         * tree-vectorizer.c (dump_stmt_cost): Add cost param and dump it.
3810         * tree-vectorizer.h (dump_stmt_cost): Adjust.
3811         (add_stmt_cost): Dump return value of the hook.
3813 2018-10-08  Richard Biener  <rguenther@suse.de>
3815         PR tree-optimization/63155
3816         * tree-ssa-propagate.c (add_ssa_edge): Do cheap check first.
3817         (ssa_propagation_engine::ssa_propagate): Remove redundant
3818         bitmap bit clearing.
3820 2018-10-05  Peter Bergner  <bergner@linux.ibm.com>
3822         PR rtl-optimization/86939
3823         PR rtl-optimization/87479
3824         * ira.h (non_conflicting_reg_copy_p): New prototype.
3825         * ira-lives.c (ignore_reg_for_conflicts): New static variable.
3826         (make_hard_regno_dead): Don't add conflicts for register
3827         ignore_reg_for_conflicts.
3828         (make_object_dead): Likewise.
3829         (non_conflicting_reg_copy_p): New function.
3830         (process_bb_node_lives): Set ignore_reg_for_conflicts for copies.
3831         Remove special conflict handling of REAL_PIC_OFFSET_TABLE_REGNUM.
3832         * lra-lives.c (ignore_reg_for_conflicts): New static variable.
3833         (make_hard_regno_dead): Don't add conflicts for register
3834         ignore_reg_for_conflicts.  Remove special conflict handling of
3835         REAL_PIC_OFFSET_TABLE_REGNUM.  Remove now unused argument
3836         check_pic_pseudo_p and update callers.
3837         (mark_pseudo_dead): Don't add conflicts for register
3838         ignore_reg_for_conflicts.
3839         (process_bb_lives): Set ignore_reg_for_conflicts for copies.
3841 2018-10-05  Andrew Waterman  <andrew@sifive.com>
3842             Jim Wilson  <jimw@sifive.com>
3844         * config/riscv/riscv.md (f<quiet_pattern>_quiet<ANYF:mode><X:mode>4):
3845         Add define_expand.  Add ! HONOR_SNANS check to current pattern.  Add
3846         new pattern using HONOR_SNANS that emits one extra instruction.
3848 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
3850         * config/rs6000/rs6000.md (unnamed mfcr scc_comparison_operator
3851         patterns): Merge SI and DI patterns to a GPR pattern.
3852         (unnamed define_insn and define_split for record form of that): Merge
3853         to a single define_insn_and_split pattern.
3855 2018-10-05  David Malcolm  <dmalcolm@redhat.com>
3857         PR c++/56856
3858         * input.c (expand_location_to_spelling_point): Add param "aspect"
3859         and use rather than hardcoding LOCATION_ASPECT_CARET.
3860         (get_substring_ranges_for_loc): Handle the case of a single token
3861         within a macro expansion.
3862         * input.h (expand_location_to_spelling_point): Add "aspect" param,
3863         defaulting to LOCATION_ASPECT_CARET.
3865 2018-10-05  Paul Koning  <ni1d@arrl.net>
3867         * config/pdp11/pdp11.c (TARGET_CXX_GUARD_TYPE): Define.
3868         (TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT): Define.
3869         (TARGET_CXX_LIBRARY_RTTI_COMDAT): Define.
3870         (pdp11_guard_type): New function.
3872 2018-10-05  Paul Koning  <ni1d@arrl.net>
3874         * config/pdp11/pdp11.h (FLOAT_TYPE_SIZE): Always 32.
3875         * config/pdp11/pdp11.opt (mfloat32): Remove.
3876         (mfloat64): Remove.
3877         * doc/invoke.texi (pdp11 -mfloat32): Remove:
3878         (pdp11 -mfloat64): Remove.
3880 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
3882         * config/i386/i386.md (*cmpxf_cc_i387): Remove pattern.
3883         (*cmp<mode>_cc_i387): Ditto.
3884         (*cmpu<mode>_cc_i387): Ditto.
3885         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
3886         * config/i386/i386.c (ix86_expand_fp_compare): Remove
3887         "scratch" argument.
3888         <case IX86_FPCMP_SAHF>: Do not generate pattern with HImode clobber.
3889         Emit x86_sahf_1 pattern.
3890         (ix86_expand_compare): Update call to ix86_expand_fp_compare.
3891         (ix86_expand_carry_flag_compare): Ditto.
3893 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
3895         * config/i386/i386.md (*cmpxf_i387): Change operand 2 predicate
3896         to reg_or_0_operand.  Add "C" constraint.
3897         (*cmpxf_cc_i387): Ditto.
3898         (*cmp<mode>_i387): Change operand 2 predicate
3899         to nonimm_or_0_operand.  Add "C" constraint.
3900         (*cmp<mode>_cc_i387): Ditto.
3901         (*cmp<mode>_0_i387): Remove insn pattern.
3902         (*cmp<mode>_0_cc_i387): Ditto.
3904 2018-10-05  Uros Bizjak  <ubizjak@gmail.com>
3906         * config/i386/constraints.md ("C"): Do not depend on TARGET_SSE.
3907         * config/i386/predicates.md (nonimm_or_0_operand): Rename
3908         from vector_move_operand.  Update all uses.
3910 2018-10-05  Martin Sebor  <msebor@redhat.com>
3912         PR tree-optimization/87490
3913         * builtins.c (expand_builtin_strnlen): Handle a null data.decl
3914         consistently.
3916 2018-10-05  Richard Biener  <rguenther@suse.de>
3918         PR tree-optimization/63155
3919         * tree-ssa-ccp.c (ccp_propagate::visit_phi): Avoid excess
3920         vertical space in dumpfiles.
3921         * tree-ssa-propagate.h
3922         (ssa_propagation_engine::process_ssa_edge_worklist): Remove.
3923         * tree-ssa-propagate.c (cfg_blocks_back): New global.
3924         (ssa_edge_worklist_back): Likewise.
3925         (curr_order): Likewise.
3926         (cfg_blocks_get): Remove abstraction.
3927         (cfg_blocks_add): Likewise.
3928         (cfg_blocks_empty_p): Likewise.
3929         (add_ssa_edge): Add to current or next worklist based on
3930         RPO index.
3931         (add_control_edge): Likewise.
3932         (ssa_propagation_engine::process_ssa_edge_worklist): Fold
3933         into ...
3934         (ssa_propagation_engine::ssa_propagate): ... here.  Unify
3935         iteration from CFG and SSA edge worklist so we process
3936         everything in RPO order, prioritizing forward progress
3937         over iteration.
3938         (ssa_prop_init): Allocate new worklists, do not dump
3939         immediate uses.
3940         (ssa_prop_fini): Free new worklists.
3942 2018-10-05  Richard Biener  <rguenther@suse.de>
3944         * tree-core.h (tree_block::abstract_flag): Remove.
3945         (tree_block::block_num): Make full 32bits.
3946         * tree.def (BLOCK): Remove docs about BLOCK_ABSTRACT.
3947         * tree.h (BLOCK_ABSTRACT): Remove.
3948         * dwarf2out.c (gen_lexical_block_die): Remove dead code
3949         resulting from BLOCK_ABSTRACT being always false.
3950         (gen_inlined_subroutine_die): Likewise.
3951         (gen_block_die): Likewise.
3952         * tree.c (block_ultimate_origin): Likewise.
3953         * tree-pretty-print.c (dump_block_node): Remove code dealing
3954         with BLOCK_ABSTRACT.
3955         * tree-ssa-live.c (dump_scope_block): Likewise.
3956         * tree-streamer-in.c (unpack_ts_block_value_fields): Likewise.
3957         * tree-streamer-out.c (pack_ts_block_value_fields): Likewise.
3959 2018-10-05   Richard Biener  <rguenther@suse.de>
3961         * config/i386/i386.c (ix86_add_stmt_cost): When scalar cost
3962         is asked for initialize mode to the component mode of the
3963         vector type.
3965 2018-10-05  H.J. Lu  <hongjiu.lu@intel.com>
3967         PR target/87522
3968         * config/i386/gnu-user.h (ASM_SPEC): Don't pass -msse2avx to
3969         assembler for -mavx.
3970         * config/i386/gnu-user64.h (ASM_SPEC): Likewise.
3972 2018-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
3974         PR target/87509
3975         * config/rs6000/rs6000-builtin.def (RS6000_BUILTIN_SET_FPSCR_DRN): Use
3976         RS6000_BTM_DFP.
3977         * config/rs6000/rs6000.md (rs6000_set_fpscr_rn): Require the operand
3978         to be DImode.  When using mffscrn, force the operand to a register.
3980 2018-10-04  Uros Bizjak  <ubizjak@gmail.com>
3982         * config/i386/i386.md (*fop_<X87MODEF:mode>_2_i387): Macroize insn
3983         from *fop_<MODEF:mode>_2_i387 and *fop_xf_2_i387 using
3984         X87MODEF mode iterator.
3985         (*fop_<X87MODEF:mode>_3_i387): Macroize insn from
3986         *fop_<MODEF:mode>_3_i387 and *fop_xf_3_i387 using
3987         X87MODEF mode iterator.
3989 2018-10-04  Vinay Kumar  <vinay.kumar@blackfigtech.com>
3991         * doc/invoke.texi (-Wno-prio-ctor-dtor): Document new warning
3992         -Wno-prio-ctor-dtor.
3994 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
3996         * Makefile.in (OBJS): Add opt-problem.o.
3997         * dump-context.h: Include "selftest.h.
3998         (selftest::temp_dump_context): New forward decl.
3999         (class dump_context): Make friend of class
4000         selftest::temp_dump_context.
4001         (dump_context::dump_loc_immediate): New decl.
4002         (class dump_pretty_printer): Move here from dumpfile.c.
4003         (class temp_dump_context): Move to namespace selftest.
4004         (temp_dump_context::temp_dump_context): Add param
4005         "forcibly_enable_dumping".
4006         (selftest::verify_dumped_text):
4007         (ASSERT_DUMPED_TEXT_EQ): Move here from dumpfile.c.
4008         (selftest::verify_item):
4009         (ASSERT_IS_TEXT): Move here from dumpfile.c.
4010         (ASSERT_IS_TREE): Likewise.
4011         (ASSERT_IS_GIMPLE): Likewise.
4012         * dumpfile.c (dump_context::dump_loc): Move immediate dumping
4013         to...
4014         (dump_context::dump_loc_immediate): ...this new function.
4015         (class dump_pretty_printer): Move to dump-context.h.
4016         (dump_switch_p_1): Don't enable MSG_PRIORITY_REEMITTED.
4017         (opt_info_switch_p_1): Enable MSG_PRIORITY_REEMITTED.
4018         (temp_dump_context::temp_dump_context): Move to "selftest"
4019         namespace.  Add param "forcibly_enable_dumping", and use it to
4020         conditionalize the use of m_pp;
4021         (selftest::verify_dumped_text): Make non-static.
4022         (ASSERT_DUMPED_TEXT_EQ): Move to dump-context.h.
4023         (selftest::verify_item): Make non-static.
4024         (ASSERT_IS_TEXT): Move to dump-context.h.
4025         (ASSERT_IS_TREE): Likewise.
4026         (ASSERT_IS_GIMPLE): Likewise.
4027         (selftest::test_capture_of_dump_calls): Pass "true" for new
4028         param of temp_dump_context.
4029         * dumpfile.h (enum dump_flag): Add MSG_PRIORITY_REEMITTED, adding
4030         it to MSG_ALL_PRIORITIES.  Update values of TDF_COMPARE_DEBUG and
4031         TDF_COMPARE_DEBUG.
4032         * opt-problem.cc: New file.
4033         * opt-problem.h: New file.
4034         * optinfo-emit-json.cc
4035         (selftest::test_building_json_from_dump_calls): Pass "true" for
4036         new param of temp_dump_context.
4037         * optinfo.cc (optinfo_kind_to_dump_flag): New function.
4038         (optinfo::emit_for_opt_problem): New function.
4039         (optinfo::emit): Clarity which emit_item is used.
4040         * optinfo.h (optinfo::get_dump_location): New accessor.
4041         (optinfo::emit_for_opt_problem): New decl.
4042         (optinfo::emit): Make const.
4043         * selftest-run-tests.c (selftest::run_tests): Call
4044         selftest::opt_problem_cc_tests.
4045         * selftest.h (selftest::opt_problem_cc_tests): New decl.
4046         * tree-data-ref.c (dr_analyze_innermost): Convert return type from
4047         bool to opt_result, converting fprintf messages to
4048         opt_result::failure_at calls.  Add "stmt" param for use by the
4049         failure_at calls.
4050         (create_data_ref): Pass "stmt" to the dr_analyze_innermost call.
4051         (runtime_alias_check_p): Convert return type from bool to
4052         opt_result, converting dump_printf calls to
4053         opt_result::failure_at, using the statement DDR_A for their
4054         location.
4055         (find_data_references_in_stmt): Convert return type from bool to
4056         opt_result, converting "return false" to opt_result::failure_at
4057         with a new message.
4058         * tree-data-ref.h: Include "opt-problem.h".
4059         (dr_analyze_innermost): Convert return type from bool to opt_result,
4060         and add a const gimple * param.
4061         (find_data_references_in_stmt): Convert return type from bool to
4062         opt_result.
4063         (runtime_alias_check_p): Likewise.
4064         * tree-predcom.c (find_looparound_phi): Pass "init_stmt" to
4065         dr_analyze_innermost.
4066         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test):
4067         Convert return type from bool to opt_result, adding a message for
4068         the PARAM_VECT_MAX_VERSION_FOR_ALIAS_CHECKS zero case.
4069         (vect_analyze_data_ref_dependence): Convert return type from bool
4070         to opt_result.  Change sense of return type from "false"
4071         effectively meaning "no problems" to "false" meaning a problem,
4072         so that "return false" becomes "return opt_result::success".
4073         Convert "return true" calls to opt_result::failure_at, using
4074         the location of statement A rather than vect_location.
4075         (vect_analyze_data_ref_dependences): Convert return type from bool
4076         to opt_result.
4077         (verify_data_ref_alignment): Likewise, converting dump_printf_loc
4078         calls to opt_result::failure_at, using the stmt location rather
4079         than vect_location.
4080         (vect_verify_datarefs_alignment): Convert return type from bool
4081         to opt_result.
4082         (vect_enhance_data_refs_alignment): Likewise.  Split local "stat"
4083         into multiple more-tightly-scoped copies.
4084         (vect_analyze_data_refs_alignment): Convert return type from bool
4085         to opt_result.
4086         (vect_analyze_data_ref_accesses): Likewise, converting a
4087         "return false" to a "return opt_result::failure_at", adding a
4088         new message.
4089         (vect_prune_runtime_alias_test_list): Convert return type from
4090         bool to opt_result, converting dump_printf_loc to
4091         opt_result::failure_at.  Add a %G to show the pertinent statement,
4092         and use the stmt's location rather than vect_location.
4093         (vect_find_stmt_data_reference): Convert return type from
4094         bool to opt_result, converting dump_printf_loc to
4095         opt_result::failure_at, using stmt's location.
4096         (vect_analyze_data_refs):  Convert return type from bool to
4097         opt_result.  Convert "return false" to "return
4098         opt_result::failure_at", adding messages as needed.
4099         * tree-vect-loop.c (vect_determine_vf_for_stmt_1): Convert return
4100         type from bool to opt_result.
4101         (vect_determine_vf_for_stmt): Likewise.
4102         (vect_determine_vectorization_factor): Likewise, converting
4103         dump_printf_loc to opt_result::failure_at, using location of phi
4104         rather than vect_location.
4105         (vect_analyze_loop_form_1): Convert return type from bool to
4106         opt_result, converting dump_printf_loc calls, retaining the use of
4107         vect_location.
4108         (vect_analyze_loop_form): Convert return type from loop_vec_info
4109         to opt_loop_vec_info.
4110         (vect_analyze_loop_operations): Convert return type from bool to
4111         opt_result, converting dump_printf_loc calls, using the location
4112         of phi/stmt rather than vect_location where available.  Convert
4113         various "return false" to "return opt_result::failure_at" with
4114         "unsupported phi" messages.
4115         (vect_get_datarefs_in_loop): Convert return type from bool to
4116         opt_result.  Add a message for the
4117         PARAM_LOOP_MAX_DATAREFS_FOR_DATADEPS failure.
4118         (vect_analyze_loop_2): Convert return type from bool to
4119         opt_result.  Ensure "ok" is set to a opt_result::failure_at before
4120         each "goto again;", adding new messages where needed.
4121         Add "unsupported grouped {store|load}" messages.
4122         (vect_analyze_loop): Convert return type from loop_vec_info to
4123         opt_loop_vec_info.
4124         * tree-vect-slp.c (vect_analyze_slp): Convert return type from
4125         bool to opt_result.
4126         * tree-vect-stmts.c (process_use): Likewise, converting
4127         dump_printf_loc call and using stmt location, rather than
4128         vect_location.
4129         (vect_mark_stmts_to_be_vectorized): Likeise.
4130         (vect_analyze_stmt): Likewise, adding a %G.
4131         (vect_get_vector_types_for_stmt): Convert return type from bool to
4132         opt_result, converting dump_printf_loc calls and using stmt
4133         location, rather than vect_location.
4134         (vect_get_mask_type_for_stmt): Convert return type from tree to
4135         opt_tree, converting dump_printf_loc calls and using stmt location.
4136         * tree-vectorizer.c: Include "opt-problem.h.
4137         (try_vectorize_loop_1): Flag "Analyzing loop at" dump message as
4138         MSG_PRIORITY_INTERNALS.  Convert local "loop_vinfo" from
4139         loop_vec_info to opt_loop_vec_info.  If if fails, and dumping is
4140         enabled, use it to report at the top level "couldn't vectorize
4141         loop" followed by the problem.
4142         * tree-vectorizer.h (opt_loop_vec_info): New typedef.
4143         (vect_mark_stmts_to_be_vectorized): Convert return type from bool
4144         to opt_result.
4145         (vect_analyze_stmt): Likewise.
4146         (vect_get_vector_types_for_stmt): Likewise.
4147         (tree vect_get_mask_type_for_stmt): Likewise.
4148         (vect_analyze_data_ref_dependences): Likewise.
4149         (vect_enhance_data_refs_alignment): Likewise.
4150         (vect_analyze_data_refs_alignment): Likewise.
4151         (vect_verify_datarefs_alignment): Likewise.
4152         (vect_analyze_data_ref_accesses): Likewise.
4153         (vect_prune_runtime_alias_test_list): Likewise.
4154         (vect_find_stmt_data_reference): Likewise.
4155         (vect_analyze_data_refs): Likewise.
4156         (vect_analyze_loop): Convert return type from loop_vec_info to
4157         opt_loop_vec_info.
4158         (vect_analyze_loop_form): Likewise.
4159         (vect_analyze_slp): Convert return type from bool to opt_result.
4161 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
4163         * doc/invoke.texi (-fopt-info): Document new "internals"
4164         sub-option.
4165         * dump-context.h (dump_context::apply_dump_filter_p): New decl.
4166         * dumpfile.c (dump_options): Update for renaming of MSG_ALL to
4167         MSG_ALL_KINDS.
4168         (optinfo_verbosity_options): Add "internals".
4169         (kind_as_string): Update for renaming of MSG_ALL to MSG_ALL_KINDS.
4170         (dump_context::apply_dump_filter_p): New member function.
4171         (dump_context::dump_loc): Use apply_dump_filter_p rather than
4172         explicitly masking the dump_kind.
4173         (dump_context::begin_scope): Increment the scope depth first.  Use
4174         apply_dump_filter_p rather than explicitly masking the dump_kind.
4175         (dump_context::emit_item): Use apply_dump_filter_p rather than
4176         explicitly masking the dump_kind.
4177         (dump_dec): Likewise.
4178         (dump_hex): Likewise.
4179         (dump_switch_p_1): Default to MSG_ALL_PRIORITIES.
4180         (opt_info_switch_p_1): Default to MSG_PRIORITY_USER_FACING.
4181         (opt_info_switch_p): Update handling of default
4182         MSG_OPTIMIZED_LOCATIONS to cope with default of
4183         MSG_PRIORITY_USER_FACING.
4184         (dump_basic_block): Use apply_dump_filter_p rather than explicitly
4185         masking the dump_kind.
4186         (selftest::test_capture_of_dump_calls): Update test_dump_context
4187         instances to use MSG_ALL_KINDS | MSG_PRIORITY_USER_FACING rather
4188         than MSG_ALL.  Generalize scope test to be run at all four
4189         combinations of with/without MSG_PRIORITY_USER_FACING and
4190         MSG_PRIORITY_INTERNALS, adding examples of explicit priority
4191         for each of the two values.
4192         * dumpfile.h (enum dump_flag): Add comment about the MSG_* flags.
4193         Rename MSG_ALL to MSG_ALL_KINDS.  Add MSG_PRIORITY_USER_FACING,
4194         MSG_PRIORITY_INTERNALS, and MSG_ALL_PRIORITIES, updating the
4195         values for TDF_COMPARE_DEBUG and TDF_ALL_VALUES.
4196         (AUTO_DUMP_SCOPE): Add a note to the comment about the interaction
4197         with MSG_PRIORITY_*.
4198         * tree-vect-loop-manip.c (vect_loop_versioning): Mark versioning
4199         dump messages as MSG_PRIORITY_USER_FACING.
4200         * tree-vectorizer.h (DUMP_VECT_SCOPE): Add a note to the comment
4201         about the interaction with MSG_PRIORITY_*.
4203 2018-10-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
4205         * varasm.c (output_constant): Add new parameter merge_strings.
4206         Make strings properly zero terminated in merge string sections.
4207         (mergeable_string_section): Don't fail if the last char is non-zero.
4208         (assemble_variable_contents): Handle merge string sections.
4209         (assemble_variable): Likewise.
4210         (assemble_constant_contents): Likewise.
4211         (output_constant_def_contents): Likewise.
4212         (output_constructor_array_range,
4213         output_constructor_regular_field): Adjust call to output_constant.
4214         (output_object_block): Adjust call to assemble_constant_contents
4215         and assemble_variable_contents.
4217 2018-10-04  Martin Liska  <mliska@suse.cz>
4219         PR c/87483
4220         * cgraphunit.c (process_function_and_variable_attributes):
4221         Warn about a function with alias attribute and a body.
4223 2018-10-04  Martin Liska  <mliska@suse.cz>
4225         PR ipa/82625
4226         * multiple_target.c (redirect_to_specific_clone): New function.
4227         (ipa_target_clone): Use it.
4228         * tree-inline.c: Fix comment.
4230 2018-10-04  David Malcolm  <dmalcolm@redhat.com>
4232         * dumpfile.c (gcc::dump_manager::dump_manager): Initialize new
4233         fields.
4234         (gcc::dump_manager::~dump_manager): Free m_optinfo_filename.
4235         (gcc::dump_manager::register_pass): New member function, adapted
4236         from loop body in gcc::pass_manager::register_pass, adding a
4237         call to update_dfi_for_opt_info.
4238         (gcc::dump_manager::opt_info_enable_passes): Store the
4239         -fopt-info options into the new fields.  Move the loop
4240         bodies into...
4241         (gcc::dump_manager::update_dfi_for_opt_info): ...this new member
4242         function.
4243         * dumpfile.h (struct opt_pass): New forward decl.
4244         (gcc::dump_manager::register_pass): New decl.
4245         (gcc::dump_manager::update_dfi_for_opt_info): New decl.
4246         (class gcc::dump_manager): Add fields "m_optgroup_flags",
4247         "m_optinfo_flags", and "m_optinfo_filename".
4248         * passes.c (gcc::pass_manager::register_pass): Move all of the
4249         dump-handling code to gcc::dump_manager::register_pass.
4251 2018-10-04  Peter Bergner  <bergner@linux.ibm.com>
4253         PR rtl-optimization/87466
4254         * target.def (setjmp_preserves_nonvolatile_regs_p): New target hook.
4255         * doc/tm.texi.in (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P): New hook.
4256         * doc/tm.texi: Regenerate.
4257         * ira-lives.c (process_bb_node_lives): Use the new target hook.
4258         * lra-lives.c (process_bb_lives): Likewise.
4259         * config/rs6000/rs6000.c (TARGET_SETJMP_PRESERVES_NONVOLATILE_REGS_P):
4260         Define.
4262 2018-10-04  Tamar Christina  <tamar.christina@arm.com>
4264         * params.c (add_params): Fix initialization.
4266 2018-10-04  Martin Liska  <mliska@suse.cz>
4268         PR gcov-profile/84107
4269         * tree-profile.c (init_ic_make_global_vars):
4270         Remove ic_void_ptr_var and ic_gcov_type_ptr_var.
4271         Come up with new ic_tuple* variables.  Emit
4272         __gcov_indirect_call{,_topn} variables.
4273         (gimple_gen_ic_profiler): Access the variable
4274         and emit gimple.
4275         (gimple_gen_ic_func_profiler): Access
4276         __gcov_indirect_call.callee field.
4277         (gimple_init_gcov_profiler): Use ptr_type_node.
4278         * value-prof.c (gimple_ic): Use ptr_type_node.
4280 2018-10-04  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4282         PR tree-optimization/85787
4283         * ipa-pure-const.c (malloc_candidate_p_1): Move most of malloc_candidate_p
4284         into this function and add support for detecting multiple phis.
4285         (DUMP_AND_RETURN): Move from malloc_candidate_p into top-level macro.
4287 2018-10-04  Martin Liska  <mliska@suse.cz>
4289         PR ipa/87491
4290         * ipa-inline.c (inline_to_all_callers_1):
4291         Call ultimate_alias_target for node being inlined.
4293 2018-10-03  Jeff Law  <law@redhat.com>
4295         * gimple-ssa-sprintf.c (format_string): Do not hardcode size of
4296         target's wchar_t.
4297         * tree.c (get_typenode_from_name): Moved from fortran/trans-types.c.
4298         * tree.h (get_typenode_from_name): Prototype.
4300 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
4302         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
4303         Change operand 2 predicate to nonimmediate_operand.
4304         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
4306 2018-10-03  Martin Sebor  <msebor@redhat.com>
4307             Jeff Law  <law@redhat.com>
4309         * gimple-ssa-sprintf.c (struct fmtresult): Add new member and
4310         initialize it.
4311         (get_string_length): Detect unterminated arrays.
4312         (format_string): Same.
4313         (format_directive): Warn about unterminated arrays.
4314         (handle_gimple_call): Mark statements with no_warning as needed.
4316 2018-10-03  Jim Wilson  <jimw@sifive.com>
4318         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): For ABI_ILP32E,
4319         also define __riscv_abi_rve.  Delete trailing white space.
4321 2018-10-03  Paul Koning  <ni1d@arrl.net>
4323         Enable LRA register allocator for PDP11.
4324         * config/pdp11/constraints.md (Q): Use define_memory_constraint.
4325         (R): Likewise.
4326         (D): Likewise.
4327         * config/pdp11/pdp11.c (pdp11_lra_p): New function.
4328         * config/pdp11/pdp11.opt (-mlra): New option.
4329         * doc/invoke.texi (PDP-11 Options): Document -mlra.
4331 2018-10-03  Uros Bizjak  <ubizjak@gmail.com>
4333         * config/i386/i386.md (*<absneg:code>extendsfdf2): Remove.
4334         (*<absneg:code>extend<mode>xf2): Ditto.
4336 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
4338         PR tree-optimization/87415
4339         * tree-vrp.c (set_value_range_with_overflow): Special case one bit
4340         precision fields.
4342 2018-10-02  Jeff Law  <law@redhat.com>
4344         * gimple-fold.c (get_range_strlen): Only set *nonstr when
4345         an unterminated string is discovered.  Bubble up range
4346         even for unterminated strings.
4347         (gimple_fold_builtin_strlen): Do not fold if get_range_strlen
4348         indicates the string was not terminated via NONSTR.
4350 2018-10-03  Aldy Hernandez  <aldyh@redhat.com>
4352         * tree-vrp.c (extract_range_from_unary_expr): Special case all
4353         pointer conversions.
4354         Do not do anything special for anti-ranges.
4356 2018-10-03  Jérôme Lambourg  <lambourg@adacore.com>
4358         * config/arm/vxworks.h (ARM_TARGET2_DWARF_FORMAT): Adjust to
4359         DW_EH_PE_pcrel | DW_EH_PE_indirect for RTPs.
4361 2018-10-03  Martin Liska  <mliska@suse.cz>
4363         PR gcov-profile/86109
4364         * coverage.c (coverage_begin_function): Do not
4365         mark lambdas as artificial.
4366         * tree-core.h (struct GTY): Remove tm_clone_flag
4367         and introduce new lambda_function.
4368         * tree.h (DECL_LAMBDA_FUNCTION): New macro.
4370 2018-10-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
4372         PR target/87474
4373         * config/rs6000/rs6000-string.c (expand_strn_compare): Check that both
4374         P8_VECTOR and VSX are enabled.
4376 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
4378         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
4379         0x3907 as CPU model number.
4381 2018-10-02  Andreas Krebbel  <krebbel@linux.ibm.com>
4383         * common/config/s390/s390-common.c: Rename PF_ARCH12 to PF_Z14.
4384         * config/s390/s390.h (enum processor_flags): Rename PF_ARCH12 to
4385         PF_Z14.  Rename TARGET_CPU_ARCH12 to TARGET_CPU_Z14,
4386         TARGET_CPU_ARCH12_P to TARGET_CPU_Z14_P, TARGET_ARCH12 to
4387         TARGET_Z14, and TARGET_ARCH12_P to TARGET_Z14_P.
4388         * config/s390/s390.md: Likewise. Rename also the cpu attribute
4389         value from arch12 to z14.
4391 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
4393         * config/i386/i386.md (fxam<mode>2_i387_with_temp): Remove.
4394         (isinfxf2): Ditto.
4395         (isinf<mode>2): Ditto.
4397 2018-10-02  Uros Bizjak  <ubizjak@gmail.com>
4399         * config/i386/i386.c (ix86_emit_i387_round): Extend op1 to XFmode
4400         before emitting fxam.  Perform calculations in XFmode.
4402 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
4404         * match.pd (((X /[ex] A) +- B) * A): New transformation.
4406 2018-10-02  Marc Glisse  <marc.glisse@inria.fr>
4408         PR middle-end/87319
4409         * fold-const.c (fold_plusminus_mult_expr): Handle complex and vectors.
4410         * tree.c (signed_or_unsigned_type_for): Handle complex.
4412 2018-10-02  Jeff Law  <law@redhat.com>
4414         * gimple-fold.c (get_range_strlen): Remove dead code.
4416 2018-10-02  Martin Sebor  <msebor@redhat.com>
4417             Jeff Law  <law@redhat.com>
4419         * builtins.c (unterminated_array): Add new arguments.
4420         If argument is not terminated, bubble up size and exact
4421         state to callers.
4422         (expand_builtin_strnlen): Detect, avoid expanding
4423         and diagnose unterminated arrays.
4424         (c_strlen): Fill in offset of start of unterminated strings.
4425         * builtins.h (unterminated_array): Update prototype.
4427 2018-10-02  Richard Biener  <rguenther@suse.de>
4429         * config/i386/sse.md (reduc_plus_scal_v4df): Avoid the use
4430         of haddv4df, first reduce to SSE width and exploit the fact
4431         that we only need element zero with the reduction result.
4432         (reduc_plus_scal_v2df): Likewise.
4434 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
4436         * dojump.h (do_jump): Delete.
4437         (do_jump_1): Likewise.
4438         (split_comparison): Move around.
4439         * dojump.c (do_jump): Make static.
4440         (do_jump_1): Likewise.
4441         (jumpifnot): Move around.
4442         (jumpifnot_1): Likewise.
4443         (jumpif): Likewise.
4444         (jumpif_1): Likewise.
4445         * expr.c (expand_expr_real_1): Call jumpif[not] instead of do_jump.
4447 2018-10-02  Eric Botcazou  <ebotcazou@adacore.com>
4449         * reorg.c (make_return_insns): Use emit_copy_of_insn_after for the
4450         insns in the delay slot and add_insn_after for the jump insn.
4452 2018-10-02  Richard Biener  <rguenther@suse.de>
4454         * tree-inline.c (expand_call_inline): Use the location of
4455         the callee declaration for the inline-entry marker.
4456         * final.c (notice_source_line): Remove special-casing of
4457         NOTE_INSN_INLINE_ENTRY.
4459 2018-10-01  Carl Love  <cel@us.ibm.com>
4461         PR 69431
4462         * config/rs6000/rs6000-builtin.def (__builtin_mffsl): New.
4463         (__builtin_mtfsb0): New.
4464         (__builtin_mtfsb1): New.
4465         ( __builtin_set_fpscr_rn): New.
4466         (__builtin_set_fpscr_drn): New.
4467         * config/rs6000/rs6000.c (rs6000_expand_mtfsb_builtin): Add.
4468         (rs6000_expand_set_fpscr_rn_builtin): Add.
4469         (rs6000_expand_set_fpscr_drn_builtin): Add.
4470         (rs6000_expand_builtin): Add case statement entries for
4471         RS6000_BUILTIN_MTFSB0, RS6000_BUILTIN_MTFSB1,
4472         RS6000_BUILTIN_SET_FPSCR_RN, RS6000_BUILTIN_SET_FPSCR_DRN,
4473         RS6000_BUILTIN_MFFSL.
4474         (rs6000_init_builtins): Add ftype initialization and def_builtin
4475         calls for __builtin_mffsl, __builtin_mtfsb0, __builtin_mtfsb1,
4476         __builtin_set_fpscr_rn, __builtin_set_fpscr_drn.
4477         * config/rs6000.md (rs6000_mtfsb0, rs6000_mtfsb1, rs6000_mffscrn,
4478         rs6000_mffscdrn): Add define_insn.
4479         (rs6000_set_fpscr_rn, rs6000_set_fpscr_drn): Add define_expand.
4480         * doc/extend.texi: Add documentation for the builtins.
4482 2018-10-01  Richard Biener  <rguenther@suse.de>
4484         PR tree-optimization/87465
4485         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Fix typo
4486         causing branch miscounts.
4488 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4490         * common/config/aarch64/aarch64-common.c (TARGET_OPTION_DEFAULT_PARAM,
4491         aarch64_option_default_param):  New.
4492         (params.h): Include.
4493         (TARGET_OPTION_VALIDATE_PARAM, aarch64_option_validate_param): New.
4494         * config/aarch64/aarch64.c (aarch64_override_options_internal): Simplify
4495         stack-clash protection validation code.
4497 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4499         * params.c (validate_param): New.
4500         (add_params): Use it.
4501         (set_param_value): Refactor param validation into validate_param.
4502         (diagnostic.h): Include.
4503         * diagnostic.h (diagnostic_ready_p): New.
4505 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4507         * params.c (set_param_value):
4508         Add index of parameter being validated.
4509         * common/common-target.def (option_validate_param): New.
4510         * common/common-targhooks.h (default_option_validate_param): New.
4511         * common/common-targhooks.c (default_option_validate_param): New.
4512         * doc/tm.texi.in (TARGET_OPTION_VALIDATE_PARAM): New.
4513         * doc/tm.texi: Regenerate.
4515 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4517         PR target/86486
4518         * config/aarch64/aarch64.c (aarch64_override_options_internal):
4519         Add validation for stack-clash parameters and set defaults.
4521 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4523         PR target/86486
4524         * configure.ac: Add stack-clash-protection-guard-size.
4525         * doc/install.texi: Document it.
4526         * config.in (DEFAULT_STK_CLASH_GUARD_SIZE): New.
4527         * params.def: Update comment for guard-size.
4528         (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE,
4529         PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Update description.
4530         * configure: Regenerate.
4532 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4534         PR target/86486
4535         * config/aarch64/aarch64.h (STACK_CLASH_MIN_BYTES_OUTGOING_ARGS,
4536         STACK_DYNAMIC_OFFSET): New.
4537         * config/aarch64/aarch64.c (aarch64_layout_frame):
4538         Update outgoing args size.
4539         (aarch64_stack_clash_protection_alloca_probe_range,
4540         TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
4542 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4544         PR target/86486
4545         * explow.c (anti_adjust_stack_and_probe_stack_clash): Support custom
4546         probe ranges.
4547         * target.def (stack_clash_protection_alloca_probe_range): New.
4548         (stack_clash_protection_final_dynamic_probe): Remove.
4549         * targhooks.h (default_stack_clash_protection_alloca_probe_range) New.
4550         (default_stack_clash_protection_final_dynamic_probe): Remove.
4551         * targhooks.c: Likewise.
4552         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_ALLOCA_PROBE_RANGE): New.
4553         (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE): Remove.
4554         * doc/tm.texi: Regenerate.
4556 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4558         PR target/86486
4559         * config/aarch64/aarch64-protos.h (aarch64_output_probe_sve_stack_clash): New.
4560         * config/aarch64/aarch64.c (aarch64_output_probe_sve_stack_clash,
4561         aarch64_clamp_to_uimm12_shift): New.
4562         (aarch64_allocate_and_probe_stack_space): Add SVE specific section.
4563         * config/aarch64/aarch64.md (probe_sve_stack_clash): New.
4565 2018-10-01  Tamar Christina  <tamar.christina@arm.com>
4567         PR target/86486
4568         * config/aarch64/aarch64.c (aarch64_layout_frame): Add assert.
4570 2018-10-01  Jeff Law  <law@redhat.com>
4571             Richard Sandiford <richard.sandiford@linaro.org>
4572             Tamar Christina  <tamar.christina@arm.com>
4574         PR target/86486
4575         * config/aarch64/aarch64.md
4576         (probe_stack_range): Add k (SP) constraint.
4577         * config/aarch64/aarch64.h (STACK_CLASH_CALLER_GUARD,
4578         STACK_CLASH_MAX_UNROLL_PAGES): New.
4579         * config/aarch64/aarch64.c (aarch64_output_probe_stack_range): Emit
4580         stack probes for stack clash.
4581         (aarch64_allocate_and_probe_stack_space): New.
4582         (aarch64_expand_prologue): Use it.
4583         (aarch64_expand_epilogue): Likewise and update IP regs re-use criteria.
4584         (aarch64_sub_sp): Add emit_move_imm optional param.
4586 2018-10-01  MCC CS <deswurstes@users.noreply.github.com>
4588         PR tree-optimization/87261
4589         * match.pd: Remove trailing whitespace.
4590         Add (x & y) | ~(x | y) -> ~(x ^ y),
4591         (~x | y) ^ (x ^ y) -> x | ~y and (x ^ y) | ~(x | y) -> ~(x & y)
4593 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
4595         * config/arc/arc.md (*add_n): Clean up pattern, update instruction
4596         constraints.
4597         (ashlsi3_insn): Update instruction constraints.
4598         (ashrsi3_insn): Likewise.
4599         (rotrsi3): Likewise.
4600         (add_shift): Likewise.
4601         * config/arc/constraints.md (Csz): New 32 bit constraint. It
4602         avoids placing in the limm field small constants which, otherwise,
4603         could end into a small instruction.
4605 2018-10-01  Claudiu Zissulescu  <claziss@synopsys.com>
4607         * config/arc/arc.md (maddsidi4_split): Don't use dmac if the
4608         destination register is not odd-even.
4609         (umaddsidi4_split): Likewise.
4611 2018-10-01  Richard Biener  <rguenther@suse.de>
4613         * tree-inline.c (expand_call_inline): Store origin of fn
4614         in BLOCK_ABSTRACT_ORIGIN for the inline BLOCK.
4615         * tree.c (block_ultimate_origin): Simplify and do some
4616         checking.
4618 2018-09-30  Uros Bizjak  <ubizjak@gmail.com>
4620         * config/i386/mmx.md (EMMS): New int iterator.
4621         (emms): New int attribute.
4622         (mmx_<emms>): Macroize insn from *mmx_emms and *mmx_femms using
4623         EMMS int iterator.  Explicitly declare clobbers.
4624         (mmx_emms): Remove expander.
4625         (mmx_femms): Ditto.
4626         * config/i386/predicates.md (emms_operation): Remove predicate.
4627         (vzeroall_pattern): New predicate.
4628         (vzeroupper_pattern): Rename from vzeroupper_operation.
4629         * config/i386/i386.c (ix86_avx_u128_mode_after): Use
4630         vzeroupper_pattern and vzeroall_pattern predicates.
4632 2018-09-30  Peter Bergner  <bergner@linux.ibm.com>
4634         PR rtl-optimization/86939
4635         * ira-lives.c (make_hard_regno_born): Rename from this...
4636         (make_hard_regno_live): ... to this.  Remove update to conflict
4637         information.  Update function comment.
4638         (make_hard_regno_dead): Add conflict information update.  Update
4639         function comment.
4640         (make_object_born): Rename from this...
4641         (make_object_live): ... to this.  Remove update to conflict information.
4642         Update function comment.
4643         (make_object_dead):  Add conflict information update.  Update function
4644         comment.
4645         (mark_pseudo_regno_live): Call make_object_live.
4646         (mark_pseudo_regno_subword_live): Likewise.
4647         (mark_hard_reg_dead): Update function comment.
4648         (mark_hard_reg_live): Call make_hard_regno_live.
4649         (process_bb_node_lives): Likewise.
4650         * lra-lives.c (make_hard_regno_born): Rename from this...
4651         (make_hard_regno_live): ... to this.  Remove update to conflict
4652         information.  Remove now uneeded check_pic_pseudo_p argument.
4653         Update function comment.
4654         (make_hard_regno_dead): Add check_pic_pseudo_p argument and add update
4655         to conflict information.  Update function comment.
4656         (mark_pseudo_live): Remove update to conflict information.  Update
4657         function comment.
4658         (mark_pseudo_dead): Add conflict information update.
4659         (mark_regno_live): Call make_hard_regno_live.
4660         (mark_regno_dead): Call make_hard_regno_dead with new arguement.
4661         (process_bb_lives): Call make_hard_regno_live and make_hard_regno_dead.
4663 2018-09-29  H.J. Lu  <hongjiu.lu@intel.com>
4665         PR target/87370
4666         * config/i386/i386.c (construct_container): Use TImode for
4667         BLKmode values in 2 integer registers.
4669 2018-09-29  Jeff Law  <law@redhat.com>
4671         * builtins.c (unterminated_array): Pass in c_strlen_data * to
4672         c_strlen rather than just a tree *.
4673         (c_strlen): Change NONSTR argument to a c_strlen_data pointer.
4674         Update recursive calls appropriately.  If caller did not provide a
4675         suitable data pointer, create a local one.  When a non-terminated
4676         string is discovered, bubble up information about the string via the
4677         c_strlen_data object.
4678         * builtins.h (c_strlen): Update prototype.
4679         (c_strlen_data): New structure.
4680         * gimple-fold.c (get_range_strlen): Update calls to c_strlen.
4681         For a type 2 call, if c_strlen indicates a non-terminated string
4682         use the length of the non-terminated string.
4683         (gimple_fold_builtin_stpcpy): Update calls to c_strlen.
4685 2018-09-29  Jakub Jelinek  <jakub@redhat.com>
4687         PR target/87467
4688         * config/i386/avx512fintrin.h (_mm512_abs_pd, _mm512_mask_abs_pd): Use
4689         __m512d type for __A argument rather than __m512.
4691 2018-09-28  John David Anglin  <danglin@gcc.gnu.org>
4693         * match.pd (simple_comparison): Don't optimize if either operand is
4694         a function pointer when target needs function pointer canonicalization.
4696 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
4698         * config/rs6000/driver-rs6000.c (asm_names): Adjust the entries for
4699         power5 .. power9 to remove indirection.
4700         * config/rs6000/rs6000.h (ASM_CPU_POWER5_SPEC, ASM_CPU_POWER6_SPEC,
4701         ASM_CPU_POWER7_SPEC, ASM_CPU_POWER8_SPEC, ASM_CPU_POWER9_SPEC,
4702         ASM_CPU_476_SPEC): Delete.
4703         (ASM_CPU_SPEC): Adjust.
4704         (EXTRA_SPECS): Delete asm_cpu_power5, asm_cpu_power6, asm_cpu_power7,
4705         asm_cpu_power8, asm_cpu_power9, asm_cpu_476.
4707 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
4709         * config.in: Delete HAVE_AS_DCI.
4710         * config/powerpcspe/powerpcspe.h: Treat HAVE_AS_DCI as always true.
4711         * config/rs6000/rs6000.h: Ditto.
4712         * configure.ac: Delete HAVE_AS_DCI.
4713         * configure: Regenerate.
4715 2018-09-28  Segher Boessenkool  <segher@kernel.crashing.org>
4717         * config.in (HAVE_AS_LWSYNC): Delete.
4718         * config/powerpcspe/powerpcspe.h (TARGET_LWSYNC_INSTRUCTION): Delete.
4719         * config/powerpcspe/sync.md (*lwsync): Always generate lwsync, never
4720         do it as a .long .
4721         * config/rs6000/rs6000.h (TARGET_LWSYNC_INSTRUCTION): Delete.
4722         * config/rs6000/sync.md (*lwsync): Always generate lwsync, never do it
4723         as a .long .
4724         * configure.ac: Delete HAVE_AS_LWSYNC.
4725         * configure: Regenerate.
4727 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
4728             Pierre-Marie de Rodat  <derodat@adacore.com>
4730         * calls.c (expand_call): Try to do a tail call for thunks at -O0 too.
4731         * cgraph.h (struct cgraph_thunk_info): Add indirect_offset.
4732         (cgraph_node::create_thunk): Add indirect_offset parameter.
4733         (thunk_adjust): Likewise.
4734         * cgraph.c (cgraph_node::create_thunk): Add indirect_offset parameter
4735         and initialize the corresponding field with it.
4736         (cgraph_node::dump): Dump indirect_offset field.
4737         * cgraphclones.c (duplicate_thunk_for_node): Deal with indirect_offset.
4738         * cgraphunit.c (cgraph_node::analyze): Be prepared for external thunks.
4739         (thunk_adjust): Add indirect_offset parameter and deal with it.
4740         (cgraph_node::expand_thunk): Deal with the indirect_offset field and
4741         pass it to thunk_adjust.  Do not call the target hook if it's non-zero
4742         or if the thunk is external or local.  Fix formatting.  Do not chain
4743         the RESULT_DECL to BLOCK_VARS.  Pass the static chain to the target,
4744         if any, in the GIMPLE representation.
4745         * ipa-icf.c (sem_function::equals_wpa): Deal with indirect_offset.
4746         * lto-cgraph.c (lto_output_node): Write indirect_offset field.
4747         (input_node): Read indirect_offset field.
4748         * tree-inline.c (expand_call_inline): Pass indirect_offset field in the
4749         call to thunk_adjust.
4750         * tree-nested.c (struct nesting_info): Add thunk_p field.
4751         (create_nesting_tree): Set it.
4752         (convert_all_function_calls): Copy static chain from targets to thunks.
4753         (finalize_nesting_tree_1): Return early for thunks.
4754         (unnest_nesting_tree_1): Do not finalize thunks.
4755         (gimplify_all_functions): Do not gimplify thunks.
4757 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
4759         * opt-suggestions.c (option_proposer::build_option_suggestions):
4760         Release "option_values".
4762 2018-09-28  David Malcolm  <dmalcolm@redhat.com>
4764         * coverage.c (get_coverage_counts): Convert problem-reporting dump
4765         messages from MSG_OPTIMIZED_LOCATIONS to MSG_MISSED_OPTIMIZATION.
4766         * dumpfile.c (kind_as_string): New function.
4767         (dump_loc): Rather than a hardcoded prefix of "note: ", use
4768         kind_as_string to vary the prefix based on dump_kind.
4769         (selftest::test_capture_of_dump_calls): Update for above.
4771 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
4773         * config/i386/i386.h (SSE_REGNO): Fix check for FIRST_REX_SSE_REG.
4774         (GET_SSE_REGNO): Rename from SSE_REGNO.  Update all uses for rename.
4776 2018-09-28  Uros Bizjak  <ubizjak@gmail.com>
4778         * config/i386/i386.h (CC_REGNO): Remove FPSR_REG.
4779         * config/i386/i386.c (ix86_fixed_condition_code_regs): Use
4780         INVALID_REGNUM instead of FPSR_REG.
4781         (ix86_md_asm_adjust): Do not clobber FPSR_REG.
4782         * config/i386/i386.md: Update comment of FP compares.
4783         (fldenv): Do not clobber FPSR_REG.
4785 2018-09-28  Richard Biener  <rguenther@suse.de>
4787         * tree.h (BLOCK_ORIGIN): New.
4788         * omp-expand.c (grid_expand_target_grid_body): Assign
4789         BLOCK_ORIGIN to BLOCK_ABSTRACT_ORIGIN.
4790         * tree-inline.c (remap_block): Likewise.
4791         * auto-profile.c (get_function_decl_from_block): Simplify
4792         by eliding the BLOCK_ABSTRACT_ORIGIN chasing.
4793         * langhooks.c (lhd_print_error_function): Likewise.
4794         * optinfo-emit-json.cc (optrecord_json_writer::inlining_chain_to):
4795         Likewise.
4796         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
4797         * tree.c (block_nonartificial_location): Likewise.
4798         (block_ultimate_origin): Likewise.
4799         * tree-pretty-print.c (percent_K_format): Likewise.  Remove
4800         no longer needed LTO case.
4802 2018-09-28  Andrew Stubbs  <ams@codesourcery.com>
4803             Jan Hubicka  <jh@suse.cz>
4804             Martin Jambor  <mjambor@suse.cz>
4806         * simplify-rtx.c (simplify_merge_mask): New function.
4807         (simplify_ternary_operation): Use it, also see if VEC_MERGEs with the
4808         same masks are used in op1 or op2.
4809         (test_vec_merge): New function.
4810         (test_vector_ops): Call test_vec_merge.
4812 2018-09-28  Eric Botcazou  <ebotcazou@adacore.com>
4814         * config/sparc/sparc-protos.h (sparc_branch_cost): Declare.
4815         * config/sparc/sparc.h (BRANCH_COST): Call sparc_branch_cost.
4816         * config/sparc/sparc.c (struct processor_costs): Add branch_cost field.
4817         (cypress_costs): Set it.
4818         (supersparc_costs): Likewise.
4819         (hypersparc_costs): Likewise.
4820         (leon_cost): Likewise.
4821         (leon3_costs): Likewise.
4822         (sparclet_costs): Likewise.
4823         (ultrasparc_costs): Likewise.
4824         (ultrasparc_costs): Likewise.
4825         (niagara_costs): Likewise.
4826         (niagara2_costs): Likewise.
4827         (niagara3_costs): Likewise.
4828         (niagara4_costs): Likewise.
4829         (niagara7_costs): Likewise.
4830         (m8_costs): Likewise.
4831         (TARGET_CAN_FOLLOW_JUMP): Define.
4832         (pass_work_around_errata::gate): Minor tweak.
4833         (sparc_option_override): Remove MASK_FSMULD mask for V7 processors.
4834         Do not set both MASK_VIS4 and MASK_VIS4B for M8 processor.
4835         Automaitcally clear MASK_FSMULD mask for V7 processors.
4836         (sparc_can_follow_jump): New static function.
4837         (output_ubranch): Deal with CROSSING_JUMP_P.
4838         (sparc_use_sched_lookahead): Rewrite using switch statement.
4839         (sparc_issue_rate): Reorder.
4840         (sparc_branch_cost): New function.
4842 2018-09-27  Martin Sebor  <msebor@redhat.com>
4844         * tree.h (tree_to_shwi): Add attribute nonnull and pure.
4845         (tree_to_poly_int64, tree_to_uhwi, tree_to_poly_uint64): Same.
4846         (int_fits_type_p): Same.
4848 2018-09-27  Uros Bizjak  <ubizjak@gmail.com>
4850         * config/i386/i386.md (FPCR_REG): Remove.
4851         (UNSPEC_FLDCW): Remove.
4852         (x86_fnstcw_1): Use (const_int 0) instead of FPCR_REG.
4853         (x86_fldcw_1): Remove insn pattern.
4854         (fnstenv): Do not clobber FPCR_REG.
4855         (fldenv): Ditto.
4856         * config/i386/i386.h (FIXED_REGISTERS) Remove fpsr register.
4857         (CALL_USED_REGISTERS): Ditto.
4858         (REG_ALLOC_ORDER): Ditto.
4859         (REG_CLASS_CONTENTS): Ditto.
4860         (HI_REGISTER_NAMES): Ditto.
4861         (ADDITIONAL_REGISTER_NAMES): Use defines instead
4862         of numerical constants.
4863         * config/i386/i386.c (regclass_map): Remove fpsr register.
4864         (dbx_register_map): Ditto.
4865         (dbx64_register_map): Ditto.
4866         (svr4_dbx_register_map): Ditto.
4867         (print_reg): Do not handle FPCR_REG.
4869 2018-09-27  Segher Boessenkool  <segher@kernel.crashing.org>
4871         PR target/87149
4872         * config.in (HAVE_AS_CMPB, HAVE_AS_DFP, HAVE_AS_FPRND, HAVE_AS_MFPGPR,
4873         HAVE_AS_POPCNTB, HAVE_AS_POPCNTD, HAVE_AS_POWER8, HAVE_AS_POWER9):
4874         Delete, always treat as true.
4875         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
4876         Ditto.  Simplify remaining code.
4877         * config/powerpcspe/powerpcspe.h: Ditto.
4878         * config/rs6000/rs6000.c (rs6000_option_override_internal): Ditto.
4879         Simplify remaining code.
4880         (rs6000_expand_builtin): Ditto.
4881         * config/rs6000/rs6000.h: Ditto.
4882         * configure.ac: Ditto.
4883         * configure: Regenerate.
4885 2018-09-27  Martin Liska  <mliska@suse.cz>
4887         * coverage.c (get_coverage_counts): Revert the formatting
4888         of missing profile opt info.
4890 2018-09-27  Richard Biener  <rguenther@suse.de>
4892         PR debug/37801
4893         PR debug/87440
4894         * dwarf2out.c (set_block_origin_self): Do not mark outermost
4895         block as we do not output that.
4896         (gen_inlined_subroutine_die): Elide the originally outermost
4897         block, matching what we do for concrete instances.
4898         (decls_for_scope): Add parameter specifying whether to recurse
4899         to subblocks.
4901 2018-09-27  Andrew Stubbs  <ams@codesourcery.com>
4902             Tom de Vries  <tom@codesourcery.com>
4904         PR 82089
4906         * expmed.c (emit_cstore): Fix handling of result_mode == BImode and
4907         STORE_FLAG_VALUE == 1.
4909 2018-09-27  Andreas Krebbel  <krebbel@linux.ibm.com>
4911         * config/s390/s390.md (PPA_TX_ABORT, PPA_OOO_BARRIER): New
4912         constant definitions.
4913         ("tx_assist"): Replace magic number with PPA_TX_ABORT.
4914         ("*ppa"): Enable pattern also for -march=zEC12 -mno-htm.
4915         ("speculation_barrier"): New expander definition.
4917 2018-09-26  Indu Bhagat  <indu.bhagat@oracle.com>
4919         PR gcov-profile/86957
4920         * common.opt: New warning option -Wmissing-profile.
4921         * coverage.c (get_coverage_counts): Add warning for missing .gcda file.
4922         * doc/invoke.texi: Document -Wmissing-profile.
4924 2018-09-26  Jim Wilson  <jimw@sifive.com>
4926         * config/riscv/riscv.md (subsi3_extended2): Add J constraint.
4927         (negdi2, negsi2, negsi2_extended, negsi2_extended2): New.
4929 2018-09-26  Martin Sebor  <msebor@redhat.com>
4931         * tree.c (zerop): Change return type to bool.
4932         (integer_zerop, integer_onep, integer_each_onep): Same.
4933         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
4934         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
4935         (real_onep, real_minus_onep, chain_index): Same.
4936         (print_type_hash_statistics, type_list_equal): Same.
4937         * tree.h (zerop): Same.
4938         (zerop, integer_zerop, integer_onep, integer_each_onep): Same.
4939         (integer_all_onesp, integer_minus_onep, integer_pow2p): Same.
4940         (integer_nonzerop, integer_truep, tree_ctz, real_zerop): Same.
4941         (real_onep, real_minus_onep, chain_index): Same.
4942         (print_type_hash_statistics, type_list_equal): Same.
4944 2018-09-26  Jim Wilson  <jimw@sifive.com>
4946         * config/riscv/riscv.h (FUNCTION_ARG_REGNO_P): Fix comment.
4948 2018-09-26  Jakub Jelinek  <jakub@redhat.com>
4950         PR target/87414
4951         * config/i386/i386.c: Include debug.h and dwarf2out.h.
4952         (output_indirect_thunk): Emit DW_CFA_def_cfa_offset after the
4953         call.
4955 2018-09-25  Andrew Stubbs  <ams@codesourcery.com>
4957         * builtins.c (get_builtin_sync_mem): Force address mode conversion.
4959 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
4961         * config/i386/i386.h (enum reg_class): Remove FP_TOP_SSE_REGS
4962         and FP_SECOND_SSE_REGS.
4963         (REG_CLASS_NAMES): Ditto.
4964         (REG_CLASS_CONTENTS): Ditto.
4965         * config/i386/i386.c (ix86_preferred_reload_class) Do not handle
4966         FP_TOP_SSE_REGS and FP_SECOND_SSE_REGS classes.
4967         (ix86_preferred_output_reload_class): Ditto.
4968         * config/i386/i386.md (fix_trunc<mode>_i387_fisttp): Change "=&1f"
4969         clobber constraint to "=&f".
4970         (fix_truncdi_i387): Ditto.
4971         (lrintxfdi2): Ditto.
4972         (fistdi2_<rounding>): Ditto.
4973         (fpremxf4_i387): Change "=u" constraint to "=f".
4974         (fprem1xf4_i387): Ditto.
4975         (sincosxf3): Ditto.
4976         (fptanxf4_i387): Ditto.
4977         (fxtractxf3_i387): Ditto.
4978         (fscalexf4_i387): Ditto.
4979         (atan2xf3): Change "u" constraint to "f".
4980         (fyl2xxf3_i387): Ditto.
4981         (fyl2xp1xf3_i387): Ditto.
4983 2018-09-26  Uros Bizjak  <ubizjak@gmail.com>
4985         PR target/87439
4986         * config/i386/i386.h (NUM_MODES_FOR_MODE_SWITCHING): Update
4987         for removed I387_MASK_PM entity.
4990 2018-09-26  Jeff Law  <law@redhat.com>
4991         Revert
4992         2018-09-26  Alexey Neyman  <stilor@att.net>
4994         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
4995         headers are no longer pulled in by <isl/val.h>.
4997 2018-09-26  Richard Biener  <rguenther@suse.de>
4999         PR debug/87443
5000         * dwarf2out.c (gen_lexical_block_die): Do not equate inline
5001         or concrete instance DIE to the tree.  Create abstract origin
5002         attributes also for concrete instances.
5004 2018-09-26  Alexey Neyman  <stilor@att.net>
5006         * graphite.h: Include <isl/id.h> and <isl/space.h>; these
5007         headers are no longer pulled in by <isl/val.h>.
5009 2018-09-26  Matthew Malcomson  <matthew.malcomson@arm.com>
5011         * config/arm/arm.c (arm_split_compare_and_swap, arm_split_atomic_op):
5012         Use new helper functions.
5013         * config/arm/sync.md (atomic_load<mode>, atomic_store<mode>):
5014         Use new helper functions.
5015         * config/arm/aarch-common-protos.h (aarch_mm_needs_acquire,
5016         aarch_mm_needs_release): New declarations.
5017         * config/arm/aarch-common.c (aarch_mm_needs_acquire,
5018         aarch_mm_needs_release): New.
5020 2018-09-26  Eric Botcazou  <ebotcazou@adacore.com>
5022         * config/arm/arm.c (arm_reorg): Skip Thumb reorg pass for thunks.
5023         (arm32_output_mi_thunk): Deal with long calls.
5025 2018-09-26  Richard Biener  <rguenther@suse.de>
5027         PR debug/87428
5028         PR debug/87362
5029         * tree-inline.c (expand_call_inline): When the location
5030         of the call is UNKNOWN_LOCATION use DECL_SOURCE_LOCATION
5031         or BUILTINS_LOCATION for the BLOCK_SOURCE_LOCATION of
5032         the inserted BLOCK to make inlined_function_outer_scope_p
5033         recognize it.
5034         * dwarf2out.c (add_call_src_coords_attributes): Do not add
5035         coords for reserved locations.
5037 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
5039         * config/rs6000/rs6000.md (*movcc_internal1): Use set_attr_alternative.
5040         (*call_indirect_nonlocal_sysv<mode>): Ditto.
5041         (*call_value_indirect_nonlocal_sysv<mode>): Ditto.
5042         (*sibcall_nonlocal_sysv<mode>): Ditto.
5043         (*sibcall_value_nonlocal_sysv<mode>): Ditto.
5044         (<bd>_<mode>): Ditto.
5045         (<bd>tf_<mode>): Ditto.
5047 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
5049         * config/rs6000/altivec.md (*altivec_mov<mode>): Write the output
5050         control string as a list of templates instead of as C code.
5051         (*altivec_movti): Ditto.
5052         * config/rs6000/darwin.md (movdf_low_di): Ditto.
5054 2018-09-25  Jim Wilson  <jimw@sifive.com>
5056         * config/riscv/riscv.c (riscv_split_symbol): Mark auipc label as weak
5057         when target symbol is weak.
5059 2018-09-25  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5061         PR c/87387
5062         * builtins.c (unterminated_array): Simplify.
5063         * expr.c (string_constant): Handle SSA_NAME.  Add more exceptions
5064         where pointer arithmetic is safe.
5066 2018-09-25  Segher Boessenkool  <segher@kernel.crashing.org>
5068         PR target/86987
5069         * config/rs6000/altivec.md (altivec_vspltb): Use
5070         const_0_to_15_operand instead of u5bit_cint_operand.
5071         (*altivec_vspltb_internal): Ditto.
5072         (altivec_vspltb_direct): Ditto.
5073         (altivec_vsplth): Use const_0_to_7_operand instead of
5074         u5bit_cint_operand.
5075         (*altivec_vsplth_internal): Ditto.
5076         (altivec_vsplth_direct): Ditto.
5077         (altivec_vspltw): Use const_0_to_3_operand instead of
5078         u5bit_cint_operand.
5079         (*altivec_vspltw_internal): Ditto.
5080         (altivec_vspltw_direct): Ditto.
5081         (altivec_vspltsf): Ditto.
5082         (*altivec_vspltsf_internal): Ditto.
5083         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Handle the
5084         various splats with the proper size immediate.  Reorder the various
5085         cases by ascending size of immediate, and put all such together.
5087 2018-09-25  Richard Biener  <rguenther@suse.de>
5089         PR debug/83941
5090         * dwarf2out.c (add_AT_external_die_ref): Remove now redundant
5091         GC-ification.
5092         (maybe_create_die_with_external_ref): Do not create
5093         DW_TAG_imported_unit here.
5094         (add_abstract_origin_attribute): Handle external BLOCK refs.
5095         (dwarf2out_abstract_function): Simplify LTO case.
5096         (dwarf2out_early_finish): Create DW_TAG_imported_unit explicitely
5097         rather than using maybe_create_die_with_external_ref.
5099 2018-09-25  Uros Bizjak  <ubizjak@gmail.com>
5101         PR target/71278
5102         * config/i386/i386.md (frndintxf2_mask_pm): Remove.
5103         (frndintxf2_mask_pm_i387): Ditto.
5104         (nearbyintxf2): Rewrite expander pattern to match rintxf2.
5105         Enable for !flag_trapping_math.
5106         (nearbyint<mode>2): Enable x87 modes for !flag_trapping_math.
5107         Enable SSE modes for TARGET_SSE4_1 and expand them with round insn.
5108         Change operand 1 predicate to nonimmediate_operand.
5109         (attr "i387_cw"): Remove mask_pm.
5110         * config/i386/i386.h (enum ix86_stack_slot): Remove SLOT_CW_MASK_PM.
5111         (enum ix86_entity): Remove I387_MASK_PM.
5112         * config/i386/i386.c (ix86_i387_mode_needed): Do not
5113         handle I387_MASK_PM.
5114         (ix86_mode_needed): Ditto.
5115         (ix86_mode_after): Ditto.
5116         (ix86_mode_entry): Ditto.
5117         (ix86_mode_exit): Ditto.
5118         (emit_i387_cw_initialization): Do not handle I387_CW_MASK_PM.
5120 2018-09-25  Jakub Jelinek  <jakub@redhat.com>
5122         * vr-values.c (vr_values::vr_values): Initialize to_remove_edges and
5123         to_update_switch_stmts to vNULL instead of calling create on them
5124         immediately.
5126 2018-09-25  Richard Biener  <rguenther@suse.de>
5128         PR tree-optimization/87402
5129         * tree-ssa-sccvn.c (SSA_VISITED): Remove unused function.
5130         (visit_phi): Re-instantiate handling of supposed to be VARYING
5131         but non-VARYING backedge value.
5133 2018-09-25  Richard Biener  <rguenther@suse.de>
5135         PR debug/83941
5136         * dwarf2out.c (struct sym_off_pair): New.
5137         (external_die_map): New global.
5138         (lookup_decl_die): When in LTO create DIEs lazily from the
5139         external_die_map.
5140         (lookup_block_die): New function, create DIEs lazily in LTO.
5141         (equate_block_to_die): New function.
5142         (dwarf2out_die_ref_for_decl): During WPA get the association
5143         from the external DIE map.
5144         (dwarf2out_register_external_die): Record mapping into the
5145         external DIE map.
5146         (maybe_create_die_with_external_ref): New function split out from
5147         DIE generation part of old dwarf2out_register_external_die.
5148         (add_abstract_origin_attribute): Do not return the DIE.  When
5149         in LTO reference externals directly.
5150         (dwarf2out_abstract_function): When in LTO ignore calls for
5151         decls with external DIEs (already present abstract instances).
5152         (gen_call_site_die): Adjust.
5153         (add_high_low_attributes): Likewise.
5154         (gen_lexical_block_die): Likewise.
5155         (gen_inlined_subroutine_die): Likewie.
5156         (gen_block_die): Likewise.
5157         (dwarf2out_inline_entry): Likewise.
5158         (dwarf2out_early_finish): In LTRANS phase create DW_TAG_imported_unit
5159         DIEs.
5161 2018-09-25  Martin Liska  <mliska@suse.cz>
5163         * ipa-fnsummary.c (estimate_node_size_and_time): Scale by two
5164         integers and not by a float value.
5166 2018-09-25  Martin Liska  <mliska@suse.cz>
5168         PR fortran/87394
5169         * dbgcnt.c (dbg_cnt_process_single_pair): Return false
5170         instead of NULL.
5171         * dumpfile.c (dump_enable_all): Remove extra parenthesis.
5172         * gcov-tool.c: Declare the function with ATTRIBUTE_NORETURN.
5173         * godump.c (go_format_type): Remove extra parenthesis.
5175 2018-09-25  Martin Liska  <mliska@suse.cz>
5177         * alias.c (set_dest_equal_p): Remove unused function.
5178         * config/i386/i386.c (def_builtin_pure2): Likewise.
5179         * diagnostic-show-locus.c (class layout): Remove
5180         unused field.
5181         (layout::layout): Likewise here.
5182         * dump-context.h (class temp_dump_context): Likewise.
5183         * dwarf2out.c (add_AT_fde_ref): Remove unused function.
5184         (add_AT_loclistsptr): Likewise.
5185         (add_AT_offset): Likewise.
5186         (get_AT_hi_pc): Likewise.
5187         (is_comdat_die): Likewise.
5188         (type_is_enum): Likewise.
5189         (ceiling): Likewise.
5190         (add_AT_vms_delta): Likewise.
5191         (is_class_die): Likewise.
5192         * edit-context.c (class line_event): Remove unused field.
5193         * graphite-sese-to-poly.c (tree_int_to_gmp): Remove
5194         unused function.
5195         * ipa-cp.c (ipa_get_vr_lat): Likewise.
5196         * lra-constraints.c (ok_for_index_p_nonstrict): Likewise.
5197         (ok_for_base_p_nonstrict): Likewise.
5198         * tree-chrec.c (is_not_constant_evolution): Likewise.
5199         (chrec_fold_poly_cst): Likewise.
5200         * tree-if-conv.c (has_pred_critical_p): Likewise.
5201         * tree-ssa-coalesce.c (print_exprs): Likewise.
5202         * tree-ssa-pre.c (bitmap_set_contains_expr): Likewise.
5203         * tree-ssa-uninit.c (is_and_or_or_p): Likewise.
5204         * tree-vrp.c (value_ranges_intersect_p): Likewise.
5205         (value_range_nonnegative_p): Likewise.
5207 2018-09-25  Martin Liska  <mliska@suse.cz>
5209         * config/powerpcspe/powerpcspe.c (rs6000_output_function_epilogue):
5210         Do not handle "GNU Pascal".
5211         * config/rs6000/rs6000.c (rs6000_output_function_epilogue):
5212         Likewise.
5213         * config/sparc/sparc.c (sparc_pass_by_reference): Remove Pascal
5214         from documentation. Likewise.
5215         * dbxout.c (dbxout_range_type): Likewise.
5216         * doc/cpp.texi: Likewise.
5217         * doc/extend.texi: Likewise.
5218         * doc/frontends.texi: Likewise.
5219         * doc/invoke.texi: Remove Pascal entry.
5220         * tree.def (CLEANUP_POINT_EXPR): Likewise.
5221         * doc/rtl.texi (MODE_FUNCTION): Remove not used entry.
5223 2018-09-25  Martin Liska  <mliska@suse.cz>
5225         PR middle-end/86078
5226         * doc/invoke.texi: Document all parameters and remove default
5227         of the parameters.
5229 2018-09-25  Ilya Leoshkevich  <iii@linux.ibm.com>
5231         PR bootstrap/87417
5232         * rtl.c (rtx_code_size): Take into account that EQ_ATTR_ALT
5233         contains HOST_WIDE_INTs when computing its size.
5235 2018-09-24  Jim Wilson  <jimw@sifive.com>
5237         PR target/87391
5238         * config/riscv/riscv.h (STACK_BOUNDARY): Test riscv_abi == ABI_ILP32E
5239         not TARGET_RVE.
5240         (ABI_STACK_BOUNDARY, MAX_ARGS_IN_REGISTERS): Likewise.
5242 2018-09-24  Andrew Pinski  <apinski@marvell.com>
5244         *  config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Don't
5245         access prev before checking it for NULLness in the
5246         AARCH64_FUSE_CMP_BRANCH case.
5248 2018-09-24  H.J. Lu  <hongjiu.lu@intel.com>
5250         PR target/82699
5251         * config/i386/i386.c (rest_of_insert_endbranch): Set
5252         endbr_queued_at_entrance to true and don't insert ENDBR if
5253         x86_function_profiler will be called.
5254         (x86_function_profiler): Insert ENDBR if endbr_queued_at_entrance
5255         is true.
5256         * config/i386/i386.h (machine_function): Add
5257         endbr_queued_at_entrance.
5259 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
5261         * genattrtab.c (mk_attr_alt): Use alternative_mask.
5262         (attr_rtx_1): Adjust caching to match the new EQ_ATTR_ALT field
5263         types.
5264         (check_attr_test): Use alternative_mask.
5265         (get_attr_value): Likewise.
5266         (compute_alternative_mask): Use alternative_mask and XWINT.
5267         (make_alternative_compare): Use alternative_mask.
5268         (attr_alt_subset_p): Use XWINT.
5269         (attr_alt_subset_of_compl_p): Likewise.
5270         (attr_alt_intersection): Use alternative_mask and XWINT.
5271         (attr_alt_union): Likewise.
5272         (attr_alt_complement): Use HOST_WIDE_INT and XWINT.
5273         (mk_attr_alt): Use alternative_mask and HOST_WIDE_INT.
5274         (simplify_test_exp): Use alternative_mask and XWINT.
5275         (write_test_expr): Use alternative_mask and XWINT, adjust bit
5276         number calculation to support 64 bits.  Generate code that
5277         checks 64-bit masks.
5278         (main): Use alternative_mask.
5279         * rtl.def (EQ_ATTR_ALT): Change field types from ii to ww.
5281 2018-09-24  Ilya Leoshkevich  <iii@linux.ibm.com>
5283         PR target/80080
5284         * config/s390/s390.c (s390_emit_epilogue): Do not use PARALLEL
5285         RETURN+USE when returning via %r14.
5287 2018-09-24  Martin Liska  <mliska@suse.cz>
5289         * gcov.c (output_lines): Print colorization legend
5290         for both flag_use_colors and flag_use_hotness_colors.
5291         Reword the help.
5293 2018-09-24  Martin Liska  <mliska@suse.cz>
5295         * coverage.c (get_coverage_counts): Use warning_at
5296         with current_function_decl location. Use %qD in warning
5297         message.
5299 2018-09-24  Martin Liska  <mliska@suse.cz>
5301         * memory-block.h (memory_block_pool::release): Annotate with
5302         valgrind that the memory is not accessible.
5304 2018-09-24  Martin Liska  <mliska@suse.cz>
5306         PR sanitizer/85774
5307         * asan.c: Make asan_handled_variables extern.
5308         * asan.h: Likewise.
5309         * cfgexpand.c (expand_stack_vars): Make sure
5310         a representative is unpoison if another
5311         variable in the partition is handled by
5312         use-after-scope sanitization.
5314 2018-09-24  Richard Biener  <rguenther@suse.de>
5316         PR tree-optimization/63155
5317         * tree-ssa-propagate.c (add_ssa_edge): Avoid adding PHIs to
5318         the worklist when the edge of the respective argument isn't
5319         executable.
5321 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
5323         * config/i386/i386.h (enum reg_class): Rename MASK_REGS to
5324         ALL_MASK_REGS and MASK_EVEX_REGS to MASK_REGS.
5325         (MASK_CLASS_P): Update for rename.
5326         (MAYBE_MASK_CLASS_P): Ditto.
5327         (REG_CLASS_NAMES): Update.
5328         (REG_CLASS_CONTENT): Update.
5329         * config/i386/i386.c (regclass_map): Update for MASK_REG
5330         and ALL_MASK_REGS rename.
5331         * config/i386/constraints.md (Yk): Update for rename.
5332         (k): Ditto.
5334 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
5336         * config/i386/i386.h (enum reg_class): Remove
5337         EVEX_SSE_REGS and MOD4_SSE_REGS.
5338         (REG_CLASS_NAMES): Update.
5339         (REG_CLASS_CONTENT): Update.
5340         * config/i386/i386.c (regclass_map): Declare AVX-512 SSE
5341         registers as ALL_SSE_REGS.
5342         (ix86_additional_allocno_class_p): Remove.
5343         (TARGET_ADDITIONAL_ALLOCNO_CLASS_P): Remove.
5344         (ix86_register_priority): Lower priority of EVEX SSE registers.
5345         Use IN_RANGE macro where appropriate.
5346         (ix86_hard_regno_mode_ok): Merge AVX-5124FMAPS and
5347         AVX-5124VNNIW checks.
5348         (ix86_modes_tieable_p): Tie 512-bit SSE modes.
5349         * config/i386/sse.md (avx5124fmaddps_4fmaddps)
5350         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddps_maskz)
5351         (avx5124fmaddps_4fmaddss, avx5124fmaddps_4fmaddss_mask)
5352         (avx5124fmaddps_4fmaddss_maskz, avx5124fmaddps_4fnmaddps)
5353         (avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddps_maskz)
5354         (avx5124fmaddps_4fnmaddss, avx5124fmaddps_4fnmaddss_mask)
5355         (avx5124fmaddps_4fnmaddss_maskz, avx5124vnniw_vp4dpwssd)
5356         (avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssd_maskz)
5357         (avx5124vnniw_vp4dpwssds, avx5124vnniw_vp4dpwssds_mask)
5358         (avx5124vnniw_vp4dpwssds_maskz): Use "v" instead of "Yh" constraint.
5359         * config/i386/constraints.md (Yh): Remove.
5361 2018-09-23   Uros Bizjak  <ubizjak@gmail.com>
5363         * config/i386/i386.c (regclass_map): Declare integer REX registers
5364         as GENERAL_REGS.
5366 2018-09-23  Gerald Pfeifer  <gerald@pfeifer.com>
5368         * doc/service.texi (Service): Switch the fsf.org link to https.
5370 2018-09-22  Chung-Ju Wu  <jasonwucj@gmail.com>
5372         PR target/86798
5373         * config/nds32/nds32.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
5374         Define to speculation_safe_value_not_needed.
5376 2018-09-21  Florian Weimer  <fweimer@redhat.com>
5378         PR middle-end/81035
5379         * doc/extend.texi (Common Function Attributes): Mention that
5380         noreturn suppresses tail call optimization.
5382 2018-09-21  Jeff Law  <law@redhat.com>
5384         * gimple-ssa-evrp.c (evrp_dom_walker::cleanup): Call
5385         vr_values::cleanup_edges_and_switches.
5386         * tree-vrp.c (to_remove_edges, to_update_switch_stmts): Moved into
5387         vr_values class.
5388         (identify_jump_threads): Remove EDGE_IGNORE handling.
5389         (execute_vrp): Move handling of to_remove_edges and
5390         to_update_switch_stmts into vr_values class member functions.
5391         * tree-vrp.h (switch_update, to_remove_edges): Remove declarations.
5392         (to_update_switch_stmts): Likewise.
5393         * vr-values.c: Include cfghooks.h.
5394         (vr_values::vr_values): Initialize to_remove_edges and
5395         to_update_switch_stmts.
5396         (vr_values::~vr_values): Verify to_remove_edges and
5397         to_update_switch_stmts are empty.
5398         (vr_values::simplify_switch_using_ranges): Set EDGE_IGNORE as needed.
5399         (vr_values::cleanup_edges_and_switches): New member function.
5400         * vr-values.h (vr_values): Add cleanup_edges_and_switches member
5401         function.  Add new data members.
5403 2018-09-21  David Malcolm  <dmalcolm@redhat.com>
5405         PR tree-optimization/87309
5406         * dumpfile.c (dump_context::begin_scope): Filter the dump_loc
5407         calls with pflags and alt_flags.
5408         (selftest::test_capture_of_dump_calls): Add test of interaction of
5409         MSG_OPTIMIZED_LOCATIONS with AUTO_DUMP_SCOPE.
5411 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5413         * config.gcc: Factorize and comment inclusion of vxworks-dummy.h.
5415 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5417         * config/vxworks.h (CLEAR_INSN_CACHE): #define to 1.
5419 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5421         * config/vxworks.h (VXWORKS_LIBGCC_SPEC): Remove -lc_internal.
5422         Merge block comment with the one ahead of VXWORKS_LIBS_RTP. Then:
5423         (VXWORKS_LIBS_RTP): Minor reordering.
5425 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5427         * config/vxworks.h (STARTFILE_PREFIX_SPEC): Define.
5428         (VXWORKS_LIBS_DIR_RTP): Remove definition and use.
5430 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5432         * config/vxworks.h (SIZE_TYPE): Account for TARGET_VXWORKS64.
5433         (PTRDIFF_TYPE): Likewise.
5435 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5437         * config.gcc: Enforce def of TARGET_VXWORKS64 to 1 from
5438         triplet, similar to support for VxWorks7.
5439         * config/vxworks-dummy.h: Provide a default definition
5440         of TARGET_VXWORKS64 to 0.
5442 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5444         * config/vxworks.h (TARGET_VXWORKS7): Move default definition ...
5445         * config/vxworks-dummy.h: here.
5447 2018-09-21  Olivier Hainque  <hainque@adacore.com>
5449         * config.gcc: Prepend vxworks-dummy.h to tm_file for powerpc*
5451 2018-09-21  Shaokun Zhang  <zhangshaokun@hisilicon.com>
5452             Bo Zhou  <zbo.zhou@hisilicon.com>
5454         * config/aarch64/aarch64-cores.def (tsv110): New CPU.
5455         * config/aarch64/aarch64-tune.md: Regenerated.
5456         * doc/invoke.texi (AArch64 Options/-mtune): Add "tsv110".
5457         * config/aarch64/aarch64.c (tsv110_tunings): New tuning table.
5458         * config/aarch64/aarch64-cost-tables.h: Add "tsv110" extra costs.
5460 2018-09-21  Andrew Stubbs  <ams@codesourcery.com>
5461             Julian Brown  <julian@codesourcery.com>
5463         * builtins.c (get_builtin_sync_mem): Handle address spaces.
5465 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
5467         * config/rs6000/rs6000.c (rs6000_function_ok_for_sibcall): Return false
5468         if the call takes a static chain.
5470 2018-09-21  Martin Liska  <mliska@suse.cz>
5472         * auto-profile.c (autofdo_source_profile::read): Do not
5473         set sum_all.
5474         (read_profile): Do not add working sets.
5475         (read_autofdo_file): Remove sum_all.
5476         (afdo_callsite_hot_enough_for_early_inline): Remove const
5477         qualifier.
5478         * coverage.c (struct counts_entry): Remove gcov_summary.
5479         (read_counts_file): Read new GCOV_TAG_OBJECT_SUMMARY,
5480         do not support GCOV_TAG_PROGRAM_SUMMARY.
5481         (get_coverage_counts): Remove summary and expected
5482         arguments.
5483         * coverage.h (get_coverage_counts): Likewise.
5484         * doc/gcov-dump.texi: Remove -w option.
5485         * gcov-dump.c (dump_working_sets): Remove.
5486         (main): Do not support '-w' option.
5487         (print_usage): Likewise.
5488         (tag_summary): Likewise.
5489         * gcov-io.c (gcov_write_summary): Do not dump
5490         histogram.
5491         (gcov_read_summary): Likewise.
5492         (gcov_histo_index): Remove.
5493         (gcov_histogram_merge): Likewise.
5494         (compute_working_sets): Likewise.
5495         * gcov-io.h (GCOV_TAG_OBJECT_SUMMARY): Mark
5496         it not obsolete.
5497         (GCOV_TAG_PROGRAM_SUMMARY): Mark it obsolete.
5498         (GCOV_TAG_SUMMARY_LENGTH): Adjust.
5499         (GCOV_HISTOGRAM_SIZE): Remove.
5500         (GCOV_HISTOGRAM_BITVECTOR_SIZE): Likewise.
5501         (struct gcov_summary): Simplify rapidly just
5502         to runs and sum_max fields.
5503         (gcov_histo_index): Remove.
5504         (NUM_GCOV_WORKING_SETS): Likewise.
5505         (compute_working_sets): Likewise.
5506         * gcov-tool.c (print_overlap_usage_message): Remove
5507         trailing empty line.
5508         * gcov.c (read_count_file): Read GCOV_TAG_OBJECT_SUMMARY.
5509         (output_lines): Remove program related line.
5510         * ipa-profile.c (ipa_profile): Do not consider GCOV histogram.
5511         * lto-cgraph.c (output_profile_summary): Do not stream GCOV
5512         histogram.
5513         (input_profile_summary): Do not read it.
5514         (merge_profile_summaries): And do not merge it.
5515         (input_symtab): Do not call removed function.
5516         * modulo-sched.c (sms_schedule): Do not print sum_max.
5517         * params.def (HOT_BB_COUNT_FRACTION): Reincarnate param that was
5518         removed when histogram method was invented.
5519         (HOT_BB_COUNT_WS_PERMILLE): Mention that it's used only in LTO
5520         mode.
5521         * postreload-gcse.c (eliminate_partially_redundant_load): Fix
5522         GCOV coding style.
5523         * predict.c (get_hot_bb_threshold): Use HOT_BB_COUNT_FRACTION
5524         and dump selected value.
5525         * profile.c (add_working_set): Remove.
5526         (get_working_sets): Likewise.
5527         (find_working_set): Likewise.
5528         (get_exec_counts): Do not work with working sets.
5529         (read_profile_edge_counts): Do not inform as sum_max is removed.
5530         (compute_branch_probabilities): Likewise.
5531         (compute_value_histograms): Remove argument for call of
5532         get_coverage_counts.
5533         * profile.h: Do not make gcov_summary const.
5535 2018-09-21  Monk Chiang  <sh.chiang04@gmail.com>
5537         * config.gcc (nds32*-*-*): Set TARGET_DEFAULT_TLSDESC_TRAMPOLINE=0.
5539 2018-09-21  Eric Botcazou  <ebotcazou@adacore.com>
5541         PR tree-optimization/86990
5542         * gimple-ssa-store-merging.c (imm_store_chain_info:coalesce_immediate):
5543         Check that the entire merged store group is made of constants only for
5544         overlapping stores.
5546 2018-09-20  Allan Sandfeld Jensen  <allan.jensen@qt.io>
5548         * gcc.c (LINK_COMMAND_SPEC): Handle -r like -nostdlib.
5549         (VTABLE_VERIFICATION_SPEC): Likewise.
5550         (SANITIZER_EARLY_SPEC): Likewise.
5551         (SANITIZER_SPEC): Likewise.
5552         * config/darwin.h (LINK_COMMAND_SPEC): Likewise.
5553         * doc/invoke.texi (Link Options): Document -r.
5555 2018-09-20  Richard Biener <rguenther@suse.de>
5557         PR middle-end/87054
5558         * gimplify.c (gimplify_expr): Retain alignment of
5559         addressable lvalue in dereference.
5561 2018-09-20  Alexandre Oliva <aoliva@redhat.com>
5563         PR bootstrap/87013
5564         * configure.ac: Check for .loc is_stmt support.
5565         * configure, config.in: Rebuilt.
5566         * dwarf2out.c (dwarf2out_source_line): Skip is_stmt
5567         if not supported.
5569 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
5571         * config/rs6000/rs6000.opt (misel=no, misel=yes): Delete.
5572         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -misel=yes and
5573         -misel=no.
5575 2018-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
5577         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
5578         VECTOR_OTHER.
5579         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete
5580         case VECTOR_OTHER.
5582 2018-09-20  Marek Polacek  <polacek@redhat.com>
5584         * doc/invoke.texi: Add -Wno-init-list-lifetime to C++ Language Options.
5586 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
5588         PR tree-optimization/87288
5589         * tree-vect-loop.c (vect_analyze_loop_2): Take PEELING_FOR_GAPS
5590         into account when determining PEELING_FOR_NITERS.
5592 2018-09-20  Richard Sandiford  <richard.sandiford@arm.com>
5594         PR tree-optimization/86877
5595         * tree-vect-loop.c (vect_analyze_loop_2): Call
5596         vect_verify_datarefs_alignment.
5598 2018-09-19  Marek Polacek  <polacek@redhat.com>
5600         * doc/invoke.texi: Document -Wclass-conversion.
5602 2018-09-19  John David Anglin  <danglin@gcc.gnu.org>
5604         * config/pa/pa.c (pa_adjust_priority): Delete.
5605         (TARGET_SCHED_ADJUST_PRIORITY): Delete define.
5607         * config/pa/pa.md (atomic_storeqi): Restore deleted expander.
5608         (atomic_storehi): Likewise.
5609         (atomic_storesi): Likewise.
5610         (atomic_loaddi): Restore compare and swap exchange loop code.
5612 2018-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
5614         PR rtl-optimization/86902
5615         * combine.c (try_combine): When changing the CC mode used, don't change
5616         an unrelated mode in other_insn to that new CC mode.
5618 2018-09-19  David Malcolm  <dmalcolm@redhat.com>
5620         * tree-data-ref.c (runtime_alias_check_p): Use formatted printing
5621         with %T in place of calls to dump_generic_expr.
5622         (prune_runtime_alias_test_list): Likewise.
5623         (create_runtime_alias_checks): Likewise.
5624         * tree-vect-data-refs.c (vect_check_nonzero_value): Likewise.
5625         (vect_analyze_data_ref_dependence): Likewise.
5626         (vect_slp_analyze_data_ref_dependence): Likewise.
5627         (vect_record_base_alignment): Likewise.  Use %G in place of call
5628         to dump_gimple_stmt.
5629         (vect_compute_data_ref_alignment): Likewise.
5630         (verify_data_ref_alignment): Likewise.
5631         (vect_find_same_alignment_drs): Likewise.
5632         (vect_analyze_group_access_1): Likewise.
5633         (vect_analyze_data_ref_accesses): Likewise.
5634         (dependence_distance_ge_vf): Likewise.
5635         (dump_lower_bound): Likewise.
5636         (vect_prune_runtime_alias_test_list): Likewise.
5637         (vect_find_stmt_data_reference): Likewise.
5638         (vect_analyze_data_refs): Likewise.
5639         (vect_create_addr_base_for_vector_ref): Likewise.
5640         (vect_create_data_ref_ptr): Likewise.
5641         * tree-vect-loop-manip.c (vect_set_loop_condition): Likewise.
5642         (vect_can_advance_ivs_p): Likewise.
5643         (vect_update_ivs_after_vectorizer): Likewise.
5644         (vect_gen_prolog_loop_niters): Likewise.
5645         (vect_prepare_for_masked_peels): Likewise.
5646         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
5647         (vect_determine_vectorization_factor): Likewise.
5648         (vect_is_simple_iv_evolution): Likewise.
5649         (vect_analyze_scalar_cycles_1): Likewise.
5650         (vect_analyze_loop_operations): Likewise.
5651         (report_vect_op): Likewise.
5652         (vect_is_slp_reduction): Likewise.
5653         (check_reduction_path): Likewise.
5654         (vect_is_simple_reduction): Likewise.
5655         (vect_create_epilog_for_reduction): Likewise.
5656         (vect_finalize_reduction:): Likewise.
5657         (vectorizable_induction): Likewise.
5658         (vect_transform_loop_stmt): Likewise.
5659         (vect_transform_loop): Likewise.
5660         (optimize_mask_stores): Likewise.
5661         * tree-vect-patterns.c (vect_pattern_detected): Likewise.
5662         (vect_split_statement): Likewise.
5663         (vect_recog_over_widening_pattern): Likewise.
5664         (vect_recog_average_pattern): Likewise.
5665         (vect_determine_min_output_precision_1): Likewise.
5666         (vect_determine_precisions_from_range): Likewise.
5667         (vect_determine_precisions_from_users): Likewise.
5668         (vect_mark_pattern_stmts): Likewise.
5669         (vect_pattern_recog_1): Likewise.
5670         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
5671         (vect_record_max_nunits): Likewise.
5672         (vect_build_slp_tree_1): Likewise.
5673         (vect_build_slp_tree_2): Likewise.
5674         (vect_print_slp_tree): Likewise.
5675         (vect_analyze_slp_instance): Likewise.
5676         (vect_detect_hybrid_slp_stmts): Likewise.
5677         (vect_detect_hybrid_slp_1): Likewise.
5678         (vect_slp_analyze_operations): Likewise.
5679         (vect_slp_analyze_bb_1): Likewise.
5680         (vect_transform_slp_perm_load): Likewise.
5681         (vect_schedule_slp_instance): Likewise.
5682         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
5683         (vect_mark_stmts_to_be_vectorized): Likewise.
5684         (vect_init_vector_1): Likewise.
5685         (vect_get_vec_def_for_operand): Likewise.
5686         (vect_finish_stmt_generation_1): Likewise.
5687         (vect_check_load_store_mask): Likewise.
5688         (vectorizable_call): Likewise.
5689         (vectorizable_conversion): Likewise.
5690         (vectorizable_operation): Likewise.
5691         (vectorizable_load): Likewise.
5692         (vect_analyze_stmt): Likewise.
5693         (vect_is_simple_use): Likewise.
5694         (vect_get_vector_types_for_stmt): Likewise.
5695         (vect_get_mask_type_for_stmt): Likewise.
5696         * tree-vectorizer.c (increase_alignment): Likewise.
5698 2018-09-19  Andrew Stubbs  <ams@codesourcery.com>
5700         * doc/rtl.texi: Adjust vec_select description.
5701         * simplify-rtx.c (simplify_binary_operation_1): Allow VEC_SELECT to use
5702         non-constant selectors.
5704 2018-09-19  Matthew Malcomson  <matthew.malcomson@arm.com>
5706         * config/aarch64/aarch64-protos.h
5707         (aarch64_offset_9bit_signed_unscaled_p): New declaration.
5708         * config/aarch64/aarch64.md (arches): New "rcpc8_4" attribute value.
5709         (arch_enabled): Add check for "rcpc8_4" attribute value of "arch".
5710         * config/aarch64/aarch64.h (AARCH64_FL_RCPC8_4): New bitfield.
5711         (AARCH64_FL_FOR_ARCH8_4): Include AARCH64_FL_RCPC8_4.
5712         (AARCH64_FL_PROFILE): Move index so flags are ordered.
5713         (AARCH64_ISA_RCPC8_4): New flag.
5714         * config/aarch64/aarch64.c (offset_9bit_signed_unscaled_p): Renamed
5715         to aarch64_offset_9bit_signed_unscaled_p.
5716         * config/aarch64/atomics.md (atomic_store<mode>): Allow offset
5717         and use stlur.
5718         * config/aarch64/constraints.md (Ust): New constraint.
5719         * config/aarch64/predicates.md.
5720         (aarch64_9bit_offset_memory_operand): New predicate.
5721         (aarch64_rcpc_memory_operand): New predicate.
5723 2018-09-19  Eric Botcazou  <ebotcazou@adacore.com>
5725         PR rtl-optimization/87361
5726         * rtlanal.c (nonzero_bits1): Revert accidental change.
5728 2018-09-19  Richard Biener  <rguenther@suse.de>
5730         PR tree-optimization/87349
5731         PR tree-optimization/87342
5732         * tree-ssa-sccvn.c (do_rpo_vn): Iterate max_rpo computation.
5734 2018-09-18  Marek Polacek  <polacek@redhat.com>
5736         P1064R0 - Allowing Virtual Function Calls in Constant Expressions
5737         * gimple-fold.c (gimple_get_virt_method_for_vtable): Adjust assert.
5739 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
5741         * config/rs6000/rs6000.md: Remove old "Cygnus sibcall" comment.
5743 2018-09-18  Segher Boessenkool  <segher@kernel.crashing.org>
5745         PR rtl-optimization/86882
5746         * rtlanal.c (reg_overlap_mentioned_p): Handle CLOBBER.
5748 2018-09-18  Uros Bizjak  <ubizjak@gmail.com>
5750         * config/i386/i386.md (*<code>extend<mode>xf2): Macroize insn from
5751         *<code>extendsfxf2 and *<code>extenddfxf2 using MODEF mode iterator.
5753 2018-09-18  Jonathan Wakely  <jwakely@redhat.com>
5755         PR other/87353
5756         * doc/invoke.texi (Link Options): Fix formatting and grammar.
5758 2018-09-18  Richard Biener  <rguenther@suse.de>
5760         PR middle-end/63155
5761         * tree-ssa-coalesce.c (tree_int_map_hasher): Remove.
5762         (compute_samebase_partition_bases): Likewise.
5763         (coalesce_ssa_name): Always use compute_optimized_partition_bases.
5764         (gimple_can_coalesce_p): Simplify.
5766 2018-09-18  Hans-Peter Nilsson  <hp@bitrange.com>
5768         Handle a library implementation of ffs calling __builtin_ffs.
5769         * config/mmix/mmix.c (TARGET_INIT_LIBFUNCS): Override with...
5770         (mmix_init_libfuncs): New function: make __builtin_ffs expand
5771         to __ffsdi2.
5773 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
5775         * diagnostic-show-locus.c (class layout_range): Add field
5776         "m_original_idx".
5777         (layout_range::layout_range): Add "original_idx" param and use it
5778         to initialize new field.
5779         (make_range): Use 0 for original_idx.
5780         (layout::layout): Pass in index to calls to
5781         maybe_add_location_range.
5782         (layout::maybe_add_location_range): Add param "original_idx" and
5783         pass it on to layout_range.
5784         (layout::print_any_labels): Pass on range->m_original_idx to
5785         get_text call.
5786         (gcc_rich_location::add_location_if_nearby): Use 0 for
5787         original_idx.
5788         * gcc-rich-location.h (text_range_label::get_text): Update for new
5789         param.
5790         (range_label_for_type_mismatch::get_text): Likewise.
5792 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
5794         * config/i386/i386.c (ix86_emit_i387_log1p): Emit fldln2 earlier.
5796 2018-09-17  David Malcolm  <dmalcolm@redhat.com>
5798         * gimple-ssa-sprintf.c (fmtwarn): Update for introduction of
5799         format_string_diagnostic_t.
5800         (fmtwarn_n): Likewise.
5801         * substring-locations.c
5802         (format_string_diagnostic_t::format_string_diagnostic_t) New ctor.
5803         (format_warning_n_va): Convert to...
5804         (format_string_diagnostic_t::emit_warning_n_va): ...this.
5805         (format_warning_va): Convert to...
5806         (format_string_diagnostic_t::emit_warning_va): ...this.
5807         (format_warning_at_substring): Convert to...
5808         (format_string_diagnostic_t::emit_warning): ...this.
5809         (format_warning_at_substring_n): Convert to...
5810         (format_string_diagnostic_t::emit_warning_n): ...this.
5811         * substring-locations.h (class format_string_diagnostic_t): New
5812         class.
5813         (format_warning_va): Convert to
5814         format_string_diagnostic_t::emit_warning_va.
5815         (format_warning_n_va): Convert to
5816         format_string_diagnostic_t::emit_warning_n_va.
5817         (format_warning_at_substring): Convert to
5818         format_string_diagnostic_t::emit_warning.
5819         (format_warning_at_substring_n): Convert to
5820         format_string_diagnostic_t::emit_warning_n.
5822 2018-09-17  Cesar Philippidis  <cesar@codesourcery.com>
5823             Bernd Schmidt <bernds_cb1@t-online.de>
5825         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with
5826         SImode args.
5828 2018-09-17  Uros Bizjak  <ubizjak@gmail.com>
5830         * config/i386/i386.md (truncxf<mode>2_i387_noop_unspec): Change
5831         operand 0 predicate to nonimmediate operand.
5832         (rint<mode>2_frndint): Remove insn pattern.
5833         (rint<mode>2): Change operand 1 predicate to general_operand.
5834         Extend operand 1 to XFmode and generate rintxf2 insn.
5835         (frndintxf2_<rounding>): Rename from frndint<mode>2_<rounding>.
5836         Do not use X87MODEF mode macro.
5837         (frndintxf2_<rounding>_i387): Rename from
5838         frndint<mode>2_<rounding>_i387.  Do not use X87MODEF mode macro.
5839         (<rounding_insn><mode>2): For non-SSE modes, extend operand 1
5840         to XFmode and generate significandxf3 insn.
5842 2018-09-17  Richard Biener  <rguenther@suse.de>
5844         PR tree-optimization/87328
5845         * tree-ssa-sccvn.c (process_bb): Remove assertion about not
5846         visiting unexecutable backedges when not iterating.
5847         (do_rpo_vn): Mark all edges not executable even when not
5848         iterating.
5850 2018-09-17  Martin Jambor  <mjambor@suse.cz>
5852         PR c/63886
5853         * doc/invoke.texi (Warning Options): Likewise.
5855 2018-09-17  Richard Biener  <rguenther@suse.de>
5857         PR tree-optimization/87301
5858         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup): Properly
5859         clean EH info from leftover copy assignments.
5861 2018-09-17  Martin Liska  <mliska@suse.cz>
5863         PR gcov-profile/85871
5864         * gcov.c (output_intermediate_file): Fix out of bounds
5865         access.
5867 2018-09-17  Vineet Gupta  <vgupta@synopsys.com>
5869         * config/arc/arc.c: Object attributes for core4 not reflected
5870         correctly.
5871         * config/arc/arc.h: Don't restrict DBNZ to core3 (core4 includes
5872         core3).
5874 2018-09-17  Alexey Brodkin  <abrodkin@synopsys.com>
5876         * config/arc/linux.h (LINK_EH_SPEC): Add missing space.
5878 2018-09-17  Martin Liska  <mliska@suse.cz>
5880         * doc/gcov.texi: Document new option --use-hotness-colors.
5881         * gcov.c (struct source_info): Declare new field.
5882         (source_info::source_info): Set default for maximum_count.
5883         (print_usage): Add new -q option.
5884         (process_args): Process it.
5885         (accumulate_line_info): Save src->maximum_count.
5886         (output_line_beginning): Make color line number if
5887         flag_use_hotness_colors is set.
5888         (output_line_details): Pass default argument value.
5889         (output_lines): Pass src->maximum_count.
5891 2018-09-17  Martin Liska  <mliska@suse.cz>
5893         * common/config/i386/i386-common.c (ix86_get_valid_option_values):
5894         Use processor_names table.
5895         * config/i386/i386.c (ix86_default_align): Use
5896         processor_cost_table for alignment values.
5897         (ix86_option_override_internal): Use processor_names.
5898         (ix86_function_specific_print): Likewise.
5899         * config/i386/i386.h (struct processor_costs):
5900         Add alignment values.
5901         (struct ptt): Remove and replace with const char *.
5902         * config/i386/x86-tune-costs.h (struct processor_costs):
5903         Declare default alignments for all costs.
5905 2018-09-17  Aldy Hernandez  <aldyh@redhat.com>
5907         * tree-vrp.c (extract_range_from_unary_expr): Do not special case
5908         symbolics or VR_VARYING ranges for ABS_EXPR.
5909         * wide-int-range.cc (wide_int_range_abs): Return positive numbers
5910         when range will wrap.
5912 2018-09-15  Eric Botcazou  <ebotcazou@adacore.com>
5914         PR middle-end/86864
5915         * cfgexpand.c (expand_gimple_basic_block): Be prepared for a BARRIER
5916         before and after a JUMP_TABLE_DATA.
5918 2018-09-14  John David Anglin  <danglin@gcc.gnu.org>
5920         PR middle-end/87188
5921         * dojump.c (do_compare_and_jump): Canonicalize function pointers
5922         when one operand is a function pointer.  Use POINTER_TYPE_P and
5923         FUNC_OR_METHOD_TYPE_P.
5924         * expr.c (do_store_flag): Use POINTER_TYPE_P and FUNC_OR_METHOD_TYPE_P.
5925         * fold-const.c (build_range_check): Likewise.
5926         * match.pd (simple_comparison): Likewise.
5928 2018-09-14  David Malcolm  <dmalcolm@redhat.com>
5930         PR c/82967
5931         * spellcheck.c (get_edit_distance_cutoff): New function.
5932         (selftest::test_edit_distance_unit_test_oneway): Rename to...
5933         (selftest::test_get_edit_distance_one_way): ...this.
5934         (selftest::test_get_edit_distance_unit): Rename to...
5935         (selftest::test_get_edit_distance_both_ways): ...this.
5936         (selftest::test_edit_distances): Move tests to this new function,
5937         and test some more pairs of strings.  Update for above renaming.
5938         (selftest::get_old_cutoff): New function.
5939         (selftest::test_get_edit_distance_cutoff): New function.
5940         (selftest::assert_suggested_for): New function.
5941         (ASSERT_SUGGESTED_FOR): New macro.
5942         (selftest::assert_not_suggested_for): New function.
5943         (ASSERT_NOT_SUGGESTED_FOR): New macro.
5944         (selftest::test_suggestions): New function.
5945         (selftest::spellcheck_c_tests): Move test_get_edit_distance_unit
5946         tests to selftest::test_edit_distances and call it.  Add calls to
5947         selftest::test_get_edit_distance_cutoff and
5948         selftest::test_suggestions.
5949         * spellcheck.h (get_edit_distance_cutoff): New function declaration.
5950         (best_match::consider): Replace hard-coded cutoff calculation with
5951         a call to...
5952         (best_match::get_cutoff): New declaration.
5953         (best_match::get_best_meaningful_candidate): Likewise.
5955 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5957         * builtins.c (fold_builtin_strlen): Remove TODO comment.
5959 2018-09-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5961         revert:
5962         2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
5964         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
5965         terminated string literal.
5967 2018-09-14  Martin Sebor  <msebor@redhat.com>
5969         * builtins.c (unterminated_array): Handle ARRAY_REF.
5970         (expand_builtin_stpcpy_1): Detect unterminated char arrays.
5971         * builtins.h (unterminated_array): Declare extern.
5972         * gimple-fold.c (gimple_fold_builtin_stpcpy): Detect unterminated
5973         arrays.
5974         (gimple_fold_builtin_sprintf): Propagate NO_WARNING to transformed
5975         calls.
5977 2018-09-14  Martin Sebor  <msebor@redhat.com>
5978             Jeff Law  <law@redhat.com>
5980         * builtins.c (unterminated_array): New.
5981         (expand_builtin_strcpy): Adjust.
5982         (expand_builtin_strcpy_args): Detect unterminated arrays.
5983         * gimple-fold.c (get_maxval_strlen): Add argument.  Detect
5984         unterminated arrays.
5985         * gimple-fold.h (get_maxval_strlen): Add argument.
5986         (gimple_fold_builtin_strcpy): Detec unterminated arrays.
5988         * gimple-fold.c (get_range_strlen): Add argument.
5989         (get_maxval_strlen): Adjust.
5990         * gimple-fold.h (get_range_strlen): Add argument.
5992 2018-09-14  Wei Xiao  <wei3.xiao@intel.com>
5994         * config/i386/movdirintrin.h: Fix copyright year.
5996 2018-09-14  Uros Bizjak  <ubizjak@gmail.com>
5998         * reg-stack.c: Include regs.h.
5999         (replace_reg): Assert that mode is MODE_FLOAT or MODE_COMPLEX_FLOAT.
6000         (emit_pop_insn): Default pop insn mode to the reg_raw_mode of
6001         FIRST_STACK_REG, not DFmode.
6002         (emit_swap_insn): Default swap insn mode to the reg_raw_mode of
6003         FIRST_STACK_REG, not XFmode.  Explicitly construct swap RTX.
6004         (change stack): Default register mode to the reg_raw_mode of
6005         FIRST_STACK_REG, not DFmode.
6006         * config/i386/i386.md (*swap<mode>): Remove insn pattern.
6007         (*swapxf): Rename from swapxf.
6009 2018-09-14  Carl Love  <cel@us.ibm.com>
6011         * config/rs6000/emmintrin.h: Add _MM_SHUFFLE2.
6012         * config/rs6000/xmmintrin.h: Add _MM_SHUFFLE.
6014 2018-09-14  Segher Boessenkool  <segher@kernel.crashing.org>
6016         PR target/87224
6017         * config/rs6000/rs6000.md (*mov<mode>_hardfloat64): Add Z to the Y
6018         alternatives.
6020 2018-09-14  Sam Tebbs  <sam.tebbs@arm.com>
6022         PR target/85628
6023         * config/aarch64/aarch64.md (*aarch64_bfxilsi_uxtw): Define.
6025 2018-09-14  Jason Merrill  <jason@redhat.com>
6027         Fix --enable-gather-detailed-mem-stats.
6028         * hash-table.c (hash_table_usage): Change from variable to function.
6029         * hash-table.h: Adjust.
6030         * Makefile.in: Add missing dependencies on hash-table.h.
6032 2018-09-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6034         PR tree-optimization/87259
6035         PR lto/87283
6036         (pass_cse_reciprocals::execute): Run optimize_recip_sqrt after
6037         execute_cse_reciprocals_1 has tried transforming.
6039 2018-09-14  Aldy Hernandez  <aldyh@redhat.com>
6041         * tree-vrp.c (extract_range_from_binary_expr_1): Normalize
6042         VR_VARYING for PLUS/MINUS_EXPR.
6044 2018-09-14  Ilya Leoshkevich  <iii@linux.ibm.com>
6046         * config/s390/s390-passes.def (INSERT_PASS_BEFORE): Improve
6047         formatting.
6049 2018-09-14  Richard Biener  <rguenther@suse.de>
6051         PR middle-end/63155
6052         * tree-ssa-coalesce.c (ssa_conflicts_merge): Remove conflict
6053         bits for the merged partition.
6055 2018-09-13  Martin Sebor  <msebor@redhat.com>
6056             Bernd Edlinger  <bernd.edlinger@hotmail.de>
6058         * builtins.h (c_srlen): Add argument.
6059         * builtins.c (warn_string_no_nul): New function.
6060         (c_strlen): Add argument and use it.  Update recursive calls.
6061         Pass DECL argument to string_constant to get info on non
6062         terminated strings.  Update *NONSTR as needed.
6063         (fold_builtin_strlen): Add argument to calls to c_strlen.
6064         Warn for unterminated arrays.
6065         (warn_string_no_null): Add prototype.
6066         * expr.c (string_constant): Update arguments.  Update recursive
6067         calls appropriately.  Detect missing NUL terminator and outermost
6068         declaration its missing in.
6069         Improve checks for arrays with nonzero lower bound or elements
6070         that are not a single byte.  Simplify offset computation.
6071         Simplify checks for non-NUL terminated strings.
6072         * gimple-fold.c (get_range_strlen): Add argument to c_strlen call.
6073         * gimple-ssa-sprintf.c (get_string_length): Remove unnecessary code.
6075 2018-09-13  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6077         * builtins.c (c_strlen): Handle not zero terminated STRING_CSTs
6078         correctly.
6079         * fold-const.c (c_getstr): Fix function comment.  Remove unused third
6080         argument.  Fix range checks.
6081         * fold-const.h (c_getstr): Adjust protoype.
6082         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid folding when
6083         string is constant but contains no NUL byte.
6085         * expr.c (string_constant): Adjust function comment.
6086         Remove bogus check for zero termination.
6088         * fold-const.c (c_getstr): Clamp STRING_LENGTH to STRING_SIZE.
6090         * varasm.c (compare_constant): Compare type size of STRING_CSTs.
6091         (get_constant_size): Don't make STRING_CSTs larger than they are.
6092         (check_string_literal): New check function for STRING_CSTs.
6093         (output_constant): Use it.
6095 2018-09-13  Eric Botcazou  <ebotcazou@adacore.com>
6097         PR target/86812
6098         * config/visium/visium.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define.
6100 2018-09-13  Richard Biener  <rguenther@suse.de>
6102         PR tree-optimization/87263
6103         * tree-ssa-sccvn.c (visit_phi): Revert some earlier changes.
6104         (struct unwind_state): Add max_rpo field.
6105         (do_rpo_vn): Allow up-to-date loop state to be used when not iterating.
6106         Compute max_rpo, the max RPO number a block can be backwards reached
6107         from.  Re-write non-iterating mode to a RPO ordered worklist approach,
6108         separating it from the iterating mode.
6110 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
6112         * haifa-sched.c (rank_for_schedule): Schedule by INSN_COST.
6113         (rfs_decision): New scheduling decision.
6115 2018-09-13  Richard Biener  <rguenther@suse.de>
6117         PR bootstrap/87134
6118         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Fix assert.
6119         (vn_nary_op_insert_pieces_predicated): Do not write useless
6120         valid_dominated_by_p entry outside of the allocated storage.
6122 2018-09-13  Omar Sandoval  <osandov@osandov.com>
6123             Tom de Vries  <tdevries@suse.de>
6125         PR debug/86985
6126         * dwarf2out.c (is_c): New function.
6127         (add_subscript_info): Add DW_AT_count of 0 for C zero-length arrays.
6129 2018-09-13  Sam Tebbs  <sam.tebbs@arm.com>
6131         PR target/85628
6132         * config/aarch64/aarch64.md (*aarch64_bfxil):
6133         Define.
6134         * config/aarch64/constraints.md (Ulc): Define.
6135         * config/aarch64/aarch64-protos.h (aarch64_high_bits_all_ones_p):
6136         Define.
6137         * config/aarch64/aarch64.c (aarch64_high_bits_all_ones_p):
6138         New function.
6140 2018-09-13  Vlad Lazar  <vlad.lazar@arm.com>
6142         * config/aarch64/aarch64.h (TARGET_COMPUTE_FRAME_LAYOUT): Define.
6143         * config/aarch64/aarch64.c (aarch64_expand_prologue): Remove
6144         aarch64_layout_frame call.
6145         (aarch64_expand_epilogue): Likewise.
6146         (aarch64_initial_elimination_offset): Likewise.
6147         (aarch64_get_separate_components): Likewise.
6148         (aarch64_use_return_insn_p): Likewise.
6149         (aarch64_layout_frame): Remove unneeded check.
6151 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
6153         * configure.ac: Only append
6154         " : (reconfigured) $TOPLEVEL_CONFIGURE_ARGUMENTS" to
6155         gcc_config_arguments if it was never reconfigured or last reconfigure
6156         was with different arguments.
6157         * configure: Regenerated.
6159 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
6160             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6162         PR middle-end/87290
6163         * expr.c (maybe_optimize_pow2p_mod_cmp): New function.
6164         (maybe_optimize_mod_cmp): Use it if integer_pow2p treeop1.
6166 2018-09-13  Jakub Jelinek  <jakub@redhat.com>
6168         PR tree-optimization/87287
6169         * fold-const.c (fold_binary_loc) <case EQ_EXPR>: Move signed modulo
6170         X % C == 0 to X % (unsigned) C == 0 optimization to ...
6171         * match.pd (X % C == 0): ... here.  New optimization.
6173 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
6175         PR middle-end/82853
6176         * expr.h (maybe_optimize_mod_cmp): Declare.
6177         * expr.c (mod_inv): New function.
6178         (maybe_optimize_mod_cmp): New function.
6179         (do_store_flag): Use it.
6180         * cfgexpand.c (expand_gimple_cond): Likewise.
6182 2018-09-09  Cesar Philippidis  <cesar@codesourcery.com>
6183             Julian Brown  <julian@codesourcery.com>
6185         PR middle-end/86336
6186         * gimplify.c (gimplify_scan_omp_clauses): Set
6187         target_firstprivatize_array_bases in OpenACC parallel and kernels
6188         region contexts.  Remove GOMP_MAP_FIRSTPRIVATE_REFERENCE clauses from
6189         OpenACC data regions.
6191 2018-09-12  Uros Bizjak  <ubizjak@gmail.com>
6193         * config/i386/i386.md (sqrt_extend<mode>xf3_i387): Remove.
6194         (sqrt<mode>2): Extend operand 1 to XFmode and generate sqrtxf3 insn.
6196 2018-09-12  Richard Biener  <rguenther@suse.de>
6198         PR tree-optimization/87280
6199         * tree-ssa-sccvn.c (process_bb): Handle the case of executable
6200         edge but unreachable target.
6201         (do_rpo_vn): For conservatively handling a PHI only mark
6202         the backedge executable but not the block reachable.
6204 2018-09-12  Richard Biener  <rguenther@suse.de>
6206         PR tree-optimization/87266
6207         * tree-ssa-sccvn.c (do_rpo_vn): Always iterate to not yet
6208         visited blocks.
6210 2018-09-12  Andreas Krebbel  <krebbel@linux.ibm.com>
6212         * config/s390/s390.md (PFPO_RND_MODE_DFP, PFPO_RND_MODE_BFP): New
6213         constants.
6214         ("trunc<BFP:mode><DFP_ALL:mode>2")
6215         ("trunc<DFP_ALL:mode><BFP:mode>2")
6216         ("extend<BFP:mode><DFP_ALL:mode>2")
6217         ("extend<DFP_ALL:mode><BFP:mode>2"): Set proper rounding mode
6218         according to the target operand type.
6220 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
6221             Andreas Krebbel  <krebbel@linux.ibm.com>
6223         PR tree-optimization/86844
6224         * gimple-ssa-store-merging.c
6225         (imm_store_chain_info::coalesce_immediate): For overlapping stores, if
6226         there are any overlapping stores in between them, make sure they are
6227         also coalesced or we give up completely.
6229 2018-09-12  Jakub Jelinek  <jakub@redhat.com>
6231         PR middle-end/87248
6232         * fold-const.c (fold_ternary_loc) <case COND_EXPR>: Verify also that
6233         BIT_AND_EXPR's second operand is a power of two.  Formatting fix.
6235 2018-09-12  Tom de Vries  <tdevries@suse.de>
6237         * common.opt (gdescribe-dies): Add option.
6238         * dwarf2out.c (add_name_and_src_coords_attributes): Add description
6239         attribute for artifical and nameless decls.
6240         (dwarf2out_register_external_die): Add description attribute to
6241         external reference die.
6242         (add_desc_attribute): New functions.
6243         (gen_subprogram_die): Add description attribute to
6244         DW_TAG_call_site_parameter.
6245         * tree-pretty-print.c (print_generic_expr_to_str): New function.
6246         * tree-pretty-print.h (print_generic_expr_to_str): Declare.
6247         * doc/invoke.texi (@item Debugging Options): Add -gdescribe-dies and
6248         -gno-describe-dies.
6249         (@item -gdescribe-dies): Add.
6251 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
6253         * tree-vrp.c (vrp_shift_undefined_p): Remove.
6254         (extract_range_from_binary_expr_1: Call
6255         wide_int_range_shift_undefined_p instead of vrp_shift_undefined_p.
6256         * wide-int-range.h (wide_int_range_shift_undefined_p): Do not
6257         depend on sign.
6259 2018-09-12  Aldy Hernandez  <aldyh@redhat.com>
6261         * gimple-ssa-warn-alloca.c
6262         (alloca_type_and_limit::alloca_type_and_limit): Initialize limit
6263         field for ALLOCA_BOUND_*_LARGE.
6265 2018-09-11  Nathan Sidwell  <nathan@acm.org>
6267         * gcc.c (load_specs, execute, run_attempt): Use %qs not '%s'.
6269 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
6271         * reg-stack.c (subst_asm_stack_regs): Call replace_reg also
6272         for clobbers.  Remove obsolete comment.
6274 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
6276         * config/i386/i386.md (define_attr "type"): Remove mpxmov, mpxmk,
6277         mpxchk, mpxld and mpxst types.
6278         (define_attr length_immediate): Remove all processing of mpx types.
6279         (define_attr prefix_0f): Ditto.
6280         (define_attr memory): Ditto.
6282 2018-09-11  Uros Bizjak  <ubizjak@gmail.com>
6284         * config/i386/i386.md (fyl2x_extend<mode>xf3_i387): Remove.
6285         (log<mode>2): Change operand 1 predicate to general_operand.
6286         Extend operand 1 to XFmode and generate logxf3 insn.
6287         (log10<mode>2): Change operand 1 predicate to general_operand.
6288         Extend operand 1 to XFmode and generate log10xf3 insn.
6289         (log2<mode>2): Change operand 1 predicate to general_operand.
6290         Extend operand 1 to XFmode and generate log2xf3 insn.
6291         (fyl2xp1_extend<mode>xf3_i387): Remove.
6292         (log1p<mode>2): Change operand 1 predicate to general_operand.
6293         Extend operand 1 to XFmode and generate log1pxf3 insn.
6294         (fxtract_extend<mode>xf3_i387): Remove.
6295         (logb<mode>2): Change operand 1 predicate to general_operand.
6296         Extend operand 1 to XFmode and generate logbxf3 insn.
6297         (ilogb<mode>2): Change operand 1 predicate to general_operand.
6298         Extend operand 1 to XFmode and generate fxtractxf3_i387 insn.
6299         (significand<mode>2): Change operand 1 predicate to general_operand.
6300         Extend operand 1 to XFmode and generate significandxf3 insn.
6302 2018-09-11  Nathan Sidwell  <nathan@acm.org>
6304         * gcc.c (perror_with_name, pfatal_with_name): Delete.
6305         (load_specs): Use fatal_error.
6306         (DELETE_IF_ORDINARY, process_command): Use error.
6307         (execute, run_attempt): Use fatal_error.
6309 2018-09-11  Andrew Stubbs  <ams@codesourcery.com>
6311         * diagnostic-core.h (sorry_at): New prototype.
6312         * diagnostic.c (sorry_at): New function.
6314 2018-09-11  Aldy Hernandez  <aldyh@redhat.com>
6316         * tree-vrp.c (extract_range_from_binary_expr_1): Treat all divisions
6317         by zero as VR_UNDEFINED.
6319 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
6321         * config/i386/i386.md (<sincos>xf2): Rename from *<sincos>xf2_i387.
6322         (*<sincos>_extend<mode>xf2_i387): Remove insn pattern.
6323         (<sincos>mode2): New expander.
6324         (sincos_extend<mode>xf3_i387): Remove insn pattern.
6325         (sincos -> sin, cos splitters): Remove splitter patterns.
6326         (sincos<mode>3): Change operand 2 predicate to general_operand.
6327         Extend operand 2 to XFmode and generate sincosxf3 insn.
6328         (fptanxf4_i387): Change mode of operands 0 and 3 to SFmode.
6329         Change operand 3 predicate to const1_operand.
6330         (fptan_extend<mode>xf4_i387): Remove insn pattern.
6331         (tanxf2): Update operands in the call to fptanxf4_i387.
6332         (tan<mode>2): Change operand 1 predicate to general_operand.
6333         Extend operand 1 to XFmode and generate tanxf3 insn.
6334         (atan2xf3): Rename from *fpatanxf3_i387.
6335         (fpatan_extend<mode>xf3_i387): Remove insn pattern.
6336         (atan2xf3): Remove expander.
6337         (atan2<mode<3):  Change operand 1 and 2 predicates to general_operand.
6338         Extend operands 1 and 2 to XFmode and generate atan2xf3 insn.
6339         (atan<mode>2): Change operand 1 predicate to general_operand.
6340         Extend operand 1 to XFmode and generate atanxf3 insn.
6342 2018-09-10  Uros Bizjak  <ubizjak@gmail.com>
6344         * config/i386/i386.md (x87/SSE constant load splitter): Use
6345         memory_operand instead of nonimmediate_operand for input operand
6346         predicate.
6348 2018-09-09  Uros Bizjak  <ubizjak@gmail.com>
6350         * config/i386/i386.md (float partial SSE register stall splitter): Move
6351         splitter near its instruction pattern.
6352         (float_extend partial SSE register stall splitter): Ditto.
6353         (float_truncate partial SSE register stall splitter): Ditto.
6355 2018-09-09  Hans-Peter Nilsson  <hp@bitrange.com>
6357         PR target/86794
6358         * config/mmix/mmix.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6359         to speculation_safe_value_not_needed.
6361         PR target/85666
6362         * config/mmix/mmix.c (mmix_assemble_integer): Handle byte-size
6363         non-CONST_INT rtx:es using assemble_integer_with_op ".byte".
6364         (MMIX_CFUN_NEEDS_SAVED_EH_RETURN_ADDRESS): Don't call
6365         leaf_function_p, instead use has_hard_reg_initial_val.
6367 2018-09-09  Nathan Sidwell  <nathan@acm.org>
6369         * gcc.h (pfatal_with_name): Don't declare here.
6370         * gcc.c (pfatal_with_name): Make static.
6372 2018-09-09  Xianmiao Qu  <xianmiao_qu@c-sky.com>
6374         * config/csky/csky.md (*cskyv2_adddi3, *cskyv2_subdi3): Add
6375         earlyclobber.
6377 2018-09-08  John David Anglin  <danglin@gcc.gnu.org>
6379         PR rtl-optimization/85458
6380         * sel-sched.c (sel_target_adjust_priority): Allow backend adjust
6381         priority hook to reduce the priority of EXPR.
6383 2018-09-07  Uros Bizjak  <ubizjak@gmail.com>
6385         * config/i386/i386.md (float<SWI48x:mode><MODEF:mode>2) Enable
6386         DImode for x87 on 32bit targets.  Conditionally disable x87 modes
6387         with X87_ENABLE_FLOAT.  Remove preparation code.
6388         (*float<SWI48:mode><MODEF:mode>2): Rename from
6389         *float<SWI48:mode><MODEF:mode>2_mixed.  Handle x87, SSE and mixed
6390         math using "enabled" attribute.
6391         (*floatdi<MODEF:mode>2_i387): Rename from
6392         *float<SWI48x:mode><MODEF:mode>2_i387.  Handle only DImode and
6393         enable for 32bit targets only.
6394         (floatdi<X87MODEF:mode>2_i387_with_xmm pre-reload splitter): New
6395         splitter.
6396         (floatdi<X87MODEF:mode>2_i387_with_xmm): Use register_operand
6397         as operand 1 predicate.  Rewrite as define_insn_and_split.
6398         (floatdi<X87MODEF:mode>2_i387_with_xmm memory input splitter): Remove.
6400 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
6402         * reg-stack.c (get_true_reg) <case FLOAT_TRUNCATE>: Reorder
6403         to fallthru to FLOAT case.
6405 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
6407         PR target/86731
6408         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Update logic
6409         around folding of vec_sl to handle out of range shift values.
6411 2018-09-06  Uros Bizjak  <ubizjak@gmail.com>
6413         * config/i386/i386.md (fix_trunc<mode>_fisttp_i387_1): Remove.
6414         Update callers to gen_fix_trunc<mode>_i387_fisttp
6415         (fix_trunc<mode>_i387_fisttp): Change operand 0 predicate to
6416         nonimmediate_operand.
6417         (fix_trunc<mode>_i387_fisttp_with_temp): Remove insn pattern
6418         and corresponding splitters.
6419         (*fix_trunc<mode>_i387_1): Always expand with fix_trunc<mode>_i387.
6420         (fix_truncdi_i387): Change operand 0 predicate to nonimmediate_operand.
6421         (fix_truncdi_i387_with_temp): Remove insn pattern
6422         and corresponding splitters.
6423         (fix_trunc<mode>_i387): Change operand 0 predicate to
6424         nonimmediate_operand.
6425         (fix_trunc<mode>_i387_with_temp): Remove insn pattern
6426         and corresponding splitters.
6427         (*fistdi2_1): Remove.
6428         (fistdi2): Ditto.
6429         (fistdi2_with_temp): Remove insn pattern and corresponding splitters.
6430         (lrintxfdi2): Remove expander.  Reimplement as define_insn.
6431         (*fist<mode>2_1): Remove.
6432         (fist<mode>2): Ditto.
6433         (fist<mode>2_with_temp): Remove insn pattern and corresponding
6434         splitters.
6435         (lrintxf<mode>2): Remove expander.  Reimplement as define_insn.
6436         (*fist<mode>2_<rounding>_1): Always expand with fist<mode>2_<rounding>.
6437         (fistdi2_<rounding>): Change operand 0 predicate to
6438         nonimmediate_operand.
6439         (fistdi2_<rounding>_with_temp): Remove insn pattern
6440         and corresponding splitters.
6441         (fist<mode>2_<rounding>): Change operand 0 predicate to
6442         nonimmediate_operand.
6443         (fist<mode>2_<rounding>_with_temp): Remove insn pattern
6444         and corresponding splitters.
6446         (*fixuns_trunc<mode>si2_avx512f_zext): Depend on TARGET_SSE_MATH.
6448 2018-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
6450         * varasm.c (output_constructor_regular_field): Check TYPE_SIZE_UNIT of
6451         the init value.
6453 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
6455         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
6456         early gimple folding of vec_splat().
6457         * tree-vect-generic.c: Remove static from tree_vec_extract() definition.
6458         * gimple-fold.h: Add an extern define for tree_vec_extract().
6460 2018-09-06  Will Schmidt  <will_schmidt@vnet.ibm.com>
6462         * config/rs6000/rs6000.c (fold_mergehl_helper): Add types_compatible_p
6463         wrappers around TREE_TYPE comparisons.
6465 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
6467         PR target/80080
6468         * config/s390/predicates.md: Add nonsym_memory_operand.
6469         * config/s390/s390.c (s390_legitimize_cs_operand): If operand
6470         contains a SYMBOL_REF, load it into an intermediate pseudo.
6471         (s390_emit_compare_and_swap): Legitimize operand.
6472         * config/s390/s390.md: Use the new nonsym_memory_operand
6473         with UNSPECV_CAS patterns.
6475 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
6477         PR target/80080
6478         * config/s390/s390-passes.def: New file.
6479         * config/s390/s390-protos.h (class rtl_opt_pass): Add forward
6480         declaration.
6481         (make_pass_s390_early_mach): Add declaration.
6482         * config/s390/s390.c (make_pass_s390_early_mach):
6483         (s390_option_override): Remove dynamic registration.
6484         * config/s390/t-s390: Add s390-passes.def.
6486 2018-09-06  Ilya Leoshkevich  <iii@linux.ibm.com>
6488         * config/s390/s390.c (s390_decompose_constant_pool_ref):
6489         Remove UNSPEC_LTREL_BASE check.
6490         (annotate_constant_pool_refs): Likewise.
6491         (find_constant_pool_ref): Likewise.
6492         (find_ltrel_base): Removed.
6493         (replace_ltrel_base): Removed.
6494         (s390_mainpool_finish): Remove replace_ltrel_base call.
6495         (s390_chunkify_start): Remove pending LTREL_BASE logic.
6496         (s390_chunkify_finish): Remove replace_ltrel_base call.
6497         * config/s390/s390.md: Remove UNSPEC_LTREL_BASE.
6499 2018-09-06  Hans-Peter Nilsson  <hp@axis.com>
6501         PR target/86779
6502         * config/cris/cris.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
6503         to speculation_safe_value_not_needed.
6505 2018-09-05  Cesar Philippidis  <cesar@codesourcery.com>
6506             Bernd Schmidt  <bernds_cb1@t-online.de>
6508         * config/nvptx/nvptx-opts.h: New file.
6509         * config/nvptx/nvptx.c (nvptx_file_start): Print the correct .target.
6510         * config/nvptx/nvptx.h: Include "nvptx-opts.h".
6511         (ASM_SPEC): Define.
6512         (TARGET_SM35): New macro.
6513         * config/nvptx/nvptx.md (atomic_fetch_<logic><mode>): Enable with the
6514         correct predicate.
6515         * config/nvptx/nvptx.opt (ptx_isa, sm_30, sm_35): New enum and its
6516         values.
6517         (misa=): New option.
6518         * doc/invoke.texi (Nvidia PTX Options): Document -misa.
6520 2018-09-05  Uros Bizjak  <ubizjak@gmail.com>
6522         * config/i386/i386.md (truncdfsf2): Remove expander.
6523         (truncdfsf2_with_temp): Ditto.
6524         (truncxf<mode>2): Ditto.
6525         (*truncdfsf_fast_mixed): Remove insn pattern.
6526         (*truncdfsf_fast_i387): Ditto.
6527         (*truncdfsf_mixed): Ditto.
6528         (*truncdfsf_i387): Ditto.
6529         (*truncdfsf2_i387_1): Ditto.
6530         (*truncxfsf2_mixed): Ditto.
6531         (*truncxfdf2_mixed): Ditto.
6532         (*truncxf<mode>2_i387_noop): Ditto. Update callers
6533         to call gen_truncxf<mode>2 instead.
6534         (*truncxf<mode>2_i387): Remove.
6535         (reg->reg splitters): Remove splitter pattern.
6536         (reg->mem splitters): Ditto.
6538         (truncdfsf2): New insn pattern.
6539         (truncxf<mode>2): Ditto.
6541 2018-09-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6543         * tree-ssa-math-opts.c (is_mult_by): New function.
6544         (is_square_of): Use the above.
6545         (optimize_recip_sqrt): New function.
6546         (pass_cse_reciprocals::execute): Use the above.
6548 2018-09-05  Richard Biener  <rguenther@suse.de>
6550         PR bootstrap/87134
6551         * tree-ssa-sccvn.c (rpo_elim::eliminate_push_avail): Make sure
6552         to zero-init the emplaced vec.
6554 2018-09-05  Martin Liska  <mliska@suse.cz>
6556         PR tree-optimization/87205
6557         * tree-switch-conversion.c (pass_lower_switch::execute):
6558         Group cases for switch statements.
6560 2018-09-05  Richard Biener  <rguenther@suse.de>
6562         PR tree-optimization/87217
6563         * tree-ssa-sccvn.c (vuse_valueize): New.
6564         (vn_reference_lookup_pieces): Use it.
6565         (vn_reference_lookup): Likewise.
6567 2018-09-05  Nathan Sidwell  <nathan@acm.org>
6569         PR c++/87137
6570         * stor-layout.c (place_field): Scan forwards to check last
6571         bitfield when ms_bitfield_placement is in effect.
6573 2018-09-05  Richard Biener  <rguenther@suse.de>
6575         PR bootstrap/87225
6576         * tree-vect-stmts.c (vectorizable_simd_clone_call): Fix bogus
6577         return.
6579 2018-09-05  Siddhesh Poyarekar  <siddhesh@sourceware.org>
6580             Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
6582         * config/aarch64/falkor-tag-collision-avoidance.c: New file.
6583         * config.gcc (extra_objs): Build it.
6584         * config/aarch64/t-aarch64 (falkor-tag-collision-avoidance.o):
6585         Likewise.
6586         * config/aarch64/aarch64-passes.def
6587         (pass_tag_collision_avoidance): New pass.
6588         * config/aarch64/aarch64.c (qdf24xx_tunings): Add
6589         AARCH64_EXTRA_TUNE_RENAME_LOAD_REGS to tuning_flags.
6590         (aarch64_classify_address): Remove static qualifier.
6591         (aarch64_address_info, aarch64_address_type): Move to...
6592         * config/aarch64/aarch64-protos.h: ... here.
6593         (make_pass_tag_collision_avoidance): New function.
6594         * config/aarch64/aarch64-tuning-flags.def (rename_load_regs):
6595         New tuning flag.
6597 2018-09-05  Martin Liska  <mliska@suse.cz>
6599         * doc/gcov.texi: Update documentation of humar
6600         readable mode.
6601         * gcov.c (format_count): Print one decimal place, it provides
6602         more fine number of situations like '1G' vs. '1.4G'.
6604 2018-09-05  Martin Liska  <mliska@suse.cz>
6606         PR target/87164
6607         * config/rs6000/rs6000.opt: Mark the option as Deprecated.
6608         * optc-gen.awk: Allow 'Var' for Deprecated options in order
6609         to generate a MASK value.
6611 2018-09-04  H.J. Lu  <hongjiu.lu@intel.com>
6613         PR debug/86593
6614         * dwarf2out.c (based_loc_descr): Allow hard frame pointer even
6615         if frame pointer isn't used.
6616         (compute_frame_pointer_to_fb_displacement): Likewise.
6618 2018-09-04  Jakub Jelinek  <jakub@redhat.com>
6620         PR target/87198
6621         * common/config/i386/i386-common.c (OPTION_MASK_ISA_XSAVEOPT_SET,
6622         OPTION_MASK_ISA_XSAVES_SET, OPTION_MASK_ISA_XSAVEC_SET): Use
6623         OPTION_MASK_ISA_XSAVE_SET instead of OPTION_MASK_ISA_XSAVE.
6624         (OPTION_MASK_ISA_XSAVE_UNSET): Add OPTION_MASK_ISA_XSAVES_UNSET
6625         and OPTION_MASK_ISA_XSAVEC_UNSET.
6627 2018-09-04  Max Filippov  <jcmvbkbc@gmail.com>
6629         * config/xtensa/xtensa.c (xtensa_expand_atomic): Reorder AND and
6630         XOR operations in NAND case.
6632 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
6634         * wide-int-range.cc (wide_int_range_convert): New.
6635         * wide-int-range.h (wide_int_range_convert): New.
6636         * tree-vrp.c (extract_range_from_unary_expr): Abstract wide int
6637         code into wide_int_range_convert.
6638         (extract_range_into_wide_ints): Do not munge anti range constants
6639         into the entire domain.  Just return the range back.
6641 2018-09-04  Martin Liska  <mliska@suse.cz>
6643         * genmatch.c (output_line_directive): Add new argument
6644         fnargs.
6645         (dt_simplify::gen_1): Encapsulate dump within __builtin_expect.
6647 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
6649         * doc/invoke.texi (Option Summary): Add whitespace.
6651         * doc/invoke.texi (Option Summary): Add -Waligned-new.
6653 2018-09-04  Richard Biener  <rguenther@suse.de>
6655         PR tree-optimization/87211
6656         * tree-ssa-sccvn.c (visit_phi): When value-numbering to a
6657         backedge value we're supposed to treat as VARYING also number
6658         the PHI to VARYING in case it got a different value-number already.
6660 2018-09-04  Aldy Hernandez  <aldyh@redhat.com>
6662         * tree-vrp.c (vrp_can_optimize_bit_op): Remove.
6663         (extract_range_from_binary_expr_1): Do not call
6664         vrp_can_optimize_bit_op.
6665         * wide-int-range.cc (wide_int_range_can_optimize_bit_op): Make
6666         static.
6667         (wide_int_range_get_mask_and_bounds): New.
6668         (wide_int_range_optimize_bit_op): New.
6669         (wide_int_range_bit_ior): Call wide_int_range_optimize_bit_op.
6670         (wide_int_range_bit_and): Same.
6671         * wide-int-range.h (wide_int_range_can_optimize_bit_op): Remove.
6672         (wide_int_range_optimize_bit_op): New.
6673         (wide_int_range_get_mask_and_bounds): New.
6675 2018-09-04  Richard Biener  <rguenther@suse.de>
6677         PR tree-optimization/87176
6678         * tree-ssa-sccvn.c (visit_phi): Remove redundant allsame
6679         variable.  When value-numbering a virtual PHI node make sure
6680         to not value-number to the backedge value.
6682 2018-09-04  Jonathan Wakely  <jwakely@redhat.com>
6684         * doc/extend.texi (Long Long, Hex Floats): Document support for
6685         long long and hex floats in more recent versions of ISO C++.
6687 2018-09-03  Richard Biener  <rguenther@suse.de>
6689         PR tree-optimization/87177
6690         * tree-ssa-sccvn.c (vuse_ssa_val): Revert previous change, keep
6691         cleanup.
6693 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
6695         * bb-reorder.c (edge_order): Convert to C-qsort-style
6696         tri-state comparator.
6697         (reorder_basic_blocks_simple): Change std::stable_sort to
6698         gcc_stablesort.
6700 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
6702         * tree-loop-distribution.c (offset_cmp): Convert to C-qsort-style
6703         tri-state comparator.
6704         (fuse_memset_builtins): Change std::stable_sort to gcc_stablesort.
6706 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
6708         * sort.cc (struct sort_ctx): New field 'nlim'.  Use it...
6709         (mergesort): ... here as maximum count for using netsort.
6710         (gcc_qsort): Set nlim to 3 if stable sort is requested.
6711         (gcc_stablesort): New.
6712         * system.h (gcc_stablesort): Declare.
6714 2018-09-03  Alexander Monakov  <amonakov@ispras.ru>
6716         * sort.cc (gcc_qsort) [CHECKING_P]: Call qsort_chk.
6717         * system.h (qsort): Always redirect to gcc_qsort.  Update comment.
6718         * vec.c (qsort_chk): Do not call gcc_qsort.  Update comment.
6720 2018-09-03  Segher Boessenkool  <segher@kernel.crashing.org>
6722         * config/rs6000/rs6000.md (*mov<mode>_hardfloat32): Remove %U from the
6723         lxsdx and stxsdx alternatives.
6724         (*mov<mode>_hardfloat64): Ditto.
6725         * config/rs6000/vsx.md (*vsx_extract_<mode>_store): Ditto.
6727 2018-09-03  Richard Biener  <rguenther@suse.de>
6729         PR tree-optimization/87200
6730         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Valueize a
6731         simplify result.
6733 2018-09-03  Martin Liska  <mliska@suse.cz>
6735         PR tree-optimization/87201
6736         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
6737         Fix parenthesis in an expression.
6739 2018-09-03  Richard Biener  <rguenther@suse.de>
6741         PR tree-optimization/87197
6742         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Mark the new def
6743         visited.  CSE the VN_INFO hashtable lookup.
6745         PR tree-optimization/87169
6746         * tree-ssa-sccvn.c (do_rpo_vn): When marking loops for not
6747         iterating make sure there's no extra backedges from irreducible
6748         regions feeding the header.  Mark the destination block
6749         executable.
6751 2018-09-03  Martin Liska  <mliska@suse.cz>
6753         PR driver/83193
6754         * common/common-target.def: Add TARGET_GET_VALID_OPTION_VALUES.
6755         * common/common-targhooks.c (default_get_valid_option_values):
6756         New function.
6757         * common/common-targhooks.h (default_get_valid_option_values):
6758         Likewise.
6759         * common/config/i386/i386-common.c: Move processor_target_table
6760         from i386.c.
6761         (ix86_get_valid_option_values): New function.
6762         (TARGET_GET_VALID_OPTION_VALUES): New macro.
6763         * config/i386/i386.c (struct ptt): Move to i386-common.c.
6764         (PTA_*): Move all defined masks into i386-common.c.
6765         (ix86_function_specific_restore): Use new processor_cost_table.
6766         * config/i386/i386.h (struct ptt): Moved from i386.c.
6767         (struct pta): Likewise.
6768         * doc/tm.texi: Document new TARGET_GET_VALID_OPTION_VALUES.
6769         * doc/tm.texi.in: Likewise.
6770         * opt-suggestions.c (option_proposer::suggest_option):
6771         Pass prefix to build_option_suggestions.
6772         (option_proposer::get_completions): Likewise.
6773         (option_proposer::build_option_suggestions): Use the new target
6774         hook.
6775         * opts.c (struct option_help_tuple): New struct.
6776         (print_filtered_help): Use the new target hook.
6778 2018-09-03  Martin Liska  <mliska@suse.cz>
6780         PR middle-end/59521
6781         * predict.c (set_even_probabilities): Add likely_edges
6782         argument and handle cases where we have precisely one
6783         likely edge.
6784         (combine_predictions_for_bb): Catch also likely_edges.
6785         (tree_predict_by_opcode): Handle gswitch statements.
6786         * tree-cfg.h (find_case_label_for_value): New declaration.
6787         (find_taken_edge_switch_expr): Likewise.
6788         * tree-switch-conversion.c (switch_decision_tree::balance_case_nodes):
6789         Find pivot in decision tree based on probabily, not by number of
6790         nodes.
6792 2018-09-02  Gerald Pfeifer  <gerald@pfeifer.com>
6794         * doc/standards.texi (Standards): Update Objective-C reference.
6796 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
6798         * doc/install.texi (Prerequisites): Update link for MPC.
6800 2018-09-01  Michael Matz  <matz@suse.de>
6802         PR tree-optimization/87074
6803         * gimple-loop-jam.c (unroll_jam_possible_p): Check loop exit
6804         PHIs for outer-loop uses.
6806 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
6808         * doc/generic.texi (OpenMP): Adjust link to openmp.org.
6809         * doc/invoke.texi (C Dialect Options): Ditto.
6811 2018-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
6813         * doc/install.texi (Prerequisites): Adjust link mpfr.org.
6815 2018-08-31  Richard Biener  <rguenther@suse.de>
6817         PR tree-optimization/87168
6818         * tree-ssa-sccvn.c (SSA_VAL): Add visited output parameter.
6819         (rpo_elim::eliminate_avail): When OP was not visited it must
6820         be available.
6822 2018-08-31  David Malcolm  <dmalcolm@redhat.com>
6824         * tree-vrp.c (copy_value_range): Convert param "from" from
6825         "value_range *" to "const value_range *".
6826         (range_is_null): Likewise for param "vr".
6827         (range_int_cst_p): Likewise.
6828         (range_int_cst_singleton_p): Likewise.
6829         (symbolic_range_p): Likewise.
6830         (value_ranges_intersect_p): Likewise for both params.
6831         (value_range_nonnegative_p): Likewise for param "vr".
6832         (value_range_constant_singleton): Likewise.
6833         (vrp_set_zero_nonzero_bits): Likewise for param "ar".
6834         (extract_range_into_wide_ints): Likewise for param "vr".
6835         (extract_range_from_multiplicative_op): Likewise for params "vr0"
6836         and "vr1".
6837         (vrp_can_optimize_bit_op): Likewise.
6838         (extract_range_from_binary_expr_1): Likewise for params "vr0_" and
6839         "vr1_".
6840         (extract_range_from_unary_expr): Likewise.
6841         (debug_value_range): Likewise for param "vr".
6842         (value_range::dump): Add "const" qualifier.
6843         (vrp_prop::check_array_ref): Convert local "vr" from
6844         "value_range *" to "const value_range *".
6845         (vrp_prop::check_mem_ref): Likewise.
6846         (vrp_prop::visit_stmt): Likewise for local "old_vr".
6847         (vrp_intersect_ranges_1): Likewise for param "vr_1".
6848         (vrp_intersect_ranges): Likewise.
6849         (simplify_stmt_for_jump_threading): Likewise for local "vr".
6850         (vrp_prop::vrp_finalize): Likewise.
6851         * tree-vrp.h (value_range::dump): Add "const" qualifier.
6852         (vrp_intersect_ranges): Add "const" qualifier to params as above.
6853         (extract_range_from_unary_expr): Likewise.
6854         (value_range_constant_singleton): Likewise.
6855         (symbolic_range_p): Likewise.
6856         (copy_value_range): Likewise.
6857         (extract_range_from_binary_expr_1): Likewise.
6858         (range_int_cst_p): Likewise.
6859         (vrp_set_zero_nonzero_bits): Likewise.
6860         (range_int_cst_singleton_p): Likewise.
6862 2018-08-31  Vlad Lazar  <vlad.lazar@arm.com>
6864         * config/aarch64/arm_neon.h (vabsd_s64): New.
6865         (vnegd_s64): Likewise.
6867 2018-08-31  Martin Jambor  <mjambor@suse.cz>
6869         * ipa-cp.c (estimate_local_effects): Replace wrong MAX with MIN.
6871 2018-08-31  Martin Liska  <mliska@suse.cz>
6873         * ipa-icf.c (sem_item::add_type): Use
6874         sem_item::m_type_hash_cache.
6875         * ipa-icf.h: Move the cache from sem_item_optimizer
6876         to sem_item.
6878 2018-08-31  Nathan Sidwell  <nathan@acm.org>
6880         * doc/extend.texi (Backwards Compatibility): Remove implicit
6881         extern C leeway of () being (...).
6883 2018-08-31  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
6885         * ipa-inline.c (can_inline_edge_by_limits_p): Fix typos in comment.
6887 2018-08-31  Segher Boessenkool  <segher@kernel.crashing.org>
6889         PR target/86684
6890         PR target/87149
6891         * config/rs6000/rs6000.md (lround<mode>di2): Gate on TARGET_FPRND.
6893 2018-08-31  Jakub Jelinek  <jakub@redhat.com>
6895         PR middle-end/87138
6896         * expmed.c (expand_mult_const): Use immed_wide_int_const instead of
6897         gen_int_mode.  Formatting fixes.
6899 2018-08-30  Sandra Loosemore  <sandra@codesourcery.com>
6901         * target.def (custom_function_descriptors): Improve documentation.
6902         * doc/tm.texi.in (Trampolines): Expand discussion of function
6903         descriptors and move TARGET_CUSTOM_FUNCTION_DESCRIPTORS to the
6904         beginning of the section.
6905         * doc/tm.texi: Regenerated.
6907 2018-08-30  Jose E. Marchesi  <jose.marchesi@oracle.com>
6909         * cfg.h (class auto_edge_flag): Spell out the template-id of the
6910         base class in the initializer list.  This is a workaround for
6911         building with older GCC.
6912         (class auto_bb_flag): Likewise.
6914 2018-08-30  Aaron Sawdey  <acsawdey@linux.ibm.com>
6916         * config/rs6000/altivec.md (altivec_eq<mode>): Remove star.
6917         (altivec_vcmpequ<VI_char>_p): Remove star.
6918         * config/rs6000/rs6000-string.c (do_load_for_compare): Support
6919         vector load modes.
6920         (expand_strncmp_vec_sequence): New function.
6921         (emit_final_str_compare_vec): New function.
6922         (expand_strn_compare): Add support for vector strncmp.
6923         * config/rs6000/rs6000.opt (-mstring-compare-inline-limit): Change
6924         length specification to bytes.
6925         * config/rs6000/vsx.md (vsx_ld_elemrev_v16qi_internal): Remove star.
6926         (vcmpnezb_p): New pattern.
6927         * doc/invoke.texi (RS/6000 and PowerPC Options): Update documentation
6928         for option -mstring-compare-inline-limit.
6930 2018-08-30  Thiago Macieira  <thiago.macieira@intel.com>
6932         * config/i386/i386.c (PTA_WESTMERE): Remove PTA_AES.
6933         (PTA_SKYLAKE): Add PTA_AES.
6934         (PTA_GOLDMONT): Likewise.
6936 2018-08-29  Jan Hubicka  <jh@suse.cz>
6938         PR lto/86517
6939         * lto-opts.c (lto_write_options): Always stream PIC/PIE mode.
6940         * lto-wrapper.c (merge_and_complain): Fix merging of PIC/PIE.
6942 2018-08-29  Jan Hubicka  <jh@suse.cz>
6944         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not follow
6945         TYPE_STUB_DECL.
6946         (hash_tree): Do not visit TYPE_STUB_DECL.
6947         * tree-streamer-out.c (write_ts_type_common_tree_pointers): Do not
6948         stream TYPE_STUB_DECL.
6949         * tree-streamer-in.c (lto_input_ts_type_common_tree_pointers): Likewise.
6950         * ipa-utils.h (type_with_linkage_p): Do not rely on TYPE_STUB_DECL
6951         after free_lang_data.
6952         (type_in_anonymous_namespace_p): Likewise.
6954 2018-08-29  Jan Hubicka  <jh@suse.cz>
6956         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
6957         comment that it has to be even number.
6958         (class sreal): Change m_sig type to int32_t.
6959         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
6960         int64_t for temporary calculations.
6961         (sreal_verify_basics): Drop one bit from minimum and maximum.
6963 2018-08-30  Richard Biener  <rguenther@suse.de>
6965         PR tree-optimization/87147
6966         * tree-ssa-sccvn.c (SSA_VISITED): New function.
6967         (visit_phi): When the degenerate result is from the backedge and
6968         we didn't visit its definition yet drop to VARYING.
6969         (do_rpo_vn): Properly mark blocks with incoming backedges as executable.
6971 2018-08-29  Jan Hubicka  <jh@suse.cz>
6973         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not walk
6974         DECL_VINDEX.
6975         (hash_tree): Likewise.
6977 2018-08-29  Jan Hubicka  <jh@suse.cz>
6979         * tree.c (find_decls_types_r): Walk also TYPE_NEXT_PTR_TO
6980         and TYPE_NEXT_REF_TO.
6982 2018-08-29  Jan Hubicka  <jh@suse.cz>
6984         * sreal.h (SREAL_PART_BITS): Change to 31; remove seemingly unnecessary
6985         comment that it has to be even number.
6986         (class sreal): Change m_sig type to int32_t.
6987         * sreal.c (sreal::dump, sreal::to_int, opreator+, operator-): Use
6988         int64_t for temporary calculations.
6989         (sreal_verify_basics): Drop one bit from minimum and maximum.
6991 2018-08-30  Tamar Christina  <tamar.christina@arm.com>
6993         * config/aarch64/aarch64.c (aarch64_expand_movmem): Set TImode max.
6995 2018-08-30  Vlad Lazar  <vlad.lazar@arm.com>
6997         PR middle-end/86995
6998         * expmed.c (canonicalize_comparison): Use wi::sub instead of wi::add
6999         if to_add is negative.
7001 2018-08-29  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7003         PR middle-end/87053
7004         * builtins.c (c_strlen): Improve range checks.
7006 2018-08-29  Martin Sebor  <msebor@redhat.com>
7007             Jeff Law  <law@redhat.com>
7009         PR tree-optimization/86714
7010         PR tree-optimization/86711
7011         * builtins.c (c_strlen): Add arguments to call to string_constant.
7012         * expr.c (string_constant): Add argument.  Detect missing nul
7013         terminator and outermost declaration it's missing in.
7014         * expr.h (string_constant): Add argument.
7015         * fold-const.c (read_from_constant_string): Add arguments to call to
7016         string_constant.
7017         (c_getstr): Likewise.
7018         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
7019         to string_constant.
7020         * tree-ssa-strlen.c (get_stridx): Likewise.
7022 2018-08-29  Jan Hubicka  <jh@suse.cz>
7024         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers):
7025         Do not stream DECL_VINDEX.
7026         * tree-streamer-out.c (write_ts_function_decl_tree_pointers): Likewise.
7027         * tree.c (free_lang_data_in_decl): Clear DECL_VINDEX.
7028         (decl_function_context): Use DECL_VIRTUAL_P rather than DECL_VINDEX.
7030 2018-08-29  Richard Biener  <rguenther@suse.de>
7032         * tree-ssa-sccvn.c (vuse_ssa_val): Return NULL for unvisited
7033         virtual operands that are not default defs to honor region
7034         boundaries.
7035         (rpo_vn_valueize): Remove ineffective code here.
7037 2018-08-29  Richard Biener  <rguenther@suse.de>
7039         PR tree-optimization/87132
7040         * tree-ssa-alias.c (get_continuation_for_phi): Do not translate
7041         when skipping defs reachable over backedges.
7043 2018-08-29  Richard Biener  <rguenther@suse.de>
7045         * tree-core.h: Document use of deprecated_flag in SSA_NAME.
7046         * tree.h (SSA_NAME_POINTS_TO_READONLY_MEMORY): Define.
7047         * tree-into-ssa.c (pass_build_ssa::execute): Initialize
7048         function parameters SSA_NAME_POINTS_TO_READONLY_MEMORY from fnspec.
7049         * tree-ssa-sccvn.c (const_parms, init_const_parms): Remove.
7050         (vn_reference_lookup_3): Remove use of const_parms.
7051         (free_rpo_vn): Do not free const_parms.
7052         (do_rpo_vn): Do not call init_const_parms.
7053         * tree-ssa-alias.c (refs_may_alias_p_1): Honor
7054         SSA_NAME_POINTS_TO_READONLY_MEMORY.
7055         (call_may_clobber_ref_p_1): Likewise.
7057 2018-08-29  Alexander Monakov  <amonakov@ispras.ru>
7059         PR other/86726
7060         * invoke.texi (Optimization Options): List -ftree-scev-cprop.
7061         (-O): Ditto.
7062         (-ftree-scev-cprop): Document.
7064 2018-08-29  Jan Hubicka  <jh@suse.cz>
7066         * sreal.h (normalize, normalize_up, normalize_down): Add new_sig/new_exp
7067         parameters.
7068         (sreal constructor): Update.
7069         * sreal.c (sreal:operator+, sreal:operator-, sreal:operator*,
7070         sreal:operator/): Update.
7072 2018-08-29  Martin Liska  <mliska@suse.cz>
7074         * tree-switch-conversion.c (switch_conversion::expand):
7075         Strenghten assumption about gswitch statements.
7077 2018-08-29  Richard Biener  <rguenther@suse.de>
7079         PR tree-optimization/87117
7080         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_stmt): Only
7081         re-value-number released SSA VDEFs.
7083 2018-08-29  Richard Biener  <rguenther@suse.de>
7085         PR tree-optimization/87126
7086         * tree-ssa-sccvn.c (vn_reference_insert): Remove assert.
7088 2018-08-28  Jim Wilson  <jimw@sifive.com>
7090         * config/riscv/pic.md: Rewrite.
7091         * config/riscv/riscv.c (riscv_address_insns): Return cost of 3 for
7092         invalid address.
7093         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Delete.
7094         (SOFTF, default_load, softload, softstore): New.
7096 2018-08-28  Jeff Law  <law@redhat.com>
7098         * fold-const.c (fold_binary_loc): Remove recently added assert.
7100 2018-08-28  Joern Rennecke  <joern.rennecke@riscy-ip.com>
7102         * genpreds.c (write_predicate_subfunction): Also add ATTRIBUTE_UNUSED
7103         to OP parmeter of generated function.
7105 2018-08-28  MCC CS  <deswurstes@users.noreply.github.com>
7107         PR tree-optimization/87009
7108         * match.pd: Add boolean optimizations.
7110 2018-08-28  Martin Sebor  <msebor@redhat.com>
7112         PR middle-end/86631
7113         * calls.c (alloc_max_size): Treat HOST_WIDE_INT special.
7114         * gimple-ssa-warn-alloca.c (adjusted_warn_limit): New function.
7115         (pass_walloca::gate): Use it.
7116         (alloca_call_type): Same.
7117         (pass_walloca::execute): Same.
7118         * stor-layout.c (layout_decl): Treat HOST_WIDE_INT special.
7120 2018-08-28  David Malcolm  <dmalcolm@redhat.com>
7122         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): Change version check on
7123         GCC_VERSION for usage of "__gcc_dump_printf__" format from
7124         >= 3005 to >= 9000.
7126 2018-08-28  Richard Biener  <rguenther@suse.de>
7128         PR tree-optimization/87124
7129         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Guard against
7130         constants before looking up avail.
7132 2018-08-28  Jakub Jelinek  <jakub@redhat.com>
7134         PR middle-end/87099
7135         * calls.c (maybe_warn_nonstring_arg): Punt early if
7136         warn_stringop_overflow is zero.  Don't call get_range_strlen
7137         on 3rd argument, keep iterating until lenrng[1] is INTEGER_CST.
7138         Swap comparison operands to have constants on rhs.  Only use
7139         lenrng[1] if non-NULL and INTEGER_CST.  Don't uselessly
7140         increment lenrng[0].
7142 2018-08-28  Richard Sandiford  <richard.sandiford@arm.com>
7144         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Fix unguarded
7145         use of tree_to_shwi.  Remove duplicated test for the size being
7146         a whole number of bytes.
7148 2018-08-28  Richard Biener  <rguenther@suse.de>
7150         PR tree-optimization/87117
7151         * tree-ssa-sccvn.c (eliminate_dom_walker::eliminate_cleanup):
7152         Handle removed stmt without LHS (GIMPLE_NOP).
7154 2018-08-28  Richard Biener  <rguenther@suse.de>
7156         PR tree-optimization/87117
7157         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Exclude
7158         void which is is_gimple_reg_type by checking for COMPLETE_TYPE_P.
7160 2018-08-28  Richard Biener  <rguenther@suse.de>
7162         PR tree-optimization/87117
7163         * tree-ssa-pre.c (compute_avail): Do not make expressions
7164         with predicated values available.
7165         (get_expr_value_id): Assert we do not run into predicated value
7166         expressions.
7168 2018-08-28  Richard Biener  <rguenther@suse.de>
7170         PR tree-optimization/87117
7171         * tree-ssa-operands.c (add_stmt_operand): STRING_CST may
7172         get virtual operands.
7173         (get_expr_operands): Handle STRING_CST like other decls.
7175 2018-08-28  Martin Liska  <mliska@suse.cz>
7177         * tree.h: Update documentation of fndecl_built_in_p
7178         functions.
7181 2018-08-27  Jeff Law  <law@redhat.com>
7182         PR tree-optimization/87110
7183         * tree-ssa-dse.c (compute_trims): Handle non-constant
7184         TYPE_SIZE_UNIT.
7186 2018-08-27  Martin Sebor  <msebor@redhat.com>
7188         PR tree-optimization/86914
7189         * tree-ssa-strlen.c (maybe_set_strlen_range): Avoid MEM_REF.
7191 2018-08-27  Martin Sebor  <msebor@redhat.com>
7193         PR tree-optimization/87112
7194         * builtins.c (expand_builtin_strnlen): Convert c_strlen result to
7195         the type of the bound argument.
7197 2018-08-27  Jeff Law  <law@redhat.com>
7199         * tree-ssa-dse.c (compute_trims): Handle case where the reference's
7200         type does not have a TYPE_SIZE_UNIT.
7202 2018-08-27  Steve Ellcey  <sellcey@cavium.com>
7204         * config/aarch64/aarch64-speculation.cc: Replace include of cfg.h
7205         with include of backend.h.
7207 2018-08-27  Richard Biener  <rguenther@suse.de>
7209         PR tree-optimization/86927
7210         * tree-vect-loop.c (vect_create_epilog_for_reduction): Properly
7211         use const cond reduction code.
7213 2018-08-27  Alexander Monakov  <amonakov@ispras.ru>
7215         PR tree-optimization/85758
7216         * match.pd ((X & Y) ^ Y): Add :s qualifier to inner expression.
7218 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
7220         PR c++/87091
7221         * diagnostic-show-locus.c (class layout_range): Update for
7222         conversion of show_caret_p to a tri-state.
7223         (layout_range::layout_range): Likewise.
7224         (make_range): Likewise.
7225         (layout::maybe_add_location_range): Likewise.
7226         (layout::should_print_annotation_line_p): Don't show annotation
7227         lines for ranges that are SHOW_LINES_WITHOUT_RANGE.
7228         (layout::get_state_at_point): Update for conversion of
7229         show_caret_p to a tri-state.  Bail out early for
7230         SHOW_LINES_WITHOUT_RANGE, so that such ranges don't affect
7231         underlining or source colorization.
7232         (gcc_rich_location::add_location_if_nearby): Update for conversion
7233         of show_caret_p to a tri-state.
7234         (selftest::test_one_liner_multiple_carets_and_ranges): Likewise.
7235         (selftest::test_one_liner_fixit_replace_equal_secondary_range):
7236         Likewise.
7237         (selftest::test_one_liner_labels): Likewise.
7238         * gcc-rich-location.c (gcc_rich_location::add_expr): Update for
7239         conversion of show_caret_p to a tri-state.
7240         * pretty-print.c (text_info::set_location): Likewise.
7241         * pretty-print.h (text_info::set_location): Likewise.
7242         * substring-locations.c (format_warning_n_va): Likewise.
7243         * tree-diagnostic.c (default_tree_printer): Likewise.
7244         * tree-pretty-print.c (newline_and_indent): Likewise.
7246 2018-08-27  David Malcolm  <dmalcolm@redhat.com>
7248         PR c++/87091
7249         * diagnostic-show-locus.c (get_line_span_for_fixit_hint): Show the
7250         line above for line-insertion fix-it hints.
7251         (selftest::test_fixit_insert_containing_newline): Update the
7252         expected results, and add a test with line-numbering enabled.
7254 2018-08-27  Martin Liska  <mliska@suse.cz>
7256         PR sanitizer/86962
7257         * sanopt.c (sanitize_rewrite_addressable_params): Ignore
7258         params with DECL_HAS_VALUE_EXPR_P.
7260 2018-08-27  Martin Liska  <mliska@suse.cz>
7262         * config/i386/i386.c (ix86_expand_set_or_movmem): Dump
7263         selected expansion strategy.
7265 2018-08-27  Martin Liska  <mliska@suse.cz>
7267         * builtins.h (is_builtin_fn): Remove and fndecl_built_in_p.
7268         * builtins.c (is_builtin_fn): Likewise.
7269         * attribs.c (diag_attr_exclusions): Use new function
7270         fndecl_built_in_p and remove check for FUNCTION_DECL if
7271         possible.
7272         (builtin_mathfn_code): Likewise.
7273         (fold_builtin_expect): Likewise.
7274         (fold_call_expr): Likewise.
7275         (fold_builtin_call_array): Likewise.
7276         (fold_call_stmt): Likewise.
7277         (set_builtin_user_assembler_name): Likewise.
7278         (is_simple_builtin): Likewise.
7279         * calls.c (gimple_alloca_call_p): Likewise.
7280         (maybe_warn_nonstring_arg): Likewise.
7281         * cfgexpand.c (expand_call_stmt): Likewise.
7282         * cgraph.c (cgraph_update_edges_for_call_stmt_node): Likewise.
7283         (cgraph_edge::verify_corresponds_to_fndecl): Likewise.
7284         (cgraph_node::verify_node): Likewise.
7285         * cgraphclones.c (build_function_decl_skip_args): Likewise.
7286         (cgraph_node::create_clone): Likewise.
7287         * config/arm/arm.c (arm_insert_attributes): Likewise.
7288         * config/i386/i386.c (ix86_gimple_fold_builtin): Likewise.
7289         * dse.c (scan_insn): Likewise.
7290         * expr.c (expand_expr_real_1): Likewise.
7291         * fold-const.c (operand_equal_p): Likewise.
7292         (fold_binary_loc): Likewise.
7293         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
7294         * gimple-low.c (lower_stmt): Likewise.
7295         * gimple-pretty-print.c (dump_gimple_call): Likewise.
7296         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
7297         Likewise.
7298         * gimple.c (gimple_build_call_from_tree): Likewise.
7299         (gimple_call_builtin_p): Likewise.
7300         (gimple_call_combined_fn): Likewise.
7301         * gimplify.c (gimplify_call_expr): Likewise.
7302         (gimple_boolify): Likewise.
7303         (gimplify_modify_expr): Likewise.
7304         (gimplify_addr_expr): Likewise.
7305         * hsa-gen.c (gen_hsa_insns_for_call): Likewise.
7306         * ipa-cp.c (determine_versionability): Likewise.
7307         * ipa-fnsummary.c (compute_fn_summary): Likewise.
7308         * ipa-param-manipulation.c (ipa_modify_formal_parameters): Likewise.
7309         * ipa-split.c (visit_bb): Likewise.
7310         (split_function): Likewise.
7311         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
7312         * lto-cgraph.c (input_node): Likewise.
7313         * lto-streamer-out.c (write_symbol): Likewise.
7314         * omp-low.c (setjmp_or_longjmp_p): Likewise.
7315         (lower_omp_1): Likewise.
7316         * predict.c (strip_predict_hints): Likewise.
7317         * print-tree.c (print_node): Likewise.
7318         * symtab.c (symtab_node::output_to_lto_symbol_table_p): Likewise.
7319         * trans-mem.c (is_tm_irrevocable): Likewise.
7320         (is_tm_load): Likewise.
7321         (is_tm_simple_load): Likewise.
7322         (is_tm_store): Likewise.
7323         (is_tm_simple_store): Likewise.
7324         (is_tm_abort): Likewise.
7325         (tm_region_init_1): Likewise.
7326         * tree-call-cdce.c (gen_shrink_wrap_conditions): Likewise.
7327         * tree-cfg.c (verify_gimple_call): Likewise.
7328         (move_stmt_r): Likewise.
7329         (stmt_can_terminate_bb_p): Likewise.
7330         * tree-eh.c (lower_eh_constructs_2): Likewise.
7331         * tree-if-conv.c (if_convertible_stmt_p): Likewise.
7332         * tree-inline.c (remap_gimple_stmt): Likewise.
7333         (copy_bb): Likewise.
7334         (estimate_num_insns): Likewise.
7335         (fold_marked_statements): Likewise.
7336         * tree-sra.c (scan_function): Likewise.
7337         * tree-ssa-ccp.c (surely_varying_stmt_p): Likewise.
7338         (optimize_stack_restore): Likewise.
7339         (pass_fold_builtins::execute): Likewise.
7340         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
7341         (mark_all_reaching_defs_necessary_1): Likewise.
7342         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Likewise.
7343         * tree-ssa-forwprop.c (simplify_builtin_call): Likewise.
7344         (pass_forwprop::execute): Likewise.
7345         * tree-ssa-loop-im.c (stmt_cost): Likewise.
7346         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
7347         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Likewise.
7348         * tree-ssa-strlen.c (get_string_length): Likewise.
7349         * tree-ssa-structalias.c (handle_lhs_call): Likewise.
7350         (find_func_aliases_for_call): Likewise.
7351         * tree-ssa-ter.c (find_replaceable_in_bb): Likewise.
7352         * tree-stdarg.c (optimize_va_list_gpr_fpr_size): Likewise.
7353         * tree-tailcall.c (find_tail_calls): Likewise.
7354         * tree.c (need_assembler_name_p): Likewise.
7355         (free_lang_data_in_decl): Likewise.
7356         (get_call_combined_fn): Likewise.
7357         * ubsan.c (is_ubsan_builtin_p): Likewise.
7358         * varasm.c (incorporeal_function_p): Likewise.
7359         * tree.h (DECL_BUILT_IN): Remove and replace with
7360         fndecl_built_in_p.
7361         (DECL_BUILT_IN_P): Transfort to fndecl_built_in_p.
7362         (fndecl_built_in_p): New.
7364 2018-08-27  Martin Liska  <mliska@suse.cz>
7366         PR tree-optimization/86847
7367         * tree-switch-conversion.c (switch_decision_tree::dump_case_nodes):
7368         Dump also subtree probability.
7369         (switch_decision_tree::do_jump_if_equal): New function.
7370         (switch_decision_tree::emit_case_nodes): Handle special
7371         situations in balanced tree that can be emitted much simpler.
7372         Fix calculation of probabilities that happen in tree expansion.
7373         * tree-switch-conversion.h (struct cluster): Add
7374         is_single_value_p.
7375         (struct simple_cluster): Likewise.
7376         (struct case_tree_node): Add new function has_child.
7377         (do_jump_if_equal): New.
7379 2018-08-27  Martin Liska  <mliska@suse.cz>
7381         * tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
7382         Add new argument to bit_test_cluster constructor.
7383         (bit_test_cluster::emit): Set bits really number of values
7384         handlel by a test.
7385         (bit_test_cluster::hoist_edge_and_branch_if_true): Add
7386         probability argument.
7387         * tree-switch-conversion.h (struct bit_test_cluster):
7388         Add m_handles_entire_switch.
7390 2018-08-27  Martin Liska  <mliska@suse.cz>
7392         PR tree-optimization/86702
7393         * tree-switch-conversion.c (jump_table_cluster::emit):
7394         Make probabilities even for values in jump table
7395         according to number of cases handled.
7396         (switch_decision_tree::compute_cases_per_edge): Pass
7397         argument to reset_out_edges_aux function.
7398         (switch_decision_tree::analyze_switch_statement): Likewise.
7399         * tree-switch-conversion.h (switch_decision_tree::reset_out_edges_aux):
7400         Make it static.
7402 2018-08-27  Martin Liska  <mliska@suse.cz>
7404         * cfgexpand.c (expand_asm_stmt): Use label_to_block and pass
7405         cfun argument explicitly.
7406         * gimple-pretty-print.c (dump_gimple_switch): Likewise.
7407         * hsa-gen.c (gen_hsa_insns_for_switch_stmt): Use new
7408         function gimple_switch_default_bb.
7409         (convert_switch_statements):
7410         (expand_builtins):
7411         * ipa-fnsummary.c (set_switch_stmt_execution_predicate):
7412         * stmt.c (label_to_block_fn): Use label_to_block and pass
7413         cfun argument explicitly and use gimple_switch_label_bb.
7414         (expand_case): Likewise.
7415         * tree-cfg.c (lower_phi_internal_fn): Use label_to_block and pass
7416         cfun argument explicitly. Likewise.
7417         (make_edges_bb): Likewise.
7418         (make_cond_expr_edges): Likewise.
7419         (get_cases_for_edge): Likewise.
7420         (make_gimple_switch_edges): Likewise.
7421         (label_to_block_fn): Likewise.
7422         (label_to_block): Likewise.
7423         (make_goto_expr_edges): Likewise.
7424         (make_gimple_asm_edges): Likewise.
7425         (main_block_label): Likewise.
7426         (group_case_labels_stmt): Likewise.
7427         (find_taken_edge_computed_goto): Likewise.
7428         (find_taken_edge_switch_expr): Likewise.
7429         (gimple_verify_flow_info): Likewise.
7430         (gimple_redirect_edge_and_branch): Likewise.
7431         (gimple_switch_label_bb): New function.
7432         (gimple_switch_default_bb): Likewise.
7433         (gimple_switch_edge): Likewise.
7434         (gimple_switch_default_edge): Likewise.
7435         * tree-cfg.h (label_to_block_fn): Remove and replace ...
7436         (label_to_block): ... with this.
7437         (gimple_switch_label_bb): New.
7438         (gimple_switch_default_bb): Likewise.
7439         (gimple_switch_edge): Likewise.
7440         (gimple_switch_default_edge): Likewise.
7441         * tree-cfgcleanup.c (convert_single_case_switch): Use
7442         new gimple functions and pass new argument to label_to_block.
7443         (cleanup_control_flow_bb):
7444         * tree-eh.c (make_eh_dispatch_edges): Use label_to_block and pass
7445         cfun argument explicitly.
7446         (make_eh_edges): Likewise.
7447         (redirect_eh_dispatch_edge): Likewise.
7448         (lower_resx): Likewise.
7449         (lower_eh_dispatch): Likewise.
7450         (maybe_remove_unreachable_handlers): Likewise.
7451         (unsplit_eh): Likewise.
7452         (cleanup_empty_eh): Likewise.
7453         (verify_eh_edges): Likewise.
7454         (verify_eh_dispatch_edge): Likewise.
7455         * tree-ssa-dom.c (record_edge_info): Likewise.
7456         * tree-ssa-forwprop.c (simplify_gimple_switch_label_vec): Likewise.
7457         * tree-ssa-threadedge.c (thread_around_empty_blocks): Likewise.
7458         (thread_through_normal_block): Likewise.
7459         * tree-ssa-uncprop.c (associate_equivalences_with_edges): Likewise.
7460         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds):
7461         * tree-switch-conversion.c (switch_conversion::collect): Use new
7462         gimple functions.
7463         (switch_conversion::check_final_bb): Likewise.
7464         (switch_conversion::gather_default_values): Pass new argument
7465         to label_to_block.
7466         (switch_conversion::build_constructors): Likewise.
7467         (switch_decision_tree::compute_cases_per_edge): Use new
7468         gimple_switch_edge function.
7469         (switch_decision_tree::analyze_switch_statement): Pass new argument
7470         to label_to_block.
7471         (switch_decision_tree::try_switch_expansion): Use
7472         gimple_switch_default_edge.
7473         * tree-vrp.c (find_switch_asserts): Pass new argument
7474         to label_to_block.
7475         * vr-values.c (vr_values::vrp_visit_switch_stmt): Likewise.
7476         (vr_values::simplify_switch_using_ranges): Likewise.
7478 2018-08-27  Richard Biener  <rguenther@suse.de>
7480         * cfganal.h (rev_post_order_and_mark_dfs_back_seme): Declare.
7481         * cfganal.c (rev_post_order_and_mark_dfs_back_seme): New function.
7483         * tree-ssa-sccvn.h (struct vn_pval): New structure.
7484         (struct vn_nary_op_s): Add unwind_to member.  Add
7485         predicated_values flag and put result into a union together
7486         with a linked list of vn_pval.
7487         (struct vn_ssa_aux): Add name member to make maintaining
7488         a map of SSA name to vn_ssa_aux possible.  Remove no longer
7489         needed info, dfsnum, low, visited, on_sccstack, use_processed
7490         and range_info_anti_range_p members.
7491         (run_scc_vn, vn_eliminate, free_scc_vn, vn_valueize): Remove.
7492         (do_rpo_vn, run_rpo_vn, eliminate_with_rpo_vn, free_rpo_vn):
7493         New functions.
7494         (vn_valueize): New global.
7495         (vn_context_bb): Likewise.
7496         (VN_INFO_RANGE_INFO, VN_INFO_ANTI_RANGE_P, VN_INFO_RANGE_TYPE,
7497         VN_INFO_PTR_INFO): Remove.
7498         * tree-ssa-sccvn.c: ... (rewrite)
7499         (pass_fre::execute): For -O2+ initialize loops and run
7500         RPO VN in optimistic mode (iterating).  For -O1 and -Og
7501         run RPO VN in non-optimistic mode.
7502         * params.def (PARAM_SCCVN_MAX_SCC_SIZE): Remove.
7503         (PARAM_RPO_VN_MAX_LOOP_DEPTH): Add.
7504         * doc/invoke.texi (sccvn-max-scc-size): Remove.
7505         (rpo-vn-max-loop-depth): Document.
7506         * tree-ssa-alias.c (walk_non_aliased_vuses): Stop walking
7507         when valuezing the VUSE signals we walked out of the region.
7508         * tree-ssa-pre.c (phi_translate_1): Ignore predicated values.
7509         (phi_translate): Set VN context block to use for availability
7510         lookup.
7511         (compute_avail): Likewise.
7512         (pre_valueize): New function.
7513         (pass_pre::execute): Adjust to the RPO VN API.
7515         * tree-ssa-loop-ivcanon.c: Include tree-ssa-sccvn.h.
7516         (propagate_constants_for_unrolling): Remove.
7517         (tree_unroll_loops_completely): Perform value-numbering
7518         on the unrolled bodies loop parent.
7520 2018-08-27  Richard Biener  <rguenther@suse.de>
7522         * tree-ssa-pre.c (compute_antic): Re-use inverted postorder
7523         for partial antic compute.
7525 2018-08-27  Jakub Jelinek  <jakub@redhat.com>
7527         PR rtl-optimization/87065
7528         * combine.c (simplify_if_then_else): Formatting fix.
7529         (if_then_else_cond): Guard MULT optimization with SCALAR_INT_MODE_P
7530         check.
7531         (known_cond): Don't return const_true_rtx for vector modes.  Use
7532         CONST0_RTX instead of const0_rtx.  Formatting fixes.
7534 2018-08-27  Martin Liska  <mliska@suse.cz>
7536         PR gcov-profile/87069
7537         * gcov.c (process_file): Record files already processed
7538         and warn about a file being processed multiple times.
7540 2018-08-27  Martin Liska  <mliska@suse.cz>
7542         PR driver/83193
7543         * config/aarch64/aarch64.c (aarch64_override_options_internal):
7544         Set default values for x_aarch64_*_string strings.
7545         * config/aarch64/aarch64.opt: Remove --{march,mcpu,mtune}==
7546         prefix.  For -mabi do not print '=ABI' in help and use
7547         <option_value> format for -msve-vector-bits and -moverride
7548         options.
7550 2018-08-26  Jeff Law  <law@redhat.com>
7552         * config/mips/frame-header-opt.c: Include "backend.h" rather than
7553         "cfg.h"
7555 2018-08-26  Marek Polacek  <polacek@redhat.com>
7557         PR c++/87029, Implement -Wredundant-move.
7558         * doc/invoke.texi: Document -Wredundant-move.
7560 2018-08-25  Martin Sebor  <msebor@redhat.com>
7562         PR tree-optimization/87059
7563         * builtins.c (expand_builtin_strncmp): Convert MIN_EXPR operand
7564         to the same type as the other.
7565         * fold-const.c (fold_binary_loc): Assert expectation.
7567 2018-08-25  Iain Sandoe  <iain@sandoe.co.uk>
7569         * config/darwin.c (machopic_legitimize_pic_address): Clean up
7570         extraneous parentheses, dead code section and formatting.
7572 2018-08-24  David Malcolm  <dmalcolm@redhat.com>
7574         PR c++/87091
7575         * diagnostic-show-locus.c (layout::layout): Ensure the margin is
7576         wide enough for jumps in the line-numbering to be visible.
7577         (layout::print_gap_in_line_numbering): New member function.
7578         (layout::calculate_line_spans): When using line numbering, merge
7579         line spans that are only 1 line apart.
7580         (diagnostic_show_locus): When printing line numbers, show gaps in
7581         line numbering directly, rather than printing headers.
7582         (selftest::test_diagnostic_show_locus_fixit_lines): Add test of
7583         line-numbering with multiple line spans.
7584         (selftest::test_fixit_insert_containing_newline_2): Add test of
7585         line-numbering, in which the spans are close enough to be merged.
7587 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
7589         * gimple-ssa-evrp-analyze.c (set_ssa_range_info): Pass value_range
7590         to range_includes_zero_p.  Do not special case VR_ANTI_RANGE.
7591         * tree-vrp.c (range_is_nonnull): Remove.
7592         (range_includes_zero_p): Accept value_range instead of min/max.
7593         (extract_range_from_binary_expr_1): Do not early bail on
7594         POINTER_PLUS_EXPR.
7595         Use range_includes_zero_p instead of range_is_nonnull.
7596         (extract_range_from_unary_expr): Use range_includes_zero_p instead
7597         of range_is_nonnull.
7598         (vrp_meet_1): Pass value_range to range_includes_zero_p.  Do not
7599         special case VR_ANTI_RANGE.
7600         (vrp_finalize): Same.
7601         * tree-vrp.h (range_includes_zero_p): Pass value_range as argument
7602         instead of min/max.
7603         (range_is_nonnull): Remove.
7604         * vr-values.c (vrp_stmt_computes_nonzero): Use
7605         range_includes_zero_p instead of range_is_nonnull.
7606         (extract_range_basic): Pass value_range to range_includes_zero_p
7607         instead of range_is_nonnull.
7609 2018-08-24  Uros Bizjak  <ubizjak@gmail.com>
7611         * emit-rtl.c (init_emit_once): Do not emit MODE_POINTER_BOUNDS RTXes.
7612         * emit-rtl.h (rtl_data): Remove return_bnd.
7613         * explow.c (trunc_int_for_mode): Do not handle POINTER_BOUNDS_MODE_P.
7614         * function.c (diddle_return_value): Do not handle crtl->return_bnd.
7615         * genmodes.c (complete_mode): Do not handle MODE_POINTER_BOUNDS.
7616         (POINTER_BOUNDS_MODE): Remove definition.
7617         (make_pointer_bounds_mode): Remove.
7618         (get_mode_class): Do not handle MODE_POINTER_BOUNDS.
7619         * machmode.h (POINTER_BOUNDS_MODE_P): Remove definition.
7620         (scalare_mode::includes_p): Do not handle MODE_POINTER_BOUNDS.
7621         * mode-classes.def: Do not define MODE_POINTER_BOUNDS.
7622         * stor-layout.c (int_mode_for_mode): Do not handle MODE_POINTER_BOUNDS.
7623         * tree-core.h (enum tree_index): Remove TI_POINTER_BOUNDS_TYPE.
7624         * varasm.c (output_constant_pool_2): Do not handle MODE_POINTER_BOUNDS.
7626         * config/i386/i386-modes.def (BND32, BND64): Remove.
7627         * config/i386/i386.c (dbx_register_map): Remove bound registers.
7628         (dbx64_register_map): Ditto.
7629         (svr4_dbx_register_map): Ditto.
7630         (indirect_thunk_bnd_needed): Remove.
7631         (indirect_thunks_bnd_used): Ditto.
7632         (indirect_return_bnd_needed): Ditto.
7633         (indirect_return_via_cx_bnd): Ditto.
7634         (enum indirect_thunk_prefix): Remove indirect_thunk_prefix_bnd.
7635         (indirect_thunk_name): Remove handling of indirect_thunk_prefix_bnd.
7636         (output_indirect_thunk): Ditto.  Remove need_prefix argument.
7637         (output_indirect_thunk_function): Remove handling of
7638         indirect_return_bnd_needed, indirect_return_via_cx_bnd,
7639         indirect_thunk_bnd_needed and indirect_thunks_bnd_used variables.
7640         (ix86_save_reg): Remove handling of crtl->return_bnd.
7641         (ix86_legitimate_constant_p): Remove handling of POINTER_BOUNDS_MODE_P.
7642         (ix86_print_operand_address_as): Remove handling of UNSPEC_BNDMK_ADDR
7643         and UNSPEC_BNDLX_ADDR.
7644         (ix86_output_indirect_branch_via_reg): Remove handling of
7645         indirect_thunk_prefix_bnd.
7646         (ix86_output_indirect_branch_via_push): Ditto.
7647         (ix86_output_function_return): Ditto.
7648         (ix86_output_indirect_function_return): Ditto.
7649         (avoid_func_arg_motion): Do not handle UNSPEC_BNDSTX.
7650         * config/i386/i386.h (FIXED_REGISTERS): Remove bound registers.
7651         (CALL_USED_REGISTERS): Ditto.
7652         (REG_ALLOC_ORDER): Update for removal of bound registers.
7653         (HI_REGISTER_NAMES): Ditto.
7654         * config/i386/i386.md (UNSPEC_BNDMK, UNSPEC_BNDMK_ADDR, UNSPEC_BNDSTX)
7655         (UNSPEC_BNDLDX, UNSPEC_BNDLDX_ADDR, UNSPEC_BNDCL, UNSPEC_BNDCU)
7656         (UNSPEC_BNDCN, UNSPEC_MPX_FENCE): Remove.
7657         (BND0_REG, BND1_REG, BND2_REG, BND3_REG): Remove
7658         (FIRST_PSEUDO_REG): Update.
7659         (BND): Remove mode iterator.
7660         * config/i386/predicates.md (bnd_mem_operator): Remove.
7662 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
7664         * tree-vect-stmts.c (vectorizable_bswap): Handle variable-length
7665         vectors.
7667 2018-08-24  Richard Sandiford  <richard.sandiford@arm.com>
7669         * tree-vect-slp.c (vect_transform_slp_perm_load): Separate out
7670         the case in which the permute needs only a single element and
7671         repeats for every vector of the result.  Extend that case to
7672         handle variable-length vectors.
7673         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
7675 2018-08-24  H.J. Lu  <hongjiu.lu@intel.com>
7677         PR debug/79342
7678         * dwarf2out.c (save_macinfo_strings): Call set_indirect_string
7679         on DW_MACINFO_start_file for -gsplit-dwarf -g3.
7681 2018-08-24  Richard Biener  <rguenther@suse.de>
7683         * cfg.h (struct control_flow_graph): Add edge_flags_allocated and
7684         bb_flags_allocated members.
7685         (auto_flag): New RAII class for allocating flags.
7686         (auto_edge_flag): New RAII class for allocating edge flags.
7687         (auto_bb_flag): New RAII class for allocating bb flags.
7688         * cfgloop.c (verify_loop_structure): Allocate temporary edge
7689         flag dynamically.
7690         * cfganal.c (dfs_enumerate_from): Remove use of visited sbitmap
7691         in favor of temporarily allocated BB flag.
7692         * hsa-brig.c: Re-order includes.
7693         * hsa-dump.c: Likewise.
7694         * hsa-regalloc.c: Likewise.
7695         * print-rtl.c: Likewise.
7696         * profile-count.c: Likewise.
7698 2018-08-24  Segher Boessenkool  <segher@kernel.crashing.org>
7700         PR target/86989
7701         * config/rs6000/rs6000.c (toc_relative_expr_p): Check that the base is
7702         the TOC register.
7704 2018-08-24  Aldy Hernandez  <aldyh@redhat.com>
7706         PR 87073/bootstrap
7707         * wide-int-range.cc (wide_int_range_div): Do not ignore result
7708         from wide_int_range_multiplicative_op.
7710 2018-08-23  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
7712         * tree-vect-data-refs.c (vect_grouped_store_supported): Fix typo
7713         "permutaion".
7715 2018-08-23  Giuliano Belinassi  <giuliano.belinassi@usp.br>
7717         * genmatch.c (parser::parse_operation): Fix typo 'exapnded'
7718         to 'expanded'.
7720 2018-08-23  Alexander Monakov  <amonakov@ispras.ru>
7722         * tree-scalar-evolution.c (final_value_replacement_loop): Dump
7723         full GENERIC expression used for replacement.
7725 2018-08-23  Aldy Hernandez  <aldyh@redhat.com>
7727         * tree-vrp.c (abs_extent_range): Remove.
7728         (extract_range_into_wide_ints): Pass wide ints by reference.
7729         (extract_range_from_binary_expr_1): Rewrite the *DIV_EXPR code.
7730         Pass wide ints by reference in all calls to
7731         extract_range_into_wide_ints.
7732         * wide-int-range.cc (wide_int_range_div): New.
7733         * wide-int-range.h (wide_int_range_div): New.
7734         (wide_int_range_includes_zero_p): New.
7735         (wide_int_range_zero_p): New.
7737 2018-08-23  Matthew Malcomson  <matthew.malcomson@arm.com>
7739         * config/aarch64/aarch64.md (arches): New enum.
7740         (arch): New enum attr.
7741         (arch_enabled): New attr.
7742         (enabled): Now uses arch_enabled only.
7743         (simd, sve, fp16): Removed attribute.
7744         (fp): Attr now defined in terms of 'arch'.
7745         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64, *movti_aarch64,
7746         *movhf_aarch64, <optab><fcvt_target><GPF:mode>2,
7747         <FCVT_F2FIXED:fcvt_fixed_insn><GPF:mode>3,
7748         <FCVT_FIXED2F:fcvt_fixed_insn><GPI:mode>3): Merge 'fp' and 'simd'
7749         attributes into 'arch'.
7750         (*movsf_aarch64, *movdf_aarch64, *movtf_aarch64, *add<mode>3_aarch64,
7751         subdi3, neg<mode>2, <optab><mode>3, one_cmpl<mode>2,
7752         *<NLOGICAL:optab>_one_cmpl<mode>3, *xor_one_cmpl<mode>3,
7753         *aarch64_ashl_sisd_or_int_<mode>3, *aarch64_lshr_sisd_or_int_<mode>3,
7754         *aarch64_ashr_sisd_or_int_<mode>3, *aarch64_sisd_ushl): Convert use of
7755         'simd' attribute into 'arch'.
7756         (load_pair_sw_<SX:mode><SX2:mode>, load_pair_dw_<DX:mode><DX2:mode>,
7757         store_pair_sw_<SX:mode><SX2:mode>, store_pair_dw_<DX:mode><DX2:mode>):
7758         Convert use of 'fp' attribute to 'arch'.
7759         * config/aarch64/aarch64-simd.md (move_lo_quad_internal_<mode>,
7760         move_lo_quad_internal_<mode>): (different modes) Merge 'fp' and 'simd'
7761         into 'arch'.
7762         (move_lo_quad_internal_be_<mode>, move_lo_quad_internal_be_<mode>):
7763         (different modes) Merge 'fp' and 'simd' into 'arch'.
7764         (*aarch64_combinez<mode>, *aarch64_combinez_be<mode>): Merge 'fp' and
7765         'simd' into 'arch'.
7767 2018-08-23  Segher Boessenkool  <segher@kernel.crashing.org>
7769         PR rtl-optimization/87026
7770         * expmed.c (canonicalize_comparison): If we can no longer create
7771         pseudoregisters, don't.
7773 2018-08-23  Richard Earnshaw  <rearnsha@arm.com>
7775         PR target/86951
7776         * config/arm/arm-protos.h (arm_emit_speculation_barrier): New
7777         prototype.
7778         * config/arm/arm.c (speculation_barrier_libfunc): New static
7779         variable.
7780         (arm_init_libfuncs): Initialize it.
7781         (arm_emit_speculation_barrier): New function.
7782         * config/arm/arm.md (speculation_barrier): Call
7783         arm_emit_speculation_barrier for architectures that do not have
7784         DSB or ISB.
7785         (speculation_barrier_insn): Only match on Armv7 or later.
7787 2018-08-23  Richard Biener  <rguenther@suse.de>
7789         PR middle-end/87024
7790         * tree-inline.c (copy_bb): Drop unused __builtin_va_arg_pack_len
7791         calls.
7793 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
7795         * config/aarch64/aarch64.c (aarch64_evpc_sve_tbl): Fix handling
7796         of single-vector TBLs.
7797         (aarch64_vectorize_vec_perm_const): Set one_vector_p when only
7798         one input is given.
7800 2018-08-23  Richard Sandiford  <richard.sandiford@arm.com>
7802         PR target/85910
7803         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const_1): Fix
7804         aarch64_evpc_tbl guard.
7806 2018-08-22  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7808         * tree-ssa-dse.c (compute_trims): Avoid folding away undefined
7809         behaviour.
7811 2018-08-22  Martin Sebor  <msebor@redhat.com>
7813         PR middle-end/87052
7814         * tree-pretty-print.c (pretty_print_string): Add argument.
7815         (dump_generic_node): Call to pretty_print_string with string size.
7817 2018-08-22  Segher Boessenkool  <segher@kernel.crashing.org>
7819         PR rtl-optimization/86771
7820         * combine.c (try_combine): Do not allow splitting a resulting PARALLEL
7821         of two SETs into those two SETs, one to be placed at i2, if that SETs
7822         destination is modified between i2 and i3.
7824 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
7826         PR tree-optimization/86725
7827         * tree-vect-loop.c (vect_inner_phi_in_double_reduction_p): New
7828         function.
7829         (vect_analyze_scalar_cycles_1): Check it.
7831 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
7833         PR tree-optimization/86725
7834         * tree-vect-loop.c (vect_is_simple_reduction): When treating
7835         an outer loop phi as a double reduction, make sure that the
7836         single user of the phi result is an inner loop phi.
7838 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
7840         * tree-vect-data-refs.c (vect_analyze_group_access_1): Convert
7841         grouped stores with gaps to a strided group.
7843 2018-08-22  Richard Sandiford  <richard.sandiford@arm.com>
7845         * tree-vect-stmts.c (get_group_load_store_type)
7846         (get_load_store_type): Only test STMT_VINFO_STRIDED_P for the
7847         first statement in a group.
7849 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
7851         * config/darwin.h (LINK_COMMAND_SPEC_A): Sync LTO options with
7852         the sequence used in gcc/gcc.c.
7854 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
7856         PR other/704
7857         * gcc-ar.c (main): Don’t try to invoke the plug-in if we’re not
7858         building it.
7860 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
7862         * config/darwin10.h (LINK_GCC_C_SEQUENCE_SPEC): Adjust to use the
7863         Darwin10-specific unwinder-shim.
7864         * config/darwin12.h (LINK_GCC_C_SEQUENCE_SPEC): Remove.
7865         * config/rs6000/darwin.h (DARWIN_CRT1_SPEC, DARWIN_DYLIB1_SPEC):
7866         New to cater for Darwin10 Rosetta.
7868 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
7870         * config/i386/i386.c (ix86_output_addr_diff_elt): Move the MACH-O
7871         specific test before the one for HAVE_AS_GOTOFF_IN_DATA.
7873 2018-08-22  Iain Sandoe  <iain@sandoe.co.uk>
7875         PR bootstrap/81033
7876         PR target/81733
7877         PR target/52795
7878         * gcc/dwarf2out.c (FUNC_SECOND_SECT_LABEL): New.
7879         (dwarf2out_switch_text_section): Generate a local label for the
7880         second function sub-section and apply it as the second FDE start
7881         label.
7882         * gcc/final.c (final_scan_insn_1): Emit second FDE label after the
7883         second sub-section start.
7885 2018-08-22  Richard Biener  <rguenther@suse.de>
7887         PR tree-optimization/86988
7888         * tree-vrp.c (vrp_prop::check_mem_ref): Bail out on VLAs.
7890 2018-08-22  Richard Biener  <rguenther@suse.de>
7892         PR tree-optimization/86945
7893         * tree-cfg.c (generate_range_test): Use unsigned arithmetic.
7895 2018-08-22  Alexandre Oliva <oliva@adacore.com>
7897         * config/rs6000/rs6000.c (SMALL_DATA_RELOC, SMALL_DATA_REG): Add
7898         a comment about how uses of r2 for .sdata2 come about.
7900 2018-08-22  Alexandre Oliva <aoliva@redhat.com>
7902         * tree-ssa-reassoc.c (is_reassociable_op): Fix cut&pasto.
7904 2018-08-21  Marek Polacek  <polacek@redhat.com>
7906         PR c++/86981, Implement -Wpessimizing-move.
7907         * doc/invoke.texi: Document -Wpessimizing-move.
7909 2018-08-21  Jan Hubicka  <jh@suse.cz>
7911         * tree.c (find_decls_types_r): Do not check for redundant typedefs.
7912         * tree.h (is_redundant_typedef): Remove.
7913         * dwarf2out.c (is_redundant_typedef): Turn into static function.
7915 2018-08-21  Jan Hubicka  <jh@suse.cz>
7917         * tree.c (free_lang_data_in_decl): Remove types from DECL_CONTEXT
7918         when possible.
7920 2018-08-21  Tamar Christina  <tamar.christina@arm.com>
7922         * expmed.c (extract_low_bits): Reject invalid subregs early.
7924 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7926         PR middle-end/86121
7927         * tree-ssa-strlen.c (adjust_last_stmt): Avoid folding away undefined
7928         behaviour.
7930 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
7932         * config/vxworks.h: Guard vxworks_asm_out_constructor and
7933         vxworks_asm_out_destructor by !HAVE_INITFINI_ARRAY_SUPPORT
7934         * config/vxworks.c: Likewise.
7936 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
7938         * config/vxworks.c: Set targetm.have_ctors_dtors
7939         if HAVE_INITFINI_ARRAY_SUPPORT.
7940         * config/vxworks.h: Set SUPPORTS_INIT_PRIORITY
7941         if HAVE_INITFINI_ARRAY_SUPPORT.
7943 2018-08-21  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
7945         * config/vxworks.h: Add $(WIND_BASE)/target/h/wrn/coreip to
7946         default search path for VxWorks < 7.
7948 2018-08-21  Bernd Edlinger  <bernd.edlinger@hotmail.de>
7950         * gimple-ssa-sprintf.c (decl_constant_value): Remove.
7951         (get_format_string): Refer to c_getstr.
7953 2018-08-21  Tom de Vries  <tdevries@suse.de>
7955         * cgraph.h (debuginfo_early_init, debuginfo_init, debuginfo_fini)
7956         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
7957         (debuginfo_early_stop): Declare.
7958         * cgraphunit.c (debuginfo_early_init, debuginfo_init, debuginfo_fini)
7959         (debuginfo_start, debuginfo_stop, debuginfo_early_start)
7960         (debuginfo_early_stop): New function.
7961         (symbol_table::finalize_compilation_unit): Call debuginfo_early_start
7962         and debuginfo_early_stop.
7963         * dwarf2out.c (dwarf2out_finish, dwarf2out_early_finish): Dump dwarf.
7964         * toplev.c (compile_file): Call debuginfo_start and debuginfo_stop.
7965         (general_init): Call debuginfo_early_init.
7966         (finalize): Call debuginfo_fini.
7967         (do_compile): Call debuginfo_init.
7968         * doc/invoke.texi (@gccoptlist): Add -fdump-debug and
7969         -fdump-early-debug.
7970         (@item -fdump-debug, @item -fdump-earlydebug): Add.
7972 2018-08-21  Tom de Vries  <tdevries@suse.de>
7974         * dwarf2out.c (print_dw_val, print_loc_descr, print_die): Handle
7975         flag_dump_noaddr and flag_dump_unnumbered.
7977 2018-08-21  Aldy Hernandez  <aldyh@redhat.com>
7979         * wide-int-range.cc (wide_int_range_abs): New.
7980         (wide_int_range_order_set): Rename from wide_int_range_min_max.
7981         * wide-int-range.h (wide_int_range_abs): New.
7982         (wide_int_range_min_max): New.
7983         * tree-vrp.c (extract_range_from_unary_expr): Rewrite ABS_EXPR
7984         case to call wide_int_range_abs.
7985         Rewrite MIN/MAX_EXPR to call wide_int_range_min_max.
7986         (extract_range_from_abs_expr): Delete.
7988 2018-08-20  Michael Meissner  <meissner@linux.ibm.com>
7990         PR target/87033
7991         * config/rs6000/rs6000.md (extendsi<mode>2): Change constraints
7992         from 'Y' to 'YZ' to enable the LWAX instruction to be generated
7993         for indexed loads.
7995 2018-08-20  Nathan Sidwell  <nathan@acm.org>
7996             Jeff Law <law@redhat.com>
7998         * config/s390/s390-c (s390_macro_to_expand): Use cpp_macro_p.
7999         * config/spu/spu-c.c (spu_macro_to_expand): Likewise.
8001 2018-08-20  David Malcolm  <dmalcolm@redhat.com>
8003         PR other/84889
8004         * attribs.c (diag_attr_exclusions): Add auto_diagnostic_group instance.
8005         (decl_attributes): Likewise.
8006         * calls.c (maybe_warn_nonstring_arg): Add auto_diagnostic_group
8007         instance.
8008         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
8009         * diagnostic-core.h (class auto_diagnostic_group): New class.
8010         * diagnostic.c (diagnostic_initialize): Initialize the new fields.
8011         (diagnostic_report_diagnostic): Handle the first diagnostics within
8012         a group.
8013         (emit_diagnostic): Add auto_diagnostic_group instance.
8014         (inform): Likewise.
8015         (inform_n): Likewise.
8016         (warning): Likewise.
8017         (warning_at): Likewise.
8018         (warning_n): Likewise.
8019         (pedwarn): Likewise.
8020         (permerror): Likewise.
8021         (error): Likewise.
8022         (error_n): Likewise.
8023         (error_at): Likewise.
8024         (sorry): Likewise.
8025         (fatal_error): Likewise.
8026         (internal_error): Likewise.
8027         (internal_error_no_backtrace): Likewise.
8028         (auto_diagnostic_group::auto_diagnostic_group): New ctor.
8029         (auto_diagnostic_group::~auto_diagnostic_group): New dtor.
8030         * diagnostic.h (struct diagnostic_context): Add fields
8031         "diagnostic_group_nesting_depth",
8032         "diagnostic_group_emission_count", "begin_group_cb",
8033         "end_group_cb".
8034         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior):
8035         Add auto_diagnostic_group instance(s).
8036         (find_explicit_erroneous_behavior): Likewise.
8037         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Likewise.
8038         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Likewise.
8039         * gimplify.c (warn_implicit_fallthrough_r): Likewise.
8040         (gimplify_va_arg_expr): Likewise.
8041         * hsa-gen.c (HSA_SORRY_ATV): Likewise.
8042         (HSA_SORRY_AT): Likewise.
8043         * ipa-devirt.c (compare_virtual_tables): Likewise.
8044         (warn_odr): Likewise.
8045         * multiple_target.c (expand_target_clones): Likewise.
8046         * opts-common.c (cmdline_handle_error): Likewise.
8047         * reginfo.c (globalize_reg): Likewise.
8048         * substring-locations.c (format_warning_n_va): Likewise.
8049         * tree-inline.c (expand_call_inline): Likewise.
8050         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Likewise.
8051         * tree-ssa-loop-niter.c
8052         (do_warn_aggressive_loop_optimizations): Likewise.
8053         * tree-ssa-uninit.c (warn_uninit): Likewise.
8054         * tree.c (warn_deprecated_use): Likewise.
8056 2018-08-20  H.J. Lu  <hongjiu.lu@intel.com>
8058         PR target/87014
8059         * config/i386/i386.md (eh_return): Always update EH return
8060         address in word_mode.
8062 2018-08-20  Chung-Lin Tang  <cltang@codesourcery.com>
8064         * targhooks.c (std_gimplify_va_arg_expr): Properly handle case of when
8065         TARGET_SPLIT_COMPLEX_ARG is defined.
8067 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8069         * expr.c (store_field): Change gcc_assert to gcc_checking_assert.
8071 2018-08-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8073         PR target/86984
8074         * expr.c (expand_assignment): Assert that bitpos is positive.
8075         (store_field): Likewise
8076         (expand_expr_real_1): Make sure that bitpos is positive.
8077         * config/alpha/alpha.h (CONSTANT_ADDRESS_P): Avoid signed
8078         integer overflow.
8080 2018-08-20  Nathan Sidwell  <nathan@acm.org>
8082         * Makefile.in (CPP_ID_DATA_H): Delete.
8083         (CPP_INTERNAL_H): Don't add it.
8084         (GTFILES): Replace CPP_ID_DATA_H with CPPLIB_H.
8085         * gengtype.c (open_base_files): Replace cpp-id-data.h with cpplib.h
8087 2018-08-20  Richard Biener  <rguenther@suse.de>
8089         PR tree-optimization/78655
8090         * tree-vrp.c (extract_range_from_binary_expr_1): Make
8091         pointer + offset nonnull if either operand is nonnull work.
8093 2018-08-20  Tom de Vries  <tdevries@suse.de>
8095         * dwarf2out.c (add_scalar_info): Don't add reference to existing die
8096         unless the referenced die describes the added property using
8097         DW_AT_location or DW_AT_const_value.  Fall back to exprloc case.
8098         Otherwise, add a DW_AT_location to the referenced die.
8100 2018-08-19  Uros Bizjak  <ubizjak@gmail.com>
8102         PR target/86994
8103         * config/i386/i386.c (ix86_rtx_costs) [case SET]: Check source for
8104         register_operand when calling ix86_set_reg_reg_cost.
8105         [case CONST_INT, case CONST, case LABEL_REF, case SYMBOL_REF]:
8106         Set *total to 0 for operands that satisfy x86_64_immediate_operand
8107         predicate and to 1 otherwise.
8109 2018-08-18  Iain Sandoe  <iain@sandoe.co.uk>
8111         * config/darwin.c (darwin_override_options): If -gsplit-dwarf is set,
8112         emit a diagnostic that it is not supported and reset the option.
8113         * config/darwin.h (DRIVER_SELF_SPECS): Note that gsplit-dwarf is not
8114         supported and consume the option.  (ASM_FINAL_SPEC): New.
8116 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
8118         * doc/md.texi (Patterns): Use @ref instead of @xref in the middle of
8119         a sentence.
8121 2018-08-17  Sandra Loosemore  <sandra@codesourcery.com>
8123         C-SKY port: Documentation
8125         * doc/extend.texi (C-SKY Function Attributes): New section.
8126         * doc/invoke.texi (Option Summary): Add C-SKY options.
8127         (C-SKY Options): New section.
8128         * doc/md.texi (Machine Constraints): Document C-SKY constraints.
8130 2018-08-17  Jojo  <jijie_rong@c-sky.com>
8131             Huibin Wang  <huibin_wang@c-sky.com>
8132             Sandra Loosemore  <sandra@codesourcery.com>
8133             Chung-Lin Tang  <cltang@codesourcery.com>
8135         C-SKY port: Backend implementation
8137         * config/csky/*: New.
8138         * common/config/csky/*: New.
8140 2018-08-17  Jojo  <jijie_rong@c-sky.com>
8141             Huibin Wang  <huibin_wang@c-sky.com>
8142             Sandra Loosemore  <sandra@codesourcery.com>
8143             Chung-Lin Tang  <cltang@codesourcery.com>
8144             Andrew Jenner  <andrew@codesourcery.com>
8146         C-SKY port: Configury
8148         * config.gcc (csky-*-*): New.
8149         * configure.ac: Add csky to targets for dwarf2 debug_line support.
8150         * configure: Regenerated.
8152 2018-08-17  David Malcolm  <dmalcolm@redhat.com>
8154         * dump-context.h: Include "dumpfile.h".
8155         (dump_context::dump_printf_va): Convert final param from va_list
8156         to va_list *.  Convert from ATTRIBUTE_PRINTF to
8157         ATTRIBUTE_GCC_DUMP_PRINTF.
8158         (dump_context::dump_printf_loc_va): Likewise.
8159         * dumpfile.c: Include "stringpool.h".
8160         (make_item_for_dump_printf_va): Delete.
8161         (make_item_for_dump_printf): Delete.
8162         (class dump_pretty_printer): New class.
8163         (dump_pretty_printer::dump_pretty_printer): New ctor.
8164         (dump_pretty_printer::emit_items): New member function.
8165         (dump_pretty_printer::emit_any_pending_textual_chunks): New member
8166         function.
8167         (dump_pretty_printer::emit_item): New member function.
8168         (dump_pretty_printer::stash_item): New member function.
8169         (dump_pretty_printer::format_decoder_cb): New member function.
8170         (dump_pretty_printer::decode_format): New member function.
8171         (dump_context::dump_printf_va): Reimplement in terms of
8172         dump_pretty_printer.
8173         (dump_context::dump_printf_loc_va): Convert final param from va_list
8174         to va_list *.
8175         (dump_context::begin_scope): Reimplement call to
8176         make_item_for_dump_printf.
8177         (dump_printf): Update for change to dump_printf_va.
8178         (dump_printf_loc): Likewise.
8179         (selftest::test_capture_of_dump_calls): Convert "stmt" from
8180         greturn * to gimple *.  Add a test_decl.  Add tests of dump_printf
8181         with %T, %E, and %G.
8182         * dumpfile.h (ATTRIBUTE_GCC_DUMP_PRINTF): New macro.
8183         (dump_printf): Replace ATTRIBUTE_PRINTF_2 with
8184         ATTRIBUTE_GCC_DUMP_PRINTF (2, 3).
8185         (dump_printf_loc): Replace ATTRIBUTE_PRINTF_3 with
8186         ATTRIBUTE_GCC_DUMP_PRINTF (3, 0).
8187         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Convert
8188         use of HOST_WIDE_INT_PRINT_DEC on unsigned HOST_WIDE_INT "count"
8189         within a dump_printf_loc call to "%wu".
8190         (vector_alignment_reachable_p): Merge two dump_printf[_loc] calls,
8191         converting a use of HOST_WIDE_INT_PRINT_DEC to "%wd".  Add a
8192         missing space after "=".
8193         * tree-vect-loop.c (vect_analyze_loop_2) Within a dump_printf
8194         call, convert use of HOST_WIDE_INT_PRINT_DEC to "%wd".
8195         * tree-vect-slp.c (vect_slp_bb): Within a dump_printf_loc call,
8196         convert use of HOST_WIDE_INT_PRINT_UNSIGNED to "%wu".
8197         * tree-vectorizer.c (try_vectorize_loop_1): Likewise.  Remove
8198         duplicate "vectorized" from message.
8200 2018-08-17  Szabolcs Nagy  <szabolcs.nagy@arm.com>
8202         * config/arm/arm-builtins.c (arm_init_simd_builtin_types): Clear
8203         polyNxK_t element's TYPE_STRING_FLAG.
8205 2018-08-17  Segher Boessenkool  <segher@kernel.crashing.org>
8207         * config/rs6000/rs6000.md (*cbranch, *creturn): Name these patterns
8208         (they were unnamed before).  Fix comments.
8210 2018-08-17  Nathan Sidwell  <nathan@acm.org>
8212         * cppbuiltin.c: Include "cpplib.h", not "cpp-id-data.h".
8214 2018-08-17  Richard Biener  <rguenther@suse.de>
8216         PR tree-optimization/86841
8217         * wide-int-range.cc (wide_int_range_lshift): Use to_uhwi.
8219 2018-08-17  Martin Liska  <mliska@suse.cz>
8221         * common.opt: Remove Warn, Init and Report for options with
8222         Ignore/Deprecated flag. Warning is done automatically for
8223         Deprecated flags.
8224         * config/i386/i386.opt: Likewise.
8225         * config/ia64/ia64.opt: Likewise.
8226         * config/rs6000/rs6000.opt: Likewise.
8227         * cppbuiltin.c (define_builtin_macros_for_compilation_flags):
8228         Remove usage of flag_check_pointer_bounds.
8229         * lto-wrapper.c (merge_and_complain): Do not handle
8230         OPT_fcheck_pointer_bounds.
8231         (append_compiler_options): Likewise.
8232         * opt-functions.awk: Do not handle Deprecated.
8233         * optc-gen.awk: Check that Var, Report and Init are not
8234         used for an option with Ignore/Deprecated flag.
8235         * opts-common.c (decode_cmdline_option): Do not report
8236         CL_ERR_DEPRECATED.
8237         (read_cmdline_option): Report warning for OPT_SPECIAL_deprecated
8238         options.
8239         * opts.h (struct cl_option): Remove cl_deprecated flag.
8240         (CL_ERR_DEPRECATED): Remove error enum value.
8242 2018-08-17  Richard Biener  <rguenther@suse.de>
8244         PR middle-end/86505
8245         * tree-inline.c (copy_bb): When inlining __builtin_va_arg_pack_len ()
8246         across a va-arg-pack using call adjust its return value accordingly.
8248 2018-08-16  Martin Sebor  <msebor@redhat.com>
8250         PR tree-optimization/86853
8251         * gimple-ssa-sprintf.c (struct format_result): Rename member.
8252         (struct fmtresult): Add member and initialize it in ctors.
8253         (format_character): Handle %C.  Extend range to NUL.  Set MAYFAIL.
8254         (format_string): Handle %S the same as %ls.  Set MAYFAIL.
8255         (format_directive): Set POSUNDER4K when MAYFAIL is set.
8256         (parse_directive): Handle %C same as %c.
8257         (sprintf_dom_walker::compute_format_length): Adjust.
8258         (is_call_safe): Adjust.
8260 2018-08-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
8262         * builtins.c (c_strlen): Add new parameter eltsize.  Use it
8263         for determining how to count the elements.
8264         * builtins.h (c_strlen): Adjust prototype.
8265         * expr.c (string_constant): Add new parameter mem_size.
8266         Set *mem_size appropriately.
8267         * expr.h (string_constant): Adjust protoype.
8268         * gimple-fold.c (get_range_strlen): Add new parameter eltsize.
8269         * gimple-fold.h (get_range_strlen): Adjust prototype.
8270         * gimple-ssa-sprintf.c (get_string_length): Add new parameter eltsize.
8271         (format_string): Call get_string_length with eltsize.
8273 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
8275         * diagnostic.c (default_diagnostic_start_span_fn): Call pp_string
8276         to emit the span, rather than setting it as the prefix.
8278 2018-08-16  David Malcolm  <dmalcolm@redhat.com>
8280         * diagnostic-show-locus.c (layout::start_annotation_line): Add
8281         "margin_char" parameter, defaulting to space.  Use it in place
8282         of pp_space for the initial part of the margin.
8283         (layout::print_leading_fixits): Use '+' when filling the margin
8284         of line-insertion fix-it hints.
8286 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
8288         * config/rs6000/rs6000.md (two unnamed define_insn and define_split):
8289         Delete.
8291 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
8293         * config/rs6000/altivec.md: Don't set length attribute to the default
8294         value.
8295         * config/rs6000/darwin.md: Ditto.
8296         * config/rs6000/dfp.md: Ditto.
8297         * config/rs6000/htm.md: Ditto.
8298         * config/rs6000/rs6000.md: Ditto.
8299         * config/rs6000/sync.md: Ditto.
8300         * config/rs6000/vsx.md: Ditto.
8302 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
8304         * config/rs6000/altivec.md: Don't set length attribute to the default
8305         value, for branch instructions.
8306         * config/rs6000/darwin.md: Ditto.
8307         * config/rs6000/rs6000.md: Ditto.
8309 2018-08-16  Segher Boessenkool  <segher@kernel.crashing.org>
8311         * config/rs6000/rs6000.md (length): Always define as const_int 4.
8312         (unnamed conditional branch define_insn): Set length to 4 or 8
8313         depending on offset.
8314         (<bd>_<mode>): Similar, for alternative 0.
8315         (<bd>tf_<mode>): Ditto.
8317 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
8319         * expr.c (copy_blkmode_to_reg): Perform larger copies when safe.
8321 2018-08-16  Matthew Malcomson  <matthew.malcomson@arm.com>
8323         * doc/rtl.texi: Replace old RTX class names with new names.
8326 2018-08-16  Vlad Lazar  <vlad.lazar@arm.com>
8328         * expmed.h (canonicalize_comparison): New declaration.
8329         * expmed.c (canonicalize_comparison, equivalent_cmp_code): New function.
8330         * expmed.c (emit_store_flag_1): Add call to canonicalize_comparison.
8331         * optabs.c (prepare_cmp_insn): Likewise.
8332         * rtl.h (unsigned_condition_p): New function which checks if a
8333         comparison operator is unsigned.
8335 2018-08-16  Nathan Sidwell  <nathan@acm.org>
8337         * config/rs6000/rs6000-c.c (rs6000_macro_to_expend): Use cpp_macro_p.
8338         * config/powerpcspc/powerpcspe-c.c (rs6000_macro_to_expend): Likewise.
8340 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
8342         PR target/84711
8343         * config/arm/arm.c (arm_can_change_mode_class): Disallow subreg.
8344         * config/arm/neon.md (movv4hf, movv8hf): Refactored to..
8345         (mov<mov>): ..this and enable unconditionally.
8347 2018-08-16  Tamar Christina  <tamar.christina@arm.com>
8349         * config/arm/neon.md (*neon_mov<mode>): Remove reg-to-reg alternative.
8351 2018-08-16  Sam Tebbs  <sam.tebbs@arm.com>
8353         * config/aarch64/aarch64.opt (mlow-precision-recip-sqrt)
8354         (mlow-precision-sqrt, mlow-precision-div, mverbose-cost-dump): Replace
8355         "Common" with "Target".
8357 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
8359         * config/i386/i386.opt (mmitigate-rop): Mark as deprecated.
8360         * doc/invoke.texi (mmitigate-rop): Remove.
8361         * config/i386/i386.c: Do not include "regrename.h".
8362         (ix86_rop_should_change_byte_p, reg_encoded_number)
8363         (ix86_get_modrm_for_rop, set_rop_modrm_reg_bits, ix86_mitigate_rop):
8364         Remove.
8365         (ix86_reorg): Remove call to ix86_mitigate_rop.
8366         * config/i386/i386.md (attr "modrm_class"): Remove.
8367         (cmp<mode>_ccno_1, mov<mode>_xor, movstrict<mode>_xor)
8368         (x86_mov<mode>cc_0_m1. x86_mov<mode>cc_0_m1_se)
8369         (x86_mov<mode>cc_0_m1_neg): Remove modrm_class attribute override.
8371 2018-08-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
8373         * config/rs6000/rs600.c (rs6000_gimple_fold_builtin): Add entries to
8374         allow folding of mergeh() and mergel() for the float and double types.
8375         (fold_mergehl_helper): Rework to handle building a permute tree
8376         for float vectors.
8378 2018-08-15  Uros Bizjak  <ubizjak@gmail.com>
8380         * config/i386/i386.c (expand_vec_perm_movs): Enable V4SFmode
8381         for TARGET_SSE.
8383 2018-08-15  David Malcolm  <dmalcolm@redhat.com>
8385         * common.opt (fdiagnostics-show-labels): New option.
8386         * diagnostic-show-locus.c (class layout_range): Add field
8387         "m_label".
8388         (class layout): Add field "m_show_labels_p".
8389         (layout_range::layout_range): Add param "label" and use it to
8390         initialize m_label.
8391         (make_range): Pass in NULL for new "label" param of layout_range's
8392         ctor.
8393         (layout::layout): Initialize m_show_labels_p.
8394         (layout::maybe_add_location_range): Pass in loc_range->m_label
8395         when constructing layout_range instances.
8396         (struct line_label): New struct.
8397         (layout::print_any_labels): New member function.
8398         (layout::print_line): Call it if label-printing is enabled.
8399         (selftest::test_one_liner_labels): New test.
8400         (selftest::test_diagnostic_show_locus_one_liner): Call it.
8401         * diagnostic.c (diagnostic_initialize): Initialize
8402         context->show_labels_p.
8403         * diagnostic.h (struct diagnostic_context): Add field
8404         "show_labels_p".
8405         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
8406         -fno-diagnostics-show-labels.
8407         * dwarf2out.c (gen_producer_string): Add
8408         OPT_fdiagnostics_show_labels to the ignored options.
8409         * gcc-rich-location.c (gcc_rich_location::add_expr): Add "label"
8410         param.
8411         (gcc_rich_location::maybe_add_expr): Likewise.
8412         * gcc-rich-location.h (gcc_rich_location::gcc_rich_location): Add
8413         label" param, defaulting to NULL.
8414         (gcc_rich_location::add_expr): Add "label" param.
8415         (gcc_rich_location::maybe_add_expr): Likewise.
8416         (class text_range_label): New class.
8417         (class range_label_for_type_mismatch): New class.
8418         * gimple-ssa-sprintf.c (fmtwarn): Pass NULL for new label params
8419         of format_warning_va.
8420         (fmtwarn_n): Likewise for new params of format_warning_n_va.
8421         * lto-wrapper.c (merge_and_complain): Add
8422         OPT_fdiagnostics_show_labels to the "pick one setting" options.
8423         (append_compiler_options): Likewise to the dropped options.
8424         (append_diag_options): Likewise to the passed-on options.
8425         * opts.c (common_handle_option): Handle the new option.
8426         * selftest-diagnostic.c
8427         (test_diagnostic_context::test_diagnostic_context): Enable
8428         show_labels_p.
8429         * substring-locations.c: Include "gcc-rich-location.h".
8430         (format_warning_n_va): Add "fmt_label" and "param_label" params
8431         and use them as appropriate.
8432         (format_warning_va): Add "fmt_label" and "param_label" params,
8433         passing them on to format_warning_n_va.
8434         (format_warning_at_substring): Likewise.
8435         (format_warning_at_substring_n): Likewise.
8436         * substring-locations.h (format_warning_va): Add "fmt_label" and
8437         "param_label" params.
8438         (format_warning_n_va): Likewise.
8439         (format_warning_at_substring): Likewise.
8440         (format_warning_at_substring_n): Likewise.
8441         * toplev.c (general_init): Initialize global_dc->show_labels_p.
8443 2018-08-15  Qing Zhao  <qing.zhao@oracle.com>
8445         PR testsuite/86519
8446         * builtins.c (expand_builtin_memcmp): Do not expand the call
8447         when overflow is detected.
8449 2018-08-15  Martin Sebor  <msebor@redhat.com>
8451         PR tree-optimization/71625
8452         * config/aarch64/aarch64-builtins.c
8453         (aarch64_init_simd_builtin_types): Clear Poly8_t's TYPE_STRING_FLAG.
8455 2018-08-15  Ilya Leoshkevich  <iii@linux.ibm.com>
8457         * config/s390/s390.c (s390_reorg): Remove loop.
8459 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
8461         * config/darwin.c
8462          (darwin_function_switched_text_sections): Delete.
8463         * gcc/config/darwin.h
8464          (TARGET_ASM_FUNCTION_SWITCHED_TEXT_SECTIONS): Likewise.
8466 2018-08-15  Iain Sandoe  <iain@sandoe.co.uk>
8468         PR target/81685
8469         * config/darwin.h: (DEBUG_STR_OFFSETS_SECTION, DEBUG_LOCLISTS_SECTION,
8470         DEBUG_RNGLISTS_SECTION) new macros.  (DEBUG_PUBNAMES_SECTION,
8471         DEBUG_PUBTYPES_SECTION) update to include GNU variant.
8473 2018-08-15  Martin Liska  <mliska@suse.cz>
8475         PR tree-optimization/86925
8476         * predict.c (expr_expected_value_1): When taking
8477         later predictor, assign also probability.
8478         Use fold_build2_initializer_loc in order to fold
8479         the expression in -frounding-math.
8481 2018-08-14  Allan Sandfeld Jensen <allan.jensen@qt.io>
8483         * config/i386/i386.c (expand_vec_perm_movs): New method matching movs
8484         patterns.
8485         (expand_vec_perm_1): Try the new method.
8487 2018-08-14  Ilya Leoshkevich  <iii@linux.ibm.com>
8489         PR target/86547
8490         * lra-lives.c (remove_some_program_points_and_update_live_ranges):
8491         Check whether lra_live_max_point is 0 before dividing.
8493 2018-08-14  Martin Sebor  <msebor@redhat.com>
8495         PR tree-optimization/86650
8496         * tree-vrp.c (vrp_prop::check_array_ref): Print an inform message.
8497         (vrp_prop::check_mem_ref): Same.
8499 2018-08-13  Liu Hao <lh_mouse@126.com>
8501         * pretty-print.c (eat_esc_sequence): Swap the foreground and
8502         background colors if the COMMON_LVB_REVERSE_VIDEO flag is set,
8503         and clear it thereafter, as it only works for DBCS.
8505 2018-08-13  Liu Hao <lh_mouse@126.com>
8507         * pretty-print.c (mingw_ansi_fputs): Do not call _close() on the
8508         handle returned by _get_osf_handle().
8510 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
8512         * gcc/config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support
8513         for folding vec_perm.
8515 2018-08-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
8517         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin):
8518         Add support for gimple-folding of vec_pack() and vec_unpack()
8519         intrinsics.
8521 2018-08-13  Will Schmidt <will_schmidt@vnet.ibm.com>
8523         * config/rs6000/rs6000.c (rs6000_builtin_valid_without_lhs): Add
8524         vec_xst variants to the list.
8525         (rs6000_gimple_fold_builtin): Add support for folding unaligned
8526         vector loads and stores.
8528 2018-08-13  David Edelsohn  <dje.gcc@gmail.com>
8530         * config.gcc (rs6000-ibm-aix4.x): Delete.
8531         (rs6000-ibm-aix5.1): Delete.
8532         (rs6000-ibm-aix5.2): Delete.
8533         (rs6000-ibm-aix5.3): Delete.
8534         * config/rs6000/aix43.h: Delete.
8535         * config/rs6000/aix51.h: Delete.
8536         * config/rs6000/aix52.h: Delete.
8537         * config/rs6000/t-aix43: Delete.
8539 2018-08-13  Ilya Leoshkevich  <iii@linux.ibm.com>
8541         * config/s390/s390.c (s390_decompose_constant_pool_ref):
8542         New function.
8543         (s390_decompose_address): Factor out constant pool ref
8544         decomposition.
8546 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
8548         * config/nds32/nds32-predicates.c
8549         (nds32_can_use_bclr_p): Change return type as bool.
8550         (nds32_can_use_bset_p): Ditto.
8551         (nds32_can_use_btgl_p): Ditto.
8552         (nds32_can_use_bitci_p): Ditto.
8553         * config/nds32/nds32-protos.h
8554         (nds32_can_use_bclr_p): Change declaration.
8555         (nds32_can_use_bset_p): Ditto.
8556         (nds32_can_use_btgl_p): Ditto.
8557         (nds32_can_use_bitci_p): Ditto.
8559 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
8561         * config/nds32/nds32.c (nds32_expand_prologue, nds32_expand_epilogue):
8562         Support -msched-prolog-epilog option.
8563         * config/nds32/nds32.opt (msched-prolog-epilog): New option.
8565 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
8567         * common/config/nds32/nds32-common.c
8568         (nds32_option_optimization_table): Enalbe -malways-align.
8570 2018-08-12  Chung-Ju Wu  <jasonwucj@gmail.com>
8572         * config.gcc (nds32*): Add nds32_isr.h and nds32_init.inc in
8573         extra_headers.
8574         * common/config/nds32/nds32-common.c (nds32_handle_option): Handle
8575         OPT_misr_secure_ case.
8576         * config/nds32/nds32-isr.c: Implementation of backward compatibility.
8577         * config/nds32/nds32-protos.h (nds32_isr_function_critical_p): New.
8578         * config/nds32/nds32.c (nds32_attribute_table): Add critical and
8579         secure attribute.
8580         * config/nds32/nds32.h (nds32_isr_nested_type): Add NDS32_CRITICAL.
8581         (nds32_isr_info): New field security_level.
8582         (TARGET_ISR_VECTOR_SIZE_4_BYTE): New macro.
8583         * config/nds32/nds32.md (return_internal): Consider critical attribute.
8584         * config/nds32/nds32.opt (misr-secure): New option.
8585         * config/nds32/nds32_init.inc: New file.
8586         * config/nds32/nds32_isr.h: New file.
8588 2018-08-11  John David Anglin  <danglin@gcc.gnu.org>
8590         * config/pa/pa.md (UNSPEC_MEMORY_BARRIER): New unspec enum.
8591         Update comment for atomic instructions.
8592         (atomic_storeqi, atomic_storehi, atomic_storesi, atomic_storesf,
8593         atomic_loaddf, atomic_loaddf_1, atomic_storedf, atomic_storedf_1):
8594         Remove.
8595         (atomic_loaddi): Revise fence expansion to only emit fence prior to
8596         load for __ATOMIC_SEQ_CST model.
8597         (atomic_loaddi_1): Remove float register target.
8598         (atomic_storedi): Handle CONST_INT values.
8599         (atomic_storedi_1): Remove float register source.  Add special case
8600         for zero value.
8601         (memory_barrier): New expander and insn.
8603 2018-08-11  Jakub Jelinek  <jakub@redhat.com>
8605         PR tree-optimization/86835
8606         * tree-ssa-math-opts.c (insert_reciprocals): Even when inserting
8607         new_stmt after def_gsi, make sure to insert new_square_stmt after
8608         that stmt, not 2 stmts before it.
8610 2018-08-10  Alexander Monakov  <amonakov@ispras.ru>
8612         PR target/82418
8613         * config/i386/i386.md (<s>mul<mode>3_highpart): Use DWIH mode iterator
8614         instead of SWI48.
8616 2018-08-10  Martin Liska  <mliska@suse.cz>
8618         PR target/83610
8619         * builtin-types.def (BT_FN_LONG_LONG_LONG_DOUBLE): Add new
8620         function type.
8621         * builtins.c (expand_builtin_expect_with_probability):
8622         New function.
8623         (expand_builtin_expect_with_probability): New function.
8624         (build_builtin_expect_predicate): Add new argumnet probability
8625         for BUILT_IN_EXPECT_WITH_PROBABILITY.
8626         (fold_builtin_expect):
8627         (fold_builtin_2):
8628         (fold_builtin_3):
8629         * builtins.def (BUILT_IN_EXPECT_WITH_PROBABILITY):
8630         * builtins.h (fold_builtin_expect): Set new argument.
8631         * doc/extend.texi: Document __builtin_expect_with_probability.
8632         * doc/invoke.texi: Likewise.
8633         * gimple-fold.c (gimple_fold_call): Pass new argument.
8634         * ipa-fnsummary.c (find_foldable_builtin_expect): Handle
8635         also BUILT_IN_EXPECT_WITH_PROBABILITY.
8636         * predict.c (get_predictor_value): New function.
8637         (expr_expected_value): Add new argument probability. Assume
8638         that predictor and probability are always non-null.
8639         (expr_expected_value_1): Likewise.  For __builtin_expect and
8640         __builtin_expect_with_probability set probability.  Handle
8641         combination in binary expressions.
8642         (tree_predict_by_opcode): Simplify code by simply calling
8643         get_predictor_value.
8644         (pass_strip_predict_hints::execute): Add handling of
8645         BUILT_IN_EXPECT_WITH_PROBABILITY.
8646         * predict.def (PRED_BUILTIN_EXPECT_WITH_PROBABILITY): Add
8647         new predictor.
8648         * tree.h (DECL_BUILT_IN_P): New function.
8650 2018-08-10  Martin Liska  <mliska@suse.cz>
8652         PR tree-optimization/85799
8653         * passes.def: Add argument for pass_strip_predict_hints.
8654         * predict.c (class pass_strip_predict_hints): Add new argument
8655         early_p.
8656         (strip_predictor_early): New function.
8657         (pass_strip_predict_hints::execute): Call the function to
8658         strip predictors.
8659         (strip_predict_hints): New function.
8660         * predict.def: Fix comment.
8662 2018-08-10  Thomas Preud'homme  <thomas.preudhomme@linaro.org>
8664         * Makefile.in: Clarify which tm.texi to copy over to assert the
8665         right to grant a GFDL license for all.
8667 2018-08-09  Jeff Law  <law@redhat.com>
8669         * config/m68k/m68k.c (m68k_adjust_decorated_operand): Remove
8670         unused variable.
8672 2018-08-09  Andreas Schwab  <schwab@linux-m68k.org>
8674         * config/m68k/m68k-protos.h (m68k_final_prescan_insn): Remove
8675         prototype.
8677 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
8679         * tree-vect-loop.c (vectorizable_reduction): Allow inner-loop
8680         reductions for variable-length vectors.
8682 2018-08-09  David Malcolm  <dmalcolm@redhat.com>
8684         PR other/84889
8685         * common.opt (fdiagnostics-show-line-numbers): New option.
8686         * diagnostic-show-locus.c (class layout): Add fields
8687         "m_show_line_numbers_p" and "m_linenum_width";
8688         (num_digits): New function.
8689         (test_num_digits): New function.
8690         (layout::layout): Initialize new fields.  Update m_x_offset
8691         logic to handle any left margin.
8692         (layout::print_source_line): Print line number when requested.
8693         (layout::start_annotation_line): New member function.
8694         (layout::print_annotation_line): Call it.
8695         (layout::print_leading_fixits): Likewise.
8696         (layout::print_trailing_fixits): Likewise.  Update calls to
8697         move_to_column for new parameter.
8698         (layout::get_x_bound_for_row): Add "add_left_margin" param and use
8699         it to potentially call start_annotation_line.
8700         (layout::show_ruler): Call start_annotation_line.
8701         (selftest::test_line_numbers_multiline_range): New selftest.
8702         (selftest::diagnostic_show_locus_c_tests): Call test_num_digits
8703         and selftest::test_line_numbers_multiline_range.
8704         * diagnostic.c (diagnostic_initialize): Initialize
8705         show_line_numbers_p.
8706         * diagnostic.h (struct diagnostic_context): Add field
8707         "show_line_numbers_p".
8708         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
8709         -fno-diagnostics-show-line-numbers.
8710         * dwarf2out.c (gen_producer_string): Add
8711         OPT_fdiagnostics_show_line_numbers to the ignored options.
8712         * lto-wrapper.c (merge_and_complain): Likewise to the "pick
8713         one setting" options.
8714         (append_compiler_options): Likewise to the dropped options.
8715         (append_diag_options): Likewise to the passed-on options.
8716         * opts.c (common_handle_option): Handle the new option.
8717         * toplev.c (general_init): Set up global_dc->show_line_numbers_p.
8719 2018-08-09  Kelvin Nilsen  <kelvin@gcc.gnu.org>
8721         * doc/extend.texi (PowerPC AltiVec Built-in Functions Available on
8722         ISA 2.07): Correct spelling of bcdsub to be __builtin_bcdsub.  Add
8723         third argument of type "const signed char" to descriptions of
8724         __builtin_bcdadd, __builtin_bcdadd_lt, __builtin_bcdadd_eq,
8725         __builtin_bcdadd_gt, __builtin_bcdadd_ov, __builtin_bcdsub,
8726         __builtin_bcdsub_lt, __builtin_bcdsub_eq, __builtin_bcdsub_gt,
8727         __builtin_bcdsub_ov functions.
8729 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
8731         PR tree-optimization/86858
8732         * tree-vect-loop.c (vect_is_simple_reduction): Restore
8733         flow_bb_inside_loop_p calls.
8735 2018-08-09  Richard Sandiford  <richard.sandiford@arm.com>
8737         PR tree-optimization/86871
8738         * tree-vect-stmts.c (vect_transform_stmt): Use gimple_get_lhs
8739         instead of gimple_assign_lhs.
8741 2018-08-09  Richard Earnshaw  <rearnsha@arm.com>
8743         PR target/86887
8744         * config/aarch64/aarch64.md (add<mode>3_carryinC_zero): Add missing
8745         register constraint to operand 0.
8746         (add<mode>3_carryinC): Likewise.
8747         (add<mode>3_carryinV_zero, add<mode>3_carryinV): Likewise.
8749 2018-08-09  Martin Liska  <mliska@suse.cz>
8751         PR c/86895
8752         * common.opt: Remove extra line.
8754 2018-08-09  Martin Liska  <mliska@suse.cz>
8756         * params.def (PARAM_ALIGN_LOOP_ITERATIONS): Remove double dots
8757         at the end of a line, make first letter capital and end up
8758         a sentence with a dot.
8759         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): Likewise.
8760         (PARAM_LOOP_BLOCK_TILE_SIZE): Likewise.
8761         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Likewise.
8762         (PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP): Likewise.
8763         (PARAM_MAX_ISL_OPERATIONS): Likewise.
8764         (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): Likewise.
8765         (PARAM_PROFILE_FUNC_INTERNAL_ID): Likewise.
8766         (PARAM_INDIR_CALL_TOPN_PROFILE): Likewise.
8767         (PARAM_SLP_MAX_INSNS_IN_BB): Likewise.
8768         (PARAM_IPA_CP_EVAL_THRESHOLD): Likewise.
8769         (PARAM_IPA_CP_RECURSION_PENALTY): Likewise.
8770         (PARAM_IPA_CP_SINGLE_CALL_PENALTY): Likewise.
8771         (PARAM_IPA_CP_LOOP_HINT_BONUS): Likewise.
8772         (PARAM_IPA_CP_ARRAY_INDEX_HINT_BONUS): Likewise.
8773         (PARAM_TREE_REASSOC_WIDTH): Likewise.
8774         (PARAM_HSA_GEN_DEBUG_STORES): Likewise.
8775         (PARAM_MAX_SPECULATIVE_DEVIRT_MAYDEFS): Likewise.
8776         (PARAM_MAX_VRP_SWITCH_ASSERTIONS): Likewise.
8778 2018-08-09  Andreas Krebbel  <krebbel@linux.ibm.com>
8780         PR target/84332
8781         * config/s390/s390.c (s390_option_override_internal): Reduce the
8782         stack-clash-protection-probe-interval param if it would be too big
8783         for z900.
8785 2018-08-08  Andreas Schwab  <schwab@linux-m68k.org>
8787         PR target/46179
8788         * config/m68k/m68k.h (FINAL_PRESCAN_INSN): Don't define.
8789         * config/m68k/m68k.c (handle_move_double): Don't call
8790         m68k_final_prescan_insn.
8791         (m68k_adjust_decorated_operand): Renamed from
8792         m68k_final_prescan_insn, remove first and third operand and
8793         simplify.
8794         (print_operand): Call it.
8795         (print_operand_address): Call it.
8797 2018-08-08  Nathan Sidwell  <nathan@acm.org>
8799         * diagnostic.c (diagnostic_report_current_module): Use
8800         linemap_included_from & linemap_included_from_linemap.
8802 2018-08-08  Hongbo Zhang  <hongbo.zhang@linaro.org>
8804         * config/aarch64/aarch64-cores.def: Add phecda core.
8805         * config/aarch64/aarch64-tune.md: Regenerate.
8806         * doc/invoke.texi: Add phecda core.
8808 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
8810         PR target/85295
8811         * config/s390/constraints.md ("NxHD0", "NxSD0"): New constraint
8812         definitions.
8813         * config/s390/s390.md ("movti"): Add more alternatives for
8814         constant to GPR copies.
8816 2018-08-08  Andreas Krebbel  <krebbel@linux.ibm.com>
8818         * config/s390/s390.c: Fix whitespace damage throughout the file.
8819         * config/s390/s390.h: Likewise.
8820         * config/s390/tpf.h: Likewise.
8822 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
8824         * config/s390/s390.c (s390_loadrelative_operand_p):
8825         Remove TARGET_CPU_ZARCH usages.
8826         (s390_rtx_costs): Likewise.
8827         (s390_legitimate_constant_p): Likewise.
8828         (s390_cannot_force_const_mem): Likewise.
8829         (legitimate_reload_constant_p): Likewise.
8830         (s390_preferred_reload_class): Likewise.
8831         (legitimize_pic_address): Likewise.
8832         (legitimize_tls_address): Likewise.
8833         (s390_split_branches): Removed.
8834         (s390_add_execute): Removed.
8835         (s390_dump_pool): Remove TARGET_CPU_ZARCH usages.
8836         (s390_mainpool_start): Likewise.
8837         (s390_mainpool_finish): Likewise.
8838         (s390_mainpool_cancel): Removed.
8839         (s390_chunkify_start): Remove TARGET_CPU_ZARCH usages.
8840         (s390_chunkify_cancel): Likewise.
8841         (s390_return_addr_rtx): Likewise.
8842         (s390_register_info): Remove split_branches_pending_p uages.
8843         (s390_optimize_register_info): Likewise.
8844         (s390_init_frame_layout): Remove TARGET_CPU_ZARCH and
8845         split_branches_pending_p usages.
8846         (s390_can_eliminate): Remove TARGET_CPU_ZARCH usages.
8847         (s390_load_got): Likewise.
8848         (s390_expand_split_stack_prologue): Likewise.
8849         (output_asm_nops): Likewise.
8850         (s390_function_profiler): Likewise.
8851         (s390_emit_call): Likewise.
8852         (s390_conditional_register_usage): Likewise.
8853         (s390_optimize_prologue): Likewise.
8854         (s390_reorg): Remove TARGET_CPU_ZARCH and
8855         split_branches_pending_p usages.
8856         (s390_option_override_internal): Remove TARGET_CPU_ZARCH
8857         usages.
8858         (s390_output_indirect_thunk_function): Likewise.
8859         * config/s390/s390.h (TARGET_CPU_ZARCH): Removed.
8860         (TARGET_CPU_ZARCH_P): Removed.
8861         (struct machine_function): Remove split_branches_pending_p.
8862         * config/s390/s390.md: Remove TARGET_CPU_ZARCH usages.
8864 2018-08-08  Ilya Leoshkevich  <iii@linux.ibm.com>
8866         * common/config/s390/s390-common.c (processor_flags_table):
8867         Remove flags.
8868         * config.gcc: Remove with_arch/with_tune support.
8869         * config/s390/2064.md: Remove cpu attribute comparisons.
8870         * config/s390/driver-native.c (s390_host_detect_local_cpu):
8871         Remove MTN.
8872         * config/s390/linux.h (ASM_SPEC):
8873         Remove -march support.
8874         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal):
8875         Use a table to get an arch level.
8876         * config/s390/s390-opts.h (enum processor_type):
8877         Remove enum values.
8878         * config/s390/s390.c
8879         (processor_table): Remove entries, add arch_level values.
8880         (s390_issue_rate): Remove cases.
8881         (s390_option_override): Adjust
8882         s390_option_override_internal() call.
8883         (s390_option_override_internal): Remove deprecation warning.
8884         (s390_valid_target_attribute_tree): Adjust
8885         s390_option_override_internal() call.
8886         * config/s390/s390.h (struct s390_processor):
8887         Share with s390-c.c, add arch_level field.
8888         * config/s390/s390.md:
8889         Remove occurrences in cpu attribute.
8890         * config/s390/s390.opt: Remove -march/-mtune support.
8891         * config/s390/tpf.h (ASM_SPEC): Remove -march support.
8892         * doc/invoke.texi: Remove deprecation warning.
8894 2018-08-08  Luis Machado  <luis.machado@linaro.org>
8896         * config/aarch64/aarch64.c (qdf24xx_vector_cost): New static
8897         global.
8898         (qdf24xx_tunings): Set vector cost structure to
8899         qdf24xx_vector_cost.
8901         * config/aarch64/aarch64.c (qdf24xx_addrcost_table)
8902         <register_sextend>: Set to 3.
8904 2018-08-07  Richard Sandiford  <richard.sandiford@arm.com>
8906         PR target/86838
8907         * config/aarch64/iterators.md (FRECP, frecp_suffix): Delete.
8908         * config/aarch64/aarch64-simd.md
8909         (aarch64_frecp<FRECP:frecp_suffix><mode>): Fold FRECPE into...
8910         (@aarch64_frecpe<mode>): ...here and the move FRECPX to...
8911         (aarch64_frecpx<mode>): ...this new pattern.
8912         * config/aarch64/aarch64-simd-builtins.def: Remove comment
8913         about aarch64_frecp<FRECP:frecp_suffix><mode>.
8915 2018-08-07  Martin Liska  <mliska@suse.cz>
8917         PR middle-end/83023
8918         * predict.c (expr_expected_value_1): Handle DECL_IS_MALLOC,
8919         BUILT_IN_REALLOC and DECL_IS_OPERATOR_NEW.
8920         * predict.def (PRED_MALLOC_NONNULL): New predictor.
8921         * doc/extend.texi: Document that malloc attribute adds
8922         hit to compiler.
8924 2018-08-06  John David Anglin  <danglin@gcc.gnu.org>
8926         PR target/86785
8927         * config/pa/pa.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8928         Define to speculation_safe_value_not_needed.
8930 2018-08-06  Jeff Law  <law@redhat.com>
8932         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Pass down
8933         the vr_values instance to cprop_into_stmt.
8934         (cprop_into_stmt): Pass vr_values instance down to cprop_operand.
8935         (cprop_operand): Also query EVRP to determine if OP is a constant.
8937 2018-08-06  Nathan Sidwell  <nathan@acm.org>
8939         * diagnostic.c (diagnostic_report_current_module): Reroll
8940         included-at loop.  Translate text.
8942 2018-08-06  David Malcolm  <dmalcolm@redhat.com>
8944         * function-tests.c (selftest::test_expansion_to_rtl): Call
8945         free_after_compilation.
8947 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
8949         * config/aarch64/aarch64.md: Add clobber highs to tls_desc.
8951 2018-08-06  Andreas Krebbel  <krebbel@linux.ibm.com>
8953         * config/s390/s390.c (s390_loop_unroll_adjust): Prevent small
8954         loops with memory block operations from getting unrolled.
8956 2018-08-06  Ulrich Weigand  <uweigand@de.ibm.com>
8958         PR target/86807
8959         * config/spu/spu.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
8960         Define to speculation_safe_value_not_needed.
8962 2018-08-06  Jeff Law  <law@redhat.com>
8964         * reload1.c (forget_old_reloads_1): Adjust CLOBBER_HIGH
8965         assert.
8967 2018-08-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
8969         PR target/86662
8970         * gcc/tree.c (build_common_tree_nodes): Initialize integer_types array
8971         with all enabled __intN types.
8973         * gcc/testsuite/gcc.target/msp430/pr86662.c: New test.
8975 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
8977         * alias.c (record_set): Check for clobber high.
8978         * cfgexpand.c (expand_gimple_stmt): Likewise.
8979         * combine-stack-adj.c (single_set_for_csa): Likewise.
8980         * combine.c (find_single_use_1): Likewise.
8981         (set_nonzero_bits_and_sign_copies): Likewise.
8982         (get_combine_src_dest): Likewise.
8983         (is_parallel_of_n_reg_sets): Likewise.
8984         (try_combine): Likewise.
8985         (record_dead_and_set_regs_1): Likewise.
8986         (reg_dead_at_p_1): Likewise.
8987         (reg_dead_at_p): Likewise.
8988         * dce.c (deletable_insn_p): Likewise.
8989         (mark_nonreg_stores_1): Likewise.
8990         (mark_nonreg_stores_2): Likewise.
8991         * df-scan.c (df_find_hard_reg_defs): Likewise.
8992         (df_uses_record): Likewise.
8993         (df_get_call_refs): Likewise.
8994         * dwarf2out.c (mem_loc_descriptor): Likewise.
8995         * haifa-sched.c (haifa_classify_rtx): Likewise.
8996         * ira-build.c (create_insn_allocnos): Likewise.
8997         * ira-costs.c (scan_one_insn): Likewise.
8998         * ira.c (equiv_init_movable_p): Likewise.
8999         (rtx_moveable_p): Likewise.
9000         (interesting_dest_for_shprep): Likewise.
9001         * jump.c (mark_jump_label_1): Likewise.
9002         * postreload-gcse.c (record_opr_changes): Likewise.
9003         * postreload.c (reload_cse_simplify): Likewise.
9004         (struct reg_use): Add source expr.
9005         (reload_combine): Check for clobber high.
9006         (reload_combine_note_use): Likewise.
9007         (reload_cse_move2add): Likewise.
9008         (move2add_note_store): Likewise.
9009         * print-rtl.c (print_pattern): Likewise.
9010         * recog.c (decode_asm_operands): Likewise.
9011         (store_data_bypass_p): Likewise.
9012         (if_test_bypass_p): Likewise.
9013         * regcprop.c (kill_clobbered_value): Likewise.
9014         (kill_set_value): Likewise.
9015         * reginfo.c (reg_scan_mark_refs): Likewise.
9016         * reload1.c (maybe_fix_stack_asms): Likewise.
9017         (eliminate_regs_1): Likewise.
9018         (elimination_effects): Likewise.
9019         (mark_not_eliminable): Likewise.
9020         (scan_paradoxical_subregs): Likewise.
9021         (forget_old_reloads_1): Likewise.
9022         * reorg.c (find_end_label): Likewise.
9023         (try_merge_delay_insns): Likewise.
9024         (redundant_insn): Likewise.
9025         (own_thread_p): Likewise.
9026         (fill_simple_delay_slots): Likewise.
9027         (fill_slots_from_thread): Likewise.
9028         (dbr_schedule): Likewise.
9029         * resource.c (update_live_status): Likewise.
9030         (mark_referenced_resources): Likewise.
9031         (mark_set_resources): Likewise.
9032         * rtl.c (copy_rtx): Likewise.
9033         * rtlanal.c (reg_referenced_p): Likewise.
9034         (single_set_2): Likewise.
9035         (noop_move_p): Likewise.
9036         (note_stores): Likewise.
9037         * sched-deps.c (sched_analyze_reg): Likewise.
9038         (sched_analyze_insn): Likewise.
9040 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9042         * cse.c (invalidate_reg): New function extracted from...
9043         (invalidate): ...here.
9044         (canonicalize_insn): Check for clobber high.
9045         (invalidate_from_clobbers): invalidate clobber highs.
9046         (invalidate_from_sets_and_clobbers): Likewise.
9047         (count_reg_usage): Check for clobber high.
9048         (insn_live_p): Likewise.
9049         * cselib.c (cselib_expand_value_rtx_1):Likewise.
9050         (cselib_invalidate_regno): Check for clobber in setter.
9051         (cselib_invalidate_rtx): Pass through setter.
9052         (cselib_invalidate_rtx_note_stores):
9053         (cselib_process_insn): Check for clobber high.
9054         * cselib.h (cselib_invalidate_rtx): Add operand.
9056 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9058         * lra-eliminations.c (lra_eliminate_regs_1): Check for clobber high.
9059         (mark_not_eliminable): Likewise.
9060         * lra-int.h (struct lra_insn_reg): Add clobber high marker.
9061         * lra-lives.c (process_bb_lives): Check for clobber high.
9062         * lra.c (new_insn_reg): Remember clobber highs.
9063         (collect_non_operand_hard_regs): Check for clobber high.
9064         (lra_set_insn_recog_data): Likewise.
9065         (add_regs_to_insn_regno_info): Likewise.
9066         (lra_update_insn_regno_info): Likewise.
9068 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9070         * rtl.h (reg_is_clobbered_by_clobber_high): Add declarations.
9071         * rtlanal.c (reg_is_clobbered_by_clobber_high): Add function.
9073 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9075         * emit-rtl.c (verify_rtx_sharing): Check for CLOBBER_HIGH.
9076         (copy_insn_1): Likewise.
9077         (gen_hard_reg_clobber_high): New gen function.
9078         * genconfig.c (walk_insn_part): Check for CLOBBER_HIGH.
9079         * genemit.c (gen_exp): Likewise.
9080         (gen_emit_seq): Pass through info.
9081         (gen_insn): Check for CLOBBER_HIGH.
9082         (gen_expand): Pass through info.
9083         (gen_split): Likewise.
9084         (output_add_clobbers): Likewise.
9085         * genrecog.c (validate_pattern): Check for CLOBBER_HIGH.
9086         (remove_clobbers): Likewise.
9087         * rtl.h (gen_hard_reg_clobber_high): New declaration.
9089 2018-08-06  Alan Hayward  <alan.hayward@arm.com>
9091         * doc/rtl.texi (clobber_high): Add.
9092         (parallel): Add in clobber high
9093         * rtl.c (rtl_check_failed_code3): Add function.
9094         * rtl.def (CLOBBER_HIGH): Add expression.
9095         * rtl.h (RTL_CHECKC3): Add macro.
9096         (rtl_check_failed_code3): Add declaration.
9097         (XC3EXP): Add macro.
9099 2018-08-05  H.J. Lu  <hongjiu.lu@intel.com>
9101         PR target/86386
9102         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Set
9103         cfun->machine->max_used_stack_alignment if needed.
9105 2018-08-04  Martin Sebor  <msebor@redhat.com>
9107         PR tree-optimization/86571
9108         * gimple-ssa-sprintf.c (format_floating): Extend upper bound of
9109         NaN output to 4.
9111 2018-08-03  Sandra Loosemore  <sandra@codesourcery.com>
9113         PR target/86799
9114         * config/nios2/nios2.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9115         Define.
9117 2018-08-03  Jeff Law  <law@redhat.com>
9119         PR target/86795
9120         * config/mn10300/mn10300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9121         Define to speculation_safe_value_not_needed.
9123 2018-08-03  David Malcolm  <dmalcolm@redhat.com>
9125         * doc/gcov.texi (-x): Remove duplicate "to".
9126         * doc/invoke.texi (-Wnoexcept-type): Remove duplicate "calls".
9127         (-Wif-not-aligned): Remove duplicate "is".
9128         (-flto): Remove duplicate "the".
9129         (MicroBlaze Options): In examples of "-mcpu=cpu-type", remove
9130         duplicate "v5.00.b".
9131         (MSP430 Options): Remove duplicate "and" from the description
9132         of "-mgprel-sec=regexp".
9133         (x86 Options): Remove duplicate copies of "vmldLog102" and
9134         vmlsLog104 from description of "-mveclibabi=type".
9136 2018-08-03  Richard Sandiford  <richard.sandiford@arm.com>
9138         * internal-fn.h (first_commutative_argument): Declare.
9139         * internal-fn.c (first_commutative_argument): New function.
9140         * tree-vect-slp.c (vect_get_and_check_slp_defs): Remove extra
9141         restrictions for pattern statements.  Use first_commutative_argument
9142         to look for commutative operands in calls to internal functions.
9144 2018-08-03  Aldy Hernandez  <aldyh@redhat.com>
9146         * Makefile.in (wide-int-range.o): New.
9147         * tree-vrp.c: Move all the wide_int_* functions to...
9148         * wide-int-range.cc: ...here.
9149         * tree-vrp.h: Move all the wide_int_* prototypes to...
9150         * wide-int-range.h: ...here.
9152 2018-08-03  Tom de Vries  <tdevries@suse.de>
9154         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): Return
9155         UI_NONE.
9156         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Remove define.
9157         * except.c (output_function_exception_table): Do early exit if
9158         targetm_common.except_unwind_info (&global_options) == UI_NONE.
9160 2018-08-03  Martin Liska  <mliska@suse.cz>
9162         * predict.c (dump_prediction): Change to 2 digits
9163         in fraction part.
9165 2018-08-03  Siddhesh Poyarekar  <siddhesh@sourceware.org>
9167         * config/aarch64/falkor.md (falkor_am_1_vxvy_vxvy): Move
9168         neon_dup_q to...
9169         (falkor_am_1_gtov_gtov): ... a new insn reservation.
9171 2018-07-19  Ilya Leoshkevich  <iii@linux.ibm.com>
9173         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Replace > with >=.
9174         * df-problems.c (df_remove_dead_eq_notes): Replace > with >=.
9175         * dwarf2out.c (mem_loc_descriptor): Replace > with >=.
9176         * lra-constraints.c (spill_hard_reg_in_range): Replace <= with <.
9177         * lra-remat.c (call_used_input_regno_present_p): Replace <= with <.
9179 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
9181         * diagnostic-show-locus.c (diagnostic_show_locus): Use
9182         pp_take_prefix when saving the existing prefix.
9183         * diagnostic.c (diagnostic_append_note): Likewise.
9184         * langhooks.c (lhd_print_error_function): Likewise.
9185         * pretty-print.c (pp_set_prefix): Drop the "const" from "prefix"
9186         param's type.  Free the existing prefix.
9187         (pp_take_prefix): New function.
9188         (pretty_printer::pretty_printer): Drop the prefix parameter.
9189         Rename the length parameter to match the comment.
9190         (pretty_printer::~pretty_printer): Free the prefix.
9191         * pretty-print.h (pretty_printer::pretty_printer): Drop the prefix
9192         parameter.
9193         (struct pretty_printer): Drop the "const" from "prefix" field's
9194         type and clarify memory management.
9195         (pp_set_prefix): Drop the "const" from the 2nd param.
9196         (pp_take_prefix): New decl.
9198 2018-08-02  Aaron Sawdey  <acsawdey@linux.ibm.com>
9200         * config/rs6000/rs6000-string.c (select_block_compare_mode): Move test
9201         for word_mode_ok here instead of passing as argument.
9202         (expand_block_compare): Change select_block_compare_mode() call.
9203         (expand_strncmp_gpr_sequence): New function.
9204         (expand_strn_compare): Make use of expand_strncmp_gpr_sequence.
9206 2018-08-02  Jeff Law  <law@redhat.com>
9208         PR target/86790
9209         * config/m68k/m68k.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9210         Define to speculation_safe_value_not_needed.
9212         PR target/86784
9213         * config/h8300/h8300.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9214         Define to speculation_safe_value_not_needed.
9216 2018-08-02  Tom de Vries  <tdevries@suse.de>
9218         PR target/86660
9219         * common/config/nvptx/nvptx-common.c (nvptx_except_unwind_info): New
9220         function.  Return UI_TARGET unconditionally.
9221         (TARGET_EXCEPT_UNWIND_INFO): Redefine to nvptx_except_unwind_info.
9222         * config/nvptx/nvptx.c (TARGET_ASM_BYTE_OP): Emit commented out '.byte'.
9224 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
9226         * genemit.c (print_overload_test): Fix typo.
9228 2018-08-02  Richard Biener  <rguenther@suse.de>
9230         PR tree-optimization/86816
9231         * tree-ssa-tail-merge.c (tail_merge_valueize): New function
9232         which checks for value availability before querying it.
9233         (gvn_uses_equal): Use it.
9234         (same_succ_hash): Likewise.
9235         (gimple_equal_p): Likewise.
9237 2018-08-02  Nick Clifton  <nickc@redhat.com>
9239         PR target/86813
9240         * config/stormy16/stormy16.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9241         Define to speculation_safe_value_not_needed.
9243         PR target/86810
9244         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9245         Define to speculation_safe_value_not_needed.
9247         PR target/86810
9248         * config/v850/v850.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9249         Define to speculation_safe_value_not_needed.
9251         PR target/86803
9252         * config/rx/rx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9253         Define to speculation_safe_value_not_needed.
9255         PR target/86797
9256         * config/msp430/msp430.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9257         Define to speculation_safe_value_not_needed.
9259         PR target/86791
9260         * config/mcore/mcore.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9261         Define to speculation_safe_value_not_needed.
9263         PR target/86789
9264         * config/m32r/m32r.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9265         Define to speculation_safe_value_not_needed.
9267         PR target/86787
9268         * config/iq2000/iq2000.c (TARGET_HAVE_SPECULATION_SAFE_VALUE):
9269         Define to speculation_safe_value_not_needed.
9271         PR target/86782
9272         * config/frv/frv.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
9273         speculation_safe_value_not_needed.
9275         PR target/86781
9276         * config/fr30/fr30.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define
9277         to speculation_safe_value_not_needed.
9279 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
9281         * doc/md.texi: Expand the documentation of instruction names
9282         to mention port-local uses.  Document '@' in pattern names.
9283         * read-md.h (overloaded_instance, overloaded_name): New structs.
9284         (mapping): Declare.
9285         (md_reader::handle_overloaded_name): New member function.
9286         (md_reader::get_overloads): Likewise.
9287         (md_reader::m_first_overload): New member variable.
9288         (md_reader::m_next_overload_ptr): Likewise.
9289         (md_reader::m_overloads_htab): Likewise.
9290         * read-md.c (md_reader::md_reader): Initialize m_first_overload,
9291         m_next_overload_ptr and m_overloads_htab.
9292         * read-rtl.c (iterator_group): Add "type" and "get_c_token" fields.
9293         (get_mode_token, get_code_token, get_int_token): New functions.
9294         (map_attr_string): Add an optional argument that passes back
9295         the associated iterator.
9296         (overloaded_name_hash, overloaded_name_eq_p, named_rtx_p):
9297         (md_reader::handle_overloaded_name, add_overload_instance): New
9298         functions.
9299         (apply_iterators): Handle '@' names.  Report an error if '@'
9300         is used without iterators.
9301         (initialize_iterators): Initialize the new iterator_group fields.
9302         * genopinit.c (handle_overloaded_code_for)
9303         (handle_overloaded_gen): New functions.
9304         (main): Use them to print declarations of maybe_code_for_* and
9305         maybe_gen_* functions, and inline definitions of code_for_* and gen_*.
9306         * genemit.c (print_overload_arguments, print_overload_test)
9307         (handle_overloaded_code_for, handle_overloaded_gen): New functions.
9308         (main): Use it to print definitions of maybe_code_for_* and
9309         maybe_gen_* functions.
9310         * config/aarch64/aarch64.c (aarch64_split_128bit_move): Use
9311         gen_aarch64_mov{low,high}_di and gen_aarch64_movdi_{low,high}
9312         instead of explicit mode checks.
9313         (aarch64_split_simd_combine): Likewise gen_aarch64_simd_combine.
9314         (aarch64_split_simd_move): Likewise gen_aarch64_split_simd_mov.
9315         (aarch64_emit_load_exclusive): Likewise gen_aarch64_load_exclusive.
9316         (aarch64_emit_store_exclusive): Likewise gen_aarch64_store_exclusive.
9317         (aarch64_expand_compare_and_swap): Likewise
9318         gen_aarch64_compare_and_swap and gen_aarch64_compare_and_swap_lse
9319         (aarch64_gen_atomic_cas): Likewise gen_aarch64_atomic_cas.
9320         (aarch64_emit_atomic_swap): Likewise gen_aarch64_atomic_swp.
9321         (aarch64_constant_pool_reload_icode): Delete.
9322         (aarch64_secondary_reload): Use code_for_aarch64_reload_movcp
9323         instead of aarch64_constant_pool_reload_icode.  Use
9324         code_for_aarch64_reload_mov instead of explicit mode checks.
9325         (rsqrte_type, get_rsqrte_type, rsqrts_type, get_rsqrts_type): Delete.
9326         (aarch64_emit_approx_sqrt): Use gen_aarch64_rsqrte instead of
9327         get_rsqrte_type and gen_aarch64_rsqrts instead of gen_rqrts_type.
9328         (recpe_type, get_recpe_type, recps_type, get_recps_type): Delete.
9329         (aarch64_emit_approx_div): Use gen_aarch64_frecpe instead of
9330         get_recpe_type and gen_aarch64_frecps instead of get_recps_type.
9331         (aarch64_atomic_load_op_code): Delete.
9332         (aarch64_emit_atomic_load_op): Likewise.
9333         (aarch64_gen_atomic_ldop): Use UNSPECV_ATOMIC_* instead of
9334         aarch64_atomic_load_op_code.  Use gen_aarch64_atomic_load
9335         instead of aarch64_emit_atomic_load_op.
9336         * config/aarch64/aarch64.md (aarch64_reload_movcp<GPF_TF:mode><P:mode>)
9337         (aarch64_reload_movcp<VALL:mode><P:mode>, aarch64_reload_mov<mode>)
9338         (aarch64_movdi_<mode>low, aarch64_movdi_<mode>high)
9339         (aarch64_mov<mode>high_di, aarch64_mov<mode>low_di): Add a '@'
9340         character before the pattern name.
9341         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
9342         (aarch64_rsqrte<mode>, aarch64_rsqrts<mode>)
9343         (aarch64_simd_combine<mode>, aarch64_frecpe<mode>)
9344         (aarch64_frecps<mode>): Likewise.
9345         * config/aarch64/atomics.md (atomic_compare_and_swap<mode>)
9346         (aarch64_compare_and_swap<mode>, aarch64_compare_and_swap<mode>_lse)
9347         (aarch64_load_exclusive<mode>, aarch64_store_exclusive<mode>)
9348         (aarch64_atomic_swp<mode>, aarch64_atomic_cas<mode>)
9349         (aarch64_atomic_load<atomic_ldop><mode>): Likewise.
9351 2018-08-02  Richard Sandiford  <richard.sandiford@arm.com>
9353         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
9354         Allow HFmode constants if TARGET_FP_F16INST.
9356 2018-08-02  Jackson Woodruff  <jackson.woodruff@arm.com>
9358         PR target/86014
9359         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp):
9360         No longer check last store for clobber of address register.
9362 2018-08-02  Martin Liska  <mliska@suse.cz>
9364         PR gcov-profile/86817
9365         * gcov.c (process_all_functions): New function.
9366         (main): Call it.
9367         (process_file): Move functions processing to
9368         process_all_functions.
9370 2018-08-02  David Malcolm  <dmalcolm@redhat.com>
9372         * dumpfile.c (dump_user_location_t::dump_user_location_t): Add
9373         "const" to the "gimple *" and "rtx_insn *" parameters.
9374         * dumpfile.h (dump_user_location_t::dump_user_location_t):
9375         Likewise.
9376         (dump_location_t::dump_location_t): Likewise.
9378 2018-08-01  Martin Sebor  <msebor@redhat.com>
9380         PR tree-optimization/86650
9381         * gimple-pretty-print.c (percent_G_format): Accept a "gimple *"
9382         rather than a "gcall *".  Directly pass the data of interest
9383         to percent_K_format, rather than building a temporary CALL_EXPR
9384         to hold it.
9385         * gimple-fold.c (gimple_fold_builtin_strncpy): Adjust.
9386         (gimple_fold_builtin_strncat): Adjust.
9387         * gimple-ssa-warn-restrict.h (check_bounds_or_overlap): Replace
9388         gcall* argument with gimple*.
9389         * gimple-ssa-warn-restrict.c (check_call): Same.
9390         (wrestrict_dom_walker::before_dom_children): Same.
9391         (builtin_access::builtin_access): Same.
9392         (check_bounds_or_overlap): Same
9393         (maybe_diag_overlap): Same.
9394         (maybe_diag_offset_bounds): Same.
9395         * tree-diagnostic.c (default_tree_printer): Move usage of
9396         EXPR_LOCATION (t) and TREE_BLOCK (t) from within percent_K_format
9397         to this callsite.
9398         * tree-pretty-print.c (percent_K_format): Add argument.
9399         * tree-pretty-print.h: Add argument.
9400         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Adjust.
9401         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Adjust.
9402         (maybe_diag_stxncpy_trunc): Same.
9403         (handle_builtin_stxncpy): Same.
9404         (handle_builtin_strcat): Same.
9406 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9408         * match.pd: Optimise pointer range checks.
9410 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9412         PR tree-optimization/86758
9413         * tree-vect-stmts.c (vectorizable_simd_clone_call): Don't try
9414         to remove pattern statements.
9416 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9418         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Use the
9419         result of dfs_enumerate_from when constructing stmt_vec_infos,
9420         instead of additionally calling get_loop_body.
9422 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9424         * tree-vectorizer.h (vect_create_data_ref_ptr): Remove inv_p
9425         parameter.
9426         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Likewise.
9427         When creating an iv, assert that the step is not known to be zero.
9428         (vect_setup_realignment): Update call accordingly.
9429         * tree-vect-stmts.c (vectorizable_store): Likewise.
9430         (vectorizable_load): Likewise.  Handle VMAT_INVARIANT separately.
9432 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9434         * tree-vectorizer.h (vect_stmt_to_vectorize): New function.
9435         * tree-vect-loop.c (vect_update_vf_for_slp): Use it.
9436         (vectorizable_reduction): Likewise.
9437         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9438         (vect_detect_hybrid_slp_stmts): Likewise.
9439         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
9441 2018-08-01  Aldy Hernandez  <aldyh@redhat.com>
9443         * tree-vrp (zero_nonzero_bits_from_bounds): Rename to...
9444         (wide_int_set_zero_nonzero_bits): ...this.
9445         (zero_nonzero_bits_from_vr): Rename to...
9446         (vrp_set_zero_nonzero_bits): ...this.
9447         (extract_range_from_multiplicative_op_1): Abstract wide int
9448         code...
9449         (wide_int_range_multiplicative_op): ...here.
9450         (extract_range_from_binary_expr_1): Extract wide int binary
9451         operations into their own functions.
9452         (wide_int_range_lshift): New.
9453         (wide_int_range_can_optimize_bit_op): New.
9454         (wide_int_range_shift_undefined_p): New.
9455         (wide_int_range_bit_xor): New.
9456         (wide_int_range_bit_ior): New.
9457         (wide_int_range_bit_and): New.
9458         (wide_int_range_trunc_mod): New.
9459         (extract_range_into_wide_ints): New.
9460         (vrp_shift_undefined_p): New.
9461         (extract_range_from_multiplicative_op): New.
9462         (vrp_can_optimize_bit_op): New.
9463         * tree-vrp.h (value_range::dump): New.
9464         (wide_int_range_multiplicative_op): New.
9465         (wide_int_range_lshift):New.
9466         (wide_int_range_shift_undefined_p): New.
9467         (wide_int_range_bit_xor): New.
9468         (wide_int_range_bit_ior): New.
9469         (wide_int_range_bit_and): New.
9470         (wide_int_range_trunc_mod): New.
9471         (zero_nonzero_bits_from_bounds): Rename to...
9472         (wide_int_set_zero_nonzero_bits): ...this.
9473         (zero_nonzero_bits_from_vr): Rename to...
9474         (vrp_set_zero_nonzero_bits): ...this.
9475         (range_easy_mask_min_max): Rename to...
9476         (wide_int_range_can_optimize_bit_op): this.
9477         * vr-values.c (simplify_bit_ops_using_ranges): Rename
9478         zero_nonzero_bits_from_vr into vrp_set_zero_nonzero_bits.
9480 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9482         * tree-vectorizer.h (vect_orig_stmt): New function.
9483         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Use it.
9484         * tree-vect-loop.c (vect_model_reduction_cost): Likewise.
9485         (vect_create_epilog_for_reduction): Likewise.
9486         (vectorizable_live_operation): Likewise.
9487         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
9488         (vect_detect_hybrid_slp_stmts, vect_schedule_slp): Likewise.
9489         * tree-vect-stmts.c (vectorizable_call): Likewise.
9490         (vectorizable_simd_clone_call, vect_remove_stores): Likewise.
9492 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9494         * tree-vectorizer.h (vect_transform_stmt): Remove grouped_store
9495         argument.
9496         * tree-vect-stmts.c (vect_transform_stmt): Likewise.
9497         * tree-vect-loop.c (vect_transform_loop_stmt): Update call accordingly.
9498         (vect_transform_loop): Likewise.
9499         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
9501 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9503         * tree-vectorizer.h (vect_schedule_slp): Return void.
9504         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
9505         (vect_schedule_slp): Likewise.
9507 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9509         * tree-vect-loop.c (vect_transform_loop_stmt): Remove slp_scheduled
9510         argument.
9511         (vect_transform_loop): Update calls accordingly.  Schedule SLP
9512         instances before the main loop, if any exist.
9514 2018-08-01  Richard Sandiford  <richard.sandiford@arm.com>
9516         PR tree-optimization/86749
9517         * tree-vect-patterns.c (vect_determine_min_output_precision_1):
9518         If the lhs is used in a COND_EXPR, check that it is being used
9519         as the "then" or "else" value.
9521 2018-08-01  Tom de Vries  <tdevries@suse.de>
9523         PR target/86800
9524         * config/nvptx/nvptx.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Define to
9525         speculation_safe_value_not_needed.
9527 2018-08-01  Richard Biener  <rguenther@suse.de>
9529         * tree-ssa-sccvn.c (visit_phi): Compare invariant addresses
9530         as base and offset.
9532 2018-08-01  Martin Liska  <mliska@suse.cz>
9534         * value-prof.c (gimple_divmod_fixed_value_transform): Unify
9535         format how successful transformation is dumped.
9536         (gimple_mod_pow2_value_transform): Likewise.
9537         (gimple_mod_subtract_transform): Likewise.
9538         (gimple_stringops_transform): Likewise.
9540 2018-08-01  Martin Liska  <mliska@suse.cz>
9542         PR value-prof/35543
9543         * value-prof.c (interesting_stringop_to_profile_p):
9544         Simplify the code and add BUILT_IN_MEMMOVE.
9545         (gimple_stringops_transform): Likewise.
9547 2018-08-01  Sam Tebbs  <sam.tebbs@arm.com>
9549         * config/aarch64/aarch64-simd.md
9550         (*aarch64_get_lane_zero_extendsi<mode>): Rename to...
9551         (*aarch64_get_lane_zero_extend<GPI:mode><VDQQH:mode>): ... This and
9552         use GPI iterator instead of SI mode.
9554 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
9556         * config/rs6000/rs6000.md (speculation_barrier): Renamed from
9557         rs6000_speculation_barrier.
9558         * config/rs6000/rs6000.c (rs6000_expand_builtin): Adjust for
9559         new barrier pattern name.
9561 2018-08-01  Richard Earnshaw  <rearnsha@arm.com>
9563         * config/i386/i386.md (unspecv): Add UNSPECV_SPECULATION_BARRIER.
9564         (speculation_barrier): New insn.
9566 2018-08-01  Richard Biener  <rguenther@suse.de>
9568         PR bootstrap/86724
9569         * graphite.h: Include isl/id.h and isl/space.h to allow build
9570         with ISL 0.20.
9572 2018-08-01  Jan Willem Jagersma  <jwjagersma@gmail.com>
9574         PR target/86651
9575         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
9576         mode for COFF targets.
9577         * defaults.h (TARGET_COFF): Define.
9578         * config/i386/djgpp.h (TARGET_ASM_LTO_START, TARGET_ASM_LTO_END,
9579         TARGET_COFF): Define.
9580         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): Declare.
9581         * config/i386/djgpp.c (saved_debug_info_level): New static variable.
9582         (i386_djgpp_asm_lto_start, i386_djgpp_asm_lto_end): New functions.
9584 2018-07-31  Alexandre Oliva <oliva@adacore.com>
9586         * gimple-streamer-in.c (input_bb): Restore BB discriminator.
9587         * gimple-streamer-out.c (output_bb): Save it.
9588         * lto-streamer-in.c (input_struct_function_base): Restore
9589         instance discriminator if available.  Create map on demand.
9590         * lto-streamer-out.c (output_struct_function_base): Save it if
9591         available.
9592         * final.c (decl_to_instance_map): Document LTO strategy.
9594 2018-07-31  Alexandre Oliva  <oliva@adacore.com>
9595             Olivier Hainque  <hainque@adacore.com>
9597         * debug.h (decl_to_instance_map_t): New type.
9598         (decl_to_instance_map): Declare.
9599         (maybe_create_decl_to_instance_map): New inline function.
9600         * final.c (bb_discriminator, last_bb_discriminator): New statics,
9601         to track basic block discriminators.
9602         (final_start_function_1): Initialize them.
9603         (final_scan_insn_1): On NOTE_INSN_BASIC_BLOCK, track
9604         bb_discriminator.
9605         (decl_to_instance_map): New variable.
9606         (map_decl_to_instance, maybe_set_discriminator): New functions.
9607         (notice_source_line): Set discriminator.
9609 2018-07-31  Ian Lance Taylor  <iant@golang.org>
9611         * targhooks.c (default_have_speculation_safe_value): Add
9612         ATTRIBUTE_UNUSED.
9614 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
9616         * dump-context.h: Include "pretty-print.h".
9617         (dump_context::refresh_dumps_are_enabled): New decl.
9618         (dump_context::emit_item): New decl.
9619         (class dump_context): Add fields "m_test_pp" and
9620         "m_test_pp_flags".
9621         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
9622         (temp_dump_context::get_dumped_text): New decl.
9623         (class temp_dump_context): Add field "m_pp".
9624         * dumpfile.c (refresh_dumps_are_enabled): Convert to...
9625         (dump_context::refresh_dumps_are_enabled): ...and add a test for
9626         m_test_pp.
9627         (set_dump_file): Update for above change.
9628         (set_alt_dump_file): Likewise.
9629         (dump_loc): New overload, taking a pretty_printer *.
9630         (dump_context::dump_loc): Call end_any_optinfo.  Dump the location
9631         to any test pretty-printer.
9632         (make_item_for_dump_gimple_stmt): New function, adapted from
9633         optinfo::add_gimple_stmt.
9634         (dump_context::dump_gimple_stmt): Call it, and use the result,
9635         eliminating the direct usage of dump_file and alt_dump_file in
9636         favor of indirectly using them via emit_item.
9637         (make_item_for_dump_gimple_expr): New function, adapted from
9638         optinfo::add_gimple_expr.
9639         (dump_context::dump_gimple_expr): Call it, and use the result,
9640         eliminating the direct usage of dump_file and alt_dump_file in
9641         favor of indirectly using them via emit_item.
9642         (make_item_for_dump_generic_expr): New function, adapted from
9643         optinfo::add_tree.
9644         (dump_context::dump_generic_expr): Call it, and use the result,
9645         eliminating the direct usage of dump_file and alt_dump_file in
9646         favor of indirectly using them via emit_item.
9647         (make_item_for_dump_printf_va): New function, adapted from
9648         optinfo::add_printf_va.
9649         (make_item_for_dump_printf): New function.
9650         (dump_context::dump_printf_va): Call make_item_for_dump_printf_va,
9651         and use the result, eliminating the direct usage of dump_file and
9652         alt_dump_file in favor of indirectly using them via emit_item.
9653         (make_item_for_dump_dec): New function.
9654         (dump_context::dump_dec): Call it, and use the result,
9655         eliminating the direct usage of dump_file and alt_dump_file in
9656         favor of indirectly using them via emit_item.
9657         (make_item_for_dump_symtab_node): New function, adapted from
9658         optinfo::add_symtab_node.
9659         (dump_context::dump_symtab_node): Call it, and use the result,
9660         eliminating the direct usage of dump_file and alt_dump_file in
9661         favor of indirectly using them via emit_item.
9662         (dump_context::begin_scope): Reimplement, avoiding direct usage
9663         of dump_file and alt_dump_file in favor of indirectly using them
9664         via emit_item.
9665         (dump_context::emit_item): New member function.
9666         (temp_dump_context::temp_dump_context): Add param "test_pp_flags".
9667         Set up test pretty-printer on the underlying context.  Call
9668         refresh_dumps_are_enabled.
9669         (temp_dump_context::~temp_dump_context): Call
9670         refresh_dumps_are_enabled.
9671         (temp_dump_context::get_dumped_text): New member function.
9672         (selftest::verify_dumped_text): New function.
9673         (ASSERT_DUMPED_TEXT_EQ): New macro.
9674         (selftest::test_capture_of_dump_calls): Run all tests twice, with
9675         and then without optinfo enabled.  Add uses of
9676         ASSERT_DUMPED_TEXT_EQ to all tests.  Add test of nested scopes.
9677         * dumpfile.h: Update comment for the dump_* API.
9678         * optinfo-emit-json.cc
9679         (selftest::test_building_json_from_dump_calls): Update for new
9680         param for temp_dump_context ctor.
9681         * optinfo.cc (optinfo_item::optinfo_item): Remove "owned" param
9682         and "m_owned" field.
9683         (optinfo_item::~optinfo_item): Likewise.
9684         (optinfo::add_item): New member function.
9685         (optinfo::emit): Update comment.
9686         (optinfo::add_string): Delete.
9687         (optinfo::add_printf): Delete.
9688         (optinfo::add_printf_va): Delete.
9689         (optinfo::add_gimple_stmt): Delete.
9690         (optinfo::add_gimple_expr): Delete.
9691         (optinfo::add_tree): Delete.
9692         (optinfo::add_symtab_node): Delete.
9693         (optinfo::add_dec): Delete.
9694         * optinfo.h (class dump_context): New forward decl.
9695         (optinfo::add_item): New decl.
9696         (optinfo::add_string): Delete.
9697         (optinfo::add_printf): Delete.
9698         (optinfo::add_printf_va): Delete.
9699         (optinfo::add_gimple_stmt): Delete.
9700         (optinfo::add_gimple_expr): Delete.
9701         (optinfo::add_tree): Delete.
9702         (optinfo::add_symtab_node): Delete.
9703         (optinfo::add_dec): Delete.
9704         (optinfo::add_poly_int): Delete.
9705         (optinfo_item::optinfo_item): Remove "owned" param.
9706         (class optinfo_item): Remove field "m_owned".
9708 2018-07-31  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
9710         PR middle-end/86705
9711         * gcc/cfgexpand.c (set_parm_rtl): Use the alignment of Pmode when
9712         MAX_SUPPORTED_STACK_ALIGNMENT would otherwise be exceeded by the
9713         requested variable alignment.
9714         (expand_one_ssa_partition): Likewise.
9715         (expand_one_var): Likewise.
9717 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
9719         * config/pdp11/pdp11.c (TARGET_HAVE_SPECULATION_SAFE_VALUE): Redefine
9720         to speculation_safe_value_not_needed.
9722 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
9724         * targhooks.h (speculation_safe_value_not_needed): New prototype.
9725         * targhooks.c (speculation_safe_value_not_needed): New function.
9726         * target.def (have_speculation_safe_value): Update documentation.
9727         * doc/tm.texi: Regenerated.
9729 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
9731         * config/aarch64/iterators.md (ALLI_TI): New iterator.
9732         * config/aarch64/aarch64.md (despeculate_copy<ALLI_TI:mode>): New
9733         expand.
9734         (despeculate_copy<ALLI:mode>_insn): New insn.
9735         (despeculate_copyti_insn): New insn.
9736         (despeculate_simple<ALLI:mode>): New insn
9737         (despeculate_simpleti): New insn.
9738         * config/aarch64/aarch64.c (aarch64_speculation_safe_value): New
9739         function.
9740         (TARGET_SPECULATION_SAFE_VALUE): Redefine to
9741         aarch64_speculation_safe_value.
9742         (aarch64_print_operand): Handle const0_rtx in modifier 'H'.
9744 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
9746         * config/aarch64/aarch64-speculation.cc: New file.
9747         * config/aarch64/aarch64-passes.def (pass_track_speculation): Add
9748         before pass_reorder_blocks.
9749         * config/aarch64/aarch64-protos.h (make_pass_track_speculation): Add
9750         prototype.
9751         * config/aarch64/aarch64.c (aarch64_conditional_register_usage): Fix
9752         X14 and X15 when tracking speculation.
9753         * config/aarch64/aarch64.md (register name constants): Add
9754         SPECULATION_TRACKER_REGNUM and SPECULATION_SCRATCH_REGNUM.
9755         (unspec): Add UNSPEC_SPECULATION_TRACKER.
9756         (speculation_barrier): New insn attribute.
9757         (cmp<mode>): Allow SP in comparisons.
9758         (speculation_tracker): New insn.
9759         (speculation_barrier): Add speculation_barrier attribute.
9760         * config/aarch64/t-aarch64: Add make rule for aarch64-speculation.o.
9761         * config.gcc (aarch64*-*-*): Add aarch64-speculation.o to extra_objs.
9762         * doc/invoke.texi (AArch64 Options): Document -mtrack-speculation.
9764 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
9766         * config/aarch64/aarch64.md (cb<optab><mode>1): Disable when
9767         aarch64_track_speculation is true.
9768         (tb<optab><mode>1): Likewise.
9769         * config/aarch64/aarch64.c (aarch64_split_compare_regs): Do not
9770         generate CB[N]Z when tracking speculation.
9771         (aarch64_split_compare_and_swap): Likewise.
9772         (aarch64_split_atomic_op): Likewise.
9774 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
9776         * config/aarch64/aarch64.opt (mtrack-speculation): New target option.
9778 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
9780         * config/aarch64.md (unspecv): Add UNSPECV_SPECULAION_BARRIER.
9781         (speculation_barrier): New insn.
9783 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
9785         * config/arm/unspecs.md (unspecv): Add VUNSPEC_SPECULATION_BARRIER.
9786         * config/arm/arm.md (speculation_barrier): New expand.
9787         (speculation_barrier_insn): New pattern.
9789 2018-07-31  Richard Earnshaw  <rearnsha@arm.com>
9791         * builtin-types.def (BT_FN_PTR_PTR_VAR): New function type.
9792         (BT_FN_I1_I1_VAR, BT_FN_I2_I2_VAR, BT_FN_I4_I4_VAR): Likewise.
9793         (BT_FN_I8_I8_VAR, BT_FN_I16_I16_VAR): Likewise.
9794         * builtin-attrs.def (ATTR_NOVOPS_NOTHROW_LEAF_LIST): New attribute
9795         list.
9796         * builtins.def (BUILT_IN_SPECULATION_SAFE_VALUE_N): New builtin.
9797         (BUILT_IN_SPECULATION_SAFE_VALUE_PTR): New internal builtin.
9798         (BUILT_IN_SPECULATION_SAFE_VALUE_1): Likewise.
9799         (BUILT_IN_SPECULATION_SAFE_VALUE_2): Likewise.
9800         (BUILT_IN_SPECULATION_SAFE_VALUE_4): Likewise.
9801         (BUILT_IN_SPECULATION_SAFE_VALUE_8): Likewise.
9802         (BUILT_IN_SPECULATION_SAFE_VALUE_16): Likewise.
9803         * builtins.c (expand_speculation_safe_value): New function.
9804         (expand_builtin): Call it.
9805         * doc/cpp.texi: Document predefine __HAVE_SPECULATION_SAFE_VALUE.
9806         * doc/extend.texi: Document __builtin_speculation_safe_value.
9807         * doc/md.texi: Document "speculation_barrier" pattern.
9808         * doc/tm.texi.in: Pull in TARGET_SPECULATION_SAFE_VALUE and
9809         TARGET_HAVE_SPECULATION_SAFE_VALUE.
9810         * doc/tm.texi: Regenerated.
9811         * target.def (have_speculation_safe_value, speculation_safe_value): New
9812         hooks.
9813         * targhooks.c (default_have_speculation_safe_value): New function.
9814         (default_speculation_safe_value): New function.
9815         * targhooks.h (default_have_speculation_safe_value): Add prototype.
9816         (default_speculation_safe_value): Add prototype.
9818 2018-07-31  David Malcolm  <dmalcolm@redhat.com>
9820         * dump-context.h (dump_context::dump_loc): New decl.
9821         * dumpfile.c (dump_context::dump_loc): New member function.
9822         (dump_context::dump_gimple_stmt_loc): Reimplement using dump_loc
9823         and dump_gimple_stmt.
9824         (dump_context::dump_gimple_expr_loc): Likewise, using
9825         dump_gimple_expr.
9826         (dump_context::dump_generic_expr_loc): Likewise, using
9827         dump_generic_expr.
9828         (dump_context::dump_printf_loc_va): Likewise, using
9829         dump_printf_va.
9830         (dump_context::begin_scope): Explicitly using the global function
9831         "dump_loc", rather than the member function.
9833 2018-07-31  Martin Sebor  <msebor@redhat.com>
9835         PR tree-optimization/86741
9836         * tree-vrp.c (vrp_prop::check_mem_ref): Avoid incomplete types.
9838 2018-07-31  Andreas Krebbel  <krebbel@linux.ibm.com>
9840         * config/s390/s390.c (s390_expand_setmem): Make the unrolling to
9841         depend on whether prefetch instructions will be emitted or not.
9842         Use TARGET_SETMEM_PFD for checking whether prefetch instructions
9843         will be emitted or not.
9844         * config/s390/s390.h (TARGET_SETMEM_PREFETCH_DISTANCE)
9845         (TARGET_SETMEM_PFD): New macros.
9847 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9849         * tree-vectorizer.h (stmt_vec_info): Turn back into a typedef.
9850         (NULL_STMT_VEC_INFO): Delete.
9851         (stmt_vec_info::operator*): Likewise.
9852         (stmt_vec_info::operator gimple *): Likewise.
9853         * tree-vect-loop.c (vectorizable_reduction): Use NULL instead
9854         of NULL_STMT_VEC_INFO.
9855         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
9856         (vect_reassociating_reduction_p): Likewise.
9857         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
9858         (vectorizable_store): Likewise.
9859         * tree-vectorizer.c (vec_info::set_vinfo_for_stmt): Likewise.
9860         (vec_info::free_stmt_vec_infos): Likewise.
9862 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9864         * tree-vectorizer.h (vect_stmt_in_region_p): Delete.
9865         * tree-vectorizer.c (vect_stmt_in_region_p): Likewise.
9867 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9869         * tree-vectorizer.h (vec_info::new_vinfo_for_stmt)
9870         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
9871         (vec_info::free_stmt_vec_info): New private member functions.
9872         (set_stmt_vec_info_vec, free_stmt_vec_infos, vinfo_for_stmt)
9873         (set_vinfo_for_stmt, new_stmt_vec_info, free_stmt_vec_info): Delete.
9874         * tree-parloops.c (gather_scalar_reductions): Remove calls to
9875         set_stmt_vec_info_vec and free_stmt_vec_infos.
9876         * tree-vect-loop.c (_loop_vec_info): Remove call to
9877         set_stmt_vec_info_vec.
9878         * tree-vect-stmts.c (new_stmt_vec_info, set_stmt_vec_info_vec)
9879         (free_stmt_vec_infos, free_stmt_vec_info): Delete in favor of...
9880         * tree-vectorizer.c (vec_info::new_stmt_vec_info)
9881         (vec_info::set_vinfo_for_stmt, vec_info::free_stmt_vec_infos)
9882         (vec_info::free_stmt_vec_info): ...these new functions.  Remove
9883         assignments in {vec_info::,}new_stmt_vec_info that are redundant
9884         with the clearing in the xcalloc.
9885         (stmt_vec_info_vec): Delete.
9886         (vec_info::vec_info): Don't call set_stmt_vec_info_vec.
9887         (vectorize_loops): Likewise.
9888         (vec_info::~vec_info): Remove argument from call to
9889         free_stmt_vec_infos.
9890         (vec_info::add_stmt): Remove vinfo argument from call to
9891         new_stmt_vec_info.
9893 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9895         * tree-vectorizer.h (free_stmt_vec_info): Take a stmt_vec_info
9896         rather than a gimple stmt.
9897         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.  Don't free
9898         information for pattern statements when passed the original
9899         statement; instead wait to be passed the pattern statement itself.
9900         Don't call set_vinfo_for_stmt here.
9901         (free_stmt_vec_infos): Update call to free_stmt_vec_info.
9902         * tree-vect-loop.c (_loop_vec_info::~loop_vec_info): Don't free
9903         stmt_vec_infos here.
9904         * tree-vect-slp.c (_bb_vec_info::~bb_vec_info): Likewise.
9905         * tree-vectorizer.c (vec_info::remove_stmt): Nullify the statement's
9906         stmt_vec_infos entry.
9908 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9910         * tree-vectorizer.h (vec_info::replace_stmt): Declare.
9911         * tree-vectorizer.c (vec_info::replace_stmt): New function.
9912         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Use it.
9913         * tree-vect-stmts.c (vectorizable_call): Likewise.
9914         (vectorizable_simd_clone_call): Likewise.
9916 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9918         * tree-vectorizer.h (vec_info::remove_stmt): Declare.
9919         * tree-vectorizer.c (vec_info::remove_stmt): New function.
9920         * tree-vect-loop-manip.c (vect_set_loop_condition): Use it.
9921         * tree-vect-loop.c (vect_transform_loop): Likewise.
9922         * tree-vect-slp.c (vect_schedule_slp): Likewise.
9923         * tree-vect-stmts.c (vect_remove_stores): Likewise.
9925 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9927         * tree-vectorizer.h (vec_info::lookup_dr): New member function.
9928         (vect_dr_stmt): Delete.
9929         * tree-vectorizer.c (vec_info::lookup_dr): New function.
9930         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Use it instead
9931         of DR_VECT_AUX.
9932         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
9933         (vect_analyze_data_ref_dependence, vect_record_base_alignments)
9934         (vect_verify_datarefs_alignment, vect_peeling_supportable)
9935         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
9936         (vect_analyze_data_refs): Likewise.
9937         (vect_slp_analyze_data_ref_dependence): Likewise.  Take a vec_info
9938         argument.
9939         (vect_find_same_alignment_drs): Likewise.
9940         (vect_slp_analyze_node_dependences): Update calls accordingly.
9941         (vect_analyze_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
9942         instead of DR_VECT_AUX.
9943         (vect_get_peeling_costs_all_drs): Take a loop_vec_info instead
9944         of a vector data references.  Use vec_info::lookup_dr instead of
9945         DR_VECT_AUX.
9946         (vect_peeling_hash_get_lowest_cost): Update calls accordingly.
9947         (vect_enhance_data_refs_alignment): Likewise.  Use vec_info::lookup_dr
9948         instead of DR_VECT_AUX.
9950 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9952         * tree-vectorizer.h (_loop_vec_info::unaligned_dr): Change to
9953         dr_vec_info.
9954         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
9955         accordingly.
9956         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
9957         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
9958         (vect_gen_prolog_loop_niters): Likewise.
9960 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
9962         * tree-vectorizer.h (set_dr_misalignment, dr_misalignment)
9963         (DR_TARGET_ALIGNMENT, aligned_access_p, known_alignment_for_access_p)
9964         (vect_known_alignment_in_bytes, vect_dr_behavior)
9965         (vect_get_scalar_dr_size): Take references as dr_vec_infos
9966         instead of data_references.  Update calls to other routines for
9967         which the same change has been made.
9968         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Take
9969         dr_vec_infos instead of stmt_vec_infos.
9970         (vect_analyze_data_ref_dependence): Update call accordingly.
9971         (vect_slp_analyze_data_ref_dependence)
9972         (vect_record_base_alignments): Use DR_VECT_AUX.
9973         (vect_calculate_target_alignment, vect_compute_data_ref_alignment)
9974         (vect_update_misalignment_for_peel, verify_data_ref_alignment)
9975         (vector_alignment_reachable_p, vect_get_data_access_cost)
9976         (vect_peeling_supportable, vect_analyze_group_access_1)
9977         (vect_analyze_group_access, vect_analyze_data_ref_access)
9978         (vect_vfa_segment_size, vect_vfa_access_size, vect_vfa_align)
9979         (vect_compile_time_alias, vect_small_gap_p)
9980         (vectorizable_with_step_bound_p, vect_duplicate_ssa_name_ptr_info):
9981         (vect_supportable_dr_alignment): Take references as dr_vec_infos
9982         instead of data_references.  Update calls to other routines for
9983         which the same change has been made.
9984         (vect_verify_datarefs_alignment, vect_get_peeling_costs_all_drs)
9985         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
9986         (vect_slp_analyze_and_verify_node_alignment)
9987         (vect_analyze_data_ref_accesses, vect_prune_runtime_alias_test_list)
9988         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
9989         (vect_setup_realignment): Use dr_vec_infos.  Update calls after
9990         above changes.
9991         (_vect_peel_info::dr): Replace with...
9992         (_vect_peel_info::dr_info): ...this new field.
9993         (vect_peeling_hash_get_most_frequent)
9994         (vect_peeling_hash_choose_best_peeling): Update accordingly.
9995         (vect_peeling_hash_get_lowest_cost):
9996         (vect_enhance_data_refs_alignment): Likewise.  Update calls to other
9997         routines for which the same change has been made.
9998         (vect_peeling_hash_insert): Likewise.  Take a dr_vec_info instead of a
9999         data_reference.
10000         * tree-vect-loop-manip.c (get_misalign_in_elems)
10001         (vect_gen_prolog_loop_niters): Use dr_vec_infos.  Update calls after
10002         above changes.
10003         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10004         * tree-vect-stmts.c (vect_get_store_cost, vect_get_load_cost)
10005         (vect_truncate_gather_scatter_offset, compare_step_with_zero)
10006         (get_group_load_store_type, get_negative_load_store_type)
10007         (vect_get_data_ptr_increment, vectorizable_store)
10008         (vectorizable_load): Likewise.
10009         (ensure_base_align): Take a dr_vec_info instead of a data_reference.
10010         Update calls to other routines for which the same change has been made.
10012 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10014         * tree-vectorizer.h (vec_info::move_dr): New member function.
10015         (dataref_aux): Rename to...
10016         (dr_vec_info): ...this and add "dr" and "stmt" fields.
10017         (_stmt_vec_info::dr_aux): Update accordingly.
10018         (_stmt_vec_info::data_ref_info): Delete.
10019         (STMT_VINFO_GROUPED_ACCESS, DR_GROUP_FIRST_ELEMENT)
10020         (DR_GROUP_NEXT_ELEMENT, DR_GROUP_SIZE, DR_GROUP_STORE_COUNT)
10021         (DR_GROUP_GAP, DR_GROUP_SAME_DR_STMT, REDUC_GROUP_FIRST_ELEMENT):
10022         (REDUC_GROUP_NEXT_ELEMENT, REDUC_GROUP_SIZE): Use dr_aux.dr instead
10023         of data_ref.
10024         (STMT_VINFO_DATA_REF): Likewise.  Turn into an lvalue.
10025         (STMT_VINFO_DR_INFO): New macro.
10026         (DR_VECT_AUX): Use STMT_VINFO_DR_INKFO and vect_dr_stmt.
10027         (set_dr_misalignment): Update after rename of dataref_aux.
10028         (vect_dr_stmt): Move earlier in file.  Return dr_aux.stmt.
10029         * tree-vect-stmts.c (new_stmt_vec_info): Remove redundant
10030         initialization of STMT_VINFO_DATA_REF.
10031         * tree-vectorizer.c (vec_info::move_dr): New function.
10032         * tree-vect-patterns.c (vect_recog_bool_pattern)
10033         (vect_recog_mask_conversion_pattern)
10034         (vect_recog_gather_scatter_pattern): Use it.
10035         * tree-vect-data-refs.c (vect_analyze_data_refs): Initialize
10036         the "dr" and "stmt" fields of dr_vec_info instead of
10037         STMT_VINFO_DATA_REF.
10039 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10041         * tree-vectorizer.h (_stmt_vec_info::pattern_stmt_p): New field.
10042         (is_pattern_stmt_p): Use it.
10043         * tree-vect-patterns.c (vect_init_pattern_stmt): Set pattern_stmt_p
10044         on pattern statements.
10046 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10048         * tree-vect-patterns.c (vect_mark_pattern_stmts): Take the
10049         original stmt as a stmt_vec_info rather than a gimple stmt.
10050         (vect_pattern_recog_1): Take the statement directly as a
10051         stmt_vec_info, rather than via a gimple_stmt_iterator.
10052         Update call to vect_mark_pattern_stmts.
10053         (vect_pattern_recog): Update calls accordingly.
10055 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10057         * tree-vectorizer.h (vect_get_vec_defs_for_stmt_copy)
10058         (vect_get_vec_def_for_stmt_copy): Take a vec_info rather than
10059         a vect_def_type for the first argument.
10060         * tree-vect-stmts.c (vect_get_vec_defs_for_stmt_copy): Likewise.
10061         (vect_get_vec_def_for_stmt_copy): Likewise.  Return the original
10062         operand if it isn't defined by a vectorized statement.
10063         (vect_build_gather_load_calls): Remove the mask_dt argument and
10064         update calls to vect_get_vec_def_for_stmt_copy.
10065         (vectorizable_bswap): Likewise the dt argument.
10066         (vectorizable_call): Update calls to vectorizable_bswap and
10067         vect_get_vec_def_for_stmt_copy.
10068         (vectorizable_simd_clone_call, vectorizable_assignment)
10069         (vectorizable_shift, vectorizable_operation, vectorizable_condition)
10070         (vectorizable_comparison): Update calls to
10071         vect_get_vec_def_for_stmt_copy.
10072         (vectorizable_store): Likewise.  Remove now-unnecessary calls to
10073         vect_is_simple_use.
10074         (vect_get_loop_based_defs): Remove dt argument and update call
10075         to vect_get_vec_def_for_stmt_copy.
10076         (vectorizable_conversion): Update calls to vect_get_loop_based_defs
10077         and vect_get_vec_def_for_stmt_copy.
10078         (vectorizable_load): Update calls to vect_build_gather_load_calls
10079         and vect_get_vec_def_for_stmt_copy.
10080         * tree-vect-loop.c (vect_create_epilog_for_reduction)
10081         (vectorizable_reduction, vectorizable_live_operation): Update calls
10082         to vect_get_vec_def_for_stmt_copy.
10084 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10086         * tree-vect-data-refs.c (vect_record_base_alignment): Replace vec_info
10087         and gimple stmt arguments with a stmt_vec_info.
10088         (vect_record_base_alignments): Update calls accordingly.
10089         * tree-vect-slp.c (vect_record_max_nunits): Replace vec_info
10090         and gimple stmt arguments with a stmt_vec_info.
10091         (vect_build_slp_tree_1): Remove vinfo argument and update call
10092         to vect_record_max_nunits.
10093         (vect_build_slp_tree_2): Update calls to vect_build_slp_tree_1
10094         and vect_record_max_nunits.
10096 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10098         * tree-vectorizer.h (nested_in_vect_loop_p): Move further down
10099         file and take a stmt_vec_info instead of a gimple stmt.
10100         (supportable_widening_operation, vect_finish_replace_stmt)
10101         (vect_finish_stmt_generation, vect_get_store_rhs)
10102         (vect_get_vec_def_for_operand_1, vect_get_vec_def_for_operand)
10103         (vect_get_vec_defs, vect_init_vector, vect_transform_stmt)
10104         (vect_remove_stores, vect_analyze_stmt, vectorizable_condition)
10105         (vect_get_smallest_scalar_type, vect_check_gather_scatter)
10106         (vect_create_data_ref_ptr, bump_vector_ptr)
10107         (vect_permute_store_chain, vect_setup_realignment)
10108         (vect_transform_grouped_load, vect_record_grouped_load_vectors)
10109         (vect_create_addr_base_for_vector_ref, vectorizable_live_operation)
10110         (vectorizable_reduction, vectorizable_induction)
10111         (get_initial_def_for_reduction, is_simple_and_all_uses_invariant)
10112         (vect_get_place_in_interleaving_chain): Take stmt_vec_infos rather
10113         than gimple stmts as arguments.
10114         * tree-vect-data-refs.c (vect_get_smallest_scalar_type)
10115         (vect_preserves_scalar_order_p, vect_slp_analyze_node_dependences)
10116         (can_group_stmts_p, vect_check_gather_scatter)
10117         (vect_create_addr_base_for_vector_ref, vect_create_data_ref_ptr)
10118         (bump_vector_ptr, vect_permute_store_chain, vect_setup_realignment)
10119         (vect_permute_load_chain, vect_shift_permute_load_chain)
10120         (vect_transform_grouped_load)
10121         (vect_record_grouped_load_vectors): Likewise.
10122         * tree-vect-loop.c (vect_fixup_reduc_chain)
10123         (get_initial_def_for_reduction, vect_create_epilog_for_reduction)
10124         (vectorize_fold_left_reduction, is_nonwrapping_integer_induction)
10125         (vectorizable_reduction, vectorizable_induction)
10126         (vectorizable_live_operation, vect_loop_kill_debug_uses): Likewise.
10127         * tree-vect-patterns.c (type_conversion_p, adjust_bool_stmts)
10128         (vect_get_load_store_mask): Likewise.
10129         * tree-vect-slp.c (vect_get_place_in_interleaving_chain)
10130         (vect_analyze_slp_instance, vect_mask_constant_operand_p): Likewise.
10131         * tree-vect-stmts.c (vect_mark_relevant)
10132         (is_simple_and_all_uses_invariant)
10133         (exist_non_indexing_operands_for_use_p, process_use)
10134         (vect_init_vector_1, vect_init_vector, vect_get_vec_def_for_operand_1)
10135         (vect_get_vec_def_for_operand, vect_get_vec_defs)
10136         (vect_finish_stmt_generation_1, vect_finish_replace_stmt)
10137         (vect_finish_stmt_generation, vect_truncate_gather_scatter_offset)
10138         (compare_step_with_zero, vect_get_store_rhs, get_group_load_store_type)
10139         (get_negative_load_store_type, get_load_store_type)
10140         (vect_check_load_store_mask, vect_check_store_rhs)
10141         (vect_build_gather_load_calls, vect_get_strided_load_store_ops)
10142         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10143         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10144         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10145         (get_group_alias_ptr_type, vectorizable_store, hoist_defs_of_uses)
10146         (vectorizable_load, vectorizable_condition, vectorizable_comparison)
10147         (vect_analyze_stmt, vect_transform_stmt, vect_remove_stores)
10148         (supportable_widening_operation): Likewise.
10150 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10152         * tree-vect-data-refs.c (vect_describe_gather_scatter_call): Take
10153         a stmt_vec_info instead of a gcall.
10154         (vect_check_gather_scatter): Update call accordingly.
10155         * tree-vect-loop-manip.c (iv_phi_p): Take a stmt_vec_info instead
10156         of a gphi.
10157         (vect_can_advance_ivs_p, vect_update_ivs_after_vectorizer)
10158         (slpeel_update_phi_nodes_for_loops):): Update calls accordingly.
10159         * tree-vect-loop.c (vect_transform_loop_stmt): Take a stmt_vec_info
10160         instead of a gimple stmt.
10161         (vect_transform_loop): Update calls accordingly.
10162         * tree-vect-slp.c (vect_split_slp_store_group): Take and return
10163         stmt_vec_infos instead of gimple stmts.
10164         (vect_analyze_slp_instance): Update use accordingly.
10165         * tree-vect-stmts.c (read_vector_array, write_vector_array)
10166         (vect_clobber_variable, vect_stmt_relevant_p, permute_vec_elements)
10167         (vect_use_strided_gather_scatters_p, vect_build_all_ones_mask)
10168         (vect_build_zero_merge_argument, vect_get_gather_scatter_ops)
10169         (vect_gen_widened_results_half, vect_get_loop_based_defs)
10170         (vect_create_vectorized_promotion_stmts, can_vectorize_live_stmts):
10171         Take a stmt_vec_info instead of a gimple stmt and pass stmt_vec_infos
10172         down to subroutines.
10174 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10176         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Change the type
10177         of the worklist from a vector of gimple stmts to a vector of
10178         stmt_vec_infos.
10179         * tree-vect-stmts.c (vect_mark_relevant, process_use)
10180         (vect_mark_stmts_to_be_vectorized): Likewise
10182 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10184         * tree-vect-loop.c (vect_analyze_loop_operations): Look up the
10185         statement before passing it to vect_analyze_stmt.
10186         (vect_create_epilog_for_reduction): Use a stmt_vec_info to walk
10187         the chain of phi vector definitions.  Track the exit phi via its
10188         stmt_vec_info.
10189         (vectorizable_reduction): Set cond_stmt_vinfo directly from the
10190         STMT_VINFO_REDUC_DEF.
10191         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Use
10192         stmt_vec_infos to handle the statement chains.
10193         (vect_get_slp_defs): Record the first statement in the node
10194         using a stmt_vec_info.
10195         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Look up
10196         statements here and pass their stmt_vec_info down to subroutines.
10197         (vect_init_vector_1): Hoist call to vinfo_for_stmt and pass it
10198         down to vect_finish_stmt_generation.
10199         (vect_init_vector, vect_get_vec_defs, vect_finish_replace_stmt)
10200         (vect_finish_stmt_generation): Call vinfo_for_stmt and pass
10201         stmt_vec_infos to subroutines.
10202         (vect_remove_stores): Use stmt_vec_infos to handle the statement
10203         chains.
10205 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10207         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences):
10208         (vect_check_gather_scatter, vect_create_data_ref_ptr, bump_vector_ptr)
10209         (vect_permute_store_chain, vect_setup_realignment)
10210         (vect_permute_load_chain, vect_shift_permute_load_chain)
10211         (vect_transform_grouped_load): Use stmt_vec_info rather than gimple
10212         stmts internally, and when passing values to other vectorizer routines.
10213         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
10214         * tree-vect-loop.c (vect_analyze_scalar_cycles_1)
10215         (vect_analyze_loop_operations, get_initial_def_for_reduction)
10216         (vect_create_epilog_for_reduction, vectorize_fold_left_reduction)
10217         (vectorizable_reduction, vectorizable_induction)
10218         (vectorizable_live_operation, vect_transform_loop_stmt)
10219         (vect_transform_loop): Likewise.
10220         * tree-vect-patterns.c (vect_reassociating_reduction_p)
10221         (vect_recog_widen_op_pattern, vect_recog_mixed_size_cond_pattern)
10222         (vect_recog_bool_pattern, vect_recog_gather_scatter_pattern): Likewise.
10223         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10224         (vect_slp_analyze_node_operations_1): Likewise.
10225         * tree-vect-stmts.c (vect_mark_relevant, process_use)
10226         (exist_non_indexing_operands_for_use_p, vect_init_vector_1)
10227         (vect_mark_stmts_to_be_vectorized, vect_get_vec_def_for_operand)
10228         (vect_finish_stmt_generation_1, get_group_load_store_type)
10229         (get_load_store_type, vect_build_gather_load_calls)
10230         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10231         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10232         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10233         (vectorizable_store, vectorizable_load, vectorizable_condition)
10234         (vectorizable_comparison, vect_analyze_stmt, vect_transform_stmt)
10235         (supportable_widening_operation): Likewise.
10236         (vect_get_vector_types_for_stmt): Likewise.
10237         * tree-vectorizer.h (vect_dr_behavior): Likewise.
10239 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10241         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10242         (vect_slp_analyze_node_dependences, vect_analyze_data_ref_accesses)
10243         (vect_permute_store_chain, vect_permute_load_chain)
10244         (vect_shift_permute_load_chain, vect_transform_grouped_load): Avoid
10245         repeated stmt_vec_info lookups.
10246         * tree-vect-loop-manip.c (vect_can_advance_ivs_p): Likewise.
10247         (vect_update_ivs_after_vectorizer): Likewise.
10248         * tree-vect-loop.c (vect_is_simple_reduction): Likewise.
10249         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
10250         * tree-vect-patterns.c (adjust_bool_stmts): Likewise.
10251         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10252         (vect_bb_slp_scalar_cost): Likewise.
10253         * tree-vect-stmts.c (get_group_alias_ptr_type): Likewise.
10255 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10257         * tree-vect-data-refs.c (vect_check_gather_scatter): Pass the
10258         gcall rather than the generic gimple stmt to gimple_call_internal_fn.
10259         (vect_get_smallest_scalar_type, can_group_stmts_p): Use dyn_cast
10260         to get gassigns and gcalls, rather than operating on generc gimple
10261         stmts.
10262         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p)
10263         (vect_mark_stmts_to_be_vectorized, vectorizable_store)
10264         (vectorizable_load, vect_analyze_stmt): Likewise.
10265         * tree-vect-loop.c (vectorizable_reduction): Likewise gphi.
10267 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10269         * tree-vectorizer.h (get_earlier_stmt, get_later_stmt): Take and
10270         return stmt_vec_infos rather than gimple stmts.  Do not accept
10271         null arguments.
10272         (vect_find_last_scalar_stmt_in_slp): Return a stmt_vec_info instead
10273         of a gimple stmt.
10274         * tree-vect-slp.c (vect_find_last_scalar_stmt_in_slp): Likewise.
10275         Update use of get_later_stmt.
10276         (vect_get_constant_vectors): Update call accordingly.
10277         (vect_schedule_slp_instance): Likewise
10278         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Likewise.
10279         (vect_slp_analyze_instance_dependence): Likewise.
10280         (vect_preserves_scalar_order_p): Update use of get_earlier_stmt.
10282 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10284         * tree-vectorizer.h (stmt_info_for_cost::stmt): Replace with...
10285         (stmt_info_for_cost::stmt_info): ...this new field.
10286         (add_stmt_costs): Update accordingly.
10287         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
10288         (vect_get_known_peeling_cost): Likewise.
10289         (vect_estimate_min_profitable_iters): Likewise.
10290         * tree-vect-stmts.c (record_stmt_cost): Likewise.
10292 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10294         * tree-vectorizer.h (_loop_vec_info::may_misalign_stmts): Change
10295         from an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10296         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Update
10297         accordingly.
10298         * tree-vect-loop-manip.c (vect_create_cond_for_align_checks): Likewise.
10300 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10302         * tree-vectorizer.h (_stmt_vec_info::same_dr_stmt): Change from
10303         a gimple stmt to a stmt_vec_info.
10304         * tree-vect-stmts.c (vectorizable_load): Update accordingly.
10306 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10308         * tree-vectorizer.h (vec_info::grouped_stores): Change from
10309         an auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10310         (_loop_vec_info::reduction_chains): Likewise.
10311         * tree-vect-loop.c (vect_fixup_scalar_cycles_with_patterns): Update
10312         accordingly.
10313         * tree-vect-slp.c (vect_analyze_slp): Likewise.
10315 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10317         * tree-vectorizer.h (_stmt_vec_info::first_element): Change from
10318         a gimple stmt to a stmt_vec_info.
10319         (_stmt_vec_info::next_element): Likewise.
10320         * tree-vect-data-refs.c (vect_update_misalignment_for_peel)
10321         (vect_slp_analyze_and_verify_node_alignment)
10322         (vect_analyze_group_access_1, vect_analyze_group_access)
10323         (vect_small_gap_p, vect_prune_runtime_alias_test_list)
10324         (vect_create_data_ref_ptr, vect_record_grouped_load_vectors)
10325         (vect_supportable_dr_alignment): Update accordingly.
10326         * tree-vect-loop.c (vect_fixup_reduc_chain): Likewise.
10327         (vect_fixup_scalar_cycles_with_patterns, vect_is_slp_reduction)
10328         (vect_is_simple_reduction, vectorizable_reduction): Likewise.
10329         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
10330         * tree-vect-slp.c (vect_build_slp_tree_1)
10331         (vect_attempt_slp_rearrange_stmts, vect_supported_load_permutation_p)
10332         (vect_split_slp_store_group, vect_analyze_slp_instance)
10333         (vect_analyze_slp, vect_transform_slp_perm_load): Likewise.
10334         * tree-vect-stmts.c (vect_model_store_cost, vect_model_load_cost)
10335         (get_group_load_store_type, get_load_store_type)
10336         (get_group_alias_ptr_type, vectorizable_store, vectorizable_load)
10337         (vect_transform_stmt, vect_remove_stores): Likewise.
10339 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10341         * tree-vectorizer.h (vect_dr_stmt): Return a stmt_vec_info rather
10342         than a gimple stmt.
10343         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
10344         (vect_slp_analyze_data_ref_dependence, vect_record_base_alignments)
10345         (vect_calculate_target_alignmentm, vect_compute_data_ref_alignment)
10346         (vect_update_misalignment_for_peel, vect_verify_datarefs_alignment)
10347         (vector_alignment_reachable_p, vect_get_data_access_cost)
10348         (vect_get_peeling_costs_all_drs, vect_peeling_hash_get_lowest_cost)
10349         (vect_peeling_supportable, vect_enhance_data_refs_alignment)
10350         (vect_find_same_alignment_drs, vect_analyze_data_refs_alignment)
10351         (vect_analyze_group_access_1, vect_analyze_group_access)
10352         (vect_analyze_data_ref_access, vect_analyze_data_ref_accesses)
10353         (vect_vfa_access_size, vect_small_gap_p, vect_analyze_data_refs)
10354         (vect_supportable_dr_alignment): Remove vinfo_for_stmt from the
10355         result of vect_dr_stmt and use the stmt_vec_info instead of
10356         the associated gimple stmt.
10357         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
10358         (vect_gen_prolog_loop_niters): Likewise.
10359         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
10361 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10363         * tree-vectorizer.h (_slp_tree::stmts): Change from a vec<gimple *>
10364         to a vec<stmt_vec_info>.
10365         * tree-vect-slp.c (vect_free_slp_tree): Update accordingly.
10366         (vect_create_new_slp_node): Take a vec<gimple *> instead of a
10367         vec<stmt_vec_info>.
10368         (_slp_oprnd_info::def_stmts): Change from a vec<gimple *>
10369         to a vec<stmt_vec_info>.
10370         (bst_traits::value_type, bst_traits::value_type): Likewise.
10371         (bst_traits::hash): Update accordingly.
10372         (vect_get_and_check_slp_defs): Change the stmts parameter from
10373         a vec<gimple *> to a vec<stmt_vec_info>.
10374         (vect_two_operations_perm_ok_p, vect_build_slp_tree_1): Likewise.
10375         (vect_build_slp_tree): Likewise.
10376         (vect_build_slp_tree_2): Likewise.  Update uses of
10377         SLP_TREE_SCALAR_STMTS.
10378         (vect_print_slp_tree): Update uses of SLP_TREE_SCALAR_STMTS.
10379         (vect_mark_slp_stmts, vect_mark_slp_stmts_relevant)
10380         (vect_slp_rearrange_stmts, vect_attempt_slp_rearrange_stmts)
10381         (vect_supported_load_permutation_p, vect_find_last_scalar_stmt_in_slp)
10382         (vect_detect_hybrid_slp_stmts, vect_slp_analyze_node_operations_1)
10383         (vect_slp_analyze_node_operations, vect_slp_analyze_operations)
10384         (vect_bb_slp_scalar_cost, vect_slp_analyze_bb_1)
10385         (vect_get_constant_vectors, vect_get_slp_defs)
10386         (vect_transform_slp_perm_load, vect_schedule_slp_instance)
10387         (vect_remove_slp_scalar_calls, vect_schedule_slp): Likewise.
10388         (vect_analyze_slp_instance): Build up a vec of stmt_vec_infos
10389         instead of gimple stmts.
10390         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Change
10391         the stores parameter for a vec<gimple *> to a vec<stmt_vec_info>.
10392         (vect_slp_analyze_instance_dependence): Update uses of
10393         SLP_TREE_SCALAR_STMTS.
10394         (vect_slp_analyze_and_verify_node_alignment): Likewise.
10395         (vect_slp_analyze_and_verify_instance_alignment): Likewise.
10396         * tree-vect-loop.c (neutral_op_for_slp_reduction): Likewise.
10397         (get_initial_defs_for_reduction): Likewise.
10398         (vect_create_epilog_for_reduction): Likewise.
10399         (vectorize_fold_left_reduction): Likewise.
10400         * tree-vect-stmts.c (vect_prologue_cost_for_slp_op): Likewise.
10401         (vect_model_simple_cost, vectorizable_shift, vectorizable_load)
10402         (can_vectorize_live_stmts): Likewise.
10404 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10406         * tree-vectorizer.h (_loop_vec_info::reductions): Change from an
10407         auto_vec<gimple *> to an auto_vec<stmt_vec_info>.
10408         (vect_force_simple_reduction): Take and return stmt_vec_infos rather
10409         than gimple stmts.
10410         * tree-parloops.c (valid_reduction_p): Take a stmt_vec_info instead
10411         of a gimple stmt.
10412         (gather_scalar_reductions): Update after above interface changes.
10413         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Likewise.
10414         (vect_is_simple_reduction): Take and return stmt_vec_infos rather
10415         than gimple stmts.
10416         (vect_force_simple_reduction): Likewise.
10417         * tree-vect-patterns.c (vect_pattern_recog_1): Update use of
10418         LOOP_VINFO_REDUCTIONS.
10419         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
10421 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10423         * tree-vectorizer.h (_stmt_vec_info::reduc_def): Change from
10424         a gimple stmt to a stmt_vec_info.
10425         * tree-vect-loop.c (vect_active_double_reduction_p)
10426         (vect_force_simple_reduction, vectorizable_reduction): Update
10427         accordingly.
10429 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10431         * tree-vectorizer.h (_slp_tree::vec_stmts): Change from a
10432         vec<gimple *> to a vec<stmt_vec_info>.
10433         * tree-vect-loop.c (vect_create_epilog_for_reduction): Change
10434         the reduction_phis argument from a vec<gimple *> to a
10435         vec<stmt_vec_info>.
10436         (vectorizable_reduction): Likewise the phis local variable that
10437         is passed to vect_create_epilog_for_reduction.  Update for new type
10438         of SLP_TREE_VEC_STMTS.
10439         (vectorizable_induction): Update for new type of SLP_TREE_VEC_STMTS.
10440         (vectorizable_live_operation): Likewise.
10441         * tree-vect-slp.c (vect_get_slp_vect_defs): Likewise.
10442         (vect_transform_slp_perm_load, vect_schedule_slp_instance): Likewise.
10444 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10446         * tree-vectorizer.h (_stmt_vec_info::vectorized_stmt): Change from
10447         a gimple stmt to a stmt_vec_info.
10448         (vectorizable_condition, vectorizable_live_operation)
10449         (vectorizable_reduction, vectorizable_induction): Pass back the
10450         vectorized statement as a stmt_vec_info.
10451         * tree-vect-data-refs.c (vect_record_grouped_load_vectors): Update
10452         use of STMT_VINFO_VEC_STMT.
10453         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise,
10454         accumulating the inner phis that feed the STMT_VINFO_VEC_STMT
10455         as stmt_vec_infos rather than gimple stmts.
10456         (vectorize_fold_left_reduction): Change vec_stmt from a gimple stmt
10457         to a stmt_vec_info.
10458         (vectorizable_live_operation): Likewise.
10459         (vectorizable_reduction, vectorizable_induction): Likewise,
10460         updating use of STMT_VINFO_VEC_STMT.
10461         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Update use
10462         of STMT_VINFO_VEC_STMT.
10463         (vect_build_gather_load_calls, vectorizable_bswap, vectorizable_call)
10464         (vectorizable_simd_clone_call, vectorizable_conversion)
10465         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10466         (vectorizable_store, vectorizable_load, vectorizable_condition)
10467         (vectorizable_comparison, can_vectorize_live_stmts): Change vec_stmt
10468         from a gimple stmt to a stmt_vec_info.
10469         (vect_transform_stmt): Update use of STMT_VINFO_VEC_STMT.  Pass a
10470         pointer to a stmt_vec_info to the vectorizable_* routines.
10472 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10474         * tree-vectorizer.h (_stmt_vec_info::related_stmt): Change from
10475         a gimple stmt to a stmt_vec_info.
10476         (is_pattern_stmt_p): Update accordingly.
10477         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Likewise.
10478         (vect_record_grouped_load_vectors): Likewise.
10479         * tree-vect-loop.c (vect_determine_vf_for_stmt): Likewise.
10480         (vect_fixup_reduc_chain, vect_update_vf_for_slp): Likewise.
10481         (vect_model_reduction_cost): Likewise.
10482         (vect_create_epilog_for_reduction): Likewise.
10483         (vectorizable_reduction, vectorizable_induction): Likewise.
10484         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10485         Return the stmt_vec_info for the pattern statement.
10486         (vect_set_pattern_stmt): Update use of STMT_VINFO_RELATED_STMT.
10487         (vect_split_statement, vect_mark_pattern_stmts): Likewise.
10488         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
10489         (vect_detect_hybrid_slp, vect_get_slp_defs): Likewise.
10490         * tree-vect-stmts.c (vect_mark_relevant): Likewise.
10491         (vect_get_vec_def_for_operand_1, vectorizable_call): Likewise.
10492         (vectorizable_simd_clone_call, vect_analyze_stmt, new_stmt_vec_info)
10493         (free_stmt_vec_info, vect_is_simple_use): Likewise.
10495 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10497         * tree-vectorizer.h (vect_finish_replace_stmt): Return a stmt_vec_info
10498         (vect_finish_stmt_generation): Likewise.
10499         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
10500         (vect_finish_replace_stmt, vect_finish_stmt_generation): Likewise.
10501         (vect_build_gather_load_calls): Use the return value of the above
10502         functions instead of a separate call to vinfo_for_stmt.  Use narrow
10503         scopes for the input gimple stmt and wider scopes for the associated
10504         stmt_vec_info.  Use vec_info::lookup_def when setting these
10505         stmt_vec_infos from an SSA_NAME definition.
10506         (vectorizable_bswap, vectorizable_call, vectorizable_simd_clone_call)
10507         (vect_create_vectorized_demotion_stmts, vectorizable_conversion)
10508         (vectorizable_assignment, vectorizable_shift, vectorizable_operation)
10509         (vectorizable_store, vectorizable_load, vectorizable_condition)
10510         (vectorizable_comparison): Likewise.
10511         * tree-vect-loop.c (vectorize_fold_left_reduction): Likewise.
10512         (vectorizable_reduction): Likewise.
10514 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10516         * tree-vectorizer.h (vect_is_simple_use): Add an optional
10517         stmt_vec_info * parameter before the optional gimple **.
10518         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10519         (process_use, vect_get_vec_def_for_operand_1): Update callers.
10520         (vect_get_vec_def_for_operand, vectorizable_shift): Likewise.
10521         * tree-vect-loop.c (vectorizable_reduction): Likewise.
10522         (vectorizable_live_operation): Likewise.
10523         * tree-vect-patterns.c (type_conversion_p): Likewise.
10524         (vect_look_through_possible_promotion): Likewise.
10525         (vect_recog_rotate_pattern): Likewise.
10526         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
10528 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10530         * tree-vectorizer.h (stmt_vec_info): Temporarily change from
10531         a typedef to a wrapper class.
10532         (NULL_STMT_VEC_INFO): New macro.
10533         (vec_info::stmt_infos): Change to vec<stmt_vec_info>.
10534         (stmt_vec_info::operator*): New function.
10535         (stmt_vec_info::operator gimple *): Likewise.
10536         (set_vinfo_for_stmt): Use NULL_STMT_VEC_INFO.
10537         (add_stmt_costs): Likewise.
10538         * tree-vect-loop-manip.c (iv_phi_p): Likewise.
10539         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost)
10540         (vect_get_known_peeling_cost): Likewise.
10541         (vect_estimate_min_profitable_iters): Likewise.
10542         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10543         * tree-vect-slp.c (vect_remove_slp_scalar_calls): Likewise.
10544         * tree-vect-stmts.c (vect_build_gather_load_calls): Likewise.
10545         (vectorizable_store, free_stmt_vec_infos): Likewise.
10546         (new_stmt_vec_info): Change return type of xcalloc to
10547         _stmt_vec_info *.
10549 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10551         * tree-vectorizer.h (vec_info::lookup_single_use): Declare.
10552         * tree-vectorizer.c (vec_info::lookup_single_use): New function.
10553         * tree-vect-loop.c (vectorizable_reduction): Use it instead of
10554         a single_imm_use-based sequence.
10555         * tree-vect-stmts.c (supportable_widening_operation): Likewise.
10557 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10559         * tree-vectorizer.h (vec_info::lookup_def): Declare.
10560         * tree-vectorizer.c (vec_info::lookup_def): New function.
10561         * tree-vect-patterns.c (vect_get_internal_def): Use it.
10562         (vect_widened_op_tree): Likewise.
10563         * tree-vect-stmts.c (vect_is_simple_use): Likewise.
10564         * tree-vect-loop.c (vect_analyze_loop_operations): Likewise.
10565         (vectorizable_reduction): Likewise.
10566         (vect_valid_reduction_input_p): Take a stmt_vec_info instead
10567         of a gimple *.
10568         (vect_is_slp_reduction): Update calls accordingly.  Use
10569         vec_info::lookup_def.
10570         (vect_is_simple_reduction): Likewise
10571         * tree-vect-slp.c (vect_detect_hybrid_slp_1): Use vec_info::lookup_def.
10573 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10575         * tree-vectorizer.h (vec_info::lookup_stmt): Declare.
10576         * tree-vectorizer.c (vec_info::lookup_stmt): New function.
10577         * tree-vect-loop.c (vect_determine_vf_for_stmt): Use it instead
10578         of vinfo_for_stmt.
10579         (vect_determine_vectorization_factor, vect_analyze_scalar_cycles_1)
10580         (vect_compute_single_scalar_iteration_cost, vect_analyze_loop_form)
10581         (vect_update_vf_for_slp, vect_analyze_loop_operations)
10582         (vect_is_slp_reduction, vectorizable_induction)
10583         (vect_transform_loop_stmt, vect_transform_loop): Likewise.
10584         * tree-vect-patterns.c (vect_init_pattern_stmt):
10585         (vect_determine_min_output_precision_1, vect_determine_precisions)
10586         (vect_pattern_recog): Likewise.
10587         * tree-vect-stmts.c (vect_analyze_stmt, vect_transform_stmt): Likewise.
10588         * config/powerpcspe/powerpcspe.c (rs6000_density_test): Likewise.
10589         * config/rs6000/rs6000.c (rs6000_density_test): Likewise.
10590         * tree-vect-slp.c (vect_detect_hybrid_slp_stmts): Likewise.
10591         (vect_detect_hybrid_slp_1, vect_detect_hybrid_slp_2)
10592         (vect_detect_hybrid_slp): Likewise.  Change the walk_stmt_info
10593         info field from a loop to a loop_vec_info.
10595 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10597         * tree-vectorizer.h (stmt_vec_info): Move typedef earlier in file.
10598         (vec_info::add_stmt): Declare.
10599         * tree-vectorizer.c (vec_info::add_stmt): New function.
10600         * tree-vect-data-refs.c (vect_create_data_ref_ptr): Use it.
10601         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Likewise.
10602         (vect_create_epilog_for_reduction, vectorizable_reduction): Likewise.
10603         (vectorizable_induction): Likewise.
10604         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Likewise.
10605         * tree-vect-stmts.c (vect_finish_stmt_generation_1): Likewise.
10606         (vectorizable_simd_clone_call, vectorizable_store): Likewise.
10607         (vectorizable_load): Likewise.
10608         * tree-vect-patterns.c (vect_init_pattern_stmt): Likewise.
10609         (vect_recog_bool_pattern, vect_recog_mask_conversion_pattern)
10610         (vect_recog_gather_scatter_pattern): Likewise.
10611         (append_pattern_def_seq): Likewise.  Remove a check that is
10612         performed by add_stmt itself.
10614 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10616         * tree-vect-loop.c (vectorizable_reduction): Fix an instance in
10617         which make_ssa_name was called with new_stmt before new_stmt
10618         had been created.
10620 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10622         * tree-vect-loop.c (vect_valid_reduction_input_p): New function,
10623         split out from...
10624         (vect_is_slp_reduction): ...here...
10625         (vect_is_simple_reduction): ...and here.  Remove repetition of tests
10626         that are already known to be false.
10628 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10630         * tree-vectorizer.h (vect_free_slp_instance): Add a final_p parameter.
10631         * tree-vect-slp.c (vect_free_slp_tree): Likewise.  Don't update
10632         STMT_VINFO_NUM_SLP_USES when it's true.
10633         (vect_free_slp_instance): Add a final_p parameter and pass it to
10634         vect_free_slp_tree.
10635         (vect_build_slp_tree_2): Update call to vect_free_slp_instance.
10636         (vect_analyze_slp_instance): Likewise.
10637         (vect_slp_analyze_operations): Likewise.
10638         (vect_slp_analyze_bb_1): Likewise.
10639         * tree-vectorizer.c (vec_info): Likewise.
10640         * tree-vect-loop.c (vect_transform_loop): Likewise.
10642 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10644         * tree-vect-loop.c (vectorizable_reduction): Assert that the
10645         function is not called for second and subsequent members of
10646         a reduction group.
10648 2018-07-31  Richard Sandiford  <richard.sandiford@arm.com>
10650         * tree-vect-loop.c (get_initial_def_for_reduction): Move special
10651         cases for nested loops from here to ...
10652         (vect_create_epilog_for_reduction): ...here.  Only call
10653         vect_is_simple_use for inner-loop reductions.
10655 2018-07-31  Martin Liska  <mliska@suse.cz>
10657         PR gcov-profile/85338
10658         PR gcov-profile/85350
10659         PR gcov-profile/85372
10660         * profile.c (struct location_triplet): New.
10661         (struct location_triplet_hash): Likewise.
10662         (output_location): Do not output a BB that
10663         is already recorded for a line.
10664         (branch_prob): Use streamed_locations.
10666 2018-07-31  Martin Liska  <mliska@suse.cz>
10668         PR gcov-profile/85370
10669         * coverage.c (coverage_begin_function): Do not mark target
10670         clones as artificial functions.
10672 2018-07-31  Martin Liska  <mliska@suse.cz>
10674         PR gcov-profile/83813
10675         PR gcov-profile/84758
10676         PR gcov-profile/85217
10677         PR gcov-profile/85332
10678         * profile.c (branch_prob): Do not record GOTO expressions
10679         for GIMPLE statements which locations are already streamed.
10681 2018-07-31  Olivier Hainque  <hainque@adacore.com>
10683         * gcc.c (handle_spec_function): Accept a soft_matched_part
10684         argument, as do_spec_1.  Pass it down to ...
10685         (eval_spec_function): Accept a soft_matched_part argument,
10686         and pass it down to ...
10687         (do_spec_2): Accept a soft_matched_part argument, and pass
10688         it down to do_spec_1.
10689         (do_spec_1): Pass soft_matched_part to handle_spec_function.
10690         (handle_braces): Update call to handle_spec_function.
10691         (driver::set_up_specs): Update calls to do_spec_2.
10692         (compare_debug_dump_opt_spec_function): Likewise.
10693         (compare_debug_self_opt_spec_function): Likewise.
10695 2018-07-31  Olivier Hainque  <hainque@adacore.com>
10697         * common.opt (nolibc): New option.
10698         * doc/invoke.texi (Link Options): Document it.
10699         * gcc.c (LINK_GCC_C_SEQUENCE_SPEC): Honor nolibc.
10700         * config/alpha/linux.h: Likewise.
10701         * config/arc/elf.h: Likewise.
10702         * config/arm/uclinux-elf.h: Likewise.
10703         * config/arm/unknown-elf.h: Likewise.
10704         * config/avr/avrlibc.h: Likewise.
10705         * config/bfin/bfin.h: Likewise.
10706         * config/bfin/linux.h: Likewise.
10707         * config/bfin/uclinux.h: Likewise.
10708         * config/darwin.h: Likewise.
10709         * config/darwin10.h: Likewise.
10710         * config/darwin12.h: Likewise.
10711         * config/gnu-user.h: Likewise.
10712         * config/lm32/uclinux-elf.h: Likewise.
10713         * config/pa/pa-hpux11.h: Likewise.
10714         * config/pa/pa64-hpux.h: Likewise.
10715         * config/sparc/sparc.h: Likewise.
10717 2018-07-31  Olivier Hainque  <hainque@adacore.com>
10719         * gcc.c (getenv_spec_function): Prepend '/' to value for allowed
10720         undefined variables.
10722 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
10724         PR target/86640
10725         * config/arm/arm.c (arm_block_set_aligned_vect): Use gen_int_mode
10726         instead of GEN_INT.
10728 2018-07-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10730         * tree-ssa-forwprop.c (simplify_builtin_call): Don't create a not NUL
10731         terminated string literal.
10733 2018-07-30  Segher Boessenkool  <segher@kernel.crashing.org>
10735         PR rtl-optimization/85160
10736         * combine.c (is_just_move): New function.
10737         (try_combine): Allow combining two instructions into two if neither of
10738         the original instructions was a move.
10740 2018-07-30  Alexander Monakov  <amonakov@ispras.ru>
10742         PR target/86673
10743         * doc/extend.texi (Global Register Variables): Discourage use of type
10744         qualifiers.
10745         (Local Register Variables): Likewise.
10747 2018-07-30  Richard Sandiford  <richard.sandiford@arm.com>
10749         PR tree-optimization/86506
10750         * hwint.h (ceil_log2): Resync with hwint.c implementation.
10752 2018-07-30  Ilya Leoshkevich  <iii@linux.ibm.com>
10754         PR target/86547
10755         * lra-constraints.c (spill_hard_reg_in_range): When selecting the
10756         hard_regno, make sure no insn between `from` and `to` clobbers it.
10758 2018-07-30  Cesar Philippidis  <cesar@codesourcery.com>
10759             Tom de Vries  <tdevries@suse.de>
10761         * config/nvptx/nvptx.c (PTX_GANG_DEFAULT): Rename to ...
10762         (PTX_DEFAULT_RUNTIME_DIM): ... this.
10763         (nvptx_goacc_validate_dims): Set default worker and gang dims to
10764         PTX_DEFAULT_RUNTIME_DIM.
10765         (nvptx_dim_limit): Ignore GOMP_DIM_WORKER.
10767 2018-07-29  John David Anglin  <danglin@gcc.gnu.org>
10769         * config/pa/pa.c (pa_output_addr_vec): Align address table.
10770         * config/pa/pa.h (JUMP_TABLES_IN_TEXT_SECTION): Revise comment.
10771         * config/pa/pa32-linux.h (JUMP_TABLES_IN_TEXT_SECTION): Define.
10773 2018-07-27  Michael Meissner  <meissner@linux.ibm.com>
10775         * config/rs6000/constraints.md (wG constraint): Delete, no longer
10776         used.
10777         * config/rs6000/predicates.md (p9_fusion_reg_operand): Rename
10778         predicate to reflect toc fusion has been deleted.
10779         (toc_fusion_mem_raw): Delete, no longer used.
10780         (toc_fusion_mem_wrapped): Likewise.
10781         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete toc
10782         fusion mask bit.
10783         * config/rs6000/rs6000-protos.h (fusion_wrap_memory_address):
10784         Delete, no longer used.
10785         * config/rs6000/rs6000.c (struct rs6000_reg_addr): Delete fields
10786         meant to be used for toc fusion.
10787         (rs6000_debug_print_mode): Delete toc fusion debugging.
10788         (rs6000_debug_reg_global): Likewise.
10789         (rs6000_init_hard_regno_mode_ok): Delete setting up fields for toc
10790         fusion and secondary reload support that were never used.
10791         (rs6000_option_override_internal): Delete TOC fusion, that was only
10792         partially defined, and it did not work unless you also used the
10793         -mcmodel= switch.
10794         (rs6000_legitimate_address_p): Delete TOC fusion support.
10795         (rs6000_opt_masks): Likewise.
10796         (fusion_wrap_memory_address): Delete function, no longer used.
10797         (fusion_split_address); Delete TOC fusion support.
10798         * config/rs6000/rs6000.h (TARGET_TOC_FUSION_INT): Delete, no
10799         longer used with toc fusion being deleted.
10800         (TARGET_TOC_FUSION_FP): Likewise.
10801         * config/rs6000/rs6000.md (UNSPEC_FUSION_ADDIS): Delete TOC fusion
10802         UNSPEC.
10803         (toc fusion spliter): Delete TOC fusion support.
10804         (toc_fusionload_<mode>): Likewise.
10805         (toc_fusionload_di): Likewise.
10806         (fusion_gpr_load_<mode>): Delete generator function, this insn no
10807         longer needs to be named.  Rename predicate to delete TOC fusion.
10808         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
10809         (fusion_gpr_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
10810         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_load): Likewise.
10811         (fusion_vsx_<P:mode>_<GPR_FUSION:mode>_store): Likewise.
10812         (p9 fusion peephole2s): Rename predicate to delete TOC fusion.
10814 2018-07-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
10816         * doc/extend.texi (Basic PowerPC Built-in Functions Available on
10817         ISA 2.05):  Replace __uint128_t with __uint128 and __int128_t with
10818         __int128 in built-in function prototypes.
10819         (PowerPC AltiVec Built-in Functions on ISA 2.07): Likewise.
10820         (PowerPC AltiVec Built-in Functions on ISA 3.0): Likewise.
10822 2018-07-27  Martin Sebor  <msebor@redhat.com>
10824         PR tree-optimization/86696
10825         * tree-ssa-strlen.c (get_min_string_length): Handle all integer
10826         types, including enums.
10827         (handle_char_store): Be prepared for the above function to fail.
10829 2018-07-26  Qing Zhao  <qing.zhao@oracle.com>
10831         * builtins.c (inline_expand_builtin_string_cmp): Disable inlining
10832         when optimization level is lower than 2 or optimize for size.
10834 2018-07-26  Martin Sebor  <msebor@redhat.com>
10836         PR tree-optimization/86043
10837         PR tree-optimization/86042
10838         * tree-ssa-strlen.c (handle_builtin_memcpy): Handle strict overlaps.
10839         (get_string_cst_length): Rename...
10840         (get_min_string_length): ...to this.  Add argument.
10841         (handle_char_store): Extend to handle multi-character stores by
10842         MEM_REF.
10843         * tree.c (initializer_zerop): Use new argument.  Handle MEM_REF.
10844         * tree.h (initializer_zerop): Add argument.
10846 2018-07-26  Jakub Jelinek  <jakub@redhat.com>
10848         PR middle-end/86660
10849         * omp-low.c (scan_sharing_clauses): Don't ignore map clauses for
10850         declare target to variables if they have always,{to,from,tofrom} map
10851         kinds.
10853 2018-07-26  Martin Liska  <mliska@suse.cz>
10855         PR lto/86548
10856         * lto-wrapper.c: Add linker_output as prefix
10857         for ltrans_output_file.
10859 2018-07-26  Segher Boessenkool  <segher@kernel.crashing.org>
10861         PR rtl-optimization/85805
10862         * combine.c (reg_nonzero_bits_for_combine): Only use the last set
10863         value for hard registers if that was written in the same mode.
10865 2018-07-26  Martin Liska  <mliska@suse.cz>
10867         PR gcov-profile/86536
10868         * gcov.c (format_gcov): Use printf format %.*f directly
10869         and do not handle special values.
10871 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
10873         * common/config/arc/arc-common.c (arc_option_optimization_table):
10874         Update default optimizations for size.
10876 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
10878         * config/arc/arc.md (movsf_insn): Add short instruction selection.
10879         * config/arc/constraints.md (CfZ): New constraint.
10880         * config/arc/fpu.md (addssf3_fpu): Use CfZ constraint.
10881         (subsf3_fpu): Likewise.
10882         (cmpsf_fpu): Likewise.
10883         (cmpsf_fpu_uneq): Likewise.
10885 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
10887         * config/arc/arc.c (compact_memory_operand_p): Check for uncached
10888         accesses as well.
10889         (arc_is_uncached_mem_p): uncached applies to both the variable and
10890         the pointer.
10892 2018-07-25  Claudiu Zissulescu  <claziss@synopsys.com>
10894         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Add additional
10895         register names.
10897 2018-07-25  David Malcolm  <dmalcolm@redhat.com>
10899         * optinfo-emit-json.cc (class optrecord_json_writer): Convert
10900         field "m_scopes" from vec to auto_vec.
10902 2018-07-25  Martin Liska  <mliska@suse.cz>
10904         * config/powerpcspe/powerpcspe-protos.h (rs6000_loop_align): Fix
10905         return type.
10907 2018-07-25  Richard Biener  <rguenther@suse.de>
10909         PR debug/86654
10910         * dwarf2out.c (dwarf2out_decl): Do not handle nested functions
10911         special wrt context_die late.
10912         (gen_subprogram_die): Re-use DIEs in local scope.
10914 2018-07-25  Richard Sandiford  <richard.sandiford@arm.com>
10916         PR tree-optimization/86644
10917         * hwint.c (ceil_log2): Fix comment.  Return 0 for 0.
10919 2018-07-25  Martin Liska  <mliska@suse.cz>
10921         PR middle-end/86645
10922         * dumpfile.c: And excluded values with TDF_ALL_VALUES.
10923         * dumpfile.h (enum dump_flag): Defince TDF_ALL_VALUES.
10925 2018-07-25  Martin Liska  <mliska@suse.cz>
10927         PR sanitizer/79635
10928         * params.def: Explain ASan abbreviation and provide
10929         a documentation link.
10931 2018-07-24  Martin Sebor  <msebor@redhat.com>
10933         PR tree-optimization/86622
10934         PR tree-optimization/86532
10935         * builtins.h (string_length): Declare.
10936         * builtins.c (c_strlen): Correct handling of non-constant offsets.
10937         (check_access): Be prepared for non-constant length ranges.
10938         (string_length): Make extern.
10939         * expr.c (string_constant): Only handle the minor non-constant
10940         array index.  Use string_constant to compute the length of
10941         a generic string constant.
10943 2018-07-24  Richard Sandiford  <richard.sandiford@arm.com>
10945         PR tree-optimization/86618
10946         * tree-vect-stmts.c (vectorizable_call): Don't take the address
10947         of LOOP_VINFO_MASKS (loop_vinfo) when loop_vinfo is null.
10949 2018-07-24  David Malcolm  <dmalcolm@redhat.com>
10951         PR tree-optimization/86636
10952         * json.cc (json::object::set): Fix comment.  Add assertions.
10953         (json::array::append): Move here from json.h.  Add comment and an
10954         assertion.
10955         (json::string::string): Likewise.
10956         * json.h (json::array::append): Move to json.cc.
10957         (json::string::string): Likewise.
10958         * optinfo-emit-json.cc
10959         (optrecord_json_writer::impl_location_to_json): Assert that we
10960         aren't attempting to write out UNKNOWN_LOCATION, or an ad-hoc
10961         wrapper around it.  Expand the location once, rather than three
10962         times.
10963         (optrecord_json_writer::inlining_chain_to_json): Fix the check for
10964         UNKNOWN_LOCATION, to use LOCATION_LOCUS to look through ad-hoc
10965         wrappers.
10966         (optrecord_json_writer::optinfo_to_json): Likewise, in four
10967         places.  Fix some overlong lines.
10969 2018-07-24  Matthew Malcomson  <matthew.malcomson@arm.com>
10971         * config/aarch64/aarch64-simd.md
10972         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>): Split into...
10973         (aarch64_<ANY_EXTEND:su>subw<mode>): ... This...
10974         (aarch64_<ANY_EXTEND:su>addw<mode>): ... And this.
10975         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w<mode>_internal): Split into...
10976         (aarch64_<ANY_EXTEND:su>subw<mode>_internal): ... This...
10977         (aarch64_<ANY_EXTEND:su>addw<mode>_internal): ... And this.
10978         (aarch64_<ANY_EXTEND:su><ADDSUB:optab>w2<mode>_internal): Split into...
10979         (aarch64_<ANY_EXTEND:su>subw2<mode>_internal): ... This...
10980         (aarch64_<ANY_EXTEND:su>addw2<mode>_internal): ... And this.
10982 2018-07-24  Jakub Jelinek  <jakub@redhat.com>
10984         PR middle-end/86627
10985         * expmed.c (expand_divmod): Punt if d == HOST_WIDE_INT_MIN
10986         and size > HOST_BITS_PER_WIDE_INT.  For size > HOST_BITS_PER_WIDE_INT
10987         and abs_d == d, do the power of two handling if profitable.
10989 2018-07-24  Richard Biener  <rguenther@suse.de>
10991         * match.pd: Add BIT_FIELD_REF canonicalizations.
10993 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
10995         PR c/86617
10996         * genmatch.c (dt_operand::gen_match_op): Avoid folding volatile values.
10998 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11000         * gimple-fold.c (gimple_fold_builtin_printf): Don't create a not NUL
11001         terminated STRING_CST object.
11003 2018-07-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11005         hsa-dump.c (dump_hsa_symbol): Avoid out of scope access to buf.
11007 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
11009         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Adjust.
11010         * config/rs6000/rs6000-protos.h (rs6000_split_v4si_init): Delete.
11011         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Always force
11012         the elements into a register.
11013         (rs6000_split_v4si_init_di_reg): Delete.
11014         (rs6000_split_v4si_init): Delete.
11015         * config/rs6000/vsx.md (unspec): Delete UNSPEC_VSX_VEC_INIT.
11016         (vsx_init_v4si): Rewrite as a define_expand.
11018 2018-07-23  Segher Boessenkool  <segher@kernel.crashing.org>
11020         * config/rs6000/rs6000.md (splitters for rldimi and rlwimi with the
11021         zero_extend argument from memory): New.
11023 2018-07-22  Martin Sebor  <msebor@redhat.com>
11025         PR bootstrap/86621
11026         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Avoid
11027         diagnosing calls with unknown arguments unless -Walloca-larger-than
11028         is restricted to less than PTRDIFF_MAX bytes.
11030 2018-07-22  Gerald Pfeifer  <gerald@pfeifer.com>
11032         * doc/gcov.texi (Invoking Gcov): Editorial changes.
11034 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
11036         * pretty-print.c (text_info::set_location): Remove redundant
11037         "line_table" parameter from call to rich_location::set_range.
11039 2018-07-20  Martin Sebor  <msebor@redhat.com>
11041         PR middle-end/82063
11042         * builtins.c (expand_builtin_alloca): Adjust.
11043         * calls.c (alloc_max_size): Simplify.
11044         * cgraphunit.c (cgraph_node::expand): Adjust.
11045         * common.opt (larger_than_size, warn_frame_larger_than): Remove
11046         variables.
11047         (frame_larger_than_size): Same.
11048         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Change options
11049         to take a HOST_WIDE_INT argument and accept a byte-size suffix.
11050         Initialize.
11051         * doc/invoke.texi (GCC Command Options): Document option arguments.
11052         Explain byte-size arguments and suffixes.
11053         (-Wvla-larger-than, -Wno-alloc-size-larger-than): Update.
11054         (-Wno-alloca-larger-than, -Wno-vla-larger-than): Same.
11055         (-Wframe-larger-than, -Wlarger-than, -Wstack-usage): Same.
11056         * doc/options.texi (UInteger): Expand.
11057         (Host_Wide_Int, ByteSize): Document new properties.
11058         * final.c (final_start_function_1): Include sizes in an error message.
11059         * function.c (frame_offset_overflow): Same.
11060         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Adjust.
11061         (alloca_call_type_by_arg): Change function argument to HOST_WIDE_INT.
11062         Diagnose unbounded alloca calls only for limits of less than
11063         PTRDIFF_MAX.
11064         (alloca_call_type): Adjust.  Diagnose possibly out-of-bounds alloca
11065         calls and VLA size only for limits of less than PTRDIFF_MAX.  Same
11066         for alloca(0).
11067         (pass_walloca::execute): Adjust.  Diagnose alloca calls in loops
11068         only for limits of less than PTRDIFF_MAX.
11069         * langhooks-def.h (lhd_handle_option): Change function argument
11070         to HOST_WIDE_INT.
11071         * langhooks.c (lhd_handle_option): Same.
11072         * langhooks.h (handle_option): Same.
11073         * opt-functions.awk (switch_bit_fields): Handle Host_Wide_Int and
11074         ByteSize flags.
11075         (var_type, var_type_struct): Same.
11076         (var_set): Handle ByteSize flag.
11077         * optc-gen.awk: Add comments to output to ease debugging.  Make
11078         use of HOST_WIDE_INT where appropriate.
11079         * opts-gen-save.awk:  Use %lx to format unsigned long.
11080         * opth-gen.awk: Change function argument to HOST_WIDE_INT.
11081         * opts-common.c (integral_argument): Return HOST_WIDE_INT and add
11082         arguments.  Parse bytes-size suffixes.
11083         (enum_arg_to_value): Change function argument to HOST_WIDE_INT.
11084         (enum_value_to_arg): Same.
11085         (decode_cmdline_option): Handle cl_host_wide_int.  Adjust.
11086         (handle_option): Adjust.
11087         (generate_option): Change function argument to HOST_WIDE_INT.
11088         (cmdline_handle_error): Adjust.
11089         (read_cmdline_option): Change function argument to HOST_WIDE_INT.
11090         (set_option): Change function argument to HOST_WIDE_INT.
11091         (option_enabled): Handle cl_host_wide_int.
11092         (get_option_state): Handle CLVC_SIZE.
11093         (control_warning_option): Same.
11094         * opts.c (common_handle_option): Change function argument to
11095         HOST_WIDE_INT.  Remove handling of OPT_Walloca_larger_than_ and
11096         OPT_Wvla_larger_than_.
11097         * opts.h (enum cl_var_type): Add an enumerator.
11098         * stor-layout.c (layout_decl): Print a more meaningful warning.
11099         * toplev.c (output_stack_usage): Adjust.
11101 2018-07-20  Qing Zhao  <qing.zhao@oracle.com>
11103         * builtins.c (expand_builtin_memcmp): Delete the last parameter for
11104         call to inline_expand_builtin_string_cmp.
11105         (expand_builtin_strcmp): Likewise.
11106         (expand_builtin_strncmp): Likewise.
11107         (inline_string_cmp): Delete the last parameter, change char_type_node
11108         to unsigned_char_type_node for strcmp/strncmp, add conversions to the
11109         two operands.
11110         (inline_expand_builtin_string_cmp): Delete the last parameter, give up
11111         the inlining expansion on target where the type of the call has same or
11112         narrower precision than unsigned char.
11114 2018-07-20  David Malcolm  <dmalcolm@redhat.com>
11116         * Makefile.in (OBJS): Add json.o and optinfo-emit-json.o.
11117         (CFLAGS-optinfo-emit-json.o): Define TARGET_NAME.
11118         * common.opt (fsave-optimization-record): New option.
11119         * coretypes.h (struct kv_pair): Move here from dumpfile.c.
11120         * doc/invoke.texi (-fsave-optimization-record): New option.
11121         * dumpfile.c: Include "optinfo-emit-json.h".
11122         (struct kv_pair): Move to coretypes.h.
11123         (optgroup_options): Make non-static.
11124         (dump_context::end_scope): Call
11125         optimization_records_maybe_pop_dump_scope.
11126         * dumpfile.h (optgroup_options): New decl.
11127         * json.cc: New file.
11128         * json.h: New file.
11129         * optinfo-emit-json.cc: New file.
11130         * optinfo-emit-json.h: New file.
11131         * optinfo.cc: Include "optinfo-emit-json.h".
11132         (optinfo::emit): Call optimization_records_maybe_record_optinfo.
11133         (optinfo_enabled_p): Check optimization_records_enabled_p.
11134         (optinfo_wants_inlining_info_p): Likewise.
11135         * optinfo.h: Update comment.
11136         * profile-count.c (profile_quality_as_string): New function.
11137         * profile-count.h (profile_quality_as_string): New decl.
11138         (profile_count::quality): New accessor.
11139         * selftest-run-tests.c (selftest::run_tests): Call json_cc_tests
11140         and optinfo_emit_json_cc_tests.
11141         * selftest.h (selftest::json_cc_tests): New decl.
11142         (selftest::optinfo_emit_json_cc_tests): New decl.
11143         * toplev.c: Include "optinfo-emit-json.h".
11144         (compile_file): Call optimization_records_finish.
11145         (do_compile): Call optimization_records_start.
11146         * tree-ssa-live.c: Include optinfo.h.
11147         (remove_unused_scope_block_p): Retain inlining information if
11148         optinfo_wants_inlining_info_p returns true.
11150 2018-07-20  Richard Biener  <rguenther@suse.de>
11152         PR debug/86585
11153         * dwarf2out.c (dwarf2out_die_ref_for_decl): Test in_lto_p
11154         to cover -flto-partition=none.
11156 2018-07-20  Martin Liska  <mliska@suse.cz>
11158         * tree.h (DECL_LOCATION_RANGE): Remove unused macro.
11159         (get_decl_source_range): Remove unused function.
11161 2018-07-20  Richard Biener  <rguenther@suse.de>
11163         * tree-ssa-sccvn.h (struct vn_nary_op_s): Add next member.
11164         (struct vn_phi_s): Likewise.
11165         (struct vn_reference_s): Likewise.
11166         * tree-ssa-sccvn.c (vn_nary_op_hasher::equal): Add shortcut
11167         for searching the slot of an entry known to be in the hash itself.
11168         (vn_phi_hasher::equal): Likewise.
11169         (vn_reference_hasher::equal): Likewise.
11170         (last_inserted_ref, last_inserted_phi, last_inserted_nary): New
11171         globals.
11172         (optimistic_info, current_info): Remove, keeping only valid_info.
11173         (vn_reference_lookup_1): Remove fallback lookup.
11174         (vn_reference_lookup_2): Likewise.
11175         (vn_nary_op_lookup_1): Likewise.
11176         (vn_phi_lookup): Likewise.
11177         (vn_nary_build_or_lookup_1): Make sure to not chain the built
11178         hash element.
11179         (vn_reference_insert): Adjust, chain the inserted hash element
11180         at last_inserted_ref.
11181         (vn_reference_insert_pieces): Likewise.
11182         (visit_reference_op_call): Likewise.
11183         (vn_nary_op_insert_into): Chain the inserted hash element at
11184         last_inserted_nary.
11185         (vn_nary_op_insert_pieces): Adjust.
11186         (vn_nary_op_insert): Likewise.
11187         (vn_nary_op_insert_stmt): Likewise.
11188         (vn_phi_insert): Adjust, chain the inserted hash element at
11189         last_inserted_phi.
11190         (process_scc): Remove clearing and copying the optimistic
11191         table.  Instead remove elements inserted during an optimistic
11192         iteration from the single table we maintain.
11193         (init_scc_vn): Adjust.
11194         (free_scc_vn): Likewise.
11195         (sccvn_dom_walker::record_cond): Likewise.
11196         (sccvn_dom_walker::after_dom_children): Likewise.
11198 2018-07-19  Martin Sebor  <msebor@redhat.com>
11200         PR tree-optimization/84047
11201         PR tree-optimization/83776
11202         * tree-vrp.c (vrp_prop::check_mem_ref): New function.
11203         (check_array_bounds): Call it.
11205 2018-07-19  Martin Sebor  <msebor@redhat.com>
11207         * align.h (align_flags): Use member initialization.
11209 2018-07-19  David Malcolm  <dmalcolm@redhat.com>
11211         * Makefile.in (OBJS): Add optinfo.o.
11212         * coretypes.h (class symtab_node): New forward decl.
11213         (struct cgraph_node): New forward decl.
11214         (class varpool_node): New forward decl.
11215         * dump-context.h: New file.
11216         * dumpfile.c: Include "optinfo.h", "dump-context.h", "cgraph.h",
11217         "tree-pass.h".
11218         (refresh_dumps_are_enabled): Use optinfo_enabled_p.
11219         (set_dump_file): Call dumpfile_ensure_any_optinfo_are_flushed.
11220         (set_alt_dump_file): Likewise.
11221         (dump_context::~dump_context): New dtor.
11222         (dump_gimple_stmt): Move implementation to...
11223         (dump_context::dump_gimple_stmt): ...this new member function.
11224         Add the stmt to any pending optinfo, creating one if need be.
11225         (dump_gimple_stmt_loc): Move implementation to...
11226         (dump_context::dump_gimple_stmt_loc): ...this new member function.
11227         Start a new optinfo and add the stmt to it.
11228         (dump_gimple_expr): Move implementation to...
11229         (dump_context::dump_gimple_expr): ...this new member function.
11230         Add the stmt to any pending optinfo, creating one if need be.
11231         (dump_gimple_expr_loc): Move implementation to...
11232         (dump_context::dump_gimple_expr_loc): ...this new member function.
11233         Start a new optinfo and add the stmt to it.
11234         (dump_generic_expr): Move implementation to...
11235         (dump_context::dump_generic_expr): ...this new member function.
11236         Add the tree to any pending optinfo, creating one if need be.
11237         (dump_generic_expr_loc): Move implementation to...
11238         (dump_context::dump_generic_expr_loc): ...this new member
11239         function.  Add the tree to any pending optinfo, creating one if
11240         need be.
11241         (dump_printf): Move implementation to...
11242         (dump_context::dump_printf_va): ...this new member function.  Add
11243         the text to any pending optinfo, creating one if need be.
11244         (dump_printf_loc): Move implementation to...
11245         (dump_context::dump_printf_loc_va): ...this new member function.
11246         Start a new optinfo and add the stmt to it.
11247         (dump_dec): Move implementation to...
11248         (dump_context::dump_dec): ...this new member function.  Add the
11249         value to any pending optinfo, creating one if need be.
11250         (dump_context::dump_symtab_node): New member function.
11251         (dump_context::get_scope_depth): New member function.
11252         (dump_context::begin_scope): New member function.
11253         (dump_context::end_scope): New member function.
11254         (dump_context::ensure_pending_optinfo): New member function.
11255         (dump_context::begin_next_optinfo): New member function.
11256         (dump_context::end_any_optinfo): New member function.
11257         (dump_context::s_current): New global.
11258         (dump_context::s_default): New global.
11259         (dump_scope_depth): Delete global.
11260         (dumpfile_ensure_any_optinfo_are_flushed): New function.
11261         (dump_symtab_node): New function.
11262         (get_dump_scope_depth): Reimplement in terms of dump_context.
11263         (dump_begin_scope): Likewise.
11264         (dump_end_scope): Likewise.
11265         (selftest::temp_dump_context::temp_dump_context): New ctor.
11266         (selftest::temp_dump_context::~temp_dump_context): New dtor.
11267         (selftest::verify_item): New function.
11268         (ASSERT_IS_TEXT): New macro.
11269         (ASSERT_IS_TREE): New macro.
11270         (ASSERT_IS_GIMPLE): New macro.
11271         (selftest::test_capture_of_dump_calls): New test.
11272         (selftest::dumpfile_c_tests): Call it.
11273         * dumpfile.h (dump_printf, dump_printf_loc, dump_basic_block)
11274         (dump_generic_expr_loc, dump_generic_expr, dump_gimple_stmt_loc)
11275         (dump_gimple_stmt, dump_dec): Gather these related decls and add a
11276         descriptive comment.
11277         (dump_function, print_combine_total_stats, enable_rtl_dump_file)
11278         (dump_node, dump_bb): Move these unrelated decls.
11279         (class dump_manager): Add leading comment.
11280         * optinfo.cc: New file.
11281         * optinfo.h: New file.
11283 2018-07-19  Michael Collison  <michael.collison@arm.com>
11284             Richard Henderson <rth@redhat.com>
11286         * config/aarch64/aarch64.md (subv<GPI>4, usubv<GPI>4): New patterns.
11287         (subti): Handle op1 zero.
11288         (subvti4, usub4ti4): New.
11289         (*sub<GPI>3_compare1_imm): New.
11290         (sub<GPI>3_carryinCV): New.
11291         (*sub<GPI>3_carryinCV_z1_z2, *sub<GPI>3_carryinCV_z1): New.
11292         (*sub<GPI>3_carryinCV_z2, *sub<GPI>3_carryinCV): New.
11294 2018-07-19  Michael Collison  <michael.collison@arm.com>
11295             Richard Henderson <rth@redhat.com>
11297         * config/aarch64/aarch64.md: (addv<GPI>4, uaddv<GPI>4): New.
11298         (addti3): Create simpler code if low part is already known to be 0.
11299         (addvti4, uaddvti4): New.
11300         (*add<GPI>3_compareC_cconly_imm): New.
11301         (*add<GPI>3_compareC_cconly): New.
11302         (*add<GPI>3_compareC_imm): New.
11303         (*add<GPI>3_compareC): Rename from add<GPI>3_compare1; do not
11304         handle constants within this pattern..
11305         (*add<GPI>3_compareV_cconly_imm): New.
11306         (*add<GPI>3_compareV_cconly): New.
11307         (*add<GPI>3_compareV_imm): New.
11308         (add<GPI>3_compareV): New.
11309         (add<GPI>3_carryinC, add<GPI>3_carryinV): New.
11310         (*add<GPI>3_carryinC_zero, *add<GPI>3_carryinV_zero): New.
11311         (*add<GPI>3_carryinC, *add<GPI>3_carryinV): New.
11312         ((*add<GPI>3_compareC_cconly_imm): Replace 'ne' operator
11313         with 'comparison' operator.
11314         (*add<GPI>3_compareV_cconly_imm): Ditto.
11315         (*add<GPI>3_compareV_cconly): Ditto.
11316         (*add<GPI>3_compareV_imm): Ditto.
11317         (add<GPI>3_compareV): Ditto.
11318         (add<mode>3_carryinC): Ditto.
11319         (*add<mode>3_carryinC_zero): Ditto.
11320         (*add<mode>3_carryinC): Ditto.
11321         (add<mode>3_carryinV): Ditto.
11322         (*add<mode>3_carryinV_zero): Ditto.
11323         (*add<mode>3_carryinV): Ditto.
11325 2018-07-19  Michael Collison  <michael.collison@arm.com>
11326             Richard Henderson <rth@redhat.com>
11328         * config/aarch64/aarch64-modes.def (CC_V): New.
11329         * config/aarch64/aarch64-protos.h
11330         (aarch64_addti_scratch_regs): Declare
11331         (aarch64_subvti_scratch_regs): Declare.
11332         (aarch64_expand_subvti): Declare.
11333         (aarch64_gen_unlikely_cbranch): Declare
11334         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Test
11335         for signed overflow using CC_Vmode.
11336         (aarch64_get_condition_code_1): Handle CC_Vmode.
11337         (aarch64_gen_unlikely_cbranch): New function.
11338         (aarch64_addti_scratch_regs): New function.
11339         (aarch64_subvti_scratch_regs): New function.
11340         (aarch64_expand_subvti): New function.
11342 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11344         * config/aarch64/aarch64-option-extensions.def: New entry for profile
11345         extension.
11346         * config/aarch64/aarch64.h (AARCH64_FL_PROFILE): New.
11347         * doc/invoke.texi (aarch64-feature-modifiers): New entry for profile
11348         extension.
11350 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11352         PR target/83009
11353         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
11354         address check not strict.
11356 2018-07-19  Andre Vieira  <andre.simoesdiasvieira@arm.com>
11358         * config/aarch64/aarch64-simd.md (aarch64_simd_mov<VQ:mode>): Replace
11359         Umq with Umn.
11360         (store_pair_lanes<mode>): Likewise.
11361         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): Add new
11362         enum value 'ADDR_QUERY_LDP_STP_N'.
11363         * config/aarch64/aarch64.c (aarch64_addr_query_type): Likewise.
11364         (aarch64_print_address_internal): Add declaration.
11365         (aarch64_print_ldpstp_address): Remove.
11366         (aarch64_classify_address): Adapt mode for 'ADDR_QUERY_LDP_STP_N'.
11367         (aarch64_print_operand): Change printing of 'y'.
11368         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Use
11369         new enum value 'ADDR_QUERY_LDP_STP_N', don't hardcode mode and use
11370         'true' rather than '1'.
11371         * config/aarch64/constraints.md (Uml): Likewise.
11372         (Uml): Rename to Umn.
11373         (Umq): Remove.
11375 2018-07-19  Richard Biener  <rguenther@suse.de>
11377         * tree-ssa-sccvn.h (struct vn_phi_s): Make phiargs member
11378         a trailing array.
11379         * tree-ssa-sccvn.c: Remove alloc-pool.h use.
11380         (vn_phi_hasher): Derive from nofree_ptr_hash and remove remove method.
11381         (vn_reference_hasher): Likewise.
11382         (struct vn_tables_s): Remove obstack and alloc-pool members.
11383         (vn_tables_obstack, vn_tables_insert_obstack): New global obstacks.
11384         (vn_nary_build_or_lookup_1): Manually build in vn_tables_insert_obstack.
11385         (vn_reference_insert): Allocate from obstack instead of from alloc-pool.
11386         (vn_reference_insert_pieces): Likewise.
11387         (alloc_vn_nary_op_noinit): Adjust.
11388         (vn_nary_op_insert_stmt): Allocate phiargs in-place.
11389         (vn_phi_eq): Adjust.
11390         (shared_lookup_phiargs): Remove.
11391         (vn_phi_lookup): Allocate temporary vn_phi_s on the stack.
11392         (vn_phi_insert): Allocate from obstack instead of from alloc-pool.
11393         (visit_reference_op_call): Likewise.
11394         (copy_nary, copy_phi, copy_reference): Remove.
11395         (process_scc): Rewind the obstack when iterating.  Do not
11396         copy the elements to valid_info but just move them from one
11397         hashtable to the other.
11398         (allocate_vn_table): Adjust.
11399         (free_vn_table): Likewise.
11400         (init_scc_vn): Likewise.
11401         (free_scc_vn): Likewise.
11403 2018-07-19  H.J. Lu  <hongjiu.lu@intel.com>
11405         PR target/86560
11406         * config/i386/i386.c (rest_of_insert_endbranch): Lookup
11407         indirect_return as function type attribute.
11408         (ix86_attribute_table): Change indirect_return to function
11409         type attribute.
11410         * doc/extend.texi: Update indirect_return attribute.
11412 2018-07-19  Aldy Hernandez  <aldyh@redhat.com>
11414         * wide-int.h (widest2_int): New.
11415         * gimple-fold.c (arith_overflowed_p): Use it.
11416         * tree.h (widest2_int_cst): New.
11417         * tree-vrp.c (wide_int_binop_overflow): Rename from
11418         vrp_int_const_binop.
11419         Rewrite to work on trees.
11420         (extract_range_from_multiplicative_op_1): Abstract code to...
11421         (wide_int_range_min_max): ...here.
11422         (wide_int_range_cross_product): ...and here.
11423         (extract_range_from_binary_expr_1): Abstract overflow code to...
11424         (wide_int_range_mult_wrapping): ...here.
11425         * tree-vrp.h (wide_int_range_cross_product): New.
11426         (wide_int_range_mult_wrapping): New.
11428 2018-07-19  Andrew Senkevich  <andrew.senkevich@intel.com>
11429             Julia Koval  <julia.koval@intel.com>
11431         * config/i386/x86-tune-costs.h (skylake_memcpy,
11432         skylake_memset): Replace rep_prefix with unrolling for size 512.
11434 2018-07-18  Kugan Vivekanandarajah  <kuganv@linaro.org>
11436         PR middle-end/86544
11437         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): Handle
11438         comparision with EQ_EXPR in last stmt.
11440 2018-07-18  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11442         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Rename
11443         this subsection to "PowerPC AltiVec/VSX Built-in Functions".
11444         (PowerPC AltiVec/VSX Built-in Functions): New name for subsection
11445         previously known as "PowerPC AltiVec Built-in Functions".  Move
11446         some material to new subsubsections "PowerPC AltiVec Built-in
11447         Functions on ISA 2.06" and "PowerPC AltiVec Built-in Functions on
11448         ISA 2.07".
11449         (PowerPC Altivec Built-in Functions on ISA 2.05): New subsubsection.
11450         (PowerPC Altivec Built-in Functions on ISA 2.06): Likewise.
11451         (PowerPC Altivec Built-in Functions on ISA 2.07): Likewise.
11452         (PowerPC Altivec Built-in Functions on ISA 3.0): Likewise.
11454 2018-07-18  Richard Biener  <rguenther@suse.de>
11456         PR tree-optimization/86557
11457         * tree-vect-patterns.c (vect_recog_divmod_pattern): Also handle
11458         EXACT_DIV_EXPR.
11460 2018-07-18  Ilya Leoshkevich  <iii@linux.ibm.com>
11462         * config/s390/s390.c (s390_function_profiler): Generate CFI.
11464 2018-07-17  Jeff Law  <law@redhat.com>
11466         * config/arm/arm.c (get_label_padding): Update for recent
11467         changes to label_to_alignment.
11469         PR tree-optimization/86010
11470         * tree-ssa-dse.c (compute_trims): Fix typo/thinko.
11472         * config/mips/mips.c (vr4130_align_insns): Update for recent
11473         changes to label_to_alignment.
11475         * config/frv/frv.c (frv_label_align): Update for recent changes
11476         to label_to_alignment.
11478         * config/nios2/nios2.c (nios2_label_align): Update for recent
11479         changes which dropped ALIGN_LABELS_LOG.
11481 2018-07-17  Andreas Schwab  <schwab@linux-m68k.org>
11483         * config/m68k/m68k.md (umulsi3_highpart+1, const_umulsi3_highpart)
11484         (smulsi3_highpart+1, const_smulsi3_highpart): Add CC_STATUS_INIT.
11486 2018-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
11488         * config/arc/arc.c (arc_label_align): Use align_labels instead of
11489         deprecated align_labels_log.
11491 2018-07-17  Richard Biener  <rguenther@suse.de>
11493         PR lto/86456
11494         * dwarf2out.c (init_sections_and_labels): Always generate
11495         a debug_line_str_section for early LTO debug.
11496         (dwarf2out_finish): Reset debug_line_str_hash output early.
11497         Bump counter for extra dwarf5 .debug_loc labels to not conflict
11498         with fat LTO part.
11499         (dwarf2out_early_finish): Output debug_line_str.
11501 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
11503         * config/s390/s390.c (preferred_la_operand_p): Do not use LA with
11504         index register on z196 or later.
11506 2018-07-17  Robin Dapp  <rdapp@linux.ibm.com>
11508         * config/s390/s390.c (s390_default_align): Set default function
11509         alignment to 16.
11510         (s390_override_options_after_change): Call s390_default align.
11511         (s390_option_override_internal): Call s390_default_align.
11512         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define.
11514 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
11516         PR middle-end/86542
11517         * omp-low.c (create_task_copyfn): Copy over also fields corresponding
11518         to _looptemp_ clauses, other than the first two.
11520 2018-07-17  Martin Liska  <mliska@suse.cz>
11522         * opts.c: Do not enable OPT_falign_* for -Os.
11524 2018-07-17  Martin Liska  <mliska@suse.cz>
11526         * align.h (MAX_CODE_ALIGN): New.
11527         (MAX_CODE_ALIGN_VALUE): New.
11528         * common/config/i386/i386-common.c (ix86_handle_option):
11529         (MAX_CODE_ALIGN): Moved to align.h.
11530         * final.c (MAX_CODE_ALIGN): Likewise.
11531         * opts.c (parse_and_check_align_values):
11532         (MAX_CODE_ALIGN): Likewise.
11533         (MAX_CODE_ALIGN_VALUE): Likewise.
11535 2018-07-17  Martin Liska  <mliska@suse.cz>
11537         * config/i386/att.h (ASM_OUTPUT_ALIGN): Fix spacing
11538         in order to fulfil coding style.
11539         * config/i386/cygming.h (ASM_OUTPUT_ALIGN): Likewise.
11540         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11541         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
11542         * config/iq2000/iq2000.h (ASM_OUTPUT_ALIGN): Likewise.
11543         * config/pa/pa.h (ASM_OUTPUT_ALIGN): Likewise.
11544         * config/sparc/sol2.h (ASM_OUTPUT_ALIGN_WITH_NOP): Likewise.
11545         * config/sparc/sparc.h (ASM_OUTPUT_ALIGN): Likewise.
11546         * config/visium/visium.h (ASM_OUTPUT_ALIGN): Likewise.
11547         (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
11549 2018-07-17  Martin Liska  <mliska@suse.cz>
11551         * align.h: New file.
11552         * config/alpha/alpha.c (alpha_align_insns_1): Use align_functions
11553         directly.
11554         * config/i386/i386.c (ix86_avoid_jump_mispredicts): Use new return type
11555         align_flags of label_to_alignment.
11556         * config/m32r/m32r.h (LOOP_ALIGN): Wrap returned values into
11557         align_flags class.
11558         * config/m68k/m68k.c: Do not use removed align_labels_value and
11559         align_loops_value.
11560         * config/nds32/nds32.h (JUMP_ALIGN): Wrap result into align_flags class.
11561         (LOOP_ALIGN): Likewise.
11562         (LABEL_ALIGN): Likewise.
11563         * config/powerpcspe/powerpcspe.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
11564         Remove not used macro.
11565         (rs6000_loop_align): Change return type to align_flags.
11566         (rs6000_loop_align_max_skip): Remove.
11567         * config/rs6000/rs6000-protos.h (rs6000_loop_align):
11568         Change return type to align_flags.
11569         * config/rs6000/rs6000.c (TARGET_ASM_LOOP_ALIGN_MAX_SKIP):
11570         Remove not used macro.
11571         (rs6000_loop_align):  Change return type to align_flags.
11572         (rs6000_loop_align_max_skip): Remove.
11573         * config/rx/rx.h (JUMP_ALIGN): Wrap integer values
11574         * config/rx/rx-protos.h (rx_align_for_label): Make it
11575         static function.
11576         * config/rx/rx.c (rx_align_for_label): Change return type
11577         to align_flags.
11578         (rx_max_skip_for_label): Remove TARGET_ASM_*_ALIGN_MAX_SKIP
11579         macro definitions.
11580         into align_flags class.
11581         (LABEL_ALIGN): Likewise.
11582         (LOOP_ALIGN): Likewise.
11583         * config/s390/s390.c (s390_label_align): Use align_flags
11584         class member.
11585         (s390_asm_output_function_label): Likewise.
11586         * config/sh/sh.c (sh_override_options_after_change):
11587         Use align_flags class directly without macros.
11588         (find_barrier): Likewise.
11589         (barrier_align): Likewise.
11590         (sh_loop_align): Likewise.
11591         * config/spu/spu.c (spu_option_override):
11592         Use align_flags_tuple::get_value instead of removed macros.
11593         (spu_sched_init): Likewise.
11594         * config/spu/spu.h (GTY): Likewise.
11595         * config/visium/visium.c (visium_option_override):
11596         Set "8" as default secondary alignment.
11597         * config/visium/visium.h (SUBALIGN_LOG): Define to 3
11598         in order to guarantee secondary alignment of 8.
11599         * coretypes.h: Include align.h header file.
11600         * doc/tm.texi: Remove TARGET_ASM_JUMP_ALIGN_MAX_SKIP,
11601         TARGET_ASM_LOOP_ALIGN_MAX_SKIP, TARGET_ASM_LABEL_ALIGN_MAX_SKIP
11602         and TARGET_ASM_LABEL_ALIGN_AFTER_BARRIER_MAX_SKIP macros.
11603         * doc/tm.texi.in: Likewise.
11604         * final.c (struct label_alignment): Remove not used structure.
11605         (LABEL_ALIGN): Change type to align_flags.
11606         (LOOP_ALIGN): Likewise.
11607         (JUMP_ALIGN): Likewise.
11608         (default_loop_align_max_skip): Remove.
11609         (default_label_align_max_skip): Likewise.
11610         (default_jump_align_max_skip): Likewise.
11611         (default_label_align_after_barrier_max_skip):
11612         (LABEL_TO_ALIGNMENT): Change to access label_align vector.
11613         (LABEL_TO_MAX_SKIP): Remove.
11614         (label_to_alignment): Return align_flags type instead of integer.
11615         (label_to_max_skip): Remove.
11616         (align_fuzz): Use align_flags type.
11617         (compute_alignments): Use align_flags type and use align_flags::max
11618         to combine multiple alignments.
11619         (grow_label_align): Grow vec instead of C array.
11620         (update_alignments): Assign just LABEL_TO_ALIGNMENT.
11621         (shorten_branches):  Use align_flags type and use align_flags::max
11622         to combine multiple alignments.
11623         (final_scan_insn_1): Remove usage of secondary alignment that comes
11624         from label alignment, but instead use proper secondary alignment
11625         which is computed in grow_label_align.
11626         * flags.h (struct align_flags_tuple): Move to align.h.
11627         (struct align_flags): Likewise.
11628         (state_align_loops): Rename to align_loops.
11629         (state_align_jumps): Rename to align_jumps.
11630         (state_align_labels): Rename to align_labels.
11631         (state_align_functions): Rename to align_functions.
11632         (align_loops_log): Remove.
11633         (align_jumps_log): Remove.
11634         (align_labels_log): Remove.
11635         (align_functions_log): Remove.
11636         (align_loops_max_skip): Remove.
11637         (align_jumps_max_skip): Remove.
11638         (align_labels_max_skip): Remove.
11639         (align_functions_max_skip): Remove.
11640         (align_loops_value): Remove.
11641         (align_jumps_value): Remove.
11642         (align_labels_value): Remove.
11643         (align_functions_value): Remove.
11644         * output.h (label_to_alignment): Change return type to align_flags.
11645         (label_to_max_skip): Remove.
11646         * target.def: Remove loop_align_max_skip, label_align_max_skip,
11647         jump_align_max_skip macros.
11648         * targhooks.h (default_loop_align_max_skip): Remove.
11649         (default_label_align_max_skip): Likewise.
11650         (default_jump_align_max_skip): Likewise.
11651         (default_label_align_after_barrier_max_skip): Remove.
11652         * toplev.c (read_log_maxskip): Use ::normalize function.
11653         (parse_N_M): Remove not used argument and also call ::normalize.
11654         (parse_alignment_opts): Do not pass unused arguments.
11655         * varasm.c (assemble_start_function): Use directly align_functions
11656         instead of removed macros.
11657         * system.h: Do not poison removed macros.
11659 2018-07-17  Jakub Jelinek  <jakub@redhat.com>
11661         PR middle-end/86539
11662         * gimplify.c (gimplify_omp_for): Ensure taskloop firstprivatized init
11663         and cond temporaries don't have reference type if iterator has
11664         pointer type.  For init use &for_pre_body instead of pre_p if
11665         for_pre_body is non-empty.
11667 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
11669         * config/rs6000/rs6000.md (trunc<mode>sf2): Expand truncates of
11670         double-double modes to SFmode directly directly.
11671         (trunc<mode>sf2_fprs): Delete.
11673 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
11675         * config/rs6000/rs6000.c (init_float128_ibm): Use the correct names
11676         for conversions between IFmode and the decimal floating point modes.
11677         (init_float128_ieee): Use the correct names for conversions between
11678         KFmode and the decimal floating point modes.
11680 2018-07-16  Segher Boessenkool  <segher@kernel.crashing.org>
11682         * config/rs6000/rs6000.c (init_float128_ibm): Use more correct names
11683         for the conversions between TDmode and IFmode.
11684         (init_float128_ieee): Use more correct names for the conversions
11685         between TDmode and KFmode.
11687 2018-07-16  Jakub Jelinek  <jakub@redhat.com>
11689         PR tree-optimization/86526
11690         * builtins.c (expand_builtin_memcmp): Formatting fixes.
11691         (inline_expand_builtin_string_cmp): Likewise.
11692         (inline_string_cmp): Likewise.  Use c_readstr instead of
11693         builtin_memcpy_read_str.  Add unit_mode temporary.
11695 2018-07-16  Bernd Edlinger  <bernd.edlinger@hotmail.de>
11697         PR middle-end/86528
11698         * builtins.c (check_access): Bail out if range[0] is no INTEGER_CST.
11699         * expr.c (string_constant): Fix the element size of ARRAY_TYPE.
11701 2018-07-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
11703         * doc/extend.texi (PowerPC AltiVec Built-in Functions):
11704         Alphabetize prototypes of built-in functions, separating out
11705         built-in functions that are listed in this section but should be
11706         described elsewhere.
11708 2018-07-16  Uros Bizjak  <ubizjak@gmail.com>
11710         PR target/86511
11711         * expmed.c (emit_store_flag): Do not emit setcc followed by a
11712         conditional move when trapping comparison was split to a
11713         non-trapping one (and vice versa).
11715 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
11717         * config/s390/s390.c (s390_function_profiler): Generate nops
11718         instead of profiler call sequences.
11719         * config/s390/s390.opt: Add the new option.
11721 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
11723         * config/s390/s390.c (s390_function_profiler): Generate
11724         __mcount_loc section.
11725         * config/s390/s390.opt: Add the new option.
11727 2018-07-16  Ilya Leoshkevich  <iii@linux.ibm.com>
11729         * common.opt: Add the new warning.
11730         * config/s390/s390.c (s390_function_profiler): Emit "brasl
11731         %r0,__fentry__" when -mfentry is specified.
11732         (s390_option_override_internal): Disallow -mfentry for 31-bit
11733         CPUs.
11734         * config/s390/s390.opt: Add the new option.
11736 2018-07-16  Richard Biener  <rguenther@suse.de>
11738         PR lto/86523
11739         * dwarf2out.c (dwarf2out_register_external_die): Assign DIE parents
11740         for function-local FUNCTION_DECL and RESULT_DECL immediately.
11742 2018-07-16  Martin Liska  <mliska@suse.cz>
11744         PR ipa/86529
11745         * ipa-pure-const.c (malloc_candidate_p): Revert ::get
11746         to ::get_create.
11748 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
11750         * config/arc/arcHS.md: Update ARCHS scheduling rules.
11752 2017-07-16  Claudiu Zissulescu  <claziss@synopsys.com>
11754         * config/arc/arc-arch.h (arc_tune_attr): Add new tune parameters
11755         for ARCHS4x.
11756         * config/arc/arc-cpus.def (hs4x): New cpu.
11757         (hs4xd): Likewise.
11758         * config/arc/arc-tables.opt: Regenerate.
11759         * config/arc/arc.c (arc_sched_issue_rate): New function.
11760         (TARGET_SCHED_ISSUE_RATE): Define.
11761         (TARGET_SCHED_EXPOSED_PIPELINE): Likewise.
11762         * config/arc/arc.md (attr type): Add fpu_fuse, fpu_sdiv, fpu_ddiv,
11763         fpu_cvt.
11764         (attr tune): Add ARCHS4x tune values.
11765         (attr tune_dspmpy): Define.
11766         (*tst): Correct instruction type.
11767         * config/arc/arcHS.md: Don't use this automaton for ARCHS4x cpus.
11768         * config/arc/arcHS4x.md: New file.
11769         * config/arc/fpu.md: Update instruction type attributes.
11770         * config/arc/t-multilib: Regenerate.
11772 2018-07-16  Tom de Vries  <tdevries@suse.de>
11774         PR debug/86455
11775         * var-tracking.c (vt_initialize): Fix pre_dec handling.
11777 2018-07-16  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
11779         * config/aarch64/atomics.md (aarch64_store_execlusive<mode>): Add
11780         early clobber.
11782 2018-07-16  Eric Botcazou  <ebotcazou@adacore.com>
11784         PR tree-optimization/86514
11785         * tree-ssa-reassoc.c (init_range_entry) <CASE_CONVERT>: Return for a
11786         conversion to a boolean type from a type with greater precision.
11788 2018-07-16  Tom de Vries  <tdevries@suse.de>
11790         * var-tracking.c (vt_initialize): Print adjusted insn slim if
11791         dump_flags request TDF_SLIM.
11793 2018-07-16  Aldy Hernandez  <aldyh@redhat.com>
11795         * fold-const.c (int_const_binop_1): Abstract...
11796         (wide_int_binop): ...wide int code here.
11797         (poly_int_binop): ...poly int code here.
11798         Abstract the rest of int_const_binop_1 into int_const_binop.
11799         * fold-const.h (wide_int_binop): New.
11800         * tree-vrp.c (vrp_int_const_binop): Call wide_int_binop.
11801         Remove useless PLUS/MINUS_EXPR case.
11802         (zero_nonzero_bits_from_vr): Move wide int code...
11803         (zero_nonzero_bits_from_bounds): ...here.
11804         (extract_range_from_binary_expr_1): Move mask optimization code...
11805         (range_easy_mask_min_max): ...here.
11806         * tree-vrp.h (zero_nonzero_bits_from_bounds): New.
11807         (range_easy_mask_min_max): New.
11809 2018-07-15  Jeff Law  <law@redhat.com>
11811         PR target/85993
11812         * config/sh/sh.c (output_mi_thunk): Remove dead conditional
11813         block.
11815 2018-07-14  Jim Wilson  <jimw@sifive.com>
11817         * config/riscv/linux.h (TARGET_ASM_FILE_END): New.
11819 2018-07-14  Paul Koning  <ni1d@arrl.net>
11821         * config/pdp11/pdp11.c (pdp11_rtx_costs): Bugfixes.
11823 2018-07-13  Jan Hubicka  <hubicka@ucw.cz>
11825         * lto-streamer-out.c (copy_function_or_variable): Dump info about
11826         copying section.
11828 2018-07-13  Bill Schmidt  <wschmidt@linux.ibm.com>
11829             Steve Munroe  <munroesj52@gmail.com>
11831         * config/rs6000/emmintrin.h (_mm_and_si128): New function.
11832         (_mm_andnot_si128): Likewise.
11833         (_mm_or_si128): Likewise.
11834         (_mm_xor_si128): Likewise.
11836 2018-07-13  Qing Zhao  <qing.zhao@oracle.com>
11838         PR middle-end/78809
11839         * builtins.c (expand_builtin_memcmp): Inline the calls first
11840         when result_eq is false.
11841         (expand_builtin_strcmp): Inline the calls first.
11842         (expand_builtin_strncmp): Likewise.
11843         (inline_string_cmp): New routine. Expand a string compare
11844         call by using a sequence of char comparison.
11845         (inline_expand_builtin_string_cmp): New routine. Inline expansion
11846         a call to str(n)cmp/memcmp.
11847         * doc/invoke.texi (--param builtin-string-cmp-inline-length):
11848         New option.
11849         * params.def (BUILTIN_STRING_CMP_INLINE_LENGTH): New.
11851 2018-07-13  Richard Earnshaw  <rearnsha@arm.com>
11853         * config/arm/driver-arm.c: Include arm-native.h.
11854         (host_detect_local_cpu): Use auto-generated data tables.
11855         (vendors, arm_cpu_table): Delete.  Move part information to ...
11856         * config/arm/arm-cpus.in: ... here.
11857         * config/arm/parsecpu.awk (gen_native): New function.
11858         (vendor, part): New CPU fields.
11859         (END): Add support for building the native CPU detection tables.
11860         * config/arm/t-arm (arm-native.h): Add build rule.
11861         (driver-arm.o): Add dependency on arm-native.h.
11863 2018-07-13  Richard Biener  <rguenther@suse.de>
11865         PR middle-end/85974
11866         * match.pd (addr1 - addr2): Allow either of the operand to
11867         have a conversion.
11869 2018-07-13  Tom de Vries  <tdevries@suse.de>
11871         * tree-inline.c (remap_ssa_name): Save and reuse debug exprs generated
11872         in remap_ssa_name.
11874 2018-07-13  Jackson Woodruff  <jackson.woodruff@arm.com>
11876         * config/aarch64/aarch64.c (aarch64_operands_adjust_ok_for_ldpstp): Use
11877         arrays instead of numbered variables.
11879 2018-07-13  Eric Botcazou  <ebotcazou@adacore.com>
11881         * config/sparc/sparc-protos.h (sparc_compute_frame_size): Delete.
11882         * config/sparc/sparc.c (sparc_compute_frame_size): Make static.
11884 2018-07-13  Richard Biener  <rguenther@suse.de>
11886         PR debug/86452
11887         * dwarf2out.c (gen_type_die_with_usage): Use scope_die_for
11888         instead of get_context_die.
11890 2018-07-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
11891             Richard Biener  <rguenther@suse.de>
11893         PR middle-end/86489
11894         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Check
11895         that the loop latch destination where phi is defined.
11897 2018-07-12  Kito Cheng  <kito.cheng@gmail.com>
11899         * config/riscv/riscv.c (enum riscv_privilege_levels): Add UNKNOWN_MODE.
11900         (riscv_expand_epilogue): Add assertion to check interrupt mode.
11901         (riscv_set_current_function): Extract getting interrupt type to new
11902         function.
11903         (riscv_get_interrupt_type): New function.
11904         (riscv_merge_decl_attributes): New function, checking interrupt type is
11905         same.
11906         (TARGET_MERGE_DECL_ATTRIBUTES): Define.
11908 2018-07-12  Paul Koning  <ni1d@arrl.net>
11910         * config/pdp11/pdp11.c (pdp11_output_def): Fix typo in .set
11911         directive.
11913 2018-07-12  Paul Koning  <ni1d@arrl.net>
11915         * doc/rtl.texi (REG_NONNEG): Remove decrement and branch until
11916         zero reference, add doloop_end instead.
11917         * doc/md.texi (decrement_and_branch_until_zero): Remove.
11918         (Looping patterns): Remove decrement_and_branch_until_zero.  Add
11919         detail for doloop_end.
11921 2018-07-12  Martin Sebor  <msebor@redhat.com>
11923         PR c/86453
11924         * attribs.c (decl_attributes): Reject conflicting attributes before
11925         calling attribute handlers.
11927 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
11929         * dumpfile.c (gcc::dump_manager::get_dump_file_name): Add PART
11930          parameter.
11931         (gcc::dump_manager::get_dump_file_name): likewise.
11932         (dump_begin): Likewise.
11933         * dumpfile.h (dump_begin): Update prototype.
11934         (gcc::dump_manager::get_dump_file_name,
11935         gcc::dump_manager::get_dump_file_name): Update prototype.
11937 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
11939         * internal-fn.h (vectorizable_internal_fn_p): New function.
11940         * tree-vect-slp.c (compatible_calls_p): Likewise.
11941         (vect_build_slp_tree_1): Remove nops argument.  Handle calls
11942         to internal functions.
11943         (vect_build_slp_tree_2): Update call to vect_build_slp_tree_1.
11945 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
11947         * fold-const.h (inverse_conditions_p): Declare.
11948         * fold-const.c (inverse_conditions_p): New function.
11949         * match.pd: Use inverse_conditions_p.  Add folds of view_converts
11950         that test the inverse condition of a conditional internal function.
11951         * internal-fn.h (vectorized_internal_fn_supported_p): Declare.
11952         * internal-fn.c (internal_fn_mask_index): Handle conditional
11953         internal functions.
11954         (vectorized_internal_fn_supported_p): New function.
11955         * tree-if-conv.c: Include internal-fn.h and fold-const.h.
11956         (any_pred_load_store): Replace with...
11957         (need_to_predicate): ...this new variable.
11958         (redundant_ssa_names): New variable.
11959         (ifcvt_can_use_mask_load_store): Move initial checks to...
11960         (ifcvt_can_predicate): ...this new function.  Handle tree codes
11961         for which a conditional internal function exists.
11962         (if_convertible_gimple_assign_stmt_p): Use ifcvt_can_predicate
11963         instead of ifcvt_can_use_mask_load_store.  Update after variable
11964         name change.
11965         (predicate_load_or_store): New function, split out from
11966         predicate_mem_writes.
11967         (check_redundant_cond_expr): New function.
11968         (value_available_p): Likewise.
11969         (predicate_rhs_code): Likewise.
11970         (predicate_mem_writes): Rename to...
11971         (predicate_statements): ...this.  Use predicate_load_or_store
11972         and predicate_rhs_code.
11973         (combine_blocks, tree_if_conversion): Update after above name changes.
11974         (ifcvt_local_dce): Handle redundant_ssa_names.
11975         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): Handle
11976         general conditional functions.
11977         * tree-vect-stmts.c (vectorizable_call): Likewise.
11979 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
11980             Alan Hayward  <alan.hayward@arm.com>
11981             David Sherwood  <david.sherwood@arm.com>
11983         * internal-fn.h (can_interpret_as_conditional_op_p): Declare.
11984         * internal-fn.c (can_interpret_as_conditional_op_p): New function.
11985         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Handle conditional
11986         plus and minus and convert them into IFN_COND_FMA-based sequences.
11987         (convert_mult_to_fma): Handle conditional plus and minus.
11989 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
11991         * doc/md.texi (cond_fma, cond_fms, cond_fnma, cond_fnms): Document.
11992         * optabs.def (cond_fma_optab, cond_fms_optab, cond_fnma_optab)
11993         (cond_fnms_optab): New optabs.
11994         * internal-fn.def (COND_FMA, COND_FMS, COND_FNMA, COND_FNMS): New
11995         internal functions.
11996         (FMA): Use DEF_INTERNAL_FLT_FN rather than DEF_INTERNAL_FLT_FLOATN_FN.
11997         * internal-fn.h (get_conditional_internal_fn): Declare.
11998         (get_unconditional_internal_fn): Likewise.
11999         * internal-fn.c (cond_ternary_direct): New macro.
12000         (expand_cond_ternary_optab_fn): Likewise.
12001         (direct_cond_ternary_optab_supported_p): Likewise.
12002         (FOR_EACH_COND_FN_PAIR): Likewise.
12003         (get_conditional_internal_fn): New function.
12004         (get_unconditional_internal_fn): Likewise.
12005         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 5.
12006         (gimple_match_op::gimple_match_op): Add a new overload for 5
12007         operands.
12008         (gimple_match_op::set_op): Likewise.
12009         (gimple_resimplify5): Declare.
12010         * genmatch.c (decision_tree::gen): Generate simplifications for
12011         5 operands.
12012         * gimple-match-head.c (gimple_simplify): Define an overload for
12013         5 operands.  Handle calls with 5 arguments in the top-level overload.
12014         (convert_conditional_op): Handle conversions from unconditional
12015         internal functions to conditional ones.
12016         (gimple_resimplify5): New function.
12017         (build_call_internal): Pass a fifth operand.
12018         (maybe_push_res_to_seq): Likewise.
12019         (try_conditional_simplification): Try converting conditional
12020         internal functions to unconditional internal functions.
12021         Handle 3-operand unconditional forms.
12022         * match.pd (UNCOND_TERNARY, COND_TERNARY): Operator lists.
12023         Define ternary equivalents of the current rules for binary conditional
12024         internal functions.
12025         * config/aarch64/aarch64.c (aarch64_preferred_else_value): Handle
12026         ternary operations.
12027         * config/aarch64/iterators.md (UNSPEC_COND_FMLA, UNSPEC_COND_FMLS)
12028         (UNSPEC_COND_FNMLA, UNSPEC_COND_FNMLS): New unspecs.
12029         (optab): Handle them.
12030         (SVE_COND_FP_TERNARY): New int iterator.
12031         (sve_fmla_op, sve_fmad_op): New int attributes.
12032         * config/aarch64/aarch64-sve.md (cond_<optab><mode>)
12033         (*cond_<optab><mode>_2, *cond_<optab><mode_4)
12034         (*cond_<optab><mode>_any): New SVE_COND_FP_TERNARY patterns.
12036 2018-07-12  Richard Sandiford  <richard.sandiford@linaro.org>
12038         * target.def (preferred_else_value): New target hook.
12039         * doc/tm.texi.in (TARGET_PREFERRED_ELSE_VALUE): New hook.
12040         * doc/tm.texi: Regenerate.
12041         * targhooks.h (default_preferred_else_value): Declare.
12042         * targhooks.c (default_preferred_else_value): New function.
12043         * internal-fn.h (conditional_internal_fn_code): Declare.
12044         * internal-fn.c (FOR_EACH_CODE_MAPPING): New macro.
12045         (get_conditional_internal_fn): Use it.
12046         (conditional_internal_fn_code): New function.
12047         * gimple-match.h (gimple_match_cond): New struct.
12048         (gimple_match_op): Add a cond member function.
12049         (gimple_match_op::gimple_match_op): Update all forms to take a
12050         gimple_match_cond.
12051         * genmatch.c (expr::gen_transform): Use the same condition as res_op
12052         for the suboperation, but don't specify a particular else_value.
12053         * tree-ssa-sccvn.c (vn_nary_simplify, vn_reference_lookup_3)
12054         (visit_nary_op, visit_reference_op_load): Pass
12055         gimple_match_cond::UNCOND to the gimple_match_op constructor.
12056         * gimple-match-head.c: Include tree-eh.h
12057         (convert_conditional_op): New function.
12058         (maybe_resimplify_conditional_op): Likewise.
12059         (gimple_resimplify1): Call maybe_resimplify_conditional_op.
12060         (gimple_resimplify2): Likewise.
12061         (gimple_resimplify3): Likewise.
12062         (gimple_resimplify4): Likewise.
12063         (maybe_push_res_to_seq): Return null for conditional operations.
12064         (try_conditional_simplification): New function.
12065         (gimple_simplify): Call it.  Pass conditions to the gimple_match_op
12066         constructor.
12067         * match.pd: Fold VEC_COND_EXPRs of an IFN_COND_* call to a new
12068         IFN_COND_* call.
12069         * config/aarch64/aarch64.c (aarch64_preferred_else_value): New
12070         function.
12071         (TARGET_PREFERRED_ELSE_VALUE): Redefine.
12073 2018-07-12  Jan Hubicka  <hubicka@ucw.cz>
12075         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
12076         DECL_FCONTEXT
12077         (hash_tree): Do not hash DECL_FCONTEXT
12078         * tree-streamer-in.c (lto_input_ts_field_decl_tree_pointers):
12079         Do not stream DECL_FCONTEXT.
12080         * tree-streamer-out.c (write_ts_field_decl_tree_pointers): Likewise.
12081         * tree.c (free_lang_data_in_decl): Free DECL_FCONTEXT.
12083 2018-07-12  Richard Biener  <rguenther@suse.de>
12085         PR debug/86462
12086         * dwarf2out.c (gen_block_die): Only output blocks when they have
12087         at least one !DECL_IGNORED_P variable.
12089 2018-07-12  Richard Biener  <rguenther@suse.de>
12091         PR target/84829
12092         * config/gnu-user.h (GNU_USER_TARGET_NO_PTHREADS_LIB_SPEC):
12093         Remove -mieee-fp handling.
12095 2018-07-12  Richard Biener  <rguenther@suse.de>
12097         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Remove bogus
12098         left-over from last patch.
12100 2018-07-12  Jakub Jelinek  <jakub@redhat.com>
12102         PR tree-optimization/86492
12103         * gimple-ssa-store-merging.c
12104         (imm_store_chain_info::coalesce_immediate_stores): Call
12105         check_no_overlap even for the merge_overlapping case.  Formatting fix.
12107 2018-07-12  Richard Biener  <rguenther@suse.de>
12109         PR middle-end/86479
12110         * fold-const.c (fold_binary_op_with_conditional_arg): Do not
12111         move possibly trapping operations into the conditional.
12113 2018-07-12  Richard Biener  <rguenther@suse.de>
12115         * tree-ssa-sccvn.c (mprts_hook_cnt): Remove.
12116         (vn_lookup_simplify_result): Remove recursion limit applied
12117         here.
12118         (vn_nary_build_or_lookup_1): Adjust.
12119         (try_to_simplify): Likewise.
12120         * gimple-match-head.c (gimple_resimplify1): Instead apply one
12121         here.
12122         (gimple_resimplify2): Likewise.
12123         (gimple_resimplify3): Likewise.
12124         (gimple_resimplify4): Likewise.
12126 2018-07-11  Jakub Jelinek  <jakub@redhat.com>
12128         * config/i386/avx512bitalgintrin.h (_mm512_mask_bitshuffle_epi64_mask):
12129         Use __mmask64 type instead of __mmask8 for __M argument.
12130         * config/i386/avx512fintrin.h (_mm512_mask_xor_epi64,
12131         _mm512_maskz_xor_epi64): Use __mmask8 type instead of __mmask16 for
12132         __U argument.
12133         (_mm512_mask_cmpneq_epi64_mask): Use __mmask8 type instead of
12134         __mmask16 for __M argument.
12135         (_mm512_maskz_insertf32x4, _mm512_maskz_inserti32x4,
12136         _mm512_mask_insertf32x4, _mm512_mask_inserti32x4): Cast last argument
12137         to __mmask16 instead of __mmask8.
12138         * config/i386/avx512vlintrin.h (_mm_mask_add_ps, _mm_maskz_add_ps,
12139         _mm256_mask_add_ps, _mm256_maskz_add_ps, _mm_mask_sub_ps,
12140         _mm_maskz_sub_ps, _mm256_mask_sub_ps, _mm256_maskz_sub_ps,
12141         _mm256_maskz_cvtepi32_ps, _mm_maskz_cvtepi32_ps): Use __mmask8 type
12142         instead of __mmask16 for __U argument.
12143         * config/i386/avx512vlbwintrin.h (_mm_mask_cmp_epi8_mask): Use
12144         __mmask16 instead of __mmask8 for __U argument.
12145         (_mm256_mask_cmp_epi8_mask): Use __mmask32 instead of __mmask16 for
12146         __U argument.
12147         (_mm256_cmp_epi8_mask): Use __mmask32 return type instead of
12148         __mmask16.
12149         (_mm_mask_cmp_epu8_mask): Use __mmask16 instead of __mmask8 for __U
12150         argument.
12151         (_mm256_mask_cmp_epu8_mask): Use __mmask32 instead of __mmask16 for
12152         __U argument.
12153         (_mm256_cmp_epu8_mask): Use __mmask32 return type instead of
12154         __mmask16.
12155         (_mm_mask_cmp_epi16_mask): Cast last argument to __mmask8 instead
12156         of __mmask16.
12157         (_mm256_mask_cvtepi8_epi16): Use __mmask16 instead of __mmask32 for
12158         __U argument.
12159         (_mm_mask_cvtepi8_epi16): Use __mmask8 instead of __mmask32 for
12160         __U argument.
12161         (_mm256_mask_cvtepu8_epi16): Use __mmask16 instead of __mmask32 for
12162         __U argument.
12163         (_mm_mask_cvtepu8_epi16): Use __mmask8 instead of __mmask32 for
12164         __U argument.
12165         (_mm256_mask_cmpneq_epu8_mask, _mm256_mask_cmplt_epu8_mask,
12166         _mm256_mask_cmpge_epu8_mask, _mm256_mask_cmple_epu8_mask): Change
12167         return type as well as __M argument type and all casts from __mmask8
12168         to __mmask32.
12169         (_mm256_mask_cmpneq_epu16_mask, _mm256_mask_cmplt_epu16_mask,
12170         _mm256_mask_cmpge_epu16_mask, _mm256_mask_cmple_epu16_mask): Change
12171         return type as well as __M argument type and all casts from __mmask8
12172         to __mmask16.
12173         (_mm256_mask_cmpneq_epi8_mask, _mm256_mask_cmplt_epi8_mask,
12174         _mm256_mask_cmpge_epi8_mask, _mm256_mask_cmple_epi8_mask): Change
12175         return type as well as __M argument type and all casts from __mmask8
12176         to __mmask32.
12177         (_mm256_mask_cmpneq_epi16_mask, _mm256_mask_cmplt_epi16_mask,
12178         _mm256_mask_cmpge_epi16_mask, _mm256_mask_cmple_epi16_mask): Change
12179         return type as well as __M argument type and all casts from __mmask8
12180         to __mmask16.
12181         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_shrdi_epi32,
12182         _mm_mask_shldi_epi32): Cast last argument to __mmask8 instead of
12183         __mmask16.
12185 2018-07-11  Grazvydas Ignotas  <notasas@gmail.com>
12187         * config/i386/avx512bwintrin.h: (_mm512_mask_cmp_epi8_mask,
12188         _mm512_mask_cmp_epu8_mask): Use __mmask64 type instead of __mmask32
12189         for __U argument.
12191 2018-07-11  Paul Koning  <ni1d@arrl.net>
12193         * doc/md.texi (define_subst): Document how multiple occurrences of
12194         the same argument in the replacement pattern are handled.
12196 2018-07-11  Paul Koning  <ni1d@arrl.net>
12198         * doc/extend.texi (Common Variable Attributes): Move "mode" into
12199         alphabetical order.
12200         (Common Type Attributes): Add "mode" attribute.
12202 2018-07-11  Jan Hubicka  <hubicka@ucw.cz>
12204         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not
12205         stream DECL_ORIGINAL_TYPE.
12206         (DFS::DFS_write_tree_body): Drop hack handling local external decls.
12207         (hash_tree): Do not walk DECL_ORIGINAL_TYPE.
12208         * tree-streamer-in.c (lto_input_ts_decl_non_common_tree_pointers):
12209         Do not walk original type.
12210         * tree-streamer-out.c (streamer_write_chain): Drop hack handling
12211         external decls.
12212         (write_ts_decl_non_common_tree_pointers): Do not stream
12213         DECL_ORIGINAL_TYPE
12214         * tree.c (free_lang_data_in_decl): Clear DECL_ORIGINAL_TYPE.
12215         (find_decls_types_r): Do not walk DEC_ORIGINAL_TYPE.
12217 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
12219         * tree-ssa-threadupdate.c (thread_through_all_blocks): Do not jump
12220         thread twice from the same starting edge.
12222 2018-07-11  Aldy Hernandez  <aldyh@redhat.com>
12224         * vr-values.c (gimple_stmt_nonzero_p): Abstract common code to...
12225         * gimple.c (gimple_call_nonnull_result_p): ...here...
12226         (gimple_call_nonnull_arg): ...and here.
12227         * gimple.h (gimple_call_nonnull_result_p): New.
12228         (gimple_call_nonnull_arg): New.
12230 2018-07-11  Richard Earnshaw  <rearnsha@arm.com>
12232         * config/arm/arm-cpus.in: Move information from fpu field of each
12233         cpu definition to the isa field.
12234         * config/arm/parsecpu.awk (fpu): Delete match rule.
12235         (gen_comm_data): Don't add bits from the CPU's FPU entry.
12237 2018-07-11  Richard Biener  <rguenther@suse.de>
12239         PR debug/86457
12240         * dwarf2out.c (init_sections_and_labels): Use
12241         output_asm_line_debug_info consistently.
12242         (dwarf2out_early_finish): Likewise.
12243         (dwarf2out_finish): Remove DW_AT_stmt_list from early generated
12244         type units.
12246 2018-07-11  Richard Biener  <rguenther@suse.de>
12248         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
12249         Rework father_bb setting in a way to avoid propagating constants
12250         multiple times on a loop body.
12252 2018-07-10  Mark Wielaard  <mark@klomp.org>
12254         PR debug/86459
12255         * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
12257 2018-07-10  Richard Biener  <rguenther@suse.de>
12259         * hash-map.h (hash_map::iterator::operator*): Return
12260         references to key and value.
12262 2018-07-10  Jakub Jelinek  <jakub@redhat.com>
12264         PR c++/86443
12265         * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
12266         to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
12267         BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
12268         (gimplify_omp_for): For composite loops, move outer
12269         OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
12270         OMP_FOR/OMP_SIMD if there are any non-trivial wrappers.  For class
12271         iterators add any needed clauses.  Allow OMP_FOR_ORIG_DECLS to contain
12272         TREE_LIST for both the original class iterator and the "last" helper
12273         var.  Gimplify OMP_FOR_PRE_BODY before the outermost composite
12274         loop, remember has_decl_expr from outer composite loops for the
12275         innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
12277 2018-07-09  Martin Sebor  <msebor@redhat.com>
12279         PR middle-end/77357
12280         PR middle-end/86428
12281         * builtins.c (c_strlen): Avoid out-of-bounds warnings when
12282         accessing implicitly initialized array elements.
12283         * expr.c (string_constant): Handle string initializers of
12284         character arrays within aggregates.
12285         * gimple-fold.c (fold_array_ctor_reference): Add argument.
12286         Store element offset.  As a special case, handle zero size.
12287         (fold_nonarray_ctor_reference): Same.
12288         (fold_ctor_reference): Add argument.  Store subobject offset.
12289         * gimple-fold.h (fold_ctor_reference): Add argument.
12291 2018-07-09  Paul Koning  <ni1d@arrl.net>
12293         * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
12294         (pdp11_insn_cost): New function.
12295         (pdp11_md_asm_adjust): New function.
12296         (TARGET_INVALID_WITHIN_DOLOOP): Define.
12297         (pdp11_rtx_costs): Update to match machine better.
12298         (output_addr_const_pdp11): Correct format mismatch warnings.
12299         * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
12300         * config/pdp11/pdp11.md: General change to add base_cost and/or
12301         length attributes for use by new pdp11_insn_cost function.
12302         (MIN_BRANCH): Correct definition.
12303         (MIN_SOB): Ditto.
12304         (doloop_end): Use standard pattern name for looping pattern.
12305         (doloop_end_nocc): New.
12306         (movsf): Add another constraint alternative.
12307         (zero_extendqihi2): Add constraint alternatives for not in place
12308         extend.
12309         (zero_extendhisi2): Remove.
12310         (shift patterns): Add CC handling variants.
12311         (bswaphi2): New.
12312         (bswapsi2): New.
12313         (rothi3): New.
12314         (define_peephole2): New peephole to recognize mov that sets CC for
12315         subsequent test.
12317 2018-07-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12319         * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
12320         SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
12321         wi::add.
12323 2018-07-09  Jakub Jelinek  <jakub@redhat.com>
12325         PR c/86420
12326         * real.c (real_nextafter): Return true if result is denormal.
12328 2018-07-09  Martin Liska  <mliska@suse.cz>
12330         * common.opt: Add back wrongly removed attribute.
12332 2018-07-09  Richard Biener  <rguenther@suse.de>
12334         PR debug/86413
12335         * dwarf2out.c (gen_block_die): For an early generated DIE
12336         always output high/low PC attributes.
12338 2018-07-09  Tom de Vries  <tdevries@suse.de>
12340         * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
12341         * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
12342         onto VAR_DECL with abstract origin.
12344 2018-07-07  Jim Wilson  <jimw@sifive.com>
12346         * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
12348 2018-07-07  Tom de Vries  <tdevries@suse.de>
12350         * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
12352 2018-07-07  Aldy Hernandez  <aldyh@redhat.com>
12354         * tree-vrp.c (vrp_int_const_binop): Change overflow type to
12355         overflow_type.
12356         (combine_bound): Use wide-int overflow calculation instead of
12357         rolling our own.
12358         * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
12359         overflow_type.
12360         * fold-const.c (int_const_binop_2): Same.
12361         (extract_muldiv_1): Same.
12362         (fold_div_compare): Same.
12363         (fold_abs_const): Same.
12364         * match.pd: Same.
12365         * poly-int.h (add): Same.
12366         (sub): Same.
12367         (neg): Same.
12368         (mul): Same.
12369         * predict.c (predict_iv_comparison): Same.
12370         * profile-count.c (slow_safe_scale_64bit): Same.
12371         * simplify-rtx.c (simplify_const_binary_operation): Same.
12372         * tree-chrec.c (tree_fold_binomial): Same.
12373         * tree-data-ref.c (split_constant_offset_1): Same.
12374         * tree-if-conv.c (idx_within_array_bound): Same.
12375         * tree-scalar-evolution.c (iv_can_overflow_p): Same.
12376         * tree-ssa-phiopt.c (minmax_replacement): Same.
12377         * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
12378         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
12379         * vr-values.c (vr_values::adjust_range_with_scev): Same.
12380         * wide-int.cc (wi::add_large): Same.
12381         (wi::mul_internal): Same.
12382         (wi::sub_large): Same.
12383         (wi::divmod_internal): Same.
12384         * wide-int.h: Change overflow type to overflow_type for neg, add,
12385         mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
12386         mod_trunc, mod_ceil, mod_round, add_large, sub_large,
12387         mul_internal, divmod_internal.
12388         (overflow_type): New enum.
12389         (accumulate_overflow): New.
12391 2018-07-06  Kugan Vivekanandarajah  <kugan.vivekanandarajah@linaro.org>
12393         * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
12394         (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
12396 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
12398         * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
12399         argument is checked for zero before entering loop, avoid checking again.
12401 2018-07-06  Kugan Vivekanandarajah  <kuganv@linaro.org>
12403         * gimplify.h (generic_expr_could_trap_p): Set as global function.
12404         * gimplify.h (generic_expr_could_trap_p): Likwise.
12405         * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
12407 2018-07-06  Jakub Jelinek  <jakub@redhat.com>
12409         PR tree-optimization/86401
12410         * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
12411         ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
12412         (fold_bit_and_mask): ... here.  New helper function for match.pd.
12413         * fold-const.h (fold_bit_and_mask): Declare.
12414         * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
12416 2018-07-06  Peter Bergner  <bergner@linux.ibm.com>
12418         PR target/86324
12419         * target.def (translate_mode_attribute): New hook.
12420         * targhooks.h (default_translate_mode_attribute): Declare.
12421         * targhooks.c (default_translate_mode_attribute): New function.
12422         * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
12423         * doc/tm.texi: Regenerate.
12424         * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
12425         (rs6000_translate_mode_attribute): New function.
12427 2018-07-06  Paul Koning  <ni1d@arrl.net>
12429         * doc/md.texi (define_split): Document DONE and FAIL.
12430         (define_peephole2): Ditto.
12432 2018-07-05  Jeff Law  <law@redhat.com>
12434         PR tree-optimization/86010
12435         * tree-ssa-dse.c (compute_trims): More aggressively trim at
12436         both the head and tail of mem* and str* calls.
12438 2018-07-05  Jim Wilson  <jimw@sifive.com>
12440         * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
12442 2018-07-05  Indu Bhagat  <indu.bhagat@oracle.com>
12444         * config/aarch64/aarch64-simd.md: correct flags text for
12445         MIN_EXPR replacement.
12447 2018-07-05  James Clarke  <jrtc27@jrtc27.com>
12449         * configure: Regenerated.
12451 2018-07-05  Carl Love  <cel@us.ibm.com>
12453         * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
12454         float argument to VSX_BUILTIN_DOUBLEH_V4SF.
12455         Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
12456         VSX_BUILTIN_DOUBLEL_V4SF.
12458 2018-07-05  Martin Sebor  <msebor@redhat.com>
12460         PR c++/86400
12461         * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
12462         than its domain to compute its the upper bound of a char array.
12464 2018-07-05  Nathan Sidwell  <nathan@acm.org>
12466         Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
12467         * doc/cpp.texi: Update comment.
12468         * doc/tm.texi: Rebuilt.
12469         * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
12470         (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
12471         * doc/extend.texi (Backwards Compatibility): Clarify it is system
12472         headers affected by extern "C".
12473         * system.h: Poison NO_IMPLICIT_EXTERN_C.
12474         * config/alpha/alpha.h, config/arm/uclinux-elf.h,
12475         config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
12476         config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
12477         config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
12478         config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
12479         config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
12480         config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
12481         config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
12482         config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
12483         config/sparc/openbsd64.h, config/sparc/sp-elf.h,
12484         config/sparc/sp64-elf.h, config/spu/spu.h,
12485         config/stormy16/stormy16.h, config/v850/v850.h,
12486         config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
12487         define NO_IMPLICIT_EXTERN_C.
12488         * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
12490 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
12492         PR target/84711
12493         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
12494         instead of GET_MODE_SIZE when comparing Units.
12496 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
12498         PR target/84711
12499         * rtlanal.c (set_noop_p): Constrain on mode change,
12500         include hard-reg-set.h
12502 2018-07-05  Tamar Christina  <tamar.christina@arm.com>
12504         * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
12506 2018-07-05  Jakub Jelinek  <jakub@redhat.com>
12508         Revert
12509         2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
12511         PR sanitizer/84250
12512         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
12513         libasan.
12514         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
12516 2018-07-04  Maxim Ostapenko  <m.ostapenko@samsung.com>
12518         PR sanitizer/84250
12519         * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
12520         libasan.
12521         * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
12523 2018-07-04  Eric Botcazou  <ebotcazou@adacore.com>
12525         PR middle-end/86380
12526         * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
12528 2018-07-04  Aldy Hernandez  <aldyh@redhat.com>
12530         * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
12531         neg_*_op* variables.
12533 2018-07-04  Martin Liska  <mliska@suse.cz>
12535         * tree-switch-conversion.c: Define
12536         max_ratio_for_speed and max_ratio_for_size constants.
12538 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
12539             Martin Liska  <mliska@suse.cz>
12541         PR middle-end/66240
12542         PR target/45996
12543         PR c/84100
12544         * common.opt: Rename align options with 'str_' prefix.
12545         * common/config/i386/i386-common.c (set_malign_value): New
12546         function.
12547         (ix86_handle_option): Use it to set -falign-* options/
12548         * config/aarch64/aarch64-protos.h (struct tune_params): Change
12549         type from int to string.
12550         * config/aarch64/aarch64.c: Update default values from int
12551         to string.
12552         * config/alpha/alpha.c (alpha_override_options_after_change):
12553         Likewise.
12554         * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
12555         * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12556         max skip conditionally.
12557         * config/i386/freebsd.h (SUBALIGN_LOG): New.
12558         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12559         max skip conditionally.
12560         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12561         max skip conditionally.
12562         * config/i386/gnu-user.h (SUBALIGN_LOG): New.
12563         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12564         max skip conditionally.
12565         * config/i386/i386.c (struct ptt): Change type from int to
12566         string.
12567         (ix86_default_align): Set default values.
12568         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
12569         max skip conditionally.
12570         * config/i386/iamcu.h (SUBALIGN_LOG): New.
12571         (ASM_OUTPUT_MAX_SKIP_ALIGN):
12572         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
12573         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12574         max skip conditionally.
12575         * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
12576         (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
12577         * config/i386/x86-64.h (SUBALIGN_LOG): New.
12578         (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
12579         max skip conditionally.
12580         (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12581         * config/ia64/ia64.c (ia64_option_override): Set default values
12582         for alignment options.
12583         * config/m68k/m68k.c: Handle new str_align_* options.
12584         * config/mips/mips.c (mips_set_compression_mode): Change
12585         type of constants.
12586         (mips_option_override): Set default values for options.
12587         * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
12588         Likewise.
12589         * config/rs6000/rs6000.c (rs6000_option_override_internal):
12590         Likewise.
12591         * config/rx/rx.c (rx_option_override): Likewise.
12592         * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
12593         (LABEL_ALIGN): Use align_labels_log.
12594         (LOOP_ALIGN): Use align_loops_align.
12595         * config/s390/s390.c (s390_asm_output_function_label): Use new
12596         macros.
12597         * config/sh/sh.c (sh_override_options_after_change):
12598         Change type of constants.
12599         * config/spu/spu.c (spu_sched_init): Likewise.
12600         * config/sparc/sparc.c (sparc_option_override): Set default
12601         values for options.
12602         * config/visium/visium.c (visium_option_override): Likewise.
12603         * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
12604         emit p2align format with last argument if it's not needed.
12605         * doc/invoke.texi: Document extended format of -falign-*.
12606         * final.c: Use align_labels alignment.
12607         * flags.h (struct target_flag_state): Change type to use
12608         align_flags.
12609         (struct align_flags_tuple): New.
12610         (struct align_flags): Likewise.
12611         (align_loops_log): Redefine macro to use new types.
12612         (align_loops_max_skip): Redefine macro to use new types.
12613         (align_jumps_log): Redefine macro to use new types.
12614         (align_jumps_max_skip): Redefine macro to use new types.
12615         (align_labels_log): Redefine macro to use new types.
12616         (align_labels_max_skip): Redefine macro to use new types.
12617         (align_functions_log): Redefine macro to use new types.
12618         (align_loops): Redefine macro to use new types.
12619         (align_jumps): Redefine macro to use new types.
12620         (align_labels): Redefine macro to use new types.
12621         (align_functions): Redefine macro to use new types.
12622         (align_functions_max_skip): Redefine macro to use new types.
12623         (align_loops_value): New macro.
12624         (align_jumps_value): New macro.
12625         (align_labels_value): New macro.
12626         (align_functions_value): New macro.
12627         * function.c (invoke_set_current_function_hook): Propagate
12628         alignment values from flags to global variables default in
12629         topleev.h.
12630         * ipa-icf.c (sem_function::equals_wpa): Use
12631         cl_optimization_option_eq instead of memcmp.
12632         * lto-streamer.h (cl_optimization_stream_out): Support streaming
12633         of string types.
12634         (cl_optimization_stream_in): Likewise.
12635         * optc-save-gen.awk: Support strings in cl_optimization.
12636         * opth-gen.awk: Likewise.
12637         * opts.c (finish_options): Remove error checking of invalid
12638         value ranges.
12639         (MAX_CODE_ALIGN): Remove.
12640         (MAX_CODE_ALIGN_VALUE): Likewise.
12641         (parse_and_check_align_values): New function.
12642         (check_alignment_argument): Likewise.
12643         (common_handle_option): Use check_alignment_argument.
12644         * opts.h (parse_and_check_align_values): Declare.
12645         * toplev.c (init_alignments): Remove.
12646         (read_log_maxskip): New.
12647         (parse_N_M): Likewise.
12648         (parse_alignment_opts): Likewise.
12649         (backend_init_target): Remove usage of init_alignments.
12650         * toplev.h (parse_alignment_opts): Declare.
12651         * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
12652         argument.
12653         * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
12654         * tree.c (cl_option_hasher::equal): New.
12655         * varasm.c: Use new global macros.
12657 2018-07-04  Denys Vlasenko  <dvlasenk@redhat.com>
12659         * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
12660         Use a simpler align directive also if MAXSKIP = ALIGN-1.
12661         * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12662         * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12663         * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12664         * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
12665         * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
12666         is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
12667         define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
12668         * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12669         * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12670         * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12671         * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
12673 2018-07-04  Martin Liska  <mliska@suse.cz>
12674             Jonathan Wakely  <jwakely@redhat.com>
12676         * coverage.c: Use correct type.
12677         * doc/invoke.texi: Language correction.
12679 2018-07-03  H.J. Lu  <hongjiu.lu@intel.com>
12681         PR target/85620
12682         * config/i386/i386.c (rest_of_insert_endbranch): Also generate
12683         ENDBRANCH for non-tail call which may return via indirect branch.
12684         * doc/extend.texi: Document indirect_return attribute.
12686 2018-07-03  Martin Sebor  <msebor@redhat.com>
12688         PR tree-optimization/86274
12689         * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
12690         precondition.
12691         (format_floating): Correct handling of infinities and NaNs.
12693 2018-07-03  Martin Sebor  <msebor@redhat.com>
12695         * print-tree.c (print_real_cst): New function.
12696         (print_node_brief): Call it.
12697         (print_node): Ditto.
12699 2018-07-03  Jeff Law  <law@redhat.com>
12701         * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
12702         into a single pattern.
12704         * config/h8300/h8300.md (ors code_iterator): New.
12705         (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
12706         a single pattern and single splitter.
12707         (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
12708         (iorqi3_1, xorqi3_1): Likewise.
12709         (iorqi3, xorqi3 expanders): Similarly.
12711         * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
12712         (movmd_internal) into a single pattern using the P mode iterator.
12713         (movmd splitters): Similarly.
12714         (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
12715         (movsd splitters): Similarly.
12717         * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
12718         ADDB, ADDW and ADDL into a single ADD attribute which selects the
12719         right table based on the size of the operand.
12720         * config/h8300/h8300.md (length_table): Corresponding changes. All
12721         references to "addb", "addw" and "addl" changed to "add".
12722         (btst patterns): Merge two variants into a single pattern.
12723         (tstqi, tsthi): Likewise.
12724         (addhi3_incdec, addsi3_incdec): Likewise.
12725         (subhi3_h8300hs, subsi3_h8300hs): Likewise.
12726         (mulhi3, mulsi3): Likewise.
12727         (udivhi3, udivsi3): Likewise.
12728         (divhi3, divsi3): Likewise.
12729         (andorqi3, andorhi3, andorsi3): Likewise.
12731 2018-07-03  Uros Bizjak  <ubizjak@gmail.com>
12733         PR target/85694
12734         * config/i386/sse.md (uavg<mode>3_ceil): New expander.
12735         (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
12737 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
12739         PR tree-optimization/85694
12740         * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
12741         (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
12742         UNSPEC_URHADD.
12743         * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
12744         (<u>avg<mode>3_ceil): New patterns.
12746 2018-07-03  David Malcolm  <dmalcolm@redhat.com>
12748         * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
12749         scan-tree-dump directive.
12750         * gcc.dg/vect/slp-perm-2.c: Likewise.
12751         * gcc.dg/vect/slp-perm-3.c: Likewise.
12752         * gcc.dg/vect/slp-perm-5.c: Likewise.
12753         * gcc.dg/vect/slp-perm-6.c: Likewise.
12754         * gcc.dg/vect/slp-perm-7.c: Likewise.
12755         * gcc.dg/vect/slp-perm-8.c: Likewise.
12757 2018-07-03  Marek Polacek  <polacek@redhat.com>
12759         PR middle-end/86202
12760         * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
12762 2018-07-03  Richard Biener  <rguenther@suse.de>
12764         PR ipa/86389
12765         * tree-ssa-structalias.c (find_func_clobbers): Properly
12766         handle indirect calls.
12768 2018-07-03  Jeff Law  <law@redhat.com>
12770         * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
12771         (shifts): New code iterator.
12772         (movqi, movhi, movsi, movsf expanders): Consolidate into a single
12773         expander.  Fix HImode handling on H8/SX.
12774         (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
12775         (subqi3, subhi3, subsi3 expanders): Likewise.
12776         (andqi3, andhi3, andsi3 expanders): Likewise.
12777         (iorqi3, iorhi3, iorsi3 expanders): Likewise.
12778         (xorqi3, xorhi3, xorsi3 expanders): Likewise.
12779         (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
12780         (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
12781         (zero_extendqihi2, zero_extendqisi2): Likewise.
12782         (extendqihi2, extendqisi2): Likewise.
12783         (rotlqi3, rotlhi3, rotlsi3): Likewise.
12784         (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
12785         (rotlqi3_1, rotlhi3_1): Likewise.
12786         (logicalhi3_sn, logicalsi3_sn): Likewise.
12787         (logicalhi3, logicalsi3): Likewise.
12789 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
12791         * tree-vect-patterns.c (vect_recog_rotate_pattern)
12792         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
12793         (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
12794         (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
12795         type to append_pattern_def_seq instead of creating a stmt_vec_info
12796         directly.
12797         (build_mask_conversion): Likewise.  Remove vinfo argument.
12798         (vect_add_conversion_to_patterm): Likewise, renaming to...
12799         (vect_add_conversion_to_pattern): ...this.
12800         (vect_recog_mask_conversion_pattern): Update call to
12801         build_mask_conversion.  Pass the vector type to
12802         append_pattern_def_seq here too.
12803         (vect_recog_gather_scatter_pattern): Update call to
12804         vect_add_conversion_to_pattern.
12806 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
12808         * tree-vect-patterns.c (new_pattern_def_seq): Delete.
12809         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
12810         (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
12811         (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
12812         STMT_VINFO_PATTERN_DEF_SEQ to null here.
12813         (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
12814         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
12815         append_pattern_def_seq instead of new_pattern_def_seq.
12816         (vect_recog_divmod_pattern): Do both of the above.
12817         (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
12818         is null.
12820 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
12822         * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
12823         (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
12824         (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
12825         (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
12826         (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
12827         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
12828         (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
12829         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
12830         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
12831         (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
12832         parameter with a single stmt_vec_info.
12833         (vect_recog_func_ptr): Likewise.
12834         (vect_recog_gather_scatter_pattern): Likewise, folding in...
12835         (vect_try_gather_scatter_pattern): ...this.
12836         (vect_pattern_recog_1): Remove stmts_to_replace and just pass
12837         the stmt_vec_info of the statement to be matched.  Don't clear
12838         STMT_VINFO_RELATED_STMT.
12839         (vect_pattern_recog): Update call accordingly.
12841 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
12843         PR tree-optimization/85694
12844         * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
12845         (uavgM3_ceil): Document new optabs.
12846         * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
12847         * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
12848         functions.
12849         * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
12850         (savg_ceil_optab): New optabs.
12851         * tree-vect-patterns.c (vect_recog_average_pattern): New function.
12852         (vect_vect_recog_func_ptrs): Add it.
12853         * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
12854         constant directly from the associated lhs.
12856 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
12858         * tree-vect-patterns.c (vect_split_statement): New function.
12859         (vect_convert_input): Use it to try to split an existing cast.
12861 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
12863         * poly-int.h (print_hex): New function.
12864         * dumpfile.h (dump_dec, dump_hex): Declare.
12865         * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
12866         * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
12867         min_input_precision, operation_precision and operation_sign.
12868         * tree-vect-patterns.c (vect_get_range_info): New function.
12869         (vect_same_loop_or_bb_p, vect_single_imm_use)
12870         (vect_operation_fits_smaller_type): Delete.
12871         (vect_look_through_possible_promotion): Add an optional
12872         single_use_p parameter.
12873         (vect_recog_over_widening_pattern): Rewrite to use new
12874         stmt_vec_info infomration.  Handle one operation at a time.
12875         (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
12876         (vect_truncatable_operation_p, vect_set_operation_type)
12877         (vect_set_min_input_precision): New functions.
12878         (vect_determine_min_output_precision_1): Likewise.
12879         (vect_determine_min_output_precision): Likewise.
12880         (vect_determine_precisions_from_range): Likewise.
12881         (vect_determine_precisions_from_users): Likewise.
12882         (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
12883         (vect_vect_recog_func_ptrs): Put over_widening first.
12884         Add cast_forwprop.
12885         (vect_pattern_recog): Call vect_determine_precisions.
12887 2018-07-03  Richard Sandiford  <richard.sandiford@arm.com>
12889         * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
12890         statements that have been replaced by further pattern statements.
12891         (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
12893 2018-07-03  Richard Biener  <rguenther@suse.de>
12895         * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
12896         always set *dt.  Dump vectype in vectype overload.
12897         * dumpfile.h (dump_gimple_expr): New function.
12898         (dump_gimple_expr_loc): Likewise.
12899         * dumpfile.c (dump_gimple_expr): New function.
12900         (dump_gimple_expr_loc): Likewise.
12902 2018-07-02  Jeff Law  <law@redhat.com>
12904         * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
12905         the H8/300, H8/300H and H8/S variants into a single pattern.
12906         (movhi_h8300, movqi_h8300hs): Similarly.
12907         (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
12908         (QHI mode iterator): New.
12910         * config/h8300/h8300.md: Remove trailing whitespace.
12912 2018-07-02  Jim Wilson  <jimw@sifive.com>
12914         * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
12915         instead of emit_insn for interrupt returns.
12916         * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
12917         (riscv_sret, riscv_uret): Likewise.
12919 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
12921         * pretty-print.c (selftest::test_pp_format): Move save and restore
12922         of quotes to class auto_fix_quotes, and add an instance.
12923         * selftest.c: Include "intl.h".
12924         (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
12925         (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
12926         * selftest.h (selftest::auto_fix_quotes): New class.
12928 2018-07-02  Richard Henderson  <richard.henderson@linaro.org>
12930         * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
12931         (aarch64_sve_prepare_conditional_op): Remove.
12932         * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
12933         Allow aarch64_simd_reg_or_zero as select operand; remove
12934         the aarch64_sve_prepare_conditional_op call.
12935         (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
12936         (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
12937         (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
12938         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
12939         (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
12940         (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
12941         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
12942         (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
12943         and a splitters to match all of the *_any patterns.
12944         * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
12946         * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
12947         (SVE_COND_FP_BINARY_REV): Remove.
12948         (sve_int_op_rev, sve_fp_op_rev): New.
12949         * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
12950         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
12951         (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
12952         (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
12953         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
12954         (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
12955         (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
12956         (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
12957         (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
12959         * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
12960         Remove match_dup 1 from the inner unspec.
12961         (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
12963         * config/aarch64/aarch64.md (movprfx): New attr.
12964         (length): Default movprfx to 8.
12965         * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
12966         (*madd<SVE_I>, *msub<SVE_I): Likewise.
12967         (*<su>mul<SVE_I>3_highpart): Likewise.
12968         (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
12969         (*v<ASHIFT><SVE_I>3): Likewise.
12970         (*<su><MAXMIN><SVE_I>3): Likewise.
12971         (*<su><MAXMIN><SVE_F>3): Likewise.
12972         (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
12973         (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
12974         (*div<SVE_F>4): Likewise.
12976 2018-07-02  Richard Sandiford  <richard.sandiford@arm.com>
12978         * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
12979         in dump string.
12981 2018-07-02  Richard Biener  <rguenther@suse.de>
12983         PR tree-optimization/86363
12984         * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
12985         memset argument refers to a non-variable address.
12987 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
12989         * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
12990         {PLUS,MINUS}_EXPR code to...
12991         (adjust_symbolic_bound): ...here,
12992         (combine_bound): ...here,
12993         (set_value_range_with_overflow): ...and here.
12995 2018-07-02  Aldy Hernandez  <aldyh@redhat.com>
12997         * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
12998         code...
12999         (extract_range_from_abs_expr): ...here.
13001 2018-07-02  Eric Botcazou  <ebotcazou@adacore.com>
13003         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
13004         -fno-omit-frame-pointer when not optimizing.
13006 2018-07-02  Martin Liska  <mliska@suse.cz>
13008         PR ipa/86279
13009         * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
13010         (propagate_nothrow): Likewise.
13012 2018-07-02  Martin Liska  <mliska@suse.cz>
13014         PR ipa/86323
13015         * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
13017 2018-07-02  David Malcolm  <dmalcolm@redhat.com>
13019         * dumpfile.c (dump_generic_expr_loc): Undo removal of this
13020         function in r262149, changing "loc" param from source_location to
13021         const dump_location_t &.
13022         * dumpfile.h (dump_generic_expr_loc): Undo removal of this
13023         declaration, as above.
13025 2018-07-01  Paul Koning  <ni1d@arrl.net>
13027         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
13028         -munit-asm, -mgnu-asm, -mdec-asm.
13029         * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
13030         (pdp11_output_labelref): New.
13031         (pdp11_output_def): New.
13032         (pdp11_output_addr_vec_elt): New.
13033         * config/pdp11/pdp11.c: Use tab between opcode and operands.  Use
13034         %# and %@ format codes.
13035         (pdp11_option_override): New.
13036         (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
13037         (pdp11_output_ident): New.
13038         (pdp11_asm_named_section): New.
13039         (pdp11_asm_init_sections): New.
13040         (pdp11_file_start): New.
13041         (pdp11_file_end): New.
13042         (output_ascii): Use .ascii/.asciz for -mdec-asm.
13043         (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm.  Add
13044         %o, like %c but octal.
13045         (pdp11_option_override): New.
13046         * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
13047         -mdec-asm.
13048         (DATA_SECTION_ASM_OP): Ditto.
13049         (READONLY_DATA_SECTION_ASM_OP): New.
13050         (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
13051         (ASM_GENERATE_INTERNAL_LABEL): Use new function.
13052         (ASM_OUTPUT_LABELREF): Ditto.
13053         (ASM_OUTPUT_DEF): Ditto.
13054         (ASM_OUTPUT_EXTERNAL): New.
13055         (ASM_OUTPUT_SOURCE_FILENAME): New.
13056         (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
13057         (ASM_OUTPUT_SKIP): Update for -mdec-asm.
13058         * config/pdp11/pdp11.md: Use tab between opcode and operands.  Use
13059         %# and %@ format codes.
13060         * config/pdp11/pdp11.opt (mgnu-asm): New.
13061         (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
13062         (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
13063         * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
13065 2018-07-01  Aldy Hernandez  <aldyh@redhat.com>
13067         * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
13068         dereferencing path[] beyond its length.
13069         (debug_path): New.
13070         (debug_all_paths): New.
13071         (rewire_first_differing_edge): New.
13072         (adjust_paths_after_duplication): New.
13073         (duplicate_thread_path): Call adjust_paths_after_duplication.
13074         Add new argument.
13075         (thread_through_all_blocks): Add new argument to
13076         duplicate_thread_path.
13078 2018-06-30  Jim Wilson  <jimw@sifive.com>
13080         * config/riscv/predicates.md (p2m1_shift_operand): New.
13081         (high_mask_shift_operand): New.
13082         * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
13083         pattern using p2m1_shift_operand.
13084         (lshsi3_zero_extend_3+2): New combiner pattern using
13085         high_mask_shift_operand.
13087 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13089         * tree-vect-patterns.c (vect_get_external_def_edge): New function,
13090         split out from...
13091         (vect_recog_rotate_pattern): ...here.
13092         (vect_convert_input): Try to insert casts of invariants in the
13093         preheader.
13094         * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
13095         preheader to be empty.
13097 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13099         * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
13100         vector type.  If given, install it in the new statement's
13101         STMT_VINFO_VECTYPE.
13102         (vect_element_precision): New function.
13103         (vect_unpromoted_value): New struct.
13104         (vect_unpromoted_value::vect_unpromoted_value): New function.
13105         (vect_unpromoted_value::set_op): Likewise.
13106         (vect_look_through_possible_promotion): Likewise.
13107         (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
13108         (vect_widened_op_tree, vect_convert_input): Likewise.
13109         (vect_convert_inputs, vect_convert_output): Likewise.
13110         (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
13111         to handle the optional cast of the multiplication result and
13112         vect_widened_op_tree to detect the widened multiplication itself.
13113         Do not require the input and output of promotion casts to have
13114         the same sign, but base the signedness of the operation on the
13115         input rather than the result.  If the pattern includes two
13116         promotions, check that those promotions have the same sign.
13117         Do not restrict the MULT_EXPR handling to a double-width result;
13118         handle quadruple-width results and wider.  Use vect_convert_inputs
13119         to convert the inputs to the common type.
13120         (vect_recog_sad_pattern):  Use vect_look_through_possible_promotion
13121         to handle the optional cast of the ABS result.  Also allow a sign
13122         change or a sign extension between the ABS and MINUS.
13123         Use vect_widened_op_tree to detect the widened subtraction and use
13124         vect_convert_inputs to convert the inputs to the common type.
13125         (vect_handle_widen_op_by_const): Delete.
13126         (vect_recog_widen_op_pattern): New function.
13127         (vect_recog_widen_mult_pattern): Use it.
13128         (vect_recog_widen_shift_pattern): Likewise.
13129         (vect_recog_widen_sum_pattern): Use
13130         vect_look_through_possible_promotion to handle the promoted
13131         PLUS_EXPR operand.
13133 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13135         * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
13136         the containing gimple_seq *.
13137         * gimple-iterator.h (gsi_for_stmt): Declare it.
13138         * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
13139         (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
13140         (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
13141         (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
13142         (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
13143         checks.
13144         (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
13145         split out from...
13146         (vect_mark_pattern_stmts): ...here.  Handle cases in which the
13147         statement being replaced is part of an existing pattern
13148         definition sequence, inserting the new pattern statements before
13149         the original one.
13150         (vect_pattern_recog_1): Don't return a bool.  If the statement
13151         is already part of a pattern, instead apply pattern matching
13152         to the pattern definition statements.  Don't clear the
13153         STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
13154         (vect_pattern_recog): Don't break after the first match;
13155         continue processing the pattern definition statements instead.
13156         Don't bail out for STMT_VINFO_IN_PATTERN_P here.
13158 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13160         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
13161         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
13162         (vect_recog_widen_sum_pattern): Use it.
13164 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13166         * tree-vect-loop.c (vectorizable_reduction): Assert that the
13167         phi is not a pattern statement and has not been replaced by
13168         a pattern statement.
13169         * tree-vect-patterns.c (type_conversion_p): Don't check
13170         STMT_VINFO_IN_PATTERN_P.
13171         (vect_recog_vector_vector_shift_pattern): Likewise.
13172         (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
13173         the pattern statement rather than the original statement; check
13174         directly for a WIDEN_MULT_EXPR here.
13175         * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
13176         vect_is_simple_use to return the pattern statement rather
13177         than the original statement; use is_pattern_stmt_p to check
13178         for such a pattern statement.
13179         * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
13180         to return the pattern statement rather than the original statement;
13181         don't do the same transformation here.
13182         (vect_is_simple_use): If the defining statement has been replaced
13183         by a pattern statement, return the pattern statement instead.
13184         Remove the corresponding (local) transformation from the vectype
13185         overload.
13187 2018-06-30  Richard Sandiford  <richard.sandiford@arm.com>
13189         * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
13190         end and default to null.
13191         * tree-vect-loop.c (vect_create_epilog_for_reduction)
13192         (vectorizable_reduction): Update calls accordingly, dropping the
13193         gimple ** argument if the passed-back statement isn't needed.
13194         * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
13195         (vect_recog_rotate_pattern): Likewise.
13196         (vect_recog_mask_conversion_pattern): Likewise.
13197         * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
13198         (vect_mask_constant_operand_p): Likewise.
13199         * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
13200         (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
13201         (get_group_load_store_type, get_load_store_type): Likewise.
13202         (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
13203         (vectorizable_call, vectorizable_simd_clone_call): Likewise.
13204         (vectorizable_conversion, vectorizable_assignment): Likewise.
13205         (vectorizable_shift, vectorizable_operation): Likewise.
13206         (vectorizable_store, vect_is_simple_cond): Likewise.
13207         (vectorizable_condition, vectorizable_comparison): Likewise.
13208         (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
13209         (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
13210         and move it to the end.  Cope with null def_stmt_outs.
13212 2018-06-30  Bernd Edlinger  <bernd.edlinger@hotmail.de>
13214         * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
13216 2018-06-29  Jeff Law  <law@redhat.com>
13218         * config/v850/v850.c (v850_legitimate_address_p): Handle large
13219         displacements for TARGET_V850E2V3 and newer.
13220         (TARGET_LRA_P): Remove.  Defaults to LRA now.
13221         * config/v850/v850.md (sign23byte_load): Remove.
13222         (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
13223         (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
13225 2018-06-29  Martin Liska  <mliska@suse.cz>
13227         PR lto/85759
13228         * coverage.c (coverage_init): Mangle full path name.
13229         * doc/invoke.texi: Document the change.
13230         * gcov-io.c (mangle_path): New.
13231         * gcov-io.h (mangle_path): Likewise.
13232         * gcov.c (mangle_name): Use mangle_path for path mangling.
13234 2018-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13236         * config/arm/arm.c (output_move_double): Don't allow STRD instructions
13237         if starting source register is not even.
13239 2018-06-29  Martin Liska  <mliska@suse.cz>
13241         PR tree-optimization/86263
13242         * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
13243         Make edge redirection.
13245 2018-06-29  David Malcolm  <dmalcolm@redhat.com>
13247         * dumpfile.c (dump_loc): Add indentation based on scope depth.
13248         (dump_scope_depth): New variable.
13249         (get_dump_scope_depth): New function.
13250         (dump_begin_scope): New function.
13251         (dump_end_scope): New function.
13252         * dumpfile.h (get_dump_scope_depth): New declaration.
13253         (dump_begin_scope): New declaration.
13254         (dump_end_scope): New declaration.
13255         (class auto_dump_scope): New class.
13256         (AUTO_DUMP_SCOPE): New macro.
13257         * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
13258         AUTO_DUMP_SCOPE.
13260 2018-06-29  Richard Biener  <rguenther@suse.de>
13262         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
13263         compute_all_dependences succeeds.
13264         * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
13265         exceed --param loop-max-datarefs-for-datadeps.
13267 2018-06-29  Jakub Jelinek  <jakub@redhat.com>
13269         * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
13271 2018-06-28  Uros Bizjak  <ubizjak@gmail.com>
13273         PR target/86348
13274         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
13275         alternative 0 in preferred_for_speed attribute.
13277 2018-06-28  Paul Koning  <ni1d@arrl.net>
13279         * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
13280         * config/pdp11/pdp11.c (pdp11_shift_length): New function.
13281         * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
13282         * config/pdp11/pdp11.md: Correct "length" attribute calculation
13283         for shift insn patterns.
13285 2018-06-28  David Malcolm  <dmalcolm@redhat.com>
13287         * cgraph.c (cgraph_node::get_body): Replace assignments to
13288         "dump_file" with calls to set_dump_file.
13289         * dumpfile.c (alt_dump_file): Make static, and group with...
13290         (alt_flags): ...this definition.
13291         (dumps_are_enabled): New variable.
13292         (refresh_dumps_are_enabled): New function.
13293         (set_dump_file): New function.
13294         (set_alt_dump_file): New function.
13295         (gcc::dump_manager::dump_start): Replace assignments to
13296         "dump_file" and "alt_dump_file" with calls to set_dump_file and
13297         set_alt_dump_file.
13298         (gcc::dump_manager::dump_finish): Likewise.
13299         * dumpfile.h (alt_dump_file): Delete decl.
13300         (dumps_are_enabled): New variable decl.
13301         (set_dump_file): New function decl.
13302         (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
13303         global.
13304         * tree-nested.c (lower_nested_functions): Replace assignments to
13305         "dump_file" with calls to set_dump_file.
13307 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
13309         * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
13310         goto_locus of each outgoing edge of each basic block.
13312 2018-06-28  Richard Biener  <rguenther@suse.de>
13314         * dwarf2out.c (decl_scope_table): Remove.
13315         (push_decl_scope): Likewise.
13316         (pop_decl_scope): Likewise.
13317         (gen_type_die_for_member): Do not call push/pop_decl_scope.
13318         (gen_struct_or_union_type_die): Likewise.
13319         (gen_tagged_type_die): Likewise.
13320         (dwarf2out_init): Do not initialize decl_scope_table.
13321         (dwarf2out_c_finalize): Do not free it.
13323 2018-06-28  Richard Biener  <rguenther@suse.de>
13325         * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
13326         deciding whether to not re-use a DIE.
13328 2018-06-28  Richard Biener  <rguenther@suse.de>
13330         * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
13331         DW_AT_abstract_origin attribute.
13333 2018-06-28  Martin Liska  <mliska@suse.cz>
13335         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
13336         Use newly introduced constants.
13337         * tree-switch-conversion.h (struct jump_table_cluster):
13338         Define max_ratio_for_size and max_ratio_for_speed.
13340 2018-06-28  Martin Liska  <mliska@suse.cz>
13342         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13343         Add new checking assert to catch invalid state.
13344         (jump_table_cluster::can_be_handled): Handle single case
13345         clusters.
13346         (jump_table_cluster::is_beneficial): Bail out for such case.
13347         (bit_test_cluster::find_bit_tests):
13348         Add new checking assert to catch invalid state.
13349         (bit_test_cluster::can_be_handled): Handle single case
13350         clusters.
13351         (bit_test_cluster::is_beneficial): Bail out for such case.
13352         (switch_decision_tree::analyze_switch_statement):
13353         Fix comment.
13355 2018-06-28  Martin Liska  <mliska@suse.cz>
13357         * common.opt: Introduce -completion option.
13358         * gcc.c (driver_handle_option): Handle it.
13359         (driver::main): Print completions if completion
13360         is set.
13361         * opt-suggestions.c (option_proposer::get_completions):
13362         New function.
13363         (option_proposer::suggest_completion): Likewise.
13364         (option_proposer::find_param_completions): Likewise.
13365         (verify_autocompletions): Likewise.
13366         (test_completion_valid_options): Likewise.
13367         (test_completion_valid_params): Likewise.
13368         (in_completion_p): Likewise.
13369         (empty_completion_p): Likewise.
13370         (test_completion_partial_match): Likewise.
13371         (test_completion_garbage): Likewise.
13372         (opt_proposer_c_tests): Likewise.
13373         * opt-suggestions.h: Declare new functions.
13374         * opts.c (common_handle_option): Handle OPT__completion_.
13375         * selftest-run-tests.c (selftest::run_tests): Add
13376         opt_proposer_c_tests.
13377         * selftest.c (assert_str_startswith): New.
13378         * selftest.h (assert_str_startswith): Likewise.
13379         (opt_proposer_c_tests): New.
13380         (ASSERT_STR_STARTSWITH): Likewise.
13382 2018-06-28  Martin Liska  <mliska@suse.cz>
13384         * Makefile.in: Add opt-suggestions.o.
13385         * gcc-main.c: Include opt-suggestions.h.
13386         * gcc.c (driver::driver): Likewise.
13387         (driver::~driver): Remove m_option_suggestions.
13388         (driver::build_option_suggestions): Moved to option_proposer.
13389         (driver::suggest_option): Likewise.
13390         (driver::handle_unrecognized_options): Use option_proposer.
13391         * gcc.h (class driver): Add new memver m_option_proposer.
13392         * opt-suggestions.c: New file.
13393         * opt-suggestions.h: New file.
13395 2018-06-28  Martin Liska  <mliska@suse.cz>
13397         * vec.h (class auto_string_vec): New (moved from auto_argvec).
13398         (auto_string_vec::~auto_string_vec): Likewise.
13400 2018-06-28  Eric Botcazou  <ebotcazou@adacore.com>
13402         * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
13403         prevent_decl_creation_for_types fields up and add reset_location field.
13404         * tree-inline.c (remap_gimple_stmt): Force input_location on the new
13405         statement if id->reset_location is true.
13406         (copy_edges_for_bb): Do not set goto_locus on the new edges if
13407         id->reset_location is true.
13408         (copy_phis_for_bb): Force input_location on the arguments if
13409         id->reset_location is true.
13410         (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
13411         is set on the function to be inlined.
13413 2018-06-27  Stephan Bergmann  <sbergman@redhat.com>
13415         * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
13417 2018-06-27  Dimitar Dimitrov  <dimitar@dinux.eu>
13419         * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
13420         registers for Pmode.
13421         * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
13422         hard registers for the clobbered pseudo.
13424 2018-06-27  Paul Koning  <ni1d@arrl.net>
13426         * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
13427         mutually exclusive options.
13428         * config/pdp11/constraints.md (h): New constraint.
13429         (O): Update definition to match shift code generation.
13430         (D): New constraint.
13431         * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
13432         (CCFP): Remove.
13433         * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
13434         function.
13435         (output_jump): Change arguments.
13436         (pdp11_fixed_cc_regs): New function.
13437         (pdp11_cc_mode): Ditto.
13438         (pdp11_expand_shift): Ditto.
13439         (pdp11_assemble_shift): Ditto.
13440         (pdp11_small_shift): Ditto.
13441         (pdp11_branch_cost): Remove.
13442         * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
13443         from output.
13444         (pdp11_register_move_cost): Update for CC registers.
13445         (pdp11_rtx_costs): Add case for LSHIFTRT.
13446         (pdp11_output_jump): Add CCNZ mode conditional branches.
13447         (notice_update_cc_on_set): Remove.
13448         (pdp11_cc_mode): New function.
13449         (simple_memory_operand): Correct pre/post decrement case.
13450         (no_side_effect_operand): New function.
13451         (pdp11_regno_reg_class): Add CC_REGS class.
13452         (pdp11_fixed_cc_regs): New function.
13453         (pdp11_small_shift): New function.
13454         (pdp11_expand_shift): New function to expand shift insns.
13455         (pdp11_assemble_shift): New function to output shifts.
13456         (pdp11_branch_cost): Remove.
13457         (pdp11_modes_tieable_p): Make QI/HI modes tieable.
13458         * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
13459         (WCHAR_TYPE): Ditto.
13460         (PTRDIFF_TYPE): Ditto.
13461         (ADJUST_INSN_LENGTH): New macro.
13462         (FIXED_REGISTERS): Add CC registers.
13463         (CALL_USED_REGISTERS): Ditto.
13464         (reg_class): Ditto.
13465         (REG_CLASS_NAMES): Ditto.
13466         (REG_CLASS_CONTENTS): Ditto.
13467         (SELECT_CC_MODE): Use new function.
13468         (TARGET_FLAGS_REGNUM): New macro.
13469         (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
13470         (cc0_reg_rtx): Remove.
13471         (CC_STATUS_MDEP): Remove.
13472         (CC_STATUS_MDEFP_INIT): Remove.
13473         (CC_IN_FPU): Remove.
13474         (NOTICE_UPDATE_CC): Remove.
13475         (REGISTER_NAMES): Add CC registers.
13476         (BRANCH_COST): Change to constant 1.
13477         * config/pdp11/pdp11.md: Rewrite for CCmode condition code
13478         handling.
13479         * config/pdp11/pdp11.opt (mbcopy): Remove.
13480         (mbcopy-builtin): Remove.
13481         (mbranch-cheap): Remove.
13482         (mbranch-expensive): Remove.
13483         * config/pdp11/predicates.md (expand_shift_operand): Update to
13484         match shift code generation.
13485         (ccnz_operator): New predicate.
13486         * doc/invoke.texi (PDP-11 Options): Remove deleted options
13487         -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
13488         Remove non-existent option -mabshi, -mno-abshi.  Document mutually
13489         exclusive options.
13490         * doc/md.texi (PDP-11): Document new D and h constraints.  Update
13491         description of O constraint.
13493 2018-06-27  Jeff Law  <law@redhat.com>
13494             Austin Law  <austinklaw@gmail.com>
13496         * config/v850/v850.md (addsi3_set_flags): New pattern.
13497         (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
13498         (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
13499         (zero_extendhisi2_v850_set_flags): Likewise.
13500         (zero_extendqisi2_v850_set_flags): Likewise.
13501         (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
13502         (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
13503         (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
13505         * config/v850/v850-protos.h (notice_update_cc): Remove.
13506         * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
13507         (v850_print_operand): Handle 'D' and "d".
13508         (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
13509         Add handling of arithmetic/logical operations compared against zero.
13510         (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
13511         Do not look at v850_compare_op, instead get mode from last argument.
13512         (v850_gen_compare): Remove
13513         (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
13514         after reload for prologue insns.
13515         (expand_prologue): Account for CLOBBER of CC_REGNUM in various
13516         patterns.
13517         (construct_save_jarl): Likewise.
13518         (TARGET_FLAGS_REGNUM): Define.
13519         * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
13520         (NOTICE_UPDATE_CC): Remove.
13521         * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
13522         than cc0.  Conditionalize on reload_completed.
13523         (cmpsi_insn, setfcc_insn): Likewise.
13524         (tst1 splitter): Turn into define_and_split which sets the flags
13525         after reload.
13526         (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
13527         (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
13528         (cstoresf4, cstoredf4): Clobber the flags.
13529         (cmpsi, cmpsf, cmpdf): Remove expanders.
13530         (setf_insn): Remove pattern.
13531         (addsi3): Turn into define_and_split which clobbers the flags after
13532         reload and a suitable pattern (addsi3_clobber_flags) for use after
13533         reload.
13534         (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
13535         (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
13536         (ashrsi3, ashrsi3_v850e2): Likewise.
13537         (bins): Clobber the flags.
13538         (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
13539         (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
13540         (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
13541         (call_value_internal_short, call_value_internal_long): Likewise.
13542         (callt_save_interrupt, callt_return_interrupt): Likewise.
13543         (save_interrupt, return_interrupt): Likewise.
13544         (callt_save_all_interrupt, save_all_interrupt): Likewise.
13545         (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
13546         (restore_all_interrupt, _restore_all_interrupt): Likewise.
13547         (All FP comparisons): Only allow after reload has completed.
13548         (trfsr): Likewise.
13549         (divh, divhu): Tweak output template.
13550         (branch_z_normal, branch_z_invert): Remove
13551         (branch_nz_normal, branch_nz_invert): Likewise.
13552         (extendhisi_insn, extendqisi_insn): Do not clobber flags.
13554         * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
13555         * config/v850/v850.c (notice_update_cc): Remove.
13556         * config/v850/v850.h  (CC_OVERFLOW_UNUSABLE): Remove
13557         (CC_NO_CARRY): Likewise.
13558         (NOTICE_UPDATE_CC): Define to nothing.
13559         * config/v850/v850.md: Remove block comment on cc0 handling
13560         Remove "cc" attribute from all patterns.  Remove cc_status handling
13561         from all patterns.  Minor formatting fixes.
13563 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13565         * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
13566         (cortex-a76.cortex-a55): Likewise.
13567         * config/aarch64/aarch64-tune.md: Regenerate.
13568         * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
13569         cortex-a76.cortex-a55.
13571 2018-06-27  Jeff Law  <law@redhat.com>
13573         * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
13574         (MULTILIB_DIRNAMES): Similarly.
13576 2018-06-27  Eric Botcazou  <ebotcazou@adacore.com>
13578         * gimple.h (gimple_return_retbnd): Delete.
13579         (gimple_return_set_retbnd): Likewise.
13580         * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
13581         gimple_return_set_retbnd.
13582         * gimple-pretty-print.c (dump_gimple_return): Remove call to
13583         gimple_return_retbnd and adjust.
13584         * tree-inline.h (struct copy_body_data): Remove retbnd field.
13585         * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
13586         Explicitly return NULL in a couple more cases.  Move assertion
13587         on debug statements and remove unreachable code.
13588         (reset_debug_binding): Do not test id->retbnd.
13589         (expand_call_inline): Do not set it.
13591 2018-06-27  Rasmus Villemoes  <rv@rasmusvillemoes.dk>
13593         * configure.ac: Add --disable-gcov option.
13594         * configure: Regenerate.
13595         * Makefile.in: Honour @enable_gcov@.
13596         * doc/install.texi: Document --disable-gcov.
13598 2018-06-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
13600         * config/arm/arm-cpus.in (cortex-a76): New entry.
13601         (cortex-a76.cortex-a55): Likewise.
13602         * config/arm/arm-tables.opt: Regenerate.
13603         * config/arm/arm-tune.md: Likewise.
13604         * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
13605         * doc/invoke.texi (ARM Options): Document cortex-a76 and
13606         cortex-a76.cortex-a55.
13608 2018-06-27  Tamar Christina  <tamar.christina@arm.com>
13610         PR target/85769
13611         * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
13613 2018-06-27  Siddhesh Poyarekar  <siddhesh@sourceware.org>
13615         * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
13616         comment.
13617         (EPILOGUE_USES): Likewise.
13619 2018-06-26  Eric Botcazou  <ebotcazou@adacore.com>
13621         * tree-inline.c (remap_location): New function extracted from...
13622         (copy_edges_for_bb): Add ID parameter.  Remap goto_locus.
13623         (copy_phis_for_bb): ...here.  Call remap_location.
13624         (copy_cfg_body): Adjust call to copy_edges_for_bb.
13626 2018-06-26  Aaron Sawdey  <acsawdey@linux.ibm.com>
13628         * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
13629         unaligned vsx for 16B memset.
13631 2018-06-26  Segher Boessenkool  <segher@kernel.crashing.org>
13633         PR target/86285
13634         * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
13635         ieee128_float_type_node to long_double_type_node unless
13636         TARGET_LONG_DOUBLE_128 is set.
13638 2018-06-26  David Malcolm  <dmalcolm@redhat.com>
13640         * cfgloop.c (get_loop_location): Convert return type from
13641         location_t to dump_user_location_t, replacing INSN_LOCATION lookups
13642         by implicit construction from rtx_insn *, and using
13643         dump_user_location_t::from_function_decl for the fallback case.
13644         * cfgloop.h (get_loop_location): Convert return type from
13645         location_t to dump_user_location_t.
13646         * cgraphunit.c (walk_polymorphic_call_targets): Update call to
13647         dump_printf_loc to pass in a dump_location_t rather than a
13648         location_t, via the gimple stmt.
13649         * coverage.c (get_coverage_counts): Update calls to
13650         dump_printf_loc to pass in dump_location_t rather than a
13651         location_t.
13652         * doc/optinfo.texi (Dump types): Convert example of
13653         dump_printf_loc from taking "locus" to taking "insn".  Update
13654         description of the "_loc" calls to cover dump_location_t.
13655         * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
13656         "selftest.h".
13657         (dump_user_location_t::dump_user_location_t): New constructors,
13658         from gimple *stmt and rtx_insn *.
13659         (dump_user_location_t::from_function_decl): New function.
13660         (dump_loc): Make static.
13661         (dump_gimple_stmt_loc): Convert param "loc" from location_t to
13662         const dump_location_t &.
13663         (dump_generic_expr_loc): Delete.
13664         (dump_printf_loc): Convert param "loc" from location_t to
13665         const dump_location_t &.
13666         (selftest::test_impl_location): New function.
13667         (selftest::dumpfile_c_tests): New function.
13668         * dumpfile.h: Include "profile-count.h".
13669         (class dump_user_location_t): New class.
13670         (struct dump_impl_location_t): New struct.
13671         (class dump_location_t): New class.
13672         (dump_printf_loc): Convert 2nd param from source_location to
13673         const dump_location_t &.
13674         (dump_generic_expr_loc): Delete.
13675         (dump_gimple_stmt_loc): Convert 2nd param from source_location to
13676         const dump_location_t &.
13677         * gimple-fold.c (fold_gimple_assign): Update call to
13678         dump_printf_loc to pass in a dump_location_t rather than a
13679         location_t, via the gimple stmt.
13680         (gimple_fold_call): Likewise.
13681         * gimple-loop-interchange.cc
13682         (loop_cand::analyze_iloop_reduction_var): Update for change to
13683         check_reduction_path.
13684         (tree_loop_interchange::interchange): Update for change to
13685         find_loop_location.
13686         * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
13687         change in return-type of find_loop_location.
13688         (graphite_regenerate_ast_isl): Likewise.
13689         * graphite-optimize-isl.c (optimize_isl): Likewise.
13690         * graphite.c (graphite_transform_loops): Likewise.
13691         * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
13692         pass in a dump_location_t rather than a location_t, via the
13693         gimple stmt.
13694         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
13695         * ipa.c (walk_polymorphic_call_targets): Likewise.
13696         * loop-unroll.c (report_unroll): Convert "locus" param from
13697         location_t to dump_location_t.
13698         (decide_unrolling): Update for change to get_loop_location's
13699         return type.
13700         * omp-grid.c (struct grid_prop): Convert field "target_loc" from
13701         location_t to dump_user_location_t.
13702         (grid_find_single_omp_among_assignments_1): Updates calls to
13703         dump_printf_loc to pass in a dump_location_t rather than a
13704         location_t, via the gimple stmt.
13705         (grid_parallel_clauses_gridifiable): Convert "tloc" from
13706         location_t to dump_location_t.  Updates calls to dump_printf_loc
13707         to pass in a dump_location_t rather than a location_t, via the
13708         gimple stmt.
13709         (grid_inner_loop_gridifiable_p): Likewise.
13710         (grid_dist_follows_simple_pattern): Likewise.
13711         (grid_gfor_follows_tiling_pattern): Likewise.
13712         (grid_target_follows_gridifiable_pattern): Likewise.
13713         (grid_attempt_target_gridification): Convert initialization
13714         of local "grid" from memset to zero-initialization; FIXME: does
13715         this require C++11?  Update call to dump_printf_loc to pass in a
13716         optinfo_location rather than a location_t, via the gimple stmt.
13717         * profile.c (read_profile_edge_counts): Updates call to
13718         dump_printf_loc to pass in a dump_location_t rather than a
13719         location_t
13720         (compute_branch_probabilities): Likewise.
13721         * selftest-run-tests.c (selftest::run_tests): Call
13722         dumpfile_c_tests.
13723         * selftest.h (dumpfile_c_tests): New decl.
13724         * tree-loop-distribution.c (pass_loop_distribution::execute):
13725         Update for change in return type of find_loop_location.
13726         * tree-parloops.c (parallelize_loops): Likewise.
13727         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
13728         "locus" from location_t to dump_user_location_t.
13729         (canonicalize_loop_induction_variables): Likewise.
13730         * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
13731         for change in return type of find_loop_location.
13732         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
13733         to dump_printf_loc to pass in a dump_location_t rather than a
13734         location_t, via the stmt.
13735         * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
13736         Likewise.
13737         * tree-vect-loop-manip.c (find_loop_location): Convert return
13738         type from source_location to dump_user_location_t.
13739         (vect_do_peeling): Update for above change.
13740         (vect_loop_versioning): Update for change in type of
13741         vect_location.
13742         * tree-vect-loop.c (check_reduction_path): Convert "loc" param
13743         from location_t to dump_user_location_t.
13744         (vect_estimate_min_profitable_iters): Update for change in type
13745         of vect_location.
13746         * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
13747         location_t to dump_location_t.
13748         (vect_slp_bb): Update for change in type of vect_location.
13749         * tree-vectorizer.c (vect_location): Convert from source_location
13750         to dump_user_location_t.
13751         (try_vectorize_loop_1): Update for change in vect_location's type.
13752         (vectorize_loops): Likewise.
13753         (increase_alignment): Likewise.
13754         * tree-vectorizer.h (vect_location): Convert from source_location
13755         to dump_user_location_t.
13756         (find_loop_location): Convert return type from source_location to
13757         dump_user_location_t.
13758         (check_reduction_path): Convert 1st param from location_t to
13759         dump_user_location_t.
13760         * value-prof.c (check_counter): Update call to dump_printf_loc to
13761         pass in a dump_user_location_t rather than a location_t; update
13762         call to error_at for change in type of "locus".
13763         (check_ic_target): Update call to dump_printf_loc to
13764         pass in a dump_user_location_t rather than a location_t, via the
13765         call_stmt.
13767 2018-06-26  Robin Dapp  <rdapp@linux.vnet.ibm.com>
13769         * config/s390/s390.h (enum processor_flags): Do not use
13770         default tune parameter when -march was specified.
13772 2018-06-26  Jakub Jelinek  <jakub@redhat.com>
13774         PR target/86314
13775         * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
13776         Check reg_overlap_mentioned_p in addition to reg_set_p with the same
13777         operands.
13779 2018-06-26  Richard Biener  <rguenther@suse.de>
13781         PR tree-optimization/86287
13782         PR bootstrap/86316
13783         * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
13784         (vect_analyze_loop): Initialize n_stmts.
13786 2018-06-26  Richard Biener  <rguenther@suse.de>
13788         PR middle-end/86271
13789         * fold-const.c (fold_convertible_p): Pointer extension
13790         isn't valid.
13792 2018-06-26  Alexandre Oliva <aoliva@redhat.com>
13794         PR debug/86064
13795         * dwarf2out.c (loc_list_has_views): Adjust comments.
13796         (dw_loc_list): Split single cross-partition range with
13797         nonzero locview.
13799 2018-06-25  Jeff Law  <law@redhat.com>
13801         * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
13802         on -mbig-switch by default.
13804         * config/v850/predicates.md (const_float_1_operand): Fix match_code
13805         test.
13806         (const_float_0_operand): Remove unused predicate.
13807         * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
13808         (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
13809         (recipsf2): New expander.  Original pattern now called
13810         (recipsf2_insn).
13811         (recipdf2, recipdf2_insn): Similarly.
13812         (rsqrtsf2, rsqrtsf2_insn): Similarly
13813         (rsqrtdf2, rsqrtdf2_insn): Similarly
13815 2018-06-26  Gerald Pfeifer  <gerald@pfeifer.com>
13817         * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
13818         Simplify logic for FreeBSD (twice).
13820 2018-06-25  Martin Sebor  <msebor@redhat.com>
13822         PR tree-optimization/86204
13823         * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
13824         a strnlen result if it's less than the length of the string.
13826 2018-06-25  Martin Sebor  <msebor@redhat.com>
13828         PR tree-optimization/85700
13829         * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
13830         * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
13831         (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
13833 2018-06-25  Martin Sebor  <msebor@redhat.com>
13835         * doc/extend.texi (Zero-length arrays): Update and clarify.
13837 2018-06-25  Michael Meissner  <meissner@linux.ibm.com>
13839         * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
13840         added IEEE/IBM long double multilib support on PowerPC little
13841         endian Linux systems.
13842         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
13843         (MULTILIB_DEFAULTS): Likewise.
13844         * config/rs6000/rs6000.c (rs6000_option_override_internal):
13845         Likewise.
13846         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
13847         * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
13848         * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
13850 2018-06-25  Alexander Monakov  <amonakov@ispras.ru>
13852         PR middle-end/86311
13853         * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
13854         (REORDER_45): Likewise.
13856 2018-06-25  Jeff Law  <law@redhat.com>
13858         * config/v850/v850.md (divmodhi4): Make sure to sign extend the
13859         dividend to 32 bits.  Adjust length.
13860         (udivmodhi4): Cleanup output template.  Fix length.
13862 2018-06-25  Carl Love  <cel@us.ibm.com>
13864         * config/rs6000/vsx.md: Change word selector to prefered location.
13866 2018-06-25  Richard Biener  <rguenther@suse.de>
13868         PR tree-optimization/86304
13869         * tree-vectorizer.c (vectorize_loops): Walk over new possibly
13870         epilogue-if-converted loops as well.
13872 2018-06-25  Jan Hubicka  <hubicka@ucw.cz>
13874         * lto-section-out.c (lto_begin_section): Do not print section
13875         name for noaddr and unnumbered dumps.
13877 2018-06-25  Richard Biener  <rguenther@suse.de>
13879         * tree-vectorizer.h (struct vec_info_shared): New structure
13880         with parts split out from struct vec_info and loop_nest from
13881         struct _loop_vec_info.
13882         (struct vec_info): Adjust accordingly.
13883         (struct _loop_vec_info): Likewise.
13884         (LOOP_VINFO_LOOP_NEST): Adjust.
13885         (LOOP_VINFO_DATAREFS): Likewise.
13886         (LOOP_VINFO_DDRS): Likewise.
13887         (struct _bb_vec_info): Likewise.
13888         (BB_VINFO_DATAREFS): Likewise.
13889         (BB_VINFO_DDRS): Likewise.
13890         (struct _stmt_vec_info): Add dr_aux member.
13891         (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
13892         (DR_MISALIGNMENT_UNINITIALIZED): New.
13893         (set_dr_misalignment): Adjust.
13894         (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
13895         (vect_analyze_loop): Adjust prototype.
13896         (vect_analyze_loop_form): Likewise.
13897         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
13898         Compute dependences lazily.
13899         (vect_record_base_alignments): Use shared datarefs/ddrs.
13900         (vect_verify_datarefs_alignment): Likewise.
13901         (vect_analyze_data_refs_alignment): Likewise.
13902         (vect_analyze_data_ref_accesses): Likewise.
13903         (vect_analyze_data_refs): Likewise.
13904         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
13905         constructor parameter for shared part.
13906         (vect_analyze_loop_form): Pass in shared part and adjust.
13907         (vect_analyze_loop_2): Pass in storage for the number of
13908         stmts.  Move loop nest finding to the caller.  Compute
13909         datarefs lazily.
13910         (vect_analyze_loop): Pass in shared part.
13911         (vect_transform_loop): Verify shared datarefs are unchanged.
13912         * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
13913         constructor parameter for shared part.
13914         (vect_slp_analyze_bb_1): Pass in shared part and adjust.
13915         (vect_slp_bb): Verify shared datarefs are unchanged before
13916         transform.
13917         * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
13918         change.
13919         (new_stmt_vec_info): Initialize DR_AUX misalignment to
13920         DR_MISALIGNMENT_UNINITIALIZED.
13921         * tree-vectorizer.c (vec_info::vec_info): Add constructor
13922         parameter for shared part.
13923         (vec_info::~vec_info): Adjust.
13924         (vec_info_shared::vec_info_shared): New.
13925         (vec_info_shared::~vec_info_shared): Likewise.
13926         (vec_info_shared::save_datarefs): Likewise.
13927         (vec_info_shared::check_datarefs): Likewise.
13928         (try_vectorize_loop_1): Construct shared part live for analyses
13929         of a single loop for multiple vector sizes.
13930         * tree-parloops.c (gather_scalar_reductions): Adjust.
13932 2018-06-25  Richard Biener  <rguenther@suse.de>
13934         * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
13935         DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
13936         (vect_analyze_data_refs): Remove similar code from here and
13937         simplify accordingly.
13939 2018-06-25  Richard Biener  <rguenther@suse.de>
13941         * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
13942         for reverse storage order accesses rather than asserting
13943         they cannot happen here.
13945 2018-06-25  Tom de Vries  <tdevries@suse.de>
13947         PR debug/86257
13948         * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
13949         Use data16 instead of .byte for insn prefix.
13951 2018-06-25  Andreas Krebbel  <krebbel@linux.ibm.com>
13953         PR C++/86082
13954         * parser.c (make_char_string_pack): Pass this literal chars
13955         through cpp_interpret_string.
13956         (cp_parser_userdef_numeric_literal): Check the result of
13957         make_char_string_pack.
13959 2018-06-24  Maya Rashish  <coypu@sdf.org>
13961         * ginclude/stddef.h: Simplify conditions around avoiding
13962         re-definition of __size_t.
13964 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
13966         * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
13967         unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
13969 2018-06-22  Maya Rashish  <coypu@sdf.org>
13971         * doc/invoke.texi (mno-fancy-math-387): Update for changes
13972         made to OpenBSD and NetBSD through the years.
13974 2018-06-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13976         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
13977         behavior of vec_pack (vector double, vector double) to match
13978         behavior of vec_float2 (vector double, vector double).
13980 2018-06-22  Olivier Hainque  <hainque@adacore.com>
13982         * gimplify.c (gimplify_function_tree): Prevent creation
13983         of a trampoline for the address of the current function
13984         passed to entry/exit instrumentation hooks.
13986 2018-06-22  Aaron Sawdey  <acsawdey@linux.ibm.com>
13988         PR target/86222
13989         * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
13990         correctly.
13992 2018-06-22  Martin Liska  <mliska@suse.cz>
13994         PR tree-optimization/86263
13995         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
13996         Bail out if is_enabled is false.
13997         * tree-switch-conversion.h (jump_table_cluster::is_enabled):
13998         New declaration.
13999         (jump_table_cluster::is_enabled): New function.
14001 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
14003         * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
14004         BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
14005         * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
14006         (lto_input_ts_binfo_tree_pointers): Likewise.
14007         * tree-streamer-out.c (streamer_write_tree_bitfields,
14008         write_ts_binfo_tree_pointers): Likewise.
14009         * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
14011 2018-06-22  Jan Hubicka  <hubicka@ucw.cz>
14013         * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
14015 2018-06-22  Martin Liska  <mliska@suse.cz>
14017         * symbol-summary.h (get): Make it pure and inline move
14018         functionality from ::get function.
14019         (get): Remove and inline into ::get and ::get_create.
14020         (get_create): Move code from ::get function.
14022 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14024         PR target/85994
14025         * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
14026         -x assembler-with-cpp.
14028 2018-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
14030         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
14031         _FILE_OFFSET_BITS=64 for C++.
14033 2018-06-21  Michael Meissner  <meissner@linux.ibm.com>
14035         * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
14036         conversion insn that shows up when pr85657-3.c is compiled using
14037         IEEE 128-bit long double.
14038         (neg<mode>2_internal): Use the correct mode to check whether the
14039         mode is IBM extended.
14040         * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
14041         multiply and divide external functions from being created more
14042         than once.
14044 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
14046         * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
14047         functions.
14048         (rtl_merge_blocks): Likewise.  Do not emit a NOP if the location of
14049         the edge can be forwarded.
14050         (cfg_layout_merge_blocks): Likewise.
14052 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
14054         * except.c (finish_eh_generation): Commit edge insertions only after
14055         the EH edges have been redirected from post-landing to landing pads.
14057 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
14059         * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
14060         create_tmp_var_for to create the FRAME decl.
14061         (finalize_nesting_tree_1): Do not unchain the FRAME decl.
14063 2018-06-21  Eric Botcazou  <ebotcazou@adacore.com>
14065         * tree-inline.c (copy_edges_for_bb): Minor tweak.
14066         (maybe_move_debug_stmts_to_successors): Also reset the locus of the
14067         debug statement when resetting its value.
14068         (expand_call_inline): Copy the locus of the call onto the assignment
14069         of the return value, if any.  Use local variable in more cases.
14071 2018-06-21  Martin Liska  <mliska@suse.cz>
14073         * ipa-pure-const.c (propagate_nothrow): Use
14074         funct_state_summaries->get.
14075         (dump_malloc_lattice): Likewise.
14076         (propagate_malloc): Likewise.
14078 2018-06-21  Richard Biener  <rguenther@suse.de>
14080         * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
14081         comment.  Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
14082         * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
14083         comment.
14084         * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
14085         BLOCK_ABSTRACT_ORIGIN unconditionally.
14087 2018-06-21  David Malcolm  <dmalcolm@redhat.com>
14089         * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
14090         deleting it.
14091         * ipa-reference.c (ipa_reference_c_finalize): Delete
14092         ipa_ref_opt_sum_summaries and set it to NULL.
14094 2018-06-21  Tom de Vries  <tdevries@suse.de>
14096         PR tree-optimization/85859
14097         * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
14098         test with comment from bb_no_side_effects_p.
14100 2018-06-21  Richard Biener  <rguenther@suse.de>
14102         PR tree-optimization/86232
14103         * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
14104         max for constant niter.
14106 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14108         * config/aarch64/aarch64-simd.md
14109         (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
14111 2018-06-21  Andre Vieira  <andre.simoesdiasvieira@arm.com>
14113         * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
14114         Make opernads of the unspec commutative.
14116 2018-06-21  Richard Biener  <rguenther@suse.de>
14118         * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
14119         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
14120         Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
14121         (vect_analyze_data_ref_dependence): Re-order checks to deal with
14122         NULL DR_STEP.
14123         (vect_record_base_alignments): Do not record base alignment
14124         for gathers or scatters.
14125         (vect_compute_data_ref_alignment): Drop return value that is always
14126         true.  Bail out early for gathers or scatters.
14127         (vect_enhance_data_refs_alignment): Bail out early for gathers
14128         or scatters.
14129         (vect_find_same_alignment_drs): Likewise.
14130         (vect_analyze_data_refs_alignment): Remove dead code.
14131         (vect_slp_analyze_and_verify_node_alignment): Likewise.
14132         (vect_analyze_data_refs): For possible gathers or scatters do
14133         not create an alternate DR, just check their possible validity
14134         and mark them.  Adjust DECL_NONALIASED handling to not rely
14135         on DR_BASE_ADDRESS.
14136         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
14137         update inits of gathers or scatters.
14138         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
14139         Also copy gather/scatter flag to pattern vinfo.
14141 2018-06-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
14143         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
14144         behavior of vec_packsu (vector unsigned long long, vector unsigned
14145         long long) to match behavior of vec_packs with same signature.
14147 2018-06-20  Chung-Lin Tang <cltang@codesourcery.com>
14148             Thomas Schwinge <thomas@codesourcery.com>
14149             Cesar Philippidis  <cesar@codesourcery.com>
14151         * gimplify.c (gimplify_scan_omp_clauses): Add support for
14152         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
14153         (gimplify_adjust_omp_clauses): Likewise.
14154         (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
14155         support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
14156         (gimplify_omp_target_update): Update handling of acc update and
14157         enter/exit data.
14158         * omp-low.c (install_var_field): Remove unused parameter
14159         base_pointers_restrict.
14160         (scan_sharing_clauses): Remove base_pointers_restrict parameter.
14161         Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
14162         FINALIZE}
14163         (omp_target_base_pointers_restrict_p): Delete.
14164         (scan_omp_target): Update call to scan_sharing_clauses.
14165         * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
14166         FINALIZE}.
14167         * tree-nested.c (convert_nonlocal_omp_clauses): Handle
14168         OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
14169         (convert_local_omp_clauses): Likewise.
14170         * tree-pretty-print.c (dump_omp_clause): Likewise.
14171         * tree.c (omp_clause_num_ops): Add entries for  OMP_CLAUSE_{IF_PRESENT,
14172         FINALIZE}.
14173         (omp_clause_code_name): Likewise.
14175 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
14177         PR debug/86194
14178         * var-tracking.c (use_narrower_mode_test): Check if shift amount can
14179         be narrowed.
14181         PR tree-optimization/86231
14182         * tree-vrp.c (union_ranges): For (  [  )  ] or (   )[   ] range and
14183         anti-range don't overwrite *vr0min before using it to compute *vr0max.
14185 2018-06-20  Tom de Vries  <tdevries@suse.de>
14187         PR tree-optimization/86097
14188         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
14189         iv type if signedness of iv type is not the same as that of *nit.
14191 2018-06-20  Jakub Jelinek  <jakub@redhat.com>
14193         * cfgrtl.c (rtl_verify_edges): Formatting fix.  If bb->preds has any
14194         EDGE_EH edges, verify they are all EDGE_EH.
14196 2018-06-20  Maya Rashish  <coypu@sdf.org>
14198         * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
14200 2018-06-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
14202         * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
14203         * config/aarch64/aarch64.c (xgene1_tunings): Add
14204         AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
14205         (aarch64_mode_valid_for_sched_fusion_p):
14206         Allow 16-byte modes.
14207         (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
14208         * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
14209         128-bit modes.
14210         * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
14211         New pattern.
14212         (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
14213         * config/aarch64/iterators.md (VQ2): New mode iterator.
14215 2018-06-20  Martin Liska  <mliska@suse.cz>
14217         * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
14218         Change default ratio from 10 to 8.
14220 2018-06-20  Martin Liska  <mliska@suse.cz>
14222         * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
14223         New.
14224         (bit_test_cluster::find_bit_tests): Likewise.
14225         (switch_decision_tree::analyze_switch_statement): Find clusters.
14226         * tree-switch-conversion.h (struct jump_table_cluster): Document
14227         hierarchy.
14229 2018-06-20  Martin Liska  <mliska@suse.cz>
14231         * tree-switch-conversion.c (switch_conversion::collect):
14232         Record m_uniq property.
14233         (switch_conversion::expand): Bail out for special conditions.
14234         (group_cluster::~group_cluster): New.
14235         (group_cluster::group_cluster): Likewise.
14236         (group_cluster::dump): Likewise.
14237         (jump_table_cluster::emit): New.
14238         (switch_decision_tree::fix_phi_operands_for_edges): New.
14239         (struct case_node): Remove struct.
14240         (jump_table_cluster::can_be_handled): New.
14241         (case_values_threshold): Moved to header.
14242         (reset_out_edges_aux): Likewise.
14243         (jump_table_cluster::is_beneficial): New.
14244         (bit_test_cluster::can_be_handled): Likewise.
14245         (add_case_node): Remove.
14246         (bit_test_cluster::is_beneficial): New.
14247         (case_bit_test::cmp): New.
14248         (bit_test_cluster::emit): New.
14249         (expand_switch_as_decision_tree_p): Remove.
14250         (bit_test_cluster::hoist_edge_and_branch_if_true): New.
14251         (fix_phi_operands_for_edge): Likewise.
14252         (switch_decision_tree::analyze_switch_statement): New.
14253         (compute_cases_per_edge): Move ...
14254         (switch_decision_tree::compute_cases_per_edge): ... here.
14255         (try_switch_expansion): Likewise.
14256         (switch_decision_tree::try_switch_expansion): Likewise.
14257         (record_phi_operand_mapping): Likewise.
14258         (switch_decision_tree::record_phi_operand_mapping): Likewise.
14259         (emit_case_decision_tree): Likewise.
14260         (switch_decision_tree::emit): Likewise.
14261         (balance_case_nodes): Likewise.
14262         (switch_decision_tree::balance_case_nodes): Likewise.
14263         (dump_case_nodes): Likewise.
14264         (switch_decision_tree::dump_case_nodes): Likewise.
14265         (emit_jump): Likewise.
14266         (switch_decision_tree::emit_jump): Likewise.
14267         (emit_cmp_and_jump_insns): Likewise.
14268         (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
14269         (emit_case_nodes): Likewise.
14270         (switch_decision_tree::emit_case_nodes): Likewise.
14271         (conditional_probability): Remove.
14272         * tree-switch-conversion.h (enum cluster_type): New.
14273         (PRINT_CASE): New.
14274         (struct cluster): Likewise.
14275         (cluster::cluster): Likewise.
14276         (struct simple_cluster): Likewise.
14277         (simple_cluster::simple_cluster): Likewise.
14278         (struct group_cluster): Likewise.
14279         (struct jump_table_cluster): Likewise.
14280         (struct bit_test_cluster): Likewise.
14281         (struct min_cluster_item): Likewise.
14282         (struct case_tree_node): Likewise.
14283         (case_tree_node::case_tree_node): Likewise.
14284         (jump_table_cluster::case_values_threshold): Likewise.
14285         (struct case_bit_test): Likewise.
14286         (struct switch_decision_tree): Likewise.
14287         (struct switch_conversion): Likewise.
14288         (switch_decision_tree::reset_out_edges_aux): Likewise.
14290 2018-06-20  Martin Liska  <mliska@suse.cz>
14292         * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
14293         (hoist_edge_and_branch_if_true): Likewise.
14294         (expand_switch_using_bit_tests_p): Likewise.
14295         (struct case_bit_test): Likewise.
14296         (case_bit_test_cmp): Likewise.
14297         (emit_case_bit_tests): Likewise.
14298         (switch_conversion::switch_conversion): New class.
14299         (struct switch_conv_info): Remove old struct.
14300         (collect_switch_conv_info): More to ...
14301         (switch_conversion::collect): ... this.
14302         (check_range): Likewise.
14303         (switch_conversion::check_range): Likewise.
14304         (check_all_empty_except_final): Likewise.
14305         (switch_conversion::check_all_empty_except_final): Likewise.
14306         (check_final_bb): Likewise.
14307         (switch_conversion::check_final_bb): Likewise.
14308         (create_temp_arrays): Likewise.
14309         (switch_conversion::create_temp_arrays): Likewise.
14310         (free_temp_arrays): Likewise.
14311         (gather_default_values): Likewise.
14312         (switch_conversion::gather_default_values): Likewise.
14313         (build_constructors): Likewise.
14314         (switch_conversion::build_constructors): Likewise.
14315         (constructor_contains_same_values_p): Likewise.
14316         (switch_conversion::contains_same_values_p): Likewise.
14317         (array_value_type): Likewise.
14318         (switch_conversion::array_value_type): Likewise.
14319         (build_one_array): Likewise.
14320         (switch_conversion::build_one_array): Likewise.
14321         (build_arrays): Likewise.
14322         (switch_conversion::build_arrays): Likewise.
14323         (gen_def_assigns): Likewise.
14324         (switch_conversion::gen_def_assigns): Likewise.
14325         (prune_bbs): Likewise.
14326         (switch_conversion::prune_bbs): Likewise.
14327         (fix_phi_nodes): Likewise.
14328         (switch_conversion::fix_phi_nodes): Likewise.
14329         (gen_inbound_check): Likewise.
14330         (switch_conversion::gen_inbound_check): Likewise.
14331         (process_switch): Use the newly created class.
14332         (switch_conversion::expand): New.
14333         (switch_conversion::~switch_conversion): New.
14334         * tree-switch-conversion.h: New file.
14336 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14338         * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
14339         tree-vect-patterns.c.
14340         * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
14341         (vect_recog_dot_prod_pattern): Use it.  Remove the type_in argument.
14342         (vect_recog_sad_pattern): Likewise.
14343         (vect_recog_widen_sum_pattern): Likewise.
14344         (vect_recog_pow_pattern): Likewise.  Check for a null vectype.
14345         (vect_recog_widen_shift_pattern): Remove the type_in argument.
14346         (vect_recog_rotate_pattern): Likewise.
14347         (vect_recog_mult_pattern): Likewise.
14348         (vect_recog_vector_vector_shift_pattern): Likewise.
14349         (vect_recog_divmod_pattern): Likewise.
14350         (vect_recog_mixed_size_cond_pattern): Likewise.
14351         (vect_recog_bool_pattern): Likewise.
14352         (vect_recog_mask_conversion_pattern): Likewise.
14353         (vect_try_gather_scatter_pattern): Likewise.
14354         (vect_recog_widen_mult_pattern): Likewise.  Check for a null vectype.
14355         (vect_recog_over_widening_pattern): Likewise.
14356         (vect_recog_gather_scatter_pattern): Likewise.
14357         (vect_recog_func_ptr): Move from tree-vectorizer.h
14358         (vect_vect_recog_func_ptrs): Move further down the file.
14359         (vect_recog_func): Likewise.  Remove the third argument.
14360         (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
14361         (vect_pattern_recog_1): Expect the pattern function to do any
14362         necessary target tests.  Also expect it to provide a vector type.
14363         Remove the type_in handling.
14365 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14367         * tree-vect-patterns.c (vect_pattern_detected): New function.
14368         (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
14369         (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
14370         (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
14371         (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
14372         (vect_recog_mult_pattern, vect_recog_divmod_pattern)
14373         (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
14374         (vect_recog_mask_conversion_pattern)
14375         (vect_try_gather_scatter_pattern): Likewise.
14377 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14379         * tree-vect-patterns.c (vect_get_internal_def): New function.
14380         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
14381         (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
14382         (search_type_for_mask_1): Use it.
14384 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14386         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14387         redundant WIDEN_SUM_EXPR handling.
14388         (vect_recog_sad_pattern): Likewise.
14390 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14392         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
14393         redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
14394         (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
14395         (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
14396         (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
14398 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14400         * tree-vect-stmts.c (vectorizable_call): Make sure that we
14401         use the stmt_vec_info of the original bb statement for the
14402         new zero assignment, even if the call is part of a pattern.
14404 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14406         * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
14407         that the sequence is attached to the original statement rather
14408         than the pattern statement.
14409         * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
14410         PATTERN_DEF_SEQ from the original statement rather than
14411         the main pattern statement.
14412         * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
14413         * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
14414         (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
14416 2018-06-20  Richard Sandiford  <richard.sandiford@arm.com>
14418         * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
14419         definition statements before the early exit for statements that aren't
14420         live or relevant.
14421         * tree-vect-loop.c (vect_transform_loop_stmt): New function,
14422         split out from...
14423         (vect_transform_loop): ...here.  Process pattern definition
14424         statements without first checking whether the main pattern
14425         statement is live or relevant.
14427 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
14429         * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
14430         -O0 if the locus represent UNKNOWN_LOCATION but have different values.
14432 2018-06-19  Aaron Sawdey  <acsawdey@linux.ibm.com>
14434         * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
14435         TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
14436         (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
14437         (expand_block_compare): Change select_block_compare_mode call.
14438         (expand_strncmp_align_check): Use new functions, fix comment.
14439         (emit_final_str_compare_gpr): New function.
14440         (expand_strn_compare): Refactor and clean up code.
14441         * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
14443 2018-06-19  Tony Reix  <tony.reix@atos.com>
14444             Damien Bergamini  <damien.bergamini@atos.com>
14445             David Edelsohn  <dje.gcc@gmail.com>
14447         * collect2.c (static_obj): New variable.
14448         (static_libs): New variable.
14449         (is_in_list): Uncomment declaration.
14450         (main): Track AIX libraries linked statically.
14451         (is_in_list): Uncomment definition.
14452         (scan_prog_file): Don't add AIX shared libraries initializer
14453         to constructor list if linking statically.
14455 2018-06-19  Max Filippov  <jcmvbkbc@gmail.com>
14457         * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
14458         constant.
14459         (allocate_stack, frame_blockage, *frame_blockage): New patterns.
14461 2018-06-19  Jan Hubicka  <hubicka@ucw.cz>
14463         * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
14464         blocks.
14466 2018-06-19  Martin Liska  <mliska@suse.cz>
14468         * config/i386/i386.c (ix86_can_inline_p): Do not use
14469         ipa_fn_summaries::get_create.
14470         * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
14471         get.
14472         (devirtualization_time_bonus): Likewise.
14473         (ipcp_propagate_stage): Likewise.
14474         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
14475         (edge_set_predicate): Likewise.
14476         (evaluate_conditions_for_known_args): Likewise.
14477         (evaluate_properties_for_edge): Likewise.
14478         (ipa_call_summary::reset): Tranform to ...
14479         (ipa_call_summary::~ipa_call_summary): ... this.
14480         (ipa_fn_summary::reset): Transform to ...
14481         (ipa_fn_summary::~ipa_fn_summary): ... this.
14482         (ipa_fn_summary_t::remove): Rename to ...
14483         (ipa_fn_summary_t::remove_callees): ... this.
14484         (ipa_fn_summary_t::duplicate): Use placement new
14485         instead of memory copy.
14486         (ipa_call_summary_t::duplicate): Likewise.
14487         (ipa_call_summary_t::remove): Remove.
14488         (dump_ipa_call_summary): Change get_create to get.
14489         (ipa_dump_fn_summary): Dump only when summary exists.
14490         (analyze_function_body): Use symbol_summary::get instead
14491         of get_create.
14492         (compute_fn_summary): Likewise.
14493         (estimate_edge_devirt_benefit): Likewise.
14494         (estimate_edge_size_and_time): Likewise.
14495         (inline_update_callee_summaries): Likewise.
14496         (remap_edge_change_prob): Likewise.
14497         (remap_edge_summaries): Likewise.
14498         (ipa_merge_fn_summary_after_inlining): Likewise.
14499         (write_ipa_call_summary): Likewise.
14500         (ipa_fn_summary_write): Likewise.
14501         (ipa_free_fn_summary): Likewise.
14502         * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
14503         (struct ipa_call_summary): Likewise.
14504         * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
14505         of get_create.
14506         * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
14507         (estimate_size_after_inlining): Likewise.
14508         (estimate_growth): Likewise.
14509         (growth_likely_positive): Likewise.
14510         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
14511         (inline_call): Likewise.
14512         * ipa-inline.c (caller_growth_limits): Likewise.
14513         (can_inline_edge_p): Likewise.
14514         (can_inline_edge_by_limits_p): Likewise.
14515         (compute_uninlined_call_time): Likewise.
14516         (compute_inlined_call_time): Likewise.
14517         (want_inline_small_function_p): Likewise.
14518         (edge_badness): Likewise.
14519         (update_caller_keys): Likewise.
14520         (update_callee_keys): Likewise.
14521         (inline_small_functions): Likewise.
14522         (inline_to_all_callers_1): Likewise.
14523         (dump_overall_stats): Likewise.
14524         (early_inline_small_functions): Likewise.
14525         (early_inliner): Likewise.
14526         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
14527         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
14528         * ipa-pure-const.c (malloc_candidate_p): Likewise.
14529         * ipa-split.c (execute_split_functions): Likewise.
14530         * symbol-summary.h: Likewise.
14531         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
14533 2018-06-19  Richard Biener  <rguenther@suse.de>
14535         * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
14536         (vectorize_loops): ... here.  Fix dbgcnt handling.
14537         (try_vectorize_loop): Wrap try_vectorize_loop_1.
14539 2018-06-19  Segher Boessenkool  <segher@kernel.crashing.org>
14541         PR target/86197
14542         * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
14543         ieee128 argument takes up only one (vector) register, not two (floating
14544         point) registers.
14546 2018-06-19  Eric Botcazou  <ebotcazou@adacore.com>
14548         * gimplify.c (gimplify_init_constructor): Really never clear for an
14549         incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
14551 2018-06-19  Richard Biener  <rguenther@suse.de>
14553         PR tree-optimization/86179
14554         * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
14555         after failed recognition.
14557 2018-06-18  Martin Sebor  <msebor@redhat.com>
14559         PR middle-end/85602
14560         * calls.c (maybe_warn_nonstring_arg): Handle strncat.
14561         * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
14562         Handle integer subtraction.
14563         (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
14564         * tree-ssa-strlen.h (is_strlen_related_p): Declare.
14566 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
14568         * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
14569         param from rtx to rtx_insn *.
14570         * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
14571         param.
14572         (frv_ifcvt_modify_insn): Likwise.
14573         (frv_ifcvt_modify_final): Likwise for local "existing_insn",
14574         adding an as_a <rtx_insn *> cast.  Likewise for local "insn".
14575         * config/mips/mips.c (r10k_insert_cache_barriers): Add an
14576         as_a <rtx_insn *> cast to local "unprotected_region" once
14577         it's been established that it's not NULL or pc_rtx.
14578         * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
14579         param "sethi" from rtx to rtx_insn *.
14580         (nds32_group_float_insns): Likewise for param "insn".
14581         * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
14582         param.
14583         (vax_output_int_subtract): Likewise.
14584         * config/vax/vax.c (vax_output_int_add): Likewise for param
14585         "insn".
14586         (vax_output_int_subtract): Likewise.
14587         * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
14588         (emit_pattern_after): Likewise for param "after".
14589         (emit_insn_after): Likewise.
14590         (emit_jump_insn_after): Likewise.
14591         (emit_call_insn_after): Likewise.
14592         (emit_debug_insn_after): Likewise.
14593         (emit_pattern_before): Likewise for param "before".
14594         (emit_insn_before): Likewise.
14595         (emit_jump_insn_before): Likewise.
14596         * final.c (get_insn_template): Likewise for param "insn", removing
14597         a cast.
14598         * output.h (get_insn_template): Likewise for 2nd param.
14599         * rtl.h (emit_insn_before): Likewise.
14600         (emit_jump_insn_before): Likewise.
14601         (emit_debug_insn_before_noloc): Likewise.
14602         (emit_insn_after): Likewise.
14603         (emit_jump_insn_after): Likewise.
14604         (emit_call_insn_after): Likewise.
14605         (emit_debug_insn_after): Likewise.
14606         (set_insn_deleted): Likewise for param.
14608 2018-06-18  Michael Meissner  <meissner@linux.ibm.com>
14610         PR target/85358
14611         * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
14612         floating point modes, so that IFmode is numerically greater than
14613         TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
14614         to declare the ordering.  This prevents IFmode from being
14615         converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
14616         machine.  Include rs6000-modes.h to share the fractional values
14617         between genmodes* and the rest of the compiler.
14618         (IFmode): Likewise.
14619         (KFmode): Likewise.
14620         (TFmode): Likewise.
14621         * config/rs6000/rs6000-modes.h: New file.
14622         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
14623         meaning of rs6000_long_double_size so that 126..128 selects an
14624         appropriate 128-bit floating point type.
14625         (rs6000_option_override_internal): Likewise.
14626         * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
14627         (TARGET_LONG_DOUBLE_128): Change the meaning of
14628         rs6000_long_double_size so that 126..128 selects an appropriate
14629         128-bit floating point type.
14630         (LONG_DOUBLE_TYPE_SIZE): Update comment.
14631         * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
14632         source and destination to match the standard usage.
14633         (truncifkf2): Likewise.
14634         (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
14635         ISA 2.07 to use an explicit clobber, instead of passing in a
14636         temporary.
14637         (copysign<mode>3_soft): Likewise.
14639 2018-06-18  David Malcolm  <dmalcolm@redhat.com>
14641         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
14642         Replace dump_printf_loc call with DUMP_VECT_SCOPE.
14643         (vect_slp_analyze_instance_dependence): Likewise.
14644         (vect_enhance_data_refs_alignment): Likewise.
14645         (vect_analyze_data_refs_alignment): Likewise.
14646         (vect_slp_analyze_and_verify_instance_alignment
14647         (vect_analyze_data_ref_accesses): Likewise.
14648         (vect_prune_runtime_alias_test_list): Likewise.
14649         (vect_analyze_data_refs): Likewise.
14650         * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
14651         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
14652         (vect_analyze_scalar_cycles_1): Likewise.
14653         (vect_get_loop_niters): Likewise.
14654         (vect_analyze_loop_form_1): Likewise.
14655         (vect_update_vf_for_slp): Likewise.
14656         (vect_analyze_loop_operations): Likewise.
14657         (vect_analyze_loop): Likewise.
14658         (vectorizable_induction): Likewise.
14659         (vect_transform_loop): Likewise.
14660         * tree-vect-patterns.c (vect_pattern_recog): Likewise.
14661         * tree-vect-slp.c (vect_analyze_slp): Likewise.
14662         (vect_make_slp_decision): Likewise.
14663         (vect_detect_hybrid_slp): Likewise.
14664         (vect_slp_analyze_operations): Likewise.
14665         (vect_slp_bb): Likewise.
14666         * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
14667         (vectorizable_bswap): Likewise.
14668         (vectorizable_call): Likewise.
14669         (vectorizable_simd_clone_call): Likewise.
14670         (vectorizable_conversion): Likewise.
14671         (vectorizable_assignment): Likewise.
14672         (vectorizable_shift): Likewise.
14673         (vectorizable_operation): Likewise.
14674         * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
14676 2018-06-18  Martin Sebor  <msebor@redhat.com>
14678         PR tree-optimization/81384
14679         * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
14680         * builtins.c (expand_builtin_strnlen): New function.
14681         (expand_builtin): Call it.
14682         (fold_builtin_n): Avoid setting TREE_NO_WARNING.
14683         * builtins.def (BUILT_IN_STRNLEN): New.
14684         * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
14685         Warn for bounds in excess of maximum object size.
14686         * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
14687         single-value ranges.  Handle strnlen.
14688         (handle_builtin_strlen): Handle strnlen.
14689         (strlen_check_and_optimize_stmt): Same.
14690         * doc/extend.texi (Other Builtins): Document strnlen.
14692 2018-06-18  Maya Rashish  <coypu@sdf.org>
14694         * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
14695         (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
14696         (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
14698         * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
14699         here to ...
14700         * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
14702 2018-06-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
14704         * tree.c (escaped_string::escape): Replace cast to char * by
14705         const_cast<char *> (unescaped).
14707 2018-06-18  Nick Clifton  <nickc@redhat.com>
14709         PR 84195
14710         * tree.c (escaped_string): New class.  Converts an unescaped
14711         string into its escaped equivalent.
14712         (warn_deprecated_use): Use the new class to convert the
14713         deprecation message, if present.
14714         (test_escaped_strings): New self test.
14715         (test_c_tests): Add test_escaped_strings.
14716         * doc/extend.texi (deprecated): Add a note that the
14717         deprecation message is affected by the -fmessage-length
14718         option, and that control characters will be escaped.
14719         (#pragma GCC error): Document this pragma.
14720         (#pragma GCC warning): Likewise.
14721         * doc/invoke.texi (-fmessage-length): Document this option's
14722         effect on the #warning and #error preprocessor directives and
14723         the deprecated attribute.
14725 2018-06-18  Eric Botcazou  <ebotcazou@adacore.com>
14727         * tree.c (decl_value_expr_lookup): Revert latest change.
14728         (decl_value_expr_insert): Likewise.
14730 2018-06-17  Eric Botcazou  <ebotcazou@adacore.com>
14732         * gimplify.c (nonlocal_vlas): Delete.
14733         (nonlocal_vla_vars): Likewise.
14734         (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
14735         referenced VLAs.
14736         (gimplify_body): Do not create and destroy nonlocal_vlas.
14737         * tree-nested.c: Include diagnostic.h.
14738         (use_pointer_in_frame): Tweak.
14739         (lookup_field_for_decl): Add assertion and declare the transformation.
14740         (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
14741         internal error when the reference is in a wrong context.  Do not
14742         create a debug decl by default.
14743         (note_nonlocal_block_vlas): Delete.
14744         (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
14745         (convert_local_reference_op) <PARM_DECL>: Skip the frame decl.  Do not
14746         create a debug decl by default.
14747         (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
14748         call is in a wrong context.
14749         (fixup_vla_decls): New function.
14750         (finalize_nesting_tree_1): Adjust comment.  Call fixup_vla_decls if no
14751         debug variables were created.
14752         * tree.c (decl_value_expr_lookup): Add checking assertion.
14753         (decl_value_expr_insert): Likewise.
14755 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
14757         PR middle-end/82479
14758         * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
14759         * tree-scalar-evolution.c (interpret_expr): Likewise.
14760         (expression_expensive_p): Likewise.
14761         * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
14762         * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
14763         (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
14764         (ssa_defined_by_minus_one_stmt_p): New.
14766 2018-06-16  Kugan Vivekanandarajah  <kuganv@linaro.org>
14768         PR middle-end/64946
14769         * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
14770         * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
14771         * dojump.c (do_jump): Likewise.
14772         * expr.c (expand_expr_real_2): Check operand type's sign.
14773         * fold-const.c (const_unop): Handle ABSU_EXPR.
14774         (fold_abs_const): Likewise.
14775         * gimple-pretty-print.c (dump_unary_rhs): Likewise.
14776         * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
14777         (strip_sign_op_1): Likesise.
14778         * match.pd: Add new pattern to generate ABSU_EXPR.
14779         * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
14780         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
14781         * tree-eh.c (operation_could_trap_helper_p): Likewise.
14782         * tree-inline.c (estimate_operator_cost): Likewise.
14783         * tree-pretty-print.c (dump_generic_node): Likewise.
14784         * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
14785         * tree.def (ABSU_EXPR): New.
14787 2018-06-16  Jakub Jelinek  <jakub@redhat.com>
14789         PR middle-end/86095
14790         * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
14791         documented as preserved for backward compatibility only.
14792         * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
14794         PR rtl-optimization/86108
14795         * bb-reorder.c (create_forwarder_block): Renamed to ...
14796         (create_eh_forwarder_block): ... this.  Split OLD_BB after labels and
14797         jump from new landing pad to the second part.
14798         (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
14799         Adjust callers.
14801 2018-06-15  Jakub Jelinek  <jakub@redhat.com>
14803         PR middle-end/85878
14804         * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
14805         check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
14806         Only call store_expr for halves if the mode is the same.
14808         PR middle-end/86123
14809         * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
14810         Fix up comment formatting.
14812 2018-06-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14814         * typed-splay-tree.h (typed_splay_tree::remove): New function.
14815         (typed_splay_tree::closure,
14816         typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
14817         (typed_splay_tree::typed_splay_tree,
14818         typed_splay_tree::operator =): Declared private.
14819         (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
14820         typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
14821         typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
14822         typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
14823         typed_splay_tree::splay_tree_splay,
14824         typed_splay_tree::splay_tree_foreach_helper,
14825         typed_splay_tree::splay_tree_insert,
14826         typed_splay_tree::splay_tree_remove,
14827         typed_splay_tree::splay_tree_lookup,
14828         typed_splay_tree::splay_tree_predecessor,
14829         typed_splay_tree::splay_tree_successor,
14830         typed_splay_tree::splay_tree_min,
14831         typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
14832         (typed_splay_tree::root, typed_splay_tree::comp,
14833         typed_splay_tree::delete_key,
14834         typed_splay_tree::delete_value): New data members.
14835         * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
14836         typed_splay_tree::remove.
14838 2018-06-15  Matthew Fortune  <matthew.fortune@mips.com>
14840         * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
14841         -mginv and -mno-ginv to the assembler.
14842         * config/mips/mips.opt (-mcrc): New option.
14843         (-mginv): Likewise.
14844         * doc/invoke.text (-mcrc): Document.
14845         (-mginv): Likewise.
14847 2018-06-15  Nick Clifton  <nickc@redhat.com>
14849         PR 84195
14850         * tree.c (escaped_string): New class.  Converts an unescaped
14851         string into its escaped equivalent.
14852         (warn_deprecated_use): Use the new class to convert the
14853         deprecation message, if present.
14854         (test_escaped_strings): New self test.
14855         (test_c_tests): Add test_escaped_strings.
14856         * doc/extend.texi (deprecated): Add a note that the
14857         deprecation message is affected by the -fmessage-length
14858         option, and that control characters will be escaped.
14859         (#pragma GCC error): Document this pragma.
14860         (#pragma GCC warning): Likewise.
14861         * doc/invoke.texi (-fmessage-length): Document this option's
14862         effect on the #warning and #error preprocessor directives and
14863         the deprecated attribute.
14865 2018-06-15  Richard Biener  <rguenther@suse.de>
14867         * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
14868         here, also noting vector size used.
14869         * tree-vectorizer.c (vectorize_loops): Adjust.  Note vector
14870         size used in MSG_OPTIMIZED_LOCATIONS dump.
14871         (pass_slp_vectorize::execute): Adjust.
14873 2018-06-15  Claudiu Zissulescu  <claziss@synopsys.com>
14875         PR target/85968
14876         * config/arc/arc.c (arc_return_address_register): Fix
14877         if-condition.
14879 2018-06-15  Richard Biener  <rguenther@suse.de>
14881         PR middle-end/86159
14882         * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
14883         leave useless conversion stripping to force_gimple_operand_gsi.
14884         (gimplify_build2): Likewise.
14885         (gimplify_build1): Likewise.
14887 2018-06-15  Richard Biener  <rguenther@suse.de>
14889         PR middle-end/86076
14890         * tree-cfg.c (move_stmt_op): unshare invariant addresses
14891         before adjusting their block.
14893 2018-06-15  Sebastian Huber  <sebastian.huber@embedded-brains.de>
14895         * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
14896         multilibs for *-*-rtems*.
14897         * config/riscv/t-rtems: New file.
14899 2018-06-14  Jakub Jelinek  <jakub@redhat.com>
14901         PR middle-end/86122
14902         * match.pd ((A +- CST1) +- CST2): Punt if last resort
14903         unsigned_type_for returns NULL.
14905         PR target/85945
14906         * lower-subreg.c (find_decomposable_subregs): Don't decompose float
14907         subregs of multi-word pseudos unless the float mode has word size.
14909 2018-06-14  Richard Biener  <rguenther@suse.de>
14911         PR middle-end/86139
14912         * tree-vect-generic.c (build_word_mode_vector_type): Remove
14913         duplicate and harmful type_hash_canon.
14914         * tree.c (type_hash_canon): Assert we didn't find ourselves.
14916 2018-06-14  Richard Biener  <rguenther@suse.de>
14918         PR ipa/86124
14919         * tree-ssa-struct-alias.c (create_variable_info_for): Handle
14920         NULL cgraph_node.
14922 2018-06-14  Sebastian Huber  <sebastian.huber@embedded-brains.de>
14924         * config/rtems.h (STDINT_LONG32): Define.
14926 2018-06-13  Matthew Fortune  <matthew.fortune@mips.com>
14927             Prachi Godbole  <prachi.godbole@imgtec.com>
14929         * config/mips/mips-cpus.def: Define P6600.
14930         * config/mips/mips-tables.opt: Regenerate.
14931         * config/mips/mips.c (mips_ucbranch_type): New enum.
14932         (mips_rtx_cost_data): Add support for P6600.
14933         (mips_issue_rate): Likewise.
14934         (mips_multipass_dfa_lookahead): Likewise.
14935         (mips_avoid_hazard): Likewise.
14936         (mips_reorg_process_insns): Likewise.
14937         (mips_classify_branch_p6600): New function.
14938         * config/mips/mips.h (TUNE_P6600): New define.
14939         (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
14940         (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
14941         * config/mips/mips.md: Include p6600.md.
14942         (processor): Add p6600.
14943         * config/mips/p6600.md: New file.
14944         * doc/invoke.texi: Add p6600 to supported architectures.
14946 2018-06-13  Martin Sebor  <msebor@redhat.com>
14948         PR tree-optimization/86114
14949         * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
14950         of integer types.
14951         * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
14953 2018-06-13  Richard Biener  <rguenther@suse.de>
14955         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
14956         Properly set vector type of the intermediate stmt.
14957         * tree-vect-stmts.c (vectorizable_operation): The destination
14958         var always has vectype_out type.
14960 2018-06-13  Jeff Law  <law@redhat.com>
14962         * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
14963         integer 0 for argument to print_rtl_with_bb.
14964         (rl78_reorg): Likewise.
14966 2018-06-13  David Malcolm  <dmalcolm@redhat.com>
14968         * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
14969         from rtx to rtx_insn *.
14970         * config/bfin/bfin.c (hwloop_optimize): Likewise for local
14971         "label".
14972         (add_sched_insns_for_speculation): Likewise for local "target",
14973         converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
14974         * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
14975         from rtx_insn ** to rtx_code_label **.
14976         (reorg_emit_nops): Likewise.
14977         (c6x_reorg): Likewise for local "call_labels".
14978         * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
14979         rtx to rtx_insn *.
14980         * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
14981         rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
14982         the loops over LABEL_REFS.
14983         (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
14984         braf_label.
14985         (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
14986         (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
14987         (split_branches): Strengthen local "olabel" from rtx to
14988         rtx_insn *, adding a safe_as_a cast.
14989         * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
14990         to "rtx_insn *".
14991         (add_insn_after): Likewise for first two params.
14992         (add_insn_before): Likewise.
14993         (remove_insn): Likewise for param.
14994         (emit_pattern_before_noloc): Likewise for second and third params.
14995         (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
14996         (emit_call_insn_before_noloc): Likewise.
14997         (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
14998         to "rtx_insn *".
14999         (emit_barrier_before): Likewise.
15000         (emit_label_before): Strengthen "label" param from "rtx" to
15001         "rtx_code_label *".  Strengthen "before" param from "rtx" to
15002         "rtx_insn *".
15003         (emit_insn_after_1): Strengthen "after" param from "rtx" to
15004         "rtx_insn *".
15005         (emit_pattern_after_noloc): Likewise.
15006         (emit_insn_after_noloc): Likewise.
15007         (emit_jump_insn_after_noloc): Likewise.
15008         (emit_call_insn_after_noloc): Likewise.
15009         (emit_debug_insn_after_noloc): Likewise.
15010         (emit_barrier_after): Likewise.
15011         (emit_label_after): Likewise for both params.
15012         (emit_pattern_after_setloc): Likewise for "after" param.  Convert
15013         "loc" param from "int" to "location_t".
15014         (emit_insn_after_setloc): Likewise.
15015         (emit_jump_insn_after_setloc): Likewise.
15016         (emit_call_insn_after_setloc): Likewise.
15017         (emit_debug_insn_after_setloc): Likewise.
15018         (emit_pattern_before_setloc): Likewise for "before" param.  Convert
15019         "loc" param from "int" to "location_t".
15020         (emit_pattern_before): Convert NULL_RTX to NULL.
15021         (emit_insn_before_setloc): Convert "loc" param from "int" to
15022         "location_t".
15023         (emit_jump_insn_before_setloc): Likewise.
15024         (emit_call_insn_before_setloc): Likewise.
15025         (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
15026         rtx_insn *.  Convert "loc" param from "int" to "location_t".
15027         * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
15028         emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
15029         Convert 3rd param from "int" to "location_t".
15030         (emit_barrier_before, emit_barrier_after, next_real_insn):
15031         Strengthen param from rtx to rtx_insn *.
15032         (emit_label_before): Strengthen 1st param from "rtx" to
15033         "rtx_code_label *".  Strengthen 2nd param from "rtx" to
15034         "rtx_insn *".
15035         (emit_insn_after_noloc, emit_jump_insn_after_noloc,
15036         emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
15037         Strengthen 2nd param from "rtx" to "rtx_insn *".
15038         (emit_insn_after_setloc, emit_jump_insn_after_setloc)
15039         emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
15040         Likewise. Convert 3rd param from "int" to "location_t".
15041         (emit_label_after): Strengthen 1st param from "rtx" to
15042         "rtx_code_label *".
15043         (next_real_insn, remove_insn): Strengthen param from "rtx" to
15044         "rtx_insn *".
15045         (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
15046         from "rtx" to "rtx_insn *".
15048 2018-06-13  Jan Hubicka  <hubicka@gcc.gnu.org>
15050         * cgraph.c (cgraph_node::get_untransformed_body): Dump function
15051         bodies streamed in with -Q.
15052         * dumpfile.c (dump_files): Add lto-stream-out dump file.
15053         * dumpfile.h (tree_dump_index): Add lto_stream_out.
15054         * gimple-streamer-out.c: Include gimple-pretty-print.h
15055         (output_bb): Dump stmts streamed.
15056         * lto-section-out.c: Include print-tree.h
15057         (lto_begin_section): Dump sections created.
15058         (lto_output_decl_index): Dump decl encoded.
15059         * lto-streamer-out.c: Include print-tree.h
15060         (create_output_block): Dump output block created.
15061         (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
15062         (output_function): Dump function output.
15063         (output_constructor): Dump constructor streamed.
15064         (write_global_stream): Output indexes encoded.
15065         (produce_asm_for_decls): Dump streams encoded.
15066         * lto-streamer.c (streamer_dump_file): New global var.
15067         * lto-streamer.h (streamer_dump_file): Declare.
15068         * passes.c (ipa_write_summaries): Initialize streamer dump.
15069         * varpool.c (varpool_node::get_constructor): Dump constructors streamed
15070         in.
15072 2018-06-13  Eric Botcazou  <ebotcazou@adacore.com>
15074         PR target/86048
15075         * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
15076         offsets for register save directives.  Emit a second batch of save
15077         directives, if need be, when the function accesses prior frames.
15079 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15081         * config/arc/fpu.md (fmasf4): Force operand to register.
15082         (fnmasf4): Likewise.
15084 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15086         * config/arc/arc-protos.h (arc_pad_return): Remove.
15087         * config/arc/arc.c (machine_function): Remove force_short_suffix
15088         and size_reason.
15089         (arc_print_operand): Adjust printing of '&'.
15090         (arc_verify_short): Remove conditional printing of short suffix.
15091         (arc_final_prescan_insn): Remove reference to size_reason.
15092         (pad_return): New function.
15093         (arc_reorg): Call pad_return.
15094         (arc_pad_return): Remove.
15095         (arc_init_machine_status): Remove reference to force_short_suffix.
15096         * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
15097         (attr length): When attribute iscompact is true force to 2
15098         regardless; in the case of maybe check if we want to force the
15099         instruction to have 4 bytes length.
15100         (nopv): Change it to generate 4 byte long nop as well.
15101         (blockage): New pattern.
15102         (simple_return): Remove call to arc_pad_return.
15103         (p_return_i): Likewise.
15105 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15107         * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
15109 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15111         * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
15112         ARC cores.
15114 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15116         * config/arc/arc.c (atomic_exchangesi): EX instruction is default
15117         for ARC700 and ARCv2.
15119 2018-06-13  Chenghua Xu <paul.hua.gm@gmail.com>
15121         PR target/86076
15122         * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
15123         operands[2] instead of operands[1].
15126 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
15128         * lra-constraints.c (simplify_operand_subreg): In the paradoxical
15129         case, check whether the outer register overlaps an unallocatable
15130         register, not just whether it fits the required class.
15132 2018-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
15134         * poly-int.h (can_div_trunc_p): Add new overload in which all values
15135         are poly_ints.
15136         * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
15137         (memrefs_conflict_p): Likewise.
15138         (init_alias_analysis): Likewise.
15139         * cfgexpand.c (expand_debug_expr): Likewise.
15140         * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
15141         * cse.c (fold_rtx): Likewise.
15142         * explow.c (adjust_stack, anti_adjust_stack): Likewise.
15143         * expr.c (emit_block_move_hints): Likewise.
15144         (clear_storage_hints, push_block, emit_push_insn): Likewise.
15145         (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
15146         (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
15147         (emit_group_store): Likewise.
15148         (find_args_size_adjust): Use strip_offset.  Use rtx_to_poly_int64
15149         to read the PRE/POST_MODIFY increment.
15150         * calls.c (store_one_arg): Use strip_offset.
15151         * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
15152         poly_int_rtx_p.
15153         (set_noop_p): Use rtx_to_poly_int64 for the elements selected
15154         by a VEC_SELECT.
15155         * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
15156         (simplify_binary_operation_1): Extend CONST_INT handling to
15157         poly_int_rtx_p.
15158         * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
15159         than a HOST_WIDE_INT.
15160         (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
15161         poly_int64.
15162         (adjust_mems, add_stores): Update accodingly.
15163         (vt_canonicalize_addr): Track polynomial offsets.
15164         (emit_note_insn_var_location): Likewise.
15165         (vt_add_function_parameter): Likewise.
15166         (vt_initialize): Likewise.
15168 2018-06-12  Jeff Law  <law@redhat.com>
15170         * config.gcc (alpha*-*-freebsd*): Remove.
15171         * config/alpha/freebsd.h: Remove.
15173 2018-06-12  David Malcolm  <dmalcolm@redhat.com>
15175         PR other/69968
15176         * spellcheck-tree.c (levenshtein_distance): Rename to...
15177         (get_edit_distance): ...this, and update for underlying renaming.
15178         * spellcheck-tree.h (levenshtein_distance): Rename to...
15179         (get_edit_distance): ...this.
15180         * spellcheck.c (levenshtein_distance): Rename to...
15181         (get_edit_distance): ...this.  Convert from Levenshtein distance
15182         to Damerau-Levenshtein distance by supporting transpositions of
15183         adjacent characters.  Rename "v1" to "v_next" and "v0" to
15184         "v_one_ago".
15185         (selftest::levenshtein_distance_unit_test_oneway): Rename to...
15186         (selftest::test_edit_distance_unit_test_oneway): ...this, and
15187         update for underlying renaming.
15188         (selftest::levenshtein_distance_unit_test): Rename to...
15189         (selftest::test_get_edit_distance_unit): ...this, and update for
15190         underlying renaming.
15191         (selftest::test_find_closest_string): Add example from PR 69968
15192         where transposition helps
15193         (selftest::test_metric_conditions): Update for renaming.
15194         (selftest::test_metric_conditions): Likewise.
15195         (selftest::spellcheck_c_tests): Likewise.
15196         * spellcheck.h (levenshtein_distance): Rename both overloads to...
15197         (get_edit_distance): ...this.
15198         (best_match::consider): Update for renaming.
15200 2018-06-12  Martin Sebor  <msebor@redhat.com>
15202         PR tree-optimization/85259
15203         * builtins.c (compute_objsize): Handle constant offsets.
15204         * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
15205         true iff a warning has been issued.
15206         * gimple.h (gimple_nonartificial_location): New function.
15207         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
15208         gimple_nonartificial_location and handle -Wno-system-headers.
15209         (handle_builtin_stxncpy): Same.
15211 2018-06-12  Martin Sebor  <msebor@redhat.com>
15213         PR c/85931
15214         * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
15216 2018-06-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
15218         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
15219         BUILTIN_VEC_XST entries for pointer to double and long long.
15221 2018-06-12  H.J. Lu  <hongjiu.lu@intel.com>
15223         PR target/85990
15224         * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
15225         Update comments.
15226         * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
15227         Likewise.
15229 2018-06-12  Martin Liska  <mliska@suse.cz>
15231         * doc/options.texi: Document IntegerRange.
15233 2018-06-12  Martin Liska  <mliska@suse.cz>
15235         * config/i386/i386.opt: Make MPX-related options as Deprecated.
15236         * opt-functions.awk: Handle Deprecated flag.
15237         * opts-common.c (decode_cmdline_option): Handle cl_deprecated
15238         and report error.
15239         (read_cmdline_option): Report warning for a deprecated option.
15240         * opts.h (struct cl_option): Add new field cl_deprecated.
15241         (CL_ERR_DEPRECATED): New.
15243 2018-06-12  Martin Liska  <mliska@suse.cz>
15245         * doc/options.texi: Document Deprecated option flag.
15247 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15249         * config/arc/arc-arch.h (arc_extras): New enum.
15250         (arc_cpu_t):Add field extra.
15251         (arc_cpu_types): Consider the extras.
15252         * config/arc/arc-cpus.def: Add extras info.
15253         * config/arc/arc-opts.h (processor_type): Consider extra field.
15254         * config/arc/arc.c (arc_override_options): Handle extra field.
15256 2018-06-12  Claudiu Zissulescu  <claziss@synopsys.com>
15258         * config/arc/arc-arch.h: Update ARC_OPTX macro.
15259         * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
15260         field.
15261         * config/arc/arc.c (arc_init): Update pic warning.
15262         (irq_range): Update irq range parsing warnings.
15263         (arc_override_options): Update various warning messages.
15264         (arc_handle_aux_attribute): Likewise.
15266 2018-06-12  Robert Suchanek  <robert.suchanek@mips.com>
15268         * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
15270 2018-06-12  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
15272         * doc/sourcebuild.texi: Document usage of line number 0 in verify
15273         compiler messages directives.
15275 2018-06-12  Matthew Fortune  <mfortune@gmail.com>
15277         * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
15278         * config/mips/mips-tables.opt: Regenerate.
15279         * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
15280         mips64r6.
15281         * doc/invoke.texi: Document -march=i6500.
15283 2018-06-12  Prachi Godbole  <prachi.godbole@imgtec.com>
15285         * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
15286         (i6400_gpmul): Add cpu_unit.
15287         (i6400_gpdiv): Likewise.
15288         (i6400_msa_add_d): Update reservations.
15289         (i6400_msa_int_add) Likewise.
15290         (i6400_msa_short_logic3) Likewise.
15291         (i6400_msa_short_logic2) Likewise.
15292         (i6400_msa_short_logic) Likewise.
15293         (i6400_msa_move) Likewise.
15294         (i6400_msa_cmp) Likewise.
15295         (i6400_msa_short_float2) Likewise.
15296         (i6400_msa_div_d) Likewise.
15297         (i6400_msa_long_logic1) Likewise.
15298         (i6400_msa_long_logic2) Likewise.
15299         (i6400_msa_mult) Likewise.
15300         (i6400_msa_long_float2) Likewise.
15301         (i6400_msa_long_float4) Likewise.
15302         (i6400_msa_long_float5) Likewise.
15303         (i6400_msa_long_float8) Likewise.
15304         (i6400_fpu_fadd): Include frint type.
15305         (i6400_fpu_store): New define_insn_reservation.
15306         (i6400_fpu_load): Likewise.
15307         (i6400_fpu_move): Likewise.
15308         (i6400_fpu_fcmp): Likewise.
15309         (i6400_fpu_fmadd): Likewise.
15310         (i6400_int_mult): Include imul3nc type and update reservation.
15311         (i6400_int_div): Include idiv3 type and update reservation.
15312         (i6400_int_load): Update to check type not move_type.
15313         (i6400_int_store): Likewise.
15314         (i6400_int_prefetch): Set zero latency.
15316 2018-06-12  Eric Botcazou  <ebotcazou@adacore.com>
15318         * gcc.c: Document new %@{...} sequence.
15319         (LINK_COMMAND_SPEC): Use it for the -L switches.
15320         (cpp_unique_options): Use it for the -I switches.
15321         (at_file_argbuf): New global variable.
15322         (in_at_file): Likewise.
15323         (alloc_args): Create at_file_argbuf.
15324         (clear_args): Truncate at_file_argbuf.
15325         (store_arg): If in_at_file, push the argument onto at_file_argbuf.
15326         (open_at_file): New function.
15327         (close_at_file): Likewise.
15328         (create_at_file): Delete.
15329         (do_spec_1) <'i'>: Use open_at_file/close_at_file.
15330         <'o'>: Likewise.
15331         <'@'>: New case.
15332         (validate_switches_from_spec): Deal with %@{...} sequence.
15333         (validate_switches): Likewise.
15334         (driver::finalize): Call clear_args.
15336 2018-06-11  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
15338         * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
15340 2018-06-11  Martin Sebor  <msebor@redhat.com>
15342         * doc/invoke.texi (-Wall): List -Wc++17-compat.
15343         (Wno-class-memaccess): Add @opindex.
15344         (Wno-templates, Wno-multiple-inheritance): Same.
15345         (Wno-virtual-inheritance, Wno-namespaces): Same.
15346         (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
15347         (Wno-format-overflow, Wno-format-truncation): Same.
15348         (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
15349         (Wno-alloc-size-larger-than, Wframe-larger-than): Same
15350         (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
15351         (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
15352         (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
15353         (Wno-misspelled-isr): Same.
15355 2018-06-11  Martin Sebor  <msebor@redhat.com>
15357         * PR tree-optimization/86083
15358         * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
15360 2018-06-11  Zhouyi Zhou <zhouzhouyi@gmail.com>
15362         * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
15364 2018-06-11  Segher Boessenkool  <segher@kernel.crashing.org>
15366         PR target/85755
15367         * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
15368         on the correct operand.
15369         (*movdi_internal64): Ditto.
15371 2018-06-11  Martin Liska  <mliska@suse.cz>
15373         PR tree-optimization/86089
15374         * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
15376 2018-06-11  Julia Koval  <julia.koval@intel.com>
15378         * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
15379         _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
15380         * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
15382 2018-06-11  Olivier Hainque  <hainque@adacore.com>
15384         * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
15385         for Ada with strict dwarf2.
15387 2018-06-08  Peter Bergner  <bergner@vnet.ibm.com>
15389         PR target/85755
15390         * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
15391         addresses.
15393 2018-06-08  Jan Hubicka  <hubicka@ucw.cz>
15395         * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
15397 2018-06-08  David Edelsohn  <dje.gcc@gmail.com>
15399         * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
15400         TARGET_ELF.
15402 2018-06-08  Martin Liska  <mliska@suse.cz>
15404         * tree-cfg.h (debug_function): Fix argument type to match
15405         implementation.
15407 2018-06-08  Martin Liska  <mliska@suse.cz>
15409         * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
15410         Remove usage of MPX-related (and removed) fields.
15411         * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
15413 2018-06-08  David Malcolm  <dmalcolm@redhat.com>
15415         * cfg.c (debug): Use TDF_NONE rather than 0.
15416         * cfghooks.c (debug): Likewise.
15417         * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
15418         (struct dump_option_value_info): Convert to...
15419         (struct kv_pair): ...this template type.
15420         (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
15421         rather than 0.
15422         (optinfo_verbosity_options): Likewise.
15423         (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
15424         OPTGROUP_NONE.
15425         (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
15426         than int for "optgroup_flags" param.
15427         (dump_generic_expr_loc): Use dump_flags_t rather than int for
15428         "dump_kind" param.
15429         (dump_dec): Likewise.
15430         (dump_finish): Use TDF_NONE rather than 0.
15431         (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
15432         rather than int for "optgroup_flags" param.  Use TDF_NONE rather
15433         than 0.  Update for change to option_ptr.
15434         (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
15435         to optgroup_flags_t *.  Use TDF_NONE and OPTGROUP_NONE rather than
15436         0.  Update for changes to optinfo_verbosity_options and
15437         optgroup_options.
15438         (opt_info_switch_p): Convert optgroup_flags from int to
15439         optgroup_flags_t.
15440         (dump_basic_block): Use dump_flags_t rather than int
15441         for "dump_kind" param.
15442         * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
15443         TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
15444         TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
15445         TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
15446         TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
15447         MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
15448         TDF_NONE): Convert from macros to...
15449         (enum dump_flag): ...this new enum.
15450         (dump_flags_t): Update to use enum.
15451         (operator|, operator&, operator~, operator|=, operator&=):
15452         Implement for dump_flags_t.
15453         (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
15454         OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
15455         Convert from macros to...
15456         (enum optgroup_flag): ...this new enum.
15457         (optgroup_flags_t): New typedef.
15458         (operator|, operator|=): Implement for optgroup_flags_t.
15459         (struct dump_file_info): Convert field "alt_flags" to
15460         dump_flags_t.  Convert field "optgroup_flags" to
15461         optgroup_flags_t.
15462         (dump_basic_block): Use dump_flags_t rather than int for param.
15463         (dump_generic_expr_loc): Likewise.
15464         (dump_dec): Likewise.
15465         (dump_register): Convert param "optgroup_flags" to
15466         optgroup_flags_t.
15467         (opt_info_enable_passes): Likewise.
15468         * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
15469         than 0.
15470         * gimple-pretty-print.c (debug): Likewise.
15471         * gimple-ssa-store-merging.c (bswap_replace): Likewise.
15472         (merged_store_group::apply_stores): Likewise.
15473         * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
15474         * gimple.c (verify_gimple_pp): Likewise.
15475         * graphite-poly.c (print_pbb_body): Likewise.
15476         * passes.c (pass_manager::register_one_dump_file): Convert
15477         local "optgroup_flags" to optgroup_flags_t.
15478         * print-tree.c (print_node): Use TDF_NONE rather than 0.
15479         (debug): Likewise.
15480         (debug_body): Likewise.
15481         * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
15482         to optgroup_flags_t.
15483         * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
15484         than 0.
15485         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
15486         (convert_mult_to_fma): Likewise.
15487         * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
15488         * tree-ssa-sccvn.c (vn_eliminate): Likewise.
15489         * tree-vect-data-refs.c (dump_lower_bound): Convert param
15490         "dump_kind" to dump_flags_t.
15492 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
15494         * config/rs6000/rs6000.c (min, max): Delete.
15496 2018-06-08  Segher Boessenkool  <segher@kernel.crashing.org>
15498         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
15499         -mabi=spe and -mabi=no-spe.
15501 2018-06-08  Martin Liska  <mliska@suse.cz>
15503         * ipa-pure-const.c (propagate_pure_const): Use ::get at places
15504         where we expect an existing summary.
15506 2018-06-08  Martin Liska  <mliska@suse.cz>
15508         * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
15509         * ipa-inline.h (estimate_edge_growth): Likewise.
15511 2018-06-08  Martin Liska  <mliska@suse.cz>
15513         * cgraph.c (function_version_hasher::hash): Use
15514         cgraph_node::get_uid ().
15515         (function_version_hasher::equal):
15516         * cgraph.h (cgraph_node::get_uid): New method.
15517         * ipa-inline.c (update_caller_keys): Use
15518         cgraph_node::get_uid ().
15519         (update_callee_keys): Likewise.
15520         * ipa-utils.c (searchc): Likewise.
15521         (ipa_reduced_postorder): Likewise.
15522         * lto-cgraph.c (input_node): Likewise.
15523         * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
15524         * symbol-summary.h (symtab_insertion): Likewise.
15525         (symtab_removal): Likewise.
15526         (symtab_duplication): Likewise.
15527         * tree-pretty-print.c (dump_function_header): Likewise.
15528         * tree-sra.c (convert_callers_for_node): Likewise.
15530 2018-06-08  Martin Liska  <mliska@suse.cz>
15532         * cgraph.c (symbol_table::create_edge): Always assign a new
15533         unique number.
15534         (symbol_table::free_edge): Do not recycle numbers.
15535         * cgraph.h (cgraph_edge::get): New method.
15536         * symbol-summary.h (symtab_removal): Use it.
15537         (symtab_duplication): Likewise.
15538         (call_summary::hashable_uid): Remove.
15540 2018-06-08  Martin Liska  <mliska@suse.cz>
15542         * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
15543         (initialize_growth_caches): Remove.
15544         (free_growth_caches): Likewise.
15545         (do_estimate_edge_time): Use edge_growth_cache.
15546         (do_estimate_edge_size): Likewise.
15547         (do_estimate_edge_hints): Likewise.
15548         * ipa-inline.c (reset_edge_caches): Likewise.
15549         (recursive_inlining): Likewise.
15550         (inline_small_functions): Likewise.
15551         * ipa-inline.h (initialize_growth_caches): Remove.
15552         (estimate_edge_size): Likewise.
15553         (estimate_edge_time): Likewise.
15554         (estimate_edge_hints): Likewise.
15555         (reset_edge_growth_cache): Likewise.
15556         * symbol-summary.h (call_summary::remove): New method.
15558 2018-06-08  Martin Liska  <mliska@suse.cz>
15560         * ipa-cp.c (class edge_clone_summary): New summary.
15561         (grow_edge_clone_vectors): Remove.
15562         (ipcp_edge_duplication_hook): Remove.
15563         (class edge_clone_summary_t): New call_summary class.
15564         (ipcp_edge_removal_hook): Remove.
15565         (edge_clone_summary_t::duplicate): New function.
15566         (get_next_cgraph_edge_clone): Use edge_clone_summaries.
15567         (create_specialized_node): Likewise.
15568         (ipcp_driver): Initialize edge_clone_summaries and do not
15569         register hooks.
15571 2018-06-08  Martin Liska  <mliska@suse.cz>
15573         * symbol-summary.h (get): New function.
15574         (call_summary::m_initialize_when_cloning): New class member.
15576 2018-06-08  Martin Liska  <mliska@suse.cz>
15578         * cgraph.c (cgraph_node::remove): Do not recycle uid.
15579         * cgraph.h (symbol_table::release_symbol): Do not pass uid.
15580         (symbol_table::allocate_cgraph_symbol): Do not set uid.
15581         * passes.c (uid_hash_t): Record removed_nodes by their uids.
15582         (remove_cgraph_node_from_order): Use the removed_nodes set.
15583         (do_per_function_toporder): Likwise.
15584         * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
15585         instead of summary_uid.
15586         (symtab_removal): Likewise.
15587         (symtab_duplication): Likewise.
15589 2018-06-08  Martin Liska  <mliska@suse.cz>
15591         * ipa-cp.c (ipcp_store_bits_results): Use
15592         ipcp_transformation_sum.
15593         (ipcp_store_vr_results): Likewise.
15594         * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
15595         to ...
15596         (ipcp_transformation_initialize): ... this.
15597         (ipa_set_node_agg_value_chain):
15598         (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
15599         (write_ipcp_transformation_info): Likewise.
15600         (read_ipcp_transformation_info): Likewise.
15601         (ipcp_update_bits): Likewise.
15602         (ipcp_update_vr): Likewise.
15603         (ipcp_transform_function): Likewise.
15604         * ipa-prop.h: Rename ipcp_transformation_summary to
15605         ipcp_transformation.
15606         (class ipcp_transformation_t): New function summary.
15607         (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
15608         (ipa_get_agg_replacements_for_node): Likewise.
15610 2018-06-08  Martin Liska  <mliska@suse.cz>
15612         * ipa-pure-const.c (struct funct_state_d): Do it class instead
15613         of struct.
15614         (class funct_state_summary_t): New function_summary class.
15615         (has_function_state): Remove.
15616         (get_function_state): Likewise.
15617         (set_function_state): Likewise.
15618         (add_new_function): Likewise.
15619         (funct_state_summary_t::insert): New function.
15620         (duplicate_node_data): Remove.
15621         (remove_node_data): Remove.
15622         (funct_state_summary_t::duplicate): New function.
15623         (register_hooks): Create new funct_state_summaries.
15624         (pure_const_generate_summary): Use it.
15625         (pure_const_write_summary): Likewise.
15626         (pure_const_read_summary): Likewise.
15627         (propagate_pure_const): Likewise.
15628         (propagate_nothrow): Likewise.
15629         (dump_malloc_lattice): Likewise.
15630         (propagate_malloc): Likewise.
15631         (execute): Do not register hooks, just remove summary
15632         instead.
15633         (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
15634         constructor.
15636 2018-06-08  Martin Liska  <mliska@suse.cz>
15638         * ipa-reference.c (remove_node_data): Remove.
15639         (duplicate_node_data): Likewise.
15640         (class ipa_ref_var_info_summary_t): New class.
15641         (class ipa_ref_opt_summary_t): Likewise.
15642         (get_reference_vars_info): Use ipa_ref_var_info_summaries.
15643         (get_reference_optimization_summary): Use
15644         ipa_ref_opt_sum_summaries.
15645         (set_reference_vars_info): Remove.
15646         (set_reference_optimization_summary): Likewise.
15647         (ipa_init): Create summaries.
15648         (init_function_info): Use function summary.
15649         (ipa_ref_opt_summary_t::duplicate): New function.
15650         (ipa_ref_opt_summary_t::remove): New function.
15651         (get_read_write_all_from_node): Fix GNU coding style.
15652         (propagate): Use function summary.
15653         (write_node_summary_p): Fix GNU coding style.
15654         (stream_out_bitmap): Likewise.
15655         (ipa_reference_read_optimization_summary): Use function summary.
15656         (ipa_reference_c_finalize): Do not release hooks.
15658 2018-06-08  Martin Liska  <mliska@suse.cz>
15660         * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
15661         (analyze_function_body): Extract multiple calls of get_create.
15662         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
15663         * ipa-inline.c (recursive_inlining): Use ::get method.
15664         * ipa-inline.h (estimate_edge_growth): Likewise.
15666 2018-06-08  Martin Liska  <mliska@suse.cz>
15668         * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
15669         HSA_INVALID.
15670         (hsa_function_summary::hsa_function_summary): Use the new enum
15671         value.
15672         (hsa_gpu_implementation_p): Use hsa_summaries::get.
15673         * hsa-gen.c (hsa_get_host_function): Likewise.
15674         (get_brig_function_name): Likewise.
15675         * ipa-hsa.c (process_hsa_functions): Likewise.
15676         (ipa_hsa_write_summary): Likewise.
15677         * symbol-summary.h (symtab_duplication): Use ::get function/
15678         (get): New function.
15680 2018-06-08  Martin Liska  <mliska@suse.cz>
15682         * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
15683         of get.
15684         * hsa-common.c (hsa_summary_t::link_functions): Likewise.
15685         (hsa_register_kernel): Likewise.
15686         * hsa-common.h (hsa_gpu_implementation_p): Likewise.
15687         * hsa-gen.c (hsa_get_host_function): Likewise.
15688         (get_brig_function_name): Likewise.
15689         (generate_hsa): Likewise.
15690         (pass_gen_hsail::execute): Likewise.
15691         * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
15692         (devirtualization_time_bonus): Likewise.
15693         (ipcp_propagate_stage): Likewise.
15694         * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
15695         (edge_set_predicate): Likewise.
15696         (evaluate_conditions_for_known_args): Likewise.
15697         (evaluate_properties_for_edge): Likewise.
15698         (ipa_fn_summary::reset): Likewise.
15699         (ipa_fn_summary_t::duplicate): Likewise.
15700         (dump_ipa_call_summary): Likewise.
15701         (ipa_dump_fn_summary): Likewise.
15702         (analyze_function_body): Likewise.
15703         (compute_fn_summary): Likewise.
15704         (estimate_edge_devirt_benefit): Likewise.
15705         (estimate_edge_size_and_time): Likewise.
15706         (estimate_calls_size_and_time): Likewise.
15707         (estimate_node_size_and_time): Likewise.
15708         (inline_update_callee_summaries): Likewise.
15709         (remap_edge_change_prob): Likewise.
15710         (remap_edge_summaries): Likewise.
15711         (ipa_merge_fn_summary_after_inlining): Likewise.
15712         (ipa_update_overall_fn_summary): Likewise.
15713         (read_ipa_call_summary): Likewise.
15714         (inline_read_section): Likewise.
15715         (write_ipa_call_summary): Likewise.
15716         (ipa_fn_summary_write): Likewise.
15717         (ipa_free_fn_summary): Likewise.
15718         * ipa-hsa.c (process_hsa_functions): Likewise.
15719         (ipa_hsa_write_summary): Likewise.
15720         (ipa_hsa_read_section): Likewise.
15721         * ipa-icf.c (sem_function::merge): Likewise.
15722         * ipa-inline-analysis.c (simple_edge_hints): Likewise.
15723         (do_estimate_edge_time): Likewise.
15724         (estimate_size_after_inlining): Likewise.
15725         (estimate_growth): Likewise.
15726         (growth_likely_positive): Likewise.
15727         * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
15728         (inline_call): Likewise.
15729         * ipa-inline.c (caller_growth_limits): Likewise.
15730         (can_inline_edge_p): Likewise.
15731         (can_inline_edge_by_limits_p): Likewise.
15732         (compute_uninlined_call_time): Likewise.
15733         (compute_inlined_call_time): Likewise.
15734         (want_inline_small_function_p): Likewise.
15735         (edge_badness): Likewise.
15736         (update_caller_keys): Likewise.
15737         (update_callee_keys): Likewise.
15738         (recursive_inlining): Likewise.
15739         (inline_small_functions): Likewise.
15740         (inline_to_all_callers_1): Likewise.
15741         (dump_overall_stats): Likewise.
15742         (early_inline_small_functions): Likewise.
15743         (early_inliner): Likewise.
15744         * ipa-inline.h (estimate_edge_growth): Likewise.
15745         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
15746         * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
15747         * ipa-prop.h (IPA_NODE_REF): Likewise.
15748         (IPA_EDGE_REF): Likewise.
15749         * ipa-pure-const.c (malloc_candidate_p): Likewise.
15750         (propagate_malloc): Likewise.
15751         * ipa-split.c (execute_split_functions): Likewise.
15752         * symbol-summary.h: Rename get to get_create.
15753         (get): Likewise.
15754         (get_create): Likewise.
15755         * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
15757 2018-06-08  Martin Liska  <mliska@suse.cz>
15759         * symbol-summary.h (release): Move definition out of class
15760         declaration.
15761         (symtab_removal): Likewise.
15762         (symtab_duplication): Likewise.
15764 2018-06-08  Martin Liska  <mliska@suse.cz>
15766         * symbol-summary.h (function_summary): Move constructor
15767         implementation out of class declaration.
15768         (release): Likewise.
15769         (symtab_insertion): Likewise.
15770         (symtab_removal): Likewise.
15771         (symtab_duplication): Likewise.
15772         (get): Likewise.
15774 2018-06-08  Martin Liska  <mliska@suse.cz>
15776         * Makefile.in: Remove support for MPX (macros, related functions,
15777         fields in cgraph_node, ...).
15778         * builtin-types.def (BT_BND): Likewise.
15779         (BT_FN_BND_CONST_PTR): Likewise.
15780         (BT_FN_CONST_PTR_BND): Likewise.
15781         (BT_FN_VOID_PTR_BND): Likewise.
15782         (BT_FN_BND_CONST_PTR_SIZE): Likewise.
15783         (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
15784         * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
15785         (expand_builtin_mempcpy_with_bounds): Likewise.
15786         (expand_builtin_memset_with_bounds): Likewise.
15787         (expand_builtin_memset_args): Likewise.
15788         (std_expand_builtin_va_start): Likewise.
15789         (expand_builtin): Likewise.
15790         (expand_builtin_with_bounds): Likewise.
15791         * builtins.def (DEF_BUILTIN_CHKP): Likewise.
15792         (DEF_LIB_BUILTIN_CHKP): Likewise.
15793         (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
15794         (DEF_CHKP_BUILTIN): Likewise.
15795         (BUILT_IN_MEMCPY): Likewise.
15796         (BUILT_IN_MEMMOVE): Likewise.
15797         (BUILT_IN_MEMPCPY): Likewise.
15798         (BUILT_IN_MEMSET): Likewise.
15799         (BUILT_IN_STPCPY): Likewise.
15800         (BUILT_IN_STRCAT): Likewise.
15801         (BUILT_IN_STRCHR): Likewise.
15802         (BUILT_IN_STRCPY): Likewise.
15803         (BUILT_IN_STRLEN): Likewise.
15804         (BUILT_IN_MEMCPY_CHK): Likewise.
15805         (BUILT_IN_MEMMOVE_CHK): Likewise.
15806         (BUILT_IN_MEMPCPY_CHK): Likewise.
15807         (BUILT_IN_MEMSET_CHK): Likewise.
15808         (BUILT_IN_STPCPY_CHK): Likewise.
15809         (BUILT_IN_STRCAT_CHK): Likewise.
15810         (BUILT_IN_STRCPY_CHK): Likewise.
15811         * calls.c (store_bounds): Likewise.
15812         (emit_call_1): Likewise.
15813         (special_function_p): Likewise.
15814         (maybe_warn_nonstring_arg): Likewise.
15815         (initialize_argument_information): Likewise.
15816         (finalize_must_preallocate): Likewise.
15817         (compute_argument_addresses): Likewise.
15818         (expand_call): Likewise.
15819         * cfgexpand.c (expand_call_stmt): Likewise.
15820         (expand_return): Likewise.
15821         (expand_gimple_stmt_1): Likewise.
15822         (pass_expand::execute): Likewise.
15823         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
15824         (cgraph_node::remove): Likewise.
15825         (cgraph_node::dump): Likewise.
15826         (cgraph_node::verify_node): Likewise.
15827         * cgraph.h (chkp_function_instrumented_p): Likewise.
15828         (symtab_node::get_alias_target): Likewise.
15829         (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
15830         (cgraph_local_p): Likewise.
15831         * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
15832         (cgraph_edge::rebuild_references): Likewise.
15833         * cgraphunit.c (varpool_node::finalize_decl): Likewise.
15834         (walk_polymorphic_call_targets): Likewise.
15835         (cgraph_node::expand_thunk): Likewise.
15836         (symbol_table::output_weakrefs): Likewise.
15837         * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
15838         (ix86_handle_option): Likewise.
15839         * config/i386/constraints.md: Likewise.
15840         * config/i386/i386-builtin-types.def (BND): Likewise.
15841         (VOID): Likewise.
15842         (PVOID): Likewise.
15843         (ULONG): Likewise.
15844         * config/i386/i386-builtin.def (BDESC_END): Likewise.
15845         (BDESC_FIRST): Likewise.
15846         (BDESC): Likewise.
15847         * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
15848         * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
15849         * config/i386/i386.c (enum reg_class): Likewise.
15850         (ix86_target_string): Likewise.
15851         (ix86_option_override_internal): Likewise.
15852         (ix86_conditional_register_usage): Likewise.
15853         (ix86_valid_target_attribute_inner_p): Likewise.
15854         (ix86_set_indirect_branch_type): Likewise.
15855         (ix86_set_current_function): Likewise.
15856         (ix86_function_arg_regno_p): Likewise.
15857         (init_cumulative_args): Likewise.
15858         (ix86_function_arg_advance): Likewise.
15859         (ix86_function_arg): Likewise.
15860         (ix86_pass_by_reference): Likewise.
15861         (ix86_function_value_regno_p): Likewise.
15862         (ix86_function_value_1): Likewise.
15863         (ix86_function_value_bounds): Likewise.
15864         (ix86_return_in_memory): Likewise.
15865         (ix86_setup_incoming_vararg_bounds): Likewise.
15866         (ix86_va_start): Likewise.
15867         (indirect_thunk_need_prefix): Likewise.
15868         (print_reg): Likewise.
15869         (ix86_print_operand): Likewise.
15870         (ix86_expand_call): Likewise.
15871         (ix86_output_function_return): Likewise.
15872         (reg_encoded_number): Likewise.
15873         (BDESC_VERIFYS): Likewise.
15874         (ix86_init_mpx_builtins): Likewise.
15875         (ix86_init_builtins): Likewise.
15876         (ix86_emit_cmove): Likewise.
15877         (ix86_emit_move_max): Likewise.
15878         (ix86_expand_builtin): Likewise.
15879         (ix86_builtin_mpx_function): Likewise.
15880         (ix86_get_arg_address_for_bt): Likewise.
15881         (ix86_load_bounds): Likewise.
15882         (ix86_store_bounds): Likewise.
15883         (ix86_load_returned_bounds): Likewise.
15884         (ix86_store_returned_bounds): Likewise.
15885         (ix86_class_likely_spilled_p): Likewise.
15886         (ix86_hard_regno_mode_ok): Likewise.
15887         (x86_order_regs_for_local_alloc): Likewise.
15888         (ix86_mitigate_rop): Likewise.
15889         (ix86_bnd_prefixed_insn_p): Likewise.
15890         (ix86_mpx_bound_mode): Likewise.
15891         (ix86_make_bounds_constant): Likewise.
15892         (ix86_initialize_bounds): Likewise.
15893         (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
15894         (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
15895         (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
15896         (TARGET_STORE_RETURNED_BOUNDS): Likewise.
15897         (TARGET_CHKP_BOUND_MODE): Likewise.
15898         (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
15899         (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
15900         (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
15901         (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
15902         * config/i386/i386.h (TARGET_MPX): Likewise.
15903         (TARGET_MPX_P): Likewise.
15904         (VALID_BND_REG_MODE): Likewise.
15905         (FIRST_BND_REG): Likewise.
15906         (LAST_BND_REG): Likewise.
15907         (enum reg_class): Likewise.
15908         (BND_REG_P): Likewise.
15909         (BND_REGNO_P): Likewise.
15910         (BNDmode): Likewise.
15911         (ADJUST_INSN_LENGTH): Likewise.
15912         * config/i386/i386.md: Likewise.
15913         * config/i386/i386.opt: Likewise.
15914         * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
15915         (defined): Likewise.
15916         (LINK_MPX): Likewise.
15917         (MPX_SPEC): Likewise.
15918         (LIBMPX_SPEC): Likewise.
15919         (LIBMPXWRAPPERS_SPEC): Likewise.
15920         (CHKP_SPEC): Likewise.
15921         * config/i386/predicates.md: Likewise.
15922         * dbxout.c (dbxout_type): Likewise.
15923         * doc/extend.texi: Likewise.
15924         * doc/invoke.texi: Likewise.
15925         * doc/md.texi: Likewise.
15926         * doc/tm.texi: Likewise.
15927         * doc/tm.texi.in: Likewise.
15928         * dwarf2out.c (is_base_type): Likewise.
15929         (gen_formal_types_die): Likewise.
15930         (gen_subprogram_die): Likewise.
15931         (gen_type_die_with_usage): Likewise.
15932         (gen_decl_die): Likewise.
15933         (dwarf2out_late_global_decl): Likewise.
15934         * expr.c (expand_assignment): Likewise.
15935         (emit_storent_insn): Likewise.
15936         (store_expr_with_bounds): Likewise.
15937         (store_expr): Likewise.
15938         (expand_expr_real_1): Likewise.
15939         * expr.h (store_expr_with_bounds): Likewise.
15940         * function.c (use_register_for_decl): Likewise.
15941         (struct bounds_parm_data): Likewise.
15942         (assign_parms_augmented_arg_list): Likewise.
15943         (assign_parm_find_entry_rtl): Likewise.
15944         (assign_parm_is_stack_parm): Likewise.
15945         (assign_parm_load_bounds): Likewise.
15946         (assign_bounds): Likewise.
15947         (assign_parms): Likewise.
15948         (expand_function_start): Likewise.
15949         * gcc.c (CHKP_SPEC): Likewise.
15950         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
15951         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
15952         (wrestrict_dom_walker::check_call): Likewise.
15953         * gimple.c (gimple_build_call_from_tree): Likewise.
15954         * gimple.h (enum gf_mask): Likewise.
15955         (gimple_call_with_bounds_p): Likewise.
15956         (gimple_call_set_with_bounds): Likewise.
15957         * gimplify.c (gimplify_init_constructor): Likewise.
15958         * ipa-cp.c (initialize_node_lattices): Likewise.
15959         (propagate_constants_across_call): Likewise.
15960         (find_more_scalar_values_for_callers_subset): Likewise.
15961         * ipa-hsa.c (process_hsa_functions): Likewise.
15962         * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
15963         * ipa-icf.c (sem_function::merge): Likewise.
15964         * ipa-inline.c (early_inliner): Likewise.
15965         * ipa-pure-const.c (warn_function_noreturn): Likewise.
15966         (warn_function_cold): Likewise.
15967         (propagate_pure_const): Likewise.
15968         * ipa-ref.h (enum GTY): Likewise.
15969         * ipa-split.c (find_retbnd): Likewise.
15970         (consider_split): Likewise.
15971         (split_function): Likewise.
15972         * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
15973         * ipa.c (walk_polymorphic_call_targets): Likewise.
15974         (symbol_table::remove_unreachable_nodes): Likewise.
15975         (process_references): Likewise.
15976         (cgraph_build_static_cdtor_1): Likewise.
15977         * lto-cgraph.c (lto_output_node): Likewise.
15978         (output_refs): Likewise.
15979         (compute_ltrans_boundary): Likewise.
15980         (input_overwrite_node): Likewise.
15981         (input_node): Likewise.
15982         (input_cgraph_1): Likewise.
15983         * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
15984         * passes.c (pass_manager::execute_early_local_passes): Likewise.
15985         (class pass_chkp_instrumentation_passes): Likewise.
15986         (make_pass_chkp_instrumentation_passes): Likewise.
15987         * passes.def: Likewise.
15988         * rtl.h (struct GTY): Likewise.
15989         (CALL_EXPR_WITH_BOUNDS_P): Likewise.
15990         * stor-layout.c (layout_type): Likewise.
15991         * symtab.c: Likewise.
15992         * target.def: Likewise.
15993         * targhooks.c (default_chkp_bound_type): Likewise.
15994         (default_chkp_bound_mode): Likewise.
15995         (default_builtin_chkp_function): Likewise.
15996         (default_chkp_function_value_bounds): Likewise.
15997         (default_chkp_make_bounds_constant): Likewise.
15998         (default_chkp_initialize_bounds): Likewise.
15999         * targhooks.h (default_chkp_bound_type): Likewise.
16000         (default_chkp_bound_mode): Likewise.
16001         (default_builtin_chkp_function): Likewise.
16002         (default_chkp_function_value_bounds): Likewise.
16003         (default_chkp_make_bounds_constant): Likewise.
16004         (default_chkp_initialize_bounds): Likewise.
16005         * toplev.c (compile_file): Likewise.
16006         (process_options): Likewise.
16007         * tree-core.h (DEF_BUILTIN): Likewise.
16008         (DEF_BUILTIN_CHKP): Likewise.
16009         * tree-inline.c (declare_return_variable): Likewise.
16010         (remap_gimple_stmt): Likewise.
16011         (copy_bb): Likewise.
16012         (initialize_inlined_parameters): Likewise.
16013         (expand_call_inline): Likewise.
16014         * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
16015         (make_pass_ipa_chkp_early_produce_thunks): Likewise.
16016         (make_pass_ipa_chkp_produce_thunks): Likewise.
16017         (make_pass_chkp): Likewise.
16018         (make_pass_chkp_opt): Likewise.
16019         (make_pass_chkp_instrumentation_passes): Likewise.
16020         * tree-pretty-print.c (dump_generic_node): Likewise.
16021         * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
16022         * tree-ssa-dce.c (propagate_necessity): Likewise.
16023         (eliminate_unnecessary_stmts): Likewise.
16024         * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
16025         * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
16026         * tree-ssa-sccvn.h: Likewise.
16027         * tree-ssa-strlen.c (get_string_length): Likewise.
16028         (valid_builtin_call): Likewise.
16029         (adjust_last_stmt): Likewise.
16030         (handle_builtin_strchr): Likewise.
16031         (handle_builtin_strcpy): Likewise.
16032         (handle_builtin_stxncpy): Likewise.
16033         (handle_builtin_memcpy): Likewise.
16034         (handle_builtin_strcat): Likewise.
16035         (strlen_check_and_optimize_stmt): Likewise.
16036         * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
16037         * tree-streamer-in.c: Likewise.
16038         * tree-streamer.c (record_common_node): Likewise.
16039         * tree.c (tree_code_size): Likewise.
16040         (wide_int_to_tree_1): Likewise.
16041         (type_contains_placeholder_1): Likewise.
16042         (build_common_tree_nodes): Likewise.
16043         * tree.def (POINTER_BOUNDS_TYPE): Likewise.
16044         * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
16045         (POINTER_BOUNDS_P): Likewise.
16046         (BOUNDED_TYPE_P): Likewise.
16047         (BOUNDED_P): Likewise.
16048         (CALL_WITH_BOUNDS_P): Likewise.
16049         (pointer_bounds_type_node): Likewise.
16050         * value-prof.c (gimple_ic): Likewise.
16051         * var-tracking.c (vt_add_function_parameters): Likewise.
16052         * varasm.c (make_decl_rtl): Likewise.
16053         (assemble_start_function): Likewise.
16054         (output_constant): Likewise.
16055         (maybe_assemble_visibility): Likewise.
16056         * varpool.c (ctor_for_folding): Likewise.
16057         * chkp-builtins.def: Remove.
16058         * ipa-chkp.c: Remove.
16059         * ipa-chkp.h: Remove.
16060         * rtl-chkp.c: Remove.
16061         * rtl-chkp.h: Remove.
16062         * tree-chkp-opt.c: Remove.
16063         * tree-chkp.c: Remove.
16064         * tree-chkp.h: Remove.
16066 2018-06-07  Carl Love  <cel@us.ibm.com>
16068         * config/rs6000/vsx.md (vextract_fp_from_shorth,
16069         vextract_fp_from_shortl): Add BE support.
16071 2018-06-07  Paul Koning  <ni1d@arrl.net>
16073         * compare-elim.c (try_merge_compare): Don't merge compare if
16074         address contains a side effect.
16075         (try_eliminate_compare): Likewise.
16077 2018-06-07  Olga Makhotina  <olga.makhotina@intel.com>
16079         * config.gcc: Support "tremont".
16080         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
16081         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
16082         PROCESSOR_TREMONT.
16083         * config/i386/i386.c (m_TREMONT): Define.
16084         (processor_target_table): Add "tremont".
16085         (PTA_TREMONT): Define.
16086         (ix86_lea_outperforms): Add TARGET_TREMONT.
16087         (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
16088         (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
16089         and M_INTEL_GOLDMONT_PLUS.
16090         (fold_builtin_cpu): Add "tremont".
16091         (ix86_add_stmt_cost): Add TARGET_TREMONT.
16092         (ix86_option_override_internal): Add "tremont".
16093         * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
16094         (processor_type): Add PROCESSOR_TREMONT.
16095         * config/i386/x86-tune.def: Add m_TREMONT.
16096         * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
16098 2018-06-07  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
16100         * config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
16101         symbol defined for msp430i* devices to be lower case.
16103 2018-06-07  Richard Biener  <rguenther@suse.de>
16105         * graphite-sese-to-poly.c (extract_affine): Avoid unneded
16106         wrapping.  Properly wrap the result of a BIT_NOT_EXPR.
16107         Properly wrap signed arithmetic if overflow wraps.
16109 2018-06-07  Jakub Jelinek  <jakub@redhat.com>
16111         PR tree-optimization/69615
16112         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
16113         of a cast from a same precision integral SSA_NAME in a bb dominated
16114         by first_bb, retry with rhs2 set to the rhs1 of the cast.  Don't emit
16115         cast to utype if rhs2 has already a compatible type.
16117 2018-06-07  Richard Biener  <rguenther@suse.de>
16119         PR tree-optimization/85935
16120         * graphite-scop-detection.c (find_params_in_bb): Analyze
16121         condition operands with respect to the correct loop.  Assert
16122         the analysis doesn't fail.
16124 2018-06-04  Carl Love  <cel@us.ibm.com>
16126         * config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
16127         using natural element order.  Use gen_lshrsi3 instead of gen_ashrsi3
16128         as it is slightly cheaper.
16129         (first_match_or_eos_index_<mode>):
16130         Calculate index using natural element order.
16131         (first_match_index_<mode>):
16132         Calculate index using natural element order.
16133         (first_match_or_eos_index_<mode>):
16134         Calculate index using natural order.
16135         (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
16136         for BE and LE modes.
16137         * config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
16138         P9V_BUILTIN_VCLZLSBB_V16QI.
16139         * config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
16140         specific.
16142 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16144         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
16145         indentation and line wrap for many prototypes.  Add missing
16146         @smallexample directives around block of prototypes for vec_xl and
16147         vec_xst.
16149 2018-06-05  Michael Meissner  <meissner@linux.ibm.com>
16151         * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
16152         track if we pass or return IEEE 128-bit floating point.
16153         (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
16154         C++ mangling that is compatible with GCC 8.1.
16155         (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
16156         (init_cumulative_args): Note if we pass or return IEEE 128-bit
16157         floating point types.
16158         (rs6000_function_arg_advance_1): Likewise.
16159         (rs6000_mangle_type): Optionally generate mangled names that match
16160         what GCC 8.1 generated for IEEE 128-bit floating point types.
16161         (rs6000_globalize_decl_name): If we have an external function that
16162         passes or returns IEEE 128-bit types, generate a weak reference
16163         from the mangled name used in GCC 8.1 to the current mangled
16164         name.
16165         (rs6000_init_builtins): Make __ibm128 use the long double type if
16166         long double is IBM extended double.  Make __float128 use the long
16167         double type if long double is IEEE 128-bit.
16169         PR target/85657
16170         * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
16171         macro for __ibm128 built-in functions.
16172         (PACK_IF): Add __ibm128 pack/unpack functions.
16173         (UNPACK_IF): Likewise.
16174         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
16175         enable long double built-in functions if long double is IEEE
16176         128-bit floating point.
16177         (rs6000_invalid_builtin): Update long double built-in function
16178         error message.
16179         (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
16180         functions, adjust the built-in function to use the long double
16181         built-in function if __ibm128 and long double are the same type.
16182         * doc/extend.texi (PowerPC builtins): Update documention for
16183         __builtin_{,un}pack_longdouble.  Add documentation for
16184         __builtin_{,un}pack_ibm128.
16186 2018-06-06  Jim Wilson  <jimw@sifive.com>
16188         * config/riscv/riscv.c (enum riscv_privilege_levels): New.
16189         (struct machine_function): New field interrupt_mode.
16190         (riscv_handle_type_attribute): New function.  Add forward declaration.
16191         (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
16192         (riscv_expand_epilogue): Check interrupt_mode field.
16193         (riscv_set_current_function): Check interrupt attribute args and
16194         set interrupt_mode field.
16195         * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
16196         (riscv_sret, riscv_uret): New.
16197         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
16198         new arguments to interrupt attribute.
16200 2018-06-06  Peter Bergner  <bergner@vnet.ibm.com>
16202         PR target/63177
16203         * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
16204         Don't handle -mcpu=power8 if -mpower9-vector is also used.
16206 2018-06-06  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16208         * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
16209         VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
16210         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
16211         several redundant entries.
16213 2018-06-06  David Malcolm  <dmalcolm@redhat.com>
16215         * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
16216         type from "rtx" to "rtx_insn *".
16217         * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
16218         for local "call_insn", removing cast.
16219         (ix86_expand_call): Likewise, introducing a "call_insn" local.
16221 2018-06-06  Eric Botcazou  <ebotcazou@adacore.com>
16223         PR tree-optimization/86066
16224         * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
16225         for BIT_INSERT_EXPR stores.
16227 2018-06-06  Richard Biener  <rguenther@suse.de>
16229         PR tree-optimization/86062
16230         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
16231         component refs ontop
16232         of to be offsetted base.
16234 2018-06-06  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
16236         * config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
16237         to be static and remove check on interrupt attribute name.
16239 2018-06-05  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16241         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
16242         volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
16244 2018-06-05  Steve Ellcey  <sellcey@cavium.com>
16246         PR target/79924
16247         * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
16248         second argument.
16249         * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
16250         Remove second argument, change how error is called.
16251         (aarch64_layout_arg): Remove second argument from
16252         aarch64_err_no_fpadvsimd call.
16253         (aarch64_init_cumulative_args): Ditto.
16254         (aarch64_gimplify_va_arg_expr): Ditto.
16255         * config/aarch64/aarch64.md (mov<mode>): Ditto.
16257 2018-06-05  Uros Bizjak  <ubizjak@gmail.com>
16259         * config/i386/i386.md (simple_return_indirect_internal): New expander.
16260         (*simple_return_indirect_internal<mode>): Rename from
16261         simple_return_indirect_internal.  Use W mode iterator.
16262         (rstorssp): New expander.
16263         (*rstorssp<mode>): Rename from rstorssp.  Use P mode iterator.
16264         (clrssbsy): New expander.
16265         (*clrssbsy<mode>): Rename from clrssbsy.  Use P mode iterator.
16267 2018-06-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
16269         * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
16270         __typeof__.
16271         (cmse_check_pointed_object): Likewise.
16273 2018-06-05  Martin Liska  <mliska@suse.cz>
16275         PR gcov-profile/47618
16276         * doc/invoke.texi: Document how -fprofile-dir format
16277         is extended.
16279 2018-06-05  Richard Biener  <rguenther@suse.de>
16281         * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
16282         removal pretend DOM info isn't available so we do not update
16283         it and only remove edges, not dominated blocks.  Actually free
16284         DOM info in case we removed something.  Remove unreachable blocks.
16285         (mfb_keep_latches): Work with either DOM info or marked backedges.
16286         (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
16287         first.  Mark backedges if DOM info isn't available.
16288         (Re-)compute DOM info after cleanup_control_flow_pre.
16290 2018-06-05  Richard Biener  <rguenther@suse.de>
16292         * tree-cfg.c (struct locus_discrim_map): Store line, not location.
16293         (locus_discrim_hasher::hash): Adjust.
16294         (locus_discrim_hasher::equal): Likewise.
16295         (next_discriminator_for_locus): Work on line directly.
16296         (same_line_p): Pass in expanded locus1 as well.
16297         (assign_discriminators): Avoid redundant location expansions.
16299 2018-06-05  Richard Biener  <rguenther@suse.de>
16301         PR tree-optimization/86046
16302         * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
16303         if required after clearing TREE_ADDRESSABLE.
16305 2018-06-05  Richard Biener  <rguenther@suse.de>
16307         PR tree-optimization/86047
16308         * tree-ssa-loop.c (for_each_index): Glob handling of all
16309         decls and constants and really handle all of them.
16311 2018-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16313         PR target/81497
16314         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
16315         qualifier_void_pointer and qualifier_const_void_pointer.
16316         (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
16317         (arm_init_builtins): Handle the above.
16318         * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
16319         __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
16320         __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
16321         void intrinsics.
16323 2018-06-05  Martin Liska  <mliska@suse.cz>
16325         * auto-profile.c (read_autofdo_file): Do not use
16326         gcov_ctr_summary struct.
16327         (afdo_callsite_hot_enough_for_early_inline): Likewise.
16328         * coverage.c (struct counts_entry): Likewise.
16329         (read_counts_file): Read just single summary entry.
16330         (get_coverage_counts): Use gcov_summary struct.
16331         * coverage.h (get_coverage_counts): Likewise.
16332         * gcov-dump.c (dump_working_sets): Likewise.
16333         (tag_summary): Dump just single summary.
16334         * gcov-io.c (gcov_write_summary): Write just histogram
16335         summary.
16336         (gcov_read_summary): Read just single summary.
16337         (compute_working_sets): Use gcov_summary struct.
16338         * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
16339         of GCOV_COUNTERS_SUMMABLE.
16340         (GCOV_COUNTERS_SUMMABLE): Remove.
16341         (GCOV_FIRST_VALUE_COUNTER): Replace with
16342         GCOV_COUNTER_V_INTERVAL.
16343         (struct gcov_ctr_summary): Remove.
16344         (struct gcov_summary): Directly use fields of former
16345         gcov_ctr_summary.
16346         (compute_working_sets): Use gcov_summary struct.
16347         * gcov.c (read_count_file): Do not use ctrs fields.
16348         * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
16349         struct.
16350         * lto-streamer.h (struct GTY): Make profile_info gcov_summary
16351         struct.
16352         * profile.c: Likewise.
16353         * profile.h: Likewise.
16355 2018-06-05  Martin Liska  <mliska@suse.cz>
16357         PR gcov-profile/84846
16358         * gcov.c (output_lines): Print working directory only
16359         in intermediate format.
16361 2018-06-05  Andreas Krebbel  <krebbel@linux.ibm.com>
16363         * config/s390/s390-builtin-types.def: Add void function type.
16364         * config/s390/s390-builtins.def: Use the function type for the
16365         tbeginc builtin.
16367 2018-06-04  Jim Wilson  <jimw@sifive.com>
16369         * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
16370         to int.
16371         * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
16372         and maybe_eh_return.  Change regno to unsigned int.  Use new args to
16373         handle EH_RETURN_DATA_REGNO registers properly.
16374         (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
16375         (riscv_expand_epilogue): Update comment.  Change argument name and
16376         type.  Update code to use new name and type.  Pass new args to
16377         riscv_for_each_saved_reg.  Only use EH_RETURN_STACKADJ_RTX when
16378         EXCEPTION_RETURN.
16379         * config/riscv/riscv.md (NORMAL_RETURN): New.
16380         (SIBCALL_RETURN, EXCEPTION_RETURN): New.
16381         (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
16382         (eh_return): Call gen_eh_return_internal and emit barrier.
16383         (eh_return_internal): Call riscv_expand_epilogue.
16385 2018-06-04  Eric Botcazou  <ebotcazou@adacore.com>
16387         * gimple-ssa-store-merging.c (struct merged_store_group): Move up
16388         bit_insertion field and declare can_be_merged_into method.
16389         (merged_store_group::can_be_merged_into): New method.
16390         (imm_store_chain_info::coalesce_immediate): Call it to decide whether
16391         consecutive non-overlapping stores can be merged.  Turn MEM_REF stores
16392         into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
16394 2018-06-04  Richard Biener  <rguenther@suse.de>
16396         PR tree-optimization/85955
16397         * builtins.c (fold_builtin_sincos): Convert pointers to
16398         destination to appropriate type before dereferencing.
16400 2018-06-04  Segher Boessenkool  <segher@kernel.crashing.org>
16402         * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
16404 2018-06-04  Richard Sandiford  <richard.sandiford@linaro.org>
16406         * expr.c (expand_expr_real_1): Force the operand into memory if
16407         its TYPE_MODE is BLKmode and if there is no integer mode for
16408         the number of bits being extracted.
16410 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
16412         PR target/85832
16413         PR target/86036
16414         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
16415         Use vptestnm rather than vptestm in (=Yc,v,C) variant.
16417 2018-06-04  Richard Biener  <rguenther@suse.de>
16419         * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
16420         (cleanup_tree_cfg_noloop): ... single caller.  Do
16421         start_recording_case_labels later.
16423 2018-06-04  Sebastian Peryt  <sebastian.peryt@intel.com>
16425         * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
16426         to _IMMINTRIN_H_INCLUDED.
16427         * config/i386/pconfigintrin.h: Ditto.
16428         * config/i386/waitpkgintrin.h: Ditto.
16429         * config/i386/immintrin.h: Add includes for sgxintrin.h,
16430         pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
16431         * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
16432         emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
16433         bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
16434         waitpkgintrin.h and cldemoteintrin.h.
16436 2018-06-04  Richard Biener  <rguenther@suse.de>
16438         PR tree-optimization/86038
16439         * tracer.c (find_best_successor): Check probability for
16440         being initialized, bail out if not.
16442 2018-06-04  Richard Earnshaw  <rearnsha@arm.com>
16444         PR target/86003
16445         * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
16446         of bits to ignore when comparing architectures.
16448 2018-06-04  Jakub Jelinek  <jakub@redhat.com>
16450         PR tree-optimization/69615
16451         * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
16452         maximum or minimum of the type, try to merge it also as if
16453         range1 is + [-, x - 1] or + [x + 1, -].
16455         PR c++/86025
16456         * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
16458 2018-06-03  Eric Botcazou  <ebotcazou@adacore.com>
16460         PR tree-optimization/86034
16461         * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
16462         the unsigned bitfield type in a bit insertion sequence if it does not
16463         have a larger precision than the bitfield size.
16464         (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
16466 2018-06-03  Kito Cheng  <kito.cheng@gmail.com>
16468         * config/nds32/nds32-peephole2.md: Add new patterns for code size.
16470 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
16472         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
16473         * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
16474         * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
16475         * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
16477 2018-06-03  Chung-Ju Wu  <jasonwucj@gmail.com>
16479         * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
16480         Disable -fdelete-null-pointer-checks for ELF toolchain.
16482 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
16483             Kito Cheng  <kito.cheng@gmail.com>
16485         * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
16486         (nds32le-*-*, nds32be-*-*): Integrate checking process.
16487         (nds32*-*-*): Add glibc and uclibc conditions.
16488         * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
16489         (TARGET_EXCEPT_UNWIND_INFO): Define.
16490         * config/nds32/elf.h: New file.
16491         * config/nds32/linux.h: New file.
16492         * config/nds32/nds32-elf.opt: New file.
16493         * config/nds32/nds32-linux.opt: New file.
16494         * config/nds32/nds32-fp-as-gp.c
16495         (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
16496         * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
16497         TARGET_LINUX_ABI.
16498         (nds32_asm_file_end): Ditto.
16499         (nds32_print_operand): Ditto.
16500         (nds32_insert_attributes): Ditto.
16501         (nds32_init_libfuncs): New function.
16502         (TARGET_HAVE_TLS): Define.
16503         (TARGET_INIT_LIBFUNCS): Define.
16504         * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
16505         spec content.
16506         (TARGET_ELF): Apply different mcmodel setting.
16507         (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
16508         been migrated into elf.h and linux.h files.
16509         * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
16510         * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
16511         (mcmodel): The content has been migrated into nds32-elf.opt and
16512         nds32-linux.opt files.
16513         * config/nds32/t-elf: New file.
16514         * config/nds32/t-linux: New file.
16516 2018-06-02  Chung-Ju Wu  <jasonwucj@gmail.com>
16517             Shiva Chen  <shiva0217@gmail.com>
16519         * config/nds32/constants.md (unspec_volatile_element): Add
16520         UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
16521         * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
16522         optimization.
16523         * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
16524         (make_pass_nds32_fp_as_gp): Declare.
16525         * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
16526         optmization pass.
16527         (nds32_asm_function_end_prologue): Remove unused asm output.
16528         (nds32_asm_function_begin_epilogue): Remove unused asm output.
16529         (nds32_asm_file_start): Output necessary fp_as_gp information.
16530         (nds32_option_override): Adjust register usage.
16531         (nds32_expand_prologue): Consider fp_as_gp situation.
16532         (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
16533         * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
16534         (epilogue): Ditto.
16535         (return): Ditto.
16536         (simple_return): Ditto.
16537         (omit_fp_begin): Output special directive for fp_as_gp.
16538         (omit_fp_end): Output special directive for fp_as_gp.
16539         * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
16540         mforbid-fp-as-gp): New options.
16542 2018-06-01  Mark Wielaard  <mark@klomp.org>
16544         * dwarf2out.c (dwarf2out_finish): Remove generation of
16545         DW_AT_loclists_base.
16547 2018-06-01  Eric Botcazou  <ebotcazou@adacore.com>
16549         * gimple-ssa-store-merging.c: Include gimple-fold.h.
16550         (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
16551         (struct merged_store_group): Add bit_insertion field.
16552         (dump_char_array): Use standard hexadecimal format.
16553         (merged_store_group::merged_store_group): Set bit_insertion to false.
16554         (merged_store_group::apply_stores): Use optimal buffer size.  Deal
16555         with BIT_INSERT_EXPR stores.  Move up code updating the mask and
16556         also print the mask in the dump file.
16557         (pass_store_merging::gate): Minor tweak.
16558         (imm_store_chain_info::coalesce_immediate): Fix wrong association
16559         of stores with groups in dump.  Allow coalescing of BIT_INSERT_EXPR
16560         stores with INTEGER_CST stores.
16561         (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
16562         (imm_store_chain_info::output_merged_store): Add try_bitpos variable
16563         and use it throughout.  Generate bit insertion sequences if need be.
16564         (pass_store_merging::process_store): Remove redundant condition.
16565         Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
16567 2018-06-01  Segher Boessenkool  <segher@kernel.crashing.org>
16569         * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
16570         the 128-bit floating point types.  Fix function comment.
16572 2018-06-01  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
16574         * config/aarch64/aarch64-simd.md
16575         (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
16576         mnemonics.
16577         (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
16578         mnemonics.
16580 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
16582         PR tree-optimization/85989
16583         * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
16584         variable.
16585         (backprop::intersect_uses): Check it when deciding whether this
16586         is a backedge reference.
16587         (backprop::process_block): Add each phi to m_visited_phis
16588         after visiting it, then clear it at the end.
16590 2018-06-01  Richard Biener  <rguenther@suse.de>
16592         * tree-vectorizer.h (vect_dr_stmt): New function.
16593         (vect_get_load_cost): Adjust.
16594         (vect_get_store_cost): Likewise.
16595         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
16596         Use vect_dr_stmt instead of DR_SMTT.
16597         (vect_record_base_alignments): Likewise.
16598         (vect_calculate_target_alignment): Likewise.
16599         (vect_compute_data_ref_alignment): Likewise and make static.
16600         (vect_update_misalignment_for_peel): Likewise.
16601         (vect_verify_datarefs_alignment): Likewise.
16602         (vector_alignment_reachable_p): Likewise.
16603         (vect_get_data_access_cost): Likewise.  Pass down
16604         vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
16605         (vect_get_peeling_costs_all_drs): Likewise.
16606         (vect_peeling_hash_get_lowest_cost): Likewise.
16607         (vect_enhance_data_refs_alignment): Likewise.
16608         (vect_find_same_alignment_drs): Likewise.
16609         (vect_analyze_data_refs_alignment): Likewise.
16610         (vect_analyze_group_access_1): Likewise.
16611         (vect_analyze_group_access): Likewise.
16612         (vect_analyze_data_ref_access): Likewise.
16613         (vect_analyze_data_ref_accesses): Likewise.
16614         (vect_vfa_segment_size): Likewise.
16615         (vect_small_gap_p): Likewise.
16616         (vectorizable_with_step_bound_p): Likewise.
16617         (vect_prune_runtime_alias_test_list): Likewise.
16618         (vect_analyze_data_refs): Likewise.
16619         (vect_supportable_dr_alignment): Likewise.
16620         * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
16621         (vect_gen_prolog_loop_niters): Likewise.
16622         * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
16623         * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
16624         modify DR_STMT.
16625         (vect_recog_mask_conversion_pattern): Likewise.
16626         (vect_try_gather_scatter_pattern): Likewise.
16627         * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
16628         to vect_get_store_cost.
16629         (vect_get_store_cost): Get stmt_info instead of DR.
16630         (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
16631         (vect_get_load_cost): Get stmt_info instead of DR.
16633 2018-06-01  Richard Biener  <rguenther@suse.de>
16635         PR middle-end/86017
16636         * gimple-fold.c (var_decl_component_p): Also allow offsetted
16637         vars wrapped in MEM_REFs.
16639 2018-06-01  Richard Sandiford  <richard.sandiford@linaro.org>
16641         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
16642         Fix subreg tests so that we only return a choice between
16643         GENERAL_REGS and FP_REGS if the original classes included both.
16645 2018-06-01  Richard Biener  <rguenther@suse.de>
16647         PR ipa/85960
16648         * tree-ssa-structalias.c (get_function_part_constraint):
16649         Handle NULL fi->decl.
16650         (find_func_aliases_for_call): Properly handle indirect
16651         fi from direct call.
16652         (find_func_clobbers): Likewise.
16653         (ipa_pta_execute): Likewise.
16654         (create_variable_info_for): For functions that are ifunc_resolver
16655         resolve to a varinfo that contains the result of the resolver call.
16656         (associate_varinfo_to_alias): Do not treat ifunc resolvers as
16657         aliases.
16659 2018-05-31  Michael Collison  <michael.collison@arm.com>
16661         * config/aarch64/aarch64.md:
16662         (*fix_to_zero_extenddfdi2): New pattern.
16663         * gcc.target/aarch64/fix_extend1.c: New testcase.
16665 2018-05-31  Qing Zhao <qing.zhao@oracle.com>
16667         PR middle-end/78809
16668         PR middle-end/83026
16669         * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
16670         and BUILT_IN_STRNCMP_EQ.
16671         * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
16672         BUILT_IN_STRNCMP_EQ.
16673         * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
16674         handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
16675         (gimple_fold_builtin): Likewise.
16676         * tree-ssa-strlen.c (compute_string_length): New function.
16677         (determine_min_obsize): New function.
16678         (handle_builtin_string_cmp): New function to handle calls to
16679         string compare functions.
16680         (strlen_optimize_stmt): Add handling to builtin string compare
16681         calls.
16682         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
16683         Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
16684         * tree.c (build_common_builtin_nodes): Add new defines of
16685         BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
16687 2018-05-31  Jakub Jelinek  <jakub@redhat.com>
16689         PR target/85984
16690         * bb-reorder.c (pass_partition_blocks::gate): Return false for
16691         functions with naked attribute.
16693 2018-05-31  Uros Bizjak  <ubizjak@gmail.com>
16695         * config/i386/sse.md (avx_vec_concat<mode>):
16696         Substitute concat_tg_mode mode attribute with xtg_mode.
16697         (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
16698         (concat_tg_mode): Remove mode attribute.
16700 2018-05-31  Martin Sebor  <msebor@redhat.com>
16702         PR c/82063
16703         * calls.c (alloc_max_size): Correct a logic error/typo.
16704         Treat excessive arguments as infinite.  Warn for invalid arguments.
16705         * doc/invoke.texi (-Walloc-size-larger-than): Update.
16707 2018-05-31  H.J. Lu  <hongjiu.lu@intel.com>
16709         PR target/85829
16710         * config/i386/x86-tune.def: Re-enable partial_reg_dependency
16711         and movx for Haswell.
16713 2018-05-31  Chung-Lin Tang  <cltang@codesourcery.com>
16714             Cesar Philippidis  <cesar@codesourcery.com>
16716         PR middle-end/85879
16717         * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
16718         when emitting error on private/firstprivate reductions.
16719         * omp-low.c (lower_omp_target): Avoid reference-type processing
16720         on pointers for firstprivate clause.
16722 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
16724         * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
16725         (st1x2): Likewise.
16726         (st1x3): Likewise.
16727         * config/aarch64/aarch64-simd.md
16728         (aarch64_ld1x3<VALLDIF:mode>): New pattern.
16729         (aarch64_ld1_x3_<mode>): Likewise
16730         (aarch64_st1x2<VALLDIF:mode>): Likewise
16731         (aarch64_st1_x2_<mode>): Likewise
16732         (aarch64_st1x3<VALLDIF:mode>): Likewise
16733         (aarch64_st1_x3_<mode>): Likewise
16734         * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
16735         (vld1_s8_x3): Likewise.
16736         (vld1_u16_x3): Likewise.
16737         (vld1_s16_x3): Likewise.
16738         (vld1_u32_x3): Likewise.
16739         (vld1_s32_x3): Likewise.
16740         (vld1_u64_x3): Likewise.
16741         (vld1_s64_x3): Likewise.
16742         (vld1_f16_x3): Likewise.
16743         (vld1_f32_x3): Likewise.
16744         (vld1_f64_x3): Likewise.
16745         (vld1_p8_x3): Likewise.
16746         (vld1_p16_x3): Likewise.
16747         (vld1_p64_x3): Likewise.
16748         (vld1q_u8_x3): Likewise.
16749         (vld1q_s8_x3): Likewise.
16750         (vld1q_u16_x3): Likewise.
16751         (vld1q_s16_x3): Likewise.
16752         (vld1q_u32_x3): Likewise.
16753         (vld1q_s32_x3): Likewise.
16754         (vld1q_u64_x3): Likewise.
16755         (vld1q_s64_x3): Likewise.
16756         (vld1q_f16_x3): Likewise.
16757         (vld1q_f32_x3): Likewise.
16758         (vld1q_f64_x3): Likewise.
16759         (vld1q_p8_x3): Likewise.
16760         (vld1q_p16_x3): Likewise.
16761         (vld1q_p64_x3): Likewise.
16762         (vst1_s64_x2): Likewise.
16763         (vst1_u64_x2): Likewise.
16764         (vst1_f64_x2): Likewise.
16765         (vst1_s8_x2): Likewise.
16766         (vst1_p8_x2): Likewise.
16767         (vst1_s16_x2): Likewise.
16768         (vst1_p16_x2): Likewise.
16769         (vst1_s32_x2): Likewise.
16770         (vst1_u8_x2): Likewise.
16771         (vst1_u16_x2): Likewise.
16772         (vst1_u32_x2): Likewise.
16773         (vst1_f16_x2): Likewise.
16774         (vst1_f32_x2): Likewise.
16775         (vst1_p64_x2): Likewise.
16776         (vst1q_s8_x2): Likewise.
16777         (vst1q_p8_x2): Likewise.
16778         (vst1q_s16_x2): Likewise.
16779         (vst1q_p16_x2): Likewise.
16780         (vst1q_s32_x2): Likewise.
16781         (vst1q_s64_x2): Likewise.
16782         (vst1q_u8_x2): Likewise.
16783         (vst1q_u16_x2): Likewise.
16784         (vst1q_u32_x2): Likewise.
16785         (vst1q_u64_x2): Likewise.
16786         (vst1q_f16_x2): Likewise.
16787         (vst1q_f32_x2): Likewise.
16788         (vst1q_f64_x2): Likewise.
16789         (vst1q_p64_x2): Likewise.
16790         (vst1_s64_x3): Likewise.
16791         (vst1_u64_x3): Likewise.
16792         (vst1_f64_x3): Likewise.
16793         (vst1_s8_x3): Likewise.
16794         (vst1_p8_x3): Likewise.
16795         (vst1_s16_x3): Likewise.
16796         (vst1_p16_x3): Likewise.
16797         (vst1_s32_x3): Likewise.
16798         (vst1_u8_x3): Likewise.
16799         (vst1_u16_x3): Likewise.
16800         (vst1_u32_x3): Likewise.
16801         (vst1_f16_x3): Likewise.
16802         (vst1_f32_x3): Likewise.
16803         (vst1_p64_x3): Likewise.
16804         (vst1q_s8_x3): Likewise.
16805         (vst1q_p8_x3): Likewise.
16806         (vst1q_s16_x3): Likewise.
16807         (vst1q_p16_x3): Likewise.
16808         (vst1q_s32_x3): Likewise.
16809         (vst1q_s64_x3): Likewise.
16810         (vst1q_u8_x3): Likewise.
16811         (vst1q_u16_x3): Likewise.
16812         (vst1q_u32_x3): Likewise.
16813         (vst1q_u64_x3): Likewise.
16814         (vst1q_f16_x3): Likewise.
16815         (vst1q_f32_x3): Likewise.
16816         (vst1q_f64_x3): Likewise.
16817         (vst1q_p64_x3): Likewise.
16819 2018-05-30  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
16821         * config/msp430/msp430.c (msp430_output_labelref): Prepend
16822         user_label_prefix to name.
16824         * tree-core.h: Update comment about the format of NAME string
16825         passed to handler in attribute_spec.
16827         * config/msp430/msp430.md: Remove erroneous subreg expression from
16828         zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
16829         zero_extend{q,h}isi2.
16831 2018-05-30  Borislav Petkov  <bp@suse.de>
16833         * doc/extend.texi: Document some architecture specific
16834         constraints and sort entries.
16836 2018-05-30  Martin Sebor  <msebor@redhat.com>
16838         PR middle-end/85369
16839         * builtins.c (expand_builtin_stpcpy_1): New function.
16840         (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
16841         only if the former succeeds.
16843 2018-05-31  Sameera Deshpande <sameera.deshpande@linaro.org>
16845         * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
16846         in saphira.
16848 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
16850         * doc/invoke.texi (-flinker-output): Document
16852 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
16854         * passes.c (ipa_write_summaries): Only modify statements if body
16855         is in memory.
16856         * cgraphunit.c (ipa_passes): Also produce intermeidate code when
16857         incrementally linking.
16858         (ipa_passes): Likewise.
16859         * lto-cgraph.c (lto_output_node): When incrementally linking do not
16860         pass down resolution info.
16861         * common.opt (flag_incremental_link): Update info.
16862         * gcc.c (plugin specs): Turn flinker-output=* to
16863         -plugin-opt=-linker-output-known
16864         * toplev.c (compile_file): Also cut compilation when doing incremental
16865         link.
16866         * flag-types. (enum lto_partition_model): Add
16867         LTO_LINKER_OUTPUT_NOLTOREL.
16868         (invoke.texi): Add -flinker-output docs.
16869         * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
16870         link same way as WPA; do not stream in dead initializers.
16872         * dwarf2out.c (dwarf2out_die_ref_for_decl,
16873         darf2out_register_external_decl): Support incremental link.
16875 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
16877         * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
16879 2018-05-30  Jan Hubicka  <hubicka@ucw.cz>
16881         * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
16882         it down to simple_object_copy_lto_debug_sections.
16883         (run_gcc): Determine incremental LTO link time and configure
16884         lto1 into non-wpa mode, disable renaming of debug sections.
16886 2018-05-30  Kelvin Nilsen  <kelvin@gcc.gnu.org>
16888         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
16889         descriptions of various incorrectly documented functions.
16891 2018-05-30  Andre Vieira  <andre.simoesdiasvieira@arm.com>
16893         Revert:
16894         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
16895         address check not strict.
16897 2018-05-30  Richard Biener  <rguenther@suse.de>
16899         PR tree-optimization/85964
16900         * tracer.c (better_p): Drop initialized count check, we only
16901         call the function with initialized counts now.
16902         (find_best_successor): Do find a best edge if one
16903         has uninitialized count.
16904         (find_best_predecessor): Likewise.  Do BB frequency check only
16905         if count is initialized.
16907 2017-05-30  Jackson Woodruff  <jackson.woodruff@arm.com>
16909         * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
16910         (aarch64_ldrstr_offset_compare): New.
16911         (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
16912         load/store orderings.
16913         (aarch64_gen_adjusted_ldpstp): Likewise.
16915 2018-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
16917         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
16918         Check for subset of GENERAL_REGS and FP_REGS.
16919         * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
16920         r=w alternative.
16922 2018-05-30  Richard Sandiford  <richard.sandiford@linaro.org>
16924         * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
16925         and wi::to_poly_offset.  Add the current offset and then check
16926         whether the sum fits, rather than using an unchecked addition of
16927         a checked term.  Check for a shwi rather than a uhwi.
16928         * expr.c (get_bit_range): Use tree_to_poly_uint64.
16929         (store_constructor): Use poly_int_tree_p.
16930         (expand_expr_real_1): Likewise.
16931         * function.c (assign_temp): Likewise.
16932         * fold-const.c (const_binop): Use poly_int_tree_p and
16933         wi::to_poly_offset.
16934         (fold_indirect_ref_1): Likewise.  Use multiple_p to attempt an exact
16935         division.
16936         * ipa-icf-gimple.c (func_checker::compare_operand): Use
16937         to_poly_offset for MEM offsets.
16938         * ipa-icf.c (sem_variable::equals): Likewise.
16939         * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
16940         * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
16941         wi::to_poly_offset for BIT_FIELD_REF offsets.
16942         (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
16943         wi::to_poly_offset.
16944         * var-tracking.c (emit_note_insn_var_location): Use
16945         tree_to_poly_uint64.
16947 2018-05-29  Jim Wilson  <jimw@sifive.com>
16949         * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
16951 2018-05-29  Uros Bizjak  <ubizjak@gmail.com>
16953         PR target/85950
16954         * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
16955         Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
16956         sequence.
16957         (sse4_1_round<mode>2): Use nonimmediate_operand
16958         for operand 1 predicate.
16960 2018-05-29  Martin Sebor  <msebor@redhat.com>
16961             Richard Biener  <rguenther@suse.de>
16963         PR testsuite/85888
16964         * calls.c (get_size_range): Call determine_value_range instead
16965         of get_value_range..
16966         * tree-vrp.h (determine_value_range): Declared new function.
16967         * tree-vrp.c (determine_value_range_1, determine_value_range): New.
16969 2018-05-29  Richard Biener  <rguenther@suse.de>
16971         * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
16972         sure to use non-pattern stmts for get_earlier_stmt arguments.
16973         * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
16974         called on pattern stmts.
16975         (get_later_stmt): Likewise.
16977 2018-05-29  Martin Liska  <mliska@suse.cz>
16979         PR gcov-profile/85759
16980         * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
16981         env variables.
16983 2018-05-29  Jakub Jelinek  <jakub@redhat.com>
16985         * tree-cfg.c (verify_gimple_assign_unary): Add checking for
16986         VEC_UNPACK_*_EXPR.
16987         (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
16988         VEC_PACK_*_EXPR.
16990         PR target/85918
16991         * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
16992         VEC_PACK_FLOAT_EXPR): New tree codes.
16993         * tree-pretty-print.c (op_code_prio): Handle
16994         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
16995         (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
16996         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
16997         * tree-inline.c (estimate_operator_cost): Likewise.
16998         * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
16999         * fold-const.c (const_binop): Likewise.
17000         (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
17001         VEC_UNPACK_FIX_TRUNC_LO_EXPR.
17002         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
17003         (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
17004         * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
17005         VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
17006         * expr.c (expand_expr_real_2): Likewise.
17007         * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
17008         vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
17009         vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
17010         optabs.
17011         * optabs.c (expand_widen_pattern_expr): For
17012         VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
17013         sign from result type rather than operand's type.
17014         (expand_binop_directly): For vec_packu_float_optab and
17015         vec_packs_float_optab allow result type to be different from operand's
17016         type.
17017         * optabs-tree.c (optab_for_tree_code): Handle
17018         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
17019         VEC_PACK_FLOAT_EXPR.  Formatting fixes.
17020         * tree-vect-generic.c (expand_vector_operations_1):  Handle
17021         VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
17022         VEC_PACK_FLOAT_EXPR.
17023         * tree-vect-stmts.c (supportable_widening_operation): Handle
17024         FIX_TRUNC_EXPR.
17025         (supportable_narrowing_operation): Handle FLOAT_EXPR.
17026         * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
17027         * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
17028         (float<floatunssuffix>v2div2sf2): ... this.  Formatting fix.
17029         (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
17030         mode attributes.
17031         (vec_pack<floatprefix>_float_<mode>): New expander.
17032         (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
17033         attributes.
17034         (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
17035         vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
17036         * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
17037         vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
17038         vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
17039         Document.
17040         * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
17041         VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
17042         (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
17043         VEC_PACK_FLOAT_EXPR): Document.
17045 2018-05-29  Richard Biener  <rguenther@suse.de>
17047         * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
17048         member.
17049         (stmt_vec_info_vec): Make pointer.
17050         (init_stmt_vec_info_vec): Remove.
17051         (free_stmt_vec_info_vec): Likewise.
17052         (set_stmt_vec_info_vec): New function.
17053         (free_stmt_vec_infos): Likewise.
17054         (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
17055         (set_vinfo_for_stmt): Likewise.
17056         (get_earlier_stmt): Likewise.
17057         (get_later_stmt): Likewise.
17058         * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
17059         (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
17060         (vec_info::~vec_info): Free stmt_vec_infos.
17061         (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
17062         Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
17063         (pass_slp_vectorize::execute): Likewise.
17064         * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
17065         (free_stmt_vec_info_vec): Likewise.
17066         (set_stmt_vec_info_vec): New function.
17067         (free_stmt_vec_infos): Likewise.
17068         * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
17069         the global stmt_vec_info_vec.
17070         * tree-parloops.c (gather_scalar_reductions): Use
17071         set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
17072         vector.
17074 2018-05-29  Richard Biener  <rguenther@suse.de>
17076         * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
17078 2018-05-29  Martin Liska  <mliska@suse.cz>
17079             David Malcolm  <dmalcolm@redhat.com>
17081         * vec.c (test_reverse): New.
17082         (vec_c_tests): Add new test.
17083         * vec.h (vl_ptr>::reverse): New function.
17085 2018-05-29  Gerald Pfeifer  <gerald@pfeifer.com>
17087         * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
17089         * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
17090         and later.
17092 2018-05-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
17094         * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
17096 2018-05-28  Richard Biener  <rguenther@suse.de>
17098         PR tree-optimization/85933
17099         * tree-vect-data-refs.c (vect_record_base_alignments): Only
17100         look at stmts marked as vectorizable.
17102 2018-05-28  Richard Biener  <rguenther@suse.de>
17104         PR tree-optimization/85934
17105         * tree-vect-generic.c (expand_vector_operations_1): Hoist
17106         vector boolean check before scalar optimization.
17108 2018-05-28  Jakub Jelinek  <jakub@redhat.com>
17110         * doc/invoke.texi (ARM Options): Use @item instead of @itemx
17111         for armv5te.
17113 2018-05-28  Mark Wielaard  <mark@klomp.org>
17115         * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
17116         if it is an expression containing a minus sign.
17118 2018-05-27  John David Anglin  <danglin@gcc.gnu.org>
17120         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
17122 2018-05-27  Paul Koning  <ni1d@arrl.net>
17124         * config/pdp11/pdp11.md (truncsihi2): Remove.
17126 2018-05-27  Monk Chiang  <sh.chiang04@gmail.com>
17127             Chung-Ju Wu  <jasonwucj@gmail.com>
17129         * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
17130         implementation.
17131         (unaligned_store_dw): Ditto.
17132         * config/nds32/nds32-memory-manipulation.c
17133         (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
17134         (nds32_gen_dup_4_byte_to_word_value): Rename to ...
17135         (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
17136         (emit_setmem_word_loop): Rename to ...
17137         (emit_setmem_doubleword_loop): ... this.
17138         (nds32_gen_dup_4_byte_to_word_value): New function.
17139         (nds32_gen_dup_8_byte_to_double_word_value): New function.
17140         (nds32_expand_setmem_loop): Refine implementation.
17141         (nds32_expand_setmem_loop_v3m): Ditto.
17142         * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
17143         pattern.
17145 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
17147         * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
17149 2018-05-27  Chung-Ju Wu  <jasonwucj@gmail.com>
17151         * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
17152         (nds32_init_machine_status): Initialize machine->attr_naked_p and
17153         machine->attr_no_prologue_p.
17154         (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
17155         (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
17156         (nds32_expand_epilogue): Consider attr_naked_p.
17157         (nds32_expand_epilogue_v3pop): Likewise.
17158         (nds32_can_use_return_insn): Likewise.
17159         * config/nds32/nds32.h (machine_function): Add attr_naked_p and
17160         attr_no_prologue_p fields.
17161         * config/nds32/nds32.opt (mret-in-naked-func): New option.
17163 2018-05-27  Jakub Jelinek  <jakub@redhat.com>
17165         PR target/85918
17166         * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
17167         attributes.
17168         * config/i386/sse.md
17169         (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
17170         Rename to ...
17171         (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
17172         ... this.
17173         (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
17174         Rename to ...
17175         (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
17176         ... this.
17177         (*<floatsuffix>floatv2div2sf2): Rename to ...
17178         (*float<floatunssuffix>v2div2sf2): ... this.
17179         (<floatsuffix>floatv2div2sf2_mask): Rename to ...
17180         (float<floatunssuffix>v2div2sf2_mask): ... this.
17181         (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
17182         (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
17183         (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
17184         to ...
17185         (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
17186         ... this.
17187         (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
17188         Rename to ...
17189         (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
17190         ... this.
17191         (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
17192         Rename to ...
17193         (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
17194         ... this.
17195         (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
17196         (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
17197         (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
17198         gen_ufix_truncv8dfv8si2.
17199         * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
17200         __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
17201         __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
17202         __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
17203         __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
17204         __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
17205         __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
17206         Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
17208 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
17210         PR target/85900
17211         PR target/85345
17212         * varasm.c (assemble_alias): Lookup ifunc attribute on error.
17214 2018-05-25  Jim Wilson  <jimw@sifive.com>
17216         * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
17217         * config/riscv/riscv.c (struct machine_function): Add
17218         interrupt_handler_p and attribute_checked_p fields.
17219         (riscv_attribute_table): Add interrupt.
17220         (riscv_interrupt_type_p): New.
17221         (riscv_save_reg_p): Save extra regs for interrupt handler.
17222         (riscv_use_save_libcall): Return false  for interrupt handler.
17223         (riscv_first_stack_step): Add forward declaration.
17224         (riscv_compute_frame_info): New local interrupt_save_t1.  Set it
17225         for interrupt handler with large frame.  Use it for saved reg list.
17226         (riscv_expand_prologue): Move flag_stack_usage_info support to
17227         eliminate duplication.
17228         (riscv_expand_epilogue): Generate mret for interrupt handler.
17229         (riscv_epilogue_uses): New.
17230         (riscv_can_use_return_insn): Return false for interrupt handler.
17231         (riscv_function_ok_for_sibcall): Likewise.
17232         (riscv_set_current_function): Add interrupt handler support.
17233         * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
17234         * config/riscv/riscv.md (UNSPECV_MRET): New.
17235         (GP_REGNUM): New.
17236         (riscv_frflags, riscv_fsflags): Use tab after opcode.
17237         (riscv_mret): New.
17238         * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
17240 2018-05-25  Bill Schmidt  <wschmidt@linux.ibm.com>
17242         PR tree-optimization/85712
17243         * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
17244         this candidate has already been replaced in-situ by a copy.
17246 2018-05-25  Jason Merrill  <jason@redhat.com>
17248         PR c++/80485 - inline function non-zero address.
17249         * symtab.c (nonzero_address): Check DECL_COMDAT.
17251 2018-05-25  Uros Bizjak  <ubizjak@gmail.com>
17253         PR target/83628
17254         * config/alpha/alpha.md (ashlsi3): New insn pattern.
17255         (*ashlsi_se): Rename from *ashldi_se.  Define as sign
17256         extension of SImode operation.  Use const123_operand predicate.
17257         (*saddsi_1): Remove.
17258         (*saddl_se_1): Ditto.
17259         (*ssubsi_1): Ditto.
17260         (*ssubl_se_1): Ditto.
17261         * config/alpha/predicates.md (const123_operand): New predicate.
17262         * config/alpha/constraints.md (P): Use IN_RANGE.
17264 2018-05-25  Richard Biener  <rguenther@suse.de>
17266         * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
17267         defaulted to true.
17268         (ref_maybe_used_by_stmt_p): Likewise.
17269         (stmt_may_clobber_ref_p): Likewise.
17270         (stmt_may_clobber_ref_p_1): Likewise.
17271         * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
17272         and pass it along.
17273         (ref_maybe_used_by_stmt_p): Likewise.
17274         (stmt_may_clobber_ref_p): Likewise.
17275         (stmt_may_clobber_ref_p_1): Likewise.
17276         * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
17277         the alias oracle to disambiguate DRs with stmts DR analysis
17278         couldn't handle.
17279         (vect_analyze_data_refs): Do not give up on not analyzable
17280         DRs for BB vectorization.  Remove code truncating the dataref
17281         vector.
17283 2018-05-25  Jakub Jelinek  <jakub@redhat.com>
17285         PR target/85832
17286         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
17287         Add (=Yk,v,C) variant using vptestm insn.  Use TARGET_AVX512BW
17288         in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
17290 2018-05-25  Richard Biener  <rguenther@suse.de>
17292         * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
17293         function, combining stmt data ref gathering and fatal analysis
17294         parts.
17295         (vect_analyze_data_refs): Remove now redudnant code and simplify.
17296         * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
17297         vect_analyze_loop_2 and use vect_find_stmt_data_reference.
17298         * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
17299         * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
17301 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
17303         PR tree-optimization/85720
17304         * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
17305         SCC if all partitions are builtins.
17306         (version_loop_by_alias_check): New parameter.  Generate cancelable
17307         runtime alias check if all partitions are builtins.
17308         (distribute_loop): Update call to above function.
17310 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
17312         * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
17313         (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
17314         (parm_default_def_partition_arg): Ditto.
17315         (set_parm_default_def_partition): Ditto.
17316         (get_parm_default_def_partitions): Ditto and make it static.
17317         (get_undefined_value_partitions): Ditto and make it static.
17318         (remove_ssa_form): Refactor call to init_var_map here.
17319         * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
17320         computation for loop region.
17321         (coalesce_partitions, compute_optimized_partition_bases): Ditto.
17322         (register_default_def): Delete.
17323         (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
17324         (parm_default_def_partition_arg): Ditto.
17325         (set_parm_default_def_partition): Ditto.
17326         (get_parm_default_def_partitions): Ditto and make it static.
17327         (get_undefined_value_partitions): Ditto and make it static.
17328         (coalesce_with_default, coalesce_with_default): Update comment.
17329         (create_coalesce_list_for_region): New func factored out from
17330         create_outofssa_var_map.
17331         (populate_coalesce_list_for_outofssa): New func factored out from
17332         create_outofssa_var_map and coalesce_ssa_name.
17333         (create_outofssa_var_map): Delete.
17334         (coalesce_ssa_name): Refactor to support live range computation.
17335         * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
17336         (get_parm_default_def_partitions): Delete.
17337         (get_undefined_value_partitions): Ditto.
17338         * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
17339         computation for loop region.
17340         (new_tree_live_info, loe_visit_block): Ditto.
17341         (live_worklist, set_var_live_on_entry): Ditto.
17342         (calculate_live_on_exit, verify_live_on_entry): Ditto.
17343         * tree-ssa-live.h (struct _var_map): New fields.
17344         (init_var_map): Change decl.
17345         (region_contains_p): New.
17347 2018-05-25  Bin Cheng  <bin.cheng@arm.com>
17349         * tree-ssa-live.h (live_merge_and_clear): Delete.
17351 2018-05-25  Richard Biener  <rguenther@suse.de>
17353         PR c++/85912
17354         * tree-dump.c (dequeue_and_dump): Remove access to removed
17355         operand 2 of a SWITCH_EXPR.
17357 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17359         * doc/sourcebuild.texi (vect_double_cond_arith): Include
17360         multiplication and division.
17361         * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
17362         (cond_udiv@var{m}, cond_umod@var{m}): Document.
17363         * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
17364         (cond_udiv_optab, cond_umod_optab): New optabs.
17365         * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
17366         (IFN_COND_RDIV): New internal functions.
17367         * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
17368         TRUNC_MOD_EXPR and RDIV_EXPR.
17369         * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
17370         * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
17371         New unspecs.
17372         (SVE_INT_BINARY): Include mult.
17373         (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
17374         (optab, sve_int_op): Handle mult.
17375         (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
17376         UNSPEC_COND_DIV.
17377         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
17378         for SVE_INT_BINARY_SD.
17380 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17382         * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
17383         (optab, sve_int_op): Handle div and udiv.
17384         * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
17385         for SVE_INT_BINARY_SD.
17386         (*<optab><mode>3): New insn for the same.
17388 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17390         * tree-vect-patterns.c: Include predict.h.
17391         (vect_recog_divmod_pattern): Restrict check for division support
17392         to when optimizing for size.
17394 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17396         * doc/sourcebuild.texi (vect_double_cond_arith: Document.
17397         * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
17398         (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
17399         (gimple_match_op::set_op): Likewise.
17400         (gimple_resimplify4): Declare.
17401         * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
17402         (expr::gen_transform): Likewise.
17403         (decision_tree::gen): Generate a simplification routine for 4 operands.
17404         * gimple-match-head.c (gimple_simplify): Add an overload for
17405         4 operands.  In the top-level function, handle up to 4 call
17406         arguments and call gimple_resimplify4.
17407         (gimple_resimplify4): New function.
17408         (build_call_internal): Pass a fourth operand.
17409         (maybe_push_to_seq): Likewise.
17410         * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
17411         Fold VEC_COND_EXPRs of an operation and a default value into
17412         an IFN_COND_* function if possible.
17413         * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
17414         New unspecs.
17415         (SVE_COND_FP_BINARY): Include them.
17416         (optab, sve_fp_op): Handle them.
17417         (SVE_INT_BINARY_REV): New code iterator.
17418         (SVE_COND_FP_BINARY_REV): New int iterator.
17419         (commutative): New int attribute.
17420         * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
17421         Declare.
17422         * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
17423         function.
17424         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
17425         (*cond_<optab><mode>): New patterns for reversed operands.
17427 2018-05-25  Richard Biener  <rguenther@suse.de>
17429         * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
17430         (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
17431         (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
17432         (STMT_VINFO_GROUPED_ACCESS): Adjust.
17433         * tree-vect-data-refs.c (everywhere): Adjust users.
17434         * tree-vect-loop.c (everywhere): Likewise.
17435         * tree-vect-slp.c (everywhere): Likewise.
17436         * tree-vect-stmts.c (everywhere): Likewise.
17437         * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
17439 2018-05-25  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
17441         * configure.ac (gcc_cv_as_section_has_e): Move to common section.
17442         Rename to...
17443         (gcc_cv_as_section_exclude): ... this.
17444         Try Solaris as #exclude syntax.
17445         * configure: Regenerate.
17446         * config.in: Regenerate.
17447         * config/i386/i386.c (i386_solaris_elf_named_section): Handle
17448         SECTION_EXCLUDE.
17449         * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
17450         [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
17452         * varasm.c (default_elf_asm_named_section): Don't check if
17453         HAVE_GAS_SECTION_EXCLUDE is defined.
17455 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17457         * doc/md.texi: Update the documentation of the cond_* optabs
17458         to mention the new final operand.  Fix GET_MODE_NUNITS call.
17459         Describe the scalar case too.
17460         * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
17461         * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
17462         instead of 2.
17463         (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
17464         (get_conditional_internal_fn): Update comment.
17465         * tree-vect-loop.c (vectorizable_reduction): Pass the original
17466         accumulator value as a final argument to conditional functions.
17467         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
17468         a define_expand and add an "else" operand.  Assert for now that
17469         the else operand is equal to operand 2.  Use SVE_INT_BINARY and
17470         SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
17471         (*cond_<optab><mode>): New patterns.
17472         * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
17473         (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
17474         (UNSPEC_COND_EOR): Delete.
17475         (optab): Remove associated mappings.
17476         (SVE_INT_BINARY): New code iterator.
17477         (sve_int_op): Remove int attribute and add "minus" to the code
17478         attribute.
17479         (SVE_COND_INT_OP): Delete.
17480         (SVE_COND_FP_OP): Rename to...
17481         (SVE_COND_FP_BINARY): ...this.
17483 2018-05-25  Richard Sandiford  <richard.sandiford@linaro.org>
17485         * optabs.c (can_reuse_operands_p): New function.
17486         (maybe_legitimize_operands): Try to reuse the results for
17487         earlier operands.
17489 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
17491         * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
17492         Add {q} suffix to insn mnemonic.
17494 2018-05-23  Jozef Lawrynowicz  <jozef.l@mittosystems.com>
17496         * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
17497         (msp430_warn_func_return): New.
17499 2018-05-24  Roger Sayle  <roger@nextmovesoftware.com>
17501         * fold-const.c (tree_nonzero_bits): New function.
17502         * fold-const.h (tree_nonzero_bits): Likewise.
17503         * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
17504         friends.  POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
17506 2018-05-24  H.J. Lu  <hongjiu.lu@intel.com>
17508         PR target/85900
17509         PR target/85345
17510         * varasm.c (assemble_alias): Check ifunc_resolver only on
17511         FUNCTION_DECL.
17513 2018-05-24  Uros Bizjak  <ubizjak@gmail.com>
17515         PR target/85903
17516         * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
17517         when memory input operand is handled.
17519 2018-05-24  Luis Machado  <luis.machado@linaro.org>
17521         * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
17522         global.
17523         (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
17525 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
17527         * match.pd: Delay FMA folds until after vectorization.
17529 2018-05-24  Andre Vieira  <andre.simoesdiasvieira@arm.com>
17531         PR target/83009
17532         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
17533         address check not strict.
17535 2018-05-24  Richard Sandiford  <richard.sandiford@linaro.org>
17537         * gimple-match.h (gimple_match_op): New class.
17538         (mprts_hook): Replace parameters with a gimple_match_op *.
17539         (maybe_build_generic_op): Likewise.
17540         (gimple_simplified_result_is_gimple_val): Replace parameters with
17541         a const gimple_match_op *.
17542         (gimple_simplify): Replace code_helper * and tree * parameters with
17543         a gimple_match_op * parameter.
17544         (gimple_resimplify1): Replace code_helper *, tree and tree *
17545         parameters with a gimple_match_op * parameter.
17546         (gimple_resimplify2): Likewise.
17547         (gimple_resimplify3): Likewise.
17548         (maybe_push_res_to_seq): Replace code_helper, tree and tree *
17549         parameters with a gimple_match_op * parameter.
17550         * gimple-match-head.c (gimple_simplify): Change prototypes of
17551         auto-generated functions to take a gimple_match_op * instead of
17552         separate code_helper * and tree * parameters.  Make the same
17553         change in the top-level overload and update calls to the
17554         gimple_resimplify routines.  Update calls to the auto-generated
17555         functions and to maybe_push_res_to_seq in the publicly-facing
17556         operation-specific gimple_simplify overloads.
17557         (gimple_match_op::MAX_NUM_OPS): Define.
17558         (gimple_resimplify1): Replace rcode and ops with a single res_op
17559         parameter.  Update call to gimple_simplify.
17560         (gimple_resimplify2): Likewise.
17561         (gimple_resimplify3): Likewise.
17562         (mprts_hook): Replace parameters with a gimple_match_op *.
17563         (maybe_build_generic_op): Likewise.
17564         (build_call_internal): Replace type, nargs and ops with
17565         a gimple_match_op *.
17566         (maybe_push_res_to_seq): Replace res_code, type and ops parameters
17567         with a single gimple_match_op *.  Update calls to mprts_hook,
17568         build_call_internal and gimple_simplified_result_is_gimple_val.
17569         Factor out code that is common to the tree_code and combined_fn cases.
17570         * genmatch.c (expr::gen_transform): Replace tem_code and
17571         tem_ops with a gimple_match_op called tem_op.  Update calls
17572         to the gimple_resimplify functions and maybe_push_res_to_seq.
17573         (dt_simplify::gen_1): Manipulate res_op instead of res_code and
17574         res_ops.  Update call to the gimple_resimplify functions.
17575         (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
17576         (decision_tree::gen): Make the functions take a gimple_match_op *
17577         called res_op instead of separate res_code and res_ops parameters.
17578         Update call accordingly.
17579         * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
17580         and ops with a single res_op parameter.  Update calls to
17581         maybe_build_generic_op and maybe_push_res_to_seq.
17582         (fold_stmt_1): Update calls to gimple_simplify and
17583         replace_stmt_with_simplification.
17584         (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
17585         and gimple_simplified_result_is_gimple_val.
17586         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
17587         gimple_simplify.
17588         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
17589         with a gimple_match_op *.
17590         (vn_nary_build_or_lookup): Likewise.  Update call to
17591         vn_nary_build_or_lookup_1.
17592         (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
17593         gimple_match_op *.  Update calls to the gimple_resimplify routines
17594         and to gimple_simplified_result_is_gimple_val.
17595         (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
17596         Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
17597         (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
17598         (visit_nary_op): Likewise.
17599         (visit_reference_op_load): Likewise.
17601 2018-05-23  Luis Machado  <luis.machado@linaro.org>
17603         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
17604         modifier for printing the step amount.
17606 2018-05-23  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
17608         PR target/78849
17609         * tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
17610         types.
17612 2018-05-23  Segher Boessenkool  <segher@kernel.crashing.org>
17614         * doc/sourcebuild.texi (Endianness): New subsubsection.
17616 2018-05-23  Luis Machado  <luis.machado@linaro.org>
17618         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17619         <prefetch_dynamic_strides>: New const bool field.
17620         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17621         prefetch_dynamic_strides.
17622         (exynosm1_prefetch_tune): Likewise.
17623         (thunderxt88_prefetch_tune): Likewise.
17624         (thunderx_prefetch_tune): Likewise.
17625         (thunderx2t99_prefetch_tune): Likewise.
17626         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
17627         false.
17628         (aarch64_override_options_internal): Update to set
17629         PARAM_PREFETCH_DYNAMIC_STRIDES.
17630         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
17631         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
17632         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
17633         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
17634         prefetch-dynamic-strides setting.
17636 2018-05-23  Luis Machado  <luis.machado@linaro.org>
17638         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
17639         <minimum_stride>: New const int field.
17640         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
17641         minimum_stride field defaulting to -1.
17642         (exynosm1_prefetch_tune): Likewise.
17643         (thunderxt88_prefetch_tune): Likewise.
17644         (thunderx_prefetch_tune): Likewise.
17645         (thunderx2t99_prefetch_tune): Likewise.
17646         (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
17647         <default_opt_level>: Set to 3.
17648         (aarch64_override_options_internal): Update to set
17649         PARAM_PREFETCH_MINIMUM_STRIDE.
17650         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
17651         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
17652         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
17653         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
17654         stride is constant and is below the minimum stride threshold.
17656 2018-05-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17658         * config/arm/arm-cpus.in (mode26): Delete.
17659         (armv4): Delete mode26 reference.
17660         * config/arm/arm.c (arm_configure_build_target): Delete use of
17661         isa_bit_mode26.
17663 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
17665         * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
17666         New insn pattern.
17667         (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
17668         Rewrite expander pattern.  Emit gen_floatunssi<mode>2_i387_with_xmm
17669         for non-SSE modes.
17670         (floatunsdisf2): Rewrite expander pattern.  Hanlde TARGET_AVX512F.
17671         (floatunsdidf2): Ditto.
17673 2018-05-23  Uros Bizjak  <ubizjak@gmail.com>
17675         * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
17676         (fixuns_trunc<mode>si2_avx512f): Ditto.
17677         (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
17678         (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
17679         Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
17681 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
17683         PR rtl-optimization/79985
17684         * df-scan.c (df_insn_refs_collect): Remove special case for
17685         global registers and asm statements.
17687 2018-05-23  Alexander Monakov  <amonakov@ispras.ru>
17689         * extend.texi (Global Register Variables): Rewrite the bullet list.
17690         Note that the register is available for allocation. Note that access
17691         via inline asm must use constraints. Add note about async-signal
17692         handlers. Remove paragraph about automagic register selection.
17694 2018-05-23  Richard Biener  <rguenther@suse.de>
17696         * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
17697         of fixed offset from memset VN.
17699 2018-05-23  Bill Schmidt  <wschmidt@linux.ibm.com>
17701         * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
17702         first_interp field.
17703         (alloc_cand_and_find_basis): Initialize first_interp field.
17704         (slsr_process_mul): Modify first_interp field.
17705         (slsr_process_add): Likewise.
17706         (slsr_process_cast): Modify first_interp field for each new
17707         interpretation.
17708         (slsr_process_copy): Likewise.
17709         (dump_candidate): Dump first_interp field.
17710         (replace_mult_candidate): Process all interpretations, not just
17711         subsequent ones.
17712         (replace_rhs_if_not_dup): Likewise.
17713         (replace_one_candidate): Likewise.
17715 2018-05-23  Wilco Dijkstra  <wdijkstr@arm.com>
17717         * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
17718         Add new boolean.
17719         (aarch64_needs_frame_chain): New function.
17720         (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
17722 2018-05-23  Sudakshina Das  <sudi.das@arm.com>
17724         PR target/84882
17725         * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
17726         Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
17727         * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
17728         * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
17729         as true for strict-align.
17730         (aarch64_can_inline_p): Perform checks even when callee has no
17731         attributes to check for strict alignment.
17732         * doc/extend.texi (AArch64 Function Attributes): Document
17733         no-strict-align.
17734         * doc/invoke.texi: (AArch64 Options): Likewise.
17736 2018-05-23  Richard Sandiford  <richard.sandiford@linaro.org>
17738         PR tree-optimization/85853
17739         * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
17740         the handling of the root of the node to...
17741         (vect_slp_analyze_node_operations_1): ...this new function,
17742         and run the whole thing with the child nodes' def types
17743         set according to their SLP node's def type.
17745 2018-05-23  Richard Biener  <rguenther@suse.de>
17747         PR middle-end/85874
17748         * tree-data-ref.c (create_runtime_alias_checks): Defer
17749         and ignore overflow warnings.
17751 2018-05-23  Yury Gribov  <tetra2005@gmail.com>
17753         PR tree-optimization/85822
17754         * tree-vrp.c (is_masked_range_test): Fix handling of negative
17755         constants.
17757 2018-05-23  Richard Biener  <rguenther@suse.de>
17759         * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
17760         memset constants via native_interpret_expr.
17762 2018-05-22  H.J. Lu  <hongjiu.lu@intel.com>
17764         PR target/85345
17765         * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
17766         attribute.
17767         (cgraph_node::create_alias): Likewise.
17768         (cgraph_node::get_availability): Check ifunc_resolver instead
17769         of looking up ifunc attribute.
17770         * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
17771         * varasm.c (do_assemble_alias): Likewise.
17772         (assemble_alias): Likewise.
17773         (default_binds_local_p_3): Likewise.
17774         * cgraph.h (cgraph_node): Add ifunc_resolver.
17775         (cgraph_node::only_called_directly_or_aliased_p): Return false
17776         for IFUNC resolver.
17777         * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
17778         attribute.
17779         * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
17780         is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
17781         (symtab_node::binds_to_current_def_p): Check ifunc_resolver
17782         instead of looking up ifunc attribute.
17784 2018-05-22  Luis Machado  <luis.machado@linaro.org>
17786         * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
17788 2018-05-22  Martin Sebor  <msebor@redhat.com>
17790         PR middle-end/85359
17791         * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
17792         only when expasion succeeds.
17793         (expand_builtin_strcmp): Same.
17794         (expand_builtin_strncmp): Same.
17796 2018-05-22  Martin Sebor  <msebor@redhat.com>
17798         * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
17800 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
17801             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17803         * config/aarch64/aarch64-ldpstp.md: Replace uses of
17804         aarch64_mem_pair_operand with memory_operand and delete operand swapping
17805         code.
17806         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
17807         Add check for legitimate_address.
17808         (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
17809         (aarch64_swap_ldrstr_operands): New.
17810         * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
17811         Define prototype.
17813 2018-05-22  Jackson Woodruff  <jackson.woodruff@arm.com>
17814             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17816         * config/aarch64/aarch64.md: New patterns to generate stp
17817         and ldp.
17818         (store_pair_sw, store_pair_dw): New patterns to generate stp for
17819         single words and double words.
17820         (load_pair_sw, load_pair_dw): Likewise.
17821         (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
17822         Delete.
17823         (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
17824         Delete.
17825         * config/aarch64/aarch64-ldpstp.md: Modify peephole
17826         for different mode ldpstp and add peephole for merged zero stores.
17827         Likewise for loads.
17828         * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
17829         Add size check.
17830         (aarch64_gen_store_pair): Rename calls to match new patterns.
17831         (aarch64_gen_load_pair): Rename calls to match new patterns.
17832         * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
17833         (load_pair<DREG:mode><DREG2:mode>): ... This.
17834         (store_pair<mode>): Rename to...
17835         (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
17836         * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
17837         New mode iterators.
17838         (V_INT_EQUIV): Handle SImode.
17839         * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
17840         New predicate.
17842 2018-05-22  Martin Sebor  <msebor@redhat.com>
17844         PR c/85623
17845         * calls.c (maybe_warn_nonstring_arg): Use string length to set
17846         or ajust the presumed bound on an operation to avoid unnecessary
17847         warnings.
17849 2018-05-22  Martin Sebor  <msebor@redhat.com>
17851         PR tree-optimization/85826
17852         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
17853         assuming that a DECL necesarily has a constant size.
17855 2018-05-22  Richard Sandiford  <richard.sandiford@linaro.org>
17857         PR middle-end/85862
17858         * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
17860 2018-05-22  Richard Biener  <rguenther@suse.de>
17862         PR tree-optimization/85834
17863         * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
17864         non-constant and non-zero memset arguments.
17866 2018-05-22  Martin Liska  <mliska@suse.cz>
17868         PR ipa/85607
17869         * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
17871 2018-05-22  Richard Biener  <rguenther@suse.de>
17873         PR tree-optimization/85863
17874         * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
17875         comparisons when vectype is specified.
17876         (vectorizable_condition): Do not specify vectype for
17877         vect_is_simple_cond when SLP vectorizing.
17879 2018-05-21  Michael Meissner  <meissner@linux.ibm.com>
17881         PR target/85657
17882         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
17883         define __ibm128 as long double.
17884         * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
17885         as a distinct type when IEEE 128-bit support is enabled.
17886         (init_float128_ieee): Fix up conversions between IFmode and IEEE
17887         128-bit types to use the correct functions.
17888         (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
17889         convert between 128-bit floating point types that have different
17890         modes but the same representation, instead of using gen_lowpart to
17891         makean alias.
17892         * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
17893         KFmode.
17894         (IFKF_reg): New attributes to give the register constraints for
17895         IFmode and KFmode.
17896         (extend<mode>tf2_internal): New insns to mark an explicit
17897         conversion between 128-bit floating point types that have a
17898         different mode but share the same representation.
17900 2018-05-21  Richard Sandiford  <richard.sandiford@linaro.org>
17902         PR tree-optimization/85814
17903         * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
17904         a null return from get_strinfo when unsharing the next
17905         strinfo in the chain.
17907 2018-05-21  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
17909         PR gcc/84923
17910         * varasm.c (weak_finish): Clean up weak_decls.
17912 2018-05-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
17914         * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
17915         UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
17916         UNSPEC_UADALP values.
17917         * config/aarch64/iterators.md (ABAL): New int iterator.
17918         (ABDL2): Likewise.
17919         (ADALP): Likewise.
17920         (sur): Add mappings for the above.
17921         * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
17922         New define_insn.
17923         (aarch64_<sur>abal<mode>_4): Likewise.
17924         (aarch64_<sur>adalp<mode>_3): Likewise.
17925         (<sur>sadv16qi): New define_expand.
17927 2018-05-21  Alexander Nesterovskiy  <alexander.nesterovskiy@intel.com>
17929         * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
17930         (*movdf_internal): Ditto.
17931         (*rcpsf2_sse): Ditto.
17932         (*rsqrtsf2_sse): Ditto.
17933         (*sqrt<mode>2_sse): Ditto.
17935 2018-05-21  Tamar Christina  <tamar.christina@arm.com>
17937         * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
17938         eor3q<mode>4.
17939         (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
17940         * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
17941         veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
17942         vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
17943         vbcaxq_s64): New.
17944         * config/aarch64/arm_neon.h: Likewise.
17945         * config/aarch64/iterators.md (VQ_I): New.
17947 2018-05-21  Alexey Brodkin <abrodkin@synopsys.com>
17949         * config.gcc: Add arc/t-multilib-linux to tmake_file for
17950         arc*-*-linux*.
17951         * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
17952         MULTILIB_DIRNAMES
17954 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
17956         * config/nds32/constraints.md (S): New constraint.
17957         * config/nds32/nds32.md (call_internal): Use constraint S.
17958         (call_value_internal): Likewise.
17959         (sibcall_internal): Likewise.
17960         (sibcall_value_internal): Likewise.
17962 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
17963             Chung-Ju Wu  <jasonwucj@gmail.com>
17965         * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
17966         into consideration.
17968 2018-05-20  Kito Cheng  <kito.cheng@gmail.com>
17969             Chung-Ju Wu  <jasonwucj@gmail.com>
17971         * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
17972         (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
17973         (nds32_rtx_costs_impl): Simplify.
17974         (nds32_address_cost_impl): Simplify.
17975         (nds32_init_rtx_costs): New function.
17976         (nds32_rtx_costs_speed_prefer): Likewise.
17977         (nds32_rtx_costs_size_prefer): Likewise.
17978         (nds32_address_cost_speed_prefer): Likewise.
17979         (nds32_address_cost_speed_fwprop): Likewise.
17980         (nds32_address_cost_size_prefer): Likewise.
17981         * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
17982         * config/nds32/nds32.c (nds32_option_override): Use
17983         nds32_init_rtx_costs function.
17985 2018-05-20  Chung-Ju Wu  <jasonwucj@gmail.com>
17987         * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
17988         * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
17989         (TARGET_PIPELINE_N8): Likewise.
17990         (TARGET_PIPELINE_N10): Likewise.
17991         (TARGET_PIPELINE_N13): Likewise.
17992         (TARGET_PIPELINE_GRAYWOLF): Likewise.
17994 2018-05-19  Monk Chiang  <sh.chiang04@gmail.com>
17996         * config/nds32/nds32-fpu.md: Update copyright year.
17998 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18000         * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
18002 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18004         * config/nds32/nds32.c
18005         (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
18006         * config/nds32/nds32.opt (minline-asm-r15): New option.
18008 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18010         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
18011         MASK_HW_ABS.
18012         * config/nds32/nds32.md (abssi2): New pattern.
18014 2018-05-19  Uros Bizjak  <ubizjak@gmail.com>
18016         * config/i386/i386.md (rex64namesuffix): New mode attribute.
18017         * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
18018         Merge insn pattern from sse_cvtsi2ss<round_name> and
18019         sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
18020         (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
18021         from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
18022         using SWI48 mode iterator.
18023         (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
18024         sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
18025         (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
18026         pattern from sse_cvttss2si<round_saeonly_name>
18027         and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
18028         (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
18029         from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
18030         using SWI48 mode iterator.
18031         (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
18032         insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
18033         avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
18034         (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
18035         from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
18036         using SWI48 mode iterator.
18037         (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
18038         insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
18039         avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
18040         (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
18041         sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
18042         SWI48 mode iterator.
18043         (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
18044         sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
18045         (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
18046         pattern from sse_cvttsd2si<round_saeonly_name>
18047         and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
18049 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18051         * config/nds32/nds32-md-auxiliary.c
18052         (nds32_valid_smw_lwm_base_p): Refine.
18053         (nds32_output_smw_single_word): Refine.
18054         (nds32_output_smw_double_word): New.
18055         * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
18057 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18059         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
18060         (nds32_output_stack_pop): Refine.
18061         (nds32_expand_unaligned_load): Refine.
18062         (nds32_expand_unaligned_store): Refine.
18064 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
18065             Chung-Ju Wu  <jasonwucj@gmail.com>
18067         * config/nds32/constants.md: Add TP_REGNUM constant.
18068         (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
18069         UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
18070         UNSPEC_ADD32.
18071         * config/nds32/nds32-doubleword.md: Consider flag_pic.
18072         * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
18073         * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
18074         * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
18075         and PIC code generation.
18076         * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
18077         code generation.
18078         * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
18079         optimization.
18080         * config/nds32/nds32.md: Support TLS and PIC.
18081         * config/nds32/nds32.c: Support TLS and PIC.
18082         * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
18083         * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
18084         predicate.
18086 2018-05-19  Chung-Ju Wu  <jasonwucj@gmail.com>
18088         * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
18089         mode with E_ prefix.
18091 2018-05-19  Kuan-Lin Chen <kuanlinchentw@gmail.com>
18092             Chung-Ju Wu  <jasonwucj@gmail.com>
18094         * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
18095         * config/nds32/nds32-md-auxiliary.c
18096         (symbolic_reference_mentioned_p): New.
18097         (nds32_legitimize_ict_address): New.
18098         (nds32_expand_ict_move): New.
18099         (nds32_indirect_call_referenced_p): New.
18100         (nds32_symbol_binds_local_p): Delete.
18101         (nds32_long_call_p): Modify.
18102         * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
18103         * config/nds32/nds32-protos.h
18104         (symbolic_reference_mentioned_p): Declare.
18105         (nds32_legitimize_ict_address): Declare.
18106         (nds32_expand_ict_move): Declare.
18107         (nds32_indirect_call_referenced_p): Declare.
18108         * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
18109         (nds32_relax_group): Use nds32_ict_const_p as condition.
18110         * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
18111         (nds32_asm_file_start): Output ict_model directive in asm code.
18112         (nds32_legitimate_address_p): Consider indirect call.
18113         (nds32_print_operand): Consider indirect call.
18114         (nds32_print_operand_address): Consider indirect call.
18115         (nds32_insert_attributes): Handle "indirect_call" attribute.
18116         (TARGET_LEGITIMATE_ADDRESS_P): Define.
18117         (TARGET_LEGITIMATE_CONSTANT_P): Define.
18118         (TARGET_CANNOT_FORCE_CONST_MEM): Define.
18119         (TARGET_DELEGITIMIZE_ADDRESS): Define.
18120         (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
18121         * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
18122         (TARGET_ICT_MODEL_SMALL): Define.
18123         (TARGET_ICT_MODEL_LARGE): Define.
18124         * config/nds32/nds32.md (movsi): Consider ict model.
18125         (call, call_value): Consider ict model.
18126         (sibcall, sibcall_value): Consider ict model.
18127         * config/nds32/nds32.opt (mict-model): New option.
18128         * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
18129         model.
18131 2018-05-18  Kito Cheng  <kito.cheng@gmail.com>
18132             Monk Chiang  <sh.chiang04@gmail.com>
18133             Jim Wilson <jimw@sifive.com>
18135         * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
18136         Add support to parse rv32e*.  Clear MASK_RVE for rv32i and rv64i.
18137         * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
18138         * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
18139         __riscv_32e when TARGET_RVE.  Handle ABI_ILP32E as soft-float ABI.
18140         * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
18141         * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
18142         compute save_libcall_adjustment properly.
18143         (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
18144         (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
18145         * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
18146         (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
18147         (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
18148         (ABI_SPEC): Handle mabi=ilp32e.
18149         * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
18150         (RVE): Add RVE mask.
18151         * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
18152         <-march>: Add rv32e as an example.
18154 2018-05-18  Marc Glisse  <marc.glisse@inria.fr>
18156         PR c++/82899
18157         * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
18158         (intra_create_variable_infos): Handle C++ constructors.
18160 2018-05-18  Martin Liska  <mliska@suse.cz>
18162         * passes.def: Remove a redundant pass.
18164 2018-05-18  Eric Botcazou  <ebotcazou@adacore.com>
18166         PR bootstrap/85838
18167         * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
18169 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18171         * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
18172         (ARMv4): Update.
18173         (ARMv2, ARMv3, ARMv3m): Delete fgroups.
18174         (ARMv6m): Update.
18175         (armv2, armv2a, armv3, armv3m): Delete architectures.
18176         (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
18177         arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
18178         arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
18179         Delete cpus.
18180         * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
18181         (*mulsidi3adddi): Likewise.
18182         (mulsidi3): Likewise.
18183         (*mulsidi3_nov6): Likewise.
18184         (umulsidi3): Likewise.
18185         (umulsidi3_nov6): Likewise.
18186         (umaddsidi4): Likewise.
18187         (*umulsidi3adddi): Likewise.
18188         (smulsi3_highpart): Likewise.
18189         (*smulsi3_highpart_nov6): Likewise.
18190         (umulsi3_highpart): Likewise.
18191         (*umulsi3_highpart_nov6): Likewise.
18192         * config/arm/arm.h (arm_arch3m): Delete.
18193         * config/arm/arm.c (arm_arch3m): Delete.
18194         (arm_option_override_internal): Update armv3-related comment.
18195         (arm_configure_build_target): Delete use of isa_bit_mode32.
18196         (arm_option_reconfigure_globals): Delete set of arm_ach3m.
18197         (arm_rtx_costs_internal): Delete check of arm_arch3m.
18198         * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
18199         (mulsa3): Likewise.
18200         (mulusa3): Likewise.
18201         * config/arm/arm-protos.h (arm_arch3m): Delete.
18202         * config/arm/arm-tables.opt: Regenerate.
18203         * config/arm/arm-tune.md: Likewise.
18204         * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
18205         deleted architectures.
18207 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18209         * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
18210         (armv5t, armv5te): New features.
18211         (ARMv5, ARMv5e): Delete fgroups.
18212         (ARMv5t, ARMv5te): Adjust for above changes.
18213         (ARMv6m): Likewise.
18214         (armv5, armv5e): Delete arches.
18215         * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
18216         arm_arch5.
18217         (*call_reg_arm): Likewise.
18218         (*call_value_reg_armv5): Likewise.
18219         (*call_value_reg_arm): Likewise.
18220         (*call_symbol): Likewise.
18221         (*call_value_symbol): Likewise.
18222         (*sibcall_insn): Likewise.
18223         (*sibcall_value_insn): Likewise.
18224         (clzsi2): Likewise.
18225         (prefetch): Likewise.
18226         (define_split and define_peephole2 dependent on arm_arch5):
18227         Likewise.
18228         * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
18229         arm_arch5e.
18230         (TARGET_ARM_QBIT): Likewise.
18231         (TARGET_DSP_MULTIPLY): Likewise.
18232         (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
18233         (arm_arch5, arm_arch5e): Delete.
18234         (arm_arch5t, arm_arch5te): Declare.
18235         * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
18236         (arm_arch5t): Declare.
18237         (arm_option_reconfigure_globals): Update for the above.
18238         (arm_options_perform_arch_sanity_checks): Update comment, replace
18239         use of arm_arch5 with arm_arch5t.
18240         (use_return_insn): Likewise.
18241         (arm_emit_call_insn): Likewise.
18242         (output_return_instruction): Likewise.
18243         (arm_final_prescan_insn): Likewise.
18244         (arm_coproc_builtin_available): Likewise.
18245         * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
18246         arm_arch5e with arm_arch5t and arm_arch5te.
18247         * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
18248         (arm_arch5t, arm_arch5te): Declare.
18249         * config/arm/arm-tables.opt: Regenerate.
18250         * config/arm/t-arm-elf: Remove references to armv5, armv5e.
18251         * config/arm/t-multilib: Likewise.
18252         * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
18253         instead of arm_arch5.
18254         (*call_reg_thumb1): Likewise.
18255         (*call_value_reg_thumb1_v5): Likewise.
18256         (*call_value_reg_thumb1): Likewise.
18257         * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
18258         unreachable path.
18259         * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
18261 2018-05-18  Martin Liska  <mliska@suse.cz>
18263         PR gcov-profile/84846
18264         * doc/gcov.texi: Document -t option of gcov tool.
18266 2018-05-18  Martin Liska  <mliska@suse.cz>
18268         PR gcov-profile/84846
18269         * gcov.c (print_usage): Add new -t option.
18270         (process_args): Handle the option.
18271         (generate_results): Use stdout as output when requested by
18272         the option.
18274 2018-05-18  Martin Liska  <mliska@suse.cz>
18276         PR gcov-profile/84846
18277         * coverage.c (coverage_init): Write PWD to .gcno file.
18278         * doc/gcov.texi: Document how working directory is printed.
18279         * gcov-dump.c (dump_gcov_file): Print PWD.
18280         * gcov.c (output_intermediate_file): Likewise.
18281         (read_graph_file): Read PWD string.
18282         (output_lines): Print PWD.
18284 2018-05-18  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18286         PR middle-end/85817
18287         * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
18288         for retval and return false if all args to phi are zero.
18290 2018-05-18  Richard Biener  <rguenther@suse.de>
18292         * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
18293         method.
18294         (evrp_dom_walker::before_dom_children): Call it.
18296 2018-05-18  Richard Biener  <rguenther@suse.de>
18298         * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
18299         results when processing array refs with variable index.
18301 2018-05-18  Toon Moene  <toon@moene.org>
18303         * doc/invoke.texi: Move -floop-unroll-and-jam documentation
18304         directly after that of -floop-interchange. Indicate that both
18305         options are enabled by default when specifying -O3.
18307 2018-05-18  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18309         * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
18310         iterator.  Delete separate integer-mode vec_set<mode> expander.
18311         (aarch64_simd_vec_setv2di): Delete.
18312         (vec_setv2di): Delete.
18313         (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
18314         Use VALL_F16 mode iterator.  Add LD1 alternative and use vwcore for
18315         the "w, r" alternative.
18317 2018-05-18  Martin Liska  <mliska@suse.cz>
18319         * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
18320         * tree-pass.h (make_pass_lower_switch_O0): New function.
18321         * tree-switch-conversion.c (node_has_low_bound): Remove.
18322         (node_has_high_bound): Likewise.
18323         (node_is_bounded): Likewise.
18324         (class pass_lower_switch): Make it a template type and create
18325         two instances.
18326         (pass_lower_switch::execute): Add template argument.
18327         (make_pass_lower_switch): New function.
18328         (make_pass_lower_switch_O0): New function.
18329         (do_jump_if_equal): Remove.
18330         (emit_case_nodes): Simplify to just handle all 3 cases and leave
18331         all the hard work to tree optimization passes.
18333 2018-05-18  Martin Liska  <mliska@suse.cz>
18335         * dbgcnt.c (limit_low): Renamed from limit.
18336         (limit_high): New variable.
18337         (dbg_cnt_is_enabled): Check for upper limit.
18338         (dbg_cnt): Adjust dumping.
18339         (dbg_cnt_set_limit_by_index): Add new argument for high
18340         value.
18341         (dbg_cnt_set_limit_by_name): Likewise.
18342         (dbg_cnt_process_single_pair): Parse new format.
18343         (dbg_cnt_process_opt): Use strtok.
18344         (dbg_cnt_list_all_counters): Remove 'value' and add
18345         'limit_high'.
18346         * doc/invoke.texi: Document changes.
18348 2018-05-18  Richard Sandiford  <richard.sandiford@linaro.org>
18350         * doc/sourcebuild.texi (scalar_all_fma): Document.
18351         * tree.def (FMA_EXPR): Delete.
18352         * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
18353         * internal-fn.c (ternary_direct): New macro.
18354         (expand_ternary_optab_fn): Likewise.
18355         (direct_ternary_optab_supported_p): Likewise.
18356         * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
18357         * builtins.c (fold_builtin_fma): Delete.
18358         (fold_builtin_3): Don't call it.
18359         * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
18360         * expr.c (expand_expr_real_2): Likewise.
18361         * fold-const.c (operand_equal_p): Likewise.
18362         (fold_ternary_loc): Likewise.
18363         * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
18364         * gimple.c (DEFTREECODE): Likewise.
18365         * gimplify.c (gimplify_expr): Likewise.
18366         * optabs-tree.c (optab_for_tree_code): Likewise.
18367         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
18368         * tree-eh.c (operation_could_trap_p): Likewise.
18369         (stmt_could_throw_1_p): Likewise.
18370         * tree-inline.c (estimate_operator_cost): Likewise.
18371         * tree-pretty-print.c (dump_generic_node): Likewise.
18372         (op_code_prio): Likewise.
18373         * tree-ssa-loop-im.c (stmt_cost): Likewise.
18374         * tree-ssa-operands.c (get_expr_operands): Likewise.
18375         * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
18376         * fold-const-call.h (fold_fma): Delete.
18377         * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
18378         CFN_FNMA and CFN_FNMS.
18379         (fold_fma): Delete.
18380         * genmatch.c (combined_fn): New enum.
18381         (commutative_ternary_tree_code): Remove FMA_EXPR handling.
18382         (commutative_op): New function.
18383         (commutate): Use it.  Handle more than 2 operands.
18384         (dt_operand::gen_gimple_expr): Use commutative_op.
18385         (parser::parse_expr): Allow :c to be used with non-binary
18386         operators if the commutative operand is known.
18387         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
18388         CFN_FMS, CFN_FNMA and CFN_FNMS.
18389         (backprop::process_assign_use): Remove FMA_EXPR handling.
18390         * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
18391         (gen_hsa_fma): New function.
18392         (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
18393         IFN_FNMA and IFN_FNMS.
18394         * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
18395         * gimple-fold.h (follow_all_ssa_edges): Declare.
18396         * gimple-fold.c (follow_all_ssa_edges): New function.
18397         * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
18398         gimple_build interface and use follow_all_ssa_edges to fold the result.
18399         (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
18400         instead of checking for optabs directly.
18401         * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
18402         rather than FMA_EXPRs.
18403         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
18404         call to IFN_FMA instead of an FMA_EXPR.
18406 2018-05-17  Jim Wilson  <jimw@sifive.com>
18408         * expr.c (do_tablejump): When converting index to Pmode, if we have a
18409         sign extended promoted subreg, and the range does not have the sign bit
18410         set, then do a sign extend.
18412         * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
18413         test, check for sign extended subreg and/or constant operands, and
18414         do a sign extend in that case.
18416 2018-05-17  Steve Ellcey  <sellcey@cavium.com>
18418         * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
18419         (thunderx2t99_multiple): Delete psuedo-units from used cpus.
18420         Add untyped.
18421         (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
18422         Change logics_shift_reg to logics_shift_imm.
18423         (thunderx2t99_fp_loadpair_basic): Delete.
18424         (thunderx2t99_fp_storepair_basic): Delete.
18425         (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
18426         (thunderx2t99_asimd_polynomial): Delete.
18427         (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
18428         and neon_fp_mul_d_scalar_q.
18429         (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
18430         (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
18431         (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
18432         (thunderx2t99_asimd_lut): Add missing tbl types.
18433         (thunderx2t99_asimd_ext): Delete.
18434         (thunderx2t99_asimd_load1_1_mult): Delete.
18435         (thunderx2t99_asimd_load1_2_mult): Delete.
18436         (thunderx2t99_asimd_load1_ldp): New.
18437         (thunderx2t99_asimd_load1): New.
18438         (thunderx2t99_asimd_load2): Add missing *load2* types.
18439         (thunderx2t99_asimd_load3): New.
18440         (thunderx2t99_asimd_load4): New.
18441         (thunderx2t99_asimd_store1_1_mult): Delete.
18442         (thunderx2t99_asimd_store1_2_mult): Delete.
18443         (thunderx2t99_asimd_store2_mult): Delete.
18444         (thunderx2t99_asimd_store2_onelane): Delete.
18445         (thunderx2t99_asimd_store_stp): New.
18446         (thunderx2t99_asimd_store1): New.
18447         (thunderx2t99_asimd_store2): New.
18448         (thunderx2t99_asimd_store3): New.
18449         (thunderx2t99_asimd_store4): New.
18451 2018-05-17  Jerome Lambourg  <lambourg@adacore.com>
18453         * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
18454         #include <stdint.h>.  Replace intptr_t with __INTPTR_TYPE__.
18456 2018-05-17  Pat Haugen  <pthaugen@us.ibm.com>
18457             Segher Boessenkool  <segher@kernel.crashing.org>
18459         PR target/85698
18460         * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
18461         operand.
18463 2018-05-17  Richard Biener  <rguenther@suse.de>
18465         * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
18466         for pruning loop and prune defs feeding only already visited PHIs.
18468 2018-05-17  Richard Biener  <rguenther@suse.de>
18470         * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
18472 2018-05-17  Bin Cheng  <bin.cheng@arm.com>
18473             Richard Biener  <rguenther@suse.de>
18475         PR tree-optimization/85793
18476         * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
18477         for VMAT_ELEMENTWISE.
18479 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
18481         * internal-fn.h (lookup_internal_fn): Declare
18482         * internal-fn.c (lookup_internal_fn): New function.
18483         * gimple.c (gimple_build_call_from_tree): Handle calls to
18484         internal functions.
18485         * gimple-pretty-print.c (dump_gimple_call): Print "." before
18486         internal function names.
18487         * tree-pretty-print.c (dump_generic_node): Likewise.
18488         * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
18490 2018-05-17  Richard Sandiford  <richard.sandiford@linaro.org>
18492         * gimple-fold.h (gimple_build): Make the function forms take
18493         combined_fn rather than built_in_function.
18494         (gimple_simplify): Likewise.
18495         * gimple-match-head.c (gimple_simplify): Likewise.
18496         * gimple-fold.c (gimple_build): Likewise.
18497         * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
18498         rather than gimple_build_call_internal.
18499         (get_initial_defs_for_reduction): Likewise.
18500         (vect_create_epilog_for_reduction): Likewise.
18501         (vectorizable_live_operation): Likewise.
18503 2018-05-17  Martin Liska  <mliska@suse.cz>
18505         * gimple-ssa-sprintf.c (format_directive): Do not use
18506         space in between 'G_' and '('.
18508 2018-05-17  Jakub Jelinek  <jakub@redhat.com>
18510         PR target/85323
18511         * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
18512         even if the mask is not all ones.
18514         PR target/85323
18515         * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
18516         vector.
18517         (ix86_gimple_fold_builtin): Likewise.
18519         PR target/85323
18520         * config/i386/i386.c: Include tree-vector-builder.h.
18521         (ix86_vector_shift_count): New function.
18522         (ix86_fold_builtin): Fold shift builtins by scalar count.
18523         (ix86_gimple_fold_builtin): Likewise.
18525         * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
18526         _mm512_setzero): New intrinsics.
18528 2018-05-17  James Greenhalgh  <james.greenhalgh@arm.com>
18529             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18531         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
18532         code generation for cases where splatting a value is not useful.
18533         * simplify-rtx.c (simplify_ternary_operation): Simplify
18534         vec_merge across a vec_duplicate and a paradoxical subreg forming
18535         a vector mode to a vec_concat.
18537 2018-05-17  Olga Makhotina  <olga.makhotina@intel.com>
18539         * config.gcc: Support "goldmont-plus".
18540         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
18541         "goldmont-plus".
18542         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18543         PROCESSOR_GOLDMONT_PLUS.
18544         * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
18545         (processor_target_table): Add "goldmont-plus".
18546         (PTA_GOLDMONT_PLUS): Define.
18547         (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
18548         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
18549         (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
18550         (fold_builtin_cpu): Add "goldmont-plus".
18551         (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
18552         (ix86_option_override_internal): Add "goldmont-plus".
18553         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
18554         (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
18555         * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
18556         * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
18558 2018-05-17  Richard Biener  <rguenther@suse.de>
18560         PR tree-optimization/85757
18561         * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
18562         remove defs that only feed that PHI from further processing.
18564 2018-05-16  Jim Wilson  <jimw@sifive.com>
18566         * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
18567         asterisk to name.
18568         (<optab>di3_mask, <optab>di3_mask_1): Likewise.
18570 2018-05-16  Mark Wielaard  <mark@klomp.org>
18572         * dwarf2out.c (count_index_strings): New function.
18573         (output_indirect_strings): Call count_index_strings and generate
18574         header for dwarf_version >= 5.
18576 2018-05-16  Mark Wielaard  <mark@klomp.org>
18578         * dwarf2out.c (dwarf_FORM): New function.
18579         (set_indirect_string): Use dwarf_FORM.
18580         (reset_indirect_string): Likewise.
18581         (size_of_die): Likewise.
18582         (value_format): Likewise.
18583         (output_die): Likewise.
18584         (add_skeleton_AT_string): Likewise.
18585         (output_macinfo_op): Likewise.
18586         (index_string): Likewise.
18587         (output_index_string_offset): Likewise.
18588         (output_index_string): Likewise.
18589         (count_index_strings): Likewise.
18591 2018-05-16  Carl Love  <cel@us.ibm.com>
18593         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
18594         dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
18596 2018-05-16  Martin Jambor  <mjambor@suse.cz>
18598         * ipa-prop.c (ipa_free_all_edge_args): Remove.
18599         * ipa-prop.h (ipa_free_all_edge_args): Likewise.
18601 2018-05-16  Wilco Dijkstra  <wdijkstr@arm.com>
18603         * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
18604         (fnma<mode>4): Likewise.
18605         (fms<mode>4): Likewise.
18606         (fnms<mode>4): Likewise.
18607         (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
18608         (aarch64_fnma<mode>4): Likewise.
18609         (aarch64_fms<mode>4): Likewise.
18610         (aarch64_fnms<mode>4): Likewise.
18611         (aarch64_fnmadd<mode>4): Likewise.
18613 2018-05-16  Jason Merrill  <jason@redhat.com>
18615         * tree.c (warn_deprecated_use): Return bool.  Simplify logic.
18617 2018-05-16  Richard Biener  <rguenther@suse.de>
18619         * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
18620         (dump_stmt_cost): Declare.
18621         (add_stmt_cost): Dump cost we add.
18622         (add_stmt_costs): New function.
18623         (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
18624         No longer exported.
18625         (vect_analyze_stmt): Adjust prototype.
18626         (vectorizable_condition): Likewise.
18627         (vectorizable_live_operation): Likewise.
18628         (vectorizable_reduction): Likewise.
18629         (vectorizable_induction): Likewise.
18630         * tree-vect-loop.c (vect_analyze_loop_operations): Create local
18631         cost vector to pass to vectorizable_ and record afterwards.
18632         (vect_model_reduction_cost): Take cost vector argument and adjust.
18633         (vect_model_induction_cost): Likewise.
18634         (vectorizable_reduction): Likewise.
18635         (vectorizable_induction): Likewise.
18636         (vectorizable_live_operation): Likewise.
18637         * tree-vect-slp.c (vect_create_new_slp_node): Initialize
18638         SLP_TREE_NUMBER_OF_VEC_STMTS.
18639         (vect_analyze_slp_cost_1): Remove.
18640         (vect_analyze_slp_cost): Likewise.
18641         (vect_slp_analyze_node_operations): Take visited args and
18642         a target cost vector.  Avoid processing already visited stmt sets.
18643         (vect_slp_analyze_operations): Use a local cost vector to gather
18644         costs and register those of non-discarded instances.
18645         (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
18646         (vect_schedule_slp_instance): Remove copying of
18647         SLP_TREE_NUMBER_OF_VEC_STMTS.  Instead assert that it is not
18648         zero.
18649         * tree-vect-stmts.c (record_stmt_cost): Remove path directly
18650         adding cost.  Record cost entry location.
18651         (vect_prologue_cost_for_slp_op): Function to compute cost of
18652         a constant or invariant generated for SLP vect in the prologue,
18653         split out from vect_analyze_slp_cost_1.
18654         (vect_model_simple_cost): Make static.  Adjust for SLP costing.
18655         (vect_model_promotion_demotion_cost): Likewise.
18656         (vect_model_store_cost): Likewise, make static.
18657         (vect_model_load_cost): Likewise.
18658         (vectorizable_bswap): Add cost vector arg and adjust.
18659         (vectorizable_call): Likewise.
18660         (vectorizable_simd_clone_call): Likewise.
18661         (vectorizable_conversion): Likewise.
18662         (vectorizable_assignment): Likewise.
18663         (vectorizable_shift): Likewise.
18664         (vectorizable_operation): Likewise.
18665         (vectorizable_store): Likewise.
18666         (vectorizable_load): Likewise.
18667         (vectorizable_condition): Likewise.
18668         (vectorizable_comparison): Likewise.
18669         (can_vectorize_live_stmts): Likewise.
18670         (vect_analyze_stmt): Likewise.
18671         (vect_transform_stmt): Adjust calls to vectorizable_*.
18672         * tree-vectorizer.c: Include gimple-pretty-print.h.
18673         (dump_stmt_cost): New function.
18675 2018-05-16  Richard Biener  <rguenther@suse.de>
18677         * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
18678         * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
18679         * tree-ssa-dse.c: Include tree-ssa-loop.h.
18680         (check_name): New callback.
18681         (dse_classify_store): Track cycles via a visited bitmap of PHI
18682         defs and simplify handling of in-loop and across loop dead stores
18683         and properly fail for loop-variant refs.  Handle byte-tracking with
18684         multiple defs.  Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
18685         limiting the walk.
18687 2018-05-16  Richard Sandiford  <richard.sandiford@linaro.org>
18689         * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
18690         (vect_get_mask_type_for_stmt): Likewise.
18691         * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
18692         split out from...
18693         (vect_build_slp_tree_1): ...here.  Use vect_get_vector_types_for_stmt
18694         to determine the statement's vector type and the vector type that
18695         should be used for calculating nunits.  Deal with cases in which
18696         the type has to be deferred.
18697         (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
18698         and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
18699         * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
18700         (vect_determine_vf_for_stmt): New functions, split out from...
18701         (vect_determine_vectorization_factor): ...here.
18702         * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
18703         (vect_get_mask_type_for_stmt): New functions, split out from
18704         vect_determine_vectorization_factor.
18706 2018-05-16  Richard Biener  <rguenther@suse.de>
18708         * tree-cfg.c (verify_gimple_assign_ternary): Properly
18709         verify the [VEC_]COND_EXPR embedded comparison.
18711 2018-05-15  Martin Sebor  <msebor@redhat.com>
18713         PR tree-optimization/85753
18714         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
18715         RECORD_TYPE in addition to ARRAY_TYPE.
18717 2018-05-15  Martin Sebor  <msebor@redhat.com>
18719         PR middle-end/85643
18720         * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
18722 2018-05-15  Richard Biener  <rguenther@suse.de>
18724         * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
18725         add by_clobber_p one.  Change algorithm to collect all defs
18726         representing uses we need to walk and try reducing them to
18727         a single one before failing.
18728         (dse_dom_walker::dse_optimize_stmt): Adjust.
18730 2018-05-13  Mark Wielaard  <mark@klomp.org>
18732         * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
18733         (size_of_loc_descr): Likewise.
18734         (output_loc_operands): Likewise.
18735         (output_loc_operands_raw): Likewise.
18736         (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
18737         (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
18738         (hash_loc_operands): Likewise.
18739         (compare_loc_operands): Likewise.
18741 2018-05-14  Mark Wielaard  <mark@klomp.org>
18743         * dwarf2out.c (count_index_addrs): New function.
18744         (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
18746 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18748         PR tree-optimization/83648
18749         * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
18750         return value as malloc candidate.
18752 2018-05-15  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
18754         PR ipa/85734
18755         * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
18756         param as true in call to suggest_attribute.
18758 2018-05-14  Segher Boessenkool  <segher@kernel.crashing.org>
18760         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
18761         -mreadonly-in-sdata.
18763 2018-05-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
18765         * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
18766         New pattern.
18767         (aarch64_crypto_aesd_fused): Likewise.
18769 2018-05-14  Wilco Dijkstra  <wdijkstr@arm.com>
18771         * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
18772         (movsi_aarch64): Likewise.
18773         (load_pairsi): Likewise.
18774         (load_pairdi): Likewise.
18775         (store_pairsi): Likewise.
18776         (store_pairdi): Likewise.
18777         (load_pairsf): Likewise.
18778         (load_pairdf): Likewise.
18779         (store_pairsf): Likewise.
18780         (store_pairdf): Likewise.
18781         (zero_extend): Likewise.
18782         (trunc): Swap alternatives.
18783         (fcvt_target): Add '?' to prefer w over r.
18785 2018-05-14  Jakub Jelinek  <jakub@redhat.com>
18787         PR target/85756
18788         * config/i386/i386.md: Disallow non-commutative arithmetics in
18789         last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
18790         optimization.  Use COMMUTATIVE_ARITH_P test rather than != MINUS
18791         in the peephole2 before it.
18793 2018-05-14  Sebastian Peryt  <sebastian.peryt@intel.com>
18795         * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
18796         OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
18797         (ix86_handle_option): Handle -mcldemote.
18798         * config.gcc: New header.
18799         * config/i386/cldemoteintrin.h: New file.
18800         * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
18801         * config/i386/driver-i386.c (host_detect_local_cpu): Detect
18802         -mcldemote.
18803         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18804         OPTION_MASK_ISA_CLDEMOTE.
18805         * config/i386/i386.c (ix86_target_string): Add -mcldemote.
18806         (ix86_valid_target_attribute_inner_p): Ditto.
18807         (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
18808         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
18809         (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
18810         * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
18811         * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
18812         (cldemote): New.
18813         * config/i386/i386.opt: Add -mcldemote.
18814         * config/i386/x86intrin.h: New header.
18815         * doc/invoke.texi: Add -mcldemote.
18817 2018-05-14  Richard Biener  <rguenther@suse.de>
18819         * doc/match-and-simplify.texi: Adjust :s documentation.
18821 2018-05-14  Alexander Monakov  <amonakov@ispras.ru>
18823         * sort.cc (REORDER_23): Pass the type for the temporaries instead of
18824         intended memcpy size.
18825         (REORDER_45): Likewise.
18827 2018-05-13  Alexander Monakov  <amonakov@ispras.ru>
18829         * sort.cc: New file.
18830         * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
18831         * vec.c (qsort_chk): Use gcc_qsort.
18832         * Makefile.in (OBJS-libcommon): Add sort.o.
18833         (build/sort.o): New target.  Use it...
18834         (BUILD_RTL): ... here, and...
18835         (build/gencfn-macros): ... here, and...
18836         (build/genmatch): ... here.
18838 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
18839             Chung-Ju Wu  <jasonwucj@gmail.com>
18841         * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
18842         * config/nds32/nds32-graywolf.md: New file.
18843         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
18844         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
18845         pipeline.
18846         * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
18847         * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
18848         * config/nds32/nds32.md (pipeline_model): Add graywolf.
18849         * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
18850         * config/nds32/pipelines.md: Include n15 settings.
18852 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
18853             Chung-Ju Wu  <jasonwucj@gmail.com>
18855         * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
18856         * config/nds32/nds32-n13.md: New file.
18857         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
18858         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
18859         pipeline.
18860         * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
18861         * config/nds32/nds32.md (pipeline_model): Add n13.
18862         * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
18863         * config/nds32/pipelines.md: Include n13 settings.
18865 2018-05-13  Kito Cheng  <kito.cheng@gmail.com>
18866             Chung-Ju Wu  <jasonwucj@gmail.com>
18868         * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
18869         * config/nds32/nds32-n10.md: New file.
18870         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
18871         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
18872         pipeline.
18873         * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
18874         * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
18875         * config/nds32/nds32.md (pipeline_model): Add n10.
18876         * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
18877         * config/nds32/pipelines.md: Include n10 settings.
18879 2018-05-13  Monk Chiang  <sh.chiang04@gmail.com>
18880             Kito Cheng  <kito.cheng@gmail.com>
18881             Chung-Ju Wu  <jasonwucj@gmail.com>
18883         * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
18884         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
18885         Add enum values for DSP extension instructions.
18886         * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
18887         New constraints.
18888         * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
18889         sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
18890         New code iterators.
18891         (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
18892         * config/nds32/nds32-dspext.md: New file for DSP implementation.
18893         * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
18894         * config/nds32/nds32-intrinsic.md: Likewise.
18895         * config/nds32/nds32_intrinsic.h: Likewise.
18896         * config/nds32/nds32-md-auxiliary.c: Likewise.
18897         * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
18898         * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
18899         (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
18900         (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
18901         * config/nds32/nds32-protos.h: New declarations for DSP extension.
18902         * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
18903         TYPE_DMAC in switch statement.
18904         * config/nds32/nds32.c: New checking and implementation for DSP
18905         extension instructions.
18906         * config/nds32/nds32.h: Likewise.
18907         * config/nds32/nds32.md: Likewise.
18908         * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
18909         * config/nds32/predicates.md: Implement new predicates for DSP
18910         extension.
18912 2018-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
18914         * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
18915         Reformat alternatives and attributes so it is easier to identify
18916         which constraints/attributes go with which instruction.
18917         (mov<mode>_hardfloat32, FMOVE64): Likewise.
18918         (mov<mode>_softfloat32, FMOVE64): Likewise.
18919         (mov<mode>_hardfloat64, FMOVE64): Likewise.
18920         (mov<mode>_softfloat64, FMOVE64): Likewise.
18922 2018-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
18924         * doc/extend.texi (PowerPC Built-in Functions): Rename this
18925         subsection.
18926         (Basic PowerPC Built-in Functions): The new name of the
18927         subsection previously known as "PowerPC Built-in Functions".
18928         (Basic PowerPC Built-in Functions Available on all Configurations):
18929         New subsubsection.
18930         (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
18931         (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
18932         (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
18933         (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
18935 2018-05-11  Martin Jambor  <mjambor@suse.cz>
18937         PR ipa/85655
18938         * ipa-cp.c (intersect_with_plats): Check that the lattice contains
18939         single const.
18941 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
18943         PR target/85733
18944         * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
18946 2018-05-11  Sebastian Peryt  <sebastian.peryt@intel.com>
18948         * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
18949         OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
18950         (ix86_handle_option): Handle -mwaitpkg.
18951         * config.gcc: New header.
18952         * config/i386/cpuid.h (bit_WAITPKG): New bit.
18953         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
18954         * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
18955         function type.
18956         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
18957         OPTION_MASK_ISA_WAITPKG.
18958         * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
18959         (ix86_option_override_internal): Add PTA_WAITPKG.
18960         (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
18961         (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
18962         IX86_BUILTIN_TPAUSE.
18963         (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
18964         __builtin_ia32_umwait and __builtin_ia32_tpause.
18965         (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
18966         IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
18967         * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
18968         * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
18969         UNSPECV_TPAUSE): New.
18970         (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
18971         * config/i386/i386.opt: Add -mwaitpkg.
18972         * config/i386/waitpkgintrin.h: New file.
18973         * config/i386/x86intrin.h: New header.
18974         * doc/invoke.texi: Add -mwaitpkg.
18976 2018-05-11  Richard Earnshaw  <rearnsha@arm.com>
18978         PR target/85606
18979         * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
18980         equivalent.
18981         (cortex-m0): Use armv6s-m isa.
18982         (cortex-m0plus): Likewise.
18983         (cortex-m1): Likewise.
18984         (cortex-m0.small-multiply): Likewise.
18985         (cortex-m0plus.small-multiply): Likewise.
18986         (cortex-m1.small-multiply): Likewise.
18988 2018-05-11  Allan Sandfeld Jensen  <allan.jensen@qt.io>
18989             Jakub Jelinek  <jakub@redhat.com>
18991         PR tree-optimization/85692
18992         * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
18993         source permute as well.
18995 2018-05-11  Martin Liska  <mliska@suse.cz>
18997         PR sanitizer/85556
18998         * doc/extend.texi: Document LLVM style format for no_sanitize
18999         attribute.
19001 2018-05-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
19003         * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
19004         mode_supports_vsx_dform_quad to mode_supports_dq_form.
19005         (mode_supports_vsx_dform_quad): Likewise.
19006         (mode_supports_vmx_dform): Move these functions to be next to the
19007         other mode_supports functions.
19008         (mode_supports_dq_form): Likewise.
19009         (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
19010         mode_supports_dq_form.
19011         (reg_offset_addressing_ok_p): Likewise.
19012         (offsettable_ok_by_alignment): Likewise.
19013         (rs6000_legitimate_offset_address_p): Likewise.
19014         (legitimate_lo_sum_address_p): Likewise.
19015         (rs6000_legitimize_address): Likewise.
19016         (rs6000_legitimize_reload_address): Likewise.
19017         (rs6000_secondary_reload_inner): Likewise.
19018         (rs6000_preferred_reload_class): Likewise.
19019         (rs6000_output_move_128bit): Likewise.
19021 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
19023         * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
19024         Generate SImode target register for null target.
19025         <case IX86_BUILTIN_XGETBV>: Ditto.
19026         <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
19027         * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
19029 2018-05-10  Carl Love  <cel@us.ibm.com>
19031         * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
19032         dcbtt and dcbtstt if operands[2] is 0.
19034 2018-05-10  Uros Bizjak  <ubizjak@gmail.com>
19036         PR target/85693
19037         * config/i386/sse.md (usadv64qi): New expander.
19039 2018-05-10  Segher Boessenkool  <segher@kernel.crashing.org>
19041         * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
19042         altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
19043         -maltivec=be support.
19044         (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
19045         vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
19046         vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
19047         vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
19048         vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
19049         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
19050         altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
19051         altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
19052         altivec_vsumsws): Adjust.
19053         (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
19054         *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
19055         altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
19056         support.
19057         (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
19058         altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
19059         altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
19060         (altivec_lve<VI_char>x): Delete expand.
19061         (*altivec_lve<VI_char>x_internal): Rename to...
19062         (altivec_lve<VI_char>x): ... this.
19063         (altivec_lvxl_<mode>): Delete expand.
19064         (*altivec_lvxl_<mode>_internal): Rename to ...
19065         (altivec_lvxl_<mode>): ... this.
19066         (altivec_stvxl_<mode>): Delete expand.
19067         (*altivec_stvxl_<mode>_internal): Rename to ...
19068         (altivec_stvxl_<mode>): ... this.
19069         (altivec_stve<VI_char>x): Delete expand.
19070         (*altivec_stve<VI_char>x_internal): Rename to ...
19071         (altivec_stve<VI_char>x): ... this.
19072         (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
19073         doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
19074         reduc_plus_scal_<mode>): Adjust.
19075         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
19076         comment.
19077         (rs6000_cpu_cpp_builtins): Adjust.
19078         (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
19079         * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
19080         altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
19081         * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
19082         -maltivec=be support.
19083         (rs6000_split_vec_extract_var): Adjust.
19084         (rs6000_split_v4si_init): Adjust.
19085         (swap_selector_for_mode): Delete.
19086         (altivec_expand_lvx_be, altivec_expand_stvx_be,
19087         altivec_expand_stvex_be): Delete.
19088         (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
19089         -maltivec=be support.
19090         (rs6000_gimple_fold_builtin): Ditto.
19091         (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
19092         Adjust.
19093         * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
19094         (TARGET_DIRECT_MOVE_64BIT): Adjust.
19095         * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
19096         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
19097         * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
19098         unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
19099         vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
19100         *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
19101         *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
19102         *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
19103         anonymous split): Adjust.
19104         (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
19105         (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
19107 2018-05-10  Eric Botcazou  <ebotcazou@adacore.com>
19109         * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
19110         when --with-gxx-include-dir is also specified.
19111         * configure: Regenerate.
19113 2018-05-09  Jim Wilson  <jimw@sifive.com>
19115         PR target/84797
19116         * config.gcc (riscv*-*-*): Handle --with-multilib-list.
19117         * config/riscv/t-withmultilib: New.
19118         * config/riscv/withmultilib.h: New.
19119         * doc/install.texi: Document RISC-V --with-multilib-list support.
19121 2018-05-09  Richard Biener  <rguenther@suse.de>
19123         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
19124         vector.
19125         (vect_bb_vectorization_profitable_p): Adjust.  Compute
19126         actual scalar cost using the cost vector and the add_stmt_cost
19127         machinery.
19129 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
19131         PR rtl-optimization/85645
19132         * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
19133         in the REG_CFA_REGISTER note for LR, don't leave it empty.
19135 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
19137         PR rtl-optimization/85645
19138         * shrink-wrap.c (spread_components): Return a boolean saying if
19139         anything was changed.
19140         (try_shrink_wrapping_separate): Iterate spread_components until
19141         nothing changes anymore.
19143 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
19145         PR rtl-optimization/85645
19146         * regrename.c (build_def_use): Also kill the chains that include the
19147         destination of a REG_CFA_REGISTER note.
19149 2018-05-09  Segher Boessenkool  <segher@kernel.crashing.org>
19151         PR rtl-optimization/85645
19152         *  regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
19153         insn that has a REG_CFA_REGISTER note.
19155 2018-05-09  Richard Sandiford  <richard.sandiford@linaro.org>
19157         * cfgexpand.c (expand_clobber): New function.
19158         (expand_gimple_stmt_1): Use it.
19159         * tree-vect-stmts.c (vect_clobber_variable): New function,
19160         split out from...
19161         (vectorizable_simd_clone_call): ...here.
19162         (vectorizable_store): Emit a clobber either side of an
19163         IFN_STORE_LANES sequence.
19164         (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
19166 2018-05-09  Tom de Vries  <tom@codesourcery.com>
19168         PR target/85626
19169         * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
19170         (define_insn "trap_if_false"): Add exit after trap.
19172 2018-05-09  Eric Botcazou  <ebotcazou@adacore.com>
19174         PR rtl-optimization/85638
19175         * bb-reorder.c: Include common/common-target.h.
19176         (create_forwarder_block): New function extracted from...
19177         (fix_up_crossing_landing_pad): ...here.  Rename into...
19178         (dw2_fix_up_crossing_landing_pad): ...this.
19179         (sjlj_fix_up_crossing_landing_pad): New function.
19180         (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
19181         call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
19182         from both partitions and exit the loop after one iteration.
19184 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19186         Revert:
19187         * doc/extend.texi (PowerPC Built-in Functions): Rename this
19188         subsection.
19189         (Basic PowerPC Built-in Functions): The new name of the
19190         subsection previously known as "PowerPC Built-in Functions".
19191         (Basic PowerPC Built-in Functions Available on all Configurations):
19192         New subsubsection.
19193         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
19194         subsubsection.
19195         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
19196         subsubsection.
19197         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
19198         subsubsection.
19199         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
19200         subsubsection.
19202 2018-05-08  Jim Wilson  <jimw@sifive.com>
19204         * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
19205         (LD_EMUL_SUFFIX): New.
19206         (LINK_SPEC): Use it.
19208 2018-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
19210         * doc/extend.texi (PowerPC Built-in Functions): Rename this
19211         subsection.
19212         (Basic PowerPC Built-in Functions): The new name of the
19213         subsection previously known as "PowerPC Built-in Functions".
19214         (Basic PowerPC Built-in Functions Available on all Configurations):
19215         New subsubsection.
19216         (Basic PowerPC Built-in Functions Available on ISA 2.05): New
19217         subsubsection.
19218         (Basic PowerPC Built-in Functions Available on ISA 2.06): New
19219         subsubsection.
19220         (Basic PowerPC Built-in Functions Available on ISA 2.07): New
19221         subsubsection.
19222         (Basic PowerPC Built-in Functions Available on ISA 3.0): New
19223         subsubsection.
19225 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
19227         PR target/85683
19228         * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
19229         after cmpelim optimization.
19231 2018-05-08  Olga Makhotina  <olga.makhotina@intel.com>
19233         * config.gcc: Support "goldmont".
19234         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
19235         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
19236         PROCESSOR_GOLDMONT.
19237         * config/i386/i386.c (m_GOLDMONT): Define.
19238         (processor_target_table): Add "goldmont".
19239         (PTA_GOLDMONT): Define.
19240         (ix86_lea_outperforms): Add TARGET_GOLDMONT.
19241         (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
19242         (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
19243         (fold_builtin_cpu): Add "goldmont".
19244         (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
19245         (ix86_option_override_internal): Add "goldmont".
19246         * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
19247         (processor_type): Add PROCESSOR_GOLDMONT.
19248         * config/i386/i386.md: Add CPU "glm".
19249         * config/i386/glm.md: New file.
19250         * config/i386/x86-tune.def: Add m_GOLDMONT.
19251         * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
19253 2018-05-08  Jakub Jelinek  <jakub@redhat.com>
19255         PR target/85572
19256         * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
19257         E_V4DImode.
19258         * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
19259         VI1248_AVX512VL_AVX512BW.  Handle V2DImode and V4DImode if not
19260         TARGET_AVX512VL using ix86_expand_sse2_abs.  Formatting fixes.
19262         PR target/85317
19263         * config/i386/i386.c (ix86_fold_builtin): Handle
19264         IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
19266         PR target/85480
19267         * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
19268         (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
19270 2018-05-08  Richard Earnshaw  <rearnsha@arm.com>
19272         PR target/85658
19273         * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
19274         (check_arch): Likewise.
19275         (check_fpu): Return the result rather than printing it.
19276         (end arch): Fix operator precedence.
19277         (end cpu): Likewise.
19278         (END): Print the result from check_fpu.
19280 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
19281             Alan Hayward  <alan.hayward@arm.com>
19282             David Sherwood  <david.sherwood@arm.com>
19284         * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
19285         (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
19286         (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
19287         (*fcmuo<mode>_and): New patterns.
19289 2018-05-08  Richard Sandiford  <richard.sandiford@linaro.org>
19291         * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
19292         (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
19293         (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
19294         (cmp_op, sve_imm_con): New code attributes.
19295         (SVE_COND_INT_CMP, imm_con): Delete.
19296         (cmp_op): Remove above unspecs from int attribute.
19297         * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
19298         to...
19299         (*cmp<cmp_op><mode>): ...this.  Use UNSPEC_MERGE_PTRUE instead of
19300         comparison-specific unspecs.
19301         (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
19302         (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
19303         (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
19304         (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
19305         (*vec_fcm<cmp_op><mode>): Rename to...
19306         (*fcm<cmp_op><mode>): ...this and adjust likewise.
19307         (*vec_fcmuo<mode>): Rename to...
19308         (*fcmuo<mode>): ...this and adjust likewise.
19309         (*pred_fcm<cmp_op><mode>): New pattern.
19310         * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
19311         (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
19312         functions.
19313         (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
19314         and UNORDERED.
19315         (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
19316         (aarch64_emit_sve_predicated_cond): New function.
19317         (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
19318         (aarch64_emit_unspec_cond_or): Replace with...
19319         (aarch64_emit_sve_or_conds): ...this new function.  Use
19320         aarch64_emit_sve_ptrue_op for the individual comparisons and
19321         aarch64_emit_binop to OR them together.
19322         (aarch64_emit_inverted_unspec_cond): Replace with...
19323         (aarch64_emit_sve_inverted_cond): ...this new function.  Use
19324         aarch64_emit_sve_ptrue_op for the comparison and
19325         aarch64_emit_unop to invert the result.
19326         (aarch64_expand_sve_vec_cmp_float): Update after the above
19327         changes.  Use aarch64_emit_sve_ptrue_op for native comparisons.
19329 2018-05-07  Nathan Sidwell  <nathan@acm.org>
19331         * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
19332         * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
19333         (Backwards Compatibility): Likewise.
19335 2018-05-07  Luis Machado  <luis.machado@linaro.org>
19337         PR bootstrap/85681
19338         Revert:
19339         2018-05-07  Luis Machado  <luis.machado@linaro.org>
19341         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19342         <prefetch_dynamic_strides>: New const bool field.
19343         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19344         prefetch_dynamic_strides.
19345         (exynosm1_prefetch_tune): Likewise.
19346         (thunderxt88_prefetch_tune): Likewise.
19347         (thunderx_prefetch_tune): Likewise.
19348         (thunderx2t99_prefetch_tune): Likewise.
19349         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19350         to false.
19351         (aarch64_override_options_internal): Update to set
19352         PARAM_PREFETCH_DYNAMIC_STRIDES.
19353         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19354         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19355         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19356         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19357         prefetch-dynamic-strides setting.
19359         2018-05-07  Luis Machado  <luis.machado@linaro.org>
19361         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19362         <minimum_stride>: New const int field.
19363         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19364         minimum_stride field.
19365         (exynosm1_prefetch_tune): Likewise.
19366         (thunderxt88_prefetch_tune): Likewise.
19367         (thunderx_prefetch_tune): Likewise.
19368         (thunderx2t99_prefetch_tune): Likewise.
19369         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
19370         (aarch64_override_options_internal): Update to set
19371         PARAM_PREFETCH_MINIMUM_STRIDE.
19372         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19373         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19374         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19375         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19376         stride is constant and is below the minimum stride threshold.
19378 2018-05-07  Luis Machado  <luis.machado@linaro.org>
19380         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
19381         to 512.
19383 2018-05-07  Luis Machado  <luis.machado@linaro.org>
19385         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19386         <prefetch_dynamic_strides>: New const bool field.
19387         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19388         prefetch_dynamic_strides.
19389         (exynosm1_prefetch_tune): Likewise.
19390         (thunderxt88_prefetch_tune): Likewise.
19391         (thunderx_prefetch_tune): Likewise.
19392         (thunderx2t99_prefetch_tune): Likewise.
19393         (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
19394         to false.
19395         (aarch64_override_options_internal): Update to set
19396         PARAM_PREFETCH_DYNAMIC_STRIDES.
19397         * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
19398         * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
19399         * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
19400         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
19401         prefetch-dynamic-strides setting.
19403 2018-05-07  Luis Machado  <luis.machado@linaro.org>
19405         * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
19406         <minimum_stride>: New const int field.
19407         * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
19408         minimum_stride field.
19409         (exynosm1_prefetch_tune): Likewise.
19410         (thunderxt88_prefetch_tune): Likewise.
19411         (thunderx_prefetch_tune): Likewise.
19412         (thunderx2t99_prefetch_tune): Likewise.
19413         (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
19414         (aarch64_override_options_internal): Update to set
19415         PARAM_PREFETCH_MINIMUM_STRIDE.
19416         * doc/invoke.texi (prefetch-minimum-stride): Document new option.
19417         * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
19418         * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
19419         * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
19420         stride is constant and is below the minimum stride threshold.
19422 2018-05-06  Jakub Jelinek  <jakub@redhat.com>
19424         PR c++/85659
19425         * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
19426         the type is addressable.  Don't force op into register if it has
19427         BLKmode.
19429 2018-05-05  Roland McGrath  <mcgrathr@google.com>
19431         PR other/77609
19432         * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
19433         any section for which we don't know a specific type it should have,
19434         regardless of name.  Previously this was done only for the exact
19435         names ".init_array", ".fini_array", and ".preinit_array".
19436         (default_elf_asm_named_section): Add comment about
19437         relationship with default_section_type_flags and SECTION_NOTYPE.
19438         (get_section): Don't consider it a type conflict if one side has
19439         SECTION_NOTYPE and the other doesn't, as long as neither has the
19440         SECTION_BSS et al used in the default_section_type_flags logic.
19442 2018-05-05  Tom de Vries  <tom@codesourcery.com>
19444         PR target/85653
19445         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
19446         (workaround_barsyncs): New function.
19447         (nvptx_reorg): Use workaround_barsyncs.
19448         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
19449         (define_expand "nvptx_membar_cta"): New define_expand.
19450         (define_insn "*nvptx_membar_cta"): New insn.
19452 2018-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
19454         * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
19455         To improve optimization opportunities.
19456         * builtin-types.def: The new needed builtin types for the above.
19458 2018-05-04  Richard Biener  <rguenther@suse.de>
19460         * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
19461         * gimple-ssa-store-merging.c
19462         (imm_store_chain_info::output_merged_store): Remove redundant create,
19463         release split_store vector contents on failure.
19464         * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
19465         scalar stmt vector on cache hit.
19467 2018-05-04  Segher Boessenkool  <segher@kernel.crashing.org>
19469         * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
19470         Xilinx FP support.
19471         * config.gcc (powerpc-xilinx-eabi*): Remove.
19472         * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
19473         support.
19474         (fusion_addis_mem_combo_load): Ditto.
19475         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
19476         FP support.
19477         (rs6000_cpu_cpp_builtins): Ditto.
19478         * config/rs6000/rs6000-linux.c
19479         (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
19480         * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
19481         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
19482         support.
19483         (rs6000_setup_reg_addr_masks): Ditto.
19484         (rs6000_init_hard_regno_mode_ok): Ditto.
19485         (rs6000_option_override_internal): Ditto.
19486         (legitimate_lo_sum_address_p): Ditto.
19487         (rs6000_legitimize_address): Ditto.
19488         (rs6000_legitimize_reload_address): Ditto.
19489         (rs6000_legitimate_address_p): Ditto.
19490         (abi_v4_pass_in_fpr): Ditto.
19491         (setup_incoming_varargs): Ditto.
19492         (rs6000_gimplify_va_arg): Ditto.
19493         (rs6000_split_multireg_move): Ditto.
19494         (rs6000_savres_strategy): Ditto.
19495         (rs6000_emit_prologue_components): Ditto.
19496         (rs6000_emit_epilogue_components): Ditto.
19497         (rs6000_emit_prologue): Ditto.
19498         (rs6000_emit_epilogue): Ditto.
19499         (rs6000_elf_file_end): Ditto.
19500         (rs6000_function_value): Ditto.
19501         (rs6000_libcall_value): Ditto.
19502         * config/rs6000/rs6000.h: Ditto.
19503         (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
19504         (TARGET_MINMAX): ... this.  New.
19505         (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
19506         * config/rs6000/rs6000.md: Remove Xilinx FP support.
19507         (*movsi_internal1_single): Delete.
19508         * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
19509         mfpu=, mxilinx-fpu): Delete.
19510         * config/rs6000/singlefp.h: Delete.
19511         * config/rs6000/sysv4.h: Remove Xilinx FP support.
19512         * config/rs6000/t-rs6000: Ditto.
19513         * config/rs6000/t-xilinx: Delete.
19514         * config/rs6000/titan.md: Adjust for fp_type removal.
19515         * config/rs6000/vsx.md: Remove Xilinx FP support.
19516         (VStype_simple): Delete.
19517         (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
19518         * config/rs6000/xfpu.h: Delete.
19519         * config/rs6000/xfpu.md: Delete.
19520         * config/rs6000/xilinx.h: Delete.
19521         * config/rs6000/xilinx.opt: Delete.
19522         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove
19523         -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
19525 2018-05-04  Tom de Vries  <tom@codesourcery.com>
19527         PR libgomp/85639
19528         * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
19529         if ignore == 0.
19531 2018-05-04  Richard Biener  <rguenther@suse.de>
19533         PR middle-end/85627
19534         * tree-complex.c (update_complex_assignment): We are always in SSA form.
19535         (expand_complex_div_wide): Likewise.
19536         (expand_complex_operations_1): Likewise.
19537         (expand_complex_libcall): Preserve EH info of the original stmt.
19538         (tree_lower_complex): Handle removed blocks.
19539         * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
19540         on complex multiplication and division libcall builtins.
19542 2018-05-04  Richard Biener  <rguenther@suse.de>
19544         PR middle-end/85574
19545         * fold-const.c (negate_expr_p): Restrict negation of operand
19546         zero of a division to when we know that can happen without
19547         overflow.
19548         (fold_negate_expr_1): Likewise.
19550 2018-05-04  Jakub Jelinek  <jakub@redhat.com>
19552         PR libstdc++/85466
19553         * real.h (real_nextafter): Declare.
19554         * real.c (real_nextafter): New function.
19555         * fold-const-call.c (fold_const_nextafter): New function.
19556         (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
19557         CASE_CFN_NEXTTOWARD.
19558         (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
19559         even when arg1_mode is different from arg0_mode.
19561 2018-05-03  Nathan Sidwell  <nathan@acm.org>
19563         * doc/extend.texi (Deprecated Features): Remove
19564         -ffriend-injection.
19565         (Backwards Compatibility): Likewise.
19566         * doc/invoke.texi (C++ Language Options): Likewise.
19567         (C++ Dialect Options): Likewise.
19569 2018-05-03  Jakub Jelinek  <jakub@redhat.com>
19571         PR target/85530
19572         * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
19573         _mm512_mask_mullox_epi64): New intrinsics.
19575 2018-05-03  Tom de Vries  <tom@codesourcery.com>
19577         PR testsuite/85106
19578         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
19579         dump files): Add offload-tree.
19581 2018-05-03  Richard Biener  <rguenther@suse.de>
19583         PR tree-optimization/85615
19584         * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
19585         to loops not nested in BBs loop father to avoid creating multi-entry
19586         loops.
19588 2018-05-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
19590         PR tree-optimization/70291
19591         * tree-complex.c (expand_complex_libcall): Add type, inplace_p
19592         arguments.  Change return type to tree.  Emit libcall as a new
19593         statement rather than replacing existing one when inplace_p is true.
19594         (expand_complex_multiplication_components): New function.
19595         (expand_complex_multiplication): Expand floating-point complex
19596         multiplication using the above.
19597         (expand_complex_division): Rename inner_type parameter to type.
19598         Update expand_complex_libcall call-site.
19599         (expand_complex_operations_1): Update expand_complex_multiplication
19600         and expand_complex_division call-sites.
19602 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
19604         PR target/85582
19605         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
19606         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
19607         *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
19608         the highest significant bit of the shift count mask is clear.  In
19609         check whether and[sq]i3 is needed verify that all significant bits
19610         of the shift count other than the highest are set.
19612 2018-05-02  Tom de Vries  <tom@codesourcery.com>
19614         PR libgomp/82428
19615         * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
19616         * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
19617         (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
19618         * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
19619         (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
19620         * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
19621         __builtin_goacc_parlevel_size.
19623 2018-05-02  Richard Biener  <rguenther@suse.de>
19625         PR tree-optimization/85597
19626         * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
19627         do not use split vect_get_vec_defs call but call vect_get_slp_defs
19628         directly.
19630 2018-05-02  Tom de Vries  <tom@codesourcery.com>
19632         PR testsuite/85106
19633         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
19634         dump files): Add ltrans-tree.
19636 2018-05-02  Tom de Vries  <tom@codesourcery.com>
19638         PR testsuite/85106
19639         * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
19640         dump files): Add wpa-ipa.
19642 2018-05-02  Segher Boessenkool  <segher@kernel.crashing.org>
19644         * config.gcc (powerpc*-*-*): Remove paired.h.  Unsupport the
19645         powerpc*-*-linux*paired* target.
19646         * config/rs6000/750cl.h: Delete.
19647         * config/rs6000/paired.h: Delete.
19648         * config/rs6000/paired.md: Delete.
19649         * config/rs6000/predicates.md (easy_vector_constant): Remove paired
19650         float support.
19651         * config/rs6000/rs6000-builtin.def: Remove paired float support.
19652         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
19653         comment.  Remove paired float support.
19654         * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
19655         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
19656         VECTOR_PAIRED.
19657         * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
19658         paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
19659         declarations.
19660         * config/rs6000/rs6000.c: Remove paired float support.
19661         (paired_expand_vector_init, paired_expand_vector_move,
19662         paired_emit_vector_compare, paired_emit_vector_cond_expr,
19663         (paired_expand_lv_builtin, paired_expand_stv_builtin,
19664         paired_expand_builtin, paired_expand_predicate_builtin,
19665         paired_init_builtins): Delete.
19666         * config/rs6000/rs6000.h: Remove paired float support.
19667         * config/rs6000/rs6000.md: Remove paired float support.
19668         (move_from_CR_ov_bit): Delete.
19669         * config/rs6000/rs6000.opt (mpaired): Delete.
19670         * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
19671         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
19673 2018-05-02  Richard Biener  <rguenther@suse.de>
19675         PR middle-end/85567
19676         * gimplify.c (gimplify_save_expr): When in SSA form allow
19677         SAVE_EXPRs to compute to SSA vars.
19679 2018-05-02  Jakub Jelinek  <jakub@redhat.com>
19681         PR target/85582
19682         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
19683         *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
19684         *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
19685         clobber operands[2], instead use a new pseudo.  Formatting fixes.
19687 2018-05-02  Richard Sandiford  <richard.sandiford@linaro.org>
19689         PR tree-optimization/85586
19690         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
19691         exit early for statements in the same group if the accesses are
19692         not strided.
19694 2018-05-02  Tom de Vries  <tom@codesourcery.com>
19696         PR lto/85451
19697         * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
19698         error message.
19700 2018-05-01  Marc Glisse  <marc.glisse@inria.fr>
19702         PR tree-optimization/85143
19703         * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
19705 2018-05-01  Tom de Vries  <tom@codesourcery.com>
19707         PR lto/85451
19708         * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
19709         not found" error message.
19711 2018-05-01  Tom de Vries  <tom@codesourcery.com>
19713         PR other/83786
19714         * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
19715         * vec.c (test_ordered_remove_if): New function.
19716         (vec_c_tests): Call test_ordered_remove_if.
19717         * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
19718         * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
19719         * tree-vect-patterns.c (vect_pattern_recog_1): Use
19720         VEC_ORDERED_REMOVE_IF.
19722 2018-05-01  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
19724         PR tree-optimization/82665
19725         * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
19726         pointer subtraction where arguments come from a memchr call.
19728 2018-05-01  Jakub Jelinek  <jakub@redhat.com>
19730         * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
19731         --push-state --as-needed and --pop-state instead of --as-needed and
19732         --no-as-needed if ld supports it.
19733         * configure: Regenerated.
19735         PR web/85578
19736         * doc/install.texi2html: Replace _002d with - and _002a with * in
19737         generated html files using sed.
19739 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
19741         PR c++/85523
19742         * gcc-rich-location.c (blank_line_before_p): New function.
19743         (use_new_line): New function.
19744         (gcc_rich_location::add_fixit_insert_formatted): New function.
19745         * gcc-rich-location.h
19746         (gcc_rich_location::add_fixit_insert_formatted): New function.
19748 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
19750         * selftest.c (assert_streq): Rename "expected" and "actual" to
19751         "val1" and "val2".  Extend NULL-handling to cover both inputs
19752         symmetrically, while still requiring both to be non-NULL for a pass.
19753         * selftest.h (assert_streq): Rename "expected" and "actual" to
19754         "val1" and "val2".
19755         (ASSERT_EQ): Likewise.
19756         (ASSERT_EQ_AT): Likewise.
19757         (ASSERT_KNOWN_EQ): Likewise.
19758         (ASSERT_KNOWN_EQ_AT): Likewise.
19759         (ASSERT_NE): Likewise.
19760         (ASSERT_MAYBE_NE): Likewise.
19761         (ASSERT_MAYBE_NE_AT): Likewise.
19762         (ASSERT_STREQ): Likewise.  Clarify that both must be non-NULL for
19763         the assertion to pass.
19764         (ASSERT_STREQ_AT): Likewise.
19766 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
19768         * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
19769         interaction with -pie.
19771 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
19773         * selftest.h: Fix alphabetization of per-source-file selftest
19774         declarations.
19776 2018-04-30  Jason Merrill  <jason@redhat.com>
19778         PR c++/61982 - dead stores to destroyed objects.
19779         * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
19780         of clobber.
19782 2018-04-30  Jason Merrill  <jason@redhat.com>
19784         * tree.c (build_clobber): New.
19785         * tree.h: Declare it.
19786         * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
19788 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
19790         * diagnostic-show-locus.c (layout::layout): Update for
19791         location_get_source_line returning a char_span.
19792         (struct char_span): Move to input.h.
19793         (struct correction): Update for fields in char_span becoming
19794         private.
19795         (struct source_line): Update for location_get_source_line
19796         returning a char_span.
19797         (layout::print_line): Likewise.
19798         * edit-context.c (edited_file::print_content): Likewise.
19799         (edited_file::print_diff_hunk): Likewise.
19800         (edited_file::print_run_of_changed_lines): Likewise.
19801         (edited_file::get_num_lines): Likewise.
19802         (edited_line::edited_line): Likewise.
19803         * final.c (asm_show_source): Likewise.
19804         * input.c (location_get_source_line): Convert return type
19805         from const char * to char_span, losing the final "line_len"
19806         param.
19807         (dump_location_info): Update for the above.
19808         (get_substring_ranges_for_loc): Likewise.  Use a char_span
19809         when handling the literal within the line.
19810         (test_reading_source_line): Update for location_get_source_line
19811         returning a char_span.
19812         * input.h (class char_span): Move here from
19813         diagnostic-show-locus.c, converting from a struct to a class.
19814         Make data members private.
19815         (char_span::operator bool): New.
19816         (char_span::length): New.
19817         (char_span::get_buffer): New.
19818         (char_span::operator[]): New.
19819         (char_span::subspan): Make const.
19820         (char_span::xstrdup): New.
19821         (location_get_source_line): Convert return type from const char *
19822         to char_span, losing the final "line_size" param.
19824 2018-04-30  Jan Hubicka  <jh@suse.cz>
19826         * lto-wrapper.c (ltrans_priorities): New static var.
19827         (cmp_priority): New.
19828         (run_gcc): Read priorities and if doing parallel build order
19829         the Makefile by them.
19831 2018-04-30  David Malcolm  <dmalcolm@redhat.com>
19833         * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
19835 2018-04-30  Richard Biener  <rguenther@suse.de>
19837         * tree-cfg.c (verify_address): Remove base argument, add
19838         flag whether to check TREE_ADDRESSABLE and do that.
19839         (verify_expr): Remove.
19840         (verify_types_in_gimple_reference): Add pieces from verify_expr.
19841         (verify_gimple_assign_single): Likewise.
19842         (verify_gimple_switch): Likewise.
19843         (verify_expr_location_1): Dereference tp once.  Add (disabled)
19844         piece from verify_expr.
19845         (verify_gimple_in_cfg): Do not call verify_expr on all ops.
19847 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
19849         * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
19851 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
19853         * config/arc/arc-protos.h (prepare_extend_operands): Remove.
19854         (small_data_pattern): Likewise.
19855         (arc_rewrite_small_data): Likewise.
19856         * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
19857         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
19858         (get_symbol_alignment): New function.
19859         (legitimate_small_data_address_p): Likewise.
19860         (legitimate_scaled_address): Update, call
19861         legitimate_small_data_address_p.
19862         (output_sdata): New static variable.
19863         (arc_print_operand): Update how we handle small data operands.
19864         (arc_print_operand_address): Likewise.
19865         (arc_legitimate_address_p): Update, use
19866         legitimate_small_data_address_p.
19867         (arc_rewrite_small_data_p): Remove.
19868         (arc_rewrite_small_data_1): Likewise.
19869         (arc_rewrite_small_data): Likewise.
19870         (small_data_pattern): Likewise.
19871         (compact_sda_memory_operand): Update to use
19872         legitimate_small_data_address_p and get_symbol_alignment.
19873         (prepare_move_operands): Don't rewite sdata pattern.
19874         (prepare_extend_operands): Remove.
19875         * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
19876         pattern.
19877         (zero_extendqisi2): Likewise.
19878         (zero_extendhisi2): Likewise.
19879         (extendqihi2): Likewise.
19880         (extendqisi2): Likewise.
19881         (extendhisi2): Likewise.
19882         (addsi3): Likewise.
19883         (subsi3): Likewise.
19884         (andsi3): Likewise.
19885         * config/arc/constraints.md (Usd): Change it to memory constraint.
19887 2018-04-30  Claudiu Zissulescu  <claziss@synopsys.com>
19889         * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
19890         as source of std instructions.
19891         * config/arc/arc.md (movsi_insn): Update pattern predicate to
19892         allow 6-bit constants as source for store instructions.
19893         (movdi_insn): Update instruction pattern to allow 6-bit constants
19894         as source for store instructions.
19896 2018-04-30  Jonathan Wakely  <jwakely@redhat.com>
19898         * doc/invoke.texi (-fdebug-types-section): Fix grammar.
19900 2018-04-30  Nathan Sidwell  <nathan@acm.org>
19901             Sandra Loosemore <sandra@codesourcery.com>
19903         * dumpfile.c (dump_open): Allow '-' for stdout.
19904         * doc/invoke.texi (Developer Options): Document dump filename
19905         determination early.  Document stdin/stdout selection.
19907 2018-04-30  Andrew Sadek  <andrew.sadek.se@gmail.com>
19909         Microblaze Target: PIC data text relative
19911         * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
19912         * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
19913         Add declaration.
19914         * config/microblaze/microblaze.h (microblaze_constant_address_p):
19915         CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
19916         * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
19917         New addressing mode for data-text relative position indepenedent code.
19918         (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
19919         'ADDRESS_SYMBOLIC_TXT_REL'.
19920         (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
19921         (microblaze_legitimate_pic_operand): Exclude function calls from
19922         pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
19923         (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
19924         addresses cases.
19925         (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
19926         (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
19927         (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
19928         for 'address + offset'.
19929         (microblaze_expand_prologue): Add new function prologue call for
19930         'r20' assignation.
19931         (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
19932         'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
19933         table in case of TARGET_PIC_DATA_TEXT_REL.
19934         (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
19935         * config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
19936         Add new macros 'UNSPEC_TEXT',
19937         'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
19938         + exclude function calls from 'UNSPEC_PLT' in case of data text
19939         relative mode.
19940         * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
19941         new target hook for generating address diff vector tables in case of
19942         flag_pic.
19943         * doc/tm.texi : Regenerate.
19944         * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
19945         'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
19946         of addr diff vector generation.
19947         * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
19948         target hook definition.
19949         * targhooks.h, targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
19950         Add default function for generate_pic_addr_diff_vec -> flag_pic.
19951         * doc/invoke.texi (Add new pic option): Add new microblaze pic
19952         option for data text relative.
19954 2018-04-30  Richard Biener  <rguenther@suse.de>
19956         * tree-chrec.h (evolution_function_is_constant_p): Remove
19957         redundant check.
19958         * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
19960 2018-04-30  Richard Biener  <rguenther@suse.de>
19962         PR bootstrap/85571
19963         * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
19965 2018-04-30  Richard Biener  <rguenther@suse.de>
19967         PR tree-optimization/28364
19968         PR tree-optimization/85275
19969         * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
19970         copying first exit test.
19972 2018-04-28  Mark Wielaard  <mark@klomp.org>
19974         * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
19975         dwarf_version >= 5.
19976         (dwarf_AT): Handle DW_AT_addr_base.
19977         (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
19979 2018-04-28  Uros Bizjak  <ubizjak@gmail.com>
19981         PR target/84431
19982         * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
19983         (*ashl<dwi>3_doubleword_mask_1): Ditto.
19984         (*<shift_insn><dwi>3_doubleword_mask): Ditto.
19985         (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
19987 2018-04-28  Richard Biener  <rguenther@suse.de>
19989         * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
19990         (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
19991         to reflect use.  Only add interesting stmts.
19993 2018-04-27  Martin Jambor  <mjambor@suse.cz>
19995         PR ipa/85549
19996         * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
19997         the jump function allows for passing through aggregate values.
19999 2018-04-27  David Malcolm  <dmalcolm@redhat.com>
20001         * input.h (in_system_header_at): Convert from macro to inline
20002         function.
20003         (from_macro_expansion_at): Likewise.
20004         (from_macro_definition_at): Likewise.
20006 2018-04-27  Jeff Law  <law@redhat.com>
20008         * config.gcc: Mark tile* targets as deprecated/obsolete.
20010 2018-04-27  Richard Biener  <rguenther@suse.de>
20012         * config/aarch64/aarch64.c: Simplify ap.__stack advance and
20013         fix for ILP32.
20015 2018-04-27  Richard Biener  <rguenther@suse.de>
20017         * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
20019 2018-04-27  Uros Bizjak  <ubizjak@gmail.com>
20021         * config/i386/i386.md (*movti_internal): Substitute Ye constraint
20022         with Yd constraint. Set "preferred_for_speed" attribute from
20023         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
20024         with Yd constraint.
20025         (*movdi_internal): Ditto.
20026         (movti_interunit splitters): Remove
20027         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
20028         (movdi_interunit splitters): Ditto.
20029         * config/i386/constraints.md (Ye): Remove.
20030         (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
20032 2018-04-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20034         PR target/85512
20035         * config/aarch64/constraints.md (Usg): Limit to 31.
20036         (Usj): Limit to 63.
20038 2018-04-27  Jakub Jelinek  <jakub@redhat.com>
20040         PR tree-optimization/85529
20041         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
20042         argument.  Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
20043         rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
20044         zero extension or masking of the MSB bit.
20045         (optimize_range_tests): Add FIRST_BB argument, pass it through
20046         to optimize_range_tests_var_bound.
20047         (maybe_optimize_range_tests, reassociate_bb): Adjust
20048         optimize_range_tests callers.
20050 2018-04-26  Richard Biener  <rguenther@suse.de>
20051             Jakub Jelinek  <jakub@redhat.com>
20053         * cgraph.h (symbol_table): Just declare debug method here.
20054         * symtab.c (symbol_table::debug): Define.
20056 2018-04-26  Eric Botcazou  <ebotcazou@adacore.com>
20058         * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
20060 2018-04-26  Uros Bizjak  <ubizjak@gmail.com>
20062         * config/i386/i386.md ("isa" attribute): Add x64_sse2.
20063         ("enabled" attribute): Handle x64_sse2 "isa" attribute.
20064         (*movdi_internal): Substitute Yi and Yj constraint with x
20065         and Ym and Yn constraint with y constraint.  Update "isa"
20066         attribute and set "preferred_for_speed" attribute from
20067         TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
20068         (*movsi_internal): Ditto.
20069         (*movdf_internal): Ditto.
20070         (*movsf_internal): Ditto.
20071         (*zero_extendsidi2): Ditto.
20072         * config/i386/sse.md (vec_set<mode>_0): Ditto.
20073         (sse2_loadld): Ditto.
20074         (*vec_extract<ssevecmodelower>_0): Ditto.
20075         (*vec_extractv4si_0_zext_sse4): Ditto.
20076         (vec_concatv2di): Ditto.
20077         (*vec_dup<mode>): Ditto.
20078         * config/i386/mmx.md (*mov<mode>_internal): Ditto.
20079         * config/i386/constraints.md (Yi): Remove.
20080         (Yj): Remove.
20081         (Ym): Remove.
20082         (Yn): Remove.
20084 2018-04-26  Nathan Sidwell  <nathan@acm.org>
20086         * dumpfile.c (dump_open): New.
20087         (dump_open_alternate_stream, dump_start, dump_begin): Call it.
20088         (dump_finish): Detect stdio/stderr by value not name.
20090 2018-04-26  Jonathan Wakely  <jwakely@redhat.com>
20092         * doc/invoke.texi (-Wreturn-type): Document default status for C++.
20094 2018-04-26  Tom de Vries  <tom@codesourcery.com>
20096         PR target/84952
20097         * config/nvptx/nvptx.c (verify_neutering_jumps)
20098         (verify_neutering_labels): New function
20099         (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
20101 2018-04-26  Tom de Vries  <tom@codesourcery.com>
20103         PR target/84025
20104         * config/nvptx/nvptx.c (needs_neutering_p): New function.
20105         (nvptx_single): Use needs_neutering_p to skip over insns that do not
20106         need neutering.
20108 2018-04-26  Richard Biener <rguenther@suse.de>
20109             Tom de Vries  <tom@codesourcery.com>
20111         PR lto/85422
20112         * lto-streamer-out.c (output_function): Fixup loops if required to match
20113         discovery done in the reader.
20115 2018-04-26  Richard Biener  <rguenther@suse.de>
20117         PR tree-optimization/85116
20118         * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
20119         have a loop exit from the single latch predecessor.  Remove
20120         case of header with just condition.
20121         (ch_base::copy_headers): Exclude infinite loops from any
20122         processing.
20123         (pass_ch::execute): Record exits.
20125 2018-04-26  Richard Biener  <rguenther@suse.de>
20127         * tree-vect-data-refs.c (vect_get_data_access_cost): Get
20128         prologue cost vector and pass it to vect_get_load_cost.
20129         (vect_get_peeling_costs_all_drs): Likewise.
20130         (vect_peeling_hash_get_lowest_cost): Likewise.
20131         (vect_enhance_data_refs_alignment): Likewise.
20133 2018-04-26  Richard Biener  <rguenther@suse.de>
20135         PR middle-end/85450
20136         * tree-cfg.c (verify_gimple_assign_unary): Restore proper
20137         checking of integer<->pointer conversions.
20138         * omp-expand.c (expand_omp_for_static_nochunk): Avoid
20139         sign-/zero-extending pointer types.
20140         (expand_omp_for_static_chunk): Likewise.
20142 2018-03-22  Hans-Peter Nilsson  <hp@axis.com>
20143             Jean Lee  <xiaoyur347@gmail.com>
20145         * config/mips/mips.c (mips_asan_shadow_offset): New function.
20146         (TARGET_ASAN_SHADOW_OFFSET): Define.
20147         * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
20148         true for -fsanitize=address.
20150 2018-04-25  Mark Wielaard  <mark@klomp.org>
20152         * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
20153         shorter ones.
20155 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
20157         * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
20158         than "alu", remove explicit "memory" and "imm_disp" attributes.
20159         (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
20161         PR middle-end/85414
20162         * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
20163         case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
20164         gen_lowpart_no_emit.
20166 2018-04-25  Sebastian Peryt  <sebastian.peryt@intel.com>
20168         PR target/85473
20169         * config/i386/i386.c (ix86_expand_builtin): Change memory
20170         operand to XI, extend p0 to Pmode.
20171         * config/i386/i386.md: Change unspec volatile and operand
20172         1 mode to XI, change operand 0 mode to P.
20174 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
20176         * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
20177         GET_MODE_MASK before any checking.
20178         (nds32_can_use_bset_p): Likewise.
20179         (nds32_can_use_btgl_p): Likewise.
20181 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
20183         * config/nds32/nds32-doubleword.md: New define_split pattern for
20184         illegal register number.
20186 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
20188         * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
20190 2018-04-25  Chung-Ju Wu  <jasonwucj@gmail.com>
20192         * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
20194 2018-04-25  Richard Biener  <rguenther@suse.de>
20196         * lto-streamer.h (LTO_major_version): Bump to 8.
20198 2018-04-25  Jakub Jelinek  <jakub@redhat.com>
20200         * BASE-VER: Set to 9.0.0.
20202 2018-04-24  Segher Boessenkool  <segher@kernel.crashing.org>
20204         * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
20205         in __abskf2 and __powikf2.
20207 2018-04-24  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
20209         PR target/85512
20210         * config/aarch64/constraints.md (Usg, Usj): New constraints.
20211         * config/aarch64/iterators.md (cmode_simd): New mode attribute.
20212         * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
20213         Use the above on operand 2.  Reindent.
20214         (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
20216 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
20218         PR target/85485
20219         * common/config/i386/i386-common.c (ix86_handle_option): Don't
20220         handle OPT_mcet.
20221         * config/i386/i386.opt (mcet): Removed.
20222         * doc/install.texi: Remove -mcet documentation.
20223         * doc/invoke.texi: Likewise.
20225 2018-04-24  H.J. Lu  <hongjiu.lu@intel.com>
20227         PR target/85485
20228         * doc/install.texi: Remove -mcet from bootstrap-cet.
20230 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
20232         PR target/85511
20233         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
20234         __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
20235         if TARGET_64BIT.
20237         PR target/85503
20238         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
20239         const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
20240         containing a CONST_VECTOR.
20242 2018-04-24  Cesar Philippidis  <cesar@codesourcery.com>
20244         * doc/install.texi: Update newlib dependency for nvptx.
20246 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
20248         PR target/85508
20249         * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
20250         instead of INTVAL when shifting x left.
20252 2018-04-24  Andreas Krebbel  <krebbel@linux.ibm.com>
20254         PR tree-optimization/85478
20255         * tree-vect-loop.c (vect_analyze_loop_2): Do not call
20256         vect_grouped_store_supported for single element vectors.
20258 2018-04-24  Richard Biener  <rguenther@suse.de>
20260         PR target/85491
20261         * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
20262         load cost increase to the case of non-constant step.
20264 2018-04-24  Jakub Jelinek  <jakub@redhat.com>
20266         PR target/84828
20267         * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
20268         destination if any_malformed_asm.
20270 2018-04-23  Eric Botcazou  <ebotcazou@adacore.com>
20272         PR middle-end/85496
20273         * expr.c (store_field): In the bitfield case, if the value comes from
20274         a function call and is returned in registers by means of a PARALLEL,
20275         do not change the mode of the temporary unless BLKmode and VOIDmode.
20277 2018-04-23  Andrey Belevantsev  <abel@ispras.ru>
20279         PR rtl-optimization/85423
20280         * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
20281         dependencies to debug insns when the previous insn is non-debug.
20283 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
20285         * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
20286         enums into a single definition.
20287         (fls): Fix predicates and printing.
20288         (seti): Likewise.
20290 2018-04-23  Claudiu Zissulescu  <claziss@synopsys.com>
20292         * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
20293         * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
20294         and short u6 immediate.
20295         (check_if_valid_sleep_operand): Remove.
20296         * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
20298 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20300         * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
20301         flag_always_save_lp condition.
20302         * config/nds32/nds32.opt (malways-save-lp): New option.
20304 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
20306         * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
20307         * config/nds32/nds32.c (nds32_use_load_post_increment): New.
20308         * config/nds32/nds32.h
20309         (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
20310         (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
20312 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
20314         * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
20315         * config/nds32/nds32.c (nds32_ls_333_p): Remove.
20317 2018-04-22  Shiva Chen  <shiva0217@gmail.com>
20318             Chung-Ju Wu  <jasonwucj@gmail.com>
20320         * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
20321         Declare.
20322         * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
20323         * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
20325 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20327         * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
20329 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20331         * config/nds32/nds32-protos.h (nds32_data_alignment,
20332         nds32_local_alignment): Declare.
20333         * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
20334         nds32_local_alignment): New functions.
20335         (TARGET_CONSTANT_ALIGNMENT): Define.
20336         * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
20338 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20340         * config/nds32/nds32.c
20341         (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
20342         (TARGET_MODES_TIEABLE_P): Likewise.
20344 2018-04-22  Chung-Ju Wu  <jasonwucj@gmail.com>
20346         * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
20347         level Ofast and Og.
20349 2018-04-22  Monk Chiang  <sh.chiang04@gmail.com>
20350             Chung-Ju Wu  <jasonwucj@gmail.com>
20352         * config/nds32/constants.md (unspec_volatile_element): Add enum values
20353         for unaligned access.
20354         * config/nds32/nds32-intrinsic.c: Implementation of expanding
20355         unaligned access.
20356         * config/nds32/nds32-intrinsic.md: Likewise.
20357         * config/nds32/nds32_intrinsic.h: Likewise.
20358         * config/nds32/nds32.h (nds32_builtins): Likewise.
20359         * config/nds32/nds32.opt (munaligned-access): New option.
20360         * config/nds32/nds32.c (nds32_asm_file_start): Display
20361         flag_unaligned_access status.
20363 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
20365         * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
20366         -mno-relax is present.
20367         * config/riscv/linux.h (LINK_SPEC): Ditto.
20369 2018-04-20  Martin Sebor  <msebor@redhat.com>
20371         PR c/85365
20372         * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
20373         for null pointers.
20374         (gimple_fold_builtin_stxcpy_chk): Same.
20375         * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
20377 2018-04-20  Michael Meissner  <meissner@linux.ibm.com>
20379         PR target/85456
20380         * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
20381         __powikf2 when long double is IEEE 128-bit.
20383 2018-04-20  Kito Cheng  <kito.cheng@gmail.com>
20385         * config/riscv/riscv.c (riscv_first_stack_step): Round up min
20386         step to make sure stack always aligned.
20388 2018-04-20  Carl Love  <cel@us.ibm.com>
20390         PR target/83402
20391         * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
20392         size check for arg0.
20394 2018-04-20  Nathan Sidwell  <nathan@codesourcery.com>
20395             Tom de Vries  <tom@codesourcery.com>
20397         PR target/85445
20398         * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
20399         Emit insns for calls too.
20400         (nvptx_find_par): Always look for worker-level predecessor insn.
20401         (nvptx_propagate): Add is_call parm, return bool.  Copy frame for
20402         calls.
20403         (nvptx_vpropagate, nvptx_wpropagate): Adjust.
20404         (nvptx_process_pars): Propagate frames for calls.
20406 2018-04-20  H.J. Lu  <hongjiu.lu@intel.com>
20408         PR target/85469
20409         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
20410         Removed.
20411         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
20412         (ix86_handle_option): Don't handle OPT_mibt.
20413         * config/i386/cet.h: Check __CET__ instead of __IBT__ and
20414         __SHSTK__.
20415         * config/i386/driver-i386.c (host_detect_local_cpu): Remove
20416         has_ibt and ibt.
20417         * config/i386/i386-c.c (ix86_target_macros_internal): Don't
20418         check OPTION_MASK_ISA_IBT nor flag_cf_protection.
20419         (ix86_target_macros): Define __CET__ with flag_cf_protection
20420         for -fcf-protection.
20421         * config/i386/i386.c (isa2_opts): Remove -mibt.
20422         * config/i386/i386.h (TARGET_IBT): Removed.
20423         (TARGET_IBT_P): Likewise.
20424         (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
20425         * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
20426         * config/i386/i386.opt (mcet): Update help message.
20427         (mshstk): Likewise.
20428         (mibt): Removed.
20429         * doc/invoke.texi: Remove -mibt.  Document __CET__.  Document
20430         -mcet as an alias for -mshstk.
20432 2018-04-20  Richard Biener <rguenther@suse.de>
20434         PR middle-end/85475
20435         * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
20436         complexity by forcing a single use of the multiply operand.
20438 2018-04-20  Martin Jambor  <mjambor@suse.cz>
20440         ipa/85449
20441         * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
20442         recursion dependency to only apply to non-clones.
20444 2018-04-20  Martin Jambor  <mjambor@suse.cz>
20446         ipa/85447
20447         * ipa-cp.c (create_specialized_node): Check that clones of
20448         self-recursive edges exist during IPA-CP.
20450 2018-04-19  Toon Moene  <toon@moene.org>
20452         * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
20453         by -O3.
20455 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
20457         PR tree-optimization/85467
20458         * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
20459         VECTOR_TYPE_P macro.  If type is vector type, VIEW_CONVERT_EXPR the
20460         VECTOR_CST element to type.
20462 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
20464         PR target/85397
20465         * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
20466         * config/i386/i386.md (builtin_setjmp_setup): Removed.
20467         (builtin_longjmp): Likewise.
20468         (save_stack_nonlocal): New pattern.
20469         (restore_stack_nonlocal): Likewise.
20471 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
20473         PR target/85404
20474         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
20475         Replace ASM_OUTPUT_LABEL with fprintf.
20477 2018-04-19  H.J. Lu  <hongjiu.lu@intel.com>
20479         PR target/85417
20480         * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
20481         Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
20482         * config/i386/i386-c.c (ix86_target_macros_internal): Also
20483         define __IBT__ and __SHSTK__ for -fcf-protection.
20484         * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
20485         TARGET_IBT.
20486         (ix86_trampoline_init): Likewise.
20487         (x86_output_mi_thunk): Likewise.
20488         (ix86_notrack_prefixed_insn_p): Likewise.
20489         (ix86_option_override_internal): Don't disallow -fcf-protection.
20490         * config/i386/i386.md (rdssp<mode>): Also enable for
20491         -fcf-protection.
20492         (incssp<mode>): Likewise.
20493         (nop_endbr): Likewise.
20494         * config/i386/i386.opt (mcet): Change help message to built-in
20495         functions only.
20496         (mibt): Likewise.
20497         (mshstk): Likewise.
20498         * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
20499         on -fcf-protection.  Change -mcet, -mibt and -mshstk to only
20500         enable CET built-in functions.
20502 2018-04-19  Sebastian Peryt  <sebastian.peryt@intel.com>
20504         * common/config/i386/i386-common.c
20505         (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
20506         OPTION_MASK_ISA_MOVDIRI_UNSET,
20507         OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
20508         (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
20509         * config.gcc (movdirintrin.h): New header.
20510         * config/i386/cpuid.h (bit_MOVDIRI,
20511         bit_MOVDIR64B): New bits.
20512         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
20513         and -mmvodir64b.
20514         * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
20515         (VOID, PVOID, PCVOID)): New function types.
20516         * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
20517         __builtin_ia32_directstoreu_u64,
20518         __builtin_ia32_movdir64b): New builtins.
20519         * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
20520         * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
20521         and -mmovdiri.
20522         (ix86_valid_target_attribute_inner_p): Ditto.
20523         (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
20524         and VOID_FTYPE_PUNSIGNED_UNSIGNED.
20525         (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
20526         * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
20527         TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
20528         * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
20529         (movdiri<mode>, movdir64b_<mode>): New.
20530         * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
20531         * config/i386/immintrin.h: Include movdirintrin.h.
20532         * config/i386/movdirintrin.h: New file.
20533         * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
20535 2018-04-19  Richard Biener  <rguenther@suse.de>
20537         PR middle-end/85455
20538         * cfg.c (clear_bb_flags): When loop state says we have
20539         marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
20541 2018-04-19  Richard Biener  <rguenther@suse.de>
20543         PR tree-optimization/84737
20544         * tree-vect-data-refs.c (vect_copy_ref_info): New function
20545         copying restrict info.
20546         (vect_setup_realignment): Use it.
20547         * tree-vectorizer.h (vect_copy_ref_info): Declare.
20548         * tree-vect-stmts.c (vectorizable_store): Copy ref info from
20549         the first DR to all generated stores.
20550         (vectorizable_load): Likewise for loads.
20552 2018-04-19  Jakub Jelinek  <jakub@redhat.com>
20554         PR tree-optimization/85446
20555         * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
20556         the integral and pointer types to have the same precision.
20558         * doc/install.texi: Document --disable-cet being the default and
20559         --enable-cet=auto.
20561 2018-04-18  Martin Liska  <mliska@suse.cz>
20563         * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
20564         style.
20566 2018-04-18  Martin Liska  <mliska@suse.cz>
20568         Revert
20569         2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
20571         PR ipa/83983
20572         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
20573         arguments if they are comparable.
20575 2018-04-18  Martin Liska  <mliska@suse.cz>
20577         Revert
20578         2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
20580         PR lto/84805
20581         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
20582         incomplete types.
20584 2018-04-18  H.J. Lu  <hongjiu.lu@intel.com>
20586         PR target/85388
20587         * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
20588         ENDBR after calling __morestack.
20590 2018-04-18  David Malcolm  <dmalcolm@redhat.com>
20592         PR jit/85384
20593         * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
20594         by using gcc_base_ver to generate a gcc_driver_version, and use
20595         it when generating GCC_DRIVER_NAME.
20596         * configure: Regenerate.
20598 2018-04-18  Jakub Jelinek  <jakub@redhat.com>
20600         PR target/81084
20601         * config.gcc: Obsolete powerpc*-*-*spe*.
20603 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
20605         PR debug/84637
20606         * dbxout.c (dbxout_int): Perform negation in unsigned int type.
20607         (stabstr_D): Change type of unum from unsigned int to
20608         unsigned HOST_WIDE_INT.  Perform negation in unsigned HOST_WIDE_INT
20609         type.
20611 2018-04-17  Jim Wilson  <jimw@sifive.com>
20613         PR 84856
20614         * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
20615         RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
20616         Set arg_pointer_offset after using pretend_args_size.
20618 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
20620         PR rtl-optimization/85431
20621         * dse.c (record_store): Ignore zero width stores.
20623         PR sanitizer/85230
20624         * asan.c (handle_builtin_stack_restore): Adjust comment.  Emit
20625         __asan_allocas_unpoison call and last_alloca_addr = new_sp before
20626         __builtin_stack_restore rather than after it.
20627         * builtins.c (expand_asan_emit_allocas_unpoison): Pass
20628         arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
20629         argument instead of virtual_dynamic_stack_rtx.
20631 2018-04-17  Kelvin Nilsen  <kelvin@gcc.gnu.org>
20633         * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
20634         New prototype.
20635         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
20636         Add note to error message to explain internal mapping of overloaded
20637         built-in function name to non-overloaded built-in function name.
20638         * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
20639         function.
20641 2018-04-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
20643         PR target/85424
20644         * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
20645         where the inputs overlap with the output.
20647 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
20649         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
20650         (=v, v) alternative and explicit "memory" attribute.
20651         (vec_extract_lo_<mode><mask_name>): Likewise.  Also add
20652         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
20653         attributes.
20654         (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
20655         "sselog1" type instead of "sselog".
20656         (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
20657         "sselog".  Remove explicit "memory" attribute.
20658         (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
20659         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
20660         attributes.
20661         (vec_extract_hi_v32hi): Merge all alternatives into one, use
20662         "sselog1" type instead of "sselog".  Remove explicit "memory"
20663         attribute.
20664         (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
20665         use "sselog1" type instead of "sselog".  Remove explicit "memory"
20666         attribute.
20667         (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
20668         "type", "prefix", "prefix_extra", "length_immediate" and "mode"
20669         attributes.
20670         (vec_extract_hi_v64qi): Merge all alternatives into one, use
20671         "sselog1" type instead of "sselog".  Remove explicit "memory"
20672         attribute.
20673         (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
20674         use "sselog1" type instead of "sselog".  Remove explicit "memory"
20675         attribute.
20677         PR target/85430
20678         * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
20680         PR middle-end/85414
20681         * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
20682         on a SUBREG.
20684 2018-04-17  Martin Jambor  <mjambor@suse.cz>
20686         PR ipa/85421
20687         * ipa-cp.c (create_specialized_node): Call
20688         expand_all_artificial_thunks if necessary.
20690 2018-04-17  Martin Liska  <mliska@suse.cz>
20692         PR lto/85405
20693         * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
20694         in message, remote space in between '_G' and '('.
20696 2018-04-17  Jakub Jelinek  <jakub@redhat.com>
20698         PR target/85281
20699         * config/i386/sse.md (reduces<mode><mask_scalar_name>,
20700         avx512f_vmcmp<mode>3<round_saeonly_name>,
20701         avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
20702         avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
20703         avx512f_rndscale<mode><round_saeonly_name>,
20704         avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
20705         avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
20706         Use %<iptr>2 instead of %2 for -masm=intel.
20707         (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
20708         avx512f_vcvttss2usi<round_saeonly_name>,
20709         avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
20710         -masm=intel.
20711         (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
20712         avx512f_vcvttsd2usi<round_saeonly_name>,
20713         avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
20714         Use %q1 instead of %1 for -masm=intel.
20715         (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
20716         avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
20717         of %3 for -masm=intel.
20718         (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
20719         -masm=intel.
20720         (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
20721         -masm=intel.
20722         (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
20723         -masm=intel.
20724         (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
20725         %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
20726         %g1.
20727         (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
20728         -masm=intel.
20729         (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
20730         %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
20731         %g1 and one with %0 and %1.
20732         (avx512er_vmrcp28<mode><round_saeonly_name>,
20733         avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
20734         %1 for -masm=intel.
20735         (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
20736         avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
20737         avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
20738         of %0 and %{%4%} for -masm=intel.
20739         (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
20740         avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
20741         avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
20742         order of %0 and %{%5%}%{z%} for -masm=intel.
20744 2018-04-17  Jan Hubicka  <jh@suse.cz>
20746         PR lto/85405
20747         * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
20749 2018-04-17  Martin Liska  <mliska@suse.cz>
20751         PR ipa/85329
20752         * multiple_target.c (create_dispatcher_calls): Set apostrophes
20753         for target_clone error message.  Make default implementation
20754         clone to be a local declaration.
20755         (separate_attrs): Add new argument and check for an empty
20756         string.
20757         (expand_target_clones): Handle it.
20758         (ipa_target_clone): Make redirection just for target_clones
20759         functions.
20761 2018-04-16  Cesar Philippidis  <cesar@codesourcery.com>
20762             Tom de Vries  <tom@codesourcery.com>
20764         PR middle-end/84955
20765         * omp-expand.c (expand_oacc_for): Add dummy false branch for
20766         tiled basic blocks without omp continue statements.
20768 2018-04-16  Aaron Sawdey  <acsawdey@linux.ibm.com>
20770         PR target/83660
20771         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
20772         vec_extract expression as having side effects to make sure it gets
20773         a cleanup point.
20775 2018-04-16  H.J. Lu  <hongjiu.lu@intel.com>
20777         PR target/85403
20778         * config/i386/i386.c (get_builtin_code_for_version): Check
20779         error_mark_node.
20781 2018-04-16  Olga Makhotina  <olga.makhotina@intel.com>
20783         PR target/84331
20784         * config.gcc: Support "skylake".
20785         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
20786         PROCESSOR_SKYLAKE.
20787         * config/i386/i386.c (m_SKYLAKE): Define.
20788         (processor_target_table): Add "skylake".
20789         (ix86_option_override_internal): Add "skylake".
20790         (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
20791         PROCESSOR_CANNONLAKE.
20792         (get_builtin_code_for_version): Fix priority for
20793         PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
20794         PROCESSOR_SKYLAKE-AVX512.
20795         * config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
20796         (processor_type): Add PROCESSOR_SKYLAKE.
20798 2018-04-16  Paolo Carlini  <paolo.carlini@oracle.com>
20799             Jason Merrill  <jason@redhat.com>
20801         PR c++/85112
20802         * convert.c (convert_to_integer_1): Use direct recursion for
20803         enumeral types and types with a precision less than the number
20804         of bits in their mode.
20806 2018-04-16  Julia Koval  <julia.koval@intel.com>
20808         PR target/84413
20809         * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
20810         X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
20812 2018-04-14  Segher Boessenkool  <segher@kernel.crashing.org>
20814         PR target/85293
20815         * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
20816         * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
20817         and -mno-direct-move.
20819 2018-04-13  Paul A. Clarke  <pc@us.ibm.com>
20821         PR target/83402
20822         * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
20823         Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
20824         Ensure negative shifts result in {0}.
20826 2018-04-13  Vladimir Makarov  <vmakarov@redhat.com>
20828         PR rtl-optimization/79916
20829         * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
20830         regs (if any) to define how to gnerate SD moves when LRA is in
20831         progress.
20833 2018-04-13  Jakub Jelinek  <jakub@redhat.com>
20835         PR rtl-optimization/85393
20836         * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
20837         * except.c (expand_dw2_landing_pad_for_region): Make static.
20838         * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
20839         a label and unconditional jump to old_bb, rather than
20840         expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
20841         basic block.
20843         PR rtl-optimization/85376
20844         * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
20845         zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
20846         instead of a specific value.
20848 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
20849             Bin Cheng  <bin.cheng@arm.com>
20851         PR tree-optimization/82965
20852         PR tree-optimization/83991
20853         * cfgloopanal.c (expected_loop_iterations_unbounded): Add
20854         by_profile_only parameter.
20855         * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
20856         information if the loop was predicted to iterate too many times.
20857         * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
20859 2018-04-13  Jan Hubicka  <hubicka@ucw.cz>
20861         PR lto/71991
20862         * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
20863         always inline.
20865 2018-04-13  Martin Liska  <mliska@suse.cz>
20866             Jakub Jelinek  <jakub@redhat.com>
20868         PR middle-end/81657
20869         * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
20870         * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
20871         * builtins.c (expand_builtin_memory_copy_args): Use
20872         BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
20873         handle dest_addr == pc_rtx.
20875 2018-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
20877         PR target/85291
20878         * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
20879         asked to not generate direct moves.
20880         (fix_trunc<mode>si2_stfiwx): Similar.
20881         (fix_trunc<mode>si2_internal): Similar.
20883 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
20885         PR debug/83157
20886         * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
20887         * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
20888         lookup if dest in some wider mode is known to be const0_rtx and
20889         if so, record permanent equivalence for it to be ZERO_EXTEND of
20890         the narrower mode destination.
20892 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
20894         * lto-streamer-out.c (output_function): Revert 259346.
20895         * omp-expand.c (expand_oacc_for): Likewise.
20897 2018-04-12  Alexander Monakov  <amonakov@ispras.ru>
20899         PR rtl-optimization/85354
20900         * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
20901         * sel-sched.c (sel_global_init): ... here.
20903 2018-04-12  Eric Botcazou  <ebotcazou@adacore.com>
20905         PR target/85238
20906         * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
20907         * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
20908         mode for PE-COFF targets.
20909         * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
20910         (i386_pe_asm_lto_end): Likewise.
20911         * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
20912         (TARGET_ASM_LTO_END): Likewise.
20913         * config/i386/winnt.c (saved_debug_info_level): New static variable.
20914         (i386_pe_asm_lto_start): New function.
20915         (i386_pe_asm_lto_end): Likewise.
20917 2018-04-12  Cesar Philippidis  <cesar@codesourcery.com>
20918             Richard Biener  <rguenther@suse.de>
20920         PR middle-end/84955
20921         * lto-streamer-out.c (output_function): Fix CFG loop state before
20922         streaming out.
20923         * omp-expand.c (expand_oacc_for): Handle calls to internal
20924         functions like regular functions.
20926 2018-04-12  Richard Biener  <rguenther@suse.de>
20928         PR lto/85371
20929         * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
20930         for the early LTO debug to properly generate references to it
20931         during DIE emission.  Do not re-use that for the skeleton for
20932         split-dwarf.
20933         (dwarf2out_early_finish): Likewise.
20935 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
20937         PR target/85328
20938         * config/i386/sse.md
20939         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
20940         <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
20941         vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
20942         vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
20943         and output is a reg, avoid creating invalid lowpart subreg, but
20944         instead split into a 512-bit move.  Don't split if not AVX512VL,
20945         input is xmm16+ reg and output is a mem.
20946         (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
20947         vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
20948         xmm16+ reg and output is a mem.
20950 2018-04-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
20952         * config/s390/s390.c (s390_output_indirect_thunk_function): Check
20953         also for flag_dwarf2_cfi_asm.
20955 2018-04-12  Jakub Jelinek  <jakub@redhat.com>
20957         PR rtl-optimization/85342
20958         * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
20959         a bool scalar var inside of the loop instead.  Don't try to update
20960         recog_data.operand after failed apply_change_group.
20962 2018-04-12  Tom de Vries  <tom@codesourcery.com>
20964         PR target/85296
20965         * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
20966         (nvptx_assemble_decl_begin): Add undefined param.  Declare undefined
20967         array with flexible array member as array without given dimension.
20968         (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
20969         argument for undefined param to true.
20971 2018-04-11  Aaron Sawdey  <acsawdey@linux.ibm.com>
20973         PR target/85321
20974         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
20975         -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
20976         from PowerPC section.
20977         * config/rs6000/sysv4.opt (mcall-): Improve help text.
20978         * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
20979         help text that is too long.
20980         * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
20981         help text that is too long.
20982         * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
20983         help text that is too long.
20985 2018-04-11  Uros Bizjak  <ubizjak@gmail.com>
20987         * config/alpha/alpha.md (stack_probe_internal): Rename
20988         from "probe_stack".  Update all callers.
20990 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
20992         PR rtl-optimization/84566
20993         * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
20994         sched_macro_fuse_insns.
20996 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
20998         PR target/84301
20999         * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
21000         (compute_block_dependences): ... from here.
21002 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
21004         PR tree-optimization/85331
21005         * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
21006         from int to HOST_WIDE_INT.
21008 2018-04-11  Martin Jambor  <mjambor@suse.cz>
21010         PR ipa/84149
21011         * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
21012         (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
21013         not the same as the source val.
21014         (cgraph_edge_brings_value_p): New parameter.
21015         (gather_edges_for_value): Pass destination value to
21016         cgraph_edge_brings_value_p.
21017         (perhaps_add_new_callers): Likewise.
21018         (get_info_about_necessary_edges): Likewise and exclude values brought
21019         only by self-recursive edges.
21020         (create_specialized_node): Redirect only clones of self-calling edges.
21021         (+self_recursive_pass_through_p): New function.
21022         (find_more_scalar_values_for_callers_subset): Use it.
21023         (find_aggregate_values_for_callers_subset): Likewise.
21024         (known_aggs_to_agg_replacement_list): Removed.
21025         (decide_whether_version_node): Re-calculate known constants for all
21026         remaining context clones.
21028 2018-04-11  Richard Biener  <rguenther@suse.de>
21030         PR lto/85339
21031         * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
21032         from early DWARF output.
21033         (dwarf2out_early_finish): Output line info unconditionally into
21034         early DWARF and add reference to it.
21036 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
21038         PR target/85281
21039         * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
21040         (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
21041         other than V2DFmode using iptr mode attribute.
21042         (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
21044 2018-04-11  Alexander Monakov  <amonakov@ispras.ru>
21046         PR rtl-optimization/84659
21047         * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
21049 2018-04-11  Jakub Jelinek  <jakub@redhat.com>
21051         PR debug/85302
21052         * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
21053         SIZEP is NULL.
21054         (output_loc_list): Pass address of a dummy size variable even in the
21055         locview handling loop.
21056         (index_location_lists): Add comment on why skip_loc_list_entry can't
21057         call size_of_locs.
21059 2018-04-11  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21061         PR target/85261
21062         * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
21063         into register.
21065 2018-04-10  Aaron Sawdey  <acsawdey@linux.ibm.com>
21067         PR target/85321
21068         * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
21069         -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
21070         and -mstring-compare-inline-limit.
21072 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
21074         PR target/85287
21075         * config/rs6000/rs6000.md (allocate_stack): Put the residual size
21076         for stack clash protection in a register whenever we need it to be in
21077         a register.
21079 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
21081         * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
21082         Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
21084 2018-04-10  Segher Boessenkool  <segher@kernel.crashing.org>
21086         PR target/85321
21087         * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
21088         the help text.
21089         (mlong-double-): Ditto.
21090         * config/rs6000/sysv4.opt (msdata=): Ditto.
21091         (mtls-size=): Ditto.
21093 2018-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
21095         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
21096         erroneous entries for
21097         "vector int vec_ldl (int, long int *)", and
21098         "vector unsigned int vec_ldl (int, unsigned long int *)".
21099         Add comments and entries for
21100         "vector bool char vec_ldl (int, bool char *)",
21101         "vector bool short vec_ldl (int, bool short *)",
21102         "vector bool int vec_ldl (int, bool int *)",
21103         "vector bool long long vec_ldl (int, bool long long *)",
21104         "vector pixel vec_ldl (int, pixel *)",
21105         "vector long long vec_ldl (int, long long *)",
21106         "vector unsigned long long vec_ldl (int, unsigned long long *)".
21107         * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
21108         type tree bool_long_long_type_node and correct definition of
21109         bool_V2DI_type_node to make reference to this new type tree.
21110         (rs6000_mangle_type): Replace erroneous reference to
21111         bool_long_type_node with bool_long_long_type_node.
21112         * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
21113         comments to emphasize sign distinctions for char and int types and
21114         replace RS6000_BTI_bool_long constant with
21115         RS6000_BTI_bool_long_long constant.  Also add comment to restrict
21116         use of RS6000_BTI_pixel.
21117         (bool_long_type_node): Remove this macro definition.
21118         (bool_long_long_type_node): New macro definition
21120 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
21122         PR rtl-optimization/85300
21123         * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
21124         into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
21125         simplify_unary_operation fails.
21127 2018-04-10  Martin Liska  <mliska@suse.cz>
21129         * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
21130         cgraph_edge and ipa_ref.
21132 2018-04-10  Jakub Jelinek  <jakub@redhat.com>
21134         PR target/85177
21135         PR target/85255
21136         * config/i386/sse.md
21137         (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
21138         computation of the VEC_MERGE selector from mask.
21139         (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
21140         Fix decoding of the VEC_MERGE selector into mask.
21142 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
21144         PR tree-optimization/85286
21145         * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
21147 2018-04-10  Richard Sandiford  <richard.sandiford@linaro.org>
21149         * final.c (final_1): Set insn_last_address as well as
21150         insn_current_address.
21152 2018-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
21154         PR target/85173
21155         * explow.c (emit_stack_probe): Call validize_mem on memory location
21156         before passing it to gen_probe_stack.  Create address operand and
21157         legitimize it for the probe_stack_address case.
21159 2018-04-09  Jan Hubicka  <jh@suse.cz>
21161         PR lto/85078
21162         * ipa-devirt.c (rebuild_type_inheritance-hash): New.
21163         * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
21164         * tree.c (free_lang_data_in_type): Fix handling of binfos;
21165         walk basetypes.
21166         (free_lang_data): Rebuild type inheritance graph.
21168 2018-04-09  Martin Sebor  <msebor@redhat.com>
21170         * invoke.texi (-finline-small-functions): Mention other optimization
21171         options.
21172         (-findirect-inlining, -fpartial-inlining): Same.
21173         (-finline-functions-called-once): Same.
21174         (-freorder-blocks-and-partition): Same.
21176 2018-04-09  Jan Hubicka  <jh@suse.cz>
21178         PR rtl/84058
21179         * cfgcleanup.c (try_forward_edges): Do not give up on crossing
21180         jumps; choose last target that matches the criteria (i.e.
21181         no partition changes for non-crossing jumps).
21182         * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
21183         support for redirecting crossing jumps to non-crossing.
21185 2018-04-09  Alexey Brodkin  <abrodkin@synopsys.com>
21187         * config/arc/arc.c (arc_expand_prologue): Set stack usage info
21188         also for naked functions.
21190 2018-04-09  Claudiu Zissulescu  <claziss@synopsys.com>
21192         * config/arc/arc.md (add_shift): New pattern.
21193         (add_shift2): Likewise.
21194         (sub_shift): Likewise.
21195         (sub_shift_cmp0_noout): Likewise.
21196         (compare_si_ashiftsi): Likewise.
21197         (xbfu_cmp0_noout): New combine pattern.
21198         (xbfu_cmp0"): Likewise.
21199         (movsi_set_cc_insn): Place the predicable variant first.
21200         (commutative_binary_cmp0_noout): Remove clobber.
21201         (commutative_binary_cmp0): New pattern.
21202         (noncommutative_binary_cmp0): Likewise.
21203         (noncommutative_binary_cmp0_noout): Likewise.
21204         (noncommutative_binary_comparison_result_used): Removed.
21205         (rsub_cmp0): New pattern.
21206         (rsub_cmp0_noout): Likewise.
21207         (extzvsi): Changed, keep only meaningful variants.
21208         (SQH, SEZ): New iterators.
21209         (SQH_postfix): New mode attribute.
21210         (SEZ_prefix): New code attribute.
21211         (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
21212         (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
21213         * config/arc/predicates.md (cc_set_register): Use CC_REG instead
21214         of numerical value.
21215         (noncommutative_operator): Check the availability of barrel
21216         shifter option.
21218 2018-04-09  Richard Biener  <rguenther@suse.de>
21220         PR tree-optimization/85284
21221         * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
21222         Only use the niter constraining form of simple_iv when the exit
21223         is always executed.
21225 2018-04-09  Tom de Vries  <tom@codesourcery.com>
21227         PR target/84041
21228         * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
21229         (define_expand "*memory_barrier"): New define_expand.
21230         (define_insn "memory_barrier"): New insn.
21232 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
21234         PR rtl-optimization/80463
21235         PR rtl-optimization/83972
21236         PR rtl-optimization/83480
21238         * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
21239         correct producer for the insn.
21240         (tidy_control_flow): Fixup seqnos in case of debug insns.
21242 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
21244         PR rtl-optimization/83913
21246         * sel-sched-ir.c (merge_expr_data): Choose the middle between two
21247         different sched-times when merging exprs.
21249 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
21251         PR rtl-optimization/83962
21253         * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
21254         tidy_fallthru_edge and tidy_control_flow.
21256 2018-04-09  Andrey Belevantsev  <abel@ispras.ru>
21258         PR rtl-optimization/83530
21260         * sel-sched.c (force_next_insn): New global variable.
21261         (remove_insn_for_debug): When force_next_insn is true, also leave only
21262         next insn in the ready list.
21263         (sel_sched_region): When the region wasn't scheduled, make another pass
21264         over it with force_next_insn set to 1.
21266 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
21268         * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
21269         into tm_file.
21270         * config/nds32/constants.md (unspec_volatile_element): Add enum values
21271         for interrupt control.
21272         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
21273         functions for interrupt control.
21274         * config/nds32/nds32-intrinsic.md: Likewise.
21275         * config/nds32/nds32_intrinsic.h: Likewise.
21276         * config/nds32/nds32.h (nds32_builtins): Likewise.
21278 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
21280         * config/nds32/nds32.c (nds32_init_machine_status,
21281         nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
21282         strict_aligned_p field.
21283         (nds32_expand_to_rtl_hook): New function.
21284         (TARGET_EXPAND_TO_RTL_HOOK): Define.
21285         * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
21287 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
21288             Chung-Ju Wu  <jasonwucj@gmail.com>
21290         * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
21291         * config/nds32/nds32-n7.md: New file.
21292         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
21293         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
21294         pipeline.
21295         * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
21296         * config/nds32/nds32.md (pipeline_model): Add n7.
21297         * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
21298         * config/nds32/pipelines.md: Include n7 settings.
21300 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
21301             Chung-Ju Wu  <jasonwucj@gmail.com>
21303         * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
21304         * config/nds32/nds32-e8.md: New file.
21305         * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
21306         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
21307         pipeline.
21308         * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
21309         * config/nds32/nds32.md (pipeline_model): Add e8.
21310         * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
21311         * config/nds32/pipelines.md: Include e8 settings.
21313 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
21314             Chung-Ju Wu  <jasonwucj@gmail.com>
21316         * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
21317         * config/nds32/nds32-n8.md: New file.
21318         * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
21319         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
21320         pipeline.
21321         * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
21322         * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
21323         * config/nds32/nds32.md (pipeline_model): Add n8.
21324         * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
21325         * config/nds32/pipelines.md: Include n8 settings.
21327 2018-04-08  Kito Cheng  <kito.cheng@gmail.com>
21328             Chung-Ju Wu  <jasonwucj@gmail.com>
21330         * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
21331         * config/nds32/nds32-n9-2r1w.md: New file.
21332         * config/nds32/nds32-n9-3r2w.md: New file.
21333         * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
21334         nds32_register_ports): New or modify for cpu n9.
21335         * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
21336         pipeline.
21337         * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
21338         * config/nds32/nds32-utils.c: New file.
21339         * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
21340         TARGET_MUL_SLOW): Define.
21341         * config/nds32/nds32.md (pipeline_model): New attribute.
21342         * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
21343         New options that support cpu n9.
21344         * config/nds32/pipelines.md: Include n9 settings.
21345         * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
21347 2018-04-08  Chung-Ju Wu  <jasonwucj@gmail.com>
21349         * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
21350         information if necessary.
21351         (output_cond_branch_compare_zero): Likewise.
21352         * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
21353         (nds32_target_alignment): Refine for alignment.
21354         * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
21355         (FUNCTION_BOUNDARY): Modify.
21356         * config/nds32/nds32.md (call_internal, call_value_internal): Consider
21357         align case.
21358         * config/nds32/nds32.opt (malways-align, malign-functions): New.
21360 2018-04-08  Monk Chiang  <sh.chiang04@gmail.com>
21362         * config/nds32/constants.md (unspec_volatile_element): Add values for
21363         TLB operation and data prefetch.
21364         * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
21365         functions for TLB operation and data prefetch.
21366         * config/nds32/nds32-intrinsic.md: Likewise.
21367         * config/nds32/nds32_intrinsic.h: Likewise.
21368         * config/nds32/nds32.c (nds32_dpref_names): Likewise.
21369         (nds32_print_operand): Likewise.
21370         * config/nds32/nds32.h (nds32_builtins): Likewise.
21372 2018-04-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
21373         Andrew Pinski <pinsika@gcc.gnu.org>
21375         PR middle-end/82976
21376         * match.pd: Use constant_boolean_node of correct type instead of
21377         boolean_true_node or boolean_false_node for simplifying
21378         pointer comparisons to zero.
21380 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
21382         PR tree-optimization/80021
21383         * tree.c (verify_type_variant): Make error call in verify_variant_match
21384         translatable and remove final full stop.
21386 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
21388         * config/nds32/constants.md (unspec_volatile_element): Add
21389         UNSPEC_VOLATILE_EH_RETURN.
21390         * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
21391         nds32_output_stack_pop): Support dwarf exception handling process.
21392         * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
21393         * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
21394         exception handling process.
21395         (nds32_compute_stack_frame): Likewise.
21396         (nds32_return_addr_rtx): Likewise.
21397         (nds32_initial_elimination_offset): Likewise.
21398         (nds32_expand_prologue): Likewise.
21399         (nds32_expand_epilogue): Likewise.
21400         (nds32_dynamic_chain_address): New function.
21401         * config/nds32/nds32.h (machine_function): Add fields for dwarf
21402         exception handling.
21403         (DYNAMIC_CHAIN_ADDRESS): Define.
21404         (EH_RETURN_DATA_REGNO): Define.
21405         (EH_RETURN_STACKADJ_RTX): Define.
21406         * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
21407         patterns for dwarf exception handling.
21409 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
21411         * config/nds32/nds32.h: Clean up obsolete macros.
21413 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
21415         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21416         Add enum values for particular instructions.
21417         * config/nds32/nds32-intrinsic.c: Implementation of expanding
21418         particular intrinsic functions.
21419         * config/nds32/nds32-intrinsic.md: Likewise.
21420         * config/nds32/nds32_intrinsic.h: Likewise.
21421         * config/nds32/nds32.h (nds32_builtins): Likewise.
21422         * config/nds32/nds32.md (type): Add pbsad and pbsada.
21423         (btst, ave): New patterns for particular instructions.
21425 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
21427         * config/nds32/constants.md (unspec_element, unspec_volatile_element):
21428         Add enum values for atomic load/store and memory sync.
21429         * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
21430         and memory sync.
21431         * config/nds32/nds32-intrinsic.md: Likewise.
21432         * config/nds32/nds32_intrinsic.h: Likewise.
21433         * config/nds32/nds32.h (nds32_builtins): Likewise.
21435 2018-04-07  Jakub Jelinek  <jakub@redhat.com>
21437         PR tree-optimization/85257
21438         * fold-const.c (native_encode_vector): If not all elts could fit
21439         and off is -1, return 0 rather than offset.
21440         * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
21441         (offseti - offset2) / BITS_PER_UNIT as 4th argument to
21442         native_encode_expr.  Verify len * BITS_PER_UNIT >= maxsizei.  Don't
21443         adjust buffer in native_interpret_expr call.
21445 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
21447         * config/nds32/constants.md (unspec_volatile_element): Add cache
21448         control enum values.
21449         * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
21450         * config/nds32/nds32-intrinsic.md: Add cache control patterns.
21451         * config/nds32/nds32.c (nds32_cctl_names): New.
21452         (nds32_print_operand): Handle cache control register names.
21453         * config/nds32/nds32.h (nds32_builtins): New enum values.
21454         * config/nds32/nds32_intrinsic.h: Add cache control enum types and
21455         macros.
21456         * config/nds32/nds32.md (type): Add mmu.
21457         * config/nds32/pipelines.md (simple_insn): Add mmu.
21459 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
21461         * config/nds32/nds32.md (type): Remove call.
21462         * config/nds32/pipelines.md (simple_insn): Likewise.
21464 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
21466         * config/nds32/constants.md (unspec_volatile_element): Add
21467         UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
21468         UNSPEC_VOLATILE_FMFCFG.
21469         * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
21470         description for fmfcfg and fmfcsr.
21471         (bdesc_1arg): Add fmtcsr.
21472         (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
21473         (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
21474         * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
21475         unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
21476         unspec_fmfcfg): New patterns.
21477         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
21478         NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
21479         NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
21480         * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
21481         __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
21482         __nds32__fmfcfg): Define.
21484 2018-04-07  Monk Chiang  <sh.chiang04@gmail.com>
21486         * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
21487         intrinsic register names.
21488         * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
21489         intrinsic register enum values and macros.
21491 2018-04-07  Chung-Ju Wu  <jasonwucj@gmail.com>
21493         * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
21494         for load/store addressing form.
21495         (nds32_print_operand_address): Likewise.
21497 2018-04-06  Eric Botcazou  <ebotcazou@adacore.com>
21499         PR target/85196
21500         * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
21501         based on LABEL_REF.  Remove useless assertion.
21502         (pic_address_needs_scratch): Fix formatting.
21503         (sparc_legitimize_pic_address): Minor tweaks.
21504         (sparc_delegitimize_address): Adjust assertion accordingly.
21505         * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
21506         into symbolic_operand.
21507         (movsi_high_pic_label_ref): Likewise.
21508         (movsi_lo_sum_pic_label_ref): Likewise.
21509         (movdi_pic_label_ref): Likewise.
21510         (movdi_high_pic_label_ref): Likewise.
21511         (movdi_lo_sum_pic_label_ref): Likewise.
21513 2018-04-06  Amaan Cheval  <amaan.cheval@gmail.com>
21515         * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
21516         custom LIB_SPEC setup.
21518 2018-04-06  Ruslan Bukin  <br@bsdpad.com>
21519             Kito Cheng  <kito.cheng@gmail.com>
21521         * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
21522         * config/riscv/freebsd.h: New.
21524 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
21526         * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
21527         * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
21528         file.
21530 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
21531             Kito Cheng  <kito.cheng@gmail.com>
21533         * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
21534         nds32_output_call, nds32_symbol_binds_local_p): New functions.
21535         * config/nds32/nds32-protos.h (nds32_output_call,
21536         nds32_output_return): Declare.
21537         * config/nds32/nds32.md: Refine all the call and return patterns.
21539 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
21541         PR debug/85252
21542         * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
21543         build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
21545         PR rtl-optimization/84872
21546         * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
21547         nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
21548         EDGE_CROSSING edge.
21550 2018-04-06  Tamar Christina  <tamar.christina@arm.com>
21552         * expr.c (copy_blkmode_to_reg): Revert 254862.
21553         * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
21555 2018-04-06  Richard Biener  <rguenther@suse.de>
21557         PR middle-end/85244
21558         * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
21559         after seeing a component reference with an adjacent field.  Treat
21560         refs to arrays at struct end of external decls similar to
21561         refs to unconstrained commons.
21563 2018-04-06  Jakub Jelinek  <jakub@redhat.com>
21565         PR sanitizer/85213
21566         * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
21567         look through SAVE_EXPRs with non-side-effects argument.  Adjust
21568         recursive calls.
21569         (fold_comparison): Adjust twoval_comparison_p caller, don't handle
21570         save_p here.
21572 2018-04-06  Richard Biener  <rguenther@suse.de>
21574         PR middle-end/85180
21575         * alias.c (find_base_term): New wrapper around find_base_term
21576         unwinding CSELIB_VAL_PTR changes.
21577         (find_base_term): Do not restore CSELIB_VAL_PTR during the
21578         recursion.
21580 2018-04-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21582         * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
21583         instructions.
21584         * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
21585         constant definitions.
21586         ("nop"): lr 0,0 -> nopr r0
21587         ("nop_lr0", "nop_lr1"): New insn definitions.
21589 2018-04-06  Chung-Ju Wu  <jasonwucj@gmail.com>
21591         * config/nds32/nds32.md (*stack_push, *stack_pop): Use
21592         NDS32_V3PUSH_AVAILABLE_P macro.
21594 2018-04-06  Monk Chiang  <sh.chiang04@gmail.com>
21595             Chung-Ju Wu  <jasonwucj@gmail.com>
21597         * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
21598         (nds32*-*-*): Add float and fpu_config into supported_defaults.
21599         * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
21600         Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
21601         * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
21602         UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
21603         * config/nds32/constraints.md: New constraints and checking for hard
21604         float configuration.
21605         * config/nds32/iterators.md: New mode iterator and attribute for hard
21606         float configuration.
21607         * config/nds32/nds32-doubleword.md: Use hard float alternatives and
21608         patterns.
21609         * config/nds32/nds32-fpu.md: New file.
21610         * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
21611         deal with hard float code generation.
21612         * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
21613         ARCH_V3S.
21614         (abi_type, float_reg_number): New enum type.
21615         * config/nds32/nds32-predicates.c: New predicates for hard float.
21616         * config/nds32/nds32-protos.h: Declare functions for hard float.
21617         * config/nds32/nds32.c: Implementation for hard float configuration.
21618         * config/nds32/nds32.h: Definitions for hard float configuration.
21619         * config/nds32/nds32.md: Include hard float machine description and
21620         modify patterns for hard float configuration.
21621         * config/nds32/nds32.opt: New options for hard float configuration.
21622         * config/nds32/predicates.md: New predicates for hard float
21623         configuration.
21625 2018-04-06  Kuan-Lin Chen  <kuanlinchentw@gmail.com>
21627         * common/config/nds32/nds32-common.c
21628         (nds32_option_optimization_table): Enable -mreleax-hint by default.
21630 2018-04-05  Jakub Jelinek  <jakub@redhat.com>
21632         PR middle-end/85195
21633         * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
21634         CONSTRUCTOR_ELT (ctor, ...)->value.
21636 2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
21638         PR target/85193
21639         * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
21641 2018-04-05  Tom de Vries  <tom@codesourcery.com>
21643         PR target/85204
21644         * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
21645         cond jump.
21647 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
21648             Kito Cheng  <kito.cheng@gmail.com>
21650         * config/nds32/constraints.md (U33): Fine-tune checking condition.
21651         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
21652         * config/nds32/nds32.h (nds32_16bit_address_type): Add
21653         ADDRESS_POST_MODIFY_LO_REG_IMM3U.
21655 2018-04-05  Shiva Chen  <shiva0217@gmail.com>
21656             Kito Cheng  <kito.cheng@gmail.com>
21658         * config/nds32/constraints.md (Ufe): New memory constraint.
21659         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
21660         nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
21661         * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
21662         operands.
21663         * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
21664         * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
21666 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
21668         * config/nds32/nds32.md: Use optimize_size in the condition for
21669         alu-shift instructions.
21671 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
21673         * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
21675 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
21677         * config/nds32/nds32.md (negsi2): Refine pattern.
21679 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
21680             Chung-Ju Wu  <jasonwucj@gmail.com>
21682         * config/nds32/iterators.md (shift_rotate): New code iterator.
21683         (shift): New code attribute.
21684         * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
21685         * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
21686         * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
21687         * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
21688         bit-wise operations.
21689         (andsi3, *andsi3): Ditto.
21690         (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
21691         (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
21692         (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
21693         * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
21694         nds32_ior_operand, nds32_xor_operand): New predicates.
21696 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
21698         * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
21699         (addsi3, subsi3): ... this.
21701 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
21703         * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
21705 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
21707         * config/nds32/nds32.md: Adjust indention.
21709 2018-04-05  Kito Cheng  <kito.cheng@gmail.com>
21711         * config/nds32/nds32.md (feature): New attribute.
21713 2018-04-05  Chung-Ju Wu  <jasonwucj@gmail.com>
21715         * config/nds32/nds32.md (subtype): New attribute.
21717 2018-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
21719         PR target/85203
21720         * config/arm/arm-builtins.c (arm_expand_builtin): Change
21721         expansion to perform a bitwise AND of the argument followed by a
21722         boolean negation of the result.
21724 2018-04-04  Peter Bergner  <bergner@vnet.ibm.com>
21726         PR rtl-optimization/84878
21727         * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
21728         the basic block.  Assert the use reference is not artificial and that
21729         it has an associated insn.
21731 2018-04-04  Michael Matz  <matz@suse.de>
21733         * builtins.c (compute_objsize): Pass correct operand
21734         to array_at_struct_end_p.
21736 2018-04-04  Richard Biener  <rguenther@suse.de>
21738         PR lto/85176
21739         * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
21740         from contexts for DINFO_LEVEL_TERSE and below.
21742 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
21744         * config/nds32/nds32-doubleword.md (move_<mode>): Require
21745         resiter_operand condition.
21746         * config/nds32/nds32.md (*move<mode>): Ditto.
21748 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
21749             Monk Chiang  <sh.chiang04@gmail.com>
21751         * config/nds32/nds32.md (movmisalign<mode>): New pattern.
21753 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
21755         * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
21757 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
21758             Kito Cheng  <kito.cheng@gmail.com>
21760         * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
21761         nds32_cond_code_str, output_cond_branch,
21762         output_cond_branch_compare_zero, nds32_expand_cbranch,
21763         nds32_expand_cstore, nds32_expand_movcc,
21764         nds32_output_cbranchsi4_equality_zero,
21765         nds32_output_cbranchsi4_equality_reg,
21766         nds32_output_cbranchsi4_equality_reg_or_const_int,
21767         nds32_output_cbranchsi4_greater_less_zero: New functions.
21768         * config/nds32/nds32-protos.h (nds32_expand_cbranch,
21769         nds32_expand_cstore, nds32_expand_movcc,
21770         nds32_output_cbranchsi4_equality_zero,
21771         nds32_output_cbranchsi4_equality_reg,
21772         nds32_output_cbranchsi4_equality_reg_or_const_int,
21773         nds32_output_cbranchsi4_greater_less_zero): Declare.
21774         * config/nds32/predicates.md (nds32_movecc_comparison_operator,
21775         nds32_rimm11s_operand): New predicates.
21776         * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
21777         * config/nds32/nds32.md: Rewrite all the branch and conditional move
21778         patterns.
21780 2018-04-04  Kito Cheng  <kito.cheng@gmail.com>
21782         * config/nds32/nds32-doubleword.md: Refine all the instruction type.
21783         * config/nds32/nds32.md: Ditto.
21784         * config/nds32/pipelines.md: Ditto.
21786 2018-04-04  Richard Biener  <rguenther@suse.de>
21788         PR tree-optimization/85168
21789         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
21790         propagating abnormals.
21792 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
21794         * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
21796 2018-04-04  Chung-Ju Wu  <jasonwucj@gmail.com>
21797             Kito Cheng  <kito.cheng@gmail.com>
21799         * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
21800         * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
21801         * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
21802         (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
21803         * config/nds32/nds32.md (sibcall_internal): New.
21804         (sibcall_register): Remove.
21805         (sibcall_immediate): Remove.
21806         (sibcall_value_internal): New.
21807         (sibcall_value_register): Remove.
21808         (sibcall_value_immediate): Remove.
21809         * config/nds32/predicates.md (nds32_general_register_operand): New.
21810         (nds32_call_address_operand): New.
21812 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
21814         PR rtl-optimization/85167
21815         * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
21816         bb_defs if *split_p, instead preinitialize it to NULL.
21818         PR tree-optimization/85156
21819         * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
21820         evaluating the argument multiple times.
21822 2018-04-03  Bill Schmidt  <wschmidt@linux.ibm.com>
21824         * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
21825         than vector.
21826         (_mm_cvtpd_ps): Likewise.
21827         (_mm_cvttpd_epi32): Likewise.
21828         * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
21829         * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
21830         vector, pixel, and bool following altivec.h include.
21832 2018-04-03  Martin Sebor  <msebor@redhat.com>
21834         * doc/extend.texi (Common Function Attributes): Clarify.
21835         (const attribute): Likewise.
21836         (pure attribute): Likewise.
21838 2018-04-03  Jakub Jelinek  <jakub@redhat.com>
21840         PR target/85169
21841         * config/i386/i386.c (ix86_expand_vector_set): Use
21842         HOST_WIDE_INT_1U << elt instead of 1 << elt.  Formatting fix.
21844 2018-04-03  Uros Bizjak  <ubizjak@gmail.com>
21846         * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
21847         instructions when changing rounding bits to preserve precision bits
21848         in the x87 control word.
21850 2018-04-03  Martin Liska  <mliska@suse.cz>
21852         PR tree-optimization/82491
21853         * rtl.h (strip_offset_and_add): Replace += suboffset with
21854         poly_uint64 () + suboffset.
21856 2018-03-29  Martin Liska  <mliska@suse.cz>
21857             Martin Jambor  <mjambor@suse.cz>
21859         PR ipa/84947
21860         * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
21861         param_type is not an integral or pointer type.
21863 2018-04-03  Richard Biener  <rguenther@suse.de>
21865         * sese.h (recompute_all_dominators): Remove.
21867 2018-04-02  Martin Sebor  <msebor@redhat.com>
21869         * doc/invoke.texi (-Wrestrict): Fix typos.
21871 2018-04-02  Jim Wilson  <jimw@sifive.com>
21873         * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
21874         * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
21875         (<optab>di3, <optab>si3_extend): Likewise.
21876         (<optab>si3_mask, <optab>si3_mask_1): New.
21877         (<optab>di3_mask, <optab>di3_mask_1): New.
21878         (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
21879         (lshrsi3_zero_extend_1): Use VOIDmode shift count.
21880         * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
21882 2018-04-02  Gerald Pfeifer  <gerald@pfeifer.com>
21884         * doc/cpp.texi (Variadic Macros): Fix line continuation in an
21885         example.
21887 2018-04-02  Chung-Ju Wu  <jasonwucj@gmail.com>
21889         * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
21890         (nds32_canonicalize_comparison): New function.
21892 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
21893             Kito Cheng  <kito.cheng@gmail.com>
21894             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
21896         * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
21897         * config/nds32/constants.md (unspec_volatile_element): Add
21898         UNSPEC_VOLATILE_RELAX_GROUP.
21899         * config/nds32/nds32-relax-opt.c: New file.
21900         * config/nds32/nds32-predicates.c
21901         (nds32_symbol_load_store_p): New function.
21902         * config/nds32/nds32-protos.h
21903         (nds32_symbol_load_store_p): Declare function.
21904         (make_pass_nds32_relax_opt): Declare new rtl pass function.
21905         * config/nds32/nds32.c
21906         (nds32_register_pass): New function to register pass.
21907         (nds32_register_passes): New function to register passes.
21908         * config/nds32/nds32.md (relax_group): New pattern.
21909         * config/nds32/nds32.opt (mrelax-hint): New option.
21910         * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
21912 2018-04-01  Kito Cheng  <kito.cheng@gmail.com>
21914         * config/nds32/t-nds32: Modify files dependency.
21916 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
21918         * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
21919         (PROFILE_HOOK): Define its implementation.
21921 2018-04-01  Chung-Ju Wu  <jasonwucj@gmail.com>
21923         * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
21924         type and 32-bit size.
21926 2018-04-01  Jakub Jelinek  <jakub@redhat.com>
21928         PR middle-end/85090
21929         * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
21930         (V_128_256): New mode iterator.
21931         (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
21932         (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
21933         (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
21934         of V.
21935         * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
21936         V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
21938 2018-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
21940         PR target/83315
21941         * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
21942         NaN inputs correctly.
21944 2018-03-30  Peter Bergner  <bergner@vnet.ibm.com>
21946         PR target/80546
21947         * config/rs6000/vsx.md (??r): New mode attribute.
21948         (*vsx_mov<mode>_64bit): Use it.
21949         (*vsx_mov<mode>_32bit): Likewise.
21951 2018-03-30  Martin Sebor  <msebor@redhat.com>
21953         PR tree-optimization/84818
21954         * builtins.c (check_access): Use warning_n.
21956 2018-03-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
21958         PR target/83822
21959         * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
21960         condition.
21961         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
21962         condition.
21964 2018-03-30  Julia Koval  <julia.koval@intel.com>
21966         PR target/84413
21967         * x86-tune.def (movx, partial_reg_dependency): Enable for
21968         m_SKYLAKE_AVX512.
21970 2018-03-29  Vladimir Makarov  <vmakarov@redhat.com>
21972         PR inline-asm/84985
21973         * lra-constraints.c (process_alt_operands): Move setting
21974         this_alternative_matches below.
21976 2018-03-29  Martin Liska  <mliska@suse.cz>
21978         PR lto/84995.
21979         * doc/invoke.texi: Document how LTO works with debug info.
21980         Describe auto-load support of binutils.  Mention 'x86-64'
21981         as valid option value of -march option.
21983 2018-03-29  Jakub Jelinek  <jakub@redhat.com>
21985         * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
21987         PR c/85094
21988         * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
21989         For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
21990         OEP_NO_HASH_CHECK for recursive call, to avoid exponential
21991         checking.
21993 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
21995         PR target/84912
21996         * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
21997         (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
21998         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
21999         for RS6000_BTM_POWERPC64.
22000         (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
22001         (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
22002         * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
22003         definition.
22004         (DIVDE): Use it.
22005         (DIVDEU): Likewise.
22007 2018-03-28  Carl Love  <cel@us.ibm.com>
22009         Revert
22010         2017-09-27  Carl Love  <cel@us.ibm.com>
22012         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
22013         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
22014         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
22015         fctiw instruction.
22017 2018-03-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
22019         * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
22020         instead of __vector bool.
22021         (_mm_max_pu8): Likewise.
22022         (_mm_min_pi16): Likewise.
22024 2018-03-28  Peter Bergner  <bergner@vnet.ibm.com>
22026         PR target/84912
22027         * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
22028         (DIVWEUO): Likewise.
22029         (DIVDEO): Likewise.
22030         (DIVDEUO): Likewise.
22031         * config/rs6000/rs6000.c (builtin_function_type): Remove support for
22032         DIVWEUO and DIVDEUO.
22033         * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
22034         (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
22035         (div_extend): Likewise.
22036         * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
22037         builtin function.
22038         (__builtin_divweuo): Likewise.
22039         (__builtin_divdeo): Likewise.
22040         (__builtin_divdeuo): Likewise.
22042 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
22044         PR target/85095
22045         * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
22046         *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
22048         PR tree-optimization/82004
22049         * gimple-match-head.c (optimize_pow_to_exp): New function.
22050         * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
22051         Don't fold to exp if optimize_pow_to_exp is false.
22053 2018-03-28  Martin Liska  <mliska@suse.cz>
22055         PR other/84819
22056         * calls.c (initialize_argument_information): Fix trailing space.
22057         * common.opt: Fix typo and provide better explanation for
22058         -fsanitize-coverage option.
22059         * config/i386/i386.opt: Fix typo.
22061 2018-03-28  Jakub Jelinek  <jakub@redhat.com>
22062             Martin Liska  <mliska@suse.cz>
22064         PR sanitizer/85081
22065         * gimplify.c (asan_poison_variable): Don't do the check for
22066         gimplify_omp_ctxp here.
22067         (gimplify_decl_expr): Do it here.
22068         (gimplify_target_expr): Likewise.
22070 2018-03-28  Martin Liska  <mliska@suse.cz>
22072         PR target/84988
22073         * config/i386/i386.c (ix86_function_arg_advance): Do not call
22074         chkp_type_bounds_count if MPX is not enabled.
22076 2018-03-27  Chung-Ju Wu  <jasonwucj@gmail.com>
22078         * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
22080 2018-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
22082         PR target/84914
22083         * config/rs6000/rs6000.c (create_complex_muldiv): New helper
22084         function to create the function decl for complex long double
22085         multiply and divide for -mabi=ieeelongdouble.
22086         (init_float128_ieee): Call it.
22088 2018-03-27  H.J. Lu  <hongjiu.lu@intel.com>
22090         PR target/85044
22091         * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
22092         -fcf-protection=branch -mibt.
22093         * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
22095 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22097         PR target/81863
22098         * config/arm/arm.c (arm_valid_symbolic_address): Handle
22099         arm_word_relocations.
22101 2018-03-27  Cesar Philippidis  <cesar@codesourcery.com>
22103         PR target/85056
22104         * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
22105         extern array declarations.
22107 2018-03-27  Richard Biener  <rguenther@suse.de>
22109         PR middle-end/84067
22110         * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
22111         explicit single_use checks.
22113 2018-03-27  Richard Biener  <rguenther@suse.de>
22115         PR tree-optimization/85082
22116         * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
22117         Valueize the VUSE.
22119 2018-03-27  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
22121         * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
22122         * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
22123         Turn on fasynchronous-unwind-tables and funwind-tables.
22125 2018-03-26  Uros Bizjak  <ubizjak@gmail.com>
22127         PR target/85073
22128         * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
22129         (*bmi_blsr_<mode>_ccz): Ditto.
22131 2018-03-26  Tom de Vries  <tom@codesourcery.com>
22133         PR tree-optimization/85063
22134         * omp-general.c (offloading_function_p): New function.  Factor out
22135         of ...
22136         * omp-offload.c (pass_omp_target_link::gate): ... here.
22137         * omp-general.h (offloading_function_p): Declare.
22138         * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
22139         with attribute omp declare target for offloading functions.
22141 2018-03-24  Richard Sandiford  <richard.sandiford@linaro.org>
22143         PR tree-optimization/84005
22144         * tree-data-ref.h (get_base_for_alignment): Declare.
22145         * tree-data-ref.c (get_base_for_alignment_1): New function.
22146         (get_base_for_alignment): Likewise.
22147         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
22148         get_base_for_alignment to find a suitable base object, instead
22149         of always using drb->base_address.
22151 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
22153         PR inline-asm/85022
22154         * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
22155         known size by default.
22157 2018-03-23  Vladimir Makarov  <vmakarov@redhat.com>
22159         PR inline-asm/85030
22160         * lra-constraints.c (process_alt_operands): Don't match BLKmode
22161         and non BLKmode operands.
22163 2018-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22165         PR target/85026
22166         * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
22167         Clean up attributes.
22169 2018-03-23  Richard Biener  <rguenther@suse.de>
22171         PR debug/85020
22172         * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
22173         we are going to emit early debug for LTO.
22175 2018-03-23  Jakub Jelinek  <jakub@redhat.com>
22177         PR inline-asm/85034
22178         * function.c (match_asm_constraints_1): Don't optimize if input
22179         doesn't satisfy general_operand predicate for output's mode.
22181         PR inline-asm/85022
22182         * alias.c (write_dependence_p): Don't require for x_canonicalized
22183         non-VOIDmode if x has VOIDmode.
22185         PR sanitizer/85029
22186         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
22187         just don't try to optimize it rather than assert it never happens.
22189 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22191         * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
22192         macro expansions for definition of ST_INTERNAL_<mode> and
22193         LD_INTERNAL_<mode> builtins.
22194         * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
22195         Remove prototype.
22196         * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
22197         function.
22198         (altivec_expand_st_builtin): Likewise.
22199         (altivec_expand_builtin): Remove calls to deleted functions.
22200         (rs6000_address_for_altivec): Delete this function.
22201         * config/rs6000/vector.md: Remove expands for
22202         vector_altivec_load_<mode> and vector_altivec_store_<mode>.
22204 2018-03-22  Sudakshina Das  <sudi.das@arm.com>
22206         PR target/84826
22207         * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
22208         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
22209         re-computing once computed.
22210         (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
22211         (arm_init_machine_status): Initialize
22212         machine->static_chain_stack_bytes.
22214 2018-03-22  Kelvin Nilsen  <kelvin@gcc.gnu.org>
22216         PR target/84760
22217         * doc/extend.texi: Add four new prototypes for vec_ld.
22218         * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
22219         definitions for more logical presentation.
22220         * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
22221         entries for V1TI variants of __builtin_altivec_ld builtin.
22222         * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
22223         handling of V1TI variant of LVX icode pattern.
22224         (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
22225         (rs6000_gimple_fold_builtin): Likewise.
22226         (altivec_init_builtins): Add code to define
22227         __builtin_altivec_lvx_v1ti function.
22229 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
22231         PR inline-asm/84941
22232         * function.c (match_asm_constraints_1): Don't do the optimization
22233         if input isn't a REG, SUBREG, MEM or constant.
22235 2018-03-22  Tom de Vries  <tom@codesourcery.com>
22237         PR tree-optimization/84956
22238         * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
22239         bb_has_abnormal_pred.
22241 2018-03-22  Jakub Jelinek  <jakub@redhat.com>
22243         PR sanitizer/85018
22244         * dwarf2asm.c (dw2_output_indirect_constant_1): Set
22245         DECL_INITIAL (decl) to decl at the end.
22246         * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
22247         adjust the comment.
22249 2018-03-21  Joseph Myers  <joseph@codesourcery.com>
22251         * doc/extend.texi (__builtin_tgmath): Document when complex
22252         integer types are treated as _Complex _Float64.
22254 2018-03-21  Tom de Vries  <tom@codesourcery.com>
22256         * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
22258 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
22260         PR tree-optimization/84960
22261         * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
22262         if it is ENTRY block, move them into single succ of ENTRY in that case.
22264 2018-03-21  Richard Sandiford  <richard.sandiford@linaro.org>
22266         PR tree-optimization/84811
22267         * poly-int.h (poly_span_traits): Remove the T3 parameter and
22268         promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
22269         (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
22270         (known_subrange_p): Update accordingly.  Cast each value involved
22271         in the size comparison, rather than casting the result of the
22272         subtraction.
22274 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
22276         PR tree-optimization/84982
22277         * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
22278         by flipping the least significant bit rather than all bits from
22279         bitpos to bitpos + bitsize - 1.
22281 2018-03-21  Nathan Sidwell  <nathan@acm.org>
22283         * doc/extend.texi (Deprecated Features): Remove mention of
22284         long-deleted deprecations.
22286 2018-03-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
22288         PR jit/84288
22289         * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
22290         * configure: Regenerate.
22292 2018-03-21  Tom de Vries  <tom@codesourcery.com>
22294         PR tree-optimization/83126
22295         * tree-parloops.c (num_phis): New function.
22296         (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
22298 2018-03-21  Nathan Sidwell  <nathan@acm.org>
22300         * doc/extend.texi (Deprecated Features): Update deprecated flags,
22301         mention anon-struct/union members and trailing attributes.
22303 2018-03-21  Bin Cheng  <bin.cheng@arm.com>
22305         PR tree-optimization/84969
22306         * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
22307         builtin memset partitions if they set different rhs values.
22309 2018-03-21  Jakub Jelinek  <jakub@redhat.com>
22311         PR rtl-optimization/84989
22312         * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
22313         VEC_DUPLICATE with scalar result mode.
22315 2018-03-21  Martin Liska  <mliska@suse.cz>
22317         PR ipa/84963
22318         * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
22319         not intended return statement.
22321 2018-03-21  Martin Liska  <mliska@suse.cz>
22323         PR target/84988
22324         * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
22325         (chkp_find_bound_slots_1): Limit number of iterations.
22327 2018-03-20  David H. Gutteridge  <dhgutteridge@sympatico.ca>
22329         PR target/84838
22330         * Minor grammar fixes for x86 options.
22332 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
22334         PR debug/84875
22335         * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
22336         holding REG_CFA_RESTORE notes, instead turn them into a USE.
22338 2018-03-20  Peter Bergner  <bergner@vnet.ibm.com>
22340         PR target/83789
22341         * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
22342         (altivec_lvx_<mode>_1op): Likewise.
22343         (altivec_stvx_<mode>_2op): Likewise.
22344         (altivec_stvx_<mode>_1op): Likewise.
22345         (altivec_lvx_<VM2:mode>): New define_expand.
22346         (altivec_stvx_<VM2:mode>): Likewise.
22347         (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
22348         (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22349         (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
22350         (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
22351         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
22352         (rs6000_gen_lvx): Likewise.
22353         * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
22354         (altivec_expand_stv_builtin): Likewise.
22355         (altivec_expand_builtin): Likewise.
22356         * config/rs6000/vector.md: Likewise.
22358 2018-03-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22360         PR target/82518
22361         * config/arm/arm.c (arm_array_mode_supported_p): Return false for
22362         BYTES_BIG_ENDIAN.
22364 2018-03-20  Richard Biener  <rguenther@suse.de>
22366         PR target/84986
22367         * config/i386/i386.c (ix86_add_stmt_cost): Only cost
22368         sign-conversions as zero, fall back to standard scalar_stmt
22369         cost for the rest.
22371 2018-03-20  Martin Liska  <mliska@suse.cz>
22373         PR ipa/84825
22374         * predict.c (rebuild_frequencies): Handle case when we have
22375         PROFILE_ABSENT, but flag_guess_branch_prob is false.
22377 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
22379         PR target/84990
22380         * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
22381         flag_section_anchors.
22382         * varasm.c (use_blocks_for_decl_p): Remove hack for
22383         dw2_force_const_mem.
22385         PR target/84845
22386         * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
22387         to ...
22388         (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this.  If pseudos can't
22389         be created, use lowpart_subreg of operands[0] rather than operands[0]
22390         itself.
22391         (*aarch64_reg_<mode>3_minus_mask): Rename to ...
22392         (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
22393         (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
22394         and n constraint instead of aarch64_shift_imm_di and Usd.
22395         (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
22396         (*aarch64_<optab>_reg_minus<mode>3): ... this.
22398 2018-03-20  Sudakshina Das  <sudi.das@arm.com>
22400         PR target/82989
22401         * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
22402         to favor GPR over NEON registers.
22403         (<shift>di3_neon): Likewise.
22405 2018-03-20  Tom de Vries  <tom@codesourcery.com>
22407         PR target/84952
22408         * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
22409         (nvptx_process_pars): Emit bar.sync asap and alap.
22411 2018-03-20  Tom de Vries  <tom@codesourcery.com>
22413         PR target/84954
22414         * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
22415         seen_label if seen_label is already set.
22417 2018-03-20  Jakub Jelinek  <jakub@redhat.com>
22419         PR target/84945
22420         * config/i386/i386.c (fold_builtin_cpu): For features above 31
22421         use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
22422         Use 1U instead of 1.  Formatting fixes.
22424         PR c/84953
22425         * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
22426         instead of TREE_TYPE (s1) for the return value.
22428 2018-03-19  Jakub Jelinek  <jakub@redhat.com>
22430         PR tree-optimization/84946
22431         * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
22432         bitsize + bitsize in poly_uint64 rather than poly_int64.
22434         PR sanitizer/78651
22435         * dwarf2asm.c: Include fold-const.c.
22436         (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
22437         of decl rather than decl itself.
22439         PR rtl-optimization/84643
22440         * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
22442 2018-03-19  Maxim Ostapenko  <m.ostapenko@samsung.com>
22444         PR sanitizer/78651
22445         * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
22446         calling assemble_variable.
22448 2018-03-19  Sudakshina Das  <sudi.das@arm.com>
22450         PR target/81647
22451         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
22452         instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
22454 2018-03-19  Jim Wilson  <jimw@sifive.com>
22456         PR bootstrap/84856
22457         * config/riscv/riscv.c (riscv_function_arg_boundary): Use
22458         PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
22459         (riscv_first_stack_step): Likewise.
22460         (riscv_option_override): Use STACK_BOUNDARY instead of
22461         MIN_STACK_BOUNDARY.
22462         * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
22463         MIN_STACK_BOUNDARY.
22464         (BIGGEST_ALIGNMENT): Set to 128.
22465         (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
22466         (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
22467         STACK_BOUNDARY.
22469 2018-03-19  Richard Biener  <rguenther@suse.de>
22471         PR tree-optimization/84933
22472         * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
22473         values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
22475 2018-03-19  Richard Biener  <rguenther@suse.de>
22477         PR tree-optimization/84859
22478         * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
22479         (cond_if_else_store_replacement): Perform sinking operation on
22480         single-store BBs regardless of MAX_STORES_TO_SINK setting.
22481         Generalize what a BB with a single eligible store is.
22483 2018-03-19  Richard Biener  <rguenther@suse.de>
22485         PR tree-optimization/84929
22486         * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
22487         chrec_is_positive against non-chrec arg.
22489 2018-03-19  Tamar Christina  <tamar.christina@arm.com>
22491         PR target/84711
22492         * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
22494 2018-03-18  Martin Liska  <mliska@suse.cz>
22496         PR rtl-optimization/84635
22497         * regrename.c (build_def_use): Use matches_mode only when
22498         matches >= 0.
22500 2018-03-18  Richard Sandiford  <richard.sandiford@linaro.org>
22502         PR tree-optimization/84913
22503         * tree-vect-loop.c (vectorizable_reduction): Don't try to
22504         vectorize chains of COND_EXPRs.
22506 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
22508         * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
22510 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
22512         * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
22514 2018-03-18  Chung-Ju Wu  <jasonwucj@gmail.com>
22516         * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
22518 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
22519             Kito Cheng  <kito.cheng@gmail.com>
22521         * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
22522         * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
22523         (nds32_adjust_reg_alloc_order): New function.
22524         * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
22526 2018-03-17  Kito Cheng  <kito.cheng@gmail.com>
22528         * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
22529         nds32_print_operand, nds32_print_operand_address): Use
22530         HOST_WIDE_INT_PRINT_DEC instead.
22532 2018-03-17  Chung-Ju Wu  <jasonwucj@gmail.com>
22534         * config/nds32/nds32.c (nds32_register_priority): Modify cost.
22536 2018-03-17  Jakub Jelinek  <jakub@redhat.com>
22538         PR target/84902
22539         * config/i386/i386.c (initial_ix86_tune_features,
22540         initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
22541         unsigned long long.
22542         (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
22543         to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
22544         rather than 1u << ix86_tune.  Formatting fix.
22545         (ix86_option_override_internal): Change ix86_arch_mask from
22546         unsigned int to unsigned HOST_WIDE_INT, initialize to
22547         HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
22548         (ix86_function_specific_restore): Likewise.
22550 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
22552         PR target/84899
22553         * postreload.c (reload_combine_recognize_pattern): Perform
22554         INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
22555         truncate_int_for_mode the result for the destination's mode.
22557         PR c/84909
22558         * hsa-gen.c (mem_type_for_type): Fix comment typo.
22559         * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
22560         Likewise.
22561         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
22562         Likewise.
22564 2018-03-16  Vladimir Makarov  <vmakarov@redhat.com>
22566         PR target/84876
22567         * lra-assigns.c (lra_split_hard_reg_for): Don't use
22568         regno_allocno_class_array and sorted_pseudos.
22569         * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
22570         insns where regno is used.
22572 2018-03-16  Martin Liska  <mliska@suse.cz>
22574         PR ipa/84833
22575         * multiple_target.c (create_dispatcher_calls): Redirect
22576         reference in the symbol table.
22578 2018-03-16  Martin Liska  <mliska@suse.cz>
22580         PR ipa/84722
22581         * multiple_target.c (create_dispatcher_calls): Redirect also
22582         an alias.
22584 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
22586         PR c++/79937
22587         PR c++/82410
22588         * tree.h (TARGET_EXPR_NO_ELIDE): Define.
22589         * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
22590         TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
22592 2018-03-16  Julia Koval  <julia.koval@intel.com>
22594         * doc/invoke.texi (Skylake Server): Add CLWB.
22595         Cannonlake): Remove CLWB.
22597 2018-03-16  Jakub Jelinek  <jakub@redhat.com>
22599         PR tree-optimization/84841
22600         * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
22601         1 << 3.
22602         (FLOAT_ONE_CONST_TYPE): Define.
22603         (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
22604         (sort_by_operand_rank): Put entries with higher constant_type last
22605         rather than first to match comments.
22607 2018-03-15  Sandra Loosemore  <sandra@codesourcery.com>
22609         * config/nios2/nios2.md (movsi_internal): Fix thinko in
22610         split predicate.
22612 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
22614         PR c++/79085
22615         * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
22616         check and use address of target always.
22618 2018-03-15  H.J. Lu  <hongjiu.lu@intel.com>
22620         PR target/84574
22621         * config/i386/i386.c (indirect_thunk_needed): Update comments.
22622         (indirect_thunk_bnd_needed): Likewise.
22623         (indirect_thunks_used): Likewise.
22624         (indirect_thunks_bnd_used): Likewise.
22625         (indirect_return_needed): New.
22626         (indirect_return_bnd_needed): Likewise.
22627         (output_indirect_thunk_function): Add a bool argument for
22628         function return.
22629         (output_indirect_thunk_function): Don't generate alias for
22630         function return thunk.
22631         (ix86_code_end): Call output_indirect_thunk_function to generate
22632         function return thunks.
22633         (ix86_output_function_return): Set indirect_return_bnd_needed
22634         and indirect_return_needed instead of indirect_thunk_bnd_needed
22635         and indirect_thunk_needed.
22637 2018-03-15  Olga Makhotina  <olga.makhotina@intel.com>
22639         * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
22640         (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
22641         (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
22643 2018-03-15  David Malcolm  <dmalcolm@redhat.com>
22644             Paul Hua <paul.hua.gm@gmail.com>
22646         PR c/84852
22647         * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
22649 2018-03-15  Segher Boessenkool  <segher@kernel.crashing.org>
22651         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
22652         TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
22653         resp. SFmode cases.
22655 2018-03-15  Tamar Christina  <tamar.christina@arm.com>
22657         PR target/84711
22658         * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
22659         instead of GET_MODE_SIZE when comparing Units.
22661 2018-03-15  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
22663         PR target/68256
22664         * varasm.c (hash_section): Return an unchangeble hash value
22665         * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
22666         Return !aarch64_can_use_per_function_literal_pools_p ().
22668 2018-03-15  Jakub Jelinek  <jakub@redhat.com>
22670         PR target/84860
22671         * optabs.c (emit_conditional_move): Pass address of cmode's copy
22672         rather than address of cmode as last argument to prepare_cmp_insn.
22674 2018-03-15  Julia Koval  <julia.koval@intel.com>
22676         * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
22677         F_AVX512VNNI, F_AVX512BITALG): New.
22679 2018-03-14  John David Anglin  <danglin@gcc.gnu.org>
22681         PR target/83451
22682         * config/pa/pa.c (pa_emit_move_sequence):  Always emit secondary reload
22683         insn for floating-point loads and stores.
22685 2018-03-14  Carl Love  <cel@us.ibm.com>
22687         * config/rs6000/rs6000-c.c: Add macro definitions for
22688         ALTIVEC_BUILTIN_VEC_PERMXOR.
22689         * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
22690         * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
22691         * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
22692         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
22693         UNSPEC_VPERMXOR.
22694         * config/doc/extend.texi: Add prototypes for vec_permxor.
22696 2018-03-14  David Malcolm  <dmalcolm@redhat.com>
22698         PR c/84852
22699         * diagnostic-show-locus.c (class layout_point): Convert m_line
22700         from int to linenum_type.
22701         (line_span::comparator): Use linenum "compare" function when
22702         comparing line numbers.
22703         (test_line_span): New function.
22704         (layout_range::contains_point): Convert param "row" from int to
22705         linenum_type.
22706         (layout_range::intersects_line_p): Likewise.
22707         (layout::will_show_line_p): Likewise.
22708         (layout::print_source_line): Likewise.
22709         (layout::should_print_annotation_line_p): Likewise.
22710         (layout::print_annotation_line): Likewise.
22711         (layout::print_leading_fixits): Likewise.
22712         (layout::annotation_line_showed_range_p): Likewise.
22713         (struct line_corrections): Likewise for field m_row.
22714         (line_corrections::line_corrections): Likewise for param "row".
22715         (layout::print_trailing_fixits): Likewise.
22716         (layout::get_state_at_point): Likewise.
22717         (layout::get_x_bound_for_row): Likewise.
22718         (layout::print_line): Likewise.
22719         (diagnostic_show_locus): Likewise for locals "last_line" and "row".
22720         (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
22721         * input.c (selftest::test_linenum_comparisons): New function.
22722         (selftest::input_c_tests): Call it.
22723         * selftest.c (selftest::test_assertions): Test ASSERT_GT,
22724         ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
22725         * selftest.h (ASSERT_GT): New macro.
22726         (ASSERT_GT_AT): New macro.
22727         (ASSERT_LT): New macro.
22728         (ASSERT_LT_AT): New macro.
22730 2018-03-14  Segher Boessenkool  <segher@kernel.crashing.org>
22732         PR rtl-optimization/84780
22733         * combine.c (distribute_links): Don't make a link based on pc_rtx.
22735 2018-03-14  Martin Liska  <mliska@suse.cz>
22737         * tree.c (record_node_allocation_statistics): Use
22738         get_stats_node_kind.
22739         (get_stats_node_kind): New function extracted from
22740         record_node_allocation_statistics.
22741         (free_node): Use get_stats_node_kind.
22743 2018-03-14  Richard Biener  <rguenther@suse.de>
22745         * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
22746         that the value-set of ANTIC_IN doesn't grow.
22748         Revert
22749         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
22750         member.
22751         (BB_VISITED_WITH_VISITED_SUCCS): New define.
22752         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
22754 2018-03-14  Julia Koval  <julia.koval@intel.com>
22756         * config.gcc (icelake-client, icelake-server): New.
22757         (icelake): Remove.
22758         * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
22759         (initial_ix86_arch_features): Ditto.
22760         (PTA_SKYLAKE): Add SGX.
22761         (PTA_ICELAKE): Remove.
22762         (PTA_ICELAKE_CLIENT): New.
22763         (PTA_ICELAKE_SERVER): New.
22764         (ix86_option_override_internal): Split up icelake on icelake client and
22765         icelake server.
22766         (get_builtin_code_for_version): Ditto.
22767         (fold_builtin_cpu): Ditto.
22768         * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
22769         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
22770         * config/i386/i386.h (processor_type): Ditto.
22771         * doc/invoke.texi: Ditto.
22773 2018-03-14  Jakub Jelinek  <jakub@redhat.com>
22775         PR sanitizer/83392
22776         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
22777         INTEGER_CST offset, add it together with bitpos / 8 and
22778         sign extend based on POINTER_SIZE.
22780         PR target/84844
22781         Revert
22782         2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
22784         PR target/78090
22785         * config/i386/constraints.md (Yc): New register constraint.
22786         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
22787         Use Yc constraint for alternative 2 of operand 0.  Remove
22788         preferred_for_speed attribute.
22790 2018-03-14  Richard Biener  <rguenther@suse.de>
22792         PR tree-optimization/84830
22793         * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
22794         with the old one to avoid oscillations.
22796 2018-03-13  Vladimir Makarov  <vmakarov@redhat.com>
22798         PR target/83712
22799         * lra-assigns.c (find_all_spills_for): Ignore uninteresting
22800         pseudos.
22801         (assign_by_spills): Return a flag of reload assignment failure.
22802         Do not process the reload assignment failures.  Do not spill other
22803         reload pseudos if they has the same reg class.  Update n if
22804         necessary.
22805         (lra_assign): Add a return arg.  Set up from the result of
22806         assign_by_spills call.
22807         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
22808         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
22809         usage_insns if it is not NULL.
22810         (spill_hard_reg_in_range): New function.
22811         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
22812         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
22813         function prototypes.
22814         (lra_assign): Change prototype.
22815         * lra.c (lra): Add code to deal with fails by splitting hard reg
22816         live ranges.
22818 2018-03-01  Palmer Dabbelt  <palmer@sifive.com>
22820         * config/riscv/riscv.opt (mrelax): New option.
22821         * config/riscv/riscv.c (riscv_file_start): Emit ".option
22822         "norelax" when riscv_mrelax is disabled.
22823         * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
22825 2018-03-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
22827         PR target/84743
22828         * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
22829         reassociation for int modes.
22831 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
22833         * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
22834         Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
22835         for big-endian.
22836         * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
22837         * config/aarch64/aarch64-sve.md
22838         (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
22839         (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
22840         (*extend<mode><Vwide>2): Rename to...
22841         (aarch64_sve_extend<mode><Vwide>2): ...this.
22842         (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
22843         renaming the old pattern to...
22844         (aarch64_sve_punpk<perm_hilo>_<mode>): ...this.  Only define
22845         unsigned packs.
22846         (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
22847         define_expand, renaming the old pattern to...
22848         (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
22849         (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
22850         (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
22851         account when deciding which SVE instruction the optab should use.
22852         (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
22854 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
22856         * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
22857         (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
22858         (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
22859         (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
22860         (tlsdesc_small_<mode>): Turn a define_expand and use
22861         tlsdesc_small_sve_<mode> for SVE.  Rename original define_insn to...
22862         (tlsdesc_small_advsimd_<mode>): ...this.
22863         (tlsdesc_small_sve_<mode>): New pattern.
22865 2018-03-13  Richard Sandiford  <richard.sandiford@linaro.org>
22867         * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
22868         (UNSPEC_UMUL_HIGHPART): New constants.
22869         (MUL_HIGHPART): New int iteraor.
22870         (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
22871         * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
22872         define_expand.
22873         (*<su>mul<mode>3_highpart): New define_insn.
22875 2018-03-13  Eric Botcazou  <ebotcazou@adacore.com>
22877         PR lto/84805
22878         * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
22879         incomplete types.
22881 2018-03-13  Martin Liska  <mliska@suse.cz>
22883         PR ipa/84658.
22884         * (sem_item_optimizer::sem_item_optimizer): Initialize new
22885         vector.
22886         (sem_item_optimizer::~sem_item_optimizer): Release it.
22887         (sem_item_optimizer::merge_classes): Register variable aliases.
22888         (sem_item_optimizer::fixup_pt_set): New function.
22889         (sem_item_optimizer::fixup_points_to_sets): Likewise.
22890         * ipa-icf.h: Declare new variables and functions.
22892 2018-03-13  Jakub Jelinek  <jakub@redhat.com>
22894         PR middle-end/84834
22895         * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
22896         integer_pow2p@2 and test integer_pow2p in condition.
22897         (A < 0 ? C : 0): Similarly for @1.
22899         PR middle-end/84831
22900         * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
22901         characters starting at p contain '\0' character, don't look beyond
22902         that.
22904         PR target/84827
22905         * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
22906         pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
22908         PR target/84828
22909         * reg-stack.c (change_stack): Change update_end var from int to
22910         rtx_insn *, if non-NULL don't update just BB_END (current_block), but
22911         also call set_block_for_insn on the newly added insns and rescan.
22913         PR target/84786
22914         * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
22915         on the last operand.
22917         PR c++/84704
22918         * tree.c (stabilize_reference_1): Return save_expr (e) for
22919         STATEMENT_LIST even if it doesn't have side-effects.
22921 2018-03-12  Jonathan Wakely  <jwakely@redhat.com>
22923         * doc/invoke.texi (-mclflushopt): Fix spelling of option.
22925 2018-03-12  Renlin Li  <renlin.li@arm.com>
22927         * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
22928         aarch64_output_scalar_simd_mov_immediate.
22930 2018-03-12  Martin Sebor  <msebor@redhat.com>
22932         PR tree-optimization/83456
22933         * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
22934         for perfectly overlapping calls to memcpy.
22935         (gimple_fold_builtin_memory_chk): Same.
22936         (gimple_fold_builtin_strcpy): Handle no-warning.
22937         (gimple_fold_builtin_stxcpy_chk): Same.
22938         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
22940 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
22942         * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
22943         parameter.  Use it for SFmode.
22944         (rs6000_function_arg_advance_1): Adjust.
22945         (rs6000_function_arg): Adjust.
22946         (rs6000_gimplify_va_arg): Pass false for that new parameter.
22948 2018-03-12  Segher Boessenkool  <segher@kernel.crashing.org>
22950         PR rtl-optimization/84169
22951         PR rtl-optimization/84780
22952         * combine.c (can_combine_p): Check for a 2-insn combination whether
22953         the destination register is used between the two insns, too.
22955 2018-03-12  Richard Biener  <rguenther@suse.de>
22957         PR tree-optimization/84803
22958         * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
22959         for refs DR analysis didn't process.
22961 2018-03-12  Richard Biener  <rguenther@suse.de>
22963         PR tree-optimization/84777
22964         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
22965         force-vectorize loops ignore whether we are optimizing for size.
22967 2018-03-12  Chung-Ju Wu  <jasonwucj@gmail.com>
22969         * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
22970         (TARGET_MD_ASM_ADJUST): Define.
22972 2018-03-12  Monk Chiang  <sh.chiang04@gmail.com>
22973             Kito Cheng  <kito.cheng@gmail.com>
22974             Chung-Ju Wu  <jasonwucj@gmail.com>
22976         * config/nds32/nds32.c (nds32_compute_stack_frame,
22977         nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
22978         nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
22979         nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
22980         nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
22981         * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
22982         NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
22983         * config/nds32/nds32.md (prologue, epilogue): Use macro
22984         NDS32_V3PUSH_AVAILABLE_P to do checking.
22986 2018-03-11  Jakub Jelinek  <jakub@redhat.com>
22988         PR debug/58150
22989         * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
22990         DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
22991         but on TYPE_SIZE.  Don't do anything for ENUM_IS_OPAQUE if not creating
22992         a new die.  Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE.  Guard
22993         addition of most attributes on !orig_type_die or the attribute not
22994         being present already.  Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
22996 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
22997             Chung-Ju Wu  <jasonwucj@gmail.com>
22999         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
23000         __NDS32_VH__ macro.
23001         * config/nds32/nds32.opt (mvh): New option.
23003 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
23004             Chung-Ju Wu  <jasonwucj@gmail.com>
23006         * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
23007         function.
23008         * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
23009         * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
23010         definition.
23012 2018-03-11  Kito Cheng  <kito.cheng@gmail.com>
23013             Chung-Ju Wu  <jasonwucj@gmail.com>
23015         * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
23016         function.
23017         * config/nds32/nds32-multiple.md (strlensi): New pattern.
23018         * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
23020 2018-03-11  Monk Chiang  <sh.chiang04@gmail.com>
23021             Kito Cheng  <kito.cheng@gmail.com>
23022             Chung-Ju Wu  <jasonwucj@gmail.com>
23024         * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
23025         UNSPEC_FFMISM and UNSPEC_FLMISM.
23026         * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
23027         for ffb, ffmism and flmism.
23028         * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
23029         (unspec_ffmism): Ditto.
23030         (unspec_flmism): Ditto.
23031         (nds32_expand_builtin_impl): Check if string extension is available.
23032         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
23033         NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
23035 2018-03-10  Vladimir Makarov  <vmakarov@redhat.com>
23037         Reverting patch:
23038         2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
23040         PR target/83712
23041         * lra-assigns.c (assign_by_spills): Return a flag of reload
23042         assignment failure.  Do not process the reload assignment
23043         failures.  Do not spill other reload pseudos if they has the same
23044         reg class.
23045         (lra_assign): Add a return arg.  Set up from the result of
23046         assign_by_spills call.
23047         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23048         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
23049         usage_insns if it is not NULL.
23050         (spill_hard_reg_in_range): New function.
23051         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23052         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23053         function prototypes.
23054         (lra_assign): Change prototype.
23055         * lra.c (lra): Add code to deal with fails by splitting hard reg
23056         live ranges.
23058 2018-03-10  H.J. Lu  <hongjiu.lu@intel.com>
23060         PR target/84807
23061         * config/i386/i386.opt: Replace Enforcment with Enforcement.
23063 2018-03-10  Alexandre Oliva  <aoliva@redhat.com>
23065         PR debug/84620
23066         * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
23067         (dw_val_node): Add val_symbolic_view.
23068         * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
23069         (symview_upper_bound): New.
23070         (new_line_info_table): Initialize symviews_since_reset.
23071         (dwarf2out_source_line): Count symviews_since_reset and set
23072         symview_upper_bound.
23073         (dw_val_equal_p): Handle symview.
23074         (add_AT_symview): New.
23075         (print_dw_val): Handle symview.
23076         (attr_checksum, attr_checksum_ordered): Likewise.
23077         (same_dw_val_p, size_of_die): Likewise.
23078         (value_format, output_die): Likewise.
23079         (add_high_low_attributes): Use add_AT_symview for entry_view.
23080         (dwarf2out_finish): Reset symview_upper_bound, clear
23081         zero_view_p.
23083 2018-03-09  Peter Bergner  <bergner@vnet.ibm.com>
23085         PR target/83969
23086         * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
23087         Add strict argument and use it.
23088         (rs6000_split_multireg_move): Update for new strict argument.
23089         (mem_operand_gpr): Disallow all non-offsettable addresses.
23090         * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
23092 2018-03-09  Jakub Jelinek  <jakub@redhat.com>
23094         PR target/84772
23095         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
23096         temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
23097         * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
23099         PR c++/84767
23100         * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
23101         decl, use remap_type if we want to use the type.
23103 2018-03-09  Martin Sebor  <msebor@redhat.com>
23105         PR tree-optimization/84526
23106         * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
23107         Remove dead code.
23108         (builtin_access::generic_overlap): Be prepared to handle non-array
23109         base objects.
23111 2018-03-09  Alexandre Oliva  <aoliva@redhat.com>
23113         PR rtl-optimization/84682
23114         * lra-constraints.c (process_address_1): Check is_address flag
23115         for address constraints.
23116         (process_alt_operands): Likewise.
23117         * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
23118         preprocess_constraints.
23119         * recog.h (preprocess_constraints): Add oploc parameter.
23120         Adjust callers.
23121         * recog.c (preprocess_constraints): Test address_operand for
23122         CT_ADDRESS constraints.
23124 2018-03-09  Vladimir Makarov  <vmakarov@redhat.com>
23126         PR target/83712
23127         * lra-assigns.c (assign_by_spills): Return a flag of reload
23128         assignment failure.  Do not process the reload assignment
23129         failures.  Do not spill other reload pseudos if they has the same
23130         reg class.
23131         (lra_assign): Add a return arg.  Set up from the result of
23132         assign_by_spills call.
23133         (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
23134         * lra-constraints.c (split_reg): Add a new arg.  Use it instead of
23135         usage_insns if it is not NULL.
23136         (spill_hard_reg_in_range): New function.
23137         (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
23138         * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
23139         function prototypes.
23140         (lra_assign): Change prototype.
23141         * lra.c (lra): Add code to deal with fails by splitting hard reg
23142         live ranges.
23144 2018-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23146         PR target/83193
23147         * common/config/arm/arm-common.c (arm_parse_arch_option_name):
23148         Accept complain bool parameter.  Only emit errors if it is true.
23149         (arm_parse_cpu_option_name): Likewise.
23150         (arm_target_thumb_only): Adjust callers of the above.
23151         * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
23152         prototype to take a default true bool parameter.
23153         (arm_parse_arch_option_name): Likewise.
23155 2018-03-09  David Malcolm  <dmalcolm@redhat.com>
23156             Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
23158         PR jit/64089
23159         PR jit/84288
23160         * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
23161         * configure: Regenerate.
23162         * configure.ac ("linker --version-script option"): New.
23163         ("linker soname option"): New.
23165 2018-03-09  Richard Biener  <rguenther@suse.de>
23167         PR tree-optimization/84775
23168         * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
23169         immediate uses of predicate stmts and mark them modified.
23171         Revert
23172         PR tree-optimization/84178
23173         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
23174         to caller.
23175         (version_loop_for_if_conversion): Delay update_ssa call.
23176         (tree_if_conversion): Delay update_ssa until after predicate
23177         insertion.
23179 2018-03-09  Eric Botcazou  <ebotcazou@adacore.com>
23181         PR target/84763
23182         * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
23183         when the function accesses prior frames.
23185 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
23187         PR debug/84456
23188         * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
23189         gen_llsym, otherwise call maybe_gen_llsym.
23191         PR inline-asm/84742
23192         * recog.c (asm_operand_ok): Return 0 if multi-character constraint
23193         has ',' character inside of it.
23195 2018-03-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23197         PR target/84748
23198         * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
23199         as clobbering CC_REGNUM.
23201 2018-03-08  Richard Biener  <rguenther@suse.de>
23203         PR middle-end/84552
23204         * tree-scalar-evolution.c: Include tree-into-ssa.h.
23205         (follow_copies_to_constant): Do not follow SSA names registered
23206         for update.
23208 2018-03-08  Richard Biener  <rguenther@suse.de>
23210         PR tree-optimization/84178
23211         * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
23212         to caller.
23213         (version_loop_for_if_conversion): Delay update_ssa call.
23214         (tree_if_conversion): Delay update_ssa until after predicate
23215         insertion.
23217 2018-03-08  David Malcolm  <dmalcolm@redhat.com>
23219         PR tree-optimization/84178
23220         * tree-if-conv.c (release_bb_predicate): Remove the
23221         the assertion that the stmts have NULL use_ops.
23222         Discard the statements, asserting that they haven't
23223         yet been added to a BB.
23225 2018-03-08  Richard Biener  <rguenther@suse.de>
23227         PR tree-optimization/84746
23228         * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
23229         (phi_translate): Pass in destination ANTIC_OUT set.
23230         (phi_translate_1): Likewise.  For a simplified result lookup
23231         a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
23232         (phi_translate_set): Adjust.
23233         (do_pre_regular_insertion): Likewise.
23234         (do_pre_partial_partial_insertion): Likewise.
23236 2018-03-08  Martin Liska  <mliska@suse.cz>
23238         PR gcov-profile/84735
23239         * doc/gcov.texi: Document usage of profile files.
23240         * gcov-io.h: Document changes in the format.
23242 2018-03-08  Alexandre Oliva  <aoliva@redhat.com>
23244         PR debug/84404
23245         PR debug/84408
23246         * dwarf2out.c (struct dw_line_info_table): Update comments for
23247         view == -1.
23248         (FORCE_RESET_NEXT_VIEW): New.
23249         (FORCE_RESETTING_VIEW_P): New.
23250         (RESETTING_VIEW_P): Check for -1 too.
23251         (ZERO_VIEW_P): Likewise.
23252         (new_line_info_table): Force-reset next view.
23253         (dwarf2out_begin_function): Likewise.
23254         (dwarf2out_source_line): Simplify zero_view_p initialization.
23255         Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
23256         view directly.  Omit view when omitting .loc at line 0.
23258 2018-03-08  Jakub Jelinek  <jakub@redhat.com>
23260         PR tree-optimization/84740
23261         * tree-switch-conversion.c (process_switch): Call build_constructors
23262         only if info.phi_count is non-zero.
23264         PR tree-optimization/84739
23265         * tree-tailcall.c (find_tail_calls): Check call arguments against
23266         DECL_ARGUMENTS (current_function_decl) rather than
23267         DECL_ARGUMENTS (func) when checking for tail recursion.
23269 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
23271         * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
23272         Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
23273         Volker Reichelt's entry and add entries for people that perform
23274         GCC fuzzy testing and report numerous bugs.
23276 2018-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
23278         PR target/82411
23279         * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
23280         readonly data in sdata, if that is disabled.
23281         * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
23282         * doc/invoke.texi (RS/6000 and PowerPC Options): Document
23283         -mreadonly-in-sdata option.
23285 2018-03-07  Martin Sebor  <msebor@redhat.com>
23287         PR tree-optimization/84468
23288         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
23289         basic block when looking for nul assignment.
23291 2018-03-07  Eric Botcazou  <ebotcazou@adacore.com>
23293         PR target/84277
23294         * except.h (output_function_exception_table): Adjust prototype.
23295         * except.c (output_function_exception_table): Remove FNNAME parameter
23296         and add SECTION parameter.  Ouput one part of the table at a time.
23297         * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
23298         the first part of the exception table and emit unwind directives.
23299         * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
23300         (i386_pe_seh_cold_init): Likewise.
23301         * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
23302         (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
23303         * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
23304         (ix86_output_call_insn): Emit a nop in one more case for SEH.
23305         * config/i386/winnt.c: Include except.h.
23306         (struct seh_frame_state): Add reg_offset, after_prologue and
23307         in_cold_section fields.
23308         (i386_pe_seh_end_prologue): Set seh->after_prologue.
23309         (i386_pe_seh_cold_init): New function.
23310         (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
23311         to seh->in_cold_section.
23312         (seh_emit_push): Record the offset of the push.
23313         (seh_emit_save): Record the offet of the save.
23314         (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
23315         Test seh->after_prologue to disregard the epilogue.
23316         (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
23317         (i386_pe_end_cold_function): New function.
23319 2018-03-07  Jakub Jelinek  <jakub@redhat.com>
23321         PR fortran/84565
23322         * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
23323         aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
23325         PR c++/84704
23326         * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
23327         on tmp_var.
23328         * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
23329         don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
23331         PR middle-end/84723
23332         * multiple_target.c: Include tree-inline.h and intl.h.
23333         (expand_target_clones): Diagnose and fail if node->definition and
23334         !tree_versionable_function_p (node->decl).
23336 2018-03-06  John David Anglin  <danglin@gcc.gnu.org>
23338         * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
23339         sprint_ul.
23340         (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
23341         (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
23342         * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
23344 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
23346         PR target/84710
23347         * combine.c (try_combine): Use reg_or_subregno instead of handling
23348         just paradoxical SUBREGs and REGs.
23350 2018-03-06  Claudiu Zissulescu  <claziss@synopsys.com>
23352         * config/arc/arc.c (arc_finalize_pic): Remove function.
23353         (arc_must_save_register): We use single base PIC register, remove
23354         checks to save/restore the PIC register.
23355         (arc_expand_prologue): Likewise.
23356         * config/arc/arc-protos.h (arc_set_default_type_attributes):
23357         Remove.
23358         (arc_verify_short): Likewise.
23359         (arc_attr_type): Likewise.
23360         * config/arc/arc.c (arc_set_default_type_attributes): Remove.
23361         (walk_stores): Likewise.
23362         (arc_address_cost): Make it static.
23363         (arc_verify_short): Likewise.
23364         (branch_dest): Likewise.
23365         (arc_attr_type): Likewise.
23366         * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
23367         (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
23368         (arc_final_prescan_insn): Remove inserting the nops due to
23369         hardware hazards.  It is done in reorg step.
23370         (insn_length_variant_t): Remove.
23371         (insn_length_parameters_t): Likewise.
23372         (arc_insn_length_parameters): Likewise.
23373         (arc_get_insn_variants): Likewise.
23374         * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
23376 2018-03-06  Jakub Jelinek  <jakub@redhat.com>
23378         PR inline-asm/84683
23379         * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
23380         assertion failure.
23382         PR tree-optimization/84687
23383         * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
23384         on new_node->decl.
23385         * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
23387 2018-03-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23389         * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
23390         Rename to ppc_speculation_barrier.
23391         * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
23392         __builtin_ppc_speculation_barrier.
23394 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
23396         PR target/84700
23397         * combine.c (combine_simplify_rtx): Don't try to simplify if
23398         if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
23399         are equal to x.
23401 2018-03-05  Segher Boessenkool  <segher@kernel.crashing.org>
23403         * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
23404         to 32 bytes when compiling for POWER9.
23406 2018-03-05  Jakub Jelinek  <jakub@redhat.com>
23408         PR target/84564
23409         * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
23410         regparm >= 3 with no arg reg available also for calls with
23411         flag_force_indirect_call.  Pass decl to ix86_function_regparm.
23413         PR target/84524
23414         * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
23415         orig,vex.
23416         (*<plusminus_insn><mode>3): Likewise.  Remove <mask_operand3> uses.
23418 2018-03-05  Peter Bergner  <bergner@vnet.ibm.com>
23420         PR target/84264
23421         * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
23423 2018-03-05  Richard Biener  <rguenther@suse.de>
23425         PR tree-optimization/84486
23426         * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
23427         When inserting a __builtin_assume_aligned call set the LHS
23428         SSA name alignment info accordingly.
23430 2018-03-05  Wilco Dijkstra  <wdijkstr@arm.com>
23432         PR tree-optimization/84114
23433         * config/aarch64/aarch64.c (aarch64_reassociation_width)
23434         Avoid reassociation of FLOAT_MODE addition.
23436 2018-03-05  Olga Makhotina  <olga.makhotina@intel.com>
23438         * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
23439         OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
23440         OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
23441         (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
23442         * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
23443         * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
23444         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
23445         and -mwbnoinvd.
23446         * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
23447         __builtin_ia32_wbinvd): New builtins.
23448         (SPECIAL_ARGS2): New.
23449         * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
23450         (SPECIAL_ARGS2): New.
23451         * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
23452         (ix86_valid_target_attribute_inner_p): Ditto.
23453         (ix86_init_mmx_sse_builtins): Add special_args2.
23454         * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
23455         TARGET_WBNOINVD_P): New.
23456         * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
23457         (define_insn "wbinvd", define_insn "wbnoinvd"): New.
23458         * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
23459         * config/i386/immintrin.h (_wbinvd): New intrinsic.
23460         * config/i386/pconfigintrin.h: New file.
23461         * config/i386/wbnoinvdintrin.h: Ditto.
23462         * config/i386/x86intrin.h: Add headers pconfigintrin.h and
23463         wbnoinvdintrin.h.
23464         * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
23466 2018-03-05  Richard Biener  <rguenther@suse.de>
23468         PR tree-optimization/84670
23469         * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
23470         member.
23471         (BB_VISITED_WITH_VISITED_SUCCS): New define.
23472         (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
23473         (compute_antic_aux): Only assert the number of values in ANTIC_IN
23474         doesn't grow if all successors (recursively) were visited at least
23475         once.
23477 2018-03-05  Richard Biener  <rguenther@suse.de>
23479         PR tree-optimization/84650
23480         * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
23481         if executed in the loop pipeline.
23483 2018-03-05  Sandra Loosemore  <sandra@codesourcery.com>
23485         * doc/configfiles.texi (Configuration Files): Move info about
23486         conditionalizing $target-protos.h to...
23487         * doc/sourcebuild.texi (Back End): Here.  Explain how $target.h
23488         differs from $target-protos.h.
23490 2018-03-05  Kito Cheng  <kito.cheng@gmail.com>
23491             Chung-Ju Wu  <jasonwucj@gmail.com>
23493         * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
23494         * config/nds32/nds32-multiple.md (setmemsi): Define.
23495         * config/nds32/nds32-memory-manipulation.c
23496         (nds32_gen_dup_4_byte_to_word_value): New.
23497         (emit_setmem_word_loop): New.
23498         (emit_setmem_byte_loop): New.
23499         (nds32_expand_setmem_loop): New.
23500         (nds32_expand_setmem_loop_v3m): New.
23501         (nds32_expand_setmem_unroll): New.
23502         (nds32_expand_setmem): New.
23504 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
23505             Chung-Ju Wu  <jasonwucj@gmail.com>
23507         * config/nds32/nds32-memory-manipulation.c
23508         (nds32_emit_load_store): New.
23509         (nds32_emit_post_inc_load_store): New.
23510         (nds32_emit_mem_move): New.
23511         (nds32_emit_mem_move_block): New.
23512         (nds32_expand_movmemsi_loop_unknown_size): New.
23513         (nds32_expand_movmemsi_loop_known_size): New.
23514         (nds32_expand_movmemsi_loop): New.
23515         (nds32_expand_movmemsi_unroll): New.
23516         (nds32_expand_movmemqi): Rename ...
23517         (nds32_expand_movmemsi): ... to this.
23518         * config/nds32/nds32-multiple.md (movmemqi): Rename ...
23519         (movmemsi): ... to this.
23520         * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
23521         (nds32_expand_movmemsi): ... to this.
23523 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
23524             Monk Chiang  <sh.chiang04@gmail.com>
23525             Chung-Ju Wu  <jasonwucj@gmail.com>
23527         * config/nds32/nds32-protos.h
23528         (nds32_expand_load_multiple): New arguments.
23529         (nds32_expand_store_multiple): Ditto.
23530         (nds32_valid_multiple_load_store): Rename ...
23531         (nds32_valid_multiple_load_store_p): ... to this.
23532         * config/nds32/nds32-memory-manipulation.c
23533         (nds32_expand_load_multiple): Refine implementation.
23534         (nds32_expand_store_multiple): Ditto.
23535         * config/nds32/nds32-multiple.md
23536         (load_multiple): Update nds32_expand_load_multiple interface.
23537         (store_multiple): Update nds32_expand_store_multiple interface.
23538         * config/nds32/nds32-predicates.c
23539         (nds32_valid_multiple_load_store): Rename ...
23540         (nds32_valid_multiple_load_store_p): ... to this and refine
23541         implementation.
23542         * config/nds32/predicates.md
23543         (nds32_load_multiple_and_update_address_operation): New predicate.
23544         (nds32_store_multiple_and_update_address_operation): New predicate.
23546 2018-03-04  Kito Cheng  <kito.cheng@gmail.com>
23547             Chung-Ju Wu  <jasonwucj@gmail.com>
23549         * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
23550         (combo): New attribute.
23551         * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
23553 2018-03-03  Chung-Ju Wu  <jasonwucj@gmail.com>
23555         * config/nds32/nds32.opt: Change -mcmodel= default value.
23557 2018-03-03  Kito Cheng  <kito.cheng@gmail.com>
23558             Monk Chiang  <sh.chiang04@gmail.com>
23559             Chung-Ju Wu  <jasonwucj@gmail.com>
23561         * config/nds32/constants.md (unspec_element): New enum.
23562         * config/nds32/constraints.md (Umw): New constraint.
23563         * config/nds32/nds32-intrinsic.c: Add more builtin functions.
23564         * config/nds32/nds32-intrinsic.md: Likewise.
23565         * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
23566         (nds32_valid_smw_lwm_base_p): New.
23567         (nds32_output_smw_single_word): New.
23568         (nds32_output_lmw_single_word): New.
23569         (nds32_expand_unaligned_load): New.
23570         (nds32_expand_unaligned_store): New.
23571         * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
23572         (nds32_output_smw_single_word): Declare.
23573         (nds32_output_lmw_single_word): Declare.
23574         (nds32_expand_unaligned_load): Declare.
23575         (nds32_expand_unaligned_store): Declare.
23576         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
23577         NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
23578         NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
23579         NDS32_BUILTIN_UASTORE_DW.
23580         * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
23581         predicate.
23583 2018-03-03  Monk Chiang  <sh.chiang04@gmail.com>
23584             Kito Cheng  <kito.cheng@gmail.com>
23585             Chung-Ju Wu  <jasonwucj@gmail.com>
23587         * config/nds32/nds32-intrinsic.c
23588         (nds32_expand_builtin_null_ftype_reg): Delete.
23589         (nds32_expand_builtin_reg_ftype_imm): Ditto.
23590         (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
23591         (nds32_read_argument): New.
23592         (nds32_legitimize_target): Ditto.
23593         (nds32_legitimize_argument): Ditto.
23594         (nds32_check_constant_argument): Ditto.
23595         (nds32_expand_unop_builtin): Ditto.
23596         (nds32_expand_unopimm_builtin): Ditto.
23597         (nds32_expand_binop_builtin): Ditto.
23598         (nds32_builtin_decl_impl): Ditto.
23599         (builtin_description): Ditto.
23600         (nds32_expand_builtin_impl): Rewrite with new infrastructure.
23601         (nds32_init_builtins_impl): Ditto.
23602         * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
23603         (nds32_builtin_decl): New.
23604         * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
23605         * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
23607 2018-03-02  Jeff Law  <law@redhat.com>
23609         * reorg.c (stop_search_p): Handle DEBUG_INSN.
23610         (redundant_insn, fill_simple_delay_slots): Likewise.
23611         (fill_slots_from_thread): Likewise.
23612         * resource.c (mark_referenced_resources): Likewise.
23613         (mark_set_resources, find_dead_or_set_registers): Likewise.
23615 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
23617         * substring-locations.h (format_warning_va): Formatting fix for
23618         ATTRIBUTE_GCC_DIAG.
23619         (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
23620         argument.
23621         (format_warning_n_va, format_warning_at_substring_n): New prototypes.
23622         * substring-locations.c: Include intl.h.
23623         (format_warning_va): Turned into small wrapper around
23624         format_warning_n_va, renamed to ...
23625         (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
23626         rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
23627         use ngettext.
23628         (format_warning_at_substring_n): New function.
23629         * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
23630         (fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
23631         format_warning_at_substring with just a shorter name instead of
23632         const function pointer.
23633         (fmtwarn_n): New function.
23634         (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
23635         appropriate, get rid of all the fmtstr temporaries, move conditionals
23636         with G_() wrapped string literals directly into fmtwarn arguments,
23637         cast dir.len to (int), formatting fixes.
23639 2018-03-02  Thomas Schwinge  <thomas@codesourcery.com>
23641         * doc/invoke.texi: Remove "Cilk Plus" references.
23643 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
23644             Richard Biener  <rguenther@suse.de>
23646         PR ipa/84628
23647         * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
23648         for error or warning attributes if CALL_FROM_THUNK_P is set.
23649         Formatting fixes.
23651 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
23653         PR target/56540
23654         * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
23655         __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
23657         PR target/56540
23658         * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
23659         __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
23661         * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
23662         instead of -1U in last predictors element's probability member.
23664 2018-03-02  Eric Botcazou  <ebotcazou@adacore.com>
23666         PR ipa/83983
23667         * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
23668         arguments if they are comparable.
23670 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
23672         PR tree-optimization/84634
23673         * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
23674         masks and masked_loop_p with a single loop_masks, making sure it's
23675         null for bb vectorization.
23677 2018-03-02  Richard Sandiford  <richard.sandiford@linaro.org>
23679         * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
23680         (vect_analyze_data_ref_access): Use loop->safe_len rather than
23681         loop->force_vectorize to check whether there is no alias.
23683 2018-03-02  Jakub Jelinek  <jakub@redhat.com>
23685         PR target/84614
23686         * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
23687         prototypes.
23688         * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
23689         comments.
23690         (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
23691         * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
23692         instead of a loop around prev_real_insn.
23693         * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
23694         prev_real_insn.
23696         PR inline-asm/84625
23697         * config/i386/i386.c (ix86_print_operand): Use conditional
23698         output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
23699         zero vector.
23701 2018-03-02  Richard Biener  <rguenther@suse.de>
23703         PR tree-optimization/84427
23704         * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
23705         (bitmap_set_subtract_values): Rewrite to handle multiple
23706         exprs per value.
23707         (clean): Likewise.
23708         (prune_clobbered_mems): Likewise.
23709         (phi_translate): Take edge instead of pred/phiblock.
23710         (phi_translate_1): Likewise.
23711         (phi_translate_set): Likewise.  Insert all translated
23712         exprs for a value into the set, keeping possibly multiple
23713         expressions per value.
23714         (compute_antic_aux): Adjust for phi_translate changes.
23715         When intersecting union the expressions and prune those
23716         not in the final value set, keeping possibly multiple
23717         expressions per value.  Do not use value-insertion
23718         for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
23719         all expressions.  Add verification that the value-sets
23720         only shrink during iteration.
23721         (compute_partial_antic_aux): Adjust for the phi_translate changes.
23722         (do_pre_regular_insertion): Likewise.
23723         (do_pre_partial_partial_insertion): Likewise.
23725 2018-03-02  Richard Biener  <rguenther@suse.de>
23727         PR target/82005
23728         * config/darwin.c (saved_debug_info_level): New static global.
23729         (darwin_asm_lto_start): Disable debug info generation for LTO out.
23730         (darwin_asm_lto_end): Restore debug info generation settings.
23732 2018-03-01  Martin Liska  <mliska@suse.cz>
23734         PR sanitizer/82484
23735         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
23736         volatile arguments.
23738 2018-03-01  Richard Biener  <rguenther@suse.de>
23740         PR debug/84645
23741         * dwarf2out.c (gen_variable_die): Properly handle late VLA
23742         type annotation with LTO when debug was disabled at compile-time.
23744 2018-03-01  Matthew Fortune  <mfortune@gmail.com>
23746         * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
23747         XINT with INTVAL.
23748         (mips_final_postscan_insn): Likewise.
23750 2018-03-01  Richard Sandiford  <richard.sandiford@linaro.org>
23752         PR rtl-optimization/84528
23753         * alias.c (init_alias_target): Add commentary.
23754         (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
23755         a unique base value if the frame pointer is not eliminated
23756         to the stack pointer.
23758 2018-03-01  Tom de Vries  <tom@codesourcery.com>
23760         PR rtl-optimization/83327
23761         * lra-int.h (hard_regs_spilled_into): Declare.
23762         * lra.c (hard_regs_spilled_into): Define.
23763         (init_reg_info): Init hard_regs_spilled_into.
23764         * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
23765         * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
23766         (process_bb_lives): Handle hard_regs_spilled_into.
23767         (lra_create_live_ranges_1): Before doing liveness propagation, clear
23768         regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
23770 2018-02-28  David Edelsohn  <dje.gcc@gmail.com>
23772         * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
23773         (powerpc-ibm-aix[789]*): Default to AIX 7.2.
23774         * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
23775         * config/rs6000/aix72.h: New file.
23777 2018-02-28  Jakub Jelinek  <jakub@redhat.com>
23779         * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
23780         instead of warning_at with conditional singular and plural messages
23781         where possible.
23783         PR target/52991
23784         * stor-layout.c (update_alignment_for_field): For
23785         targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
23786         && !DECL_PACKED (field), do the alignment update, just use
23787         only desired_align instead of MAX (type_align, desired_align)
23788         as the alignment.
23789         (place_field): Don't do known_align < desired_align handling
23790         early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
23791         is non-NULL, instead do it after rli->prev_field handling and
23792         only if not within a bitfield word.  For DECL_PACKED (field)
23793         use type_align of BITS_PER_UNIT.
23795 2018-02-28  Eric Botcazou  <ebotcazou@adacore.com>
23797         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
23798         superfluous parentheses and trailing spaces.
23800 2018-02-28  Richard Biener  <rguenther@suse.de>
23802         PR tree-optimization/84584
23803         * graphite-scop-detection.c (scop_detection::add_scop): Discard
23804         SCoPs with fake exit edge.
23806 2018-02-28  Martin Liska  <mliska@suse.cz>
23808         PR testsuite/84597
23809         * timevar.c (timer::print): Fix format to properly print 100%
23810         values.
23812 2018-02-28  Richard Biener  <rguenther@suse.de>
23814         PR middle-end/84607
23815         * genmatch.c (capture_info::walk_match): Do not mark
23816         captured expressions without operands as expr_p given
23817         they act more like predicates and should be subject to
23818         "lost tail" side-effect preserving.
23820 2018-02-28  Alexandre Oliva  <aoliva@redhat.com>
23822         PR rtl-optimization/81611
23823         * auto-inc-dec.c (attempt_change): Move dead note from
23824         mem_insn if it's the next use of regno
23825         (find_address): Take address use of reg holding
23826         non-incremented value.  Add parm to limit search to the named
23827         reg only.
23828         (merge_in_block): Attempt to use a mem insn that is the next
23829         use of the original regno.
23831 2018-02-27  Martin Sebor  <msebor@redhat.com>
23833         PR c++/83871
23834         * doc/invoke.texi (-Wmissing-attributes): New option.
23835         * print-tree.c (print_node): Handle DECL_UNINLINABLE.
23837 2018-02-27  Martin Sebor  <msebor@redhat.com>
23839         PR translation/84207
23840         * diagnostic-core.h (warning_n, error_n, inform_n): Change
23841         n argument to unsigned HOST_WIDE_INT.
23842         * diagnostic.c (warning_n, error_n, inform_n): Ditto.
23843         (diagnostic_n_impl): Ditto.  Handle arguments in excess of LONG_MAX.
23844         * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
23845         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
23847 2018-02-27  Richard Biener  <rguenther@suse.de>
23849         PR tree-optimization/84512
23850         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
23851         Do not use the estimate returned from record_stmt_cost for
23852         the scalar iteration cost but sum properly using add_stmt_cost.
23854 2018-02-27  Richard Biener  <rguenther@suse.de>
23856         PR tree-optimization/84466
23857         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
23858         Adjust last change to less strictly validate use operands.
23860 2018-02-27  Martin Liska  <mliska@suse.cz>
23862         PR gcov-profile/84548
23863         * gcov.c (process_file): Allow partial overlap and consider it
23864         also as group functions.
23865         (output_lines): Properly calculate range of lines for a group.
23867 2018-02-27  Martin Liska  <mliska@suse.cz>
23869         * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
23870         'ggc' suffixes.  Change first column width.
23871         (timer::print): Fix formatting of the column.
23873 2018-02-27  Alexandre Oliva  <aoliva@redhat.com>
23875         * tree-ssa-live.c (remove_unused_scope_block_p): Do not
23876         preserve inline entry blocks for the sake of debug inline
23877         entry point markers alone.
23878         (remove_unused_locals): Suggest in comments a better place to
23879         force the preservation of inline entry blocks that are
23880         otherwise unused, but do not preserve them.
23882 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
23884         * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
23886 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
23888         PR target/84039
23889         * config/i386/constraints.md (Bs): Replace
23890         ix86_indirect_branch_register with
23891         TARGET_INDIRECT_BRANCH_REGISTER.
23892         (Bw): Likewise.
23893         * config/i386/i386.md (indirect_jump): Likewise.
23894         (tablejump): Likewise.
23895         (*sibcall_memory): Likewise.
23896         (*sibcall_value_memory): Likewise.
23897         Peepholes of indirect call and jump via memory: Likewise.
23898         (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
23899         (*sibcall_value_GOT_32): Likewise.
23900         * config/i386/predicates.md (indirect_branch_operand): Likewise.
23901         (GOT_memory_operand): Likewise.
23902         (call_insn_operand): Likewise.
23903         (sibcall_insn_operand): Likewise.
23904         (GOT32_symbol_operand): Likewise.
23905         * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
23907 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
23909         PR rtl-optimization/83496
23910         * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
23911         booleans to RTXes.  Call fix_reg_dead_note on every non-null element.
23912         (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
23913         redundant insn, if any.
23914         (relax_delay_slots): Likewise.
23915         (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
23917 2018-02-26  Richard Sandiford  <richard.sandiford@linaro.org>
23919         PR tree-optimization/83965
23920         * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
23921         that grouped statements are part of a reduction chain.  Return
23922         true if the statement is not marked as a reduction itself but
23923         is part of a group.
23924         (vect_recog_dot_prod_pattern): Don't check whether the statement
23925         is part of a group here.
23926         (vect_recog_sad_pattern): Likewise.
23927         (vect_recog_widen_sum_pattern): Likewise.
23929 2018-02-26  Eric Botcazou  <ebotcazou@adacore.com>
23931         PR debug/84545
23932         * final.c (rest_of_clean_state): Also look for calls inside sequences.
23934 2018-02-26  H.J. Lu  <hongjiu.lu@intel.com>
23936         PR target/84530
23937         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
23938         the bool argument.
23939         (ix86_output_indirect_function_return): New prototype.
23940         (ix86_split_simple_return_pop_internal): Likewise.
23941         * config/i386/i386.c (indirect_return_via_cx): New.
23942         (indirect_return_via_cx_bnd): Likewise.
23943         (indirect_thunk_name): Handle return va CX_REG.
23944         (output_indirect_thunk_function): Create alias for
23945         __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
23946         (ix86_output_indirect_jmp): Remove the bool argument.
23947         (ix86_output_indirect_function_return): New function.
23948         (ix86_split_simple_return_pop_internal): Likewise.
23949         * config/i386/i386.md (*indirect_jump): Don't pass false
23950         to ix86_output_indirect_jmp.
23951         (*tablejump_1): Likewise.
23952         (simple_return_pop_internal): Change it to define_insn_and_split.
23953         Call ix86_split_simple_return_pop_internal to split it for
23954         -mfunction-return=.
23955         (simple_return_indirect_internal): Call
23956         ix86_output_indirect_function_return instead of
23957         ix86_output_indirect_jmp.
23959 2018-02-26  Jakub Jelinek  <jakub@redhat.com>
23961         PR bootstrap/84405
23962         * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
23963         memset and value initialization afterwards.
23965 2018-02-26  Christophe Lyon  <christophe.lyon@linaro.org>
23967         * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
23969 2018-02-26  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
23971         PR target/84521
23972         * common/config/aarch64/aarch64-common.c
23973         (aarch_option_optimization_table[]): Switch
23974         off fomit-frame-pointer
23976 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
23977             Chung-Ju Wu  <jasonwucj@gmail.com>
23979         * config/nds32/nds32-multiple.md (load_multiple): Disallow
23980         volatile memory.
23981         (store_multiple): Ditto.
23983 2018-02-26  Kito Cheng  <kito.cheng@gmail.com>
23985         * config.gcc: Add --with-cpu support for nds32 target.
23986         * config/nds32/nds32-opts.h (nds32_cpu_type): New.
23987         * config/nds32/nds32.opt: Add -mcpu= option.
23989 2018-02-25  Segher Boessenkool  <segher@kernel.crashing.org>
23991         * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
23992         isel=yes): Warn for these deprecated options.
23994 2018-02-23  David Edelsohn  <dje.gcc@gmail.com>
23996         * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
23997         ISA_2_5_MASKS_EMBEDDED.
23999 2018-02-23  Jakub Jelinek  <jakub@redhat.com>
24001         * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
24002         p->max as pointers rather than using iterative_hash_expr.
24004 2018-02-23  Carl Love  <cel@us.ibm.com>
24006         * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
24007         macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
24008         BU_P8V_OVERLOAD_2.
24009         * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
24010         P8V_BUILTIN_VEC_VSIGNED2.  Change VSX_BUILTIN_VEC_VUNSIGNED2 to
24011         P8V_BUILTIN_VEC_VUNSIGNED2.
24013 2018-02-22  Vladimir Makarov  <vmakarov@redhat.com>
24015         PR target/81572
24016         * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
24017         * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
24018         LRA_UNKNOWN_ALT.
24019         * lra-constraints.c (curr_insn_transform): Set up
24020         LRA_NON_CLOBBERED_ALT for moves processed on the fast path.  Use
24021         LRA_UNKNOWN_ALT.
24022         (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
24023         * lra-eliminations.c (spill_pseudos): Ditto.
24024         (process_insn_for_elimination): Ditto.
24025         * lra-lives.c (reg_early_clobber_p): Use the new macros.
24026         * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
24027         LRA_NON_CLOBBERED_ALT.
24029 2018-02-22  Martin Sebor  <msebor@redhat.com>
24031         PR tree-optimization/84480
24032         * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
24033         to maybe_diag_stxncpy_trunc.  Call it.
24034         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
24035         from gimple_fold_builtin_strcpy.  Print inlining stack.
24036         (handle_builtin_stxncpy): Print inlining stack.
24037         * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
24039 2018-02-22  H.J. Lu  <hongjiu.lu@intel.com>
24041         PR target/84176
24042         * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
24043         error when -mindirect-branch=thunk-extern, -fcf-protection=branch
24044         and -fcheck-pointer-bounds are used together.
24045         (indirect_thunk_prefix): New enum.
24046         (indirect_thunk_need_prefix): New function.
24047         (indirect_thunk_name): Replace need_bnd_p with need_prefix.  Use
24048         "_nt" instead of "_bnd" for NOTRACK prefix.
24049         (output_indirect_thunk): Replace need_bnd_p with need_prefix.
24050         (output_indirect_thunk_function): Likewise.
24051         (): Likewise.
24052         (ix86_code_end): Update output_indirect_thunk_function calls.
24053         (ix86_output_indirect_branch_via_reg): Replace
24054         ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
24055         (ix86_output_indirect_branch_via_push): Likewise.
24056         (ix86_output_function_return): Likewise.
24057         * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
24058         incompatible with -fcf-protection=branch and
24059         -fcheck-pointer-bounds.
24061 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
24063         PR target/83335
24064         * config/aarch64/aarch64.c (aarch64_print_address_internal):
24065         Change gcc_assert call to output_operand_lossage.
24067 2018-02-22  Steve Ellcey  <sellcey@cavium.com>
24069         * doc/extend.texi (__builtin_extend_pointer): Document builtin.
24071 2018-02-22  DJ Delorie  <dj@redhat.com>
24072             Sebastian Perta  <sebastian.perta@renesas.com>
24073             Oleg Endo  <olegendo@gcc.gnu.org>
24075         * config/rx/rx.c (rx_rtx_costs): New function.
24076         (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
24078 2018-02-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24080         * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
24082 2018-02-22  Martin Liska  <mliska@suse.cz>
24084         PR driver/83193
24085         * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
24086         Add "native" as a possible value.
24088 2018-02-22  Martin Liska  <mliska@suse.cz>
24090         PR driver/83193
24091         * config/i386/i386.c (ix86_option_override_internal):
24092         Add "native" as a possible value for -march and -mtune.
24094 2018-02-22  Jakub Jelinek  <jakub@redhat.com>
24096         PR target/84502
24097         * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
24098         to all type variants.
24100         PR tree-optimization/84503
24101         * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
24102         width as info->bitpos + info->bitsize - start.
24103         (merged_store_group::merge_overlapping): Simplify width computation.
24104         (check_no_overlap): New function.
24105         (imm_store_chain_info::try_coalesce_bswap): Compute expected
24106         start + width and last_order of the group, fail if check_no_overlap
24107         fails.
24108         (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
24109         to group if check_no_overlap fails.
24111 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
24113         * config/rs6000/altivec.md: Delete contraint arguments to
24114         define_expand, define_split, and define_peephole2, and in
24115         define_insn_and_split if always unused.
24116         * config/rs6000/darwin.md: Ditto.
24117         * config/rs6000/dfp.md: Ditto.
24118         * config/rs6000/rs6000.md: Ditto.
24119         * config/rs6000/sync.md: Ditto.
24120         * config/rs6000/vector.md: Ditto.
24121         * config/rs6000/vsx.md: Ditto.
24123 2018-02-21  Segher Boessenkool  <segher@kernel.crashing.org>
24125         * config/rs6000/altivec.md: Write output control strings as braced
24126         blocks instead of double-quoted strings.
24127         * config/rs6000/darwin.md: Ditto.
24128         * config/rs6000/rs6000.md: Ditto.
24129         * config/rs6000/vector.md: Ditto.
24130         * config/rs6000/vsx.md: Ditto.
24132 2018-02-21  Jason Merrill  <jason@redhat.com>
24134         PR c++/84314 - ICE with templates and fastcall attribute.
24135         * attribs.c (build_type_attribute_qual_variant): Remove assert.
24137 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
24139         * ipa-cp.c (determine_versionability): Fix comment typos.
24141 2018-02-21  Jan Hubicka  <hubicka@ucw.cz>
24143         PR c/84229
24144         * ipa-cp.c (determine_versionability): Do not version functions caling
24145         va_arg_pack.
24147 2018-02-21  Martin Liska  <mliska@suse.cz>
24149         PR driver/83193
24150         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
24151         Add "native" as a possible value.
24152         * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT):  Define
24153         the macro when native cpu detection is available.
24155 2018-02-21  Martin Liska  <mliska@suse.cz>
24157         PR driver/83193
24158         * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
24159         Add "native" as a possible value.
24160         * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
24161         when native cpu detection is available.
24163 2018-02-21  Jakub Jelinek  <jakub@redhat.com>
24164             Martin Sebor  <msebor@redhat.com>
24166         PR tree-optimization/84478
24167         * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
24168         false.
24169         * gimple-fold.c (get_range_strlen): Make minlen const and assume it
24170         can't be NULL.  Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
24171         support which is conservatively correct, for 2 only stay conservative
24172         for maxlen.  Formatting and comment capitalization fixes.  Add STRICT
24173         argument to the 2 argument get_range_strlen, adjust 6 arg
24174         get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
24175         false.
24176         (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
24177         (gimple_fold_builtin_strlen): Pass true as last argument to
24178         get_range_strlen.
24180 2018-02-20  Martin Sebor  <msebor@redhat.com>
24182         PR middle-end/84095
24183         * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
24184         (builtin_memref::set_base_and_offset): Same.  Handle inner references.
24185         (builtin_memref::builtin_memref): Factor out parts into
24186         set_base_and_offset and call it.
24188 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
24190         PR middle-end/84406
24191         * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
24192         is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
24193         greater precision.  If to_mode is a MODE_PARTIAL_INT, stop the
24194         search at the associated MODE_INT.
24196 2018-02-20  Jeff Law  <law@redhat.com>
24198         PR middle-end/82123
24199         PR tree-optimization/81592
24200         PR middle-end/79257
24201         * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
24202         for range data rather than using global data.
24203         * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
24204         range data rather than using global data.
24205         * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
24206         pass it to children as needed.
24207         (struct directive::fmtresult): Similarly.
24208         (struct directive::set_width): Similarly.
24209         (struct directive::set_precision): Similarly.
24210         (format_integer, format_directive, parse_directive): Similarly.
24211         (format_none): Accept unnamed vr_values parameter.
24212         (format_percent, format_floating, format_character): Similarly.
24213         (format_string, format_plain): Similarly.
24214         * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
24215         the EVRP range analyzer for range data rather than using global data.
24216         * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
24217         gimple-ssa-evrp-analyze.h
24218         (class sprintf_dom_walker): Add after_dom_children member function.
24219         Add evrp_range_analyzer member.
24220         (sprintf_dom_walker::before_dom_children): Call into the EVRP
24221         range analyzer as needed.
24222         (sprintf_dom_walker::after_dom_children): New member function.
24223         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
24224         if not optimizing.
24225         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
24226         (evrp_range_analyzer::pop_to_marker): Likewise.
24228 2018-02-20  Richard Sandiford  <richard.sandiford@linaro.org>
24230         PR tree-optimization/84419
24231         * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
24232         with the required type if its current type is compatible but
24233         different.
24235 2018-02-20  Jakub Jelinek  <jakub@redhat.com>
24237         PR middle-end/82004
24238         * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
24239         after vectorization.
24241 2018-02-20  Martin Liska  <mliska@suse.cz>
24243         PR driver/83193
24244         * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
24245         possible values if we don't have a hint.
24247 2018-02-20  Martin Liska  <mliska@suse.cz>
24249         PR c/84310
24250         PR target/79747
24251         * final.c (shorten_branches): Build align_tab array with one
24252         more element.
24253         * opts.c (finish_options): Add alignment option limit check.
24254         (MAX_CODE_ALIGN): Likewise.
24255         (MAX_CODE_ALIGN_VALUE): Likewise.
24256         * doc/invoke.texi: Document maximum allowed option value for
24257         all -falign-* options.
24259 2018-02-19  Jakub Jelinek  <jakub@redhat.com>
24261         PR target/84146
24262         * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
24263         * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
24264         * var-tracking.c (emit_note_insn_var_location): Remove all references
24265         to NOTE_INSN_CALL_ARG_LOCATION.
24266         (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
24267         the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
24268         Use copy_rtx_if_shared.
24269         * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
24270         NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
24271         (dwarf2out_var_location): Remove handling of
24272         NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
24273         on call_insn.
24274         * final.c (final_scan_insn): Remove all references to
24275         NOTE_INSN_CALL_ARG_LOCATION.
24276         (rest_of_clean_state): Likewise.  Remove REG_CALL_ARG_LOCATION notes
24277         before dumping final insns.
24278         * except.c (emit_note_eh_region_end): Remove all references to
24279         NOTE_INSN_CALL_ARG_LOCATION.
24280         * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
24281         * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
24282         * config/arc/arc.c (hwloop_optimize): Likewise.
24283         * config/arm/arm.c (create_fix_barrier): Likewise.
24284         * config/s390/s390.c (s390_chunkify_start): Likewise.
24285         * config/sh/sh.c (find_barrier): Likewise.
24286         * config/i386/i386.c (rest_of_insert_endbranch,
24287         ix86_seh_fixup_eh_fallthru): Likewise.
24288         * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
24289         * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
24290         * config/frv/frv.c (frv_function_prologue): Likewise.
24291         * emit-rtl.c (try_split): Likewise.  Copy over REG_CALL_ARG_LOCATION
24292         reg note.
24293         (note_outside_basic_block_p): Remove all references to
24294         NOTE_INSN_CALL_ARG_LOCATION.
24295         * gengtype.c (adjust_field_rtx_def): Likewise.
24296         * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
24297         Likewise.
24298         * jump.c (cleanup_barriers, delete_related_insns): Likewise.
24299         * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
24301         PR c++/84444
24302         * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
24303         is ADDR_EXPR.
24305         PR tree-optimization/84452
24306         * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
24307         expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
24308         is NULL.
24310 2018-02-19  Martin Liska  <mliska@suse.cz>
24312         PR sanitizer/82183
24313         * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
24315 2018-02-19  Martin Liska  <mliska@suse.cz>
24316             Richard Sandiford  <richard.sandiford@linaro.org>
24318         PR tree-optimization/82491
24319         * gimple-fold.c (get_base_constructor): Make earlier bail out
24320         to prevent ubsan.
24322 2018-02-19  Carl Love  <cel@us.ibm.com>
24324         * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
24325         BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
24326         BU_P8V_OVERLOAD_1.
24327         * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
24328         P8V_BUILTIN_VEC_NEG.
24330 2018-02-19  Sebastian Perta  <sebastian.perta@renesas.com>
24332         * config/rl78/rl78.md (movdf): New define expand.
24334 2018-02-19  Martin Liska  <mliska@suse.cz>
24336         PR other/80589
24337         * doc/invoke.texi: Fix typo.
24338         * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
24340 2018-02-18  Segher Boessenkool  <segher@kernel.crashing.org>
24342         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
24343         handle rs6000_single_float and rs6000_double_float specially for
24344         e500 family CPUs.
24346 2018-02-16  Jeff Law  <law@redhat.com>
24348         * config/rx/rx.c (add_pop_cfi_notes): New function.;
24349         (pop_regs): Use it.
24351 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
24353         PR ipa/84425
24354         * ipa-inline.c (inline_small_functions): Fix a typo.
24356 2018-02-16  Nathan Sidwell  <nathan@acm.org>
24358         * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
24360 2018-02-16  Carl Love  <cel@us.ibm.com>
24362         * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
24363         Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
24364         from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
24365         * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
24366         expansion to P8V_BUILTIN_VEC_FLOAT2.
24368 2018-02-16  Vladimir Makarov  <vmakarov@redhat.com>
24370         PR rtl-optimization/70023
24371         * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
24372         src_regno into account.
24374 2018-02-16  Carl Love  <cel@us.ibm.com>
24376         * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
24377         * config/rs6000/rs6000-builtin.def: Remove macro expansion for
24378         VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
24379         * config/rs6000/rs6000.c: Remove case statements for
24380         P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
24381         P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
24382         and P9V_BUILTIN_VEC_VINSERT4B.
24383         * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
24384         P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
24385         * config/rs6000/vsx.md:
24386         * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
24387         vec_insert4b.
24389 2018-02-16  Carl Love  <cel@us.ibm.com>
24391         * config/rs6000/altivec.h: Add builtin names vec_extract4b
24392         vec_insert4b.
24393         * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
24394         definitions.
24395         * config/rs6000/rs6000-c.c: Add the definitions for
24396         P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
24397         * config/rs6000/rs6000.c (altivec_expand_builtin): Add
24398         P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
24399         * config/rs6000/vsx.md: Add define_insn extract4b.  Add define_expand
24400         definition for insert4b and define insn *insert3b_internal.
24401         * doc/extend.texi: Add documentation for vec_extract4b.
24403 2018-02-16  Nathan Sidwell  <nathan@acm.org>
24405         * doc/extend.texi (Backwards Compatibility): Mention friend
24406         injection.  Note for-scope is deprecated.
24407         * doc/invoke.texi (-ffriend-injection): Deprecate.
24409 2018-02-16  Segher Boessenkool  <segher@kernel.crashing.org>
24411         * combine.c (try_combine): When adjusting LOG_LINKS for the destination
24412         that moved to I2, also allow destinations that are a paradoxical
24413         subreg (instead of a normal reg).
24415 2018-02-16  Oleg Endo  <olegendo@gcc.gnu.org>
24417         PR target/83831
24418         * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
24419         to QImode.
24421 2018-02-16  Richard Biener  <rguenther@suse.de>
24423         PR tree-optimization/84037
24424         PR tree-optimization/84016
24425         PR target/82862
24426         * config/i386/i386.c (ix86_builtin_vectorization_cost):
24427         Adjust vec_construct for the fact we need additional higher latency
24428         128bit inserts for AVX256 and AVX512 vector builds.
24429         (ix86_add_stmt_cost): Scale vector construction cost for
24430         elementwise loads.
24432 2018-02-16  Richard Biener  <rguenther@suse.de>
24434         PR tree-optimization/84417
24435         * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
24436         the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
24437         (non_rewritable_lvalue_p): Likewise, use poly-ints.
24439 2018-02-16  Martin Liska  <mliska@suse.cz>
24441         PR sanitizer/84307
24442         * internal-fn.def (ASAN_CHECK): Set proper flags.
24443         (ASAN_MARK): Likewise.
24445 2018-02-16  Julia Koval  <julia.koval@intel.com>
24447         * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
24448         from PTA_CANNONLAKE.
24450 2018-02-16  Jakub Jelinek  <jakub@redhat.com>
24452         PR target/84272
24453         * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
24454         Use ++iter rather than iter++ for std::list iterators.
24455         (func_fma_steering::dfs): Likewise.  Don't delete nodes right away,
24456         defer deleting them until all nodes in the forest are processed.  Do
24457         free even leaf nodes.  Change to_process into auto_vec.
24459         PR bootstrap/84405
24460         * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
24461         * vec.h (vec_default_construct): Use memset instead of placement new
24462         if BROKEN_VALUE_INITIALIZATION is defined.
24463         * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
24464         memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
24465         is defined.
24467         PR rtl-optimization/83723
24468         * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
24469         * lra.c (lra_substitute_pseudo): Likewise.  If true, use
24470         gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG.  Pass DEBUG_P to
24471         recursive calls.
24472         (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
24473         callers.
24474         * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
24476 2018-02-16  Eric Botcazou  <ebotcazou@adacore.com>
24478         PR rtl-optimization/81443
24479         * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
24480         from inner REGs to paradoxical SUBREGs.
24482 2018-02-16  Richard Biener  <rguenther@suse.de>
24484         PR tree-optimization/84399
24485         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
24486         For operands we can analyze at their definition make sure we can
24487         analyze them at each use as well.
24489 2018-02-16  Richard Biener  <rguenther@suse.de>
24491         PR tree-optimization/84190
24492         * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
24493         volatile accesses if the decl isn't volatile.
24495 2018-02-15  Jason Merrill  <jason@redhat.com>
24497         PR c++/84314 - ICE with templates and fastcall attribute.
24498         * attribs.c (build_type_attribute_qual_variant): Don't clobber
24499         TYPE_CANONICAL on an existing type.
24501 2018-02-15  Jakub Jelinek  <jakub@redhat.com>
24503         PR tree-optimization/84383
24504         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
24505         dstoff nor call operand_equal_p if dstbase is NULL.
24507         PR tree-optimization/84334
24508         * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
24509         also a CONSTANT_CLASS_P, punt.
24511 2018-02-14  Jim Wilson  <jimw@sifive.com>
24513         * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
24514         first SMALL_OPERAND check.  New local min_second_step.  Move assert
24515         to where locals are set.  Add TARGET_RVC support.
24516         * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
24518 2018-02-14  Indu Bhagat  <indu.bhagat@oracle.com>
24520         * doc/invoke.texi: Correct -Wformat-overflow code sample.
24522 2018-02-14  Martin Sebor  <msebor@redhat.com>
24524         PR tree-optimization/83698
24525         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
24526         arrays constrain the offset range to their bounds.
24527         (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
24528         (builtin_access::overlap): Avoid setting the size of overlap if it's
24529         already been set.
24530         (maybe_diag_overlap): Also consider arrays when deciding what values
24531         of offsets to include in diagnostics.
24533 2018-02-14  Martin Sebor  <msebor@redhat.com>
24535         PR c/84108
24536         * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
24537         that correspond to the kind of a declaration.
24539 2018-02-14  John David Anglin  <danglin@gcc.gnu.org>
24541         PR target/83984
24542         * config/pa/pa.md: Load address of PIC label using the linkage table
24543         if the label is nonlocal.
24545 2018-02-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
24547         * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
24548         warning message if user requests -maltivec=be.
24549         * doc/invoke.texi: Document deprecation of -maltivec=be.
24551 2018-02-14  Will Schmidt  <will_schmidt@vnet.ibm.com>
24553         PR target/84220
24554         * config/rs6000/rs6000-c.c: Update definitions for
24555         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
24556         VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
24558 2018-02-14  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
24560         PR target/84239
24561         * config/i386/cetintrin.h: Remove _rdssp[d|q] and
24562         add _get_ssp intrinsics. Remove argument from
24563         __builtin_ia32_rdssp[d|q].
24564         * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
24565         * config/i386/i386-builtin.def: Remove argument from
24566         __builtin_ia32_rdssp[d|q].
24567         * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
24568         ix86_expand_special_args_builtin for _rdssp[d|q].
24569         * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
24570         Clear register before usage.
24571         * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
24572         Add documentation for new _get_ssp and _inc_ssp intrinsics.
24574 2018-02-14  Richard Sandiford  <richard.sandiford@linaro.org>
24576         PR tree-optimization/84357
24577         * tree-data-ref.c (object_address_invariant_in_loop_p): Check
24578         operand 1 of an ARRAY_REF too.
24580 2018-02-14  Oleg Endo  <olegendo@gcc.gnu.org>
24582         PR target/83831
24583         * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
24584         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
24585         declarations.
24586         (set_of_reg): New struct.
24587         (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
24588         * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
24589         rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
24590         functions.
24591         * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
24592         Split into bitclr, bitset, bitinvert patterns if appropriate.
24593         (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
24594         use rx_fuse_in_memory_bitop.
24595         (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
24596         to named insn, correct maximum insn length.
24598 2018-02-14  Jozef Lawrynowicz  <jozefl.gcc@gmail.com>
24600         PR target/79242
24601         * machmode.def: Define a complex mode for PARTIAL_INT.
24602         * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
24603         MODE_PARTIAL_INT.
24604         * doc/rtl.texi: Document CSPImode.
24605         * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
24606         handling.
24607         (msp430_hard_regno_nregs_with_padding): Likewise.
24609 2018-02-13  Peter Bergner  <bergner@vnet.ibm.com>
24611         PR target/84279
24612         * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
24614 2018-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
24616         PR rtl-optimization/84169
24617         * combine.c (try_combine): New variable split_i2i3.  Set it to true if
24618         we generated a parallel as new i3 and we split that to new i2 and i3
24619         instructions.  Handle split_i2i3 similar to swap_i2i3: scan the
24620         LOG_LINKs of i3 to see which of those need to link to i2 now.  Link
24621         those to i2, not i1.  Partially rewrite this scan code.
24623 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
24625         PR c/82210
24626         * stor-layout.c (place_field): For variable length fields, adjust
24627         offset_align afterwards not just based on the field's alignment,
24628         but also on the size.
24630         PR middle-end/84309
24631         * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
24632         of exps and logs in the use_exp2 case.
24634 2018-02-13  Jeff Law  <law@redhat.com>
24636         * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
24637         entry for "vector".
24639         * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
24640         ARGS as unused.
24642 2018-02-13  Alexandre Oliva  <aoliva@redhat.com>
24644         PR debug/84342
24645         PR debug/84319
24646         * common.opt (gas-loc-support, gas-locview-support): New.
24647         (ginline-points, ginternal-reset-location-views): New.
24648         * doc/invoke.texi: Document them.  Use @itemx where intended.
24649         (gvariable-location-views): Adjust.
24650         * target.def (reset_location_view): New.
24651         * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
24652         (TARGET_RESET_LOCATION_VIEW): New.
24653         * doc/tm.texi: Rebuilt.
24654         * dwarf2out.c (dwarf2out_default_as_loc_support): New.
24655         (dwarf2out_default_as_locview_support): New.
24656         (output_asm_line_debug_info): Use option variables.
24657         (dwarf2out_maybe_output_loclist_view_pair): Likewise.
24658         (output_loc_list): Likewise.
24659         (add_high_low_attributes): Check option variables.
24660         Don't output entry view attribute in strict mode.
24661         (gen_inlined_subroutine_die): Check option variables.
24662         (dwarf2out_inline_entry): Likewise.
24663         (init_sections_and_labels): Likewise.
24664         (dwarf2out_early_finish): Likewise.
24665         (maybe_reset_location_view): New, from...
24666         (dwarf2out_var_location): ... here.  Call it.
24667         * debug.h (dwarf2out_default_as_loc_support): Declare.
24668         (dwarf2out_default_as_locview_support): Declare.
24669         * hooks.c (hook_int_rtx_insn_0): New.
24670         * hooks.h (hook_int_rtx_insn_0): Declare.
24671         * toplev.c (process_options): Take -gas-loc-support and
24672         -gas-locview-support from dwarf2out.  Enable
24673         -gvariable-location-views by default only with locview
24674         assembler support.  Enable -ginternal-reset-location-views by
24675         default only if the target defines the corresponding hook.
24676         Enable -ginline-points by default if location views are
24677         enabled; force it disabled if statement frontiers are
24678         disabled.
24679         * tree-inline.c (expand_call_inline): Check option variables.
24680         * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
24682 2018-02-13  Richard Sandiford  <richard.sandiford@linaro.org>
24684         PR tree-optimization/84321
24685         * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
24686         handling.  Also check whether the anti-range contains any values
24687         that satisfy the mask; switch to a VR_RANGE if not.
24689 2018-02-13  Paolo Bonzini  <bonzini@gnu.org>
24691         PR sanitizer/84340
24692         * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
24694 2018-02-13  Martin Jambor  <mjambor@suse.cz>
24696         PR c++/83990
24697         * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
24698         of call statements, also set location of a load to a temporary.
24700 2018-02-13  Sebastian Perta  <sebastian.perta@renesas.com>
24702         * config/rl78/rl78.c (add_vector_labels): New function.
24703         * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
24704         * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
24705         * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
24706         which checks that no arguments are passed.
24707         * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
24708         * doc/extend.texi: Documentation for the new attribute.
24710 2018-02-13  Andreas Schwab  <schwab@suse.de>
24712         * config/riscv/linux.h (CPP_SPEC): Define.
24714 2018-02-13  Jakub Jelinek  <jakub@redhat.com>
24716         PR target/84335
24717         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
24718         OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
24719         OPTION_MASK_ISA_AES as first argument to def_builtin_const
24720         for AES builtins.  Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
24721         instead of OPTION_MASK_ISA_PCLMUL as first argument to
24722         def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
24723         * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
24724         temporarily for AES and PCLMUL builtins.
24726         PR tree-optimization/84339
24727         * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
24728         ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
24729         Formatting fixes.
24731         PR middle-end/84309
24732         * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
24733         exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
24734         * generic-match-head.c (canonicalize_math_after_vectorization_p): New
24735         inline function.
24736         * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
24737         inline function.
24738         * omp-simd-clone.h: New file.
24739         * omp-simd-clone.c: Include omp-simd-clone.h.
24740         (expand_simd_clones): No longer static.
24741         * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
24742         cgraph.h and omp-simd-clone.h.
24743         (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
24744         (vect_recog_widen_shift_pattern): Formatting fix.
24745         (vect_pattern_recog_1): Don't check optab for calls.
24747         PR target/84336
24748         * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
24749         operands[2] into a REG before using gen_lowpart on it.
24751 2018-02-12  Jeff Law  <law@redhat.com>
24753         PR target/83760
24754         * config/sh/sh.c (find_barrier): Consider a sibling call
24755         a barrier as well.
24757         * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
24758         successfully back substituting a reg.
24760 2018-02-12  Richard Biener  <rguenther@suse.de>
24762         PR tree-optimization/84037
24763         * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
24764         parameter, move visited init to caller.
24765         (vect_slp_analyze_operations): Separate cost from validity
24766         check, initialize visited once for all instances.
24767         (vect_schedule_slp): Analyze map to CSE vectorized nodes once
24768         for all instances.
24769         * tree-vect-stmts.c (vect_model_simple_cost): Make early
24770         out an assert.
24771         (vect_model_promotion_demotion_cost): Likewise.
24772         (vectorizable_bswap): Guard cost modeling with !slp_node
24773         instead of !PURE_SLP_STMT to avoid double-counting on hybrid
24774         SLP stmts.
24775         (vectorizable_call): Likewise.
24776         (vectorizable_conversion): Likewise.
24777         (vectorizable_assignment): Likewise.
24778         (vectorizable_shift): Likewise.
24779         (vectorizable_operation): Likewise.
24780         (vectorizable_store): Likewise.
24781         (vectorizable_load): Likewise.
24782         (vectorizable_condition): Likewise.
24783         (vectorizable_comparison): Likewise.
24785 2018-02-12  Paolo Bonzini  <bonzini@gnu.org>
24787         PR sanitizer/84307
24788         * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
24789         (ASAN_MARK): Fix fnspec to account for return value, change pointer
24790         argument from 'R' to 'W' so that the pointed-to datum is clobbered.
24792 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
24794         PR middle-end/83665
24795         * params.def (inline-min-speedup): Increase from 8 to 15.
24796         (max-inline-insns-auto): Decrease from 40 to 30.
24797         * ipa-split.c (consider_split): Add some buffer for function to
24798         be considered inlining candidate.
24799         * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
24800         default values.
24802 2018-02-12  Richard Biener  <rguenther@suse.de>
24804         PR tree-optimization/84037
24805         * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
24806         matched stmts if we cannot swap the non-matched ones.
24808 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
24810         * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
24811         _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
24812         _mm_maskz_scalef_round_ss): New intrinsics.
24813         (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
24814         * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
24815         __builtin_ia32_scalefss_round): Remove.
24816         (__builtin_ia32_scalefsd_mask_round,
24817         __builtin_ia32_scalefss_mask_round): New intrinsics.
24818         * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
24819         (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
24820         ((match_operand:VF_128 2 "<round_nimm_predicate>"
24821         "<round_constraint>")): Changed to ...
24822         ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
24823         "<round_scalar_constraint>")): ... this.
24824         ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
24825         %0, %1, %2<round_op3>}"): Changed to ...
24826         ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
24827         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
24828         %2<round_scalar_mask_op3>}"): ... this.
24829         * config/i386/subst.md (round_scalar_nimm_predicate): New.
24831 2018-02-12  Olga Makhotina  <olga.makhotina@intel.com>
24833         * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
24834         (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
24835         (_mm_maskz_sqrt_round_ss): New intrinsics.
24836         (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
24837         (__builtin_ia32_sqrtsd_mask_round)
24838         (__builtin_ia32_sqrtss_mask_round): New builtins.
24839         * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
24840         (__builtin_ia32_sqrtss_round): Remove.
24841         (__builtin_ia32_sqrtsd_mask_round)
24842         (__builtin_ia32_sqrtss_mask_round): New builtins.
24843         * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
24844         (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
24845         ((match_operand:VF_128 1 "vector_operand"
24846         "xBm,<round_constraint>")): Changed to ...
24847         ((match_operand:VF_128 1 "vector_operand"
24848         "xBm,<round_scalar_constraint>")): ... this.
24849         (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
24850         %0, %2, %<iptr>1<round_op3>}): Changed to ...
24851         (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
24852         %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
24853         %<iptr>1<round_scalar_mask_op3>}): ... this.
24854         ((set_attr "prefix" "<round_prefix>")): Changed to ...
24855         ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
24857 2018-02-11  Steven Munroe  <munroesj@gcc.gnu.org>
24859         PR target/84266
24860         * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
24861         Cast vec_cmpeq result to correct type.
24862         * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
24863         Cast vec_cmpgt result to correct type.
24865 2018-02-11  Alexandre Oliva  <aoliva@redhat.com>
24867         * final.c (final_scan_insn_1): Renamed from...
24868         (final_scan_insn): ... this.  New wrapper, to recover
24869         seen from the outermost call in recursive ones.
24870         * config/sparc/sparc.c (output_return): Drop seen from call.
24871         (output_sibcall): Likewise.
24872         * config/visium/visium.c (output_branch): Likewise.
24874 2018-02-10  John David Anglin  <danglin@gcc.gnu.org>
24876         * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
24877         function label.
24879 2018-02-10  Alan Modra  <amodra@gmail.com>
24881         PR target/84300
24882         * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
24883         Specify LR as an input.
24885 2018-02-10  Jakub Jelinek  <jakub@redhat.com>
24887         PR sanitizer/83987
24888         * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
24889         remove_member_access_dummy_vars): New functions.
24890         (lower_omp_for, lower_omp_taskreg, lower_omp_target,
24891         lower_omp_1, execute_lower_omp): Use them.
24893         PR rtl-optimization/84308
24894         * shrink-wrap.c (spread_components): Release todo vector.
24896 2018-02-09  Vladimir Makarov  <vmakarov@redhat.com>
24898         PR rtl-optimization/57193
24899         * ira-color.c (struct allocno_color_data): Add member
24900         conflict_allocno_hard_prefs.
24901         (update_conflict_allocno_hard_prefs): New.
24902         (bucket_allocno_compare_func): Add a preference based on
24903         conflict_allocno_hard_prefs.
24904         (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
24905         (color_allocnos): Remove a dead code.  Initiate
24906         conflict_allocno_hard_prefs.  Call update_costs_from_prefs.
24908 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
24910         PR target/84226
24911         * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
24912         constraint from =wa to wa.  Avoid a subreg on the output operand,
24913         instead use a pseudo and subreg it in a move.
24914         (p9_xxbrd_<mode>): Changed to ...
24915         (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
24916         (p9_xxbrd_v2df): New expander.
24917         (p9_xxbrw_<mode>): Changed to ...
24918         (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
24919         (p9_xxbrw_v4sf): New expander.
24921 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
24923         * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
24925 2018-02-09  Peter Bergner  <bergner@vnet.ibm.com>
24927         PR target/83926
24928         * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
24929         multiply in 32-bit mode.
24930         (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
24931         (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
24932         mode.
24934 2018-02-09  Sebastian Perta  <sebastian.perta@renesas.com>
24936         * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
24937         to allow or block "symbol_ref" depending on the value of TARGET_JSR.
24938         * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
24939         * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
24941 2018-02-09  Pierre-Marie de Rodat  <derodat@adacore.com>
24943         PR lto/84213
24944         * dwarf2out.c (is_trivial_indirect_ref): New function.
24945         (dwarf2out_late_global_decl): Do not generate a location
24946         attribute for variables that have a non-trivial DECL_VALUE_EXPR
24947         and that are not defined in the current unit.
24949 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
24951         * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
24952         instead of a libcall for UNORDERED.
24954 2018-02-09  Tamar Christina  <tamar.christina@arm.com>
24956         PR target/82641
24957         * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
24958         __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
24960 2018-02-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24962         PR target/PR84295
24963         * config/s390/s390.c (s390_set_current_function): Invoke
24964         s390_indirect_branch_settings also if fndecl didn't change.
24966 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
24968         * config/rs6000/rs6000.md (blockage): Set length to zero.
24970 2018-02-09  Eric Botcazou  <ebotcazou@adacore.com>
24972         * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
24974 2018-02-09  Jakub Jelinek  <jakub@redhat.com>
24976         PR sanitizer/84285
24977         * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
24978         STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
24979         -static-lib*san.
24981         PR debug/84252
24982         * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
24983         PARALLEL incoming that failed vt_get_decl_and_offset check.
24985         PR middle-end/84237
24986         * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
24987         * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
24988         TREE_READONLY bit.
24989         (get_variable_section): For decls in named .bss* sections pass true as
24990         second argument to bss_initializer_p.
24992 2018-02-09  Marek Polacek  <polacek@redhat.com>
24993             Jakub Jelinek  <jakub@redhat.com>
24995         PR c++/83659
24996         * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
24997         Formatting fixes.  Verify first that tree_fits_poly_int64_p (op01).
24998         Sync some changes from cxx_fold_indirect_ref.
25000 2018-02-09  Alexandre Oliva  <aoliva@redhat.com>
25002         * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
25003         markers.
25004         * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
25005         (BLOCK_INLINE_ENTRY_LABEL): New.
25006         (dwarf2out_var_location): Disregard inline entry markers.
25007         (inline_entry_data): New struct.
25008         (inline_entry_data_hasher): New hashtable type.
25009         (inline_entry_data_hasher::hash): New.
25010         (inline_entry_data_hasher::equal): New.
25011         (inline_entry_data_table): New variable.
25012         (add_high_low_attributes): Add DW_AT_entry_pc and
25013         DW_AT_GNU_entry_view attributes if a pending entry is found
25014         in inline_entry_data_table.  Add old entry_pc attribute only
25015         if debug nonbinding markers are disabled.
25016         (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
25017         markers are enabled.
25018         (block_within_block_p, dwarf2out_inline_entry): New.
25019         (dwarf2out_finish): Check that no entries remained in
25020         inline_entry_data_table.
25021         * final.c (reemit_insn_block_notes): Handle inline entry notes.
25022         (final_scan_insn, notice_source_line): Likewise.
25023         (rest_of_clean_state): Skip inline entry markers.
25024         * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
25025         markers.
25026         * gimple.c (gimple_build_debug_inline_entry): New.
25027         * gimple.h (enum gimple_debug_subcode): Add
25028         GIMPLE_DEBUG_INLINE_ENTRY.
25029         (gimple_build_debug_inline_entry): Declare.
25030         (gimple_debug_inline_entry_p): New.
25031         (gimple_debug_nonbind_marker_p): Adjust.
25032         * insn-notes.def (INLINE_ENTRY): New.
25033         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
25034         inline entry marker notes.
25035         (print_insn): Likewise.
25036         * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
25037         (INSN_DEBUG_MARKER_KIND): Likewise.
25038         (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
25039         * tree-inline.c (expand_call_inline): Build and insert
25040         debug_inline_entry stmt.
25041         * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
25042         inline entry blocks early, if nonbind markers are enabled.
25043         (dump_scope_block): Dump fragment info.
25044         * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
25045         * doc/gimple.texi (gimple_debug_inline_entry_p): New.
25046         (gimple_build_debug_inline_entry): New.
25047         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
25048         Enable/disable inline entry points too.
25049         * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
25050         (DEBUG_INSN): Describe inline entry markers.
25052         * common.opt (gvariable-location-views): New.
25053         (gvariable-location-views=incompat5): New.
25054         * config.in: Rebuilt.
25055         * configure: Rebuilt.
25056         * configure.ac: Test assembler for view support.
25057         * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
25058         * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
25059         * dwarf2out.c (var_loc_view): New typedef.
25060         (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
25061         (dwarf2out_locviews_in_attribute): New.
25062         (dwarf2out_locviews_in_loclist): New.
25063         (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
25064         (enum dw_line_info_opcode): Add LI_adv_address.
25065         (struct dw_line_info_table): Add view.
25066         (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
25067         (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
25068         (zero_view_p): New variable.
25069         (ZERO_VIEW_P): New macro.
25070         (output_asm_line_debug_info): New.
25071         (struct var_loc_node): Add view.
25072         (add_AT_view_list, AT_loc_list): New.
25073         (add_var_loc_to_decl): Add view param.  Test it against last.
25074         (new_loc_list): Add view params.  Record them.
25075         (AT_loc_list_ptr): Handle loc and view lists.
25076         (view_list_to_loc_list_val_node): New.
25077         (print_dw_val): Handle dw_val_class_view_list.
25078         (size_of_die): Likewise.
25079         (value_format): Likewise.
25080         (loc_list_has_views): New.
25081         (gen_llsym): Set vl_symbol too.
25082         (maybe_gen_llsym, skip_loc_list_entry): New.
25083         (dwarf2out_maybe_output_loclist_view_pair): New.
25084         (output_loc_list): Output view list or entries too.
25085         (output_view_list_offset): New.
25086         (output_die): Handle dw_val_class_view_list.
25087         (output_dwarf_version): New.
25088         (output_compilation_unit_header): Use it.
25089         (output_skeleton_debug_sections): Likewise.
25090         (output_rnglists, output_line_info): Likewise.
25091         (output_pubnames, output_aranges): Update version comments.
25092         (output_one_line_info_table): Output view numbers in asm comments.
25093         (dw_loc_list): Determine current endview, pass it to new_loc_list.
25094         Call maybe_gen_llsym.
25095         (loc_list_from_tree_1): Adjust.
25096         (add_AT_location_description): Create view list attribute if
25097         needed, check it's absent otherwise.
25098         (convert_cfa_to_fb_loc_list): Adjust.
25099         (maybe_emit_file): Call output_asm_line_debug_info for test.
25100         (dwarf2out_var_location): Reset views as needed.  Precompute
25101         add_var_loc_to_decl args.  Call get_attr_min_length only if we have the
25102         attribute.  Set view.
25103         (new_line_info_table): Reset next view.
25104         (set_cur_line_info_table): Call output_asm_line_debug_info for test.
25105         (dwarf2out_source_line): Likewise.  Output view resets and labels to
25106         the assembler, or select appropriate line info opcodes.
25107         (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
25108         (optimize_string_length): Catch it.  Adjust.
25109         (resolve_addr): Copy vl_symbol along with ll_symbol.  Handle
25110         dw_val_class_view_list, and remove it if no longer needed.
25111         (hash_loc_list): Hash view numbers.
25112         (loc_list_hasher::equal): Compare them.
25113         (optimize_location_lists): Check whether a view list symbol is
25114         needed, and whether the locview attribute is present, and
25115         whether they match.  Remove the locview attribute if no longer
25116         needed.
25117         (index_location_lists): Call skip_loc_list_entry for test.
25118         (dwarf2out_finish): Call output_asm_line_debug_info for test.
25119         Use output_dwarf_version.
25120         * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
25121         (struct dw_val_node): Add val_view_list.
25122         * final.c (SEEN_NEXT_VIEW): New.
25123         (set_next_view_needed): New.
25124         (clear_next_view_needed): New.
25125         (maybe_output_next_view): New.
25126         (final_start_function): Rename to...
25127         (final_start_function_1): ... this.  Take pointer to FIRST,
25128         add SEEN parameter.  Emit param bindings in the initial view.
25129         (final_start_function): Reintroduce SEEN-less interface.
25130         (final): Rename to...
25131         (final_1): ... this.  Take SEEN parameter.  Output final pending
25132         next view at the end.
25133         (final): Reintroduce seen-less interface.
25134         (final_scan_insn): Output pending next view before switching
25135         sections or ending a block.  Mark the next view as needed when
25136         outputting variable locations.  Notify debug backend of section
25137         changes, and of location view changes.
25138         (rest_of_handle_final): Adjust.
25139         * toplev.c (process_options): Autodetect value for debug variable
25140         location views option.  Warn on incompat5 without -gdwarf-5.
25141         * doc/invoke.texi (gvariable-location-views): New.
25142         (gvariable-location-views=incompat5): New.
25143         (gno-variable-location-views): New.
25145 2018-02-08  David Malcolm  <dmalcolm@redhat.com>
25147         PR tree-optimization/84136
25148         * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
25149         that the result of find_edge is non-NULL.
25151 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
25153         PR target/83008
25154         * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
25155         storing integer register in SImode.  Fix cost of 256 and 512
25156         byte aligned SSE register store.
25158 2018-02-08  Sergey Shalnov  <sergey.shalnov@intel.com>
25160         * config/i386/i386.c (ix86_multiplication_cost): Fix
25161         multiplication cost for TARGET_AVX512DQ.
25163 2018-02-08  Marek Polacek  <polacek@redhat.com>
25165         PR tree-optimization/84238
25166         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
25167         get_range_strlen.
25169 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
25171         PR tree-optimization/84265
25172         * tree-vect-stmts.c (vectorizable_store): Don't treat
25173         VMAT_CONTIGUOUS accesses as grouped.
25174         (vectorizable_load): Likewise.
25176 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
25178         PR tree-optimization/81635
25179         * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
25180         * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
25181         (test_round_for_mask): New functions.
25182         (wide_int_cc_tests): Call test_round_for_mask.
25183         * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
25184         * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
25185         * tree-data-ref.c (split_constant_offset_1): Use it to refine the
25186         range returned by get_range_info.
25188 2018-02-08  Jan Hubicka  <hubicka@ucw.cz>
25190         PR ipa/81360
25191         * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
25192         * symtab.c: Include builtins.h
25193         (symtab_node::output_to_lto_symbol_table_p): Move here
25194         from lto-streamer-out.c:output_symbol_p.
25195         * lto-streamer-out.c (write_symbol): Turn early exit to assert.
25196         (output_symbol_p): Move all logic to symtab.c
25197         (produce_symtab): Update.
25199 2018-02-08  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25201         * config/s390/s390-opts.h (enum indirect_branch): Define.
25202         * config/s390/s390-protos.h (s390_return_addr_from_memory)
25203         (s390_indirect_branch_via_thunk)
25204         (s390_indirect_branch_via_inline_thunk): Add function prototypes.
25205         (enum s390_indirect_branch_type): Define.
25206         * config/s390/s390.c (struct s390_frame_layout, struct
25207         machine_function): Remove.
25208         (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
25209         (indirect_branch_table_label_no, indirect_branch_table_name):
25210         Define variables.
25211         (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
25212         (enum s390_indirect_branch_option): Define.
25213         (s390_return_addr_from_memory): New function.
25214         (s390_handle_string_attribute): New function.
25215         (s390_attribute_table): Add new attribute handler.
25216         (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
25217         (s390_indirect_branch_via_thunk): New function.
25218         (s390_indirect_branch_via_inline_thunk): New function.
25219         (s390_function_ok_for_sibcall): When jumping via thunk disallow
25220         sibling call optimization for non z10 compiles.
25221         (s390_emit_call): Force indirect branch target to be a single
25222         register.  Add r1 clobber for non-z10 compiles.
25223         (s390_emit_epilogue): Emit return jump via return_use expander.
25224         (s390_reorg): Handle JUMP_INSNs as execute targets.
25225         (s390_option_override_internal): Perform validity checks for the
25226         new command line options.
25227         (s390_indirect_branch_attrvalue): New function.
25228         (s390_indirect_branch_settings): New function.
25229         (s390_set_current_function): Invoke s390_indirect_branch_settings.
25230         (s390_output_indirect_thunk_function):  New function.
25231         (s390_code_end): Implement target hook.
25232         (s390_case_values_threshold): Implement target hook.
25233         (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
25234         macros.
25235         * config/s390/s390.h (struct s390_frame_layout)
25236         (struct machine_function): Move here from s390.c.
25237         (TARGET_INDIRECT_BRANCH_NOBP_RET)
25238         (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
25239         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
25240         (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
25241         (TARGET_INDIRECT_BRANCH_NOBP_CALL)
25242         (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
25243         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
25244         (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
25245         (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
25246         * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
25247         (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
25248         (mnemonic attribute): Add values which aren't recognized
25249         automatically.
25250         ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
25251         pattern for branch conversion.  Fix mnemonic attribute.
25252         ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
25253         indirect branch via thunk if requested.
25254         ("indirect_jump", "<code>"): Expand patterns for branch conversion.
25255         ("*indirect_jump"): Disable for branch conversion using out of
25256         line thunks.
25257         ("indirect_jump_via_thunk<mode>_z10")
25258         ("indirect_jump_via_thunk<mode>")
25259         ("indirect_jump_via_inlinethunk<mode>_z10")
25260         ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
25261         ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
25262         ("casesi_jump_via_inlinethunk<mode>_z10")
25263         ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
25264         ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
25265         ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
25266         ("*indirect2_jump"): Disable for branch conversion.
25267         ("casesi_jump"): Turn into expander and expand patterns for branch
25268         conversion.
25269         ("return_use"): New expander.
25270         ("*return"): Emit return via thunk and rename it to ...
25271         ("*return<mode>"): ... this one.
25272         * config/s390/s390.opt: Add new options and and enum for the
25273         option values.
25275 2018-02-08  Richard Sandiford  <richard.sandiford@linaro.org>
25277         * lra-constraints.c (match_reload): Unconditionally use
25278         gen_lowpart_SUBREG, rather than selecting between that
25279         and equivalent gen_rtx_SUBREG code.
25281 2018-02-08  Richard Biener  <rguenther@suse.de>
25283         PR tree-optimization/84233
25284         * tree-ssa-phiprop.c (propagate_with_phi): Use separate
25285         changed flag instead of boguously re-using phi_inserted.
25287 2018-02-08  Martin Jambor  <mjambor@suse.cz>
25289         * hsa-gen.c (get_symbol_for_decl): Set program allocation for
25290         static local variables.
25292 2018-02-08  Richard Biener  <rguenther@suse.de>
25294         PR tree-optimization/84278
25295         * tree-vect-stmts.c (vectorizable_store): When looking for
25296         smaller vector types to perform grouped strided loads/stores
25297         make sure the mode is supported by the target.
25298         (vectorizable_load): Likewise.
25300 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
25302         * config/aarch64/aarch64.c (aarch64_components_for_bb):
25303         Increase LDP/STP opportunities by adding adjacent callee-saves.
25305 2018-02-08  Wilco Dijkstra  <wdijkstr@arm.com>
25307         PR rtl-optimization/84068
25308         PR rtl-optimization/83459
25309         * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
25311 2018-02-08  Aldy Hernandez  <aldyh@redhat.com>
25313         PR tree-optimization/84224
25314         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
25315         * calls.c (gimple_alloca_call_p): Only return TRUE when we have
25316         non-zero arguments.
25318 2018-02-07  Iain Sandoe  <iain@codesourcery.com>
25320         PR target/84113
25321         * config/rs6000/altivec.md (*restore_world): Remove LR use.
25322         * config/rs6000/predicates.md (restore_world_operation): Adjust op
25323         count, remove one USE.
25325 2018-02-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
25327         * doc/install.texi (Configuration): Document the
25328         --with-long-double-format={ibm,ieee} PowerPC configuration
25329         options.
25331         PR target/84154
25332         * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
25333         Convert from define_expand to be define_insn_and_split.  Rework
25334         float/double/_Float128 conversions to QI/HI/SImode to work with
25335         both ISA 2.07 (power8) or ISA 3.0 (power9).  Fix regression where
25336         conversions to QI/HImode types did a store and then a load to
25337         truncate the value.  For conversions to VSX registers, don't split
25338         the insn, instead emit the code directly.  Use the code iterator
25339         any_fix to combine signed and unsigned conversions.
25340         (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
25341         (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
25342         (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25343         (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
25344         (fix_<mode>di2_hw): Likewise.
25345         (fixuns_<mode>di2_hw): Likewise.
25346         (fix_<mode>si2_hw): Likewise.
25347         (fixuns_<mode>si2_hw): Likewise.
25348         (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
25349         (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
25350         (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
25351         fix<uns>_trunc<SFDF:mode>si2_p8.
25352         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
25353         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
25354         (fix<uns>_<mode>_mem): Likewise.
25355         (fctiw<u>z_<mode>_mem): Likewise.
25356         (fix<uns>_<mode>_mem): Likewise.
25357         (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
25358         the register allocator from doing a direct move to the GPRs to do
25359         a store, and instead use the ISA 3.0 store byte/half-word from
25360         vector register instruction.  For IEEE 128-bit floating point,
25361         also optimize stores of 32-bit ints.
25362         (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
25364 2018-02-07  Alan Hayward  <alan.hayward@arm.com>
25366         * genextract.c (push_pathstr_operand): New function to support
25367         [a-zA-Z].
25368         (walk_rtx): Call push_pathstr_operand.
25369         (print_path): Support [a-zA-Z].
25371 2018-02-07  Richard Biener  <rguenther@suse.de>
25373         PR tree-optimization/84037
25374         * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
25375         (cse_and_gimplify_to_preheader): Declare.
25376         (vect_get_place_in_interleaving_chain): Likewise.
25377         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
25378         ivexpr_map.
25379         (_loop_vec_info::~_loop_vec_info): Delete it.
25380         (cse_and_gimplify_to_preheader): New function.
25381         * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
25382         * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
25383         (vectorizable_load): Likewise.  For grouped stores always base
25384         the IV on the first element.
25385         * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
25386         condition before gimplifying.
25388 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
25390         * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
25391         *DIV_EXPR and *MOD_EXPR.
25393 2018-02-07  H.J. Lu  <hongjiu.lu@intel.com>
25395         PR target/84248
25396         * config/i386/i386.c (ix86_option_override_internal): Mask out
25397         the CF_SET bit when checking -fcf-protection.
25399 2018-02-07  Tom de Vries  <tom@codesourcery.com>
25401         PR libgomp/84217
25402         * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
25403         enough.
25405 2018-02-07  Richard Biener  <rguenther@suse.de>
25407         PR tree-optimization/84204
25408         * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
25409         this place.
25411         PR tree-optimization/84205
25412         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
25413         special-case isl_ast_op_zdiv_r.
25415         PR tree-optimization/84223
25416         * graphite-scop-detection.c (gather_bbs::before_dom_children):
25417         Only add conditions from within the region.
25418         (gather_bbs::after_dom_children): Adjust.
25420 2018-02-07  Georg-Johann Lay  <avr@gjlay.de>
25422         PR target/84209
25423         * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
25424         * config/avr/avr.md: Only post-reload split REG-REG moves if
25425         either register is GENERAL_REG_P.
25427 2018-02-07  Jakub Jelinek  <jakub@redhat.com>
25429         PR tree-optimization/84235
25430         * tree-ssa-scopedtables.c
25431         (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
25432         if the subtraction is performed in floating point type where NaNs are
25433         honored.  For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
25434         build 1.  Formatting fix.
25436 2018-02-06  Jakub Jelinek  <jakub@redhat.com>
25438         PR target/84146
25439         * config/i386/i386.c (rest_of_insert_endbranch): Only skip
25440         NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
25441         and skip it regardless of bb boundaries.  Use CALL_P macro,
25442         don't test INSN_P (insn) together with CALL_P or JUMP_P check
25443         unnecessarily, formatting fix.
25445 2018-02-06  Michael Collison  <michael.collison@arm.com>
25447         * config/arm/thumb2.md:
25448         (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
25449         (*thumb_mov_notscc): Ditto.
25451 2018-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
25453         PR target/84154
25454         * config/rs6000/rs6000.md (su code attribute): Use "u" for
25455         unsigned_fix, not "s".
25457 2018-02-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25459         * configure.ac (gcc_fn_eh_frame_ro): New function.
25460         (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
25461         correct .eh_frame permissions.
25462         * configure: Regenerate.
25464 2018-02-06  Andrew Jenner  <andrew@codeourcery.com>
25466         * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
25467         irrelevant options.
25469 2018-02-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
25471         * config/rs6000/rs6000.c (rs6000_option_override_internal):
25472         Display warning message for -mno-speculate-indirect-jumps.
25474 2018-02-06  Andrew Jenner  <andrew@codesourcery.com>
25476         * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
25477         Undocumented.
25478         * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
25480 2018-02-06  Aldy Hernandez  <aldyh@redhat.com>
25482         PR tree-optimization/84225
25483         * tree-eh.c (find_trapping_overflow): Only call
25484         operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
25486 2018-02-06  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
25488         PR target/84145
25489         * config/i386/i386.c: Reimplement the check of possible options
25490         -mibt/-mshstk conbination. Change error messages.
25491         * doc/invoke.texi: Fix a typo: remove extra '='.
25493 2018-02-06  Marek Polacek  <polacek@redhat.com>
25495         PR tree-optimization/84228
25496         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
25498 2018-02-06  Tamar Christina  <tamar.christina@arm.com>
25500         PR target/82641
25501         * config/arm/arm.c (arm_print_asm_arch_directives): Record already
25502         emitted arch directives.
25503         * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
25504         __ARM_FEATURE_COPROC before changing architectures.
25506 2018-02-06  Richard Biener  <rguenther@suse.de>
25508         * config/i386/i386.c (print_reg): Fix typo.
25509         (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
25511 2018-02-06  Eric Botcazou  <ebotcazou@adacore.com>
25513         * configure: Regenerate.
25515 2018-02-05  Martin Sebor  <msebor@redhat.com>
25517         PR tree-optimization/83369
25518         * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
25519         inlining context.
25521 2018-02-05  Martin Liska  <mliska@suse.cz>
25523         * doc/invoke.texi: Cherry-pick upstream r323995.
25525 2018-02-05  Richard Sandiford  <richard.sandiford@linaro.org>
25527         * ira.c (ira_init_register_move_cost): Adjust comment.
25529 2018-02-05  Martin Liska  <mliska@suse.cz>
25531         PR gcov-profile/84137
25532         * doc/gcov.texi: Fix typo in documentation.
25534 2018-02-05  Martin Liska  <mliska@suse.cz>
25536         PR gcov-profile/83879
25537         * doc/gcov.texi: Document necessity of --dynamic-list-data when
25538         using dlopen functionality.
25540 2018-02-05  Olga Makhotina  <olga.makhotina@intel.com>
25542         * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
25543         _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
25544         _mm_maskz_range_ss, _mm_mask_range_round_ss,
25545         _mm_maskz_range_round_ss): New intrinsics.
25546         (__builtin_ia32_rangesd128_round)
25547         (__builtin_ia32_rangess128_round): Remove.
25548         (__builtin_ia32_rangesd128_mask_round,
25549         __builtin_ia32_rangess128_mask_round): New builtins.
25550         * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
25551         __builtin_ia32_rangess128_round): Remove.
25552         (__builtin_ia32_rangesd128_mask_round,
25553         __builtin_ia32_rangess128_mask_round): New builtins.
25554         * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
25555         (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
25556         ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
25557         "<round_saeonly_constraint>")): Changed to ...
25558         ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
25559         "<round_saeonly_scalar_constraint>")): ... this.
25560         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
25561         %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
25562         ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
25563         %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
25564         %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
25566 2018-02-02  Andrew Jenner  <andrew@codesourcery.com>
25568         * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
25569         options.
25570         * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
25571         Remove all values except native, 8540 and 8548.
25573 2018-02-02  H.J. Lu  <hongjiu.lu@intel.com>
25575         * config/i386/i386.c (ix86_output_function_return): Pass
25576         INVALID_REGNUM, instead of -1, as invalid register number to
25577         indirect_thunk_name and output_indirect_thunk.
25579 2018-02-02  Julia Koval  <julia.koval@intel.com>
25581         * config.gcc: Add -march=icelake.
25582         * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
25583         * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
25584         * config/i386/i386.c (processor_costs): Add m_ICELAKE.
25585         (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
25586         PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
25587         (processor_target_table): Add icelake.
25588         (ix86_option_override_internal): Handle new PTAs.
25589         (get_builtin_code_for_version): Handle icelake.
25590         (M_INTEL_COREI7_ICELAKE): New.
25591         (fold_builtin_cpu): Handle icelake.
25592         * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
25593         * doc/invoke.texi: Add -march=icelake.
25595 2018-02-02  Julia Koval  <julia.koval@intel.com>
25597         * config/i386/i386.c (ix86_option_override_internal): Change flags type
25598         to wide_int_bitmask.
25599         * wide-int-bitmask.h: New.
25601 2018-02-02  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
25603         PR target/84066
25604         * config/i386/i386.md: Replace Pmode with word_mode in
25605         builtin_setjmp_setup and builtin_longjmp to support x32.
25607 2018-02-01  Peter Bergner  <bergner@vnet.ibm.com>
25609         PR target/56010
25610         PR target/83743
25611         * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
25612         #include "opts.h".
25613         (rs6000_supported_cpu_names): New static variable.
25614         (linux_cpu_translation_table): Likewise.
25615         (elf_platform) <cpu>: Define new static variable and use it.
25616         Translate kernel AT_PLATFORM name to canonical name if needed.
25617         Error if platform name is unknown.
25619 2018-02-01  Aldy Hernandez  <aldyh@redhat.com>
25621         PR target/84089
25622         * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
25624 2018-02-01  Jeff Law  <law@redhat.com>
25626         PR target/84128
25627         * config/i386/i386.c (release_scratch_register_on_entry): Add new
25628         OFFSET and RELEASE_VIA_POP arguments.  Use SP+OFFSET to restore
25629         the scratch if RELEASE_VIA_POP is false.
25630         (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
25631         If we have to save a temporary register, decrement SIZE appropriately.
25632         Pass new arguments to release_scratch_register_on_entry.
25633         (ix86_adjust_stack_and_probe): Likewise.
25634         (ix86_emit_probe_stack_range): Pass new arguments to
25635         release_scratch_register_on_entry.
25637 2018-02-01  Uros Bizjak  <ubizjak@gmail.com>
25639         PR rtl-optimization/84157
25640         * combine.c (change_zero_ext): Use REG_P predicate in
25641         front of HARD_REGISTER_P predicate.
25643 2018-02-01  Georg-Johann Lay  <avr@gjlay.de>
25645         * config/avr/avr.c (avr_option_override): Move disabling of
25646         -fdelete-null-pointer-checks to...
25647         * common/config/avr/avr-common.c (avr_option_optimization_table):
25648         ...here.
25650 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
25652         PR tree-optimization/81635
25653         * tree-data-ref.c (split_constant_offset_1): For types that
25654         wrap on overflow, try to use range info to prove that wrapping
25655         cannot occur.
25657 2018-02-01  Renlin Li  <renlin.li@arm.com>
25659         PR target/83370
25660         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
25661         TAILCALL_ADDR_REGS.
25662         (aarch64_register_move_cost): Likewise.
25663         * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
25664         TAILCALL_ADDR_REGS.
25665         (REG_CLASS_NAMES): Likewise.
25666         (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
25667         TAILCALL_ADDR_REGS. Remove IP registers.
25668         * config/aarch64/aarch64.md (Ucs): Update register constraint.
25670 2018-02-01  Richard Biener  <rguenther@suse.de>
25672         * domwalk.h (dom_walker::dom_walker): Add additional constructor
25673         for specifying RPO order and allow NULL for that.
25674         * domwalk.c (dom_walker::dom_walker): Likewise.
25675         (dom_walker::walk): Handle NULL RPO order.
25676         * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
25677         in RPO order.
25678         (rewrite_update_dom_walker): Likewise.
25679         (mark_def_dom_walker): Likewise.
25681 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
25683         * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
25684         (aarch64_maybe_expand_sve_subreg_move): Declare.
25685         * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
25686         * config/aarch64/predicates.md (aarch64_any_register_operand): New
25687         predicate.
25688         * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
25689         that are semantically a reverse operation.
25690         (*aarch64_sve_mov<mode>_subreg_be): New pattern.
25691         * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
25692         (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
25693         functions.
25694         (aarch64_can_change_mode_class): For big-endian, forbid changes
25695         between two SVE modes if they have different element sizes.
25697 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
25699         * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
25700         the TImode handling for big-endian targets.
25702 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
25704         * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
25705         (*sve_ld1rq<Vesize>): ... this new pattern.  Handle all element sizes,
25706         not just bytes.
25707         * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
25708         Remove BSWAP handing for big-endian targets and use the form of
25709         LD1RQ appropariate for the mode.
25711 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
25713         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
25714         all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
25715         duplicated element.
25717 2018-02-01  Richard Sandiford  <richard.sandiford@linaro.org>
25719         PR tearget/83845
25720         * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
25721         check for operands that need to go through aarch64_sve_reload_be.
25723 2018-02-01  Jakub Jelinek  <jakub@redhat.com>
25725         PR tree-optimization/81661
25726         PR tree-optimization/84117
25727         * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
25728         * tree-eh.c: Include gimplify.h.
25729         (find_trapping_overflow, replace_trapping_overflow,
25730         rewrite_to_non_trapping_overflow): New functions.
25731         * tree-vect-loop.c: Include tree-eh.h.
25732         (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
25733         * tree-data-ref.c: Include tree-eh.h.
25734         (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
25736 2018-01-31  Uros Bizjak  <ubizjak@gmail.com>
25738         PR rtl-optimization/84123
25739         * combine.c (change_zero_ext): Check if hard register satisfies
25740         can_change_dest_mode before calling gen_lowpart_SUBREG.
25742 2018-01-31  Vladimir Makarov  <vmakarov@redhat.com>
25744         PR target/82444
25745         * ira.c (ira_init_register_move_cost): Remove assert.
25747 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
25749         PR rtl-optimization/84071
25750         * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
25751         * doc/tm.texi: Regenerate.
25753 2018-01-31  Richard Biener  <rguenther@suse.de>
25755         PR tree-optimization/84132
25756         * tree-data-ref.c (analyze_miv_subscript): Properly
25757         check whether evolution_function_is_affine_multivariate_p
25758         before calling gcd_of_steps_may_divide_p.
25760 2018-01-31  Julia Koval  <julia.koval@intel.com>
25762         PR target/83618
25763         * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
25764         * config/i386/i386.md (rdpid_rex64) New.
25765         (rdpid): Make 32bit only.
25767 2018-01-29  Aldy Hernandez  <aldyh@redhat.com>
25769         PR lto/84105
25770         * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
25771         an IDENTIFIER_NODE for FUNCTION_TYPE's.
25773 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
25775         Revert
25776         2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
25778         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
25780 2018-01-31  Eric Botcazou  <ebotcazou@adacore.com>
25782         PR rtl-optimization/84071
25783         * combine.c (record_dead_and_set_regs_1): Record the source unmodified
25784         for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
25786 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
25788         * config/arc/arc.c (arc_handle_aux_attribute): New function.
25789         (arc_attribute_table): Add 'aux' attribute.
25790         (arc_in_small_data_p): Consider aux like variables.
25791         (arc_is_aux_reg_p): New function.
25792         (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
25793         (arc_get_aux_arg): New function.
25794         (prepare_move_operands): Handle aux-register access.
25795         (arc_handle_aux_attribute): New function.
25796         * doc/extend.texi (ARC Variable attributes): Add subsection.
25798 2018-01-31  Claudiu Zissulescu  <claziss@synopsys.com>
25800         * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
25801         * config/arc/arc.c (arc_handle_uncached_attribute): New function.
25802         (arc_attribute_table): Add 'uncached' attribute.
25803         (arc_print_operand): Print '.di' flag for uncached memory
25804         accesses.
25805         (arc_in_small_data_p): Do not consider for small data the uncached
25806         types.
25807         (arc_is_uncached_mem_p): New function.
25808         * config/arc/predicates.md (compact_store_memory_operand): Check
25809         for uncached memory accesses.
25810         (nonvol_nonimm_operand): Likewise.
25811         * doc/extend.texi (ARC Type Attribute): New subsection.
25813 2018-01-31  Jakub Jelinek  <jakub@redhat.com>
25815         PR c/84100
25816         * common.opt (falign-functions=, falign-jumps=, falign-labels=,
25817         falign-loops=): Add Optimization flag.
25819 2018-01-30  Jeff Law  <law@redhat.com>
25821         PR target/84064
25822         * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
25823         INT_REGISTERS_SAVED.  Check it prior to calling
25824         get_scratch_register_on_entry.
25825         (ix86_adjust_stack_and_probe): Similarly.
25826         (ix86_emit_probe_stack_range): Similarly.
25827         (ix86_expand_prologue): Corresponding changes.
25829 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25831         PR target/40411
25832         * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
25833         -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
25835 2018-01-30  Vladimir Makarov  <vmakarov@redhat.com>
25837         PR target/84112
25838         * lra-constraints.c (curr_insn_transform): Process AND in the
25839         address.
25841 2018-01-30  Jakub Jelinek  <jakub@redhat.com>
25843         PR rtl-optimization/83986
25844         * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
25845         dependence against last_pending_memory_flush in addition to
25846         pending_jump_insns.
25848 2018-01-30  Alexandre Oliva  <aoliva@redhat.com>
25850         PR tree-optimization/81611
25851         * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
25852         copies.
25854 2018-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25856         PR target/83758
25857         * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
25858         a reg rtx.
25860 2018-01-30  Richard Biener  <rguenther@suse.de>
25861             Jakub Jelinek  <jakub@redhat.com>
25863         PR tree-optimization/84111
25864         * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
25865         inner loops added during recursion, as they don't have up-to-date
25866         SSA form.
25868 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
25870         PR ipa/81360
25871         * ipa-inline.c (can_inline_edge_p): Break out late tests to...
25872         (can_inline_edge_by_limits_p): ... here.
25873         (can_early_inline_edge_p, check_callers,
25874         update_caller_keys, update_callee_keys, recursive_inlining,
25875         add_new_edges_to_heap, speculation_useful_p,
25876         inline_small_functions,
25877         inline_small_functions, flatten_function,
25878         inline_to_all_callers_1): Update.
25880 2018-01-30  Jan Hubicka  <hubicka@ucw.cz>
25882         * profile-count.c (profile_count::combine_with_ipa_count): Handle
25883         zeros correctly.
25885 2018-01-30  Richard Biener  <rguenther@suse.de>
25887         PR tree-optimization/83008
25888         * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
25889         invariant and constant vector uses in stmts when they need
25890         more than one stmt.
25892 2018-01-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
25894         PR bootstrap/84017
25895         * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
25896         * configure: Regenerate.
25898 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
25900         * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
25901         pattern.
25902         (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
25903         Use gen_rtx_REG rather than gen_lowpart.
25905 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
25907         * lra-constraints.c (match_reload): Use subreg_lowpart_offset
25908         rather than 0 when creating partial subregs.
25910 2018-01-30  Richard Sandiford  <richard.sandiford@linaro.org>
25912         * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
25913         of usage.
25915 2018-01-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
25917         PR target/81550
25918         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
25919         and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
25920         -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
25921         flags.  This restores the settings used before the 2017-07-24.
25922         Turning off pre increment/decrement/modify allows IVOPTS to
25923         optimize DF/SF loops where the index is an int.
25925 2018-01-29  Richard Biener  <rguenther@suse.de>
25926             Kelvin Nilsen  <kelvin@gcc.gnu.org>
25928         PR bootstrap/80867
25929         * tree-vect-stmts.c (vectorizable_call): Don't call
25930         targetm.vectorize_builtin_md_vectorized_function if callee is
25931         NULL.
25933 2018-01-22  Carl Love  <cel@us.ibm.com>
25935         * doc/extend.tex: Fix typo in second arg in
25936         __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
25938 2018-01-29  Richard Biener  <rguenther@suse.de>
25940         PR tree-optimization/84086
25941         * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
25942         (flush_ssaname_freelist): When SSA names were released reset
25943         the SCEV hash table.
25945 2018-01-29  Richard Biener  <rguenther@suse.de>
25947         PR tree-optimization/84057
25948         * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
25949         removed paths when removing edges.
25951 2018-01-27  H.J. Lu  <hongjiu.lu@intel.com>
25953         * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
25954         -mfunction-return=@var{choice}.
25956 2018-01-27  Bernd Edlinger  <bernd.edlinger@hotmail.de>
25958         PR diagnostic/84034
25959         * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
25960         Handle CR like TAB.
25961         (layout::print_source_line): Likewise.
25962         (test_get_line_width_without_trailing_whitespace): Add test cases.
25964 2018-01-27  Jakub Jelinek  <jakub@redhat.com>
25966         PR middle-end/84040
25967         * sched-deps.c (sched_macro_fuse_insns): Return immediately for
25968         debug insns.
25970 2018-01-26  Jim Wilson  <jimw@sifive.com>
25972         * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
25974         * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
25975         specified.
25977 2018-01-26  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
25979         * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
25980         and CMP + SUB-immediate -> SUBS.
25982 2018-01-26  Martin Sebor  <msebor@redhat.com>
25984         PR tree-optimization/83896
25985         * tree-ssa-strlen.c (get_string_len): Rename...
25986         (get_string_cst_length): ...to this.  Return HOST_WIDE_INT.
25987         Avoid assuming length is constant.
25988         (handle_char_store): Use HOST_WIDE_INT for string length.
25990 2018-01-26  Uros Bizjak  <ubizjak@gmail.com>
25992         PR target/81763
25993         * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
25994         to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
25996 2018-01-26  Richard Biener  <rguenther@suse.de>
25998         PR rtl-optimization/84003
25999         * dse.c (record_store): Only record redundant stores when
26000         the earlier store aliases at least all accesses the later one does.
26002 2018-01-26  Jakub Jelinek  <jakub@redhat.com>
26004         PR rtl-optimization/83985
26005         * dce.c (deletable_insn_p): Return false for separate shrink wrapping
26006         REG_CFA_RESTORE insns.
26007         (delete_unmarked_insns): Don't ignore separate shrink wrapping
26008         REG_CFA_RESTORE insns here.
26010         PR c/83989
26011         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
26012         use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
26014 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26016         * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
26017         * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
26018         (arc_init): Likewise.
26019         (arc_override_options): Likewise.
26020         (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
26021         value.
26022         (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
26023         support.
26024         * config/arc/arc.h (TARGET_DBNZ): Define.
26025         * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
26026         properly set the tune attribute.
26027         (dbnz): Use TARGET_DBNZ guard.
26028         * config/arc/arc.opt (mtune): Add core3 option.
26030 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26032         * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
26033         recognize new pic like addresses.
26034         (arc_delegitimize_address): Clean up.
26036 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26038         * config/arc/arc-arches.def: Option mrf16 valid for all
26039         architectures.
26040         * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
26041         * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
26042         * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
26043         * config/arc/arc-tables.opt: Regenerate.
26044         * config/arc/arc.c (arc_conditional_register_usage): Handle
26045         reduced register file case.
26046         (arc_file_start): Set must have build attributes.
26047         * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
26048         mrf16 option value.
26049         * config/arc/arc.opt (mrf16): Add new option.
26050         * config/arc/elf.h (ATTRIBUTE_PCS): Define.
26051         * config/arc/genmultilib.awk: Handle new mrf16 option.
26052         * config/arc/linux.h (ATTRIBUTE_PCS): Define.
26053         * config/arc/t-multilib: Regenerate.
26054         * doc/invoke.texi (ARC Options): Document mrf16 option.
26056 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26058         * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
26059         * config/arc/arc.c (arc_handle_secure_attribute): New function.
26060         (arc_attribute_table): Add 'secure_call' attribute.
26061         (arc_print_operand): Print secure call operand.
26062         (arc_function_ok_for_sibcall): Don't optimize tail calls when
26063         secure.
26064         (arc_is_secure_call_p): New function.  * config/arc/arc.md
26065         (call_i): Add support for sjli instruction.
26066         (call_value_i): Likewise.
26067         * config/arc/constraints.md (Csc): New constraint.
26069 2018-01-26  Claudiu Zissulescu  <claziss@synopsys.com>
26070             John Eric Martin  <John.Martin@emmicro-us.com>
26072         * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
26073         * config/arc/arc.c (_arc_jli_section): New struct.
26074         (arc_jli_section): New type.
26075         (rc_jli_sections): New static variable.
26076         (arc_handle_jli_attribute): New function.
26077         (arc_attribute_table): Add jli_always and jli_fixed attribute.
26078         (arc_file_end): New function.
26079         (TARGET_ASM_FILE_END): Define.
26080         (arc_print_operand): Reuse 'S' letter for JLI output instruction.
26081         (arc_add_jli_section): New function.
26082         (jli_call_scan): Likewise.
26083         (arc_reorg): Call jli_call_scan.
26084         (arc_output_addsi): Remove 'S' from printing asm operand.
26085         (arc_is_jli_call_p): New function.
26086         * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
26087         operand.
26088         (movhi_insn): Likewise.
26089         (movsi_insn): Likewise.
26090         (movsi_set_cc_insn): Likewise.
26091         (loadqi_update): Likewise.
26092         (load_zeroextendqisi_update): Likewise.
26093         (load_signextendqisi_update): Likewise.
26094         (loadhi_update): Likewise.
26095         (load_zeroextendhisi_update): Likewise.
26096         (load_signextendhisi_update): Likewise.
26097         (loadsi_update): Likewise.
26098         (loadsf_update): Likewise.
26099         (movsicc_insn): Likewise.
26100         (bset_insn): Likewise.
26101         (bxor_insn): Likewise.
26102         (bclr_insn): Likewise.
26103         (bmsk_insn): Likewise.
26104         (bicsi3_insn): Likewise.
26105         (cmpsi_cc_c_insn): Likewise.
26106         (movsi_ne): Likewise.
26107         (movsi_cond_exec): Likewise.
26108         (clrsbsi2): Likewise.
26109         (norm_f): Likewise.
26110         (normw): Likewise.
26111         (swap): Likewise.
26112         (divaw): Likewise.
26113         (flag): Likewise.
26114         (sr): Likewise.
26115         (kflag): Likewise.
26116         (ffs): Likewise.
26117         (ffs_f): Likewise.
26118         (fls): Likewise.
26119         (call_i): Remove 'S' asm letter, add jli instruction.
26120         (call_value_i): Likewise.
26121         * config/arc/arc.op (mjli-always): New option.
26122         * config/arc/constraints.md (Cji): New constraint.
26123         * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
26124         operand.
26125         (subsf3_fpx): Likewise.
26126         (mulsf3_fpx): Likewise.
26127         * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
26128         asm operand.
26129         * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
26130         function attrbutes.
26131         * doc/invoke.texi (ARC): Document mjli-always option.
26133 2018-01-26  Sebastian Perta  <sebastian.perta@renesas.com>
26135         * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
26136         avoid addition with 0 and use incw and decw where possible.
26138 2018-01-26  Richard Biener  <rguenther@suse.de>
26140         PR tree-optimization/81082
26141         * fold-const.c (fold_plusminus_mult_expr): Do not perform the
26142         association if it requires casting to unsigned.
26143         * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
26144         from fold_plusminus_mult_expr to catch important cases late when
26145         range info is available.
26147 2018-01-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26149         * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
26150         * configure.ac (hidden_linkonce): New test.
26151         * configure: Regenerate.
26152         * config.in: Regenerate.
26154 2018-01-26  Julia Koval  <julia.koval@intel.com>
26156         * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
26157         _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
26158         _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
26159         _mm_mask_bitshuffle_epi64_mask): Fix type.
26160         * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
26161         USI_FTYPE_V4DI_V4DI_USI): Remove.
26162         * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
26163         __builtin_ia32_vpshufbitqmb256_mask,
26164         __builtin_ia32_vpshufbitqmb128_mask): Fix types.
26165         * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
26166         * config/i386/sse.md (VI1_AVX512VLBW): Change types.
26168 2018-01-26  Alan Modra  <amodra@gmail.com>
26170         PR target/84033
26171         * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
26172         UNSPEC_VBPERMQ.  Sort other unspecs.
26174 2018-01-25  David Edelsohn  <dje.gcc@gmail.com>
26176         * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
26178 2018-01-25  Jan Hubicka  <hubicka@ucw.cz>
26180         PR middle-end/83055
26181         * predict.c (drop_profile): Do not push/pop cfun; update also
26182         node->count.
26183         (handle_missing_profiles): Fix logic looking for zero profiles.
26185 2018-01-25  Jakub Jelinek  <jakub@redhat.com>
26187         PR middle-end/83977
26188         * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
26189         on functions with #pragma omp declare simd or functions with simd
26190         attribute.
26191         * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
26192         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
26193         Remove trailing \n from warning_at calls.
26195 2018-01-25  Tom de Vries  <tom@codesourcery.com>
26197         PR target/84028
26198         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
26199         for neutered workers.
26201 2018-01-24  Joseph Myers  <joseph@codesourcery.com>
26203         PR target/68467
26204         * config/m68k/m68k.c (m68k_promote_function_mode): New function.
26205         (TARGET_PROMOTE_FUNCTION_MODE): New macro.
26207 2018-01-24  Jeff Law  <law@redhat.com>
26209         PR target/83994
26210         * i386.c (get_probe_interval): Move to earlier point.
26211         (ix86_compute_frame_layout): If -fstack-clash-protection and
26212         the frame is larger than the probe interval, then use pushes
26213         to save registers rather than reg->mem moves.
26214         (ix86_expand_prologue): Remove conditional for int_registers_saved
26215         assertion.
26217 2018-01-24  Vladimir Makarov  <vmakarov@redhat.com>
26219         PR target/84014
26220         * ira-build.c (setup_min_max_allocno_live_range_point): Set up
26221         min/max for never referenced object.
26223 2018-01-24  Jakub Jelinek  <jakub@redhat.com>
26225         PR middle-end/83977
26226         * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
26227         here.
26228         * omp-low.c (create_omp_child_function): Remove "omp declare simd"
26229         attributes from DECL_ATTRIBUTES (decl) without affecting
26230         DECL_ATTRIBUTES (current_function_decl).
26231         * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
26232         functions with non-NULL DECL_ABSTRACT_ORIGIN.
26234 2018-01-24  Richard Sandiford  <richard.sandiford@linaro.org>
26236         PR tree-optimization/83979
26237         * fold-const.c (fold_comparison): Use constant_boolean_node
26238         instead of boolean_{true,false}_node.
26240 2018-01-24  Jan Hubicka  <hubicka@ucw.cz>
26242         * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
26243         with zero counts.
26245 2018-01-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26247         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26248         Simplify the clause that sets the length attribute.
26249         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26250         (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
26251         clause that sets the length attribute.
26252         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26254 2018-01-24  Tom de Vries  <tom@codesourcery.com>
26256         PR target/83589
26257         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
26258         (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
26259         Add strict parameter.
26260         (prevent_branch_around_nothing): Insert dummy insn between branch to
26261         label and label with no ptx insn inbetween.
26262         * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
26264 2018-01-24  Tom de Vries  <tom@codesourcery.com>
26266         PR target/81352
26267         * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
26268         for neutered threads in warp.
26269         * config/nvptx/nvptx.md (define_insn "exit"): New insn.
26271 2018-01-24  Richard Biener  <rguenther@suse.de>
26273         PR tree-optimization/83176
26274         * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
26275         operands.
26277 2018-01-24  Richard Biener  <rguenther@suse.de>
26279         PR tree-optimization/82819
26280         * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
26281         code generating pluses that are no-ops in the target precision.
26283 2018-01-24  Richard Biener  <rguenther@suse.de>
26285         PR middle-end/84000
26286         * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
26288 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
26290         * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
26291         to merge probabilities.
26292         * predict.c (probably_never_executed): Also mark as cold functions
26293         with global 0 profile and guessed local profile.
26294         * profile-count.c (profile_probability::combine_with_count): New
26295         member function.
26296         * profile-count.h (profile_probability::operator*,
26297         profile_probability::operator*=, profile_probability::operator/,
26298         profile_probability::operator/=): Reduce precision to adjusted
26299         and set value to guessed on contradictory divisions.
26300         (profile_probability::combine_with_freq): Remove.
26301         (profile_probability::combine_wiht_count): Declare.
26302         (profile_count::force_nonzero):: Set to adjusted.
26303         (profile_count::probability_in):: Set quality to adjusted.
26304         * tree-ssa-tail-merge.c (replace_block_by): Use
26305         combine_with_count.
26307 2018-01-23  Andrew Waterman  <andrew@sifive.com>
26308             Jim Wilson  <jimw@sifive.com>
26310         * config/riscv/riscv.c (riscv_stack_boundary): New.
26311         (riscv_option_override): Set riscv_stack_boundary.  Handle
26312         riscv_preferred_stack_boundary_arg.
26313         * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
26314         (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
26315         (STACK_BOUNDARY): Set to riscv_stack_boundary.
26316         (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
26317         * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
26318         * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
26320 2018-01-23  H.J. Lu  <hongjiu.lu@intel.com>
26322         PR target/83905
26323         * config/i386/i386.c (ix86_expand_prologue): Use cost reference
26324         of struct ix86_frame.
26325         (ix86_expand_epilogue): Likewise.  Add a local variable for
26326         the reg_save_offset field in struct ix86_frame.
26328 2018-01-23  Bin Cheng  <bin.cheng@arm.com>
26330         PR tree-optimization/82604
26331         * tree-loop-distribution.c (enum partition_kind): New enum item
26332         PKIND_PARTIAL_MEMSET.
26333         (partition_builtin_p): Support above new enum item.
26334         (generate_code_for_partition): Ditto.
26335         (compute_access_range): Differentiate cases that equality can be
26336         proven at all loops, the innermost loops or no loops.
26337         (classify_builtin_st, classify_builtin_ldst): Adjust call to above
26338         function.  Set PKIND_PARTIAL_MEMSET for partition appropriately.
26339         (finalize_partitions, distribute_loop): Don't fuse partition of
26340         PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
26341         (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
26342         parloop is enabled.
26344 2018-01-23  Martin Liska  <mliska@suse.cz>
26346         * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
26347         order to ignore the predictor.
26348         (PRED_POLYMORPHIC_CALL): Likewise.
26349         (PRED_RECURSIVE_CALL): Likewise.
26351 2018-01-23  Martin Liska  <mliska@suse.cz>
26353         * tree-profile.c (tree_profiling): Print function header to
26354         aware reader which function we are working on.
26355         * value-prof.c (gimple_find_values_to_profile): Do not print
26356         not interesting value histograms.
26358 2018-01-23  Martin Liska  <mliska@suse.cz>
26360         * profile-count.h (enum profile_quality): Add
26361         profile_uninitialized as the first value. Do not number values
26362         as they are zero based.
26363         (profile_count::verify): Update sanity check.
26364         (profile_probability::verify): Likewise.
26366 2018-01-23  Nathan Sidwell  <nathan@acm.org>
26368         * doc/invoke.texi (ffor-scope): Deprecate.
26370 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
26372         PR tree-optimization/83510
26373         * domwalk.c (set_all_edges_as_executable): New function.
26374         (dom_walker::dom_walker): Convert bool param
26375         "skip_unreachable_blocks" to enum reachability.  Move setup of
26376         edge flags to set_all_edges_as_executable and only do it when
26377         reachability is REACHABLE_BLOCKS.
26378         * domwalk.h (enum dom_walker::reachability): New enum.
26379         (dom_walker::dom_walker): Convert bool param
26380         "skip_unreachable_blocks" to enum reachability.
26381         (set_all_edges_as_executable): New decl.
26382         * graphite-scop-detection.c  (gather_bbs::gather_bbs): Convert
26383         from false for "skip_unreachable_blocks" to ALL_BLOCKS for
26384         "reachability".
26385         * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
26386         but converting true to REACHABLE_BLOCKS.
26387         * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
26388         * tree-vrp.c
26389         (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
26390         Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
26391         (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
26392         REACHABLE_BLOCKS.
26393         (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
26394         if check_all_array_refs will be called.
26396 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
26398         * tree.c (selftest::test_location_wrappers): Add more test
26399         coverage.
26401 2018-01-23  David Malcolm  <dmalcolm@redhat.com>
26403         * sbitmap.c (selftest::test_set_range): Fix memory leaks.
26404         (selftest::test_bit_in_range): Likewise.
26406 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
26408         PR testsuite/83888
26409         * doc/sourcebuild.texi (vect_float): Say that the selector
26410         only describes the situation when -funsafe-math-optimizations is on.
26411         (vect_float_strict): Document.
26413 2018-01-23  Richard Sandiford  <richard.sandiford@linaro.org>
26415         PR tree-optimization/83965
26416         * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
26417         (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
26418         instead of checking only for a reduction.
26419         (vect_recog_widen_sum_pattern): Likewise.
26421 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
26423         * predict.c (probably_never_executed): Only use precise profile info.
26424         (compute_function_frequency): Skip after inlining hack since we now
26425         have quality checking.
26427 2018-01-23  Jan Hubicka  <hubicka@ucw.cz>
26429         * profile-count.h (profile_probability::very_unlikely,
26430         profile_probability::unlikely, profile_probability::even): Set
26431         precision to guessed.
26433 2018-01-23  Richard Biener  <rguenther@suse.de>
26435         PR tree-optimization/83963
26436         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
26437         Properly terminate dominator walk when crossing the exit edge not
26438         when visiting its source block.
26440 2018-01-23  Jakub Jelinek  <jakub@redhat.com>
26442         PR c++/83918
26443         * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
26444         VIEW_CONVERT_EXPR to wrap CONST_DECLs.
26446 2018-01-22  Jakub Jelinek  <jakub@redhat.com>
26448         PR tree-optimization/83957
26449         * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs.  Remove
26450         semicolon after for body surrounded by braces.
26452         PR tree-optimization/83081
26453         * profile-count.h (profile_probability::split): New method.
26454         * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
26455         Use profile_probability::split.
26456         (do_compare_rtx_and_jump): Fix adjustment of probabilities
26457         when splitting a single conditional jump into 2.
26459 2018-01-22  David Malcolm  <dmalcolm@redhat.com>
26461         PR tree-optimization/69452
26462         * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
26463         decl.
26465 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26467         * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
26468         * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
26469         * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
26471 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26473         * config/rl78/rl78-protos.h (rl78_split_movdi): New function
26474         declaration.
26475         * config/rl78/rl78.md (movdi): New define_expand.
26476         * config/rl78/rl78.c (rl78_split_movdi): New function.
26478 2018-01-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
26480         PR target/83862
26481         * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
26482         no longer used.
26483         * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
26484         * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
26485         128-bit to produce an UNSPEC move to get the double word with the
26486         signbit and then a shift directly to do signbit.
26487         (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
26488         implementation with a new version that just does either a direct
26489         move or a regular move.  Move memory interface to separate insns.
26490         Move insns so they are next to the expander.
26491         (signbit<mode>2_dm_mem_be): New combiner insns to combine load
26492         with signbit move.  Split big and little endian case.
26493         (signbit<mode>2_dm_mem_le): Likewise.
26494         (signbit<mode>2_dm_<su>ext): Delete, no longer used.
26495         (signbit<mode>2_dm2): Likewise.
26497 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26499         * config/rl78/rl78.md (anddi3): New define_expand.
26501 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26503         * config/rl78/rl78.md (umindi3): New define_expand.
26505 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26507         * config/rl78/rl78.md (smindi3): New define_expand.
26509 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26511         * config/rl78/rl78.md (smaxdi3): New define_expand.
26513 2018-01-22  Carl Love  <cel@us.ibm.com>
26515         * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
26516         LVX_V1TI): Add macro expansion.
26517         * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
26518         definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
26519         VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
26520         * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
26521         Change check to determine if the instruction is a byte reversing
26522         entry.  Fix typo in comment.
26523         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
26524         for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
26525         Add def_builtin calls for new builtins.
26526         * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
26527         Add define_insn expansion.
26529 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26531         * config/rl78/rl78.md (umaxdi3): New define_expand.
26533 2018-01-22  Sebastian Perta  <sebastian.perta@renesas.com>
26535         * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
26536         for non-QImode registers.
26538 2018-01-22  Richard Biener  <rguenther@suse.de>
26540         PR tree-optimization/83963
26541         * graphite-scop-detection.c (scop_detection::get_sese): Delay
26542         including the loop exit block.
26543         (scop_detection::merge_sese): Likewise.
26544         (scop_detection::add_scop): Do it here instead.
26546 2018-01-22  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26548         * doc/sourcebuild.texi (arm_softfloat): Document.
26550 2018-01-21  John David Anglin  <danglin@gcc.gnu.org>
26552         PR gcc/77734
26553         * config/pa/pa.c (pa_function_ok_for_sibcall): Use
26554         targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
26555         Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
26557 2018-01-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26558             David Edelsohn  <dje.gcc@gmail.com>
26560         PR target/83946
26561         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26562         Change "crset eq" to "crset 2".
26563         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26564         (*call_indirect_aix<mode>_nospec): Likewise.
26565         (*call_value_indirect_aix<mode>_nospec): Likewise.
26566         (*call_indirect_elfv2<mode>_nospec): Likewise.
26567         (*call_value_indirect_elfv2<mode>_nospec): Likewise.
26568         (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
26569         change assembly output from . to $.
26570         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26571         (indirect_jump<mode>_nospec): Change assembly output from . to $.
26572         (*tablejump<mode>_internal1_nospec): Likewise.
26574 2018-01-21  Oleg Endo  <olegendo@gcc.gnu.org>
26576         PR target/80870
26577         * config/sh/sh_optimize_sett_clrt.cc:
26578         Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
26580 2018-01-20  Richard Sandiford  <richard.sandiford@linaro.org>
26582         PR tree-optimization/83940
26583         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
26584         offset_dt to vect_constant_def rather than vect_unknown_def_type.
26585         (vect_check_load_store_mask): Add a mask_dt_out parameter and
26586         use it to pass back the definition type.
26587         (vect_check_store_rhs): Likewise rhs_dt_out.
26588         (vect_build_gather_load_calls): Add a mask_dt argument and use
26589         it instead of a call to vect_is_simple_use.
26590         (vectorizable_store): Update calls to vect_check_load_store_mask
26591         and vect_check_store_rhs.  Use the dt returned by the latter instead
26592         of scatter_src_dt.  Use the cached mask_dt and gs_info.offset_dt
26593         instead of calls to vect_is_simple_use.  Pass the scalar rather
26594         than the vector operand to vect_is_simple_use when handling
26595         second and subsequent copies of an rhs value.
26596         (vectorizable_load): Update calls to vect_check_load_store_mask
26597         and vect_build_gather_load_calls.  Use the cached mask_dt and
26598         gs_info.offset_dt instead of calls to vect_is_simple_use.
26600 2018-01-20  Jakub Jelinek  <jakub@redhat.com>
26602         PR middle-end/83945
26603         * tree-emutls.c: Include gimplify.h.
26604         (lower_emutls_2): New function.
26605         (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
26606         with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
26607         it before further processing.
26609         PR target/83930
26610         * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
26611         UINTVAL (trueop1) instead of INTVAL (op1).
26613 2018-01-19  Jakub Jelinek  <jakub@redhat.com>
26615         PR debug/81570
26616         PR debug/83728
26617         * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
26618         INCOMING_FRAME_SP_OFFSET if not defined.
26619         (scan_trace): Add ENTRY argument.  If true and
26620         DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
26621         emit a note to adjust the CFA offset.
26622         (create_cfi_notes): Adjust scan_trace callers.
26623         (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
26624         INCOMING_FRAME_SP_OFFSET in the CIE.
26625         * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
26626         * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
26627         Likewise.
26628         * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
26629         * doc/tm.texi: Regenerated.
26631 2018-01-19  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
26633         PR rtl-optimization/83147
26634         * lra-constraints.c (remove_inheritance_pseudos): Use
26635         lra_substitute_pseudo_within_insn.
26637 2018-01-19  Tom de Vries  <tom@codesourcery.com>
26638             Cesar Philippidis  <cesar@codesourcery.com>
26640         PR target/83920
26641         * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
26643 2018-01-19  Cesar Philippidis  <cesar@codesourcery.com>
26645         PR target/83790
26646         * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
26647         spaces for function labels.
26649 2018-01-19  Martin Liska  <mliska@suse.cz>
26651         * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
26652         (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
26653         (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
26654         (PRED_OPCODE_POSITIVE): Change from 64 to 59.
26655         (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
26656         (PRED_CONST_RETURN): Change from 69 to 65.
26657         (PRED_NULL_RETURN): Change from 91 to 71.
26658         (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
26659         (PRED_LOOP_GUARD): Change from 66 to 73.
26661 2018-01-19  Martin Liska  <mliska@suse.cz>
26663         * predict.c (predict_insn_def): Add new assert.
26664         (struct branch_predictor): Change type to signed integer.
26665         (test_prediction_value_range): Amend test to cover
26666         PROB_UNINITIALIZED.
26667         * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
26668         (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
26669         (PRED_LOOP_ITERATIONS_MAX): Likewise.
26670         (PRED_LOOP_IV_COMPARE): Likewise.
26671         * predict.h (PROB_UNINITIALIZED): Define new constant.
26673 2018-01-19  Martin Liska  <mliska@suse.cz>
26675         * predict.c (dump_prediction): Add new format for
26676         analyze_brprob.py script which is enabled with -details
26677         suboption.
26678         * profile-count.h (precise_p): New function.
26680 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
26682         PR tree-optimization/83922
26683         * tree-vect-loop.c (vect_verify_full_masking): Return false if
26684         there are no statements that need masking.
26685         (vect_active_double_reduction_p): New function.
26686         (vect_analyze_loop_operations): Use it when handling phis that
26687         are not in the loop header.
26689 2018-01-19  Richard Sandiford  <richard.sandiford@linaro.org>
26691         PR tree-optimization/83914
26692         * tree-vect-loop.c (vectorizable_induction): Don't convert
26693         init_expr or apply the peeling adjustment for inductions
26694         that are nested within the vectorized loop.
26696 2018-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26698         * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
26699         instead of NEG.
26701 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
26703         PR sanitizer/81715
26704         PR testsuite/83882
26705         * function.h (gimplify_parameters): Add gimple_seq * argument.
26706         * function.c: Include gimple.h and options.h.
26707         (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
26708         for the added local temporaries if needed.
26709         * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
26710         if there are any parameter cleanups, wrap whole body into a
26711         try/finally with the cleanups.
26713 2018-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
26715         PR target/82964
26716         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
26717         Use GET_MODE_CLASS for scalar floating point.
26719 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
26721         PR ipa/82256
26722         patch by PaX Team
26723         * cgraphclones.c (cgraph_node::create_version_clone_with_body):
26724         Fix call of call_cgraph_insertion_hooks.
26726 2018-01-18  Martin Sebor  <msebor@redhat.com>
26728         * doc/invoke.texi (-Wclass-memaccess): Tweak text.
26730 2018-01-18  Jan Hubicka  <hubicka@ucw.cz>
26732         PR ipa/83619
26733         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
26734         frequencies.
26736 2018-01-18  Boris Kolpackov  <boris@codesynthesis.com>
26738         PR other/70268
26739         * common.opt: (-ffile-prefix-map): New option.
26740         * opts.c (common_handle_option): Defer it.
26741         * opts-global.c (handle_common_deferred_options): Handle it.
26742         * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
26743         * file-prefix-map.h: New file.
26744         (remap_debug_filename, add_debug_prefix_map): ...here.
26745         (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
26746         * final.c (debug_prefix_map, add_debug_prefix_map
26747         remap_debug_filename): Move to...
26748         * file-prefix-map.c: New file.
26749         (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
26750         generalize, get rid of alloca(), use strrchr() instead of strchr().
26751         (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
26752         Implement in terms of add_prefix_map().
26753         (remap_macro_filename, remap_debug_filename): Implement in term of
26754         remap_filename().
26755         * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
26756         * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
26757         * dbxout.c: Include file-prefix-map.h.
26758         * varasm.c: Likewise.
26759         * vmsdbgout.c: Likewise.
26760         * xcoffout.c: Likewise.
26761         * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
26762         * doc/cppopts.texi (-fmacro-prefix-map): Document.
26763         * doc/invoke.texi (-ffile-prefix-map): Document.
26764         (-fdebug-prefix-map): Update description.
26766 2018-01-18  Martin Liska  <mliska@suse.cz>
26768         * config/i386/i386.c (indirect_thunk_name): Document that also
26769         lfence is emitted.
26770         (output_indirect_thunk): Document why both instructions
26771         (pause and lfence) are generated.
26773 2018-01-18  Richard Biener  <rguenther@suse.de>
26775         PR tree-optimization/83887
26776         * graphite-scop-detection.c
26777         (scop_detection::get_nearest_dom_with_single_entry): Remove.
26778         (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
26779         (scop_detection::merge_sese): Re-implement with a flood-fill
26780         algorithm that properly finds a SESE region if it exists.
26782 2018-01-18  Jakub Jelinek  <jakub@redhat.com>
26784         PR c/61240
26785         * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
26786         pointer_diff optimizations use view_convert instead of convert.
26788 2018-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26790         * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
26791         Generate different code for -mno-speculate-indirect-jumps.
26792         (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
26793         (*call_indirect_aix<mode>): Disable for
26794         -mno-speculate-indirect-jumps.
26795         (*call_indirect_aix<mode>_nospec): New define_insn.
26796         (*call_value_indirect_aix<mode>): Disable for
26797         -mno-speculate-indirect-jumps.
26798         (*call_value_indirect_aix<mode>_nospec): New define_insn.
26799         (*sibcall_nonlocal_sysv<mode>): Generate different code for
26800         -mno-speculate-indirect-jumps.
26801         (*sibcall_value_nonlocal_sysv<mode>): Likewise.
26803 2018-01-17  Michael Meissner  <meissner@linux.vnet.ibm.com>
26805         * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
26806         long double type, set the flags for noting the default long double
26807         type, even if we don't pass or return a long double type.
26809 2018-01-17  Jan Hubicka  <hubicka@ucw.cz>
26811         PR ipa/83051
26812         * ipa-inline.c (flatten_function): Do not overwrite final inlining
26813         failure.
26815 2018-01-17  Will Schmidt  <will_schmidt@vnet.ibm.com>
26817         * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
26818         support for merge[hl].
26819         (fold_mergehl_helper): New helper function.
26820         (tree-vector-builder.h): New #include for tree_vector_builder usage.
26821         * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
26822         (altivec_vmrglw_direct): Add xxmrglw insn.
26824 2018-01-17  Andrew Waterman  <andrew@sifive.com>
26826         * config/riscv/riscv.c (riscv_conditional_register_usage): If
26827         UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
26829 2018-01-17  David Malcolm  <dmalcolm@redhat.com>
26831         PR lto/83121
26832         * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
26833         call the lto_location_cache before reading the
26834         DECL_SOURCE_LOCATION of the types.
26836 2018-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
26837             Richard Sandiford  <richard.sandiford@linaro.org>
26839         * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
26840         * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
26841         (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
26842         SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
26843         * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
26844         Add declaration.
26845         * config/aarch64/constraints.md (aarch64_movti_operand):
26846         Limit immediates.
26847         * config/aarch64/predicates.md (Uti): Add new constraint.
26849 2018-01-17  Carl Love  <cel@us.ibm.com>
26851         * config/rs6000/vsx.md (define_expand xl_len_r,
26852         define_expand stxvl, define_expand *stxvl): Add match_dup argument.
26853         (define_insn): Add, match_dup 1 argument to define_insn stxvll and
26854         lxvll.
26855         (define_expand, define_insn): Move the shift left from  the
26856         define_insn to the define_expand for lxvl and stxvl instructions.
26857         * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
26858         and XL_LEN_R definitions to PURE.
26860 2018-01-17  Uros Bizjak  <ubizjak@gmail.com>
26862         * config/i386/i386.c (indirect_thunk_name): Declare regno
26863         as unsigned int.  Compare regno with INVALID_REGNUM.
26864         (output_indirect_thunk): Ditto.
26865         (output_indirect_thunk_function): Ditto.
26866         (ix86_code_end): Declare regno as unsigned int.  Use INVALID_REGNUM
26867         in the call to output_indirect_thunk_function.
26869 2018-01-17  Richard Sandiford  <richard.sandiford@linaro.org>
26871         PR middle-end/83884
26872         * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
26873         rather than the size of inner_type to determine the stack slot size
26874         when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
26876 2018-01-16  Sebastian Peryt  <sebastian.peryt@intel.com>
26878         PR target/83546
26879         * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
26880         to PTA_SILVERMONT.
26882 2018-01-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
26884         * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
26885         endian Linux systems to optionally enable multilibs for selecting
26886         the long double type if the user configured an explicit type.
26887         * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
26888         have no long double multilibs if not defined.
26889         * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
26890         warn if the user used -mabi={ieee,ibm}longdouble and we built
26891         multilibs for long double.
26892         * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
26893         appropriate multilib option.
26894         (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
26895         multilib options.
26896         * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
26897         for building long double multilibs.
26898         * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
26900 2018-01-16  John David Anglin  <danglin@gcc.gnu.org>
26902         * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
26903         copies.
26905         * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
26906         64 bits.
26907         * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
26908         128 bits.
26910         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
26911         variables.
26913         * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
26914         return value.
26916 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
26918         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
26919         ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
26921 2018-01-16  Kelvin Nilsen  <kelvin@gcc.gnu.org>
26923         * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
26924         different rtl trees depending on TARGET_64BIT.
26925         (rs6000_gen_lvx): Likewise.
26927 2018-01-16  Eric Botcazou  <ebotcazou@adacore.com>
26929         * config/visium/visium.md (nop): Tweak comment.
26930         (hazard_nop): Likewise.
26932 2018-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26934         * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
26935         -mspeculate-indirect-jumps.
26936         * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
26937         for -mno-speculate-indirect-jumps.
26938         (*call_indirect_elfv2<mode>_nospec): New define_insn.
26939         (*call_value_indirect_elfv2<mode>): Disable for
26940         -mno-speculate-indirect-jumps.
26941         (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
26942         (indirect_jump): Emit different RTL for
26943         -mno-speculate-indirect-jumps.
26944         (*indirect_jump<mode>): Disable for
26945         -mno-speculate-indirect-jumps.
26946         (*indirect_jump<mode>_nospec): New define_insn.
26947         (tablejump): Emit different RTL for
26948         -mno-speculate-indirect-jumps.
26949         (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
26950         (tablejumpsi_nospec): New define_expand.
26951         (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
26952         (tablejumpdi_nospec): New define_expand.
26953         (*tablejump<mode>_internal1): Disable for
26954         -mno-speculate-indirect-jumps.
26955         (*tablejump<mode>_internal1_nospec): New define_insn.
26956         * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
26957         option.
26959 2018-01-16  Artyom Skrobov tyomitch@gmail.com
26961         * caller-save.c (insert_save): Drop unnecessary parameter.  All
26962         callers updated.
26964 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
26965             Richard Biener  <rguenth@suse.de>
26967         PR libgomp/83590
26968         * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
26969         return early, inline manually is_gimple_sizepos.  Make sure if we
26970         call gimplify_expr we don't end up with a gimple constant.
26971         * tree.c (variably_modified_type_p): Don't return true for
26972         is_gimple_constant (_t).  Inline manually is_gimple_sizepos.
26973         * gimplify.h (is_gimple_sizepos): Remove.
26975 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
26977         PR tree-optimization/83857
26978         * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
26979         vectorizable_live_operation for pure SLP statements.
26980         (vectorizable_live_operation): Handle PHIs.
26982 2018-01-16  Richard Biener  <rguenther@suse.de>
26984         PR tree-optimization/83867
26985         * tree-vect-stmts.c (vect_transform_stmt): Precompute
26986         nested_in_vect_loop_p since the scalar stmt may get invalidated.
26988 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
26990         PR c/83844
26991         * stor-layout.c (handle_warn_if_not_align): Use byte_position and
26992         multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
26993         If off is not INTEGER_CST, issue a may not be aligned warning
26994         rather than isn't aligned.  Use isn%'t rather than isn't.
26995         * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
26996         into MULT_EXPR.
26997         <case MULT_EXPR>: Improve the case when bottom and one of the
26998         MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
26999         operand, in that case check if the other operand is multiple of
27000         bottom divided by the INTEGER_CST operand.
27002 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
27004         PR target/83858
27005         * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
27006         * config/pa/pa-protos.h (pa_function_arg_size): Declare.
27007         * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
27008         pa_function_arg_size instead of FUNCTION_ARG_SIZE.
27009         * config/pa/pa.c (pa_function_arg_advance): Likewise.
27010         (pa_function_arg, pa_arg_partial_bytes): Likewise.
27011         (pa_function_arg_size): New function.
27013 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
27015         * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
27016         in a separate statement.
27018 2018-01-16  Richard Sandiford  <richard.sandiford@linaro.org>
27020         PR tree-optimization/83847
27021         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
27022         group gathers and scatters.
27024 2018-01-16  Jakub Jelinek  <jakub@redhat.com>
27026         PR rtl-optimization/86620
27027         * params.def (max-sched-ready-insns): Bump minimum value to 1.
27029         PR rtl-optimization/83213
27030         * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
27031         to last if both are JUMP_INSNs.
27033         PR tree-optimization/83843
27034         * gimple-ssa-store-merging.c
27035         (imm_store_chain_info::output_merged_store): Handle bit_not_p on
27036         store_immediate_info for bswap/nop orig_stores.
27038 2018-01-15  Andrew Waterman  <andrew@sifive.com>
27040         * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
27041         !TARGET_MUL.
27042         <UDIV>: Increase cost if !TARGET_DIV.
27044 2018-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
27046         * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
27047         (define_attr "cr_logical_3op"): New.
27048         (cceq_ior_compare): Adjust.
27049         (cceq_ior_compare_complement): Adjust.
27050         (*cceq_rev_compare): Adjust.
27051         * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
27052         (is_cracked_insn): Adjust.
27053         (insn_must_be_first_in_group): Adjust.
27054         * config/rs6000/40x.md: Adjust.
27055         * config/rs6000/440.md: Adjust.
27056         * config/rs6000/476.md: Adjust.
27057         * config/rs6000/601.md: Adjust.
27058         * config/rs6000/603.md: Adjust.
27059         * config/rs6000/6xx.md: Adjust.
27060         * config/rs6000/7450.md: Adjust.
27061         * config/rs6000/7xx.md: Adjust.
27062         * config/rs6000/8540.md: Adjust.
27063         * config/rs6000/cell.md: Adjust.
27064         * config/rs6000/e300c2c3.md: Adjust.
27065         * config/rs6000/e500mc.md: Adjust.
27066         * config/rs6000/e500mc64.md: Adjust.
27067         * config/rs6000/e5500.md: Adjust.
27068         * config/rs6000/e6500.md: Adjust.
27069         * config/rs6000/mpc.md: Adjust.
27070         * config/rs6000/power4.md: Adjust.
27071         * config/rs6000/power5.md: Adjust.
27072         * config/rs6000/power6.md: Adjust.
27073         * config/rs6000/power7.md: Adjust.
27074         * config/rs6000/power8.md: Adjust.
27075         * config/rs6000/power9.md: Adjust.
27076         * config/rs6000/rs64.md: Adjust.
27077         * config/rs6000/titan.md: Adjust.
27079 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27081         * config/i386/predicates.md (indirect_branch_operand): Rewrite
27082         ix86_indirect_branch_register logic.
27084 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27086         * config/i386/constraints.md (Bs): Update
27087         ix86_indirect_branch_register check.  Don't check
27088         ix86_indirect_branch_register with GOT_memory_operand.
27089         (Bw): Likewise.
27090         * config/i386/predicates.md (GOT_memory_operand): Don't check
27091         ix86_indirect_branch_register here.
27092         (GOT32_symbol_operand): Likewise.
27094 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27096         * config/i386/predicates.md (constant_call_address_operand):
27097         Rewrite ix86_indirect_branch_register logic.
27098         (sibcall_insn_operand): Likewise.
27100 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27102         * config/i386/constraints.md (Bs): Replace
27103         ix86_indirect_branch_thunk_register with
27104         ix86_indirect_branch_register.
27105         (Bw): Likewise.
27106         * config/i386/i386.md (indirect_jump): Likewise.
27107         (tablejump): Likewise.
27108         (*sibcall_memory): Likewise.
27109         (*sibcall_value_memory): Likewise.
27110         Peepholes of indirect call and jump via memory: Likewise.
27111         * config/i386/i386.opt: Likewise.
27112         * config/i386/predicates.md (indirect_branch_operand): Likewise.
27113         (GOT_memory_operand): Likewise.
27114         (call_insn_operand): Likewise.
27115         (sibcall_insn_operand): Likewise.
27116         (GOT32_symbol_operand): Likewise.
27118 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
27120         PR middle-end/83837
27121         * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
27122         type rather than type addr's type points to.
27123         (expand_omp_atomic_mutex): Likewise.
27124         (expand_omp_atomic): Likewise.
27126 2018-01-15  H.J. Lu  <hongjiu.lu@intel.com>
27128         PR target/83839
27129         * config/i386/i386.c (output_indirect_thunk_function): Use
27130         ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
27131         for  __x86_return_thunk.
27133 2018-01-15  Richard Biener  <rguenther@suse.de>
27135         PR middle-end/83850
27136         * expmed.c (extract_bit_field_1): Fix typo.
27138 2018-01-15  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
27140         PR target/83687
27141         * config/arm/iterators.md (VF): New mode iterator.
27142         * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
27143         Remove integer-related logic from pattern.
27144         (neon_vabd<mode>_3): Likewise.
27146 2018-01-15  Jakub Jelinek  <jakub@redhat.com>
27148         PR middle-end/82694
27149         * common.opt (fstrict-overflow): No longer an alias.
27150         (fwrapv-pointer): New option.
27151         * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
27152         also for pointer types based on flag_wrapv_pointer.
27153         * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
27154         opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
27155         opts->x_flag_wrapv got set.
27156         * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
27157         changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
27158         POINTER_TYPE_OVERFLOW_UNDEFINED.
27159         * match.pd: Likewise in address comparison pattern.
27160         * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
27162 2018-01-15  Richard Biener  <rguenther@suse.de>
27164         PR lto/83804
27165         * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
27166         from TYPE_FIELDS.  Free TYPE_BINFO if not used by devirtualization.
27167         Reset type names to their identifier if their TYPE_DECL doesn't
27168         have linkage (and thus is used for ODR and devirt).
27169         (save_debug_info_for_decl): Remove.
27170         (save_debug_info_for_type): Likewise.
27171         (add_tree_to_fld_list): Adjust.
27172         * tree-pretty-print.c (dump_generic_node): Make dumping of
27173         type names more robust.
27175 2018-01-15  Richard Biener  <rguenther@suse.de>
27177         * BASE-VER: Bump to 8.0.1.
27179 2018-01-14  Martin Sebor  <msebor@redhat.com>
27181         PR other/83508
27182         * builtins.c (check_access): Avoid warning when the no-warning bit
27183         is set.
27185 2018-01-14  Cory Fields  <cory-nospam-@coryfields.com>
27187         * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
27188         * ira-color (allocno_hard_regs_compare): Likewise.
27190 2018-01-14  Nathan Rossi  <nathan@nathanrossi.com>
27192         PR target/83013
27193         * config/microblaze/microblaze.c (microblaze_asm_output_ident):
27194         Use .pushsection/.popsection.
27196 2018-01-14  Martin Sebor  <msebor@redhat.com>
27198         PR c++/81327
27199         * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
27201 2018-01-14  Jakub Jelinek  <jakub@redhat.com>
27203         * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
27204         entry from extra_headers.
27205         (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
27206         extra_headers, make the list bitwise identical to the i?86-*-* one.
27208 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
27210         * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
27211         -mcmodel=large with -mindirect-branch=thunk,
27212         -mindirect-branch=thunk-extern, -mfunction-return=thunk and
27213         -mfunction-return=thunk-extern.
27214         * doc/invoke.texi: Document -mcmodel=large is incompatible with
27215         -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
27216         -mfunction-return=thunk and -mfunction-return=thunk-extern.
27218 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
27220         * config/i386/i386.c (print_reg): Print the name of the full
27221         integer register without '%'.
27222         (ix86_print_operand): Handle 'V'.
27223         * doc/extend.texi: Document 'V' modifier.
27225 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
27227         * config/i386/constraints.md (Bs): Disallow memory operand for
27228         -mindirect-branch-register.
27229         (Bw): Likewise.
27230         * config/i386/predicates.md (indirect_branch_operand): Likewise.
27231         (GOT_memory_operand): Likewise.
27232         (call_insn_operand): Likewise.
27233         (sibcall_insn_operand): Likewise.
27234         (GOT32_symbol_operand): Likewise.
27235         * config/i386/i386.md (indirect_jump): Call convert_memory_address
27236         for -mindirect-branch-register.
27237         (tablejump): Likewise.
27238         (*sibcall_memory): Likewise.
27239         (*sibcall_value_memory): Likewise.
27240         Disallow peepholes of indirect call and jump via memory for
27241         -mindirect-branch-register.
27242         (*call_pop): Replace m with Bw.
27243         (*call_value_pop): Likewise.
27244         (*sibcall_pop_memory): Replace m with Bs.
27245         * config/i386/i386.opt (mindirect-branch-register): New option.
27246         * doc/invoke.texi: Document -mindirect-branch-register option.
27248 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
27250         * config/i386/i386-protos.h (ix86_output_function_return): New.
27251         * config/i386/i386.c (ix86_set_indirect_branch_type): Also
27252         set function_return_type.
27253         (indirect_thunk_name): Add ret_p to indicate thunk for function
27254         return.
27255         (output_indirect_thunk_function): Pass false to
27256         indirect_thunk_name.
27257         (ix86_output_indirect_branch_via_reg): Likewise.
27258         (ix86_output_indirect_branch_via_push): Likewise.
27259         (output_indirect_thunk_function): Create alias for function
27260         return thunk if regno < 0.
27261         (ix86_output_function_return): New function.
27262         (ix86_handle_fndecl_attribute): Handle function_return.
27263         (ix86_attribute_table): Add function_return.
27264         * config/i386/i386.h (machine_function): Add
27265         function_return_type.
27266         * config/i386/i386.md (simple_return_internal): Use
27267         ix86_output_function_return.
27268         (simple_return_internal_long): Likewise.
27269         * config/i386/i386.opt (mfunction-return=): New option.
27270         (indirect_branch): Mention -mfunction-return=.
27271         * doc/extend.texi: Document function_return function attribute.
27272         * doc/invoke.texi: Document -mfunction-return= option.
27274 2018-01-14  H.J. Lu  <hongjiu.lu@intel.com>
27276         * config/i386/i386-opts.h (indirect_branch): New.
27277         * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
27278         * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
27279         with local indirect jump when converting indirect call and jump.
27280         (ix86_set_indirect_branch_type): New.
27281         (ix86_set_current_function): Call ix86_set_indirect_branch_type.
27282         (indirectlabelno): New.
27283         (indirect_thunk_needed): Likewise.
27284         (indirect_thunk_bnd_needed): Likewise.
27285         (indirect_thunks_used): Likewise.
27286         (indirect_thunks_bnd_used): Likewise.
27287         (INDIRECT_LABEL): Likewise.
27288         (indirect_thunk_name): Likewise.
27289         (output_indirect_thunk): Likewise.
27290         (output_indirect_thunk_function): Likewise.
27291         (ix86_output_indirect_branch_via_reg): Likewise.
27292         (ix86_output_indirect_branch_via_push): Likewise.
27293         (ix86_output_indirect_branch): Likewise.
27294         (ix86_output_indirect_jmp): Likewise.
27295         (ix86_code_end): Call output_indirect_thunk_function if needed.
27296         (ix86_output_call_insn): Call ix86_output_indirect_branch if
27297         needed.
27298         (ix86_handle_fndecl_attribute): Handle indirect_branch.
27299         (ix86_attribute_table): Add indirect_branch.
27300         * config/i386/i386.h (machine_function): Add indirect_branch_type
27301         and has_local_indirect_jump.
27302         * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
27303         to true.
27304         (tablejump): Likewise.
27305         (*indirect_jump): Use ix86_output_indirect_jmp.
27306         (*tablejump_1): Likewise.
27307         (simple_return_indirect_internal): Likewise.
27308         * config/i386/i386.opt (mindirect-branch=): New option.
27309         (indirect_branch): New.
27310         (keep): Likewise.
27311         (thunk): Likewise.
27312         (thunk-inline): Likewise.
27313         (thunk-extern): Likewise.
27314         * doc/extend.texi: Document indirect_branch function attribute.
27315         * doc/invoke.texi: Document -mindirect-branch= option.
27317 2018-01-14  Jan Hubicka  <hubicka@ucw.cz>
27319         PR ipa/83051
27320         * ipa-inline.c (edge_badness): Tolerate roundoff errors.
27322 2018-01-14  Richard Sandiford  <richard.sandiford@linaro.org>
27324         * ipa-inline.c (want_inline_small_function_p): Return false if
27325         inlining has already failed with CIF_FINAL_ERROR.
27326         (update_caller_keys): Call want_inline_small_function_p before
27327         can_inline_edge_p.
27328         (update_callee_keys): Likewise.
27330 2018-01-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
27332         * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
27333         New function.
27334         (rs6000_quadword_masked_address_p): Likewise.
27335         (quad_aligned_load_p): Likewise.
27336         (quad_aligned_store_p): Likewise.
27337         (const_load_sequence_p): Add comment to describe the outer-most loop.
27338         (mimic_memory_attributes_and_flags): New function.
27339         (rs6000_gen_stvx): Likewise.
27340         (replace_swapped_aligned_store): Likewise.
27341         (rs6000_gen_lvx): Likewise.
27342         (replace_swapped_aligned_load): Likewise.
27343         (replace_swapped_load_constant): Capitalize argument name in
27344         comment describing this function.
27345         (rs6000_analyze_swaps): Add a third pass to search for vector loads
27346         and stores that access quad-word aligned addresses and replace
27347         with stvx or lvx instructions when appropriate.
27348         * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
27349         New function prototype.
27350         (rs6000_quadword_masked_address_p): Likewise.
27351         (rs6000_gen_lvx): Likewise.
27352         (rs6000_gen_stvx): Likewise.
27353         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
27354         VSX_D (V2DF, V2DI), modify this split to select lvx instruction
27355         when memory address is aligned.
27356         (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
27357         this split to select lvx instruction when memory address is aligned.
27358         (*vsx_le_perm_load_v8hi): Modify this split to select lvx
27359         instruction when memory address is aligned.
27360         (*vsx_le_perm_load_v16qi): Likewise.
27361         (four unnamed splitters): Modify to select the stvx instruction
27362         when memory is aligned.
27364 2018-01-13  Jan Hubicka  <hubicka@ucw.cz>
27366         * predict.c (determine_unlikely_bbs): Handle correctly BBs
27367         which appears in the queue multiple times.
27369 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27370             Alan Hayward  <alan.hayward@arm.com>
27371             David Sherwood  <david.sherwood@arm.com>
27373         * tree-vectorizer.h (vec_lower_bound): New structure.
27374         (_loop_vec_info): Add check_nonzero and lower_bounds.
27375         (LOOP_VINFO_CHECK_NONZERO): New macro.
27376         (LOOP_VINFO_LOWER_BOUNDS): Likewise.
27377         (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
27378         * tree-data-ref.h (dr_with_seg_len): Add access_size and align
27379         fields.  Make seg_len the distance travelled, not including the
27380         access size.
27381         (dr_direction_indicator): Declare.
27382         (dr_zero_step_indicator): Likewise.
27383         (dr_known_forward_stride_p): Likewise.
27384         * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
27385         tree-ssanames.h.
27386         (runtime_alias_check_p): Allow runtime alias checks with
27387         variable strides.
27388         (operator ==): Compare access_size and align.
27389         (prune_runtime_alias_test_list): Rework for new distinction between
27390         the access_size and seg_len.
27391         (create_intersect_range_checks_index): Likewise.  Cope with polynomial
27392         segment lengths.
27393         (get_segment_min_max): New function.
27394         (create_intersect_range_checks): Use it.
27395         (dr_step_indicator): New function.
27396         (dr_direction_indicator): Likewise.
27397         (dr_zero_step_indicator): Likewise.
27398         (dr_known_forward_stride_p): Likewise.
27399         * tree-loop-distribution.c (data_ref_segment_size): Return
27400         DR_STEP * (niters - 1).
27401         (compute_alias_check_pairs): Update call to the dr_with_seg_len
27402         constructor.
27403         * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
27404         (vect_preserves_scalar_order_p): New function, split out from...
27405         (vect_analyze_data_ref_dependence): ...here.  Check for zero steps.
27406         (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
27407         (vect_vfa_access_size): New function.
27408         (vect_vfa_align): Likewise.
27409         (vect_compile_time_alias): Take access_size_a and access_b arguments.
27410         (dump_lower_bound): New function.
27411         (vect_check_lower_bound): Likewise.
27412         (vect_small_gap_p): Likewise.
27413         (vectorizable_with_step_bound_p): Likewise.
27414         (vect_prune_runtime_alias_test_list): Ignore cross-iteration
27415         depencies if the vectorization factor is 1.  Convert the checks
27416         for nonzero steps into checks on the bounds of DR_STEP.  Try using
27417         a bunds check for variable steps if the minimum required step is
27418         relatively small. Update calls to the dr_with_seg_len
27419         constructor and to vect_compile_time_alias.
27420         * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
27421         function.
27422         (vect_loop_versioning): Call it.
27423         * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
27424         when retrying.
27425         (vect_estimate_min_profitable_iters): Account for any bounds checks.
27427 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27428             Alan Hayward  <alan.hayward@arm.com>
27429             David Sherwood  <david.sherwood@arm.com>
27431         * doc/sourcebuild.texi (vect_scatter_store): Document.
27432         * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
27433         optabs.
27434         * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
27435         Document.
27436         * genopinit.c (main): Add supports_vec_scatter_store and
27437         supports_vec_scatter_store_cached to target_optabs.
27438         * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
27439         IFN_MASK_SCATTER_STORE.
27440         * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
27441         functions.
27442         * internal-fn.h (internal_store_fn_p): Declare.
27443         (internal_fn_stored_value_index): Likewise.
27444         * internal-fn.c (scatter_store_direct): New macro.
27445         (expand_scatter_store_optab_fn): New function.
27446         (direct_scatter_store_optab_supported_p): New macro.
27447         (internal_store_fn_p): New function.
27448         (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
27449         IFN_MASK_SCATTER_STORE.
27450         (internal_fn_mask_index): Likewise.
27451         (internal_fn_stored_value_index): New function.
27452         (internal_gather_scatter_fn_supported_p): Adjust operand numbers
27453         for scatter stores.
27454         * optabs-query.h (supports_vec_scatter_store_p): Declare.
27455         * optabs-query.c (supports_vec_scatter_store_p): New function.
27456         * tree-vectorizer.h (vect_get_store_rhs): Declare.
27457         * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
27458         true for scatter stores.
27459         (vect_gather_scatter_fn_p): Handle scatter stores too.
27460         (vect_check_gather_scatter): Consider using scatter stores if
27461         supports_vec_scatter_store_p.
27462         * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
27463         scatter stores too.
27464         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
27465         internal_fn_stored_value_index.
27466         (check_load_store_masking): Handle scatter stores too.
27467         (vect_get_store_rhs): Make public.
27468         (vectorizable_call): Use internal_store_fn_p.
27469         (vectorizable_store): Handle scatter store internal functions.
27470         (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
27471         when deciding whether the end of the group has been reached.
27472         * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
27473         * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
27474         (mask_scatter_store<mode>): New insns.
27476 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27477             Alan Hayward  <alan.hayward@arm.com>
27478             David Sherwood  <david.sherwood@arm.com>
27480         * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
27481         * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
27482         * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
27483         function.
27484         (vect_use_strided_gather_scatters_p): Take a masked_p argument.
27485         Use vect_truncate_gather_scatter_offset if we can't treat the
27486         operation as a normal gather load or scatter store.
27487         (get_group_load_store_type): Take the gather_scatter_info
27488         as argument.  Try using a gather load or scatter store for
27489         single-element groups.
27490         (get_load_store_type): Update calls to get_group_load_store_type
27491         and vect_use_strided_gather_scatters_p.
27493 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27494             Alan Hayward  <alan.hayward@arm.com>
27495             David Sherwood  <david.sherwood@arm.com>
27497         * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
27498         optional tree argument.
27499         * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
27500         null target hooks.
27501         (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
27502         but continue to use the current value as a fallback.
27503         (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
27504         to compare the updates.
27505         * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
27506         (get_load_store_type): Use it when handling a strided access.
27507         (vect_get_strided_load_store_ops): New function.
27508         (vect_get_data_ptr_increment): Likewise.
27509         (vectorizable_load): Handle strided gather loads.  Always pass
27510         a step to vect_create_data_ref_ptr and bump_vector_ptr.
27512 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27513             Alan Hayward  <alan.hayward@arm.com>
27514             David Sherwood  <david.sherwood@arm.com>
27516         * doc/md.texi (gather_load@var{m}): Document.
27517         (mask_gather_load@var{m}): Likewise.
27518         * genopinit.c (main): Add supports_vec_gather_load and
27519         supports_vec_gather_load_cached to target_optabs.
27520         * optabs-tree.c (init_tree_optimization_optabs): Use
27521         ggc_cleared_alloc to allocate target_optabs.
27522         * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
27523         * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
27524         functions.
27525         * internal-fn.h (internal_load_fn_p): Declare.
27526         (internal_gather_scatter_fn_p): Likewise.
27527         (internal_fn_mask_index): Likewise.
27528         (internal_gather_scatter_fn_supported_p): Likewise.
27529         * internal-fn.c (gather_load_direct): New macro.
27530         (expand_gather_load_optab_fn): New function.
27531         (direct_gather_load_optab_supported_p): New macro.
27532         (direct_internal_fn_optab): New function.
27533         (internal_load_fn_p): Likewise.
27534         (internal_gather_scatter_fn_p): Likewise.
27535         (internal_fn_mask_index): Likewise.
27536         (internal_gather_scatter_fn_supported_p): Likewise.
27537         * optabs-query.c (supports_at_least_one_mode_p): New function.
27538         (supports_vec_gather_load_p): Likewise.
27539         * optabs-query.h (supports_vec_gather_load_p): Declare.
27540         * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
27541         and memory_type field.
27542         (NUM_PATTERNS): Bump to 15.
27543         * tree-vect-data-refs.c: Include internal-fn.h.
27544         (vect_gather_scatter_fn_p): New function.
27545         (vect_describe_gather_scatter_call): Likewise.
27546         (vect_check_gather_scatter): Try using internal functions for
27547         gather loads.  Recognize existing calls to a gather load function.
27548         (vect_analyze_data_refs): Consider using gather loads if
27549         supports_vec_gather_load_p.
27550         * tree-vect-patterns.c (vect_get_load_store_mask): New function.
27551         (vect_get_gather_scatter_offset_type): Likewise.
27552         (vect_convert_mask_for_vectype): Likewise.
27553         (vect_add_conversion_to_patterm): Likewise.
27554         (vect_try_gather_scatter_pattern): Likewise.
27555         (vect_recog_gather_scatter_pattern): New pattern recognizer.
27556         (vect_vect_recog_func_ptrs): Add it.
27557         * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
27558         internal_fn_mask_index and internal_gather_scatter_fn_p.
27559         (check_load_store_masking): Take the gather_scatter_info as an
27560         argument and handle gather loads.
27561         (vect_get_gather_scatter_ops): New function.
27562         (vectorizable_call): Check internal_load_fn_p.
27563         (vectorizable_load): Likewise.  Handle gather load internal
27564         functions.
27565         (vectorizable_store): Update call to check_load_store_masking.
27566         * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
27567         * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
27568         * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
27569         (aarch64_gather_scale_operand_d): New predicates.
27570         * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
27571         (mask_gather_load<mode>): New insns.
27573 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27574             Alan Hayward  <alan.hayward@arm.com>
27575             David Sherwood  <david.sherwood@arm.com>
27577         * optabs.def (fold_left_plus_optab): New optab.
27578         * doc/md.texi (fold_left_plus_@var{m}): Document.
27579         * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
27580         * internal-fn.c (fold_left_direct): Define.
27581         (expand_fold_left_optab_fn): Likewise.
27582         (direct_fold_left_optab_supported_p): Likewise.
27583         * fold-const-call.c (fold_const_fold_left): New function.
27584         (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
27585         * tree-parloops.c (valid_reduction_p): New function.
27586         (gather_scalar_reductions): Use it.
27587         * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
27588         (vect_finish_replace_stmt): Declare.
27589         * tree-vect-loop.c (fold_left_reduction_fn): New function.
27590         (needs_fold_left_reduction_p): New function, split out from...
27591         (vect_is_simple_reduction): ...here.  Accept reductions that
27592         forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
27593         (vect_force_simple_reduction): Also store the reduction type in
27594         the assignment's STMT_VINFO_REDUC_TYPE.
27595         (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
27596         (merge_with_identity): New function.
27597         (vect_expand_fold_left): Likewise.
27598         (vectorize_fold_left_reduction): Likewise.
27599         (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION.  Leave the
27600         scalar phi in place for it.  Check for target support and reject
27601         cases that would reassociate the operation.  Defer the transform
27602         phase to vectorize_fold_left_reduction.
27603         * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
27604         * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
27605         (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
27607 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27609         * tree-if-conv.c (predicate_mem_writes): Remove redundant
27610         call to ifc_temp_var.
27612 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27613             Alan Hayward  <alan.hayward@arm.com>
27614             David Sherwood  <david.sherwood@arm.com>
27616         * target.def (legitimize_address_displacement): Take the original
27617         offset as a poly_int.
27618         * targhooks.h (default_legitimize_address_displacement): Update
27619         accordingly.
27620         * targhooks.c (default_legitimize_address_displacement): Likewise.
27621         * doc/tm.texi: Regenerate.
27622         * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
27623         as an argument, moving assert of ad->disp == ad->disp_term to...
27624         (process_address_1): ...here.  Update calls to base_plus_disp_to_reg.
27625         Try calling targetm.legitimize_address_displacement before expanding
27626         the address rather than afterwards, and adjust for the new interface.
27627         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
27628         Match the new hook interface.  Handle SVE addresses.
27629         * config/sh/sh.c (sh_legitimize_address_displacement): Make the
27630         new hook interface.
27632 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27634         * Makefile.in (OBJS): Add early-remat.o.
27635         * target.def (select_early_remat_modes): New hook.
27636         * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
27637         * doc/tm.texi: Regenerate.
27638         * targhooks.h (default_select_early_remat_modes): Declare.
27639         * targhooks.c (default_select_early_remat_modes): New function.
27640         * timevar.def (TV_EARLY_REMAT): New timevar.
27641         * passes.def (pass_early_remat): New pass.
27642         * tree-pass.h (make_pass_early_remat): Declare.
27643         * early-remat.c: New file.
27644         * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
27645         function.
27646         (TARGET_SELECT_EARLY_REMAT_MODES): Define.
27648 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27649             Alan Hayward  <alan.hayward@arm.com>
27650             David Sherwood  <david.sherwood@arm.com>
27652         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
27653         vfm1 with a bound_epilog parameter.
27654         (vect_do_peeling): Update calls accordingly, and move the prologue
27655         call earlier in the function.  Treat the base bound_epilog as 0 for
27656         fully-masked loops and retain vf - 1 for other loops.  Add 1 to
27657         this base when peeling for gaps.
27658         * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
27659         with fully-masked loops.
27660         (vect_estimate_min_profitable_iters): Handle the single peeled
27661         iteration in that case.
27663 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27664             Alan Hayward  <alan.hayward@arm.com>
27665             David Sherwood  <david.sherwood@arm.com>
27667         * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
27668         single-element interleaving even if the size is not a power of 2.
27669         * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
27670         accesses for single-element interleaving if the group size is
27671         not a power of 2.
27673 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27674             Alan Hayward  <alan.hayward@arm.com>
27675             David Sherwood  <david.sherwood@arm.com>
27677         * doc/md.texi (fold_extract_last_@var{m}): Document.
27678         * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
27679         * optabs.def (fold_extract_last_optab): New optab.
27680         * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
27681         * internal-fn.c (fold_extract_direct): New macro.
27682         (expand_fold_extract_optab_fn): Likewise.
27683         (direct_fold_extract_optab_supported_p): Likewise.
27684         * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
27685         * tree-vect-loop.c (vect_model_reduction_cost): Handle
27686         EXTRACT_LAST_REDUCTION.
27687         (get_initial_def_for_reduction): Do not create an initial vector
27688         for EXTRACT_LAST_REDUCTION reductions.
27689         (vectorizable_reduction): Leave the scalar phi in place for
27690         EXTRACT_LAST_REDUCTIONs.  Try using EXTRACT_LAST_REDUCTION
27691         ahead of INTEGER_INDUC_COND_REDUCTION.  Do not check for an
27692         epilogue code for EXTRACT_LAST_REDUCTION and defer the
27693         transform phase to vectorizable_condition.
27694         * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
27695         split out from...
27696         (vect_finish_stmt_generation): ...here.
27697         (vect_finish_replace_stmt): New function.
27698         (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
27699         * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
27700         pattern.
27701         * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
27703 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27704             Alan Hayward  <alan.hayward@arm.com>
27705             David Sherwood  <david.sherwood@arm.com>
27707         * doc/md.texi (extract_last_@var{m}): Document.
27708         * optabs.def (extract_last_optab): New optab.
27709         * internal-fn.def (EXTRACT_LAST): New internal function.
27710         * internal-fn.c (cond_unary_direct): New macro.
27711         (expand_cond_unary_optab_fn): Likewise.
27712         (direct_cond_unary_optab_supported_p): Likewise.
27713         * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
27714         loops using EXTRACT_LAST.
27715         * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
27716         (extract_last_<mode>): ...this optab.
27717         (vec_extract<mode><Vel>): Update accordingly.
27719 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27720             Alan Hayward  <alan.hayward@arm.com>
27721             David Sherwood  <david.sherwood@arm.com>
27723         * target.def (empty_mask_is_expensive): New hook.
27724         * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
27725         * doc/tm.texi: Regenerate.
27726         * targhooks.h (default_empty_mask_is_expensive): Declare.
27727         * targhooks.c (default_empty_mask_is_expensive): New function.
27728         * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
27729         if the target says that empty masks are expensive.
27730         * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
27731         New function.
27732         (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
27734 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27735             Alan Hayward  <alan.hayward@arm.com>
27736             David Sherwood  <david.sherwood@arm.com>
27738         * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
27739         (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
27740         (vect_use_loop_mask_for_alignment_p): New function.
27741         (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
27742         * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
27743         niters_skip argument.  Make sure that the first niters_skip elements
27744         of the first iteration are inactive.
27745         (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
27746         Update call to vect_set_loop_masks_directly.
27747         (get_misalign_in_elems): New function, split out from...
27748         (vect_gen_prolog_loop_niters): ...here.
27749         (vect_update_init_of_dr): Take a code argument that specifies whether
27750         the adjustment should be added or subtracted.
27751         (vect_update_init_of_drs): Likewise.
27752         (vect_prepare_for_masked_peels): New function.
27753         (vect_do_peeling): Skip prologue peeling if we're using a mask
27754         instead.  Update call to vect_update_inits_of_drs.
27755         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
27756         mask_skip_niters.
27757         (vect_analyze_loop_2): Allow fully-masked loops with peeling for
27758         alignment.  Do not include the number of peeled iterations in
27759         the minimum threshold in that case.
27760         (vectorizable_induction): Adjust the start value down by
27761         LOOP_VINFO_MASK_SKIP_NITERS iterations.
27762         (vect_transform_loop): Call vect_prepare_for_masked_peels.
27763         Take the number of skipped iterations into account when calculating
27764         the loop bounds.
27765         * tree-vect-stmts.c (vect_gen_while_not): New function.
27767 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27768             Alan Hayward  <alan.hayward@arm.com>
27769             David Sherwood  <david.sherwood@arm.com>
27771         * doc/sourcebuild.texi (vect_fully_masked): Document.
27772         * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
27773         default value to 0.
27774         * tree-vect-loop.c (vect_analyze_loop_costing): New function,
27775         split out from...
27776         (vect_analyze_loop_2): ...here. Don't check the vectorization
27777         factor against the number of loop iterations if the loop is
27778         fully-masked.
27780 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27781             Alan Hayward  <alan.hayward@arm.com>
27782             David Sherwood  <david.sherwood@arm.com>
27784         * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
27785         (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
27786         (dump_groups): Update accordingly.
27787         (iv_use::mem_type): New member variable.
27788         (address_p): New function.
27789         (record_use): Add a mem_type argument and initialize the new
27790         mem_type field.
27791         (record_group_use): Add a mem_type argument.  Use address_p.
27792         Remove obsolete null checks of base_object.  Update call to record_use.
27793         (find_interesting_uses_op): Update call to record_group_use.
27794         (find_interesting_uses_cond): Likewise.
27795         (find_interesting_uses_address): Likewise.
27796         (get_mem_type_for_internal_fn): New function.
27797         (find_address_like_use): Likewise.
27798         (find_interesting_uses_stmt): Try find_address_like_use before
27799         calling find_interesting_uses_op.
27800         (addr_offset_valid_p): Use the iv mem_type field as the type
27801         of the addressed memory.
27802         (add_autoinc_candidates): Likewise.
27803         (get_address_cost): Likewise.
27804         (split_small_address_groups_p): Use address_p.
27805         (split_address_groups): Likewise.
27806         (add_iv_candidate_for_use): Likewise.
27807         (autoinc_possible_for_pair): Likewise.
27808         (rewrite_groups): Likewise.
27809         (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
27810         (determine_group_iv_cost): Update after split of USE_ADDRESS.
27811         (get_alias_ptr_type_for_ptr_address): New function.
27812         (rewrite_use_address): Rewrite address uses in calls that were
27813         identified by find_address_like_use.
27815 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27816             Alan Hayward  <alan.hayward@arm.com>
27817             David Sherwood  <david.sherwood@arm.com>
27819         * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
27820         TARGET_MEM_REFs.
27821         * gimple-expr.h (is_gimple_addressable: Likewise.
27822         * gimple-expr.c (is_gimple_address): Likewise.
27823         * internal-fn.c (expand_call_mem_ref): New function.
27824         (expand_mask_load_optab_fn): Use it.
27825         (expand_mask_store_optab_fn): Likewise.
27827 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27828             Alan Hayward  <alan.hayward@arm.com>
27829             David Sherwood  <david.sherwood@arm.com>
27831         * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
27832         (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
27833         (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
27834         (cond_umax@var{mode}): Document.
27835         * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
27836         (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
27837         (cond_umin_optab, cond_umax_optab): New optabs.
27838         * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
27839         (COND_IOR, COND_XOR): New internal functions.
27840         * internal-fn.h (get_conditional_internal_fn): Declare.
27841         * internal-fn.c (cond_binary_direct): New macro.
27842         (expand_cond_binary_optab_fn): Likewise.
27843         (direct_cond_binary_optab_supported_p): Likewise.
27844         (get_conditional_internal_fn): New function.
27845         * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
27846         Cope with reduction statements that are vectorized as calls rather
27847         than assignments.
27848         * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
27849         * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
27850         (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
27851         (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
27852         (UNSPEC_COND_EOR): New unspecs.
27853         (optab): Add mappings for them.
27854         (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
27855         (sve_int_op, sve_fp_op): New int attributes.
27857 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27858             Alan Hayward  <alan.hayward@arm.com>
27859             David Sherwood  <david.sherwood@arm.com>
27861         * optabs.def (while_ult_optab): New optab.
27862         * doc/md.texi (while_ult@var{m}@var{n}): Document.
27863         * internal-fn.def (WHILE_ULT): New internal function.
27864         * internal-fn.h (direct_internal_fn_supported_p): New override
27865         that takes two types as argument.
27866         * internal-fn.c (while_direct): New macro.
27867         (expand_while_optab_fn): New function.
27868         (convert_optab_supported_p): Likewise.
27869         (direct_while_optab_supported_p): New macro.
27870         * wide-int.h (wi::udiv_ceil): New function.
27871         * tree-vectorizer.h (rgroup_masks): New structure.
27872         (vec_loop_masks): New typedef.
27873         (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
27874         and fully_masked_p.
27875         (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
27876         (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
27877         (vect_max_vf): New function.
27878         (slpeel_make_loop_iterate_ntimes): Delete.
27879         (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
27880         (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
27881         (vect_record_loop_mask, vect_get_loop_mask): Likewise.
27882         * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
27883         internal-fn.h, stor-layout.h and optabs-query.h.
27884         (vect_set_loop_mask): New function.
27885         (add_preheader_seq): Likewise.
27886         (add_header_seq): Likewise.
27887         (interleave_supported_p): Likewise.
27888         (vect_maybe_permute_loop_masks): Likewise.
27889         (vect_set_loop_masks_directly): Likewise.
27890         (vect_set_loop_condition_masked): Likewise.
27891         (vect_set_loop_condition_unmasked): New function, split out from
27892         slpeel_make_loop_iterate_ntimes.
27893         (slpeel_make_loop_iterate_ntimes): Rename to..
27894         (vect_set_loop_condition): ...this.  Use vect_set_loop_condition_masked
27895         for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
27896         (vect_do_peeling): Update call accordingly.
27897         (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
27898         loops.
27899         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
27900         mask_compare_type, can_fully_mask_p and fully_masked_p.
27901         (release_vec_loop_masks): New function.
27902         (_loop_vec_info): Use it to free the loop masks.
27903         (can_produce_all_loop_masks_p): New function.
27904         (vect_get_max_nscalars_per_iter): Likewise.
27905         (vect_verify_full_masking): Likewise.
27906         (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
27907         retries, and free the mask rgroups before retrying.  Check loop-wide
27908         reasons for disallowing fully-masked loops.  Make the final decision
27909         about whether use a fully-masked loop or not.
27910         (vect_estimate_min_profitable_iters): Do not assume that peeling
27911         for the number of iterations will be needed for fully-masked loops.
27912         (vectorizable_reduction): Disable fully-masked loops.
27913         (vectorizable_live_operation): Likewise.
27914         (vect_halve_mask_nunits): New function.
27915         (vect_double_mask_nunits): Likewise.
27916         (vect_record_loop_mask): Likewise.
27917         (vect_get_loop_mask): Likewise.
27918         (vect_transform_loop): Handle the case in which the final loop
27919         iteration might handle a partial vector.  Call vect_set_loop_condition
27920         instead of slpeel_make_loop_iterate_ntimes.
27921         * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
27922         (check_load_store_masking): New function.
27923         (prepare_load_store_mask): Likewise.
27924         (vectorizable_store): Handle fully-masked loops.
27925         (vectorizable_load): Likewise.
27926         (supportable_widening_operation): Use vect_halve_mask_nunits for
27927         booleans.
27928         (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
27929         (vect_gen_while): New function.
27930         * config/aarch64/aarch64.md (umax<mode>3): New expander.
27931         (aarch64_uqdec<mode>): New insn.
27933 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27934             Alan Hayward  <alan.hayward@arm.com>
27935             David Sherwood  <david.sherwood@arm.com>
27937         * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
27938         (reduc_xor_scal_optab): New optabs.
27939         * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
27940         (reduc_xor_scal_@var{m}): Document.
27941         * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
27942         * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
27943         internal functions.
27944         * fold-const-call.c (fold_const_call): Handle them.
27945         * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
27946         internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
27947         * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
27948         (*reduc_<bit_reduc>_scal_<mode>): New patterns.
27949         * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
27950         (UNSPEC_XORV): New unspecs.
27951         (optab): Add entries for them.
27952         (BITWISEV): New int iterator.
27953         (bit_reduc_op): New int attributes.
27955 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27956             Alan Hayward  <alan.hayward@arm.com>
27957             David Sherwood  <david.sherwood@arm.com>
27959         * doc/md.texi (vec_shl_insert_@var{m}): New optab.
27960         * internal-fn.def (VEC_SHL_INSERT): New internal function.
27961         * optabs.def (vec_shl_insert_optab): New optab.
27962         * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
27963         (duplicate_and_interleave): Likewise.
27964         * tree-vect-loop.c: Include internal-fn.h.
27965         (neutral_op_for_slp_reduction): New function, split out from
27966         get_initial_defs_for_reduction.
27967         (get_initial_def_for_reduction): Handle option 2 for variable-length
27968         vectors by loading the neutral value into a vector and then shifting
27969         the initial value into element 0.
27970         (get_initial_defs_for_reduction): Replace the code argument with
27971         the neutral value calculated by neutral_op_for_slp_reduction.
27972         Use gimple_build_vector for constant-length vectors.
27973         Use IFN_VEC_SHL_INSERT for variable-length vectors if all
27974         but the first group_size elements have a neutral value.
27975         Use duplicate_and_interleave otherwise.
27976         (vect_create_epilog_for_reduction): Take a neutral_op parameter.
27977         Update call to get_initial_defs_for_reduction.  Handle SLP
27978         reductions for variable-length vectors by creating one vector
27979         result for each scalar result, with the elements associated
27980         with other scalar results stubbed out with the neutral value.
27981         (vectorizable_reduction): Call neutral_op_for_slp_reduction.
27982         Require IFN_VEC_SHL_INSERT for double reductions on
27983         variable-length vectors, or SLP reductions that have
27984         a neutral value.  Require can_duplicate_and_interleave_p
27985         support for variable-length unchained SLP reductions if there
27986         is no neutral value, such as for MIN/MAX reductions.  Also require
27987         the number of vector elements to be a multiple of the number of
27988         SLP statements when doing variable-length unchained SLP reductions.
27989         Update call to vect_create_epilog_for_reduction.
27990         * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
27991         and remove initial values.
27992         (duplicate_and_interleave): Make public.
27993         * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
27994         * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
27996 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
27997             Alan Hayward  <alan.hayward@arm.com>
27998             David Sherwood  <david.sherwood@arm.com>
28000         * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
28001         (can_duplicate_and_interleave_p): New function.
28002         (vect_get_and_check_slp_defs): Take the vector of statements
28003         rather than just the current one.  Remove excess parentheses.
28004         Restriction rejectinon of vect_constant_def and vect_external_def
28005         for variable-length vectors to boolean types, or types for which
28006         can_duplicate_and_interleave_p is false.
28007         (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
28008         (duplicate_and_interleave): New function.
28009         (vect_get_constant_vectors): Use gimple_build_vector for
28010         constant-length vectors and suitable variable-length constant
28011         vectors.  Use duplicate_and_interleave for other variable-length
28012         vectors.  Don't defer the update when inserting new statements.
28014 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28015             Alan Hayward  <alan.hayward@arm.com>
28016             David Sherwood  <david.sherwood@arm.com>
28018         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
28019         min_profitable_iters doesn't go negative.
28021 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28022             Alan Hayward  <alan.hayward@arm.com>
28023             David Sherwood  <david.sherwood@arm.com>
28025         * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
28026         (vec_mask_store_lanes@var{m}@var{n}): Likewise.
28027         * optabs.def (vec_mask_load_lanes_optab): New optab.
28028         (vec_mask_store_lanes_optab): Likewise.
28029         * internal-fn.def (MASK_LOAD_LANES): New internal function.
28030         (MASK_STORE_LANES): Likewise.
28031         * internal-fn.c (mask_load_lanes_direct): New macro.
28032         (mask_store_lanes_direct): Likewise.
28033         (expand_mask_load_optab_fn): Handle masked operations.
28034         (expand_mask_load_lanes_optab_fn): New macro.
28035         (expand_mask_store_optab_fn): Handle masked operations.
28036         (expand_mask_store_lanes_optab_fn): New macro.
28037         (direct_mask_load_lanes_optab_supported_p): Likewise.
28038         (direct_mask_store_lanes_optab_supported_p): Likewise.
28039         * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
28040         parameter.
28041         (vect_load_lanes_supported): Likewise.
28042         * tree-vect-data-refs.c (strip_conversion): New function.
28043         (can_group_stmts_p): Likewise.
28044         (vect_analyze_data_ref_accesses): Use it instead of checking
28045         for a pair of assignments.
28046         (vect_store_lanes_supported): Take a masked_p parameter.
28047         (vect_load_lanes_supported): Likewise.
28048         * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
28049         vect_store_lanes_supported and vect_load_lanes_supported.
28050         * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
28051         * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
28052         parameter.  Don't allow gaps for masked accesses.
28053         Use vect_get_store_rhs.  Update calls to vect_store_lanes_supported
28054         and vect_load_lanes_supported.
28055         (get_load_store_type): Take a masked_p parameter and update
28056         call to get_group_load_store_type.
28057         (vectorizable_store): Update call to get_load_store_type.
28058         Handle IFN_MASK_STORE_LANES.
28059         (vectorizable_load): Update call to get_load_store_type.
28060         Handle IFN_MASK_LOAD_LANES.
28062 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28063             Alan Hayward  <alan.hayward@arm.com>
28064             David Sherwood  <david.sherwood@arm.com>
28066         * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
28067         modes for SVE.
28068         * config/aarch64/aarch64-protos.h
28069         (aarch64_sve_struct_memory_operand_p): Declare.
28070         * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
28071         (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
28072         (VPRED, vpred): Handle SVE structure modes.
28073         * config/aarch64/constraints.md (Utx): New constraint.
28074         * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
28075         (aarch64_sve_struct_nonimmediate_operand): New predicates.
28076         * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
28077         * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
28078         (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
28079         structure modes.  Split into pieces after RA.
28080         (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
28081         (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
28082         New patterns.
28083         * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
28084         SVE structure modes.
28085         (aarch64_classify_address): Likewise.
28086         (sizetochar): Move earlier in file.
28087         (aarch64_print_operand): Handle SVE register lists.
28088         (aarch64_array_mode): New function.
28089         (aarch64_sve_struct_memory_operand_p): Likewise.
28090         (TARGET_ARRAY_MODE): Redefine.
28092 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28093             Alan Hayward  <alan.hayward@arm.com>
28094             David Sherwood  <david.sherwood@arm.com>
28096         * target.def (array_mode): New target hook.
28097         * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
28098         * doc/tm.texi: Regenerate.
28099         * hooks.h (hook_optmode_mode_uhwi_none): Declare.
28100         * hooks.c (hook_optmode_mode_uhwi_none): New function.
28101         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
28102         targetm.array_mode.
28103         * stor-layout.c (mode_for_array): Likewise.  Support polynomial
28104         type sizes.
28106 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28107             Alan Hayward  <alan.hayward@arm.com>
28108             David Sherwood  <david.sherwood@arm.com>
28110         * fold-const.c (fold_binary_loc): Check the argument types
28111         rather than the result type when testing for a vector operation.
28113 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28115         * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
28116         * doc/tm.texi: Regenerate.
28118 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28119             Alan Hayward  <alan.hayward@arm.com>
28120             David Sherwood  <david.sherwood@arm.com>
28122         * doc/invoke.texi (-msve-vector-bits=): Document new option.
28123         (sve): Document new AArch64 extension.
28124         * doc/md.texi (w): Extend the description of the AArch64
28125         constraint to include SVE vectors.
28126         (Upl, Upa): Document new AArch64 predicate constraints.
28127         * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
28128         enum.
28129         * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
28130         (msve-vector-bits=): New option.
28131         * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
28132         SVE when these are disabled.
28133         (sve): New extension.
28134         * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
28135         modes.  Adjust their number of units based on aarch64_sve_vg.
28136         (MAX_BITSIZE_MODE_ANY_MODE): Define.
28137         * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
28138         aarch64_addr_query_type.
28139         (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
28140         (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
28141         (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
28142         (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
28143         (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
28144         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
28145         (aarch64_simd_imm_zero_p): Delete.
28146         (aarch64_check_zero_based_sve_index_immediate): Declare.
28147         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
28148         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
28149         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
28150         (aarch64_sve_float_mul_immediate_p): Likewise.
28151         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
28152         rather than an rtx.
28153         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
28154         (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
28155         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
28156         (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
28157         (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
28158         (aarch64_regmode_natural_size): Likewise.
28159         * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
28160         (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
28161         left one place.
28162         (AARCH64_ISA_SVE, TARGET_SVE): New macros.
28163         (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
28164         for VG and the SVE predicate registers.
28165         (V_ALIASES): Add a "z"-prefixed alias.
28166         (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
28167         (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
28168         (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
28169         (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
28170         (REG_CLASS_NAMES): Add entries for them.
28171         (REG_CLASS_CONTENTS): Likewise.  Update ALL_REGS to include VG
28172         and the predicate registers.
28173         (aarch64_sve_vg): Declare.
28174         (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
28175         (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
28176         (REGMODE_NATURAL_SIZE): Define.
28177         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
28178         SVE macros.
28179         * config/aarch64/aarch64.c: Include cfgrtl.h.
28180         (simd_immediate_info): Add a constructor for series vectors,
28181         and an associated step field.
28182         (aarch64_sve_vg): New variable.
28183         (aarch64_dbx_register_number): Handle VG and the predicate registers.
28184         (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
28185         (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
28186         (VEC_ANY_DATA, VEC_STRUCT): New constants.
28187         (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
28188         (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
28189         (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
28190         (aarch64_get_mask_mode): New functions.
28191         (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
28192         and FP_LO_REGS.  Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
28193         (aarch64_hard_regno_mode_ok): Handle VG.  Also handle the SVE
28194         predicate modes and predicate registers.  Explicitly restrict
28195         GPRs to modes of 16 bytes or smaller.  Only allow FP registers
28196         to store a vector mode if it is recognized by
28197         aarch64_classify_vector_mode.
28198         (aarch64_regmode_natural_size): New function.
28199         (aarch64_hard_regno_caller_save_mode): Return the original mode
28200         for predicates.
28201         (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
28202         (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
28203         (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
28204         (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
28205         functions.
28206         (aarch64_add_offset): Add a temp2 parameter.  Assert that temp1
28207         does not overlap dest if the function is frame-related.  Handle
28208         SVE constants.
28209         (aarch64_split_add_offset): New function.
28210         (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
28211         them aarch64_add_offset.
28212         (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
28213         and update call to aarch64_sub_sp.
28214         (aarch64_add_cfa_expression): New function.
28215         (aarch64_expand_prologue): Pass extra temporary registers to the
28216         functions above.  Handle the case in which we need to emit new
28217         DW_CFA_expressions for registers that were originally saved
28218         relative to the stack pointer, but now have to be expressed
28219         relative to the frame pointer.
28220         (aarch64_output_mi_thunk): Pass extra temporary registers to the
28221         functions above.
28222         (aarch64_expand_epilogue): Likewise.  Prevent inheritance of
28223         IP0 and IP1 values for SVE frames.
28224         (aarch64_expand_vec_series): New function.
28225         (aarch64_expand_sve_widened_duplicate): Likewise.
28226         (aarch64_expand_sve_const_vector): Likewise.
28227         (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
28228         Handle SVE constants.  Use emit_move_insn to move a force_const_mem
28229         into the register, rather than emitting a SET directly.
28230         (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
28231         (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
28232         (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
28233         (offset_9bit_signed_scaled_p): New functions.
28234         (aarch64_replicate_bitmask_imm): New function.
28235         (aarch64_bitmask_imm): Use it.
28236         (aarch64_cannot_force_const_mem): Reject expressions involving
28237         a CONST_POLY_INT.  Update call to aarch64_classify_symbol.
28238         (aarch64_classify_index): Handle SVE indices, by requiring
28239         a plain register index with a scale that matches the element size.
28240         (aarch64_classify_address): Handle SVE addresses.  Assert that
28241         the mode of the address is VOIDmode or an integer mode.
28242         Update call to aarch64_classify_symbol.
28243         (aarch64_classify_symbolic_expression): Update call to
28244         aarch64_classify_symbol.
28245         (aarch64_const_vec_all_in_range_p): New function.
28246         (aarch64_print_vector_float_operand): Likewise.
28247         (aarch64_print_operand): Handle 'N' and 'C'.  Use "zN" rather than
28248         "vN" for FP registers with SVE modes.  Handle (const ...) vectors
28249         and the FP immediates 1.0 and 0.5.
28250         (aarch64_print_address_internal): Handle SVE addresses.
28251         (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
28252         (aarch64_regno_regclass): Handle predicate registers.
28253         (aarch64_secondary_reload): Handle big-endian reloads of SVE
28254         data modes.
28255         (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
28256         (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
28257         (aarch64_convert_sve_vector_bits): New function.
28258         (aarch64_override_options): Use it to handle -msve-vector-bits=.
28259         (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
28260         rather than an rtx.
28261         (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
28262         Handle SVE vector and predicate modes.  Accept VL-based constants
28263         that need only one temporary register, and VL offsets that require
28264         no temporary registers.
28265         (aarch64_conditional_register_usage): Mark the predicate registers
28266         as fixed if SVE isn't available.
28267         (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
28268         Return true for SVE vector and predicate modes.
28269         (aarch64_simd_container_mode): Take the number of bits as a poly_int64
28270         rather than an unsigned int.  Handle SVE modes.
28271         (aarch64_preferred_simd_mode): Update call accordingly.  Handle
28272         SVE modes.
28273         (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
28274         if SVE is enabled.
28275         (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
28276         (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
28277         (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
28278         (aarch64_sve_float_mul_immediate_p): New functions.
28279         (aarch64_sve_valid_immediate): New function.
28280         (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
28281         Explicitly reject structure modes.  Check for INDEX constants.
28282         Handle PTRUE and PFALSE constants.
28283         (aarch64_check_zero_based_sve_index_immediate): New function.
28284         (aarch64_simd_imm_zero_p): Delete.
28285         (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
28286         vector modes.  Accept constants in the range of CNT[BHWD].
28287         (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
28288         ask for an Advanced SIMD mode.
28289         (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
28290         (aarch64_simd_vector_alignment): Handle SVE predicates.
28291         (aarch64_vectorize_preferred_vector_alignment): New function.
28292         (aarch64_simd_vector_alignment_reachable): Use it instead of
28293         the vector size.
28294         (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
28295         (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
28296         functions.
28297         (MAX_VECT_LEN): Delete.
28298         (expand_vec_perm_d): Add a vec_flags field.
28299         (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
28300         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
28301         (aarch64_evpc_ext): Don't apply a big-endian lane correction
28302         for SVE modes.
28303         (aarch64_evpc_rev): Rename to...
28304         (aarch64_evpc_rev_local): ...this.  Use a predicated operation for SVE.
28305         (aarch64_evpc_rev_global): New function.
28306         (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
28307         (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
28308         MAX_VECT_LEN.
28309         (aarch64_evpc_sve_tbl): New function.
28310         (aarch64_expand_vec_perm_const_1): Update after rename of
28311         aarch64_evpc_rev.  Handle SVE permutes too, trying
28312         aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
28313         than aarch64_evpc_tbl.
28314         (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
28315         (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
28316         (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
28317         (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
28318         (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
28319         (aarch64_expand_sve_vcond): New functions.
28320         (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
28321         of aarch64_vector_mode_p.
28322         (aarch64_dwarf_poly_indeterminate_value): New function.
28323         (aarch64_compute_pressure_classes): Likewise.
28324         (aarch64_can_change_mode_class): Likewise.
28325         (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
28326         (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
28327         (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
28328         (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
28329         (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
28330         (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
28331         * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
28332         (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
28333         constraints.
28334         (Dn, Dl, Dr): Accept const as well as const_vector.
28335         (Dz): Likewise.  Compare against CONST0_RTX.
28336         * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
28337         of "vector" where appropriate.
28338         (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
28339         (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
28340         (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
28341         (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
28342         (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
28343         (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
28344         (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
28345         (v_int_equiv): Extend to SVE modes.
28346         (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
28347         mode attributes.
28348         (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
28349         (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
28350         (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
28351         (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
28352         (SVE_COND_FP_CMP): New int iterators.
28353         (perm_hilo): Handle the new unpack unspecs.
28354         (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
28355         attributes.
28356         * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
28357         (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
28358         (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
28359         (aarch64_equality_operator, aarch64_constant_vector_operand)
28360         (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
28361         (aarch64_sve_nonimmediate_operand): Likewise.
28362         (aarch64_sve_general_operand): Likewise.
28363         (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
28364         (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
28365         (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
28366         (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
28367         (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
28368         (aarch64_sve_float_arith_immediate): Likewise.
28369         (aarch64_sve_float_arith_with_sub_immediate): Likewise.
28370         (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
28371         (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
28372         (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
28373         (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
28374         (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
28375         (aarch64_sve_float_arith_operand): Likewise.
28376         (aarch64_sve_float_arith_with_sub_operand): Likewise.
28377         (aarch64_sve_float_mul_operand): Likewise.
28378         (aarch64_sve_vec_perm_operand): Likewise.
28379         (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
28380         (aarch64_mov_operand): Accept const_poly_int and const_vector.
28381         (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
28382         as well as const_vector.
28383         (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
28384         in file.  Use CONST0_RTX and CONSTM1_RTX.
28385         (aarch64_simd_or_scalar_imm_zero): Likewise.  Add match_codes.
28386         (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
28387         Use aarch64_simd_imm_zero.
28388         * config/aarch64/aarch64-sve.md: New file.
28389         * config/aarch64/aarch64.md: Include it.
28390         (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
28391         (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
28392         (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
28393         (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
28394         (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
28395         (sve): New attribute.
28396         (enabled): Disable instructions with the sve attribute unless
28397         TARGET_SVE.
28398         (movqi, movhi): Pass CONST_POLY_INT operaneds through
28399         aarch64_expand_mov_immediate.
28400         (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
28401         CNT[BHSD] immediates.
28402         (movti): Split CONST_POLY_INT moves into two halves.
28403         (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
28404         Split additions that need a temporary here if the destination
28405         is the stack pointer.
28406         (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
28407         (*add<mode>3_poly_1): New instruction.
28408         (set_clobber_cc): New expander.
28410 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28412         * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
28413         parameter and use it instead of GET_MODE_SIZE (innermode).  Use
28414         inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
28415         Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
28416         GET_MODE_NUNITS (innermode).  Also add a first_elem parameter.
28417         Change innermode from fixed_mode_size to machine_mode.
28418         (simplify_subreg): Update call accordingly.  Handle a constant-sized
28419         subreg of a variable-length CONST_VECTOR.
28421 2018-01-13  Richard Sandiford  <richard.sandiford@linaro.org>
28422             Alan Hayward  <alan.hayward@arm.com>
28423             David Sherwood  <david.sherwood@arm.com>
28425         * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
28426         (add_offset_to_base): New function, split out from...
28427         (create_mem_ref): ...here.  When handling a scale other than 1,
28428         check first whether the address is valid without the offset.
28429         Add it into the base if so, leaving the index and scale as-is.
28431 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
28433         PR c++/83778
28434         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
28435         fold_for_warn before checking if arg2 is INTEGER_CST.
28437 2018-01-12  Segher Boessenkool  <segher@kernel.crashing.org>
28439         * config/rs6000/predicates.md (load_multiple_operation): Delete.
28440         (store_multiple_operation): Delete.
28441         * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
28442         * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
28443         * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
28444         guarded by TARGET_STRING.
28445         (rs6000_output_load_multiple): Delete.
28446         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
28447         OPTION_MASK_STRING / TARGET_STRING handling.
28448         (print_operand) <'N', 'O'>: Add comment that these are unused now.
28449         (const rs6000_opt_masks) <"string">: Change mask to 0.
28450         * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
28451         (MASK_STRING): Delete.
28452         * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
28453         parts.  Simplify.
28454         (load_multiple): Delete.
28455         (*ldmsi8): Delete.
28456         (*ldmsi7): Delete.
28457         (*ldmsi6): Delete.
28458         (*ldmsi5): Delete.
28459         (*ldmsi4): Delete.
28460         (*ldmsi3): Delete.
28461         (store_multiple): Delete.
28462         (*stmsi8): Delete.
28463         (*stmsi7): Delete.
28464         (*stmsi6): Delete.
28465         (*stmsi5): Delete.
28466         (*stmsi4): Delete.
28467         (*stmsi3): Delete.
28468         (movmemsi_8reg): Delete.
28469         (corresponding unnamed define_insn): Delete.
28470         (movmemsi_6reg): Delete.
28471         (corresponding unnamed define_insn): Delete.
28472         (movmemsi_4reg): Delete.
28473         (corresponding unnamed define_insn): Delete.
28474         (movmemsi_2reg): Delete.
28475         (corresponding unnamed define_insn): Delete.
28476         (movmemsi_1reg): Delete.
28477         (corresponding unnamed define_insn): Delete.
28478         * config/rs6000/rs6000.opt (mno-string): New.
28479         (mstring): Replace by deprecation warning stub.
28480         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
28482 2018-01-12  Jakub Jelinek  <jakub@redhat.com>
28484         * regrename.c (regrename_do_replace): If replacing the same
28485         reg multiple times, try to reuse last created gen_raw_REG.
28487         PR debug/81155
28488         * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
28489         main to workaround a bug in GDB.
28491 2018-01-12  Tom de Vries  <tom@codesourcery.com>
28493         PR target/83737
28494         * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
28496 2018-01-12  Vladimir Makarov  <vmakarov@redhat.com>
28498         PR rtl-optimization/80481
28499         * ira-color.c (get_cap_member): New function.
28500         (allocnos_conflict_by_live_ranges_p): Use it.
28501         (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
28502         (setup_slot_coalesced_allocno_live_ranges): Ditto.
28504 2018-01-12  Uros Bizjak  <ubizjak@gmail.com>
28506         PR target/83628
28507         * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
28508         (*saddl_se_1): Ditto.
28509         (*ssubsi_1): Ditto.
28510         (*ssubl_se_1): Ditto.
28512 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
28514         * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
28515         rather than wi::to_widest for DR_INITs.
28516         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
28517         wi::to_poly_offset rather than wi::to_offset for DR_INIT.
28518         (vect_analyze_data_ref_accesses): Require both DR_INITs to be
28519         INTEGER_CSTs.
28520         (vect_analyze_group_access_1): Note that here.
28522 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
28524         * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
28525         polynomial type sizes.
28527 2018-01-12  Richard Sandiford  <richard.sandiford@linaro.org>
28529         * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
28530         poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
28531         (gimple_add_tmp_var): Likewise.
28533 2018-01-12  Martin Liska  <mliska@suse.cz>
28535         * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
28536         (gimple_alloc_sizes): Likewise.
28537         (dump_gimple_statistics): Use PRIu64 in printf format.
28538         * gimple.h: Change uint64_t to int.
28540 2018-01-12  Martin Liska  <mliska@suse.cz>
28542         * tree-core.h: Use uint64_t instead of int.
28543         * tree.c (tree_node_counts): Likewise.
28544         (tree_node_sizes): Likewise.
28545         (dump_tree_statistics): Use PRIu64 in printf format.
28547 2018-01-12  Martin Liska  <mliska@suse.cz>
28549         * Makefile.in: As qsort_chk is implemented in vec.c, add
28550         vec.o to linkage of gencfn-macros.
28551         * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
28552         passing the info to record_node_allocation_statistics.
28553         (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
28554         and pass the info.
28555         * ggc-common.c (struct ggc_usage): Add operator== and use
28556         it in operator< and compare function.
28557         * mem-stats.h (struct mem_usage): Likewise.
28558         * vec.c (struct vec_usage): Remove operator< and compare
28559         function. Can be simply inherited.
28561 2018-01-12  Martin Jambor  <mjambor@suse.cz>
28563         PR target/81616
28564         * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
28565         * tree-ssa-math-opts.c: Include domwalk.h.
28566         (convert_mult_to_fma_1): New function.
28567         (fma_transformation_info): New type.
28568         (fma_deferring_state): Likewise.
28569         (cancel_fma_deferring): New function.
28570         (result_of_phi): Likewise.
28571         (last_fma_candidate_feeds_initial_phi): Likewise.
28572         (convert_mult_to_fma): Added deferring logic, split actual
28573         transformation to convert_mult_to_fma_1.
28574         (math_opts_dom_walker): New type.
28575         (math_opts_dom_walker::after_dom_children): New method, body moved
28576         here from pass_optimize_widening_mul::execute, added deferring logic
28577         bits.
28578         (pass_optimize_widening_mul::execute): Moved most of code to
28579         math_opts_dom_walker::after_dom_children.
28580         * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
28581         * config/i386/i386.c (ix86_option_override_internal): Added
28582         maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
28584 2018-01-12  Richard Biener  <rguenther@suse.de>
28586         PR debug/83157
28587         * dwarf2out.c (gen_variable_die): Do not reset old_die for
28588         inline instance vars.
28590 2018-01-12  Oleg Endo  <olegendo@gcc.gnu.org>
28592         PR target/81819
28593         * config/rx/rx.c (rx_is_restricted_memory_address):
28594         Handle SUBREG case.
28596 2018-01-12  Richard Biener  <rguenther@suse.de>
28598         PR tree-optimization/80846
28599         * target.def (split_reduction): New target hook.
28600         * targhooks.c (default_split_reduction): New function.
28601         * targhooks.h (default_split_reduction): Declare.
28602         * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
28603         target requests first reduce vectors by combining low and high
28604         parts.
28605         * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
28606         (get_vectype_for_scalar_type_and_size): Export.
28607         * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
28608         * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
28609         * doc/tm.texi: Regenerate.
28610         * config/i386/i386.c (ix86_split_reduction): Implement
28611         TARGET_VECTORIZE_SPLIT_REDUCTION.
28613 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
28615         PR target/83368
28616         * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
28617         in PIC mode except for TARGET_VXWORKS_RTP.
28618         * config/sparc/sparc.c: Include cfgrtl.h.
28619         (TARGET_INIT_PIC_REG): Define.
28620         (TARGET_USE_PSEUDO_PIC_REG): Likewise.
28621         (sparc_pic_register_p): New predicate.
28622         (sparc_legitimate_address_p): Use it.
28623         (sparc_legitimize_pic_address): Likewise.
28624         (sparc_delegitimize_address): Likewise.
28625         (sparc_mode_dependent_address_p): Likewise.
28626         (gen_load_pcrel_sym): Remove 4th parameter.
28627         (load_got_register): Adjust call to above.  Remove obsolete stuff.
28628         (sparc_expand_prologue): Do not call load_got_register here.
28629         (sparc_flat_expand_prologue): Likewise.
28630         (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
28631         (sparc_use_pseudo_pic_reg): New function.
28632         (sparc_init_pic_reg): Likewise.
28633         * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
28634         (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
28636 2018-01-12  Christophe Lyon  <christophe.lyon@linaro.org>
28638         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
28639         Add item for branch_cost.
28641 2018-01-12  Eric Botcazou  <ebotcazou@adacore.com>
28643         PR rtl-optimization/83565
28644         * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
28645         not extend the result to a larger mode for rotate operations.
28646         (num_sign_bit_copies1): Likewise.
28648 2018-01-12  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
28650         PR target/40411
28651         * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
28652         -symbolic.
28653         Use values-Xc.o for -pedantic.
28654         Link with values-xpg4.o for C90, values-xpg6.o otherwise.
28656 2018-01-12  Martin Liska  <mliska@suse.cz>
28658         PR ipa/83054
28659         * ipa-devirt.c (final_warning_record::grow_type_warnings):
28660         New function.
28661         (possible_polymorphic_call_targets): Use it.
28662         (ipa_devirt): Likewise.
28664 2018-01-12  Martin Liska  <mliska@suse.cz>
28666         * profile-count.h (enum profile_quality): Use 0 as invalid
28667         enum value of profile_quality.
28669 2018-01-12  Chung-Ju Wu  <jasonwucj@gmail.com>
28671         * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
28672         -mext-string options.
28674 2018-01-12  Richard Biener  <rguenther@suse.de>
28676         * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
28677         DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
28678         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
28679         Likewise.
28680         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
28682 2018-01-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
28684         * configure.ac (--with-long-double-format): Add support for the
28685         configuration option to change the default long double format on
28686         PowerPC systems.
28687         * config.gcc (powerpc*-linux*-*): Likewise.
28688         * configure: Regenerate.
28689         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
28690         double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
28691         used without modification.
28693 2018-01-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
28695         * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
28696         (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
28697         * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
28698         MISC_BUILTIN_SPEC_BARRIER.
28699         (rs6000_init_builtins): Likewise.
28700         * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
28701         enum value.
28702         (speculation_barrier): New define_insn.
28703         * doc/extend.texi: Document __builtin_speculation_barrier.
28705 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
28707         PR target/83203
28708         * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
28709         is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
28710         * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
28711         iterators.
28712         (ssescalarmodesuffix): Add 512-bit vectors.  Use "d" or "q" for
28713         integral modes instead of "ss" and "sd".
28714         (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
28715         vectors with 32-bit and 64-bit elements.
28716         (vecdupssescalarmodesuffix): New mode attribute.
28717         (vec_dup<mode>): Use it.
28719 2018-01-11  H.J. Lu  <hongjiu.lu@intel.com>
28721         PR target/83330
28722         * config/i386/i386.c (ix86_compute_frame_layout): Align stack
28723         frame if argument is passed on stack.
28725 2018-01-11  Jakub Jelinek  <jakub@redhat.com>
28727         PR target/82682
28728         * ree.c (combine_reaching_defs): Optimize also
28729         reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
28730         reg2=any_extend(exp); reg1=reg2;, formatting fix.
28732 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
28734         PR middle-end/83189
28735         * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
28737 2018-01-11  Jan Hubicka  <hubicka@ucw.cz>
28739         PR middle-end/83718
28740         * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
28741         after they are computed.
28743 2018-01-11  Bin Cheng  <bin.cheng@arm.com>
28745         PR tree-optimization/83695
28746         * gimple-loop-linterchange.cc
28747         (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
28748         reset cached scev information after interchange.
28749         (pass_linterchange::execute): Remove call to scev_reset_htab.
28751 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28753         * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
28754         vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
28755         vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
28756         vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
28757         vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
28758         vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
28759         * config/arm/arm_neon_builtins.def (vfmal_lane_low,
28760         vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
28761         vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
28762         vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
28763         vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
28764         * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
28765         (V_lane_reg): Likewise.
28766         * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
28767         New define_expand.
28768         (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
28769         (vfmal_lane_low<mode>_intrinsic,
28770         vfmal_lane_low<vfmlsel2><mode>_intrinsic,
28771         vfmal_lane_high<vfmlsel2><mode>_intrinsic,
28772         vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
28773         vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
28774         vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
28775         vfmsl_lane_high<mode>_intrinsic): New define_insns.
28777 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28779         * config/arm/arm-cpus.in (fp16fml): New feature.
28780         (ALL_SIMD): Add fp16fml.
28781         (armv8.2-a): Add fp16fml as an option.
28782         (armv8.3-a): Likewise.
28783         (armv8.4-a): Add fp16fml as part of fp16.
28784         * config/arm/arm.h (TARGET_FP16FML): Define.
28785         * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
28786         when appropriate.
28787         * config/arm/arm-modes.def (V2HF): Define.
28788         * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
28789         vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
28790         vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
28791         * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
28792         vfmsl_low, vfmsl_high): New set of builtins.
28793         * config/arm/iterators.md (PLUSMINUS): New code iterator.
28794         (vfml_op): New code attribute.
28795         (VFMLHALVES): New int iterator.
28796         (VFML, VFMLSEL): New mode attributes.
28797         (V_reg): Define mapping for V2HF.
28798         (V_hi, V_lo): New mode attributes.
28799         (VF_constraint): Likewise.
28800         (vfml_half, vfml_half_selector): New int attributes.
28801         * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
28802         define_expand.
28803         (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
28804         vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
28805         New define_insn.
28806         * config/arm/t-arm-elf (v8_fps): Add fp16fml.
28807         * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
28808         * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
28809         * doc/invoke.texi (ARM Options): Document fp16fml.  Update armv8.4-a
28810         documentation.
28811         * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
28812         Document new effective target and option set.
28814 2018-01-11  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28816         * config/arm/arm-cpus.in (armv8_4): New feature.
28817         (ARMv8_4a): New fgroup.
28818         (armv8.4-a): New arch.
28819         * config/arm/arm-tables.opt: Regenerate.
28820         * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
28821         * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
28822         * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
28823         Add matching rules for -march=armv8.4-a and extensions.
28824         * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
28826 2018-01-11  Oleg Endo  <olegendo@gcc.gnu.org>
28828         PR target/81821
28829         * config/rx/rx.md (BW): New mode attribute.
28830         (sync_lock_test_and_setsi): Add mode suffix to insn output.
28832 2018-01-11  Richard Biener  <rguenther@suse.de>
28834         PR tree-optimization/83435
28835         * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
28836         * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
28837         * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
28839 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
28840             Alan Hayward  <alan.hayward@arm.com>
28841             David Sherwood  <david.sherwood@arm.com>
28843         * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
28844         field.
28845         (aarch64_classify_address): Initialize it.  Track polynomial offsets.
28846         (aarch64_print_address_internal): Use it to check for a zero offset.
28848 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
28849             Alan Hayward  <alan.hayward@arm.com>
28850             David Sherwood  <david.sherwood@arm.com>
28852         * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
28853         * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
28854         Return a poly_int64 rather than a HOST_WIDE_INT.
28855         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
28856         rather than a HOST_WIDE_INT.
28857         * config/aarch64/aarch64.h (aarch64_frame): Protect with
28858         HAVE_POLY_INT_H rather than HOST_WIDE_INT.  Change locals_offset,
28859         hard_fp_offset, frame_size, initial_adjust, callee_offset and
28860         final_offset from HOST_WIDE_INT to poly_int64.
28861         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
28862         to_constant when getting the number of units in an Advanced SIMD
28863         mode.
28864         (aarch64_builtin_vectorized_function): Check for a constant number
28865         of units.
28866         * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
28867         GET_MODE_SIZE.
28868         (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
28869         attribute instead of GET_MODE_NUNITS.
28870         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
28871         (aarch64_class_max_nregs): Use the constant_lowest_bound of the
28872         GET_MODE_SIZE for fixed-size registers.
28873         (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
28874         (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
28875         (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
28876         (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
28877         (aarch64_print_operand, aarch64_print_address_internal)
28878         (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
28879         (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
28880         (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
28881         Handle polynomial GET_MODE_SIZE.
28882         (aarch64_hard_regno_caller_save_mode): Likewise.  Return modes
28883         wider than SImode without modification.
28884         (tls_symbolic_operand_type): Use strip_offset instead of split_const.
28885         (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
28886         (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
28887         passing and returning SVE modes.
28888         (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
28889         rather than GEN_INT.
28890         (aarch64_emit_probe_stack_range): Take the size as a poly_int64
28891         rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
28892         (aarch64_allocate_and_probe_stack_space): Likewise.
28893         (aarch64_layout_frame): Cope with polynomial offsets.
28894         (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
28895         start_offset as a poly_int64 rather than a HOST_WIDE_INT.  Track
28896         polynomial offsets.
28897         (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
28898         (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
28899         poly_int64 rather than a HOST_WIDE_INT.
28900         (aarch64_get_separate_components, aarch64_process_components)
28901         (aarch64_expand_prologue, aarch64_expand_epilogue)
28902         (aarch64_use_return_insn_p): Handle polynomial frame offsets.
28903         (aarch64_anchor_offset): New function, split out from...
28904         (aarch64_legitimize_address): ...here.
28905         (aarch64_builtin_vectorization_cost): Handle polynomial
28906         TYPE_VECTOR_SUBPARTS.
28907         (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
28908         GET_MODE_NUNITS.
28909         (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
28910         number of elements from the PARALLEL rather than the mode.
28911         (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
28912         rather than GET_MODE_BITSIZE.
28913         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
28914         (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
28915         (aarch64_expand_vec_perm_const_1): Handle polynomial
28916         d->perm.length () and d->perm elements.
28917         (aarch64_evpc_tbl): Likewise.  Use nelt rather than GET_MODE_NUNITS.
28918         Apply to_constant to d->perm elements.
28919         (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
28920         polynomial CONST_VECTOR_NUNITS.
28921         (aarch64_move_pointer): Take amount as a poly_int64 rather
28922         than an int.
28923         (aarch64_progress_pointer): Avoid temporary variable.
28924         * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
28925         the mode attribute instead of GET_MODE.
28927 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
28928             Alan Hayward  <alan.hayward@arm.com>
28929             David Sherwood  <david.sherwood@arm.com>
28931         * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
28932         x exists before using it.
28933         (aarch64_add_constant_internal): Rename to...
28934         (aarch64_add_offset_1): ...this.  Replace regnum with separate
28935         src and dest rtxes.  Handle the case in which they're different,
28936         including when the offset is zero.  Replace scratchreg with an rtx.
28937         Use 2 additions if there is no spare register into which we can
28938         move a 16-bit constant.
28939         (aarch64_add_constant): Delete.
28940         (aarch64_add_offset): Replace reg with separate src and dest
28941         rtxes.  Take a poly_int64 offset instead of a HOST_WIDE_INT.
28942         Use aarch64_add_offset_1.
28943         (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
28944         an rtx rather than an int.  Take the delta as a poly_int64
28945         rather than a HOST_WIDE_INT.  Use aarch64_add_offset.
28946         (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
28947         (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
28948         aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
28949         (aarch64_expand_epilogue): Update calls to aarch64_add_offset
28950         and aarch64_add_sp.
28951         (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
28952         aarch64_add_constant.
28954 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
28956         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
28957         Use scalar_float_mode.
28959 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
28961         * config/aarch64/aarch64-simd.md
28962         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
28963         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
28964         (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
28965         (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
28966         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
28967         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
28968         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
28969         (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
28970         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
28971         (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
28973 2018-01-11  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
28975         PR target/83514
28976         * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
28977         targ_options->x_arm_arch_string is non NULL.
28979 2018-01-11  Tamar Christina  <tamar.christina@arm.com>
28981         * config/aarch64/aarch64.h
28982         (AARCH64_FL_FOR_ARCH8_4): Add  AARCH64_FL_DOTPROD.
28984 2018-01-11  Sudakshina Das  <sudi.das@arm.com>
28986         PR target/82096
28987         * expmed.c (emit_store_flag_force): Swap if const op0
28988         and change VOIDmode to mode of op0.
28990 2018-01-11  Richard Sandiford  <richard.sandiford@linaro.org>
28992         PR rtl-optimization/83761
28993         * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
28994         than bytes to mode_for_size.
28996 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
28998         PR middle-end/83189
28999         * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
29000         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
29001         profile.
29003 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
29005         PR middle-end/83575
29006         * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
29007         when in layout mode.
29008         (cfg_layout_finalize): Do not verify cfg before we are out of layout.
29009         * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
29010         partition fixup.
29012 2018-01-10  Michael Collison  <michael.collison@arm.com>
29014         * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
29015         * config/aarch64/aarch64-option-extension.def: Add
29016         AARCH64_OPT_EXTENSION of 'fp16fml'.
29017         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29018         (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
29019         * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
29020         * config/aarch64/constraints.md (Ui7): New constraint.
29021         * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
29022         (VFMLA_SEL_W): Ditto.
29023         (f16quad): Ditto.
29024         (f16mac1): Ditto.
29025         (VFMLA16_LOW): New int iterator.
29026         (VFMLA16_HIGH): Ditto.
29027         (UNSPEC_FMLAL): New unspec.
29028         (UNSPEC_FMLSL): Ditto.
29029         (UNSPEC_FMLAL2): Ditto.
29030         (UNSPEC_FMLSL2): Ditto.
29031         (f16mac): New code attribute.
29032         * config/aarch64/aarch64-simd-builtins.def
29033         (aarch64_fmlal_lowv2sf): Ditto.
29034         (aarch64_fmlsl_lowv2sf): Ditto.
29035         (aarch64_fmlalq_lowv4sf): Ditto.
29036         (aarch64_fmlslq_lowv4sf): Ditto.
29037         (aarch64_fmlal_highv2sf): Ditto.
29038         (aarch64_fmlsl_highv2sf): Ditto.
29039         (aarch64_fmlalq_highv4sf): Ditto.
29040         (aarch64_fmlslq_highv4sf): Ditto.
29041         (aarch64_fmlal_lane_lowv2sf): Ditto.
29042         (aarch64_fmlsl_lane_lowv2sf): Ditto.
29043         (aarch64_fmlal_laneq_lowv2sf): Ditto.
29044         (aarch64_fmlsl_laneq_lowv2sf): Ditto.
29045         (aarch64_fmlalq_lane_lowv4sf): Ditto.
29046         (aarch64_fmlsl_lane_lowv4sf): Ditto.
29047         (aarch64_fmlalq_laneq_lowv4sf): Ditto.
29048         (aarch64_fmlsl_laneq_lowv4sf): Ditto.
29049         (aarch64_fmlal_lane_highv2sf): Ditto.
29050         (aarch64_fmlsl_lane_highv2sf): Ditto.
29051         (aarch64_fmlal_laneq_highv2sf): Ditto.
29052         (aarch64_fmlsl_laneq_highv2sf): Ditto.
29053         (aarch64_fmlalq_lane_highv4sf): Ditto.
29054         (aarch64_fmlsl_lane_highv4sf): Ditto.
29055         (aarch64_fmlalq_laneq_highv4sf): Ditto.
29056         (aarch64_fmlsl_laneq_highv4sf): Ditto.
29057         * config/aarch64/aarch64-simd.md:
29058         (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
29059         (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
29060         (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
29061         (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
29062         (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
29063         (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
29064         (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
29065         (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
29066         (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
29067         (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
29068         (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
29069         (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
29070         (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
29071         (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
29072         (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
29073         (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
29074         (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
29075         (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
29076         (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
29077         (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
29078         * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
29079         (vfmlsl_low_u32): Ditto.
29080         (vfmlalq_low_u32): Ditto.
29081         (vfmlslq_low_u32): Ditto.
29082         (vfmlal_high_u32): Ditto.
29083         (vfmlsl_high_u32): Ditto.
29084         (vfmlalq_high_u32): Ditto.
29085         (vfmlslq_high_u32): Ditto.
29086         (vfmlal_lane_low_u32): Ditto.
29087         (vfmlsl_lane_low_u32): Ditto.
29088         (vfmlal_laneq_low_u32): Ditto.
29089         (vfmlsl_laneq_low_u32): Ditto.
29090         (vfmlalq_lane_low_u32): Ditto.
29091         (vfmlslq_lane_low_u32): Ditto.
29092         (vfmlalq_laneq_low_u32): Ditto.
29093         (vfmlslq_laneq_low_u32): Ditto.
29094         (vfmlal_lane_high_u32): Ditto.
29095         (vfmlsl_lane_high_u32): Ditto.
29096         (vfmlal_laneq_high_u32): Ditto.
29097         (vfmlsl_laneq_high_u32): Ditto.
29098         (vfmlalq_lane_high_u32): Ditto.
29099         (vfmlslq_lane_high_u32): Ditto.
29100         (vfmlalq_laneq_high_u32): Ditto.
29101         (vfmlslq_laneq_high_u32): Ditto.
29102         * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
29103         (AARCH64_FL_FOR_ARCH8_4): New.
29104         (AARCH64_ISA_F16FML): New ISA flag.
29105         (TARGET_F16FML): New feature flag for fp16fml.
29106         (doc/invoke.texi): Document new fp16fml option.
29108 2018-01-10  Michael Collison  <michael.collison@arm.com>
29110         * config/aarch64/aarch64-builtins.c:
29111         (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
29112         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29113         (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
29114         * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
29115         (AARCH64_ISA_SHA3): New ISA flag.
29116         (TARGET_SHA3): New feature flag for sha3.
29117         * config/aarch64/iterators.md (sha512_op): New int attribute.
29118         (CRYPTO_SHA512): New int iterator.
29119         (UNSPEC_SHA512H): New unspec.
29120         (UNSPEC_SHA512H2): Ditto.
29121         (UNSPEC_SHA512SU0): Ditto.
29122         (UNSPEC_SHA512SU1): Ditto.
29123         * config/aarch64/aarch64-simd-builtins.def
29124         (aarch64_crypto_sha512hqv2di): New builtin.
29125         (aarch64_crypto_sha512h2qv2di): Ditto.
29126         (aarch64_crypto_sha512su0qv2di): Ditto.
29127         (aarch64_crypto_sha512su1qv2di): Ditto.
29128         (aarch64_eor3qv8hi): Ditto.
29129         (aarch64_rax1qv2di): Ditto.
29130         (aarch64_xarqv2di): Ditto.
29131         (aarch64_bcaxqv8hi): Ditto.
29132         * config/aarch64/aarch64-simd.md:
29133         (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
29134         (aarch64_crypto_sha512su0qv2di): Ditto.
29135         (aarch64_crypto_sha512su1qv2di): Ditto.
29136         (aarch64_eor3qv8hi): Ditto.
29137         (aarch64_rax1qv2di): Ditto.
29138         (aarch64_xarqv2di): Ditto.
29139         (aarch64_bcaxqv8hi): Ditto.
29140         * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
29141         (vsha512h2q_u64): Ditto.
29142         (vsha512su0q_u64): Ditto.
29143         (vsha512su1q_u64): Ditto.
29144         (veor3q_u16): Ditto.
29145         (vrax1q_u64): Ditto.
29146         (vxarq_u64): Ditto.
29147         (vbcaxq_u16): Ditto.
29148         * config/arm/types.md (crypto_sha512): New type attribute.
29149         (crypto_sha3): Ditto.
29150         (doc/invoke.texi): Document new sha3 option.
29152 2018-01-10  Michael Collison  <michael.collison@arm.com>
29154         * config/aarch64/aarch64-builtins.c:
29155         (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
29156         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29157         (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
29158         (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
29159         * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
29160         (AARCH64_ISA_SM4): New ISA flag.
29161         (TARGET_SM4): New feature flag for sm4.
29162         * config/aarch64/aarch64-simd-builtins.def
29163         (aarch64_sm3ss1qv4si): Ditto.
29164         (aarch64_sm3tt1aq4si): Ditto.
29165         (aarch64_sm3tt1bq4si): Ditto.
29166         (aarch64_sm3tt2aq4si): Ditto.
29167         (aarch64_sm3tt2bq4si): Ditto.
29168         (aarch64_sm3partw1qv4si): Ditto.
29169         (aarch64_sm3partw2qv4si): Ditto.
29170         (aarch64_sm4eqv4si): Ditto.
29171         (aarch64_sm4ekeyqv4si): Ditto.
29172         * config/aarch64/aarch64-simd.md:
29173         (aarch64_sm3ss1qv4si): Ditto.
29174         (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
29175         (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
29176         (aarch64_sm4eqv4si): Ditto.
29177         (aarch64_sm4ekeyqv4si): Ditto.
29178         * config/aarch64/iterators.md (sm3tt_op): New int iterator.
29179         (sm3part_op): Ditto.
29180         (CRYPTO_SM3TT): Ditto.
29181         (CRYPTO_SM3PART): Ditto.
29182         (UNSPEC_SM3SS1): New unspec.
29183         (UNSPEC_SM3TT1A): Ditto.
29184         (UNSPEC_SM3TT1B): Ditto.
29185         (UNSPEC_SM3TT2A): Ditto.
29186         (UNSPEC_SM3TT2B): Ditto.
29187         (UNSPEC_SM3PARTW1): Ditto.
29188         (UNSPEC_SM3PARTW2): Ditto.
29189         (UNSPEC_SM4E): Ditto.
29190         (UNSPEC_SM4EKEY): Ditto.
29191         * config/aarch64/constraints.md (Ui2): New constraint.
29192         * config/aarch64/predicates.md (aarch64_imm2): New predicate.
29193         * config/arm/types.md (crypto_sm3): New type attribute.
29194         (crypto_sm4): Ditto.
29195         * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
29196         (vsm3tt1aq_u32): Ditto.
29197         (vsm3tt1bq_u32): Ditto.
29198         (vsm3tt2aq_u32): Ditto.
29199         (vsm3tt2bq_u32): Ditto.
29200         (vsm3partw1q_u32): Ditto.
29201         (vsm3partw2q_u32): Ditto.
29202         (vsm4eq_u32): Ditto.
29203         (vsm4ekeyq_u32): Ditto.
29204         (doc/invoke.texi): Document new sm4 option.
29206 2018-01-10  Michael Collison  <michael.collison@arm.com>
29208         * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
29209         * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
29210         (AARCH64_FL_FOR_ARCH8_4): New.
29211         (AARCH64_FL_V8_4): New flag.
29212         (doc/invoke.texi): Document new armv8.4-a option.
29214 2018-01-10  Michael Collison  <michael.collison@arm.com>
29216         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
29217         (__ARM_FEATURE_AES): Define if TARGET_AES is true.
29218         (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
29219         * config/aarch64/aarch64-option-extension.def: Add
29220         AARCH64_OPT_EXTENSION of 'sha2'.
29221         (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
29222         (crypto): Disable sha2 and aes if crypto disabled.
29223         (crypto): Enable aes and sha2 if enabled.
29224         (simd): Disable sha2 and aes if simd disabled.
29225         * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
29226         New flags.
29227         (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
29228         (TARGET_SHA2): New feature flag for sha2.
29229         (TARGET_AES): New feature flag for aes.
29230         * config/aarch64/aarch64-simd.md:
29231         (aarch64_crypto_aes<aes_op>v16qi): Make pattern
29232         conditional on TARGET_AES.
29233         (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
29234         (aarch64_crypto_sha1hsi): Make pattern conditional
29235         on TARGET_SHA2.
29236         (aarch64_crypto_sha1hv4si): Ditto.
29237         (aarch64_be_crypto_sha1hv4si): Ditto.
29238         (aarch64_crypto_sha1su1v4si): Ditto.
29239         (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
29240         (aarch64_crypto_sha1su0v4si): Ditto.
29241         (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
29242         (aarch64_crypto_sha256su0v4si): Ditto.
29243         (aarch64_crypto_sha256su1v4si): Ditto.
29244         (doc/invoke.texi): Document new aes and sha2 options.
29246 2018-01-10  Martin Sebor  <msebor@redhat.com>
29248         PR tree-optimization/83781
29249         * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
29250         as string arrays.
29252 2018-01-11  Martin Sebor  <msebor@gmail.com>
29253             Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
29255         PR tree-optimization/83501
29256         PR tree-optimization/81703
29258         * tree-ssa-strlen.c (get_string_cst): Rename...
29259         (get_string_len): ...to this.  Handle global constants.
29260         (handle_char_store): Adjust.
29262 2018-01-10  Kito Cheng  <kito.cheng@gmail.com>
29263             Jim Wilson  <jimw@sifive.com>
29265         * config/riscv/riscv-protos.h (riscv_output_return): New.
29266         * config/riscv/riscv.c (struct machine_function): New naked_p field.
29267         (riscv_attribute_table, riscv_output_return),
29268         (riscv_handle_fndecl_attribute, riscv_naked_function_p),
29269         (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
29270         (riscv_compute_frame_info): Only compute frame->mask if not a naked
29271         function.
29272         (riscv_expand_prologue): Add early return for naked function.
29273         (riscv_expand_epilogue): Likewise.
29274         (riscv_function_ok_for_sibcall): Return false for naked function.
29275         (riscv_set_current_function): New.
29276         (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
29277         (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
29278         * config/riscv/riscv.md (simple_return): Call riscv_output_return.
29279         * doc/extend.texi (RISC-V Function Attributes): New.
29281 2018-01-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
29283         * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
29284         check for 128-bit long double before checking TCmode.
29285         * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
29286         128-bit long doubles before checking TFmode or TCmode.
29287         (FLOAT128_IBM_P): Likewise.
29289 2018-01-10  Martin Sebor  <msebor@redhat.com>
29291         PR tree-optimization/83671
29292         * builtins.c (c_strlen): Unconditionally return zero for the empty
29293         string.
29294         Use -Warray-bounds for warnings.
29295         * gimple-fold.c (get_range_strlen): Handle non-constant lengths
29296         for non-constant array indices with COMPONENT_REF, arrays of
29297         arrays, and pointers to arrays.
29298         (gimple_fold_builtin_strlen): Determine and set length range for
29299         non-constant character arrays.
29301 2018-01-10  Aldy Hernandez  <aldyh@redhat.com>
29303         PR middle-end/81897
29304         * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
29305         empty blocks.
29307 2018-01-10  Eric Botcazou  <ebotcazou@adacore.com>
29309         * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
29311 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
29313         PR target/83399
29314         * config/rs6000/rs6000.c (print_operand) <'y'>: Use
29315         VECTOR_MEM_ALTIVEC_OR_VSX_P.
29316         * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
29317         indexed_or_indirect_operand predicate.
29318         (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
29319         (*vsx_le_perm_load_v8hi): Likewise.
29320         (*vsx_le_perm_load_v16qi): Likewise.
29321         (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
29322         (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
29323         (*vsx_le_perm_store_v8hi): Likewise.
29324         (*vsx_le_perm_store_v16qi): Likewise.
29325         (eight unnamed splitters): Likewise.
29327 2018-01-10  Peter Bergner  <bergner@vnet.ibm.com>
29329         * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
29330         * config/rs6000/emmintrin.h: Likewise.
29331         * config/rs6000/mmintrin.h: Likewise.
29332         * config/rs6000/xmmintrin.h: Likewise.
29334 2018-01-10  David Malcolm  <dmalcolm@redhat.com>
29336         PR c++/43486
29337         * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
29338         "public_flag".
29339         * tree.c (tree_nop_conversion): Return true for location wrapper
29340         nodes.
29341         (maybe_wrap_with_location): New function.
29342         (selftest::check_strip_nops): New function.
29343         (selftest::test_location_wrappers): New function.
29344         (selftest::tree_c_tests): Call it.
29345         * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
29346         (maybe_wrap_with_location): New decl.
29347         (EXPR_LOCATION_WRAPPER_P): New macro.
29348         (location_wrapper_p): New inline function.
29349         (tree_strip_any_location_wrapper): New inline function.
29351 2018-01-10  H.J. Lu  <hongjiu.lu@intel.com>
29353         PR target/83735
29354         * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
29355         stack_realign_offset for the largest alignment of stack slot
29356         actually used.
29357         (ix86_find_max_used_stack_alignment): New function.
29358         (ix86_finalize_stack_frame_flags): Use it.  Set
29359         max_used_stack_alignment if we don't realign stack.
29360         * config/i386/i386.h (machine_function): Add
29361         max_used_stack_alignment.
29363 2018-01-10  Christophe Lyon  <christophe.lyon@linaro.org>
29365         * config/arm/arm.opt (-mbranch-cost): New option.
29366         * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
29367         account.
29369 2018-01-10  Segher Boessenkool  <segher@kernel.crashing.org>
29371         PR target/83629
29372         * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
29373         load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
29375 2018-01-10  Richard Biener  <rguenther@suse.de>
29377         PR debug/83765
29378         * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
29379         early out so it also covers the case where we have a non-NULL
29380         origin.
29382 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
29384         PR tree-optimization/83753
29385         * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
29386         for non-strided grouped accesses if the number of elements is 1.
29388 2018-01-10  Jan Hubicka  <hubicka@ucw.cz>
29390         PR target/81616
29391         * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
29392         * i386.h (TARGET_USE_GATHER): Define.
29393         * x86-tune.def (X86_TUNE_USE_GATHER): New.
29395 2018-01-10  Martin Liska  <mliska@suse.cz>
29397         PR bootstrap/82831
29398         * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
29399         * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
29400         partitioning.
29401         * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
29402         CLEANUP_NO_PARTITIONING is not set.
29404 2018-01-10  Richard Sandiford  <richard.sandiford@linaro.org>
29406         * doc/rtl.texi: Remove documentation of (const ...) wrappers
29407         for vectors, as a partial revert of r254296.
29408         * rtl.h (const_vec_p): Delete.
29409         (const_vec_duplicate_p): Don't test for vector CONSTs.
29410         (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
29411         * expmed.c (make_tree): Likewise.
29413         Revert:
29414         * common.md (E, F): Use CONSTANT_P instead of checking for
29415         CONST_VECTOR.
29416         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
29417         checking for CONST_VECTOR.
29419 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
29421         PR middle-end/83575
29422         * predict.c (force_edge_cold): Handle in more sane way edges
29423         with no prediction.
29425 2018-01-09  Carl Love  <cel@us.ibm.com>
29427         * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
29428         V4SI, V4SF types.
29429         (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
29430         * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
29431         VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
29432         VMRGOW_V2DI, VMRGOW_V2DF.  Remove definition for VMRGOW.
29433         * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
29434         P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW):  Add definitions.
29435         * config/rs6000/rs6000-protos.h: Add extern defition for
29436         rs6000_generate_float2_double_code.
29437         * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
29438         function.
29439         * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
29440         (float2_v2df): Add define_expand.
29442 2018-01-09  Uros Bizjak  <ubizjak@gmail.com>
29444         PR target/83628
29445         * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
29446         op_mode in the force_to_mode call.
29448 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
29450         * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
29451         instead of checking each element individually.
29452         (aarch64_evpc_uzp): Likewise.
29453         (aarch64_evpc_zip): Likewise.
29454         (aarch64_evpc_ext): Likewise.
29455         (aarch64_evpc_rev): Likewise.
29456         (aarch64_evpc_dup): Test the encoding for a single duplicated element,
29457         instead of checking each element individually.  Return true without
29458         generating rtl if
29459         (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
29460         whether all selected elements come from the same input, instead of
29461         checking each element individually.  Remove calls to gen_rtx_REG,
29462         start_sequence and end_sequence and instead assert that no rtl is
29463         generated.
29465 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
29467         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
29468         order of HIGH and CONST checks.
29470 2018-01-09  Richard Sandiford  <richard.sandiford@linaro.org>
29472         * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
29473         if the destination isn't an SSA_NAME.
29475 2018-01-09  Richard Biener  <rguenther@suse.de>
29477         PR tree-optimization/83668
29478         * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
29479         move prologue...
29480         (canonicalize_loop_form): ... here, renamed from ...
29481         (canonicalize_loop_closed_ssa_form): ... this and amended to
29482         swap successor edges for loop exit blocks to make us use
29483         the RPO order we need for initial schedule generation.
29485 2018-01-09  Joseph Myers  <joseph@codesourcery.com>
29487         PR tree-optimization/64811
29488         * match.pd: When optimizing comparisons with Inf, avoid
29489         introducing or losing exceptions from comparisons with NaN.
29491 2018-01-09  Martin Liska  <mliska@suse.cz>
29493         PR sanitizer/82517
29494         * asan.c (shadow_mem_size): Add gcc_assert.
29496 2018-01-09  Georg-Johann Lay  <avr@gjlay.de>
29498         Don't save registers in main().
29500         PR target/83738
29501         * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
29502         * config/avr/avr.opt (-mmain-is-OS_task): New target option.
29503         * config/avr/avr.c (avr_set_current_function): Don't error if
29504         naked, OS_task or OS_main are specified at the same time.
29505         (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
29506         OS_main.
29507         (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
29508         attribute.
29509         * common/config/avr/avr-common.c (avr_option_optimization_table):
29510         Switch on -mmain-is-OS_task for optimizing compilations.
29512 2018-01-09  Richard Biener  <rguenther@suse.de>
29514         PR tree-optimization/83572
29515         * graphite.c: Include cfganal.h.
29516         (graphite_transform_loops): Connect infinite loops to exit
29517         and remove fake edges at the end.
29519 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
29521         * ipa-inline.c (edge_badness): Revert accidental checkin.
29523 2018-01-09  Jan Hubicka  <hubicka@ucw.cz>
29525         PR ipa/80763
29526         * ipa-comdats.c (set_comdat_group): Only set comdat group of real
29527         symbols; not inline clones.
29529 2018-01-09  Jakub Jelinek  <jakub@redhat.com>
29531         PR target/83507
29532         * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
29533         hard registers.  Formatting fixes.
29535         PR preprocessor/83722
29536         * gcc.c (try_generate_repro): Pass
29537         &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
29538         &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
29539         do_report_bug.
29541 2018-01-08  Monk Chiang  <sh.chiang04@gmail.com>
29542             Kito Cheng  <kito.cheng@gmail.com>
29544         * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
29545         (riscv_leaf_function_p): Delete.
29546         (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
29548 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
29550         * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
29551         function.
29552         (do_ifelse): New function.
29553         (do_isel): New function.
29554         (do_sub3): New function.
29555         (do_add3): New function.
29556         (do_load_mask_compare): New function.
29557         (do_overlap_load_compare): New function.
29558         (expand_compare_loop): New function.
29559         (expand_block_compare): Call expand_compare_loop() when appropriate.
29560         * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
29561         option description.
29562         (-mblock-compare-inline-loop-limit): New option.
29564 2018-01-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
29566         PR target/83677
29567         * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
29568         Reverse order of second and third operands in first alternative.
29569         * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
29570         of first and second elements in UNSPEC_VPERMR vector.
29571         (altivec_expand_vec_perm_le): Likewise.
29573 2018-01-08  Jeff Law  <law@redhat.com>
29575         PR rtl-optimizatin/81308
29576         * tree-switch-conversion.c (cfg_altered): New file scoped static.
29577         (process_switch): If group_case_labels makes a change, then set
29578         cfg_altered.
29579         (pass_convert_switch::execute): If a switch is converted, then
29580         set cfg_altered.  Return TODO_cfg_cleanup if cfg_altered is true.
29582         PR rtl-optimization/81308
29583         * recog.c (split_all_insns): Conditionally cleanup the CFG after
29584         splitting insns.
29586 2018-01-08  Vidya Praveen  <vidyapraveen@arm.com>
29588         PR target/83663 - Revert r255946
29589         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
29590         generation for cases where splatting a value is not useful.
29591         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
29592         across a vec_duplicate and a paradoxical subreg forming a vector
29593         mode to a vec_concat.
29595 2018-01-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29597         * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
29598         -march=armv8.3-a variants.
29599         * config/arm/t-multilib: Likewise.
29600         * config/arm/t-arm-elf: Likewise.  Handle dotprod extension.
29602 2018-01-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
29604         * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
29605         to generate rtl.
29606         (cceq_ior_compare_complement): Give it a name so I can use it, and
29607         change boolean_or_operator predicate to boolean_operator so it can
29608         be used to generate a crand.
29609         (eqne): New code iterator.
29610         (bd/bd_neg): New code_attrs.
29611         (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
29612         a single define_insn.
29613         (<bd>tf_<mode>): A new insn pattern for the conditional form branch
29614         decrement (bdnzt/bdnzf/bdzt/bdzf).
29615         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
29616         with the new names of the branch decrement patterns, and added the
29617         names of the branch decrement conditional patterns.
29619 2018-01-08  Richard Biener  <rguenther@suse.de>
29621         PR tree-optimization/83563
29622         * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
29623         cache.
29625 2018-01-08  Richard Biener  <rguenther@suse.de>
29627         PR middle-end/83713
29628         * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
29630 2018-01-08  Richard Biener  <rguenther@suse.de>
29632         PR tree-optimization/83685
29633         * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
29634         references to abnormals.
29636 2018-01-08  Richard Biener  <rguenther@suse.de>
29638         PR lto/83719
29639         * dwarf2out.c (output_indirect_strings): Handle empty
29640         skeleton_debug_str_hash.
29641         (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
29643 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
29645         * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
29646         (emit_store_direct): Likewise.
29647         (arc_trampoline_adjust_address): Likewise.
29648         (arc_asm_trampoline_template): New function.
29649         (arc_initialize_trampoline): Use asm_trampoline_template.
29650         (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
29651         * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
29652         * config/arc/arc.md (flush_icache): Delete pattern.
29654 2018-01-08  Claudiu Zissulescu  <claziss@synopsys.com>
29656         * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
29657         * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
29658         munaligned-access.
29660 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
29662         PR target/83681
29663         * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
29664         by not USED_FOR_TARGET.
29665         (make_pass_resolve_sw_modes): Likewise.
29667 2018-01-08  Sebastian Huber  <sebastian.huber@embedded-brains.de>
29669         * config/nios2/nios2.h (nios2_section_threshold): Guard by not
29670         USED_FOR_TARGET.
29672 2018-01-08  Richard Biener  <rguenther@suse.de>
29674         PR middle-end/83580
29675         * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
29677 2018-01-08  Richard Biener  <rguenther@suse.de>
29679         PR middle-end/83517
29680         * match.pd ((t * 2) / 2) -> t): Add missing :c.
29682 2018-01-06  Aldy Hernandez  <aldyh@redhat.com>
29684         PR middle-end/81897
29685         * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
29686         basic blocks with a small number of successors.
29687         (convert_control_dep_chain_into_preds): Improve handling of
29688         forwarder blocks.
29689         (dump_predicates): Split apart into...
29690         (dump_pred_chain): ...here...
29691         (dump_pred_info): ...and here.
29692         (can_one_predicate_be_invalidated_p): Add debugging printfs.
29693         (can_chain_union_be_invalidated_p): Improve check for invalidation
29694         of paths.
29695         (uninit_uses_cannot_happen): Avoid unnecessary if
29696         convert_control_dep_chain_into_preds yielded nothing.
29698 2018-01-06  Martin Sebor  <msebor@redhat.com>
29700         PR tree-optimization/83640
29701         * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
29702         subtracting negative offset from size.
29703         (builtin_access::overlap): Adjust offset bounds of the access to fall
29704         within the size of the object if possible.
29706 2018-01-06  Richard Sandiford  <richard.sandiford@linaro.org>
29708         PR rtl-optimization/83699
29709         * expmed.c (extract_bit_field_1): Restrict the vector usage of
29710         extract_bit_field_as_subreg to cases in which the extracted
29711         value is also a vector.
29713         * lra-constraints.c (process_alt_operands): Test for the equivalence
29714         substitutions when detecting a possible reload cycle.
29716 2018-01-06  Jakub Jelinek  <jakub@redhat.com>
29718         PR debug/83480
29719         * toplev.c (process_options): Don't enable debug_nonbind_markers_p
29720         by default if flag_selective_schedling{,2}.  Formatting fixes.
29722         PR rtl-optimization/83682
29723         * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
29724         if it has non-VECTOR_MODE element mode.
29725         (vec_duplicate_p): Likewise.
29727         PR middle-end/83694
29728         * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
29729         and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
29731 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
29733         PR target/83604
29734         * config/i386/i386-builtin.def
29735         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
29736         __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
29737         Require also OPTION_MASK_ISA_AVX512F in addition to
29738         OPTION_MASK_ISA_GFNI.
29739         (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
29740         __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
29741         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
29742         to OPTION_MASK_ISA_GFNI.
29743         (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
29744         OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
29745         OPTION_MASK_ISA_AVX512BW.
29746         (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
29747         OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
29748         addition to OPTION_MASK_ISA_GFNI.
29749         (__builtin_ia32_vgf2p8affineinvqb_v16qi,
29750         __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
29751         Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
29752         to OPTION_MASK_ISA_GFNI.
29753         * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
29754         a requirement for all ISAs rather than any of them with a few
29755         exceptions.
29756         (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
29757         processing.
29758         (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
29759         bitmasks to be enabled with 3 exceptions, instead of requiring any
29760         enabled ISA with lots of exceptions.
29761         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
29762         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
29763         Change avx512bw in isa attribute to avx512f.
29764         * config/i386/sgxintrin.h: Add license boilerplate.
29765         * config/i386/vaesintrin.h: Likewise.  Fix macro spelling __AVX512F
29766         to __AVX512F__ and __AVX512VL to __AVX512VL__.
29767         (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
29768         _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
29769         defined.
29770         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
29771         _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
29772         temporarily sse2 rather than sse if not enabled already.
29774         PR target/83604
29775         * config/i386/sse.md (VI248_VLBW): Rename to ...
29776         (VI248_AVX512VL): ... this.  Don't guard V32HI with TARGET_AVX512BW.
29777         (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
29778         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
29779         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
29780         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
29781         mode iterator instead of VI248_VLBW.
29783 2018-01-05  Jan Hubicka  <hubicka@ucw.cz>
29785         * ipa-fnsummary.c (record_modified_bb_info): Add OP.
29786         (record_modified): Skip clobbers; add debug output.
29787         (param_change_prob): Use sreal frequencies.
29789 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
29791         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
29792         punt for user-aligned variables.
29794 2018-01-05  Richard Sandiford  <richard.sandiford@linaro.org>
29796         * tree-chrec.c (chrec_contains_symbols): Return true for
29797         POLY_INT_CST.
29799 2018-01-05  Sudakshina Das  <sudi.das@arm.com>
29801         PR target/82439
29802         * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
29803         of (x|y) == x for BICS pattern.
29805 2018-01-05  Jakub Jelinek  <jakub@redhat.com>
29807         PR tree-optimization/83605
29808         * gimple-ssa-strength-reduction.c: Include tree-eh.h.
29809         (find_candidates_dom_walker::before_dom_children): Ignore stmts that
29810         can throw.
29812 2018-01-05  Sebastian Huber  <sebastian.huber@embedded-brains.de>
29814         * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
29815         * config/epiphany/rtems.h: New file.
29817 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
29818             Uros Bizjak  <ubizjak@gmail.com>
29820         PR target/83554
29821         * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
29822         QIreg_operand instead of register_operand predicate.
29823         * config/i386/i386.c (ix86_rop_should_change_byte_p,
29824         set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
29825         comments instead of -fmitigate[-_]rop.
29827 2018-01-04  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
29829         PR bootstrap/81926
29830         * cgraphunit.c (symbol_table::compile): Switch to text_section
29831         before calling assembly_start debug hook.
29832         * run-rtl-passes.c (run_rtl_passes): Likewise.
29833         Include output.h.
29835 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
29837         * tree-vrp.c (extract_range_from_binary_expr_1): Check
29838         range_int_cst_p rather than !symbolic_range_p before calling
29839         extract_range_from_multiplicative_op_1.
29841 2018-01-04  Jeff Law  <law@redhat.com>
29843         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
29844         redundant test in assertion.
29846 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
29848         * doc/rtl.texi: Document machine_mode wrapper classes.
29850 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
29852         * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
29853         using tree_to_uhwi.
29855 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
29857         * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
29858         the VEC_PERM_EXPR fold to fail.
29860 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
29862         PR debug/83585
29863         * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
29864         to switched_sections.
29866 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
29868         PR target/83680
29869         * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
29870         test for d.testing.
29872 2018-01-04  Peter Bergner  <bergner@vnet.ibm.com>
29874         PR target/83387
29875         * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
29876         allow arguments in FP registers if TARGET_HARD_FLOAT is false.
29878 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
29880         PR debug/83666
29881         * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
29882         is BLKmode and bitpos not zero or mode change is needed.
29884 2018-01-04  Richard Sandiford  <richard.sandiford@linaro.org>
29886         PR target/83675
29887         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
29888         TARGET_VIS2.
29890 2018-01-04  Uros Bizjak  <ubizjak@gmail.com>
29892         PR target/83628
29893         * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
29894         instead of MULT rtx.  Update all corresponding splitters.
29895         (*saddl_se): Ditto.
29896         (*ssub<modesuffix>): Ditto.
29897         (*ssubl_se): Ditto.
29898         (*cmp_sadd_di): Update split patterns.
29899         (*cmp_sadd_si): Ditto.
29900         (*cmp_sadd_sidi): Ditto.
29901         (*cmp_ssub_di): Ditto.
29902         (*cmp_ssub_si): Ditto.
29903         (*cmp_ssub_sidi): Ditto.
29904         * config/alpha/predicates.md (const23_operand): New predicate.
29905         * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
29906         Look for ASHIFT, not MULT inner operand.
29907         (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
29909 2018-01-04  Martin Liska  <mliska@suse.cz>
29911         PR gcov-profile/83669
29912         * gcov.c (output_intermediate_file): Add version to intermediate
29913         gcov file.
29914         * doc/gcov.texi: Document new field 'version' in intermediate
29915         file format. Fix location of '-k' option of gcov command.
29917 2018-01-04  Martin Liska  <mliska@suse.cz>
29919         PR ipa/82352
29920         * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
29922 2018-01-04  Jakub Jelinek  <jakub@redhat.com>
29924         * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
29926 2018-01-03  Martin Sebor  <msebor@redhat.com>
29928         PR tree-optimization/83655
29929         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
29930         checking calls with invalid arguments.
29932 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29934         * tree-vect-stmts.c (vect_get_store_rhs): New function.
29935         (vectorizable_mask_load_store): Delete.
29936         (vectorizable_call): Return false for masked loads and stores.
29937         (vectorizable_store): Handle IFN_MASK_STORE.  Use vect_get_store_rhs
29938         instead of gimple_assign_rhs1.
29939         (vectorizable_load): Handle IFN_MASK_LOAD.
29940         (vect_transform_stmt): Don't set is_store for call_vec_info_type.
29942 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29944         * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
29945         split out from..,
29946         (vectorizable_mask_load_store): ...here.
29947         (vectorizable_load): ...and here.
29949 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29951         * tree-vect-stmts.c (vect_build_all_ones_mask)
29952         (vect_build_zero_merge_argument): New functions, split out from...
29953         (vectorizable_load): ...here.
29955 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29957         * tree-vect-stmts.c (vect_check_store_rhs): New function,
29958         split out from...
29959         (vectorizable_mask_load_store): ...here.
29960         (vectorizable_store): ...and here.
29962 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29964         * tree-vect-stmts.c (vect_check_load_store_mask): New function,
29965         split out from...
29966         (vectorizable_mask_load_store): ...here.
29968 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29970         * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
29971         (vect_model_store_cost): Take a vec_load_store_type instead of a
29972         vect_def_type.
29973         * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
29974         (vect_model_store_cost): Take a vec_load_store_type instead of a
29975         vect_def_type.
29976         (vectorizable_mask_load_store): Update accordingly.
29977         (vectorizable_store): Likewise.
29978         * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
29980 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29982         * tree-vect-loop.c (vect_transform_loop): Stub out scalar
29983         IFN_MASK_LOAD calls here rather than...
29984         * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
29986 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29987             Alan Hayward  <alan.hayward@arm.com>
29988             David Sherwood  <david.sherwood@arm.com>
29990         * expmed.c (extract_bit_field_1): For vector extracts,
29991         fall back to extract_bit_field_as_subreg if vec_extract
29992         isn't available.
29994 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
29995             Alan Hayward  <alan.hayward@arm.com>
29996             David Sherwood  <david.sherwood@arm.com>
29998         * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
29999         they are variable or constant sized.
30000         (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
30001         slots for constant-sized data.
30003 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30004             Alan Hayward  <alan.hayward@arm.com>
30005             David Sherwood  <david.sherwood@arm.com>
30007         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
30008         handling COND_EXPRs with boolean comparisons, try to find a better
30009         basis for the mask type than the boolean itself.
30011 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30013         * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
30014         is calculated and how it can be overridden.
30015         * genmodes.c (max_bitsize_mode_any_mode): New variable.
30016         (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
30017         if defined.
30018         (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
30019         if nonzero.
30021 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30022             Alan Hayward  <alan.hayward@arm.com>
30023             David Sherwood  <david.sherwood@arm.com>
30025         * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
30026         Remove the mode argument.
30027         (aarch64_simd_valid_immediate): Remove the mode and inverse
30028         arguments.
30029         * config/aarch64/iterators.md (bitsize): New iterator.
30030         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
30031         (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
30032         * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
30033         aarch64_simd_valid_immediate.
30034         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
30035         (aarch64_reg_or_bic_imm): Likewise.
30036         * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
30037         with an insn_type enum and msl with a modifier_type enum.
30038         Replace element_width with a scalar_mode.  Change the shift
30039         to unsigned int.  Add constructors for scalar_float_mode and
30040         scalar_int_mode elements.
30041         (aarch64_vect_float_const_representable_p): Delete.
30042         (aarch64_can_const_movi_rtx_p)
30043         (aarch64_simd_scalar_immediate_valid_for_move)
30044         (aarch64_simd_make_constant): Update call to
30045         aarch64_simd_valid_immediate.
30046         (aarch64_advsimd_valid_immediate_hs): New function.
30047         (aarch64_advsimd_valid_immediate): Likewise.
30048         (aarch64_simd_valid_immediate): Remove mode and inverse
30049         arguments.  Rewrite to use the above.  Use const_vec_duplicate_p
30050         to detect duplicated constants and use aarch64_float_const_zero_rtx_p
30051         and aarch64_float_const_representable_p on the result.
30052         (aarch64_output_simd_mov_immediate): Remove mode argument.
30053         Update call to aarch64_simd_valid_immediate and use of
30054         simd_immediate_info.
30055         (aarch64_output_scalar_simd_mov_immediate): Update call
30056         accordingly.
30058 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30059             Alan Hayward  <alan.hayward@arm.com>
30060             David Sherwood  <david.sherwood@arm.com>
30062         * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
30063         (mode_nunits): Likewise CONST_MODE_NUNITS.
30064         * machmode.def (ADJUST_NUNITS): Document.
30065         * genmodes.c (mode_data::need_nunits_adj): New field.
30066         (blank_mode): Update accordingly.
30067         (adj_nunits): New variable.
30068         (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
30069         parameter.
30070         (emit_mode_size_inline): Set need_bytesize_adj for all modes
30071         listed in adj_nunits.
30072         (emit_mode_nunits_inline): Set need_nunits_adj for all modes
30073         listed in adj_nunits.  Don't emit case statements for such modes.
30074         (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
30075         and CONST_MODE_PRECISION.  Make CONST_MODE_SIZE expand to
30076         nothing if adj_nunits is nonnull.
30077         (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
30078         (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
30079         (emit_mode_fbit): Update use of print_maybe_const_decl.
30080         (emit_move_size): Likewise.  Treat the array as non-const
30081         if adj_nunits.
30082         (emit_mode_adjustments): Handle adj_nunits.
30084 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30086         * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
30087         * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
30088         (VECTOR_MODES): Use it.
30089         (make_vector_modes): Take the prefix as an argument.
30091 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30092             Alan Hayward  <alan.hayward@arm.com>
30093             David Sherwood  <david.sherwood@arm.com>
30095         * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
30096         * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
30097         for MODE_VECTOR_BOOL.
30098         * machmode.def (VECTOR_BOOL_MODE): Document.
30099         * genmodes.c (VECTOR_BOOL_MODE): New macro.
30100         (make_vector_bool_mode): New function.
30101         (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
30102         MODE_VECTOR_BOOL.
30103         * lto-streamer-in.c (lto_input_mode_table): Likewise.
30104         * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
30105         Likewise.
30106         * stor-layout.c (int_mode_for_mode): Likewise.
30107         * tree.c (build_vector_type_for_mode): Likewise.
30108         * varasm.c (output_constant_pool_2): Likewise.
30109         * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
30110         CONSTM1_RTX (BImode) are the same thing.  Initialize const_tiny_rtx
30111         for MODE_VECTOR_BOOL.
30112         * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
30113         of mode class checks.
30114         * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
30115         instead of a list of mode class checks.
30116         (expand_vector_scalar_condition): Likewise.
30117         (type_for_widest_vector_mode): Handle BImode as an inner mode.
30119 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30120             Alan Hayward  <alan.hayward@arm.com>
30121             David Sherwood  <david.sherwood@arm.com>
30123         * machmode.h (mode_size): Change from unsigned short to
30124         poly_uint16_pod.
30125         (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
30126         (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
30127         or if measurement_type is not polynomial.
30128         (fixed_size_mode::includes_p): Check for constant-sized modes.
30129         * genmodes.c (emit_mode_size_inline): Make mode_size_inline
30130         return a poly_uint16 rather than an unsigned short.
30131         (emit_mode_size): Change the type of mode_size from unsigned short
30132         to poly_uint16_pod.  Use ZERO_COEFFS for the initializer.
30133         (emit_mode_adjustments): Cope with polynomial vector sizes.
30134         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30135         for GET_MODE_SIZE.
30136         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30137         for GET_MODE_SIZE.
30138         * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
30139         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
30140         * caller-save.c (setup_save_areas): Likewise.
30141         (replace_reg_with_saved_mem): Likewise.
30142         * calls.c (emit_library_call_value_1): Likewise.
30143         * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
30144         * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
30145         (gen_lowpart_for_combine): Likewise.
30146         * convert.c (convert_to_integer_1): Likewise.
30147         * cse.c (equiv_constant, cse_insn): Likewise.
30148         * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
30149         (cselib_subst_to_values): Likewise.
30150         * dce.c (word_dce_process_block): Likewise.
30151         * df-problems.c (df_word_lr_mark_ref): Likewise.
30152         * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
30153         * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
30154         (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
30155         (rtl_for_decl_location): Likewise.
30156         * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
30157         * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
30158         * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
30159         (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
30160         (expand_expr_real_1): Likewise.
30161         * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
30162         (pad_below): Likewise.
30163         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
30164         * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
30165         * ira.c (get_subreg_tracking_sizes): Likewise.
30166         * ira-build.c (ira_create_allocno_objects): Likewise.
30167         * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
30168         (ira_sort_regnos_for_alter_reg): Likewise.
30169         * ira-costs.c (record_operand_costs): Likewise.
30170         * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
30171         (resolve_simple_move): Likewise.
30172         * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
30173         (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
30174         (lra_constraints): Likewise.
30175         (CONST_POOL_OK_P): Reject variable-sized modes.
30176         * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
30177         (add_pseudo_to_slot, lra_spill): Likewise.
30178         * omp-low.c (omp_clause_aligned_alignment): Likewise.
30179         * optabs-query.c (get_best_extraction_insn): Likewise.
30180         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
30181         * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
30182         (expand_mult_highpart, valid_multiword_target_p): Likewise.
30183         * recog.c (offsettable_address_addr_space_p): Likewise.
30184         * regcprop.c (maybe_mode_change): Likewise.
30185         * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
30186         * regrename.c (build_def_use): Likewise.
30187         * regstat.c (dump_reg_info): Likewise.
30188         * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
30189         (find_reloads, find_reloads_subreg_address): Likewise.
30190         * reload1.c (eliminate_regs_1): Likewise.
30191         * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
30192         * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
30193         (simplify_binary_operation_1, simplify_subreg): Likewise.
30194         * targhooks.c (default_function_arg_padding): Likewise.
30195         (default_hard_regno_nregs, default_class_max_nregs): Likewise.
30196         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
30197         (verify_gimple_assign_ternary): Likewise.
30198         * tree-inline.c (estimate_move_cost): Likewise.
30199         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30200         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
30201         (get_address_cost_ainc): Likewise.
30202         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
30203         (vect_supportable_dr_alignment): Likewise.
30204         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
30205         (vectorizable_reduction): Likewise.
30206         * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
30207         (vectorizable_operation, vectorizable_load): Likewise.
30208         * tree.c (build_same_sized_truth_vector_type): Likewise.
30209         * valtrack.c (cleanup_auto_inc_dec): Likewise.
30210         * var-tracking.c (emit_note_insn_var_location): Likewise.
30211         * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
30212         (ADDR_VEC_ALIGN): Likewise.
30214 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30215             Alan Hayward  <alan.hayward@arm.com>
30216             David Sherwood  <david.sherwood@arm.com>
30218         * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
30219         unsigned short.
30220         (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
30221         or if measurement_type is polynomial.
30222         * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
30223         * combine.c (make_extraction): Likewise.
30224         * dse.c (find_shift_sequence): Likewise.
30225         * dwarf2out.c (mem_loc_descriptor): Likewise.
30226         * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
30227         (extract_bit_field, extract_low_bits): Likewise.
30228         * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
30229         (optimize_bitfield_assignment_op, expand_assignment): Likewise.
30230         (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
30231         * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
30232         * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
30233         * reload.c (find_reloads): Likewise.
30234         * reload1.c (alter_reg): Likewise.
30235         * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
30236         * targhooks.c (default_secondary_memory_needed_mode): Likewise.
30237         * tree-if-conv.c (predicate_mem_writes): Likewise.
30238         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
30239         * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
30240         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
30241         * valtrack.c (dead_debug_insert_temp): Likewise.
30242         * varasm.c (mergeable_constant_section): Likewise.
30243         * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
30245 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30246             Alan Hayward  <alan.hayward@arm.com>
30247             David Sherwood  <david.sherwood@arm.com>
30249         * expr.c (expand_assignment): Cope with polynomial mode sizes
30250         when assigning to a CONCAT.
30252 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30253             Alan Hayward  <alan.hayward@arm.com>
30254             David Sherwood  <david.sherwood@arm.com>
30256         * machmode.h (mode_precision): Change from unsigned short to
30257         poly_uint16_pod.
30258         (mode_to_precision): Return a poly_uint16 rather than an unsigned
30259         short.
30260         (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
30261         or if measurement_type is not polynomial.
30262         (HWI_COMPUTABLE_MODE_P): Turn into a function.  Optimize the case
30263         in which the mode is already known to be a scalar_int_mode.
30264         * genmodes.c (emit_mode_precision): Change the type of mode_precision
30265         from unsigned short to poly_uint16_pod.  Use ZERO_COEFFS for the
30266         initializer.
30267         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30268         for GET_MODE_PRECISION.
30269         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30270         for GET_MODE_PRECISION.
30271         * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
30272         as polynomial.
30273         (try_combine, find_split_point, combine_simplify_rtx): Likewise.
30274         (expand_field_assignment, make_extraction): Likewise.
30275         (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
30276         (get_last_value): Likewise.
30277         * convert.c (convert_to_integer_1): Likewise.
30278         * cse.c (cse_insn): Likewise.
30279         * expr.c (expand_expr_real_1): Likewise.
30280         * lra-constraints.c (simplify_operand_subreg): Likewise.
30281         * optabs-query.c (can_atomic_load_p): Likewise.
30282         * optabs.c (expand_atomic_load): Likewise.
30283         (expand_atomic_store): Likewise.
30284         * ree.c (combine_reaching_defs): Likewise.
30285         * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
30286         * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
30287         * tree.h (type_has_mode_precision_p): Likewise.
30288         * ubsan.c (instrument_si_overflow): Likewise.
30290 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30291             Alan Hayward  <alan.hayward@arm.com>
30292             David Sherwood  <david.sherwood@arm.com>
30294         * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
30295         polynomial numbers of units.
30296         (SET_TYPE_VECTOR_SUBPARTS): Likewise.
30297         (valid_vector_subparts_p): New function.
30298         (build_vector_type): Remove temporary shim and take the number
30299         of units as a poly_uint64 rather than an int.
30300         (build_opaque_vector_type): Take the number of units as a
30301         poly_uint64 rather than an int.
30302         * tree.c (build_vector_from_ctor): Handle polynomial
30303         TYPE_VECTOR_SUBPARTS.
30304         (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
30305         (uniform_vector_p, vector_type_mode, build_vector): Likewise.
30306         (build_vector_from_val): If the number of units is variable,
30307         use build_vec_duplicate_cst for constant operands and
30308         VEC_DUPLICATE_EXPR otherwise.
30309         (make_vector_type): Remove temporary is_constant ().
30310         (build_vector_type, build_opaque_vector_type): Take the number of
30311         units as a poly_uint64 rather than an int.
30312         (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
30313         VECTOR_CST_NELTS.
30314         * cfgexpand.c (expand_debug_expr): Likewise.
30315         * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
30316         (store_constructor, expand_expr_real_1): Likewise.
30317         (const_scalar_mask_from_tree): Likewise.
30318         * fold-const-call.c (fold_const_reduction): Likewise.
30319         * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
30320         (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
30321         (native_encode_vector, vec_cst_ctor_to_array): Likewise.
30322         (fold_relational_const): Likewise.
30323         (native_interpret_vector): Likewise.  Change the size from an
30324         int to an unsigned int.
30325         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
30326         TYPE_VECTOR_SUBPARTS.
30327         (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
30328         (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
30329         duplicating a non-constant operand into a variable-length vector.
30330         * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
30331         TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
30332         * ipa-icf.c (sem_variable::equals): Likewise.
30333         * match.pd: Likewise.
30334         * omp-simd-clone.c (simd_clone_subparts): Likewise.
30335         * print-tree.c (print_node): Likewise.
30336         * stor-layout.c (layout_type): Likewise.
30337         * targhooks.c (default_builtin_vectorization_cost): Likewise.
30338         * tree-cfg.c (verify_gimple_comparison): Likewise.
30339         (verify_gimple_assign_binary): Likewise.
30340         (verify_gimple_assign_ternary): Likewise.
30341         (verify_gimple_assign_single): Likewise.
30342         * tree-pretty-print.c (dump_generic_node): Likewise.
30343         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
30344         (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
30345         * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
30346         (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
30347         (vect_shift_permute_load_chain): Likewise.
30348         * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
30349         (expand_vector_condition, optimize_vector_constructor): Likewise.
30350         (lower_vec_perm, get_compute_type): Likewise.
30351         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
30352         (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
30353         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
30354         (vect_recog_mask_conversion_pattern): Likewise.
30355         * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
30356         (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
30357         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
30358         (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
30359         (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
30360         (vectorizable_shift, vectorizable_operation, vectorizable_store)
30361         (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
30362         (supportable_widening_operation): Likewise.
30363         (supportable_narrowing_operation): Likewise.
30364         * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
30365         Likewise.
30366         * varasm.c (output_constant): Likewise.
30368 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30369             Alan Hayward  <alan.hayward@arm.com>
30370             David Sherwood  <david.sherwood@arm.com>
30372         * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
30373         so that both the length == 3 and length != 3 cases set up their
30374         own permute vectors.  Add comments explaining why we know the
30375         number of elements is constant.
30376         (vect_permute_load_chain): Likewise.
30378 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30379             Alan Hayward  <alan.hayward@arm.com>
30380             David Sherwood  <david.sherwood@arm.com>
30382         * machmode.h (mode_nunits): Change from unsigned char to
30383         poly_uint16_pod.
30384         (ONLY_FIXED_SIZE_MODES): New macro.
30385         (pod_mode::measurement_type, scalar_int_mode::measurement_type)
30386         (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
30387         (complex_mode::measurement_type, fixed_size_mode::measurement_type):
30388         New typedefs.
30389         (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
30390         (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
30391         or if measurement_type is not polynomial.
30392         * genmodes.c (ZERO_COEFFS): New macro.
30393         (emit_mode_nunits_inline): Make mode_nunits_inline return a
30394         poly_uint16.
30395         (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
30396         Use ZERO_COEFFS when emitting initializers.
30397         * data-streamer.h (bp_pack_poly_value): New function.
30398         (bp_unpack_poly_value): Likewise.
30399         * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
30400         for GET_MODE_NUNITS.
30401         * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
30402         for GET_MODE_NUNITS.
30403         * tree.c (make_vector_type): Remove temporary shim and make
30404         the real function take the number of units as a poly_uint64
30405         rather than an int.
30406         (build_vector_type_for_mode): Handle polynomial nunits.
30407         * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
30408         * emit-rtl.c (const_vec_series_p_1): Likewise.
30409         (gen_rtx_CONST_VECTOR): Likewise.
30410         * fold-const.c (test_vec_duplicate_folding): Likewise.
30411         * genrecog.c (validate_pattern): Likewise.
30412         * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
30413         * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
30414         * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
30415         (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
30416         (expand_vec_cond_expr, expand_mult_highpart): Likewise.
30417         * rtlanal.c (subreg_get_info): Likewise.
30418         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
30419         (vect_grouped_load_supported): Likewise.
30420         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
30421         * tree-vect-loop.c (have_whole_vector_shift): Likewise.
30422         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
30423         (simplify_const_unary_operation, simplify_binary_operation_1)
30424         (simplify_const_binary_operation, simplify_ternary_operation)
30425         (test_vector_ops_duplicate, test_vector_ops): Likewise.
30426         (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
30427         instead of CONST_VECTOR_NUNITS.
30428         * varasm.c (output_constant_pool_2): Likewise.
30429         * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
30430         explicit-encoded elements in the XVEC for variable-length vectors.
30432 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30434         * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
30436 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30437             Alan Hayward  <alan.hayward@arm.com>
30438             David Sherwood  <david.sherwood@arm.com>
30440         * coretypes.h (fixed_size_mode): Declare.
30441         (fixed_size_mode_pod): New typedef.
30442         * builtins.h (target_builtins::x_apply_args_mode)
30443         (target_builtins::x_apply_result_mode): Change type to
30444         fixed_size_mode_pod.
30445         * builtins.c (apply_args_size, apply_result_size, result_vector)
30446         (expand_builtin_apply_args_1, expand_builtin_apply)
30447         (expand_builtin_return): Update accordingly.
30449 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30451         * cse.c (hash_rtx_cb): Hash only the encoded elements.
30452         * cselib.c (cselib_hash_rtx): Likewise.
30453         * expmed.c (make_tree): Build VECTOR_CSTs directly from the
30454         CONST_VECTOR encoding.
30456 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
30457             Jeff Law  <law@redhat.com>
30459         PR target/83641
30460         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
30461         noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
30462         only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
30463         and add REG_CFA_ADJUST_CFA notes in that case to both insns.
30465         PR target/83641
30466         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
30467         explicitly probe *sp in a noreturn function if there were any callee
30468         register saves or frame pointer is needed.
30470 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
30472         PR debug/83621
30473         * cfgexpand.c (expand_debug_expr): Return NULL if mode is
30474         BLKmode for ternary, binary or unary expressions.
30476         PR debug/83645
30477         * var-tracking.c (delete_vta_debug_insn): New inline function.
30478         (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
30479         insns from get_insns () to NULL instead of each bb separately.
30480         Use delete_vta_debug_insn.  No longer static.
30481         (vt_debug_insns_local, variable_tracking_main_1): Adjust
30482         delete_vta_debug_insns callers.
30483         * rtl.h (delete_vta_debug_insns): Declare.
30484         * final.c (rest_of_handle_final): Call delete_vta_debug_insns
30485         instead of variable_tracking_main.
30487 2018-01-03  Martin Sebor  <msebor@redhat.com>
30489         PR tree-optimization/83603
30490         * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
30491         arguments past the endof the argument list in functions declared
30492         without a prototype.
30493         * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
30494         Avoid checking when arguments are null.
30496 2018-01-03  Martin Sebor  <msebor@redhat.com>
30498         PR c/83559
30499         * doc/extend.texi (attribute const): Fix a typo.
30500         * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
30501         issuing -Wsuggest-attribute for void functions.
30503 2018-01-03  Martin Sebor  <msebor@redhat.com>
30505         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
30506         offset_int::from instead of wide_int::to_shwi.
30507         (maybe_diag_overlap): Remove assertion.
30508         Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
30509         * gimple-ssa-sprintf.c (format_directive): Same.
30510         (parse_directive): Same.
30511         (sprintf_dom_walker::compute_format_length): Same.
30512         (try_substitute_return_value): Same.
30514 2018-01-03  Jeff Law  <law@redhat.com>
30516         PR middle-end/83654
30517         * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
30518         non-constant residual for zero at runtime and avoid probing in
30519         that case.  Reorganize code for trailing problem to mirror handling
30520         of the residual.
30522 2018-01-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
30524         PR tree-optimization/83501
30525         * tree-ssa-strlen.c (get_string_cst): New.
30526         (handle_char_store): Call get_string_cst.
30528 2018-01-03  Martin Liska  <mliska@suse.cz>
30530         PR tree-optimization/83593
30531         * tree-ssa-strlen.c: Include tree-cfg.h.
30532         (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
30533         (strlen_dom_walker): Add new member variable m_cleanup_cfg.
30534         (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
30535         to false.
30536         (strlen_dom_walker::before_dom_children): Call
30537         gimple_purge_dead_eh_edges. Dump tranformation with details
30538         dump flags.
30539         (strlen_dom_walker::before_dom_children): Update call by adding
30540         new argument cleanup_eh.
30541         (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
30543 2018-01-03  Martin Liska  <mliska@suse.cz>
30545         PR ipa/83549
30546         * cif-code.def (VARIADIC_THUNK): New enum value.
30547         * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
30548         thunks.
30550 2018-01-03  Jan Beulich  <jbeulich@suse.com>
30552         * sse.md (mov<mode>_internal): Tighten condition for when to use
30553         vmovdqu<ssescalarsize> for TI and OI modes.
30555 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
30557         Update copyright years.
30559 2018-01-03  Martin Liska  <mliska@suse.cz>
30561         PR ipa/83594
30562         * ipa-visibility.c (function_and_variable_visibility): Skip
30563         functions with noipa attribure.
30565 2018-01-03  Jakub Jelinek  <jakub@redhat.com>
30567         * gcc.c (process_command): Update copyright notice dates.
30568         * gcov-dump.c (print_version): Ditto.
30569         * gcov.c (print_version): Ditto.
30570         * gcov-tool.c (print_version): Ditto.
30571         * gengtype.c (create_file): Ditto.
30572         * doc/cpp.texi: Bump @copying's copyright year.
30573         * doc/cppinternals.texi: Ditto.
30574         * doc/gcc.texi: Ditto.
30575         * doc/gccint.texi: Ditto.
30576         * doc/gcov.texi: Ditto.
30577         * doc/install.texi: Ditto.
30578         * doc/invoke.texi: Ditto.
30580 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30582         * vector-builder.h (vector_builder::m_full_nelts): Change from
30583         unsigned int to poly_uint64.
30584         (vector_builder::full_nelts): Update prototype accordingly.
30585         (vector_builder::new_vector): Likewise.
30586         (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
30587         (vector_builder::operator ==): Likewise.
30588         (vector_builder::finalize): Likewise.
30589         * int-vector-builder.h (int_vector_builder::int_vector_builder):
30590         Take the number of elements as a poly_uint64 rather than an
30591         unsigned int.
30592         * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
30593         from unsigned int to poly_uint64.
30594         (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
30595         (vec_perm_indices::new_vector): Likewise.
30596         (vec_perm_indices::length): Likewise.
30597         (vec_perm_indices::nelts_per_input): Likewise.
30598         (vec_perm_indices::input_nelts): Likewise.
30599         * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
30600         number of elements per input as a poly_uint64 rather than an
30601         unsigned int.  Use the original encoding for variable-length
30602         vectors, rather than clamping each individual element.
30603         For the second and subsequent elements in each pattern,
30604         clamp the step and base before clamping their sum.
30605         (vec_perm_indices::series_p): Handle polynomial element counts.
30606         (vec_perm_indices::all_in_range_p): Likewise.
30607         (vec_perm_indices_to_tree): Likewise.
30608         (vec_perm_indices_to_rtx): Likewise.
30609         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
30610         * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
30611         (tree_vector_builder::new_binary_operation): Handle polynomial
30612         element counts.  Return false if we need to know the number
30613         of elements at compile time.
30614         * fold-const.c (fold_vec_perm): Punt if the number of elements
30615         isn't known at compile time.
30617 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30619         * vec-perm-indices.h (vec_perm_builder): Change element type
30620         from HOST_WIDE_INT to poly_int64.
30621         (vec_perm_indices::element_type): Update accordingly.
30622         (vec_perm_indices::clamp): Handle polynomial element_types.
30623         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
30624         (vec_perm_indices::all_in_range_p): Likewise.
30625         (tree_to_vec_perm_builder): Check for poly_int64 trees rather
30626         than shwi trees.
30627         * vector-builder.h (vector_builder::stepped_sequence_p): Handle
30628         polynomial vec_perm_indices element types.
30629         * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
30630         * fold-const.c (fold_vec_perm): Likewise.
30631         * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
30632         * tree-vect-generic.c (lower_vec_perm): Likewise.
30633         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
30634         * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
30635         element type to HOST_WIDE_INT.
30637 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30638             Alan Hayward  <alan.hayward@arm.com>
30639             David Sherwood  <david.sherwood@arm.com>
30641         * alias.c (addr_side_effect_eval): Take the size as a poly_int64
30642         rather than an int.  Use plus_constant.
30643         (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
30644         Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
30646 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30647             Alan Hayward  <alan.hayward@arm.com>
30648             David Sherwood  <david.sherwood@arm.com>
30650         * calls.c (emit_call_1, expand_call): Change struct_value_size from
30651         a HOST_WIDE_INT to a poly_int64.
30653 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30654             Alan Hayward  <alan.hayward@arm.com>
30655             David Sherwood  <david.sherwood@arm.com>
30657         * calls.c (load_register_parameters): Cope with polynomial
30658         mode sizes.  Require a constant size for BLKmode parameters
30659         that aren't described by a PARALLEL.  If BLOCK_REG_PADDING
30660         forces a parameter to be padded at the lsb end in order to
30661         fill a complete number of words, require the parameter size
30662         to be ordered wrt UNITS_PER_WORD.
30664 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30665             Alan Hayward  <alan.hayward@arm.com>
30666             David Sherwood  <david.sherwood@arm.com>
30668         * reload1.c (spill_stack_slot_width): Change element type
30669         from unsigned int to poly_uint64_pod.
30670         (alter_reg): Treat mode sizes as polynomial.
30672 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30673             Alan Hayward  <alan.hayward@arm.com>
30674             David Sherwood  <david.sherwood@arm.com>
30676         * reload.c (complex_word_subreg_p): New function.
30677         (reload_inner_reg_of_subreg, push_reload): Use it.
30679 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30680             Alan Hayward  <alan.hayward@arm.com>
30681             David Sherwood  <david.sherwood@arm.com>
30683         * lra-constraints.c (process_alt_operands): Reject matched
30684         operands whose sizes aren't ordered.
30685         (match_reload): Refer to this check here.
30687 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30688             Alan Hayward  <alan.hayward@arm.com>
30689             David Sherwood  <david.sherwood@arm.com>
30691         * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
30692         that the mode size is in the set {1, 2, 4, 8, 16}.
30694 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30695             Alan Hayward  <alan.hayward@arm.com>
30696             David Sherwood  <david.sherwood@arm.com>
30698         * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
30699         Use plus_constant instead of gen_rtx_PLUS.
30701 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30702             Alan Hayward  <alan.hayward@arm.com>
30703             David Sherwood  <david.sherwood@arm.com>
30705         * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
30706         * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
30707         * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
30708         * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
30709         * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
30710         * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
30711         * config/i386/i386-protos.h (ix86_push_rounding): Declare.
30712         * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
30713         * config/i386/i386.c (ix86_push_rounding): ...this new function.
30714         * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
30715         a poly_int64.
30716         * config/m32c/m32c.c (m32c_push_rounding): Likewise.
30717         * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
30718         * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
30719         * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
30720         * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
30721         * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
30722         * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
30723         * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
30724         * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
30725         * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
30726         function.
30727         * expr.c (emit_move_resolve_push): Treat the input and result
30728         of PUSH_ROUNDING as a poly_int64.
30729         (emit_move_complex_push, emit_single_push_insn_1): Likewise.
30730         (emit_push_insn): Likewise.
30731         * lra-eliminations.c (mark_not_eliminable): Likewise.
30732         * recog.c (push_operand): Likewise.
30733         * reload1.c (elimination_effects): Likewise.
30734         * rtlanal.c (nonzero_bits1): Likewise.
30735         * calls.c (store_one_arg): Likewise.  Require the padding to be
30736         known at compile time.
30738 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30739             Alan Hayward  <alan.hayward@arm.com>
30740             David Sherwood  <david.sherwood@arm.com>
30742         * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
30743         Use plus_constant instead of gen_rtx_PLUS.
30745 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30746             Alan Hayward  <alan.hayward@arm.com>
30747             David Sherwood  <david.sherwood@arm.com>
30749         * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
30750         rather than an int.
30752 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30753             Alan Hayward  <alan.hayward@arm.com>
30754             David Sherwood  <david.sherwood@arm.com>
30756         * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
30757         instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
30758         via stack temporaries.  Treat the mode size as polynomial too.
30760 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30761             Alan Hayward  <alan.hayward@arm.com>
30762             David Sherwood  <david.sherwood@arm.com>
30764         * expr.c (expand_expr_real_2): When handling conversions involving
30765         unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
30766         multiplying int_size_in_bytes by BITS_PER_UNIT.  Treat GET_MODE_BISIZE
30767         as a poly_uint64 too.
30769 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30770             Alan Hayward  <alan.hayward@arm.com>
30771             David Sherwood  <david.sherwood@arm.com>
30773         * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
30775 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30776             Alan Hayward  <alan.hayward@arm.com>
30777             David Sherwood  <david.sherwood@arm.com>
30779         * combine.c (can_change_dest_mode): Handle polynomial
30780         REGMODE_NATURAL_SIZE.
30781         * expmed.c (store_bit_field_1): Likewise.
30782         * expr.c (store_constructor): Likewise.
30783         * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
30784         and polynomial REGMODE_NATURAL_SIZE.
30785         (gen_lowpart_common): Likewise.
30786         * reginfo.c (record_subregs_of_mode): Likewise.
30787         * rtlanal.c (read_modify_subreg_p): Likewise.
30789 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30790             Alan Hayward  <alan.hayward@arm.com>
30791             David Sherwood  <david.sherwood@arm.com>
30793         * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
30794         numbers of elements.
30796 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30797             Alan Hayward  <alan.hayward@arm.com>
30798             David Sherwood  <david.sherwood@arm.com>
30800         * match.pd: Cope with polynomial numbers of vector elements.
30802 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30803             Alan Hayward  <alan.hayward@arm.com>
30804             David Sherwood  <david.sherwood@arm.com>
30806         * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
30807         in a POINTER_PLUS_EXPR.
30809 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30810             Alan Hayward  <alan.hayward@arm.com>
30811             David Sherwood  <david.sherwood@arm.com>
30813         * omp-simd-clone.c (simd_clone_subparts): New function.
30814         (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
30815         (ipa_simd_modify_function_body): Likewise.
30817 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30818             Alan Hayward  <alan.hayward@arm.com>
30819             David Sherwood  <david.sherwood@arm.com>
30821         * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
30822         (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
30823         (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
30824         (expand_vector_condition, vector_element): Likewise.
30825         (subparts_gt): New function.
30826         (get_compute_type): Use subparts_gt.
30827         (count_type_subparts): Delete.
30828         (expand_vector_operations_1): Use subparts_gt instead of
30829         count_type_subparts.
30831 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30832             Alan Hayward  <alan.hayward@arm.com>
30833             David Sherwood  <david.sherwood@arm.com>
30835         * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
30836         (vect_compile_time_alias): ...this new function.  Do the calculation
30837         on poly_ints rather than trees.
30838         (vect_prune_runtime_alias_test_list): Update call accordingly.
30840 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30841             Alan Hayward  <alan.hayward@arm.com>
30842             David Sherwood  <david.sherwood@arm.com>
30844         * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
30845         numbers of units.
30846         (vect_schedule_slp_instance): Likewise.
30848 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30849             Alan Hayward  <alan.hayward@arm.com>
30850             David Sherwood  <david.sherwood@arm.com>
30852         * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
30853         constant and extern definitions for variable-length vectors.
30854         (vect_get_constant_vectors): Note that the number of units
30855         is known to be constant.
30857 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30858             Alan Hayward  <alan.hayward@arm.com>
30859             David Sherwood  <david.sherwood@arm.com>
30861         * tree-vect-stmts.c (vectorizable_conversion): Treat the number
30862         of units as polynomial.  Choose between WIDE and NARROW based
30863         on multiple_p.
30865 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30866             Alan Hayward  <alan.hayward@arm.com>
30867             David Sherwood  <david.sherwood@arm.com>
30869         * tree-vect-stmts.c (simd_clone_subparts): New function.
30870         (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
30872 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30873             Alan Hayward  <alan.hayward@arm.com>
30874             David Sherwood  <david.sherwood@arm.com>
30876         * tree-vect-stmts.c (vectorizable_call): Treat the number of
30877         vectors as polynomial.  Use build_index_vector for
30878         IFN_GOMP_SIMD_LANE.
30880 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30881             Alan Hayward  <alan.hayward@arm.com>
30882             David Sherwood  <david.sherwood@arm.com>
30884         * tree-vect-stmts.c (get_load_store_type): Treat the number of
30885         units as polynomial.  Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
30886         for variable-length vectors.
30887         (vectorizable_mask_load_store): Treat the number of units as
30888         polynomial, asserting that it is constant if the condition has
30889         already been enforced.
30890         (vectorizable_store, vectorizable_load): Likewise.
30892 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30893             Alan Hayward  <alan.hayward@arm.com>
30894             David Sherwood  <david.sherwood@arm.com>
30896         * tree-vect-loop.c (vectorizable_live_operation): Treat the number
30897         of units as polynomial.  Punt if we can't tell at compile time
30898         which vector contains the final result.
30900 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30901             Alan Hayward  <alan.hayward@arm.com>
30902             David Sherwood  <david.sherwood@arm.com>
30904         * tree-vect-loop.c (vectorizable_induction): Treat the number
30905         of units as polynomial.  Punt on SLP inductions.  Use an integer
30906         VEC_SERIES_EXPR for variable-length integer reductions.  Use a
30907         cast of such a series for variable-length floating-point
30908         reductions.
30910 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30911             Alan Hayward  <alan.hayward@arm.com>
30912             David Sherwood  <david.sherwood@arm.com>
30914         * tree.h (build_index_vector): Declare.
30915         * tree.c (build_index_vector): New function.
30916         * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
30917         of units as polynomial, forcibly converting it to a constant if
30918         vectorizable_reduction has already enforced the condition.
30919         (vect_create_epilog_for_reduction): Likewise.  Use build_index_vector
30920         to create a {1,2,3,...} vector.
30921         (vectorizable_reduction): Treat the number of units as polynomial.
30922         Choose vectype_in based on the largest scalar element size rather
30923         than the smallest number of units.  Enforce the restrictions
30924         relied on above.
30926 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30927             Alan Hayward  <alan.hayward@arm.com>
30928             David Sherwood  <david.sherwood@arm.com>
30930         * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
30931         number of units as polynomial.
30933 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30934             Alan Hayward  <alan.hayward@arm.com>
30935             David Sherwood  <david.sherwood@arm.com>
30937         * target.h (vector_sizes, auto_vector_sizes): New typedefs.
30938         * target.def (autovectorize_vector_sizes): Return the vector sizes
30939         by pointer, using vector_sizes rather than a bitmask.
30940         * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
30941         * targhooks.c (default_autovectorize_vector_sizes): Likewise.
30942         * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
30943         Likewise.
30944         * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
30945         * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
30946         * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
30947         * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
30948         * omp-general.c (omp_max_vf): Likewise.
30949         * omp-low.c (omp_clause_aligned_alignment): Likewise.
30950         * optabs-query.c (can_vec_mask_load_store_p): Likewise.
30951         * tree-vect-loop.c (vect_analyze_loop): Likewise.
30952         * tree-vect-slp.c (vect_slp_bb): Likewise.
30953         * doc/tm.texi: Regenerate.
30954         * tree-vectorizer.h (current_vector_size): Change from an unsigned int
30955         to a poly_uint64.
30956         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
30957         the vector size as a poly_uint64 rather than an unsigned int.
30958         (current_vector_size): Change from an unsigned int to a poly_uint64.
30959         (get_vectype_for_scalar_type): Update accordingly.
30960         * tree.h (build_truth_vector_type): Take the size and number of
30961         units as a poly_uint64 rather than an unsigned int.
30962         (build_vector_type): Add a temporary overload that takes
30963         the number of units as a poly_uint64 rather than an unsigned int.
30964         * tree.c (make_vector_type): Likewise.
30965         (build_truth_vector_type): Take the number of units as a poly_uint64
30966         rather than an unsigned int.
30968 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30969             Alan Hayward  <alan.hayward@arm.com>
30970             David Sherwood  <david.sherwood@arm.com>
30972         * target.def (get_mask_mode): Take the number of units and length
30973         as poly_uint64s rather than unsigned ints.
30974         * targhooks.h (default_get_mask_mode): Update accordingly.
30975         * targhooks.c (default_get_mask_mode): Likewise.
30976         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
30977         * doc/tm.texi: Regenerate.
30979 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30980             Alan Hayward  <alan.hayward@arm.com>
30981             David Sherwood  <david.sherwood@arm.com>
30983         * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
30984         * omp-general.c (omp_max_vf): Likewise.
30985         * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
30986         (expand_omp_simd): Handle polynomial safelen.
30987         * omp-low.c (omplow_simd_context): Add a default constructor.
30988         (omplow_simd_context::max_vf): Change from int to poly_uint64.
30989         (lower_rec_simd_input_clauses): Update accordingly.
30990         (lower_rec_input_clauses): Likewise.
30992 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
30993             Alan Hayward  <alan.hayward@arm.com>
30994             David Sherwood  <david.sherwood@arm.com>
30996         * tree-vectorizer.h (vect_nunits_for_cost): New function.
30997         * tree-vect-loop.c (vect_model_reduction_cost): Use it.
30998         * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
30999         (vect_analyze_slp_cost): Likewise.
31000         * tree-vect-stmts.c (vect_model_store_cost): Likewise.
31001         (vect_model_load_cost): Likewise.
31003 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31004             Alan Hayward  <alan.hayward@arm.com>
31005             David Sherwood  <david.sherwood@arm.com>
31007         * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
31008         (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
31009         from an unsigned int * to a poly_uint64_pod *.
31010         (calculate_unrolling_factor): New function.
31011         (vect_analyze_slp_instance): Use it.  Track polynomial max_nunits.
31013 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31014             Alan Hayward  <alan.hayward@arm.com>
31015             David Sherwood  <david.sherwood@arm.com>
31017         * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
31018         from an unsigned int to a poly_uint64.
31019         (_loop_vec_info::slp_unrolling_factor): Likewise.
31020         (_loop_vec_info::vectorization_factor): Change from an int
31021         to a poly_uint64.
31022         (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
31023         (vect_get_num_vectors): New function.
31024         (vect_update_max_nunits, vect_vf_for_cost): Likewise.
31025         (vect_get_num_copies): Use vect_get_num_vectors.
31026         (vect_analyze_data_ref_dependences): Change max_vf from an int *
31027         to an unsigned int *.
31028         (vect_analyze_data_refs): Change min_vf from an int * to a
31029         poly_uint64 *.
31030         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
31031         than an unsigned HOST_WIDE_INT.
31032         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
31033         (vect_analyze_data_ref_dependence): Change max_vf from an int *
31034         to an unsigned int *.
31035         (vect_analyze_data_ref_dependences): Likewise.
31036         (vect_compute_data_ref_alignment): Handle polynomial vf.
31037         (vect_enhance_data_refs_alignment): Likewise.
31038         (vect_prune_runtime_alias_test_list): Likewise.
31039         (vect_shift_permute_load_chain): Likewise.
31040         (vect_supportable_dr_alignment): Likewise.
31041         (dependence_distance_ge_vf): Take the vectorization factor as a
31042         poly_uint64 rather than an unsigned HOST_WIDE_INT.
31043         (vect_analyze_data_refs): Change min_vf from an int * to a
31044         poly_uint64 *.
31045         * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
31046         vfm1 as a poly_uint64 rather than an int.  Make the same change
31047         for the returned bound_scalar.
31048         (vect_gen_vector_loop_niters): Handle polynomial vf.
31049         (vect_do_peeling): Likewise.  Update call to
31050         vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
31051         (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
31052         be constant.
31053         * tree-vect-loop.c (vect_determine_vectorization_factor)
31054         (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
31055         (vect_get_known_peeling_cost): Likewise.
31056         (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
31057         (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
31058         (vect_transform_loop): Likewise.  Use the lowest possible VF when
31059         updating the upper bounds of the loop.
31060         (vect_min_worthwhile_factor): Make static.  Return an unsigned int
31061         rather than an int.
31062         * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
31063         polynomial unroll factors.
31064         (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
31065         (vect_make_slp_decision): Likewise.
31066         (vect_supported_load_permutation_p): Likewise, and polynomial
31067         vf too.
31068         (vect_analyze_slp_cost): Handle polynomial vf.
31069         (vect_slp_analyze_node_operations): Likewise.
31070         (vect_slp_analyze_bb_1): Likewise.
31071         (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
31072         than an unsigned HOST_WIDE_INT.
31073         * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
31074         (vectorizable_load): Handle polynomial vf.
31075         * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
31076         a poly_uint64.
31077         (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
31079 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31080             Alan Hayward  <alan.hayward@arm.com>
31081             David Sherwood  <david.sherwood@arm.com>
31083         * match.pd: Handle bit operations involving three constants
31084         and try to fold one pair.
31086 2018-01-03  Richard Sandiford  <richard.sandiford@linaro.org>
31088         * tree-vect-loop-manip.c: Include gimple-fold.h.
31089         (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
31090         niters_maybe_zero parameters.  Handle other cases besides a step of 1.
31091         (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
31092         Add a path that uses a step of VF instead of 1, but disable it
31093         for now.
31094         (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
31095         and niters_no_overflow parameters.  Update calls to
31096         slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
31097         Create a new SSA name if the latter choses to use a ste other
31098         than zero, and return it via niters_vector_mult_vf_var.
31099         * tree-vect-loop.c (vect_transform_loop): Update calls to
31100         vect_do_peeling, vect_gen_vector_loop_niters and
31101         slpeel_make_loop_iterate_ntimes.
31102         * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
31103         (vect_gen_vector_loop_niters): Update declarations after above changes.
31105 2018-01-02  Michael Meissner  <meissner@linux.vnet.ibm.com>
31107         * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
31108         128-bit round to integer instructions.
31109         (ceil<mode>2): Likewise.
31110         (btrunc<mode>2): Likewise.
31111         (round<mode>2): Likewise.
31113 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
31115         * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
31116         unaligned VSX load/store on P8/P9.
31117         (expand_block_clear): Allow the use of unaligned VSX
31118         load/store on P8/P9.
31120 2018-01-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31122         * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
31123         New function.
31124         (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
31125         swap associated with both a load and a store.
31127 2018-01-02  Andrew Waterman  <andrew@sifive.com>
31129         * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
31130         * config/riscv/riscv.md (clear_cache): Use it.
31132 2018-01-02  Artyom Skrobov  <tyomitch@gmail.com>
31134         * web.c: Remove out-of-date comment.
31136 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31138         * expr.c (fixup_args_size_notes): Check that any existing
31139         REG_ARGS_SIZE notes are correct, and don't try to re-add them.
31140         (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
31141         (emit_single_push_insn): ...here.
31143 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31145         * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
31146         (const_vector_encoded_nelts): New function.
31147         (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
31148         (const_vector_int_elt, const_vector_elt): Declare.
31149         * emit-rtl.c (const_vector_int_elt_1): New function.
31150         (const_vector_elt): Likewise.
31151         * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
31152         of CONST_VECTOR_ELT.
31154 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31156         * expr.c: Include rtx-vector-builder.h.
31157         (const_vector_mask_from_tree): Use rtx_vector_builder and operate
31158         directly on the tree encoding.
31159         (const_vector_from_tree): Likewise.
31160         * optabs.c: Include rtx-vector-builder.h.
31161         (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
31162         sequence of "u" values.
31163         * vec-perm-indices.c: Include rtx-vector-builder.h.
31164         (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
31165         directly on the vec_perm_indices encoding.
31167 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31169         * doc/rtl.texi (const_vector): Describe new encoding scheme.
31170         * Makefile.in (OBJS): Add rtx-vector-builder.o.
31171         * rtx-vector-builder.h: New file.
31172         * rtx-vector-builder.c: Likewise.
31173         * rtl.h (rtx_def::u2): Add a const_vector field.
31174         (CONST_VECTOR_NPATTERNS): New macro.
31175         (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
31176         (CONST_VECTOR_DUPLICATE_P): Likewise.
31177         (CONST_VECTOR_STEPPED_P): Likewise.
31178         (CONST_VECTOR_ENCODED_ELT): Likewise.
31179         (const_vec_duplicate_p): Check for a duplicated vector encoding.
31180         (unwrap_const_vec_duplicate): Likewise.
31181         (const_vec_series_p): Check for a non-duplicated vector encoding.
31182         Say that the function only returns true for integer vectors.
31183         * emit-rtl.c: Include rtx-vector-builder.h.
31184         (gen_const_vec_duplicate_1): Delete.
31185         (gen_const_vector): Call gen_const_vec_duplicate instead of
31186         gen_const_vec_duplicate_1.
31187         (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
31188         (gen_const_vec_duplicate): Use rtx_vector_builder.
31189         (gen_const_vec_series): Likewise.
31190         (gen_rtx_CONST_VECTOR): Likewise.
31191         * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
31192         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
31193         Build a new vector rather than modifying a CONST_VECTOR in-place.
31194         (handle_special_swappables): Update call accordingly.
31195         * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
31196         (swap_const_vector_halves): Take an rtx pointer rather than rtx.
31197         Build a new vector rather than modifying a CONST_VECTOR in-place.
31198         (handle_special_swappables): Update call accordingly.
31200 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31202         * simplify-rtx.c (simplify_const_binary_operation): Use
31203         CONST_VECTOR_ELT instead of XVECEXP.
31205 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31207         * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
31208         the selector elements to be different from the data elements
31209         if the selector is a VECTOR_CST.
31210         * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
31211         ssizetype for the selector.
31213 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31215         * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
31216         before testing each element individually.
31217         * tree-vect-generic.c (lower_vec_perm): Likewise.
31219 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31221         * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
31222         * selftest-run-tests.c (selftest::run_tests): Call it.
31223         * vector-builder.h (vector_builder::operator ==): New function.
31224         (vector_builder::operator !=): Likewise.
31225         * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
31226         (vec_perm_indices::all_from_input_p): New function.
31227         * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
31228         (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
31229         * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
31230         instead of reading the VECTOR_CST directly.  Detect whether both
31231         vector inputs are the same before constructing the vec_perm_indices,
31232         and update the number of inputs argument accordingly.  Use the
31233         utility functions added above.  Only construct sel2 if we need to.
31235 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31237         * optabs.c (expand_vec_perm_var): Use an explicit encoding for
31238         the broadcast of the low byte.
31239         (expand_mult_highpart): Use an explicit encoding for the permutes.
31240         * optabs-query.c (can_mult_highpart_p): Likewise.
31241         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
31242         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31243         (vectorizable_bswap): Likewise.
31244         * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
31245         explicit encoding for the power-of-2 permutes.
31246         (vect_permute_store_chain): Likewise.
31247         (vect_grouped_load_supported): Likewise.
31248         (vect_permute_load_chain): Likewise.
31250 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31252         * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
31253         * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
31254         * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
31255         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
31256         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
31257         (vect_gen_perm_mask_any): Likewise.
31259 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31261         * int-vector-builder.h: New file.
31262         * vec-perm-indices.h: Include int-vector-builder.h.
31263         (vec_perm_indices): Redefine as an int_vector_builder.
31264         (auto_vec_perm_indices): Delete.
31265         (vec_perm_builder): Redefine as a stand-alone class.
31266         (vec_perm_indices::vec_perm_indices): New function.
31267         (vec_perm_indices::clamp): Likewise.
31268         * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
31269         (vec_perm_indices::new_vector): New function.
31270         (vec_perm_indices::new_expanded_vector): Update for new
31271         vec_perm_indices class.
31272         (vec_perm_indices::rotate_inputs): New function.
31273         (vec_perm_indices::all_in_range_p): Operate directly on the
31274         encoded form, without computing elided elements.
31275         (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
31276         encoding.  Update for new vec_perm_indices class.
31277         * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
31278         the given vec_perm_builder.
31279         (expand_vec_perm_var): Update vec_perm_builder constructor.
31280         (expand_mult_highpart): Use vec_perm_builder instead of
31281         auto_vec_perm_indices.
31282         * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
31283         vec_perm_indices instead of auto_vec_perm_indices.  Use a single
31284         or double series encoding as appropriate.
31285         * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
31286         vec_perm_indices instead of auto_vec_perm_indices.
31287         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31288         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31289         (vect_permute_store_chain): Likewise.
31290         (vect_grouped_load_supported): Likewise.
31291         (vect_permute_load_chain): Likewise.
31292         (vect_shift_permute_load_chain): Likewise.
31293         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
31294         (vect_transform_slp_perm_load): Likewise.
31295         (vect_schedule_slp_instance): Likewise.
31296         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31297         (vectorizable_mask_load_store): Likewise.
31298         (vectorizable_bswap): Likewise.
31299         (vectorizable_store): Likewise.
31300         (vectorizable_load): Likewise.
31301         * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
31302         vec_perm_indices instead of auto_vec_perm_indices.  Use
31303         tree_to_vec_perm_builder to read the vector from a tree.
31304         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
31305         vec_perm_builder instead of a vec_perm_indices.
31306         (have_whole_vector_shift): Use vec_perm_builder and
31307         vec_perm_indices instead of auto_vec_perm_indices.  Leave the
31308         truncation to calc_vec_perm_mask_for_shift.
31309         (vect_create_epilog_for_reduction): Likewise.
31310         * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
31311         from auto_vec_perm_indices to vec_perm_indices.
31312         (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
31313         instead of changing individual elements.
31314         (aarch64_vectorize_vec_perm_const): Use new_vector to install
31315         the vector in d.perm.
31316         * config/arm/arm.c (expand_vec_perm_d::perm): Change
31317         from auto_vec_perm_indices to vec_perm_indices.
31318         (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
31319         instead of changing individual elements.
31320         (arm_vectorize_vec_perm_const): Use new_vector to install
31321         the vector in d.perm.
31322         * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
31323         Update vec_perm_builder constructor.
31324         (rs6000_expand_interleave): Likewise.
31325         * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
31326         (rs6000_expand_interleave): Likewise.
31328 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31330         * optabs-query.c (can_vec_perm_var_p): Check whether lowering
31331         to qimode could truncate the indices.
31332         * optabs.c (expand_vec_perm_var): Likewise.
31334 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31336         * Makefile.in (OBJS): Add vec-perm-indices.o.
31337         * vec-perm-indices.h: New file.
31338         * vec-perm-indices.c: Likewise.
31339         * target.h (vec_perm_indices): Replace with a forward class
31340         declaration.
31341         (auto_vec_perm_indices): Move to vec-perm-indices.h.
31342         * optabs.h: Include vec-perm-indices.h.
31343         (expand_vec_perm): Delete.
31344         (selector_fits_mode_p, expand_vec_perm_var): Declare.
31345         (expand_vec_perm_const): Declare.
31346         * target.def (vec_perm_const_ok): Replace with...
31347         (vec_perm_const): ...this new hook.
31348         * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
31349         (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
31350         * doc/tm.texi: Regenerate.
31351         * optabs.def (vec_perm_const): Delete.
31352         * doc/md.texi (vec_perm_const): Likewise.
31353         (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
31354         * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
31355         expand_vec_perm for constant permutation vectors.  Assert that
31356         the mode of variable permutation vectors is the integer equivalent
31357         of the mode that is being permuted.
31358         * optabs-query.h (selector_fits_mode_p): Declare.
31359         * optabs-query.c: Include vec-perm-indices.h.
31360         (selector_fits_mode_p): New function.
31361         (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
31362         is defined, instead of checking whether the vec_perm_const_optab
31363         exists.  Use targetm.vectorize.vec_perm_const instead of
31364         targetm.vectorize.vec_perm_const_ok.  Check whether the indices
31365         fit in the vector mode before using a variable permute.
31366         * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
31367         vec_perm_indices instead of an rtx.
31368         (expand_vec_perm): Replace with...
31369         (expand_vec_perm_const): ...this new function.  Take the selector
31370         as a vec_perm_indices rather than an rtx.  Also take the mode of
31371         the selector.  Update call to shift_amt_for_vec_perm_mask.
31372         Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
31373         Use vec_perm_indices::new_expanded_vector to expand the original
31374         selector into bytes.  Check whether the indices fit in the vector
31375         mode before using a variable permute.
31376         (expand_vec_perm_var): Make global.
31377         (expand_mult_highpart): Use expand_vec_perm_const.
31378         * fold-const.c: Includes vec-perm-indices.h.
31379         * tree-ssa-forwprop.c: Likewise.
31380         * tree-vect-data-refs.c: Likewise.
31381         * tree-vect-generic.c: Likewise.
31382         * tree-vect-loop.c: Likewise.
31383         * tree-vect-slp.c: Likewise.
31384         * tree-vect-stmts.c: Likewise.
31385         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
31386         Delete.
31387         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
31388         * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
31389         (aarch64_vectorize_vec_perm_const_ok): Fuse into...
31390         (aarch64_vectorize_vec_perm_const): ...this new function.
31391         (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31392         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31393         * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
31394         * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
31395         * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31396         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31397         (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
31398         into...
31399         (arm_vectorize_vec_perm_const): ...this new function.  Explicitly
31400         check for NEON modes.
31401         * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
31402         * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
31403         * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
31404         (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
31405         into...
31406         (ix86_vectorize_vec_perm_const): ...this new function.  Incorporate
31407         the old VEC_PERM_CONST conditions.
31408         * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
31409         * config/ia64/vect.md (vec_perm_const<mode>): Delete.
31410         * config/ia64/ia64.c (ia64_expand_vec_perm_const)
31411         (ia64_vectorize_vec_perm_const_ok): Merge into...
31412         (ia64_vectorize_vec_perm_const): ...this new function.
31413         * config/mips/loongson.md (vec_perm_const<mode>): Delete.
31414         * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
31415         * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
31416         * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
31417         * config/mips/mips.c (mips_expand_vec_perm_const)
31418         (mips_vectorize_vec_perm_const_ok): Merge into...
31419         (mips_vectorize_vec_perm_const): ...this new function.
31420         * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
31421         * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
31422         * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
31423         * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
31424         * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
31425         (rs6000_expand_vec_perm_const): Delete.
31426         * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
31427         Delete.
31428         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31429         (altivec_expand_vec_perm_const_le): Take each operand individually.
31430         Operate on constant selectors rather than rtxes.
31431         (altivec_expand_vec_perm_const): Likewise.  Update call to
31432         altivec_expand_vec_perm_const_le.
31433         (rs6000_expand_vec_perm_const): Delete.
31434         (rs6000_vectorize_vec_perm_const_ok): Delete.
31435         (rs6000_vectorize_vec_perm_const): New function.
31436         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
31437         an element count and rtx array.
31438         (rs6000_expand_extract_even): Update call accordingly.
31439         (rs6000_expand_interleave): Likewise.
31440         * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
31441         * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
31442         * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
31443         * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
31444         (rs6000_expand_vec_perm_const): Delete.
31445         * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
31446         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31447         (altivec_expand_vec_perm_const_le): Take each operand individually.
31448         Operate on constant selectors rather than rtxes.
31449         (altivec_expand_vec_perm_const): Likewise.  Update call to
31450         altivec_expand_vec_perm_const_le.
31451         (rs6000_expand_vec_perm_const): Delete.
31452         (rs6000_vectorize_vec_perm_const_ok): Delete.
31453         (rs6000_vectorize_vec_perm_const): New function.  Remove stray
31454         reference to the SPE evmerge intructions.
31455         (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
31456         an element count and rtx array.
31457         (rs6000_expand_extract_even): Update call accordingly.
31458         (rs6000_expand_interleave): Likewise.
31459         * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
31460         * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
31461         new function.
31462         (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
31464 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31466         * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
31467         vector mode and that that mode matches the mode of the data
31468         being permuted.
31469         (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
31470         out into expand_vec_perm_var.  Do all CONST_VECTOR handling here,
31471         directly using expand_vec_perm_1 when forcing selectors into
31472         registers.
31473         (expand_vec_perm_var): New function, split out from expand_vec_perm.
31475 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31477         * optabs-query.h (can_vec_perm_p): Delete.
31478         (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
31479         * optabs-query.c (can_vec_perm_p): Split into...
31480         (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
31481         (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
31482         particular selector is valid.
31483         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
31484         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
31485         (vect_grouped_load_supported): Likewise.
31486         (vect_shift_permute_load_chain): Likewise.
31487         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
31488         (vect_transform_slp_perm_load): Likewise.
31489         * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
31490         (vectorizable_bswap): Likewise.
31491         (vect_gen_perm_mask_checked): Likewise.
31492         * fold-const.c (fold_ternary_loc): Likewise.  Don't take
31493         implementations of variable permutation vectors into account
31494         when deciding which selector to use.
31495         * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
31496         vec_perm_const_optab is supported; instead use can_vec_perm_const_p
31497         with a false third argument.
31498         * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
31499         to test whether the constant selector is valid and can_vec_perm_var_p
31500         to test whether a variable selector is valid.
31502 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31504         * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
31505         * optabs-query.c (can_vec_perm_p): Likewise.
31506         * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
31507         instead of vec_perm_indices.
31508         * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
31509         (vect_gen_perm_mask_checked): Likewise,
31510         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
31511         (vect_gen_perm_mask_checked): Likewise,
31513 2018-01-02  Richard Sandiford  <richard.sandiford@linaro.org>
31515         * optabs-query.h (qimode_for_vec_perm): Declare.
31516         * optabs-query.c (can_vec_perm_p): Split out qimode search to...
31517         (qimode_for_vec_perm): ...this new function.
31518         * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
31520 2018-01-02  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
31522         * rtlanal.c (canonicalize_condition): Return 0 if final rtx
31523         does not have a conditional at the top.
31525 2018-01-02  Richard Biener  <rguenther@suse.de>
31527         * ipa-inline.c (big_speedup_p): Fix expression.
31529 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
31531         PR target/81616
31532         * config/i386/x86-tune-costs.h: Increase cost of integer load costs
31533         for generic 4->6.
31535 2018-01-02  Jan Hubicka  <hubicka@ucw.cz>
31537         PR target/81616
31538         Generic tuning.
31539         * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
31540         cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
31541         and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
31542         cond_taken_branch_cost 3->4.
31544 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
31546         PR tree-optimization/83581
31547         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
31548         TODO_cleanup_cfg if any changes have been made.
31550         PR middle-end/83608
31551         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
31552         convert_modes if target mode has the right side, but different mode
31553         class.
31555         PR middle-end/83609
31556         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
31557         last argument when extracting from CONCAT.  If either from_real or
31558         from_imag is NULL, use expansion through memory.  If result is not
31559         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
31560         the parts directly to inner mode, if even that fails, use expansion
31561         through memory.
31563         PR middle-end/83623
31564         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
31565         check for bswap in mode rather than HImode and use that in expand_unop
31566         too.
31568 Copyright (C) 2018 Free Software Foundation, Inc.
31570 Copying and distribution of this file, with or without modification,
31571 are permitted in any medium without royalty provided the copyright
31572 notice and this notice are preserved.