re PR tree-optimization/83581 (ICE in expand_LOOP_VECTORIZED, at internal-fn.c:2397)
[platform/upstream/gcc.git] / gcc / ChangeLog
1 2018-01-01  Jakub Jelinek  <jakub@redhat.com>
2
3         PR tree-optimization/83581
4         * tree-loop-distribution.c (pass_loop_distribution::execute): Return
5         TODO_cleanup_cfg if any changes have been made.
6
7         PR middle-end/83608
8         * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
9         convert_modes if target mode has the right side, but different mode
10         class.
11
12         PR middle-end/83609
13         * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
14         last argument when extracting from CONCAT.  If either from_real or
15         from_imag is NULL, use expansion through memory.  If result is not
16         a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
17         the parts directly to inner mode, if even that fails, use expansion
18         through memory.
19
20         PR middle-end/83623
21         * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
22         check for bswap in mode rather than HImode and use that in expand_unop
23         too.
24
25 2017-12-31  Jakub Jelinek  <jakub@redhat.com>
26
27         PR target/83536
28         * config/i386/i386.c (ix86_attribute_table): Remove excess
29         initializer for "shared" attribute.
30
31 2017-12-30  Tom de Vries  <tom@codesourcery.com>
32
33         PR libgomp/83046
34         * omp-expand.c (expand_omp_target): If in_lto_p, mark offload_funcs with
35         DECL_PRESERVE_P.
36         * lto-streamer-out.c (prune_offload_funcs): New function.  Remove
37         offload_funcs entries that no longer have a corresponding cgraph_node.
38         Mark the remaining ones as DECL_PRESERVE_P.
39         (output_lto): Call prune_offload_funcs.
40
41 2017-12-30  Jakub Jelinek  <jakub@redhat.com>
42
43         * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
44         vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>,
45         vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
46         vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
47         vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
48         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1, vpdpbusd_<mode>,
49         vpdpbusd_<mode>_mask, vpdpbusd_<mode>_maskz, vpdpbusd_<mode>_maskz_1,
50         vpdpbusds_<mode>, vpdpbusds_<mode>_mask, vpdpbusds_<mode>_maskz,
51         vpdpbusds_<mode>_maskz_1, vpdpwssd_<mode>, vpdpwssd_<mode>_mask,
52         vpdpwssd_<mode>_maskz, vpdpwssd_<mode>_maskz_1, vpdpwssds_<mode>,
53         vpdpwssds_<mode>_mask, vpdpwssds_<mode>_maskz,
54         vpdpwssds_<mode>_maskz_1, vaesdec_<mode>, vaesdeclast_<mode>,
55         vaesenc_<mode>, vpclmulqdq_<mode>,
56         avx512vl_vpshufbitqmb<mode><mask_scalar_merge_name>): Formatting fixes.
57
58 2017-12-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
59
60         * builtins.def: (_Float<N> and _Float<N>X BUILT_IN_CEIL): Add
61         _Float<N> and _Float<N>X variants for rounding built-in
62         functions.
63         (_Float<N> and _Float<N>X BUILT_IN_FLOOR): Likewise.
64         (_Float<N> and _Float<N>X BUILT_IN_NEARBYINT): Likewise.
65         (_Float<N> and _Float<N>X BUILT_IN_RINT): Likewise.
66         (_Float<N> and _Float<N>X BUILT_IN_ROUND): Likewise.
67         (_Float<N> and _Float<N>X BUILT_IN_TRUNC): Likewise.
68         * builtins.c (mathfn_built_in_2): Likewise.
69         * internal-fn.def (CEIL): Likewise.
70         (FLOOR): Likewise.
71         (NEARBYINT): Likewise.
72         (RINT): Likewise.
73         (ROUND): Likewise.
74         (TRUNC): Likewise.
75         * convert.c (convert_to_integer_1): Likewise.
76         * fold-const.c (tree_call_nonnegative_warnv_p): Likewise.
77         (integer_valued_real_call_p): Likewise.
78         * fold-const-call.c (fold_const_call_ss): Likewise.
79         * gencfn-macros.c (print_case_cfn): Change CFN and operator
80         printers to take a const char * suffix instead of a bool.
81         (print_define_operator_list): Likewise.
82         (fltall_suffixes): New list of suffixes, that include the
83         traditional suffixes as well as all of the _Float<N> and
84         _Float<N>X suffixes.
85         (main): For _Float<N> and _Float<N>X functions, emit both
86         <name>_FN and <name>_ALL variants.  The <macro>_FN variant only
87         has the _Float<N> and _Float<N>X case names or operators.  The
88         <name>_ALL variant has both the traditional and the
89         _Float<N>/_Float<N>X case names or operators.
90         * match.pd (COPYSIGN optimizations): Provide optimizations for
91         _Float<N> and _Float<N>X types where possible.
92         (MIN/MAX optimizations): Likewise.
93         (sqrt optimizations): Likewise.
94         (rounding optimizations): Likewise.
95
96 2017-12-28  Richard Sandiford  <richard.sandiford@linaro.org>
97
98         * config/powerpcspe/powerpcspe.md (ieee_128bit_negative_zero): Use
99         gen_int_mode rather than GEN_INT.
100         * config/rs6000/rs6000.md (ieee_128bit_negative_zero): Likewise.
101
102 2017-12-28  Richard Sandiford  <richard.sandiford@linaro.org>
103
104         * emit-rtl.c (gen_const_vec_series): Use valid_for_const_vector_p
105         instead of CONSTANT_P.
106         (gen_vec_series): Likewise.
107         * simplify-rtx.c (simplify_binary_operation_1): Likewise.
108
109 2017-12-28  Andreas Schwab  <schwab@linux-m68k.org>
110
111         * config/m68k/m68k.md (ashrdi3_const1, lshrdi3_const1): Add
112         CC_STATUS_INIT.
113
114 2017-12-27  Kugan Vivekanandarajah  <kuganv@linaro.org>
115
116         * config/aarch64/aarch64-simd.md (aarch64_ld1x2<VQ:mode>): New.
117         (aarch64_ld1x2<VDC:mode>): Likewise.
118         (aarch64_simd_ld1<mode>_x2): Likewise.
119         (aarch64_simd_ld1<mode>_x2): Likewise.
120         * config/aarch64/arm_neon.h (vld1_u8_x2): New.
121         (vld1_s8_x2): Likewise.
122         (vld1_u16_x2): Likewise.
123         (vld1_s16_x2): Likewise.
124         (vld1_u32_x2): Likewise.
125         (vld1_s32_x2): Likewise.
126         (vld1_u64_x2): Likewise.
127         (vld1_s64_x2): Likewise.
128         (vld1_f16_x2): Likewise.
129         (vld1_f32_x2): Likewise.
130         (vld1_f64_x2): Likewise.
131         (vld1_p8_x2): Likewise.
132         (vld1_p16_x2): Likewise.
133         (vld1_p64_x2): Likewise.
134         (vld1q_u8_x2): Likewise.
135         (vld1q_s8_x2): Likewise.
136         (vld1q_u16_x2): Likewise.
137         (vld1q_s16_x2): Likewise.
138         (vld1q_u32_x2): Likewise.
139         (vld1q_s32_x2): Likewise.
140         (vld1q_u64_x2): Likewise.
141         (vld1q_s64_x2): Likewise.
142         (vld1q_f16_x2): Likewise.
143         (vld1q_f32_x2): Likewise.
144         (vld1q_f64_x2): Likewise.
145         (vld1q_p8_x2): Likewise.
146         (vld1q_p16_x2): Likewise.
147         (vld1q_p64_x2): Likewise.
148
149 2017-12-27  Martin Liska  <mliska@suse.cz>
150
151         PR tree-optimization/83552
152         * tree-ssa-strlen.c (fold_strstr_to_strncmp): Assign result
153         of get_string_lenth to a SSA_NAME if not a GIMPLE value.
154
155 2017-12-27  Tom de Vries  <tom@codesourcery.com>
156
157         * config/nvptx/nvptx.c (nvptx_option_override): Disable
158         -gstatement-frontiers.
159
160 2017-12-26  Alexander Monakov  <amonakov@ispras.ru>
161
162         PR rtl-optimization/83513
163         * sel-sched.c (sel_rank_for_schedule): Order by non-zero usefulness
164         before priority comparison.
165
166 2017-12-25  Jakub Jelinek  <jakub@redhat.com>
167
168         PR target/83488
169         * config/i386/i386.opt (-mavx512vpopcntdq, -mmavx512bitalg): Move from
170         ix86_isa_flags2 to ix86_isa_flags.
171         * config/i386/i386-c.c (ix86_target_macros_internal): Test
172         OPTION_MASK_ISA_AVX512BITALG and OPTION_MASK_ISA_AVX512VPOPCNTDQ in
173         isa_flags rather than isa_flags2.
174         * config/i386/i386.c (ix86_target_string): Move -mavx512vpopcntdq
175         and -mavx512bitalg from isa2_opts to isa_opts.
176         (ix86_option_override_internal): Test OPTION_MASK_ISA_AVX512VPOPCNTDQ
177         in x_ix86_isa_flags_explicit rather than x_ix86_isa_flags2_explicit
178         and set it in x_ix86_isa_flags rather than x_ix86_isa_flags2.
179         Formatting fixes.
180         (def_builtin): Treat OPTION_MASK_ISA_AVX512BW or
181         OPTION_MASK_ISA_AVX512F ored with another option similarly to
182         OPTION_MASK_ISA_AVX512VL.  Even for OPTION_MASK_ISA_AVX512VL don't
183         clear it if mask is just OPTION_MASK_ISA_AVX512VL itself.
184         (ix86_expand_builtin): Don't handle OPTION_MASK_ISA_GFNI and
185         OPTION_MASK_ISA_VPCLMULQDQ specially, instead handle
186         OPTION_MASK_ISA_AVX512BW and OPTION_MASK_ISA_AVX512F that way.
187         * config/i386/i386-builtin.def: Move AVX512VPOPCNTDQ and AVX512BITALG
188         builtins from bdesc_args2 to bdesc_args section.
189         (__builtin_ia32_compressstoreuqi512_mask,
190         __builtin_ia32_compressstoreuhi512_mask,
191         __builtin_ia32_compressstoreuqi256_mask,
192         __builtin_ia32_expandloadqi512_mask,
193         __builtin_ia32_expandloadqi512_maskz,
194         __builtin_ia32_expandloadhi512_mask,
195         __builtin_ia32_expandloadhi512_maskz,
196         __builtin_ia32_compressqi512_mask, __builtin_ia32_compresshi512_mask,
197         __builtin_ia32_compressqi256_mask, __builtin_ia32_expandqi512_mask,
198         __builtin_ia32_expandqi512_maskz, __builtin_ia32_expandhi512_mask,
199         __builtin_ia32_expandhi512_maskz, __builtin_ia32_expandqi256_mask,
200         __builtin_ia32_expandqi256_maskz, __builtin_ia32_vpshrd_v32hi_mask,
201         __builtin_ia32_vpshld_v32hi_mask, __builtin_ia32_vpshrdv_v32hi_mask,
202         __builtin_ia32_vpshrdv_v32hi_maskz, __builtin_ia32_vpshldv_v32hi_mask,
203         __builtin_ia32_vpshldv_v32hi_maskz,
204         __builtin_ia32_vpopcountb_v64qi_mask,
205         __builtin_ia32_vpopcountw_v32hi_mask,
206         __builtin_ia32_vpshufbitqmb512_mask,
207         __builtin_ia32_vpshufbitqmb256_mask): Add
208         " | OPTION_MASK_ISA_AVX512BW".
209         (__builtin_ia32_expandloadqi256_mask,
210         __builtin_ia32_expandloadqi256_maskz,
211         __builtin_ia32_vpopcountb_v32qi_mask): Add
212         " | OPTION_MASK_ISA_AVX512VL | OPTION_MASK_ISA_AVX512BW".
213         (__builtin_ia32_expandloadhi256_mask,
214         __builtin_ia32_expandloadhi256_maskz,
215         __builtin_ia32_expandloadqi128_mask,
216         __builtin_ia32_expandloadqi128_maskz,
217         __builtin_ia32_expandloadhi128_mask,
218         __builtin_ia32_expandloadhi128_maskz,
219         __builtin_ia32_vpshrd_v16hi, __builtin_ia32_vpshrd_v16hi_mask,
220         __builtin_ia32_vpshrd_v8hi, __builtin_ia32_vpshrd_v8hi_mask,
221         __builtin_ia32_vpshrd_v8si, __builtin_ia32_vpshrd_v8si_mask,
222         __builtin_ia32_vpshrd_v4si, __builtin_ia32_vpshrd_v4si_mask,
223         __builtin_ia32_vpshrd_v4di, __builtin_ia32_vpshrd_v4di_mask,
224         __builtin_ia32_vpshrd_v2di, __builtin_ia32_vpshrd_v2di_mask,
225         __builtin_ia32_vpshld_v16hi, __builtin_ia32_vpshld_v16hi_mask,
226         __builtin_ia32_vpshld_v8hi, __builtin_ia32_vpshld_v8hi_mask,
227         __builtin_ia32_vpshld_v8si, __builtin_ia32_vpshld_v8si_mask,
228         __builtin_ia32_vpshld_v4si, __builtin_ia32_vpshld_v4si_mask,
229         __builtin_ia32_vpshld_v4di, __builtin_ia32_vpshld_v4di_mask,
230         __builtin_ia32_vpshld_v2di, __builtin_ia32_vpshld_v2di_mask,
231         __builtin_ia32_vpshrdv_v16hi, __builtin_ia32_vpshrdv_v16hi_mask,
232         __builtin_ia32_vpshrdv_v16hi_maskz, __builtin_ia32_vpshrdv_v8hi,
233         __builtin_ia32_vpshrdv_v8hi_mask, __builtin_ia32_vpshrdv_v8hi_maskz,
234         __builtin_ia32_vpshrdv_v8si, __builtin_ia32_vpshrdv_v8si_mask,
235         __builtin_ia32_vpshrdv_v8si_maskz, __builtin_ia32_vpshrdv_v4si,
236         __builtin_ia32_vpshrdv_v4si_mask, __builtin_ia32_vpshrdv_v4si_maskz,
237         __builtin_ia32_vpshrdv_v4di, __builtin_ia32_vpshrdv_v4di_mask,
238         __builtin_ia32_vpshrdv_v4di_maskz, __builtin_ia32_vpshrdv_v2di,
239         __builtin_ia32_vpshrdv_v2di_mask, __builtin_ia32_vpshrdv_v2di_maskz,
240         __builtin_ia32_vpshldv_v16hi, __builtin_ia32_vpshldv_v16hi_mask,
241         __builtin_ia32_vpshldv_v16hi_maskz, __builtin_ia32_vpshldv_v8hi,
242         __builtin_ia32_vpshldv_v8hi_mask, __builtin_ia32_vpshldv_v8hi_maskz,
243         __builtin_ia32_vpshldv_v8si, __builtin_ia32_vpshldv_v8si_mask,
244         __builtin_ia32_vpshldv_v8si_maskz, __builtin_ia32_vpshldv_v4si,
245         __builtin_ia32_vpshldv_v4si_mask, __builtin_ia32_vpshldv_v4si_maskz,
246         __builtin_ia32_vpshldv_v4di, __builtin_ia32_vpshldv_v4di_mask,
247         __builtin_ia32_vpshldv_v4di_maskz, __builtin_ia32_vpshldv_v2di,
248         __builtin_ia32_vpshldv_v2di_mask, __builtin_ia32_vpshldv_v2di_maskz,
249         __builtin_ia32_vpopcountb_v32qi, __builtin_ia32_vpopcountb_v16qi,
250         __builtin_ia32_vpopcountb_v16qi_mask, __builtin_ia32_vpopcountw_v16hi,
251         __builtin_ia32_vpopcountw_v16hi_mask, __builtin_ia32_vpopcountw_v8hi,
252         __builtin_ia32_vpopcountw_v8hi_mask): Add
253         " | OPTION_MASK_ISA_AVX512VL".
254         * config/i386/avx512vbmi2intrin.h (_mm512_shrdi_epi16,
255         _mm512_shrdi_epi32, _mm512_mask_shrdi_epi32, _mm512_maskz_shrdi_epi32,
256         _mm512_shrdi_epi64, _mm512_mask_shrdi_epi64, _mm512_maskz_shrdi_epi64,
257         _mm512_shldi_epi16, _mm512_shldi_epi32, _mm512_mask_shldi_epi32,
258         _mm512_maskz_shldi_epi32, _mm512_shldi_epi64, _mm512_mask_shldi_epi64,
259         _mm512_maskz_shldi_epi64, _mm512_shrdv_epi16, _mm512_shrdv_epi32,
260         _mm512_mask_shrdv_epi32, _mm512_maskz_shrdv_epi32, _mm512_shrdv_epi64,
261         _mm512_mask_shrdv_epi64, _mm512_maskz_shrdv_epi64, _mm512_shldv_epi16,
262         _mm512_shldv_epi32, _mm512_mask_shldv_epi32, _mm512_maskz_shldv_epi32,
263         _mm512_shldv_epi64, _mm512_mask_shldv_epi64,
264         _mm512_maskz_shldv_epi64): Don't require avx512bw for these intrinsics.
265         * config/i386/avx512bitalgintrin.h (_mm_bitshuffle_epi64_mask,
266         _mm_mask_bitshuffle_epi64_mask): Likewise.
267         * common/config/i386/i386-common.c
268         (OPTION_MASK_ISA_AVX512VPOPCNTDQ_SET,
269         OPTION_MASK_ISA_AVX512BITALG_SET): Or in OPTION_MASK_ISA_AVX512F_SET.
270         (OPTION_MASK_ISA_AVX512F_UNSET): Or in
271         OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET and
272         OPTION_MASK_ISA_AVX512BITALG_UNSET.
273         (OPTION_MASK_ISA2_AVX512F_UNSET,
274         OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Define.
275         (ix86_handle_option): For -mno-general-regs-only, clear from
276         ix86_isa_flags2 OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET rather than
277         just OPTION_MASK_ISA_MPX.  For -mno-sse{,2,3,4,4.1,4.2,avx,avx2} and
278         -mno-ssse3 clear OPTION_MASK_ISA2_AVX512F_UNSET bits from
279         ix86_isa_flags2.  For -mno-avx512f likewise, instead of masking
280         individually listed ISAs.  For -m{,no-}avx512{vpopcntdq,bitalg} adjust
281         for moving from ix86_isa_flags2 to ix86_isa_flags.
282
283 2017-12-23  Jakub Jelinek  <jakub@redhat.com>
284
285         PR c++/83553
286         * fold-const.c (struct contains_label_data): New type.
287         (contains_label_1): Return non-NULL even for CASE_LABEL_EXPR, unless
288         inside of a SWITCH_BODY seen during the walk.
289         (contains_label_p): Use walk_tree instead of
290         walk_tree_without_duplicates, prepare data for contains_label_1 and
291         provide own pset.
292
293 2017-12-22  Jakub Jelinek  <jakub@redhat.com>
294
295         PR debug/83547
296         * tree-iterator.c (alloc_stmt_list): Start with cleared
297         TREE_SIDE_EFFECTS regardless whether a new STATEMENT_LIST is allocated
298         or old one reused.
299
300         PR target/83488
301         * config/i386/avx512vnniintrin.h: Don't check for __AVX512F__ nor
302         enable avx512f explicitly in #pragma GCC target.
303         * config/i386/i386-builtin.def (__builtin_ia32_vpdpbusd_v8si,
304         __builtin_ia32_vpdpbusd_v8si_mask, __builtin_ia32_vpdpbusd_v8si_maskz,
305         __builtin_ia32_vpdpbusd_v4si, __builtin_ia32_vpdpbusd_v4si_mask,
306         __builtin_ia32_vpdpbusd_v4si_maskz, __builtin_ia32_vpdpbusds_v8si,
307         __builtin_ia32_vpdpbusds_v8si_mask,
308         __builtin_ia32_vpdpbusds_v8si_maskz, __builtin_ia32_vpdpbusds_v4si,
309         __builtin_ia32_vpdpbusds_v4si_mask,
310         __builtin_ia32_vpdpbusds_v4si_maskz, __builtin_ia32_vpdpwssd_v8si,
311         __builtin_ia32_vpdpwssd_v8si_mask, __builtin_ia32_vpdpwssd_v8si_maskz,
312         __builtin_ia32_vpdpwssd_v4si, __builtin_ia32_vpdpwssd_v4si_mask,
313         __builtin_ia32_vpdpwssd_v4si_maskz, __builtin_ia32_vpdpwssds_v8si,
314         __builtin_ia32_vpdpwssds_v8si_mask,
315         __builtin_ia32_vpdpwssds_v8si_maskz, __builtin_ia32_vpdpwssds_v4si,
316         __builtin_ia32_vpdpwssds_v4si_mask,
317         __builtin_ia32_vpdpwssds_v4si_maskz): Use
318         OPTION_MASK_ISA_AVX512VNNI | OPTION_MASK_ISA_AVX512VL instead of
319         just OPTION_MASK_ISA_AVX512VNNI.
320
321 2017-12-22  Martin Jambor  <mjambor@suse.cz>
322
323         PR lto/82027
324         * lto-cgraph.c (output_cgraph_opt_summary_p): Also check former
325         clones.
326
327 2017-12-22  Julia Koval  <julia.koval@intel.com>
328             Sebastian Peryt  <sebastian.peryt@intel.com>
329
330         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512BITALG_SET,
331         OPTION_MASK_ISA_AVX512BITALG_UNSET): New.
332         (ix86_handle_option): Handle -mavx512bitalg, fix 4VNNIW formatting.
333         * config.gcc: Add avx512vpopcntdqvlintrin.h and avx512bitalgintrin.h.
334         * config/i386/avx512bitalgintrin.h (_mm512_popcnt_epi8, _mm512_popcnt_epi16,
335         _mm512_mask_popcnt_epi8, _mm512_maskz_popcnt_epi8, _mm512_mask_popcnt_epi16,
336         _mm512_maskz_popcnt_epi16, _mm512_bitshuffle_epi64_mask, _mm256_popcnt_epi8,
337         _mm512_mask_bitshuffle_epi64_mask, _mm256_mask_popcnt_epi8, _mm_popcnt_epi8,
338         _mm256_maskz_popcnt_epi8, _mm_bitshuffle_epi64_mask, _mm256_popcnt_epi16,
339         _mm_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
340         _mm256_mask_bitshuffle_epi64_mask, _mm_popcnt_epi16, _mm_maskz_popcnt_epi8,
341         _mm256_mask_popcnt_epi16, _mm256_maskz_popcnt_epi16, _mm_mask_popcnt_epi8,
342         _mm_mask_popcnt_epi16, _mm_maskz_popcnt_epi16): New intrinsics.
343         * config/i386/avx512vpopcntdqvlintrin.h (_mm_popcnt_epi32, _mm_popcnt_epi64,
344         _mm_mask_popcnt_epi32, _mm_maskz_popcnt_epi32, _mm256_popcnt_epi32,
345         _mm256_mask_popcnt_epi32, _mm256_maskz_popcnt_epi32, _mm_mask_popcnt_epi64,
346         _mm_maskz_popcnt_epi64, _mm256_popcnt_epi64, _mm256_mask_popcnt_epi64,
347         _mm256_maskz_popcnt_epi64): New intrinsics.
348         * config/i386/cpuid.h (bit_AVX512BITALG): New bit.
349         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mavx512bitalg.
350         * config/i386/i386-builtin-types.def (V64QI_FTYPE_V64QI, V64QI_FTYPE_V64QI,
351         V4DI_FTYPE_V4DI, UHI_FTYPE_V2DI_V2DI_UHI, USI_FTYPE_V4DI_V4DI_USI,
352         V4SI_FTYPE_V4SI_V4SI_UHI, V8SI_FTYPE_V8SI_V8SI_UHI): New types.
353         * config/i386/i386-builtin.def (__builtin_ia32_vpopcountq_v4di,
354         __builtin_ia32_vpopcountq_v4di_mask, __builtin_ia32_vpopcountq_v2di,
355         __builtin_ia32_vpopcountq_v2di_mask, __builtin_ia32_vpopcountd_v4si,
356         __builtin_ia32_vpopcountd_v4si_mask, __builtin_ia32_vpopcountd_v8si,
357         __builtin_ia32_vpopcountd_v8si_mask, __builtin_ia32_vpopcountb_v64qi,
358         __builtin_ia32_vpopcountb_v64qi_mask, __builtin_ia32_vpopcountb_v32qi,
359         __builtin_ia32_vpopcountb_v32qi_mask, __builtin_ia32_vpopcountb_v16qi,
360         __builtin_ia32_vpopcountb_v16qi_mask, __builtin_ia32_vpopcountw_v32hi,
361         __builtin_ia32_vpopcountw_v32hi_mask, __builtin_ia32_vpopcountw_v16hi,
362         __builtin_ia32_vpopcountw_v16hi_mask, __builtin_ia32_vpopcountw_v8hi,
363         __builtin_ia32_vpopcountw_v8hi_mask, __builtin_ia32_vpshufbitqmb128_mask,
364         __builtin_ia32_vpshufbitqmb256_mask,
365         __builtin_ia32_vpshufbitqmb512_mask): New builtins.
366         * config/i386/i386-c.c (__AVX512BITALG__): New.
367         * config/i386/i386.c (isa2_opts): Add -mavx512bitalg.
368         (ix86_valid_target_attribute_inner_p): Ditto.
369         (ix86_expand_args_builtin): Handle new types.
370         * config/i386/i386.h (TARGET_AVX512BITALG, TARGET_AVX512BITALG_P): New.
371         * config/i386/i386.opt: Add -mavx512bitalg.
372         * config/i386/immintrin.h: Add avx512vpopcntdqvlintrin.h and
373         avx512bitalgintrin.h.
374         * config/i386/sse.md (VI48_AVX512VLBW): New iterator.
375         (vpopcount<mode><mask_name>): Add more types.
376         (avx512vl_vpshufbitqmb<mode><mask_scalar_merge_name>): New.
377         * doc/invoke.texi: Add -mavx512bitalg and -mavx512vpopcntdq.
378
379 2017-12-22  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
380
381         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VNNI_SET):
382         Or in OPTION_MASK_ISA_AVX512F_SET.
383         (OPTION_MASK_ISA_AVX512F_UNSET): Or in
384         OPTION_MASK_ISA_AVX512VNNI_UNSET.
385         (ix86_handle_option): Adjust for
386         OPTION_MASK_ISA_AVX512VNNI_*SET being in ix86_isa_flags.
387         * config/i386/i386-builtin.def: Move VNNI builtins from ARGS2
388         section to ARGS.
389         * config/i386/i386-c.c: Check for OPTION_MASK_ISA_AVX512VNNI in
390         isa_flag instead of isa_flag2.
391         * config/i386/i386.c (ix86_target_string): Move -mavx512vnni from
392         isa_opts2 to isa_opts.
393         * config/i386/i386.opt (mavx512vnni): Move from ix86_isa_flags2
394         to ix86_isa_flags.
395
396 2017-12-22  Mike Stump  <mikestump@comcast.net>
397             Eric Botcazou  <ebotcazou@adacore.com>
398
399         * doc/extend.texi (Loop-Specific Pragmas): Document pragma GCC unroll.
400
401 2017-12-21  Jakub Jelinek  <jakub@redhat.com>
402
403         PR middle-end/83487
404         * config/i386/i386.c (ix86_function_arg_boundary): Return
405         PARM_BOUNDARY for TYPE_EMPTY_P types.
406
407         PR c/83448
408         * gimple-ssa-sprintf.c (maybe_warn): Don't call set_caret_index
409         if navail is >= dir.len.
410
411 2017-12-21  Steve Ellcey  <sellcey@cavium.com>
412
413         * config/aarch64/t-aarch64-linux (MULTILIB_OSDIRNAMES): Fix
414         triplet for ilp32.
415
416 2017-12-21  Jakub Jelinek  <jakub@redhat.com>
417
418         PR rtl-optimization/80747
419         PR rtl-optimization/83512
420         * cfgrtl.c (force_nonfallthru_and_redirect): When splitting
421         succ edge from ENTRY, copy partition from e->dest to the newly
422         created bb.
423         * bb-reorder.c (reorder_basic_blocks_simple): If last_tail is
424         ENTRY, use BB_PARTITION of its successor block as current_partition.
425         Don't copy partition when splitting succ edge from ENTRY.
426
427         PR tree-optimization/83523
428         * tree-ssa-math-opts.c (is_widening_mult_p): Return false if
429         for INTEGER_TYPE TYPE_OVERFLOW_TRAPS.
430         (convert_mult_to_fma): Likewise.
431
432         PR tree-optimization/83521
433         * tree-ssa-phiopt.c (factor_out_conditional_conversion): Use
434         gimple_build_assign without code on result of
435         fold_build1 (VIEW_CONVERT_EXPR, ...), as it might not create
436         a VIEW_CONVERT_EXPR.
437
438 2017-12-21  Andrew Pinski  <apinski@cavium.com>
439             Steve Ellcey  <sellcey@cavium.com>
440
441         * config/aarch64/t-aarch64-linux (MULTILIB_OSDIRNAMES): Handle
442         multi-arch for ilp32.
443
444 2017-12-21  Uros Bizjak  <ubizjak@gmail.com>
445
446         PR target/83467
447         * config/i386/i386.md (*ashl<mode>3_mask): Add operand
448         constraints to operand 2.
449         (*ashl<mode>3_mask_1): Ditto.
450         (*<shift_insn><mode>3_mask): Ditto.
451         (*<shift_insn><mode>3_mask_1): Ditto.
452         (*<rotate_insn><mode>3_mask): Ditto.
453         (*<rotate_insn><mode>3_mask_1): Ditto.
454
455 2017-12-21  Alexandre Oliva  <aoliva@redhat.com>
456
457         * reorg.c (make_return_insns): Reemit each insn with its own location.
458
459 2017-12-21  James Greenhalgh  <james.greenhalgh@arm.com>
460
461         * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
462         generation for cases where splatting a value is not useful.
463         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
464         across a vec_duplicate and a paradoxical subreg forming a vector
465         mode to a vec_concat.
466
467 2017-12-21  James Greenhalgh  <james.greenhalgh@arm.com>
468
469         * combine.c (simplify_set): Do not transform subregs to zero_extends
470         if the destination is not a scalar int mode.
471
472 2017-12-21  Eric Botcazou  <ebotcazou@adacore.com>
473
474         PR c++/82872
475         * convert.c (convert_to_integer_1) <POINTER_TYPE>: Do not return the
476         shared zero if the input has overflowed.
477
478 2017-12-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
479
480         * config/arm/driver-arm.c (arm_cpu_table): Specify dotprod
481         support for Cortex-A55 and Cortex-A75.
482
483 2017-12-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
484
485         * common/config/arm/arm-common.c (compare_opt_names): Add function
486         comment.  Use strcmp instead of manual loop.
487
488 2017-12-21  Martin Liska  <mliska@suse.cz>
489
490         PR gcov-profile/83509
491         * gcov-dump.c (dump_gcov_file): Do not read info about
492         support_unexecuted_blocks for gcda files.
493
494 2017-12-21  Jakub Jelinek  <jakub@redhat.com>
495
496         PR rtl-optimization/82973
497         * emit-rtl.h (valid_for_const_vec_duplicate_p): Rename to ...
498         (valid_for_const_vector_p): ... this.
499         * emit-rtl.c (valid_for_const_vec_duplicate_p): Rename to ...
500         (valid_for_const_vector_p): ... this.  Adjust function comment.
501         (gen_vec_duplicate): Adjust caller.
502         * optabs.c (expand_vector_broadcast): Likewise.
503         * simplify-rtx.c (simplify_const_unary_operation): Don't optimize into
504         CONST_VECTOR if some element isn't simplified valid_for_const_vector_p
505         constant.
506         (simplify_const_binary_operation): Likewise.  Use CONST_FIXED_P macro
507         instead of GET_CODE == CONST_FIXED.
508         (simplify_subreg): Use CONST_FIXED_P macro instead of
509         GET_CODE == CONST_FIXED.
510
511         PR target/83488
512         * config/i386/i386.c (ix86_target_string): Move -mavx512vbmi2 and
513         -mshstk entries from isa_opts2 to isa_opts and -mhle, -mmovbe,
514         -mclzero and -mmwaitx entries from isa_opts to isa_opts2.
515         (ix86_option_override_internal): Adjust for
516         OPTION_MASK_ISA_{HLE,MOVBE,CLZERO,MWAITX} moving to ix86_isa_flags2
517         and OPTION_MASK_ISA_SHSTK moving to ix86_isa_flags.
518         (BDESC_VERIFYS): Remove SPECIAL_ARGS2 related checks.
519         (ix86_init_mmx_sse_builtins): Remove bdesc_special_args2 handling.
520         Use def_builtin2 instead of def_builtin for OPTION_MASK_ISA_MWAITX
521         and OPTION_MASK_ISA_CLZERO builtins.  Use def_builtin instead of
522         def_builtin2 for CET builtins.
523         (ix86_expand_builtin): Remove bdesc_special_args2 handling.  Fix
524         up formatting in IX86_BUILTIN_RDPID code.
525         * config/i386/i386-builtin.def: Move VBMI2 builtins from SPECIAL_ARGS2
526         section to SPECIAL_ARGS and from ARGS2 section to ARGS.
527         * config/i386/i386.opt (mavx512vbmi2, mshstk): Move from
528         ix86_isa_flags2 to ix86_isa_flags.
529         (mhle, mmovbe, mclzero, mmwaitx): Move from ix86_isa_flags to
530         ix86_isa_flags2.
531         * config/i386/i386-c.c (ix86_target_macros_internal): Check for
532         OPTION_MASK_ISA_{CLZERO,MWAITX} in isa_flag2 instead of isa_flag.
533         Check for OPTION_MASK_ISA_{SHSTK,AVX512VBMI2} in isa_flag instead
534         of isa_flag2.
535         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VBMI2_SET):
536         Or in OPTION_MASK_ISA_AVX512F_SET.
537         (OPTION_MASK_ISA_AVX512F_UNSET): Or in
538         OPTION_MASK_ISA_AVX512VBMI2_UNSET.
539         (ix86_handle_option): Adjust for
540         OPTION_MASK_ISA_{SHSTK,AVX512VBMI2}_*SET being in ix86_isa_flags
541         and OPTION_MASK_ISA_{MOVBE,MWAITX,CLZERO}_*SET in ix86_isa_flags2.
542
543 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
544             Alan Hayward  <alan.hayward@arm.com>
545             David Sherwood  <david.sherwood@arm.com>
546
547         * tree-data-ref.h (prune_runtime_alias_test_list): Take the
548         factor as a poly_uint64 rather than an unsigned HOST_WIDE_INT.
549         * tree-data-ref.c (prune_runtime_alias_test_list): Likewise.
550         Track polynomial offsets.
551
552 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
553             Alan Hayward  <alan.hayward@arm.com>
554             David Sherwood  <david.sherwood@arm.com>
555
556         * tree-vect-data-refs.c (vect_compute_data_ref_alignment):
557         Treat drb->init as a poly_int.  Fail if its misalignment wrt
558         vector_alignment isn't known.
559
560 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
561             Alan Hayward  <alan.hayward@arm.com>
562             David Sherwood  <david.sherwood@arm.com>
563
564         * tree-vectorizer.h (_loop_vec_info): Add a versioning_threshold
565         field.
566         (LOOP_VINFO_VERSIONING_THRESHOLD): New macro
567         (vect_loop_versioning): Take the loop versioning threshold as a
568         separate parameter.
569         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
570         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
571         versioning_threshold.
572         (vect_analyze_loop_2): Compute the loop versioning threshold
573         whenever loop versioning is needed, and store it in the new
574         field rather than combining it with the cost model threshold.
575         (vect_transform_loop): Update call to vect_loop_versioning.
576         Try to combine the loop versioning and cost thresholds here.
577
578 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
579             Alan Hayward  <alan.hayward@arm.com>
580             David Sherwood  <david.sherwood@arm.com>
581
582         * tree-ssa-loop-ivopts.h (strip_offset): Return the offset as
583         poly_uint64_pod rather than an unsigned HOST_WIDE_INT.
584         * tree-loop-distribution.c (classify_builtin_st): Update accordingly.
585         * tree-ssa-loop-ivopts.c (iv_use::addr_offset): Change from
586         an unsigned HOST_WIDE_INT to a poly_uint64_pod.
587         (group_compare_offset): Update accordingly.
588         (split_small_address_groups_p): Likewise.
589         (record_use): Take addr_offset as a poly_uint64 rather than
590         an unsigned HOST_WIDE_INT.
591         (strip_offset): Return the offset as a poly_uint64 rather than
592         an unsigned HOST_WIDE_INT.
593         (record_group_use, split_address_groups): Track polynomial offsets.
594         (add_iv_candidate_for_use): Likewise.
595         (addr_offset_valid_p): Take the offset as a poly_int64 rather
596         than a HOST_WIDE_INT.
597         (strip_offset_1): Return the offset as a poly_int64 rather than
598         a HOST_WIDE_INT.
599
600 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
601             Alan Hayward  <alan.hayward@arm.com>
602             David Sherwood  <david.sherwood@arm.com>
603
604         * tree.h (get_binfo_at_offset): Take the offset as a poly_int64
605         rather than a HOST_WIDE_INT.
606         * tree.c (get_binfo_at_offset): Likewise.
607
608 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
609             Alan Hayward  <alan.hayward@arm.com>
610             David Sherwood  <david.sherwood@arm.com>
611
612         * ipa-prop.h (build_ref_for_offset): Take the offset as a poly_int64
613         rather than a HOST_WIDE_INT.
614         * tree-sra.c (build_ref_for_offset): Likewise.
615
616 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
617             Alan Hayward  <alan.hayward@arm.com>
618             David Sherwood  <david.sherwood@arm.com>
619
620         * fold-const.h (mem_ref_offset): Return a poly_offset_int rather
621         than an offset_int.
622         * tree.c (mem_ref_offset): Likewise.
623         (build_simple_mem_ref_loc): Treat MEM_REF offsets as poly_ints.
624         * builtins.c (get_object_alignment_2): Likewise.
625         * expr.c (get_inner_reference, expand_expr_real_1): Likewise.
626         * gimple-fold.c (get_base_constructor): Likewise.
627         * gimple-ssa-strength-reduction.c (restructure_reference): Likewise.
628         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref):
629         Likewise.
630         * ipa-polymorphic-call.c
631         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Likewise.
632         * ipa-prop.c (compute_complex_assign_jump_func): Likewise.
633         (get_ancestor_addr_info): Likewise.
634         * ipa-param-manipulation.c (ipa_get_adjustment_candidate): Likewise.
635         * match.pd: Likewise.
636         * tree-data-ref.c (dr_analyze_innermost): Likewise.
637         * tree-dfa.c (get_addr_base_and_unit_offset_1): Likewise.
638         * tree-eh.c (tree_could_trap_p): Likewise.
639         * tree-object-size.c (addr_object_size): Likewise.
640         * tree-ssa-address.c (copy_ref_info): Likewise.
641         * tree-ssa-alias.c (indirect_ref_may_alias_decl_p): Likewise.
642         (indirect_refs_may_alias_p): Likewise.
643         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.
644         * tree-ssa.c (maybe_rewrite_mem_ref_base): Likewise.
645         (non_rewritable_mem_ref_base): Likewise.
646         * tree-vect-data-refs.c (vect_check_gather_scatter): Likewise.
647         * tree-vrp.c (vrp_prop::check_array_ref): Likewise.
648         * varasm.c (decode_addr_const): Likewise.
649
650 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
651             Alan Hayward  <alan.hayward@arm.com>
652             David Sherwood  <david.sherwood@arm.com>
653
654         * gimple-ssa-stor-merging.c (find_bswap_or_nop_load): Track polynomial
655         offsets for MEM_REFs.
656
657 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
658             Alan Hayward  <alan.hayward@arm.com>
659             David Sherwood  <david.sherwood@arm.com>
660
661         * tree-ssanames.h (adjust_ptr_info_misalignment): Take the increment
662         as a poly_uint64 rather than an unsigned int.
663         * tree-ssanames.c (adjust_ptr_info_misalignment): Likewise.
664
665 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
666             Alan Hayward  <alan.hayward@arm.com>
667             David Sherwood  <david.sherwood@arm.com>
668
669         * varasm.c (addr_const::offset): Change from HOST_WIDE_INT
670         to poly_int64.
671         (decode_addr_const): Update accordingly.
672
673 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
674             Alan Hayward  <alan.hayward@arm.com>
675             David Sherwood  <david.sherwood@arm.com>
676
677         * tree.h (bit_field_size, bit_field_offset): New functions.
678         * hsa-gen.c (gen_hsa_addr): Use them.
679         * tree-ssa-forwprop.c (simplify_bitfield_ref): Likewise.
680         (simplify_vector_constructor): Likewise.
681         * tree-ssa-sccvn.c (copy_reference_ops_from_ref): Likewise.
682         * tree-cfg.c (verify_expr): Require the sizes and offsets of a
683         BIT_FIELD_REF to be poly_uint64s rather than uhwis.
684         * fold-const.c (fold_ternary_loc): Protect tree_to_uhwi with
685         tree_fits_uhwi_p.
686
687 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
688             Alan Hayward  <alan.hayward@arm.com>
689             David Sherwood  <david.sherwood@arm.com>
690
691         * expr.h (emit_group_load, emit_group_load_into_temps)
692         (emit_group_store): Take the size as a poly_int64 rather than an int.
693         * expr.c (emit_group_load_1, emit_group_load): Likewise.
694         (emit_group_load_into_temp, emit_group_store): Likewise.
695
696 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
697             Alan Hayward  <alan.hayward@arm.com>
698             David Sherwood  <david.sherwood@arm.com>
699
700         * ira-int.h (ira_spilled_reg_stack_slot::width): Change from
701         an unsigned int to a poly_uint64.
702         * ira.h (ira_reuse_stack_slot, ira_mark_new_stack_slot): Take the
703         sizes as poly_uint64s rather than unsigned ints.
704         * ira-color.c (ira_reuse_stack_slot, ira_mark_new_stack_slot):
705         Likewise.
706
707 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
708             Alan Hayward  <alan.hayward@arm.com>
709             David Sherwood  <david.sherwood@arm.com>
710
711         * lra-constraints.c (emit_inc): Change inc_amount from an int
712         to a poly_int64.
713
714 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
715             Alan Hayward  <alan.hayward@arm.com>
716             David Sherwood  <david.sherwood@arm.com>
717
718         * cfgexpand.c (stack_var::size): Change from a HOST_WIDE_INT
719         to a poly_uint64.
720         (add_stack_var, stack_var_cmp, partition_stack_vars)
721         (dump_stack_var_partition): Update accordingly.
722         (alloc_stack_frame_space): Take the size as a poly_int64 rather
723         than a HOST_WIDE_INT.
724         (expand_stack_vars, expand_one_stack_var_1): Handle polynomial sizes.
725         (defer_stack_allocation, estimated_stack_frame_size): Likewise.
726         (account_stack_vars, expand_one_var): Likewise.  Return a poly_uint64
727         rather than a HOST_WIDE_INT.
728
729 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
730             Alan Hayward  <alan.hayward@arm.com>
731             David Sherwood  <david.sherwood@arm.com>
732
733         * target.def (return_pops_args): Treat both the input and output
734         sizes as poly_int64s rather than HOST_WIDE_INTS.
735         * targhooks.h (default_return_pops_args): Update accordingly.
736         * targhooks.c (default_return_pops_args): Likewise.
737         * doc/tm.texi: Regenerate.
738         * emit-rtl.h (incoming_args): Change pops_args, size and
739         outgoing_args_size from int to poly_int64_pod.
740         * function.h (expr_status): Change x_pending_stack_adjust and
741         x_stack_pointer_delta from int to poly_int64.
742         (args_size::constant): Change from HOST_WIDE_INT to poly_int64.
743         (ARGS_SIZE_RTX): Update accordingly.
744         * calls.c (highest_outgoing_arg_in_use): Change from int to
745         unsigned int.
746         (stack_usage_watermark, stored_args_watermark): New variables.
747         (stack_region_maybe_used_p, mark_stack_region_used): New functions.
748         (emit_call_1): Change the stack_size and rounded_stack_size
749         parameters from HOST_WIDE_INT to poly_int64.  Track n_popped
750         as a poly_int64.
751         (save_fixed_argument_area): Check stack_usage_watermark.
752         (initialize_argument_information): Change old_pending_adj from
753         a HOST_WIDE_INT * to a poly_int64_pod *.
754         (compute_argument_block_size): Return the size as a poly_int64
755         rather than an int.
756         (finalize_must_preallocate): Track polynomial argument sizes.
757         (compute_argument_addresses): Likewise.
758         (internal_arg_pointer_based_exp): Track polynomial offsets.
759         (mem_overlaps_already_clobbered_arg_p): Rename to...
760         (mem_might_overlap_already_clobbered_arg_p): ...this and take the
761         size as a poly_uint64 rather than an unsigned HOST_WIDE_INT.
762         Check stored_args_used_watermark.
763         (load_register_parameters): Update accordingly.
764         (check_sibcall_argument_overlap_1): Likewise.
765         (combine_pending_stack_adjustment_and_call): Take the unadjusted
766         args size as a poly_int64 rather than an int.  Return a bool
767         indicating whether the optimization was possible and return
768         the new adjustment by reference.
769         (check_sibcall_argument_overlap): Track polynomail argument sizes.
770         Update stored_args_watermark.
771         (can_implement_as_sibling_call_p): Handle polynomial argument sizes.
772         (expand_call): Likewise.  Maintain stack_usage_watermark and
773         stored_args_watermark.  Update calls to
774         combine_pending_stack_adjustment_and_call.
775         (emit_library_call_value_1): Handle polynomial argument sizes.
776         Call stack_region_maybe_used_p and mark_stack_region_used.
777         Maintain stack_usage_watermark.
778         (store_one_arg): Likewise.  Update call to
779         mem_overlaps_already_clobbered_arg_p.
780         * config/arm/arm.c (arm_output_function_prologue): Add a cast to
781         HOST_WIDE_INT.
782         * config/avr/avr.c (avr_outgoing_args_size): Likewise.
783         * config/microblaze/microblaze.c (microblaze_function_prologue):
784         Likewise.
785         * config/cr16/cr16.c (cr16_return_pops_args): Update for new
786         TARGET_RETURN_POPS_ARGS interface.
787         (cr16_compute_frame, cr16_initial_elimination_offset): Add casts
788         to HOST_WIDE_INT.
789         * config/ft32/ft32.c (ft32_compute_frame): Likewise.
790         * config/i386/i386.c (ix86_return_pops_args): Update for new
791         TARGET_RETURN_POPS_ARGS interface.
792         (ix86_expand_split_stack_prologue): Add a cast to HOST_WIDE_INT.
793         * config/moxie/moxie.c (moxie_compute_frame): Likewise.
794         * config/m68k/m68k.c (m68k_return_pops_args): Update for new
795         TARGET_RETURN_POPS_ARGS interface.
796         * config/vax/vax.c (vax_return_pops_args): Likewise.
797         * config/pa/pa.h (STACK_POINTER_OFFSET): Add a cast to poly_int64.
798         (EXIT_IGNORE_STACK): Update reference to crtl->outgoing_args_size.
799         * config/arm/arm.h (CALLER_INTERWORKING_SLOT_SIZE): Likewise.
800         * config/powerpcspe/aix.h (STACK_DYNAMIC_OFFSET): Likewise.
801         * config/powerpcspe/darwin.h (STACK_DYNAMIC_OFFSET): Likewise.
802         * config/powerpcspe/powerpcspe.h (STACK_DYNAMIC_OFFSET): Likewise.
803         * config/rs6000/aix.h (STACK_DYNAMIC_OFFSET): Likewise.
804         * config/rs6000/darwin.h (STACK_DYNAMIC_OFFSET): Likewise.
805         * config/rs6000/rs6000.h (STACK_DYNAMIC_OFFSET): Likewise.
806         * dojump.h (saved_pending_stack_adjust): Change x_pending_stack_adjust
807         and x_stack_pointer_delta from int to poly_int64.
808         * dojump.c (do_pending_stack_adjust): Update accordingly.
809         * explow.c (allocate_dynamic_stack_space): Handle polynomial
810         stack_pointer_deltas.
811         * function.c (STACK_DYNAMIC_OFFSET): Add a cast to poly_int64.
812         (pad_to_arg_alignment): Track polynomial offsets.
813         (assign_parm_find_stack_rtl): Likewise.
814         (assign_parms, locate_and_pad_parm): Handle polynomial argument sizes.
815         * toplev.c (output_stack_usage): Update reference to
816         current_function_pushed_stack_size.
817
818 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
819             Alan Hayward  <alan.hayward@arm.com>
820             David Sherwood  <david.sherwood@arm.com>
821
822         * function.c (in_arg_offset, var_offset, dynamic_offset)
823         (out_arg_offset, cfa_offset): Change from int to poly_int64.
824         (instantiate_new_reg): Return the new offset as a poly_int64_pod
825         rather than a HOST_WIDE_INT.
826         (instantiate_virtual_regs_in_rtx): Track polynomial offsets.
827         (instantiate_virtual_regs_in_insn): Likewise.
828
829 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
830             Alan Hayward  <alan.hayward@arm.com>
831             David Sherwood  <david.sherwood@arm.com>
832
833         * rtl.h (get_args_size, add_args_size_note): New functions.
834         (find_args_size_adjust): Return a poly_int64 rather than a
835         HOST_WIDE_INT.
836         (fixup_args_size_notes): Likewise.  Make the same change to the
837         end_args_size parameter.
838         * rtlanal.c (get_args_size, add_args_size_note): New functions.
839         * builtins.c (expand_builtin_trap): Use add_args_size_note.
840         * calls.c (emit_call_1): Likewise.
841         * explow.c (adjust_stack_1): Likewise.
842         * cfgcleanup.c (old_insns_match_p): Update use of
843         find_args_size_adjust.
844         * combine.c (distribute_notes): Track polynomial arg sizes.
845         * dwarf2cfi.c (dw_trace_info): Change beg_true_args_size,
846         end_true_args_size, beg_delay_args_size and end_delay_args_size
847         from HOST_WIDE_INT to poly_int64.
848         (add_cfi_args_size): Take the args_size as a poly_int64 rather
849         than a HOST_WIDE_INT.
850         (notice_args_size, notice_eh_throw, maybe_record_trace_start)
851         (maybe_record_trace_start_abnormal, scan_trace, connect_traces): Track
852         polynomial arg sizes.
853         * emit-rtl.c (try_split): Use get_args_size.
854         * recog.c (peep2_attempt): Likewise.
855         * reload1.c (reload_as_needed): Likewise.
856         * expr.c (find_args_size_adjust): Return the adjustment as a
857         poly_int64 rather than a HOST_WIDE_INT.
858         (fixup_args_size_notes): Change end_args_size from a HOST_WIDE_INT
859         to a poly_int64 and change the return type in the same way.
860         (emit_single_push_insn): Track polynomial arg sizes.
861
862 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
863             Alan Hayward  <alan.hayward@arm.com>
864             David Sherwood  <david.sherwood@arm.com>
865
866         * expr.h (push_block, emit_push_insn): Change the "extra" parameter
867         from HOST_WIDE_INT to poly_int64.
868         * expr.c (push_block, emit_push_insn): Likewise.
869
870 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
871             Alan Hayward  <alan.hayward@arm.com>
872             David Sherwood  <david.sherwood@arm.com>
873
874         * function.h (frame_space): Change start and length from HOST_WIDE_INT
875         to poly_int64.
876         (get_frame_size): Return the size as a poly_int64 rather than a
877         HOST_WIDE_INT.
878         (frame_offset_overflow): Take the offset as a poly_int64 rather
879         than a HOST_WIDE_INT.
880         (assign_stack_local_1, assign_stack_local, assign_stack_temp_for_type)
881         (assign_stack_temp): Likewise for the size.
882         * function.c (get_frame_size): Return a poly_int64 rather than
883         a HOST_WIDE_INT.
884         (frame_offset_overflow): Take the offset as a poly_int64 rather
885         than a HOST_WIDE_INT.
886         (try_fit_stack_local): Take the start, length and size as poly_int64s
887         rather than HOST_WIDE_INTs.  Return the offset as a poly_int64_pod
888         rather than a HOST_WIDE_INT.
889         (add_frame_space): Take the start and end as poly_int64s rather than
890         HOST_WIDE_INTs.
891         (assign_stack_local_1, assign_stack_local, assign_stack_temp_for_type)
892         (assign_stack_temp): Likewise for the size.
893         (temp_slot): Change size, base_offset and full_size from HOST_WIDE_INT
894         to poly_int64.
895         (find_temp_slot_from_address): Handle polynomial offsets.
896         (combine_temp_slots): Likewise.
897         * emit-rtl.h (rtl_data::x_frame_offset): Change from HOST_WIDE_INT
898         to poly_int64.
899         * cfgexpand.c (alloc_stack_frame_space): Return the offset as a
900         poly_int64 rather than a HOST_WIDE_INT.
901         (expand_one_stack_var_at): Take the offset as a poly_int64 rather
902         than a HOST_WIDE_INT.
903         (expand_stack_vars, expand_one_stack_var_1, expand_used_vars): Handle
904         polynomial frame offsets.
905         * config/m32r/m32r-protos.h (m32r_compute_frame_size): Take the size
906         as a poly_int64 rather than an int.
907         * config/m32r/m32r.c (m32r_compute_frame_size): Likewise.
908         * config/v850/v850-protos.h (compute_frame_size): Likewise.
909         * config/v850/v850.c (compute_frame_size): Likewise.
910         * config/xtensa/xtensa-protos.h (compute_frame_size): Likewise.
911         * config/xtensa/xtensa.c (compute_frame_size): Likewise.
912         * config/pa/pa-protos.h (pa_compute_frame_size): Likewise.
913         * config/pa/pa.c (pa_compute_frame_size): Likewise.
914         * explow.h (get_dynamic_stack_base): Take the offset as a poly_int64
915         rather than a HOST_WIDE_INT.
916         * explow.c (get_dynamic_stack_base): Likewise.
917         * final.c (final_start_function): Use the constant lower bound
918         of the frame size for -Wframe-larger-than.
919         * ira.c (do_reload): Adjust for new get_frame_size return type.
920         * lra.c (lra): Likewise.
921         * reload1.c (reload): Likewise.
922         * config/avr/avr.c (avr_asm_function_end_prologue): Likewise.
923         * config/pa/pa.h (EXIT_IGNORE_STACK): Likewise.
924         * rtlanal.c (get_initial_register_offset): Return the offset as
925         a poly_int64 rather than a HOST_WIDE_INT.
926
927 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
928             Alan Hayward  <alan.hayward@arm.com>
929             David Sherwood  <david.sherwood@arm.com>
930
931         * reload1.c (elim_table): Change initial_offset, offset and
932         previous_offset from HOST_WIDE_INT to poly_int64_pod.
933         (offsets_at): Change the target array's element type from
934         HOST_WIDE_INT to poly_int64_pod.
935         (set_label_offsets, eliminate_regs_1, eliminate_regs_in_insn)
936         (elimination_costs_in_insn, update_eliminable_offsets)
937         (verify_initial_elim_offsets, set_offsets_for_label)
938         (init_eliminable_invariants): Update after above changes.
939
940 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
941             Alan Hayward  <alan.hayward@arm.com>
942             David Sherwood  <david.sherwood@arm.com>
943
944         * reload.h (reload::inc): Change from an int to a poly_int64_pod.
945         * reload.c (combine_reloads, debug_reload_to_stream): Likewise.
946         (decomposition): Change start and end from HOST_WIDE_INT
947         to poly_int64_pod.
948         (decompose, immune_p): Update accordingly.
949         (find_inc_amount): Return a poly_int64 rather than an int.
950         * reload1.c (inc_for_reload): Take the inc_amount as a poly_int64
951         rather than an int.
952
953 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
954             Alan Hayward  <alan.hayward@arm.com>
955             David Sherwood  <david.sherwood@arm.com>
956
957         * tree.h (get_inner_reference): Return the bitsize and bitpos
958         as poly_int64_pods rather than HOST_WIDE_INT.
959         * fold-const.h (ptr_difference_const): Return the pointer difference
960         as a poly_int64_pod rather than a HOST_WIDE_INT.
961         * expr.c (get_inner_reference): Return the bitsize and bitpos
962         as poly_int64_pods rather than HOST_WIDE_INT.
963         (expand_expr_addr_expr_1, expand_expr_real_1): Track polynomial
964         offsets and sizes.
965         * fold-const.c (make_bit_field_ref): Take the bitpos as a poly_int64
966         rather than a HOST_WIDE_INT.  Update call to get_inner_reference.
967         (optimize_bit_field_compare): Update call to get_inner_reference.
968         (decode_field_reference): Likewise.
969         (fold_unary_loc): Track polynomial offsets and sizes.
970         (split_address_to_core_and_offset): Return the bitpos as a
971         poly_int64_pod rather than a HOST_WIDE_INT.
972         (ptr_difference_const): Likewise for the pointer difference.
973         * asan.c (instrument_derefs): Track polynomial offsets and sizes.
974         * config/mips/mips.c (r10k_safe_mem_expr_p): Likewise.
975         * dbxout.c (dbxout_expand_expr): Likewise.
976         * dwarf2out.c (loc_list_for_address_of_addr_expr_of_indirect_ref)
977         (loc_list_from_tree_1, fortran_common): Likewise.
978         * gimple-laddress.c (pass_laddress::execute): Likewise.
979         * gimple-ssa-store-merging.c (find_bswap_or_nop_load): Likewise.
980         * gimplify.c (gimplify_scan_omp_clauses): Likewise.
981         * simplify-rtx.c (delegitimize_mem_from_attrs): Likewise.
982         * tree-affine.c (tree_to_aff_combination): Likewise.
983         (get_inner_reference_aff): Likewise.
984         * tree-data-ref.c (split_constant_offset_1): Likewise.
985         (dr_analyze_innermost): Likewise.
986         * tree-scalar-evolution.c (interpret_rhs_expr): Likewise.
987         * tree-sra.c (ipa_sra_check_caller): Likewise.
988         * tree-vect-data-refs.c (vect_check_gather_scatter): Likewise.
989         * ubsan.c (maybe_instrument_pointer_overflow): Likewise.
990         (instrument_bool_enum_load, instrument_object_size): Likewise.
991         * gimple-ssa-strength-reduction.c (slsr_process_ref): Update call
992         to get_inner_reference.
993         * hsa-gen.c (gen_hsa_addr): Likewise.
994         * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Likewise.
995         * tsan.c (instrument_expr): Likewise.
996         * match.pd: Update call to ptr_difference_const.
997
998 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
999             Alan Hayward  <alan.hayward@arm.com>
1000             David Sherwood  <david.sherwood@arm.com>
1001
1002         * fold-const.c (fold_comparison): Track sizes and offsets as
1003         poly_int64s rather than HOST_WIDE_INTs when folding address
1004         comparisons.
1005
1006 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
1007             Alan Hayward  <alan.hayward@arm.com>
1008             David Sherwood  <david.sherwood@arm.com>
1009
1010         * expr.h (get_bit_range): Return the bitstart and bitend as
1011         poly_uint64s rather than unsigned HOST_WIDE_INTs.  Return the bitpos
1012         as a poly_int64 rather than a HOST_WIDE_INT.
1013         * expr.c (get_bit_range): Likewise.
1014         (expand_assignment): Update call accordingly.
1015         * fold-const.c (optimize_bit_field_compare): Likewise.
1016
1017 2017-12-21  Richard Sandiford  <richard.sandiford@linaro.org>
1018             Alan Hayward  <alan.hayward@arm.com>
1019             David Sherwood  <david.sherwood@arm.com>
1020
1021         * config/aarch64/aarch64-protos.h (aarch64_addr_query_type): New enum.
1022         (aarch64_legitimate_address_p): Use it instead of an rtx code,
1023         as an optional final parameter.
1024         * config/aarch64/aarch64.c (aarch64_classify_address): Likewise.
1025         (aarch64_legitimate_address_p): Likewise.
1026         (aarch64_print_address_internal): Take an aarch64_addr_query_type
1027         instead of an rtx code.
1028         (aarch64_address_valid_for_prefetch_p): Update calls accordingly.
1029         (aarch64_legitimate_address_hook_p): Likewise.
1030         (aarch64_print_ldpstp_address): Likewise.
1031         (aarch64_print_operand_address): Likewise.
1032         (aarch64_address_cost): Likewise.
1033         * config/aarch64/constraints.md (Uml, Umq, Ump, Utq): Likewise.
1034         * config/aarch64/predicates.md (aarch64_mem_pair_operand): Likewise.
1035         (aarch64_mem_pair_lanes_operand): Likewise.
1036
1037 2017-12-20  Richard Biener  <rguenther@suse.de>
1038
1039         * tree-ssa-dom.c (dom_opt_dom_walker::optimize_stmt): Call
1040         update_stmt_if_modified.
1041
1042 2017-12-20  Wilco Dijkstra  <wdijkstr@arm.com>
1043
1044         PR tree-optimization/83491
1045         * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Check for SSA_NAME
1046         before walking uses.  Improve coding style and comments.
1047
1048 2017-12-20  Tom de Vries  <tom@codesourcery.com>
1049
1050         * gimple-fold.c (fold_internal_goacc_dim): Simplify.
1051
1052 2017-12-20  Jakub Jelinek  <jakub@redhat.com>
1053
1054         PR ipa/83506
1055         * ipa-fnsummary.c (pass_data_ipa_free_fn_summary): Use 0 for
1056         todo_flags_finish.
1057         (pass_ipa_free_fn_summary): Add small_p private data member,
1058         initialize to false in the ctor.
1059         (pass_ipa_free_fn_summary::clone,
1060         pass_ipa_free_fn_summary::set_pass_param,
1061         pass_ipa_free_fn_summary::gate): New methods.
1062         (pass_ipa_free_fn_summary::execute): Return TODO_remove_functions
1063         | TODO_dump_symtab if small_p.
1064         * passes.def: Add true parm for the existing pass_ipa_free_fn_summary
1065         entry and add another instance of the pass with false parm after
1066         ipa-pure-const.
1067         * ipa-pure-const.c (pass_ipa_pure_const): Don't call
1068         ipa_free_fn_summary here.
1069
1070 2017-12-20  Paolo Carlini  <paolo.carlini@oracle.com>
1071
1072         * gimplify.c (gimplify_return_expr): Remove dead error_mark_node check.
1073
1074 2017-12-20  Martin Sebor  <msebor@redhat.com>
1075
1076         PR testsuite/83131
1077         * builtins.c (expand_builtin_strlen): Use get_callee_fndecl.
1078         (expand_builtin_strcmp): Call maybe_warn_nonstring_arg.
1079         (expand_builtin_strncmp): Same.
1080
1081 2017-12-20  Alexandre Oliva  <aoliva@redhat.com>
1082
1083         PR bootstrap/83396
1084         * cfgexpand.c (label_rtx_for_bb): Revert SFN changes that
1085         allowed debug stmts before labels.
1086         (expand_gimple_basic_block): Likewise.
1087         * gimple-iterator.c (gimple_find_edge_insert_loc): Likewise.
1088         * gimple-iterator.h (gsi_after_labels): Likewise.
1089         * tree-cfgcleanup (remove_forwarder_block): Likewise, but
1090         rename reused variable, and simplify using gsi_move_before.
1091         * tree-ssa-tail-merge.c (find_duplicate): Likewise.
1092         * tree-cfg.c (make_edges, cleanup_dead_labels): Likewise.
1093         (gimple_can_merge_blocks_p, verify_gimple_in_cfg): Likewise.
1094         (gimple_verify_flow_info, gimple_block_label): Likewise.
1095         (make_blocks): Move debug markers after adjacent labels.
1096         * cfgrtl.c (skip_insns_after_block): Revert SFN changes that
1097         allowed debug insns outside blocks.
1098         * df-scan.c (df_insn_delete): Likewise.
1099         * lra-constraints.c (update_ebb_live_info): Likewise.
1100         * var-tracking.c (get_first_insn, vt_emit_notes): Likewise.
1101         (vt_initialize, delete_vta_debug_insns): Likewise.
1102         (reemit_marker_as_note): Drop BB parm.  Adjust callers.
1103
1104 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1105             Alan Hayward  <alan.hayward@arm.com>
1106             David Sherwood  <david.sherwood@arm.com>
1107
1108         * poly-int-types.h (round_down_to_byte_boundary): New macro.
1109         (round_up_to_byte_boundary): Likewise.
1110         * expr.h (get_bit_range): Add temporary shim.
1111         * gimple-ssa-store-merging.c (store_operand_info): Change the
1112         bitsize, bitpos, bitregion_start and bitregion_end fields from
1113         unsigned HOST_WIDE_INT to poly_uint64.
1114         (merged_store_group): Likewise load_align_base.
1115         (compatible_load_p, compatible_load_p): Update accordingly.
1116         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
1117         (split_group, imm_store_chain_info::output_merged_store): Likewise.
1118         (mem_valid_for_store_merging): Return the bitsize, bitpos,
1119         bitregion_start and bitregion_end as poly_uint64s rather than
1120         unsigned HOST_WIDE_INTs.  Track polynomial offsets internally.
1121         (handled_load): Take the bitsize, bitpos,
1122         bitregion_start and bitregion_end as poly_uint64s rather than
1123         unsigned HOST_WIDE_INTs.
1124         (pass_store_merging::process_store): Update call to
1125         mem_valid_for_store_merging.
1126
1127 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1128             Alan Hayward  <alan.hayward@arm.com>
1129             David Sherwood  <david.sherwood@arm.com>
1130
1131         * builtins.c (get_object_alignment_2): Track polynomial offsets
1132         and sizes.  Update the alignment handling.
1133
1134 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1135             Alan Hayward  <alan.hayward@arm.com>
1136             David Sherwood  <david.sherwood@arm.com>
1137
1138         * tree.h (get_inner_reference): Add a version that returns the
1139         offset and size as poly_int64_pods rather than HOST_WIDE_INTs.
1140         * cfgexpand.c (expand_debug_expr): Track polynomial offsets.  Simply
1141         the case in which bitpos is not associated with the first byte.
1142
1143 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1144             Alan Hayward  <alan.hayward@arm.com>
1145             David Sherwood  <david.sherwood@arm.com>
1146
1147         * tree-affine.h (get_inner_reference_aff): Return the size as a
1148         poly_widest_int.
1149         * tree-affine.c (get_inner_reference_aff): Likewise.
1150         * tree-data-ref.c (dr_may_alias_p): Update accordingly.
1151         * tree-ssa-loop-im.c (mem_refs_may_alias_p): Likewise.
1152
1153 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1154             Alan Hayward  <alan.hayward@arm.com>
1155             David Sherwood  <david.sherwood@arm.com>
1156
1157         * fold-const.c (pointer_may_wrap_p): Take the offset as a
1158         HOST_WIDE_INT rather than a poly_int64.
1159
1160 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1161             Alan Hayward  <alan.hayward@arm.com>
1162             David Sherwood  <david.sherwood@arm.com>
1163
1164         * gimple-ssa-store-merging.c (symbolic_number::bytepos): Change from
1165         HOST_WIDE_INT to poly_int64_pod.
1166         (perform_symbolic_merge): Update accordingly.
1167         (bswap_replace): Likewise.
1168
1169 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1170             Alan Hayward  <alan.hayward@arm.com>
1171             David Sherwood  <david.sherwood@arm.com>
1172
1173         * tree-affine.h (aff_tree::offset): Change from widest_int
1174         to poly_widest_int.
1175         (wide_int_ext_for_comb): Delete.
1176         (aff_combination_const, aff_comb_cannot_overlap_p): Take the
1177         constants as poly_widest_int rather than widest_int.
1178         (aff_combination_constant_multiple_p): Return the multiplier
1179         as a poly_widest_int.
1180         (aff_combination_zero_p, aff_combination_singleton_var_p): Handle
1181         polynomial offsets.
1182         * tree-affine.c (wide_int_ext_for_comb): Make original widest_int
1183         version static and add an overload for poly_widest_int.
1184         (aff_combination_const, aff_combination_add_cst)
1185         (wide_int_constant_multiple_p, aff_comb_cannot_overlap_p): Take
1186         the constants as poly_widest_int rather than widest_int.
1187         (tree_to_aff_combination): Generalize INTEGER_CST case to
1188         poly_int_tree_p.
1189         (aff_combination_to_tree): Track offsets as poly_widest_ints.
1190         (aff_combination_add_product, aff_combination_mult): Handle
1191         polynomial offsets.
1192         (aff_combination_constant_multiple_p): Return the multiplier
1193         as a poly_widest_int.
1194         * tree-predcom.c (determine_offset): Return the offset as a
1195         poly_widest_int.
1196         (split_data_refs_to_components, suitable_component_p): Update
1197         accordingly.
1198         (valid_initializer_p): Update call to
1199         aff_combination_constant_multiple_p.
1200         * tree-ssa-address.c (addr_to_parts): Handle polynomial offsets.
1201         * tree-ssa-loop-ivopts.c (get_address_cost_ainc): Take the step
1202         as a poly_int64 rather than a HOST_WIDE_INT.
1203         (get_address_cost): Handle polynomial offsets.
1204         (iv_elimination_compare_lt): Likewise.
1205         (rewrite_use_nonlinear_expr): Likewise.
1206
1207 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1208             Alan Hayward  <alan.hayward@arm.com>
1209             David Sherwood  <david.sherwood@arm.com>
1210
1211         * tree-dfa.h (get_addr_base_and_unit_offset_1): Return the offset
1212         as a poly_int64_pod rather than a HOST_WIDE_INT.
1213         (get_addr_base_and_unit_offset): Likewise.
1214         * tree-dfa.c (get_addr_base_and_unit_offset_1): Likewise.
1215         (get_addr_base_and_unit_offset): Likewise.
1216         * doc/match-and-simplify.texi: Change off from HOST_WIDE_INT
1217         to poly_int64 in example.
1218         * fold-const.c (fold_binary_loc): Update call to
1219         get_addr_base_and_unit_offset.
1220         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
1221         (maybe_canonicalize_mem_ref_addr): Likewise.
1222         (gimple_fold_stmt_to_constant_1): Likewise.
1223         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref):
1224         Likewise.
1225         * ipa-param-manipulation.c (ipa_modify_call_arguments): Likewise.
1226         * match.pd: Likewise.
1227         * omp-low.c (lower_omp_target): Likewise.
1228         * tree-sra.c (build_ref_for_offset): Likewise.
1229         (build_debug_ref_for_model): Likewise.
1230         * tree-ssa-address.c (maybe_fold_tmr): Likewise.
1231         * tree-ssa-alias.c (ao_ref_init_from_ptr_and_size): Likewise.
1232         * tree-ssa-ccp.c (optimize_memcpy): Likewise.
1233         * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Likewise.
1234         (constant_pointer_difference): Likewise.
1235         * tree-ssa-loop-niter.c (expand_simple_operations): Likewise.
1236         * tree-ssa-phiopt.c (jump_function_from_stmt): Likewise.
1237         * tree-ssa-pre.c (create_component_ref_by_pieces_1): Likewise.
1238         * tree-ssa-sccvn.c (vn_reference_fold_indirect): Likewise.
1239         (vn_reference_maybe_forwprop_address, vn_reference_lookup_3): Likewise.
1240         (set_ssa_val_to): Likewise.
1241         * tree-ssa-strlen.c (get_addr_stridx, addr_stridxptr)
1242         (maybe_diag_stxncpy_trunc): Likewise.
1243         * tree-vrp.c (vrp_prop::check_array_ref): Likewise.
1244         * tree.c (build_simple_mem_ref_loc): Likewise.
1245         (array_at_struct_end_p): Likewise.
1246
1247 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1248             Alan Hayward  <alan.hayward@arm.com>
1249             David Sherwood  <david.sherwood@arm.com>
1250
1251         * tree-dfa.h (get_ref_base_and_extent): Return the base, size and
1252         max_size as poly_int64_pods rather than HOST_WIDE_INTs.
1253         (get_ref_base_and_extent_hwi): Declare.
1254         * tree-dfa.c (get_ref_base_and_extent): Return the base, size and
1255         max_size as poly_int64_pods rather than HOST_WIDE_INTs.
1256         (get_ref_base_and_extent_hwi): New function.
1257         * cfgexpand.c (expand_debug_expr): Update call to
1258         get_ref_base_and_extent.
1259         * dwarf2out.c (add_var_loc_to_decl): Likewise.
1260         * gimple-fold.c (get_base_constructor): Return the offset as a
1261         poly_int64_pod rather than a HOST_WIDE_INT.
1262         (fold_const_aggregate_ref_1): Track polynomial sizes and offsets.
1263         * ipa-polymorphic-call.c
1264         (ipa_polymorphic_call_context::set_by_invariant)
1265         (extr_type_from_vtbl_ptr_store): Track polynomial offsets.
1266         (ipa_polymorphic_call_context::ipa_polymorphic_call_context)
1267         (check_stmt_for_type_change): Use get_ref_base_and_extent_hwi
1268         rather than get_ref_base_and_extent.
1269         (ipa_polymorphic_call_context::get_dynamic_type): Likewise.
1270         * ipa-prop.c (ipa_load_from_parm_agg, compute_complex_assign_jump_func)
1271         (get_ancestor_addr_info, determine_locally_known_aggregate_parts):
1272         Likewise.
1273         * ipa-param-manipulation.c (ipa_get_adjustment_candidate): Update
1274         call to get_ref_base_and_extent.
1275         * tree-sra.c (create_access, get_access_for_expr): Likewise.
1276         * tree-ssa-alias.c (ao_ref_base, aliasing_component_refs_p)
1277         (stmt_kills_ref_p): Likewise.
1278         * tree-ssa-dce.c (mark_aliased_reaching_defs_necessary_1): Likewise.
1279         * tree-ssa-scopedtables.c (avail_expr_hash, equal_mem_array_ref_p):
1280         Likewise.
1281         * tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
1282         Use get_ref_base_and_extent_hwi rather than get_ref_base_and_extent
1283         when calling native_encode_expr.
1284         * tree-ssa-structalias.c (get_constraint_for_component_ref): Update
1285         call to get_ref_base_and_extent.
1286         (do_structure_copy): Use get_ref_base_and_extent_hwi rather than
1287         get_ref_base_and_extent.
1288         * var-tracking.c (track_expr_p): Likewise.
1289
1290 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1291             Alan Hayward  <alan.hayward@arm.com>
1292             David Sherwood  <david.sherwood@arm.com>
1293
1294         * ipa-param-manipulation.h (ipa_parm_adjustment::offset): Change from
1295         HOST_WIDE_INT to poly_int64_pod.
1296         * ipa-param-manipulation.c (ipa_modify_call_arguments): Track
1297         polynomail parameter offsets.
1298
1299 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1300             Alan Hayward  <alan.hayward@arm.com>
1301             David Sherwood  <david.sherwood@arm.com>
1302
1303         * gengtype.c (main): Handle poly_int64_pod.
1304         * dwarf2out.h (dw_cfi_oprnd_cfa_loc): New dw_cfi_oprnd_type.
1305         (dw_cfi_oprnd::dw_cfi_cfa_loc): New field.
1306         (dw_cfa_location::offset, dw_cfa_location::base_offset): Change
1307         from HOST_WIDE_INT to poly_int64_pod.
1308         * dwarf2cfi.c (queued_reg_save::cfa_offset): Likewise.
1309         (copy_cfa): New function.
1310         (lookup_cfa_1): Use the cached dw_cfi_cfa_loc, if it exists.
1311         (cfi_oprnd_equal_p): Handle dw_cfi_oprnd_cfa_loc.
1312         (cfa_equal_p, dwarf2out_frame_debug_adjust_cfa)
1313         (dwarf2out_frame_debug_cfa_offset, dwarf2out_frame_debug_expr)
1314         (initial_return_save): Treat offsets as poly_ints.
1315         (def_cfa_0): Likewise.  Cache the CFA in dw_cfi_cfa_loc if either
1316         offset is nonconstant.
1317         (reg_save): Take the offset as a poly_int64.  Fall back to
1318         DW_CFA_expression for nonconstant offsets.
1319         (queue_reg_save): Take the offset as a poly_int64.
1320         * dwarf2out.c (dw_cfi_oprnd2_desc): Handle DW_CFA_def_cfa_expression.
1321
1322 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1323             Alan Hayward  <alan.hayward@arm.com>
1324             David Sherwood  <david.sherwood@arm.com>
1325
1326         * rtl.h (operand_subword, operand_subword_force): Take the offset
1327         as a poly_uint64 an unsigned int.
1328         * emit-rtl.c (operand_subword, operand_subword_force): Likewise.
1329
1330 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1331             Alan Hayward  <alan.hayward@arm.com>
1332             David Sherwood  <david.sherwood@arm.com>
1333
1334         * doc/rtl.texi: Update documentation of SUBREG_BYTE.  Document the
1335         'p' format code.  Use INT_LIST rather than SUBREG as the example of
1336         a code with an XINT and an XEXP.  Remove the implication that
1337         accessing an rtx field using XINT is expected to work.
1338         * rtl.def (SUBREG): Change format from "ei" to "ep".
1339         * rtl.h (rtunion::rt_subreg): New field.
1340         (XCSUBREG): New macro.
1341         (SUBREG_BYTE): Use it.
1342         (subreg_shape): Change offset from an unsigned int to a poly_uint16.
1343         Update constructor accordingly.
1344         (subreg_shape::operator ==): Update accordingly.
1345         (subreg_shape::unique_id): Return an unsigned HOST_WIDE_INT rather
1346         than an unsigned int.
1347         (subreg_lsb, subreg_lowpart_offset, subreg_highpart_offset): Return
1348         a poly_uint64 rather than an unsigned int.
1349         (subreg_lsb_1): Likewise.  Take the offset as a poly_uint64 rather
1350         than an unsigned int.
1351         (subreg_size_offset_from_lsb, subreg_size_lowpart_offset)
1352         (subreg_size_highpart_offset): Return a poly_uint64 rather than
1353         an unsigned int.  Take the sizes as poly_uint64s.
1354         (subreg_offset_from_lsb): Return a poly_uint64 rather than
1355         an unsigned int.  Take the shift as a poly_uint64 rather than
1356         an unsigned int.
1357         (subreg_regno_offset, subreg_offset_representable_p): Take the offset
1358         as a poly_uint64 rather than an unsigned int.
1359         (simplify_subreg_regno): Likewise.
1360         (byte_lowpart_offset): Return the memory offset as a poly_int64
1361         rather than an int.
1362         (subreg_memory_offset): Likewise.  Take the subreg offset as a
1363         poly_uint64 rather than an unsigned int.
1364         (simplify_subreg, simplify_gen_subreg, subreg_get_info)
1365         (gen_rtx_SUBREG, validate_subreg): Take the subreg offset as a
1366         poly_uint64 rather than an unsigned int.
1367         * rtl.c (rtx_format): Describe 'p' in comment.
1368         (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Handle 'p'.
1369         * emit-rtl.c (validate_subreg, gen_rtx_SUBREG): Take the subreg
1370         offset as a poly_uint64 rather than an unsigned int.
1371         (byte_lowpart_offset): Return the memory offset as a poly_int64
1372         rather than an int.
1373         (subreg_memory_offset): Likewise.  Take the subreg offset as a
1374         poly_uint64 rather than an unsigned int.
1375         (subreg_size_lowpart_offset, subreg_size_highpart_offset): Take the
1376         mode sizes as poly_uint64s rather than unsigned ints.  Return a
1377         poly_uint64 rather than an unsigned int.
1378         (subreg_lowpart_p): Treat subreg offsets as poly_ints.
1379         (copy_insn_1): Handle 'p'.
1380         * rtlanal.c (set_noop_p): Treat subregs offsets as poly_uint64s.
1381         (subreg_lsb_1): Take the subreg offset as a poly_uint64 rather than
1382         an unsigned int.  Return the shift in the same way.
1383         (subreg_lsb): Return the shift as a poly_uint64 rather than an
1384         unsigned int.
1385         (subreg_size_offset_from_lsb): Take the sizes and shift as
1386         poly_uint64s rather than unsigned ints.  Return the offset as
1387         a poly_uint64.
1388         (subreg_get_info, subreg_regno_offset, subreg_offset_representable_p)
1389         (simplify_subreg_regno): Take the offset as a poly_uint64 rather than
1390         an unsigned int.
1391         * rtlhash.c (add_rtx): Handle 'p'.
1392         * genemit.c (gen_exp): Likewise.
1393         * gengenrtl.c (type_from_format, gendef): Likewise.
1394         * gensupport.c (subst_pattern_match, get_alternatives_number)
1395         (collect_insn_data, alter_predicate_for_insn, alter_constraints)
1396         (subst_dup): Likewise.
1397         * gengtype.c (adjust_field_rtx_def): Likewise.
1398         * genrecog.c (find_operand, find_matching_operand, validate_pattern)
1399         (match_pattern_2): Likewise.
1400         (rtx_test::SUBREG_FIELD): New rtx_test::kind_enum.
1401         (rtx_test::subreg_field): New function.
1402         (operator ==, safe_to_hoist_p, transition_parameter_type)
1403         (print_nonbool_test, print_test): Handle SUBREG_FIELD.
1404         * genattrtab.c (attr_rtx_1): Say that 'p' is deliberately not handled.
1405         * genpeep.c (match_rtx): Likewise.
1406         * print-rtl.c (print_poly_int): Include if GENERATOR_FILE too.
1407         (rtx_writer::print_rtx_operand): Handle 'p'.
1408         (print_value): Handle SUBREG.
1409         * read-rtl.c (apply_int_iterator): Likewise.
1410         (rtx_reader::read_rtx_operand): Handle 'p'.
1411         * alias.c (rtx_equal_for_memref_p): Likewise.
1412         * cselib.c (rtx_equal_for_cselib_1, cselib_hash_rtx): Likewise.
1413         * caller-save.c (replace_reg_with_saved_mem): Treat subreg offsets
1414         as poly_ints.
1415         * calls.c (expand_call): Likewise.
1416         * combine.c (combine_simplify_rtx, expand_field_assignment): Likewise.
1417         (make_extraction, gen_lowpart_for_combine): Likewise.
1418         * loop-invariant.c (hash_invariant_expr_1, invariant_expr_equal_p):
1419         Likewise.
1420         * cse.c (remove_invalid_subreg_refs): Take the offset as a poly_uint64
1421         rather than an unsigned int.  Treat subreg offsets as poly_ints.
1422         (exp_equiv_p): Handle 'p'.
1423         (hash_rtx_cb): Likewise.  Treat subreg offsets as poly_ints.
1424         (equiv_constant, cse_insn): Treat subreg offsets as poly_ints.
1425         * dse.c (find_shift_sequence): Likewise.
1426         * dwarf2out.c (rtl_for_decl_location): Likewise.
1427         * expmed.c (extract_low_bits): Likewise.
1428         * expr.c (emit_group_store, undefined_operand_subword_p): Likewise.
1429         (expand_expr_real_2): Likewise.
1430         * final.c (alter_subreg): Likewise.
1431         (leaf_renumber_regs_insn): Handle 'p'.
1432         * function.c (assign_parm_find_stack_rtl, assign_parm_setup_stack):
1433         Treat subreg offsets as poly_ints.
1434         * fwprop.c (forward_propagate_and_simplify): Likewise.
1435         * ifcvt.c (noce_emit_move_insn, noce_emit_cmove): Likewise.
1436         * ira.c (get_subreg_tracking_sizes): Likewise.
1437         * ira-conflicts.c (go_through_subreg): Likewise.
1438         * ira-lives.c (process_single_reg_class_operands): Likewise.
1439         * jump.c (rtx_renumbered_equal_p): Likewise.  Handle 'p'.
1440         * lower-subreg.c (simplify_subreg_concatn): Take the subreg offset
1441         as a poly_uint64 rather than an unsigned int.
1442         (simplify_gen_subreg_concatn, resolve_simple_move): Treat
1443         subreg offsets as poly_ints.
1444         * lra-constraints.c (operands_match_p): Handle 'p'.
1445         (match_reload, curr_insn_transform): Treat subreg offsets as poly_ints.
1446         * lra-spills.c (assign_mem_slot): Likewise.
1447         * postreload.c (move2add_valid_value_p): Likewise.
1448         * recog.c (general_operand, indirect_operand): Likewise.
1449         * regcprop.c (copy_value, maybe_mode_change): Likewise.
1450         (copyprop_hardreg_forward_1): Likewise.
1451         * reginfo.c (simplifiable_subregs_hasher::hash, simplifiable_subregs)
1452         (record_subregs_of_mode): Likewise.
1453         * rtlhooks.c (gen_lowpart_general, gen_lowpart_if_possible): Likewise.
1454         * reload.c (operands_match_p): Handle 'p'.
1455         (find_reloads_subreg_address): Treat subreg offsets as poly_ints.
1456         * reload1.c (alter_reg, choose_reload_regs): Likewise.
1457         (compute_reload_subreg_offset): Likewise, and return an poly_int64.
1458         * simplify-rtx.c (simplify_truncation, simplify_binary_operation_1):
1459         (test_vector_ops_duplicate): Treat subreg offsets as poly_ints.
1460         (simplify_const_poly_int_tests<N>::run): Likewise.
1461         (simplify_subreg, simplify_gen_subreg): Take the subreg offset as
1462         a poly_uint64 rather than an unsigned int.
1463         * valtrack.c (debug_lowpart_subreg): Likewise.
1464         * var-tracking.c (var_lowpart): Likewise.
1465         (loc_cmp): Handle 'p'.
1466
1467 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1468             Alan Hayward  <alan.hayward@arm.com>
1469             David Sherwood  <david.sherwood@arm.com>
1470
1471         * ira.c (get_subreg_tracking_sizes): New function.
1472         (init_live_subregs): Take an integer size rather than a register.
1473         (build_insn_chain): Use get_subreg_tracking_sizes.  Update calls
1474         to init_live_subregs.
1475
1476 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1477             Alan Hayward  <alan.hayward@arm.com>
1478             David Sherwood  <david.sherwood@arm.com>
1479
1480         * expr.c (store_constructor_field): Change bitsize from a
1481         unsigned HOST_WIDE_INT to a poly_uint64 and bitpos from a
1482         HOST_WIDE_INT to a poly_int64.
1483         (store_constructor): Change size from a HOST_WIDE_INT to
1484         a poly_int64.
1485         (store_field): Likewise bitsize and bitpos.
1486
1487 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1488             Alan Hayward  <alan.hayward@arm.com>
1489             David Sherwood  <david.sherwood@arm.com>
1490
1491         * expmed.h (store_bit_field): Change bitregion_start and
1492         bitregion_end from unsigned HOST_WIDE_INT to poly_uint64.
1493         * expmed.c (adjust_bit_field_mem_for_reg, strict_volatile_bitfield_p)
1494         (store_bit_field_1, store_integral_bit_field, store_bit_field)
1495         (store_fixed_bit_field, store_split_bit_field): Likewise.
1496         * expr.c (store_constructor_field, store_field): Likewise.
1497         (optimize_bitfield_assignment_op): Likewise.  Make the same change
1498         to bitsize and bitpos.
1499         * machmode.h (bit_field_mode_iterator): Change m_bitregion_start
1500         and m_bitregion_end from HOST_WIDE_INT to poly_int64.  Make the
1501         same change in the constructor arguments.
1502         (get_best_mode): Change bitregion_start and bitregion_end from
1503         unsigned HOST_WIDE_INT to poly_uint64.
1504         * stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
1505         Change bitregion_start and bitregion_end from HOST_WIDE_INT to
1506         poly_int64.
1507         (bit_field_mode_iterator::next_mode): Update for new types
1508         of m_bitregion_start and m_bitregion_end.
1509         (get_best_mode): Change bitregion_start and bitregion_end from
1510         unsigned HOST_WIDE_INT to poly_uint64.
1511
1512 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1513             Alan Hayward  <alan.hayward@arm.com>
1514             David Sherwood  <david.sherwood@arm.com>
1515
1516         * rtl.h (simplify_gen_subreg): Add a temporary overload that
1517         accepts poly_uint64 offsets.
1518         * expmed.h (extract_bit_field): Take bitsize and bitnum as
1519         poly_uint64s rather than unsigned HOST_WIDE_INTs.
1520         * expmed.c (lowpart_bit_field_p): Likewise.
1521         (extract_bit_field_as_subreg): New function, split out from...
1522         (extract_bit_field_1): ...here.  Take bitsize and bitnum as
1523         poly_uint64s rather than unsigned HOST_WIDE_INTs.  For vector
1524         extractions, check that BITSIZE matches the size of the extracted
1525         value and that BITNUM is an exact multiple of that size.
1526         If all else fails, try forcing the value into memory if
1527         BITNUM is variable, and adjusting the address so that the
1528         offset is constant.  Split the part that can only handle constant
1529         bitsize and bitnum out into...
1530         (extract_integral_bit_field): ...this new function.
1531         (extract_bit_field): Take bitsize and bitnum as poly_uint64s
1532         rather than unsigned HOST_WIDE_INTs.
1533
1534 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1535             Alan Hayward  <alan.hayward@arm.com>
1536             David Sherwood  <david.sherwood@arm.com>
1537
1538         * expmed.h (store_bit_field): Take bitsize and bitnum as
1539         poly_uint64s rather than unsigned HOST_WIDE_INTs.
1540         * expmed.c (simple_mem_bitfield_p): Likewise.  Add a parameter
1541         that returns the byte size.
1542         (store_bit_field_1): Take bitsize and bitnum as
1543         poly_uint64s rather than unsigned HOST_WIDE_INTs.  Update call
1544         to simple_mem_bitfield_p.  Split the part that can only handle
1545         constant bitsize and bitnum out into...
1546         (store_integral_bit_field): ...this new function.
1547         (store_bit_field): Take bitsize and bitnum as poly_uint64s rather
1548         than unsigned HOST_WIDE_INTs.
1549         (extract_bit_field_1): Update call to simple_mem_bitfield_p.
1550
1551 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1552             Alan Hayward  <alan.hayward@arm.com>
1553             David Sherwood  <david.sherwood@arm.com>
1554
1555         * lra-int.h (lra_reg): Change offset from int to poly_int64.
1556         (lra_insn_recog_data): Change sp_offset from HOST_WIDE_INT
1557         to poly_int64.
1558         (lra_eliminate_regs_1, eliminate_regs_in_insn): Change
1559         update_sp_offset from a HOST_WIDE_INT to a poly_int64.
1560         (lra_update_reg_val_offset, lra_reg_val_equal_p): Take the
1561         offset as a poly_int64 rather than an int.
1562         * lra-assigns.c (find_hard_regno_for_1): Handle poly_int64 offsets.
1563         (setup_live_pseudos_and_spill_after_risky_transforms): Likewise.
1564         * lra-constraints.c (equiv_address_substitution): Track offsets
1565         as poly_int64s.
1566         (emit_inc): Check poly_int_rtx_p instead of CONST_INT_P.
1567         (curr_insn_transform): Handle the new form of sp_offset.
1568         * lra-eliminations.c (lra_elim_table): Change previous_offset
1569         and offset from HOST_WIDE_INT to poly_int64.
1570         (print_elim_table, update_reg_eliminate): Update accordingly.
1571         (self_elim_offsets): Change from HOST_WIDE_INT to poly_int64_pod.
1572         (get_elimination): Update accordingly.
1573         (form_sum): Check poly_int_rtx_p instead of CONST_INT_P.
1574         (lra_eliminate_regs_1, eliminate_regs_in_insn): Change
1575         update_sp_offset from a HOST_WIDE_INT to a poly_int64.  Handle
1576         poly_int64 offsets generally.
1577         (curr_sp_change): Change from HOST_WIDE_INT to poly_int64.
1578         (mark_not_eliminable, init_elimination): Update accordingly.
1579         (remove_reg_equal_offset_note): Return a bool and pass the new
1580         offset back by pointer as a poly_int64.
1581         * lra-remat.c (change_sp_offset): Take sp_offset as a poly_int64
1582         rather than a HOST_WIDE_INT.
1583         (do_remat): Track offsets poly_int64s.
1584         * lra.c (lra_update_insn_recog_data, setup_sp_offset): Likewise.
1585
1586 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1587             Alan Hayward  <alan.hayward@arm.com>
1588             David Sherwood  <david.sherwood@arm.com>
1589
1590         * rtl.h (mem_attrs): Add a default constructor.  Change size and
1591         offset from HOST_WIDE_INT to poly_int64.
1592         * emit-rtl.h (set_mem_offset, set_mem_size, adjust_address_1)
1593         (adjust_automodify_address_1, set_mem_attributes_minus_bitpos)
1594         (widen_memory_access): Take the sizes and offsets as poly_int64s
1595         rather than HOST_WIDE_INTs.
1596         * alias.c (ao_ref_from_mem): Handle the new form of MEM_OFFSET.
1597         (offset_overlap_p): Take poly_int64s rather than HOST_WIDE_INTs
1598         and ints.
1599         (adjust_offset_for_component_ref): Change the offset from a
1600         HOST_WIDE_INT to a poly_int64.
1601         (nonoverlapping_memrefs_p): Track polynomial offsets and sizes.
1602         * cfgcleanup.c (merge_memattrs): Update after mem_attrs changes.
1603         * dce.c (find_call_stack_args): Likewise.
1604         * dse.c (record_store): Likewise.
1605         * dwarf2out.c (tls_mem_loc_descriptor, dw_sra_loc_expr): Likewise.
1606         * print-rtl.c (rtx_writer::print_rtx): Likewise.
1607         * read-rtl-function.c (test_loading_mem): Likewise.
1608         * rtlanal.c (may_trap_p_1): Likewise.
1609         * simplify-rtx.c (delegitimize_mem_from_attrs): Likewise.
1610         * var-tracking.c (int_mem_offset, track_expr_p): Likewise.
1611         * emit-rtl.c (mem_attrs_eq_p, get_mem_align_offset): Likewise.
1612         (mem_attrs::mem_attrs): New function.
1613         (set_mem_attributes_minus_bitpos): Change bitpos from a
1614         HOST_WIDE_INT to poly_int64.
1615         (set_mem_alias_set, set_mem_addr_space, set_mem_align, set_mem_expr)
1616         (clear_mem_offset, clear_mem_size, change_address)
1617         (get_spill_slot_decl, set_mem_attrs_for_spill): Directly
1618         initialize mem_attrs.
1619         (set_mem_offset, set_mem_size, adjust_address_1)
1620         (adjust_automodify_address_1, offset_address, widen_memory_access):
1621         Likewise.  Take poly_int64s rather than HOST_WIDE_INT.
1622
1623 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1624             Alan Hayward  <alan.hayward@arm.com>
1625             David Sherwood  <david.sherwood@arm.com>
1626
1627         * rtlanal.c (rtx_addr_can_trap_p_1): Take the offset and size
1628         as poly_int64s rather than HOST_WIDE_INTs.  Use a size of -1
1629         rather than 0 to represent an unknown size.  Assert that the size
1630         is known when the mode isn't BLKmode.
1631         (may_trap_p_1): Use -1 for unknown sizes.
1632         (rtx_addr_can_trap_p): Likewise.  Pass BLKmode rather than VOIDmode.
1633
1634 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1635             Alan Hayward  <alan.hayward@arm.com>
1636             David Sherwood  <david.sherwood@arm.com>
1637
1638         * dse.c (store_info): Change offset and width from HOST_WIDE_INT
1639         to poly_int64.  Update commentary for positions_needed.large.
1640         (read_info_type): Change offset and width from HOST_WIDE_INT
1641         to poly_int64.
1642         (set_usage_bits): Likewise.
1643         (canon_address): Return the offset as a poly_int64 rather than
1644         a HOST_WIDE_INT.  Use strip_offset_and_add.
1645         (set_all_positions_unneeded, any_positions_needed_p): Use
1646         positions_needed.large to track stores with non-constant widths.
1647         (all_positions_needed_p): Likewise.  Take the offset and width
1648         as poly_int64s rather than ints.  Assert that rhs is nonnull.
1649         (record_store): Cope with non-constant offsets and widths.
1650         Nullify the rhs of an earlier store if we can't tell which bytes
1651         of it are needed.
1652         (find_shift_sequence): Take the access_size and shift as poly_int64s
1653         rather than ints.
1654         (get_stored_val): Take the read_offset and read_width as poly_int64s
1655         rather than HOST_WIDE_INTs.
1656         (check_mem_read_rtx, scan_stores, scan_reads, dse_step5): Handle
1657         non-constant offsets and widths.
1658
1659 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1660             Alan Hayward  <alan.hayward@arm.com>
1661             David Sherwood  <david.sherwood@arm.com>
1662
1663         * inchash.h (inchash::hash::add_poly_int): New function.
1664         * tree-ssa-alias.h (ao_ref::offset, ao_ref::size, ao_ref::max_size):
1665         Use poly_int64 rather than HOST_WIDE_INT.
1666         (ao_ref::max_size_known_p): New function.
1667         * tree-ssa-sccvn.h (vn_reference_op_struct::off): Use poly_int64_pod
1668         rather than HOST_WIDE_INT.
1669         * tree-ssa-alias.c (ao_ref_base): Apply get_ref_base_and_extent
1670         to temporaries until its interface is adjusted to match.
1671         (ao_ref_init_from_ptr_and_size): Handle polynomial offsets and sizes.
1672         (aliasing_component_refs_p, decl_refs_may_alias_p)
1673         (indirect_ref_may_alias_decl_p, indirect_refs_may_alias_p): Take
1674         the offsets and max_sizes as poly_int64s instead of HOST_WIDE_INTs.
1675         (refs_may_alias_p_1, stmt_kills_ref_p): Adjust for changes to
1676         ao_ref fields.
1677         * alias.c (ao_ref_from_mem): Likewise.
1678         * tree-ssa-dce.c (mark_aliased_reaching_defs_necessary_1): Likewise.
1679         * tree-ssa-dse.c (valid_ao_ref_for_dse, normalize_ref)
1680         (clear_bytes_written_by, setup_live_bytes_from_ref, compute_trims)
1681         (maybe_trim_complex_store, maybe_trim_constructor_store)
1682         (live_bytes_read, dse_classify_store): Likewise.
1683         * tree-ssa-sccvn.c (vn_reference_compute_hash, vn_reference_eq):
1684         (copy_reference_ops_from_ref, ao_ref_init_from_vn_reference)
1685         (fully_constant_vn_reference_p, valueize_refs_1): Likewise.
1686         (vn_reference_lookup_3): Likewise.
1687         * tree-ssa-uninit.c (warn_uninitialized_vars): Likewise.
1688
1689 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1690             Alan Hayward  <alan.hayward@arm.com>
1691             David Sherwood  <david.sherwood@arm.com>
1692
1693         * tree-ssa-alias.c (indirect_ref_may_alias_decl_p)
1694         (indirect_refs_may_alias_p): Use ranges_may_overlap_p
1695         instead of ranges_overlap_p.
1696
1697 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1698             Alan Hayward  <alan.hayward@arm.com>
1699             David Sherwood  <david.sherwood@arm.com>
1700
1701         * tree-ssa-alias.c (same_addr_size_stores_p): Take the offsets and
1702         sizes as poly_int64s rather than HOST_WIDE_INTs.
1703
1704 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1705             Alan Hayward  <alan.hayward@arm.com>
1706             David Sherwood  <david.sherwood@arm.com>
1707
1708         * gimple-fold.h (fold_ctor_reference): Take the offset and size
1709         as poly_uint64 rather than unsigned HOST_WIDE_INT.
1710         * gimple-fold.c (fold_ctor_reference): Likewise.
1711
1712 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1713             Alan Hayward  <alan.hayward@arm.com>
1714             David Sherwood  <david.sherwood@arm.com>
1715
1716         * target.def (dwarf_poly_indeterminate_value): New hook.
1717         * targhooks.h (default_dwarf_poly_indeterminate_value): Declare.
1718         * targhooks.c (default_dwarf_poly_indeterminate_value): New function.
1719         * doc/tm.texi.in (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Document.
1720         * doc/tm.texi: Regenerate.
1721         * dwarf2out.h (build_cfa_loc, build_cfa_aligned_loc): Take the
1722         offset as a poly_int64.
1723         * dwarf2out.c (new_reg_loc_descr): Move later in file.  Take the
1724         offset as a poly_int64.
1725         (loc_descr_plus_const, loc_list_plus_const, build_cfa_aligned_loc):
1726         Take the offset as a poly_int64.
1727         (build_cfa_loc): Likewise.  Use loc_descr_plus_const.
1728         (frame_pointer_fb_offset): Change to a poly_int64.
1729         (int_loc_descriptor): Take the offset as a poly_int64.  Use
1730         targetm.dwarf_poly_indeterminate_value for polynomial offsets.
1731         (based_loc_descr): Take the offset as a poly_int64.
1732         Use strip_offset_and_add to handle (plus X (const)).
1733         Use new_reg_loc_descr instead of an open-coded version of the
1734         previous implementation.
1735         (mem_loc_descriptor): Handle CONST_POLY_INT.
1736         (compute_frame_pointer_to_fb_displacement): Take the offset as a
1737         poly_int64.  Use strip_offset_and_add to handle (plus X (const)).
1738
1739 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1740             Alan Hayward  <alan.hayward@arm.com>
1741             David Sherwood  <david.sherwood@arm.com>
1742
1743         * rtl.h (reg_attrs::offset): Change from HOST_WIDE_INT to poly_int64.
1744         (gen_rtx_REG_offset): Take the offset as a poly_int64.
1745         * inchash.h (inchash::hash::add_poly_hwi): New function.
1746         * gengtype.c (main): Register poly_int64.
1747         * emit-rtl.c (reg_attr_hasher::hash): Use inchash.  Treat the
1748         offset as a poly_int.
1749         (reg_attr_hasher::equal): Use must_eq to compare offsets.
1750         (get_reg_attrs, update_reg_offset, gen_rtx_REG_offset): Take the
1751         offset as a poly_int64.
1752         (set_reg_attrs_from_value): Treat the offset as a poly_int64.
1753         * print-rtl.c (print_poly_int): New function.
1754         (rtx_writer::print_rtx_operand_code_r): Treat REG_OFFSET as
1755         a poly_int.
1756         * var-tracking.c (track_offset_p, get_tracked_reg_offset): New
1757         functions.
1758         (var_reg_set, var_reg_delete_and_set, var_reg_delete): Use them.
1759         (same_variable_part_p, track_loc_p): Take the offset as a poly_int64.
1760         (vt_get_decl_and_offset): Return the offset as a poly_int64.
1761         Enforce track_offset_p for parts of a PARALLEL.
1762         (vt_add_function_parameter): Use const_offset for the final
1763         offset to track.  Use get_tracked_reg_offset for the parts
1764         of a PARALLEL.
1765
1766 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1767             Alan Hayward  <alan.hayward@arm.com>
1768             David Sherwood  <david.sherwood@arm.com>
1769
1770         * target.def (truly_noop_truncation): Take poly_uint64s instead of
1771         unsigned ints.  Change default to hook_bool_puint64_puint64_true.
1772         * doc/tm.texi: Regenerate.
1773         * hooks.h (hook_bool_uint_uint_true): Delete.
1774         (hook_bool_puint64_puint64_true): Declare.
1775         * hooks.c (hook_bool_uint_uint_true): Delete.
1776         (hook_bool_puint64_puint64_true): New function.
1777         * config/mips/mips.c (mips_truly_noop_truncation): Take poly_uint64s
1778         instead of unsigned ints.
1779         * config/spu/spu.c (spu_truly_noop_truncation): Likewise.
1780         * config/tilegx/tilegx.c (tilegx_truly_noop_truncation): Likewise.
1781
1782 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1783             Alan Hayward  <alan.hayward@arm.com>
1784             David Sherwood  <david.sherwood@arm.com>
1785
1786         * optabs.h (expand_operand): Add an int_value field.
1787         (create_expand_operand): Add an int_value parameter and use it
1788         to initialize the new expand_operand field.
1789         (create_integer_operand): Replace with a declaration of a function
1790         that accepts poly_int64s.  Move the implementation to...
1791         * optabs.c (create_integer_operand): ...here.
1792         (maybe_legitimize_operand): For EXPAND_INTEGER, check whether
1793         the mode preserves the value of int_value, instead of calling
1794         const_int_operand on the rtx.  Use gen_int_mode to generate
1795         the new rtx.
1796
1797 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1798             Alan Hayward  <alan.hayward@arm.com>
1799             David Sherwood  <david.sherwood@arm.com>
1800
1801         * dumpfile.h (dump_dec): Declare.
1802         * dumpfile.c (dump_dec): New function.
1803         * pretty-print.h (pp_wide_integer): Turn into a function and
1804         declare a poly_int version.
1805         * pretty-print.c (pp_wide_integer): New function for poly_ints.
1806
1807 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1808             Alan Hayward  <alan.hayward@arm.com>
1809             David Sherwood  <david.sherwood@arm.com>
1810
1811         * doc/generic.texi (POLY_INT_CST): Document.
1812         * tree.def (POLY_INT_CST): New tree code.
1813         * treestruct.def (TS_POLY_INT_CST): New tree layout.
1814         * tree-core.h (tree_poly_int_cst): New struct.
1815         (tree_node): Add a poly_int_cst field.
1816         * tree.h (POLY_INT_CST_P, POLY_INT_CST_COEFF): New macros.
1817         (wide_int_to_tree, force_fit_type): Take a poly_wide_int_ref
1818         instead of a wide_int_ref.
1819         (build_int_cst, build_int_cst_type): Take a poly_int64 instead
1820         of a HOST_WIDE_INT.
1821         (build_int_cstu, build_array_type_nelts): Take a poly_uint64
1822         instead of an unsigned HOST_WIDE_INT.
1823         (build_poly_int_cst, tree_fits_poly_int64_p, tree_fits_poly_uint64_p)
1824         (ptrdiff_tree_p): Declare.
1825         (tree_to_poly_int64, tree_to_poly_uint64): Likewise.  Provide
1826         extern inline implementations if the target doesn't use POLY_INT_CST.
1827         (poly_int_tree_p): New function.
1828         (wi::unextended_tree): New class.
1829         (wi::int_traits <unextended_tree>): New override.
1830         (wi::extended_tree): Add a default constructor.
1831         (wi::extended_tree::get_tree): New function.
1832         (wi::widest_extended_tree, wi::offset_extended_tree): New typedefs.
1833         (wi::tree_to_widest_ref, wi::tree_to_offset_ref): Use them.
1834         (wi::tree_to_poly_widest_ref, wi::tree_to_poly_offset_ref)
1835         (wi::tree_to_poly_wide_ref): New typedefs.
1836         (wi::ints_for): Provide overloads for extended_tree and
1837         unextended_tree.
1838         (poly_int_cst_value, wi::to_poly_widest, wi::to_poly_offset)
1839         (wi::to_wide): New functions.
1840         (wi::fits_to_boolean_p, wi::fits_to_tree_p): Handle poly_ints.
1841         * tree.c (poly_int_cst_hasher): New struct.
1842         (poly_int_cst_hash_table): New variable.
1843         (tree_node_structure_for_code, tree_code_size, simple_cst_equal)
1844         (valid_constant_size_p, add_expr, drop_tree_overflow): Handle
1845         POLY_INT_CST.
1846         (initialize_tree_contains_struct): Handle TS_POLY_INT_CST.
1847         (init_ttree): Initialize poly_int_cst_hash_table.
1848         (build_int_cst, build_int_cst_type, build_invariant_address): Take
1849         a poly_int64 instead of a HOST_WIDE_INT.
1850         (build_int_cstu, build_array_type_nelts): Take a poly_uint64
1851         instead of an unsigned HOST_WIDE_INT.
1852         (wide_int_to_tree): Rename to...
1853         (wide_int_to_tree_1): ...this.
1854         (build_new_poly_int_cst, build_poly_int_cst): New functions.
1855         (force_fit_type): Take a poly_wide_int_ref instead of a wide_int_ref.
1856         (wide_int_to_tree): New function that takes a poly_wide_int_ref.
1857         (ptrdiff_tree_p, tree_to_poly_int64, tree_to_poly_uint64)
1858         (tree_fits_poly_int64_p, tree_fits_poly_uint64_p): New functions.
1859         * lto-streamer-out.c (DFS::DFS_write_tree_body, hash_tree): Handle
1860         TS_POLY_INT_CST.
1861         * tree-streamer-in.c (lto_input_ts_poly_tree_pointers): Likewise.
1862         (streamer_read_tree_body): Likewise.
1863         * tree-streamer-out.c (write_ts_poly_tree_pointers): Likewise.
1864         (streamer_write_tree_body): Likewise.
1865         * tree-streamer.c (streamer_check_handled_ts_structures): Likewise.
1866         * asan.c (asan_protect_global): Require the size to be an INTEGER_CST.
1867         * cfgexpand.c (expand_debug_expr): Handle POLY_INT_CST.
1868         * expr.c (expand_expr_real_1, const_vector_from_tree): Likewise.
1869         * gimple-expr.h (is_gimple_constant): Likewise.
1870         * gimplify.c (maybe_with_size_expr): Likewise.
1871         * print-tree.c (print_node): Likewise.
1872         * tree-data-ref.c (data_ref_compare_tree): Likewise.
1873         * tree-pretty-print.c (dump_generic_node): Likewise.
1874         * tree-ssa-address.c (addr_for_mem_ref): Likewise.
1875         * tree-vect-data-refs.c (dr_group_sort_cmp): Likewise.
1876         * tree-vrp.c (compare_values_warnv): Likewise.
1877         * tree-ssa-loop-ivopts.c (determine_base_object, constant_multiple_of)
1878         (get_loop_invariant_expr, add_candidate_1, get_computation_aff_1)
1879         (force_expr_to_var_cost): Likewise.
1880         * tree-ssa-loop.c (for_each_index): Likewise.
1881         * fold-const.h (build_invariant_address, size_int_kind): Take a
1882         poly_int64 instead of a HOST_WIDE_INT.
1883         * fold-const.c (fold_negate_expr_1, const_binop, const_unop)
1884         (fold_convert_const, multiple_of_p, fold_negate_const): Handle
1885         POLY_INT_CST.
1886         (size_binop_loc): Likewise.  Allow int_const_binop_1 to fail.
1887         (int_const_binop_2): New function, split out from...
1888         (int_const_binop_1): ...here.  Handle POLY_INT_CST.
1889         (size_int_kind): Take a poly_int64 instead of a HOST_WIDE_INT.
1890         * expmed.c (make_tree): Handle CONST_POLY_INT_P.
1891         * gimple-ssa-strength-reduction.c (slsr_process_add)
1892         (slsr_process_mul): Check for INTEGER_CSTs before using them
1893         as candidates.
1894         * stor-layout.c (bits_from_bytes): New function.
1895         (bit_from_pos): Use it.
1896         (layout_type): Likewise.  For vectors, multiply the TYPE_SIZE_UNIT
1897         by BITS_PER_UNIT to get the TYPE_SIZE.
1898         * tree-cfg.c (verify_expr, verify_types_in_gimple_reference): Allow
1899         MEM_REF and TARGET_MEM_REF offsets to be a POLY_INT_CST.
1900
1901 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1902             Alan Hayward  <alan.hayward@arm.com>
1903             David Sherwood  <david.sherwood@arm.com>
1904
1905         * doc/rtl.texi (const_poly_int): Document.  Also document the
1906         rtl sharing behavior.
1907         * gengenrtl.c (excluded_rtx): Return true for CONST_POLY_INT.
1908         * rtl.h (const_poly_int_def): New struct.
1909         (rtx_def::u): Add a cpi field.
1910         (CASE_CONST_UNIQUE, CASE_CONST_ANY): Add CONST_POLY_INT.
1911         (CONST_POLY_INT_P, CONST_POLY_INT_COEFFS): New macros.
1912         (wi::rtx_to_poly_wide_ref): New typedef
1913         (const_poly_int_value, wi::to_poly_wide, rtx_to_poly_int64)
1914         (poly_int_rtx_p): New functions.
1915         (trunc_int_for_mode): Declare a poly_int64 version.
1916         (plus_constant): Take a poly_int64 instead of a HOST_WIDE_INT.
1917         (immed_wide_int_const): Take a poly_wide_int_ref rather than
1918         a wide_int_ref.
1919         (strip_offset): Declare.
1920         (strip_offset_and_add): New function.
1921         * rtl.def (CONST_POLY_INT): New rtx code.
1922         * rtl.c (rtx_size): Handle CONST_POLY_INT.
1923         (shared_const_p): Use poly_int_rtx_p.
1924         * emit-rtl.h (gen_int_mode): Take a poly_int64 instead of a
1925         HOST_WIDE_INT.
1926         (gen_int_shift_amount): Likewise.
1927         * emit-rtl.c (const_poly_int_hasher): New class.
1928         (const_poly_int_htab): New variable.
1929         (init_emit_once): Initialize it when NUM_POLY_INT_COEFFS > 1.
1930         (const_poly_int_hasher::hash): New function.
1931         (const_poly_int_hasher::equal): Likewise.
1932         (gen_int_mode): Take a poly_int64 instead of a HOST_WIDE_INT.
1933         (immed_wide_int_const): Rename to...
1934         (immed_wide_int_const_1): ...this and make static.
1935         (immed_wide_int_const): New function, taking a poly_wide_int_ref
1936         instead of a wide_int_ref.
1937         (gen_int_shift_amount): Take a poly_int64 instead of a HOST_WIDE_INT.
1938         (gen_lowpart_common): Handle CONST_POLY_INT.
1939         * cse.c (hash_rtx_cb, equiv_constant): Likewise.
1940         * cselib.c (cselib_hash_rtx): Likewise.
1941         * dwarf2out.c (const_ok_for_output_1): Likewise.
1942         * expr.c (convert_modes): Likewise.
1943         * print-rtl.c (rtx_writer::print_rtx, print_value): Likewise.
1944         * rtlhash.c (add_rtx): Likewise.
1945         * explow.c (trunc_int_for_mode): Add a poly_int64 version.
1946         (plus_constant): Take a poly_int64 instead of a HOST_WIDE_INT.
1947         Handle existing CONST_POLY_INT rtxes.
1948         * expmed.h (expand_shift): Take a poly_int64 instead of a
1949         HOST_WIDE_INT.
1950         * expmed.c (expand_shift): Likewise.
1951         * rtlanal.c (strip_offset): New function.
1952         (commutative_operand_precedence): Give CONST_POLY_INT the same
1953         precedence as CONST_DOUBLE and put CONST_WIDE_INT between that
1954         and CONST_INT.
1955         * rtl-tests.c (const_poly_int_tests): New struct.
1956         (rtl_tests_c_tests): Use it.
1957         * simplify-rtx.c (simplify_const_unary_operation): Handle
1958         CONST_POLY_INT.
1959         (simplify_const_binary_operation): Likewise.
1960         (simplify_binary_operation_1): Fold additions of symbolic constants
1961         and CONST_POLY_INTs.
1962         (simplify_subreg): Handle extensions and truncations of
1963         CONST_POLY_INTs.
1964         (simplify_const_poly_int_tests): New struct.
1965         (simplify_rtx_c_tests): Use it.
1966         * wide-int.h (storage_ref): Add default constructor.
1967         (wide_int_ref_storage): Likewise.
1968         (trailing_wide_ints): Use GTY((user)).
1969         (trailing_wide_ints::operator[]): Add a const version.
1970         (trailing_wide_ints::get_precision): New function.
1971         (trailing_wide_ints::extra_size): Likewise.
1972
1973 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1974             Alan Hayward  <alan.hayward@arm.com>
1975             David Sherwood  <david.sherwood@arm.com>
1976
1977         * emit-rtl.h (gen_int_shift_amount): Declare.
1978         * emit-rtl.c (gen_int_shift_amount): New function.
1979         * asan.c (asan_emit_stack_protection): Use gen_int_shift_amount
1980         instead of GEN_INT.
1981         * calls.c (shift_return_value): Likewise.
1982         * cse.c (fold_rtx): Likewise.
1983         * dse.c (find_shift_sequence): Likewise.
1984         * expmed.c (init_expmed_one_mode, store_bit_field_1, expand_shift_1)
1985         (expand_shift, expand_smod_pow2): Likewise.
1986         * lower-subreg.c (shift_cost): Likewise.
1987         * optabs.c (expand_superword_shift, expand_doubleword_mult)
1988         (expand_unop, expand_binop, shift_amt_for_vec_perm_mask)
1989         (expand_vec_perm_var): Likewise.
1990         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
1991         (simplify_binary_operation_1): Likewise.
1992         * combine.c (try_combine, find_split_point, force_int_to_mode)
1993         (simplify_shift_const_1, simplify_shift_const): Likewise.
1994         (change_zero_ext): Likewise.  Use simplify_gen_binary.
1995
1996 2017-12-20  Richard Sandiford  <richard.sandiford@linaro.org>
1997
1998         * poly-int.h (multiple_p): Fix handling of two non-poly_ints.
1999
2000 2017-12-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2001
2002         * doc/invoke.texi (ARM Options): Document accepted extension options
2003         for -march=armv8.3-a.
2004
2005 2017-12-20  Richard Earnshaw  <rearnsha@arm.com>
2006
2007         PR target/83105
2008         * config.gcc (arm*-*-linux*): When configured with --with-float=hard
2009         or --with-float=softfp, set the default CPU to arm10e.
2010
2011 2017-12-20  Eric Botcazou  <ebotcazou@adacore.com>
2012
2013         * config/visium/constraints.md (J, K, L): Use IN_RANGE macro.
2014         * config/visium/predicates.md (const_shift_operand): Likewise.
2015         * config/visium/visium.c (visium_legitimize_address): Fix oversight.
2016         (visium_legitimize_reload_address): Likewise.
2017
2018 2017-12-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2019
2020         PR target/82975
2021         * config/arm/arm.h (TEST_REGNO): Adjust comment as expected in r255830.
2022
2023 2017-12-20  Jakub Jelinek  <jakub@redhat.com>
2024
2025         PR c++/83490
2026         * calls.c (compute_argument_addresses): Ignore TYPE_EMPTY_P arguments.
2027
2028 2017-12-20  Julia Koval  <julia.koval@intel.com>
2029
2030         * common/config/i386/i386-common.c (OPTION_MASK_ISA_VPCLMULQDQ_SET,
2031         OPTION_MASK_ISA_VPCLMULQDQ_UNSET): New.
2032         (ix86_handle_option): Handle -mvpclmulqdq, move cx6 to flags2.
2033         * config.gcc: Include vpclmulqdqintrin.h.
2034         * config/i386/cpuid.h: Handle bit_VPCLMULQDQ.
2035         * config/i386/driver-i386.c (host_detect_local_cpu): Handle
2036         -mvpclmulqdq.
2037         * config/i386/i386-builtin.def (__builtin_ia32_vpclmulqdq_v2di,
2038         __builtin_ia32_vpclmulqdq_v4di, __builtin_ia32_vpclmulqdq_v8di): New.
2039         * config/i386/i386-c.c (__VPCLMULQDQ__): New.
2040         * config/i386/i386.c (isa2_opts): Add -mcx16.
2041         (isa_opts): Add -mpclmulqdq, remove -mcx16.
2042         (ix86_option_override_internal): Move mcx16 to flags2.
2043         (ix86_valid_target_attribute_inner_p): Add vpclmulqdq.
2044         (ix86_expand_builtin): Handle OPTION_MASK_ISA_VPCLMULQDQ.
2045         * config/i386/i386.h (TARGET_VPCLMULQDQ, TARGET_VPCLMULQDQ_P): New.
2046         * config/i386/i386.opt: Add mvpclmulqdq, move mcx16 to flags2.
2047         * config/i386/immintrin.h: Include vpclmulqdqintrin.h.
2048         * config/i386/sse.md (vpclmulqdq_<mode>): New pattern.
2049         * config/i386/vpclmulqdqintrin.h (_mm512_clmulepi64_epi128,
2050         _mm_clmulepi64_epi128, _mm256_clmulepi64_epi128): New intrinsics.
2051         * doc/invoke.texi: Add -mvpclmulqdq.
2052
2053 2017-12-20  Tom de Vries  <tom@codesourcery.com>
2054
2055         PR middle-end/83423
2056         * config/i386/i386.c (ix86_static_chain): Move
2057         DECL_STATIC_CHAIN test ...
2058         * calls.c (rtx_for_static_chain): ... here.  New function.
2059         * calls.h (rtx_for_static_chain): Declare.
2060         * builtins.c (expand_builtin_setjmp_receiver): Use rtx_for_static_chain
2061         instead of targetm.calls.static_chain.
2062         * df-scan.c (df_get_entry_block_def_set): Same.
2063
2064 2017-12-19  Tom de Vries  <tom@codesourcery.com>
2065
2066         PR tree-optimization/83493
2067         * graphite-isl-ast-to-gimple.c (translate_isl_ast_node_for): Unshare ub
2068         and lb.
2069
2070 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
2071
2072         * gimple-ssa-sprintf.c (format_directive): Use inform_n instead of
2073         inform with hardcoded english plural handling.
2074
2075 2017-12-18  Jeff Law  <law@redhat.com>
2076
2077         PR tree-optimization/83477
2078         * tree-ssa-threadedge.c (record_temporary_equivalences_from_phis): For
2079         a non-virtual PHI, always push a new range.
2080
2081 2017-12-19  Martin Sebor  <msebor@redhat.com>
2082
2083         PR middle-end/77608
2084         * builtins.c (compute_objsize): Handle non-constant offsets.
2085
2086 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
2087
2088         PR tree-optimization/83444
2089         * tree-ssa-strlen.c (strlen_check_and_optimize_stmt): For the
2090         character load case, if get_stridx on MEM_REF's operand doesn't
2091         look usable, retry with get_addr_stridx.
2092
2093 2017-12-19  Alexandre Oliva  <aoliva@redhat.com>
2094
2095         PR debug/83422
2096         * var-tracking.c (vt_debug_insns_local): Do not drop markers.
2097         (variable_tracking_main_1): Keep markers even when VTA fails.
2098
2099         PR bootstrap/83396
2100         * cfgexpand.c (expand_gimple_basic_block): Expand label first,
2101         even if there are markers before it.
2102         * cfgrtl.c (rtl_verify_bb_layout): Reject DEBUG_INSNs outside BBs.
2103
2104 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
2105
2106         * read-rtl.c (parse_reg_note_name): Replace Yoda conditions with
2107         typical order conditions.
2108         * sel-sched.c (extract_new_fences_from): Likewise.
2109         * config/visium/constraints.md (J, K, L): Likewise.
2110         * config/visium/predicates.md (const_shift_operand): Likewise.
2111         * config/visium/visium.c (visium_legitimize_address,
2112         visium_legitimize_reload_address): Likewise.
2113         * config/m68k/m68k.c (output_reg_adjust, emit_reg_adjust): Likewise.
2114         * config/arm/arm.c (arm_block_move_unaligned_straight): Likewise.
2115         * config/avr/constraints.md (Y01, Ym1, Y02, Ym2): Likewise.
2116         * config/avr/avr-log.c (avr_vdump, avr_log_set_avr_log,
2117         SET_DUMP_DETAIL): Likewise.
2118         * config/avr/predicates.md (const_8_16_24_operand): Likewise.
2119         * config/avr/avr.c (STR_PREFIX_P, avr_popcount_each_byte,
2120         avr_is_casesi_sequence, avr_casei_sequence_check_operands,
2121         avr_set_core_architecture, avr_set_current_function,
2122         avr_legitimize_reload_address, avr_asm_len, avr_print_operand,
2123         output_movqi, output_movsisf, avr_out_plus, avr_out_bitop,
2124         avr_out_fract, avr_adjust_insn_length, avr_encode_section_info,
2125         avr_2word_insn_p, output_reload_in_const, avr_has_nibble_0xf,
2126         avr_map_decompose, avr_fold_builtin): Likewise.
2127         * config/avr/driver-avr.c (avr_devicespecs_file): Likewise.
2128         * config/avr/gen-avr-mmcu-specs.c (str_prefix_p, print_mcu): Likewise.
2129         * config/i386/i386.c (ix86_parse_stringop_strategy_string): Likewise.
2130         * config/m32c/m32c-pragma.c (m32c_pragma_memregs): Likewise.
2131         * config/m32c/m32c.c (m32c_conditional_register_usage,
2132         m32c_address_cost): Likewise.
2133         * config/m32c/predicates.md (shiftcount_operand,
2134         longshiftcount_operand): Likewise.
2135         * config/iq2000/iq2000.c (iq2000_expand_prologue): Likewise.
2136         * config/nios2/nios2.c (nios2_handle_custom_fpu_insn_option,
2137         can_use_cdx_ldstw): Likewise.
2138         * config/nios2/nios2.h (CDX_REG_P): Likewise.
2139         * config/cr16/cr16.h (RETURN_ADDR_RTX, REGNO_MODE_OK_FOR_BASE_P):
2140         Likewise.
2141         * config/cr16/cr16.md (*mov<mode>_double): Likewise.
2142         * config/cr16/cr16.c (cr16_create_dwarf_for_multi_push): Likewise.
2143         * config/h8300/h8300.c (h8300_rtx_costs, get_shift_alg): Likewise.
2144         * config/vax/constraints.md (U06, U08, U16, CN6, S08, S16): Likewise.
2145         * config/vax/vax.c (adjacent_operands_p): Likewise.
2146         * config/ft32/constraints.md (L, b, KA): Likewise.
2147         * config/ft32/ft32.c (ft32_load_immediate, ft32_expand_prologue):
2148         Likewise.
2149         * cfgexpand.c (expand_stack_alignment): Likewise.
2150         * gcse.c (insert_expr_in_table): Likewise.
2151         * print-rtl.c (rtx_writer::print_rtx_operand_codes_E_and_V): Likewise.
2152         * cgraphunit.c (cgraph_node::expand): Likewise.
2153         * ira-build.c (setup_min_max_allocno_live_range_point): Likewise.
2154         * emit-rtl.c (add_insn): Likewise.
2155         * input.c (dump_location_info): Likewise.
2156         * passes.c (NEXT_PASS): Likewise.
2157         * read-rtl-function.c (parse_note_insn_name,
2158         function_reader::read_rtx_operand_r, function_reader::parse_mem_expr):
2159         Likewise.
2160         * sched-rgn.c (sched_rgn_init): Likewise.
2161         * diagnostic-show-locus.c (layout::show_ruler): Likewise.
2162         * combine.c (find_split_point, simplify_if_then_else, force_to_mode,
2163         if_then_else_cond, simplify_shift_const_1, simplify_comparison):
2164         Likewise.
2165         * explow.c (eliminate_constant_term): Likewise.
2166         * final.c (leaf_renumber_regs_insn): Likewise.
2167         * cfgrtl.c (print_rtl_with_bb): Likewise.
2168         * genhooks.c (emit_init_macros): Likewise.
2169         * poly-int.h (maybe_ne, maybe_le, maybe_lt): Likewise.
2170         * tree-data-ref.c (conflict_fn): Likewise.
2171         * selftest.c (assert_streq): Likewise.
2172         * expr.c (store_constructor_field, expand_expr_real_1): Likewise.
2173         * fold-const.c (fold_range_test, extract_muldiv_1, fold_truth_andor,
2174         fold_binary_loc, multiple_of_p): Likewise.
2175         * reload.c (push_reload, find_equiv_reg): Likewise.
2176         * et-forest.c (et_nca, et_below): Likewise.
2177         * dbxout.c (dbxout_symbol_location): Likewise.
2178         * reorg.c (relax_delay_slots): Likewise.
2179         * dojump.c (do_compare_rtx_and_jump): Likewise.
2180         * gengtype-parse.c (type): Likewise.
2181         * simplify-rtx.c (simplify_gen_ternary, simplify_gen_relational,
2182         simplify_const_relational_operation): Likewise.
2183         * reload1.c (do_output_reload): Likewise.
2184         * dumpfile.c (get_dump_file_info_by_switch): Likewise.
2185         * gengtype.c (type_for_name): Likewise.
2186         * gimple-ssa-sprintf.c (format_directive): Likewise.
2187
2188 2017-12-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2189
2190         PR target/82975
2191         * config/arm/arm.h (TEST_REGNO): Check reg_renumber is set before
2192         accessing it.  Adjust comment.
2193
2194 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
2195
2196         PR middle-end/81914
2197         * predict.c (zero_one_minusone): New function.
2198         (apply_return_prediction): Avoid return prediction for functions
2199         returning only -1, 0 and 1 values, unless they only return -1 and 0
2200         or 0 and 1.
2201
2202 2017-12-19  Claudiu Zissulescu  <claziss@synopsys.com>
2203
2204         * config/arc/arc.c (legitimate_scaled_address_p): Clean
2205         fall-through warning.
2206         (arc_compute_frame_size): Remove unused variables.
2207         (arc_print_operand): Fix fprintif format.
2208         (arc_can_follow_jump): Clean fall-through warning.
2209
2210 2017-12-19  Marek Polacek  <polacek@redhat.com>
2211
2212         PR c++/83489
2213         * config/i386/i386.c (init_cumulative_args): Don't check TYPE_EMPTY_P
2214         on an error node.
2215
2216 2017-12-19  Claudiu Zissulescu  <claziss@synopsys.com>
2217
2218         * config/arc/arc.c (overriderregs): New variable.
2219         (arc_override_options): Track fixed/call saved/call options.
2220         (arc_conditional_register_usage): Check against overrideregs
2221         variable whenever we change register properties.
2222
2223 2017-12-19  Nathan Sidwell  <nathan@acm.org>
2224
2225         * opts.c (finish_options): Don't prefix dump_base_name if it
2226         already contains directories.
2227
2228 2017-12-19  Martin Liska  <mliska@suse.cz>
2229
2230         PR rtl-optimization/82675
2231         * loop-unroll.c (unroll_loop_constant_iterations): Allocate one
2232         more element in sbitmap.
2233
2234 2017-12-19  Paolo Carlini  <paolo.carlini@oracle.com>
2235
2236         * gimplify.c (gimplify_expr): Use error_operand_p.
2237
2238 2017-12-19  Sebastian Huber  <sebastian.huber@embedded-brains.de>
2239
2240         PR target/83387
2241         * config/rs6000/t-rtems (MULTILIB_REQUIRED): Remove 64-bit soft-float
2242         multilib.
2243
2244 2017-12-19  Daniel Cederman  <cederman@gaisler.com>
2245
2246         * config/sparc/sparc.c (sparc_do_work_around_errata): Make sure
2247         the jump is to a label.
2248
2249 2017-12-19  Jakub Jelinek  <jakub@redhat.com>
2250
2251         PR tree-optimization/83444
2252         * tree-ssa-strlen.c (strlen_check_and_optimize_stmt): Optimize
2253         character loads.
2254
2255         PR ipa/82801
2256         PR ipa/83346
2257         * ipa-inline.c (flatten_remove_node_hook): New function.
2258         (ipa_inline): Keep only nodes with flatten attribute at the end of
2259         the array in the order from ipa_reverse_postorder, only walk that
2260         portion of array for flattening, if there is more than one such
2261         node, temporarily register a removal hook and ignore removed nodes.
2262
2263         PR tree-optimization/80631
2264         * tree-vect-loop.c (vect_create_epilog_for_reduction): Compare
2265         induc_code against MAX_EXPR or MIN_EXPR instead of reduc_fn against
2266         IFN_REDUC_MAX or IFN_REDUC_MIN.
2267
2268 2017-12-18  Jeff Law  <law@redhat.com>
2269
2270         * tree-ssa-dom.c (record_equivalences_from_phis): Do not
2271         record symbolic equivalences from backedges in the CFG.
2272
2273         Revert
2274         2017-11-19  Jeff Law  <law@redhat.com>
2275
2276         * tree-ssa-dom.c (record_equivalences_from_phis): Fix handling
2277         of degenerates resulting from ignoring an edge.
2278
2279 2017-12-18  Martin Sebor  <msebor@redhat.com>
2280
2281         PR middle-end/83373
2282         PR tree-optimization/78450
2283         * tree-ssa-strlen.c (maybe_set_strlen_range): New function.
2284         (handle_builtin_strlen): Call it.
2285
2286 2017-12-18  Segher Boessenkool  <segher@kernel.crashing.org>
2287
2288         PR rtl-optimization/83424
2289         * rtlanal.c (dead_or_set_regno_p): Handle CLOBBER just like SET.
2290
2291 2017-12-18  Marek Polacek  <polacek@redhat.com>
2292
2293         PR middle-end/83463
2294         * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref):
2295         Check if TYPE is INTEGRAL_TYPE_P before accessing its min/max
2296         values.
2297
2298 2017-12-18  Claudiu Zissulescu  <claziss@synopsys.com>
2299
2300         * config/arc/arc.md (maddsidi4, maddsidi4_split): Update pattern.
2301         (umaddsidi4, umaddsidi_split): Likewise.
2302
2303 2017-12-18  Claudiu Zissulescu  <claziss@synopsys.com>
2304
2305         * config/arc/arc.c (arc_legitimate_constant_p): Always check all
2306         constants.
2307
2308 2017-12-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
2309
2310         PR target/83420
2311         * config/s390/s390.c (s390_option_override): Avoid strncpy.
2312
2313 2017-12-18  Richard Biener  <rguenther@suse.de>
2314
2315         PR tree-optimization/81877
2316         * tree-ssa-loop-im.c (ref_indep_loop_p): Remove safelen parameters.
2317         (outermost_indep_loop): Adjust.
2318         (ref_indep_loop_p_1): Likewise.  Remove safelen handling again.
2319         (can_sm_ref_p): Adjust.
2320
2321 2017-12-18  Richard Biener  <rguenther@suse.de>
2322
2323         PR middle-end/77291
2324         * tree.c (array_at_struct_end_p): Return true if the underlying
2325         object has space for at least one element in excess of what
2326         the array domain specifies.
2327
2328 2017-12-17  Sandra Loosemore  <sandra@codesourcery.com>
2329
2330         * doc/extend.texi (x86 Function Attributes): Reformat nocf_check
2331         example to avoid overfull hbox.
2332         * doc/invoke.texi (Option Summary): Add missing @gol.
2333         (C++ Dialect Options): Reformat -Wnoexcept-type example to avoid
2334         overfull hbox.
2335
2336 2017-12-17  Sandra Loosemore  <sandra@codesourcery.com>
2337             Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2338
2339         * doc/invoke.texi (Option Summary): Add -mverbose-cost-dump
2340         to AArch64 and ARM lists, plus missing -mflip-thumb for ARM.
2341         (AArch64 Options): Document -mverbose-cost-dump.
2342         (ARM Options): Likewise, plus -mflip-thumb.
2343
2344 2017-12-17  Martin Sebor  <msebor@redhat.com>
2345
2346         PR bootstrap/83446
2347         * gimple-ssa-warn-restrict.c
2348         (builtin_memref::offset_out_of_bounds): Correct the handling of
2349         anti-ranges.
2350
2351 2017-12-17  Sandra Loosemore  <sandra@codesourcery.com>
2352
2353         * doc/invoke.texi (ARC Options): Add missing -mlra entry.
2354
2355 2017-12-17  John David Anglin  <danglin@gcc.gnu.org>
2356
2357         * config/pa/pa.c (pa_som_asm_init_sections): Fix comment.
2358
2359 2017-12-17  Markus Trippelsdorf  <markus@trippelsdorf.de>
2360
2361         * x86-tune-costs.h (skylake_cost, core_cost): Decrease r64 multiply
2362         latencies.
2363
2364 2017-12-16  Sandra Loosemore  <sandra@codesourcery.com>
2365
2366         * doc/invoke.texi: Fix some typos.
2367
2368 2017-12-16  Martin Sebor  <msebor@redhat.com>
2369
2370         PR tree-optimization/78918
2371         * Makefile.in (OBJS): Add gimple-ssa-warn-restrict.o.
2372         * builtins.c (check_sizes): Rename...
2373         (check_access): ...to this.  Rename function arguments for clarity.
2374         (check_memop_sizes): Adjust names.
2375         (expand_builtin_memchr, expand_builtin_memcpy): Same.
2376         (expand_builtin_memmove, expand_builtin_mempcpy): Same.
2377         (expand_builtin_strcat, expand_builtin_stpncpy): Same.
2378         (check_strncat_sizes, expand_builtin_strncat): Same.
2379         (expand_builtin_strncpy, expand_builtin_memset): Same.
2380         (expand_builtin_bzero, expand_builtin_memcmp): Same.
2381         (expand_builtin_memory_chk, maybe_emit_chk_warning): Same.
2382         (maybe_emit_sprintf_chk_warning): Same.
2383         (expand_builtin_strcpy): Adjust.
2384         (expand_builtin_stpcpy): Same.
2385         (expand_builtin_with_bounds): Detect out-of-bounds accesses
2386         in pointer-checking forms of memcpy, memmove, and mempcpy.
2387         (gcall_to_tree_minimal, max_object_size): Define new functions.
2388         * builtins.h (max_object_size): Declare.
2389         * calls.c (alloc_max_size): Call max_object_size instead of
2390         hardcoding ssizetype limit.
2391         (get_size_range): Handle new argument.
2392         * calls.h (get_size_range): Add a new argument.
2393         * cfgexpand.c (expand_call_stmt): Propagate no-warning bit.
2394         * doc/invoke.texi (-Wrestrict): Adjust, add example.
2395         * gimple-fold.c (gimple_fold_builtin_memory_op): Detect overlapping
2396         operations.
2397         (gimple_fold_builtin_memory_chk): Same.
2398         (gimple_fold_builtin_stxcpy_chk): New function.
2399         * gimple-ssa-warn-restrict.c: New source.
2400         * gimple-ssa-warn-restrict.h: New header.
2401         * gimple.c (gimple_build_call_from_tree): Propagate location.
2402         * passes.def (pass_warn_restrict): Add new pass.
2403         * tree-pass.h (make_pass_warn_restrict): Declare.
2404         * tree-ssa-strlen.c (handle_builtin_strcpy): Detect overlapping
2405         operations.
2406         (handle_builtin_strcat): Same.
2407         (strlen_optimize_stmt): Rename...
2408         (strlen_check_and_optimize_stmt): ...to this.  Handle strncat,
2409         stpncpy, strncpy, and their checking forms.
2410
2411 2017-12-16  Jan Hubicka  <hubicka@ucw.cz>
2412
2413         PR rtl-optimization/82849
2414         * modulo-sched.c (sms_schedule): Use get_estimated_loop_iterations_int
2415         and get_max_loop_iterations_int.
2416
2417 2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
2418             Alan Hayward  <alan.hayward@arm.com>
2419             David Sherwood  <david.sherwood@arm.com>
2420
2421         * machmode.h (mode_for_size, int_mode_for_size, float_mode_for_size)
2422         (smallest_mode_for_size, smallest_int_mode_for_size): Take the mode
2423         size as a poly_uint64.
2424         (mode_for_vector, mode_for_int_vector): Take the number of vector
2425         elements as a poly_uint64.
2426         * stor-layout.c (mode_for_size, smallest_mode_for_size): Take the mode
2427         size as a poly_uint64.
2428         (mode_for_vector, mode_for_int_vector): Take the number of vector
2429         elements as a poly_uint64.
2430
2431 2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
2432             Alan Hayward  <alan.hayward@arm.com>
2433             David Sherwood  <david.sherwood@arm.com>
2434
2435         * machmode.h (MACRO_MODE): New macro.
2436         * addresses.h (base_reg_class, ok_for_base_p_1): Use it.
2437         * targhooks.c (default_libcall_value, default_secondary_reload)
2438         (default_memory_move_cost, default_register_move_cost)
2439         (default_class_max_nregs): Likewise.
2440
2441 2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
2442             Alan Hayward  <alan.hayward@arm.com>
2443             David Sherwood  <david.sherwood@arm.com>
2444
2445         * doc/sourcebuild.texi: Document IN_TARGET_CODE.
2446         * genattrtab.c (write_header): Define IN_TARGET_CODE to 1 in the
2447         target C file.
2448         * genautomata.c (main): Likewise.
2449         * genconditions.c (write_header): Likewise.
2450         * genemit.c (main): Likewise.
2451         * genextract.c (print_header): Likewise.
2452         * genopinit.c (main): Likewise.
2453         * genoutput.c (output_prologue): Likewise.
2454         * genpeep.c (main): Likewise.
2455         * genpreds.c (write_insn_preds_c): Likewise.
2456         * genrecog.c (writer_header): Likewise.
2457         * config/aarch64/aarch64-builtins.c (IN_TARGET_CODE): Define.
2458         * config/aarch64/aarch64-c.c (IN_TARGET_CODE): Likewise.
2459         * config/aarch64/aarch64.c (IN_TARGET_CODE): Likewise.
2460         * config/aarch64/cortex-a57-fma-steering.c (IN_TARGET_CODE): Likewise.
2461         * config/aarch64/driver-aarch64.c (IN_TARGET_CODE): Likewise.
2462         * config/alpha/alpha.c (IN_TARGET_CODE): Likewise.
2463         * config/alpha/driver-alpha.c (IN_TARGET_CODE): Likewise.
2464         * config/arc/arc-c.c (IN_TARGET_CODE): Likewise.
2465         * config/arc/arc.c (IN_TARGET_CODE): Likewise.
2466         * config/arc/driver-arc.c (IN_TARGET_CODE): Likewise.
2467         * config/arm/aarch-common.c (IN_TARGET_CODE): Likewise.
2468         * config/arm/arm-builtins.c (IN_TARGET_CODE): Likewise.
2469         * config/arm/arm-c.c (IN_TARGET_CODE): Likewise.
2470         * config/arm/arm.c (IN_TARGET_CODE): Likewise.
2471         * config/arm/driver-arm.c (IN_TARGET_CODE): Likewise.
2472         * config/avr/avr-c.c (IN_TARGET_CODE): Likewise.
2473         * config/avr/avr-devices.c (IN_TARGET_CODE): Likewise.
2474         * config/avr/avr-log.c (IN_TARGET_CODE): Likewise.
2475         * config/avr/avr.c (IN_TARGET_CODE): Likewise.
2476         * config/avr/driver-avr.c (IN_TARGET_CODE): Likewise.
2477         * config/avr/gen-avr-mmcu-specs.c (IN_TARGET_CODE): Likewise.
2478         * config/bfin/bfin.c (IN_TARGET_CODE): Likewise.
2479         * config/c6x/c6x.c (IN_TARGET_CODE): Likewise.
2480         * config/cr16/cr16.c (IN_TARGET_CODE): Likewise.
2481         * config/cris/cris.c (IN_TARGET_CODE): Likewise.
2482         * config/darwin.c (IN_TARGET_CODE): Likewise.
2483         * config/epiphany/epiphany.c (IN_TARGET_CODE): Likewise.
2484         * config/epiphany/mode-switch-use.c (IN_TARGET_CODE): Likewise.
2485         * config/epiphany/resolve-sw-modes.c (IN_TARGET_CODE): Likewise.
2486         * config/fr30/fr30.c (IN_TARGET_CODE): Likewise.
2487         * config/frv/frv.c (IN_TARGET_CODE): Likewise.
2488         * config/ft32/ft32.c (IN_TARGET_CODE): Likewise.
2489         * config/h8300/h8300.c (IN_TARGET_CODE): Likewise.
2490         * config/i386/djgpp.c (IN_TARGET_CODE): Likewise.
2491         * config/i386/driver-i386.c (IN_TARGET_CODE): Likewise.
2492         * config/i386/driver-mingw32.c (IN_TARGET_CODE): Likewise.
2493         * config/i386/host-cygwin.c (IN_TARGET_CODE): Likewise.
2494         * config/i386/host-i386-darwin.c (IN_TARGET_CODE): Likewise.
2495         * config/i386/host-mingw32.c (IN_TARGET_CODE): Likewise.
2496         * config/i386/i386-c.c (IN_TARGET_CODE): Likewise.
2497         * config/i386/i386.c (IN_TARGET_CODE): Likewise.
2498         * config/i386/intelmic-mkoffload.c (IN_TARGET_CODE): Likewise.
2499         * config/i386/msformat-c.c (IN_TARGET_CODE): Likewise.
2500         * config/i386/winnt-cxx.c (IN_TARGET_CODE): Likewise.
2501         * config/i386/winnt-stubs.c (IN_TARGET_CODE): Likewise.
2502         * config/i386/winnt.c (IN_TARGET_CODE): Likewise.
2503         * config/i386/x86-tune-sched-atom.c (IN_TARGET_CODE): Likewise.
2504         * config/i386/x86-tune-sched-bd.c (IN_TARGET_CODE): Likewise.
2505         * config/i386/x86-tune-sched-core.c (IN_TARGET_CODE): Likewise.
2506         * config/i386/x86-tune-sched.c (IN_TARGET_CODE): Likewise.
2507         * config/ia64/ia64-c.c (IN_TARGET_CODE): Likewise.
2508         * config/ia64/ia64.c (IN_TARGET_CODE): Likewise.
2509         * config/iq2000/iq2000.c (IN_TARGET_CODE): Likewise.
2510         * config/lm32/lm32.c (IN_TARGET_CODE): Likewise.
2511         * config/m32c/m32c-pragma.c (IN_TARGET_CODE): Likewise.
2512         * config/m32c/m32c.c (IN_TARGET_CODE): Likewise.
2513         * config/m32r/m32r.c (IN_TARGET_CODE): Likewise.
2514         * config/m68k/m68k.c (IN_TARGET_CODE): Likewise.
2515         * config/mcore/mcore.c (IN_TARGET_CODE): Likewise.
2516         * config/microblaze/microblaze-c.c (IN_TARGET_CODE): Likewise.
2517         * config/microblaze/microblaze.c (IN_TARGET_CODE): Likewise.
2518         * config/mips/driver-native.c (IN_TARGET_CODE): Likewise.
2519         * config/mips/frame-header-opt.c (IN_TARGET_CODE): Likewise.
2520         * config/mips/mips.c (IN_TARGET_CODE): Likewise.
2521         * config/mmix/mmix.c (IN_TARGET_CODE): Likewise.
2522         * config/mn10300/mn10300.c (IN_TARGET_CODE): Likewise.
2523         * config/moxie/moxie.c (IN_TARGET_CODE): Likewise.
2524         * config/msp430/driver-msp430.c (IN_TARGET_CODE): Likewise.
2525         * config/msp430/msp430-c.c (IN_TARGET_CODE): Likewise.
2526         * config/msp430/msp430.c (IN_TARGET_CODE): Likewise.
2527         * config/nds32/nds32-cost.c (IN_TARGET_CODE): Likewise.
2528         * config/nds32/nds32-fp-as-gp.c (IN_TARGET_CODE): Likewise.
2529         * config/nds32/nds32-intrinsic.c (IN_TARGET_CODE): Likewise.
2530         * config/nds32/nds32-isr.c (IN_TARGET_CODE): Likewise.
2531         * config/nds32/nds32-md-auxiliary.c (IN_TARGET_CODE): Likewise.
2532         * config/nds32/nds32-memory-manipulation.c (IN_TARGET_CODE): Likewise.
2533         * config/nds32/nds32-pipelines-auxiliary.c (IN_TARGET_CODE): Likewise.
2534         * config/nds32/nds32-predicates.c (IN_TARGET_CODE): Likewise.
2535         * config/nds32/nds32.c (IN_TARGET_CODE): Likewise.
2536         * config/nios2/nios2.c (IN_TARGET_CODE): Likewise.
2537         * config/nvptx/mkoffload.c (IN_TARGET_CODE): Likewise.
2538         * config/nvptx/nvptx.c (IN_TARGET_CODE): Likewise.
2539         * config/pa/pa.c (IN_TARGET_CODE): Likewise.
2540         * config/pdp11/pdp11.c (IN_TARGET_CODE): Likewise.
2541         * config/powerpcspe/driver-powerpcspe.c (IN_TARGET_CODE): Likewise.
2542         * config/powerpcspe/host-darwin.c (IN_TARGET_CODE): Likewise.
2543         * config/powerpcspe/host-ppc64-darwin.c (IN_TARGET_CODE): Likewise.
2544         * config/powerpcspe/powerpcspe-c.c (IN_TARGET_CODE): Likewise.
2545         * config/powerpcspe/powerpcspe-linux.c (IN_TARGET_CODE): Likewise.
2546         * config/powerpcspe/powerpcspe.c (IN_TARGET_CODE): Likewise.
2547         * config/riscv/riscv-builtins.c (IN_TARGET_CODE): Likewise.
2548         * config/riscv/riscv-c.c (IN_TARGET_CODE): Likewise.
2549         * config/riscv/riscv.c (IN_TARGET_CODE): Likewise.
2550         * config/rl78/rl78-c.c (IN_TARGET_CODE): Likewise.
2551         * config/rl78/rl78.c (IN_TARGET_CODE): Likewise.
2552         * config/rs6000/driver-rs6000.c (IN_TARGET_CODE): Likewise.
2553         * config/rs6000/host-darwin.c (IN_TARGET_CODE): Likewise.
2554         * config/rs6000/host-ppc64-darwin.c (IN_TARGET_CODE): Likewise.
2555         * config/rs6000/rs6000-c.c (IN_TARGET_CODE): Likewise.
2556         * config/rs6000/rs6000-linux.c (IN_TARGET_CODE): Likewise.
2557         * config/rs6000/rs6000-p8swap.c (IN_TARGET_CODE): Likewise.
2558         * config/rs6000/rs6000-string.c (IN_TARGET_CODE): Likewise.
2559         * config/rs6000/rs6000.c (IN_TARGET_CODE): Likewise.
2560         * config/rx/rx.c (IN_TARGET_CODE): Likewise.
2561         * config/s390/driver-native.c (IN_TARGET_CODE): Likewise.
2562         * config/s390/s390-c.c (IN_TARGET_CODE): Likewise.
2563         * config/s390/s390.c (IN_TARGET_CODE): Likewise.
2564         * config/sh/sh-c.c (IN_TARGET_CODE): Likewise.
2565         * config/sh/sh-mem.cc (IN_TARGET_CODE): Likewise.
2566         * config/sh/sh.c (IN_TARGET_CODE): Likewise.
2567         * config/sh/sh_optimize_sett_clrt.cc (IN_TARGET_CODE): Likewise.
2568         * config/sh/sh_treg_combine.cc (IN_TARGET_CODE): Likewise.
2569         * config/sparc/driver-sparc.c (IN_TARGET_CODE): Likewise.
2570         * config/sparc/sparc-c.c (IN_TARGET_CODE): Likewise.
2571         * config/sparc/sparc.c (IN_TARGET_CODE): Likewise.
2572         * config/spu/spu-c.c (IN_TARGET_CODE): Likewise.
2573         * config/spu/spu.c (IN_TARGET_CODE): Likewise.
2574         * config/stormy16/stormy16.c (IN_TARGET_CODE): Likewise.
2575         * config/tilegx/mul-tables.c (IN_TARGET_CODE): Likewise.
2576         * config/tilegx/tilegx-c.c (IN_TARGET_CODE): Likewise.
2577         * config/tilegx/tilegx.c (IN_TARGET_CODE): Likewise.
2578         * config/tilepro/mul-tables.c (IN_TARGET_CODE): Likewise.
2579         * config/tilepro/tilepro-c.c (IN_TARGET_CODE): Likewise.
2580         * config/tilepro/tilepro.c (IN_TARGET_CODE): Likewise.
2581         * config/v850/v850-c.c (IN_TARGET_CODE): Likewise.
2582         * config/v850/v850.c (IN_TARGET_CODE): Likewise.
2583         * config/vax/vax.c (IN_TARGET_CODE): Likewise.
2584         * config/visium/visium.c (IN_TARGET_CODE): Likewise.
2585         * config/vms/vms-c.c (IN_TARGET_CODE): Likewise.
2586         * config/vms/vms-f.c (IN_TARGET_CODE): Likewise.
2587         * config/vms/vms.c (IN_TARGET_CODE): Likewise.
2588         * config/xtensa/xtensa.c (IN_TARGET_CODE): Likewise.
2589
2590 2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
2591             Alan Hayward  <alan.hayward@arm.com>
2592             David Sherwood  <david.sherwood@arm.com>
2593
2594         * tree-ssa-sccvn.c (vn_reference_lookup_3): Avoid repeated
2595         checks for MEM_REF.
2596
2597 2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
2598             Alan Hayward  <alan.hayward@arm.com>
2599             David Sherwood  <david.sherwood@arm.com>
2600
2601         * doc/generic.texi (VEC_SERIES_EXPR): Document.
2602         * doc/md.texi (vec_series@var{m}): Document.
2603         * tree.def (VEC_SERIES_EXPR): New tree code.
2604         * tree.h (build_vec_series): Declare.
2605         * tree.c (build_vec_series): New function.
2606         * cfgexpand.c (expand_debug_expr): Handle VEC_SERIES_EXPR.
2607         * tree-pretty-print.c (dump_generic_node): Likewise.
2608         * gimple-pretty-print.c (dump_binary_rhs): Likewise.
2609         * tree-inline.c (estimate_operator_cost): Likewise.
2610         * expr.c (expand_expr_real_2): Likewise.
2611         * optabs-tree.c (optab_for_tree_code): Likewise.
2612         * tree-cfg.c (verify_gimple_assign_binary): Likewise.
2613         * fold-const.c (const_binop): Fold VEC_SERIES_EXPRs of constants.
2614         * expmed.c (make_tree): Handle VEC_SERIES.
2615         * optabs.def (vec_series_optab): New optab.
2616         * optabs.h (expand_vec_series_expr): Declare.
2617         * optabs.c (expand_vec_series_expr): New function.
2618         * tree-vect-generic.c (expand_vector_operations_1): Check that
2619         the operands also have vector type.
2620
2621 2017-12-16  Richard Sandiford  <richard.sandiford@linaro.org>
2622             Alan Hayward  <alan.hawyard@arm.com>
2623             David Sherwood  <david.sherwood@arm.com>
2624
2625         * doc/generic.texi (VEC_DUPLICATE_EXPR): Document.
2626         (VEC_COND_EXPR): Add missing @tindex.
2627         * doc/md.texi (vec_duplicate@var{m}): Document.
2628         * tree.def (VEC_DUPLICATE_EXPR): New tree codes.
2629         * tree.c (build_vector_from_val): Add stubbed-out handling of
2630         variable-length vectors, using VEC_DUPLICATE_EXPR.
2631         (uniform_vector_p): Handle VEC_DUPLICATE_EXPR.
2632         * cfgexpand.c (expand_debug_expr): Likewise.
2633         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
2634         * tree-inline.c (estimate_operator_cost): Likewise.
2635         * tree-pretty-print.c (dump_generic_node): Likewise.
2636         * tree-vect-generic.c (ssa_uniform_vector_p): Likewise.
2637         * fold-const.c (const_unop): Fold VEC_DUPLICATE_EXPRs of a constant.
2638         (test_vec_duplicate_folding): New function.
2639         (fold_const_c_tests): Call it.
2640         * optabs.def (vec_duplicate_optab): New optab.
2641         * optabs-tree.c (optab_for_tree_code): Handle VEC_DUPLICATE_EXPR.
2642         * optabs.h (expand_vector_broadcast): Declare.
2643         * optabs.c (expand_vector_broadcast): Make non-static.  Try using
2644         vec_duplicate_optab.
2645         * expr.c (store_constructor): Try using vec_duplicate_optab for
2646         uniform vectors.
2647         (expand_expr_real_2): Handle VEC_DUPLICATE_EXPR.
2648
2649 2017-12-15  Markus Trippelsdorf  <markus@trippelsdorf.de>
2650
2651         PR target/83358
2652         * config/i386/x86-tune-costs.h (skylake_cost, core_cost): Increase
2653         div/mod latencies a bit.
2654
2655 2017-12-15  Jeff Law  <law@redhat.com>
2656
2657         PR tree-optimization/36550
2658         * tree-ssa-threadupdate.c (count_stmts_and_phis_in_block): New.
2659         (mark_threaded_blocks): Rewrite code to avoid block copying when
2660         optimizing for size.  Don't pessimize blocks which will be
2661         copied, but all the statements will be dead.
2662
2663 2017-12-15  Alexandre Oliva  <aoliva@redhat.com>
2664
2665         PR tree-optimization/81165
2666         * tree-ssa-threadupdate.c (uses_in_bb): New.
2667         (estimate_threading_killed_stmts): New.
2668         * tree-ssa-threadupdate.h (estimate_threading_killed_stmts): Prototype.
2669         * tree-ssa-threadedge.c
2670         (record_temporary_equivalences_from_stmts_at_dest): Expand limit
2671         when its hit.
2672
2673 2017-12-15  Jeff Law  <law@redhat.com>
2674
2675         PR tree-optimization/83410
2676         * tree-ssa-threadupdate.c (thread_block_1): Avoid certain jump
2677         threads when parallelizing loops.
2678
2679 2017-12-15  Jakub Jelinek  <jakub@redhat.com>
2680
2681         * tree-core.h (struct attribute_spec): Swap affects_type_identity and
2682         handler fields.
2683         * config/alpha/alpha.c (vms_attribute_table): Swap
2684         affects_type_identity and handler fields, adjust comments.
2685         * config/mips/mips.c (mips_attribute_table): Likewise.
2686         * config/visium/visium.c (visium_attribute_table): Likewise.
2687         * config/epiphany/epiphany.c (epiphany_attribute_table): Likewise.
2688         * config/microblaze/microblaze.c (microblaze_attribute_table):
2689         Likewise.
2690         * config/spu/spu.c (spu_attribute_table): Likewise.
2691         * config/mcore/mcore.c (mcore_attribute_table): Likewise.
2692         * config/arc/arc.c (arc_attribute_table): Likewise.
2693         * config/m68k/m68k.c (m68k_attribute_table): Likewise.
2694         * config/v850/v850.c (v850_handle_interrupt_attribute,
2695         v850_handle_data_area_attribute): Formatting fixes.
2696         (v850_attribute_table): Swap affects_type_identity and handler
2697         fields, adjust comments.
2698         * config/m32r/m32r.c (m32r_attribute_table): Likewise.
2699         * config/arm/arm.c (arm_attribute_table): Likewise.
2700         * config/avr/avr.c (avr_attribute_table): Likewise.
2701         * config/s390/s390.c (s390_attribute_table): Likewise.
2702         * config/sh/sh.c (sh_attribute_table): Likewise.
2703         * config/i386/i386.c (ix86_handle_cconv_attribute,
2704         ix86_handle_callee_pop_aggregate_return): Formatting fixes.
2705         (ix86_attribute_table): Swap affects_type_identity and handler
2706         fields, adjust comments.
2707         * config/i386/cygming.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise.
2708         * config/sparc/sparc.c (sparc_attribute_table): Likewise.
2709         * config/m32c/m32c.c (m32c_attribute_table): Likewise.
2710         * config/sol2.h (SOLARIS_ATTRIBUTE_TABLE): Likewise.
2711         * config/ia64/ia64.c (ia64_attribute_table): Likewise.
2712         * config/msp430/msp430.c (msp430_attribute_table): Likewise.
2713         * config/rx/rx.c (rx_attribute_table): Likewise.
2714         * config/cr16/cr16.c (cr16_attribute_table): Likewise.
2715         * config/h8300/h8300.c (h8300_attribute_table): Likewise.
2716         * config/nvptx/nvptx.c (nvptx_attribute_table): Likewise.
2717         * config/powerpcspe/powerpcspe.c (rs6000_attribute_table): Likewise.
2718         * config/darwin.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise.
2719         * config/stormy16/stormy16.c (xstormy16_attribute_table): Likewise.
2720         * config/bfin/bfin.c (bfin_attribute_table): Likewise.
2721         * config/rs6000/rs6000.c (rs6000_attribute_table): Likewise.
2722         * config/rl78/rl78.c (rl78_attribute_table): Likewise.
2723         * config/nds32/nds32.c (nds32_attribute_table): Likewise.
2724         * doc/plugins.texi (user_attr): Likewise.  Add NULL for
2725         exclude.
2726         * attribs.c (empty_attribute_table): Swap affects_type_identity and
2727         handler fields.
2728         (register_scoped_attributes, decl_attributes): Formatting fixes.
2729
2730         PR tree-optimization/83269
2731         * fold-const.c (fold_binary_loc): Perform (-A) - B -> (-B) - A
2732         subtraction in arg0's type if type is signed and arg0 is unsigned.
2733         Formatting fix.
2734
2735         PR sanitizer/81281
2736         * match.pd ((T)(P + A) - (T)P -> (T) A): Use @@0 instead of @0 and
2737         convert? on @0 instead of convert.  Check type of @1, not @0.
2738         ((T)P - (T)(P + A) -> -(T) A): Use @@0 instead of @0 and
2739         convert? on @0 instead of convert.  Check type of @1, not @0.
2740         ((T)(P + A) - (T)(P + B) -> (T)A - (T)B): Use @@0 instead of @0,
2741         only optimize if either both @1 and @2 types are narrower
2742         precision, or both are wider or equal precision, and in the former
2743         case only if both have undefined overflow.
2744
2745 2017-12-15  Richard Biener  <rguenther@suse.de>
2746
2747         PR lto/83388
2748         * internal-fn.def (IFN_NOP): Add.
2749         * internal-fn.c (expand_NOP): Do nothing.
2750         * lto-streamer-in.c (input_function): Instead of removing
2751         sanitizer calls replace them with IFN_NOP calls.
2752
2753 2017-12-15  Richard Sandiford  <richard.sandiford@linaro.org>
2754             Alan Hayward  <alan.hayward@arm.com>
2755             David Sherwood  <david.sherwood@arm.com>
2756
2757         * dse.c (store_info, read_info_type): Replace begin and end with
2758         offset and width.
2759         (print_range): New function.
2760         (set_all_positions_unneeded, any_positions_needed_p)
2761         (check_mem_read_rtx, scan_stores, scan_reads, dse_step5): Update
2762         accordingly.
2763         (record_store): Likewise.  Optimize the case in which all positions
2764         are unneeded.
2765         (get_stored_val): Replace read_begin and read_end with read_offset
2766         and read_width.
2767         (replace_read): Update call accordingly.
2768
2769 2017-12-15  Bin Cheng  <bin.cheng@arm.com>
2770
2771         * gimple-loop-interchange.cc (STMT_COST_RATIO): New macro.
2772         (loop_cand::m_num_stmts, loop_cand::m_const_init_reduc): New members.
2773         (loop_cand::loop_cand): Initialize above members.
2774         (loop_cand::supported_operations): Delete.
2775         (loop_cand::can_interchange_p): Inline above function.
2776         (loop_cand::classify_simple_reduction): Record number of constant
2777         initialized simple reductions.
2778         (should_interchange_loops): New parameters.  Check stmt cost of loops
2779         to be interchange.
2780         (tree_loop_interchange::interchange): Prepare stmt cost of outer loop.
2781         Update call to should_interchange_loops.
2782         (should_interchange_loop_nest): Update call to
2783         should_interchange_loops.
2784
2785 2017-12-15  Eric Botcazou  <ebotcazou@adacore.com>
2786
2787         PR target/66488
2788         * ggc-page.c (HOST_BITS_PER_PTR): Do not define here...
2789         * hwint.h (HOST_BITS_PER_PTR): ...but here instead.
2790         * config/i386/xm-mingw32.h (HOST_BITS_PER_PTR): Delete.
2791
2792 2017-12-15  Julia Koval  <julia.koval@intel.com>
2793
2794         * config/i386/i386-builtin.def (__builtin_ia32_vaesenclast_v16qi,
2795         __builtin_ia32_vaesenclast_v32qi, __builtin_ia32_vaesenclast_v64qi):
2796         New.
2797         * config/i386/sse.md (vaesenclast_<mode>): New pattern.
2798         * config/i386/vaesintrin.h (_mm256_aesenclast_epi128,
2799         _mm512_aesenclast_epi128, _mm_aesenclast_epi128): New intrinsics.
2800
2801 2017-12-15  Julia Koval  <julia.koval@intel.com>
2802
2803         * config/i386/i386-builtin.def (__builtin_ia32_vaesenc_v16qi,
2804         __builtin_ia32_vaesenc_v32qi, __builtin_ia32_vaesenc_v64qi): New.
2805         * config/i386/sse.md (vaesenc_<mode>): New pattern.
2806         * config/i386/vaesintrin.h (_mm256_aesenc_epi128, _mm512_aesenc_epi128,
2807         _mm_aesenc_epi128): New intrinsics.
2808
2809 2017-12-15  Julia Koval  <julia.koval@intel.com>
2810
2811         * config/i386/i386-builtin.def (__builtin_ia32_vaesdeclast_v16qi,
2812         __builtin_ia32_vaesdeclast_v32qi, __builtin_ia32_vaesdeclast_v64qi):
2813         New.
2814         * config/i386/sse.md (vaesdeclast_<mode>): New pattern.
2815         * config/i386/vaesintrin.h (_mm256_aesdeclast_epi128,
2816         _mm512_aesdeclast_epi128, _mm_aesdeclast_epi128): New intrinsics.
2817
2818 2017-12-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
2819
2820         * gimple-ssa-strength-reduction.c (analyze_increments):
2821         Distinguish replacement costs for constant strides from those for
2822         unknown strides.
2823
2824 2017-12-14  Jakub Jelinek  <jakub@redhat.com>
2825
2826         * var-tracking.c (variable_tracking_main_1): Formatting fix.
2827
2828 2017-12-14  Bernd Edlinger  <bernd.edlinger@hotmail.de>
2829
2830         * doc/invoke.texi: Document -Wcast-function-type.
2831         * recog.h (stored_funcptr): Change signature.
2832         * tree-dump.c (dump_node): Avoid warning.
2833         * typed-splay-tree.h (typed_splay_tree): Avoid warning.
2834
2835 2017-12-14  Qing Zhao  <qing.zhao@oracle.com>
2836
2837         PR middle_end/79538
2838         * gimple-fold.c (get_range_strlen): Add the handling of non-member 
2839         array.
2840
2841 2017-12-14  David Malcolm  <dmalcolm@redhat.com>
2842
2843         PR tree-optimization/83312
2844         * domwalk.h (dom_walker::dom_walker): Fix typo in comment.
2845         * tree-cfg.c (find_taken_edge): Update to handle NULL_TREE for
2846         "val" param, and to cope with arbitrary basic blocks.
2847         (find_taken_edge_cond_expr): Add "cond_stmt" param and use it to
2848         handle NULL_TREE for "val", dropping "bb" param.
2849         (find_taken_edge_switch_expr): Make "switch_stmt" param const and
2850         drop "bb" param.  Handle NULL_TREE for "val".
2851         (find_case_label_for_value): Make "switch_stmt" param const.
2852         * tree-vrp.c (class check_array_bounds_dom_walker): New subclass
2853         of dom_walker.
2854         (vrp_prop::check_all_array_refs): Reimplement as...
2855         (check_array_bounds_dom_walker::before_dom_children): ...this new
2856         vfunc.  Replace linear search through BB block list, excluding
2857         those with non-executable in-edges via dominator walk.
2858
2859 2017-12-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2860
2861         * config/arm/arm.opt (mverbose-cost-dump): New option.
2862         * config/arm/arm.c (arm_rtx_costs): Use it.
2863
2864 2017-12-14  Andreas Schwab  <schwab@linux-m68k.org>
2865
2866         PR bootstrap/83396
2867         * reload1.c (emit_input_reload_insns): Skip debug markers.
2868
2869 2017-12-14  Alexandre Oliva  <aoliva@redhat.com>
2870
2871         * config/i386/i386.c (rest_of_insert_endbranch): Use call loc
2872         for its nop_endbr.
2873
2874         PR bootstrap/83396
2875         * config/arc/arc.c (hwloop_optimize): Skip debug insns.
2876         * config/sh/sh-protos.h (sh_find_set_of_reg): Adjust.
2877         * config/sh/sh.c: Skip debug insns besides notes.
2878         * config/sh/sh.md: Likewise.
2879         * config/sh/sh_treg_combine.cc: Likewise.
2880         * config/sh/sync.md: Likewise.
2881
2882 2017-12-14  Tom de Vries  <tom@codesourcery.com>
2883
2884         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
2885         Add item for weak_undefined.
2886
2887 2017-12-14  Richard Biener  <rguenther@suse.de>
2888
2889         PR tree-optimization/67842
2890         * sese.h (bb_in_region): Remove #if 0'ed code.
2891
2892 2017-12-14  Richard Biener  <rguenther@suse.de>
2893
2894         PR tree-optimization/83326
2895         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add
2896         may_be_zero parameter and handle it by not marking the first
2897         peeled copy as not exiting the loop.
2898         (try_peel_loop): Likewise.
2899         (canonicalize_loop_induction_variables): Use number_of_iterations_exit
2900         to handle the case of constant or zero iterations and perform
2901         loop header copying on-the-fly.
2902
2903 2017-12-14  Richard Biener  <rguenther@suse.de>
2904
2905         PR tree-optimization/83418
2906         * vr-values.c (vr_values::extract_range_for_var_from_comparison_expr):
2907         Instead of asserting we don't get unfolded comparisons deal with them.
2908
2909 2017-12-14  Jakub Jelinek  <jakub@redhat.com>
2910
2911         PR bootstrap/83396
2912         * var-tracking.c (vt_initialize): Ignore non-DEBUG_INSNs outside of
2913         basic blocks.  Assert debug bind insns don't appear outside of bbs,
2914         don't reset them.  Assert insns without BLOCK_FOR_INSN are outside of
2915         bb.  Simplify.
2916
2917         PR tree-optimization/83198
2918         * gimple-ssa-sprintf.c (format_floating): Set type solely based on
2919         dir.modifier, regardless of TREE_TYPE (arg).  Assume non-REAL_CST
2920         value if arg is a REAL_CST with incompatible type.
2921
2922 2017-12-14  Sudakshina Das  <sudi.das@arm.com>
2923             Bin Cheng  <bin.cheng@arm.com>
2924
2925         PR target/81228
2926         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Move LTGT
2927         to CCFPEmode.
2928         * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Add
2929         LTGT.
2930
2931 2017-12-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
2932
2933         * config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75,
2934         cortex-a75.cortex-a55): Specify AARCH64_FL_F16 in the arch features.
2935
2936 2017-12-14  Richard Sandiford  <richard.sandiford@linaro.org>
2937             Alan Hayward  <alan.hayward@arm.com>
2938             David Sherwood  <david.sherwood@arm.com>
2939
2940         * poly-int.h: New file.
2941         * poly-int-types.h: Likewise.
2942         * coretypes.h: Include them.
2943         (POLY_INT_CONVERSION): Define.
2944         * target.def (estimated_poly_value): New hook.
2945         * doc/tm.texi.in (TARGET_ESTIMATED_POLY_VALUE): New hook.
2946         * doc/tm.texi: Regenerate.
2947         * doc/poly-int.texi: New file.
2948         * doc/gccint.texi: Include it.
2949         * doc/rtl.texi: Describe restrictions on subreg modes.
2950         * Makefile.in (TEXI_GCCINT_FILES): Add poly-int.texi.
2951         * genmodes.c (NUM_POLY_INT_COEFFS): Provide a default definition.
2952         (emit_insn_modes_h): Emit a definition of NUM_POLY_INT_COEFFS.
2953         * targhooks.h (default_estimated_poly_value): Declare.
2954         * targhooks.c (default_estimated_poly_value): New function.
2955         * target.h (estimated_poly_value): Likewise.
2956         * wide-int.h (WI_UNARY_RESULT): Use wi::binary_traits.
2957         (wi::unary_traits): Delete.
2958         (wi::binary_traits::signed_shift_result_type): Define for
2959         offset_int << HOST_WIDE_INT, etc.
2960         (generic_wide_int::operator <<=): Define for all types and use
2961         wi::lshift instead of <<.
2962         (wi::hwi_with_prec): Add a default constructor.
2963         (wi::ints_for): New class.
2964         (operator <<): Define for all wide-int types.
2965         (operator /): New function.
2966         (operator %): Likewise.
2967         * selftest.h (ASSERT_KNOWN_EQ, ASSERT_KNOWN_EQ_AT, ASSERT_MAYBE_NE)
2968         (ASSERT_MAYBE_NE_AT): New macros.
2969
2970 2017-12-13  Eric Botcazou  <ebotcazou@adacore.com>
2971             Dominik Vogt  <vogt@linux.vnet.ibm.com>
2972
2973         PR middle-end/78468
2974         * emit-rtl.c (init_emit): Remove ??? comment.
2975         * explow.c (get_dynamic_stack_size): Take known alignment of stack
2976         pointer + STACK_DYNAMIC_OFFSET into account in lieu of STACK_BOUNDARY.
2977         * config/sparc/sparc.h (INIT_EXPANDERS): In 32-bit mode, lower the
2978         alignment of 3 virtual registers to BITS_PER_WORD.
2979
2980         * config/sparc/sparc.c (sparc_compute_frame_size): Simplify.
2981
2982 2017-12-13  Peter Bergner  <bergner@vnet.ibm.com>
2983
2984         * config/rs6000/ppc-auxv.h (PPC_FEATURE2_HTM_NO_SUSPEND): New define.
2985         * config/rs6000/rs6000.c (cpu_supports_info): Use it.
2986
2987 2017-12-13  Alexandre Oliva  <aoliva@redhat.com>
2988
2989         PR bootstrap/83396
2990         * reload1.c (eliminate_regs_in_insn): Skip debug markers.
2991
2992 2017-12-13  Jakub Jelinek  <jakub@redhat.com>
2993
2994         * tree-cfg.c (verify_gimple_in_cfg): Verify no non-label stmts
2995         with the exception of debug begin stmt markers appear before
2996         labels.
2997
2998         PR bootstrap/83396
2999         * final.c (rest_of_handle_final): Call variable_tracking_main only
3000         if !flag_var_tracking.
3001
3002 2017-12-13  Alexandre Oliva  <aoliva@redhat.com>
3003             Jakub Jelinek  <jakub@redhat.com>
3004
3005         PR bootstrap/83396
3006         PR debug/83391
3007         * tree-cfgcleanup.c (remove_forwarder_block): Keep after
3008         labels debug stmts that can only appear after labels.
3009
3010 2017-12-13  Alexander Monakov  <amonakov@ispras.ru>
3011
3012         PR rtl-optimization/82398
3013         * sel-sched.c (sel_rank_for_schedule): Fix check for zero
3014         EXPR_USEFULNESS in priority comparison.
3015
3016 2017-12-13  Segher Boessenkool  <segher@kernel.crashing.org>
3017
3018         PR rtl-optimization/83393
3019         * combine.c (move_deaths): If reg_stat points to a too new insn in
3020         last_death, do not use it: find the proper insn instead.
3021
3022 2017-12-12  Jeff Law  <law@redhat.com>
3023
3024         PR tree-optimization/83298
3025         PR tree-optimization/83362
3026         PR tree-optimization/83383
3027         * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Make
3028         push_value_range a public interface.  Add new argument to
3029         record_ranges_from_stmt.
3030         * gimple-ssa-evrp-analyze.c
3031         (evrp_range_analyzer::record_ranges_from_stmt): Add new argument.
3032         Update comments.  Handle recording temporary equivalences.
3033         * tree-ssa-dom.c (dom_opt_opt_walker::before_dom_children): Add
3034         new argument to call to evrp_range_analyzer::record_ranges_from_stmt.
3035         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Likewise.
3036         * tree-ssa-threadedge.c: Include alloc-pool.h, vr-values.h and
3037         gimple-ssa-evrp-analyze.h.
3038         (record_temporary_equivalences_from_phis): Add new argument.  When
3039         the PHI arg is an SSA_NAME, set the result's range to the range
3040         of the PHI arg.
3041         (record_temporary_equivalences_from_stmts_at_dest): Record ranges
3042         from statements too.
3043         (thread_through_normal_block): Accept new argument, evrp_range_analyzer.
3044         Pass it down to children as needed.
3045         (thread_outgoing_edges): Likewise.
3046         (thread_across_edge): Likewise.   Push/pop range state as needed.
3047         * tree-ssa-threadedge.h (thread_outgoing_edges): Update prototype.
3048
3049 2017-12-12  Julia Koval  <julia.koval@intel.com>
3050
3051         * config/i386/i386.c (PTA_SKYLAKE_AVX512): Add PTA_CLWB.
3052         (PTA_CANNONLAKE): Remove PTA_CLWB.
3053
3054 2017-12-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
3055
3056         PR target/83332
3057         * config/rs6000/vector.md (vcondv2dfv2di): New define_expand.
3058         (vcondv2div2df): Likewise.
3059         (vconduv2dfv2di): Likewise.
3060
3061 2017-12-12  Jakub Jelinek  <jakub@redhat.com>
3062
3063         * builtins.def (BUILT_IN_NEXTAFTER, BUILT_IN_NEXTAFTERF,
3064         BUILT_IN_NEXTAFTERL, BUILT_IN_NEXTTOWARD, BUILT_IN_NEXTTOWARDF,
3065         BUILT_IN_NEXTTOWARDL): Use ATTR_MATHFN_ERRNO instead of
3066         ATTR_MATHFN_FPROUNDING_ERRNO.
3067
3068 2017-12-12  Richard Biener  <rguenther@suse.de>
3069
3070         PR tree-optimization/83385
3071         * graphite-scop-detection.c (get_order, order): Remove.
3072         (bb_to_rpo): New global.
3073         (cmp_pbbs): Adjust.
3074         (build_scops): Sort pbbs in RPO order.
3075
3076 2017-12-12  James Greenhalgh  <james.greenhalgh@arm.com>
3077
3078         * combine.c (simplify_set): Do not transform subregs to zero_extends
3079         if the destination mode is a vector mode.
3080
3081 2017-12-12  Jakub Jelinek  <jakub@redhat.com>
3082
3083         PR tree-optimization/83359
3084         * tree-cfg.h (fold_loop_internal_call): Declare.
3085         * tree-vectorizer.c (fold_loop_internal_call): Moved to ...
3086         * tree-cfg.c (fold_loop_internal_call): ... here.  No longer static.
3087         (find_loop_dist_alias): New function.
3088         (move_sese_region_to_fn): If any dloop->orig_loop_num value is
3089         updated, also adjust any corresponding LOOP_DIST_ALIAS internal
3090         calls.
3091
3092         PR tree-optimization/80631
3093         * tree-vect-loop.c (get_initial_def_for_reduction): Fix comment typo.
3094         (vect_create_epilog_for_reduction): Add INDUC_VAL and INDUC_CODE
3095         arguments, for INTEGER_INDUC_COND_REDUCTION use INDUC_VAL instead of
3096         hardcoding zero as the value if COND_EXPR is never true.  For
3097         INTEGER_INDUC_COND_REDUCTION don't emit the final COND_EXPR if
3098         INDUC_VAL is equal to INITIAL_DEF, and use INDUC_CODE instead of
3099         hardcoding MAX_EXPR as the reduction operation.
3100         (is_nonwrapping_integer_induction): Allow negative step.
3101         (vectorizable_reduction): Compute INDUC_VAL and INDUC_CODE for
3102         vect_create_epilog_for_reduction, if no value is suitable, don't
3103         use INTEGER_INDUC_COND_REDUCTION for now.  Formatting fixes.
3104
3105 2017-12-12  Richard Biener  <rguenther@suse.de>
3106
3107         PR tree-optimization/81889
3108         * tree-ssa-loop-niter.c (infer_loop_bounds_from_signedness): Use
3109         range info from the non-wrapping IV instead of just the range
3110         of the type.
3111
3112 2017-12-12  Julia Koval  <julia.koval@intel.com>
3113
3114         * config.gcc: Add vaesintrin.h.
3115         * config/i386/i386-builtin-types.def (V64QI_FTYPE_V64QI_V64QI):
3116         New type.
3117         * config/i386/i386-builtin.def (__builtin_ia32_vaesdec_v16qi,
3118         __builtin_ia32_vaesdec_v32qi, __builtin_ia32_vaesdec_v64qi):
3119         New builtins.
3120         * config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
3121         * config/i386/immintrin.h: Include vaesintrin.h.
3122         * config/i386/sse.md (vaesdec_<mode>): New pattern.
3123         * config/i386/vaesintrin.h (_mm256_aesdec_epi128, _mm512_aesdec_epi128,
3124         _mm_aesdec_epi128): New intrinsics.
3125
3126 2017-12-12  Julia Koval  <julia.koval@intel.com>
3127
3128         * common/config/i386/i386-common.c (OPTION_MASK_ISA_VAES_SET,
3129         OPTION_MASK_ISA_VAES_UNSET): New.
3130         (ix86_handle_option): Handle -mvaes.
3131         * config/i386/cpuid.h: Define bit_VAES.
3132         * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mvaes.
3133         * config/i386/i386-c.c (__VAES__): New.
3134         * config/i386/i386.c (ix86_target_string): Add -mvaes.
3135         (ix86_valid_target_attribute_inner_p): Ditto.
3136         * config/i386/i386.h (TARGET_VAES, TARGET_VAES_P): New.
3137         * config/i386/i386.opt: Add -mvaes.
3138         * doc/invoke.texi: Ditto.
3139
3140 2017-12-12  Alexandre Oliva  <aoliva@redhat.com>
3141
3142         * debug.h (gcc_debug_hooks): Add inline_entry.
3143         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
3144         * debug.c (do_nothing_debug_hooks): Likewise.
3145         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
3146         * dwarf2out.c (dwarf2_debug_hooks): Likewise.
3147         (dwarf2_lineno_debug_hooks): Likewise.
3148
3149         * common.opt (gstatement-frontiers): New, setting
3150         debug_nonbind_markers_p.
3151         * rtl.h (MAY_HAVE_DEBUG_MARKER_INSNS): Activate.
3152         * toplev.c (process_options): Autodetect value for debug statement
3153         frontiers option.
3154         * tree.h (MAY_HAVE_DEBUG_MARKER_STMTS): Activate.
3155         * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers): New.
3156
3157         * cfgexpand.c (expand_gimple_basic_block): Handle begin stmt
3158         markers.  Integrate source bind into debug stmt expand loop.
3159         (pass_expand::execute): Check debug marker limit.  Avoid deep
3160         TER and expand debug locations for debug bind insns only.
3161         * cse.c (insn_live_p): Keep nonbind markers and debug bindings
3162         followed by them.
3163         * df-scan.c (df_insn_delete): Accept out-of-block debug insn.
3164         * final.c (reemit_insn_block_notes): Take current block from
3165         nonbind markers.  Declare note where it's first set.
3166         (final_scan_insn): Handle begin stmt notes.  Emit is_stmt according to
3167         begin stmt markers if enabled.
3168         (notice_source_line): Handle nonbind markers.  Fail if their
3169         location is unknown or that of builtins.
3170         (rest_of_handle_final): Convert begin stmt markers to notes if
3171         var-tracking didn't run.
3172         (rest_of_clean_state): Skip begin stmt markers.
3173         * gimple-pretty-print.c (dump_gimple_debug): Handle begin stmt
3174         markers.
3175         * function.c (allocate_struct_function): Set begin_stmt_markers.
3176         * function.h (struct function): Add debug_marker_count counter
3177         and debug_nonbind_markers flag.
3178         * gimple-iterator.c (gsi_remove): Adjust debug_marker_count.
3179         * gimple-low.c (lower_function_body): Adjust
3180         debug_nonbind_markers.
3181         (lower_stmt): Drop or skip gimple debug stmts.
3182         (lower_try_catch): Skip debug stmts.
3183         * gimple.c (gimple_build_debug_begin_stmt): New.
3184         (gimple_copy): Increment debug_marker_count if copying one.
3185         * gimple.h (gimple_build_debug_begin_stmt): Declare.
3186         * gimplify.c (rexpr_location): New.
3187         (rexpr_has_location): New.
3188         (warn_switch_unreachable_r): Handle gimple debug stmts.
3189         (shortcut_cond_r): Call expr_location.
3190         (find_goto): New.
3191         (find_goto_label): New.
3192         (shortcut_cond_expr): Call expr_has_location, expr_location, and
3193         find_goto_label.
3194         (gimplify_cond_expr): Call find_goto_label, expr_has_location, and
3195         expr_location.
3196         (gimplify_expr): Handle begin stmt markers.  Reject debug expr decls.
3197         * langhooks-def.h (LANG_HOOKS_EMITS_BEGIN_STMT): New.  Add to...
3198         (LANG_HOOKS_INITIALIZER): ... this.
3199         * langhooks.h (struct lang_hooks): Add emits_begin_stmt.
3200         * lra-contraints.c (inherit_reload_reg): Tolerate between-blocks
3201         debug insns.
3202         (update_ebb_live_info): Skip debug insn markers.
3203         * lra.c (debug_insn_static_data): Rename to...
3204         (debug_bind_static_data): ... this.
3205         (debug_marker_static_data): New.
3206         (lra_set_insn_recog_data): Select one of the above depending
3207         on debug insn kind.
3208         (lra_update_isn_regno_info): Don't assume debug insns have
3209         freqs.
3210         (push_insns): Skip debug insns.
3211         * lto-streamer-in.c (input_function): Drop debug stmts
3212         depending on active options.  Adjust debug_nonbind_markers.
3213         * params.def (PARAM_MAX_DEBUG_MARKER_COUNT): New.
3214         * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
3215         begin stmt marker notes.
3216         (print_insn): Likewise.
3217         * recog.c (extract_insn): Recognize rtl for debug markers.
3218         * rtl.def (DEBUG_MARKER): New.
3219         * tree-inline.c: Include params.h.
3220         (remap_gimple_stmt): Handle nonbind markers.
3221         (maybe_move_debug_stmts_to_successors): Likewise.
3222         (copy_debug_stmt): Likewise.
3223         * tree-iterator.c (append_to_statement_list_1): Append begin stmt
3224         markers regardless of no side effects.
3225         (tsi_link_before): Don't update container's side effects when adding
3226         a begin stmt marker.
3227         (tsi_link_after): Likewise.
3228         (expr_first): Skip begin stmt markers.
3229         (expr_last): Likewise.
3230         * tree-pretty-print (dump_generic_node): Handle begin stmt markers.
3231         * tree-ssa-threadedge.c (propagate_threaded_block_debug_info):
3232         Disregard nonbind markers.
3233         * tree.c (make_node_stat): Don't set side effects for begin stmt
3234         markers.
3235         (build1_stat): Likewise.
3236         * tree.def (DEBUG_BEGIN_STMT): New.
3237         * tree.h (GOTO_DESTINATION): Require a GOTO_EXPR.
3238         * var-tracking.c (delete_debug_insns): Renamed to...
3239         (delete_vta_debug_insns): ... this.
3240         (reemit_marker_as_note): New.
3241         (vt_initialize): Reemit markers.
3242         (delete_vta_debug_insns): Likewise.
3243         (vt_debug_insns_local): Reemit or delete markers.
3244         (variable_tracking_main_1): Likewise.
3245         * doc/generic.texi (DEBUG_BEGIN_STMT): Document.
3246         * doc/gimple.texi (gimple_debug_begin_stmt_p): New.
3247         (gimple_debug_nonbind_marker_p): New.
3248         (gimple_build_debug_bind): Adjust.
3249         (gimple_build_debug_begin_stmt): New.
3250         * doc/invoke.texi (max-debug-marker-count): New param.
3251         * doc/rtl.texi (debug_implicit_ptr, entry_value): New.
3252         (debug_parameter_ref, debug_marker): New.
3253         (NOTE_INSN_BEGIN_STMT): New.
3254         (DEBUG_INSN): Describe begin stmt markers.
3255
3256         * cfgbuild.c (find_bb_boundaries): Don't purge dead edges if,
3257         without debug insns, we wouldn't, but clean up debug insns
3258         after a control flow insn nevertheless.
3259
3260         * cfgcleanup.c (delete_unreachable_blocks): Use alternate
3261         block removal order if MAY_HAVE_DEBUG_BIND_INSNS.
3262         * cfgexpand.c (label_rtx_for_bb): Skip debug insns.
3263         * cfgrtl.c (try_redirect_by_replacing_jump): Skip debug insns.
3264         (rtl_tidy_fallthru_edge): Likewise.
3265         (rtl_verify_fallthru): Likewise.
3266         (rtl_verify_bb_layout): Likewise.
3267         (skip_insns_after_block): Likewise.
3268         (duplicate_insn_chain): Use DEBUG_BIND_INSN_P.
3269         * dwarf2out.c: Include print-rtl.h.
3270         (dwarf2out_next_real_insn): New.
3271         (dwarf2out_var_location): Call it.  Disregard begin stmt markers.
3272         Dump debug binds in asm comments.
3273         * gimple-iterator.c (gimple_find_edge_insert_loc): Skip debug stmts.
3274         * gimple-iterator.h (gsi_start_bb_nondebug): Remove; adjust
3275         callers to use gsi_start_nondebug_bb instead.
3276         (gsi_after_labels): Skip gimple debug stmts.
3277         (gsi_start_nondebug): New.
3278         * gimple-loop-interchange.c (find_deps_in_bb_for_stmt): Adjust.
3279         (proper_loop_form_for_interchange): Adjust.
3280         * gimple-low.c (gimple_seq_may_fallthru): Take last nondebug stmt.
3281         * gimple.h (gimple_seq_last_nondebug_stmt): New.
3282         * gimplify.c (last_stmt_in_scope): Skip debug stmts.
3283         (collect_fallthrough_labels): Likewise.
3284         (should_warn_for_implicit_fallthrough): Likewise.
3285         (warn_implicit_fallthrough_r): Likewise.
3286         (expand_FALLTHROUGH_r): Likewise.
3287         * graphite-isl-ast-to-gimple.c (gsi_insert_earliest): Adjust.
3288         (graphite_copy_stmts_from_block): Skip nonbind markers.
3289         * haifa-sched.c (sched_extend_bb): Skip debug insns.
3290         * ipa-icf-gimple.c (func_checker::compare_bb): Adjust.
3291         * jump.c (clean_barriers): Skip debug insns.
3292         * omp-expand.c (expand_parallel_call): Skip debug insns.
3293         (expand_task_call): Likewise.
3294         (remove_exit_barrier): Likewise.
3295         (expand_omp_taskreg): Likewise.
3296         (expand_omp_for_init_counts): Likewise.
3297         (expand_omp_for_generic): Likewise.
3298         (expand_omp_for_static_nochunk): Likewise.
3299         (expand_omp_for_static_chunk): Likewise.
3300         (expand_omp_simd): Likewise.
3301         (expand_omp_taskloop_for_outer): Likewise.
3302         (expand_omp_taskloop_for_inner): Likewise.
3303         (expand_oacc_for): Likewise.
3304         (expand_omp_sections): Likewise.
3305         (expand_omp_single): Likewise.
3306         (expand_omp_synch): Likewise.
3307         (expand_omp_atomic_load): Likewise.
3308         (expand_omp_atomic_store): Likewise.
3309         (expand_omp_atomic_fetch_op): Likewise.
3310         (expand_omp_atomic_pipeline): Likewise.
3311         (expand_omp_atomic_mutex): Likewise.
3312         (expand_omp_target): Likewise.
3313         (grid_expand_omp_for_loop): Likewise.
3314         (grid_expand_target_grid_body): Likewise.
3315         (build_omp_regions_1): Likewise.
3316         * omp-low.c (check_combined_parallel): Skip debug stmts.
3317         * postreload.c (fixup_debug_insns): Skip nonbind debug insns.
3318         * regcprop.c (find_oldest_value_reg): Ensure REGNO is not a pseudo.
3319         * sese.c (sese_trivially_empty_bb_p): Call is_gimple_debug in
3320         test.
3321         * tree-cfg.c (make_blobs_1): Skip debug stmts.
3322         (make_edges): Likewise.
3323         (cleanup_dead_labels): Likewise.
3324         (gimple_can_merge_blocks_p): Likewise.
3325         (stmt_starts_bb_p): Likewise.
3326         (gimple_block_label): Likewise.
3327         (gimple_redirect_edge_and_branch): Likewise.
3328         * tree-cfgcleanup.c (remove_forwarder_block): Rearrange skipping
3329         of debug stmts.
3330         (execute_cleanup_cfg_post_optimizing): Dump enumerated decls with
3331         TDF_SLIM.
3332         * tree-pretty-print (print_declaration): Omit initializer in slim
3333         dumps.
3334         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Mark begin stmt
3335         markers.
3336         (eliminate_unnecessary_stmts): Stabilize block removal order.
3337         * tree-ssa-tail-merge.c (find_duplicate): Skip debug stmts.
3338         * var-tracking.c (get_first_insn): New.
3339         (vt_emit_notes): Call it.
3340         (vt_initialize): Walk any insns before the first BB.
3341         (delete_debug_insns): Likewise.
3342
3343         * gimple.h (enum gimple_debug_subcode): Add
3344         GIMPLE_DEBUG_BEGIN_STMT.
3345         (gimple_debug_begin_stmt_p): New.
3346         (gimple_debug_nonbind_marker_p): New.
3347         * tree.h (MAY_HAVE_DEBUG_MARKER_STMTS): New.
3348         (MAY_HAVE_DEBUG_BIND_STMTS): Renamed from....
3349         (MAY_HAVE_DEBUG_STMTS): ... this.  Check both.
3350         * insn-notes.def (BEGIN_STMT): New.
3351         * rtl.h (MAY_HAVE_DEBUG_MARKER_INSNS): New.
3352         (MAY_HAVE_DEBUG_BIND_INSNS): Renamed from....
3353         (MAY_HAVE_DEBUG_INSNS): ... this.  Check both.
3354         (NOTE_MARKER_LOCATION, NOTE_MARKER_P): New.
3355         (DEBUG_BIND_INSN_P, DEBUG_MARKER_INSN_P): New.
3356         (INSN_DEBUG_MARKER_KIND): New.
3357         (GEN_RTX_DEBUG_MARKER_BEGIN_STMT_PAT): New.
3358         (INSN_VAR_LOCATION): Check for VAR_LOCATION.
3359         (INSN_VAR_LOCATION_PTR): New.
3360         * cfgexpand.c (expand_debug_locations): Handle debug bind insns
3361         only.
3362         (expand_gimple_basic_block): Likewise.  Emit debug temps for TER
3363         deps only if debug bind insns are enabled.
3364         (pass_expand::execute): Avoid deep TER and expand
3365         debug locations for debug bind insns only.
3366         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Narrow
3367         debug stmts special handling down to debug bind stmts.
3368         * combine.c (try_combine): Narrow debug insns special handling
3369         down to debug bind insns.
3370         * cse.c (delete_trivially_dead_insns): Handle debug bindings.
3371         Narrow debug insns preexisting special handling down to debug
3372         bind insns.
3373         * dce.c (rest_of_handle_ud_dce): Narrow debug insns special
3374         handling down to debug bind insns.
3375         * function.c (instantiate_virtual_regs): Skip debug markers,
3376         adjust handling of debug binds.
3377         * gimple-ssa-backprop.c (backprop::prepare_change): Try debug
3378         temp insertion iff MAY_HAVE_DEBUG_BIND_STMTS.
3379         * haifa-sched.c (schedule_insn): Narrow special handling of debug
3380         insns to debug bind insns.
3381         * ipa-param-manipulation.c (ipa_modify_call_arguments): Narrow
3382         special handling of debug stmts to debug bind stmts.
3383         * ipa-split.c (split_function): Likewise.
3384         * ira.c (combine_and_move_insns): Adjust debug bind insns only.
3385         * loop-unroll.c (apply_opt_in_copies): Adjust tests on bind
3386         debug insns.
3387         * reg-stack.c (convert_regs_1): Use DEBUG_BIND_INSN_P.
3388         * regrename.c (build_def_use): Likewise.
3389         * regcprop.c (copyprop_hardreg_forward_1): Likewise.
3390         (pass_cprop_hardreg): Narrow special casing of debug insns to
3391         debug bind insns.
3392         * regstat.c (regstat_init_n_sets_and_refs): Likewise.
3393         * reload1.c (reload): Likewise.
3394         * sese.c (sese_insert_phis_for_liveouts): Narrow special
3395         casing of debug stmts to debug bind stmts.
3396         * shrink-wrap.c (move_insn_for_shrink_wrap): Likewise.
3397         * ssa-iterators.h (num_imm_uses): Likewise.
3398         * tree-cfg.c (gimple_merge_blocks): Narrow special casing of
3399         debug stmts to debug bind stmts.
3400         * tree-inline.c (tree_function_versioning): Narrow special casing
3401         of debug stmts to debug bind stmts.
3402         * tree-loop-distribution.c (generate_loops_for_partition):
3403         Narrow special casing of debug stmts to debug bind stmts.
3404         * tree-sra.c (analyze_access_subtree): Narrow special casing
3405         of debug stmts to debug bind stmts.
3406         * tree-ssa-dce.c (remove_dead_stmt): Narrow special casing of debug
3407         stmts to debug bind stmts.
3408         * tree-ssa-loop-ivopt.c (remove_unused_ivs): Narrow special
3409         casing of debug stmts to debug bind stmts.
3410         * tree-ssa-reassoc.c (reassoc_remove_stmt): Likewise.
3411         * tree-ssa-tail-merge.c (tail_merge_optimize): Narrow special
3412         casing of debug stmts to debug bind stmts.
3413         * tree-ssa-threadedge.c (propagate_threaded_block_debug_info):
3414         Likewise.
3415         * tree-ssa.c (flush_pending_stmts): Narrow special casing of
3416         debug stmts to debug bind stmts.
3417         (gimple_replace_ssa_lhs): Likewise.
3418         (insert_debug_temp_for_var_def): Likewise.
3419         (insert_debug_temps_for_defs): Likewise.
3420         (reset_debug_uses): Likewise.
3421         * tree-ssanames.c (release_ssa_name_fn): Likewise.
3422         * tree-vect-loop-manip.c (adjust_debug_stmts_now): Likewise.
3423         (adjust_debug_stmts): Likewise.
3424         (adjust_phi_and_debug_stmts): Likewise.
3425         (vect_do_peeling): Likewise.
3426         * tree-vect-loop.c (vect_transform_loop): Likewise.
3427         * valtrack.c (propagate_for_debug): Use BIND_DEBUG_INSN_P.
3428         * var-tracking.c (adjust_mems): Narrow special casing of debug
3429         insns to debug bind insns.
3430         (dv_onepart_p, dataflow_set_clar_at_call, use_type): Likewise.
3431         (compute_bb_dataflow, vt_find_locations): Likewise.
3432         (vt_expand_loc, emit_notes_for_changes): Likewise.
3433         (vt_init_cfa_base): Likewise.
3434         (vt_emit_notes): Likewise.
3435         (vt_initialize): Likewise.
3436         (vt_finalize): Likewise.
3437
3438         * emit-rtl.c (next_nondebug_insn, prev_nondebug_insn): Reorder.
3439         (next_nonnote_nondebug_insn, prev_nonnote_nondebug_insn): Reorder.
3440         (next_nonnote_nondebug_insn_bb): New.
3441         (prev_nonnote_nondebug_insn_bb): New.
3442         (prev_nonnote_insn_bb, next_nonnote_insn_bb): Remove.
3443         * rtl.h (prev_nonnote_insn_bb, next_nonnote_insn_bb): Remove decls.
3444         (prev_nonnote_nondebug_insn_bb): Declare.
3445         (next_nonnote_nondebug_insn_bb): Declare.
3446         * cfgbuild.c (find_bb_boundaries): Adjust to skip debug insns.
3447         * cfgrtl.c (get_last_bb_insn): Likewise.
3448         * lra.c (push_insns): Likewise.
3449
3450 2017-12-11  David Malcolm  <dmalcolm@redhat.com>
3451
3452         PR c/82050
3453         * selftest-run-tests.c (selftest::run_tests): Move start/finish code
3454         to...
3455         * selftest.c (selftest::test_runner::test_runner): New ctor.
3456         (selftest::test_runner::~test_runner): New dtor.
3457         * selftest.h (class selftest::test_runner): New class.
3458
3459 2017-12-11  Carl Love  <cel@us.ibm.com>
3460
3461         * config/rs6000/altivec.h (vec_extract_fp32_from_shorth,
3462         vec_extract_fp32_from_shortl]): Add #defines.
3463         * config/rs6000/rs6000-builtin.def (VSLDOI_2DI): Add macro expansion.
3464         * config/rs6000/rs6000-c.c (ALTIVEC_BUILTIN_VEC_UNPACKH,
3465         ALTIVEC_BUILTIN_VEC_UNPACKL, ALTIVEC_BUILTIN_VEC_AND,
3466         ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SRL,
3467         ALTIVEC_BUILTIN_VEC_SRO, ALTIVEC_BUILTIN_VEC_SLD,
3468         ALTIVEC_BUILTIN_VEC_SLL): Add expansions.
3469         * doc/extend.texi: Add documentation for the added builtins.
3470
3471 2017-12-11  Alexandre Oliva  <aoliva@redhat.com>
3472
3473         PR rtl-optimization/80693
3474         PR rtl-optimization/81019
3475         PR rtl-optimization/81020
3476         * combine.c (distribute_notes): Reset any REG_UNUSED REGs that
3477         are not mentioned in i3.  Place the REG_UNUSED note on i2,
3478         possibly modified to REG_DEAD, if it did not originate in i3.
3479
3480 2017-12-11  Jakub Jelinek  <jakub@redhat.com>
3481
3482         * recog.c (store_data_bypass_p_1): New function.
3483         (store_data_bypass_p): Handle USE in a PARALLEL like CLOBBER.  Use
3484         store_data_bypass_p_1 to avoid code duplication.  Formatting fixes.
3485
3486 2017-12-11  Segher Boessenkool  <segher@kernel.crashing.org>
3487
3488         PR rtl-optimization/83361
3489         * ifcvt.c (if_convert): Call fixup_partitions.
3490
3491 2017-12-11  Will Schmidt  <will_schmidt@vnet.ibm.com>
3492
3493         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
3494         early folding of splat_u{8,16,32}.
3495
3496 2017-12-11  Jakub Jelinek  <jakub@redhat.com>
3497
3498         * config/aarch64/aarch64.c (aarch64_print_operand): Don't start
3499         output_operand_lossage first argument with capital letter.
3500         (aarch64_override_options): Don't start error and sorry first argument
3501         with capital letter.
3502
3503 2017-12-11  Andi Kleen  <ak@linux.intel.com>
3504
3505         PR gcov-profile/83355
3506         * auto-profile.c (string_table::get_index_by_decl): Don't
3507         recurse when abstract origin points to itself.
3508
3509 2017-12-11  Bin Cheng  <bin.cheng@arm.com>
3510
3511         PR tree-optimization/83320
3512         * gimple-loop-interchange.cc (free_data_refs_with_aux): Use delete.
3513         (prune_datarefs_not_in_loop): Ditto.
3514
3515 2017-12-10  Gerald Pfeifer  <gerald@pfeifer.com>
3516
3517         * doc/install.texi (Specific): Tweak link to mkssoftware.com.
3518
3519 2017-12-10  Jakub Jelinek  <jakub@redhat.com>
3520
3521         PR tree-optimization/83337
3522         * gimple-loop-interchange.cc (compute_access_stride): Handle
3523         bitfield DRs properly.
3524
3525 2017-12-09  Jakub Jelinek  <jakub@redhat.com>
3526
3527         PR tree-optimization/83338
3528         * tree-vect-stmts.c (vectorizable_operation): Handle POINTER_DIFF_EXPR
3529         vectorization as MINUS_EXPR with a subsequent VIEW_CONVERT_EXPR from
3530         vector of unsigned integers to vector of signed integers.
3531
3532 2017-12-08  Vladimir Makarov  <vmakarov@redhat.com>
3533
3534         PR rtl-optimization/83317
3535         * lra-constraints.c (process_address_1): Add insn code check.
3536
3537 2017-12-08  Michael Matz  <matz@suse.de>
3538
3539         Fix PR tree-optimization/83323
3540         * gimple-loop-jam (unroll_jam_possible_p): Correct test for
3541         head-controlled loops and loop BBs.
3542         * common.opt (funroll-and-jam): Remove, instead ...
3543         (floop-unroll-and-jam): ... reuse this option.
3544         * opts.c (default_options_table): Use OPT_floop_unroll_and_jam.
3545         * doc/invoke.texi (-funroll-and-jam): Move docu to ...
3546         (-floop-unroll-and-jam): ... this option.
3547
3548 2017-12-08  Jakub Jelinek  <jakub@redhat.com>
3549
3550         * ipa-polymorphic-call.c (noncall_stmt_may_be_vtbl_ptr_store): Fix
3551         a comment typo, get_base_ref_and_offset -> get_ref_base_and_extent.
3552         * ipa-prop.c (stmt_may_be_vtbl_ptr_store): Likewise.
3553
3554 2017-12-08  Richard Biener  <rguenther@suse.de>
3555
3556         PR middle-end/81782
3557         * tree-ssa-uninit.c (warn_uninitialized_vars): Properly
3558         handle accesses outside of zero-sized vars.
3559
3560 2017-12-08  Martin Jambor  <mjambor@suse.cz>
3561
3562         PR tree-optimization/83141
3563         * tree-sra.c (contains_vce_or_bfcref_p): Move up in the file, also
3564         test for MEM_REFs implicitely changing types with padding.  Remove
3565         inline keyword.
3566         (build_accesses_from_assign): Added contains_vce_or_bfcref_p checks.
3567
3568 2017-12-08  Jakub Jelinek  <jakub@redhat.com>
3569
3570         * config/arc/arc.c (arc_attribute_table): Add exclusions to
3571         the comment.
3572         * config/avr/avr.c (avr_attribute_table): Likewise.
3573         * config/msp430/msp430.c (msp430_attribute_table): Likewise.
3574         * config/rl78/rl78.c (rl78_attribute_table): Likewise.
3575         * config/nds32/nds32.c (nds32_attribute_table): Likewise.
3576         * config/darwin.h (SUBTARGET_ATTRIBUTE_TABLE): Initialize new member
3577         of struct attribute_spec.
3578         * config/i386/cygming.h (SUBTARGET_ATTRIBUTE_TABLE): Likewise.
3579
3580 2017-12-08  Ulrich Weigand  <uweigand@de.ibm.com>
3581
3582         PR target/82960
3583         * config/spu/spu.c (pad_bb): Only check INSN_CODE when INSN_P is true.
3584
3585 2017-12-08  Jan Hubicka  <hubicka@ucw.cz>
3586
3587         PR middle-end/83609
3588         * profile-count.c (profile_count::from_gcov_type): Move from
3589         profile-count.h; handle overflow.
3590         * profile-count.h (profile_count::from_gcov_type): Move offline.
3591
3592 2017-12-08  Segher Boessenkool  <segher@kernel.crashing.org>
3593
3594         PR rtl-optimization/83304
3595         * combine.c (move_deaths): If we do not know where a register died,
3596         search for it.
3597
3598 2017-12-08  Richard Biener  <rguenther@suse.de>
3599
3600         * gimple-loop-interchange.cc (tree_loop_interchange::interchange):
3601         Provide -fopt-info-loop feedback when we interchange in a nest.
3602
3603 2017-06-08  Richard Earnshaw  <rearnsha@arm.com>
3604
3605         * config/arm/driver-arm.c (arm_cpu_table): Use fp-capable product names
3606         for armv6 ARM CPU IDs.
3607
3608 2017-06-08  Richard Earnshaw  <rearnsha@arm.com>
3609
3610         * common/config/arm/arm-common.c: Include <algorithm>.
3611         (INCLUDE_VECTOR): Define.
3612         (compare_opt_names): New function.
3613         (arm_rewrite_selected_arch): Only strip out extensions that can be
3614         expressed through -mfpu.  Sort the remaining extensions
3615         alphabetically.
3616
3617 2017-06-08  Richard Earnshaw  <rearnsha@arm.com>
3618
3619         * config/arm/arm.h (arm_asm_auto_mfpu): Declare.
3620         (ASM_CPU_SPEC_FUNCTIONS): Add new rule asm_auto_mfpu.
3621         (ASM_CPU_SPEC): Use it if -mfpu is set to auto.
3622         * common/config/arm/arm-common.c (arm_asm_auto_mfpu): New function.
3623
3624 2017-06-08  Tristan Gingold  <gindold@adacore.com>
3625
3626         PR ada/81470
3627         * dwarf2out.c (dwarf2out_do_cfi_startproc): Only emit
3628         .cfi_personality or .cfi_lsda if the eh data format is dwarf2.
3629
3630 2017-12-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
3631
3632         * config/sol2.h (SOLARIS_ATTRIBUTE_TABLE): Initialize new member
3633         of struct attribute_spec.
3634
3635 2017-12-08  Julia Koval  <julia.koval@intel.com>
3636
3637         * config/i386/avx512vnniintrin.h (_mm512_dpwssds_epi32,
3638         _mm512_mask_dpwssds_epi32, _mm512_maskz_dpwssds_epi32): New intrinsics.
3639         * config/i386/avx512vnnivlintrin.h (_mm256_dpwssds_epi32,
3640         _mm256_mask_dpwssds_epi32, _mm256_maskz_dpwssds_epi32,
3641         _mm_dpwssds_epi32, _mm_mask_dpwssds_epi32,
3642         _mm_maskz_dpwssds_epi32): Ditto.
3643
3644 2017-12-08  Richard Biener  <rguenther@suse.de>
3645
3646         PR tree-optimization/81303
3647         * tree-vect-stmts.c (vect_is_simple_cond): For invariant
3648         conditions try to create a comparison vector type matching
3649         the data vector type.
3650         (vectorizable_condition): Adjust.
3651         * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
3652         Leave invariant conditions alone in case we can vectorize those.
3653
3654 2017-12-08  Julia Koval  <julia.koval@intel.com>
3655
3656         * config/i386/avx512vnniintrin.h (_mm512_dpwssd_epi32,
3657         _mm512_mask_dpwssd_epi32, _mm512_maskz_dpwssd_epi32): New intrinsics.
3658         * config/i386/avx512vnnivlintrin.h (_mm256_dpwssd_epi32,
3659         _mm256_mask_dpwssd_epi32, _mm256_maskz_dpwssd_epi32, _mm_dpwssd_epi32,
3660         _mm_mask_dpwssd_epi32, _mm_maskz_dpwssd_epi32): Ditto.
3661
3662 2017-12-08  Julia Koval  <julia.koval@intel.com>
3663
3664         * config/i386/avx512vnniintrin.h (_mm512_dpbusds_epi32,
3665         _mm512_mask_dpbusds_epi32, _mm512_maskz_dpbusds_epi32): New.
3666         * config/i386/avx512vnnivlintrin.h (_mm256_dpbusds_epi32,
3667         _mm256_mask_dpbusds_epi32, _mm256_maskz_dpbusds_epi32,
3668         _mm_dpbusds_epi32, _mm_mask_dpbusds_epi32,
3669         _mm_maskz_dpbusds_epi32): New intrinsics.
3670
3671 2017-12-07  Sandra Loosemore  <sandra@codesourcery.com>
3672
3673         * config/nios2/nios2.md (ld<bhw_uns>io): Add splitter for memory
3674         operand.
3675         (ld<bh>io_signed): Likewise.
3676         (st<bhw>io): Likewise.
3677         * config/nios2/predicates.md (ldstio_memory_operand): Allow
3678         SMALL_INT12 constant integer operand.
3679
3680 2017-12-07  Sandra Loosemore  <sandra@codesourcery.com>
3681
3682         * config/nios2/nios2.c (nios2_symbolic_constant_allowed):
3683         Rename to...
3684         (nios2_large_constant_allowed): ...this.  Adjust uses.
3685         (nios2_plus_symbolic_constant_p): Rename to...
3686         (nios2_plus_large_constant_p): ...this.  Adjust uses.
3687         (nios2_legitimate_address_p): Correct CONST_INT handling.
3688         (nios2_symbolic_memory_operand_p): Rename to...
3689         (nios2_large_constant_memory_operand_p): ...this.  Adjust uses.
3690         (nios2_large_constant_p): Check for large constant integers too.
3691         (nios2_split_large_constant): Handle constant integers.
3692         (nios2_split_symbolic_memory_operand): Rename to...
3693         (nios2_split_large_constant_memory_operand): ...this.  Adjust uses.
3694         (nios2_legitimize_constant_address): Handle constant integers.
3695         (r0rel_constant_p): Handle small constant integers.
3696         (nios2_print_operand_address): Handle r0-relative integer addresses.
3697         * config/nios2/nios2-protos.h: Adjust for renamed functions.
3698         * config/nios2/nios2.md: Adjust for renamed functions.
3699
3700 2017-12-07  Andrew Waterman  <andrew@sifive.com>
3701
3702         * config/riscv/riscv.c (TARGET_ASM_SELECT_SECTION): New define.
3703         (TARGET_HAVE_SRODATA_SECTION): New define.
3704         (riscv_select_section): New function.
3705
3706 2017-12-08  Joseph Myers  <joseph@codesourcery.com>
3707             Alexander Monakov  <amonakov@ispras.ru>
3708             Jakub Jelinek  <jakub@redhat.com>
3709
3710         PR target/81906
3711         * config/i386/i386.c (ix86_expand_rint): Handle flag_rounding_math.
3712
3713 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
3714
3715         * config/aarch64/aarch64.c (aarch64_print_address_internal): Return
3716         a bool success value.  Don't call output_operand_lossage here.
3717         (aarch64_print_ldpstp_address): Return a bool success value.
3718         (aarch64_print_operand_address): Call output_addr_const if
3719         aarch64_print_address_internal fails.
3720         (aarch64_print_operand): Don't assert that the mode is 16 bytes for
3721         'y'; call output_operand_lossage instead.  Call output_operand_lossage
3722         if aarch64_print_ldpstp_address fails.
3723
3724 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
3725
3726         * tree-vector-builder.h
3727         (tree_vector_builder::binary_encoded_nelts): Declare.
3728         * tree-vector-builder.c
3729         (tree_vector_builder::binary_encoded_nelts): New function.
3730         * fold-const.c (negate_expr_p): Likewise.
3731         (operand_equal_p, fold_checksum_tree): Likewise.
3732         * tree-loop-distribution.c (const_with_all_bytes_same): Likewise.
3733         * tree.c (integer_zerop, integer_onep, integer_all_onesp, real_zerop)
3734         (real_onep, real_minus_onep, add_expr, initializer_zerop): Likewise.
3735         (uniform_vector_p): Likewise.
3736         * varasm.c (const_hash_1, compare_constant): Likewise.
3737         * tree-ssa-ccp.c: Include tree-vector-builder.h.
3738         (valid_lattice_transition): Operate directly on the VECTOR_CST
3739         encoding.
3740         * ipa-icf.c: Include tree-vector-builder.h.
3741         (sem_variable::equals): Operate directly on the VECTOR_CST encoding.
3742         * print-tree.c (print_node): Print encoding of VECTOR_CSTs.
3743
3744 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
3745
3746         * tree.c (build_vector): Delete.
3747         * tree.h (build_vector): Make static and move into the self-testing
3748         block.
3749
3750 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
3751
3752         * vector-builder.h (vector_builder::derived): New const overload.
3753         (vector_builder::elt): New function.
3754         * tree-vector-builder.h (tree_vector_builder::type): New function.
3755         (tree_vector_builder::apply_step): Declare.
3756         * tree-vector-builder.c (tree_vector_builder::apply_step): New
3757         function.
3758         * gimple-fold.h (tree_vector_builder): Declare.
3759         (gimple_build_vector): Take a tree_vector_builder instead of a
3760         type and vector of elements.
3761         * gimple-fold.c (gimple_build_vector): Likewise.
3762         * tree-vect-loop.c (get_initial_def_for_reduction): Update call
3763         accordingly.
3764         (get_initial_defs_for_reduction): Likewise.
3765         (vectorizable_induction): Likewise.
3766
3767 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
3768
3769         * tree-vector-builder.h
3770         (tree_vector_builder::new_binary_operation): Declare.
3771         * tree-vector-builder.c
3772         (tree_vector_builder::new_binary_operation): New function.
3773         * fold-const.c (fold_relational_const): Use it.
3774         (const_binop): Likewise.  Check that both input vectors have
3775         the same number of elements, thus excluding things like WIDEN_SUM.
3776         Check whether it is possible to operate directly on the encodings
3777         of stepped inputs.
3778
3779 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
3780
3781         * fold-const.c (fold_negate_expr_1): Use tree_vector_builder and
3782         new_unary_operation, operating only on the encoded elements.
3783         (const_unop): Likewise.
3784         (exact_inverse): Likewise.
3785         (distributes_over_addition_p): New function.
3786         (const_binop): Use tree_vector_builder and new_unary_operation
3787         for combinations of VECTOR_CST and INTEGER_CST.  Operate only
3788         on the encoded elements unless the encoding is strided and the
3789         operation does not distribute over addition.
3790         (fold_convert_const):  Use tree_vector_builder and
3791         new_unary_operation.  Operate only on the encoded elements
3792         for truncating integer conversions, or for non-stepped encodings.
3793
3794 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
3795
3796         * config/sparc/sparc.c: Include tree-vector-builder.h.
3797         (sparc_fold_builtin): Use tree_vector_builder instead of build_vector.
3798         * expmed.c: Include tree-vector-builder.h.
3799         (make_tree): Use tree_vector_builder instead of build_vector.
3800         * fold-const.c: Include tree-vector-builder.h.
3801         (const_binop): Use tree_vector_builder instead of build_vector.
3802         (const_unop): Likewise.
3803         (native_interpret_vector): Likewise.
3804         (fold_vec_perm): Likewise.
3805         (fold_ternary_loc): Likewise.
3806         * gimple-fold.c: Include tree-vector-builder.h.
3807         (gimple_fold_stmt_to_constant_1): Use tree_vector_builder instead
3808         of build_vector.
3809         * tree-ssa-forwprop.c: Include tree-vector-builder.h.
3810         (simplify_vector_constructor): Use tree_vector_builder instead
3811         of build_vector.
3812         * tree-vect-generic.c: Include tree-vector-builder.h.
3813         (add_rshift): Use tree_vector_builder instead of build_vector.
3814         (expand_vector_divmod): Likewise.
3815         (optimize_vector_constructor): Likewise.
3816         * tree-vect-loop.c: Include tree-vector-builder.h.
3817         (vect_create_epilog_for_reduction): Use tree_vector_builder instead
3818         of build_vector.  Explicitly use a stepped encoding for
3819         { 1, 2, 3, ... }.
3820         * tree-vect-slp.c: Include tree-vector-builder.h.
3821         (vect_get_constant_vectors): Use tree_vector_builder instead
3822         of build_vector.
3823         (vect_transform_slp_perm_load): Likewise.
3824         (vect_schedule_slp_instance): Likewise.
3825         * tree-vect-stmts.c: Include tree-vector-builder.h.
3826         (vectorizable_bswap): Use tree_vector_builder instead of build_vector.
3827         (vect_gen_perm_mask_any): Likewise.
3828         (vectorizable_call): Likewise.  Explicitly use a stepped encoding.
3829         * tree.c: (build_vector_from_ctor): Use tree_vector_builder instead
3830         of build_vector.
3831         (build_vector_from_val): Likewise.  Explicitly use a duplicate
3832         encoding.
3833
3834 2017-12-07  Richard Sandiford  <richard.sandiford@arm.com>
3835
3836         * doc/generic.texi (VECTOR_CST): Describe new representation of
3837         vector constants.
3838         * vector-builder.h: New file.
3839         * tree-vector-builder.h: Likewise.
3840         * tree-vector-builder.c: Likewise.
3841         * Makefile.in (OBJS): Add tree-vector-builder.o.
3842         * tree.def (VECTOR_CST): Update comment to refer to generic.texi.
3843         * tree-core.h (tree_base): Add a vector_cst field to the u union.
3844         (tree_vector): Change the number of elements to
3845         vector_cst_encoded_nelts.
3846         * tree.h (VECTOR_CST_NELTS): Redefine using TYPE_VECTOR_SUBPARTS.
3847         (VECTOR_CST_ELTS): Delete.
3848         (VECTOR_CST_ELT): Redefine using vector_cst_elt.
3849         (VECTOR_CST_LOG2_NPATTERNS, VECTOR_CST_NPATTERNS): New macros.
3850         (VECTOR_CST_NELTS_PER_PATTERN, VECTOR_CST_DUPLICATE_P): Likewise.
3851         (VECTOR_CST_STEPPED_P, VECTOR_CST_ENCODED_ELTS): Likewise.
3852         (VECTOR_CST_ENCODED_ELT): Likewise.
3853         (vector_cst_encoded_nelts): New function.
3854         (make_vector): Take the values of VECTOR_CST_LOG2_NPATTERNS and
3855         VECTOR_CST_NELTS_PER_PATTERN as arguments.
3856         (vector_cst_int_elt, vector_cst_elt): Declare.
3857         * tree.c: Include tree-vector-builder.h.
3858         (tree_code_size): Abort if passed VECTOR_CST.
3859         (tree_size): Update for new VECTOR_CST layout.
3860         (make_vector): Take the values of VECTOR_CST_LOG2_NPATTERNS and
3861         VECTOR_CST_NELTS_PER_PATTERN as arguments.
3862         (build_vector): Use tree_vector_builder.
3863         (vector_cst_int_elt, vector_cst_elt): New functions.
3864         (drop_tree_overflow): For VECTOR_CST, drop the TREE_OVERFLOW from the
3865         encoded elements and then create the vector in the canonical form.
3866         (check_vector_cst, check_vector_cst_duplicate, check_vector_cst_fill)
3867         (check_vector_cst_stepped, test_vector_cst_patterns): New functions.
3868         (tree_c_tests): Call test_vector_cst_patterns.
3869         * lto-streamer-out.c (DFS::DFS_write_tree_body): Handle the new
3870         VECTOR_CST fields.
3871         (hash_tree): Likewise.
3872         * tree-streamer-out.c (write_ts_vector_tree_pointers): Likewise.
3873         (streamer_write_tree_header): Likewise.
3874         * tree-streamer-in.c (lto_input_ts_vector_tree_pointers): Likewise.
3875         (streamer_alloc_tree): Likewise.  Update call to make_vector.
3876         * fold-const.c (fold_ternary_loc): Avoid using VECTOR_CST_ELTS.
3877
3878 2017-12-07  Richard Sandiford  <richard.sandiford@linaro.org>
3879
3880         * selftest.h (ASSERT_TRUE_AT, ASSERT_FALSE_AT, ASSERT_EQ_AT)
3881         (ASSERT_NE, ASSERT_PRED1): Add underscores to local variable names
3882         * selftest-rtl.h (ASSERT_RTX_EQ, ASSERT_RTX_PTR_EQ): Likewise.
3883
3884 2017-12-07  Bin Cheng  <bin.cheng@arm.com>
3885             Richard Biener  <rguenther@suse.de>
3886
3887         PR tree-optimization/81303
3888         * Makefile.in (gimple-loop-interchange.o): New object file.
3889         * common.opt (floop-interchange): Reuse the option from graphite.
3890         * doc/invoke.texi (-floop-interchange): Ditto.  New document for
3891         -floop-interchange and mention it for -O3.
3892         * opts.c (default_options_table): Enable -floop-interchange at -O3.
3893         * gimple-loop-interchange.cc: New file.
3894         * params.def (PARAM_LOOP_INTERCHANGE_MAX_NUM_STMTS): New parameter.
3895         (PARAM_LOOP_INTERCHANGE_STRIDE_RATIO): New parameter.
3896         * passes.def (pass_linterchange): New pass.
3897         * timevar.def (TV_LINTERCHANGE): New time var.
3898         * tree-pass.h (make_pass_linterchange): New declaration.
3899         * tree-ssa-loop-ivcanon.c (create_canonical_iv): Change to external
3900         interchange.  Record IV before/after increment in new parameters.
3901         * tree-ssa-loop-ivopts.h (create_canonical_iv): New declaration.
3902         * tree-vect-loop.c (vect_is_simple_reduction): Factor out reduction
3903         path check into...
3904         (check_reduction_path): ...New function here.
3905         * tree-vectorizer.h (check_reduction_path): New declaration.
3906
3907 2017-12-07  Vladimir Makarov  <vmakarov@redhat.com>
3908
3909         PR target/83252
3910         PR rtl-optimization/80818
3911         * lra.c (add_regs_to_insn_regno_info): Make a hard reg in CLOBBER
3912         always early clobbered.
3913         * lra-lives.c (process_bb_lives): Check input hard regs for early
3914         clobbered non-operand hard reg.
3915
3916 2017-12-07  Jakub Jelinek  <jakub@redhat.com>
3917
3918         PR middle-end/83164
3919         * tree-cfg.c (verify_gimple_assign_binary): Don't require
3920         types_compatible_p, just that TYPE_MODE is the same.
3921
3922 2017-12-07  Martin Sebor  <msebor@redhat.com>
3923
3924         PR c/81544
3925         * attribs.c (empty_attribute_table): Initialize new member of
3926         struct attribute_spec.
3927         (decl_attributes): Add argument.  Handle mutually exclusive
3928         combinations of attributes.
3929         (selftests::test_attribute_exclusions): New function.
3930         (selftests::attribute_c_tests): Ditto.
3931         * attribs.h (decl_attributes): Add default argument.
3932         * selftest.h (attribute_c_tests): Declare.
3933         * selftest-run-tests.c (selftest::run_tests): Call attribute_c_tests.
3934         * tree-core.h (attribute_spec::exclusions, exclude): New type and
3935         member.
3936         * doc/extend.texi (Common Function Attributes): Update const and pure.
3937         * config/alpha/alpha.c (vms_attribute_table): Initialize new member
3938         of struct attribute_spec.
3939         * config/arc/arc.c (arc_attribute_table): Same.
3940         * config/arm/arm.c (arm_attribute_table): Same.
3941         * config/avr/avr.c ( avr_attribute_table): Same.
3942         * config/bfin/bfin.c (bfin_attribute_table): Same.
3943         * config/cr16/cr16.c (cr16_attribute_table): Same.
3944         * config/epiphany/epiphany.c (epiphany_attribute_table): Same.
3945         * config/h8300/h8300.c (h8300_attribute_table): Same.
3946         * config/i386/i386.c (ix86_attribute_table): Same.
3947         * config/ia64/ia64.c (ia64_attribute_table): Same.
3948         * config/m32c/m32c.c (m32c_attribute_table): Same.
3949         * config/m32r/m32r.c (m32r_attribute_table): Same.
3950         * config/m68k/m68k.c (m68k_attribute_table): Same.
3951         * config/mcore/mcore.c (mcore_attribute_table): Same.
3952         * config/microblaze/microblaze.c (microblaze_attribute_table): Same.
3953         * config/mips/mips.c (mips_attribute_table): Same.
3954         * config/msp430/msp430.c (msp430_attribute_table): Same.
3955         * config/nds32/nds32.c (nds32_attribute_table): Same.
3956         * config/nvptx/nvptx.c (nvptx_attribute_table): Same.
3957         * config/powerpcspe/powerpcspe.c (rs6000_attribute_table): Same.
3958         * config/rl78/rl78.c (rl78__attribute_table): Same.
3959         * config/rs6000/rs6000.c (rs6000_attribute_table): Same.
3960         * onfig/rx/rx.c (rx_attribute_table): Same.
3961         * config/s390/s390.c (s390_handle_vectorbool_attribute): Same.
3962         * config/sh/sh.c (sh_attribute_table): Same.
3963         * config/sparc/sparc.c (sparc_attribute_table): Same.
3964         * config/spu/spu.c (spu_attribute_table): Same.
3965         * config/stormy16/stormy16.c (xstormy16_attribute_table): Same.
3966         * config/v850/v850.c (v850_attribute_table): Same.
3967         * config/visium/visium.c (visium_attribute_table): Same.
3968
3969 2017-12-07  Tamar Christina  <tamar.christina@arm.com>
3970
3971         PR target/82641
3972         * config/arm/arm.c (INCLUDE_STRING): Define.
3973         (arm_last_printed_arch_string, arm_last_printed_fpu_string): New.
3974         (arm_declare_function_name): Conservatively emit .arch, .arch_extensions
3975         and .fpu.
3976
3977 2017-12-07  Michael Matz  <matz@suse.de>
3978
3979         Add unroll and jam pass
3980
3981         * gimple-loop-jam.c: New file.
3982         * Makefile.in (OBJS): Add gimple-loop-jam.o.
3983         * common.opt (funroll-and-jam): New option.
3984         * opts.c (default_options_table): Add unroll-and-jam at -O3.
3985         * params.def (PARAM_UNROLL_JAM_MIN_PERCENT): New param.
3986         (PARAM_UNROLL_JAM_MAX_UNROLL): Ditto.
3987         * passes.def: Add pass_loop_jam.
3988         * timevar.def (TV_LOOP_JAM): Add.
3989         * tree-pass.h (make_pass_loop_jam): Declare.
3990         * cfgloop.c (flow_loop_tree_node_add): Add AT argument.
3991         * cfgloop.h (flow_loop_tree_node_add): Adjust declaration.
3992         * cfgloopmanip.c (duplicate_loop): Add AT argument, adjust call
3993         to flow_loop_tree_node_add.
3994         (duplicate_subloops, copy_loops_to): Append to sibling list.
3995         * cfgloopmanip.h: (duplicate_loop): Adjust declaration.
3996         * doc/invoke.texi (-funroll-and-jam): Document new option.
3997         (unroll-jam-min-percent, unroll-jam-max-unroll): Document new params.
3998
3999 2017-12-07  Richard Biener  <rguenther@suse.de>
4000
4001         PR tree-optimization/83296
4002         PR tree-optimization/67769
4003         * tree-ssa-phiopt.c (conditional_replacement): Do not reset
4004         flow sensitive info in an unrelated BB.
4005         (value_replacement): Use reset_flow_sensitive_info.
4006         (minmax_replacement): Reset flow sensitive info on the def
4007         we move.  Do not reset flow sensitive info in the whole BB
4008         we move the stmt to.
4009         (abs_replacement): Likewise.
4010
4011 2017-12-07  Segher Boessenkool  <segher@kernel.crashing.org>
4012
4013         PR target/43871
4014         * config/rs6000/rs6000.c (rs6000_option_override_internal): Set
4015         rs6000_cpu to the given -mcpu=, or to the default processor.
4016
4017 2017-12-07  Segher Boessenkool  <segher@kernel.crashing.org>
4018
4019         * config/rs6000/rs6000.h (rs6000_cpu_attr): Delete.
4020         * config/rs6000/rs6000.c (rs6000_variable_issue_1): Use rs6000_tune
4021         instead of rs6000_cpu_attr.
4022         (rs6000_adjust_cost): Ditto.
4023         (is_microcoded_insn): Ditto.
4024         (rs6000_adjust_priority): Ditto.
4025         (rs6000_issue_rate): Ditto.
4026         (rs6000_use_sched_lookahead): Ditto.
4027         (rs6000_use_sched_lookahead_guard): Ditto.
4028         (rs6000_sched_reorder): Ditto.
4029         (force_new_group): Ditto.
4030         * config/rs6000/rs6000.md (cpu attribute): Ditto.
4031         (group_ending_nop): Ditto.
4032
4033 2017-12-07  Segher Boessenkool  <segher@kernel.crashing.org>
4034
4035         * config/rs6000/rs6000.opt (rs6000_tune): New variable.
4036         * config/rs6000/rs6000.c (rs6000_option_override_internal): Also set
4037         rs6000_tune.  Use rs6000_tune instead of rs6000_cpu where appropriate.
4038         (rs6000_loop_align): Use rs6000_tune instead of rs6000_cpu where
4039         appropriate.
4040         (rs6000_reassociation_width): Ditto.
4041         (rs6000_emit_epilogue): Ditto.
4042         (rs6000_adjust_cost): Ditto.
4043         (is_microcoded_insn): Ditto.
4044         (is_cracked_insn): Ditto.
4045         (rs6000_adjust_priority): Ditto.
4046         (rs6000_sched_reorder): Ditto.
4047         (rs6000_sched_reorder2): Ditto.
4048         (insn_must_be_first_in_group): Ditto.
4049         (insn_must_be_last_in_group): Ditto.
4050         (rs6000_register_move_cost): Ditto.
4051         * config/rs6000/rs6000.h (rs6000_cpu_attr): Use rs6000_tune instead of
4052         rs6000_cpu.
4053
4054 2017-12-07  Julia Koval  <julia.koval@intel.com>
4055
4056         * config.gcc: Add vaesintrin.h.
4057         * config/i386/i386-builtin-types.def (V64QI_FTYPE_V64QI_V64QI):
4058         New type.
4059         * config/i386/i386-builtin.def (__builtin_ia32_vaesdec_v16qi,
4060         __builtin_ia32_vaesdec_v32qi, __builtin_ia32_vaesdec_v64qi):
4061         New builtins.
4062         * config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
4063         * config/i386/immintrin.h: Include vaesintrin.h.
4064         * config/i386/sse.md (vaesdec_<mode>): New pattern.
4065         * config/i386/vaesintrin.h (_mm256_aesdec_epi128, _mm512_aesdec_epi128,
4066         _mm_aesdec_epi128): New intrinsics.
4067
4068 2017-12-06  David Malcolm  <dmalcolm@redhat.com>
4069
4070         * Makefile.in (C_COMMON_OBJS): Add c-family/c-spellcheck.o.
4071         * spellcheck-tree.c (find_closest_macro_cpp_cb): Move to
4072         c-family/c-spellcheck.cc.
4073         (best_macro_match::best_macro_match): Likewise.
4074         * spellcheck-tree.h
4075         (struct edit_distance_traits<cpp_hashnode *>): Move to
4076         c-family/c-spellcheck.h.
4077         (class best_macro_match): Likewise.
4078
4079 2017-12-06  Jakub Jelinek  <jakub@redhat.com>
4080
4081         PR tree-optimization/83293
4082         * gimple-ssa-strength-reduction.c (insert_initializers): Use
4083         GSI_NEW_STMT instead of GSI_SAME_STMT in gsi_insert_after that
4084         might insert into empty bb.
4085
4086         PR sanitizer/81281
4087         * match.pd ((T)(P + A) - (T)P -> (T) A): Split into separate
4088         simplify for plus with :c added, and pointer_plus without that.
4089         ((T)P - (T)(P + A) -> -(T) A): Likewise.  If type is integral
4090         with undefined overflow and the conversion is not widening,
4091         perform negation in utype and only convert to type afterwards.
4092         ((T)(P + A) - (T)(P + B) -> (T)A - (T)B): Split into separate
4093         simplify for plus with :c added, and pointer_plus without that.
4094         If type is integral with undefined overflow and the conversion is
4095         not widening, perform minus in utype and only convert to type
4096         afterwards.  Move the last pointer_diff_expr simplify into the
4097         two outermost ifs.
4098
4099 2017-12-06  Martin Sebor  <msebor@redhat.com>
4100
4101         PR tree-optimization/82646
4102         * builtins.c (maybe_emit_chk_warning): Use size as the bound for
4103         strncpy, not maxlen.
4104
4105 2017-12-06  Martin Sebor  <msebor@redhat.com>
4106
4107         * doc/invoke.texi (-Wstringop-truncation): Mention attribute
4108         nonstring.
4109
4110         PR tree-optimization/83075
4111         * tree-ssa-strlen.c (handle_builtin_stxncpy): Avoid assuming
4112         strncat/strncpy don't change length of source string.
4113
4114 2017-12-06  Eric Botcazou  <ebotcazou@adacore.com>
4115
4116         Revert
4117         2017-11-29  Martin Aberg  <maberg@gaisler.com>
4118
4119         * config/sparc/sparc.md (divdf3_fix): Add NOP and adjust length
4120         to prevent b2bst errata sequence.
4121         (sqrtdf2_fix): Likewise.
4122
4123 2017-12-06  Jakub Jelinek  <jakub@redhat.com>
4124
4125         PR tree-optimization/81945
4126         * cfgloop.h (FOR_EACH_LOOP_FN): Use FN instead of hardcoding fn.
4127         * tree-cfg.c (move_sese_region_to_fn): If any of the loops moved
4128         to dest_cfun has orig_loop_num set, either remap it to the new
4129         loop number if the loop got moved too, or clear it.
4130
4131 2017-12-05  Steve Ellcey  <sellcey@cavium.com>
4132
4133         * config/aarch64/thunderx2-t99.md (thunderx2t99_branch): Add trap
4134         to reservation.
4135         (thunderx2t99_nothing): New insn reservation.
4136         (thunderx2t99_mrs): New insn reservation.
4137         (thunderx2t99_multiple): New insn reservation.
4138         (thunderx2t99_alu_basi): Add bfx to reservation.
4139         (thunderx2t99_fp_cmp): Add fccmps and fccmpd to reservation.
4140
4141 2017-12-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4142
4143         PR target/82248
4144         * config/arm/arm.md (probe_stack) : Use the 'o' constraint.
4145
4146 2017-12-05  Bin Cheng  <bin.cheng@arm.com>
4147
4148         * tree-ssa-dce.c (simple_dce_from_worklist): Move and rename from
4149         tree-ssa-pre.c::remove_dead_inserted_code.
4150         * tree-ssa-dce.h: New file.
4151         * tree-ssa-pre.c (tree-ssa-dce.h): Include new header file.
4152         (remove_dead_inserted_code): Move and rename to function
4153         tree-ssa-dce.c::simple_dce_from_worklist.
4154         (pass_pre::execute): Update use.
4155
4156 2017-12-05  Richard Biener  <rguenther@suse.de>
4157
4158         PR tree-optimization/83277
4159         * graphite-isl-ast-to-gimple.c (should_copy_to_new_region): Make sure
4160         to code-gen liveout vars.
4161
4162 2017-12-05  Richard Sandiford  <richard.sandiford@linaro.org>
4163
4164         * config/aarch64/aarch64-simd.md (aarch64_simd_bsldi_internal)
4165         (aarch64_simd_bsldi_alt): Check REG_P before GP_REGNUM_P.
4166         (aarch64_cm<optab>di, aarch64_cmtstdi): Add leading "&&" to
4167         split condition.
4168
4169 2017-12-05  Max Filippov  <jcmvbkbc@gmail.com>
4170
4171         * config/xtensa/xtensa.c (xtensa_asan_shadow_offset): New
4172         function.
4173         (TARGET_ASAN_SHADOW_OFFSET): New macro definition.
4174         * config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): Set to 1 if
4175         ASAN is enabled.
4176
4177 2017-12-05  Richard Biener  <rguenther@suse.de>
4178
4179         * timevar.def (TV_TREE_RECIP, TV_TREE_SINCOS, TV_TREE_WIDEN_MUL): Add.
4180         * tree-ssa-math-opts.c (pass_data_cse_reciprocal): Use TV_TREE_RECIP.
4181         (pass_data_cse_sincos): Use TV_TREE_SINCOS.
4182         (pass_data_optimize_widening_mul): Use TV_TREE_WIDEN_MUL.
4183
4184 2017-12-05  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4185
4186         * dbxout.c (dbxout_block): Grow buf to 30 bytes.
4187
4188 2017-12-05  Martin Liska  <mliska@suse.cz>
4189             Jakub Jelinek  <jakub@redhat.com>
4190
4191         * doc/invoke.texi: Document the options.
4192         * flag-types.h (enum sanitize_code): Add
4193         SANITIZE_POINTER_COMPARE and SANITIZE_POINTER_SUBTRACT.
4194         * ipa-inline.c (sanitize_attrs_match_for_inline_p): Add handling
4195         of SANITIZE_POINTER_COMPARE and SANITIZE_POINTER_SUBTRACT.
4196         * opts.c: Define new sanitizer options.
4197         * sanitizer.def (BUILT_IN_ASAN_POINTER_COMPARE): Likewise.
4198         (BUILT_IN_ASAN_POINTER_SUBTRACT): Likewise.
4199
4200 2017-12-05  Julia Koval  <julia.koval@intel.com>
4201
4202         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VNNI_SET,
4203         OPTION_MASK_ISA_AVX512VNNI_UNSET): New.
4204         (ix86_handle_option): Handle -mavx512vnni.
4205         * config/i386/cpuid.h (bit_AVX512VNNI): New bit.
4206         * config/i386/driver-i386.c (host_detect_local_cpu): Handle new bit.
4207         * config/i386/i386-c (__AVX512VNNI__): New.
4208         * config/i386/i386.c (ix86_target_string): Handle new option.
4209         (ix86_valid_target_attribute_inner_p): Handle new option.
4210         * config/i386/i386.h (TARGET_AVX512VNNI, TARGET_AVX512VNNI_P): New.
4211         * config/i386/i386.opt (mavx512vnni): New option.
4212
4213 2017-12-01  Jan Hubicka  <hubicka@ucw.cz>
4214
4215         PR target/81616
4216         * athlon.md: Disable for generic.
4217         * haswell.md: Enable for generic.
4218         * i386.c (ix86_sched_init_global): Add core hooks for generic.
4219         * x86-tune-sched.c (ix86_issue_rate): Increase issue rate for generic
4220         to 4.
4221         (ix86_adjust_cost): Move generic to haswell path.
4222
4223 2017-12-04  Eric Botcazou  <ebotcazou@adacore.com>
4224
4225         * config/sparc/sparc.c (sparc_do_work_around_errata): Use mem_ref
4226         instead of MEM_P in a couple more places.  Fix formatting issues.
4227
4228 2017-12-04  Jim Wilson  <jimw@sifive.com>
4229
4230         * config/riscv/riscv.c (riscv_for_each_saved_reg): Use GP_REG_LAST
4231         instead of GP_REG_LAST-1.
4232         (riscv_adjust_libcall_cfi_prologue): Likewise.
4233         (riscv_adjust_libcall_cri_epilogue): Likewise.
4234         * config/riscv/riscv.h (CALL_USED_REGISTERS): Change a6 to t6 in
4235         comment.
4236
4237 2017-12-04  Luis Machado  <luis.machado@linaro.org>
4238
4239         * ipa-pure-const.c (check_decl): Add missing newline.
4240         (state_from_flags): Likewise.
4241
4242 2017-12-04  Jeff Law  <law@redhat.com>
4243
4244         PR tree-optimizatin/78496
4245         * gimple-ssa-evrp-analyze.h
4246         (evrp_range_analyzer::get_vr_values): Simplify.
4247         * gimple-ssa-evrp-analyze.c: Corresponding changes.
4248         * tree-ssa-dom.c: Include alloc-pool.h, tree-vrp.h, vr-values.h
4249         and gimple-ssa-evrp-analyze.h.
4250         (dom_opt_dom_walker class): Add evrp_range_analyzer member.
4251         (simplify_stmt_for_jump_threading): Copy a blob of code from
4252         tree-vrp.c to use ranges to simplify statements.
4253         (dom_opt_dom_walker::before_dom_children): Call
4254         evrp_range_analyzer::{enter,record_ranges_from_stmt} methods.
4255         (dom_opt_dom_walker::after_dom_children): Similarly for
4256         evrp_range_analyzer::leave.
4257         (dom_opt_dom_walker::optimize_stmt): Use EVRP ranges to optimize
4258         conditionals.
4259
4260         * gimple-ssa-evrp-analyze.c
4261         (evrp_range_analyzer::extract_range_from_stmt):  Always use
4262         vr_values::update_value_range so preexisting range info is
4263         medged with new range info, even if the new range is VR_VARYING.
4264
4265 2017-12-04  Segher Boessenkool  <segher@kernel.crashing.org>
4266
4267         * combine.c: Adjust comment.
4268         (use_crosses_set_p): Delete.
4269         (can_combine_p): Use modified_between_p instead of use_crosses_set_p.
4270         (try_combine): Ditto.
4271
4272 2017-12-04  Richard Biener  <rguenther@suse.de>
4273
4274         PR tree-optimization/83255
4275         * graphite-isl-ast-to-gimple.c (translate_isl_ast_node_for):
4276         Re-add zero-iteration check.
4277
4278 2017-12-04  Segher Boessenkool  <segher@kernel.crashing.org>
4279
4280         PR rtl-optimization/83245
4281         * lra.c (collect_non_operand_hard_regs): Treat clobbers of non-operand
4282         hard registers as earlyclobber, also if not in an asm.
4283
4284 2017-12-04  Segher Boessenkool  <segher@kernel.crashing.org>
4285
4286         PR bootstrap/83265
4287         Revert
4288         2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
4289
4290         PR target/43871
4291         * config/rs6000/rs6000.c (rs6000_option_override_internal): Set
4292         rs6000_cpu based on cpu_index, not tune_index.
4293
4294 2017-12-04  Richard Biener  <rguenther@suse.de>
4295
4296         PR tree-optimization/83238
4297         * graphite-scop-detection.c (scop_detection::merge_sese): Make
4298         code match comment, rejecting invalid SESE regions.
4299
4300 2017-12-03  John David Anglin  <danglin@gcc.gnu.org>
4301
4302         * config/pa/pa.c (pa_legitimate_address_p): For scaled indexing,
4303         require base operand is a REG_POINTER prior to reload on targets
4304         with non-equivalent space registers.
4305
4306 2017-12-01  Jan Hubicka  <hubicka@ucw.cz>
4307
4308         * ipa-cp.c (ipcp_lattice<valtype>::print): Update dumping.
4309         (update_specialized_profile): Fix updating of counts.
4310         (perhaps_add_new_callers): Likewise.
4311
4312 2017-12-01  Jan Hubicka  <hubicka@ucw.cz>
4313
4314         PR target/81616
4315         * x86-tune.def: Remove obsolette FIXMEs.
4316         (X86_TUNE_PARTIAL_FLAG_REG_STALL): Disable for generic
4317         (X86_TUNE_FUSE_CMP_AND_BRANCH_32, X86_TUNE_FUSE_CMP_AND_BRANCH_64,
4318         X86_TUNE_FUSE_CMP_AND_BRANCH_SOFLAGS, X86_TUNE_FUSE_ALU_AND_BRANCH):
4319         Enable for generic.
4320         (X86_TUNE_PAD_RETURNS): Disable for generic.
4321
4322 2017-12-02  Jakub Jelinek  <jakub@redhat.com>
4323
4324         PR tree-optimization/83170
4325         PR tree-optimization/83241
4326         * gimple-ssa-store-merging.c
4327         (imm_store_chain_info::try_coalesce_bswap): Update vuse field from
4328         gimple_vuse (ins_stmt) in case it has changed.
4329         (imm_store_chain_info::output_merged_store): Likewise.
4330
4331         * tree-chkp.c (chkp_compute_bounds_for_assignment): Handle
4332         POINTER_DIFF_EXPR.
4333
4334         PR c++/81212
4335         * tree-cfg.c (pass_warn_function_return::execute): Handle
4336         __builtin_ubsan_handle_missing_return like __builtin_unreachable
4337         with BUILTINS_LOCATION.
4338
4339         PR target/78643
4340         PR target/80583
4341         * expr.c (get_inner_reference): If DECL_MODE of a non-bitfield
4342         is BLKmode for vector field with vector raw mode, use TYPE_MODE
4343         instead of DECL_MODE.
4344
4345         * config/i386/i386-protos.h (standard_sse_constant_opcode): Change
4346         last argument to rtx pointer.
4347         * config/i386/i386.c (standard_sse_constant_opcode): Replace X argument
4348         with OPERANDS.  For AVX+ 128-bit VEX encoded instructions over 256-bit
4349         or 512-bit.  If setting EXT_REX_SSE_REG_P, use EVEX encoded insn
4350         depending on the chosen ISAs.
4351         * config/i386/i386.md (*movxi_internal_avx512f, *movoi_internal_avx,
4352         *movti_internal, *movdi_internal, *movsi_internal, *movtf_internal,
4353         *movdf_internal, *movsf_internal): Adjust standard_sse_constant_opcode
4354         callers.
4355         * config/i386/sse.md (mov<mode>_internal): Likewise.
4356         * config/i386/mmx.md (*mov<mode>_internal): Likewise.
4357
4358 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
4359
4360         * doc/invoke.texi (-dp): Say that instruction cost is printed as well.
4361
4362 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
4363
4364         * config/rs6000/rs6000-protos.h (emit_fusion_addis): Remove last two
4365         parameters from prototype.
4366         * config/rs6000/rs6000.c (emit_fusion_addis): Remove last two
4367         parameters.  Don't print a comment.
4368         (emit_fusion_gpr_load): Adjust.
4369         (emit_fusion_load_store): Adjust.
4370         * config/rs6000/rs6000.md (*fusion_p9_<mode>_constant): Adjust.
4371         * config/rs6000/vsx.md (two peepholes): Print the "vector load fusion"
4372         comment on the second line.
4373
4374 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
4375
4376         PR target/43871
4377         * config/rs6000/rs6000.c (rs6000_option_override_internal): Set
4378         rs6000_cpu based on cpu_index, not tune_index.
4379
4380 2017-12-01  Segher Boessenkool  <segher@kernel.crashing.org>
4381
4382         * final.c (output_asm_name): Print insn_cost.  Shorten output.  Print
4383         which_alternative instead of which_alternative + 1.
4384         (output_asm_insn): Print an extra tab if the template is short.
4385
4386 2017-12-01  Jim Wilson  <jimw@sifive.com>
4387
4388         * common.opt (use_gnu_debug_info_extensions): Delete DWARF_DEBUG from
4389         comment.
4390         * config/vx-common.h (DWARF_DEBUGGING_INFO): Delete undef.
4391         * doc/tm.texi.in (PREFERRED_DEBUGGING_TYPE): Delete DWARF_DEBUG
4392         reference.
4393         * doc/tm.texi: Regenerate.
4394
4395 2017-12-01  Michael Meissner  <meissner@linux.vnet.ibm.com>
4396
4397         PR target/81959
4398         * config/rs6000/rs6000.c (rs6000_address_for_fpconvert): Check for
4399         whether we can allocate pseudos before trying to fix an address.
4400         * config/rs6000/rs6000.md (float_<mode>si2_hw): Make sure the
4401         memory address is indexed or indirect.
4402         (floatuns_<mode>si2_hw2): Likewise.
4403
4404 2017-12-01  Jason Merrill  <jason@redhat.com>
4405
4406         * Makefile.in (TAGS): Add c-family/*.cc.
4407
4408 2017-12-01  Wilco Dijkstra  <wdijkstr@arm.com>
4409
4410         * config/aarch64/aarch64.md (call_insn): Use %c rather than %a.
4411         (call_value_insn): Likewise.
4412         (sibcall_insn): Likewise.
4413         (sibcall_value_insn): Likewise.
4414         (movsi_aarch64): Likewise.
4415         (movdi_aarch64): Likewise.
4416         (add_losym_): Likewise.
4417         (ldr_got_small_): Likewise.
4418         (ldr_got_small_sidi): Likewise.
4419         (ldr_got_small_28k_): Likewise.
4420         (ldr_got_small_28k_sidi): Likewise.
4421         * config/aarch64/aarch64.c (aarch64_print_address_internal):
4422         Move output_addr_const to symbolic case. Add error check.
4423
4424 2017-12-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
4425
4426         * config/s390/predicates.md (plus16_Q_operand): New predicate.
4427         * config/s390/s390.md: Disable MVC merging peephole if it would
4428         disable operand forwarding.
4429         (new peephole2): Split MVCs if it would turn them into up to 2
4430         forwardable MVCs.
4431
4432 2017-12-01  Richard Biener  <rguenther@suse.de>
4433
4434         PR tree-optimization/83232
4435         * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Fix
4436         detection of same access. Instead of breaking the group here
4437         do not consider the duplicate.  Add comment explaining real fix.
4438
4439 2017-12-01  Jonathan Wakely  <jwakely@redhat.com>
4440
4441         * doc/md.texi (Insn Splitting): Fix "central flowgraph" typo.
4442
4443 2017-12-01  Sudakshina Das  <sudi.das@arm.com>
4444
4445         * config/arm/vfp.md (*movhf_vfp_fp16): Add conds attribute.
4446
4447 2017-12-01  Jakub Jelinek  <jakub@redhat.com>
4448
4449         * function.h (struct function): Remove cilk_frame_decl,
4450         is_cilk_function and calls_cilk_spawn fields.
4451         * tree-inline.h (struct copy_body_data): Remove remap_var_for_cilk
4452         field.
4453         * omp-simd-clone.c (simd_clone_clauses_extract): Don't clear
4454         cilk_elemental field.
4455         * cgraph.h (struct cgraph_simd_clone): Remove cilk_elemental field.
4456         * target.def: Adjust comment.
4457         * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
4458         Don't test cilk_elemental.
4459
4460         PR tree-optimization/83233
4461         * gimple-ssa-store-merging.c (nop_stats, bswap_stats): Use
4462         bswap_stat name for the struct.
4463
4464         PR c/79153
4465         * tree.h (SWITCH_BREAK_LABEL_P): Define.
4466         * gimplify.c (collect_fallthrough_labels): Handle GIMPLE_BIND
4467         starting with a GIMPLE_SWITCH and ending with GIMPLE_LABEL with
4468         SWITCH_BREAK_LABEL_P set on the label.
4469         (gimplify_switch_expr): Set SWITCH_BREAK_LABEL_P on the label
4470         added for default case if it was missing and not all cases covered.
4471         Wrap GIMPLE_SWITCH and the switch_body_seq into a GIMPLE_BIND if
4472         switch_body_seq ends with a GIMPLE_LABEL with SWITCH_BREAK_LABEL_P
4473         set on the label.
4474         * tree-chrec.c (evolution_function_is_univariate_p): Add return true;
4475         to avoid -Wimplicit-fallthrough warning.
4476         * config/i386/i386.c (ix86_expand_special_args_builtin): Add
4477         FALLTHRU comment to avoid -Wimplicit-fallthrough warning.
4478
4479         PR tree-optimization/83221
4480         * tree-ssa-reassoc.c (sort_by_operand_rank): Shift bb_rank
4481         down by 16.
4482         (init_reassoc): Formatting fix.
4483
4484         PR sanitizer/81275
4485         * tree-cfg.c (group_case_labels_stmt): Don't optimize away
4486         C++ FE implicitly added __builtin_unreachable () until -Wreturn-type
4487         is diagnosed.
4488
4489         PR sanitizer/83219
4490         * tree-cfg.c: Include asan.h.
4491         (gimple_seq_unreachable_p): Return false for -fsanitize=unreachable.
4492
4493 2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>
4494
4495         * config/i386/i386.md: Fix AVX512 register width in AVX512 instruction.
4496
4497 2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>
4498
4499         * config/i386/i386.c (standard_sse_constant_opcode): Fix wrong form for
4500         vpcmpeqd instruction.
4501
4502 2017-12-01  Sergey Shalnov  <Sergey.Shalnov@intel.com>
4503
4504         * config/i386/i386.c (standard_sse_constant_opcode): Fix
4505         registers type for 128bit mode.
4506
4507 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
4508
4509         * spellcheck-tree.c (test_find_closest_identifier): Use ; instead
4510         of ;;.
4511         * gengtype-state.c (read_state_pair): Likewise.
4512         * gimple-fold.c (gimple_fold_builtin_string_compare): Likewise.
4513         * sel-sched-dump.c (dump_insn_rtx_1): Likewise.
4514         * ipa-cp.c (intersect_aggregates_with_edge): Likewise.
4515         * ifcvt.c (noce_try_store_flag_constants): Likewise.
4516         * tree-ssa-ccp.c (ccp_finalize): Likewise.
4517         * omp-grid.c (grid_process_kernel_body_copy): Likewise.
4518         * builtins.c (fold_builtin_3): Likewise.
4519         * graphite-scop-detection.c
4520         (scop_detection::stmt_has_simple_data_refs_p): Likewise.
4521         * hsa-gen.c (hsa_function_representation::hsa_function_representation):
4522         Likewise.
4523
4524 2017-12-01  Maxim Ostapenko  <m.ostapenko@samsung.com>
4525
4526         PR sanitizer/81697
4527         * asan.c (asan_protect_global): Add new ignore_decl_rtl_set_p
4528         parameter. Return true if ignore_decl_rtl_set_p is true and other
4529         conditions are satisfied.
4530         * asan.h (asan_protect_global): Add new parameter.
4531         * varasm.c (categorize_decl_for_section): Pass true as second parameter
4532         to asan_protect_global calls.
4533
4534 2017-11-30  Jim Wilson  <jimw@sifive.com>
4535
4536         * doc/invoke.texi (RISC-V Options): Delete nonexistent -mmemcpy and
4537         -mno-memcpy options.  For -mplt, -mfdiv, -mdiv, -msave-restore, and
4538         -mstrict-align, add info on default value.  Delete redundant lines for
4539         -mabi.  Add missing -mexplicit-relocs docs.
4540
4541 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
4542
4543         * config/arc/arc.md (trap): New pattern.
4544
4545 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
4546
4547         * config/arc/arc.c (hwloop_optimize): Prevent the last ZOL
4548         instruction to end into a delay slot.
4549         * config/arc/arc.md (cond_delay_insn): Check if the instruction
4550         can be placed into a delay slot against reg_note.
4551
4552 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
4553
4554         * config/arc/arc.c (hwloop_optimize): Update hw-loop's end/start
4555         labels number of usages.
4556
4557 2017-11-30  Claudiu Zissulescu  <claziss@synopsys.com>
4558
4559         * config/arc/arc.c (arc_cannot_substitue_mem_equiv_p): New
4560         function.
4561         (TARGET_CANNOT_SUBSTITUTE_MEM_EQUIV_P): Define.
4562
4563 2017-11-30  Jakub Jelinek  <jakub@redhat.com>
4564
4565         PR target/83210
4566         * internal-fn.c (expand_mul_overflow): Optimize unsigned
4567         multiplication by power of 2 constant into two shifts + comparison.
4568
4569 2017-11-30  Jan Hubicka  <hubicka@ucw.cz>
4570
4571         PR target/81616
4572         * config/i386/x86-tune-costs.h (generic_cost): Revise for modern CPUs.
4573
4574 2017-11-30  Richard Biener  <rguenther@suse.de>
4575
4576         PR tree-optimization/83202
4577         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Add
4578         allow_peel argument and guard peeling.
4579         (canonicalize_loop_induction_variables): Likewise.
4580         (canonicalize_induction_variables): Pass false.
4581         (tree_unroll_loops_completely_1): Pass unroll_outer to disallow
4582         peeling from cunrolli.
4583
4584 2017-11-29  Segher Boessenkool  <segher@kernel.crashing.org>
4585
4586         * combine.c (try_combine): Print a message to dump file whenever
4587         I0, I1, or I2 cannot be combined into I3.
4588
4589 2017-11-29  Segher Boessenkool  <segher@kernel.crashing.org>
4590
4591         PR rtl-optimization/83156
4592         PR rtl-optimization/82621
4593         * combine.c (try_combine): Don't split an I2 if one of the dests is
4594         set again before I3.  Allow unused dests.
4595
4596 2017-11-29  Segher Boessenkool  <segher@kernel.crashing.org>
4597
4598         * config/rs6000/rs6000.md (*add<mode>3_carry_in_internal2): New.
4599
4600 2017-11-29  Vladimir Makarov  <vmakarov@redhat.com>
4601
4602         PR rtl-optimization/80818
4603         * lra.c (collect_non_operand_hard_regs): New arg insn.  Pass it
4604         recursively.  Use insn code for clobber.
4605         (lra_set_insn_recog_data): Pass the new arg to
4606         collect_non_operand_hard_regs.
4607         (add_regs_to_insn_regno_info): Pass insn instead of uid.  Use insn
4608         code for clobber.
4609         (lra_update_insn_regno_info): Pass insn to
4610         add_regs_to_insn_regno_info.
4611
4612 2017-11-29  Jim Wilson  <jimw@sifive.com>
4613             Andrew Waterman  <andrew@sifive.com>
4614
4615         * config/riscv/riscv.c (SINGLE_SHIFT_COST): New.
4616         (riscv_rtx_costs): Case ZERO_EXTRACT, match new pattern, and return
4617         SINGLE_SHIFT_COST.  Case LT and ZERO_EXTEND, likewise.  Case ASHIFT,
4618         use SINGLE_SHIFT_COST.
4619         * config/riscv/riscv.md (lshrsi3_zero_extend_1): New.
4620         (lshrsi3_zero_extend_2, lshrsi3_zero_extend_3): New.
4621
4622 2017-11-29  Julia Koval  <julia.koval@intel.com>
4623
4624         * config/i386/avx512vbmi2intrin.h (_mm512_shldv_epi16,
4625         _mm512_mask_shldv_epi16, _mm512_maskz_shldv_epi16, _mm512_shldv_epi32,
4626         _mm512_mask_shldv_epi32, _mm512_maskz_shldv_epi32, _mm512_shldv_epi64,
4627         _mm512_mask_shldv_epi64, _mm512_maskz_shldv_epi64): New intrinsics.
4628         * config/i386/avx512vbmi2vlintrin.h (_mm256_shldv_epi16,
4629         _mm256_mask_shldv_epi16, _mm256_maskz_shldv_epi16, _mm256_shldv_epi32,
4630         _mm256_mask_shldv_epi32, _mm256_maskz_shldv_epi32, _mm256_shldv_epi64,
4631         _mm256_mask_shldv_epi64, _mm256_maskz_shldv_epi64, _mm_shldv_epi16,
4632         _mm_mask_shldv_epi16, _mm_maskz_shldv_epi16, _mm_shldv_epi32,
4633         _mm_mask_shldv_epi32, _mm_maskz_shldv_epi32, _mm_shldv_epi64,
4634         _mm_mask_shldv_epi64, _mm_maskz_shldv_epi64): Ditto.
4635         * config/i386/i386-builtin.def (__builtin_ia32_vpshldv_v32hi,
4636         __builtin_ia32_vpshldv_v32hi_mask, __builtin_ia32_vpshldv_v32hi_maskz,
4637         __builtin_ia32_vpshldv_v16hi, __builtin_ia32_vpshldv_v16hi_mask,
4638         __builtin_ia32_vpshldv_v16hi_maskz, __builtin_ia32_vpshldv_v8hi,
4639         __builtin_ia32_vpshldv_v8hi_mask, __builtin_ia32_vpshldv_v8hi_maskz,
4640         __builtin_ia32_vpshldv_v16si, __builtin_ia32_vpshldv_v16si_mask,
4641         __builtin_ia32_vpshldv_v16si_maskz, __builtin_ia32_vpshldv_v8si,
4642         __builtin_ia32_vpshldv_v8si_mask, __builtin_ia32_vpshldv_v8si_maskz,
4643         __builtin_ia32_vpshldv_v4si, __builtin_ia32_vpshldv_v4si_mask,
4644         __builtin_ia32_vpshldv_v4si_maskz, __builtin_ia32_vpshldv_v8di,
4645         __builtin_ia32_vpshldv_v8di_mask, __builtin_ia32_vpshldv_v8di_maskz,
4646         __builtin_ia32_vpshldv_v4di, __builtin_ia32_vpshldv_v4di_mask,
4647         __builtin_ia32_vpshldv_v4di_maskz, __builtin_ia32_vpshldv_v2di,
4648         __builtin_ia32_vpshldv_v2di_mask,
4649         __builtin_ia32_vpshldv_v2di_maskz): New builtins.
4650         * config/i386/sse.md (vpshldv_<mode>, vpshldv_<mode>_mask,
4651         vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): New patterns.
4652
4653 2017-11-29  Julia Koval  <julia.koval@intel.com>
4654
4655         * config/i386/avx512vbmi2intrin.h (_mm512_shrdv_epi16,
4656         _mm512_mask_shrdv_epi16, _mm512_maskz_shrdv_epi16, _mm512_shrdv_epi32,
4657         _mm512_mask_shrdv_epi32, _mm512_maskz_shrdv_epi32, _mm512_shrdv_epi64,
4658         _mm512_mask_shrdv_epi64, _mm512_maskz_shrdv_epi64): New intrinsics.
4659         * config/i386/avx512vbmi2vlintrin.h (_mm256_shrdv_epi16,
4660         _mm256_mask_shrdv_epi16, _mm256_maskz_shrdv_epi16, _mm256_shrdv_epi32,
4661         _mm256_mask_shrdv_epi32, _mm256_maskz_shrdv_epi32, _mm256_shrdv_epi64,
4662         _mm256_mask_shrdv_epi64, _mm256_maskz_shrdv_epi64, _mm_shrdv_epi16,
4663         _mm_mask_shrdv_epi16, _mm_maskz_shrdv_epi16, _mm_shrdv_epi32,
4664         _mm_mask_shrdv_epi32, _mm_maskz_shrdv_epi32, _mm_shrdv_epi64,
4665         _mm_mask_shrdv_epi64, _mm_maskz_shrdv_epi64): Ditto.
4666         * config/i386/i386-builtin-types.def (V32HI_FTYPE_V32HI_V32HI_V32HI,
4667         V32HI_FTYPE_V32HI_V32HI_V32HI_INT, V16HI_FTYPE_V16HI_V16HI_V16HI_INT,
4668         V8HI_FTYPE_V8HI_V8HI_V8HI_INT, V8SI_FTYPE_V8SI_V8SI_V8SI_INT,
4669         V4SI_FTYPE_V4SI_V4SI_V4SI_INT, V8DI_FTYPE_V8DI_V8DI_V8DI,
4670         V8DI_FTYPE_V8DI_V8DI_V8DI_INT, V4DI_FTYPE_V4DI_V4DI_V4DI_INT,
4671         V16SI_FTYPE_V16SI_V16SI_V16SI, V16SI_FTYPE_V16SI_V16SI_V16SI_INT,
4672         V2DI_FTYPE_V2DI_V2DI_V2DI_INT): New types.
4673         * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
4674         * config/i386/sse.md (vpshrdv_<mode>, vpshrdv_<mode>_mask,
4675         vpshrdv_<mode>_maskz, vpshrdv_<mode>_maskz_1): New pattern.
4676
4677 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
4678
4679         * config/sparc/sparc.c (sparc_do_work_around_errata): Treat the
4680         movsi_pic_gotdata_op instruction as a load for the UT699 errata
4681         workaround.
4682
4683 2017-11-29  Martin Aberg  <maberg@gaisler.com>
4684
4685         * config/sparc/sparc.md (divdf3_fix): Add NOP and adjust length
4686         to prevent b2bst errata sequence.
4687         (sqrtdf2_fix): Likewise.
4688
4689 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
4690
4691         * config/sparc/sparc.c (fpop_reg_depend_p): New function.
4692         (div_sqrt_insn_p): New function.
4693         (sparc_do_work_around_errata): Insert NOP instructions to
4694         prevent sequences that could trigger the TN-0013 errata for
4695         certain LEON3 processors.
4696         (pass_work_around_errata::gate): Also test sparc_fix_lost_divsqrt.
4697         (sparc_option_override): Set sparc_fix_lost_divsqrt appropriately.
4698         * config/sparc/sparc.md (fix_lost_divsqrt): New attribute.
4699         (in_branch_delay): Prevent div and sqrt in delay slot if
4700         fix_lost_divsqrt.
4701         * config/sparc/sparc.opt (sparc_fix_lost_divsqrt): New variable.
4702
4703 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
4704
4705         * config/sparc/sparc.c (atomic_insn_p): New function.
4706         (sparc_do_work_around_errata): Insert NOP instructions to
4707         prevent sequences that could trigger the TN-0010 errata for
4708         UT700.
4709         * config/sparc/sync.md (atomic_compare_and_swap_leon3_1): Make
4710         instruction referable in atomic_insns_p.
4711
4712 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
4713
4714         * config/sparc/sync.md (swapsi): 16-byte align if sparc_fix_gr712rc.
4715         (atomic_compare_and_swap_leon3_1): Likewise.
4716         (ldstub): Likewise.
4717
4718 2017-11-29  Daniel Cederman  <cederman@gaisler.com>
4719
4720         * config/sparc/sparc.c (fpop_insn_p): New function.
4721         (sparc_do_work_around_errata): Insert NOP instructions to
4722         prevent sequences that could trigger the TN-0012 errata for
4723         GR712RC.
4724         (pass_work_around_errata::gate): Also test sparc_fix_gr712rc.
4725         * config/sparc/sparc.md (fix_gr712rc): New attribute.
4726         (in_branch_annul_delay): Prevent floating-point instructions
4727         in delay slot of annulled integer branch.
4728
4729 2017-11-29  Richard Biener  <rguenther@suse.de>
4730
4731         PR tree-optimization/83202
4732         * tree-vect-slp.c (scalar_stmts_set_t): New typedef.
4733         (bst_fail): Use it.
4734         (vect_analyze_slp_cost_1): Add visited set, do not account SLP
4735         nodes vectorized to the same stmts multiple times.
4736         (vect_analyze_slp_cost): Allocate a visited set and pass it down.
4737         (vect_analyze_slp_instance): Adjust.
4738         (scalar_stmts_to_slp_tree_map_t): New typedef.
4739         (vect_schedule_slp_instance): Add a map recording the SLP node
4740         representing the vectorized stmts for a set of scalar stmts.
4741         Avoid code-generating redundancies.
4742         (vect_schedule_slp): Allocate map and pass it down.
4743
4744 2017-11-29  Nathan Sidwell  <nathan@acm.org>
4745
4746         PR c++/83187
4747         * tree.c (build_complex_type): Fix canonicalization.  Only fill in
4748         type if it is new.
4749
4750 2017-11-29  Wilco Dijkstra  <wdijkstr@arm.com>
4751
4752         * config/aarch64/aarch64.c (aarch64_print_operand): Add new
4753         cases for printing LDP/STP memory addresses.
4754         (aarch64_print_address_internal): Renamed from
4755         aarch64_print_operand_address, added parameter, add Pmode check.
4756         (aarch64_print_ldpstp_address): New function for LDP/STP addresses.
4757         (aarch64_print_operand_address): Indirect to
4758         aarch64_print_address_internal.
4759         * config/aarch64/aarch64-simd.md (store_pair_lanes): Use new
4760         'y' operand output specifier.
4761
4762 2017-11-29  Jakub Jelinek  <jakub@redhat.com>
4763
4764         PR middle-end/83185
4765         * tree.c (build_simple_mem_ref_loc): Handle
4766         get_addr_base_and_unit_offset returning a MEM_REF.
4767
4768         PR middle-end/80929
4769         * rtlanal.c (seq_cost): For non-single_set insns try to use insn_cost.
4770
4771         PR target/80819
4772         * config/i386/sse.md (vec_concatv2di): Remove * from (=Yr,0,*rm)
4773         alternative.
4774
4775 2017-11-28  David Malcolm  <dmalcolm@redhat.com>
4776
4777         * diagnostic-show-locus.c (layout::print_trailing_fixits): Handle
4778         m_x_offset.
4779         (layout::move_to_column): Likewise.
4780
4781 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
4782
4783         PR sanitizer/81275
4784         * tree.c (block_may_fallthru): Return false if SWITCH_ALL_CASES_P
4785         is set on SWITCH_EXPR and !block_may_fallthru (SWITCH_BODY ()).
4786
4787 2017-11-28  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
4788             Martin Jambor  <mjambor@suse.cz>
4789
4790         PR ipa/82808
4791         * tree.h (expr_type_first_operand_type_p): Declare
4792         * tree.c (expr_type_first_operand_type_p): New function.
4793         * ipa-prop.h (ipa_get_type): Allow i to be out of bounds.
4794         (ipa_value_from_jfunc): Adjust declaration.
4795         * ipa-cp.c (ipa_get_jf_pass_through_result): New parameter RES_TYPE.
4796         Use it as result type for arithmetics, unless it is NULL in which case
4797         be more conservative.
4798         (ipa_value_from_jfunc): New parameter PARM_TYPE, pass it to
4799         ipa_get_jf_pass_through_result.
4800         (propagate_vals_across_pass_through): Likewise.
4801         (propagate_scalar_across_jump_function): New parameter PARM_TYPE, pass
4802         is to propagate_vals_across_pass_through.
4803         (propagate_constants_across_call): Pass PARM_TYPE to
4804         propagate_scalar_across_jump_function.
4805         (find_more_scalar_values_for_callers_subset): Pass parameter type to
4806         ipa_value_from_jfunc.
4807         (cgraph_edge_brings_all_scalars_for_node): Likewise.
4808         * ipa-fnsummary.c (evaluate_properties_for_edge): Renamed parms_info
4809         to caller_parms_info, pass parameter type to ipa_value_from_jfunc.
4810         * ipa-prop.c (try_make_edge_direct_simple_call): New parameter
4811         target_type, pass it to ipa_value_from_jfunc.
4812         (update_indirect_edges_after_inlining): Pass parameter type to
4813         try_make_edge_direct_simple_call.
4814
4815 2017-11-28  Jeff Law  <law@redhat.com>
4816
4817         * gimple-ssa-evrp-analyze.c
4818         (evrp_range_analyzer::record_ranges_from_phis): Only use SCEV to
4819         refine ranges if scev_initialized_p returns true.
4820         * vr-values.c (vr_values::extract_range_from_phi_node): Likewise.
4821
4822 2017-11-28  Julia Koval  <julia.koval@intel.com>
4823
4824         * config/i386/avx512vbmi2intrin.h (_mm512_shrdi_epi16,
4825         _mm512_mask_shrdi_epi16, _mm512_maskz_shrdi_epi16, _mm512_shrdi_epi32,
4826         _mm512_mask_shrdi_epi32, _mm512_maskz_shrdi_epi32, _mm512_shrdi_epi64,
4827         _mm512_mask_shrdi_epi64, _mm512_maskz_shrdi_epi64): New intrinsics.
4828         * config/i386/avx512vbmi2vlintrin.h (_mm256_shrdi_epi16,
4829         _mm256_mask_shrdi_epi16, _mm256_maskz_shrdi_epi16,
4830         _mm256_mask_shrdi_epi32, _mm256_maskz_shrdi_epi32, _mm256_shrdi_epi32,
4831         _mm256_mask_shrdi_epi64, _mm256_maskz_shrdi_epi64, _mm256_shrdi_epi64,
4832         _mm_mask_shrdi_epi16, _mm_maskz_shrdi_epi16, _mm_shrdi_epi16,
4833         _mm_mask_shrdi_epi32, _mm_maskz_shrdi_epi32, _mm_shrdi_epi32,
4834         _mm_mask_shrdi_epi64, _mm_maskz_shrdi_epi64, _mm_shrdi_epi64): Ditto.
4835         * config/i386/i386-builtin.def (__builtin_ia32_vpshrd_v32hi,
4836         __builtin_ia32_vpshrd_v32hi_mask, __builtin_ia32_vpshrd_v16hi,
4837         __builtin_ia32_vpshrd_v16hi_mask, __builtin_ia32_vpshrd_v8hi,
4838         __builtin_ia32_vpshrd_v8hi_mask, __builtin_ia32_vpshrd_v16si,
4839         __builtin_ia32_vpshrd_v16si_mask, __builtin_ia32_vpshrd_v8si,
4840         __builtin_ia32_vpshrd_v8si_mask, __builtin_ia32_vpshrd_v4si,
4841         __builtin_ia32_vpshrd_v4si_mask, __builtin_ia32_vpshrd_v8di,
4842         __builtin_ia32_vpshrd_v8di_mask, __builtin_ia32_vpshrd_v4di,
4843         __builtin_ia32_vpshrd_v4di_mask, __builtin_ia32_vpshrd_v2di,
4844         __builtin_ia32_vpshrd_v2di_mask): New builtins.
4845         * config/i386/sse.md (vpshrd_<mode><mask_name>): New pattern.
4846
4847 2017-11-28  Julia Koval  <julia.koval@intel.com>
4848
4849         * config/i386/avx512vbmi2intrin.h (_mm512_shldi_epi16,
4850         _mm512_mask_shldi_epi16, _mm512_maskz_shldi_epi16, _mm512_shldi_epi32,
4851         _mm512_mask_shldi_epi32, _mm512_maskz_shldi_epi32, _mm512_shldi_epi64,
4852         _mm512_mask_shldi_epi64, _mm512_maskz_shldi_epi64): New intrinsics.
4853         * config/i386/avx512vbmi2vlintrin.h (_mm256_shldi_epi16,
4854         _mm256_mask_shldi_epi16, _mm256_maskz_shldi_epi16,
4855         _mm256_mask_shldi_epi32, _mm256_maskz_shldi_epi32, _mm256_shldi_epi32,
4856         _mm256_mask_shldi_epi64, _mm256_maskz_shldi_epi64, _mm256_shldi_epi64,
4857         _mm_mask_shldi_epi16, _mm_maskz_shldi_epi16, _mm_shldi_epi16,
4858         _mm_mask_shldi_epi32, _mm_maskz_shldi_epi32, _mm_shldi_epi32,
4859         _mm_mask_shldi_epi64, _mm_maskz_shldi_epi64, _mm_shldi_epi64): Ditto.
4860         * config/i386/i386-builtin-types.def (V32HI_FTYPE_V32HI_V32HI_INT,
4861         V32HI_FTYPE_V32HI_V32HI_INT_V32HI_INT, V16SI_FTYPE_V16SI_V16SI_INT,
4862         V16SI_FTYPE_V16SI_V16SI_INT_V16SI_INT,
4863         V8DI_FTYPE_V8DI_V8DI_INT_V8DI_INT, V8SI_FTYPE_V8SI_V8SI_INT_V8SI_INT,
4864         V16HI_FTYPE_V16HI_V16HI_INT_V16HI_INT,
4865         V4DI_FTYPE_V4DI_V4DI_INT_V4DI_INT,
4866         V8HI_FTYPE_V8HI_V8HI_INT_V8HI_INT,
4867         V4SI_FTYPE_V4SI_V4SI_INT_V4SI_INT,
4868         V2DI_FTYPE_V2DI_V2DI_INT_V2DI_INT): New types.
4869         * config/i386/i386-builtin.def (__builtin_ia32_vpshld_v32hi,
4870         __builtin_ia32_vpshld_v32hi_mask, __builtin_ia32_vpshld_v16hi,
4871         __builtin_ia32_vpshld_v16hi_mask, __builtin_ia32_vpshld_v8hi,
4872         __builtin_ia32_vpshld_v8hi_mask, __builtin_ia32_vpshld_v16si,
4873         __builtin_ia32_vpshld_v16si_mask, __builtin_ia32_vpshld_v8si,
4874         __builtin_ia32_vpshld_v8si_mask, __builtin_ia32_vpshld_v4si,
4875         __builtin_ia32_vpshld_v4si_mask, __builtin_ia32_vpshld_v8di,
4876         __builtin_ia32_vpshld_v8di_mask, __builtin_ia32_vpshld_v4di,
4877         __builtin_ia32_vpshld_v4di_mask, __builtin_ia32_vpshld_v2di,
4878         __builtin_ia32_vpshld_v2di_mask): New builtins.
4879         * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
4880         * config/i386/sse.md (vpshld_<mode><mask_name>): New pattern.
4881
4882 2017-11-28  Richard Biener  <rguenther@suse.de>
4883
4884         PR tree-optimization/80776
4885         * gimple-ssa-evrp-analyze.h (evrp_range_analyzer::set_ssa_range_info):
4886         Declare.
4887         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::set_ssa_range_info):
4888         New function.
4889         (evrp_range_analyzer::record_ranges_from_incoming_edges):
4890         If the incoming edge is an effective fallthru because the other
4891         edge only reaches a __builtin_unreachable () then record ranges
4892         derived from the controlling condition in SSA info.
4893         (evrp_range_analyzer::record_ranges_from_phis): Use set_ssa_range_info.
4894         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
4895
4896 2017-11-28  Olivier Hainque  <hainque@adacore.com>
4897
4898         * Makefile.in (SELFTEST_FLAGS): Use nul instead of /dev/null
4899         on mingw build hosts.
4900
4901 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
4902
4903         PR debug/81307
4904         * dbxout.c (dbx_block_with_cold_children): Fix function comment.
4905
4906 2017-11-28  Richard Biener  <rguenther@suse.de>
4907
4908         PR middle-end/83141
4909         * gimple-fold.c (gimple_fold_builtin_memory_op): For aggregate
4910         copies generated from memcpy use a character array as reference
4911         type.
4912
4913 2017-11-28  Julia Koval  <julia.koval@intel.com>
4914             Sebastian Peryt  <sebastian.peryt@intel.com>
4915
4916         * Makefile.in (cilkplus.def, cilk-builtins.def, c-family/cilk.o,
4917         c-family/c-cilkplus.o, c-family/array-notation-common.o,
4918         cilk-common.o, cilk.h, cilk-common.c): Remove.
4919         * builtin-types.def
4920         (BT_FN_INT_PTR_PTR_PTR_FTYPE_BT_INT_BT_PTR_BT_PTR_BT_PTR): Remove.
4921         * builtins.c (is_builtin_name): Remove cilkplus condition.
4922         (BUILT_IN_CILK_DETACH, BUILT_IN_CILK_POP_FRAME): Remove.
4923         * builtins.def (DEF_CILK_BUILTIN_STUB, DEF_CILKPLUS_BUILTIN,
4924         cilk-builtins.def, cilkplus.def): Remove.
4925         * cif-code.def (CILK_SPAWN): Remove.
4926         * cilk-builtins.def: Delete.
4927         * cilk-common.c: Ditto.
4928         * cilk.h: Ditto.
4929         * cilkplus.def: Ditto.
4930         * config/darwin.h (fcilkplus): Delete.
4931         * cppbuiltin.c: Ditto.
4932         * doc/extend.texi: Remove cilkplus doc.
4933         * doc/generic.texi: Ditto.
4934         * doc/invoke.texi: Ditto.
4935         * doc/passes.texi: Ditto.
4936         * gcc.c (fcilkplus): Remove.
4937         * gengtype.c (cilk.h): Remove.
4938         * gimple-pretty-print.c (dump_gimple_omp_for): Remove cilkplus
4939         support.
4940         * gimple.h (GF_OMP_FOR_KIND_CILKFOR, GF_OMP_FOR_KIND_CILKSIMD):
4941         Remove.
4942         * gimplify.c (gimplify_return_expr, maybe_fold_stmt,
4943         gimplify_call_expr,
4944         is_gimple_stmt, gimplify_modify_expr, gimplify_scan_omp_clauses,
4945         gimplify_adjust_omp_clauses, gimplify_omp_for, gimplify_expr): Remove
4946         cilkplus conditions.
4947         * ipa-fnsummary.c (ipa_dump_fn_summary, compute_fn_summary,
4948         inline_read_section): Ditto.
4949         * ipa-inline-analysis.c (cilk.h): Remove.
4950         * ira.c (ira_setup_eliminable_regset): Remove cilkplus support.
4951         * lto-wrapper.c (merge_and_complain, append_compiler_options,
4952         append_linker_options): Remove condition for fcilkplus.
4953         * lto/lto-lang.c (cilk.h): Remove.
4954         (lto_init): Remove condition for fcilkplus.
4955         * omp-expand.c (expand_cilk_for_call): Delete.
4956         (expand_omp_taskreg, expand_omp_for_static_chunk,
4957         expand_omp_for): Remove cilkplus
4958         conditions.
4959         (expand_cilk_for): Delete.
4960         * omp-general.c (omp_extract_for_data): Remove cilkplus support.
4961         * omp-low.c (scan_sharing_clauses, create_omp_child_function,
4962         execute_lower_omp, diagnose_sb_0): Ditto.
4963         * omp-simd-clone.c (simd_clone_clauses_extract): Ditto.
4964         * tree-core.h (OMP_CLAUSE__CILK_FOR_COUNT_): Delete.
4965         * tree-nested.c: Ditto.
4966         * tree-pretty-print.c (dump_omp_clause): Remove cilkplus support.
4967         (dump_generic_node): Ditto.
4968         * tree.c (OMP_CLAUSE__CILK_FOR_COUNT_): Delete.
4969         * tree.def (cilk_simd, cilk_for, cilk_spawn_stmt, cilk_sync_stmt):
4970         Delete.
4971         * tree.h (CILK_SPAWN_FN, EXPR_CILK_SPAWN): Delete.
4972
4973 2017-11-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
4974
4975         * config/aarch64/aarch64.md (div<mode>3): Change check to TARGET_FLOAT.
4976         * config/aarch64/aarch64.c (aarch64_emit_approx_div): Add early exit
4977         for vector mode and !TARGET_SIMD.
4978
4979 2017-11-28  Jakub Jelinek  <jakub@redhat.com>
4980
4981         * tree.def (SWITCH_EXPR): Change from 3 operand to 2 operand tree.
4982         Adjust comment.
4983         * tree.h (SWITCH_LABELS): Remove.
4984         * gimplify.c (gimplify_switch_expr): Don't test SWITCH_LABELS,
4985         assert SWITCH_BODY is non-NULL.
4986         * tree-pretty-print.c (dump_generic_node): Remove SWITCH_LABELS
4987         handling.
4988         * tree.c (block_may_fallthru): Always return true; for SWITCH_EXPR.
4989
4990         PR tree-optimization/80788
4991         * match.pd (X +- C1 CMP C2 -> X CMP C2 -+ C1): If res
4992         has TREE_OVERFLOW set, call drop_tree_overflow.
4993
4994 2017-11-28  Richard Biener  <rguenther@suse.de>
4995
4996         PR tree-optimization/83158
4997         * tree-vrp.c (intersect_ranges): Prefer ~[0, 0] in a few more cases.
4998
4999 2017-11-28  Segher Boessenkool  <segher@kernel.crashing.org>
5000
5001         PR 81288/target
5002         * config/rs6000/rs6000.c (rs6000_rtx_costs): Do not handle
5003         TARGET_ISEL && !TARGET_MFCRF differently.  Simplify code.
5004
5005 2017-11-27  Segher Boessenkool  <segher@kernel.crashing.org>
5006
5007         * config/rs6000/rs6000.md (<code><GPR:mode><GPR2:mode>2_isel): Change
5008         LT/GT/LTU/GTU to LE/GE/LEU/GEU where possible.
5009
5010 2017-11-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
5011
5012         PR middle_end/82333
5013         * varasm.c (compare_constant): Take the mode of the constants into
5014         account when comparing floating point constants.
5015
5016 2017-11-27  Gerald Pfeifer  <gerald@pfeifer.com>
5017
5018         * hash-set.h (DEFINE_DEBUG_HASH_SET): Remove static qualifier
5019         from explicit instantiation of debug_helper.
5020         * vec.h (DEFINE_DEBUG_VEC): Ditto.
5021
5022 2017-11-27  Richard Biener  <rguenther@suse.de>
5023
5024         * gimple-fold.c (gimple_fold_builtin_memory_op): Remove dead code,
5025         refactor a bit.
5026
5027 2017-11-27  Richard Biener  <rguenther@suse.de>
5028
5029         * tree.c (wide_int_to_tree): Free discarded INTEGER_CST.
5030         (type_hash_canon): Also clear int_cst_hash_table entry for
5031         TYPE_MIN/MAX_VALUE.
5032         (build_nonstandard_integer_type): Hash all TYPE_MAX_VALUEs.
5033
5034 2017-11-27  Tamar Christina  <tamar.christina@arm.com>
5035
5036         * doc/extend.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
5037         * doc/invoke.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
5038         * doc/sourcebuild.texi: Add -A suffix (ARMv8*-A, ARMv7-A).
5039
5040 2017-11-27  Markus Trippelsdorf  <markus@trippelsdorf.de>
5041
5042         * hash-map.h (gt_cleare_cache): Avoid UB.
5043
5044 2017-11-27  Eric Botcazou  <ebotcazou@adacore.com>
5045
5046         * cfgloop.h (struct loop): Document usage of USHRT_MAX for unroll.
5047         * loop-unroll.c (decide_unroll_constant_iterations): Implement it.
5048         (decide_unroll_runtime_iterations): Likewise.
5049         (decide_unroll_stupid): Likewise.
5050
5051 2017-11-27  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
5052
5053         PR target/83109
5054         * config/i386/i386.md: Add a loop with incssp.
5055
5056 2017-11-27  Martin Jambor  <mjambor@suse.cz>
5057
5058         PR tree-optimization/81248
5059         * tree-sra.c (splice_param_accesses): Remove size check.
5060         (decide_one_param_reduction): Fix size check.
5061         * gimple-pretty-print.c (dump_profile): Silence warning.
5062         * params.def (PARAM_IPA_SRA_PTR_GROWTH_FACTOR): Adjust description.
5063
5064 2017-11-27  Jakub Jelinek  <jakub@redhat.com>
5065
5066         PR debug/81307
5067         * dbxout.c (lastlineno): New variable.
5068         (dbx_debug_hooks): Use dbxout_switch_text_section as
5069         switch_text_section debug hook.
5070         (dbxout_function_end): Switch to current_function_section
5071         rather than function_section.  If crtl->has_bb_partition,
5072         output just one N_FUN, depending on in_cold_section_p.
5073         (dbxout_source_line): Remember last lineno in lastlineno.
5074         (dbxout_switch_text_section): New function.
5075         (dbxout_function_decl): Adjust dbxout_block caller.
5076         (dbx_block_with_cold_children): New function.
5077         (dbxout_block): Return true if any LBRAC/RBRAC have been
5078         emitted.  Use dbx_block_with_cold_children at depth == 0
5079         in second partition.  Add PARENT_BLOCKNUM argument, pass
5080         it optionally adjusted to children.  Output LBRAC/RBRAC
5081         around recursive call only if the block is in the current
5082         partition, if not and anything was output, emit empty
5083         range LBRAC/RBRAC.
5084         * final.c (final_scan_insn): Compute cold_function_name
5085         before calling switch_text_section debug hook.  Call
5086         that hook even if dwarf2out_do_frame if not emitting
5087         dwarf debug info.
5088
5089         PR target/83100
5090         * varasm.c (bss_initializer_p): Return true for DECL_COMMON
5091         TREE_READONLY decls.
5092
5093 2017-11-27  Markus Trippelsdorf  <markus@trippelsdorf.de>
5094
5095         PR rtl-optimization/82488
5096         * expr.c (fixup_args_size_notes): Avoid signed integer overflow.
5097
5098 2017-11-26  Julia Koval  <julia.koval@intel.com>
5099
5100         * config/i386/i386.c (processor_target_table): Add skylake_cost for
5101         skylake-avx512.
5102         * config/i386/x86-tune-costs.h (skylake_memcpy, skylake_memset,
5103         skylake_cost): New.
5104
5105 2017-11-26  Julia Koval  <julia.koval@intel.com>
5106
5107         * config/i386/driver-i386.c (host_detect_local_cpu):
5108         Detect skylake-avx512.
5109
5110 2017-11-26  Julia Koval  <julia.koval@intel.com>
5111
5112         * config.gcc: Add -march=cannonlake.
5113         * config/i386/driver-i386.c (host_detect_local_cpu): Detect cannonlake.
5114         * config/i386/i386-c.c (ix86_target_macros_internal): Handle cannonlake.
5115         * config/i386/i386.c (processor_costs): Add m_CANNONLAKE.
5116         (PTA_CANNONLAKE): New.
5117         (processor_target_table): Add cannonlake.
5118         (ix86_option_override_internal): Ditto.
5119         (fold_builtin_cpu): Ditto.
5120         (get_builtin_code_for_version): Handle cannonlake.
5121         (M_INTEL_COREI7_CANNONLAKE): New.
5122         * config/i386/i386.h (TARGET_CANNONLAKE, PROCESSOR_CANNONLAKE): New.
5123         * doc/invoke.texi: Add -march=cannonlake.
5124
5125 2017-11-14  Boris Kolpackov  <boris@codesynthesis.com>
5126
5127         * plugin.c (add_new_plugin): Use platform-specific library extensions.
5128         (try_init_one_plugin): Alternative implementation for MinGW.
5129         * Makefile.in (plugin_implib): New.
5130         (gengtype-lex.c): Fix broken AIX workaround.
5131         * configure: Regenerate.
5132         * doc/plugins.texi: Document support for MinGW.
5133
5134 2017-11-25  Jakub Jelinek  <jakub@redhat.com>
5135
5136         PR rtl-optimization/81553
5137         * combine.c (simplify_if_then_else): In (if_then_else COND (OP Z C1) Z)
5138         to (OP Z (mult COND (C1 * STORE_FLAG_VALUE))) optimization, if OP
5139         is a shift where C1 has different mode than the whole shift, use C1's
5140         mode for MULT rather than the shift's mode.
5141
5142         PR target/82848
5143         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Don't fold
5144         builtins not enabled in the currently selected ISA.
5145
5146 2017-11-24  Jackson Woodruff  <jackson.woodruff@arm.com>
5147
5148         PR tree-optimization/71026
5149         * tree-ssa-math-opts (is_division_by_square, is_square_of): New.
5150         (insert_reciprocals): Change to insert reciprocals before a division
5151         by a square and to insert the square of a reciprocal.
5152         (execute_cse_reciprocals_1): Change to consider division by a square.
5153         (register_division_in): Add importance parameter.
5154
5155 2017-11-24  Richard Biener  <rguenther@suse.de>
5156
5157         PR tree-optimization/82402
5158         * tree-vect-loop-manip.c (create_lcssa_for_virtual_phi): Properly
5159         set SSA_NAME_OCCURS_IN_ABNORMAL_PHI.
5160
5161 2017-11-24  Marc Glisse  <marc.glisse@inria.fr>
5162
5163         * match.pd (0-ptr): New transformation.
5164
5165 2017-11-24  Jan Hubicka  <hubicka@ucw.cz>
5166
5167         PR bootstrap/83015
5168         * ipa-inline.c (inline_small_functions): Set current badnes correctly
5169         when skipping checking.
5170
5171 2017-11-24  Richard Biener  <rguenther@suse.de>
5172
5173         PR tree-optimization/83128
5174         * tree-ssa-sccvn.c (fully_constant_vn_reference_p): Handle STRING_CSTs.
5175         (vn_reference_lookup_3): Likewise.
5176
5177 2017-11-24  Jakub Jelinek  <jakub@redhat.com>
5178
5179         PR sanitizer/83014
5180         * ubsan.c (ubsan_type_descriptor): Use pp_unsigned_wide_integer
5181         instead of pp_printf with HOST_WIDE_INT_PRINT_DEC.  Avoid calling
5182         tree_to_uhwi twice.
5183
5184         * tree-object-size.c (pass_through_call): Use gimple_call_return_flags
5185         ERF_RETURN*ARG* for builtins other than BUILT_IN_ASSUME_ALIGNED,
5186         check for the latter with gimple_call_builtin_p.  Do not handle
5187         BUILT_IN_STPNCPY_CHK which is not a pass through call.
5188
5189 2017-11-24  Christophe Lyon  <christophe.lyon@linaro.org>
5190
5191         * config/arm/arm_neon.h: Fix pragma GCC push_options before
5192         vdot_u32.
5193
5194 2017-11-23  Julia Koval  <julia.koval@intel.com>
5195
5196         * config/i386/avx512vbmi2intrin.h (_mm512_mask_expand_epi8,
5197         _mm512_maskz_expand_epi8, _mm512_mask_expandloadu_epi8,
5198         _mm512_maskz_expandloadu_epi8, _mm512_mask_expand_epi16,
5199         _mm512_maskz_expand_epi16, _mm512_mask_expandloadu_epi16,
5200         _mm512_maskz_expandloadu_epi16): New intrinsics.
5201         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_expand_epi8,
5202         _mm_maskz_expand_epi8, _mm_mask_expandloadu_epi8,
5203         _mm_maskz_expandloadu_epi8, _mm_mask_expand_epi16,
5204         _mm_maskz_expand_epi16, _mm_mask_expandloadu_epi16,
5205         _mm_maskz_expandloadu_epi16, _mm256_mask_expand_epi16,
5206         _mm256_maskz_expand_epi16, _mm256_mask_expandloadu_epi16,
5207         _mm256_maskz_expandloadu_epi16, _mm256_mask_expand_epi8,
5208         _mm256_maskz_expand_epi8, _mm256_mask_expandloadu_epi8,
5209         _mm256_maskz_expandloadu_epi8): New intrinsics.
5210         * config/i386/i386-builtin-types.def (V64QI_FTYPE_PCV64QI_V64QI_UDI,
5211         V32HI_FTYPE_PCV32HI_V32HI_USI, V32QI_FTYPE_PCV32QI_V32QI_USI,
5212         V16HI_FTYPE_PCV16HI_V16HI_UHI, V16QI_FTYPE_PCV16QI_V16QI_UHI,
5213         V8HI_FTYPE_PCV8HI_V8HI_UQI): New types.
5214         * config/i386/i386.c (ix86_expand_special_args_builtin): Use new types.
5215         * config/i386/sse.md (VI248_VLBW): New iterator.
5216         (expand<mode>_mask, expand<mode>_maskz): New patterns.
5217
5218 2017-11-23  Julia Koval  <julia.koval@intel.com>
5219
5220         * config.gcc (avx512vbmi2intrin.h, avx512vbmi2vlintrin): New headers.
5221         * config/i386/avx512vbmi2intrin.h (_mm512_mask_compress_epi8,
5222         _mm512_maskz_compress_epi8, _mm512_mask_compressstoreu_epi8,
5223         _mm512_mask_compress_epi16, _mm512_maskz_compress_epi16,
5224         _mm512_mask_compressstoreu_epi16): New.
5225         * config/i386/avx512vbmi2vlintrin.h (_mm_mask_compress_epi8,
5226         _mm_maskz_compress_epi8, _mm256_mask_compressstoreu_epi16,
5227         _mm_mask_compress_epi16, _mm_maskz_compress_epi16,
5228         _mm256_mask_compress_epi16, _mm256_maskz_compress_epi16,
5229         _mm_mask_compressstoreu_epi8, _mm_mask_compressstoreu_epi16,
5230         _mm256_mask_compress_epi8, _mm256_maskz_compress_epi8,
5231         _mm256_mask_compressstoreu_epi8): New.
5232         * config/i386/i386-builtin-types.def (VOID_FTYPE_PV64QI_V64QI_UDI,
5233         VOID_FTYPE_PV32HI_V32HI_USI, VOID_FTYPE_PV32QI_V32QI_USI,
5234         VOID_FTYPE_PV16QI_V16QI_UHI, VOID_FTYPE_PV16HI_V16HI_UHI,
5235         VOID_FTYPE_PV8HI_V8HI_UQI): New types.
5236         * config/i386/i386-builtin.def (__builtin_ia32_compressqi512_mask,
5237         __builtin_ia32_compresshi512_mask, __builtin_ia32_compressqi256_mask,
5238         __builtin_ia32_compressqi128_mask, __builtin_ia32_compresshi256_mask,
5239         __builtin_ia32_compresshi128_mask,
5240         __builtin_ia32_compressstoreuqi512_mask,
5241         __builtin_ia32_compressstoreuhi512_mask,
5242         __builtin_ia32_compressstoreuqi256_mask,
5243         __builtin_ia32_compressstoreuqi128_mask,
5244         __builtin_ia32_compressstoreuhi256_mask,
5245         __builtin_ia32_compressstoreuhi128_mask): New builtins.
5246         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Create special args
5247         array for flags2.
5248         (ix86_expand_special_args_builtin): Handle new types.
5249         (s4fma_expand): Handle new builtin array.
5250         * config/i386/immintrin.h: Include new headers.
5251         * config/i386/sse.md (VI12_AVX512VLBW): New iterator.
5252         (compress<mode>_mask, compressstore<mode>_mask): New patterns.
5253
5254 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
5255
5256         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Formatting
5257         fixes.  Declare temp and g variables at the top in order to avoid
5258         {} in most of the cases.
5259
5260 2017-11-23  Marc Glisse  <marc.glisse@inria.fr>
5261
5262         * match.pd (ptr-0): New transformation.
5263
5264 2017-11-23  Charles Baylis  <charles.baylis@linaro.org>
5265
5266         * config/arm/arm-protos.h (enum arm_addr_mode_op): New.
5267         (struct addr_mode_cost_table): New.
5268         (struct tune_params): Add field addr_mode_costs.
5269         * config/arm/arm.c (generic_addr_mode_costs): New.
5270         (arm_slowmul_tune): Initialise addr_mode_costs field.
5271         (arm_fastmul_tune): Likewise.
5272         (arm_strongarm_tune): Likewise.
5273         (arm_xscale_tune): Likewise.
5274         (arm_9e_tune): Likewise.
5275         (arm_marvell_pj4_tune): Likewise.
5276         (arm_v6t2_tune): Likewise.
5277         (arm_cortex_tune): Likewise.
5278         (arm_cortex_a8_tune): Likewise.
5279         (arm_cortex_a7_tune): Likewise.
5280         (arm_cortex_a15_tune): Likewise.
5281         (arm_cortex_a35_tune): Likewise.
5282         (arm_cortex_a53_tune): Likewise.
5283         (arm_cortex_a57_tune): Likewise.
5284         (arm_exynosm1_tune): Likewise.
5285         (arm_xgene1_tune): Likewise.
5286         (arm_cortex_a5_tune): Likewise.
5287         (arm_cortex_a9_tune): Likewise.
5288         (arm_cortex_a12_tune): Likewise.
5289         (arm_cortex_a73_tune): Likewise.
5290         (arm_v7m_tune): Likewise.
5291         (arm_cortex_m7_tune): Likewise.
5292         (arm_v6m_tune): Likewise.
5293         (arm_fa726te_tune): Likewise.
5294         (arm_mem_costs): Use table lookup to calculate cost of addressing mode.
5295
5296 2017-11-23  Charles Baylis  <charles.baylis@linaro.org>
5297
5298         * config/arm/arm.c (arm_mem_costs): New function.
5299         (arm_rtx_costs_internal): Use arm_mem_costs.
5300
5301 2017-11-23  Mark Wielaard  <mark@klomp.org>
5302
5303         * dwarf2out.c (init_sections_and_labels): Use generation to create
5304         unique ranges_section_label and ranges_base_label. Return generation.
5305         (output_rnglists): Add generation argument. Use generation to create
5306         unique ranges labels.
5307         (dwarf2out_finish): Get generation from init_sections_and_labels
5308         and pass generation to output_rnglists.
5309
5310 2017-11-23  Mike Stump  <mikestump@comcast.net>
5311             Eric Botcazou  <ebotcazou@adacore.com>
5312
5313         * doc/generic.texi (ANNOTATE_EXPR): Document 3rd operand.
5314         * cfgloop.h (struct loop): Add unroll field.
5315         * function.h (struct function): Add has_unroll bitfield.
5316         * gimplify.c (gimple_boolify) <ANNOTATE_EXPR>: Deal with unroll kind.
5317         (gimplify_expr) <ANNOTATE_EXPR>: Propagate 3rd operand.
5318         * loop-init.c (pass_loop2::gate): Return true if cfun->has_unroll.
5319         (pass_rtl_unroll_loops::gate): Likewise.
5320         * loop-unroll.c (decide_unrolling): Tweak note message.  Skip loops
5321         for which loop->unroll==1.
5322         (decide_unroll_constant_iterations): Use note for consistency and
5323         take loop->unroll into account.  Return early if loop->unroll is set.
5324         Fix thinko in existing test.
5325         (decide_unroll_runtime_iterations): Use note for consistency and
5326         take loop->unroll into account.
5327         (decide_unroll_stupid): Likewise.
5328         * lto-streamer-in.c (input_cfg): Read loop->unroll.
5329         * lto-streamer-out.c (output_cfg): Write loop->unroll.
5330         * tree-cfg.c (replace_loop_annotate_in_block) <annot_expr_unroll_kind>:
5331         New case.
5332         (replace_loop_annotate) <annot_expr_unroll_kind>: Likewise.
5333         (print_loop): Print loop->unroll if set.
5334         * tree-core.h (enum annot_expr_kind): Add annot_expr_unroll_kind.
5335         * tree-inline.c (copy_loops): Copy unroll and set cfun->has_unroll.
5336         * tree-pretty-print.c (dump_generic_node) <annot_expr_unroll_kind>:
5337         New case.
5338         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Bail out if
5339         loop->unroll is set and smaller than the trip count.  Otherwise bypass
5340         entirely the heuristics if loop->unroll is set.  Remove dead note.
5341         Fix off-by-one bug in other note.
5342         (try_peel_loop): Bail out if loop->unroll is set.  Fix formatting.
5343         (tree_unroll_loops_completely_1): Force unrolling if loop->unroll
5344         is greater than 1.
5345         (tree_unroll_loops_completely): Make static.
5346         (pass_complete_unroll::execute): Use correct type for variable.
5347         (pass_complete_unrolli::execute): Fix formatting.
5348         * tree.def (ANNOTATE_EXPR): Add 3rd operand.
5349
5350 2017-11-23  Sergey Shalnov  <Sergey.Shalnov@intel.com>
5351
5352         * config/i386/i386.h (TARGET_PREFER_AVX256): Also
5353         enable when TARGET_PREFER_AVX128 is set.
5354
5355 2017-11-23  Jan Hubicka  <hubicka@ucw.cz>
5356
5357         * ipa-profile.c (ipa_propagate_frequency_1): Use count instead of
5358         frequency.
5359         * cgraph.c (cgraph_edge::dump_edge_flags): Dump sreal frequencies.
5360         (cgraph_edge::maybe_hot_p): Use sreal frequencies.
5361
5362 2017-11-23  Jan Hubicka  <hubicka@ucw.cz>
5363
5364         * ipa-fnsummary.c (record_modified_bb_info): Use sreal
5365         frequencies. Fix estimation of aggregate parameters.
5366
5367 2017-11-23  Jan Hubicka  <hubicka@ucw.cz>
5368
5369         * cgraphclones.c (cgraph_node::create_clone): Fix updating of profile
5370         when inlining.
5371
5372 2017-11-23  Tom de Vries  <tom@codesourcery.com>
5373
5374         * config/sh/sh.h (ASM_OUTPUT_ADDR_VEC_ELT): Wrap in "do {} while (0)".
5375
5376 2017-11-23  Tom de Vries  <tom@codesourcery.com>
5377
5378         * config/ft32/ft32.h (ASM_OUTPUT_ADDR_VEC_ELT): Remove semicolon after
5379         macro.
5380
5381 2017-11-23  Oleg Endo  <olegendo@gcc.gnu.org>
5382
5383         PR target/83111
5384         * config/sh/sh.md (udivsi3, divsi3, sibcall_value_pcrel,
5385         sibcall_value_pcrel_fdpic): Use local variable instead of
5386         operands[3].
5387         (calli_tbr_rel): Add missing operand 2.
5388         (call_valuei_tbr_rel): Add missing operand 3.
5389
5390 2017-11-23  Jakub Jelinek  <jakub@redhat.com>
5391
5392         PR middle-end/82253
5393         * expr.c (expand_assignment): For CONCAT to_rtx, complex type from and
5394         bitpos/bitsize covering the whole destination, use store_expr only if
5395         the complex mode is the same.  Otherwise, use expand_normal and if
5396         it returns CONCAT, subreg each part separately instead of trying to
5397         subreg the whole result.
5398
5399 2017-11-23  Richard Biener  <rguenther@suse.de>
5400
5401         PR tree-optimization/23094
5402         * tree-ssa-sccvn.c (vuse_ssa_val): Handle VN_TOP when we
5403         come here from walking over backedges in the first iteration.
5404         (vn_reference_lookup_3): Skip clobbers that store the same value.
5405
5406 2017-11-23  Richard Biener  <rguenther@suse.de>
5407
5408         PR tree-optimization/81403
5409         * tree-ssa-pre.c (get_representative_for): Add parameter specifying
5410         a block we need a leader relative to.
5411         (phi_translate_1): For nary processing require a leader from
5412         get_representative_for given we run expression simplification
5413         using match-and-simplify.  Remove previous fix.
5414
5415 2017-11-22  Jeff Law  <law@redhat.com>
5416
5417         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::try_find_new_range):
5418         Use new method allocate_value_range rather than accessing the
5419         vrp_value_range_pool data member directly.
5420         * tree-vrp.c (simplify_stmt_for_jump_threading): Tweak slightly
5421         to use extract_range_from_stmt method to avoid need for
5422         extract_range_from_assignment method.
5423         (vrp_prop::vrp_finalize): Use set_lattice_propagation_complete
5424         method rather than setting values_propgated data member directly.
5425         * vr-values.h (class vr_values): Privatize vrp_value_range_pool,
5426         and values propagated data members and extract_range_from_assignment
5427         method.  Reorder private data members to conform to standards.
5428         Add new methods set_lattice_propagation_complete and
5429         allocate_value_range.
5430
5431 2017-11-22  Eric Botcazou  <ebotcazou@adacore.com>
5432
5433         PR rtl-optimization/83030
5434         * doc/rtl.texi (Flags in an RTL Expression): Alphabetize, add entry
5435         for CROSSING_JUMP_P and mention usage of 'jump' for JUMP_INSNs.
5436         (Insns): Delete entry for REG_CROSSING_JUMP in register notes.
5437         * bb-reorder.c (update_crossing_jump_flags): Do not test whether the
5438         CROSSING_JUMP_P flag is already set before setting it.
5439         * cfgrtl.c (fixup_partition_crossing): Likewise.
5440         * reorg.c (relax_delay_slots): Do not consider a CROSSING_JUMP_P
5441         insn as useless.
5442
5443 2017-11-22  Jakub Jelinek  <jakub@redhat.com>
5444
5445         * simplify-rtx.c (simplify_binary_operation_1) <case VEC_SERIES>:
5446         Handle the case where both arguments are using gen_const_vec_series.
5447
5448 2017-11-22  David Malcolm  <dmalcolm@redhat.com>
5449
5450         PR c++/62170
5451         * pretty-print.c (pp_format): Move quoting implementation to
5452         pp_begin_quote and pp_end_quote.  Update pp_format_decoder call
5453         to pass address of "quote" local.
5454         (pp_begin_quote): New function.
5455         (pp_end_quote): New function.
5456         * pretty-print.h (printer_fn): Convert penultimate param from bool
5457         to bool *.
5458         (pp_begin_quote): New decl.
5459         (pp_end_quote): New decl.
5460         * tree-diagnostic.c (default_tree_printer): Convert penultimate
5461         param from bool to bool *.
5462         * tree-diagnostic.h (default_tree_printer): Likewise.
5463
5464 2017-11-22  Jeff Law  <law@redhat.com>
5465
5466         * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::evrp_range_analyzer)
5467         Initialize vr_values.
5468         (evrp_range_analyzer::try_find_new_range): Call methods attached to
5469         vr_values via vr_values class instance rather than delegators.
5470         (evrp_range_analyzer::record_ranges_from_phis): Likewise.
5471         (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
5472         (evrp_range_analyzer::push_value_range): Likewise.
5473         (evrp_range_analyzer::pop_value_range): Likewise.
5474         * gimple-ssa-evrp-analyze.h (class evrp_range_analyzer): Remove
5475         most delegators.  Those remaining are exposed as public interfaces.
5476         Make vr_values a pointer and private.
5477         (evrp_range_analyzer::~evrp_range_analyzer): Delete the attached
5478         vr_values.
5479         (evrp_range_analyzer::get_vr_value): New method.
5480         * gimple-ssa-evrp.c (class evrp_folder): Use DISABLE_COPY_AND_ASSIGN.
5481         (evrp_folder::evrp_folder): New ctor to initialize vr_values.
5482         (class evrp_dom_walker): Attach evrp_folder class, initialize
5483         it in the ctor.  Remove temporary delegators.
5484         (evrp_dom_walker::before_dom_children): Call methods in attached
5485         evrp_range_analyzer class via class instance pointer.  Use
5486         free value_range_constant_singleton to remove need for
5487         op_with_constant_singleton_value delegator method.  Do not
5488         create a vrp_prop class instance for every call!  Narrow
5489         scope of a couple variables.
5490         (evrp_dom_walker::cleanup): Call methods in attached
5491         evrp_range_analyzer class via class instance pointer.
5492         * vr-values.h (class vr_values): Privatize many methods and
5493         data members.
5494
5495 2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
5496
5497         * tree.def (REDUC_MAX_EXPR, REDUC_MIN_EXPR, REDUC_PLUS_EXPR): Delete.
5498         * cfgexpand.c (expand_debug_expr): Remove handling for them.
5499         * expr.c (expand_expr_real_2): Likewise.
5500         * fold-const.c (const_unop): Likewise.
5501         * optabs-tree.c (optab_for_tree_code): Likewise.
5502         * tree-cfg.c (verify_gimple_assign_unary): Likewise.
5503         * tree-inline.c (estimate_operator_cost): Likewise.
5504         * tree-pretty-print.c (dump_generic_node): Likewise.
5505         (op_code_prio): Likewise.
5506         (op_symbol_code): Likewise.
5507         * internal-fn.def (DEF_INTERNAL_SIGNED_OPTAB_FN): Define.
5508         (IFN_REDUC_PLUS, IFN_REDUC_MAX, IFN_REDUC_MIN): New internal functions.
5509         * internal-fn.c (direct_internal_fn_optab): New function.
5510         (direct_internal_fn_array, direct_internal_fn_supported_p
5511         (internal_fn_expanders): Handle DEF_INTERNAL_SIGNED_OPTAB_FN.
5512         * fold-const-call.c (fold_const_reduction): New function.
5513         (fold_const_call): Handle CFN_REDUC_PLUS, CFN_REDUC_MAX and
5514         CFN_REDUC_MIN.
5515         * tree-vect-loop.c: Include internal-fn.h.
5516         (reduction_code_for_scalar_code): Rename to...
5517         (reduction_fn_for_scalar_code): ...this and return an internal
5518         function.
5519         (vect_model_reduction_cost): Take an internal_fn rather than
5520         a tree_code.
5521         (vect_create_epilog_for_reduction): Likewise.  Build calls rather
5522         than assignments.
5523         (vectorizable_reduction): Use internal functions rather than tree
5524         codes for the reduction operation.  Update calls to the functions
5525         above.
5526         * config/aarch64/aarch64-builtins.c (aarch64_gimple_fold_builtin):
5527         Use calls to internal functions rather than REDUC tree codes.
5528         * config/aarch64/aarch64-simd.md: Update comment accordingly.
5529
5530 2017-11-22  Olivier Hainque  <hainque@adacore.com>
5531
5532         * config/vxworks.c (vxworks_override_options): Pick default
5533         dwarf version from macro value, VXWORKS_DWARF_VERSION_DEFAULT.
5534         * config/vxworks.h: Define VXWORKS_DWARF_VERSION_DEFAULT and
5535         DWARF_GNAT_ENCODINGS_DEFAULT.
5536         * config/vxworksae.h: Likewise.
5537
5538 2017-11-22  Marc Glisse  <marc.glisse@inria.fr>
5539
5540         PR tree-optimization/83104
5541         * vr-values.c (simplify_stmt_using_ranges): Check integral argument,
5542         not result.
5543
5544 2017-11-22  Marek Polacek  <polacek@redhat.com>
5545             H.J. Lu  <hongjiu.lu@intel.com>
5546             Jason Merrill  <jason@redhat.com>
5547
5548         PR c++/60336
5549         PR middle-end/67239
5550         PR target/68355
5551         * calls.c (initialize_argument_information): Call
5552         warn_parameter_passing_abi target hook.
5553         (store_one_arg): Use 0 for empty record size.  Don't push 0 size
5554         argument onto stack.
5555         (must_pass_in_stack_var_size_or_pad): Return false for empty types.
5556         * common.opt: Update -fabi-version description.
5557         * config/i386/i386.c (init_cumulative_args): Set cum->warn_empty.
5558         (ix86_gimplify_va_arg): Call arg_int_size_in_bytes instead of
5559         int_size_in_bytes.
5560         (ix86_is_empty_record): New function.
5561         (ix86_warn_parameter_passing_abi): New function.
5562         (TARGET_EMPTY_RECORD_P): Redefine.
5563         (TARGET_WARN_PARAMETER_PASSING_ABI): Redefine.
5564         * config/i386/i386.h (CUMULATIVE_ARGS): Add warn_empty.
5565         * doc/tm.texi: Regenerated.
5566         * doc/tm.texi.in (TARGET_EMPTY_RECORD_P,
5567         TARGET_WARN_PARAMETER_PASSING_ABI): Add.
5568         * dwarf2out.c (get_ultimate_context): Move to tree.c.
5569         * explow.c (hard_function_value): Call arg_int_size_in_bytes
5570         instead of int_size_in_bytes.
5571         * expr.c (copy_blkmode_to_reg): Likewise.
5572         * function.c (aggregate_value_p): Return 0 for empty types.
5573         (assign_parm_find_entry_rtl): Call warn_parameter_passing_abi
5574         target hook.
5575         (locate_and_pad_parm): Call arg size_in_bytes instead
5576         size_in_bytes.
5577         * lto-streamer-out.c (hash_tree): Hash TYPE_EMPTY_P and DECL_PADDING_P.
5578         * stor-layout.c (finalize_type_size): Set TYPE_EMPTY_P.
5579         * target.def (empty_record_p, warn_parameter_passing_abi): New target
5580         hooks.
5581         * targhooks.c (hook_void_CUMULATIVE_ARGS_tree): New hook.
5582         (std_gimplify_va_arg_expr): Skip empty records.  Call
5583         arg_size_in_bytes instead size_in_bytes.
5584         * targhooks.h (hook_void_CUMULATIVE_ARGS_tree): Declare.
5585         * tree-core.h (tree_type_common): Add empty_flag.
5586         (tree_decl_common): Update comments.
5587         * tree-streamer-in.c (unpack_ts_decl_common_value_fields): Stream
5588         DECL_PADDING_P.
5589         (unpack_ts_type_common_value_fields): Stream TYPE_EMPTY_P.
5590         * tree-streamer-out.c (pack_ts_decl_common_value_fields): Stream
5591         DECL_PADDING_P.
5592         (pack_ts_type_common_value_fields): Stream TYPE_EMPTY_P.
5593         * tree.c (default_is_empty_type): New function.
5594         (default_is_empty_record): New function.
5595         (arg_int_size_in_bytes): New function.
5596         (arg_size_in_bytes): New function.
5597         (get_ultimate_context): New function.
5598         * tree.h: Define TYPE_EMPTY_P, DECL_PADDING_P and
5599         TRANSLATION_UNIT_WARN_EMPTY_P.
5600         (default_is_empty_record, arg_int_size_in_bytes,
5601         arg_size_in_bytes, get_ultimate_context): Declare.
5602
5603 2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5604
5605         * config/arm/arm.c (cmse_clear_registers): New function.
5606         (cmse_nonsecure_call_clear_caller_saved): Replace register clearing
5607         code by call to cmse_clear_registers.
5608         (cmse_nonsecure_entry_clear_before_return): Likewise.
5609
5610 2017-11-22  Tamar Christina  <tamar.christina@arm.com>
5611
5612         * config/arm/arm_neon.h (vdot_u32, vdotq_u32)
5613         (vdot_s32, vdotq_s32): New.
5614         (vdot_lane_u32, vdotq_lane_u32): New.
5615         (vdot_lane_s32, vdotq_lane_s32): New.
5616
5617
5618 2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
5619
5620         PR middle-end/82547
5621         * wide-int.cc (wi::add_large, wi::sub_large): Fix overflow detection
5622         for unsigned values with fewer HWIs than the precision.
5623         (test_overflow): New function.
5624         (wide_int_cc_tests): Call it.
5625
5626 2017-11-22  Richard Sandiford  <richard.sandiford@linaro.org>
5627
5628         * emit-rtl.c (init_derived_machine_modes): Make sure ptr_mode
5629         has the same mode class as Pmode.
5630
5631 2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5632
5633         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Get rid of
5634         padding_bits_to_clear_ptr.
5635         (cmse_nonsecure_entry_clear_before_return): Likewise.
5636
5637 2017-11-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5638
5639         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Use
5640         auto_sbitap instead of integer bitfield to control register needing
5641         clearing.
5642
5643 2017-11-22  Jakub Jelinek  <jakub@redhat.com>
5644
5645         PR tree-optimization/83044
5646         * tree-vrp.c (vrp_prop::check_array_ref): If eltsize is not
5647         INTEGER_CST or is 0, clear up_bound{,_p1} and later ignore tests
5648         that need the upper bound.  Subtract offset from
5649         get_addr_base_and_unit_offset only if positive and subtract it
5650         before division by eltsize rather than after it.
5651
5652         PR debug/83084
5653         * valtrack.c (propagate_for_debug_subst, propagate_for_debug): Reset
5654         debug insns if they would contain UNSPEC_VOLATILE or volatile asm.
5655         (dead_debug_insert_temp): Likewise, but also ignore even non-volatile
5656         asm.
5657
5658         PR middle-end/82875
5659         * optabs.c (expand_doubleword_mult, expand_binop): Before calling
5660         expand_binop with *mul_widen_optab, make sure at least one of the
5661         operands doesn't have VOIDmode.
5662
5663         PR debug/83034
5664         * dwarf2out.c (mem_loc_descriptor): Handle VEC_SERIES.
5665
5666         PR rtl-optimization/82044
5667         PR tree-optimization/82042
5668         * dse.c (record_store): Check for overflow.
5669         (check_mem_read_rtx): Properly check for overflow if width == -1, call
5670         add_wild_read instead of clear_rhs_from_active_local_stores on
5671         overflow and log it into dump_file.
5672
5673 2017-11-22  Richard Biener  <rguenther@suse.de>
5674
5675         * gimple-iterator.c (gimple_find_edge_insert_loc): Ignore
5676         fake edges to exit when looking for a place to insert.
5677         * tree-ssa-pre.c (clear_expression_ids): Inline into callers
5678         and remove.
5679         (insert_into_preds_of_block): Commit edge insertion immediately,
5680         assert that doesn't require new BBs.
5681         (fini_pre): Release expressions.
5682         (pass_pre::execute): Shuffle things around a bit, if the fn
5683         is too large do not compute AVAIL either as this is really the
5684         quadratic bit.
5685
5686 2017-11-22  Richard Biener  <rguenther@suse.de>
5687
5688         PR tree-optimization/83089
5689         * tree-if-conv.c (pass_if_conversion::execute): If anything
5690         changed reset SCEV and free the number of iteration estimates.
5691
5692 2017-11-21  Martin Sebor  <msebor@redhat.com>
5693
5694         PR tree-optimization/82945
5695         * calls.h (warn_nonstring_bound): Remove unused function.
5696
5697 2017-11-21  Martin Sebor  <msebor@redhat.com>
5698
5699         PR tree-optimization/82945
5700         * builtins.c (expand_builtin_strlen): Call maybe_warn_nonstring_arg.
5701         * calls.h (maybe_warn_nonstring_arg): Declare new function.
5702         * calls.c (get_attr_nonstring_decl, maybe_warn_nonstring_arg): New
5703         functions.
5704         (initialize_argument_information): Call maybe_warn_nonstring_arg.
5705         * calls.h (get_attr_nonstring_decl): Declare new function.
5706         * doc/extend.texi (attribute nonstring): Update.
5707         * gimple-fold.c (gimple_fold_builtin_strncpy): Call
5708         get_attr_nonstring_decl and handle it.
5709         * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Same.  Improve
5710         detection of nul-termination.
5711         (strlen_to_stridx): Change to a pointer.
5712         (handle_builtin_strlen, handle_builtin_stxncpy): Adjust.
5713         (pass_strlen::execute): Same.
5714
5715 2017-11-21  Sergey Shalnov  <Sergey.Shalnov@intel.com>
5716
5717         * config/i386/i386-opts.h (enum prefer_vector_width): Added new enum
5718         for the new option -mprefer-vector-width=[none|128|256|512].
5719         * config/i386/i386.c (ix86_target_string): remove old style options
5720         -mprefer-avx256 and make -mprefer-avx128 as alias.
5721         (ix86_option_override_internal):  Apply defaults for the
5722         -mprefer-vector-width=[128|256] option.
5723         * config/i386/i386.h (TARGET_PREFER_AVX128, TARGET_PREFER_AVX256):
5724         Implement macros to work with -mprefer-vector-width=.
5725         * config/i386/i386.opt: Implemented option
5726         -mprefer-vector-width=[none|128|256|512].
5727         * doc/invoke.texi: Documentation for
5728         -mprefer-vector-width=[none|128|256|512].
5729
5730 2017-11-21  Pat Haugen  <pthaugen@us.ibm.com>
5731
5732         * config/rs6000/ppc-asm.h (f50, vs50): Fix values.
5733
5734 2017-11-21  Jonathan Wakely  <jwakely@redhat.com>
5735
5736         * doc/invoke.texi (-Wmaybe-uninitialized): Rephrase for clarity.
5737
5738 2017-11-21  Marc Glisse  <marc.glisse@inria.fr>
5739
5740         * doc/generic.texi: Document POINTER_DIFF_EXPR, update
5741         POINTER_PLUS_EXPR.
5742         * cfgexpand.c (expand_debug_expr): Handle POINTER_DIFF_EXPR.
5743         * expr.c (expand_expr_real_2): Likewise.
5744         * fold-const.c (const_binop, fold_addr_of_array_ref_difference,
5745         fold_binary_loc): Likewise.
5746         * match.pd (X-X, P+(Q-P), &D-P, (P+N)-P, P-(P+N), (P+M)-(P+N),
5747         P-Q==0, -(A-B), X-Z<Y-Z, (X-Z)-(Y-Z), Z-X<Z-Y, (Z-X)-(Z-Y),
5748         (A-B)+(C-A)): New transformations for POINTER_DIFF_EXPR, based on
5749         MINUS_EXPR transformations.
5750         * optabs-tree.c (optab_for_tree_code): Handle POINTER_DIFF_EXPR.
5751         * tree-cfg.c (verify_expr, verify_gimple_assign_binary): Likewise.
5752         * tree-inline.c (estimate_operator_cost): Likewise.
5753         * tree-pretty-print.c (dump_generic_node, op_code_prio,
5754         op_symbol_code): Likewise.
5755         * tree-vect-stmts.c (vectorizable_operation): Likewise.
5756         * vr-values.c (extract_range_from_binary_expr): Likewise.
5757         * varasm.c (initializer_constant_valid_p_1): Likewise.
5758         * tree.def: New tree code POINTER_DIFF_EXPR.
5759
5760 2017-11-21  Uros Bizjak  <ubizjak@gmail.com>
5761
5762         * config/i386/i386.md (*bswap<mode>2_movbe): Add
5763         integer suffix to movbe mnemonic.
5764         (*bswaphi2_movbe): Ditto.
5765         (bswaphi_lowpart): Merge with *bswaphi_lowpart_1.
5766
5767 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
5768
5769         PR c++/83045
5770         * tree-cfg.c (pass_warn_function_return::execute): Formatting fix.
5771         Also warn if seen __builtin_unreachable () call with BUILTINS_LOCATION.
5772         Use LOCATION_LOCUS when comparing against UNKNOWN_LOCATION.
5773
5774 2017-11-21  Martin Liska  <mliska@suse.cz>
5775
5776         * tree-inline.c (expand_call_inline): Remove not needed
5777         xstrdup_for_dump.
5778
5779 2017-11-21  James Cowgill  <James.Cowgill@imgtec.com>
5780             Jakub Jelinek  <jakub@redhat.com>
5781
5782         PR target/82880
5783         * config/mips/frame-header-opt.c (mips_register_frame_header_opt):
5784         Remove static keyword from f variable.
5785
5786 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
5787
5788         PR tree-optimization/83086
5789         * gimple-ssa-store-merging.c
5790         (imm_store_chain_info::try_coalesce_bswap): Test this_n.base_addr
5791         rather than n.base_addr.
5792
5793 2017-11-21  Martin Liska  <mliska@suse.cz>
5794
5795         PR rtl-optimization/82044
5796         PR tree-optimization/82042
5797         * dse.c (check_mem_read_rtx): Check for overflow.
5798
5799 2017-11-21  Aldy Hernandez  <aldyh@redhat.com>
5800
5801         * tree-ssa-threadbackward.c (find_jump_threads_backwards): Fix
5802         typo in comment.
5803
5804 2017-11-21  Claudiu Zissulescu  <claziss@synopsys.com>
5805
5806         * cfgrtl.c (force_nonfallthru_and_redirect): Don't split a call
5807         and its corresponding call arg location note.
5808
5809 2017-11-21  Claudiu Zissulescu  <claziss@synopsys.com>
5810             Andrew Burgess  <andrew.burgess@embecosm.com>
5811
5812         * config/arc/arc-protos.h (arc_compute_frame_size): Delete
5813         declaration.
5814         (arc_return_slot_offset): Likewise.
5815         (arc_eh_return_address_location): New declaration.
5816         * config/arc/arc.c (TARGET_BUILTIN_SETJMP_FRAME_VALUE): Define.
5817         (MUST_SAVE_REGISTER): Add exception handler case.
5818         (MUST_SAVE_RETURN_ADDR): Likewise.
5819         (arc_frame_pointer_required): Likewise.
5820         (arc_frame_pointer_needed): New function.
5821         (arc_compute_frame_size): Changed.
5822         (arc_expand_prologue): Likewise.
5823         (arc_expand_epilogue): Likewise.
5824         (arc_initial_elimination_offset): Likewise.
5825         (arc_return_slot_offset): Delete.
5826         (arc_eh_return_address_location): New function.
5827         (arc_builtin_setjmp_frame_value): Likewise.
5828         * config/arc/arc.h (EH_RETURN_DATA_REGNO): Use 2 registers.
5829         (EH_RETURN_STACKADJ_RTX): Define.
5830         (EH_RETURN_HANDLER_RTX): Likewise.
5831         * config/arc/arc.md (eh_return): Delete.
5832
5833 2017-11-21  Aldy Hernandez  <aldyh@redhat.com>
5834
5835         * print-tree.h (debug_vec_tree): Remove prototype.
5836         * gdbinit.in (pvt): Remove macro.
5837
5838 2017-11-21  Jakub Jelinek  <jakub@redhat.com>
5839
5840         PR tree-optimization/83047
5841         * gimple-ssa-store-merging.c
5842         (imm_store_chain_info::output_merged_store): If the loads with the
5843         same vuse are in different basic blocks, for load_gsi pick a load
5844         location that is dominated by the other loads.
5845
5846         PR c++/83059
5847         * config/i386/i386.c (ix86_memmodel_check): Start
5848         -Winvalid-memory-model diagnostics with lowercase letter.
5849
5850         PR debug/82718
5851         * dwarf2out.c (dw_loc_list): If crtl->has_bb_partition, temporarily
5852         set in_cold_section_p to the partition containing loc_list->first.
5853         When seeing loc_list->last_before_switch node, update secname and
5854         perform range_across_switch second partition handling only after that.
5855
5856         PR debug/82933
5857         * run-rtl-passes.c: Include debug.h.
5858         (run_rtl_passes): Call debug_hooks->assembly_start.
5859         * dwarf2out.c (dwarf2out_assembly_start): Return early if invoked
5860         multiple times.
5861
5862         PR target/82981
5863         * internal-fn.c (expand_mul_overflow): Use OPTAB_WIDEN instead of
5864         OPTAB_DIRECT in calls to expand_simple_binop.
5865
5866 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
5867
5868         PR c/81404
5869         * Makefile.in (C_COMMON_OBJS): Add c-family/known-headers.o.
5870
5871 2017-11-20  David Malcolm  <dmalcolm@redhat.com>
5872
5873         PR c++/72786
5874         * spellcheck.h (best_match::blithely_get_best_candidate): New
5875         accessor.
5876
5877 2017-11-20  Jakub Jelinek  <jakub@redhat.com>
5878
5879         * config/i386/i386.c (parse_mtune_ctrl_str): Start diagnostics
5880         with lower case letter.
5881
5882 2017-11-20  Uros Bizjak  <ubizjak@gmail.com>
5883
5884         * config/i386/i386.md (bswaphi2): New expander.
5885         (*bswaphi2_movbe): New insn pattern.
5886         (bswaphi -> rorhi pepehole2): New peephole pattern.
5887
5888 2017-11-20  Jeff Law  <law@redhat.com>
5889
5890         * Makefile.in (OBJS): Add gimple-ssa-evrp-analyze.o.
5891         * gimple-ssa-evrp-analyze.c: New file pulled from gimple-ssa-evrp.c.
5892         * gimple-ssa-evrp-analyze.h: New file pulled from gimple-ssa-evrp.c.
5893         * gimple-ssa-evrp.c: Remove bits moved into new files.  Include
5894         gimple-ssa-evrp-analyze.h.
5895
5896         * gimple-ssa-evrp.c (evrp_dom_walker::before_dom_children): Do not
5897         set BB_VISITED here.
5898         (evrp_range_analyzer::enter): Set BB_VISITED here instead.
5899
5900 2017-11-20  Bin Cheng  <bin.cheng@arm.com>
5901
5902         * tree-predcom.c: Add general comment on Store-Store chains.
5903         (split_data_refs_to_components): Postpone clearing eliminate_store_p
5904         flag in component.
5905         (get_chain_last_ref_at): Rename into...
5906         (get_chain_last_write_at): ...this.
5907         (get_chain_last_write_before_load): New function.
5908         (add_ref_to_chain): Promote type of chain from CT_STORE_LOAD to
5909         CT_STORE_STORE when write reference is added.
5910         (determine_roots_comp): Support load ref in CT_STORE_STORE chains.
5911         (is_inv_store_elimination_chain): Update get_chain_last_write_at call.
5912         (initialize_root_vars_store_elim_1): Ditto.
5913         (initialize_root_vars_store_elim_2): Ditto.  Replace rhs once default
5914         definition is created.
5915         (execute_pred_commoning_chain): Support load ref in CT_STORE_STORE
5916         chain by replacing it with dominant stored value.
5917
5918 2017-11-20  Bin Cheng  <bin.cheng@arm.com>
5919
5920         * tree-predcom.c (add_ref_to_chain): Remove check on distance.
5921
5922 2017-11-20  Marc Glisse  <marc.glisse@inria.fr>
5923
5924         * vr-values.c (extract_range_from_binary_expr): Use a full range
5925         for VR_VARYING.
5926
5927 2017-11-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>
5928
5929         * config/arm/arm.md (R4_REGNUM): Define constant.
5930         (nonsecure_call_internal): Remove r4 clobber.
5931         (nonsecure_call_value_internal): Likewise.
5932         * config/arm/thumb1.md (nonsecure_call_reg_thumb1_v5): Remove second
5933         clobber and resequence match_operands.
5934         (nonsecure_call_value_reg_thumb1_v5): Likewise.
5935         * config/arm/thumb2.md (nonsecure_call_reg_thumb2): Likewise.
5936         (nonsecure_call_value_reg_thumb2): Likewise.
5937
5938 2017-11-20  Jakub Jelinek  <jakub@redhat.com>
5939
5940         PR tree-optimization/78821
5941         * gimple-ssa-store-merging.c (find_bswap_or_nop_load): Give up
5942         if base is TARGET_MEM_REF.  If base is not MEM_REF, set base_addr
5943         to the address of the base rather than the base itself.
5944         (find_bswap_or_nop_1): Just use pointer comparison for vuse check.
5945         (find_bswap_or_nop_finalize): New function.
5946         (find_bswap_or_nop): Use it.
5947         (bswap_replace): Return a tree rather than bool, change first
5948         argument from gimple * to gimple_stmt_iterator, allow inserting
5949         into an empty sequence, allow ins_stmt to be NULL - then emit
5950         all stmts into gsi.  Fix up MEM_REF address gimplification.
5951         (pass_optimize_bswap::execute): Adjust bswap_replace caller.
5952         (struct store_immediate_info): Add N and INS_STMT non-static
5953         data members.
5954         (store_immediate_info::store_immediate_info): Initialize them
5955         from newly added ctor args.
5956         (merged_store_group::apply_stores): Formatting fixes.  Sort by
5957         bitpos at the end.
5958         (stmts_may_clobber_ref_p): For stores call also
5959         refs_anti_dependent_p.
5960         (gather_bswap_load_refs): New function.
5961         (imm_store_chain_info::try_coalesce_bswap): New method.
5962         (imm_store_chain_info::coalesce_immediate_stores): Use it.
5963         (split_group): Handle LROTATE_EXPR and NOP_EXPR rhs_code specially.
5964         (imm_store_chain_info::output_merged_store): Fail if number of
5965         new estimated stmts is bigger or equal than old.  Handle LROTATE_EXPR
5966         and NOP_EXPR rhs_code.
5967         (pass_store_merging::process_store): Compute n and ins_stmt, if
5968         ins_stmt is non-NULL and the store rhs is otherwise invalid, use
5969         LROTATE_EXPR rhs_code.  Pass n and ins_stmt to store_immediate_info
5970         ctor.
5971         (pass_store_merging::execute): Calculate dominators.
5972
5973         * tree-ssa-math-opts.c (nop_stats, bswap_stats, struct symbolic_number,
5974         BITS_PER_MARKER, MARKER_MASK, MARKER_BYTE_UNKNOWN, HEAD_MARKER, CMPNOP,
5975         CMPXCHG, do_shift_rotate, verify_symbolic_number_p,
5976         init_symbolic_number, find_bswap_or_nop_load, perform_symbolic_merge,
5977         find_bswap_or_nop_1, find_bswap_or_nop, pass_data_optimize_bswap,
5978         class pass_optimize_bswap, bswap_replace,
5979         pass_optimize_bswap::execute): Moved to ...
5980         * gimple-ssa-store-merging.c: ... this file.
5981         Include optabs-tree.h.
5982         (nop_stats, bswap_stats, do_shift_rotate, verify_symbolic_number_p,
5983         init_symbolic_number, find_bswap_or_nop_load, perform_symbolic_merge,
5984         find_bswap_or_nop_1, find_bswap_or_nop, bswap_replace): Put into
5985         anonymous namespace, remove static keywords.
5986         (pass_optimize_bswap::gate): Test BITS_PER_UNIT == 8 here...
5987         (pass_optimize_bswap::execute): ... rather than here.  Formatting fix.
5988
5989 2017-11-20  Jan Hubicka  <hubicka@ucw.cz>
5990
5991         PR bootstrap/83062
5992         * ipa-inline.c (can_inline_edge_p): Fix typo in previous patch.
5993
5994 2017-11-20  Aldy Hernandez  <aldyh@redhat.com>
5995
5996         * vec.h (debug_helper): New function.
5997         (DEFINE_DEBUG_VEC): New macro.
5998         * hash-set.h (debug_helper): New function.
5999         (DEFINE_DEBUG_HASH_SET): New macro.
6000         * cfg.c (debug_slim (edge)): New function.
6001         Call DEFINE_DEBUG_VEC for edges.
6002         Call DEFINE_DEBUG_HASH_SET for edges.
6003         * cfghooks.c (debug_slim (basic_block)): New function.
6004         Call DEFINE_DEBUG_VEC for basic blocks.
6005         Call DEFINE_DEBUG_HASH_SET for basic blocks.
6006         * print-tree.c (debug_slim): New function to handle trees.
6007         Call DEFINE_DEBUG_VEC for trees.
6008         Call DEFINE_DEBUG_HASH_SET for trees.
6009         (debug (vec<tree, va_gc>) &): Remove.
6010         (debug (<vec<tree, va_gc>) *): Remove.
6011         * print-rtl.c (debug_slim): New function to handle const_rtx.
6012         Call DEFINE_DEBUG_VEC for rtx_def.
6013         Call DEFINE_DEBUG_VEC for rtx_insn.
6014         Call DEFINE_DEBUG_HASH_SET for rtx_def.
6015         Call DEFINE_DEBUG_HASH_SET for rtx_insn.
6016         * sel-sched-dump.c (debug (vec<rtx_insn *> &): Remove.
6017         (debug (vec<rtx_insn *> *ptr): Remove.
6018         (debug_insn_vector): Remove.
6019         * stor-layout.c (debug_rli): Call debug() instead of debug_vec_tree.
6020
6021 2017-11-20  Tom de Vries  <tom@codesourcery.com>
6022
6023         PR rtl-optimization/82020
6024         * simplify-rtx.c (simplify_ternary_operation): Fix comparison mode of
6025         IF_THEN_ELSE condition.
6026
6027 2017-11-19  Jeff Law  <law@redhat.com>
6028
6029         * tree-ssa-dom.c (record_equivalences_from_phis): Fix handling
6030         of degenerates resulting from ignoring an edge.
6031
6032 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
6033
6034         PR ipa/81360
6035         * ipa-inline.c (can_inline_edge_p): Also check that caller is optimized
6036
6037 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
6038
6039         PR ipa/83001
6040         * profile-count.c (profile_count::to_sreal_scale): Fix return value
6041         for uninitialied counts.
6042
6043 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
6044
6045         PR ipa/60243
6046         * tree-inline.c (estimate_num_insns): Set to 1 at least.
6047
6048 2017-11-19  Jan Hubicka  <hubicka@ucw.cz>
6049
6050         PR target/82713
6051         * i386.c (ix86_builtin_vectorization_cost): Be ready for insane types.
6052
6053 2017-11-19  Tom de Vries  <tom@codesourcery.com>
6054
6055         * config/arc/arc.h (FUNCTION_PROFILER): Remove semicolon after
6056         "do while (0)".
6057
6058 2017-11-19  Tom de Vries  <tom@codesourcery.com>
6059
6060         * config/phoenix.h (TARGET_OS_CPP_BUILTINS): Remove semicolon after
6061         "do {} while (0)".
6062
6063 2017-11-19  Tom de Vries  <tom@codesourcery.com>
6064
6065         * config/visium/visium.h (ASM_OUTPUT_CASE_END): Remove semicolon after
6066         macro body.
6067
6068 2017-11-19  Tom de Vries  <tom@codesourcery.com>
6069
6070         * config/ft32/ft32.h (REGISTER_TARGET_PRAGMAS): Remove semicolon after
6071         "do {} while (0)".
6072         * config/spu/spu.h (REGISTER_TARGET_PRAGMAS): Same.
6073
6074 2017-11-19  Tom de Vries  <tom@codesourcery.com>
6075
6076         * config/mcore/mcore-elf.h (MCORE_EXPORT_NAME): Remove semicolon after
6077         "do {} while (0)".
6078         * config/mcore/mcore.h (ASM_OUTPUT_ALIGNED_COMMON): After missing
6079         semicolon after MCORE_EXPORT_NAME call.
6080
6081 2017-11-19  Tom de Vries  <tom@codesourcery.com>
6082
6083         PR target/82961
6084         * vmsdbgout.c (vmsdbgout_early_finish): New function.
6085         (vmsdbg_debug_hooks): Set early_finish field to vmsdbgout_early_finish.
6086
6087 2017-11-18  Jan Hubicka  <hubicka@ucw.cz>
6088
6089         * cgraphclones.c (cgraph_edge::clone): Rename gcov_count to prof_count.
6090         (cgraph_edge::clone): Cleanup updating of profile.
6091         * ipa-cp.c (update_profiling_info): Likewise.
6092         * ipa-inline-transform.c (inline_transform): Likewise.
6093         * ipa-inline.c (inline_small_functions): Add missing space to dump.
6094         * ipa-split.c (execute_split_functions): Do not split when function
6095         is cold.
6096         * predict.c (estimate_bb_frequencies): Cleanup updating of profile.
6097         * profile-count.c (profile_count::dump): Add global0.
6098         (profile_count::to_cgraph_frequency): Do not ICE when entry is
6099         undefined.
6100         (profile_count::to_sreal_scale): Likewise.
6101         (profile_count::adjust_for_ipa_scaling): Fix typo in comment.
6102         (profile_count::combine_with_ipa_count): New function.
6103         * profile-count.h (profile_guessed_global0adjusted): New.
6104         (profile_count::adjusted_zero): New.
6105         (profile_count::global0adjusted): New.
6106         (profile_count::combine_with_ipa_count): New.
6107         * tree-inline.c (copy_edges_for_bb): Add NUM/DEN arugment;
6108         correct profile of return block of split functions.
6109         (copy_cfg_body): Remove unused profile_count.
6110         (copy_body): Likewise.
6111         (expand_call_inline): Update.
6112         (tree_function_versioning): Update.
6113
6114 2017-11-18  Aldy Hernandez  <aldyh@redhat.com>
6115
6116         * hash-set.h (hash_set::empty): New.
6117         * tree-ssa-threadbackward.h: Delete.
6118         * tree-ssa-threadbackward.c (class thread_jumps): New.
6119         Move max_threaded_paths into class.
6120         (fsm_find_thread_path): Remove arguments that are now in class.
6121         (profitable_jump_thread_path): Rename to...
6122         (thread_jumps::profitable_jump_thread_path): ...this.
6123         (convert_and_register_jump_thread_path): Rename to...
6124         (thread_jumps::convert_and_register_current_path): ...this.
6125         (check_subpath_and_update_thread_path): Rename to...
6126         (thread_jumps::check_subpath_and_update_thread_path): ...this.
6127         (register_jump_thread_path_if_profitable): Rename to...
6128         (thread_jumps::register_jump_thread_path_if_profitable): ...this.
6129         (handle_phi): Rename to...
6130         (thread_jumps::handle_phi): ...this.
6131         (handle_assignment): Rename to...
6132         (thread_jumps::handle_assignment): ...this.
6133         (fsm_find_control_statement_thread_paths): Rename to...
6134         (thread_jumps::fsm_find_control_statement_thread_paths): ...this.
6135         (find_jump_threads_backwards): Rename to...
6136         (thread_jumps::find_jump_threads_backwards): ...this.
6137         Initialize path local data.
6138         (pass_thread_jumps::execute): Call find_jump_threads_backwards
6139         from within thread_jumps class.
6140         (pass_early_thread_jumps::execute): Same.
6141
6142 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
6143
6144         * cgraph.c (cgraph_node::dump): Do IPA sanity checking on IPA counts.
6145
6146 2017-11-17  Steve Ellcey  <sellcey@cavium.com>
6147
6148         * config/aarch64/aarch64-simd.md (fnma<mode>4): Move neg operator
6149         to canonical location.
6150
6151 2017-11-17  Steve Ellcey  <sellcey@cavium.com>
6152
6153         PR target/81356
6154         * config/aarch64/aarch64.c (aarch64_use_by_pieces_infrastructure_p):
6155         Remove.
6156         (TARGET_USE_BY_PIECES_INFRASTRUCTURE_P): Remove define.
6157
6158 2017-11-17  H.J. Lu  <hongjiu.lu@intel.com>
6159
6160         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Use
6161         rcrt1.o%s/grcrt1.o%s for -static-pie.
6162
6163 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
6164
6165         * i386.c (ix86_multiplication_cost, ix86_division_cost,
6166         ix86_shift_rotate_cost): Break out from ...
6167         (ix86_rtx_costs): ... here.
6168         (ix86_add_stmt_cost): Use rtx cost machinery to compute cost of
6169         vector operations.
6170
6171 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
6172
6173         * predict.c (determine_unlikely_bbs): Set cgraph node count to 0
6174         when entry block was promoted unlikely.
6175         (estimate_bb_frequencies): Increase frequency scale.
6176         * profile-count.h (profile_count): Export precision info.
6177
6178 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
6179
6180         * tree-tailcall.c (eliminate_tail_call): Be more careful about not
6181         disturbin profile of entry block.
6182
6183 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
6184
6185         * ipa-fnsummary.c (estimate_node_size_and_time): Be more tolerant for
6186         roundoff errors.
6187
6188 2017-11-17  Jan Hubicka  <hubicka@ucw.cz>
6189
6190         * ipa-cp.c (update_profiling_info): Handle conversion to local profile.
6191         * tree-cfg.c (execute_fixup_cfg): Do fixup same way as inliner does.
6192
6193 2017-11-17  Jeff Law  <law@redhat.com>
6194
6195         * gimple-ssa-evrp.c (class evrp_range_analyzer): New class extracted
6196         from evrp_dom_walker class.  Various methods moved into new class.
6197         (evrp_range_analyzer::evrp_range_analyzer): Constructor for new class.
6198         (evrp_range_analyzer::enter): New method.
6199         (evrp_range_analyzer::leave): New method.
6200         (evrp_dom_walker): Remove delegators no longer needed by this class.
6201         Replace vr_values data member with evrp_range_analyzer
6202
6203         * gimple-ssa-evrp.c (evrp_dom_walker::record_ranges_from_phis): New
6204         method extracted from evrp_dom_walker::before_dom_children.
6205         (evrp_dom_walker::record_ranges_from_stmt): Likewise.
6206         (evrp_dom_walker::record_ranges_from_incoming_edge): Likewise.
6207
6208         * gimple-ssa-evrp.c (evrp_dom_walker): Add cleanup method.
6209         Add private copy constructor and move assignment operators.
6210         Privatize methods and class data where trivially possible.
6211         (evrp_dom_walker::cleanup): New function, extracted from
6212         execute_early_vrp.  Simplify access to class data.
6213
6214         * vr-values.h (get_output_for_vrp): Prototype.
6215         * vr-values.c (get_output_for_vrp): New function extracted from
6216         vrp_visit_assignment_or_call and extract_range_from_stmt.
6217         (vrp_visit_assignment_or_call): Use get_output_for_vrp.  Simplify.
6218
6219 2017-11-17  Luis Machado  <luis.machado@linaro.org>
6220
6221         * config/aarch64/aarch64.c
6222         (qdf24xx_prefetch_tune) <default_opt_level>: Set to -1.
6223         (qdf24xx_tunings) <autoprefetcher_model>: Set to
6224         tune_params::AUTOPREFETCHER_WEAK.
6225
6226 2017-11-17  Tamar Christina  <tamar.christina@arm.com>
6227
6228         PR target/82641
6229         * config/arm/arm.c (arm_valid_target_attribute_rec):
6230         Parse "arch=" and "+<ext>".
6231         (arm_valid_target_attribute_tree): Re-init global options.
6232         (arm_option_override): Make non-static.
6233         (arm_options_perform_arch_sanity_checks): Make errors fatal.
6234         * gcc/config/arm/arm-c.c (__ARM_FEATURE_CMSE): Support undef.
6235         (__ARM_FEATURE_CRC32): Support undef.
6236         * config/arm/arm_acle.h (__ARM_FEATURE_CRC32): Replace with pragma.
6237         * doc/extend.texi (ARM Function Attributes): Add pragma and target.
6238
6239 2017-11-17  David Malcolm  <dmalcolm@redhat.com>
6240
6241         * gdbinit.in (break-on-diagnostic): New command.
6242
6243 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
6244
6245         * config/i386/i386.c (ix86_expand_epilogue): Change simple
6246         return to indirect jump for EH return if control-flow
6247         protection is enabled. Change explicit 'false' argument in
6248         pro_epilogue_adjust_stack with a value of
6249         flag_cf_protection.
6250         * config/i386/i386.md (simple_return_indirect_internal):
6251         Remove SImode restriction to support 64-bit.
6252
6253 2017-11-17  Segher Boessenkool  <segher@kernel.crashing.org>
6254
6255         * combine.c (added_notes_insn): New.
6256         (try_combine): Handle added_notes_insn like added_links_insn.
6257         Rewrite return value code.
6258         (distribute_notes): Set added_notes_insn to the earliest insn we added
6259         a note to.
6260
6261 2017-11-17  Segher Boessenkool  <segher@kernel.crashing.org>
6262
6263         PR rtl-optimization/82621
6264         * combine.c (try_combine): Do not split PARALLELs of two SETs if the
6265         dest of one of those SETs is unused.
6266
6267 2017-11-17  Richard Biener  <rguenther@suse.de>
6268
6269         PR fortran/83017
6270         * tree-core.h (enum annot_expr_kind): Add annot_expr_parallel_kind.
6271         * tree-pretty-print.c (dump_generic_node): Handle
6272         annot_expr_parallel_kind.
6273         * tree-cfg.c (replace_loop_annotate_in_block): Likewise.
6274         * gimplify.c (gimple_boolify): Likewise.
6275
6276 2017-11-17  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
6277
6278         * config.gcc (extra_headers): Add cet.h for x86 targets.
6279         * config/i386/cet.h: New file.
6280         * doc/install.texi: Add --enable-cet/--disable-cet.
6281
6282 2017-11-17  Richard Biener  <rguenther@suse.de>
6283
6284         PR tree-optimization/83017
6285         * tree-parloops.c (MIN_PER_THREAD): Use --param parloops-min-per-thread.
6286         (gen_parallel_loop): Properly count iterations.
6287         (parallelize_loops): Handle loop->can_be_parallel independent
6288         of flag_loop_parallelize_all.  Make static profitability test match
6289         the runtime one.
6290         * params.def (PARAM_PARLOOPS_MIN_PER_THREAD): New.
6291         * invoke.texi (parloops-min-per-thread): Document.
6292
6293 2017-11-17  Vineet Gupta  <vgupta@synopsys.com>
6294
6295         * config/arc/linux.h: GLIBC_DYNAMIC_LINKER update per glibc
6296         upstreaming review comments.
6297
6298 2017-11-17  Tamar Christina  <tamar.christina@arm.com>
6299
6300         * expr.c (copy_blkmode_to_reg): Fix bitsize for targets
6301         with fast unaligned access.
6302         * doc/sourcebuild.texi (word_mode_no_slow_unalign): New.
6303
6304 2017-11-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
6305
6306         * config/arm/arm.c (cmse_nonsecure_entry_clear_before_return): Allocate
6307         to_clear_arg_regs_bitmap to the same size as to_clear_bitmap.
6308
6309 2017-11-17  Richard Biener  <rguenther@suse.de>
6310
6311         * tree-ssa-pre.c (phi_translate_1): Remove redundant constant
6312         folding of references.
6313
6314 2017-11-17  Qing Zhao  <qing.zhao@oracle.com>
6315
6316         PR middle-end/78809
6317         * gimple-fold.c (gimple_fold_builtin_string_compare): Add handling
6318         of replacing call to strncmp with corresponding call to strcmp when
6319         meeting conditions.
6320
6321 2017-11-17  Sergey Shalnov  <Sergey.Shalnov@intel.com>
6322
6323         * config/i386/x86-tune.def (X86_TUNE_AVX256_OPTIMAL): Add tuning
6324         option prefer-avx256 for skylake-avx512 configuration.
6325         * config/i386/i386.c (ix86_option_override_internal): Ditto.
6326         (get_builtin_code_for_version): Ditto.
6327
6328 2017-11-17  Chung-Ju Wu  <jasonwucj@gmail.com>
6329             Monk Chiang  <sh.chiang04@gmail.com>
6330
6331         * config/nds32/nds32.h (FIRST_PSEUDO_REGISTER): Modify.
6332         (FIXED_REGISTERS): Reserve more register numbers.
6333         (CALL_USED_REGISTERS): Likewise.
6334         (REG_ALLOC_ORDER): Likewise.
6335         (REG_CLASS_CONTENTS): Likewise.
6336         (REGISTER_NAMES): Likewise.
6337
6338 2017-11-17  Chung-Ju Wu  <jasonwucj@gmail.com>
6339             Kito Cheng  <kito.cheng@gmail.com>
6340
6341         * config/nds32/nds32-modes.def: Add vector mode V4QI V2HI V8QI V4HI
6342         V2SI.
6343         * config/nds32/iterators.md: Add vector mode iterators and attributes.
6344
6345 2017-11-16  Steven Munroe  <munroesj@gcc.gnu.org>
6346
6347         * config/rs6000/mmintrin.h (_mm_add_pi32[_ARCH_PWR]): Correct
6348         parameter list for vec_splats.
6349
6350 2017-11-16  Joseph Myers  <joseph@codesourcery.com>
6351
6352         * doc/invoke.texi (-std=c17): Refer to 2018 expected publication
6353         date of C17.
6354         (-std=c18, -std=iso9899:2018, -std=gnu18): Document option aliases.
6355
6356 2017-11-16  Thomas Koenig  <tkoenig@gcc.gnu.org>
6357
6358         PR bootstrap/82856
6359         * doc/install.texi: Document incompatibility of Perl >=5.6.26
6360         with the required version of automake 1.11.6.
6361
6362 2017-11-16  Pat Haugen  <pthaugen@us.ibm.com>
6363
6364         * rs6000/power9.md (power9fpdiv): New automaton and cpu_unit defined
6365         for it.
6366         (DU_C2_3_power9): Correct reservation combinations.
6367         (FP_DIV_power9, VEC_DIV_power9): New.
6368         (power9-alu): Split out rotate/shift...
6369         (power9-rot): ...to here, correct dispatch resource.
6370         (power9-cracked-alu, power9-mul, power9-mul-compare): Correct dispatch
6371         resource.
6372         (power9-fp): Correct latency.
6373         (power9-sdiv): Add div/sqrt resource.
6374         (power9-ddiv): Correct latency, add div/sqrt resource.
6375         (power9-sqrt, power9-dsqrt): Add div/sqrt resource.
6376         (power9-vecfdiv, power9-vecdiv): Correct latency, add div/sqrt
6377         resource.
6378         (power9-qpdiv, power9-qpmul): Adjust resource usage.
6379
6380 2017-11-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
6381
6382         * config/rs6000/rs6000.c (rs6000_expand_builtin): Do not do the
6383         switch statement mapping KF built-ins to TF built-ins if we don't
6384         have the proper ISA 3.0 assembler support.
6385
6386 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
6387
6388         * tree-emutls.c (lower_emutls_data): Remove unused bb_freq.
6389         (lower_emutls_function_body): Do not compute it.
6390
6391 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
6392
6393         * ipa-split.c (split_bb_info): Turn time to sreal.
6394         (split_point): Likewise.
6395         (dump_split_point): Likewise.
6396         (fine_split_points): Likewise.
6397         (execute_split_functions): Only zero split_bbs; turn time to sreals.
6398
6399 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
6400
6401         * ipa-fnsummary.c (analyze_function_body): Accumulate time consistently
6402         in sreal.
6403
6404 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
6405
6406         * predict.c (combine_predictions_for_bb): Preserve zero predicted
6407         edges.
6408         (expensive_function_p): Remove useless assert.
6409         (determine_unlikely_bbs): Propagate also forward; determine cold blocks
6410
6411 2017-11-16  Martin Sebor  <msebor@redhat.com>
6412
6413         PR tree-optimization/82588
6414         PR tree-optimization/82583
6415         * tree-vrp.c (check_array_ref): Handle flexible array members,
6416         string literals, and inner indices.
6417         (search_for_addr_array): Add detail to diagnostics.
6418
6419 2017-11-16  Nathan Sidwell  <nathan@acm.org>
6420
6421         PR c++/82836
6422         PR c++/82737
6423         * tree.h (COPY_DECL_RTL): Rename parms for clarity.
6424         (SET_DECL_ASSEMBLER_NAME): Forward to
6425         overwrite_decl_assembler_name.
6426         (COPY_DECL_ASSEMBLER_NAME): Rename parms for clarity.
6427         (overwrite_decl_assembler_name): Declare.
6428         * tree.c (overwrite_decl_assembler_name): New.
6429         * langhooks-def.h (lhd_overwrite_decl_assembler_name): Declare.
6430         (LANG_HOOKS_OVERWRITE_DECL_ASSEMBLER_NAME): Provide default.
6431         (LANG_HOOKS_INITIALIZER): Add it.
6432         * langhooks.h (struct lang_hooks): Add overwrite_decl_assembler_name.
6433         * langhooks.c (lhd_set_decl_assembler_name): Use
6434         SET_DECL_ASSEMBLER_NAME.
6435         (lhd_overwrite_decl_assembler_name): Default implementation.
6436
6437 2017-11-16  Wilco Dijkstra  <wdijkstr@arm.com>
6438             Jackson Woodruff  <jackson.woodruff@arm.com>
6439
6440         PR tree-optimization/71026
6441         * match.pd: Canonicalize constant multiplies in division.
6442
6443 2017-11-16  Wilco Dijkstra  <wdijkstr@arm.com>
6444
6445         * opts.c (default_options_table): Add OPT_fomit_frame_pointer entry.
6446         * common/config/alpha/alpha-common.c (TARGET_OPTION_OPTIMIZATION_TABLE):
6447         Remove OPT_fomit_frame_pointer entry.
6448         * common/config/arc/arc-common.c: Likewise.
6449         * common/config/arm/arm-common.c: Likewise.
6450         * common/config/avr/avr-common.c: Likewise.
6451         * common/config/c6x/c6x-common.c: Likewise.
6452         * common/config/cr16/cr16-common.c: Likewise.
6453         * common/config/cris/cris-common.c: Likewise.
6454         * common/config/epiphany/epiphany-common.c: Likewise.
6455         * common/config/fr30/fr30-common.c: Likewise.
6456         * common/config/frv/frv-common.c: Likewise.
6457         * common/config/ia64/ia64-common.c: Likewise.
6458         * common/config/iq2000/iq2000-common.c: Likewise.
6459         * common/config/lm32/lm32-common.c: Likewise.
6460         * common/config/m32r/m32r-common.c: Likewise.
6461         * common/config/mcore/mcore-common.c: Likewise.
6462         * common/config/microblaze/microblaze-common.c: Likewise.
6463         * common/config/mips/mips-common.c: Likewise.
6464         * common/config/mmix/mmix-common.c: Likewise.
6465         * common/config/mn10300/mn10300-common.c: Likewise.
6466         * common/config/nios2/nios2-common.c: Likewise.
6467         * common/config/pa/pa-common.c: Likewise.
6468         * common/config/pdp11/pdp11-common.c: Likewise.
6469         * common/config/powerpcspe/powerpcspe-common.c: Likewise.
6470         * common/config/riscv/riscv-common.c: Likewise.
6471         * common/config/rs6000/rs6000-common.c: Likewise.
6472         * common/config/rx/rx-common.c: Likewise.
6473         * common/config/s390/s390-common.c: Likewise.
6474         * common/config/sh/sh-common.c: Likewise.
6475         * common/config/sparc/sparc-common.c: Likewise.
6476         * common/config/tilegx/tilegx-common.c: Likewise.
6477         * common/config/tilepro/tilepro-common.c: Likewise.
6478         * common/config/v850/v850-common.c: Likewise.
6479         * common/config/visium/visium-common.c: Likewise.
6480         * common/config/xstormy16/xstormy16-common.c: Likewise.
6481         * common/config/xtensa/xtensa-common.c: Likewise.
6482         * invoke.texi (-fomit-frame-pointer): Update documentation.
6483
6484 2017-11-16  Jan Hubicka  <hubicka@ucw.cz>
6485
6486         * tree-cfg.c (gimple_find_sub_bbs): Do not compute freq.
6487
6488 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
6489
6490         * cfg.c (scale_bbs_frequencies_int,
6491         cale_bbs_frequencies_gcov_type): Remove.
6492         * cfg.h (scale_bbs_frequencies_int,
6493         cale_bbs_frequencies_gcov_type): Remove.
6494
6495 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
6496
6497         * tree-ssa-loop-manip.c
6498         (scale_dominated_blocks_in_loop): Update to profile counts.
6499         (tree_transform_and_unroll_loop): Likewise.
6500
6501 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
6502
6503         * tree-vect-loop-manip.c (vect_do_peeling): Do not use
6504         scale_bbs_frequencies_int.
6505
6506 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
6507
6508         * final.c (compute_alignments): Use counts rather than frequencies.
6509
6510 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
6511
6512         * cfgloopanal.c: Include sreal.h
6513         (average_num_loop_insns): Use counts and sreal for accounting.
6514
6515 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
6516
6517         * cfgloopmanip.c (duplicate_loop_to_header_edge): Cleanup profile
6518         manipulation.
6519
6520 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
6521             Kito Cheng  <kito.cheng@gmail.com>
6522
6523         * config/nds32/constraints.md: Provide more constraints.
6524         * config/nds32/nds32.h (enum reg_class, REG_CLASS_NAMES,
6525         REG_CLASS_CONTENTS): Define R5_REG, R8_REG, and FRAME_POINTER_REG to
6526         support constraints usage.
6527
6528 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
6529
6530         * config/nds32/constants.md (UNSPEC_VOLATILE_FUNC_RETURN): Remove.
6531
6532 2017-11-16  Chung-Ju Wu  <jasonwucj@gmail.com>
6533             Kito Cheng  <kito.cheng@gmail.com>
6534
6535         * config/nds32/nds32.opt: Add mext-perf, mext-perf2, mext-string.
6536         * config/nds32/nds32.opt: Refine the layout.
6537         * config/nds32/nds32.c (TARGET_EXT_PERF, TARGET_EXT_PERF2,
6538         TARGET_EXT_STRING): Support new options.
6539         * config/nds32/nds32.h: Likewise.
6540         * config/nds32/nds32.md: Likewise.
6541         * config/nds32/nds32-predicates.c: Likewise.
6542         * config/nds32/constraints.md: Likewise.
6543         * common/config/nds32/nds32-common.c: Likewise.
6544
6545 2017-11-16  Julia Koval  <julia.koval@intel.com>
6546
6547         PR target/82983
6548         * config/i386/gfniintrin.h: Add sse check.
6549         * config/i386/i386.c (ix86_expand_builtin): Fix gfni check.
6550
6551 2017-11-16  Julia Koval  <julia.koval@intel.com>
6552
6553         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VBMI2_SET,
6554         OPTION_MASK_ISA_AVX512VBMI2_UNSET): New.
6555         (ix86_handle_option): Handle -mavx512vbmi2.
6556         * config/i386/cpuid.h: Add bit_AVX512VBMI2.
6557         * config/i386/driver-i386.c (host_detect_local_cpu): Handle new bit.
6558         * config/i386/i386-c.c (__AVX512VBMI2__): New.
6559         * config/i386/i386.c (ix86_target_string): Handle -mavx512vbmi2.
6560         (ix86_valid_target_attribute_inner_p): Ditto.
6561         * config/i386/i386.h (TARGET_AVX512VBMI2, TARGET_AVX512VBMI2_P): New.
6562         * config/i386/i386.opt (mavx512vbmi2): New option.
6563         * doc/invoke.texi: Add new option.
6564
6565 2017-11-16  Julia Koval  <julia.koval@intel.com>
6566
6567         * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8, _mm256_gf2p8mul_epi8,
6568         _mm_mask_gf2p8mul_epi8, _mm_maskz_gf2p8mul_epi8,
6569         _mm256_mask_gf2p8mul_epi8, _mm256_maskz_gf2p8mul_epi8,
6570         _mm512_mask_gf2p8mul_epi8, _mm512_maskz_gf2p8mul_epi8,
6571         _mm512_gf2p8mul_epi8): New intrinsics.
6572         * config/i386/i386-builtin-types.def
6573         (V64QI_FTYPE_V64QI_V64QI): New type.
6574         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8mulb_v64qi,
6575         __builtin_ia32_vgf2p8mulb_v64qi_mask, __builtin_ia32_vgf2p8mulb_v32qi,
6576         __builtin_ia32_vgf2p8mulb_v32qi_mask, __builtin_ia32_vgf2p8mulb_v16qi,
6577         __builtin_ia32_vgf2p8mulb_v16qi_mask): New builtins.
6578         * config/i386/sse.md (vgf2p8mulb_*): New pattern.
6579         * config/i386/i386.c (ix86_expand_args_builtin): Handle new type.
6580
6581 2017-11-15  Uros Bizjak  <ubizjak@gmail.com>
6582
6583         * config/i386/i386.c (x86_print_call_or_nop): Emit 5 byte nop
6584         explicitly as a stream of bytes.
6585
6586 2017-11-15  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
6587
6588         * config/rs6000/altivec.h (vec_xst_be): New #define.
6589         * config/rs6000/altivec.md (altivec_vperm_<mode>_direct): Rename
6590         and externalize from *altivec_vperm_<mode>_internal.
6591         * config/rs6000/rs6000-builtin.def (XL_BE_V16QI): Remove macro
6592         instantiation.
6593         (XL_BE_V8HI): Likewise.
6594         (XL_BE_V4SI): Likewise.
6595         (XL_BE_V4SI): Likewise.
6596         (XL_BE_V2DI): Likewise.
6597         (XL_BE_V4SF): Likewise.
6598         (XL_BE_V2DF): Likewise.
6599         (XST_BE): Add BU_VSX_OVERLOAD_X macro instantiation.
6600         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Correct
6601         all array entries with these keys: VSX_BUILTIN_VEC_XL,
6602         VSX_BUILTIN_VEC_XL_BE, VSX_BUILTIN_VEC_XST.  Add entries for key
6603         VSX_BUILTIN_VEC_XST_BE.
6604         * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Remove.
6605         (altivec_expand_builtin): Remove handling for VSX_BUILTIN_XL_BE_*
6606         built-ins.
6607         (altivec_init_builtins): Replace conditional calls to def_builtin
6608         for __builtin_vsx_ld_elemrev_{v8hi,v16qi} and
6609         __builtin_vsx_st_elemrev_{v8hi,v16qi} based on TARGET_P9_VECTOR
6610         with unconditional calls.  Remove calls to def_builtin for
6611         __builtin_vsx_le_be_<mode>.  Add a call to def_builtin for
6612         __builtin_vec_xst_be.
6613         * config/rs6000/vsx.md (vsx_ld_elemrev_v8hi): Convert define_insn
6614         to define_expand, and add alternate RTL generation for P8.
6615         (*vsx_ld_elemrev_v8hi_internal): New define_insn based on
6616         vsx_ld_elemrev_v8hi.
6617         (vsx_ld_elemrev_v16qi): Convert define_insn to define_expand, and
6618         add alternate RTL generation for P8.
6619         (*vsx_ld_elemrev_v16qi_internal): New define_insn based on
6620         vsx_ld_elemrev_v16qi.
6621         (vsx_st_elemrev_v8hi): Convert define_insn
6622         to define_expand, and add alternate RTL generation for P8.
6623         (*vsx_st_elemrev_v8hi_internal): New define_insn based on
6624         vsx_st_elemrev_v8hi.
6625         (vsx_st_elemrev_v16qi): Convert define_insn to define_expand, and
6626         add alternate RTL generation for P8.
6627         (*vsx_st_elemrev_v16qi_internal): New define_insn based on
6628         vsx_st_elemrev_v16qi.
6629
6630 2017-11-15  H.J. Lu  <hongjiu.lu@intel.com>
6631
6632         PR target/82990
6633         * config/i386/i386.c (pass_insert_vzeroupper::gate): Remove
6634         TARGET_AVX512ER check.
6635         (ix86_option_override_internal): Set MASK_VZEROUPPER if
6636         neither -mzeroupper nor -mno-zeroupper is used and
6637         TARGET_EMIT_VZEROUPPER is set.
6638         * config/i386/i386.h (TARGET_EMIT_VZEROUPPER): New.
6639         * config/i386/x86-tune.def: Add X86_TUNE_EMIT_VZEROUPPER.
6640
6641 2017-11-15  Will Schmidt  <will_schmidt@vnet.ibm.com>
6642
6643         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
6644         folding of vector compares.
6645         (fold_build_vec_cmp): New helper function.
6646         (fold_compare_helper): New helper function.
6647         (builtin_function_type): Add compare builtins to the list of functions
6648         having unsigned arguments.  Cosmetic updates to comment indentation.
6649         * config/rs6000/vsx.md (vcmpneb, vcmpneh, vcmpnew): Update to specify
6650         the not+eq combination.
6651
6652 2017-11-15  Bin Cheng  <bin.cheng@arm.com>
6653
6654         PR tree-optimization/82726
6655         PR tree-optimization/70754
6656         * tree-predcom.c (order_drefs_by_pos): New function.
6657         (combine_chains): Move code setting has_max_use_after to...
6658         (try_combine_chains): ...here.  New parameter.  Sort combined chains
6659         according to position information.
6660         (tree_predictive_commoning_loop): Update call to above function.
6661         (update_pos_for_combined_chains, pcom_stmt_dominates_stmt_p): New.
6662
6663 2017-11-15  Bin Cheng  <bin.cheng@arm.com>
6664
6665         PR tree-optimization/82726
6666         Revert
6667         2017-01-23  Bin Cheng  <bin.cheng@arm.com>
6668
6669         PR tree-optimization/70754
6670         * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
6671         (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
6672         combined stmt before it if not NULL.
6673         (combine_chains): Process refs reversely and compute dominance point
6674         for root ref.
6675
6676         Revert
6677         2017-02-23  Bin Cheng  <bin.cheng@arm.com>
6678
6679         PR tree-optimization/79663
6680         * tree-predcom.c (combine_chains): Process refs in reverse order
6681         only for ZERO length chains, and add explaining comment.
6682
6683 2017-11-15  Tamar Christina  <tamar.christina@arm.com>
6684
6685         * config/arm/arm-cpus.in (armv8_3, ARMv8_3a, armv8.3-a): New
6686         * config/arm/arm-tables.opt (armv8.3-a): Regenerated.
6687         * doc/invoke.texi (ARM Options): Add armv8.3-a.
6688
6689 2017-11-15  Tamar Christina  <tamar.christina@arm.com>
6690
6691         * config/arm/arm.h (TARGET_DOTPROD): Add arm_arch8_2.
6692
6693 2017-11-15  Martin Liska  <mliska@suse.cz>
6694
6695         * tree-cfg.c (pass_warn_function_return::execute):
6696         Compare warn_return_type for greater than zero.
6697
6698 2017-11-15  Sebastian Peryt  <sebastian.peryt@intel.com>
6699
6700         PR target/82941
6701         PR target/82942
6702         * config/i386/i386.c (pass_insert_vzeroupper): Modify gate condition
6703         to return true on Xeon and not on Xeon Phi.
6704         (ix86_check_avx256_register): Changed to ...
6705         (ix86_check_avx_upper_register): ... this. Add extra check for
6706         VALID_AVX512F_REG_OR_XI_MODE.
6707         (ix86_avx_u128_mode_needed): Changed
6708         ix86_check_avx256_register to ix86_check_avx_upper_register.
6709         (ix86_check_avx256_stores): Changed to ...
6710         (ix86_check_avx_upper_stores): ... this. Changed
6711         ix86_check_avx256_register to ix86_check_avx_upper_register.
6712         (ix86_avx_u128_mode_after): Changed
6713         avx_reg256_found to avx_upper_reg_found. Changed
6714         ix86_check_avx256_stores to ix86_check_avx_upper_stores.
6715         (ix86_avx_u128_mode_entry): Changed
6716         ix86_check_avx256_register to ix86_check_avx_upper_register.
6717         (ix86_avx_u128_mode_exit): Ditto.
6718         * config/i386/i386.h: (host_detect_local_cpu): New define.
6719
6720 2017-11-15  Dominik Infuehr  <dominik.infuehr@theobroma-systems.com>
6721
6722         * config/arm/xgene1.md (xgene1): Split into automatons
6723         xgene1_main, xgene1_decoder, xgene1_div, xgene1_simd.
6724         (xgene1_f_load): Adjust reservations and/or types.
6725         (xgene1_f_store): Likewise.
6726         (xgene1_load_pair): Likewise.
6727         (xgene1_store_pair): Likewise.
6728         (xgene1_fp_load1): Likewise.
6729         (xgene1_load1): Likewise.
6730         (xgene1_store1): Likewise.
6731         (xgene1_move): Likewise.
6732         (xgene1_alu): Likewise.
6733         (xgene1_simd): Likewise.
6734         (xgene1_bfm): Likewise.
6735         (xgene1_neon_load1): Likewise.
6736         (xgene1_neon_store1): Likewise.
6737         (xgene1_neon_logic): Likewise.
6738         (xgene1_neon_st1): Likewise.
6739         (xgene1_neon_ld1r): Likewise.
6740         (xgene1_alu_cond): Added.
6741         (xgene1_shift_reg): Likwise.
6742         (xgene1_bfx): Likewise.
6743         (xgene1_mul): Split into xgene1_mul32, xgene1_mul64.
6744
6745 2017-11-15  Jakub Jelinek  <jakub@redhat.com>
6746
6747         PR target/82981
6748         * internal-fn.c: Include gimple-ssa.h, tree-phinodes.h and
6749         ssa-iterators.h.
6750         (can_widen_mult_without_libcall): New function.
6751         (expand_mul_overflow): If only checking unsigned mul overflow,
6752         not result, and can do efficiently MULT_HIGHPART_EXPR, emit that.
6753         Don't use WIDEN_MULT_EXPR if it would involve a libcall, unless
6754         no other way works.  Add MULT_HIGHPART_EXPR + MULT_EXPR support.
6755         (expand_DIVMOD): Formatting fix.
6756         * expmed.h (expand_mult): Add NO_LIBCALL argument.
6757         * expmed.c (expand_mult): Likewise.  Use OPTAB_WIDEN rather
6758         than OPTAB_LIB_WIDEN if NO_LIBCALL is true, and allow it to fail.
6759
6760         PR tree-optimization/82977
6761         * tree-ssa-strlen.c (strlen_optimize_stmt): Pass a reference to a copy
6762         constructed temporary to strlen_to_stridx.put.
6763
6764 2017-11-15  Martin Liska  <mliska@suse.cz>
6765
6766         * configure.ac: Remove -fkeep-inline-functions from coverage_flags.
6767         * configure: Regenerate.
6768
6769 2017-11-15  Martin Liska  <mliska@suse.cz>
6770
6771         PR target/82927
6772         * config/sh/sh-mem.cc: Use proper probability for
6773         REG_BR_PROB_NOTE.
6774
6775 2017-11-14  Jeff Law  <law@redhat.com>
6776
6777         * explow.c (anti_adjust_stack_and_probe_stack_clash): Avoid probing
6778         the red zone for stack_clash_protection_final_dynamic_probe targets
6779         when the total dynamic stack size is zero bytes.
6780
6781         * tree-ssa-threadupdate.c (thread_through_all_blocks): Thread
6782         blocks is post order.
6783
6784 2017-11-15  Alexandre Oliva  <aoliva@redhat.com>
6785
6786         * dumpfile.h (TDF_COMPARE_DEBUG): New.
6787         * final.c (rest_of_clean_state): Set it for the
6788         -fcompare-debug dump.
6789         * tree-pretty-print.c (dump_generic_node): Omit OBJ_TYPE_REF
6790         class when TDF_COMPARE_DEBUG is set.
6791
6792         * dwarf2out.c (gen_producer_string): Discard
6793         OPT_fcompare_debug.
6794
6795 2017-11-15  Joseph Myers  <joseph@codesourcery.com>
6796
6797         PR c/81156
6798         * doc/extend.texi (Other Builtins): Document __builtin_tgmath.
6799         * ginclude/tgmath.h (__tg_cplx, __tg_ldbl, __tg_dbl, __tg_choose)
6800         (__tg_choose_2, __tg_choose_3, __TGMATH_REAL_1_2)
6801         (__TGMATH_REAL_2_3): Remove macros.
6802         (__TGMATH_CPLX, __TGMATH_CPLX_2, __TGMATH_REAL, __TGMATH_REAL_2)
6803         (__TGMATH_REAL_3, __TGMATH_CPLX_ONLY): Define using
6804         __builtin_tgmath.
6805         (frexp, ldexp, nexttoward, scalbn, scalbln): Define using
6806         __TGMATH_REAL_2.
6807         (remquo): Define using __TGMATH_REAL_3.
6808
6809 2017-11-14  Jeff Law  <law@redhat.com>
6810
6811         * vr-values.c: New file with contents extracted from tree-vrp.c.
6812         * Makefile.in (OBJS): Add vr-values.o
6813         * tree-vrp.h (set_value_range_to_nonnull): Prototype.
6814         (set_value_range, set_and_canonicalize_value_range): Likewise.
6815         (vrp_bitmap_equal_p, range_is_nonnull): Likewise.
6816         (value_range_constant_singleton, symbolic_range_p): Likewise.
6817         (compare_values, compare_values_warnv, vrp_val_is_min): Likewise.
6818         (vrp_val_is_max, copy_value_range, set_value_range_to_value): Likewise.
6819         (extract_range_from_binary_expr_1, vrp_val_min, vrp_val_max): Likewise.
6820         (set_value_range_to_null, range_int_cst_p, opreand_less_p): Likewise.
6821         (find_case_label_range, find_case_label_index): Likewise.
6822         (zero_nonzero_bits_from_vr, overflow_comparison_p): Likewise.
6823         (range_int_cst_singleton_p, value_inside_range): Likewise.
6824         (get_single_symbol): Likewise.
6825         (switch_update): Move structure definition here.
6826         (to_remove_edges, to_update_switch_stmts): Provide externs.
6827         * tree-vrp.c: Move all methods for vr-values class to vr-values.c
6828         (vrp_val_max, vrp_val_min, vrp_val_is_max): Make externally visible.
6829         (vrp_val_is_min, set_value_range): Likewise.
6830         (set_and_canonicalize_value_range, copy_value_range): Likewise.
6831         (set_value_range_to_value, set_value_range_to_nonnull): Likewise.
6832         (set_value_range_to_null, vrp_bitmap_equal_p): Likewise.
6833         (range_is_nonnull, range_int_cst_p): Likewwise.
6834         (range_int_cst_singleton_p, symbolic_range_p): Likewise.
6835         (get_single_symbol, operand_less_p): Likewise
6836         (compare_values_warnv, compare_values): Likewise.
6837         (value_inside_range, value_range_constant_singleton): Likewise.
6838         (zero_nonzero_bitgs_from_vr): Likewise.
6839         (extract_range_from_binary_expr_1): Likewise.
6840         (overflow_comparison_p): Likewise.
6841         (to_remove_edges, to_update_switch_stmts): Likewise.
6842         (find_case_label-index, find_case_label_range): Likewise.
6843         (switch_update, set_value_range_to_nonnegative): Remove.
6844         (set_value_range_to_truthvalue): Likewise.
6845         (symbolic_range_based_on_p, gimple_assign_nonzero_p): Likewise.
6846         (gimple_stmt_nonzero_p, compare_ranges): Likewise.
6847         (compare_range_with_value, vrp_valueize, vrp_valueize_1): Likewise.
6848         (find_case_label_ranges, test_for_singularity): Likewise.
6849         (range_fits_type_p, simplify_conversion_using_ranges): LIkewise.
6850         (x_vr_values): Move to its remaining use site.
6851
6852 2017-11-10  Jeff Law  <law@redhat.com>
6853
6854         * vr-values.h (VR_INITIALIZER): Move #define here.
6855         * gimple-ssa-evrp.c: New file with contents extracted from tree-vrp.c
6856         * Makefile.in (OBJS): Add tree-evrp.o
6857         * tree-vrp.h (assert_info): Move structure definition here.
6858         (set_value_range_to_varying): Prototype.
6859         (vrp_operand_equal_p, range_includes_zero_p): Likewise.
6860         (infer_value_range, register_edge_assert_for): Likewise.
6861         (stmt_interesting_for_vrp): Likewise.
6862         * tree-vrp.c: Move all methods for evrp class into gimple-ssa-evrp.c.
6863         (set_value_range_to_varying): No longer static.
6864         (vrp_operand_equal_p, range_includes_zero_p): Likewise.
6865         (infer_value_range, register_edge_assert_for): Likewise.
6866
6867 2017-11-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
6868
6869         * config/rs6000/rs6000.md (bswapdi2): On 32-bit ISA 3.0, don't
6870         generate the XXBRD instruction.
6871
6872         * config/rs6000/rs6000-c.c (is_float128_p): New helper function.
6873         (rs6000_builtin_type_compatible): Treat _Float128 and long double
6874         as being compatible if -mabi=ieeelongdouble.
6875         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_HW_1): New macros
6876         to setup float128 built-ins with hardware support.
6877         (BU_FLOAT128_HW_2): Likewise.
6878         (BU_FLOAT128_HW_3): Likewise.
6879         (BU_FLOAT128_HW_VSX_1): Likewise.
6880         (BU_FLOAT128_HW_VSX_2): Likewise.
6881         (scalar_extract_expq): Change float128 built-in functions to
6882         accommodate having both KFmode and TFmode functions.  Use the
6883         KFmode variant as the default.
6884         (scalar_extract_sigq): Likewise.
6885         (scalar_test_neg_qp): Likewise.
6886         (scalar_insert_exp_q): Likewise.
6887         (scalar_insert_exp_qp): Likewise.
6888         (scalar_test_data_class_qp): Likewise.
6889         (sqrtf128_round_to_odd): Delete processing the round to odd
6890         built-in functions as special built-in functions, and define them
6891         as float128 built-ins.  Use the KFmode variant as the default.
6892         (truncf128_round_to_odd): Likewise.
6893         (addf128_round_to_odd): Likewise.
6894         (subf128_round_to_odd): Likewise.
6895         (mulf128_round_to_odd): Likewise.
6896         (divf128_round_to_odd): Likewise.
6897         (fmaf128_round_to_odd): Likewise.
6898         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
6899         support for KFmode and TFmode xststdcqp calls.
6900         (rs6000_expand_builtin): If long double is IEEE 128-bit floating
6901         point, switch the built-in handlers for the get/set float128
6902         exponent, get float128 mantissa, float128 test built-ins, and the
6903         float128 round to odd built-in functions.  Eliminate creating the
6904         float128 round to odd built-in functions as special built-ins.
6905         (rs6000_init_builtins): Eliminate special creation of the float128
6906         round to odd built-in functions.
6907         * config/rs6000/vsx.md (xsxexpqp_<mode>): Change float128 built-in
6908         function insns to support both TFmode and KFmode variants.
6909         (xsxsigqp_<mode>): Likewise.
6910         (xsiexpqpf_<mode>): Likewise.
6911         (xsiexpqp_<mode>): Likewise.
6912         (xststdcqp_<mode>): Likewise.
6913         (xststdcnegqp_<mode>): Likewise.
6914         (xststdcqp_<mode>): Likewise.
6915
6916 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
6917
6918         * tree-ssa-threadupdate.c (compute_path_counts): Remove
6919         unused path_in_freq_ptr parameter.
6920         (ssa_fix_duplicate_block_edges): Do not pass around path_in_freq
6921
6922 2017-11-14  Jan Hubicka  <hubicka@ucw.cz>
6923
6924         * ipa-inline.c (edge_badness): Dump sreal frequency.
6925         (compute_inlined_call_time): Match natural implementaiton ...
6926         * ipa-fnsummary.c (estimate_edge_size_and_time): ... here; remove
6927         forgotten division by CGRAPH_FREQ_BASE.
6928
6929 2017-11-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6930
6931         * config.gcc (*-*-solaris2*): Enable default_use_cxa_atexit since
6932         Solaris 11.  Update comment.
6933         * configure.ac (gcc_cv_ld_pid): Adapt comment for Solaris 12
6934         renaming.
6935         * config/sol2.h (STARTFILE_SPEC): Likewise.
6936         * configure: Regenerate.
6937
6938 2017-11-14  Carl Love  <cel@us.ibm.com>
6939
6940         * config/rs6000/rs6000.c (swap_endian_selector_for_mode): Remove
6941         le_ and be_ prefixes to swap* variables.  Remove
6942         if (VECTOR_ELT_ORDER_BIG) statement. Remove E_V16QImode case
6943         statements.
6944
6945 2017-11-14  Jason Merrill  <jason@redhat.com>
6946
6947         Support GTY((cache)) on hash_map.
6948         * hash-traits.h (ggc_remove): Add ggc_maybe_mx member function.
6949         (ggc_cache_remove): Override it instead of ggc_mx.
6950         * hash-table.h (gt_ggc_mx): Call it instead of ggc_mx.
6951         (gt_cleare_cache): Call ggc_mx instead of gt_ggc_mx.
6952         * hash-map-traits.h (simple_hashmap_traits): Add maybe_mx member.
6953         (simple_cache_map_traits): Override maybe_mx.
6954         * hash-map.h (hash_entry): Add ggc_maybe_mx and keep_cache_entry.
6955         (hash_map): Friend gt_cleare_cache.
6956         (gt_cleare_cache): New.
6957         * tree.h (tree_cache_traits): New hash_map traits class.
6958         (tree_cache_map): New typedef.
6959
6960 2017-11-14  Richard Biener  <rguenther@suse.de>
6961
6962         * tree-cfgcleanup.c (cleanup_control_expr_graph): Remove first_p
6963         paramter and handling.
6964         (cleanup_control_flow_bb): Likewise.
6965         (cleanup_control_flow_pre): New helper performing a DFS walk
6966         to call cleanup_control_flow_bb in PRE order.
6967         (cleanup_tree_cfg_1): Do the first phase of cleanup_control_flow_bb
6968         via cleanup_control_flow_pre.
6969
6970 2017-11-14  James Greenhalgh  <james.greenhalgh@arm.com>
6971
6972         * config/aarch64/aarch64-simd.md
6973         (aarch64_simd_bsl<mode>_internal): Remove DImode.
6974         (*aarch64_simd_bsl<mode>_alt): Likewise.
6975         (aarch64_simd_bsldi_internal): New.
6976         (aarch64_simd_bsldi_alt): Likewise.
6977
6978 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
6979
6980         * tracer.c (better_p): Do not compare frequencies.
6981         * reg-stack.c (better_edge): Likewise.
6982         * shrink-wrap.c (try_shrink_wrapping): Do not convert to gcov counts
6983         and back.
6984
6985 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
6986
6987         * auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
6988         * cgraphunit.c (cgraph_node::expand_thunk): Use update_max_bb_count.
6989         * ipa-utils.c (ipa_merge_profiles): Use update_max_bb_count.
6990         * lto-streamer-in.c (input_function): Use update_max_bb_count.
6991         * omp-expand.c (expand_omp_taskreg): Use update_max_bb_count.
6992         * predict.c (maybe_hot_frequency_p): Inline to ...
6993         (maybe_hot_count_p): ... here; rewrite to counts.
6994         (counts_to_freqs): Rename to ...
6995         (update_max_bb_count): ... this one.
6996         (expensive_function_p): Use counts.
6997         (estimate_bb_frequencies): Update.
6998         (rebuild_frequencies): Update.
6999         * predict.h (counts_to_freqs): Rename to ...
7000         (update_max_bb_count): ... this one.
7001         * profile.c (compute_branch_probabilities): Add debug info
7002         * tree-inline.c (expand_call_inline): Update debug info.
7003         (optimize_inline_calls): Use update_max_bb_count..
7004         (tree_function_versioning): Use update_max_bb_count..
7005         * value-prof.c (gimple_value_profile_transformations):
7006         Do not use update_max_bb_count.
7007
7008 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
7009
7010         * ipa-inline.c (compute_uninlined_call_time, compute_inlined_call_time):
7011         always use frequencies.
7012
7013 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
7014
7015         * bb-reorder.c: Remove frequencies from comments.
7016         (better_edge_p): Use profile counts.
7017         (find_traces): Dump profile counts.
7018         (rotate_loop): Use profile counts.
7019         (find_traces_1_round): Likewise.
7020         (connect_better_edge_p): Use counts instead of probabilities for
7021         reverse walk.
7022         (copy_bb_p): Drop early check for non-0 frequency.
7023         (sanitize_hot_paths): Update comments.
7024
7025 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
7026
7027         * ipa-split.c (struct split_point): Add count.
7028         (consider_split): Do not compute incoming frequency; compute incoming
7029         count and store it to split_point.
7030         (split_function): Set count of the call to split part correctly.
7031
7032 2017-11-13  Carl Love  <cel@us.ibm.com>
7033
7034         * config/rs6000/altivec.md (altivec_vsumsws_be): Add define_expand.
7035
7036 2017-11-13  Tom Tromey  <tom@tromey.com>
7037
7038         * doc/cpp.texi (Variadic Macros): Document __VA_OPT__.
7039
7040 2017-11-13  Carl Love  <cel@us.ibm.com>
7041
7042         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins):
7043         Add support for builtins:
7044         unsigned int vec_first_{,miss}_match_{,or_eos}index,
7045         vector {un,}signed {char,int,short},
7046         vector {un,}signed {char,int,short}) arguments.
7047         * config/rs6000/rs6000-builtin.def (VFIRSTMATCHINDEX,
7048         VFIRSTMATCHOREOSINDEX, VFIRSTMISMATCHINDEX, VFIRSTMISMATCHOREOSINDEX):
7049         Add BU_P9V_AV_2 expansions for the builtins.
7050         * config/rs6000/altivec.h (vec_first_match_index,
7051         vec_first_mismatch_index, vec_first_match_or_eos_index,
7052         vec_first_mismatch_or_eos_index): Add #defines for the builtins.
7053         * config/rs6000/rs6000-protos.h (bytes_in_mode): Add
7054         new extern declaration.
7055         * config/rs6000/rs6000.c (bytes_in_mode): Add new function.
7056         * config/rs6000/vsx.md (first_match_index_<mode>,
7057         first_match_or_eos_index_<mode>, first_mismatch_index_<mode>,
7058         first_mismatch_or_eos_index_<mode>): Add define expand.
7059         (vctzlsbb_<mode>): Add mode field to define_insn for vctzlsbb.
7060         * doc/extend.texi: Update the built-in documenation file for the new
7061         built-in functions.
7062
7063 2017-11-13  Michael Meissner  <meissner@linux.vnet.ibm.com>
7064
7065         * match.pd: Convert fminf<N>, fminf<N>x, fmax<N>, and fmax<N>x
7066         into the min/max operations for _Float<N> and _Float<N>X types.
7067
7068 2017-11-13  Eric Botcazou  <ebotcazou@adacore.com>
7069
7070         PR lto/81351
7071         * dwarf2out.c (do_eh_frame): New static variable.
7072         (dwarf2out_begin_prologue): Set it.
7073         (dwarf2out_frame_finish): Test it instead of dwarf2out_do_eh_frame.
7074
7075 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
7076
7077         * tree-ssa-coalesce.c (coalesce_cost): Fix formating.
7078
7079         * tree-ssa-sink.c (select_best_block): Do not use frequencies.
7080
7081 2017-11-13  Eric Botcazou  <ebotcazou@adacore.com>
7082
7083         PR lto/81351
7084         * debug.h (dwarf2out_do_eh_frame): Declare.
7085         * dwarf2cfi.c (dwarf2out_do_eh_frame): New predicate.
7086         (dwarf2out_do_frame): Use it.
7087         (dwarf2out_do_cfi_asm): Likewise.
7088         * dwarf2out.c (dwarf2out_frame_finish): Likewise.
7089         (dwarf2out_assembly_start): Likewise.
7090         (dwarf2out_begin_prologue): Fix comment.
7091         * toplev.c (compile_file): Always call dwarf2out_frame_finish
7092         if the target needs either debug or unwind DWARF2 info.
7093         * lto-opts.c (lto_write_options): Do not save -fexceptions,
7094         -fnon-call-exceptions, -ffp-contract, -fmath-errno, -fsigned-zeros,
7095         -ftrapping-math, -ftrapv and -fwrapv.
7096
7097 2017-11-13  Jan Hubicka  <hubicka@ucw.cz>
7098
7099         * cgraph.c (cgraph_edge::sreal_frequency): New function.
7100         * cgraph.h (cgraph_edge::sreal_frequency): Declare.
7101         * ipa-fnsummary.c (dump_ipa_call_summary): Use sreal_frequency.
7102         (estimate_edge_size_and_time): Likewise.
7103         (ipa_merge_fn_summary_after_inlining): Likewise.
7104         * ipa-inline.c (cgraph_freq_base_rec): Remove.
7105         (compute_uninlined_call_time): Use sreal_frequency.
7106         (compute_inlined_call_time): Likewise.
7107         (ipa_inline): Do not initialize cgraph_freq_base_rec.
7108         * profile-count.c: Include sreal.h.
7109         (profile_count::to_sreal_scale): New.
7110         * profile-count.h: Forward declare sreal.
7111         (profile_count::to_sreal_scale): Declare.
7112
7113 2017-11-13  Nathan Sidwell  <nathan@acm.org>
7114
7115         * diagnostic.c (maybe_line_and_column): New.
7116         (diagnostic_get_location_text): Use it.
7117         (diagnostic_report_current_module): Likewise.
7118         (test_diagnostic_get_location_text): Add tests.
7119
7120 2017-11-13  Luis Machado  <luis.machado@linaro.org>
7121
7122         * doc/md.texi (Specifying processor pipeline description): Fix
7123         incorrect latency for the div instruction example.
7124
7125 2017-11-13  Jakub Jelinek  <jakub@redhat.com>
7126
7127         PR tree-optimization/78821
7128         * gimple-ssa-store-merging.c (compatible_load_p): Don't require
7129         that bit_not_p is the same.
7130         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
7131         (split_group): Count precisely bit_not_p bits in each statement.
7132         (invert_op): New function.
7133         (imm_store_chain_info::output_merged_store): Use invert_op to
7134         emit BIT_XOR_EXPR with a xor_mask instead of BIT_NOT_EXPR if some
7135         but not all orig_stores have BIT_NOT_EXPR in the corresponding spots.
7136
7137 2017-11-13  Martin Liska  <mliska@suse.cz>
7138
7139         * gcov.c (struct coverage_info): Remove typedef of coverage_t.
7140         (struct source_info): Likewise.
7141         (add_branch_counts): Likewise.
7142         (add_line_counts): Likewise.
7143         (function_summary): Likewise.
7144         (output_intermediate_line): Likewise.
7145         (generate_results): Likewise.
7146
7147 2017-11-13  Martin Liska  <mliska@suse.cz>
7148
7149         * gcov.c (struct block_info): Remove typedef for block_t.
7150         (struct line_info): Likewise.
7151         (line_info::has_block): Likewise.
7152         (EXIT_BLOCK): Likewise.
7153         (unblock): Likewise.
7154         (circuit): Likewise.
7155         (get_cycles_count): Likewise.
7156         (process_file): Likewise.
7157         (read_graph_file): Likewise.
7158         (solve_flow_graph): Likewise.
7159         (find_exception_blocks): Likewise.
7160         (add_line_counts): Likewise.
7161         (accumulate_line_info): Likewise.
7162         (output_line_details): Likewise.
7163
7164 2017-11-13  Martin Liska  <mliska@suse.cz>
7165
7166         * gcov.c (struct arc_info): Remove typedef for arc_t.
7167         (struct line_info): Likewise.
7168         (add_branch_counts): Likewise.
7169         (output_branch_count): Likewise.
7170         (function_info::~function_info): Likewise.
7171         (circuit): Likewise.
7172         (output_intermediate_line): Likewise.
7173         (read_graph_file): Likewise.
7174         (solve_flow_graph): Likewise.
7175         (find_exception_blocks): Likewise.
7176         (add_line_counts): Likewise.
7177         (accumulate_line_info): Likewise.
7178         (output_line_details): Likewise.
7179         (output_function_details): Likewise.
7180
7181 2017-11-13  Martin Liska  <mliska@suse.cz>
7182
7183         * gcov.c (struct function_info): Remove typedef for function_t.
7184         (struct source_info): Likewise.
7185         (source_info::get_functions_at_location): Likewise.
7186         (solve_flow_graph): Likewise.
7187         (find_exception_blocks): Likewise.
7188         (add_line_counts): Likewise.
7189         (output_intermediate_file): Likewise.
7190         (process_file): Likewise.
7191         (generate_results): Likewise.
7192         (release_structures): Likewise.
7193         (read_graph_file): Likewise.
7194         (read_count_file): Likewise.
7195         (accumulate_line_counts): Likewise.
7196         (output_lines): Likewise.
7197
7198 2017-11-13  Martin Liska  <mliska@suse.cz>
7199
7200         * gcov.c (function_info::function_info): Remove num_counts
7201         and add vector<gcov_type>.
7202         (function_info::~function_info): Use the vector.
7203         (process_file): Likewise.
7204         (read_graph_file): Likewise.
7205         (read_count_file): Likewise.
7206         (solve_flow_graph): Likewise.
7207
7208 2017-11-13  Martin Liska  <mliska@suse.cz>
7209
7210         * gcov.c (function_info::is_artificial): New function.
7211         (process_file): Erase all artificial early.
7212         (generate_results): Skip as all artificial are already
7213         removed.
7214
7215 2017-11-13  Martin Liska  <mliska@suse.cz>
7216
7217         * gcov.c (read_graph_file): Store to global vector of functions.
7218         (read_count_file): Iterate the vector.
7219         (process_file): Likewise.
7220         (generate_results): Likewise.
7221         (release_structures): Likewise.
7222
7223 2017-11-13  Jakub Jelinek  <jakub@redhat.com>
7224
7225         PR tree-optimization/82954
7226         * gimple-ssa-store-merging.c
7227         (imm_store_chain_info::coalesce_immediate_stores): If
7228         !infof->ops[N].base_addr, split group if info->ops[N].base_addr.
7229
7230 2017-11-13  Richard Sandiford  <richard.sandiford@linaro.org>
7231
7232         * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
7233         Upddate call to ENDIAN_LANE_N.
7234         (aarch64_<sur>dot_lane<vsi2qi>): Use aarch64_endian_lane_rtx.
7235         (aarch64_<sur>dot_laneq<vsi2qi>): Likewise.
7236         (*aarch64_simd_vec_copy_lane<mode>): Update calls to ENDIAN_LANE_N
7237         and use aarch64_endian_lane_rtx.
7238         (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Likewise.
7239
7240 2017-11-12  Tom de Vries  <tom@codesourcery.com>
7241
7242         * config/riscv/riscv.h (ASM_OUTPUT_LABELREF): Wrap in do {} while (0).
7243
7244 2017-11-12  Tom de Vries  <tom@codesourcery.com>
7245
7246         * config/elfos.h (ASM_OUTPUT_ASCII): Remove semicolon after macro body.
7247
7248 2017-11-12  Tom de Vries  <tom@codesourcery.com>
7249
7250         * config/cr16/cr16.h (ASM_OUTPUT_LABELREF): Remove semicolon after macro
7251         body.
7252         * config/powerpcspe/xcoff.h (ASM_OUTPUT_LABELREF): Same.
7253         * config/rs6000/xcoff.h (ASM_OUTPUT_LABELREF): Same.
7254         * defaults.h (ASM_OUTPUT_LABELREF): Same.
7255
7256 2017-11-11  Martin Sebor  <msebor@redhat.com>
7257
7258         PR c/81117
7259         * doc/extend.texi (attribute nonstring): Remove spurious argument.
7260
7261         PR bootstrap/82948
7262         * prefic.c (translate_name): Replace strncpy with memcpy to
7263         avoid -Wstringop-truncation.
7264
7265 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
7266
7267         * tree-ssa-loop-im.c (execute_sm_if_changed): Do not compute freq_sum.
7268
7269 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
7270
7271         * predict.c (maybe_hot_frequency_p): Do not use cfun.
7272
7273 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
7274
7275         * tree-ssa-tail-merge.c (replace_block_by): Fix and re-enable profile
7276         merging.
7277
7278 2017-11-10  Michael Meissner  <meissner@linux.vnet.ibm.com>
7279
7280         * config/rs6000/rs6000.md (bswaphi2_reg): On ISA 3.0 systems,
7281         enable generating XXBRH if the value is in a vector register.
7282         (bswapsi2_reg): On ISA 3.0 systems, enable generating XXBRW if the
7283         value is in a vector register.
7284         (bswapdi2_reg): On ISA 3.0 systems, always use XXBRD to do
7285         register to register bswap64's instead of doing the GPR sequence
7286         used on previous machines.
7287         (bswapdi2_xxbrd): New insn.
7288         (bswapdi2_reg): Disallow on ISA 3.0.
7289         (register to register bswap64 splitter): Do not split the insn on
7290         ISA 3.0 systems that use XXBRD.
7291
7292 2017-11-10  Martin Sebor  <msebor@redhat.com>
7293
7294         PR c/81117
7295         * config/darwin-c.c (framework_construct_pathname): Replace strncpy
7296         with memcpy.
7297         (find_subframework_file): Same.
7298
7299 2017-11-10  Jan Hubicka  <hubicka@ucw.cz>
7300
7301         * auto-profile.c (afdo_indirect_call): Drop frequency.
7302         * cgraph.c (symbol_table::create_edge): Drop frequency argument.
7303         (cgraph_node::create_edge): Drop frequency argument.
7304         (cgraph_node::create_indirect_edge): Drop frequency argument.
7305         (cgraph_edge::make_speculative): Drop frequency arguments.
7306         (cgraph_edge::resolve_speculation): Do not update frequencies
7307         (cgraph_edge::dump_edge_flags): Do not dump frequency.
7308         (cgraph_node::dump): Check consistency in IPA mode.
7309         (cgraph_edge::maybe_hot_p): Use IPA counter.
7310         (cgraph_edge::verify_count_and_frequency): Rename to ...
7311         (cgraph_edge::verify_count): ... this one; drop frequency checking.
7312         (cgraph_node::verify_node): Update.
7313         * cgraph.h (struct cgraph_edge): Drop frequency.
7314         (cgraph_edge::frequency): New function.
7315         * cgraphbuild.c (pass_build_cgraph_edges::execute): Donot pass
7316         frequencies.
7317         (cgraph_edge::rebuild_edges): Likewise.
7318         * cgraphclones.c (cgraph_edge::clone): Scale only counts.
7319         (duplicate_thunk_for_node): Do not pass frequency.
7320         (cgraph_node::create_clone): Scale only counts.
7321         (cgraph_node::create_virtual_clone): Do not pass frequency.
7322         (cgraph_node::create_edge_including_clones): Do not pass frequency.
7323         (cgraph_node::create_version_clone): Do not pass frequency.
7324         * cgraphunit.c (cgraph_node::analyze): Do not pass frequency.
7325         (cgraph_node::expand_thunk): Do not pass frequency.
7326         (cgraph_node::create_wrapper): Do not pass frequency.
7327         * gimple-iterator.c (update_call_edge_frequencies): Do not pass
7328         frequency.
7329         * gimple-streamer-in.c (input_bb): Scale only IPA counts.
7330         * ipa-chkp.c (chkp_produce_thunks): Do not pass frequency.
7331         * ipa-cp.c (ipcp_lattice::print): Use frequency function.
7332         (gather_caller_stats): Use frequency function.
7333         (ipcp_cloning_candidate_p): Use frequency function.
7334         (ipcp_propagate_stage): Use frequency function.
7335         (get_info_about_necessary_edges): Use frequency function.
7336         (update_profiling_info): Update only IPA profile.
7337         (update_specialized_profile): Use frequency functoin.
7338         (perhaps_add_new_callers): Update only IPA profile.
7339         * ipa-devirt.c (ipa_devirt): Use IPA profile.
7340         * ipa-fnsummary.c (redirect_to_unreachable): Do not set frequrency.
7341         (dump_ipa_call_summary): Use frequency function.
7342         (estimate_edge_size_and_time): Use frequency function.
7343         (ipa_merge_fn_summary_after_inlining): Use frequency function.
7344         * ipa-inline-analysis.c (do_estimate_edge_time): Use IPA profile.
7345         * ipa-inline-transform.c (update_noncloned_frequencies): Rename to ..
7346         (update_noncloned_counts): ... ths one; scale counts only.
7347         (clone_inlined_nodes): Do not scale frequency.
7348         (inline_call): Do not pass frequency.
7349         * ipa-inline.c (compute_uninlined_call_time): Use IPA profile.
7350         (compute_inlined_call_time): Use IPA profile.
7351         (want_inline_small_function_p): Use IPA profile.
7352         (want_inline_self_recursive_call_p): Use IPA profile.
7353         (edge_badness): Use IPA profile.
7354         (lookup_recursive_calls): Use IPA profile.
7355         (recursive_inlining): Do not pass frequency.
7356         (resolve_noninline_speculation): Do not update frequency.
7357         (inline_small_functions): Collect max of IPA profile.
7358         (dump_overall_stats): Dump IPA porfile.
7359         (dump_inline_stats): Dump IPA porfile.
7360         (ipa_inline): Collect IPA stats.
7361         * ipa-inline.h (clone_inlined_nodes): Update prototype.
7362         * ipa-profile.c (ipa_propagate_frequency_1): Use frequency function.
7363         (ipa_propagate_frequency): Use frequency function.
7364         (ipa_profile): Cleanup.
7365         * ipa-prop.c (ipa_make_edge_direct_to_target): Do not pass frequency
7366         * ipa-utils.c (ipa_merge_profiles): Merge all profiles.
7367         * lto-cgraph.c (lto_output_edge): Do not stream frequency.
7368         (input_node): Do not stream frequency.
7369         (input_edge): Do not stream frequency.
7370         (merge_profile_summaries): Scale only IPA profiles.
7371         * omp-simd-clone.c (simd_clone_adjust): Do not pass frequency.
7372         * predict.c (drop_profile): Do not recompute frequency.
7373         * trans-mem.c (ipa_tm_insert_irr_call): Do not pass frequency.
7374         (ipa_tm_insert_gettmclone_call): Do not pass frequency.
7375         * tree-cfg.c (execute_fixup_cfg): Drop profile to global0 if needed.
7376         * tree-chkp.c (chkp_copy_bounds_for_assign): Do not pass frequency.
7377         * tree-emutls.c (gen_emutls_addr): Do not pass frequency.
7378         * tree-inline.c (copy_bb): Do not scale frequency.
7379         (expand_call_inline): Do not scale frequency.
7380         (tree_function_versioning): Do not scale frequency.
7381         * ubsan.c (ubsan_create_edge): Do not pass frequency.
7382
7383 2017-11-10  Julia Koval  <julia.koval@intel.com>
7384
7385         * config/i386/gfniintrin.h (_mm_gf2p8affine_epi64_epi8)
7386         (_mm256_gf2p8affine_epi64_epi8, _mm_mask_gf2p8affine_epi64_epi8)
7387         (_mm_maskz_gf2p8affine_epi64_epi8, _mm256_mask_gf2p8affine_epi64_epi8)
7388         (_mm256_maskz_gf2p8affine_epi64_epi8)
7389         (_mm512_mask_gf2p8affine_epi64_epi8, _mm512_gf2p8affine_epi64_epi8)
7390         (_mm512_maskz_gf2p8affine_epi64_epi8): New intrinsics.
7391         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8affineqb_v64qi)
7392         (__builtin_ia32_vgf2p8affineqb_v32qi)
7393         (__builtin_ia32_vgf2p8affineqb_v16qi): New builtins.
7394         * config/i386/sse.md (vgf2p8affineqb_<mode><mask_name>): New pattern.
7395
7396 2017-11-10  Tamar Christina  <tamar.christina@arm.com>
7397
7398         PR target/82641
7399         * config/arm/arm.c
7400         (arm_option_override): Refactor.
7401         (arm_option_reconfigure_globals): New.
7402         (arm_options_perform_arch_sanity_checks): New.
7403         * config/arm/arm-protos.h (arm_option_reconfigure_globals):
7404         New prototype.
7405         (arm_options_perform_arch_sanity_checks): Likewise
7406
7407 2017-11-10  Pat Haugen  <pthaugen@us.ibm.com>
7408
7409         * rs6000/power9.md (power9-qpdiv): Correct DFU pipe usage.
7410         (power9-qpmul): New.
7411         * rs6000/rs6000.md ("type" attr): Add qmul.
7412         (mul<mode>3, fma<mode>4_hw, *fms<mode>4_hw, *nfma<mode>4_hw,
7413         *nfms<mode>4_hw, mul<mode>3_odd, fma<mode>4_odd, *fms<mode>4_odd,
7414         *nfma<mode>4_odd, *nfms<mode>4_odd): Change type to qmul.
7415
7416 2017-11-10  Martin Sebor  <msebor@redhat.com>
7417
7418         PR c/81117
7419         * builtins.c (compute_objsize): Handle arrays that
7420         compute_builtin_object_size likes to fail for.  Make extern.
7421         * builtins.h (compute_objsize): Declare.
7422         (check_strncpy_sizes): New function.
7423         (expand_builtin_strncpy): Call check_strncpy_sizes.
7424         * gimple-fold.c (gimple_fold_builtin_strncpy): Implement
7425         -Wstringop-truncation.
7426         (gimple_fold_builtin_strncat): Same.
7427         * gimple.c (gimple_build_call_from_tree): Set call location.
7428         * tree-ssa-strlen.c (strlen_to_stridx): New global variable.
7429         (maybe_diag_bound_equal_length, is_strlen_related_p): New functions.
7430         (handle_builtin_stxncpy, handle_builtin_strncat): Same.
7431         (handle_builtin_strlen): Use strlen_to_stridx.
7432         (strlen_optimize_stmt): Handle flavors of strncat, strncpy, and
7433         stpncpy.
7434         Use strlen_to_stridx.
7435         (pass_strlen::execute): Release strlen_to_stridx.
7436         * doc/invoke.texi (-Wsizeof-pointer-memaccess): Document enhancement.
7437         (-Wstringop-truncation): Document new option.
7438
7439 2017-11-10  Martin Liska  <mliska@suse.cz>
7440
7441         PR gcov-profile/82702
7442         * gcov.c (main): Handle intermediate files in a different
7443         way.
7444         (get_gcov_intermediate_filename): New function.
7445         (output_gcov_file): Remove support of intermediate files.
7446         (generate_results): Allocate intermediate file.
7447         (release_structures): Clean-up properly fn_end.
7448         (output_intermediate_file): Start iterating with line 1.
7449
7450 2017-11-10  Jakub Jelinek  <jakub@redhat.com>
7451
7452         PR tree-optimization/82929
7453         * gimple-ssa-store-merging.c (struct store_immediate_info): Add
7454         ops_swapped_p non-static data member.
7455         (store_immediate_info::store_immediate_info): Clear it.
7456         (imm_store_chain_info::coalesce_immediate_stores): If swapping
7457         ops set ops_swapped_p.
7458         (count_multiple_uses): Handle ops_swapped_p.
7459
7460 2017-11-10  Martin Liska  <mliska@suse.cz>
7461
7462         * coverage.c (coverage_init): Stream information about
7463         support of has_unexecuted_blocks.
7464         * doc/gcov.texi: Document that.
7465         * gcov-dump.c (dump_gcov_file): Support it in gcov_dump tool.
7466         * gcov.c (read_graph_file): Likewise.
7467         (output_line_beginning): Fix a small issue with
7468         color output.
7469
7470 2017-11-10  Bin Cheng  <bin.cheng@arm.com>
7471
7472         * tree-predcom.c (determine_roots_comp): Avoid memory leak by freeing
7473         reference of trivial component.
7474
7475 2017-11-10  Jakub Jelinek  <jakub@redhat.com>
7476
7477         PR bootstrap/82916
7478         * gimple-ssa-store-merging.c
7479         (pass_store_merging::terminate_all_aliasing_chains): For
7480         gimple_store_p stmts also call refs_output_dependent_p.
7481
7482         PR rtl-optimization/82913
7483         * compare-elim.c (try_merge_compare): Punt if def_insn is not
7484         single set.
7485
7486 2017-11-09  Jeff Law  <law@redhat.com>
7487
7488         * vr-values.h: New file with vr_values class.
7489         * tree-vrp.c: Include vr-values.h
7490         (vrp_value_range_pool, vrp_equiv_obstack, num_vr_values): Move static
7491         data objects into the vr_values class.
7492         (vr_value, values_propagated, vr_phi_edge_counts): Likewise.
7493         (get_value_range): Make it a member function within vr_values class.
7494         (set_defs_to_varying, update_value_range, add_equivalence): Likewise.
7495         (vrp_stmt_computes_nonzero_p, op_with_boolean_value_range_p): Likewise.
7496         (op_with_constant_singleton_value_range): Likewise.
7497         (extract_range_for_var_from_comparison_expr): Likewise.
7498         (extract_range_from_assert, extract_range_from_ssa_name): Likewise.
7499         (extract_range_from_binary_expr): Likewise.
7500         (extract_range_from_unary_expr): Likewise.
7501         (extract_range_from_cond_expr, extrat_range_from_comparison): Likewise.
7502         (check_for_binary_op_overflow, extract_range_basic): Likewise.
7503         (extract_range_from_assignment, adjust_range_with_scev): Likewise.
7504         (dump_all_value_ranges, get_vr_for_comparison): Likewise.
7505         (compare_name_with_value, compare_names): Likewise.
7506         (vrp_evaluate_conditional_warnv_with_ops_using_ranges): Likewise.
7507         (vrp_evaluate_conditional_warnv_with_ops): Likewise.  Remove prototype.
7508         (vrp_evaluate_conditional, vrp_visit_cond_stmt): Likewise.
7509         (vrp_visit_switch_stmt, extract_range_from_stmt): Likewise.
7510         (extract_range_from_phi_node): Likewise.
7511         (simplify_truth_ops_using_ranges): Likewise.
7512         (simplify_div_or_mod_using_ranges): Likewise.
7513         (simplify_min_or_max_using_ranges, simplify_abs_using_ranges): Likewise.
7514         (simplify_bit_ops_using_ranges, simplify_cond_using_ranges_1): Likewise.
7515         (simplify_cond_using_ranges_2, simplify_switch_using_ranges): Likewise.
7516         (simplify_float_conversion_using_ranges): Likewise.
7517         (simplify_internal_call_using_ranges): Likewise.
7518         (two_valued_val_range_p, simplify_stmt_using_ranges): Likewise.
7519         (vrp_visit_assignment_or_call): Likewise.  Smuggle class instance
7520         poitner via x_vr_values for calls into gimple folder.
7521         (vrp_initialize_lattice): Make this the vr_values ctor.
7522         (vrp_free_lattice): Make this the vr_values dtor.
7523         (set_vr_value): New function.
7524         (class vrp_prop): Add vr_values data member.  Add various member
7525         functions as well as member functions that delegate to vr_values.
7526         (check_array_ref): Make a member function within vrp_prop class.
7527         (search_for_addr_array, vrp_initialize): Likewise.
7528         (vrp_finalize): Likewise.  Revamp to avoid direct access to
7529         vr_value, values_propagated, etc.
7530         (check_array_bounds): Extract vrp_prop class instance pointer from
7531         walk info structure.  Use it to call member functions.
7532         (check_all_array_refs): Make a member function within vrp_prop class.
7533         Smuggle class instance pointer via walk info structure.
7534         (x_vr_values): New local static.
7535         (vrp_valueize): Use x_vr_values to get class instance.
7536         (vr_valueize_1): Likewise.
7537         (class vrp_folder): Add vr_values data member.  Add various member
7538         functions as well as member functions that delegate to vr_values.
7539         (fold_predicate_in): Make a mber fucntion within vrp_folder class.
7540         (simplify_stmt_for_jump_threading): Extract smuggled vr_values
7541         class instance from vr_values.  Use it to call member functions.
7542         (vrp_dom_walker): Add vr_values data member.
7543         (vrp_dom_walker::after_dom_children): Smuggle vr_values class
7544         instance via x_vr_values.
7545         (identify_jump_threads): Accept vr_values as argument.  Store
7546         it into the walker structure.
7547         (evrp_dom_walker): Add vr_values class data member.  Add various
7548         delegators.
7549         (evrp_dom_walker::try_find_new_range): Use vr_values data
7550         member to access the memory allocator.
7551         (evrp_dom_walker::before_dom_children): Store vr_values class
7552         instance into the vrp_folder class.
7553         (evrp_dom_walker::push_value_range): Rework to avoid direct
7554         access to num_vr_values and vr_value.
7555         (evrp_dom_walker::pop_value_range): Likewise.
7556         (execute_early_vrp): Remove call to vrp_initialize_lattice.
7557         Use vr_values to get to dump_all_value_ranges member function.
7558         Remove call to vrp_free_lattice.  Call vrp_initialize, vrp_finalize,
7559         and simplify_cond_using_ranges_2 via vrp_prop class instance.
7560         Pass vr_values class instance down to identify_jump_threads.
7561         Remove call to vrp_free_lattice.
7562         (debug_all_value_ranges): Remove.
7563
7564         * tree-vrp.c (vrp_prop): Move class to earlier point in the file.
7565         (vrp_folder): Likewise.
7566
7567         * tree-vrp.c (set_value_range): Do not reference vrp_equiv_obstack.
7568         Get it from the existing bitmap instead.
7569         (vrp_intersect_ranges_1): Likewise.
7570
7571 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
7572
7573         * gimple-ssa-store-merging.c (struct store_immediate_info): Add
7574         bit_not_p field.
7575         (store_immediate_info::store_immediate_info): Add bitnotp argument,
7576         set bit_not_p to it.
7577         (imm_store_chain_info::coalesce_immediate_stores): Break group
7578         if bit_not_p is different.
7579         (count_multiple_uses, split_group,
7580         imm_store_chain_info::output_merged_store): Handle info->bit_not_p.
7581         (handled_load): Avoid multiple chained BIT_NOT_EXPRs.
7582         (pass_store_merging::process_store): Handle BIT_{AND,IOR,XOR}_EXPR
7583         result inverted using BIT_NOT_EXPR, compute bit_not_p, pass it
7584         to store_immediate_info ctor.
7585
7586 2017-11-09  Jim Wilson  <jimw@sifive.com>
7587
7588         * collect2.c (OBJECT_FORMAT_COFF): Remove EXTENDED_COFF support.
7589         (scan_prog_file): Likewise.
7590
7591 2017-11-09  Jan Hubicka  <hubicka@ucw.cz>
7592
7593         * bb-reorder.c (max_entry_frequency): Remove.
7594         (find_traces, rotate_loop, mark_bb_visited, connect_better_edge_p,
7595         connect_traces, push_to_next_round_p): Remove prototypes.
7596         (find_traces_1_round): Use counts only.
7597         (push_to_next_round_p): Likewise.
7598         (find_traces): Likewise.
7599         (rotate_loop): Likewise.
7600         (find_traces_1_round): Likewise.
7601         (connect_traces): Likewise.
7602         (edge_order): Likewise.
7603
7604 2017-11-09  Thomas Preud'homme  <thomas.preudhomme@arm.com>
7605
7606         * config/arm/arm.c (output_return_instruction): Add comments to
7607         indicate requirement for cmse_nonsecure_entry return to account
7608         for the size of clearing instruction output here.
7609         (thumb_exit): Likewise.
7610         * config/arm/thumb2.md (thumb2_cmse_entry_return): Fix length for
7611         return in hardfloat mode.
7612
7613 2017-11-09  Segher Boessenkool  <segher@kernel.crashing.org>
7614
7615         * config/rs6000/rs6000.c (machine_function): Add a bool,
7616         "toc_is_wrapped_separately".
7617         (rs6000_option_override_internal): Enable OPTION_MASK_SAVE_TOC_INDIRECT
7618         if it wasn't explicitly set or unset, we are optimizing for speed, and
7619         doing separate shrink-wrapping.
7620         (rs6000_get_separate_components): Enable the TOC component if
7621         saving the TOC register in the prologue.
7622         (rs6000_components_for_bb): Handle the TOC component.
7623         (rs6000_emit_prologue_components): Store the TOC register where needed.
7624         (rs6000_set_handled_components): Mark TOC as handled, if handled.
7625         (rs6000_emit_prologue): Don't save the TOC if that is already done.
7626
7627 2017-11-09  Martin Jambor  <mjambor@suse.cz>
7628
7629         * ipa-param-manipulation.c: New file.
7630         * ipa-param-manipulation.h: Likewise.
7631         * Makefile.in (OBJS): Add ipa-param-manipulation.o.
7632         (PLUGIN_HEADERS): Addded ipa-param-manipulation.h
7633         * ipa-param.h (ipa_parm_op): Moved to ipa-param-manipulation.h.
7634         (ipa_parm_adjustment): Likewise.
7635         (ipa_parm_adjustment_vec): Likewise.
7636         (ipa_get_vector_of_formal_parms): Moved declaration to
7637         ipa-param-manipulation.h.
7638         (ipa_get_vector_of_formal_parm_types): Likewise.
7639         (ipa_modify_formal_parameters): Likewise.
7640         (ipa_modify_call_arguments): Likewise.
7641         (ipa_combine_adjustments): Likewise.
7642         (ipa_dump_param_adjustments): Likewise.
7643         (ipa_modify_expr): Likewise.
7644         (ipa_get_adjustment_candidate): Likewise.
7645         * ipa-prop.c (ipa_get_vector_of_formal_parms): Moved to
7646         ipa-param-manipulation.c.
7647         (ipa_get_vector_of_formal_parm_types): Likewise.
7648         (ipa_modify_formal_parameters): Likewise.
7649         (ipa_modify_call_arguments): Likewise.
7650         (ipa_modify_expr): Likewise.
7651         (get_ssa_base_param): Likewise.
7652         (ipa_get_adjustment_candidate): Likewise.
7653         (index_in_adjustments_multiple_times_p): Likewise.
7654         (ipa_combine_adjustments): Likewise.
7655         (ipa_dump_param_adjustments): Likewise.
7656         * tree-sra.c: Also include ipa-param-manipulation.h
7657         * omp-simd-clone.c: Include ipa-param-manipulation.h instead of
7658         ipa-param.h.
7659
7660 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
7661             Alan Hayward  <alan.hayward@arm.com>
7662             David Sherwood  <david.sherwood@arm.com>
7663
7664         * doc/sourcebuild.texi (vect_masked_store): Document.
7665
7666 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
7667             Alan Hayward  <alan.hayward@arm.com>
7668             David Sherwood  <david.sherwood@arm.com>
7669
7670         * doc/sourcebuild.texi (vect_align_stack_vars): Document.
7671
7672 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
7673             Alan Hayward  <alan.hayward@arm.com>
7674             David Sherwood  <david.sherwood@arm.com>
7675
7676         * doc/sourcebuild.texi (vect_variable_length): Document.
7677
7678 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
7679             Alan Hayward  <alan.hayward@arm.com>
7680             David Sherwood  <david.sherwood@arm.com>
7681
7682         * doc/sourcebuild.texi (vect_unaligned_possible): Document.
7683
7684 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
7685             Alan Hayward  <alan.hayward@arm.com>
7686             David Sherwood  <david.sherwood@arm.com>
7687
7688         * doc/sourcebuild.texi (vect_element_align_preferred): Document.
7689
7690 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
7691             Alan Hayward  <alan.hayward@arm.com>
7692             David Sherwood  <david.sherwood@arm.com>
7693
7694         * doc/sourcebuild.texi (vect_perm_short, vect_perm_byte): Document
7695         previously undocumented selectors.
7696         (vect_perm3_byte, vect_perm3_short, vect_perm3_int): Document.
7697
7698 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
7699
7700         * doc/rtl.texi (const_vector): Say that elements can be
7701         const_wide_ints too.
7702         * emit-rtl.h (valid_for_const_vec_duplicate_p): Declare.
7703         * emit-rtl.c (valid_for_const_vec_duplicate_p): New function.
7704         (gen_vec_duplicate): Use it instead of CONSTANT_P.
7705         * optabs.c (expand_vector_broadcast): Likewise.
7706
7707 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
7708             Alan Hayward  <alan.hayward@arm.com>
7709             David Sherwood  <david.sherwood@arm.com>
7710
7711         * tree-ssa-loop-ivopts.c (get_address_cost): Try using a
7712         scaled index even if the unscaled address was invalid.
7713         Don't increase the complexity of using a scale in that case.
7714
7715 2017-11-09  Richard Sandiford  <richard.sandiford@linaro.org>
7716             Alan Hayward  <alan.hayward@arm.com>
7717             David Sherwood  <david.sherwood@arm.com>
7718
7719         * doc/rtl.texi: Rewrite the subreg rules so that they partition
7720         the inner register into REGMODE_NATURAL_SIZE bytes rather than
7721         UNITS_PER_WORD bytes.
7722         * emit-rtl.c (validate_subreg): Divide subregs into blocks
7723         based on REGMODE_NATURAL_SIZE of the inner mode.
7724         (gen_lowpart_common): Split the SCALAR_FLOAT_MODE_P and
7725         !SCALAR_FLOAT_MODE_P cases.  Use REGMODE_NATURAL_SIZE for the latter.
7726         * expmed.c (lowpart_bit_field_p): Divide the value up into
7727         chunks of REGMODE_NATURAL_SIZE rather than UNITS_PER_WORD.
7728         * expr.c (store_constructor): Use REGMODE_NATURAL_SIZE to test
7729         whether something is likely to occupy more than one register.
7730
7731 2017-11-09  Jan Hubicka  <hubicka@ucw.cz>
7732
7733         PR ipa/82879
7734         * ipa-inline-transform.c (update_noncloned_frequencies): Use
7735         profile_count::adjust_for_ipa_scaling.
7736         * tree-inline.c (copy_bb, copy_cfg_body): Likewise.
7737         * profile-count.c (profile_count::adjust_for_ipa_scaling): New member
7738         function.
7739         * profile-count.h (profile_count::adjust_for_ipa_scaling): Declare.
7740
7741 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
7742
7743         * gimple-ssa-store-merging.c (count_multiple_uses): New function.
7744         (split_group): Add total_orig and total_new arguments, estimate the
7745         number of statements related to the store group without store merging
7746         and with store merging.
7747         (imm_store_chain_info::output_merged_store): Adjust split_group
7748         callers, punt if estimated number of statements with store merging
7749         is not smaller than estimated number of statements without it.
7750         Formatting fix.
7751         (handled_load): Remove has_single_use checks.
7752         (pass_store_merging::process_store): Likewise.
7753
7754 2017-11-09  Richard Biener  <rguenther@suse.de>
7755
7756         PR tree-optimization/82902
7757         * tree-ssa-phiprop.c (propagate_with_phi): Test proper type.
7758
7759 2017-11-09  Martin Liska  <mliska@suse.cz>
7760
7761         PR target/82863
7762         * emit-rtl.c (init_emit_regs): Initialize split_branch_probability to
7763         uninitialized.
7764
7765 2017-11-09  Martin Liska  <mliska@suse.cz>
7766
7767         PR tree-optimization/82669
7768         * sbitmap.h (bmp_iter_set_init): Remove non needed check.
7769
7770 2017-11-09  Martin Liska  <mliska@suse.cz>
7771
7772         PR gcov-profile/48463
7773         * coverage.c (coverage_begin_function): Output also end locus
7774         of a function and information whether the function is
7775         artificial.
7776         * gcov-dump.c (tag_function): Parse and print the information.
7777         * gcov.c (INCLUDE_MAP): Add include.
7778         (INCLUDE_SET): Likewise.
7779         (struct line_info): Move earlier in the source file because
7780         of vector<line_info> in function_info structure.
7781         (line_info::line_info): Likewise.
7782         (line_info::has_block): Likewise.
7783         (struct source_info): Add new member index.
7784         (source_info::get_functions_at_location): New function.
7785         (function_info::group_line_p): New function.
7786         (output_intermediate_line): New function.
7787         (output_intermediate_file): Use the mentioned function.
7788         (struct function_start): New.
7789         (struct function_start_pair_hash): Likewise.
7790         (process_file): Add code that identifies group functions.
7791         Assign lines either to global or function scope.
7792         (generate_results): Skip artificial functions.
7793         (find_source): Assign index for each source file.
7794         (read_graph_file): Read new flag artificial and end_line.
7795         (add_line_counts): Assign it either to global of function scope.
7796         (accumulate_line_counts): Isolate core of the function to
7797         accumulate_line_info and call it for both function and global
7798         scope lines.
7799         (accumulate_line_info): New function.
7800         (output_line_beginning): Fix GNU coding style.
7801         (print_source_line): New function.
7802         (output_line_details): Likewise.
7803         (output_function_details): Likewise.
7804         (output_lines): Iterate both source (global) scope and function
7805         scope.
7806         (struct function_line_start_cmp): New class.
7807         * doc/gcov.texi: Reflect changes in documentation.
7808
7809 2017-11-09  Jakub Jelinek  <jakub@redhat.com>
7810
7811         PR debug/82837
7812         * dwarf2out.c (const_ok_for_output_1): Reject NEG in addition to NOT.
7813         (mem_loc_descriptor): Handle (const (neg (...))) as (neg (const (...)))
7814         and similarly for not instead of neg.
7815
7816 2017-11-08  Andi Kleen  <ak@linux.intel.com>
7817
7818         * config/i386/i386.opt: Add -mforce-indirect-call.
7819         * config/i386/predicates.md: Check for flag_force_indirect_call.
7820         * doc/invoke.texi: Document -mforce-indirect-call
7821
7822 2017-11-08  Kito Cheng  <kito.cheng@gmail.com>
7823
7824         * config/riscv/riscv-protos.h (riscv_slow_unaligned_access_p):
7825         New extern.
7826         (MOVE_RATIO): Use riscv_slow_unaligned_access_p.
7827         config/riscv/riscv.c (predict.h): New include.
7828         (riscv_slow_unaligned_access_p): No longer static.
7829         (riscv_block_move_straight): Add require.
7830         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
7831
7832 2017-11-08  Jakub Jelinek  <jakub@redhat.com>
7833
7834         PR target/82855
7835         * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>,
7836         <avx512>_eq<mode>3<mask_scalar_merge_name>_1): Use
7837         nonimmediate_operand predicate for operand 1 instead of
7838         register_operand.
7839
7840 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7841
7842         * config/aarch64/aarch64-simd.md (store_pair_lanes<mode>):
7843         New pattern.
7844         * config/aarch64/constraints.md (Uml): New constraint.
7845         * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): New
7846         predicate.
7847
7848 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7849
7850         * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
7851         of two vec_duplicates into a vec_concat.
7852
7853 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7854
7855         * simplify-rtx.c (simplify_ternary_operation, VEC_MERGE):
7856         Simplify vec_merge of vec_duplicate and vec_concat.
7857         * config/aarch64/constraints.md (Utq): New constraint.
7858         * config/aarch64/aarch64-simd.md (load_pair_lanes<mode>): New
7859         define_insn.
7860
7861 2017-11-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
7862
7863         * simplify-rtx.c (simplify_ternary_operation, VEC_MERGE):
7864         Simplify vec_merge of vec_duplicate and const_vector.
7865         * config/aarch64/predicates.md (aarch64_simd_or_scalar_imm_zero):
7866         New predicate.
7867         * config/aarch64/aarch64-simd.md (*aarch64_combinez<mode>): Use VDC
7868         mode iterator.  Update predicate on operand 1 to
7869         handle non-const_vec constants.  Delete constraints.
7870         (*aarch64_combinez_be<mode>): Likewise for operand 2.
7871
7872 2017-11-08  Jakub Jelinek  <jakub@redhat.com>
7873
7874         PR tree-optimization/78821
7875         * gimple-ssa-store-merging.c (struct store_operand_info): Add bit_not_p
7876         data member.
7877         (store_operand_info::store_operand_info): Initialize it to false.
7878         (pass_store_merging::terminate_all_aliasing_chains): Rewritten to use
7879         ref_maybe_used_by_stmt_p and stmt_may_clobber_ref_p on lhs of each
7880         store in the group, and if chain_info is non-NULL, to ignore altogether
7881         that chain.
7882         (compatible_load_p): Fail if bit_not_p does not match.
7883         (imm_store_chain_info::output_merged_store): Handle bit_not_p loads.
7884         (handled_load): Fill in bit_not_p.  Handle BIT_NOT_EXPR.
7885         (pass_store_merging::process_store): Adjust
7886         terminate_all_aliasing_chains calls to pass NULL in all current spots,
7887         call terminate_all_aliasing_chains newly when adding a store into
7888         a chain with non-NULL chain_info.
7889
7890 2017-11-08  Wilco Dijkstra  <wdijkstr@arm.com>
7891
7892         * config/aarch64/aarch64.c (aarch64_can_eliminate): Simplify logic.
7893
7894 2017-11-08  Wilco Dijkstra  <wdijkstr@arm.com>
7895
7896         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
7897         Remove.
7898         (aarch64_layout_frame): Initialise emit_frame_chain.
7899         (aarch64_can_eliminate): Remove omit leaf frame pointer code.
7900         (TARGET_FRAME_POINTER_REQUIRED): Remove define.
7901
7902 2017-11-08  Martin Liska  <mliska@suse.cz>
7903
7904         * gimplify.c (expand_FALLTHROUGH_r): Simplify usage
7905         of gimple_call_internal_p.
7906
7907 2017-11-07  Tom de Vries  <tom@codesourcery.com>
7908
7909         * config/mips/mips.h (ASM_OUTPUT_LABELREF): Wrap in "do {} while (0)".
7910
7911 2017-11-07  Tom de Vries  <tom@codesourcery.com>
7912
7913         * config/mips/mips.h (ASM_OUTPUT_CASE_END): Remove semicolon after
7914         "do {} while (0)".
7915
7916 2017-11-08  Martin Liska  <mliska@suse.cz>
7917
7918         PR sanitizer/82792
7919         * gimplify.c (expand_FALLTHROUGH_r): Skip IFN_ASAN_MARK.
7920
7921 2017-11-07  Eric Botcazou  <ebotcazou@adacore.com>
7922
7923         * gimple-pretty-print.c (dump_profile): Return "" instead of NULL.
7924
7925 2017-11-07  Jakub Jelinek  <jakub@redhat.com>
7926
7927         PR target/82855
7928         * config/i386/i386.md (SWI1248_AVX512BWDQ2_64): New mode iterator.
7929         (*cmp<mode>_ccz_1): New insn with $k alternative.
7930
7931         PR target/82855
7932         * config/i386/i386.c (ix86_swap_binary_operands_p): Treat
7933         RTX_COMM_COMPARE as commutative as well.
7934         (ix86_binary_operator_ok): Formatting fix.
7935         * config/i386/sse.md (*mul<mode>3<mask_name><round_name>,
7936         *<code><mode>3<mask_name><round_saeonly_name>,
7937         *<code><mode>3<mask_name>, *<code>tf3, *mul<mode>3<mask_name>,
7938         *<s>mul<mode>3_highpart<mask_name>,
7939         *vec_widen_umult_even_v16si<mask_name>,
7940         *vec_widen_umult_even_v8si<mask_name>,
7941         *vec_widen_umult_even_v4si<mask_name>,
7942         *vec_widen_smult_even_v16si<mask_name>,
7943         *vec_widen_smult_even_v8si<mask_name>, *sse4_1_mulv2siv2di3<mask_name>,
7944         *avx2_pmaddwd, *sse2_pmaddwd, *<sse4_1_avx2>_mul<mode>3<mask_name>,
7945         *avx2_<code><mode>3, *avx512f_<code><mode>3<mask_name>,
7946         *sse4_1_<code><mode>3<mask_name>, *<code>v8hi3,
7947         *sse4_1_<code><mode>3<mask_name>, *<code>v16qi3, *avx2_eq<mode>3,
7948         <avx512>_eq<mode>3<mask_scalar_merge_name>_1, *sse4_1_eqv2di3,
7949         *sse2_eq<mode>3, <mask_codefor><code><mode>3<mask_name>,
7950         *<code><mode>3, *<sse2_avx2>_uavg<mode>3<mask_name>,
7951         *<ssse3_avx2>_pmulhrsw<mode>3<mask_name>, *ssse3_pmulhrswv4hi3): Use
7952         !(MEM_P (operands[1]) && MEM_P (operands[2])) condition instead of
7953         ix86_binary_operator_ok.  Formatting fixes.
7954         (*<plusminus_insn><mode>3<mask_name><round_name>,
7955         *<plusminus_insn><mode>3, *<plusminus_insn><mode>3_m): Formatting
7956         fixes.
7957
7958 2017-11-07  Segher Boessenkool  <segher@kernel.crashing.org>
7959
7960         * config/rs6000/rs6000.md (GPR2): New mode_iterator.
7961         ("cstore<mode>4"): Don't always expand with rs6000_emit_int_cmove for
7962         eq and ne if TARGET_ISEL.
7963         (cmp): New code_iterator.
7964         (UNS, UNSU_, UNSIK): New code_attrs.
7965         (<code><GPR:mode><GPR2:mode>2_isel): New define_insn_and_split.
7966         ("eq<mode>3"): New define_expand, rename the define_insn_and_split
7967         to...
7968         ("eq<mode>3"): ... this.
7969         ("ne<mode>3"): New define_expand, rename the define_insn_and_split
7970         to...
7971         ("ne<mode>3"): ... this.
7972
7973 2017-11-07  Julia Koval  <julia.koval@intel.com>
7974
7975         PR target/82812
7976         * common/config/i386/i386-common.c
7977         (OPTION_MASK_ISA_GENERAL_REGS_ONLY_UNSET): Remove MPX from flag.
7978         (ix86_handle_option): Move MPX to isa_flags2 and GFNI to isa_flags.
7979         * config/i386/i386-c.c (ix86_target_macros_internal): Ditto.
7980         * config/i386/i386.opt: Ditto.
7981         * config/i386/i386.c (ix86_target_string): Ditto.
7982         (ix86_option_override_internal): Ditto.
7983         (ix86_init_mpx_builtins): Move MPX to args2.
7984         (ix86_expand_builtin): Special handling for OPTION_MASK_ISA_GFNI.
7985         * config/i386/i386-builtin.def (__builtin_ia32_vgf2p8affineinvqb_v64qi,
7986         __builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
7987         __builtin_ia32_vgf2p8affineinvqb_v32qi,
7988         __builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
7989         __builtin_ia32_vgf2p8affineinvqb_v16qi,
7990         __builtin_ia32_vgf2p8affineinvqb_v16qi_mask): Move to ARGS array.
7991
7992 2017-11-07  Uros Bizjak  <ubizjak@gmail.com>
7993
7994         PR target/80425
7995         * config/i386.i386.md (*zero_extendsidi2): Change (?r,*Yj), (?*Yi,r)
7996         and (*x,m) to ($r,Yj), ($Yi,r) and ($x,m).
7997         (zero-extendsidi peephole2): Remove peephole.
7998
7999 2017-11-07  Eric Botcazou  <ebotcazou@adacore.com>
8000
8001         PR c/53037
8002         * stor-layout.c: Include attribs.h.
8003         (handle_warn_if_not_align): Replace test on TYPE_USER_ALIGN with
8004         explicit lookup of "aligned" attribute.
8005
8006 2017-11-07  Andrew Waterman  <andrew@sifive.com>
8007
8008         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): New prototype.
8009         (riscv_expand_block_move): Likewise.
8010         * config/riscv/riscv.h (MOVE_RATIO): Tune cost to movmemsi
8011         implementation.
8012         (RISCV_MAX_MOVE_BYTES_PER_LOOP_ITER): New define.
8013         (RISCV_MAX_MOVE_BYTES_STRAIGHT): New define.
8014         * config/riscv/riscv.c (riscv_block_move_straight): New function.
8015         (riscv_adjust_block_mem): Likewise.
8016         (riscv_block_move_loop): Likewise.
8017         (riscv_expand_block_move): Likewise.
8018         * config/riscv/riscv.md (movmemsi): New pattern.
8019
8020 2017-11-07  Michael Clark  <michaeljclark@mac.com>
8021
8022         * config/riscv/linux.h (MUSL_ABI_SUFFIX): New define.
8023         (MUSL_DYNAMIC_LINKER): Likewise.
8024
8025 2017-11-07  Richard Sandiford  <richard.sandiford@linaro.org>
8026
8027         * config/aarch64/aarch64.md (ashl<mode>3, ashr<mode>3, lshr<mode>3)
8028         (rotr<mode>3, rotl<mode>3): Use aarch64_reg_or_imm instead of
8029         nonmmory_operand.
8030
8031 2017-11-07  Richard Biener  <rguenther@suse.de>
8032
8033         * match.pd: Fix build.
8034
8035 2017-11-07  Wilco Dijkstra  <wdijkstr@arm.com>
8036             Jackson Woodruff  <jackson.woodruff@arm.com>
8037
8038         PR tree-optimization/71026
8039         * match.pd: Canonicalize negate in division.
8040
8041 2017-11-07  Sudakshina Das  <sudi.das@arm.com>
8042
8043         PR middle-end/80131
8044         * match.pd: Simplify 1 << (C - x) where C = precision (x) - 1.
8045
8046 2017-11-07  Marc Glisse  <marc.glisse@inria.fr>
8047
8048         * match.pd ((a&~b)|(a^b),(a&~b)^~a,(a|b)&~(a^b),a|~(a^b),
8049         (a|b)|(a&^b),(a&b)|~(a^b),~(~a&b),~X^Y): New transformations.
8050
8051 2017-11-07  Marc Glisse  <marc.glisse@inria.fr>
8052
8053         * fold-const.c (negate_expr_p) [PLUS_EXPR, MINUS_EXPR]: Handle
8054         non-scalar integral types.
8055         * match.pd (negate_expr_p): Handle MINUS_EXPR.
8056         (-(A-B), -(~A)): New transformations.
8057
8058 2017-11-07  Tom de Vries  <tom@codesourcery.com>
8059
8060         * config/powerpcspe/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove
8061         semicolon after "do {} while (0)".
8062         * config/powerpcspe/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
8063         * config/powerpcspe/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
8064         * config/powerpcspe/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
8065         * config/powerpcspe/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
8066         * config/powerpcspe/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
8067
8068 2017-11-07  Tom de Vries  <tom@codesourcery.com>
8069
8070         * config/rs6000/aix43.h (SUBTARGET_OVERRIDE_OPTIONS): Remove semicolon
8071         after "do {} while (0)".
8072         * config/rs6000/aix51.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
8073         * config/rs6000/aix52.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
8074         * config/rs6000/aix53.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
8075         * config/rs6000/aix61.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
8076         * config/rs6000/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Same.
8077
8078 2017-11-07  Tom de Vries  <tom@codesourcery.com>
8079
8080         PR other/82784
8081         * config/arm/arm.c (HANDLE_NARROW_SHIFT_ARITH): Remove semicolon after
8082         "while {} do (0)".
8083         (arm_rtx_costs_internal): Add missing semicolon after
8084         HANDLE_NARROW_SHIFT_ARITH call.
8085
8086 2017-11-06  Segher Boessenkool  <segher@kernel.crashing.org>
8087
8088         * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
8089         disable isel if it was not set explicitly.
8090
8091 2017-11-06  James Bowman  <james.bowman@ftdichip.com>
8092
8093         * gcc/dwarf2out.c (modified_type_die): Retain ADDR_SPACE qualifiers.
8094         (add_type_attribute) likewise.
8095
8096 2017-11-06  H.J. Lu  <hongjiu.lu@intel.com>
8097
8098         * config/i386/i386.c (ix86_can_use_return_insn_p): Use reference
8099         of struct ix86_frame.
8100         (ix86_initial_elimination_offset): Likewise.
8101         (ix86_expand_split_stack_prologue): Likewise.
8102
8103 2017-11-06  Marc Glisse  <marc.glisse@inria.fr>
8104
8105         * tree-vrp.h (enum value_range_type): Update stale comment.
8106
8107 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
8108             Alan Hayward  <alan.hayward@arm.com>
8109             David Sherwood  <david.sherwood@arm.com>
8110
8111         * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm)
8112         (aarch64_expand_vec_perm_const): Take the number of units too.
8113         * config/aarch64/aarch64.c (aarch64_expand_vec_perm)
8114         (aarch64_expand_vec_perm_const): Likewise.
8115         * config/aarch64/aarch64-simd.md (vec_perm_const<mode>)
8116         (vec_perm<mode>): Update accordingly.
8117
8118 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
8119             Alan Hayward  <alan.hayward@arm.com>
8120             David Sherwood  <david.sherwood@arm.com>
8121
8122         * config/aarch64/aarch64-protos.h (aarch64_simd_vect_par_cnst_half):
8123         Take the number of units too.
8124         * config/aarch64/aarch64.c (aarch64_simd_vect_par_cnst_half): Likewise.
8125         (aarch64_simd_check_vect_par_cnst_half): Update call accordingly,
8126         but check for a vector mode before rather than after the call.
8127         * config/aarch64/aarch64-simd.md (aarch64_split_simd_mov<mode>)
8128         (move_hi_quad_<mode>, vec_unpack<su>_hi_<mode>)
8129         (vec_unpack<su>_lo_<mode, vec_widen_<su>mult_lo_<mode>)
8130         (vec_widen_<su>mult_hi_<mode>, vec_unpacks_lo_<mode>)
8131         (vec_unpacks_hi_<mode>, aarch64_saddl2<mode>, aarch64_uaddl2<mode>)
8132         (aarch64_ssubl2<mode>, aarch64_usubl2<mode>, widen_ssum<mode>3)
8133         (widen_usum<mode>3, aarch64_saddw2<mode>, aarch64_uaddw2<mode>)
8134         (aarch64_ssubw2<mode>, aarch64_usubw2<mode>, aarch64_sqdmlal2<mode>)
8135         (aarch64_sqdmlsl2<mode>, aarch64_sqdmlal2_lane<mode>)
8136         (aarch64_sqdmlal2_laneq<mode>, aarch64_sqdmlsl2_lane<mode>)
8137         (aarch64_sqdmlsl2_laneq<mode>, aarch64_sqdmlal2_n<mode>)
8138         (aarch64_sqdmlsl2_n<mode>, aarch64_sqdmull2<mode>)
8139         (aarch64_sqdmull2_lane<mode>, aarch64_sqdmull2_laneq<mode>)
8140         (aarch64_sqdmull2_n<mode>): Update accordingly.
8141
8142 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
8143             Alan Hayward  <alan.hayward@arm.com>
8144             David Sherwood  <david.sherwood@arm.com>
8145
8146         * config/aarch64/aarch64-protos.h (aarch64_reverse_mask): Take
8147         the number of units too.
8148         * config/aarch64/aarch64.c (aarch64_reverse_mask): Likewise.
8149         * config/aarch64/aarch64-simd.md (vec_load_lanesoi<mode>)
8150         (vec_store_lanesoi<mode>, vec_load_lanesci<mode>)
8151         (vec_store_lanesci<mode>, vec_load_lanesxi<mode>)
8152         (vec_store_lanesxi<mode>): Update accordingly.
8153
8154 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
8155             Alan Hayward  <alan.hayward@arm.com>
8156             David Sherwood  <david.sherwood@arm.com>
8157
8158         * config/aarch64/aarch64-protos.h (aarch64_endian_lane_rtx): Declare.
8159         * config/aarch64/aarch64.c (aarch64_endian_lane_rtx): New function.
8160         * config/aarch64/aarch64.h (ENDIAN_LANE_N): Take the number
8161         of units rather than the mode.
8162         * config/aarch64/iterators.md (nunits): New mode attribute.
8163         * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args):
8164         Use aarch64_endian_lane_rtx instead of GEN_INT (ENDIAN_LANE_N ...).
8165         * config/aarch64/aarch64-simd.md (aarch64_dup_lane<mode>)
8166         (aarch64_dup_lane_<vswap_width_name><mode>, *aarch64_mul3_elt<mode>)
8167         (*aarch64_mul3_elt_<vswap_width_name><mode>): Likewise.
8168         (*aarch64_mul3_elt_to_64v2df, *aarch64_mla_elt<mode>): Likewise.
8169         (*aarch64_mla_elt_<vswap_width_name><mode>, *aarch64_mls_elt<mode>)
8170         (*aarch64_mls_elt_<vswap_width_name><mode>, *aarch64_fma4_elt<mode>)
8171         (*aarch64_fma4_elt_<vswap_width_name><mode>):: Likewise.
8172         (*aarch64_fma4_elt_to_64v2df, *aarch64_fnma4_elt<mode>): Likewise.
8173         (*aarch64_fnma4_elt_<vswap_width_name><mode>): Likewise.
8174         (*aarch64_fnma4_elt_to_64v2df, reduc_plus_scal_<mode>): Likewise.
8175         (reduc_plus_scal_v4sf, reduc_<maxmin_uns>_scal_<mode>): Likewise.
8176         (reduc_<maxmin_uns>_scal_<mode>): Likewise.
8177         (*aarch64_get_lane_extend<GPI:mode><VDQQH:mode>): Likewise.
8178         (*aarch64_get_lane_zero_extendsi<mode>): Likewise.
8179         (aarch64_get_lane<mode>, *aarch64_mulx_elt_<vswap_width_name><mode>)
8180         (*aarch64_mulx_elt<mode>, *aarch64_vgetfmulx<mode>): Likewise.
8181         (aarch64_sq<r>dmulh_lane<mode>, aarch64_sq<r>dmulh_laneq<mode>)
8182         (aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_lane<mode>): Likewise.
8183         (aarch64_sqrdml<SQRDMLH_AS:rdma_as>h_laneq<mode>): Likewise.
8184         (aarch64_sqdml<SBINQOPS:as>l_lane<mode>): Likewise.
8185         (aarch64_sqdml<SBINQOPS:as>l_laneq<mode>): Likewise.
8186         (aarch64_sqdml<SBINQOPS:as>l2_lane<mode>_internal): Likewise.
8187         (aarch64_sqdml<SBINQOPS:as>l2_laneq<mode>_internal): Likewise.
8188         (aarch64_sqdmull_lane<mode>, aarch64_sqdmull_laneq<mode>): Likewise.
8189         (aarch64_sqdmull2_lane<mode>_internal): Likewise.
8190         (aarch64_sqdmull2_laneq<mode>_internal): Likewise.
8191         (aarch64_vec_load_lanesoi_lane<mode>): Likewise.
8192         (aarch64_vec_store_lanesoi_lane<mode>): Likewise.
8193         (aarch64_vec_load_lanesci_lane<mode>): Likewise.
8194         (aarch64_vec_store_lanesci_lane<mode>): Likewise.
8195         (aarch64_vec_load_lanesxi_lane<mode>): Likewise.
8196         (aarch64_vec_store_lanesxi_lane<mode>): Likewise.
8197         (aarch64_simd_vec_set<mode>): Update use of ENDIAN_LANE_N.
8198         (aarch64_simd_vec_setv2di): Likewise.
8199
8200 2017-11-06  Carl Love  <cel@us.ibm.com>
8201
8202         * config/rs6000/rs6000-c.c (P8V_BUILTIN_VEC_REVB): Add power 8
8203         definitions.
8204         (P9V_BUILTIN_VEC_REVB): Remove the power 9 instance definitions.
8205         * config/rs6000/altivec.h (vec_revb): Change the #define from power 9
8206         to power 8.
8207         * config/rs6000/r6000-protos.h (swap_endian_selector_for_mode): Add new
8208         extern declaration.
8209         * config/rs6000/rs6000.c (swap_endian_selector_for_mode): Add function.
8210         * config/rs6000/rs6000-builtin.def (BU_P8V_VSX_1, BU_P8V_OVERLOAD_1):
8211         Add power 8 macro expansions.
8212         (BU_P9V_OVERLOAD_1): Remove power 9 overload expansion.
8213         * config/rs6000/vsx.md (revb_<mode>): Add define_expand to generate
8214         power 8 instructions.  (VSX_XXBR): Add iterator.
8215
8216 2017-11-06  Wilco Dijkstra  <wdijkstr@arm.com>
8217
8218         * config/arm/arm.md (predicable_short_it): Change default to "no",
8219         improve documentation, remove uses that are identical to the default.
8220         (enabled_for_depr_it): Rename to enabled_for_short_it.
8221         * gcc/config/arm/arm-fixed.md (predicable_short_it):
8222         Remove default uses.
8223         * gcc/config/arm/ldmstm.md (predicable_short_it): Likewise.
8224         * gcc/config/arm/sync.md (predicable_short_it): Likewise.
8225         * gcc/config/arm/thumb2.md (predicable_short_it): Likewise.
8226         * gcc/config/arm/vfp.md (predicable_short_it): Likewise.
8227
8228 2017-11-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
8229
8230         PR target/82748
8231         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1): Delete
8232         float128 helper macros, which are no longer used after deleting
8233         the old 'q' built-in functions, and moving the round to odd
8234         built-in functions to being special built-in functions.
8235         (BU_FLOAT128_2): Likewise.
8236         (BU_FLOAT128_1_HW): Likewise.
8237         (BU_FLOAT128_2_HW): Likewise.
8238         (BU_FLOAT128_3_HW): Likewise.
8239         (FABSQ): Delete old 'q' built-in functions.
8240         (COPYSIGNQ): Likewise.
8241         (SQRTF128_ODD): Move round to odd built-in functions to be
8242         special built-in functions, so that we can handle
8243         -mabi=ieeelongdouble.
8244         (TRUNCF128_ODD): Likewise.
8245         (ADDF128_ODD): Likewise.
8246         (SUBF128_ODD): Likewise.
8247         (MULF128_ODD): Likewise.
8248         (DIVF128_ODD): Likewise.
8249         (FMAF128_ODD): Likewise.
8250         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Map old 'q'
8251         built-in names to 'f128'.
8252         * config/rs6000/rs6000.c (rs6000_fold_builtin): Remove folding the
8253         old 'q' built-in functions, as the machine independent code for
8254         'f128' built-in functions handles this.
8255         (rs6000_expand_builtin): Add expansion for float128 round to odd
8256         functions, keying off on -mabi=ieeelongdouble of whether to use
8257         the KFmode or TFmode variant.
8258         (rs6000_init_builtins): Initialize the _Float128 round to odd
8259         built-in functions.
8260         * doc/extend.texi (PowerPC Built-in Functions): Document the old
8261         _Float128 'q' built-in functions are now mapped into the new
8262         'f128' built-in functions.
8263
8264 2017-11-06  David Edelsohn  <dje.gcc@gmail.com>
8265
8266         * collect2.c (add_lto_object): Compile for OBJECT_COFF.
8267         (scan_prog_file): Don't skip PASS_LTOINFO. Scan for LTO objects.
8268
8269 2017-11-06  David Malcolm  <dmalcolm@redhat.com>
8270
8271         PR jit/82826
8272         * ipa-fnsummary.c (ipa_fnsummary_c_finalize): New function.
8273         * ipa-fnsummary.h (ipa_fnsummary_c_finalize): New decl.
8274         * toplev.c: Include "ipa-fnsummary.h".
8275         (toplev::finalize): Call ipa_fnsummary_c_finalize.
8276
8277 2017-11-06  Jakub Jelinek  <jakub@redhat.com>
8278
8279         PR tree-optimization/82838
8280         * gimple-ssa-store-merging.c
8281         (imm_store_chain_info::output_merged_store): Call force_gimple_operand_1
8282         on a separate gimple_seq which is then appended to seq.
8283
8284 2017-11-06  Jeff Law  <law@redhat.com>
8285
8286         PR target/82788
8287         * config/i386/i386.c (PROBE_INTERVAL): Remove.
8288         (get_probe_interval): New functions.
8289         (ix86_adjust_stack_and_probe_stack_clash): Use get_probe_interval.
8290         (ix86_adjust_stack_and_probe): Likewise.
8291         (output_adjust_stack_and_probe): Likewise.
8292         (ix86_emit_probe_stack_range): Likewise.
8293         (ix86_expand_prologue): Likewise.
8294
8295 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
8296
8297         PR tree-optimization/82816
8298         * tree-ssa-math-opts.c (convert_mult_to_widen): Return false
8299         if the modes of the two types are the same.
8300         (convert_plusminus_to_widen): Likewise.
8301
8302 2017-11-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
8303
8304         * config/rs6000/altivec.md (*p9_vadu<mode>3) Rename to
8305         p9_vadu<mode>3.
8306         (usadv16qi): New define_expand.
8307         (usadv8hi): New define_expand.
8308
8309 2017-11-06  Jan Hubicka  <hubicka@ucw.cz>
8310
8311         PR bootstrap/82832
8312         * ipa-inline-transform.c (update_noncloned_frequencies): Always
8313         scale.
8314         (inline_transform): Likewise.
8315         * predict.c (counts_to_freqs): Remove useless conditional.
8316         * profile-count.h (profile_count::apply_scale): Move sanity check.
8317         * tree-inline.c (copy_bb): Always scale.
8318         (copy_cfg_body): Likewise.
8319
8320 2017-11-06  Christophe Lyon  <christophe.lyon@linaro.org>
8321
8322         PR target/67591
8323         * config/arm/arm.md (*sub_shiftsi): Add predicable_short_it
8324         attribute.
8325         (*cmp_ite0): Add enabled_for_depr_it attribute.
8326         (*cmp_ite1): Likewise.
8327
8328 2017-11-06  Segher Boessenkool  <segher@kernel.crashing.org>
8329
8330         * config/rs6000/rs6000.c (rs6000_insn_cost): Handle TYPE_MFCR and
8331         TYPE_MFCRF.
8332
8333 2017-11-06  Richard Sandiford  <richard.sandiford@linaro.org>
8334
8335         * tree-vrp.c (vrp_int_const_binop): Return true on success and
8336         return the value by pointer.
8337         (extract_range_from_multiplicative_op_1): Update accordingly.
8338         Return as soon as an operation fails.
8339
8340 2017-11-05  Tom de Vries  <tom@codesourcery.com>
8341
8342         PR other/82784
8343         * asan.c (DEF_SANITIZER_BUILTIN_1): Factor out of ...
8344         (DEF_SANITIZER_BUILTIN): ... here.
8345         (initialize_sanitizer_builtins): Use DEF_SANITIZER_BUILTIN_1 instead of
8346         DEF_SANITIZER_BUILTIN in if stmt.  Add missing semicolon.
8347
8348 2017-11-05  Tom de Vries  <tom@codesourcery.com>
8349
8350         PR other/82784
8351         * config/elfos.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon after
8352         macro body.
8353         (ASM_OUTPUT_CASE_LABEL): Add semicolon after
8354         ASM_OUTPUT_BEFORE_CASE_LABEL call.
8355         * config/arc/arc.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove semicolon
8356         after macro body.
8357         * config/m68k/m68kelf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
8358         * config/mips/mips.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
8359         * config/v850/v850.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Same.
8360
8361 2017-11-05  Tom de Vries  <tom@codesourcery.com>
8362
8363         PR other/82784
8364         * graphite-scop-detection.c (DEBUG_PRINT): Remove semicolon after
8365         "do {} while (0)".
8366
8367 2017-11-04  Michael Clark  <michaeljclark@mac.com>
8368
8369         * config/riscv/riscv.c (riscv_print_operand): Add a 'i' format.
8370         config/riscv/riscv.md (addsi3): Use 'i' for immediates.
8371         (adddi3): Likewise.
8372         (*addsi3_extended): Likewise.
8373         (*addsi3_extended2): Likewise.
8374         (<optab>si3): Likewise.
8375         (<optab>di3): Likewise.
8376         (<optab><mode>3): Likewise.
8377         (<*optabe>si3_internal): Likewise.
8378         (zero_extendqi<SUPERQI:mode>2): Likewise.
8379         (*add<mode>hi3): Likewise.
8380         (*xor<mode>hi3): Likewise.
8381         (<optab>di3): Likewise.
8382         (*<optab>si3_extend): Likewise.
8383         (*sge<u>_<X:mode><GPR:mode>): Likewise.
8384         (*slt<u>_<X:mode><GPR:mode>): Likewise.
8385         (*sle<u>_<X:mode><GPR:mode>): Likewise.
8386
8387 2017-11-04  Andrew Waterman  <andrew@sifive.com>
8388
8389         * config/riscv/riscv.c (riscv_option_override): Conditionally set
8390         TARGET_STRICT_ALIGN based upon -mtune argument.
8391
8392 2017-11-04  Andrew Waterman  <andrew@sifive.com>
8393
8394         * config/riscv/riscv.h (SLOW_BYTE_ACCESS): Change to 1.
8395
8396 2017-11-04  Daniel Santos  <daniel.santos@pobox.com>
8397
8398         * config/i386/i386.c (choose_basereg): Use optional scratch
8399         register and add assertion.
8400         (x86_emit_outlined_ms2sysv_save): Use scratch register when
8401         needed, and don't allocate stack.
8402         (ix86_expand_prologue): Rearrange where SSE saves/stub call is
8403         emitted, correct wrong allocation with -mcall-ms2sysv-xlogues.
8404         (ix86_emit_outlined_ms2sysv_restore): Fix non-immediate offsets.
8405
8406 2017-11-03  Jeff Law  <law@redhat.com>
8407
8408         * config/i386/i386.c (ix86_emit_restore_reg_using_pop): Prototype.
8409         (ix86_adjust_stack_and_probe_stack_clash): Use a push/pop sequence
8410         to probe at the start of a noreturn function.
8411
8412 2017-11-03  Jakub Jelinek  <jakub@redhat.com>
8413
8414         PR tree-optimization/78821
8415         * gimple-ssa-store-merging.c: Update the file comment.
8416         (MAX_STORE_ALIAS_CHECKS): Define.
8417         (struct store_operand_info): New type.
8418         (store_operand_info::store_operand_info): New constructor.
8419         (struct store_immediate_info): Add rhs_code and ops data members.
8420         (store_immediate_info::store_immediate_info): Add rhscode, op0r
8421         and op1r arguments to the ctor, initialize corresponding data members.
8422         (struct merged_store_group): Add load_align_base and load_align
8423         data members.
8424         (merged_store_group::merged_store_group): Initialize them.
8425         (merged_store_group::do_merge): Update them.
8426         (merged_store_group::apply_stores): Pick the constant for
8427         encode_tree_to_bitpos from one of the two operands, or skip
8428         encode_tree_to_bitpos if neither operand is a constant.
8429         (class pass_store_merging): Add process_store method decl.  Remove
8430         bool argument from terminate_all_aliasing_chains method decl.
8431         (pass_store_merging::terminate_all_aliasing_chains): Remove
8432         var_offset_p argument and corresponding handling.
8433         (stmts_may_clobber_ref_p): New function.
8434         (compatible_load_p): New function.
8435         (imm_store_chain_info::coalesce_immediate_stores): Terminate group
8436         if there is overlap and rhs_code is not INTEGER_CST.  For
8437         non-overlapping stores terminate group if rhs is not mergeable.
8438         (get_alias_type_for_stmts): Change first argument from
8439         auto_vec<gimple *> & to vec<gimple *> &.  Add IS_LOAD, CLIQUEP and
8440         BASEP arguments.  If IS_LOAD is true, look at rhs1 of the stmts
8441         instead of lhs.  Compute *CLIQUEP and *BASEP in addition to the
8442         alias type.
8443         (get_location_for_stmts): Change first argument from
8444         auto_vec<gimple *> & to vec<gimple *> &.
8445         (struct split_store): Remove orig_stmts data member, add orig_stores.
8446         (split_store::split_store): Create orig_stores rather than orig_stmts.
8447         (find_constituent_stmts): Renamed to ...
8448         (find_constituent_stores): ... this.  Change second argument from
8449         vec<gimple *> * to vec<store_immediate_info *> *, push pointers
8450         to info structures rather than the statements.
8451         (split_group): Rename ALLOW_UNALIGNED argument to
8452         ALLOW_UNALIGNED_STORE, add ALLOW_UNALIGNED_LOAD argument and handle
8453         it.  Adjust find_constituent_stores caller.
8454         (imm_store_chain_info::output_merged_store): Handle rhs_code other
8455         than INTEGER_CST, adjust split_group, get_alias_type_for_stmts and
8456         get_location_for_stmts callers.  Set MR_DEPENDENCE_CLIQUE and
8457         MR_DEPENDENCE_BASE on the MEM_REFs if they are the same in all stores.
8458         (mem_valid_for_store_merging): New function.
8459         (handled_load): New function.
8460         (pass_store_merging::process_store): New method.
8461         (pass_store_merging::execute): Use process_store method.  Adjust
8462         terminate_all_aliasing_chains caller.
8463
8464 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
8465
8466         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
8467         Return true for more constants, symbols and label references.
8468         (aarch64_valid_floating_const): Remove unused function.
8469
8470 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
8471
8472         PR target/82786
8473         * config/aarch64/aarch64.c (aarch64_layout_frame):
8474         Undo forcing of LR at bottom of frame.
8475
8476 2017-11-03  Jeff Law  <law@redhat.com>
8477
8478         PR target/82823
8479         * config/i386/i386.c (ix86_expand_prologue): Tighten assert
8480         for int_registers_saved.
8481
8482         * cfganal.c (single_pred_edge_ignoring_loop_edges): New function
8483         extracted from tree-ssa-dom.c.
8484         * cfganal.h (single_pred_edge_ignoring_loop_edges): Prototype.
8485         * tree-ssa-dom.c (single_incoming_edge_ignoring_loop_edges): Remove.
8486         (record_equivalences_from_incoming_edge): Add additional argument
8487         to single_pred_edge_ignoring_loop_edges call.
8488         * tree-ssa-uncprop.c (single_incoming_edge_ignoring_loop_edges): Remove.
8489         (uncprop_dom_walker::before_dom_children): Add additional argument
8490         to single_pred_edge_ignoring_loop_edges call.
8491         * tree-ssa-sccvn.c (sccvn_dom_walker::before_dom_children): Use
8492         single_pred_edge_ignoring_loop_edges rather than open coding.
8493         * tree-vrp.c (evrp_dom_walker::before_dom_children): Similarly.
8494
8495 2017-11-03  Marc Glisse  <marc.glisse@inria.fr>
8496
8497         * match.pd (-(-A)): Rewrite.
8498
8499 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
8500
8501         * config/rs6000/rs60000-protos.h (rs6000_emit_sISEL): Delete.
8502         (rs6000_emit_int_cmove): New declaration.
8503         * config/rs6000/rs6000.c (rs6000_emit_int_cmove): Delete declaration.
8504         (rs6000_emit_sISEL): Delete.
8505         (rs6000_emit_int_cmove): Make non-static.
8506         * config/rs6000/rs6000.md (cstore<mode>4): Use rs6000_emit_int_cmove
8507         instead of rs6000_emit_sISEL.
8508
8509 2017-11-03  Jan Hubicka  <hubicka@ucw.cz>
8510
8511         * asan.c (create_cond_insert_point): Maintain profile.
8512         * ipa-utils.c (ipa_merge_profiles): Be sure only IPA profiles are
8513         merged.
8514         * basic-block.h (struct basic_block_def): Remove frequency.
8515         (EDGE_FREQUENCY): Use to_frequency
8516         * bb-reorder.c (push_to_next_round_p): Use only IPA counts for global
8517         heuristics.
8518         (find_traces): Update to use to_frequency.
8519         (find_traces_1_round): Likewise; use only IPA counts.
8520         (bb_to_key): Likewise.
8521         (connect_traces): Use IPA counts only.
8522         (copy_bb_p): Update to use to_frequency.
8523         (fix_up_crossing_landing_pad): Likewise.
8524         (sanitize_hot_paths): Likewise.
8525         * bt-load.c (basic_block_freq): Likewise.
8526         * cfg.c (init_flow): Set count_max to uninitialized.
8527         (check_bb_profile): Remove frequencies; check counts.
8528         (dump_bb_info): Do not dump frequencies.
8529         (update_bb_profile_for_threading): Update counts only.
8530         (scale_bbs_frequencies_int): Likewise.
8531         (MAX_SAFE_MULTIPLIER): Remove.
8532         (scale_bbs_frequencies_gcov_type): Update counts only.
8533         (scale_bbs_frequencies_profile_count): Update counts only.
8534         (scale_bbs_frequencies): Update counts only.
8535         * cfg.h (struct control_flow_graph): Add count-max.
8536         (update_bb_profile_for_threading): Update prototype.
8537         * cfgbuild.c (find_bb_boundaries): Do not update frequencies.
8538         (find_many_sub_basic_blocks): Likewise.
8539         * cfgcleanup.c (try_forward_edges): Likewise.
8540         (try_crossjump_to_edge): Likewise.
8541         * cfgexpand.c (expand_gimple_cond): Likewise.
8542         (expand_gimple_tailcall): Likewise.
8543         (construct_init_block): Likewise.
8544         (construct_exit_block): Likewise.
8545         * cfghooks.c (verify_flow_info): Check consistency of counts.
8546         (dump_bb_for_graph): Do not dump frequencies.
8547         (split_block_1): Do not update frequencies.
8548         (split_edge): Do not update frequencies.
8549         (make_forwarder_block): Do not update frequencies.
8550         (duplicate_block): Do not update frequencies.
8551         (account_profile_record): Do not update frequencies.
8552         * cfgloop.c (find_subloop_latch_edge_by_profile): Use IPA counts
8553         for global heuristics.
8554         * cfgloopanal.c (average_num_loop_insns): Update to use to_frequency.
8555         (expected_loop_iterations_unbounded): Use counts only.
8556         * cfgloopmanip.c (scale_loop_profile): Simplify.
8557         (create_empty_loop_on_edge): Simplify
8558         (loopify): Simplify
8559         (duplicate_loop_to_header_edge): Simplify
8560         * cfgrtl.c (force_nonfallthru_and_redirect): Update profile.
8561         (update_br_prob_note): Take care of removing note when profile
8562         becomes undefined.
8563         (relink_block_chain): Do not dump frequency.
8564         (rtl_account_profile_record): Use to_frequency.
8565         * cgraph.c (symbol_table::create_edge): Convert count to ipa count.
8566         (cgraph_edge::redirect_call_stmt_to_calle): Conver tcount to ipa count.
8567         (cgraph_update_edges_for_call_stmt_node): Likewise.
8568         (cgraph_edge::verify_count_and_frequency): Update.
8569         (cgraph_node::verify_node): Temporarily disable frequency verification.
8570         * cgraphbuild.c (compute_call_stmt_bb_frequency): Use
8571         to_cgraph_frequency.
8572         (cgraph_edge::rebuild_edges): Convert to ipa counts.
8573         * cgraphunit.c (init_lowered_empty_function): Do not initialize
8574         frequencies.
8575         (cgraph_node::expand_thunk): Update profile.
8576         * except.c (dw2_build_landing_pads): Do not update frequency.
8577         * final.c (compute_alignments): Use to_frequency.
8578         (dump_basic_block_info): Do not dump frequency.
8579         * gimple-pretty-print.c (dump_profile): Do not dump frequency.
8580         (dump_gimple_bb_header): Do not dump frequency.
8581         * gimple-ssa-isolate-paths.c (isolate_path): Do not update frequency;
8582         do update count.
8583         * gimple-streamer-in.c (input_bb): Do not stream frequency.
8584         * gimple-streamer-out.c (output_bb): Do not stream frequency.
8585         * haifa-sched.c (sched_pressure_start_bb): Use to_freuqency.
8586         (init_before_recovery): Do not update frequency.
8587         (sched_create_recovery_edges): Do not update frequency.
8588         * hsa-gen.c (convert_switch_statements): Do not update frequency.
8589         * ipa-cp.c (ipcp_propagate_stage): Update search for max_count.
8590         (ipa_cp_c_finalize): Set max_count to uninitialized.
8591         * ipa-fnsummary.c (get_minimal_bb): Use counts.
8592         (param_change_prob): Use counts.
8593         * ipa-profile.c (ipa_profile_generate_summary): Do not summarize
8594         local profiles.
8595         * ipa-split.c (consider_split): Use to_frequency.
8596         (split_function): Use to_frequency.
8597         * ira-build.c (loop_compare_func): Likewise.
8598         (mark_loops_for_removal): Likewise.
8599         (mark_all_loops_for_removal): Likewise.
8600         * loop-doloop.c (doloop_modify): Do not update frequency.
8601         * loop-unroll.c (unroll_loop_runtime_iterations): Do not update
8602         frequency.
8603         * lto-streamer-in.c (input_function): Update count_max.
8604         * omp-expand.c (expand_omp_taskreg): Update count_max.
8605         * omp-simd-clone.c (simd_clone_adjust): Update profile.
8606         * predict.c (maybe_hot_frequency_p): Use to_frequency.
8607         (maybe_hot_count_p): Use ipa counts only.
8608         (maybe_hot_bb_p): Simplify.
8609         (maybe_hot_edge_p): Simplify.
8610         (probably_never_executed): Do not take frequency argument.
8611         (probably_never_executed_bb_p): Do not pass frequency.
8612         (probably_never_executed_edge_p): Likewise.
8613         (combine_predictions_for_bb): Check that profile is nonzero.
8614         (propagate_freq): Do not set frequency.
8615         (drop_profile): Simplify.
8616         (counts_to_freqs): Simplify.
8617         (expensive_function_p): Use to_frequency.
8618         (propagate_unlikely_bbs_forward): Simplify.
8619         (determine_unlikely_bbs): Simplify.
8620         (estimate_bb_frequencies): Add hack to silence graphite issues.
8621         (compute_function_frequency): Use ipa counts.
8622         (pass_profile::execute): Update.
8623         (rebuild_frequencies): Use counts only.
8624         (force_edge_cold): Use counts only.
8625         * profile-count.c (profile_count::dump): Dump new count types.
8626         (profile_count::differs_from_p): Check compatiblity.
8627         (profile_count::to_frequency): New function.
8628         (profile_count::to_cgraph_frequency): New function.
8629         * profile-count.h (struct function): Declare.
8630         (enum profile_quality): Add profile_guessed_local and
8631         profile_guessed_global0.
8632         (class profile_proability): Decrease number of bits to 29;
8633         update from_reg_br_prob_note and to_reg_br_prob_note.
8634         (class profile_count: Update comment; decrease number of bits
8635         to 61. Check compatibility.
8636         (profile_count::compatible_p): New private member function.
8637         (profile_count::ipa_p): New member function.
8638         (profile_count::operator<): Handle global zero correctly.
8639         (profile_count::operator>): Handle global zero correctly.
8640         (profile_count::operator<=): Handle global zero correctly.
8641         (profile_count::operator>=): Handle global zero correctly.
8642         (profile_count::nonzero_p): New member function.
8643         (profile_count::force_nonzero): New member function.
8644         (profile_count::max): New member function.
8645         (profile_count::apply_scale): Handle IPA scalling.
8646         (profile_count::guessed_local): New member function.
8647         (profile_count::global0): New member function.
8648         (profile_count::ipa): New member function.
8649         (profile_count::to_frequency): Declare.
8650         (profile_count::to_cgraph_frequency): Declare.
8651         * profile.c (OVERLAP_BASE): Delete.
8652         (compute_frequency_overlap): Delete.
8653         (compute_branch_probabilities): Do not use compute_frequency_overlap.
8654         * regs.h (REG_FREQ_FROM_BB): Use to_frequency.
8655         * sched-ebb.c (rank): Use counts only.
8656         * shrink-wrap.c (handle_simple_exit): Use counts only.
8657         (try_shrink_wrapping): Use counts only.
8658         (place_prologue_for_one_component): Use counts only.
8659         * tracer.c (find_best_predecessor): Use to_frequency.
8660         (find_trace): Use to_frequency.
8661         (tail_duplicate): Use to_frequency.
8662         * trans-mem.c (expand_transaction): Do not update frequency.
8663         * tree-call-cdce.c: Do not update frequency.
8664         * tree-cfg.c (gimple_find_sub_bbs): Likewise.
8665         (gimple_merge_blocks): Likewise.
8666         (gimple_split_edge): Likewise.
8667         (gimple_duplicate_sese_region): Likewise.
8668         (gimple_duplicate_sese_tail): Likewise.
8669         (move_sese_region_to_fn): Likewise.
8670         (gimple_account_profile_record): Likewise.
8671         (insert_cond_bb): Likewise.
8672         * tree-complex.c (expand_complex_div_wide): Likewise.
8673         * tree-eh.c (lower_resx): Update profile.
8674         * tree-inline.c (copy_bb): Simplify count scaling; do not scale
8675         frequencies.
8676         (initialize_cfun): Do not initialize frequencies
8677         (freqs_to_counts): Delete.
8678         (copy_cfg_body): Ignore count parameter.
8679         (copy_body): Update.
8680         (expand_call_inline): Update count_max.
8681         (optimize_inline_calls): Update count_max.
8682         (tree_function_versioning): Update count_max.
8683         * tree-ssa-coalesce.c (coalesce_cost_bb): Use to_frequency.
8684         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Do not update
8685         frequency.
8686         * tree-ssa-loop-im.c (execute_sm_if_changed): Use counts only.
8687         * tree-ssa-loop-ivcanon.c (unloop_loops): Do not update freuqency.
8688         (try_peel_loop): Likewise.
8689         * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Use
8690         to_frequency.
8691         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Pass -1.
8692         (tree_transform_and_unroll_loop): Do not use frequencies
8693         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations):
8694         Use reliable prediction only.
8695         * tree-ssa-loop-unswitch.c (hoist_guard): Do not use frequencies.
8696         * tree-ssa-sink.c (select_best_block): Use to_frequency.
8697         * tree-ssa-tail-merge.c (replace_block_by): Temporarily disable
8698         probability scaling.
8699         * tree-ssa-threadupdate.c (create_block_for_threading): Do
8700         not update frequency
8701         (any_remaining_duplicated_blocks): Likewise.
8702         (update_profile): Likewise.
8703         (estimated_freqs_path): Delete.
8704         (freqs_to_counts_path): Delete.
8705         (clear_counts_path): Delete.
8706         (ssa_fix_duplicate_block_edges): Likewise.
8707         (duplicate_thread_path): Likewise.
8708         * tree-switch-conversion.c (gen_inbound_check): Use counts.
8709         * tree-tailcall.c (decrease_profile): Do not update frequency.
8710         (eliminate_tail_call): Likewise.
8711         * tree-vect-loop-manip.c (vect_do_peeling): Likewise.
8712         * tree-vect-loop.c (scale_profile_for_vect_loop): Likewise.
8713         (optimize_mask_stores): Likewise.
8714         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
8715         * ubsan.c (ubsan_expand_null_ifn): Update profile.
8716         (ubsan_expand_ptr_ifn): Update profile.
8717         * value-prof.c (gimple_ic): Simplify.
8718         * value-prof.h (gimple_ic): Update prototype.
8719         * ipa-inline-transform.c (inline_transform): Fix scaling conditoins.
8720         * ipa-inline.c (compute_uninlined_call_time): Be sure that
8721         counts are nonzero.
8722         (want_inline_self_recursive_call_p): Likewise.
8723         (resolve_noninline_speculation): Only cummulate defined counts.
8724         (inline_small_functions): Use nonzero_p.
8725         (ipa_inline): Do not access freed node.
8726
8727 2017-11-03  Wilco Dijkstra  <wdijkstr@arm.com>
8728
8729         * config/aarch64/aarch64.c (aarch64_override_options_internal):
8730         Set PARAM_SCHED_PRESSURE_ALGORITHM to SCHED_PRESSURE_MODEL.
8731
8732 2017-11-03  Kito Cheng  <kito.cheng@gmail.com>
8733
8734         * config/riscv/riscv.c (riscv_legitimize_move): Handle
8735         non-legitimate address.
8736
8737 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
8738
8739         * config/rs6000/rs6000.md (*lt0_disi): Delete.
8740         (*lt0_<mode>di, *lt0_<mode>si): New.
8741
8742 2017-11-03  Segher Boessenkool  <segher@kernel.crashing.org>
8743
8744         * config/rs6000/rs6000.md (move_from_CR_ov_bit): Change condition to
8745         TARGET_PAIRED_FLOAT.
8746
8747 2017-11-03  Siddhesh Poyarekar  <siddhesh.poyarekar@linaro.org>
8748             Jim Wilson  <jim.wilson@linaro.org>
8749
8750         * config/aarch64/aarch64-cores.def (saphira): New CPU.
8751         * config/aarch64/aarch64-tune.md: Regenerated.
8752         * doc/invoke.texi (AArch64 Options/-mtune): Add "saphira".
8753         * gcc/config/aarch64/aarch64.c (saphira_tunings): New tuning table.
8754
8755 2017-11-03  Cupertino Miranda  <cmiranda@synopsys.com>
8756
8757         * config/arc/arc.c (arc_save_restore): Corrected CFA note.
8758         (arc_expand_prologue): Restore blink for millicode.
8759         * config/arc/linux.h (LINK_EH_SPEC): Defined.
8760
8761 2017-11-03  Richard Sandiford  <richard.sandiford@linaro.org>
8762
8763         PR target/82809
8764         * config/i386/i386.c (ix86_vector_duplicate_value): Use
8765         gen_vec_duplicate after forcing the scalar into a register.
8766
8767 2017-11-02  Segher Boessenkool  <segher@kernel.crashing.org>
8768
8769         * combine (try_combine): Print the insns input to try_combine to the
8770         dump file.
8771
8772 2017-11-02  Steve Ellcey  <sellcey@cavium.com>
8773
8774         PR target/79868
8775         * config/aarch64/aarch64-c.c (aarch64_pragma_target_parse):
8776         Remove second argument from aarch64_process_target_attr call.
8777         * config/aarch64/aarch64-protos.h (aarch64_process_target_attr):
8778         Ditto.
8779         * config/aarch64/aarch64.c (aarch64_attribute_info): Change
8780         field type.
8781         (aarch64_handle_attr_arch): Remove second argument.
8782         (aarch64_handle_attr_cpu): Ditto.
8783         (aarch64_handle_attr_tune): Ditto.
8784         (aarch64_handle_attr_isa_flags): Ditto.
8785         (aarch64_process_one_target_attr): Ditto.
8786         (aarch64_process_target_attr): Ditto.
8787         (aarch64_option_valid_attribute_p): Remove second argument.
8788         on aarch64_process_target_attr call.
8789
8790 2017-11-02  David Malcolm  <dmalcolm@redhat.com>
8791
8792         * diagnostic.c: Include "selftest-diagnostic.h".
8793         (selftest::assert_location_text): New function.
8794         (selftest::test_diagnostic_get_location_text): New function.
8795         (selftest::diagnostic_c_tests): Call it.
8796
8797 2017-11-02  David Malcolm  <dmalcolm@redhat.com>
8798
8799         * Makefile.in (OBJS-libcommon): Add selftest-diagnostic.o.
8800         * diagnostic-show-locus.c: Include "selftest-diagnostic.h".
8801         (class selftest::test_diagnostic_context): Move to...
8802         * selftest-diagnostic.c: New file.
8803         * selftest-diagnostic.h: New file.
8804
8805 2017-11-02  James Bowman  <james.bowman@ftdichip.com>
8806
8807         * config/ft32/ft32.c (ft32_addr_space_legitimate_address_p): increase
8808         offset range for FT32B.
8809         * config/ft32/ft32.h: option "mcompress" enables relaxation.
8810         * config/ft32/ft32.md: Add TARGET_NOPM.
8811         * config/ft32/ft32.opt: Add mft32b, mcompress, mnopm.
8812         * gcc/doc/invoke.texi: Add mft32b, mcompress, mnopm.
8813
8814 2017-11-02  Wilco Dijkstra  <wdijkstr@arm.com>
8815
8816         * config/aarch64/aarch64.h (MALLOC_ABI_ALIGNMENT): New define.
8817
8818 2017-11-02  Jeff Law  <law@redhat.com>
8819
8820         * gimple-ssa-sprintf.c (sprintf_dom_walker): Remove
8821         virtual keyword on FINAL OVERRIDE members.
8822
8823         * tree-ssa-propagate.h (ssa_propagation_engine): Group
8824         virtuals together.  Add virtual destructor.
8825         (substitute_and_fold_engine): Similarly.
8826
8827 2017-11-02  Jan Hubicka  <hubicka@ucw.cz>
8828
8829         * x86-tune.def (X86_TUNE_USE_INCDEC): Enable for Haswell+.
8830
8831 2017-11-02  Richard Biener  <rguenther@suse.de>
8832
8833         PR tree-optimization/82795
8834         * tree-if-conv.c (predicate_mem_writes): Remove bogus assert.
8835
8836 2017-11-02  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
8837
8838         * acinclude.m4 (gcc_AC_INITFINI_ARRAY): Don't require
8839         gcc_SUN_LD_VERSION.
8840         (gcc_GAS_CHECK_FEATURE): Remove.
8841         * configure.ac (ld_vers) <*-*-solaris2*>: Move comments from
8842         gcc_AC_INITFINI_ARRAY here.  Update for Solaris 11.4 changes.
8843         * configure: Regenerate.
8844
8845 2017-11-02  Claudiu Zissulescu <claziss@synopsys.com>
8846
8847         * config/arc/arc.c (hwloop_optimize): Account for empty
8848         body loops.
8849
8850 2017-11-02  Richard Biener  <rguenther@suse.de>
8851
8852         PR middle-end/82765
8853         * varasm.c (decode_addr_const): Make offset HOST_WIDE_INT.
8854         Truncate ARRAY_REF index and element size.
8855
8856 2017-11-01  Palmer Dabbelt  <palmer@dabbelt.com>
8857
8858         * doc/invoke.texi (RISC-V Options): Use "@minus{}2 GB", not "-2 GB".
8859
8860 2017-11-01  Jeff Law  <law@redhat.com>
8861
8862         * tree-ssa-ccp.c (ccp_folder): New class derived from
8863         substitute_and_fold_engine.
8864         (ccp_folder::get_value): New member function.
8865         (ccp_folder::fold_stmt): Renamed from ccp_fold_stmt.
8866         (ccp_fold_stmt): Remove prototype.
8867         (ccp_finalize): Call substitute_and_fold from the ccp_class.
8868         * tree-ssa-copy.c (copy_folder): New class derived from
8869         substitute_and_fold_engine.
8870         (copy_folder::get_value): Renamed from get_value.
8871         (fini_copy_prop): Call substitute_and_fold from copy_folder class.
8872         * tree-vrp.c (vrp_folder): New class derived from
8873         substitute_and_fold_engine.
8874         (vrp_folder::fold_stmt): Renamed from vrp_fold_stmt.
8875         (vrp_folder::get_value): New member function.
8876         (vrp_finalize): Call substitute_and_fold from vrp_folder class.
8877         (evrp_dom_walker::before_dom_children): Similarly for replace_uses_in.
8878         * tree-ssa-propagate.h (substitute_and_fold_engine): New class to
8879         provide a class interface to folder/substitute routines.
8880         (ssa_prop_fold_stmt_fn): Remove typedef.
8881         (ssa_prop_get_value_fn): Likewise.
8882         (subsitute_and_fold): Remove prototype.
8883         (replace_uses_in): Likewise.
8884         * tree-ssa-propagate.c (substitute_and_fold_engine::replace_uses_in):
8885         Renamed from replace_uses_in.  Call the virtual member function
8886         (substitute_and_fold_engine::replace_phi_args_in): Similarly.
8887         (substitute_and_fold_dom_walker): Remove initialization of
8888         data member entries for calbacks.  Add substitute_and_fold_engine
8889         member and initialize it.
8890         (substitute_and_fold_dom_walker::before_dom_children0: Use the
8891         member functions for get_value, replace_phi_args_in c
8892         replace_uses_in, and fold_stmt calls.
8893         (substitute_and_fold_engine::substitute_and_fold): Renamed from
8894         substitute_and_fold.  Remove assert.   Update ctor call.
8895
8896         * tree-ssa-propagate.h (ssa_prop_visit_stmt_fn): Remove typedef.
8897         (ssa_prop_visit_phi_fn): Likewise.
8898         (class ssa_propagation_engine): New class to provide an interface
8899         into ssa_propagate.
8900         * tree-ssa-propagate.c (ssa_prop_visit_stmt): Remove file scoped
8901         variable.
8902         (ssa_prop_visit_phi): Likewise.
8903         (ssa_propagation_engine::simulate_stmt): Moved into class.
8904         Call visit_phi/visit_stmt from the class rather than via
8905         file scoped static variables.
8906         (ssa_propagation_engine::simulate_block): Moved into class.
8907         (ssa_propagation_engine::process_ssa_edge_worklist): Similarly.
8908         (ssa_propagation_engine::ssa_propagate): Similarly.  No longer
8909         set file scoped statics for the visit_stmt/visit_phi callbacks.
8910         * tree-complex.c (complex_propagate): New class derived from
8911         ssa_propagation_engine.
8912         (complex_propagate::visit_stmt): Renamed from complex_visit_stmt.
8913         (complex_propagate::visit_phi): Renamed from complex_visit_phi.
8914         (tree_lower_complex): Call ssa_propagate via the complex_propagate
8915         class.
8916         * tree-ssa-ccp.c: (ccp_propagate): New class derived from
8917         ssa_propagation_engine.
8918         (ccp_propagate::visit_phi): Renamed from ccp_visit_phi_node.
8919         (ccp_propagate::visit_stmt): Renamed from ccp_visit_stmt.
8920         (do_ssa_ccp): Call ssa_propagate from the ccp_propagate class.
8921         * tree-ssa-copy.c (copy_prop): New class derived from
8922         ssa_propagation_engine.
8923         (copy_prop::visit_stmt): Renamed from copy_prop_visit_stmt.
8924         (copy_prop::visit_phi): Renamed from copy_prop_visit_phi_node.
8925         (execute_copy_prop): Call ssa_propagate from the copy_prop class.
8926         * tree-vrp.c (vrp_prop): New class derived from ssa_propagation_engine.
8927         (vrp_prop::visit_stmt): Renamed from vrp_visit_stmt.
8928         (vrp_prop::visit_phi): Renamed from vrp_visit_phi_node.
8929         (execute_vrp): Call ssa_propagate from the vrp_prop class.
8930
8931 2017-11-01  Jakub Jelinek  <jakub@redhat.com>
8932
8933         PR rtl-optimization/82778
8934         PR rtl-optimization/82597
8935         * compare-elim.c (struct comparison): Add in_a_setter field.
8936         (find_comparison_dom_walker::before_dom_children): Remove killed
8937         bitmap and df_simulate_find_defs call, instead walk the defs.
8938         Compute last_setter and initialize in_a_setter.  Merge definitions
8939         with first initialization for a few variables.
8940         (try_validate_parallel): Use insn_invalid_p instead of
8941         recog_memoized.  Return insn rather than just the pattern.
8942         (try_merge_compare): Fix up comment.  Don't uselessly test if
8943         in_a is a REG_P.  Use cmp->in_a_setter instead of walking UD
8944         chains.
8945         (execute_compare_elim_after_reload): Remove df_chain_add_problem
8946         call.
8947
8948 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8949             Alan Hayward  <alan.hayward@arm.com>
8950             David Sherwood  <david.sherwood@arm.com>
8951
8952         * config/aarch64/aarch64.c (aarch64_rtx_costs): Use
8953         aarch64_hard_regno_nregs to get the number of registers
8954         in a mode.
8955
8956 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8957             Alan Hayward  <alan.hayward@arm.com>
8958             David Sherwood  <david.sherwood@arm.com>
8959
8960         * config/aarch64/constraints.md (Upl): Rename to...
8961         (Uaa): ...this.
8962         * config/aarch64/aarch64.md
8963         (*zero_extend<SHORT:mode><GPI:mode>2_aarch64, *addsi3_aarch64_uxtw):
8964         Update accordingly.
8965
8966 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8967             Alan Hayward  <alan.hayward@arm.com>
8968             David Sherwood  <david.sherwood@arm.com>
8969
8970         * config/aarch64/aarch64.c (aarch64_add_constant_internal)
8971         (aarch64_add_constant, aarch64_add_sp, aarch64_sub_sp): Move
8972         earlier in file.
8973
8974 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8975             Alan Hayward  <alan.hayward@arm.com>
8976             David Sherwood  <david.sherwood@arm.com>
8977
8978         * config/aarch64/aarch64.c (aarch64_evpc_trn, aarch64_evpc_uzp)
8979         (aarch64_evpc_zip, aarch64_evpc_ext, aarch64_evpc_rev)
8980         (aarch64_evpc_dup): Generate rtl direcly, rather than using
8981         named expanders.
8982         (aarch64_expand_vec_perm_const_1): Explicitly check for permutes
8983         of a single element.
8984         * config/aarch64/iterators.md: Add a comment above the permute
8985         unspecs to say that they are generated directly by
8986         aarch64_expand_vec_perm_const.
8987         * config/aarch64/aarch64-simd.md: Likewise the permute instructions.
8988
8989 2017-11-01  Nathan Sidwell  <nathan@acm.org>
8990
8991         * tree-dump.c (dequeue_and_dump): Use HAS_DECL_ASSEMBLER_NAME_P.
8992
8993 2017-11-01  Palmer Dabbelt  <palmer@dabbelt.com>
8994
8995         * doc/invoke.texi (RISC-V Options): Explicitly name the medlow
8996         and medany code models, and describe what they do.
8997
8998 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
8999
9000         Revert accidental duplicate:
9001
9002         * combine.c (can_change_dest_mode): Reject changes in
9003         REGMODE_NATURAL_SIZE.
9004
9005 2017-11-01  Segher Boessenkool  <segher@kernel.crashing.org>
9006
9007         PR rtl-optimization/64682
9008         PR rtl-optimization/69567
9009         PR rtl-optimization/69737
9010         PR rtl-optimization/82683
9011         * combine.c (distribute_notes) <REG_DEAD>: If the new I2 sets the same
9012         register mentioned in the note, drop the note, unless it came from I3,
9013         in which case it should go to I3 again.
9014
9015 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
9016
9017         * tree-ssa-dse.c (normalize_ref): Check whether the ranges overlap
9018         and return false if not.
9019         (clear_bytes_written_by, live_bytes_read): Update accordingly.
9020
9021 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
9022
9023         * tree-ssa-alias.h (ranges_overlap_p): Return false if either
9024         range is known to be empty.
9025
9026 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
9027             Alan Hayward  <alan.hayward@arm.com>
9028             David Sherwood  <david.sherwood@arm.com>
9029
9030         * simplify-rtx.c (simplify_const_unary_operation): Use GET_MODE_NUNITS
9031         and CONST_VECTOR_NUNITS instead of computing the number of units from
9032         the byte sizes of the vector and element.
9033         (simplify_binary_operation_1): Likewise.
9034         (simplify_const_binary_operation): Likewise.
9035         (simplify_ternary_operation): Likewise.
9036
9037 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
9038             Alan Hayward  <alan.hayward@arm.com>
9039             David Sherwood  <david.sherwood@arm.com>
9040
9041         * var-tracking.c (INT_MEM_OFFSET): Replace with...
9042         (int_mem_offset): ...this new function.
9043         (var_mem_set, var_mem_delete_and_set, var_mem_delete)
9044         (find_mem_expr_in_1pdv, dataflow_set_preserve_mem_locs)
9045         (same_variable_part_p, use_type, add_stores, vt_get_decl_and_offset):
9046         Update accordingly.
9047
9048 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
9049             Alan Hayward  <alan.hayward@arm.com>
9050             David Sherwood  <david.sherwood@arm.com>
9051
9052         * lower-subreg.c (interesting_mode_p): New function.
9053         (compute_costs, find_decomposable_subregs, decompose_register)
9054         (simplify_subreg_concatn, can_decompose_p, resolve_simple_move)
9055         (resolve_clobber, dump_choices): Use it.
9056
9057 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
9058             Alan Hayward  <alan.hayward@arm.com>
9059             David Sherwood  <david.sherwood@arm.com>
9060
9061         * rtlhash.c (add_rtx): Use add_hwi for 'w' and add_int for 'i'.
9062
9063 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
9064             Alan Hayward  <alan.hayward@arm.com>
9065             David Sherwood  <david.sherwood@arm.com>
9066
9067         * alias.c (find_base_value, find_base_term): Only process integer
9068         truncations.  Check the precision rather than the size.
9069
9070 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
9071             Alan Hayward  <alan.hayward@arm.com>
9072             David Sherwood  <david.sherwood@arm.com>
9073
9074         * machmode.h (is_narrower_int_mode): New function
9075         * optabs.c (expand_float, expand_fix): Use it.
9076         * dwarf2out.c (rotate_loc_descriptor): Likewise.
9077
9078 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
9079             Alan Hayward  <alan.hayward@arm.com>
9080             David Sherwood  <david.sherwood@arm.com>
9081
9082         * rtl.h (narrower_subreg_mode): New function.
9083         * ira-color.c (update_costs_from_allocno): Use it.
9084
9085 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
9086             Alan Hayward  <alan.hayward@arm.com>
9087             David Sherwood  <david.sherwood@arm.com>
9088
9089         * optabs-query.h (convert_optab_p): New function, split out from...
9090         (convert_optab_handler): ...here.
9091         (widening_optab_handler): Delete.
9092         (find_widening_optab_handler): Remove permit_non_widening parameter.
9093         (find_widening_optab_handler_and_mode): Likewise.  Provide an
9094         override that operates on mode class wrappers.
9095         * optabs-query.c (widening_optab_handler): Delete.
9096         (find_widening_optab_handler_and_mode): Remove permit_non_widening
9097         parameter.  Assert that the two modes are the same class and that
9098         the "from" mode is narrower than the "to" mode.  Use
9099         convert_optab_handler instead of widening_optab_handler.
9100         * expmed.c (expmed_mult_highpart_optab): Use convert_optab_handler
9101         instead of widening_optab_handler.
9102         * expr.c (expand_expr_real_2): Update calls to
9103         find_widening_optab_handler.
9104         * optabs.c (expand_widen_pattern_expr): Likewise.
9105         (expand_binop_directly): Take the insn_code as a parameter.
9106         (expand_binop): Only call find_widening_optab_handler for
9107         conversion optabs; use optab_handler otherwise.  Update calls
9108         to find_widening_optab_handler and expand_binop_directly.
9109         Use convert_optab_handler instead of widening_optab_handler.
9110         * tree-ssa-math-opts.c (convert_mult_to_widen): Update calls to
9111         find_widening_optab_handler and use scalar_mode rather than
9112         machine_mode.
9113         (convert_plusminus_to_widen): Likewise.
9114
9115 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
9116             Alan Hayward  <alan.hayward@arm.com>
9117             David Sherwood  <david.sherwood@arm.com>
9118
9119         * machmode.h (fixed_size_mode): New class.
9120         * rtl.h (get_pool_mode): Return fixed_size_mode.
9121         * gengtype.c (main): Add fixed_size_mode.
9122         * target.def (get_raw_result_mode): Return a fixed_size_mode.
9123         (get_raw_arg_mode): Likewise.
9124         * doc/tm.texi: Regenerate.
9125         * targhooks.h (default_get_reg_raw_mode): Return a fixed_size_mode.
9126         * targhooks.c (default_get_reg_raw_mode): Likewise.
9127         * config/ia64/ia64.c (ia64_get_reg_raw_mode): Likewise.
9128         * config/mips/mips.c (mips_get_reg_raw_mode): Likewise.
9129         * config/msp430/msp430.c (msp430_get_raw_arg_mode): Likewise.
9130         (msp430_get_raw_result_mode): Likewise.
9131         * config/avr/avr-protos.h (regmask): Use as_a <fixed_side_mode>
9132         * dbxout.c (dbxout_parms): Require fixed-size modes.
9133         * expr.c (copy_blkmode_from_reg, copy_blkmode_to_reg): Likewise.
9134         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
9135         * omp-low.c (lower_oacc_reductions): Likewise.
9136         * simplify-rtx.c (simplify_immed_subreg): Take fixed_size_modes.
9137         (simplify_subreg): Update accordingly.
9138         * varasm.c (constant_descriptor_rtx::mode): Change to fixed_size_mode.
9139         (force_const_mem): Update accordingly.  Return NULL_RTX for modes
9140         that aren't fixed-size.
9141         (get_pool_mode): Return a fixed_size_mode.
9142         (output_constant_pool_2): Take a fixed_size_mode.
9143
9144 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
9145             Alan Hayward  <alan.hayward@arm.com>
9146             David Sherwood  <david.sherwood@arm.com>
9147
9148         * doc/rtl.texi (vec_series): Document.
9149         (const): Say that the operand can be a vec_series.
9150         * rtl.def (VEC_SERIES): New rtx code.
9151         * rtl.h (const_vec_series_p_1): Declare.
9152         (const_vec_series_p): New function.
9153         * emit-rtl.h (gen_const_vec_series): Declare.
9154         (gen_vec_series): Likewise.
9155         * emit-rtl.c (const_vec_series_p_1, gen_const_vec_series)
9156         (gen_vec_series): Likewise.
9157         * optabs.c (expand_mult_highpart): Use gen_const_vec_series.
9158         * simplify-rtx.c (simplify_unary_operation): Handle negations
9159         of vector series.
9160         (simplify_binary_operation_series): New function.
9161         (simplify_binary_operation_1): Use it.  Handle VEC_SERIES.
9162         (test_vector_ops_series): New function.
9163         (test_vector_ops): Call it.
9164         * config/powerpcspe/altivec.md (altivec_lvsl): Use
9165         gen_const_vec_series.
9166         (altivec_lvsr): Likewise.
9167         * config/rs6000/altivec.md (altivec_lvsl, altivec_lvsr): Likewise.
9168
9169 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
9170             Alan Hayward  <alan.hayward@arm.com>
9171             David Sherwood  <david.sherwood@arm.com>
9172
9173         * doc/rtl.texi (const): Update description of address constants.
9174         Say that vector constants are allowed too.
9175         * common.md (E, F): Use CONSTANT_P instead of checking for
9176         CONST_VECTOR.
9177         * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
9178         checking for CONST_VECTOR.
9179         * expmed.c (make_tree): Use build_vector_from_val for a CONST
9180         VEC_DUPLICATE.
9181         * expr.c (expand_expr_real_2): Check for vector modes instead
9182         of checking for CONST_VECTOR.
9183         * rtl.h (const_vec_p): New function.
9184         (const_vec_duplicate_p): Check for a CONST VEC_DUPLICATE.
9185         (unwrap_const_vec_duplicate): Handle them here too.
9186
9187 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
9188             David Malcolm  <dmalcolm@redhat.com>
9189             Alan Hayward  <alan.hayward@arm.com>
9190             David Sherwood  <david.sherwood@arm.com>
9191
9192         * rtl.h (vec_duplicate_p): New function.
9193         * selftest-rtl.c (assert_rtx_eq_at): New function.
9194         * selftest-rtl.h (ASSERT_RTX_EQ): New macro.
9195         (assert_rtx_eq_at): Declare.
9196         * selftest.h (selftest::simplify_rtx_c_tests): Declare.
9197         * selftest-run-tests.c (selftest::run_tests): Call it.
9198         * simplify-rtx.c: Include selftest.h and selftest-rtl.h.
9199         (simplify_unary_operation_1): Recursively handle vector duplicates.
9200         (simplify_binary_operation_1): Likewise.  Handle VEC_SELECTs of
9201         vector duplicates.
9202         (simplify_subreg): Handle subregs of vector duplicates.
9203         (make_test_reg, test_vector_ops_duplicate, test_vector_ops)
9204         (selftest::simplify_rtx_c_tests): New functions.
9205
9206 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
9207             Alan Hayward  <alan.hayward@arm.com>
9208             David Sherwood  <david.sherwood@arm.com>
9209
9210         * emit-rtl.h (gen_const_vec_duplicate): Declare.
9211         (gen_vec_duplicate): Likewise.
9212         * emit-rtl.c (gen_const_vec_duplicate_1): New function, split
9213         out from...
9214         (gen_const_vector): ...here.
9215         (gen_const_vec_duplicate, gen_vec_duplicate): New functions.
9216         (gen_rtx_CONST_VECTOR): Use gen_const_vec_duplicate for constants
9217         whose elements are all equal.
9218         * optabs.c (expand_vector_broadcast): Use gen_const_vec_duplicate.
9219         * simplify-rtx.c (simplify_const_unary_operation): Likewise.
9220         (simplify_relational_operation): Likewise.
9221         * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
9222         Likewise.
9223         (aarch64_simd_dup_constant): Use gen_vec_duplicate.
9224         (aarch64_expand_vector_init): Likewise.
9225         * config/arm/arm.c (neon_vdup_constant): Likewise.
9226         (neon_expand_vector_init): Likewise.
9227         (arm_expand_vec_perm): Use gen_const_vec_duplicate.
9228         (arm_block_set_unaligned_vect): Likewise.
9229         (arm_block_set_aligned_vect): Likewise.
9230         * config/arm/neon.md (neon_copysignf<mode>): Likewise.
9231         * config/i386/i386.c (ix86_expand_vec_perm): Likewise.
9232         (expand_vec_perm_even_odd_pack): Likewise.
9233         (ix86_vector_duplicate_value): Use gen_vec_duplicate.
9234         * config/i386/sse.md (one_cmpl<mode>2): Use CONSTM1_RTX.
9235         * config/ia64/ia64.c (ia64_expand_vecint_compare): Use
9236         gen_const_vec_duplicate.
9237         * config/ia64/vect.md (addv2sf3, subv2sf3): Use CONST1_RTX.
9238         * config/mips/mips.c (mips_gen_const_int_vector): Use
9239         gen_const_vec_duplicate.
9240         (mips_expand_vector_init): Use CONST0_RTX.
9241         * config/powerpcspe/altivec.md (abs<mode>2, nabs<mode>2): Likewise.
9242         (define_split): Use gen_const_vec_duplicate.
9243         * config/rs6000/altivec.md (abs<mode>2, nabs<mode>2): Use CONST0_RTX.
9244         (define_split): Use gen_const_vec_duplicate.
9245         * config/s390/vx-builtins.md (vec_genmask<mode>): Likewise.
9246         (vec_ctd_s64, vec_ctd_u64, vec_ctsl, vec_ctul): Likewise.
9247         * config/spu/spu.c (spu_const): Likewise.
9248
9249 2017-11-01  Richard Sandiford  <richard.sandiford@linaro.org>
9250             Alan Hayward  <alan.hayward@arm.com>
9251             David Sherwood  <david.sherwood@arm.com>
9252
9253         * combine.c (can_change_dest_mode): Reject changes in
9254         REGMODE_NATURAL_SIZE.
9255
9256 2017-10-31  Sandra Loosemore  <sandra@codesourcery.com>
9257
9258         * configure.ac (--enable-libssp): New.
9259         (gcc_cv_libc_provides_ssp): Check for explicit setting before
9260         trying to determine target-specific default.  Adjust indentation.
9261         * configure: Regenerated.
9262         * doc/install.texi (Configuration): Expand --disable-libssp
9263         documentation.
9264
9265 2017-10-31  Daniel Santos  <daniel.santos@pobox.com>
9266
9267         config/i386/i386.c (ix86_expand_epilogue): Correct stack
9268         calculation.
9269
9270 2017-10-31  Martin Jambor  <mjambor@suse.cz>
9271
9272         PR c++/81702
9273         * gimple-fold.c (gimple_get_virt_method_for_vtable): Remove assert.
9274
9275 2017-10-31  David Malcolm  <dmalcolm@redhat.com>
9276
9277         * auto-profile.c (autofdo_source_profile::read): Use
9278         UNKNOWN_LOCATION rather than 0.
9279         * diagnostic-core.h (warning_at_rich_loc): Rename to...
9280         (warning_at): ...this overload.
9281         (warning_at_rich_loc_n): Rename to...
9282         (warning_n): ...this overload.
9283         (error_at_rich_loc): Rename to...
9284         (error_at): ...this overload.
9285         (pedwarn_at_rich_loc): Rename to...
9286         (pedwarn): ...this overload.
9287         (permerror_at_rich_loc): Rename to...
9288         (permerror): ...this overload.
9289         (inform_at_rich_loc): Rename to...
9290         (inform): ...this overload.
9291         * diagnostic.c: (diagnostic_n_impl): Delete location_t-based decl.
9292         (diagnostic_n_impl_richloc): Rename to...
9293         (diagnostic_n_impl): ...this rich_location *-based decl.
9294         (inform_at_rich_loc): Rename to...
9295         (inform): ...this, and add an assertion.
9296         (inform_n): Update for removal of location_t-based diagnostic_n_impl.
9297         (warning_at_rich_loc): Rename to...
9298         (warning_at): ...this, and add an assertion.
9299         (warning_at_rich_loc_n): Rename to...
9300         (warning_n): ...this, and add an assertion.
9301         (warning_n): Update location_t-based implementation for removal of
9302         location_t-based diagnostic_n_impl.
9303         (pedwarn_at_rich_loc): Rename to...
9304         (pedwarn): ...this, and add an assertion.
9305         (permerror_at_rich_loc): Rename to...
9306         (permerror): ...this, and add an assertion.
9307         (error_n): Update for removal of location_t-based diagnostic_n_impl.
9308         (error_at_rich_loc): Rename to...
9309         (error_at): ...this, and add an assertion.
9310         * gcc.c (do_spec_1): Use UNKNOWN_LOCATION rather than 0.
9311         (driver::do_spec_on_infiles): Likewise.
9312         * substring-locations.c (format_warning_va): Update for renaming
9313         of inform_at_rich_loc.
9314
9315 2017-10-31  Michael Meissner  <meissner@linux.vnet.ibm.com>
9316
9317         * builtins.def (DEF_FLOATN_BUILTIN): Change most _Float<N> and
9318         _Float<N>X built-in functions so that the variant without the
9319         "__builtin_" prefix is only enabled for the GNU C and Objective C
9320         languages when they are in non-strict ANSI/ISO mode.
9321         (DEF_EXT_LIB_FLOATN_NX_BUILTINS): Likewise.
9322         * target.def (floatn_builtin_p): Add a target hook to control
9323         whether _Float<N> and _Float<N>X built-in functions without the
9324         "__builtin_" prefix are enabled, and return true for C and
9325         Objective C in the default hook.  Include langhooks.h in
9326         targhooks.c.
9327         * targhooks.h (default_floatn_builtin_p): Likewise.
9328         * targhooks.c (default_floatn_builtin_p): Likewise.
9329         * doc/tm.texi.in (TARGET_FLOATN_BUILTIN_P): Document the
9330         floatn_builtin_p target hook.
9331         * doc/tm.texi (TARGET_FLOATN_BUILTIN_P): Likewise.
9332
9333 2017-10-31  Matthew Fortune  <matthew.fortune@imgtec.com>
9334             Eric Botcazou  <ebotcazou@adacore.com>
9335
9336         PR rtl-optimization/81803
9337         * lra-constraints.c (curr_insn_transform): Also reload the whole
9338         register for a strict subreg no wider than a word if this is for
9339         a WORD_REGISTER_OPERATIONS target.
9340
9341 2017-10-31  Jason Merrill  <jason@redhat.com>
9342
9343         * gdbinit.in: Skip over inlines from timevar.h.
9344
9345 2017-10-31  Martin Liska  <mliska@suse.cz>
9346
9347         * doc/gcov.texi: Document new option.
9348         * gcov.c (print_usage): Likewise print it.
9349         (process_args): Support the argument.
9350         (format_count): New function.
9351         (format_gcov): Use the function.
9352
9353 2017-10-31  Martin Liska  <mliska@suse.cz>
9354
9355         * gcov.c (struct name_map): do not use typedef.
9356         Define operator== and operator<.
9357         (name_search): Remove.
9358         (name_sort): Remove.
9359         (main): Do not allocate names.
9360         (process_file): Add vertical space.
9361         (generate_results): Use std::find.
9362         (release_structures): Do not release memory.
9363         (find_source): Use std::find.
9364
9365 2017-10-31  Martin Liska  <mliska@suse.cz>
9366
9367         * gcov.c (struct line_info): Remove it's typedef.
9368         (line_info::line_info): Add proper ctor.
9369         (line_info::has_block): Do not use a typedef.
9370         (struct source_info): Do not use typedef.
9371         (circuit): Likewise.
9372         (get_cycles_count): Likewise.
9373         (output_intermediate_file): Iterate via vector iterator.
9374         (add_line_counts): Use std::vector methods.
9375         (accumulate_line_counts): Likewise.
9376         (output_lines): Likewise.
9377
9378 2017-10-31  Martin Liska  <mliska@suse.cz>
9379
9380         * gcov.c (struct source_info): Remove typedef.
9381         (source_info::source_info): Add proper ctor.
9382         (accumulate_line_counts): Use struct, not it's typedef.
9383         (output_gcov_file): Likewise.
9384         (output_lines): Likewise.
9385         (main): Do not allocate an array.
9386         (output_intermediate_file): Use size of vector container.
9387         (process_file): Resize the vector.
9388         (generate_results): Do not preallocate, use newly added vector
9389         lines.
9390         (release_structures): Do not release sources.
9391         (find_source): Use vector methods.
9392         (add_line_counts): Do not use typedef.
9393
9394 2017-10-31  Martin Liska  <mliska@suse.cz>
9395
9396         * doc/gcov.texi: Document that.
9397         * gcov.c (add_line_counts): Mark lines with a non-executed
9398         statement.
9399         (output_line_beginning): Handle such lines.
9400         (output_lines): Pass new argument.
9401         (output_intermediate_file): Print it in intermediate format.
9402
9403 2017-10-31  Martin Liska  <mliska@suse.cz>
9404
9405         * color-macros.h: New file.
9406         * diagnostic-color.c: Factor out color related to macros to
9407         color-macros.h.
9408         * doc/gcov.texi: Document -k option.
9409         * gcov.c (INCLUDE_STRING): Include string.h.
9410         (print_usage): Add -k option.
9411         (process_args): Parse it.
9412         (pad_count_string): New function.
9413         (output_line_beginning): Likewise.
9414         (DEFAULT_LINE_START): New macro.
9415         (output_lines): Support color output.
9416
9417 2017-10-31  Martin Liska  <mliska@suse.cz>
9418
9419         PR gcov-profile/82633
9420         * doc/gcov.texi: Document -fkeep-{static,inline}-functions and
9421         their interaction with GCOV infrastructure.
9422         * configure.ac: Add -fkeep-{inline,static}-functions to
9423         coverage_flags.
9424         * configure: Regenerate.
9425
9426 2017-10-31  Uros Bizjak  <ubizjak@gmail.com>
9427
9428         PR target/82772
9429         * config/alpha/sync.md (fetchop_constr) <and>: Change to "rINM".
9430
9431 2017-10-31  Segher Boessenkool  <segher@kernel.crashing.org>
9432
9433         PR target/82674
9434         * config/rs6000/rs6000.md (allocate_stack): Force update interval
9435         into a register if it does not fit into an immediate offset field.
9436
9437 2017-10-31  Olivier Hainque  <hainque@adacore.com>
9438
9439         * gcc/Makefile.in (FLAGS_TO_PASS): Pass libsubdir as well.
9440
9441 2017-10-31  Julia Koval  <julia.koval@intel.com>
9442
9443         * config.gcc: Add gfniintrin.h.
9444         * config/i386/gfniintrin.h: New.
9445         * config/i386/i386-builtin-types.def
9446         (__builtin_ia32_vgf2p8affineinvqb_v64qi,
9447         __builtin_ia32_vgf2p8affineinvqb_v64qi_mask,
9448         __builtin_ia32_vgf2p8affineinvqb_v32qi,
9449         __builtin_ia32_vgf2p8affineinvqb_v32qi_mask,
9450         __builtin_ia32_vgf2p8affineinvqb_v16qi,
9451         __builtin_ia32_vgf2p8affineinvqb_v16qi_mask): New builtins.
9452         * config/i386/i386-builtin.def (V64QI_FTYPE_V64QI_V64QI_INT_V64QI_UDI,
9453         V32QI_FTYPE_V32QI_V32QI_INT_V32QI_USI,
9454         V16QI_FTYPE_V16QI_V16QI_INT_V16QI_UHI,
9455         V64QI_FTYPE_V64QI_V64QI_INT): New types.
9456         * config/i386/i386.c (ix86_expand_args_builtin): Handle new types.
9457         * config/i386/immintrin.h: Include gfniintrin.h.
9458         * config/i386/sse.md (vgf2p8affineinvqb_*) New pattern.
9459
9460 2017-10-30  Eric Botcazou  <ebotcazou@adacore.com>
9461
9462         * gcc.c (HAVE_TARGET_EXECUTABLE_SUFFIX): Remove old kludge.
9463
9464 2017-10-30  Wilco Dijkstra  <wdijkstr@arm.com>
9465
9466         * config/arm/arm.md (ashldi3): Remove shift by 1 expansion.
9467         (arm_ashldi3_1bit): Remove pattern.
9468         (ashrdi3): Remove shift by 1 expansion.
9469         (arm_ashrdi3_1bit): Remove pattern.
9470         (lshrdi3): Remove shift by 1 expansion.
9471         (arm_lshrdi3_1bit): Remove pattern.
9472         * config/arm/arm.c (arm_rtx_costs_internal): Slightly increase
9473         cost of ashldi3 by 1.
9474         * config/arm/neon.md (ashldi3_neon): Remove shift by 1 expansion.
9475         (<shift>di3_neon): Likewise.
9476
9477 2017-10-30  Dominik Infuehr  <dominik.infuehr@theobroma-systems.com>
9478
9479         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov): Rename
9480         both identically named patterns to (*aarch64_simd_mov<VD:mode>)
9481         and (*aarch64_simd_mov<VQ:mode>).
9482         (*aarch64_simd_mov<VD:mode>): Change type attribute to match
9483         pattern alternative.
9484         (*aarch64_simd_mov<VQ:mode>): Re-order and change type
9485         attributes to match pattern alternative.
9486
9487 2017-10-30  Steven Munroe  <munroesj@gcc.gnu.org>
9488
9489         * config.gcc (powerpc*-*-*): Add emmintrin.h.
9490         * config/rs6000/emmintrin.h: New file.
9491         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include emmintrin.h.
9492
9493 2017-10-30  Wilco Dijkstra  <wdijkstr@arm.com>
9494
9495         * config/arm/vfp.md (movdi_vfp): Merge changes from movdi_vfp_cortexa8.
9496         * (movdi_vfp_cortexa8): Remove pattern.
9497
9498 2017-10-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9499
9500         * doc/install.texi (Specific, alpha*-*-*): Remove DEC OSF/1
9501         etc. reference.
9502         (Specific, alpha*-dec-osf5.1): Remove.
9503         (Specific, mips-sgi-irix5): Remove.
9504         (Specific, mips-sgi-irix6): Remove.
9505
9506 2017-10-30  Jakub Jelinek  <jakub@redhat.com>
9507
9508         PR middle-end/22141
9509         * gimple-ssa-store-merging.c (merged_store_group::apply_stores): Fix
9510         arguments to clear_bit_region_be.
9511
9512 2017-10-30  Jim Wilson  <wilson@tuliptree.org>
9513
9514         * gimplify.c: Include memmodel.h.
9515
9516 2017-10-30  Martin Jambor  <mjambor@suse.cz>
9517
9518         * omp-grid.c (grid_attempt_target_gridification): Also insert a
9519         condition whether loop should be executed at all.
9520
9521 2017-10-30  Will Schmidt  <will_schmidt@vnet.ibm.com>
9522
9523         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add support for
9524         gimple folding of vec_madd() intrinsics.
9525         * config/rs6000/altivec.md (mulv8hi3): Rename altivec_vmladduhm to
9526         fmav8hi4.  (altivec_vmladduhm): Rename to fmav8hi4.
9527         * config/rs6000/rs6000-builtin.def: Rename vmladduhm to fmav8hi4
9528
9529 2017-10-30  Richard Biener  <rguenther@suse.de>
9530
9531         PR tree-optimization/82762
9532         Revert
9533         2017-10-23  Richard Biener  <rguenther@suse.de>
9534
9535         PR tree-optimization/82129
9536         Revert
9537         2017-08-01  Richard Biener  <rguenther@suse.de>
9538
9539         PR tree-optimization/81181
9540         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
9541         (compute_antic): ... end of iteration here.
9542
9543 2017-10-30  Joseph Myers  <joseph@codesourcery.com>
9544
9545         * doc/invoke.texi (C Dialect Options): Document -std=c17,
9546         -std=iso9899:2017 and -std=gnu17.
9547         * doc/standards.texi (C Language): Document C17 support.
9548         * doc/cpp.texi (Overview): Mention -std=c17.
9549         (Standard Predefined Macros): Document C11 and C17 values of
9550         __STDC_VERSION__.  Do not refer to C99 support as incomplete.
9551         * doc/extend.texi (Inline): Do not list individual options for
9552         standards newer than C99.
9553         * dwarf2out.c (highest_c_language, gen_compile_unit_die): Handle
9554         "GNU C17".
9555         * config/rl78/rl78.c (rl78_option_override): Handle "GNU C17"
9556         language name.
9557
9558 2017-10-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
9559
9560         * asan.c (asan_finish_file): Align asan globals array by shadow
9561         granularity.
9562
9563 2017-10-30  Jakub Jelinek  <jakub@redhat.com>
9564
9565         PR middle-end/22141
9566         * gimple-ssa-store-merging.c: Include rtl.h and expr.h.
9567         (struct store_immediate_info): Add bitregion_start and bitregion_end
9568         fields.
9569         (store_immediate_info::store_immediate_info): Add brs and bre
9570         arguments and initialize bitregion_{start,end} from those.
9571         (struct merged_store_group): Add bitregion_start, bitregion_end,
9572         align_base and mask fields.  Drop unnecessary struct keyword from
9573         struct store_immediate_info.  Add do_merge method.
9574         (clear_bit_region_be): Use memset instead of loop storing zeros.
9575         (merged_store_group::do_merge): New method.
9576         (merged_store_group::merge_into): Use do_merge.  Allow gaps in between
9577         stores as long as the surrounding bitregions have no gaps.
9578         (merged_store_group::merge_overlapping): Use do_merge.
9579         (merged_store_group::apply_stores): Test that bitregion_{start,end}
9580         is byte aligned, rather than requiring that start and width are
9581         byte aligned.  Drop unnecessary struct keyword from
9582         struct store_immediate_info.  Allocate and populate also mask array.
9583         Make start of the arrays relative to bitregion_start rather than
9584         start and size them according to bitregion_{end,start} difference.
9585         (struct imm_store_chain_info): Drop unnecessary struct keyword from
9586         struct store_immediate_info.
9587         (pass_store_merging::gate): Punt if BITS_PER_UNIT or CHAR_BIT is not 8.
9588         (pass_store_merging::terminate_all_aliasing_chains): Drop unnecessary
9589         struct keyword from struct store_immediate_info.
9590         (imm_store_chain_info::coalesce_immediate_stores): Allow gaps in
9591         between stores as long as the surrounding bitregions have no gaps.
9592         Formatting fixes.
9593         (struct split_store): Add orig non-static data member.
9594         (split_store::split_store): Initialize orig to false.
9595         (find_constituent_stmts): Return store_immediate_info *, non-NULL
9596         if there is exactly a single original stmt.  Change stmts argument
9597         to pointer from reference, if NULL, don't push anything to it.  Add
9598         first argument, use it to optimize skipping over orig stmts that
9599         are known to be before bitpos already.  Simplify.
9600         (split_group): Return unsigned int count how many stores are or
9601         would be needed rather than a bool.  Add allow_unaligned argument.
9602         Change split_stores argument from reference to pointer, if NULL,
9603         only do a dry run computing how many stores would be produced.
9604         Rewritten algorithm to use both alignment and misalign if
9605         !allow_unaligned and handle bitfield stores with gaps.
9606         (imm_store_chain_info::output_merged_store): Set start_byte_pos
9607         from bitregion_start instead of start.  Compute allow_unaligned
9608         here, if true, do 2 split_group dry runs to compute which one
9609         produces fewer stores and prefer aligned if equal.  Punt if
9610         new count is bigger or equal than original before emitting any
9611         statements, rather than during that.  Remove no longer needed
9612         new_ssa_names tracking.  Replace num_stmts with
9613         split_stores.length ().  Use 32-bit stack allocated entries
9614         in split_stores auto_vec.  Try to reuse original store lhs/rhs1
9615         if possible.  Handle bitfields with gaps.
9616         (pass_store_merging::execute): Ignore bitsize == 0 stores.
9617         Compute bitregion_{start,end} for the stores and construct
9618         store_immediate_info with that.  Formatting fixes.
9619
9620 2017-10-30  Uros Bizjak  <ubizjak@gmail.com>
9621
9622         PR target/82725
9623         * config/i386/i386.c (legitimate_pic_address_disp_p): Allow
9624         UNSPEC_DTPOFF and UNSPEC_NTPOFF with SImode immediate offset.
9625
9626 2017-10-29  Jim Wilson  <wilson@tuliptree.org>
9627
9628         * gimplify.c: Include tm_p.h.
9629
9630         * common.opt (gcoff): Re-add as ignored option.
9631         (gcoff1, gcoff2, gcoff3): Likewise.
9632
9633         * Makefile.in (OBJS): Delete sdbout.o.
9634         (GTFILES): Delete $(srcdir)/sdbout.c.
9635         * debug.h: Delete sdb_debug_hooks.
9636         * final.c: Delete sdbout.h include.
9637         (final_scan_insn): Delete SDB_DEBUG check.
9638         (rest_of_clean_state): Likewise.
9639         * output.h: Delete sdb_begin_function_line.
9640         * sdbout.c: Delete.
9641         * sdbout.h: Delete.
9642         * toplev.c: Delete sdbout.h include.
9643         (process_options): Delete SDB_DEBUG check.
9644         * tree-core.h (tree_type_common): Delete pointer field of
9645         tree_type_symtab.
9646         * tree.c (copy_node): Clear TYPE_SYMTAB_DIE instead of
9647         TYPE_SYMTAB_POINTER.
9648         * tree.h (TYPE_SYMTAB_POINTER): Delete.
9649         (TYPE_SYMTAB_IS_POINTER): Delete.
9650         (TYPE_SYMTAB_IS_DIE): Renumber.
9651         * xcoffout.c: Refer to former sdbout.c file.
9652         (xcoffout_begin_prologue): Use past tense for sdbout.c reference.
9653
9654         * doc/install.texi (--with-stabs): Delete COFF and ECOFF info.
9655         * doc/invoke.texi (SEEALSO): Delete adb and sdb references.
9656         (Debugging Options): Delete -gcoff.
9657         (-gstabs): Delete SDB reference.
9658         (-gcoff): Delete.
9659         (-gcoff@var{level}): Delete.
9660         * doc/passes.texi (Debugging information output): Delete SDB and
9661         sdbout.c references.
9662         * doc/tm.texi: Regenerate.
9663         * doc/tm.texi.in (DWARF_CIE_DATA_ALIGNMENT): Delete SDB from xref.
9664         (SDB and DWARF): Change node name to DWARF and delete SDB and COFF
9665         references.
9666         (DEBUGGER_AUTO_OFFSET): Delete COFF and SDB references.
9667         (PREFERRED_DEBUGGING_TYPE): Delete SDB_DEBUG and -gcoff references.
9668         (SDB_DEBUGGING_INFO): Delete.
9669         (PUT_SDB_@dots{}, SDB_DELIM, SDB_ALLOW_UNKNOWN_REFERENCES)
9670         SDB_ALLOW_FORWARD_REFERENCES, SDB_OUTPUT_SOURCE_LINE): Delete.
9671         * target.def (output_source_filename): Delete COFF reference.
9672
9673         * common.opt (gcoff): Delete.
9674         (gxcoff+): Update Negative chain.
9675         * defaults.h: Delete all references to SDB_DEBUGGING_INFO and
9676         SDB_DEBUG.
9677         * dwarf2out.c (gen_array_type_die): Change SDB to debuggers.
9678         * flag-types.h (enum debug_info_type): Delete SDB_DEBUG.
9679         * function.c (number_blocks): Delete SDB_DEBUGGING_INFO, SDB_DEBUG,
9680         and SDB references.
9681         (expand_function_start): Change sdb reference to past tense.
9682         (expand_function_end): Change sdb reference to past tense.
9683         * gcc.c (cpp_unique_options): Delete gcoff3 reference.
9684         * opts.c (debug_type_names): Delete coff entry.
9685         (common_handle_option): Delete OPT_gcoff case.
9686         * system.h (SDB_DEBUG, SDB_DEBUGGING_INFO): Poison.
9687
9688         * config/dbxcoff.h (PREFERRED_DEBUGGING_TYPE): Set to DBX_DEBUG.
9689         * config/cris/cris.h: Delete SDB reference in comment.
9690         * config/i386/cygming.h: Don't define SDB_DEBUGGING_INFO.
9691         (ASM_DECLARE_FUNCTION_NAME): Delete SDB reference from comment.
9692         * config/i386/gas.h: Don't define SDB_DEBUGGING_INFO.
9693         * config/i386/i386.c (svr4_dbx_register_map): Change SDB references
9694         to past tense.
9695         (ix86_expand_prologue): Likewise.
9696         * config/i386/winnt.c (i386_pe_start_function): Don't check SDB_DEBUG.
9697         * config/ia64/ia64.h: Likewise.
9698         * config/m68k/m68kelf.h (DBX_REGISTER_NUMBER): Delete SDB reference.
9699         * config/mips/mips.h (SUBTARGET_ASM_DEBUGGING_SPEC): Delete gcoff*
9700         support.
9701         * config/mmix/mmix.h: Likewise.
9702         * config/nds32/nds32.c: Likewise.
9703         * config/stormy/storym16.h: Likewise.
9704         * config/visium/visium.h: Likewise.
9705         * config/vx-common.h (SDB_DEBUGGING_INFO): Delete undef.
9706
9707 2017-10-28  Sandra Loosemore  <sandra@codesourcery.com>
9708
9709         * config/nios2/nios2.h (FRAME_GROWS_DOWNWARD): Define to 1.
9710         * config/nios2/nios2.c (nios2_initial_elimination_offset):  Make
9711         FRAME_POINTER_REGNUM point at high end of local var area.
9712
9713 2017-10-27  Eric Botcazou  <ebotcazou@adacore.com>
9714
9715         * bb-reorder.c (find_traces_1_round): Fix off-by-one index.
9716         Move comment around.  Do not reset best_edge for a copiable
9717         destination if the copy would cause a partition change.
9718         (better_edge_p): Remove redundant check.
9719
9720 2017-10-27  Uros Bizjak  <ubizjak@gmail.com>
9721
9722         * config/i386/i386-protos.h (ix86_fp_compare_mode): Remove prototype.
9723
9724 2017-10-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
9725
9726         * builtins.c (CASE_MATHFN_FLOATN): New helper macro to add cases
9727         for math functions that have _Float<N> and _Float<N>X variants.
9728         (mathfn_built_in_2): Add support for math functions that have
9729         _Float<N> and _Float<N>X variants.
9730         (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro.
9731         (expand_builtin_mathfn_ternary): Add support for fma with
9732         _Float<N> and _Float<N>X variants.
9733         (expand_builtin): Likewise.
9734         (fold_builtin_3): Likewise.
9735         * builtins.def (DEF_EXT_LIB_FLOATN_NX_BUILTINS): New macro to
9736         create math function _Float<N> and _Float<N>X variants as external
9737         library builtins.
9738         (BUILT_IN_COPYSIGN _Float<N> and _Float<N>X variants) Use
9739         DEF_EXT_LIB_FLOATN_NX_BUILTINS to make built-in functions using
9740         the __builtin_ prefix and if not strict ansi, without the prefix.
9741         (BUILT_IN_FABS _Float<N> and _Float<N>X variants): Likewise.
9742         (BUILT_IN_FMA _Float<N> and _Float<N>X variants): Likewise.
9743         (BUILT_IN_FMAX _Float<N> and _Float<N>X variants): Likewise.
9744         (BUILT_IN_FMIN _Float<N> and _Float<N>X variants): Likewise.
9745         (BUILT_IN_NAN _Float<N> and _Float<N>X variants): Likewise.
9746         (BUILT_IN_SQRT _Float<N> and _Float<N>X variants): Likewise.
9747         * builtin-types.def (BT_FN_FLOAT16_FLOAT16_FLOAT16_FLOAT16): New
9748         function signatures for fma _Float<N> and _Float<N>X variants.
9749         (BT_FN_FLOAT32_FLOAT32_FLOAT32_FLOAT32): Likewise.
9750         (BT_FN_FLOAT64_FLOAT64_FLOAT64_FLOAT64): Likewise.
9751         (BT_FN_FLOAT128_FLOAT128_FLOAT128_FLOAT128): Likewise.
9752         (BT_FN_FLOAT32X_FLOAT32X_FLOAT32X_FLOAT32X): Likewise.
9753         (BT_FN_FLOAT64X_FLOAT64X_FLOAT64X_FLOAT64X): Likewise.
9754         (BT_FN_FLOAT128X_FLOAT128X_FLOAT128X_FLOAT128X): Likewise.
9755         * gencfn-macros.c (print_case_cfn): Add support for math functions
9756         that have _Float<N> and _Float<N>X variants.
9757         (print_define_operator_list): Likewise.
9758         (fltfn_suffixes): Likewise.
9759         (main): Likewise.
9760         * internal-fn.def (DEF_INTERNAL_FLT_FLOATN_FN): New helper macro
9761         for math functions that have _Float<N> and _Float<N>X variants.
9762         (SQRT): Add support for sqrt, copysign, fmin and fmax _Float<N>
9763         and _Float<N>X variants.
9764         (COPYSIGN): Likewise.
9765         (FMIN): Likewise.
9766         (FMAX): Likewise.
9767         * fold-const.c (tree_call_nonnegative_warnv_p): Add support for
9768         copysign, fma, fmax, fmin, and sqrt _Float<N> and _Float<N>X
9769         variants.
9770         (integer_valued_read_call_p): Likewise.
9771         * fold-const-call.c (fold_const_call_ss): Likewise.
9772         (fold_const_call_sss): Add support for copysign, fmin, and fmax
9773         _Float<N> and _Float<N>X variants.
9774         (fold_const_call_ssss): Add support for fma _Float<N> and
9775         _Float<N>X variants.
9776         * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Add
9777         support for copysign and fma _Float<N> and _Float<N>X variants.
9778         (backprop::process_builtin_call_use): Likewise.
9779         * tree-call-cdce.c (can_test_argument_range); Add support for
9780         sqrt _Float<N> and _Float<N>X variants.
9781         (edom_only_function): Likewise.
9782         (get_no_error_domain): Likewise.
9783         * tree-ssa-math-opts.c (internal_fn_reciprocal): Likewise.
9784         * tree-ssa-reassoc.c (attempt_builtin_copysign): Add support for
9785         copysign _Float<N> and _Float<N>X variants.
9786         * config/rs6000/rs6000-builtin.def (SQRTF128): Delete, this is now
9787         handled by machine independent code.
9788         (FMAF128): Likewise.
9789         * doc/cpp.texi (Common Predefined Macros): Document defining
9790         __FP_FAST_FMAF<N> and __FP_FAST_FMAF<N>X if the backend supports
9791         fma _Float<N> and _Float<N>X variants.
9792
9793 2017-10-27  Uros Bizjak  <ubizjak@gmail.com>
9794
9795         PR target/82692
9796         * config/i386/i386-modes.def (CCFPU): Remove definition.
9797         * config/i386/i386.c (put_condition_mode): Remove CCFPU mode handling.
9798         (ix86_cc_modes_compatible): Ditto.
9799         (ix86_expand_carry_flag_compare): Ditto.
9800         (ix86_expand_int_movcc): Ditto.
9801         (ix86_expand_int_addcc): Ditto.
9802         (ix86_reverse_condition): Ditto.
9803         (ix86_unordered_fp_compare): Rename from ix86_fp_compare_mode.
9804         Return true/false for unordered/ordered fp comparisons.
9805         (ix86_cc_mode): Always return CCFPmode for float mode comparisons.
9806         (ix86_prepare_fp_compare_args): Update for rename.
9807         (ix86_expand_fp_compare): Update for rename.  Generate unordered
9808         compare RTXes wrapped with UNSPEC_NOTRAP unspec.
9809         (ix86_expand_sse_compare_and_jump): Ditto.
9810         * config/i386/predicates.md (fcmov_comparison_operator):
9811         Remove CCFPU mode handling.
9812         (ix86_comparison_operator): Ditto.
9813         (ix86_carry_flag_operator): Ditto.
9814         * config/i386/i386.md (UNSPEC_NOTRAP): New unspec.
9815         (*cmpu<mode>_i387): Wrap compare RTX with UNSPEC_NOTRAP unspec.
9816         (*cmpu<mode>_cc_i387): Ditto.
9817         (FPCMP): Remove mode iterator.
9818         (unord): Remove mode attribute.
9819         (unord_subst): New define_subst transformation
9820         (unord): New define_subst attribute.
9821         (unordered): Ditto.
9822         (*cmpi<unord><MODEF:mode>): Rewrite using unord_subst transformation.
9823         (*cmpi<unord>xf_i387): Ditto.
9824         * config/i386/sse.md (<sse>_<unord>comi<round_saeonly_name>): Merge
9825         from <sse>_comi<round_saeonly_name> and <sse>_ucomi<round_saeonly_name>
9826         using unord_subst transformation.
9827         * config/i386/subst.md (SUBST_A): Remove CCFP and CCFPU modes.
9828         (round_saeonly): Also handle CCFP mode.
9829         * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_NOTRAP unspec.
9830         Remove UNSPEC_SAHF unspec handling.
9831
9832 2017-10-27  Jan Hubicka  <hubicka@ucw.cz>
9833
9834         * x86-tune.def (X86_TUNE_INTER_UNIT_MOVES_TO_VEC): Disable for Zen.
9835
9836 2017-10-27  Jeff Law  <law@redhat.com>
9837
9838         * gimple-ssa-sprintf.c: Include domwalk.h.
9839         (class sprintf_dom_walker): New class, derived from dom_walker.
9840         (sprintf_dom_walker::before_dom_children): New function.
9841         (struct call_info): Moved into sprintf_dom_walker class
9842         (compute_formath_length, handle_gimple_call): Likewise.
9843         (sprintf_length::execute): Call the dominator walker rather
9844         than walking the statements.
9845
9846         * tree-vrp.c (check_all_array_refs): Do not use wi->info to smuggle
9847         gimple statement locations.
9848         (check_array_bounds): Corresponding changes.  Get the statement's
9849         location directly from wi->stmt.
9850
9851 2017-10-27  Palmer Dabbelt  <palmer@dabbelt.com>
9852
9853         PR target/82717
9854         * doc/invoke.texi (RISC-V) <-mabi>: Correct and improve.
9855
9856 2017-10-27  Jan Hubicka  <hubicka@ucw.cz>
9857
9858         * config/i386/x86-tune.def (X86_TUNE_PARTIAL_REG_DEPENDENCY,
9859         X86_TUNE_MOVX): Disable for Haswell and newer CPUs.
9860
9861 2017-10-27  Jakub Jelinek  <jakub@redhat.com>
9862
9863         PR target/82703
9864         * config/i386/i386-protos.h (maybe_get_pool_constant): Removed.
9865         * config/i386/i386.c (maybe_get_pool_constant): Removed.
9866         (ix86_split_to_parts): Use avoid_constant_pool_reference instead of
9867         maybe_get_pool_constant.
9868         * config/i386/predicates.md (zero_extended_scalar_load_operand):
9869         Likewise.
9870
9871 2017-10-27  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
9872
9873         * doc/install.texi (Specific, i?86-*-solaris2.10): Simplify gas
9874         2.26 caveat.  Update gas and gld versions.
9875         (Specific, *-*-solaris2*): Update binutils version.  Remove caveat
9876         reference.
9877
9878 2017-10-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
9879
9880         * cgraph.h (set_malloc_flag): Declare.
9881         * cgraph.c (set_malloc_flag_1): New function.
9882         (set_malloc_flag): Likewise.
9883         * ipa-fnsummary.h (ipa_call_summary): Add new field is_return_callee.
9884         * ipa-fnsummary.c (ipa_call_summary::reset): Set is_return_callee to
9885         false.
9886         (read_ipa_call_summary): Add support for reading is_return_callee.
9887         (write_ipa_call_summary): Stream is_return_callee.
9888         * ipa-inline.c (ipa_inline): Remove call to ipa_free_fn_summary.
9889         * ipa-pure-const.c: Add headers ssa.h, alloc-pool.h, symbol-summary.h,
9890         ipa-prop.h, ipa-fnsummary.h.
9891         (pure_const_names): Change to static.
9892         (malloc_state_e): Define.
9893         (malloc_state_names): Define.
9894         (funct_state_d): Add field malloc_state.
9895         (varying_state): Set malloc_state to STATE_MALLOC_BOTTOM.
9896         (check_retval_uses): New function.
9897         (malloc_candidate_p): Likewise.
9898         (analyze_function): Add support for malloc attribute.
9899         (pure_const_write_summary): Stream malloc_state.
9900         (pure_const_read_summary): Add support for reading malloc_state.
9901         (dump_malloc_lattice): New function.
9902         (propagate_malloc): New function.
9903         (warn_function_malloc): New function.
9904         (ipa_pure_const::execute): Call propagate_malloc and
9905         ipa_free_fn_summary.
9906         (pass_local_pure_const::execute): Add support for malloc attribute.
9907         * ssa-iterators.h (RETURN_FROM_IMM_USE_STMT): New macro.
9908         * doc/invoke.texi: Document Wsuggest-attribute=malloc.
9909
9910 2017-10-27  Martin Liska  <mliska@suse.cz>
9911
9912         PR gcov-profile/82457
9913         * doc/invoke.texi: Document that one needs a non-strict ISO mode
9914         for fork-like functions to be properly instrumented.
9915
9916 2017-10-27  Richard Biener  <rguenther@suse.de>
9917
9918         PR middle-end/81659
9919         * tree-eh.c (pass_lower_eh_dispatch::execute): Free dominator
9920         info when we redirected EH.
9921
9922 2017-10-26  Michael Collison  <michael.collison@arm.com>
9923
9924         * config/aarch64/aarch64.md(<optab>_trunc><vf><GPI:mode>2):
9925         New pattern.
9926         (<optab>_trunchf<GPI:mode>2: New pattern.
9927         (<optab>_trunc<vgp><GPI:mode>2: New pattern.
9928         * config/aarch64/iterators.md (wv): New mode attribute.
9929         (vf, VF): New mode attributes.
9930         (vgp, VGP): New mode attributes.
9931         (s): Update attribute with SImode and DImode prefixes.
9932
9933 2017-10-26  Sandra Loosemore  <sandra@codesourcery.com>
9934
9935         * config/nios2/constraints.md ("S"): Match r0rel_constant_p too.
9936         * config/nios2/nios2-protos.h (r0rel_constant_p): Declare.
9937         * config/nios2/nios2.c: (nios2_r0rel_sec_regex): New.
9938         (nios2_option_overide): Initialize it.  Don't allow R0-relative
9939         addressing with PIC.
9940         (nios2_rtx_costs): Handle r0rel_constant_p like gprel_constant_p.
9941         (nios2_symbolic_constant_p): Likewise.
9942         (nios2_legitimate_address_p): Likewise.
9943         (nios2_r0rel_section_name_p): New.
9944         (nios2_symbol_ref_in_r0rel_data_p): New.
9945         (nios2_emit_move_sequence): Handle r0rel_constant_p.
9946         (r0rel_constant_p): New.
9947         (nios2_print_operand_address): Handle r0rel_constant_p.
9948         (nios2_cdx_narrow_form_p): Likewise.
9949         * config/nios2/nios2.opt (mr0rel-sec=): New option.
9950         * doc/invoke.texi (Option Summary): Add -mr0rel-sec.
9951         (Nios II Options): Document -mr0rel-sec.
9952
9953 2017-10-26  Sandra Loosemore  <sandra@codesourcery.com>
9954
9955         * config/nios2/nios2.c: Include xregex.h.
9956         (nios2_gprel_sec_regex): New.
9957         (nios2_option_overide): Initialize it.  Don't allow GP-relative
9958         addressing with PIC.
9959         (nios2_small_section_name_p): Check for regex match.
9960         * config/nios2/nios2.opt (mgprel-sec=): New option.
9961         * doc/invoke.texi (Option Summary): Add -mgprel-sec.
9962         (Nios II Options): Document -mgprel-sec.
9963
9964 2017-10-26  Jim Wilson  <wilson@tuliptree.org>
9965
9966         * doc/invoke.texi (-fdebug-prefix-map): Expand documentation.
9967
9968 2017-10-26  Tom de Vries  <tom@codesourcery.com>
9969
9970         PR tree-optimization/82707
9971         * gimple.c (gimple_copy): Fix unsharing of
9972         GIMPLE_OMP_{SINGLE,TARGET,TEAMS}.
9973
9974 2017-10-26  Olga Makhotina  <olga.makhotina@intel.com>
9975
9976         * config/i386/avx512fintrin.h (_mm512_cmpeq_pd_mask,
9977         _mm512_cmple_pd_mask, _mm512_cmplt_pd_mask,
9978         _mm512_cmpneq_pd_mask, _mm512_cmpnle_pd_mask,
9979         _mm512_cmpnlt_pd_mask, _mm512_cmpord_pd_mask,
9980         _mm512_cmpunord_pd_mask, _mm512_mask_cmpeq_pd_mask,
9981         _mm512_mask_cmple_pd_mask, _mm512_mask_cmplt_pd_mask,
9982         _mm512_mask_cmpneq_pd_mask, _mm512_mask_cmpnle_pd_mask,
9983         _mm512_mask_cmpnlt_pd_mask, _mm512_mask_cmpord_pd_mask,
9984         _mm512_mask_cmpunord_pd_mask, _mm512_cmpeq_ps_mask,
9985         _mm512_cmple_ps_mask, _mm512_cmplt_ps_mask,
9986         _mm512_cmpneq_ps_mask, _mm512_cmpnle_ps_mask,
9987         _mm512_cmpnlt_ps_mask, _mm512_cmpord_ps_mask,
9988         _mm512_cmpunord_ps_mask, _mm512_mask_cmpeq_ps_mask,
9989         _mm512_mask_cmple_ps_mask, _mm512_mask_cmplt_ps_mask,
9990         _mm512_mask_cmpneq_ps_mask, _mm512_mask_cmpnle_ps_mask,
9991         _mm512_mask_cmpnlt_ps_mask, _mm512_mask_cmpord_ps_mask,
9992         _mm512_mask_cmpunord_ps_mask): New intrinsics.
9993
9994 2017-10-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
9995
9996         * config/rs6000/aix.h (TARGET_IEEEQUAD_DEFAULT): Set long double
9997         default to IBM.
9998         * config/rs6000/darwin.h (TARGET_IEEEQUAD_DEFAULT): Likewise.
9999         * config/rs6000/rs6000.opt (-mabi=ieeelongdouble): Move the
10000         warning to rs6000.c.  Remove the Undocumented flag, since it has
10001         been documented.
10002         (-mabi=ibmlongdouble): Likewise.
10003         * config/rs6000/rs6000.c (TARGET_IEEEQUAD_DEFAULT): If it is not
10004         already set, set the default format for long double.
10005         (rs6000_debug_reg_global): Print whether long double is IBM or
10006         IEEE.
10007         (rs6000_option_override_internal): Rework setting long double
10008         format.  Only warn if the user is changing the long double default
10009         and they did not use -Wno-psabi.
10010         * doc/invoke.texi (PowerPC options): Update the documentation for
10011         -mabi=ieeelongdouble and -mabi=ibmlongdouble.
10012
10013 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
10014             Alan Hayward  <alan.hayward@arm.com>
10015             David Sherwood  <david.sherwood@arm.com>
10016
10017         * rtl.h (wider_subreg_mode): New function.
10018         * ira.h (ira_sort_regnos_for_alter_reg): Take a machine_mode *
10019         rather than an unsigned int *.
10020         * ira-color.c (regno_max_ref_width): Replace with...
10021         (regno_max_ref_mode): ...this new variable.
10022         (coalesced_pseudo_reg_slot_compare): Update accordingly.
10023         Use wider_subreg_mode.
10024         (ira_sort_regnos_for_alter_reg): Likewise.  Take a machine_mode *
10025         rather than an unsigned int *.
10026         * lra-constraints.c (uses_hard_regs_p): Use wider_subreg_mode.
10027         (process_alt_operands): Likewise.
10028         (invariant_p): Likewise.
10029         * lra-spills.c (assign_mem_slot): Likewise.
10030         (add_pseudo_to_slot): Likewise.
10031         * lra.c (collect_non_operand_hard_regs): Likewise.
10032         (add_regs_to_insn_regno_info): Likewise.
10033         * reload1.c (regno_max_ref_width): Replace with...
10034         (regno_max_ref_mode): ...this new variable.
10035         (reload): Update accordingly.  Update call to
10036         ira_sort_regnos_for_alter_reg.
10037         (alter_reg): Update to use regno_max_ref_mode.  Call wider_subreg_mode.
10038         (init_eliminable_invariants): Update to use regno_max_ref_mode.
10039         (scan_paradoxical_subregs): Likewise.
10040
10041 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
10042
10043         * config/aarch64/aarch64.h (EXIT_IGNORE_STACK): Set if alloca is used.
10044         (aarch64_frame): Add emit_frame_chain boolean.
10045         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
10046         Move eh_return case to aarch64_layout_frame.
10047         (aarch64_layout_frame): Initialize emit_frame_chain.
10048         (aarch64_expand_prologue): Use emit_frame_chain.
10049
10050 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
10051
10052         * config/aarch64/aarch64.c (aarch64_layout_frame):
10053         Ensure LR is always stored at the bottom of the callee-saves.
10054         Remove rarely used frame layout which saves callee-saves at top of
10055         frame, so the store of LR can be used as a valid probe in all cases.
10056
10057 2017-10-26  Wilco Dijkstra  <wdijkstr@arm.com>
10058
10059         * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
10060         Improve unaligned TImode/TFmode base/offset split.
10061
10062 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
10063             Alan Hayward  <alan.hayward@arm.com>
10064             David Sherwood  <david.sherwood@arm.com>
10065
10066         * caller-save.c (mark_referenced_regs):  Use read_modify_subreg_p.
10067         * combine.c (find_single_use_1): Likewise.
10068         (expand_field_assignment): Likewise.
10069         (move_deaths): Likewise.
10070         * lra-constraints.c (simplify_operand_subreg): Likewise.
10071         (curr_insn_transform): Likewise.
10072         * lra.c (collect_non_operand_hard_regs): Likewise.
10073         (add_regs_to_insn_regno_info): Likewise.
10074         * rtlanal.c (reg_referenced_p): Likewise.
10075         (covers_regno_no_parallel_p): Likewise.
10076
10077 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
10078
10079         * wide-int-print.cc (print_hex): Loop based on extract_uhwi.
10080         Don't print any bits outside the precision of the value.
10081         * wide-int.cc (test_printing): Add some new tests.
10082
10083 2017-10-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10084
10085         * configure.ac (gcc_cv_as_ix86_xbrace_comment): Check if assembler
10086         supports -xbrace_comment option.
10087         * configure: Regenerate.
10088         * config.in: Regenerate.
10089         * config/i386/sol2.h (ASM_XBRACE_COMMENT_SPEC): Define.
10090         (ASM_CPU_SPEC): Use it.
10091
10092 2017-10-26  Richard Sandiford  <richard.sandiford@linaro.org>
10093
10094         * target.def (static_rtx_alignment): New hook.
10095         * targhooks.h (default_static_rtx_alignment): Declare.
10096         * targhooks.c (default_static_rtx_alignment): New function.
10097         * doc/tm.texi.in (TARGET_STATIC_RTX_ALIGNMENT): New hook.
10098         * doc/tm.texi: Regenerate.
10099         * varasm.c (force_const_mem): Use targetm.static_rtx_alignment
10100         instead of targetm.constant_alignment.  Remove call to
10101         set_mem_attributes.
10102         * config/cris/cris.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
10103         (cris_preferred_mininum_alignment): New function, split out from...
10104         (cris_constant_alignment): ...here.
10105         (cris_static_rtx_alignment): New function.
10106         * config/i386/i386.c (ix86_static_rtx_alignment): New function,
10107         split out from...
10108         (ix86_constant_alignment): ...here.
10109         (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
10110         * config/mmix/mmix.c (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
10111         (mmix_static_rtx_alignment): New function.
10112         * config/spu/spu.c (spu_static_rtx_alignment): New function.
10113         (TARGET_STATIC_RTX_ALIGNMENT): Redefine.
10114
10115 2017-10-26  Tamar Christina  <tamar.christina@arm.com>
10116
10117         PR target/81800
10118         * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2):
10119         Add flag_trapping_math and flag_fp_int_builtin_inexact.
10120
10121 2017-10-25  Palmer Dabbelt  <palmer@dabbelt.com>
10122
10123         * config/riscv/riscv.md (ZERO_EXTEND_LOAD): Define.
10124         * config/riscv/pic.md (local_pic_load): Rename to local_pic_load_s,
10125         mark as a sign-extending load.
10126         (local_pic_load_u): Define.
10127
10128 2017-10-25  Eric Botcazou  <ebotcazou@adacore.com>
10129
10130         PR middle-end/82062
10131         * fold-const.c (operand_equal_for_comparison_p): Also return true
10132         if ARG0 is a simple variant of ARG1 with narrower precision.
10133         (fold_ternary_loc): Always pass unstripped operands to the predicate.
10134
10135 2017-10-25  Jan Hubicka  <hubicka@ucw.cz>
10136
10137         * i386.c (ix86_builtin_vectorization_cost): Compute scatter/gather
10138         cost correctly.
10139         * i386.h (processor_costs): Add gather_static, gather_per_elt,
10140         scatter_static, scatter_per_elt.
10141         * x86-tune-costs.h: Add new cost entries.
10142
10143 2017-10-25  Richard Biener  <rguenther@suse.de>
10144
10145         * tree-ssa-sccvn.h (vn_eliminate): Declare.
10146         * tree-ssa-pre.c (class eliminate_dom_walker, eliminate,
10147         class pass_fre): Move to ...
10148         * tree-ssa-sccvn.c (class eliminate_dom_walker, vn_eliminate,
10149         class pass_fre): ... here and adjust for statistics.
10150
10151 2017-10-25  Jakub Jelinek  <jakub@redhat.com>
10152
10153         PR libstdc++/81706
10154         * attribs.c (attribute_value_equal): Use omp_declare_simd_clauses_equal
10155         for comparison of OMP_CLAUSEs regardless of flag_openmp{,_simd}.
10156         (duplicate_one_attribute, copy_attributes_to_builtin): New functions.
10157         * attribs.h (duplicate_one_attribute, copy_attributes_to_builtin): New
10158         declarations.
10159
10160 2017-10-25  Richard Biener  <rguenther@suse.de>
10161
10162         * tree-ssa-pre.c (need_eh_cleanup, need_ab_cleanup, el_to_remove,
10163         el_to_fixup, el_todo, el_avail, el_avail_stack, eliminate_avail,
10164         eliminate_push_avail, eliminate_insert): Move inside...
10165         (class eliminate_dom_walker): ... this class in preparation
10166         of move.
10167         (fini_eliminate): Remove by merging with ...
10168         (eliminate): ... this function.  Adjust for class changes.
10169         (pass_pre::execute): Remove fini_eliminate call.
10170         (pass_fre::execute): Likewise.
10171
10172 2017-10-24  Jakub Jelinek  <jakub@redhat.com>
10173
10174         PR target/82460
10175         * config/i386/sse.md (UNSPEC_VPERMI2, UNSPEC_VPERMI2_MASK): Remove.
10176         (VPERMI2, VPERMI2I): New mode iterators.
10177         (<avx512>_vpermi2var<mode>3_maskz): Remove 3 define_expand patterns.
10178         (<avx512>_vpermi2var<mode>3<sd_maskz_name>): Remove 3 define_insn
10179         patterns.
10180         (<avx512>_vpermi2var<mode>3_mask): New define_expand using VPERMI2
10181         mode iterator.  Remove 3 old define_insn patterns.
10182         (*<avx512>_vpermi2var<mode>3_mask): 2 new define_insn patterns.
10183         (<avx512>_vpermt2var<mode>3_maskz): Adjust 1 define_expand to use
10184         VPERMI2 mode iterator, remove the other two expanders.
10185         (<avx512>_vpermt2var<mode>3<sd_maskz_name>): Adjust 1 define_insn
10186         to use VPERMI2 mode iterator, add another alternative for vpermi2*
10187         instructions, remove the other two patterns.
10188         (<avx512>_vpermt2var<mode>3_mask): Adjust 1 define_insn to use VPERMI2
10189         mode iterator, remove the other two patterns.
10190         * config/i386/i386.c (ix86_expand_vec_perm_vpermi2): Renamed to ...
10191         (ix86_expand_vec_perm_vpermt2): ... this.  Swap mask and op0
10192         arguments, use gen_*vpermt2* expanders instead of gen_*vpermi2*
10193         and adjust argument order accordingly.
10194         (ix86_expand_vec_perm): Adjust caller.
10195         (expand_vec_perm_1): Likewise.
10196         (expand_vec_perm_vpermi2_vpshub2): Rename to ...
10197         (expand_vec_perm_vpermt2_vpshub2): ... this.
10198         (ix86_expand_vec_perm_const_1): Adjust caller.
10199         (ix86_vectorize_vec_perm_const_ok): Adjust comments.
10200
10201         PR target/82370
10202         * config/i386/sse.md (VIMAX_AVX2): Remove V4TImode.
10203         (VIMAX_AVX2_AVX512BW, VIMAX_AVX512VL): New mode iterators.
10204         (vec_shl_<mode>): Remove unused expander.
10205         (avx512bw_<shift_insn><mode>3): New define_insn.
10206         (<sse2_avx2>_ashl<mode>3, <sse2_avx2>_lshr<mode>3): Replaced by ...
10207         (<sse2_avx2>_<shift_insn><mode>3): ... this.  New define_insn.
10208
10209 2017-10-24  Paolo Carlini  <paolo.carlini@oracle.com>
10210
10211         PR c++/82466
10212         * doc/invoke.texi ([Wbuiltin-declaration-mismatch]): Extend
10213         description.
10214
10215 2017-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
10216
10217         PR rtl-optimization/82396
10218         * gcc/haifa-sched.c (ready_sort_real): Remove qsort workaround.
10219         (autopref_multipass_init): Simplify initialization.
10220         (autopref_rank_data): Simplify sort order.
10221         * gcc/sched-int.h (autopref_multipass_data_): Remove
10222         multi_mem_insn_p, min_offset and max_offset.
10223
10224 2017-10-24  Wilco Dijkstra  <wdijkstr@arm.com>
10225
10226         PR middle-end/60580
10227         * config/aarch64/aarch64.c (aarch64_frame_pointer_required)
10228         Check special value of flag_omit_frame_pointer.
10229         (aarch64_can_eliminate): Likewise.
10230         (aarch64_override_options_after_change_1): Simplify handling of
10231         -fomit-frame-pointer and -fomit-leaf-frame-pointer.
10232
10233 2017-10-24  Richard Biener  <rguenther@suse.de>
10234
10235         PR tree-optimization/82697
10236         * tree-ssa-phiopt.c (cond_store_replacement): Use alias-set
10237         zero for conditional load and unconditional store.
10238
10239 2017-10-24  H.J. Lu  <hongjiu.lu@intel.com>
10240
10241         * doc/install.texi: Document bootstrap-cet.
10242
10243 2017-10-24  H.J. Lu  <hongjiu.lu@intel.com>
10244
10245         PR target/82659
10246         * config/i386/i386.c (rest_of_insert_endbranch): Don't insert
10247         ENDBR instruction at function entrance if function is only
10248         called directly.
10249
10250 2017-10-24  Jakub Jelinek  <jakub@redhat.com>
10251
10252         PR target/82628
10253         * config/i386/i386.md (addcarry<mode>, subborrow<mode>): Change
10254         patterns to better describe from which operation the CF is computed.
10255         (addcarry<mode>_0, subborrow<mode>_0): New patterns.
10256         * config/i386/i386.c (ix86_expand_builtin) <case handlecarry>: Pass
10257         one LTU with [DT]Imode and another one with [SD]Imode.  If arg0
10258         is 0, use _0 suffixed expanders instead of emitting a comparison
10259         before it.
10260
10261 2017-10-06  Sergey Shalnov  <Sergey.Shalnov@intel.com>
10262
10263         * config/i386/i386.md(*movsf_internal, *movdf_internal):
10264         Avoid 512-bit AVX modes for TARGET_PREFER_AVX256.
10265
10266 2017-10-24  Eric Botcazou  <ebotcazou@adacore.com>
10267
10268         PR middle-end/82569
10269         * tree-outof-ssa.h (always_initialized_rtx_for_ssa_name_p): Delete.
10270         * expr.c (expand_expr_real_1) <expand_decl_rtl>: Revert latest change.
10271         * loop-iv.c (iv_get_reaching_def): Likewise.
10272         * cfgexpand.c (expand_one_ssa_partition): Initialize the RTX if the
10273         variable is promoted and the partition contains undefined values.
10274
10275 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
10276
10277         * config/nios2/nios2.c (nios2_rtx_costs): Make costs better
10278         reflect reality.
10279         (nios2_address_cost): Define.
10280         (nios2_legitimize_address): Recognize (exp + constant) directly.
10281         (TARGET_ADDRESS_COST): Define.
10282
10283 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
10284
10285         * config/nios2/nios2-protos.h (nios2_large_constant_p): Declare.
10286         (nios2_symbolic_memory_operand_p): Declare.
10287         (nios2_split_large_constant): Declare.
10288         (nios2_split_symbolic_memory_operand): Declare.
10289         * config/nios2/nios2.c: Adjust includes.
10290         (nios2_symbolic_constant_allowed): New.
10291         (nios2_symbolic_constant_p): New.
10292         (nios2_plus_symbolic_constant_p): New.
10293         (nios2_valid_addr_expr_p): Recognize addresses involving
10294         symbolic constants.
10295         (nios2_legitimate_address_p): Likewise, also LO_SUM.
10296         (nios2_symbolic_memory_operand_p): New.
10297         (nios2_large_constant_p): New.
10298         (nios2_split_large_constant): New.
10299         (nios2_split_plus_large_constant): New.
10300         (nios2_split_symbolic_memory_operand): New.
10301         (nios2_legitimize_address): Code refactoring.  Handle addresses
10302         involving symbolic constants.
10303         (nios2_emit_move_sequence): Likewise.
10304         (nios2_print_operand): Improve error output.
10305         (nios2_print_operand_address): Handle LO_SUM.
10306         (nios2_cdx_narrow_form_p): Likewise.
10307         * config/nios2/nios2.md (movqi_internal): Add splitter for memory
10308         operands involving symbolic constants.
10309         (movhi_internal, movsi_internal): Likewise.
10310         (zero_extendhisi2, zero_extendqi<mode>2): Likewise.
10311         (extendhisi2, extendqi<mode>2): Likewise.
10312
10313 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
10314
10315         * tree-pass.h (PROP_rtl_split_insns): Define.
10316         * recog.c (pass_data_split_all_insns): Provide PROP_rtl_split_insns.
10317
10318 2017-10-23  Sandra Loosemore  <sandra@codesourcery.com>
10319
10320         * config/nios2/nios2.c (TARGET_LRA_P): Don't override.
10321
10322 2017-10-23  Jakub Jelinek  <jakub@redhat.com>
10323
10324         PR debug/82630
10325         * target.def (const_not_ok_for_debug_p): Default to
10326         default_const_not_ok_for_debug_p instead of hook_bool_rtx_false.
10327         * targhooks.h (default_const_not_ok_for_debug_p): New declaration.
10328         * targhooks.c (default_const_not_ok_for_debug_p): New function.
10329         * dwarf2out.c (const_ok_for_output_1): Only reject UNSPECs for
10330         which targetm.const_not_ok_for_debug_p returned true.
10331         * config/arm/arm.c (arm_const_not_ok_for_debug_p): Return true
10332         for UNSPECs.
10333         * config/powerpcspe/powerpcspe.c (rs6000_const_not_ok_for_debug_p):
10334         Likewise.
10335         * config/rs6000/rs6000.c (rs6000_const_not_ok_for_debug_p): Likewise.
10336         * config/i386/i386.c (ix86_delegitimize_address_1): Don't delegitimize
10337         UNSPEC_GOTOFF with addend into addend - _GLOBAL_OFFSET_TABLE_ + symbol
10338         if !base_term_p.
10339         (ix86_const_not_ok_for_debug_p): New function.
10340         (i386_asm_output_addr_const_extra): Handle UNSPEC_GOTOFF.
10341         (TARGET_CONST_NOT_OK_FOR_DEBUG_P): Redefine.
10342
10343 2017-10-23  David Malcolm  <dmalcolm@redhat.com>
10344
10345         PR bootstrap/82610
10346         * system.h: Conditionally include "unique-ptr.h" if
10347         INCLUDE_UNIQUE_PTR is defined.
10348         * unique-ptr-tests.cc: Remove include of "unique-ptr.h" in favor
10349         of defining INCLUDE_UNIQUE_PTR before including "system.h".
10350
10351 2017-10-23  Sebastian Perta  <sebastian.perta@renesas.com>
10352
10353         * config/rl78/rl78.md: New define_expand "subdi3".
10354
10355 2017-10-23  H.J. Lu  <hongjiu.lu@intel.com>
10356
10357         PR target/82673
10358         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Skip
10359         DF_REF_INSN if DF_REF_INSN_INFO is false.
10360
10361 2017-10-23  Jan Hubicka  <hubicka@ucw.cz>
10362
10363         * i386.c (dimode_scalar_chain::compute_convert_gain): Use
10364         xmm_move instead of sse_move.
10365         (sse_store_index): New function.
10366         (ix86_register_move_cost): Be more sensible about mismatch stall;
10367         model AVX moves correctly; make difference between sse->integer and
10368         integer->sse.
10369         (ix86_builtin_vectorization_cost): Model correctly aligned and unaligned
10370         moves; make difference between SSE and AVX.
10371         * i386.h (processor_costs): Remove sse_move; add xmm_move, ymm_move
10372         and zmm_move. Increase size of sse load and store tables;
10373         add unaligned load and store tables; add ssemmx_to_integer.
10374         * x86-tune-costs.h: Update all entries according to real
10375         move latencies from Agner Fog's manual and chip documentation.
10376
10377 2017-10-23  Jakub Jelinek  <jakub@redhat.com>
10378
10379         PR target/82628
10380         * config/i386/predicates.md (x86_64_dwzext_immediate_operand): New.
10381         * config/i386/constraints.md (Wf): New constraint.
10382         * config/i386/i386.md (UNSPEC_SBB): New unspec.
10383         (cmp<dwi>_doubleword): Removed.
10384         (sub<mode>3_carry_ccc, *sub<mode>3_carry_ccc_1): New patterns.
10385         (sub<mode>3_carry_ccgz): Use unspec instead of compare.
10386         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>: Don't
10387         expand with cmp<dwi>_doubleword.  For LTU and GEU use
10388         sub<mode>3_carry_ccc instead of sub<mode>3_carry_ccgz and use CCCmode.
10389
10390         * common.opt (gcolumn-info): Enable by default.
10391         * doc/invoke.texi (gcolumn-info): Document new default.
10392
10393 2017-10-23  Richard Biener  <rguenther@suse.de>
10394
10395         PR tree-optimization/82672
10396         * graphite-isl-ast-to-gimple.c (graphite_copy_stmts_from_block):
10397         Fold the stmt if we propagated into it.
10398
10399 2017-10-23  Richard Biener  <rguenther@suse.de>
10400
10401         * tree-ssa-pre.c (bitmap_remove_from_set): Rename to...
10402         (bitmap_remove_expr_from_set): ... this.  All callers call this
10403         for non-constant values.
10404         (bitmap_set_subtract): Rename to...
10405         (bitmap_set_subtract_expressions): ... this.  Adjust and
10406         optimize.
10407         (bitmap_set_contains_value): Remove superfluous check.
10408         (bitmap_set_replace_value): Inline into single caller ...
10409         (bitmap_value_replace_in_set): ... here and simplify.
10410         (dependent_clean): Merge into ...
10411         (clean): ... this using an overload.  Adjust.
10412         (prune_clobbered_mems): Adjust.
10413         (compute_antic_aux): Likewise.
10414         (compute_partial_antic_aux): Likewise.
10415
10416 2017-10-23  Richard Biener  <rguenther@suse.de>
10417
10418         PR tree-optimization/82129
10419         Revert
10420         2017-08-01  Richard Biener  <rguenther@suse.de>
10421
10422         PR tree-optimization/81181
10423         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
10424         (compute_antic): ... end of iteration here.
10425
10426 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
10427
10428         * target.def (starting_frame_offset): New hook.
10429         * doc/tm.texi (STARTING_FRAME_OFFSET): Remove in favor of...
10430         (TARGET_STARTING_FRAME_OFFSET): ...this new hook.
10431         * doc/tm.texi.in: Regenerate.
10432         * hooks.h (hook_hwi_void_0): Declare.
10433         * hooks.c (hook_hwi_void_0): New function.
10434         * doc/rtl.texi: Refer to TARGET_STARTING_FRAME_OFFSET instead of
10435         STARTING_FRAME_OFFSET.
10436         * builtins.c (expand_builtin_setjmp_receiver): Likewise.
10437         * reload1.c (reload): Likewise.
10438         * cfgexpand.c (expand_used_vars): Use targetm.starting_frame_offset
10439         instead of STARTING_FRAME_OFFSET.
10440         * function.c (try_fit_stack_local): Likewise.
10441         (assign_stack_local_1): Likewise
10442         (instantiate_virtual_regs): Likewise.
10443         * rtlanal.c (rtx_addr_can_trap_p_1): Likewise.
10444         * config/avr/avr.md (nonlocal_goto_receiver): Likewise.
10445         * config/aarch64/aarch64.h (STARTING_FRAME_OFFSET): Delete.
10446         * config/alpha/alpha.h (STARTING_FRAME_OFFSET): Likewise.
10447         * config/arc/arc.h (STARTING_FRAME_OFFSET): Likewise.
10448         * config/arm/arm.h (STARTING_FRAME_OFFSET): Likewise.
10449         * config/bfin/bfin.h (STARTING_FRAME_OFFSET): Likewise.
10450         * config/c6x/c6x.h (STARTING_FRAME_OFFSET): Likewise.
10451         * config/cr16/cr16.h (STARTING_FRAME_OFFSET): Likewise.
10452         * config/cris/cris.h (STARTING_FRAME_OFFSET): Likewise.
10453         * config/fr30/fr30.h (STARTING_FRAME_OFFSET): Likewise.
10454         * config/frv/frv.h (STARTING_FRAME_OFFSET): Likewise.
10455         * config/ft32/ft32.h (STARTING_FRAME_OFFSET): Likewise.
10456         * config/h8300/h8300.h (STARTING_FRAME_OFFSET): Likewise.
10457         * config/i386/i386.h (STARTING_FRAME_OFFSET): Likewise.
10458         * config/ia64/ia64.h (STARTING_FRAME_OFFSET): Likewise.
10459         * config/m32c/m32c.h (STARTING_FRAME_OFFSET): Likewise.
10460         * config/m68k/m68k.h (STARTING_FRAME_OFFSET): Likewise.
10461         * config/mcore/mcore.h (STARTING_FRAME_OFFSET): Likewise.
10462         * config/mn10300/mn10300.h (STARTING_FRAME_OFFSET): Likewise.
10463         * config/moxie/moxie.h (STARTING_FRAME_OFFSET): Likewise.
10464         * config/msp430/msp430.h (STARTING_FRAME_OFFSET): Likewise.
10465         * config/nds32/nds32.h (STARTING_FRAME_OFFSET): Likewise.
10466         * config/nios2/nios2.h (STARTING_FRAME_OFFSET): Likewise.
10467         * config/nvptx/nvptx.h (STARTING_FRAME_OFFSET): Likewise.
10468         * config/pdp11/pdp11.h (STARTING_FRAME_OFFSET): Likewise.
10469         * config/riscv/riscv.h (STARTING_FRAME_OFFSET): Likewise.
10470         * config/rl78/rl78.h (STARTING_FRAME_OFFSET): Likewise.
10471         * config/rx/rx.h (STARTING_FRAME_OFFSET): Likewise.
10472         * config/s390/s390.h (STARTING_FRAME_OFFSET): Likewise.
10473         * config/sh/sh.h (STARTING_FRAME_OFFSET): Likewise.
10474         * config/sparc/sparc.c (sparc_compute_frame_size): Likewise.
10475         * config/sparc/sparc.h (STARTING_FRAME_OFFSET): Likewise.
10476         * config/spu/spu.h (STARTING_FRAME_OFFSET): Likewise.
10477         * config/stormy16/stormy16.h (STARTING_FRAME_OFFSET): Likewise.
10478         * config/tilegx/tilegx.h (STARTING_FRAME_OFFSET): Likewise.
10479         * config/tilepro/tilepro.h (STARTING_FRAME_OFFSET): Likewise.
10480         * config/v850/v850.h (STARTING_FRAME_OFFSET): Likewise.
10481         * config/visium/visium.h (STARTING_FRAME_OFFSET): Likewise.
10482         * config/avr/avr.h (STARTING_FRAME_OFFSET): Likewise.
10483         * config/avr/avr-protos.h (avr_starting_frame_offset): Likewise.
10484         * config/avr/avr.c (avr_starting_frame_offset): Make static and
10485         return a HOST_WIDE_INT.
10486         (avr_builtin_setjmp_frame_value): Use it instead of
10487         STARTING_FRAME_OFFSET.
10488         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10489         * config/epiphany/epiphany.h (STARTING_FRAME_OFFSET): Delete.
10490         * config/epiphany/epiphany.c (epiphany_starting_frame_offset):
10491         New function.
10492         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10493         * config/iq2000/iq2000.h (STARTING_FRAME_OFFSET): Delete.
10494         * config/iq2000/iq2000.c (iq2000_starting_frame_offset): New function.
10495         (TARGET_CONSTANT_ALIGNMENT): Redefine.
10496         * config/lm32/lm32.h (STARTING_FRAME_OFFSET): Delete.
10497         * config/lm32/lm32.c (lm32_starting_frame_offset): New function.
10498         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10499         * config/m32r/m32r.h (STARTING_FRAME_OFFSET): Delete.
10500         * config/m32r/m32r.c (m32r_starting_frame_offset): New function.
10501         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10502         * config/microblaze/microblaze.h (STARTING_FRAME_OFFSET): Delete.
10503         * config/microblaze/microblaze.c (microblaze_starting_frame_offset):
10504         New function.
10505         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10506         * config/mips/mips.h (STARTING_FRAME_OFFSET): Delete.
10507         * config/mips/mips.c (mips_compute_frame_info): Refer to
10508         TARGET_STARTING_FRAME_OFFSET instead of STARTING_FRAME_OFFSET.
10509         (mips_starting_frame_offset): New function.
10510         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10511         * config/mmix/mmix.h (STARTING_FRAME_OFFSET): Delete.
10512         * config/mmix/mmix-protos.h (mmix_starting_frame_offset): Delete.
10513         * config/mmix/mmix.c (mmix_starting_frame_offset): Make static
10514         and return a HOST_WIDE_INT.
10515         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10516         (mmix_initial_elimination_offset): Refer to
10517         TARGET_STARTING_FRAME_OFFSET instead of STARTING_FRAME_OFFSET.
10518         * config/pa/pa.h (STARTING_FRAME_OFFSET): Delete.
10519         * config/pa/pa.c (pa_starting_frame_offset): New function.
10520         (pa_compute_frame_size): Use it instead of STARTING_FRAME_OFFSET.
10521         (pa_expand_prologue): Likewise.
10522         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10523         * config/powerpcspe/aix.h (STARTING_FRAME_OFFSET): Split out
10524         !FRAME_GROWS_DOWNWARD handling to...
10525         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
10526         * config/powerpcspe/darwin.h (STARTING_FRAME_OFFSET): Split out
10527         !FRAME_GROWS_DOWNWARD handling to...
10528         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
10529         * config/powerpcspe/powerpcspe.h (STARTING_FRAME_OFFSET): Split out
10530         !FRAME_GROWS_DOWNWARD handling to...
10531         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
10532         * config/powerpcspe/powerpcspe.c (TARGET_STARTING_FRAME_OFFSET):
10533         Redefine.
10534         (rs6000_starting_frame_offset): New function.
10535         * config/rs6000/aix.h (STARTING_FRAME_OFFSET): Split out
10536         !FRAME_GROWS_DOWNWARD handling to...
10537         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
10538         * config/rs6000/darwin.h (STARTING_FRAME_OFFSET): Split out
10539         !FRAME_GROWS_DOWNWARD handling to...
10540         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
10541         * config/rs6000/rs6000.h (STARTING_FRAME_OFFSET): Split out
10542         !FRAME_GROWS_DOWNWARD handling to...
10543         (RS6000_STARTING_FRAME_OFFSET): ...this new macro.
10544         * config/rs6000/rs6000.c (TARGET_STARTING_FRAME_OFFSET): Refine.
10545         (rs6000_starting_frame_offset): New function.
10546         * config/vax/elf.h (STARTING_FRAME_OFFSET): Delete.
10547         * config/vax/vax.h (STARTING_FRAME_OFFSET): Delete.
10548         * config/vax/vax.c (vax_starting_frame_offset): New function.
10549         (vax_expand_prologue): Use it instead of STARTING_FRAME_OFFSET.
10550         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10551         * config/xtensa/xtensa.h (STARTING_FRAME_OFFSET): Delete.
10552         * config/xtensa/xtensa.c (xtensa_starting_frame_offset): New function.
10553         (TARGET_STARTING_FRAME_OFFSET): Redefine.
10554         * system.h (STARTING_FRAME_OFFSET): Poison.
10555
10556 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
10557
10558         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
10559         SCALAR_TYPE_MODE instead of TYPE_MODE.
10560
10561 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
10562             Alan Hayward  <alan.hayward@arm.com>
10563             David Sherwood  <david.sherwood@arm.com>
10564
10565         * dwarf2out.c (loc_list_from_tree_1): Use SCALAR_INT_TYPE_MODE
10566
10567 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
10568             Alan Hayward  <alan.hayward@arm.com>
10569             David Sherwood  <david.sherwood@arm.com>
10570
10571         * expmed.c (expand_shift_1): Use scalar_mode for scalar_mode.
10572
10573 2017-10-23  Richard Biener  <rguenther@suse.de>
10574
10575         PR tree-optimization/82129
10576         * tree-ssa-pre.c (bitmap_set_and): Remove.
10577         (compute_antic_aux): Compute ANTIC_OUT intersection in a way
10578         canonicalizing expressions in the set to those with lowest
10579         ID rather than taking that from the first edge.
10580
10581 2017-10-23  Richard Sandiford  <richard.sandiford@linaro.org>
10582
10583         * combine.c (rtx_equal_for_field_assignment_p): Use
10584         byte_lowpart_offset.
10585
10586 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
10587             Alan Hayward  <alan.hayward@arm.com>
10588             David Sherwood  <david.sherwood@arm.com>
10589
10590         * internal-fn.c (expand_direct_optab_fn): Don't assign directly
10591         to a SUBREG_PROMOTED_VAR.
10592
10593 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
10594             Alan Hayward  <alan.hayward@arm.com>
10595             David Sherwood  <david.sherwood@arm.com>
10596
10597         * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_PRECISION.
10598         (expand_debug_source_expr): Likewise.
10599         * combine.c (combine_simplify_rtx): Likewise.
10600         * cse.c (fold_rtx): Likewise.
10601         * optabs.c (expand_float): Likewise.
10602         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
10603         (simplify_binary_operation_1): Likewise.
10604
10605 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
10606             Alan Hayward  <alan.hayward@arm.com>
10607             David Sherwood  <david.sherwood@arm.com>
10608
10609         * combine.c (simplify_comparison): Use HWI_COMPUTABLE_MODE_P.
10610         (record_promoted_value): Likewise.
10611         * expr.c (expand_expr_real_2): Likewise.
10612         * ree.c (update_reg_equal_equiv_notes): Likewise.
10613         (combine_set_extension): Likewise.
10614         * rtlanal.c (low_bitmask_len): Likewise.
10615         * simplify-rtx.c (neg_const_int): Likewise.
10616         (simplify_binary_operation_1): Likewise.
10617
10618 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
10619             Alan Hayward  <alan.hayward@arm.com>
10620             David Sherwood  <david.sherwood@arm.com>
10621
10622         * lra-spills.c (assign_mem_slot): Use subreg_size_lowpart_offset.
10623         * regcprop.c (maybe_mode_change): Likewise.
10624         * reload1.c (alter_reg): Likewise.
10625
10626 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
10627
10628         * inchash.h (inchash::hash::add_wide_int): New function.
10629         * lto-streamer-out.c (hash_tree): Use it.
10630
10631 2017-10-22  Richard Sandiford  <richard.sandiford@linaro.org>
10632
10633         * inchash.h (inchash::hash::add_wide_int): Rename to...
10634         (inchash::hash::add_hwi): ...this.
10635         * ipa-devirt.c (hash_odr_vtable): Update accordingly.
10636         (polymorphic_call_target_hasher::hash): Likewise.
10637         * ipa-icf.c (sem_function::get_hash, sem_function::init): Likewise.
10638         (sem_item::add_expr, sem_item::add_type, sem_variable::get_hash)
10639         (sem_item_optimizer::update_hash_by_addr_refs): Likewise.
10640         * lto-streamer-out.c (hash_tree): Likewise.
10641         * optc-save-gen.awk: Likewise.
10642         * tree.c (add_expr): Likewise.
10643
10644 2017-10-22  Uros Bizjak  <ubizjak@gmail.com>
10645
10646         PR target/52451
10647         * config/i386/i386.c (ix86_fp_compare_mode): Return CCFPmode
10648         for ordered inequality comparisons even with TARGET_IEEE_FP.
10649
10650 2017-10-22  Uros Bizjak  <ubizjak@gmail.com>
10651
10652         PR target/82628
10653         * config/i386/i386.md (cmp<dwi>_doubleword): New pattern.
10654         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
10655         Expand with cmp<dwi>_doubleword.
10656
10657 2017-10-21  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
10658
10659         * extend.texi: Add x86 specific to 'nocf_check' attribute.
10660         List CET intrinsics.
10661         * invoke.texi: Add -mcet, -mibt, -mshstk options.  Add x86
10662         specific to -fcf-protection option.
10663
10664 2017-10-21  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
10665
10666         * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET): New.
10667         (OPTION_MASK_ISA_SHSTK_SET): Likewise.
10668         (OPTION_MASK_ISA_IBT_UNSET): Likewise.
10669         (OPTION_MASK_ISA_SHSTK_UNSET): Likewise.
10670         (ix86_handle_option): Add -mibt, -mshstk, -mcet handling.
10671         * config.gcc (extra_headers): Add cetintrin.h for x86 targets.
10672         (extra_objs): Add cet.o for Linux/x86 targets.
10673         (tmake_file): Add i386/t-cet for Linux/x86 targets.
10674         * config/i386/cet.c: New file.
10675         * config/i386/cetintrin.h: Likewise.
10676         * config/i386/t-cet: Likewise.
10677         * config/i386/cpuid.h (bit_SHSTK): New.
10678         (bit_IBT): Likewise.
10679         * config/i386/driver-i386.c (host_detect_local_cpu): Detect and
10680         pass IBT and SHSTK bits.
10681         * config/i386/i386-builtin-types.def
10682         (VOID_FTYPE_UNSIGNED_PVOID): New.
10683         (VOID_FTYPE_UINT64_PVOID): Likewise.
10684         * config/i386/i386-builtin.def: Add CET intrinsics.
10685         * config/i386/i386-c.c (ix86_target_macros_internal): Add
10686         OPTION_MASK_ISA_IBT, OPTION_MASK_ISA_SHSTK handling.
10687         * config/i386/i386-passes.def: Add pass_insert_endbranch pass.
10688         * config/i386/i386-protos.h (make_pass_insert_endbranch): New
10689         prototype.
10690         * config/i386/i386.c (rest_of_insert_endbranch): New.
10691         (pass_data_insert_endbranch): Likewise.
10692         (pass_insert_endbranch): Likewise.
10693         (make_pass_insert_endbranch): Likewise.
10694         (ix86_notrack_prefixed_insn_p): Likewise.
10695         (ix86_target_string): Add -mibt, -mshstk flags.
10696         (ix86_option_override_internal): Add flag_cf_protection
10697         processing.
10698         (ix86_valid_target_attribute_inner_p): Set OPT_mibt, OPT_mshstk.
10699         (ix86_print_operand): Add 'notrack' prefix output.
10700         (ix86_init_mmx_sse_builtins): Add CET intrinsics.
10701         (ix86_expand_builtin): Expand CET intrinsics.
10702         (x86_output_mi_thunk): Add 'endbranch' instruction.
10703         * config/i386/i386.h (TARGET_IBT): New.
10704         (TARGET_IBT_P): Likewise.
10705         (TARGET_SHSTK): Likewise.
10706         (TARGET_SHSTK_P): Likewise.
10707         * config/i386/i386.md (unspecv): Add UNSPECV_NOP_RDSSP,
10708         UNSPECV_INCSSP, UNSPECV_SAVEPREVSSP, UNSPECV_RSTORSSP,
10709         UNSPECV_WRSS, UNSPECV_WRUSS, UNSPECV_SETSSBSY, UNSPECV_CLRSSBSY.
10710         (builtin_setjmp_setup): New pattern.
10711         (builtin_longjmp): Likewise.
10712         (rdssp<mode>): Likewise.
10713         (incssp<mode>): Likewise.
10714         (saveprevssp): Likewise.
10715         (rstorssp): Likewise.
10716         (wrss<mode>): Likewise.
10717         (wruss<mode>): Likewise.
10718         (setssbsy): Likewise.
10719         (clrssbsy): Likewise.
10720         (nop_endbr): Likewise.
10721         * config/i386/i386.opt: Add -mcet, -mibt, -mshstk and -mcet-switch
10722         options.
10723         * config/i386/immintrin.h: Include <cetintrin.h>.
10724         * config/i386/linux-common.h
10725         (file_end_indicate_exec_stack_and_cet): New prototype.
10726         (TARGET_ASM_FILE_END): New.
10727
10728 2017-10-20  Jan Hubicka  <hubicka@ucw.cz>
10729
10730         * i386.c (ix86_builtin_vectorization_cost): Use existing rtx_cost
10731         latencies instead of having separate table; make difference between
10732         integer and float costs.
10733         * i386.h (processor_costs): Remove scalar_stmt_cost,
10734         scalar_load_cost, scalar_store_cost, vec_stmt_cost, vec_to_scalar_cost,
10735         scalar_to_vec_cost, vec_align_load_cost, vec_unalign_load_cost,
10736         vec_store_cost.
10737         * x86-tune-costs.h: Remove entries which has been removed in
10738         procesor_costs from all tables; make cond_taken_branch_cost
10739         and cond_not_taken_branch_cost COST_N_INSNS based.
10740
10741 2017-10-20  Jan Hubicka  <hubicka@ucw.cz>
10742
10743         * x86-tune-costs.h (intel_cost, generic_cost): Fix move costs.
10744
10745 2017-10-20  Jakub Jelinek  <jakub@redhat.com>
10746
10747         * config/i386/i386.md (isa): Remove fma_avx512f.
10748         * config/i386/sse.md (<avx512>_fmadd_<mode>_mask<round_name>,
10749         <avx512>_fmadd_<mode>_mask3<round_name>,
10750         <avx512>_fmsub_<mode>_mask<round_name>,
10751         <avx512>_fmsub_<mode>_mask3<round_name>,
10752         <avx512>_fnmadd_<mode>_mask<round_name>,
10753         <avx512>_fnmadd_<mode>_mask3<round_name>,
10754         <avx512>_fnmsub_<mode>_mask<round_name>,
10755         <avx512>_fnmsub_<mode>_mask3<round_name>,
10756         <avx512>_fmaddsub_<mode>_mask<round_name>,
10757         <avx512>_fmaddsub_<mode>_mask3<round_name>,
10758         <avx512>_fmsubadd_<mode>_mask<round_name>,
10759         <avx512>_fmsubadd_<mode>_mask3<round_name>): Remove isa attribute.
10760         (*vec_widen_umult_even_v16si<mask_name>,
10761         *vec_widen_smult_even_v16si<mask_name>): Likewise.
10762         (<mask_codefor>avx512bw_dbpsadbw<mode><mask_name>): Likewise.
10763
10764 2017-10-20  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
10765
10766         * extend.texi: Add 'nocf_check' documentation.
10767         * gimple.texi: Add second parameter to
10768         gimple_build_call_from_tree.
10769         * invoke.texi: Add -fcf-protection documentation.
10770         * rtl.texi: Add REG_CALL_NOTRACK documenation.
10771
10772 2017-10-20  Richard Biener  <rguenther@suse.de>
10773
10774         PR tree-optimization/82473
10775         * tree-vect-loop.c (vectorizable_reduction): Properly get at
10776         the largest input type.
10777
10778 2017-10-20  Igor Tsimbalist  <igor.v.tsimbalist@intel.com>
10779
10780         * c-attribs.c (handle_nocf_check_attribute): New function.
10781         (c_common_attribute_table): Add 'nocf_check' handling.
10782         * gimple-parser.c: Add second argument NULL to
10783         gimple_build_call_from_tree.
10784         * attrib.c (comp_type_attributes): Check nocf_check attribute.
10785         * cfgexpand.c (expand_call_stmt): Set REG_CALL_NOCF_CHECK for
10786         call insn.
10787         * combine.c (distribute_notes): Add REG_CALL_NOCF_CHECK handling.
10788         * common.opt: Add fcf-protection flag.
10789         * emit-rtl.c (try_split): Add REG_CALL_NOCF_CHECK handling.
10790         * flag-types.h: Add enum cf_protection_level.
10791         * gimple.c (gimple_build_call_from_tree): Add second parameter.
10792         Add 'nocf_check' attribute propagation to gimple call.
10793         * gimple.h (gf_mask): Add GF_CALL_NOCF_CHECK.
10794         (gimple_build_call_from_tree): Update prototype.
10795         (gimple_call_nocf_check_p): New function.
10796         (gimple_call_set_nocf_check): Likewise.
10797         * gimplify.c: Add second argument to gimple_build_call_from_tree.
10798         * ipa-icf.c: Add nocf_check attribute in statement hash.
10799         * recog.c (peep2_attempt): Add REG_CALL_NOCF_CHECK handling.
10800         * reg-notes.def: Add REG_NOTE (CALL_NOCF_CHECK).
10801         * toplev.c (process_options): Add flag_cf_protection handling.
10802
10803 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
10804
10805         * x86-tune-costs.h (core_cost): Fix div, move and sqrt latencies.
10806
10807 2017-10-20  Richard Biener  <rguenther@suse.de>
10808
10809         PR tree-optimization/82603
10810         * tree-if-conv.c (predicate_mem_writes): Make sure to only
10811         remove false predicated stores.
10812
10813 2017-10-20  Richard Biener  <rguenther@suse.de>
10814
10815         * graphite-isl-ast-to-gimple.c
10816         (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block):
10817         Remove return value and simplify, dump copied stmt after lhs
10818         adjustment.
10819         (translate_isl_ast_to_gimple::translate_isl_ast_node_user):
10820         Reduce dump verbosity.
10821         (gsi_insert_earliest): Likewise.
10822         (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Adjust.
10823         * graphite.c (print_global_statistics): Adjust dumping.
10824         (print_graphite_scop_statistics): Likewise.
10825         (print_graphite_statistics): Do not dump loops here.
10826         (graphite_transform_loops): But here.
10827
10828 2017-10-20  Nicolas Roche  <roche@adacore.com>
10829
10830         * configure.ac (ACX_PROG_GNAT): Append "libgnat" to include search dir.
10831         * configure: Regenerate.
10832
10833 2017-10-20  Jakub Jelinek  <jakub@redhat.com>
10834
10835         PR target/82158
10836         * tree-cfg.c (pass_warn_function_return::execute): In noreturn
10837         functions when optimizing replace GIMPLE_RETURN stmts with
10838         calls to __builtin_unreachable ().
10839
10840         PR sanitizer/82595
10841         * config/gnu-user.h (LIBTSAN_EARLY_SPEC): Add libtsan_preinit.o
10842         for -fsanitize=thread link of executables.
10843         (LIBLSAN_EARLY_SPEC): Add liblsan_preinit.o for -fsanitize=leak
10844         link of executables.
10845
10846         PR target/82370
10847         * config/i386/sse.md (VI248_AVX2, VI248_AVX512BW, VI248_AVX512BW_2):
10848         New mode iterators.
10849         (<shift_insn><mode>3<mask_name>): Change the last of the 3
10850         define_insns for logical vector shifts to use VI248_AVX512BW
10851         iterator instead of VI48_AVX512, remove <mask_mode512bit_condition>
10852         condition, useless isa and prefix attributes.  Change the first
10853         2 of these define_insns to ...
10854         (<mask_codefor><shift_insn><mode>3<mask_name>): ... this, new
10855         define_insn for avx512vl.
10856         (<shift_insn><mode>3): ... and this, new define_insn without
10857         masking for non-avx512vl.
10858
10859         PR target/82370
10860         * config/i386/sse.md (*andnot<mode>3,
10861         <mask_codefor><code><mode>3<mask_name>, *<code><mode>3): Split
10862         (=v,v,vm) alternative into (=x,x,xm) and (=v,v,vm), for 128-bit
10863         and 256-bit vectors, the (=x,x,xm) alternative and when mask is
10864         not applied use empty suffix even for TARGET_AVX512VL.
10865         * config/i386/subst.md (mask_prefix3, mask_prefix4): When mask
10866         is applied, supply evex,evex or evex,evex,evex instead of just
10867         evex.
10868
10869 2017-10-20  Julia Koval  <julia.koval@intel.com>
10870
10871         * common/config/i386/i386-common.c (OPTION_MASK_ISA_GFNI_SET,
10872         (OPTION_MASK_ISA_GFNI_UNSET): New.
10873         (ix86_handle_option): Handle OPT_mgfni.
10874         * config/i386/cpuid.h (bit_GFNI): New.
10875         * config/i386/driver-i386.c (host_detect_local_cpu): Detect gfni.
10876         * config/i386/i386-c.c (ix86_target_macros_internal): Define __GFNI__.
10877         * config/i386/i386.c (ix86_target_string): Add -mgfni.
10878         (ix86_valid_target_attribute_inner_p): Add OPT_mgfni.
10879         * config/i386/i386.h (TARGET_GFNI, TARGET_GFNI_P): New.
10880         * config/i386/i386.opt: Add mgfni.
10881
10882 2017-10-20  Orlando Arias  <oarias@knights.ucf.edu>
10883
10884         * config/msp430/msp430.c (msp430_option_override): Disable
10885         -fdelete-null-pointer-checks.
10886         * doc/invoke.text (-fdelete-null-pointer-checks): Document that.
10887
10888 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
10889
10890         * x86-tune-costs.h (generic_cost, core_cost): Correct costs
10891         of x87 and SSE instructions.
10892
10893 2017-10-19  Jan Hubicka  <hubicka@ucw.cz>
10894
10895         * asan.c (create_cond_insert_point): Do not update edge count.
10896         * auto-profile.c (afdo_propagate_edge): Update for edge count removal.
10897         (afdo_propagate_circuit): Likewise.
10898         (afdo_calculate_branch_prob): Likewise.
10899         (afdo_annotate_cfg): Likewise.
10900         * basic-block.h (struct edge_def): Remove count.
10901         (edge_def::count): New accessor.
10902         * bb-reorder.c (rotate_loop): Update.
10903         (find_traces_1_round): Update.
10904         (connect_traces): Update.
10905         (sanitize_hot_paths): Update.
10906         * cfg.c (unchecked_make_edge): Update.
10907         (make_single_succ_edge): Update.
10908         (check_bb_profile): Update.
10909         (dump_edge_info): Update.
10910         (update_bb_profile_for_threading): Update.
10911         (scale_bbs_frequencies_int): Update.
10912         (scale_bbs_frequencies_gcov_type): Update.
10913         (scale_bbs_frequencies_profile_count): Update.
10914         (scale_bbs_frequencies): Update.
10915         * cfganal.c (connect_infinite_loops_to_exit): Update.
10916         * cfgbuild.c (compute_outgoing_frequencies): Update.
10917         (find_many_sub_basic_blocks): Update.
10918         * cfgcleanup.c (try_forward_edges): Update.
10919         (try_crossjump_to_edge): Update
10920         * cfgexpand.c (expand_gimple_cond): Update
10921         (expand_gimple_tailcall): Update
10922         (construct_exit_block): Update
10923         * cfghooks.c (verify_flow_info): Update
10924         (redirect_edge_succ_nodup): Update
10925         (split_edge): Update
10926         (make_forwarder_block): Update
10927         (duplicate_block): Update
10928         (account_profile_record): Update
10929         * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
10930         * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
10931         * cfgloopmanip.c (scale_loop_profile): Update.
10932         (loopify): Update.
10933         (lv_adjust_loop_entry_edge): Update.
10934         * cfgrtl.c (try_redirect_by_replacing_jump): Update.
10935         (force_nonfallthru_and_redirect): Update.
10936         (purge_dead_edges): Update.
10937         (rtl_flow_call_edges_add): Update.
10938         * cgraphunit.c (init_lowered_empty_function): Update.
10939         (cgraph_node::expand_thunk): Update.
10940         * gimple-pretty-print.c (dump_probability): Update.
10941         (dump_edge_probability): Update.
10942         * gimple-ssa-isolate-paths.c (isolate_path): Update.
10943         * haifa-sched.c (sched_create_recovery_edges): Update.
10944         * hsa-gen.c (convert_switch_statements): Update.
10945         * ifcvt.c (dead_or_predicable): Update.
10946         * ipa-inline-transform.c (inline_transform): Update.
10947         * ipa-split.c (split_function): Update.
10948         * ipa-utils.c (ipa_merge_profiles): Update.
10949         * loop-doloop.c (add_test): Update.
10950         * loop-unroll.c (unroll_loop_runtime_iterations): Update.
10951         * lto-streamer-in.c (input_cfg): Update.
10952         (input_function): Update.
10953         * lto-streamer-out.c (output_cfg): Update.
10954         * modulo-sched.c (sms_schedule): Update.
10955         * postreload-gcse.c (eliminate_partially_redundant_load): Update.
10956         * predict.c (maybe_hot_edge_p): Update.
10957         (unlikely_executed_edge_p): Update.
10958         (probably_never_executed_edge_p): Update.
10959         (dump_prediction): Update.
10960         (drop_profile): Update.
10961         (propagate_unlikely_bbs_forward): Update.
10962         (determine_unlikely_bbs): Update.
10963         (force_edge_cold): Update.
10964         * profile.c (compute_branch_probabilities): Update.
10965         * reg-stack.c (better_edge): Update.
10966         * shrink-wrap.c (handle_simple_exit): Update.
10967         * tracer.c (better_p): Update.
10968         * trans-mem.c (expand_transaction): Update.
10969         (split_bb_make_tm_edge): Update.
10970         * tree-call-cdce.c: Update.
10971         * tree-cfg.c (gimple_find_sub_bbs): Update.
10972         (gimple_split_edge): Update.
10973         (gimple_duplicate_sese_region): Update.
10974         (gimple_duplicate_sese_tail): Update.
10975         (gimple_flow_call_edges_add): Update.
10976         (insert_cond_bb): Update.
10977         (execute_fixup_cfg): Update.
10978         * tree-cfgcleanup.c (cleanup_control_expr_graph): Update.
10979         * tree-complex.c (expand_complex_div_wide): Update.
10980         * tree-eh.c (lower_resx): Update.
10981         (unsplit_eh): Update.
10982         (cleanup_empty_eh_move_lp): Update.
10983         * tree-inline.c (copy_edges_for_bb): Update.
10984         (freqs_to_counts): Update.
10985         (copy_cfg_body): Update.
10986         * tree-ssa-dce.c (remove_dead_stmt): Update.
10987         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
10988         * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
10989         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
10990         (unloop_loops): Update.
10991         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
10992         * tree-ssa-loop-split.c (connect_loops): Update.
10993         (split_loop): Update.
10994         * tree-ssa-loop-unswitch.c (hoist_guard): Update.
10995         * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
10996         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
10997         * tree-ssa-reassoc.c (branch_fixup): Update.
10998         * tree-ssa-tail-merge.c (replace_block_by): Update.
10999         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
11000         (compute_path_counts): Update.
11001         (update_profile): Update.
11002         (recompute_probabilities): Update.
11003         (update_joiner_offpath_counts): Update.
11004         (estimated_freqs_path): Update.
11005         (freqs_to_counts_path): Update.
11006         (clear_counts_path): Update.
11007         (ssa_fix_duplicate_block_edges): Update.
11008         (duplicate_thread_path): Update.
11009         * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
11010         (case_bit_test_cmp): Update.
11011         (collect_switch_conv_info): Update.
11012         (gen_inbound_check): Update.
11013         (do_jump_if_equal): Update.
11014         (emit_cmp_and_jump_insns): Update.
11015         * tree-tailcall.c (decrease_profile): Update.
11016         (eliminate_tail_call): Update.
11017         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
11018         (vect_do_peeling): Update.
11019         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
11020         * ubsan.c (ubsan_expand_null_ifn): Update.
11021         (ubsan_expand_ptr_ifn): Update.
11022         * value-prof.c (gimple_divmod_fixed_value): Update.
11023         (gimple_mod_pow2): Update.
11024         (gimple_mod_subtract): Update.
11025         (gimple_ic): Update.
11026         (gimple_stringop_fixed_value): Update.
11027
11028 2017-10-19  Uros Bizjak  <ubizjak@gmail.com>
11029
11030         PR target/82618
11031         * config/i386/i386.md (sub to cmp): New peephole2 pattern.
11032
11033 2017-10-19  Alexander Monakov  <amonakov@ispras.ru>
11034
11035         PR rtl-optimization/82395
11036         * ira-color.c (allocno_priority_compare_func): Fix comparison step
11037         based on non_spilled_static_chain_regno_p.
11038
11039 2017-10-19  Uros Bizjak  <ubizjak@gmail.com>
11040
11041         * config/i386/i386.c (output_387_binary_op): Rewrite SSE part.
11042         (ix86_emit_mode_set): Rewrite insn mnemonic construction.
11043         (ix86_prepare_fp_compare_args): Redefine is_sse as bool.
11044
11045 2017-10-19  Martin Sebor  <msebor@redhat.com>
11046
11047         PR tree-optimization/82596
11048         * tree.c (array_at_struct_end_p): Handle STRING_CST.
11049
11050 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
11051
11052         * asan.c (handle_builtin_alloca): Deal with all alloca variants.
11053         (get_mem_refs_of_builtin_call): Likewise.
11054         * builtins.c (expand_builtin_apply): Adjust call to
11055         allocate_dynamic_stack_space.
11056         (expand_builtin_alloca): For __builtin_alloca_with_align_and_max, pass
11057         the third argument to allocate_dynamic_stack_space, otherwise -1.
11058         (expand_builtin): Deal with all alloca variants.
11059         (is_inexpensive_builtin): Likewise.
11060         * builtins.def (BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX): New.
11061         * calls.c (special_function_p): Deal with all alloca variants.
11062         (initialize_argument_information): Adjust call to
11063         allocate_dynamic_stack_space.
11064         (expand_call): Likewise.
11065         * cfgexpand.c (expand_call_stmt): Deal with all alloca variants.
11066         * doc/extend.texi (Built-ins): Add __builtin_alloca_with_align_and_max
11067         * explow.c (allocate_dynamic_stack_space): Add MAX_SIZE parameter and
11068         use it for the stack usage computation.
11069         * explow.h (allocate_dynamic_stack_space): Adjust prototype.
11070         * function.c (gimplify_parameters): Call build_alloca_call_expr.
11071         * gimple-ssa-warn-alloca.c (alloca_call_type): Simplify control flow.
11072         Take into account 3rd argument of __builtin_alloca_with_align_and_max.
11073         (in_loop_p): Remove first argument and useless check.
11074         (pass_walloca::execute): Remove useless test and adjust call to above.
11075         * gimple.c (gimple_build_call_from_tree): Deal with all alloc variants
11076         * gimplify.c (gimplify_vla_decl): Call build_alloca_call_expr.
11077         (gimplify_call_expr): Deal with all alloca variants.
11078         * hsa-gen.c (gen_hsa_alloca): Likewise.
11079         (gen_hsa_insns_for_call): Likewise.
11080         * ipa-pure-const.c (special_builtin_state): Likewise.
11081         * tree-chkp.c (chkp_build_returned_bound): Likewise.
11082         * tree-object-size.c (alloc_object_size): Likewise.
11083         * tree-ssa-alias.c (ref_maybe_used_by_call_p_1): Likewise.
11084         (call_may_clobber_ref_p_1): Likewise.
11085         * tree-ssa-ccp.c (evaluate_stmt): Likewise.
11086         (ccp_fold_stmt): Likewise.
11087         (optimize_stack_restore): Likewise.
11088         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise.
11089         (mark_all_reaching_defs_necessary_1): Likewise.
11090         (propagate_necessity): Likewise.
11091         (eliminate_unnecessary_stmts): Likewise.
11092         * tree.c (build_common_builtin_nodes): Build
11093         BUILT_IN_ALLOCA_WITH_ALIGN_AND_MAX.
11094         (build_alloca_call_expr): New function.
11095         * tree.h (ALLOCA_FUNCTION_CODE_P): New macro.
11096         (CASE_BUILT_IN_ALLOCA): Likewise.
11097         (build_alloca_call_expr): Declare.
11098         * varasm.c (incorporeal_function_p): Deal with all alloca variants.
11099
11100 2017-10-19  Eric Botcazou  <ebotcazou@adacore.com>
11101
11102         PR debug/82509
11103         * dwarf2out.c (new_die_raw): New static inline function.
11104         (new_die): Use it to create the DIE.
11105         (add_AT_external_die_ref): Likewise.
11106         (clone_die): Likewise.
11107         (clone_as_declaration): Likewise.
11108         (dwarf2out_vms_debug_main_pointer): Likewise.
11109         (base_type_die): Likewise.  Remove early return for corner cases.
11110         Do not call add_pubtype on the DIE here.
11111         (is_base_type): Remove ERROR_MARK and return 0 for VOID_TYPE.
11112         (modified_type_die): Adjust the lookup for reverse order DIEs.  Skip
11113         typedefs for base types with DW_AT_endianity.  Make sure a DIE with
11114         native order exists for base types, attach the DIE manually and call
11115         add_pubtype on it.  Do not equate a reverse order DIE to the type.
11116
11117 2017-10-19  Richard Earnshaw  <rearnsha@arm.com>
11118
11119         * config/arm/arm.c (align_ok_ldrd_strd): New function.
11120         (mem_ok_for_ldrd_strd): New parameter align.  Extract the alignment of
11121         the mem into it.
11122         (gen_operands_ldrd_strd): Validate the alignment of the accesses.
11123
11124 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
11125
11126         * flag-types.h (enum sanitize_code): Add SANITIZE_BUILTIN.  Or
11127         SANITIZE_BUILTIN into SANITIZE_UNDEFINED.
11128         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN,
11129         BUILT_IN_UBSAN_HANDLE_INVALID_BUILTIN_ABORT): New builtins.
11130         * opts.c (sanitizer_opts): Add builtin.
11131         * ubsan.c (instrument_builtin): New function.
11132         (pass_ubsan::execute): Call it.
11133         (pass_ubsan::gate): Enable even for SANITIZE_BUILTIN.
11134         * doc/invoke.texi: Document -fsanitize=builtin.
11135
11136         * ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
11137         builtins, store max (log2 (align), 0) into uchar field instead of
11138         align into uptr field.
11139         (ubsan_expand_objsize_ifn): Use _v1 suffixed type mismatch builtins,
11140         store uchar 0 field instead of uptr 0 field.
11141         (instrument_nonnull_return): Use _v1 suffixed nonnull return builtin,
11142         instead of passing one address of struct with 2 locations pass
11143         two addresses of structs with 1 location each.
11144         * sanitizer.def (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH,
11145         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_ABORT,
11146         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN,
11147         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_ABORT): Removed.
11148         (BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1,
11149         BUILT_IN_UBSAN_HANDLE_TYPE_MISMATCH_V1_ABORT,
11150         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1,
11151         BUILT_IN_UBSAN_HANDLE_NONNULL_RETURN_V1_ABORT): New builtins.
11152
11153 2017-10-19  Martin Liska  <mliska@suse.cz>
11154
11155         PR driver/81829
11156         * file-find.c (remove_prefix): Remove.
11157         * file-find.h (remove_prefix): Likewise.
11158         * gcc-ar.c: Remove smartness of lookup.
11159
11160 2017-10-19  Segher Boessenkool  <segher@kernel.crashing.org>
11161
11162         * config/rs6000/rs6000.md (*call_indirect_aix<mode>,
11163         *call_value_indirect_aix<mode>, *call_indirect_elfv2<mode>,
11164         *call_value_indirect_elfv2<mode>): Add correct mode to the unspec.
11165
11166 2017-10-19  Jakub Jelinek  <jakub@redhat.com>
11167
11168         PR target/82580
11169         * config/i386/i386.md (setcc + movzbl to xor + setcc): New peephole2.
11170         (setcc + and to xor + setcc): New peephole2.
11171
11172 2017-10-19  Tom de Vries  <tom@codesourcery.com>
11173
11174         * doc/sourcebuild.texi (Test Directives, Variants of
11175         dg-require-support): Add dg-require-stack-size.
11176
11177 2017-10-19  Martin Liska  <mliska@suse.cz>
11178
11179         PR sanitizer/82517
11180         * gimplify.c (gimplify_decl_expr): Do not instrument variables
11181         that have a large alignment.
11182         (gimplify_target_expr): Likewise.
11183
11184 2017-10-18  Segher Boessenkool  <segher@kernel.crashing.org>
11185
11186         PR rtl-optimization/82602
11187         * ira.c (rtx_moveable_p): Return false for volatile asm.
11188
11189 2017-10-18  Uros Bizjak  <ubizjak@gmail.com>
11190
11191         PR target/82580
11192         * config/i386/i386-modes.def (CCGZ): New CC mode.
11193         * config/i386/i386.md (sub<mode>3_carry_ccgz): New insn pattern.
11194         * config/i386/predicates.md (ix86_comparison_operator):
11195         Handle CCGZmode.
11196         * config/i386/i386.c (ix86_expand_branch) <case E_TImode>:
11197         Emulate LE, LEU, GT, GTU, LT, LTU, GE and GEU double-word comparisons
11198         with double-word subtraction.
11199         (put_condition_code): Handle CCGZmode.
11200
11201 2017-10-18  Aldy Hernandez  <aldyh@redhat.com>
11202
11203         * wide-int.cc (debug (const wide_int &)): New.
11204         (debug (const wide_int *)): New.
11205         (debug (const widest_int &)): New.
11206         (debug (const widest_int *)): New.
11207
11208 2017-10-18  Vladimir Makarov  <vmakarov@redhat.com>
11209
11210         PR middle-end/82556
11211         * lra-constraints.c (curr_insn_transform): Use non-input operand
11212         instead of output one for matched reload.
11213
11214 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
11215
11216         * tree-loop-distribution.c (INCLUDE_ALGORITHM): New header file.
11217         (tree-ssa-loop-ivopts.h): New header file.
11218         (struct builtin_info): New fields.
11219         (classify_builtin_1): Compute and record base and offset parts for
11220         memset builtin partition by calling strip_offset.
11221         (offset_cmp, fuse_memset_builtins): New functions.
11222         (finalize_partitions): Fuse adjacent memset partitions by calling
11223         above function.
11224         * tree-ssa-loop-ivopts.c (strip_offset): Delete static declaration.
11225         Expose the interface.
11226         * tree-ssa-loop-ivopts.h (strip_offset): New declaration.
11227
11228 2017-10-18  Bin Cheng  <bin.cheng@arm.com>
11229
11230         PR tree-optimization/82574
11231         * tree-loop-distribution.c (find_single_drs): New parameter.  Check
11232         that data reference must be executed exactly once per iteration
11233         against the outermost loop in nest.
11234         (classify_partition): Update call to above function.
11235
11236 2017-10-18  Richard Biener  <rguenther@suse.de>
11237
11238         PR tree-optimization/82591
11239         * graphite.c (graphite_transform_loops): Move code gen message
11240         printing ...
11241         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
11242         Here.  Handle scop_to_isl_ast failing.
11243         (scop_to_isl_ast): Limit the number of ISL operations.
11244
11245 2017-10-18  Richard Biener  <rguenther@suse.de>
11246
11247         * graphite-isl-ast-to-gimple.c
11248         (translate_isl_ast_to_gimple::set_rename): Simplify.
11249         (translate_isl_ast_to_gimple::set_rename_for_each_def): Inline...
11250         (graphite_copy_stmts_from_block): ... here.
11251         (copy_bb_and_scalar_dependences): Simplify.
11252         (add_parameters_to_ivs_params): Canonicalize.
11253         (generate_entry_out_of_ssa_copies): Simplify.
11254         * graphite-sese-to-poly.c (extract_affine_name): Simplify
11255         by passing in ISL dimension.
11256         (parameter_index_in_region_1): Rename to ...
11257         (parameter_index_in_region): ... this.
11258         (extract_affine): Adjust assert, pass down parameter index.
11259         (add_param_constraints): Use range-info when available.
11260         (build_scop_context): Adjust.
11261         * sese.c (new_sese_info): Adjust.
11262         (free_sese_info): Likewise.
11263         * sese.h (bb_map_t, rename_map_t, phi_rename, init_back_edge_pair_t):
11264         Remove unused typedefs.
11265         (struct sese_info_t): Simplify rename_map, remove incomplete_phis.
11266
11267 2017-10-18  Martin Liska  <mliska@suse.cz>
11268
11269         * combine.c (simplify_compare_const): Add gcc_fallthrough.
11270
11271 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
11272
11273         * config/s390/s390.c (s390_bb_fallthru_entry_likely): New function.
11274         (s390_sched_init): Do not reset s390_sched_state if we entered the
11275         current basic block via a fallthru edge and all others are unlikely.
11276
11277 2017-10-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
11278
11279         * config/s390/s390.c (NUM_SIDES): New variable.
11280         (LONGRUNNING_THRESHOLD): New variable.
11281         (LATENCY_FACTOR): New variable.
11282         (s390_sched_score): Decrease score for long-running instructions on
11283         wrong side.
11284         (s390_sched_variable_issue): Perform bookkeeping for long-running
11285         instructions.
11286
11287 2017-10-18  Richard Biener  <rguenther@suse.de>
11288
11289         * graphite-isl-ast-to-gimple.c (gcc_expression_from_isl_ast_expr_id):
11290         Simplify with removal of the parameter rename map.
11291         (set_rename): Likewise.
11292         (should_copy_to_new_region): Likewise.
11293         (graphite_copy_stmts_from_block): Likewise.
11294         (copy_bb_and_scalar_dependences): Remove initialization of
11295         unused copied_bb_map.
11296         (copy_def): Remove.
11297         (copy_internal_parameters): Likewise.
11298         (graphite_regenerate_ast_isl): Do not call copy_internal_parameters.
11299         * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
11300         Use INTEGRAL_TYPE_P.
11301         (parameter_index_in_region_1): Rename to ...
11302         (assign_parameter_index_in_region): ... this.  Assert we have
11303         a parameter we handle.
11304         (scan_tree_for_params): Adjust.
11305         * sese.h (parameter_rename_map_t): Remove.
11306         (struct sese_info_t): Remove unused parameter_rename_map and
11307         copied_bb_map members.
11308         * sese.c (new_sese_info): Adjust.
11309         (free_sese_info): Likewise.
11310
11311 2017-10-18  Martin Liska  <mliska@suse.cz>
11312
11313         PR sanitizer/82545
11314         * asan.c (asan_expand_poison_ifn): Do not put gimple stmt
11315         on an abnormal edge.
11316
11317 2017-10-18  Sebastian Huber  <sebastian.huber@embedded-brains.de>
11318
11319         * doc/invoke.texi (ffunction-sections and fdata-sections):
11320         Update.
11321
11322 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
11323
11324         * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Bail out only if
11325         the use statement can throw internally.
11326
11327 2017-10-17  Eric Botcazou  <ebotcazou@adacore.com>
11328
11329         * config/visium/visium.c (visium_select_cc_mode): Return CCmode for
11330         any RTX present on the RHS of a SET.
11331         * compare-elim.c (try_eliminate_compare): Restore comment.
11332
11333 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
11334
11335         * langhooks.h (struct lang_hooks): Document that tree_size langhook
11336         may be also called on tcc_type nodes.
11337         * langhooks.c (lhd_tree_size): Likewise.
11338
11339 2017-10-17  David Malcolm  <dmalcolm@redhat.com>
11340
11341         * gimple-ssa-sprintf.c (fmtwarn): Update for changed signature of
11342         format_warning_at_substring.
11343         (maybe_warn): Convert source_range * param to a location_t.  Pass
11344         UNKNOWN_LOCATION rather than NULL to fmtwarn.
11345         (format_directive): Remove code to extract source_ranges and
11346         source_range * in favor of just a location_t.
11347         (parse_directive): Pass UNKNOWN_LOCATION rather than NULL to
11348         fmtwarn.
11349         * substring-locations.c (format_warning_va): Convert
11350         source_range * param to a location_t.
11351         (format_warning_at_substring): Likewise.
11352         * substring-locations.h (format_warning_va): Likewise.
11353         (format_warning_at_substring): Likewise.
11354
11355 2017-10-17  Jan Hubicka  <hubicka@ucw.cz>
11356
11357         * target.h (enum vect_cost_for_stmt): Add vec_gather_load and
11358         vec_scatter_store
11359         * tree-vect-stmts.c (record_stmt_cost): Make difference between normal
11360         and scatter/gather ops.
11361
11362         * aarch64/aarch64.c (aarch64_builtin_vectorization_cost): Add
11363         vec_gather_load and vec_scatter_store.
11364         * arm/arm.c (arm_builtin_vectorization_cost): Likewise.
11365         * powerpcspe/powerpcspe.c (rs6000_builtin_vectorization_cost): Likewise.
11366         * rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Likewise.
11367         * s390/s390.c (s390_builtin_vectorization_cost): Likewise.
11368         * spu/spu.c (spu_builtin_vectorization_cost): Likewise.
11369         * i386/i386.c (x86_builtin_vectorization_cost): Likewise.
11370
11371 2017-10-17  Uros Bizjak  <ubizjak@gmail.com>
11372
11373         * reg-stack.c (compare_for_stack_reg): Add bool argument.
11374         Detect FTST instruction and handle its register pops.  Only pop
11375         second operand if can_pop_second_op is true.
11376         (subst_stack_regs_pat) <case COMPARE>: Detect FCOMI instruction to
11377         set can_pop_second_op to false in the compare_for_stack_reg call.
11378
11379         * config/i386/i386.md (*cmpi<FPCMP:unord><MODEF:mode>): Only call
11380         output_fp_compare for stack register operands.
11381         * config/i386/i386.c (output_fp_compare): Do not output SSE compare
11382         instructions here.  Do not emit stack register pops here.  Assert
11383         that FCOMPP pops next to top stack register.  Rewrite function.
11384
11385 2017-10-17  Nathan Sidwell  <nathan@acm.org>
11386
11387         PR middle-end/82577
11388         * alias.c (compare_base_decls): Check HAS_DECL_ASSEMBLER_NAME_P,
11389         use DECL_ASSEMBLER_NAME_RAW.
11390
11391         PR middle-end/82546
11392         * tree.c (tree_code_size): Reformat.  Punt to lang hook for unknown
11393         TYPE nodes.
11394
11395 2017-10-17  Qing Zhao <qing.zhao@oracle.com>
11396             Wilco Dijkstra <wilco.dijkstra@arm.com>
11397
11398         * builtins.c (expand_builtin_update_setjmp_buf): Add a
11399         converstion to Pmode from the buf_addr.
11400
11401 2017-10-17  Richard Biener  <rguenther@suse.de>
11402
11403         * graphite-dependences.c (scop_get_reads_and_writes): Change
11404         output parameters to references.
11405
11406 2017-10-17  Jackson Woodruff  <jackson.woodruff@arm.com>
11407
11408         PR 71026/tree-optimization
11409         * fold-const.c (distribute_real_division): Removed.
11410         (fold_binary_loc): Remove calls to distribute_real_divison.
11411
11412 2017-10-17  Richard Biener  <rguenther@suse.de>
11413
11414         * graphite-scop-detection.c
11415         (scop_detection::stmt_has_simple_data_refs_p): Always use
11416         the full nest as region.
11417         (try_generate_gimple_bb): Likewise.
11418         * sese.c (scalar_evolution_in_region): Simplify now that
11419         SCEV can handle instantiation in regions.
11420         * tree-scalar-evolution.c (instantiate_scev_name): Also instantiate
11421         in the non-loop part of a function if requested.
11422
11423 2017-10-17  Richard Biener  <rguenther@suse.de>
11424
11425         PR tree-optimization/82563
11426         * graphite-isl-ast-to-gimple.c (generate_entry_out_of_ssa_copies):
11427         New function.
11428         (graphite_regenerate_ast_isl): Call it.
11429         * graphite-scop-detection.c (build_scops): Remove entry edge split.
11430
11431 2017-10-17  Jakub Jelinek  <jakub@redhat.com>
11432
11433         PR tree-optimization/82549
11434         * fold-const.c (optimize_bit_field_compare, fold_truth_andor_1):
11435         Formatting fixes.  Instead of calling make_bit_field_ref with negative
11436         bitpos return 0.
11437
11438 2017-10-17  Olga Makhotina  <olga.makhotina@intel.com>
11439
11440         * config/i386/avx512dqintrin.h (_mm_mask_reduce_sd,
11441         _mm_maskz_reduce_sd, _mm_mask_reduce_ss,=20
11442         _mm_maskz_reduce_ss): New.
11443         * config/i386/i386-builtin.def (__builtin_ia32_reducesd_mask,
11444         __builtin_ia32_reducess_mask): Ditto..
11445         (__builtin_ia32_reducesd, __builtin_ia32_reducess): Remove.
11446         * config/i386/sse.md (reduces<mode>): Renamed to ...
11447         (reduces<mode><mask_scalar_name>): ... this.
11448         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0|%0, %1, %2, %3}):
11449         Changed to ...
11450         (vreduce<ssescalarmodesuffix>\t{%3, %2, %1, %0<mask_scalar_operand4>|
11451         %0<mask_scalar_operand4>, %1, %2, %3}): ... this.
11452
11453 2017-10-16  David Malcolm  <dmalcolm@redhat.com>
11454
11455         * Makefile.in (OBJS): Add unique-ptr-tests.o.
11456         * selftest-run-tests.c (selftest::run_tests): Call
11457         selftest::unique_ptr_tests_cc_tests.
11458         * selftest.h (selftest::unique_ptr_tests_cc_tests): New decl.
11459         * unique-ptr-tests.cc: New file.
11460
11461 2017-10-16  Vladimir Makarov  <vmakarov@redhat.com>
11462
11463         PR sanitizer/82353
11464         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
11465         locations.
11466         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
11467         (make_hard_regno_born, make_hard_regno_dead): Update
11468         bb_killed_pseudos and bb_gen_pseudos for fixed regs.
11469
11470 2017-10-16  Jeff Law  <law@redhat.com>
11471
11472         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
11473
11474 2017-10-16  Jan Hubicka  <hubicka@ucw.cz>
11475
11476         * x86-tune-costs.h (znver1_cost): Fix move cost tables.
11477
11478 2017-10-16  Olivier Hainque  <hainque@adacore.com>
11479
11480         * gcc/config.gcc (powerpc*-*-*spe*): Pick 8548 as the default
11481         with_cpu if we were configured for an e500v2 target cpu name.
11482
11483 2017-10-16  Thomas Preud'homme  <thomas.preudhomme@arm.com>
11484
11485         * config/arm/arm-cpus.in (cortex-m33): Add nodsp option.
11486         * doc/invoke.texi: Document +nodsp as a valid extension for
11487         -mcpu=cortex-m33.
11488
11489 2017-10-16  Martin Liska  <mliska@suse.cz>
11490
11491         * sbitmap.c (bitmap_bit_in_range_p_checking): New function.
11492         (test_set_range): Likewise.
11493         (test_range_functions): Rename to ...
11494         (test_bit_in_range): ... this.
11495         (sbitmap_c_tests): Add new test.
11496
11497 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
11498
11499         * config/aarch64/arm_neon.h (vdot_u32, vdotq_u32, vdot_s32, vdotq_s32):
11500         New.
11501         (vdot_lane_u32, vdot_laneq_u32, vdotq_lane_u32, vdotq_laneq_u32): New.
11502         (vdot_lane_s32, vdot_laneq_s32, vdotq_lane_s32, vdotq_laneq_s32): New.
11503
11504 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
11505
11506         * config/aarch64/aarch64-builtins.c
11507         (aarch64_types_quadopu_lane_qualifiers): New.
11508         (TYPES_QUADOPU_LANE): New.
11509         * config/aarch64/aarch64-simd.md (aarch64_<sur>dot<vsi2qi>): New.
11510         (<sur>dot_prod<vsi2qi>, aarch64_<sur>dot_lane<vsi2qi>): New.
11511         (aarch64_<sur>dot_laneq<vsi2qi>): New.
11512         * config/aarch64/aarch64-simd-builtins.def (sdot, udot): New.
11513         (sdot_lane, udot_lane, sdot_laneq, udot_laneq): New.
11514         * config/aarch64/iterators.md (sur): Add UNSPEC_SDOT, UNSPEC_UDOT.
11515         (Vdottype, DOTPROD): New.
11516         (sur): Add SDOT and UDOT.
11517
11518 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
11519
11520         * config/aarch64/aarch64.h (AARCH64_FL_DOTPROD): New.
11521         (AARCH64_ISA_DOTPROD, TARGET_DOTPROD): New.
11522         * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
11523         Add TARGET_DOTPROD.
11524         * config/aarch64/aarch64-option-extensions.def (dotprod): New.
11525         * config/aarch64/aarch64-cores.def (cortex-a55, cortex-a75):
11526         Enable TARGET_DOTPROD.
11527         (cortex-a75.cortex-a55): Likewise.
11528         * doc/invoke.texi (aarch64-feature-modifiers): Document dotprod.
11529
11530 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
11531
11532         * config/arm/arm-builtins.c (arm_unsigned_uternop_qualifiers): New.
11533         (UTERNOP_QUALIFIERS, arm_umac_lane_qualifiers, UMAC_LANE_QUALIFIERS):
11534         New.
11535         * config/arm/arm_neon_builtins.def (sdot, udot, sdot_lane, udot_lane):
11536         New.
11537         * config/arm/iterators.md (DOTPROD, VSI2QI, vsi2qi): New.
11538         (UNSPEC_DOT_S, UNSPEC_DOT_U, opsuffix): New.
11539         * config/arm/neon.md (neon_<sup>dot<vsi2qi>): New.
11540         (neon_<sup>dot_lane<vsi2qi>, <sup>dot_prod<vsi2qi>): New.
11541         * config/arm/types.md (neon_dot, neon_dot_q): New.
11542         * config/arm/unspecs.md (sup): Add UNSPEC_DOT_S, UNSPEC_DOT_U.
11543
11544 2017-10-16  Tamar Christina  <tamar.christina@arm.com>
11545
11546         * config/arm/arm.h (TARGET_DOTPROD): New.
11547         * config/arm/arm.c (arm_arch_dotprod): New.
11548         (arm_option_reconfigure_globals): Add arm_arch_dotprod.
11549         * config/arm/arm-c.c (__ARM_FEATURE_DOTPROD): New.
11550         * config/arm/arm-cpus.in (armv8.2-a): Enabled +dotprod.
11551         (feature dotprod, group dotprod, ALL_SIMD_INTERNAL): New.
11552         (ALL_FPU_INTERNAL): Use ALL_SIMD_INTERNAL.
11553         * config/arm/t-multilib (v8_2_a_simd_variants): Add dotprod.
11554         * doc/invoke.texi (armv8.2-a): Document dotprod
11555
11556 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
11557
11558         * i386.c (ix86_vec_cost): New function.
11559         (ix86_rtx_costs): Handle vector operations better.
11560         * i386.h (struct processor_costs): Add sse_op, fmasd, fmass.
11561         * x86-tune-costs.h: Add new costs to all tables.
11562
11563 2017-10-14  Jan Hubicka  <hubicka@ucw.cz>
11564
11565         * i386.c (ix86_rtx_costs): Make difference between x87 and SSE
11566         operations.
11567         * i386.h (struct processor_costs): Add addss, mulss, mulsd, divss,
11568         divsd, sqrtss and sqrtsd
11569         * x86-tune-costs.h: Add new entries to all costs.
11570         (znver1_cost): Fix to match real instruction latencies.
11571
11572 2017-10-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
11573             Michael Collison <michael.collison@arm.com>
11574
11575         * compare-elim.c: Include emit-rtl.h.
11576         (can_merge_compare_into_arith): New function.
11577         (try_validate_parallel): Likewise.
11578         (try_merge_compare): Likewise.
11579         (try_eliminate_compare): Call the above when no previous clobber
11580         is available.
11581         (execute_compare_elim_after_reload): Add DF_UD_CHAIN and DF_DU_CHAIN
11582         dataflow problems.
11583
11584 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
11585
11586         PR middle-end/62263
11587         PR middle-end/82498
11588         * tree-ssa-phiopt.c (value_replacement): Comment fix.  Handle
11589         up to 2 preparation statements for ASSIGN in MIDDLE_BB.
11590
11591         PR middle-end/62263
11592         PR middle-end/82498
11593         * tree-ssa-forwprop.c (simplify_rotate): Allow def_arg1[N]
11594         to be any operand_equal_p operands.  For & (B - 1) require
11595         B to be power of 2.  Recognize
11596         (X << (Y & (B - 1))) | (X >> ((-Y) & (B - 1))) and similar patterns.
11597
11598 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
11599
11600         PR bootstrap/82553
11601         * optabs.c (expand_memory_blockage): Fix call of
11602         targetm.have_memory_blockage.
11603
11604 2017-10-14  Jakub Jelinek  <jakub@redhat.com>
11605
11606         PR bootstrap/82548
11607         * config.gcc (*-*-solaris2*, i[34567]86-*-cygwin*,
11608         x86_64-*-cygwin*, i[34567]86-*-mingw* | x86_64-*-mingw*): Append
11609         objects to extra_objs instead of overwriting it.
11610
11611 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
11612
11613         * config/i386/sync.md (FILD_ATOMIC/FIST_ATOMIC FP load peephole2):
11614         Use any_fp_register_operand as operand[3] predicate.  Simplify
11615         equality test for operands[2] and operands[4] memory location.
11616         (LDX_ATOMIC/STX_ATOMIC FP load peephole2): Ditto.
11617         (FILD_ATOMIC/FIST_ATOMIC FP load peephole2 with mem blockage): New.
11618         (LDX_ATOMIC/LDX_ATOMIC FP load peephole2 with mem blockage): Ditto.
11619         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2): Use
11620         any_fp_register_operand as operand[1] predicate.  Simplify
11621         equality test for operands[0] and operands[3] memory location.
11622         (LDX_ATOMIC/STX_ATOMIC FP store peephole2): Ditto.
11623         (FILD_ATOMIC/FIST_ATOMIC FP store peephole2 with mem blockage): New.
11624         (LDX_ATOMIC/LDX_ATOMIC FP storepeephole2 with mem blockage): Ditto.
11625
11626 2017-10-14  Uros Bizjak  <ubizjak@gmail.com>
11627
11628         * target-insns.def: Add memory_blockage.
11629         * optabs.c (expand_memory_blockage): New function.
11630         (expand_asm_memory_barrier): Rename ...
11631         (expand_asm_memory_blockage): ... to this.
11632         (expand_mem_thread_fence): Call expand_memory_blockage
11633         instead of expand_asm_memory_barrier.
11634         (expand_mem_singnal_fence): Ditto.
11635         (expand_atomic_load): Ditto.
11636         (expand_atomic_store): Ditto.
11637         * doc/md.texi (Standard Pattern Names For Generation):
11638         Document memory_blockage instruction pattern.
11639
11640 2017-10-13  Sebastian Perta  <sebastian.perta@renesas.com>
11641
11642         * config/rl78/rl78.c (rl78_emit_libcall): New function.
11643         * config/rl78/rl78-protos.h (rl78_emit_libcall): New function.
11644         * config/rl78/rl78.md: New define_expand "adddi3".
11645
11646 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
11647
11648         * cfghooks.c (verify_flow_info): Disable check that all probabilities
11649         are set correctly.
11650
11651 2017-10-13  Jeff Law  <law@redhat.com>
11652
11653         * tree-ssa-reassoc.c (reassociate_bb): Clarify code slighly.
11654
11655 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
11656
11657         PR target/82274
11658         * internal-fn.c (expand_mul_overflow): If both operands have
11659         the same highpart of -1 or 0 and the topmost bit of lowpart
11660         is different, overflow is if res <= 0 rather than res < 0.
11661
11662 2017-10-13  Pat Haugen  <pthaugen@us.ibm.com>
11663
11664         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost): Remove
11665         TARGET_P9_VECTOR code for unaligned_load case.
11666
11667 2017-10-13  Jan Hubicka  <hubicka@ucw.cz>
11668
11669         * cfghooks.c (verify_flow_info): Check that edge probabilities are set.
11670
11671 2017-10-13  Nathan Sidwell  <nathan@acm.org>
11672
11673         * tree-core.h (tree_contains_struct): Make bool.
11674         * tree.c (tree_contains_struct): Likewise.
11675         * tree.h (MARK_TS_BASE): Remove do ... while (0) idiom.
11676         (MARK_TS_TYPED, MARK_TS_COMMON, MARK_TS_TYPE_COMMON,
11677         MARK_TS_TYPE_WITH_LANG_SPECIFIC, MARK_TS_DECL_MINIMAL,
11678         MARK_TS_DECL_COMMON, MARK_TS_DECL_WRTL, MARK_TS_DECL_WITH_VIS,
11679         MARK_TS_DECL_NON_COMMON): Likewise, use comma operator.
11680
11681 2017-10-13  Richard Biener  <rguenther@suse.de>
11682
11683         * graphite-isl-ast-to-gimple.c
11684         (translate_isl_ast_to_gimple::get_rename_from_scev): Remove unused
11685         parameters and dominance check.
11686         (translate_isl_ast_to_gimple::graphite_copy_stmts_from_block): Adjust.
11687         (translate_isl_ast_to_gimple::copy_bb_and_scalar_dependences): Likewise.
11688         (translate_isl_ast_to_gimple::graphite_regenerate_ast_isl):
11689         Do not update SSA form here or do intermediate IL verification.
11690         * graphite.c: Include tree-ssa.h and tree-into-ssa.h.
11691         (graphite_initialize): Remove check on the number of loops in
11692         the function and inline into graphite_transform_loops.
11693         (graphite_finalize): Inline into graphite_transform_loops.
11694         (graphite_transform_loops): Perform SSA update and IL verification
11695         here.
11696         * params.def (PARAM_GRAPHITE_MIN_LOOPS_PER_FUNCTION): Remove.
11697
11698 2017-10-13  Richard Biener  <rguenther@suse.de>
11699
11700         * graphite-isl-ast-to-gimple.c (max_mode_int_precision,
11701         graphite_expression_type_precision): Avoid global constructor
11702         by moving ...
11703         (translate_isl_ast_to_gimple::translate_isl_ast_to_gimple): Here.
11704         (translate_isl_ast_to_gimple::graphite_expr_type): Add type member.
11705         (translate_isl_ast_to_gimple::translate_isl_ast_node_for): Use it.
11706         (translate_isl_ast_to_gimple::build_iv_mapping): Likewise.
11707         (translate_isl_ast_to_gimple::graphite_create_new_guard): Likewise.
11708         * graphite-sese-to-poly.c (build_original_schedule): Return nothing.
11709
11710 2017-10-13  H.J. Lu  <hongjiu.lu@intel.com>
11711
11712         PR target/82499
11713         * config/i386/i386.h (ix86_red_zone_size): New.
11714         * config/i386/i386.md (push peephole2s): Replace
11715         "!ix86_using_red_zone ()" with "ix86_red_zone_size == 0".
11716
11717 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
11718             Alan Hayward  <alan.hayward@arm.com>
11719             David Sherwood  <david.sherwood@arm.com>
11720
11721         * combine.c (can_change_dest_mode): Reject changes in
11722         REGMODE_NATURAL_SIZE.
11723
11724 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
11725             Alan Hayward  <alan.hayward@arm.com>
11726             David Sherwood  <david.sherwood@arm.com>
11727
11728         * cfgexpand.c (expand_debug_expr): Use GET_MODE_UNIT_BITSIZE.
11729         (expand_debug_source_expr): Likewise.
11730         * combine.c (combine_simplify_rtx): Likewise.
11731         * cse.c (fold_rtx): Likewise.
11732         * fwprop.c (canonicalize_address): Likewise.
11733         * targhooks.c (default_shift_truncation_mask): Likewise.
11734
11735 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
11736             Alan Hayward  <alan.hayward@arm.com>
11737             David Sherwood  <david.sherwood@arm.com>
11738
11739         * optabs.c (add_equal_note): Use GET_MODE_UNIT_SIZE.
11740         (widened_mode): Likewise.
11741         (expand_unop): Likewise.
11742         * ree.c (transform_ifelse): Likewise.
11743         (merge_def_and_ext): Likewise.
11744         (combine_reaching_defs): Likewise.
11745         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
11746
11747 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
11748             Alan Hayward  <alan.hayward@arm.com>
11749             David Sherwood  <david.sherwood@arm.com>
11750
11751         * caller-save.c (replace_reg_with_saved_mem): Use byte_lowpart_offset.
11752         * combine.c (gen_lowpart_for_combine): Likewise.
11753         * dwarf2out.c (rtl_for_decl_location): Likewise.
11754         * final.c (alter_subreg): Likewise.
11755         * rtlhooks.c (gen_lowpart_general): Likewise.
11756         (gen_lowpart_if_possible): Likewise.
11757
11758 2017-10-13  Richard Sandiford  <richard.sandiford@linaro.org>
11759             Alan Hayward  <alan.hayward@arm.com>
11760             David Sherwood  <david.sherwood@arm.com>
11761
11762         * calls.c (expand_call): Use subreg_lowpart_offset.
11763         * cse.c (cse_insn): Likewise.
11764         * regcprop.c (copy_value): Likewise.
11765         (copyprop_hardreg_forward_1): Likewise.
11766
11767 2017-10-13  Jakub Jelinek  <jakub@redhat.com>
11768
11769         PR target/82524
11770         * config/i386/i386.md (addqi_ext_1, andqi_ext_1,
11771         *andqi_ext_1_cc, *<code>qi_ext_1, *xorqi_ext_1_cc): Change
11772         =Q constraints to +Q and into insn condition add check
11773         that operands[0] and operands[1] are equal.
11774         (*addqi_ext_2, *andqi_ext_2, *<code>qi_ext_2): Change
11775         =Q constraints to +Q and into insn condition add check
11776         that operands[0] is equal to either operands[1] or operands[2].
11777
11778         PR target/82498
11779         * fold-const.c (fold_binary_loc) <bit_rotate>: Code cleanups,
11780         instead of handling MINUS_EXPR twice (once for each argument),
11781         canonicalize operand order and handle just once, use rtype where
11782         possible.  Handle (A << B) | (A >> (-B & (Z - 1))).
11783
11784         PR target/82498
11785         * config/i386/ia32intrin.h (__rold, __rord, __rolq, __rorq): Allow
11786         any values of __C while still being pattern recognizable as a simple
11787         rotate instruction.
11788
11789 2017-10-13  Richard Biener  <rguenther@suse.de>
11790
11791         PR tree-optimization/82451
11792         Revert
11793         2017-10-02  Richard Biener  <rguenther@suse.de>
11794
11795         PR tree-optimization/82355
11796         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
11797         a mapping for the enclosing loop but avoid generating one for
11798         the loop tree root.
11799         (copy_bb_and_scalar_dependences): Remove premature codegen
11800         error on PHIs in blocks duplicated into multiple places.
11801         * graphite-scop-detection.c
11802         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
11803         in the region use it as loop and nest to analyze the DR in.
11804         (try_generate_gimple_bb): Likewise.
11805         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
11806         (add_loop_constraints): For blocks in a loop not in the region
11807         create a dimension with a single iteration.
11808         * sese.h (gbb_loop_at_index): Remove assert.
11809
11810         * cfgloop.c (loop_preheader_edge): For the loop tree root
11811         return the single successor of the entry block.
11812         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
11813         Reset the SCEV hashtable and niters.
11814         * graphite-scop-detection.c
11815         (scop_detection::graphite_can_represent_scev): Add SCOP parameter,
11816         assert that we only have POLYNOMIAL_CHREC that vary in loops
11817         contained in the region.
11818         (scop_detection::graphite_can_represent_expr): Adjust.
11819         (scop_detection::stmt_has_simple_data_refs_p): For loops
11820         not in the region set loop to NULL.  The nest is now the
11821         entry edge to the region.
11822         (try_generate_gimple_bb): Likewise.
11823         * sese.c (scalar_evolution_in_region): Adjust for
11824         instantiate_scev change.
11825         * tree-data-ref.h (graphite_find_data_references_in_stmt):
11826         Make nest parameter the edge into the region.
11827         (create_data_ref): Likewise.
11828         * tree-data-ref.c (dr_analyze_indices): Make nest parameter an
11829         entry edge into a region and adjust instantiate_scev calls.
11830         (create_data_ref): Likewise.
11831         (graphite_find_data_references_in_stmt): Likewise.
11832         (find_data_references_in_stmt): Pass the loop preheader edge
11833         from the nest argument.
11834         * tree-scalar-evolution.h (instantiate_scev): Make instantiate_below
11835         parameter the edge into the region.
11836         (instantiate_parameters): Use the loop preheader edge as entry.
11837         * tree-scalar-evolution.c (analyze_scalar_evolution): Handle
11838         NULL loop.
11839         (get_instantiated_value_entry): Make instantiate_below parameter
11840         the edge into the region.
11841         (instantiate_scev_name): Likewise.  Adjust dominance checks,
11842         when we cannot use loop-based instantiation instantiate by
11843         walking use-def chains.
11844         (instantiate_scev_poly): Adjust.
11845         (instantiate_scev_binary): Likewise.
11846         (instantiate_scev_convert): Likewise.
11847         (instantiate_scev_not): Likewise.
11848         (instantiate_array_ref): Remove.
11849         (instantiate_scev_3): Likewise.
11850         (instantiate_scev_2): Likewise.
11851         (instantiate_scev_1): Likewise.
11852         (instantiate_scev_r): Do not blindly handle N-operand trees.
11853         Do not instantiate array-refs.  Handle all constants and invariants.
11854         (instantiate_scev): Make instantiate_below parameter
11855         the edge into the region.
11856         (resolve_mixers): Use the loop preheader edge for the region
11857         parameter to instantiate_scev_r.
11858         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Adjust.
11859
11860 2017-10-13  Richard Biener  <rguenther@suse.de>
11861
11862         PR tree-optimization/82525
11863         * graphite-isl-ast-to-gimple.c
11864         (translate_isl_ast_to_gimple::widest_int_from_isl_expr_int): Split
11865         out from ...
11866         (translate_isl_ast_to_gimple::gcc_expression_from_isl_expr_int): Here.
11867         Fail code generation when we cannot represent the isl integer.
11868         (binary_op_to_tree): Elide modulo operations that are no-ops
11869         in the type we code generate.  Remove now superfluous code
11870         generation errors.
11871
11872 2017-10-13  Richard Biener  <rguenther@suse.de>
11873
11874         * graphite-scop-detection.c (loop_ivs_can_be_represented): Remove.
11875         (scop_detection::harmful_loop_in_region): Remove premature
11876         IV type restriction.
11877         (scop_detection::graphite_can_represent_scev): We can handle
11878         pointer IVs just fine.
11879
11880 2017-10-13  Alan Modra  <amodra@gmail.com>
11881
11882         * doc/extend.texi (Extended Asm <Clobbers>): Rename to
11883         "Clobbers and Scratch Registers".  Add paragraph on
11884         alternative to clobbers for scratch registers and OpenBLAS
11885         example.
11886
11887 2017-10-13  Alan Modra  <amodra@gmail.com>
11888
11889         * doc/extend.texi (Clobbers): Correct vax example.  Delete old
11890         example of a memory input for a string of known length.  Move
11891         commentary out of table.  Add a number of new examples
11892         covering array memory inputs.
11893
11894 2017-10-12  Martin Liska  <mliska@suse.cz>
11895
11896         PR tree-optimization/82493
11897         * sbitmap.c (bitmap_bit_in_range_p): Fix the implementation.
11898         (test_range_functions): New function.
11899         (sbitmap_c_tests): Likewise.
11900         * selftest-run-tests.c (selftest::run_tests): Run new tests.
11901         * selftest.h (sbitmap_c_tests): New function.
11902
11903         * tree-ssa-dse.c (live_bytes_read): Fix thinko.
11904
11905 2017-10-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
11906
11907         * config/rs6000/amo.h: Fix spacing issue.
11908
11909 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
11910
11911         PR target/82498
11912         * config/i386/i386.md (*ashl<mode>3_mask_1,
11913         *<shift_insn><mode>3_mask_1, *<rotate_insn><mode>3_mask_1,
11914         *<btsc><mode>_mask_1, *btr<mode>_mask_1): New define_insn_and_split
11915         patterns.
11916
11917 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
11918
11919         * profile-count.h (safe_scale_64bit): Fix GCC4.x path.
11920         (profile_probability): Set max_probability
11921         to (uint32_t) 1 << (n_bits - 2) and update accessors to avoid overlfows
11922         in temporaries.
11923         * profile-count.c (profile_probability::differs_from_p): Do not
11924         rely on max_probaiblity == 10000
11925
11926 2017-10-12  Jeff Law  <law@redhat.com>
11927
11928         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject ao_refs with
11929         negative offsets.
11930
11931 2017-10-12  Martin Sebor  <msebor@redhat.com>
11932
11933         PR other/82301
11934         PR c/82435
11935         * cgraphunit.c (maybe_diag_incompatible_alias): New function.
11936         (handle_alias_pairs): Call it.
11937         * common.opt (-Wattribute-alias): New option.
11938         * doc/extend.texi (ifunc attribute): Discuss C++ specifics.
11939         * doc/invoke.texi (-Wattribute-alias): Document.
11940
11941 2017-10-12  Vladimir Makarov  <vmakarov@redhat.com>
11942
11943         Revert
11944         2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
11945         PR sanitizer/82353
11946         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
11947         locations.
11948         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
11949         (make_hard_regno_born, make_hard_regno_dead): Update
11950         bb_killed_pseudos and bb_gen_pseudos.
11951
11952 2017-10-12  Jan Hubicka  <hubicka@ucw.cz>
11953
11954         * config/i386/x86-tune-sched.c (ix86_adjust_cost): Fix Zen support.
11955
11956 2017-10-12  Uros Bizjak  <ubizjak@gmail.com>
11957
11958         * config/alpha/alpha.c (alpha_split_conditional_move):
11959         Use std::swap instead of manually swapping.
11960         (alpha_stdarg_optimize_hook): Ditto.
11961         (alpha_canonicalize_comparison): Ditto.
11962
11963 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
11964
11965         * tree-loop-distribution.c (struct builtin_info): New struct.
11966         (struct partition): Refactor fields into struct builtin_info.
11967         (partition_free): Free struct builtin_info.
11968         (build_size_arg_loc, build_addr_arg_loc): Delete.
11969         (generate_memset_builtin, generate_memcpy_builtin): Get memory range
11970         information from struct builtin_info.
11971         (find_single_drs): New function refactored from classify_partition.
11972         Also moved builtin validity checks to this function.
11973         (compute_access_range, alloc_builtin): New functions.
11974         (classify_builtin_st, classify_builtin_ldst): New functions.
11975         (classify_partition): Refactor code into functions find_single_drs,
11976         classify_builtin_st and classify_builtin_ldst.
11977         (distribute_loop): Don't do runtime alias check when distributing
11978         loop nest.
11979         (find_seed_stmts_for_distribution): New function.
11980         (pass_loop_distribution::execute): Refactor code finding seed
11981         stmts into above function.  Support distribution for the innermost
11982         two-level loop nest.  Adjust dump information.
11983
11984 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
11985
11986         * tree-loop-distribution.c: Adjust the general comment.
11987         (NUM_PARTITION_THRESHOLD): New macro.
11988         (ssa_name_has_uses_outside_loop_p): Support loop nest distribution.
11989         (classify_partition): Skip builtin pattern of loop nest's inner loop.
11990         (merge_dep_scc_partitions): New parameter ignore_alias_p and use it
11991         in call to build_partition_graph.
11992         (finalize_partitions): New parameter.  Make loop distribution more
11993         conservative by fusing more partitions.
11994         (distribute_loop): Don't do runtime alias check in case of loop nest
11995         distribution.
11996         (find_seed_stmts_for_distribution): New function.
11997         (prepare_perfect_loop_nest): New function.
11998         (pass_loop_distribution::execute): Refactor code finding seed stmts
11999         and loop nest into above functions.  Support loop nest distribution.
12000         Adjust dump information accordingly.
12001
12002 2017-10-12  Bin Cheng  <bin.cheng@arm.com>
12003
12004         * tree-loop-distribution.c (break_alias_scc_partitions): Add comment
12005         and set PTYPE_SEQUENTIAL for merged partition.
12006
12007 2017-10-12  Richard Biener  <rguenther@suse.de>
12008
12009         PR tree-optimization/69728
12010         Revert
12011         2017-09-19  Richard Biener  <rguenther@suse.de>
12012
12013         PR tree-optimization/69728
12014         * graphite-sese-to-poly.c (schedule_error): New global.
12015         (add_loop_schedule): Handle empty domain by failing the
12016         schedule.
12017         (build_original_schedule): Handle schedule_error.
12018
12019         * graphite-sese-to-poly.c (add_loop_schedule): Handle empty
12020         domain by returning an unchanged schedule.
12021
12022 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
12023
12024         * genrecog.c (validate_pattern): For VEC_SELECT verify that
12025         CONST_INT selectors are 0 to GET_MODE_NUNITS (imode) - 1.
12026
12027 2017-10-12  Aldy Hernandez  <aldyh@redhat.com>
12028
12029         * Makefile.in (TAGS): Merge all the *.def files into one pattern.
12030         Handle params.def.
12031
12032 2017-10-12  Jakub Jelinek  <jakub@redhat.com>
12033
12034         PR c++/82159
12035         * expr.c (store_field): Don't optimize away bitsize == 0 store
12036         from CALL_EXPR with addressable return type.
12037
12038 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
12039
12040         * config/rs6000/rs6000.h (TARGET_ISEL64): Delete.
12041         * config/rs6000/rs6000.md (sel): Delete mode attribute.
12042         (mov<mode>cc, isel_signed_<mode>, isel_unsigned_<mode>,
12043         *isel_reversed_signed_<mode>, *isel_reversed_unsigned_<mode>): Use
12044         TARGET_ISEL instead of TARGET_ISEL<sel>.
12045
12046 2017-10-11  David Edelsohn  <dje.gcc@gmail.com>
12047
12048         * config/rs6000/rs6000.c
12049         (rs6000_xcoff_asm_output_aligned_decl_common): Test for NULL decl.
12050
12051 2017-10-11  Segher Boessenkool  <segher@kernel.crashing.org>
12052
12053         * config/rs6000/predicates.md (zero_constant, all_ones_constant):
12054         Move up in file.
12055         (reg_or_cint_operand): Fix comment.
12056         (reg_or_zero_operand): New predicate.
12057         * config/rs6000/rs6000-protos.h (output_isel): Delete.
12058         * config/rs6000/rs6000.c (output_isel): Delete.
12059         * config/rs6000/rs6000.md (isel_signed_<mode>): Use reg_or_zero_operand
12060         instead of reg_or_cint_operand.  Output instruction directly (not via
12061         output_isel).
12062         (isel_unsigned_<mode>): Ditto.
12063         (*isel_reversed_signed_<mode>): Use reg_or_zero_operand instead of
12064         gpc_reg_operand.  Add an instruction alternative for this.  Output
12065         instruction directly.
12066         (*isel_reversed_unsigned_<mode>): Ditto.
12067
12068 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
12069
12070         * config/i386/i386.c (ix86_canonicalize_comparison): New function.
12071         (TARGET_CANONICALIZE_COMPARISON): Define.
12072
12073 2017-10-11  Qing Zhao  <qing.zhao@oracle.com>
12074
12075         PR target/81422
12076         * config/aarch64/aarch64.c (aarch64_load_symref_appropriately):
12077         Check whether the dest is REG before adding REG_EQUIV note.
12078
12079 2017-10-11  Vladimir Makarov  <vmakarov@redhat.com>
12080
12081         PR sanitizer/82353
12082         * lra.c (collect_non_operand_hard_regs): Don't ignore operator
12083         locations.
12084         * lra-lives.c (bb_killed_pseudos, bb_gen_pseudos): Move up.
12085         (make_hard_regno_born, make_hard_regno_dead): Update
12086         bb_killed_pseudos and bb_gen_pseudos.
12087
12088 2017-10-11  Nathan Sidwell  <nathan@acm.org>
12089
12090         * incpath.h (enum incpath_kind): Name enum, prefix values.
12091         (add_path, add_cpp_dir_path, get_added_cpp_dirs): Use incpath_kind.
12092         * incpath.c (heads, tails): Use INC_MAX.
12093         (add_env_var_paths, add_standard_paths): Use incpath_kind.
12094         (merge_include_chains, split_quote_chain,
12095         register_include_chains): Update incpath_kind names.
12096         (add_cpp_dir_path, add_path, get_added_cpp_dirs): Use incpath_kind.
12097         * config/darwin-c.c (add_system_framework_path): Update incpath_kind
12098         names.
12099         (add_framework_path, darwin_register_objc_includes): Likewise.
12100         * config/vms/vms-c.c (vms_c_register_includes): Likewise.
12101
12102 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
12103
12104         * config/i386/i386.md (*cmp<X87MODEF:mode>_<SWI24:mode>_i387):
12105         Do not use float_operator operator predicate.
12106         (*cmp<X87MODEF:mode>_<SWI24:mode>_cc_i387): Ditto.
12107         * config/i386/predicates.md (float_operator): Remove predicate.
12108
12109 2017-10-11  Uros Bizjak  <ubizjak@gmail.com>
12110
12111         * config/i386/i386.md (*jcc<mode>_0_i387): Remove insn pattern.
12112         (*jccxf_i387): Ditto.
12113         (*jcc<mode>_i387): Ditto.
12114         (*jccu<mode>_i387): Ditto.
12115         (*jcc<X87MODEF:mode>_<SWI24:mode>_i387): Ditto.
12116         (*jcc_*_i387 splitters): Remove.
12117         * config/i386/i386-protos.h (ix86_split_fp_branch): Remove prototype.
12118         * config/i386/i386.c (ix86_split_fp_branch): Remove.
12119         * config/i386/predicates.md (ix86_swapped_fp_comparison_operator):
12120         Remove predicate.
12121
12122 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
12123
12124         * profile-count.h (slow_safe_scale_64bit): New function.
12125         (safe_scale_64bit): New inline.
12126         (profile_count::max_safe_multiplier): Remove; use safe_scale_64bit.
12127         * profile-count.c: Include wide-int.h
12128         (slow_safe_scale_64bit): New.
12129
12130 2017-10-11  Nathan Sidwell  <nathan@acm.org>
12131
12132         * tree.h (DECL_ASSEMBLER_NAME_SET_P): Don't check
12133         HAS_DECL_ASSEMBLER_NAME_P.
12134         * gimple-expr.c (gimple_decl_printable_name: Check
12135         HAS_DECL_ASSEMBLER_NAME_P too.
12136         * ipa-utils.h (type_in_anonymous_namespace_p): Check
12137         DECL_ASSEMBLER_NAME_SET_P of TYPE_NAME.
12138         (odr_type_p): No need to assert TYPE_NAME is a TYPE_DECL.
12139         * passes.c (rest_of_decl_compilation): Check
12140         HAS_DECL_ASSEMBLER_NAME_P too.
12141         * recog.c (verify_changes): Likewise.
12142         * tree-pretty-print.c (dump_decl_name): Likewise.
12143         * tree-ssa-structalias.c (alias_get_name): Likewise.  Reimplement.
12144
12145         * tree.h (DECL_ASSEMBLER_NAME_RAW): New.
12146         (SET_DECL_ASSEMBLER_NAME): Use it.
12147         (DECL_ASSEMBLER_NAME_SET_P): Likewise.
12148         (COPY_DECL_ASSEMBLER_NAME): Likewise.
12149         * tree.c (decl_assembler_name): Use DECL_ASSEMBLER_NAME_RAW.
12150
12151 2017-10-11  Jan Hubicka  <hubicka@ucw.cz>
12152
12153         * config.gcc (i386, x86_64): Add extra objects.
12154         * config/i386/i386-protos.h (ix86_rip_relative_addr_p): Declare.
12155         (ix86_min_insn_size): Declare.
12156         (ix86_issue_rate): Declare.
12157         (ix86_adjust_cost): Declare.
12158         (ia32_multipass_dfa_lookahead): Declare.
12159         (ix86_macro_fusion_p): Declare.
12160         (ix86_macro_fusion_pair_p): Declare.
12161         (ix86_bd_has_dispatch): Declare.
12162         (ix86_bd_do_dispatch): Declare.
12163         (ix86_core2i7_init_hooks): Declare.
12164         (ix86_atom_sched_reorder): Declare.
12165         * config/i386/i386.c Move all CPU cost tables to x86-tune-costs.h.
12166         (COSTS_N_BYTES): Move to x86-tune-costs.h.
12167         (DUMMY_STRINGOP_ALGS):Move to x86-tune-costs.h.
12168         (rip_relative_addr_p): Rename to ...
12169         (ix86_rip_relative_addr_p): ... this one; export.
12170         (memory_address_length): Update.
12171         (ix86_issue_rate): Move to x86-tune-sched.c.
12172         (ix86_flags_dependent): Move to x86-tune-sched.c.
12173         (ix86_agi_dependent): Move to x86-tune-sched.c.
12174         (exact_dependency_1): Move to x86-tune-sched.c.
12175         (exact_store_load_dependency): Move to x86-tune-sched.c.
12176         (ix86_adjust_cost): Move to x86-tune-sched.c.
12177         (ia32_multipass_dfa_lookahead): Move to x86-tune-sched.c.
12178         (ix86_macro_fusion_p): Move to x86-tune-sched.c.
12179         (ix86_macro_fusion_pair_p): Move to x86-tune-sched.c.
12180         (do_reorder_for_imul): Move to x86-tune-sched-atom.c.
12181         (swap_top_of_ready_list): Move to x86-tune-sched-atom.c.
12182         (ix86_sched_reorder): Move to x86-tune-sched-atom.c.
12183         (core2i7_first_cycle_multipass_init): Move to x86-tune-sched-core.c.
12184         (core2i7_dfa_post_advance_cycle): Move to x86-tune-sched-core.c.
12185         (min_insn_size): Rename to ...
12186         (ix86_min_insn_size): ... this one; export.
12187         (core2i7_first_cycle_multipass_begin): Move to x86-tune-sched-core.c.
12188         (core2i7_first_cycle_multipass_issue): Move to x86-tune-sched-core.c.
12189         (core2i7_first_cycle_multipass_backtrack): Move to
12190         x86-tune-sched-core.c.
12191         (core2i7_first_cycle_multipass_end): Move to x86-tune-sched-core.c.
12192         (core2i7_first_cycle_multipass_fini): Move to x86-tune-sched-core.c.
12193         (ix86_sched_init_global): Break up logic to ix86_core2i7_init_hooks.
12194         (ix86_avoid_jump_mispredicts): Update.
12195         (TARGET_SCHED_DISPATCH): Move to ix86-tune-sched-bd.c.
12196         (TARGET_SCHED_DISPATCH_DO): Move to ix86-tune-sched-bd.c.
12197         (TARGET_SCHED_REORDER): Move to ix86-tune-sched-bd.c.
12198         (DISPATCH_WINDOW_SIZE): Move to ix86-tune-sched-bd.c.
12199         (MAX_DISPATCH_WINDOWS): Move to ix86-tune-sched-bd.c.
12200         (MAX_INSN): Move to ix86-tune-sched-bd.c.
12201         (MAX_IMM): Move to ix86-tune-sched-bd.c.
12202         (MAX_IMM_SIZE): Move to ix86-tune-sched-bd.c.
12203         (MAX_IMM_32): Move to ix86-tune-sched-bd.c.
12204         (MAX_IMM_64): Move to ix86-tune-sched-bd.c.
12205         (MAX_LOAD): Move to ix86-tune-sched-bd.c.
12206         (MAX_STORE): Move to ix86-tune-sched-bd.c.
12207         (BIG): Move to ix86-tune-sched-bd.c.
12208         (enum dispatch_group): Move to ix86-tune-sched-bd.c.
12209         (enum insn_path): Move to ix86-tune-sched-bd.c.
12210         (get_mem_group): Move to ix86-tune-sched-bd.c.
12211         (is_cmp): Move to ix86-tune-sched-bd.c.
12212         (dispatch_violation): Move to ix86-tune-sched-bd.c.
12213         (is_branch): Move to ix86-tune-sched-bd.c.
12214         (is_prefetch): Move to ix86-tune-sched-bd.c.
12215         (init_window): Move to ix86-tune-sched-bd.c.
12216         (allocate_window): Move to ix86-tune-sched-bd.c.
12217         (init_dispatch_sched): Move to ix86-tune-sched-bd.c.
12218         (is_end_basic_block): Move to ix86-tune-sched-bd.c.
12219         (process_end_window): Move to ix86-tune-sched-bd.c.
12220         (allocate_next_window): Move to ix86-tune-sched-bd.c.
12221         (find_constant): Move to ix86-tune-sched-bd.c.
12222         (get_num_immediates): Move to ix86-tune-sched-bd.c.
12223         (has_immediate): Move to ix86-tune-sched-bd.c.
12224         (get_insn_path): Move to ix86-tune-sched-bd.c.
12225         (get_insn_group): Move to ix86-tune-sched-bd.c.
12226         (count_num_restricted): Move to ix86-tune-sched-bd.c.
12227         (fits_dispatch_window): Move to ix86-tune-sched-bd.c.
12228         (add_insn_window): Move to ix86-tune-sched-bd.c.
12229         (add_to_dispatch_window): Move to ix86-tune-sched-bd.c.
12230         (debug_dispatch_window_file): Move to ix86-tune-sched-bd.c.
12231         (debug_dispatch_window): Move to ix86-tune-sched-bd.c.
12232         (debug_insn_dispatch_info_file): Move to ix86-tune-sched-bd.c.
12233         (debug_ready_dispatch): Move to ix86-tune-sched-bd.c.
12234         (do_dispatch): Move to ix86-tune-sched-bd.c.
12235         (has_dispatch): Move to ix86-tune-sched-bd.c.
12236         * config/i386/t-i386: Add new object files.
12237         * config/i386/x86-tune-costs.h: New file.
12238         * config/i386/x86-tune-sched-atom.c: New file.
12239         * config/i386/x86-tune-sched-bd.c: New file.
12240         * config/i386/x86-tune-sched-core.c: New file.
12241         * config/i386/x86-tune-sched.c: New file.
12242
12243 2017-10-11  Liu Hao  <lh_mouse@126.com>
12244
12245         * pretty-print.c [_WIN32] (colorize_init): Remove.  Use
12246         the generic version below instead.
12247         (should_colorize): Recognize Windows consoles as terminals
12248         for MinGW targets.
12249         * pretty-print.c [__MINGW32__] (write_all): New function.
12250         [__MINGW32__] (find_esc_head): Likewise.
12251         [__MINGW32__] (find_esc_terminator): Likewise.
12252         [__MINGW32__] (eat_esc_sequence): Likewise.
12253         [__MINGW32__] (mingw_ansi_fputs): New function that handles
12254         ANSI escape codes.
12255         (pp_write_text_to_stream): Use mingw_ansi_fputs instead of fputs
12256         for MinGW targets.
12257
12258 2017-10-11  Richard Biener  <rguenther@suse.de>
12259
12260         * tree-ssa-loop-niter.c (infer_loop_bounds_from_pointer_arith):
12261         Properly call analyze_scalar_evolution with the loop of the stmt.
12262
12263 2017-10-11  Richard Biener  <rguenther@suse.de>
12264
12265         * tree.def (POLYNOMIAL_CHREC): Remove CHREC_VARIABLE tree operand.
12266         * tree-core.h (tree_base): Add chrec_var union member.
12267         * tree.h (CHREC_VAR): Remove.
12268         (CHREC_LEFT, CHREC_RIGHT, CHREC_VARIABLE): Adjust.
12269         * tree-chrec.h (build_polynomial_chrec): Adjust.
12270         * tree-chrec.c (reset_evolution_in_loop): Use build_polynomial_chrec.
12271         * tree-pretty-print.c (dump_generic_node): Use CHREC_VARIABLE.
12272
12273 2017-10-11  Marc Glisse  <marc.glisse@inria.fr>
12274
12275         * fold-const.c (fold_binary_loc) [X +- Y CMP X]: Move ...
12276         * match.pd: ... here.
12277         ((T) X == (T) Y): Relax condition.
12278
12279 2017-10-11  Bin Cheng  <bin.cheng@arm.com>
12280
12281         PR tree-optimization/82472
12282         * tree-loop-distribution.c (sort_partitions_by_post_order): Refine
12283         comment.
12284         (break_alias_scc_partitions): Update postorder number.
12285
12286 2017-10-11  Martin Liska  <mliska@suse.cz>
12287
12288         PR sanitizer/82490
12289         * opts.c (parse_no_sanitize_attribute): Do not use error_value
12290         variable.
12291         * opts.h (parse_no_sanitize_attribute): Remove last argument.
12292
12293 2017-10-11  Martin Liska  <mliska@suse.cz>
12294
12295         * print-rtl.c (print_insn): Move declaration of idbuf
12296         to same scope as name.
12297
12298 2017-10-11  Martin Liska  <mliska@suse.cz>
12299
12300         Revert r253637:
12301
12302         PR sanitizer/82484
12303         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
12304         volatile arguments.
12305
12306 2017-10-11  Martin Liska  <mliska@suse.cz>
12307
12308         PR sanitizer/82484
12309         * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
12310         volatile arguments.
12311
12312 2017-10-11  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
12313
12314         * config.gcc (default_gnu_indirect_function): Default to yes for
12315         arm*-*-linux* with glibc.
12316
12317 2017-10-11  Richard Biener  <rguenther@suse.de>
12318
12319         * tree-scalar-evolution.c (get_scalar_evolution): Handle
12320         default-defs and types we do not want to analyze.
12321         (interpret_loop_phi): Replace unreachable code with an assert.
12322         (compute_scalar_evolution_in_loop): Remove and inline ...
12323         (analyze_scalar_evolution_1): ... here, replacing condition with
12324         what makes the intent clearer.  Remove handling of cases
12325         get_scalar_evolution now handles.
12326
12327 2017-10-10  Jim Wilson  <wilson@tuliptree.org>
12328
12329         PR rtl-optimization/81434
12330         * haifa-sched.c (prune_ready_list): Init min_cost_group to 0.  Update
12331         comment for main loop.  In sched_group_found if, also add checks for
12332         pass and min_cost_group.
12333
12334 2017-10-10  Segher Boessenkool  <segher@kernel.crashing.org>
12335
12336         * config/rs6000/rs6000.c (TARGET_INSN_COST): New.
12337         (rs6000_insn_cost): New function.
12338         * config/rs6000/rs6000.md (cost): New attribute.
12339
12340 2017-10-10  Jakub Jelinek  <jakub@redhat.com>
12341             H.J. Lu  <hongjiu.lu@intel.com>
12342
12343         PR target/79565
12344         PR target/82483
12345         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Add
12346         OPTION_MASK_ISA_MMX for __builtin_ia32_maskmovq,
12347         __builtin_ia32_vec_ext_v4hi and __builtin_ia32_vec_set_v4hi.
12348         (ix86_expand_builtin): Treat OPTION_MASK_ISA_MMX similarly
12349         to OPTION_MASK_ISA_AVX512VL - builtins that have both
12350         OPTION_MASK_ISA_MMX and some other bit set require both
12351         mmx and the ISAs without the mmx bit.
12352         * config/i386/i386-builtin.def (__builtin_ia32_cvtps2pi,
12353         __builtin_ia32_cvttps2pi, __builtin_ia32_cvtpi2ps,
12354         __builtin_ia32_pavgb, __builtin_ia32_pavgw, __builtin_ia32_pmulhuw,
12355         __builtin_ia32_pmaxub, __builtin_ia32_pmaxsw, __builtin_ia32_pminub,
12356         __builtin_ia32_pminsw, __builtin_ia32_psadbw, __builtin_ia32_pmovmskb,
12357         __builtin_ia32_pshufw, __builtin_ia32_cvtpd2pi,
12358         __builtin_ia32_cvttpd2pi, __builtin_ia32_cvtpi2pd,
12359         __builtin_ia32_pmuludq, __builtin_ia32_pabsb, __builtin_ia32_pabsw,
12360         __builtin_ia32_pabsd, __builtin_ia32_phaddw, __builtin_ia32_phaddd,
12361         __builtin_ia32_phaddsw, __builtin_ia32_phsubw, __builtin_ia32_phsubd,
12362         __builtin_ia32_phsubsw, __builtin_ia32_pmaddubsw,
12363         __builtin_ia32_pmulhrsw, __builtin_ia32_pshufb, __builtin_ia32_psignb,
12364         __builtin_ia32_psignw, __builtin_ia32_psignd, __builtin_ia32_movntq,
12365         __builtin_ia32_paddq, __builtin_ia32_psubq, __builtin_ia32_palignr):
12366         Add OPTION_MASK_ISA_MMX.
12367
12368 2017-10-10  Andreas Tobler  <andreast@gcc.gnu.org>
12369
12370         * config.gcc (armv7*-*-freebsd*): New target.
12371         (armv6*-*-freebsd*): Remove obsolete TARGET_FREEBSD_ARMv6 define.
12372
12373 2017-10-10  Jan Hubicka  <hubicka@ucw.cz>
12374
12375         * x86-tune.def (X86_TUNE_AVOID_FALSE_DEP_FOR_BMI,
12376         X86_TUNE_ADJUST_UNROLL, X86_TUNE_ONE_IF_CONV_INSN): Move to right
12377         spot in the file.
12378
12379 2017-10-10  Richard Sandiford  <richard.sandiford@linaro.org>
12380
12381         * wide-int.h (wide_int_ref_storage): Make host_dependent_precision
12382         a template parameter.
12383         (WIDE_INT_REF_FOR): Update accordingly.
12384         * tree.h (wi::int_traits <const_tree>): Delete.
12385         (wi::tree_to_widest_ref, wi::tree_to_offset_ref): New typedefs.
12386         (wi::to_widest, wi::to_offset): Use them.  Expand commentary.
12387         (wi::tree_to_wide_ref): New typedef.
12388         (wi::to_wide): New function.
12389         * calls.c (get_size_range): Use wi::to_wide when operating on
12390         trees as wide_ints.
12391         * cgraph.c (cgraph_node::create_thunk): Likewise.
12392         * config/i386/i386.c (ix86_data_alignment): Likewise.
12393         (ix86_local_alignment): Likewise.
12394         * dbxout.c (stabstr_O): Likewise.
12395         * dwarf2out.c (add_scalar_info, gen_enumeration_type_die): Likewise.
12396         * expr.c (const_vector_from_tree): Likewise.
12397         * fold-const-call.c (host_size_t_cst_p, fold_const_call_1): Likewise.
12398         * fold-const.c (may_negate_without_overflow_p, negate_expr_p)
12399         (fold_negate_expr_1, int_const_binop_1, const_binop)
12400         (fold_convert_const_int_from_real, optimize_bit_field_compare)
12401         (all_ones_mask_p, sign_bit_p, unextend, extract_muldiv_1)
12402         (fold_div_compare, fold_single_bit_test, fold_plusminus_mult_expr)
12403         (pointer_may_wrap_p, expr_not_equal_to, fold_binary_loc)
12404         (fold_ternary_loc, multiple_of_p, fold_negate_const, fold_abs_const)
12405         (fold_not_const, round_up_loc): Likewise.
12406         * gimple-fold.c (gimple_fold_indirect_ref): Likewise.
12407         * gimple-ssa-warn-alloca.c (alloca_call_type_by_arg): Likewise.
12408         (alloca_call_type): Likewise.
12409         * gimple.c (preprocess_case_label_vec_for_gimple): Likewise.
12410         * godump.c (go_output_typedef): Likewise.
12411         * graphite-sese-to-poly.c (tree_int_to_gmp): Likewise.
12412         * internal-fn.c (get_min_precision): Likewise.
12413         * ipa-cp.c (ipcp_store_vr_results): Likewise.
12414         * ipa-polymorphic-call.c
12415         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Likewise.
12416         * ipa-prop.c (ipa_print_node_jump_functions_for_edge): Likewise.
12417         (ipa_modify_call_arguments): Likewise.
12418         * match.pd: Likewise.
12419         * omp-low.c (scan_omp_1_op, lower_omp_ordered_clauses): Likewise.
12420         * print-tree.c (print_node_brief, print_node): Likewise.
12421         * stmt.c (expand_case): Likewise.
12422         * stor-layout.c (layout_type): Likewise.
12423         * tree-affine.c (tree_to_aff_combination): Likewise.
12424         * tree-cfg.c (group_case_labels_stmt): Likewise.
12425         * tree-data-ref.c (dr_analyze_indices): Likewise.
12426         (prune_runtime_alias_test_list): Likewise.
12427         * tree-dump.c (dequeue_and_dump): Likewise.
12428         * tree-inline.c (remap_gimple_op_r, copy_tree_body_r): Likewise.
12429         * tree-predcom.c (is_inv_store_elimination_chain): Likewise.
12430         * tree-pretty-print.c (dump_generic_node): Likewise.
12431         * tree-scalar-evolution.c (iv_can_overflow_p): Likewise.
12432         (simple_iv_with_niters): Likewise.
12433         * tree-ssa-address.c (addr_for_mem_ref): Likewise.
12434         * tree-ssa-ccp.c (ccp_finalize, evaluate_stmt): Likewise.
12435         * tree-ssa-loop-ivopts.c (constant_multiple_of): Likewise.
12436         * tree-ssa-loop-niter.c (split_to_var_and_offset)
12437         (refine_value_range_using_guard, number_of_iterations_ne_max)
12438         (number_of_iterations_lt_to_ne, number_of_iterations_lt)
12439         (get_cst_init_from_scev, record_nonwrapping_iv)
12440         (scev_var_range_cant_overflow): Likewise.
12441         * tree-ssa-phiopt.c (minmax_replacement): Likewise.
12442         * tree-ssa-pre.c (compute_avail): Likewise.
12443         * tree-ssa-sccvn.c (vn_reference_fold_indirect): Likewise.
12444         (vn_reference_maybe_forwprop_address, valueized_wider_op): Likewise.
12445         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Likewise.
12446         * tree-ssa-uninit.c (is_pred_expr_subset_of): Likewise.
12447         * tree-ssanames.c (set_nonzero_bits, get_nonzero_bits): Likewise.
12448         * tree-switch-conversion.c (collect_switch_conv_info, array_value_type)
12449         (dump_case_nodes, try_switch_expansion): Likewise.
12450         * tree-vect-loop-manip.c (vect_gen_vector_loop_niters): Likewise.
12451         (vect_do_peeling): Likewise.
12452         * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
12453         * tree-vect-stmts.c (vectorizable_load): Likewise.
12454         * tree-vrp.c (compare_values_warnv, vrp_int_const_binop): Likewise.
12455         (zero_nonzero_bits_from_vr, ranges_from_anti_range): Likewise.
12456         (extract_range_from_binary_expr_1, adjust_range_with_scev): Likewise.
12457         (overflow_comparison_p_1, register_edge_assert_for_2): Likewise.
12458         (is_masked_range_test, find_switch_asserts, maybe_set_nonzero_bits)
12459         (vrp_evaluate_conditional_warnv_with_ops, intersect_ranges): Likewise.
12460         (range_fits_type_p, two_valued_val_range_p, vrp_finalize): Likewise.
12461         (evrp_dom_walker::before_dom_children): Likewise.
12462         * tree.c (cache_integer_cst, real_value_from_int_cst, integer_zerop)
12463         (integer_all_onesp, integer_pow2p, integer_nonzerop, tree_log2)
12464         (tree_floor_log2, tree_ctz, mem_ref_offset, tree_int_cst_sign_bit)
12465         (tree_int_cst_sgn, get_unwidened, int_fits_type_p): Likewise.
12466         (get_type_static_bounds, num_ending_zeros, drop_tree_overflow)
12467         (get_range_pos_neg): Likewise.
12468         * ubsan.c (ubsan_expand_ptr_ifn): Likewise.
12469         * config/darwin.c (darwin_mergeable_constant_section): Likewise.
12470         * config/aarch64/aarch64.c (aapcs_vfp_sub_candidate): Likewise.
12471         * config/arm/arm.c (aapcs_vfp_sub_candidate): Likewise.
12472         * config/avr/avr.c (avr_fold_builtin): Likewise.
12473         * config/bfin/bfin.c (bfin_local_alignment): Likewise.
12474         * config/msp430/msp430.c (msp430_attr): Likewise.
12475         * config/nds32/nds32.c (nds32_insert_attributes): Likewise.
12476         * config/powerpcspe/powerpcspe-c.c
12477         (altivec_resolve_overloaded_builtin): Likewise.
12478         * config/powerpcspe/powerpcspe.c (rs6000_aggregate_candidate)
12479         (rs6000_expand_ternop_builtin): Likewise.
12480         * config/rs6000/rs6000-c.c
12481         (altivec_resolve_overloaded_builtin): Likewise.
12482         * config/rs6000/rs6000.c (rs6000_aggregate_candidate): Likewise.
12483         (rs6000_expand_ternop_builtin): Likewise.
12484         * config/s390/s390.c (s390_handle_hotpatch_attribute): Likewise.
12485
12486 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
12487
12488         * tree-vect-loop-manip.c (rename_variables_in_bb): Rename PHI nodes
12489         when copying loop nest with only one inner loop.
12490
12491 2017-10-10  Richard Biener  <rguenther@suse.de>
12492
12493         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Avoid compacting
12494         blocks if SCEV is active.
12495         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Remove
12496         dead code.
12497         (analyze_scalar_evolution): Handle cached evolutions the obvious way.
12498         (scev_initialize): Assert we are not yet initialized.
12499
12500 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
12501
12502         * tree-loop-distribution.c (generate_loops_for_partition): Remove
12503         inner loop's exit stmt by making it always exit the loop, otherwise
12504         we would generate an infinite empty loop.
12505
12506 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
12507
12508         * tree-vect-loop-manip.c (slpeel_tree_duplicate_loop_to_edge_cfg): Skip
12509         renaming variables in new preheader if it's deleted.
12510
12511 2017-10-10  Bin Cheng  <bin.cheng@arm.com>
12512
12513         * tree-loop-distribution.c (struct partition): Remove unused field
12514         loops of the structure.
12515         (partition_alloc, partition_free): Ditto.
12516         (build_rdg_partition_for_vertex): Ditto.
12517
12518 2017-10-09  Jeff Law  <law@redhat.com>
12519
12520         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): Fix
12521         return type to match prototype and documentation.
12522
12523 2010-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
12524
12525         * config/rs6000/rs6000.c (processor_costs): Move to ...
12526         * config/rs6000/rs6000.h: ... here.
12527         (rs6000_cost): Declare.
12528
12529 2017-10-09  Eric Botcazou  <ebotcazou@adacore.com>
12530
12531         * except.c (setjmp_fn): New global variable.
12532         (init_eh): Initialize it if DONT_USE_BUILTIN_SETJMP is defined.
12533         (sjlj_emit_function_enter): Call it instead of BUILTIN_SETJMP
12534         if DONT_USE_BUILTIN_SETJMP is defined.
12535
12536 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
12537
12538         * target.def (insn_cost): New hook.
12539         * doc/tm.texi.in (TARGET_INSN_COST): New hook.
12540         * doc/tm.texi: Regenerate.
12541         * rtlanal.c (insn_cost): Use the new hook.
12542
12543 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
12544
12545         * combine.c (combine_validate_cost): Compute the new insn_cost,
12546         not just pattern_cost.
12547         (try_combine): Adjust comment.
12548
12549 2017-10-09  Segher Boessenkool  <segher@kernel.crashing.org>
12550
12551         * cfgrtl.c (rtl_account_profile_record): Replace insn_rtx_cost with
12552         insn_cost.
12553         * combine.c (uid_insn_cost): Adjust comment.
12554         (combine_validate_cost): Adjust comment.  Use pattern_cost instead
12555         of insn_rtx_cost
12556         (combine_instructions): Use insn_cost instead of insn_rtx_cost.
12557         * dse.c (find_shift_sequence): Ditto.
12558         * ifcvt.c (cheap_bb_rtx_cost_p): Ditto.
12559         (bb_valid_for_noce_process_p): Use pattern_cost.
12560         * rtl.h (insn_rtx_cost): Delete.
12561         (pattern_cost): New prototype.
12562         (insn_cost): New prototype.
12563         * rtlanal.c (insn_rtx_cost): Rename to...
12564         (pattern_cost): ... this.
12565         (insn_cost): New.
12566
12567 2017-10-09  Uros Bizjak  <ubizjak@gmail.com>
12568
12569         * config/i386/i386.md (*jcc_2): Remove insn pattern.
12570         (*jcc<mode>_0_r_i387): Ditto.
12571         (*jccxf_r_i387): Ditto.
12572         (*jcc<mode>_r_i387): Ditto.
12573         (*jccu<mode>_r_i387): Ditto.
12574         (*jcc<X87MODEF:mode>_<SWI24:mode>_r_i387): Ditto.
12575         (*jcc): Rename from *jcc_1.
12576
12577 2017-10-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
12578
12579         * config/rs6000/rs6000-p8swap.c (rs6000_analyze_swaps): Process
12580         deferred rescans after the lvx/stvx recombination pre-pass.
12581
12582 2017-10-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
12583
12584         * config/rs6000/amo.h: New include file to provide ISA 3.0 atomic
12585         memory operation instruction support.
12586         * config.gcc (powerpc*-*-*): Include amo.h as an extra header.
12587         (rs6000-ibm-aix[789]*): Likewise.
12588         * doc/extend.texi (PowerPC Atomic Memory Operation Functions):
12589         Document new functions.
12590
12591 2017-10-09  Richard Biener  <rguenther@suse.de>
12592
12593         PR tree-optimization/82397
12594         * tree-data-ref.c (data_ref_compare_tree): Make sure to return
12595         equality only for semantically equal trees.
12596
12597 2017-10-09  Richard Biener  <rguenther@suse.de>
12598
12599         PR tree-optimization/82449
12600         * sese.c (scev_analyzable_p): Check whether the SCEV is linear.
12601         * tree-chrec.h (evolution_function_is_constant_p): Adjust to
12602         allow constant addresses.
12603         * tree-chrec.c (scev_is_linear_expression): Constant evolutions
12604         are linear.
12605
12606 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12607
12608         * config/s390/s390-builtins.def (vec_nabs, vec_vfi): Fix builtin
12609         flags.
12610
12611 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12612
12613         PR target/82463
12614         * config/s390/vecintrin.h (vec_madd, vec_msub): Fix macro
12615         definitions.
12616
12617 2017-10-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12618
12619         PR target/82465
12620         * config/s390/s390-builtins.def (vec_sqrt): Fix builtin flags.
12621
12622 2017-10-09  Jakub Jelinek  <jakub@redhat.com>
12623
12624         PR target/82464
12625         * config/s390/s390-builtins.def (s390_vec_xor_flt_a,
12626         s390_vec_xor_flt_b, s390_vec_xor_flt_c): New.
12627
12628 2017-10-09  Richard Sandiford  <richard.sandiford@linaro.org>
12629
12630         * wide-int.h (WI_BINARY_OPERATOR_RESULT): New macro.
12631         (WI_BINARY_PREDICATE_RESULT): Likewise.
12632         (wi::binary_traits::operator_result): New type.
12633         (wi::binary_traits::predicate_result): Likewise.
12634         (generic_wide_int::operator~, unary generic_wide_int::operator-)
12635         (generic_wide_int::operator==, generic_wide_int::operator!=)
12636         (generic_wide_int::operator&, generic_wide_int::and_not)
12637         (generic_wide_int::operator|, generic_wide_int::or_not)
12638         (generic_wide_int::operator^, generic_wide_int::operator+
12639         (binary generic_wide_int::operator-, generic_wide_int::operator*):
12640         Delete.
12641         (operator~, unary operator-, operator==, operator!=, operator&)
12642         (operator|, operator^, operator+, binary operator-, operator*): New
12643         functions.
12644         * expr.c (get_inner_reference): Use wi::bit_and_not.
12645         * fold-const.c (fold_binary_loc): Likewise.
12646         * ipa-prop.c (ipa_compute_jump_functions_for_edge): Likewise.
12647         * tree-ssa-ccp.c (get_value_from_alignment): Likewise.
12648         (bit_value_binop): Likewise.
12649         * tree-ssa-math-opts.c (find_bswap_or_nop_load): Likewise.
12650         * tree-vrp.c (zero_nonzero_bits_from_vr): Likewise.
12651         (extract_range_from_binary_expr_1): Likewise.
12652         (masked_increment): Likewise.
12653         (simplify_bit_ops_using_ranges): Likewise.
12654
12655 2017-10-09  Martin Jambor  <mjambor@suse.cz>
12656
12657         PR hsa/82416
12658         * hsa-common.h (hsa_op_with_type): New method extend_int_to_32bit.
12659         * hsa-gen.c (hsa_extend_inttype_to_32bit): New function.
12660         (hsa_type_for_scalar_tree_type): Use it.  Always force min32int for
12661         COMPLEX types.
12662         (hsa_fixup_mov_insn_type): New function.
12663         (hsa_op_with_type::get_in_type): Use it.
12664         (hsa_build_append_simple_mov): Likewise.  Allow sub-32bit
12665         immediates in an assert.
12666         (hsa_op_with_type::extend_int_to_32bit): New method.
12667         (gen_hsa_insns_for_bitfield): Fixup instruction and intermediary
12668         types.  Convert to dest type if necessary.
12669         (gen_hsa_insns_for_bitfield_load): Fixup load type if necessary.
12670         (reg_for_gimple_ssa): Pass false as min32int to
12671         hsa_type_for_scalar_tree_type.
12672         (gen_hsa_addr): Fixup type when creating addresable temporary.
12673         (gen_hsa_cmp_insn_from_gimple): Extend operands if necessary.
12674         (gen_hsa_unary_operation): Extend operands and convert to dest type if
12675         necessary.  Call hsa_fixup_mov_insn_type.
12676         (gen_hsa_binary_operation): Changed operand types to hsa_op_with_type,
12677         extend operands and convert to dest type if necessary.
12678         (gen_hsa_insns_for_operation_assignment): Extend operands and convert
12679         to dest type if necessary.
12680         (set_output_in_type): Call hsa_fixup_mov_insn_type.  Just ude dest
12681         if conversion nt necessary and size matches.
12682         (gen_hsa_insns_for_load): Call hsa_fixup_mov_insn_type, convert
12683         to dest type if necessary.
12684         (gen_hsa_insns_for_store): Call hsa_fixup_mov_insn_type.
12685         (gen_hsa_insns_for_switch_stmt): Likewise. Also extend operands if
12686         necessary.
12687         (gen_hsa_clrsb): Likewise.
12688         (gen_hsa_ffs): Likewise.
12689         (gen_hsa_divmod): Extend operands and convert to dest type if
12690         necessary.
12691         (gen_hsa_atomic_for_builtin): Change type of op to hsa_op_with_type.
12692
12693 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
12694
12695         * config/rs6000/rs6000.md (conditional branch): Clean up formatting.
12696         Remove empty default arguments.  Use a brace block as output
12697         statement.
12698         (conditional return): Ditto.
12699         (jump): Ditto.
12700         (indirect_jump): Ditto.  Use b%T0 instead of bctr/blr.
12701         (tablejump, tablejumpsi, tablejumpdi, *tablejump<mode>_internal1):
12702         Ditto.
12703         (group_ending_nop): Ditto.
12704         (doloop_end): Ditto.
12705         (ctr<mode>, ctr<mode>_internal1, ctr<mode>_internal2): Ditto.
12706         (splitters for those): Ditto.
12707
12708 2017-10-08  Segher Boessenkool  <segher@kernel.crashing.org>
12709
12710         * config/rs6000/rs6000-string.c (expand_strncmp_align_check): Invert
12711         a conditional jump (and the compare for it) so that pc_rtx is the
12712         last operand.
12713         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Adjust
12714         for the deleted and renamed ctr<mode>_internal[234] patterns.
12715         * config/rs6000/rs6000.md: Delete second conditional branch pattern.
12716         Delete second conditional return pattern.
12717         (ctr<mode>_internal2): Delete this second bdnz pattern.
12718         (ctr<mode>_internal3): Rename to ctr<mode>_internal2.
12719         (ctr<mode>_internal4): Delete this second bdz pattern.
12720
12721 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
12722
12723         * tree-outof-ssa.h (ssaexpand): Add partitions_for_undefined_values.
12724         (always_initialized_rtx_for_ssa_name_p): New predicate.
12725         * tree-outof-ssa.c (remove_ssa_form): Initialize new field of SA.
12726         (finish_out_of_ssa): Free new field of SA.
12727         * tree-ssa-coalesce.h (get_undefined_value_partitions): Declare.
12728         * tree-ssa-coalesce.c: Include tree-ssa.h.
12729         (get_parm_default_def_partitions): Remove extern keyword.
12730         (get_undefined_value_partitions): New function.
12731         * expr.c (expand_expr_real_1) <expand_decl_rtl>: For a SSA_NAME, do
12732         not set SUBREG_PROMOTED_VAR_P on the sub-register if it may contain
12733         uninitialized bits.
12734         * loop-iv.c (iv_get_reaching_def): Disqualify all subregs.
12735
12736 2017-10-08  Eric Botcazou  <ebotcazou@adacore.com>
12737
12738         * builtins.def (BUILT_IN_SETJMP): Revert latest change.
12739
12740 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
12741
12742         * config/i386/i386.c (ix86_expand_set_or_movmem): Disable 512bit loops
12743         for targets that preffer 128bit.
12744
12745 2017-10-08  Jan Hubicka  <hubicka@ucw.cz>
12746
12747         * config/i386/i386.c (has_dispatch): Disable for Ryzen.
12748
12749 2017-10-08  Olivier Hainque  <hainque@adacore.com>
12750
12751         * config/arm/arm.c (arm_set_return_address): Use MEM_VOLATILE_P
12752         on the target mem instead of RTX_FRAME_RELATED_P on the insn to
12753         prevent DSE.
12754         (thumb_set_return_address): Likewise.
12755
12756 2017-10-08  Olivier Hainque  <hainque@adacore.com>
12757
12758         * common/config/arm/arm-common.c (arm_except_unwind_info):
12759         Handle DWARF2_UNWIND_INFO.
12760
12761 2017-10-07  Michael Collison <michael.collison@arm.com>
12762
12763         * config/aarch64/aarch64.md (*aarch64_reg_<optab>_minus<mode>3):
12764         New pattern.
12765
12766 2017-10-07  Eric Botcazou  <ebotcazou@adacore.com>
12767
12768         * builtins.def (BUILT_IN_SETJMP): Declare as library builtin instead
12769         of GCC builtin if DONT_USE_BUILTIN_SETJMP is defined.
12770         * except.c (sjlj_emit_function_enter): If DONT_USE_BUILTIN_SETJMP is
12771         defined, force the creation of a new block for a dispatch label.
12772
12773 2017-10-07  Jan Hubicka  <hubicka@ucw.cz>
12774
12775         * invoke.texi (Wsuggest-attribute=cold): Document.
12776         * common.opt (Wsuggest-attribute=cold): New
12777         * ipa-pure-const.c (warn_function_cold): New function.
12778         * predict.c (compute_function_frequency): Use it.
12779         * predict.h (warn_function_cold): Declare.
12780
12781 2017-10-06  Jan Hubicka  <hubicka@ucw.cz>
12782
12783         * tree-switch-conversion.c (do_jump_if_equal, emit_cmp_and_jump_insns):
12784         Update profile.
12785
12786 2017-10-06  Martin Liska  <mliska@suse.cz>
12787
12788         * sanopt.c (struct sanopt_tree_triplet_hash): Remove inline
12789         keyword for member functions.
12790         (struct sanopt_tree_couple): New struct.
12791         (struct sanopt_tree_couple_hash): New function.
12792         (struct sanopt_ctx): Add new hash_map.
12793         (has_dominating_ubsan_ptr_check): New function.
12794         (record_ubsan_ptr_check_stmt): Likewise.
12795         (maybe_optimize_ubsan_ptr_ifn): Likewise.
12796         (sanopt_optimize_walker): Handle IFN_UBSAN_PTR.
12797         (pass_sanopt::execute): Handle also SANITIZE_POINTER_OVERFLOW.
12798
12799 2017-10-06  Sudakshina Das  <sudi.das@arm.com>
12800
12801         PR target/82440
12802         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Only call
12803         aarch64_simd_valid_immediate on CONST_VECTORs.
12804         (aarch64_reg_or_bic_imm): Likewise.
12805
12806 2017-10-06  Wilco Dijkstra  <wdijkstr@arm.com>
12807
12808         PR rtl-optimization/82396
12809         * haifa-sched.c (ready_sort_real): Disable qsort checking.
12810
12811 2017-10-06  Sebastian Pop  <sebpop@gmail.com>
12812
12813         * graphite-dependences.c (scop_get_reads): Move code to...
12814         (scop_get_must_writes): Move code to...
12815         (scop_get_may_writes): Move code to...
12816         (scop_get_reads_and_writes): ... here.
12817         (scop_get_dependences): Call scop_get_reads_and_writes.
12818
12819 2017-10-06  Jakub Jelinek  <jakub@redhat.com>
12820
12821         PR tree-optimization/82434
12822         * fold-const.h (can_native_encode_type_p,
12823         can_native_encode_string_p): Remove.
12824         * fold-const.c (native_encode_int): Formatting fixes.  If ptr is NULL,
12825         don't encode anything, just return what would be otherwise returned.
12826         (native_encode_fixed, native_encode_complex, native_encode_vector):
12827         Likewise.
12828         (native_encode_string): Likewise.  Inline by hand
12829         can_native_encode_string_p.
12830         (can_native_encode_type_p): Remove.
12831         (can_native_encode_string_p): Remove.
12832         * tree-vect-stmts.c (vectorizable_store): Instead of testing just
12833         STRING_CSTs using can_native_encode_string_p, test all
12834         CONSTANT_CLASS_P values using native_encode_expr with NULL ptr.
12835         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Remove last
12836         argument from native_encode_expr.
12837         (rhs_valid_for_store_merging_p): Use native_encode_expr with NULL ptr.
12838         (pass_store_merging::execute): Don't unnecessarily look for 3 stmts,
12839         but just 2.
12840
12841 2017-10-06  Richard Biener  <rguenther@suse.de>
12842
12843         PR tree-optimization/82397
12844         * tree-vect-data-refs.c (dr_group_sort_cmp): Do not use
12845         operand_equal_p but rely on data_ref_compare_tree for detecting
12846         equalities.
12847         (vect_analyze_data_ref_accesses): Use data_ref_compare_tree
12848         to match up with dr_group_sort_cmp.
12849
12850 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12851
12852         PR target/82322
12853         * config/s390/s390-builtins.def (s390_vfi): Define new overloaded
12854         builtin.
12855         * config/s390/s390-builtin-types.def: Regenerate.
12856
12857 2017-10-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
12858
12859         PR target/82317
12860         * config/s390/s390-builtin-types.def: Regenerate.
12861         * config/s390/s390-builtins.def (s390_vfmaxdb_4, s390_vfmindb_4):
12862         Change flag from B_VXE to B_VX.
12863         (s390_vec_min_dbl): Remove B_VXE flag.
12864
12865 2017-10-06  Richard Biener  <rguenther@suse.de>
12866
12867         * graphite-isl-ast-to-gimple.c: Include ssa.h and tree-ssa.h.
12868         (translate_isl_ast_to_gimple::translate_pending_phi_nodes,
12869         translate_isl_ast_to_gimple::is_valid_rename,
12870         translate_isl_ast_to_gimple::get_rename,
12871         translate_isl_ast_to_gimple::get_def_bb_for_const,
12872         translate_isl_ast_to_gimple::get_new_name,
12873         translate_isl_ast_to_gimple::collect_all_ssa_names,
12874         translate_isl_ast_to_gimple::copy_loop_phi_args,
12875         translate_isl_ast_to_gimple::collect_all_ssa_names,
12876         translate_isl_ast_to_gimple::copy_loop_phi_args,
12877         translate_isl_ast_to_gimple::copy_loop_phi_nodes,
12878         translate_isl_ast_to_gimple::add_close_phis_to_merge_points,
12879         translate_isl_ast_to_gimple::add_close_phis_to_outer_loops,
12880         translate_isl_ast_to_gimple::copy_loop_close_phi_args,
12881         translate_isl_ast_to_gimple::copy_loop_close_phi_nodes,
12882         translate_isl_ast_to_gimple::copy_cond_phi_args,
12883         translate_isl_ast_to_gimple::copy_cond_phi_nodes,
12884         translate_isl_ast_to_gimple::edge_for_new_close_phis,
12885         translate_isl_ast_to_gimple::add_phi_arg_for_new_expr,
12886         translate_isl_ast_to_gimple::rename_uses,
12887         translate_isl_ast_to_gimple::rename_all_uses): Remove.
12888         (translate_isl_ast_to_gimple::get_rename_from_scev): Simplify.
12889         (set_rename_for_each_def): Likewise.
12890         (graphite_copy_stmts_from_block): Handle debug stmt resetting
12891         here.  Handle rewriting SCEV analyzable uses here.
12892         (copy_bb_and_scalar_dependences): Generate code for PHI
12893         copy-in/outs.
12894         (graphite_regenerate_ast_isl): Adjust.
12895         * graphite-scop-detection.c (trivially_empty_bb_p): Move to sese.[ch].
12896         (add_write, add_read): New functions.
12897         (build_cross_bb_scalars_def): Use it and simplify.
12898         (build_cross_bb_scalars_use): Likewise.
12899         (graphite_find_cross_bb_scalar_vars): Inline into...
12900         (try_generate_gimple_bb): ...here.  Add dependences for PHIs,
12901         simulating out-of-SSA.  Compute liveout and add dependencies.
12902         (build_scops): Force an empty entry block.
12903         * sese.h (sese_info_t::liveout, sese_info_t::debug_liveout): New
12904         members.
12905         (sese_build_liveouts): Declare.
12906         (sese_trivially_empty_bb_p): Likewise.
12907         * sese.c (sese_build_liveouts_bb): Properly handle PHIs,
12908         compute liveout and debug_liveout.
12909         (sese_bad_liveouts_use): Remove.
12910         (sese_reset_debug_liveouts_bb): Likewise.
12911         (sese_reset_debug_liveouts): Rewrite in terms of debug_liveout.
12912         (sese_build_liveouts): Build liveout and debug_liveout and store
12913         it in region.
12914         (new_sese_info): Adjust.
12915         (free_sese_info): Likewise.
12916         (sese_insert_phis_for_liveouts): Reset debug stmts from here,
12917         do not build liveout here.
12918         (move_sese_in_condition): Adjust region entry.
12919         (scev_analyzable_p): Match up with chrec_apply requirements.
12920         (sese_trivially_empty_bb_p): New.
12921         * tree-into-ssa.c (get_reaching_def): Properly support generating
12922         default-defs for incremental rewrite of anonymous names.
12923
12924 2017-10-06  Richard Biener  <rguenther@suse.de>
12925
12926         * graphite-sese-to-poly.c (extract_affine): For casts increasing
12927         precision do not perform modulo reduction.
12928
12929 2017-10-06  Richard Biener  <rguenther@suse.de>
12930
12931         PR tree-optimization/82436
12932         * tree-vect-slp.c (vect_supported_load_permutation_p): More
12933         conservatively choose the vectorization factor when checking
12934         whether we can perform the required load permutation.
12935         (vect_transform_slp_perm_load): Assert when we may not fail.
12936
12937 2017-10-05  Segher Boessenkool  <segher@kernel.crashing.org>
12938
12939         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Correct error
12940         message for incompatible -msdata=* and -mcall-* options.
12941
12942 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
12943
12944         * config/i386/i386.c (ia32_multipass_dfa_lookahead): Default to issue
12945         rate for post-reload scheduling.
12946
12947 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
12948
12949         * doc/sourcebuild.texi (vect_sizes_16B_8B, vect_sizes_32B_16B): New.
12950
12951 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
12952
12953         * config/i386/i386.c (znver1_cost): Set branch_cost to 3 (instead of 2)
12954         to improve monte carlo in scimark.
12955
12956 2017-10-05  Jan Hubicka <hubicka@ucw.cz>
12957
12958         * config/i386/i386.c (ix86_size_cost, i386_cost, i486_cost,
12959         pentium_cost, lakemont_cost, pentiumpro_cost, geode_cost, k6_cost,
12960         athlon_cost, k8_cost, amdfam10_cost, btver1_cost, btver2_cost,
12961         pentium4_cost, nocona_cost): Set reassociation width to 1.
12962         (bdver1_cost, bdver2_cost, bdver3_cost, bdver4_cost): Set reassociation
12963         width to 2 for fp operations and 1 otherwise.
12964         (znver1_cost): Set scalar reassoc width to 4 and vector to 3 and 6
12965         for int and fp.
12966         (atom_cost): Set reassociation width to 2.
12967         (slm_cost, generic_cost): Set fp reassociation width
12968         to 2 and 1 otherwise.
12969         (intel_cost): Set fp reassociation width to 4 and 1 otherwise.
12970         (core_cost): Set fp reassociation width to 4 and vector to 2.
12971         (ix86_reassociation_width): Rewrite using cost table; special case
12972         plus/minus on Zen; honor X86_TUNE_SSE_SPLIT_REGS
12973         and TARGET_AVX128_OPTIMAL.
12974         * config/i386/i386.h (processor_costs): Add
12975         reassoc_int, reassoc_fp, reassoc_vec_int, reassoc_vec_fp.
12976         (TARGET_VECTOR_PARALLEL_EXECUTION, TARGET_REASSOC_INT_TO_PARALLEL,
12977         TARGET_REASSOC_FP_TO_PARALLEL): Remove.
12978         * x86-tune.def (X86_TUNE_REASSOC_INT_TO_PARALLEL): Remove.
12979         (X86_TUNE_REASSOC_FP_TO_PARALLEL): Remove.
12980         (X86_TUNE_VECTOR_PARALLEL_EXECUTION):  Remove.
12981
12982 2017-10-05  Nathan Sidwell  <nathan@acm.org>
12983
12984         * doc/invoke.texi (Wparentheses): Document C++ MVP behaviour.
12985
12986 2017-10-05  Tamar Christina  <tamar.christina@arm.com>
12987
12988         * config/arm/arm.c (arm_test_fpu_data): New.
12989         (arm_run_selftests): Call arm_test_fpu_data.
12990
12991 2017-10-04  Nathan Sidwell  <nathan@acm.org>
12992
12993         * toplev.c (toplev::main): Remove excess parens on pretty_printer
12994         decl.
12995         * caller-save.c (insert_save): Remove excess parens on TO_SAVE parm.
12996
12997 2017-10-04  Sudakshina Das  <sudi.das@arm.com>
12998
12999         * config/aarch64/aarch64-protos.h (enum simd_immediate_check): New
13000         check type for aarch64_simd_valid_immediate.
13001         (aarch64_output_simd_mov_immediate): Update prototype.
13002         (aarch64_simd_valid_immediate): Update prototype.
13003         * config/aarch64/aarch64-simd.md (orr<mode>3): modified pattern to add
13004         support for ORR-immediate.
13005         (and<mode>3): modified pattern to add support for BIC-immediate.
13006         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Function
13007         now checks for valid immediate for BIC and ORR based on new enum
13008         argument.
13009         (aarch64_output_simd_mov_immediate): Function now used to output
13010         BIC/ORR imm as well based on new enum argument.
13011         * config/aarch64/constraints.md (Do): New vector immediate constraint.
13012         (Db) : Likewise.
13013         * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): New predicate.
13014         (aarch64_reg_or_bic_imm): Likewise.
13015
13016 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13017
13018         * config/s390/vx-builtins.md ("vec_mergeh<mode>")
13019         ("vec_mergel<mode>"): Change mode iterator to V_128_NOSINGLE.
13020
13021 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
13022
13023         Revert r253399:
13024
13025         PR rtl-optimization/82396
13026         * haifa-sched.c (autopref_multipass_init): Simplify
13027         initialization.
13028         (autopref_rank_data): Simplify sort order.
13029         * sched-int.h (autopref_multipass_data_): Remove
13030         multi_mem_insn_p, min_offset and max_offset.
13031
13032 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13033
13034         * doc/sourcebuild.texi: Document vect_peeling_profitable.
13035
13036 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13037
13038         * doc/sourcebuild.texi: Document vect_intdouble_cvt and
13039         vect_doubleint_cvt.
13040
13041 2017-10-04  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13042
13043         * doc/sourcebuild.texi: Document vect_long_mult.
13044
13045 2017-10-04  Richard Sandiford  <richard.sandiford@linaro.org>
13046
13047         PR tree-optimization/82413
13048         * fold-const.c (build_range_check): Use widest_int when comparing
13049         the maximum ETYPE value with HIGH.
13050
13051 2017-10-04  Wilco Dijkstra  <wdijkstr@arm.com>
13052
13053         PR rtl-optimization/82396
13054         * haifa-sched.c (autopref_multipass_init): Simplify
13055         initialization.
13056         (autopref_rank_data): Simplify sort order.
13057         * sched-int.h (autopref_multipass_data_): Remove
13058         multi_mem_insn_p, min_offset and max_offset.
13059
13060 2017-10-04  Jakub Jelinek  <jakub@redhat.com>
13061
13062         PR tree-optimization/82381
13063         * tree-ssa-reassoc.c (sort_by_operand_rank): Check for different
13064         oeN->rank first.  Return 1 or -1 if one op is SSA_NAME and the other
13065         is not.
13066
13067         PR tree-optimization/82374
13068         * omp-low.c (create_omp_child_function): Copy DECL_ATTRIBUTES,
13069         DECL_FUNCTION_SPECIFIC_OPTIMIZATION,
13070         DECL_FUNCTION_SPECIFIC_TARGET and DECL_FUNCTION_VERSIONED from
13071         current_function_decl to the new decl.
13072
13073 2017-10-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
13074
13075         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_2_HW): Define new
13076         helper macro for IEEE float128 hardware built-in functions.
13077         (SQRTF128_ODD): Add built-in functions with the round-to-odd
13078         semantics.
13079         (TRUNCF128_ODD): Likewise.
13080         (ADDF128_ODD): Likewise.
13081         (SUBF128_ODD): Likewise.
13082         (MULF128_ODD): Likewise.
13083         (DIVF128_ODD): Likewise.
13084         (FMAF128_ODD): Likewise.
13085         * config/rs6000/rs6000.md (UNSPEC_ROUND_TO_ODD): Rename to
13086         UNSPEC_TRUNC_ROUND_TO_ODD.
13087         (UNSPEC_TRUNC_ROUND_TO_ODD): Likewise.
13088         (UNSPEC_ADD_ROUND_TO_ODD): New unspec codes for the IEEE 128-bit
13089         floating point round to odd instructions.
13090         (UNSPEC_SUB_ROUND_TO_ODD): Likewise.
13091         (UNSPEC_MUL_ROUND_TO_ODD): Likewise.
13092         (UNSPEC_DIV_ROUND_TO_ODD): Likewise.
13093         (UNSPEC_FMA_ROUND_TO_ODD): Likewise.
13094         (UNSPEC_SQRT_ROUND_TO_ODD): Likewise.
13095         (trunc<mode>sf2_hw): Change the truncate with round to odd
13096         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.
13097         (add<mode>3_odd): Add insns for IEEE 128-bit floating point round
13098         to odd hardware instructions.
13099         (sub<mode>3_odd): Likewise.
13100         (mul<mode>3_odd): Likewise.
13101         (div<mode>3_odd): Likewise.
13102         (sqrt<mode>2_odd): Likewise.
13103         (fma<mode>4_odd): Likewise.
13104         (fms<mode>4_odd): Likewise.
13105         (nfma<mode>4_odd): Likewise.
13106         (nfms<mode>4_odd): Likewise.
13107         (trunc<mode>df2_odd): Change the truncate with round to odd
13108         expansion to use UNSPEC_TRUNC_ROUND_TO_ODD.  Add a generator
13109         function.
13110         * doc/extend.texi (PowerPC built-in functions): Update documentation
13111         for existing IEEE float128-bit built-in functions.  Add built-in
13112         functions that generate the IEEE 128-bit floating point round to
13113         odd instructions.
13114
13115 2017-10-03  Segher Boessenkool  <segher@kernel.crashing.org>
13116
13117         PR rtl-optimization/77729
13118         * simplify-rtx.c (simplify_binary_operation_1): Delete the (X&C1)|C2
13119         to (X&(C1&~C2))|C2 transformations.
13120
13121 2017-10-03  Martin Jambor  <mjambor@suse.cz>
13122
13123         PR tree-optimization/82363
13124         * tree-sra.c (propagate_subaccesses_across_link): In unrecoverable
13125         mismatch, mark lacc written regardless of racc.
13126
13127 2017-10-03  Jakub Jelinek  <jakub@redhat.com>
13128
13129         PR tree-optimization/82381
13130         * tree-ssa-reassoc.c (sort_by_operand_rank): Don't check
13131         stmt_to_insert nor wheather SSA_NAMEs are default defs.
13132         Return 1 or -1 if one of bba and bbb is NULL. If bb_rank is equal,
13133         fallthrough into reassoc_stmt_dominates_stmt_p.
13134
13135         PR target/82386
13136         * combine.c (combine_instructions): Don't combine in unreachable
13137         basic blocks.
13138
13139 2017-10-02  Peter Bergner  <bergner@vnet.ibm.com>
13140
13141         PR target/80210
13142         * config/rs6000/rs6000.c (rs6000_option_override_internal): Rewrite
13143         function to not use the have_cpu variable.  Do not set cpu_index,
13144         rs6000_cpu_index or rs6000_tune_index if we end up using TARGET_DEFAULT
13145         or the default cpu.
13146         (rs6000_valid_attribute_p): Remove duplicate initializations of
13147         old_optimize and func_optimize.
13148         (rs6000_pragma_target_parse): Call rs6000_activate_target_options ().
13149         (rs6000_activate_target_options): Make global.
13150         * config/rs6000/rs6000-protos.h (rs6000_activate_target_options): Add
13151         prototype.
13152
13153 2017-10-02  Jakub Jelinek  <jakub@redhat.com>
13154
13155         * tree-dfa.c (get_ref_base_and_extent): Set *pmax_size to -1
13156         if *poffset + *pmax_size overflows in HOST_WIDE_INT.
13157         Set *poffset to 0 and *psize and *pmax_size to -1 if
13158         *poffset + *psize overflows in HOST_WIDE_INT.
13159
13160         PR tree-optimization/82387
13161         PR tree-optimization/82388
13162         PR tree-optimization/82389
13163         * tree-ssa-dse.c (dse_classify_store): Test byte_tracking_enabled
13164         instead of live_bytes non-NULL.
13165
13166 2017-10-02  Georg-Johann Lay  <avr@gjlay.de>
13167
13168         PR target/41076
13169         * confg/avr/avr.md (*iorhi3.ashift8-ext.zerox): Add "r,r,0"
13170         alternative.
13171
13172 2017-10-02  Richard Biener  <rguenther@suse.de>
13173
13174         * graphite-isl-ast-to-gimple.c (set_codegen_error): With
13175         -fchecking and --param graphite-allow-codegen-errors=0 ICE.
13176         * params.def (PARAM_GRAPHITE_ALLOW_CODEGEN_ERRORS): New param.
13177
13178 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
13179
13180         * tree.h (wi::int_traits <const_tree>::decompose): Assert that the
13181         requested precision matches the type's.
13182         * calls.c (alloc_max_size): Calculate the new candidate size as
13183         a widest_int and use wi::to_widest when comparing it with the
13184         current candidate size.
13185         * gimple-ssa-warn-alloca.c (pass_walloca::execute): Compare with
13186         zero rather than integer_zero_node.
13187         * match.pd: Check for a no-op conversion before using wi::add
13188         rather than after.  Use tree_to_uhwi when summing small shift
13189         counts into an unsigned int.
13190
13191 2017-10-02  Richard Sandiford  <richard.sandiford@linaro.org>
13192             Alan Hayward  <alan.hayward@arm.com>
13193             David Sherwood  <david.sherwood@arm.com>
13194
13195         PR target/71307
13196         * config/aarch64/aarch64.h (POINTER_AND_FP_REGS): New reg class.
13197         (REG_CLASS_NAMES, REG_CLASS_CONTENTS): Update accordingly.
13198         * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
13199         POINTER_AND_FP_REGS.
13200
13201 2017-10-02  Richard Biener  <rguenther@suse.de>
13202
13203         PR tree-optimization/82355
13204         * graphite-isl-ast-to-gimple.c (build_iv_mapping): Also build
13205         a mapping for the enclosing loop but avoid generating one for
13206         the loop tree root.
13207         (copy_bb_and_scalar_dependences): Remove premature codegen
13208         error on PHIs in blocks duplicated into multiple places.
13209         * graphite-scop-detection.c
13210         (scop_detection::stmt_has_simple_data_refs_p): For a loop not
13211         in the region use it as loop and nest to analyze the DR in.
13212         (try_generate_gimple_bb): Likewise.
13213         * graphite-sese-to-poly.c (extract_affine_chrec): Adjust.
13214         (add_loop_constraints): For blocks in a loop not in the region
13215         create a dimension with a single iteration.
13216         * sese.h (gbb_loop_at_index): Remove assert.
13217
13218 2017-10-01  Kevin Buettner  <kevinb@redhat.com>
13219
13220         * omp-expand.c (adjust_context_scope): New function.
13221         (expand_parallel_call): Call adjust_context_scope.
13222
13223 2017-10-01  Jeff Law  <law@redhat.com>
13224
13225         * tree-ssa-dom.c (optimize_stmt): Make this a method within the
13226         dom_opt_dom_walker class with direct access to private members.
13227         Add comments.  Call test_for_singularity.
13228         (dom_opt_dom_walker::before_dom_children): Corresponding changes.
13229         (dom_opt_dom_walker::after_dom_children): Do not lazily initialize
13230         m_dummy_cond anymore.
13231         (class dom_opt_dom_walker): Initialize m_dummy_cond member in the
13232         class ctor.
13233         (pass_dominator:execute): Build the dummy_cond here and pass it
13234         to the dom_opt_dom_walker ctor.
13235         (test_for_singularity): New function.
13236
13237 2017-09-30  Krister Walfridsson  <krister.walfridsson@gmail.com>
13238             Maya Rashish  <coypu@sdf.org>
13239
13240         * config.gcc (*-*-netbsd*): New variable nbsd_tm_file containing
13241         netbsd.h, netbsd-stdint.h, and netbsd-elf.h.
13242         (alpha*-*-netbsd*) Use nbsd_tm_file.
13243         (arm*-*-netbsdelf*) Likewise.
13244         (i[34567]86-*-netbsdelf*) Likewise.
13245         (x86_64-*-netbsd*) Likewise.
13246         (mips*-*-netbsd*) Likewise.
13247         (powerpc-*-netbsd*) Likewise.
13248         (sh*-*-netbsd*) Likewise.
13249         (sparc-*-netbsdelf*) Likewise.
13250         (sparc64-*-netbsd*) Likewise.
13251         (m68k*-*-netbsdelf*) Use nbsd_tm_file and add CHAR_FAST8/SHORT_FAST16
13252         to tm_defines.
13253         (vax-*-netbsdelf*) Likewise.
13254         * config/netbsd-stdint.h (INT_FAST8_TYPE): Check CHAR_FAST8.
13255         (UINT_FAST8_TYPE) Likewise.
13256         (INT_FAST16_TYPE) Check CHAR_FAST16.
13257         (UINT_FAST16_TYPE) Likewise.
13258
13259 2017-09-30  Jakub Jelinek  <jakub@redhat.com>
13260
13261         PR target/82361
13262         * config/i386/i386.md
13263         (TARGET_USE_8BIT_IDIV zext divmodsi4 splitter): New define_split.
13264         (divmodsi4_zext_1, divmodsi4_zext_2, *divmodsi4_zext_1,
13265         *divmodsi4_zext_2): New define_insn_and_split.
13266         (*divmodsi4_noext_zext_1, *divmodsi4_noext_zext_2): New define_insn.
13267         (TARGET_USE_8BIT_IDIV zext udivmodsi4 splitter): New define_split.
13268         (udivmodsi4_zext_1, udivmodsi4_zext_2, *udivmodsi4_zext_1,
13269         *udivmodsi4_zext_2, *udivmodsi4_pow2_zext_1, *udivmodsi4_pow2_zext_2):
13270         New define_insn_and_split.
13271         (*udivmodsi4_noext_zext_1, *udivmodsi4_noext_zext_2): New define_insn.
13272         * config/i386/i386.c (ix86_split_idivmod): Handle operands[0] or
13273         operands[1] having DImode when mode is SImode.
13274
13275         * config/i386/i386.c (ix86_split_idivmod): Use mode instead of
13276         always SImode for DIV and MOD in REG_EQUAL notes.
13277
13278 2017-09-29  Yury Gribov  <tetra2005@gmail.com>
13279
13280         PR middle-end/82319
13281         * match.pd: Fix handling of NaNs in pattern.
13282
13283 2017-09-29  Jeff Law  <law@redhat.com>
13284
13285         * sbitmap.c (bitmap_bit_in_range_p): New function.
13286         * sbitmap.h (bitmap_bit_in_range_p): Prototype.
13287         * tree-ssa-dse.c (live_bytes_read): New function.
13288         (dse_classify_store): Ignore reads of dead bytes.
13289
13290         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Fix
13291         typos and whitespace errors.
13292         * config/i386/predicates.md (address_no_seg_operand): Likewise.
13293         * config/s390/s390.c (s390_emit_prologue): Likewise.
13294
13295 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
13296
13297         PR target/81481
13298         * ira-costs.c (scan_one_insn): Don't take into account PIC equiv
13299         with a symbol for LRA.
13300
13301 2017-09-29  Vladimir Makarov  <vmakarov@redhat.com>
13302
13303         PR rtl-optimization/82338
13304         * lra-constraints.c (inherit_in_ebb): Check usage_insns check.
13305
13306 2017-09-29  Alexander Monakov  <amonakov@ispras.ru>
13307
13308         * genmodes.c (calc_wider_mode): Suppress qsort macro.
13309         * system.h [CHECKING_P] (qsort): Redirect to qsort_chk.
13310         (qsort_chk): Declare.
13311         * vec.c [CHECKING_P] (qsort_chk_error): New static function.
13312         (qsort_chk): New function.
13313
13314 2017-09-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
13315
13316         PR tree-optimization/82337
13317         * gimple-ssa-strength-reduction.c (find_phi_def): Don't record a
13318         phi definition if the PHI result appears in an abnormal PHI.
13319         (find_basis_for_base_expr): Don't record a basis if the LHS of the
13320         basis appears in an abnormal PHI.
13321
13322 2017-09-29  Richard Biener  <rguenther@suse.de>
13323
13324         * graphite-isl-ast-to-gimple.c
13325         (translate_isl_ast_to_gimple::set_codegen_error): New function.
13326         (binary_op_to_tree): Use it.
13327         (get_rename_from_scev): Likewise.
13328         (copy_loop_phi_nodes): Likewise.
13329         (copy_bb_and_scalar_dependences): Likewise.
13330         (translate_pending_phi_nodes): Likewise.
13331
13332 2017-09-29  Jakub Jelinek  <jakub@redhat.com>
13333
13334         PR target/82339
13335         * config/i386/i386.md (*movdi_internal peephole2): New -Os peephole
13336         for movabsq $(i32 << shift), r64.
13337
13338 2017-09-28  Uros Bizjak  <ubizjak@gmail.com>
13339
13340         * config/i386/i386.c (ix86_print_operand_address_as): Do not check
13341         index when encoding %esp as %rsp to avoid 0x67 prefix.
13342
13343 2017-09-28  Sergey Shalnov  <Sergey.Shalnov@intel.com>
13344
13345         * config/i386/i386.md (*movsf_internal, *movdf_internal):
13346         Return 256-bit AVX modes for TARGET_PREFER_AVX256.
13347
13348 2017-09-28  Thomas Preud'homme  <thomas.preudhomme@arm.com>
13349
13350         * config/arm/arm.c (arm_option_override): Forbid ARMv8-M Security
13351         Extensions with more than 16 double VFP registers.
13352         (cmse_nonsecure_entry_clear_before_return): Remove second entry of
13353         to_clear_mask and all code related to it.  Replace the remaining
13354         entry by a sbitmap and adapt code accordingly.
13355
13356 2017-09-28  Henry Linjamäki  <henry.linjamaki@parmance.com>
13357
13358         * brig-builtins.def: Change pure attributes to const.
13359
13360 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
13361
13362         * config.gcc (default_gnu_indirect_function): Default to yes for
13363         sparc*-*-linux* with glibc.
13364
13365 2017-09-28  Joseph Myers  <joseph@codesourcery.com>
13366
13367         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor)
13368         (aarch64_elf_asm_destructor): Pass SECTION_NOTYPE to get_section
13369         when creating .init_array and .fini_array sections with priority
13370         specified.
13371
13372 2017-09-27  Christophe Lyon  <christophe.lyon@linaro.org>
13373
13374         PR target/71727
13375         * config/aarch64/aarch64.c
13376         (aarch64_builtin_support_vector_misalignment): Always return false
13377         when misalignment is unknown.
13378
13379 2017-09-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
13380
13381         * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Revise
13382         this function to return false if the definition used by the swap
13383         instruction is artificial, or if the memory address from which the
13384         constant value is loaded is not represented by a base address held
13385         in a register or if the base address register is a frame or stack
13386         pointer.  Additionally, return false if the base address of the
13387         loaded constant is a SYMBOL_REF but is not considered to be a
13388         constant.
13389         (replace_swapped_load_constant): New function.
13390         (rs6000_analyze_swaps): Add a new pass to replace a swap of a
13391         loaded constant vector with a load of a swapped constant vector.
13392
13393 2017-09-27  Carl Love  <cel@us.ibm.com>
13394
13395         * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
13396         (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
13397         * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
13398         fctiw instruction.
13399
13400 2017-09-27  Alexander Monakov  <amonakov@ispras.ru>
13401
13402         * haifa-sched.c (autopref_rank_for_schedule): Order 'irrelevant' insns
13403         first, always call autopref_rank_data otherwise.
13404
13405 2017-09-27  Richard Biener  <rguenther@suse.de>
13406
13407         * graphite-scop-detection.c (find_scop_parameters): Move
13408         loop bound handling ...
13409         (gather_bbs::before_dom_children): ... here, avoiding the need
13410         to build scop_info->loop_nest.
13411         (record_loop_in_sese): Remove.
13412         * sese.h (sese_info_t::loop_nest): Remove.
13413         * sese.c (new_sese_info): Do not allocate loop_nest.
13414         (free_sese_info): Do not free loop_nest.
13415
13416 2017-09-27  Jakub Jelinek  <jakub@redhat.com>
13417
13418         PR c++/82159
13419         * gimplify.c (gimplify_modify_expr): Don't optimize away zero sized
13420         lhs from calls if the lhs has addressable type.
13421
13422 2017-09-27  Richard Biener  <rguenther@suse.de>
13423
13424         * graphite.h (scop::max_alias_set): New member.
13425         * graphite-scop-detection.c: Remove references to non-existing
13426         --param in comments.
13427         (build_alias_sets): Record the maximum alias set used for drs.
13428         (build_scops): Support zero as unlimited for
13429         --param graphite-max-arrays-per-scop.
13430         * graphite-sese-to-poly.c (add_scalar_version_numbers): Remove
13431         and inline into ...
13432         (build_poly_sr_1): ... here.  Compute alias set based on the
13433         maximum alias set used for drs rather than
13434         PARAM_GRAPHITE_MAX_ARRAYS_PER_SCOP
13435
13436 2017-09-27  Richard Biener  <rguenther@suse.de>
13437
13438         * graphite-optimize-isl.c (get_schedule_for_node_st): Allow
13439         --param loop-block-tile-size=0 to disable tiling.
13440
13441 2017-09-27  Richard Biener  <rguenther@suse.de>
13442
13443         * doc/invoke.texi (graphite-max-bbs-per-function): Remove.
13444         (graphite-max-nb-scop-params): Document special value zero.
13445         * domwalk.h (dom_walker::STOP): New symbolical constant.
13446         (dom_walker::dom_walker): Add optional parameter for bb to
13447         RPO mapping.
13448         (dom_walker::~dom_walker): Declare.
13449         (dom_walker::before_dom_children): Document STOP return value.
13450         (dom_walker::m_user_bb_to_rpo): New member.
13451         (dom_walker::m_bb_to_rpo): Likewise.
13452         * domwalk.c (dom_walker::dom_walker): Compute bb to RPO
13453         mapping here if not provided by the user.
13454         (dom_walker::~dom_walker): Free bb to RPO mapping if not
13455         provided by the user.
13456         (dom_walker::STOP): Define.
13457         (dom_walker::walk): Do not compute bb to RPO mapping here.
13458         Support STOP return value from before_dom_children to stop
13459         walking.
13460         * graphite-optimize-isl.c (optimize_isl): If the schedule
13461         is the same still generate code if -fgraphite-identity
13462         or -floop-parallelize-all are given.
13463         * graphite-scop-detection.c: Include cfganal.h.
13464         (gather_bbs::gather_bbs): Get and pass through bb to RPO
13465         mapping.
13466         (gather_bbs::before_dom_children): Return STOP for BBs
13467         not in the region.
13468         (build_scops): Compute bb to RPO mapping and pass it to
13469         the domwalk.  Treat --param graphite-max-nb-scop-params=0
13470         as not limiting the number of params.
13471         * graphite.c (graphite_initialize): Remove limit on the
13472         number of basic-blocks in a function.
13473         * params.def (PARAM_GRAPHITE_MAX_BBS_PER_FUNCTION): Remove.
13474         (PARAM_GRAPHITE_MAX_NB_SCOP_PARAMS): Adjust to documented
13475         default value of 10.
13476
13477 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
13478
13479         * config/rs6000/vsx.md (peephole for optimizing move SF to GPR):
13480         Adjust code to eliminate needing to do the shift right 32-bits
13481         operation after XSCVDPSPN.
13482
13483 2017-09-26  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
13484
13485         * match.pd ((X / Y) == 0 -> X < Y): New pattern.
13486         ((X / Y) != 0 -> X >= Y): Likewise.
13487
13488 2017-09-26  Carl Love  <cel@us.ibm.com>
13489
13490         * config/rs6000/rs6000-c.c (P9V_BUILTIN_VEC_XL_LEN_R,
13491         P9V_BUILTIN_VEC_XST_LEN_R): Add support for builtins
13492         vector unsigned char vec_xl_len_r (unsigned char *, size_t);
13493         void vec_xst_len_r (vector unsigned char, unsigned char *, size_t);
13494         * config/rs6000/altivec.h (vec_xl_len_r, vec_xst_len_r): Add defines.
13495         * config/rs6000/rs6000-builtin.def (XL_LEN_R, XST_LEN_R): Add
13496         definitions and overloading.
13497         * config/rs6000/rs6000.c (altivec_expand_builtin): Add case
13498         statement for P9V_BUILTIN_XST_LEN_R.
13499         (altivec_init_builtins): Add def_builtin for P9V_BUILTIN_STXVLL.
13500         * config/rs6000/vsx.md (lxvll, stxvll, xl_len_r, xst_len_r): Add
13501         define_expand and define_insn for the instructions and builtins.
13502         * doc/extend.texi: Update the built-in documentation file for the new
13503         built-in functions.
13504         * config/rs6000/altivec.md (altivec_lvsl_reg, altivec_lvsr_reg): Add
13505         define_insn for the instructions
13506
13507 2017-09-26  Krister Walfridsson  <krister.walfridsson@gmail.com>
13508
13509         PR target/39570
13510         * gcc/config/netbsd-protos.h: New file.
13511         * gcc/config/netbsd.c: New file.
13512         * gcc/config/netbsd.h (SUBTARGET_INIT_BUILTINS): Define.
13513         * gcc/config/t-netbsd: New file.
13514         * gcc/config.gcc (tm_p_file): Add netbsd-protos.h.
13515         (tmake_file) Add t-netbsd.
13516         (extra_objs) Add netbsd.o.
13517
13518 2017-09-26  Janus Weil  <janus@gcc.gnu.org>
13519
13520         PR fortran/82143
13521         PR fortran/82324
13522         * doc/sourcebuild.texi: Document fortran_real_10 and fortran_real_16.
13523
13524 2017-09-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
13525
13526         * config/rs6000/rs6000.md (extendsi<mode>2): Add a splitter to do
13527         sign extension from a vector register to a GPR by doing a 32-bit
13528         direct move and then an EXTSW.
13529         (extendsi<mode>2 splitter): Likewise.
13530         (movsi_from_sf): Adjust code to eliminate doing a 32-bit shift
13531         right or vector extract after doing XSCVDPSPN.  Use
13532         zero_extendsidi2 instead of p8_mfvsrd_4_disf to move the value to
13533         the GPRs.
13534         (movdi_from_sf_zero_ext): Likewise.
13535         (reload_gpr_from_vsxsf): Likewise.
13536         (p8_mfvsrd_4_disf): Delete, no longer used.
13537         (movsi_from_df): Optimize converting a DFmode to a SFmode, and
13538         then needing to move the SFmode to a GPR to use the XSCVDPSP
13539         instruction instead of FRSP and XSCVDPSPN.
13540         * config/rs6000/vsx.md (vsx_xscvspdp_scalar2): Move insn so that
13541         it is adjacent to the other XSCVSPDP insns.
13542         (vsx_xscvdpsp_scalar): Use "ww" constraint instead of "f" to allow
13543         SFmode to be in traditional Altivec registers.
13544         (vsx_xscvdpspn): Eliminate useless alternative constraint.
13545         (vsx_xscvspdpn): Likewise.
13546         (vsx_xscvspdpn_scalar): Likewise.
13547
13548 2017-09-26  Martin Jambor  <mjambor@suse.cz>
13549
13550         * tree-sra.c (compare_access_positions): Put integral types first,
13551         stabilize sorting of integral types, remove conditions putting
13552         non-full-precision integers last.
13553         (sort_and_splice_var_accesses): Disable scalarization if a
13554         non-integert would be represented by a non-full-precision integer.
13555
13556 2017-09-26  Joseph Myers  <joseph@codesourcery.com>
13557
13558         * config/microblaze/linux.h (TARGET_ASM_FILE_END): Likewise.
13559         * config/pa/pa.h (NEED_INDICATE_EXEC_STACK): Likewise.
13560         * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Likewise.
13561         * config/pa/pa.c (pa_hpux_file_end): Rename to pa_file_end.
13562         Define unconditionally, with [ASM_OUTPUT_EXTERNAL_REAL]
13563         conditionals inside the function instead of around it.  Call
13564         file_end_indicate_exec_stack if NEED_INDICATE_EXEC_STACK.
13565         (TARGET_ASM_FILE_END): Define unconditionally to pa_file_end.
13566
13567 2017-09-26  Richard Biener  <rguenther@suse.de>
13568
13569         * graphite-scop-detection.c (scop_detection::build_scop_depth): Rewrite,
13570         fold in ...
13571         (scop_detection::build_scop_breadth): ... this.  Removed.
13572         (scop_detection::loop_is_valid_in_scop): Fold into single caller.
13573         (scop_detection::harmful_stmt_in_bb): Likewise.
13574         (scop_detection::graphite_can_represent_stmt): Likewise.
13575         (scop_detection::loop_body_is_valid_scop): Likewise.  Remove recursion.
13576         (scop_detection::can_represent_loop): Remove recursion, fold in ...
13577         (scop_detection::can_represent_loop_1): ... this.  Removed.
13578         (scop_detection::harmful_loop_in_region): Simplify after inlining
13579         the above and remove more quadraticness.
13580         (build_scops): Adjust.
13581         * tree-data-ref.c (loop_nest_has_data_refs): Remove pointless
13582         quadraticness.
13583
13584 2017-09-26  Jakub Jelinek  <jakub@redhat.com>
13585
13586         PR target/82267
13587         * config/i386/i386.c (ix86_print_operand_address_as): Only test
13588         REGNO (base) == SP_REG if base is a REG.
13589
13590         PR middle-end/35691
13591         * tree-ssa-reassoc.c (update_range_test): Dump r->exp each time
13592         if it is different SSA_NAME.
13593         (optimize_range_tests_cmp_bitwise): New function.
13594         (optimize_range_tests): Call it.
13595
13596 2017-09-26  Richard Biener  <rguenther@suse.de>
13597
13598         PR tree-optimization/82321
13599         * graphite.c (canonicalize_loop_closed_ssa): Properly check
13600         for the def being inside the loop.
13601
13602 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13603
13604         * config/s390/vx-builtins.md ("vmslg"): Add missing operand in
13605         assembler output.
13606         * config/s390/s390-builtins.def: Fix constraint on op4.
13607
13608 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13609
13610         * config/s390/s390.c (s390_expand_vec_compare): Use the new mode
13611         independent expanders.
13612         * config/s390/vector.md ("vec_cmpuneq", "vec_cmpltgt")
13613         ("vec_ordered", "vec_unordered"): New expanders.
13614
13615 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13616
13617         * config/s390/s390.c (s390_preferred_simd_mode): Return V4SFmode
13618         for SFmode.
13619
13620 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13621
13622         * config/s390/vector.md ("vec_unpacks_low_v16qi"): Rename to
13623         vec_unpacks_lo_v16qi.
13624         ("vec_unpacku_low_v16qi"): Rename to vec_unpacku_lo_v16qi.
13625
13626 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13627
13628         * config/s390/vector.md ("vec_unpacks_lo_v4sf")
13629         ("vec_unpacks_hi_v4sf", "vec_unpacks_lo_v2df")
13630         ("vec_unpacks_hi_v2df", "vec_pack_trunc_v2df"): New expanders.
13631
13632 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13633
13634         * config/s390/predicates.md ("const_shift_by_byte_operand"): New
13635         predicate.
13636         * config/s390/vector.md ("*vec_srb<mode>"): Change modes to V_128
13637         and V16QI.
13638         ("*vec_slb<mode>"): New insn pattern.
13639         ("vec_shr_<mode>"): New expander.
13640         * config/s390/vx-builtins.md ("vec_slb<mode>"): Turn into expander
13641         and force the shift count operand to V16QImode.
13642         ("vec_srb<mode>"): Set shift count mode to V16QI.
13643
13644 2017-09-26  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
13645
13646         * config/s390/vector.md ("vec_widen_umult_lo_<mode>")
13647         ("vec_widen_umult_hi_<mode>", "vec_widen_smult_lo_<mode>")
13648         ("vec_widen_smult_hi_<mode>"): New expander definitions.
13649
13650 2017-09-26  Richard Earnshaw  <rearnsha@arm.com>
13651
13652         PR target/82175
13653         * config/arm/arm.h (DRIVER_SELF_SPECS): Separate sub-rules with commas.
13654
13655 2017-09-26  Richard Biener  <rguenther@suse.de>
13656
13657         PR tree-optimization/82320
13658         * tree-ssa-sccvn.c (set_ssa_val_to): Changing undef to undef
13659         isn't a change.
13660
13661 2017-09-25  Jeff Law  <law@redhat.com>
13662
13663         * config/rs6000/rs6000-protos.h (output_probe_stack_range): Update
13664         prototype for new argument.
13665         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack_1): New function,
13666         mostly extracted from rs6000_emit_allocate_stack.
13667         (rs6000_emit_probe_stack_range_stack_clash): New function.
13668         (rs6000_emit_allocate_stack): Call
13669         rs6000_emit_probe_stack_range_stack_clash as needed.
13670         (rs6000_emit_probe_stack_range): Add additional argument
13671         to call to gen_probe_stack_range{si,di}.
13672         (output_probe_stack_range): New.
13673         (output_probe_stack_range_1): Renamed from output_probe_stack_range.
13674         (output_probe_stack_range_stack_clash): New.
13675         (rs6000_emit_prologue): Emit notes into dump file as requested.
13676         * rs6000.md (allocate_stack): Handle -fstack-clash-protection.
13677         (probe_stack_range<P:mode>): Operand 0 is now early-clobbered.
13678         Add additional operand and pass it to output_probe_stack_range.
13679
13680 2017-09-25  Bin Cheng  <bin.cheng@arm.com>
13681
13682         PR tree-optimization/82163
13683         * tree-ssa-loop-manip.h (verify_loop_closed_ssa): New parameter.
13684         (checking_verify_loop_closed_ssa): New parameter.
13685         * tree-ssa-loop-manip.c (check_loop_closed_ssa_use): Delete.
13686         (check_loop_closed_ssa_stmt): Delete.
13687         (check_loop_closed_ssa_def, check_loop_closed_ssa_bb): New functions.
13688         (verify_loop_closed_ssa): Check loop closed ssa form for LOOP.
13689         (tree_transform_and_unroll_loop): Check loop closed ssa form only for
13690         changed loops.
13691
13692 2017-09-25  Pekka Jaaskelainen <pekka@parmance.com>
13693
13694         * brig-builtins.def: Treat HSAIL barrier builtins as
13695         setjmp/longjump style functions.
13696
13697 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
13698
13699         * target.def (constant_alignment): New hook.
13700         * defaults.h (CONSTANT_ALIGNMENT): Delete.
13701         * doc/tm.texi.in (CONSTANT_ALIGNMENT): Replace with...
13702         (TARGET_CONSTANT_ALIGNMENT): ...this new hook.
13703         * doc/tm.texi: Regenerate.
13704         * targhooks.h (default_constant_alignment): Declare.
13705         (constant_alignment_word_strings): Likewise.
13706         * targhooks.c (default_constant_alignment): New function.
13707         (constant_alignment_word_strings): Likewise.
13708         * builtins.c (get_object_alignment_2): Use targetm.constant_alignment
13709         instead of CONSTANT_ALIGNMENT.
13710         * varasm.c (align_variable, get_variable_align, build_constant_desc)
13711         (force_const_mem): Likewise.
13712         * config/aarch64/aarch64.h (CONSTANT_ALIGNMENT): Delete.
13713         * config/aarch64/aarch64.c (aarch64_constant_alignment): New function.
13714         (aarch64_classify_address): Call it instead of CONSTANT_ALIGNMENT.
13715         (TARGET_CONSTANT_ALIGNMENT): Redefine.
13716         * config/alpha/alpha.h (CONSTANT_ALIGNMENT): Delete commented-out
13717         definition.
13718         * config/arc/arc.h (CONSTANT_ALIGNMENT): Delete.
13719         * config/arc/arc.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13720         constant_alignment_word_strings.
13721         * config/arm/arm.h (CONSTANT_ALIGNMENT_FACTOR): Delete.
13722         (CONSTANT_ALIGNMENT): Likewise.
13723         * config/arm/arm.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
13724         (arm_constant_alignment): New function.
13725         * config/bfin/bfin.h (CONSTANT_ALIGNMENT): Delete.
13726         * config/bfin/bfin.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13727         constant_alignment_word_strings.
13728         * config/cr16/cr16.h (CONSTANT_ALIGNMENT): Delete.
13729         * config/cr16/cr16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13730         constant_alignment_word_strings.
13731         * config/cris/cris.h (CONSTANT_ALIGNMENT): Delete.
13732         * config/cris/cris.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
13733         (cris_constant_alignment): New function.
13734         * config/epiphany/epiphany.h (CONSTANT_ALIGNMENT): Delete.
13735         * config/epiphany/epiphany.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
13736         (epiphany_constant_alignment): New function.
13737         * config/fr30/fr30.h (CONSTANT_ALIGNMENT): Delete.
13738         * config/fr30/fr30.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13739         constant_alignment_word_strings.
13740         * config/frv/frv.h (CONSTANT_ALIGNMENT): Delete.
13741         * config/frv/frv.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13742         constant_alignment_word_strings.
13743         * config/ft32/ft32.h (CONSTANT_ALIGNMENT): Delete.
13744         * config/ft32/ft32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13745         constant_alignment_word_strings.
13746         * config/i386/i386.h (CONSTANT_ALIGNMENT): Delete.
13747         * config/i386/i386-protos.h (ix86_constant_alignment): Delete.
13748         * config/i386/i386.c (ix86_constant_alignment): Make static.
13749         Use the same interface as the target hook.
13750         (TARGET_CONSTANT_ALIGNMENT): Redefine.
13751         * config/ia64/ia64.h (CONSTANT_ALIGNMENT): Delete.
13752         * config/ia64/ia64.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13753         constant_alignment_word_strings.
13754         * config/iq2000/iq2000.h (CONSTANT_ALIGNMENT): Delete.
13755         * config/iq2000/iq2000.c (iq2000_constant_alignment): New function.
13756         (TARGET_CONSTANT_ALIGNMENT): Redefine.
13757         * config/lm32/lm32.h (CONSTANT_ALIGNMENT): Delete.
13758         * config/lm32/lm32.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13759         constant_alignment_word_strings.
13760         * config/m32r/m32r.h (CONSTANT_ALIGNMENT): Delete.
13761         * config/m32r/m32r.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13762         constant_alignment_word_strings.
13763         * config/mcore/mcore.h (CONSTANT_ALIGNMENT): Delete.
13764         * config/mcore/mcore.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13765         constant_alignment_word_strings.
13766         * config/microblaze/microblaze.h (CONSTANT_ALIGNMENT): Delete.
13767         * config/microblaze/microblaze.c (microblaze_constant_alignment):
13768         New function.
13769         (TARGET_CONSTANT_ALIGNMENT): Redefine.
13770         * config/mips/mips.h (CONSTANT_ALIGNMENT): Delete.
13771         * config/mips/mips.c (mips_constant_alignment): New function.
13772         (TARGET_CONSTANT_ALIGNMENT): Redefine.
13773         * config/mmix/mmix.h (CONSTANT_ALIGNMENT): Delete.
13774         * config/mmix/mmix-protos.h (mmix_constant_alignment): Delete.
13775         * config/mmix/mmix.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
13776         (mmix_constant_alignment): Make static.  Use the same interface
13777         as the target hook.
13778         * config/moxie/moxie.h (CONSTANT_ALIGNMENT): Delete.
13779         * config/moxie/moxie.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13780         constant_alignment_word_strings.
13781         * config/nios2/nios2.h (CONSTANT_ALIGNMENT): Delete.
13782         * config/nios2/nios2.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13783         constant_alignment_word_strings.
13784         * config/pa/pa.h (CONSTANT_ALIGNMENT): Delete.
13785         * config/pa/pa.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13786         constant_alignment_word_strings.
13787         * config/powerpcspe/powerpcspe.h (CONSTANT_ALIGNMENT): Delete.
13788         * config/powerpcspe/powerpcspe.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
13789         (rs6000_constant_alignment): New function.
13790         * config/riscv/riscv.h (CONSTANT_ALIGNMENT): Delete.
13791         * config/riscv/riscv.c (riscv_constant_alignment): New function.
13792         (TARGET_CONSTANT_ALIGNMENT): Redefine.
13793         * config/rs6000/rs6000.h (CONSTANT_ALIGNMENT): Delete.
13794         * config/rs6000/rs6000.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
13795         (rs6000_constant_alignment): New function.
13796         * config/s390/s390.h (CONSTANT_ALIGNMENT): Delete.
13797         * config/s390/s390.c (s390_constant_alignment): New function.
13798         (TARGET_CONSTANT_ALIGNMENT): Redefine.
13799         * config/sh/sh.h (CONSTANT_ALIGNMENT): Delete.
13800         * config/sh/sh.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13801         constant_alignment_word_strings.
13802         * config/sparc/sparc.h (CONSTANT_ALIGNMENT): Delete.
13803         * config/sparc/sparc.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
13804         (sparc_constant_alignment): New function.
13805         * config/spu/spu.h (CONSTANT_ALIGNMENT): Delete.
13806         * config/spu/spu.c (spu_constant_alignment): New function.
13807         (TARGET_CONSTANT_ALIGNMENT): Redefine.
13808         * config/stormy16/stormy16.h (CONSTANT_ALIGNMENT): Delete.
13809         * config/stormy16/stormy16.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13810         constant_alignment_word_strings.
13811         * config/tilegx/tilegx.h (CONSTANT_ALIGNMENT): Delete.
13812         * config/tilegx/tilegx.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13813         constant_alignment_word_strings.
13814         * config/tilepro/tilepro.h (CONSTANT_ALIGNMENT): Delete.
13815         * config/tilepro/tilepro.c (TARGET_CONSTANT_ALIGNMENT): Redefine to
13816         constant_alignment_word_strings.
13817         * config/visium/visium.h (CONSTANT_ALIGNMENT): Delete.
13818         * config/visium/visium.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
13819         (visium_constant_alignment): New function.
13820         * config/xtensa/xtensa.h (CONSTANT_ALIGNMENT): Delete.
13821         * config/xtensa/xtensa.c (TARGET_CONSTANT_ALIGNMENT): Redefine.
13822         (xtensa_constant_alignment): New function.
13823         * system.h (CONSTANT_ALIGNMENT): Poison.
13824
13825 2017-09-25  Will Schmidt  <will_schmidt@vnet.ibm.com>
13826
13827         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
13828         for early folding of vector stores (ALTIVEC_BUILTIN_ST_*).
13829         (rs6000_builtin_valid_without_lhs): New helper function.
13830         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
13831         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_ST.
13832
13833 2017-09-25  Richard Sandiford  <richard.sandiford@linaro.org>
13834
13835         * target.h (vec_perm_indices): Use unsigned short rather than
13836         unsigned char.
13837         (auto_vec_perm_indices): Likewise.
13838         * config/aarch64/aarch64.c (aarch64_vectorize_vec_perm_const_ok):
13839         Use unsigned int rather than unsigned char.
13840         * config/arm/arm.c (arm_vectorize_vec_perm_const_ok): Likewise.
13841
13842 2017-09-25  Richard Biener  <rguenther@suse.de>
13843
13844         * cfgloop.h (sort_sibling_loops): Declare.
13845         * cfgloop.c (sort_sibling_loops_cmp): New helper.
13846         (sort_sibling_loops): New function sorting the sibling loop list
13847         in RPO order.
13848         * graphite.c (graphite_transform_loops): Sort sibling loops.
13849
13850 2017-09-25  Richard Sandiford  <richard.sandifird@linaro.org>
13851
13852         * target.def (vec_perm_const_ok): Change sel parameter to
13853         vec_perm_indices.
13854         * optabs-query.c (can_vec_perm_p): Update accordingly.
13855         * doc/tm.texi: Regenerate.
13856         * config/aarch64/aarch64.c (expand_vec_perm_d): Change perm to
13857         auto_vec_perm_indices and remove separate nelt field.
13858         (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
13859         (aarch64_evpc_ext, aarch64_evpc_rev, aarch64_evpc_dup)
13860         (aarch64_evpc_tbl, aarch64_expand_vec_perm_const_1)
13861         (aarch64_expand_vec_perm_const): Update accordingly.
13862         (aarch64_vectorize_vec_perm_const_ok): Likewise.  Change sel
13863         to vec_perm_indices.
13864         * config/arm/arm.c (expand_vec_perm_d): Change perm to
13865         auto_vec_perm_indices and remove separate nelt field.
13866         (arm_evpc_neon_vuzp, arm_evpc_neon_vzip, arm_evpc_neon_vrev)
13867         (arm_evpc_neon_vtrn, arm_evpc_neon_vext, arm_evpc_neon_vtbl)
13868         (arm_expand_vec_perm_const_1, arm_expand_vec_perm_const): Update
13869         accordingly.
13870         (arm_vectorize_vec_perm_const_ok): Likewise.  Change sel
13871         to vec_perm_indices.
13872         * config/i386/i386.c (ix86_vectorize_vec_perm_const_ok): Change
13873         sel to vec_perm_indices.
13874         * config/ia64/ia64.c (ia64_vectorize_vec_perm_const_ok): Likewise.
13875         * config/mips/mips.c (mips_vectorize_vec_perm_const_ok): Likewise.
13876         * config/powerpcspe/powerpcspe.c (rs6000_vectorize_vec_perm_const_ok):
13877         Likewise.
13878         * config/rs6000/rs6000.c (rs6000_vectorize_vec_perm_const_ok):
13879         Likewise.
13880
13881 2017-09-25  Pierre-Marie de Rodat  <derodat@adacore.com>
13882
13883         PR debug/82155
13884         * dwarf2out.c (dwarf2out_early_global_decl): Call dwarf2out_decl
13885         on the FUNCTION_DECL function context if it has a DIE that is a
13886         declaration.
13887
13888 2017-09-25  Richard Biener  <rguenther@suse.de>
13889
13890         PR tree-optimization/82285
13891         * tree-vect-patterns.c (vect_recog_bool_pattern): Also handle
13892         enumeral types.
13893
13894 2017-09-25  Tom de Vries  <tom@codesourcery.com>
13895
13896         PR target/80035
13897         PR target/81069
13898         * config/nvptx/nvptx.c (nvptx_output_call_insn): Add exit after call to
13899         noreturn function.
13900
13901 2017-09-25  Richard Biener  <rguenther@suse.de>
13902
13903         * graphite-optimize-isl.c (optimize_isl): Fail and dump if
13904         ISL errors other than isl_error_quota happen.  Dump if the
13905         schedule is the same.
13906         * graphite-sese-to-poly.c (build_poly_scop): Fail on ISL
13907         errors instead of aborting inside ISL.
13908
13909 2017-09-25  Iain Sandoe  <iain@codesourcery.com>
13910
13911         PR target/80556
13912         * config/i386/darwin.h (REAL_LIB_SPEC): New; put libSystem ahead
13913         of libgcc_eh for m64.
13914         * config/i386/darwin64.h: Likewise.
13915
13916 2017-09-25  Richard Biener  <rguenther@suse.de>
13917
13918         PR middle-end/82144
13919         * dwarf2out.c (gen_enumeration_type_die): Do not add alignment
13920         attribute for incomplete types nor twice for complete ones.
13921
13922 2017-09-24  Uros Bizjak  <ubizjak@gmail.com>
13923
13924         PR target/82267
13925         * config/i386/i386.c (ix86_print_operand_address_as): Encode
13926         %esp as %rsp to avoid 0x67 prefix if there is no index or base
13927         register.
13928
13929 2017-09-23  Uros Bizjak  <ubizjak@gmail.com>
13930
13931         PR bootstrap/82306
13932         * config/i386/i386.opt (mprefer-avx256): Use
13933         ix86_target_flags variable.
13934         * config/i386/i386.c (ix86_target_string): Move
13935         -mprefer-avx256 to flag2_opts.
13936
13937 2017-09-22  Jakub Jelinek  <jakub@redhat.com>
13938
13939         PR middle-end/35691
13940         * match.pd: Simplify x == -1 & y == -1 into (x & y) == -1
13941         and x != -1 | y != -1 into (x & y) != -1.
13942
13943 2017-09-22  Steve Ellcey  <sellcey@cavium.com>
13944
13945         * config.gcc: Add new case statement to set
13946         default_gnu_indirect_function.  Remove it from x86_64-*-linux*,
13947         i[34567]86-*, powerpc*-*-linux*spe*, powerpc*-*-linux*, s390-*-linux*,
13948         s390x-*-linux* case statements.   Added aarch64 to the list of
13949         supported architectures.
13950
13951 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
13952
13953         PR tree-optimization/82289
13954         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Check
13955         STMT_VINFO_RELEVANT_P.
13956
13957 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
13958             Alan Hayward  <alan.hayward@arm.com>
13959             David Sherwood  <david.sherwood@arm.com>
13960
13961         * tree-vrp.c (extract_range_from_multiplicative_op_1): Assert
13962         for VR_RANGE only; don't allow VR_ANTI_RANGE.
13963         (extract_range_from_binary_expr_1): Don't call
13964         extract_range_from_multiplicative_op_1 if !range_int_cst_p.
13965
13966 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
13967             Alan Hayward  <alan.hayward@arm.com>
13968             David Sherwood  <david.sherwood@arm.com>
13969
13970         * target.def (preferred_vector_alignment): New hook.
13971         * doc/tm.texi.in (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): New
13972         hook.
13973         * doc/tm.texi: Regenerate.
13974         * targhooks.h (default_preferred_vector_alignment): Declare.
13975         * targhooks.c (default_preferred_vector_alignment): New function.
13976         * tree-vectorizer.h (dataref_aux): Add a target_alignment field.
13977         Expand commentary.
13978         (DR_TARGET_ALIGNMENT): New macro.
13979         (aligned_access_p): Update commentary.
13980         (vect_known_alignment_in_bytes): New function.
13981         * tree-vect-data-refs.c (vect_calculate_required_alignment): New
13982         function.
13983         (vect_compute_data_ref_alignment): Set DR_TARGET_ALIGNMENT.
13984         Calculate the misalignment based on the target alignment rather than
13985         the vector size.
13986         (vect_update_misalignment_for_peel): Use DR_TARGET_ALIGMENT
13987         rather than TYPE_ALIGN / BITS_PER_UNIT to update the misalignment.
13988         (vect_enhance_data_refs_alignment): Mask the byte misalignment with
13989         the target alignment, rather than masking the element misalignment
13990         with the number of elements in a vector.  Also use the target
13991         alignment when calculating the maximum number of peels.
13992         (vect_find_same_alignment_drs): Use vect_calculate_required_alignment
13993         instead of TYPE_ALIGN_UNIT.
13994         (vect_duplicate_ssa_name_ptr_info): Remove stmt_info parameter.
13995         Measure DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT.
13996         (vect_create_addr_base_for_vector_ref): Update call accordingly.
13997         (vect_create_data_ref_ptr): Likewise.
13998         (vect_setup_realignment): Realign by ANDing with
13999         -DR_TARGET_MISALIGNMENT.
14000         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Calculate
14001         the number of peels based on DR_TARGET_ALIGNMENT.
14002         * tree-vect-stmts.c (get_group_load_store_type): Compare the gap
14003         with the guaranteed alignment boundary when deciding whether
14004         overrun is OK.
14005         (vectorizable_mask_load_store): Interpret DR_MISALIGNMENT
14006         relative to DR_TARGET_ALIGNMENT instead of TYPE_ALIGN_UNIT.
14007         (ensure_base_align): Remove stmt_info parameter.  Get the
14008         target base alignment from DR_TARGET_ALIGNMENT.
14009         (vectorizable_store): Update call accordingly.   Interpret
14010         DR_MISALIGNMENT relative to DR_TARGET_ALIGNMENT instead of
14011         TYPE_ALIGN_UNIT.
14012         (vectorizable_load): Likewise.
14013
14014 2017-09-22  Richard Sandiford  <richard.sandiford@linaro.org>
14015             Alan Hayward  <alan.hayward@arm.com>
14016             David Sherwood  <david.sherwood@arm.com>
14017
14018         * tree-vectorizer.h (vect_get_scalar_dr_size): New function.
14019         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Use it.
14020         (vect_enhance_data_refs_alignment): Likewise.
14021
14022 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
14023
14024         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
14025         error.  Only quit immediately if parsing is complete.
14026         (BEGIN): Initialize fatal_err and parse_done.
14027         (begin fpu, end fpu): Check number of arguments.
14028         (begin arch, end arch): Likewise.
14029         (begin cpu, end cpu): Likewise.
14030         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
14031         (optalias): Likewise.
14032
14033 2017-09-22  Richard Earnshaw  <richard.earnshaw@arm.com>
14034
14035         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
14036         * config/arm/arm-isa.h: Delete.  Move definitions to ...
14037         * arm-cpus.in: ... here.  Use new feature and fgroup values.
14038         * config/arm/arm.c (arm_option_override): Use lower case for feature
14039         bit names.
14040         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
14041         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
14042         * config/arm/parsecpu.awk (END): Add new command 'isa'.
14043         (isa_pfx): Delete.
14044         (print_isa_bits_for): New function.
14045         (gen_isa): New function.
14046         (gen_comm_data): Use print_isa_bits_for.
14047         (define feature): New keyword.
14048         (define fgroup): New keyword.
14049         * config/arm/t-arm (TM_H): Remove.
14050         (GTM_H): Add arm-isa.h.
14051         (arm-isa.h): Add rule to generate file.
14052         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
14053         case for feature bit names.
14054
14055 2017-09-22  Richard Biener  <rguenther@suse.de>
14056
14057         * graphite-isl-ast-to-gimple.c (graphite_verify): Inline into
14058         single caller.
14059         (graphite_regenerate_ast_isl): Do not reset SCEV.  Move debug
14060         print of no dependency loops ...
14061         * graphite.c (graphite_transform_loops): ... here.
14062         (canonicalize_loop_closed_ssa_form): Work from inner to outer
14063         loops.
14064         (same_close_phi_node, remove_duplicate_close_phi,
14065         make_close_phi_nodes_unique, defined_in_loop_p): Fold into ...
14066         (canonicalize_loop_closed_ssa): ... here and simplify.
14067         * graphite-optimize-isl.c: Include tree-vectorizer.h.
14068         (optimize_isl): Use dump_printf_loc to tell when we stopped
14069         optimizing because of an ISL timeout.
14070
14071 2017-09-22  Richard Biener  <rguenther@suse.de>
14072
14073         PR tree-optimization/82291
14074         * tree-if-conv.c (predicate_mem_writes): Make sure to
14075         remove writes in blocks predicated with false.
14076
14077 2017-09-22  Richard Biener  <rguenther@suse.de>
14078
14079         * sese.c: Include cfganal.h.
14080         (if_region_set_false_region): Remove.
14081         (create_if_region_on_edge): Likewise.
14082         (move_sese_in_condition): Re-implement without destroying
14083         dominators.
14084
14085 2017-09-22  Richard Biener  <rguenther@suse.de>
14086
14087         * graphite-isl-ast-to-gimple.c (translate_pending_phi_nodes):
14088         Verify both BBs contain loop PHI nodes before dispatching to
14089         copy_loop_phi_args.
14090         (graphite_regenerate_ast_isl): Do not recompute dominators,
14091         do not verify three times.  Restructure for clarity.
14092         * graphite-scop-detection.c (same_close_phi_node,
14093         remove_duplicate_close_phi, make_close_phi_nodes_unique,
14094         defined_in_loop_p, canonicalize_loop_closed_ssa,
14095         canonicalize_loop_closed_ssa_form): Simplify, remove excess
14096         checking and SSA rewrite, move to ...
14097         * graphite.c: ... here.  Include ssa.h and tree-ssa-loop-manip.h.
14098         (graphite_initialize): Do not pass in ctx, do not reset the
14099         SCEV cache, compute only dominators.
14100         (graphite_transform_loops): Allocate ISL ctx after
14101         graphite_initialize.  Call canonicalize_loop_closed_ssa_form.
14102         Maintain post-dominators only around build_scops.
14103         * sese.c (if_region_set_false_region): Make static.  Free
14104         and recompute dominators.
14105         (move_sese_in_condition): Assert we don't get called with
14106         post-dominators computed.
14107         * sese.h (if_region_set_false_region): Remove.
14108
14109 2017-09-22  Sergey Shalnov  <sergey.shalnov@intel.com>
14110
14111         * config/i386/sse.md ("mov<mode>_internal"): Use <sseinsnmode>
14112         mode attribute for TARGET_AVX512VL.
14113
14114 2017-09-21  Sergey Shalnov  <sergey.shalnov@intel.com>
14115
14116         * config/i386/i386.opt (mprefer-avx256): New option.
14117         * config/i386/i386.c (ix86_target_string): Add -mprefer-avx256
14118         to flag_opts.
14119         (ix86_preferred_simd_mode): Return 256-bit AVX modes
14120         for TARGET_PREFER_AVX256.
14121         * doc/invoke.texi (x86 Options): Document -mprefer-avx256.
14122
14123 2017-09-21  Jeff Law  <law@redhat.com>
14124
14125         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash):
14126         Fix dump output if the only stack space is for pushed registers.
14127
14128 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
14129
14130         * config/spu/spu.c (spu_sched_adjust_cost): Update after renaming
14131         of insn_cost.
14132
14133 2017-09-21  Martin Sebor  <msebor@redhat.com>
14134
14135         PR c/81882
14136         * doc/extend.texi (attribute ifunc): Avoid relying on ill-formed
14137         code (in C++) or code that triggers warnings.
14138
14139 2017-09-21  Eric Botcazou  <ebotcazou@adacore.com>
14140
14141         * stor-layout.c (bit_from_pos): Do not distribute the conversion.
14142
14143 2017-09-21  Segher Boessenkool  <segher@kernel.crashing.org>
14144
14145         * haifa-sched.c: Rename insn_cost to insn_sched_cost.
14146         * sched-rgn.c: Ditto.
14147         * sel-sched-ir.c: Ditto.
14148
14149 2017-09-21  Alexander Monakov  <amonakov@ispras.ru>
14150
14151         * toplev.h (set_random_seed): Adjust return type.
14152         * toplev.c (init_local_tick): Move eager initialization of random_seed
14153         to get_random_seed.  Adjust comment.
14154         (init_random_seed): Inline to get_random_seed, delete.
14155         (get_random_seed): Initialize random_seed lazily.
14156         (set_random_seed): Do not return previous value.
14157         (print_switch_value): Do not call get_random_seed.
14158
14159 2017-09-21  Evgeny Kudryashov  <kudryashov@ispras.ru>
14160
14161         * cgraph.c (delete_function_version): New, broken out from...
14162         (cgraph_node::delete_function_version): ...here.  Rename to
14163         cgraph_node::delete_function_version_by_decl.  Update all uses.
14164         (cgraph_node::remove): Call delete_function_version.
14165
14166 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
14167
14168         PR sanitizer/81715
14169         * tree-inline.c (expand_call_inline): Emit clobber stmts for
14170         VAR_DECLs to which addressable non-volatile parameters are mapped
14171         and for id->retvar after the return value assignment.  Clear
14172         id->retval and id->retbnd after inlining.
14173
14174 2017-09-21  Richard Biener  <rguenther@suse.de>
14175
14176         PR tree-optimization/82276
14177         PR tree-optimization/82244
14178         * tree-vrp.c (build_assert_expr_for): Set
14179         SSA_NAME_OCCURS_IN_ABNORMAL_PHI if the variable we assert on
14180         has it set.
14181         (remove_range_assertions): Revert earlier change.
14182
14183 2017-09-21  Wilco Dijkstra  <wdijkstr@arm.com>
14184
14185         PR target/71951
14186         * config/aarch64/aarch64.h (LIBGCC2_UNWIND_ATTRIBUTE): Define.
14187
14188 2017-09-21  Richard Biener  <rguenther@suse.de>
14189
14190         * graphite-isl-ast-to-gimple.c (graphite_regenerate_ast_isl):
14191         Restore valid IL after code generation errors.
14192         * graphite.c (graphite_transform_loops): Diagnose code
14193         generation issues as MSG_MISSED_OPTIMIZATION and continue
14194         with processing SCOPs.
14195
14196 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
14197             Alan Hayward  <alan.hayward@arm.com>
14198             David Sherwood  <david.sherwood@arm.com>
14199
14200         * calls.c (compute_argument_addresses): Use simplify_gen_binary
14201         rather than choosing between plus_constant and gen_rtx_<CODE>.
14202         * expr.c (emit_push_insn): Likewise.
14203         (expand_expr_real_2): Likewise.
14204
14205 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
14206             Alan Hayward  <alan.hayward@arm.com>
14207             David Sherwood  <david.sherwood@arm.com>
14208
14209         * loop-unroll.c (split_iv): Call copy_rtx on the step.
14210
14211 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
14212             Alan Hayward  <alan.hayward@arm.com>
14213             David Sherwood  <david.sherwood@arm.com>
14214
14215         * tree.c (find_atomic_core_type): Check tree_fits_uhwi_p before
14216         calling tree_to_uhwi.
14217
14218 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
14219             Alan Hayward  <alan.hayward@arm.com>
14220             David Sherwood  <david.sherwood@arm.com>
14221
14222         * tree-ssa-ccp.c (get_value_for_expr): Use a positive test for
14223         INTEGER_CST rather than a negative test for ADDR_EXPR.
14224
14225 2017-09-21  Richard Sandiford  <richard.sandiford@linaro.org>
14226             Alan Hayward  <alan.hayward@arm.com>
14227             David Sherwood  <david.sherwood@arm.com>
14228
14229         * tree-vrp.c (extract_range_from_binary_expr_1): Check
14230         int_cst_rangeN before calling value_range_constant_singleton (&vrN).
14231
14232 2017-09-21  Richard Biener  <rguenther@suse.de>
14233
14234         PR tree-optimization/71351
14235         * graphite-isl-ast-to-gimple.c (translate_isl_ast_to_gimple::
14236         graphite_create_new_loop_guard): Remove, fold remaining parts
14237         into caller ...
14238         (translate_isl_ast_node_for): ... here and simplify.
14239
14240 2017-09-21  Jakub Jelinek  <jakub@redhat.com>
14241
14242         PR target/82260
14243         * config/i386/i386.md (*movqi_internal): Replace (=q,q) alternative
14244         with (=Q,Q), (=R,R) and (=r,r) alternatives, only enable the
14245         latter two for 64-bit, renumber alternatives, for -Os imov (=q,n)
14246         alternative always use QI mode, for -Os imov (=R,R) alternative
14247         always use SI mode, for imov (=Q,Q) or (=r,r) alternatives
14248         ignore -Os.
14249
14250 2017-09-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
14251             Jeff Law  <law@redhat.com>
14252
14253         * config/s390/s390.c (MIN_UNROLL_PROBES): Define.
14254         (allocate_stack_space): New function, partially extracted from
14255         s390_emit_prologue.
14256         (s390_emit_prologue): Track offset to most recent stack probe.
14257         Code to allocate space moved into allocate_stack_space.
14258         Dump actions when no stack is allocated.
14259         (s390_prologue_plus_offset): New function.
14260         (s390_emit_stack_probe): Likewise.
14261
14262 2017-09-20  Alexandre Oliva  <aoliva@redhat.com>
14263
14264         * common.opt (Wa, Wl, Wp, g, gz=): Add
14265         RejectNegative.
14266         (gno-column-info): Remove.
14267         (gcolumn-info): Drop RejectNegative.
14268         (gno-): New prefix.
14269         (gno-record-gcc-switches): Remove.
14270         (grecord-gcc-switches): Drop RejectNegative.
14271         (gno-split-dwarf): Remove.
14272         (gsplit-dwarf): Drop RejectNegative.
14273         (gno-strict-dwarf): Remove.
14274         (gstrict-dwarf): Drop RejectNegative.
14275         * config/darwin.opt (gfull, gused): Add RejectNegative.
14276         * dwarf2out.c (gen_producer_string): Drop
14277         gno-record-gcc-switches handler.
14278         * optc-gen.awk: Add g to prefixes with negative forms.
14279         * opts-common.c (remapping_prefix_p): New.
14280         (find_opt): Check it.
14281         (generate_canonical_option): Test g prefix.
14282         (option_map): Add -gno- mapping.
14283         (add_misspelling_candidates): Check remapping_prefix_p.
14284
14285 2017-09-20  Jeff Law  <law@redhat.com>
14286
14287         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Fix
14288         thinko in stack clash protection support.
14289
14290         * explow.c (compute_stack_clash_protection_loop_data): Use
14291         CONST_INT_P instead of explicit test.  Verify object is a
14292         CONST_INT_P before looking at INTVAL.
14293         (anti_adjust_stack_and_probe_stack_clash): Use CONST_INT_P
14294         instead of explicit test.
14295
14296 2017-09-20  Segher Boessenkool  <segher@kernel.crashing.org>
14297
14298         PR target/77687
14299         * config/rs6000/rs6000.md (stack_restore_tie): Store to a scratch
14300         address instead of to r1 and r11.
14301
14302 2017-09-20  Sebastian Peryt  <sebastian.peryt@intel.com>
14303
14304         * config.gcc: Support "knm".
14305         * config/i386/driver-i386.c (host_detect_local_cpu): Detect "knm".
14306         * config/i386/i386-c.c (ix86_target_macros_internal): Handle
14307         PROCESSOR_KNM.
14308         * config/i386/i386.c (m_KNM): Define.
14309         (processor_target_table): Add "knm".
14310         (PTA_KNM): Define.
14311         (ix86_option_override_internal): Add "knm".
14312         (ix86_issue_rate): Add PROCESSOR_KNM.
14313         (ix86_adjust_cost): Ditto.
14314         (ia32_multipass_dfa_lookahead): Ditto.
14315         (get_builtin_code_for_version): Handle PROCESSOR_KNM.
14316         (fold_builtin_cpu): Add M_INTEL_KNM.
14317         * config/i386/i386.h (processor_costs): Define TARGET_KNM.
14318         (processor_type): Add PROCESSOR_KNM.
14319         * config/i386/x86-tune.def: Add m_KNM.
14320         * doc/invoke.texi: Add knm as x86 -march=/-mtune= CPU type.
14321
14322 2017-09-20  Richard Biener  <rguenther@suse.de>
14323
14324         PR tree-optimization/80213
14325         * graphite-scop-detection.c (trivially_empty_bb_p): Labels
14326         are allowed in empty BBs as well.
14327         (canonicalize_loop_closed_ssa): Also look for other complex
14328         edges.
14329         (scop_detection::get_sese): Include the loop-closed PHI block
14330         in loop SESEs.
14331         (scop_detection::merge_sese): Remove code adding extra blocks.
14332         (scop_detection::region_has_one_loop): Adjust for get_sese changes.
14333         (build_scops): Assert the final returned scop is invalid.
14334
14335 2017-09-20  Richard Biener  <rguenther@suse.de>
14336
14337         PR tree-optimization/82264
14338         * tree-ssa-sccvn.c (vn_phi_eq): Use safe_dyn_cast to check
14339         for GIMPLE_CONDs.
14340         (vn_phi_lookup): Likewise.
14341         (vn_phi_insert): Likewise.
14342
14343 2017-09-20  Jakub Jelinek  <jakub@redhat.com>
14344
14345         * dwarf2out.c (tree_add_const_value_attribute): For INTEGER_CST
14346         that fits into uhwi or shwi, add DW_AT_const_value regardless
14347         of early_dwarf without going through RTL, using add_AT_unsigned
14348         or add_AT_int.
14349
14350         * dwarf2out.c (DEBUG_LTO_DWO_INFO_SECTION): Reorder defines.
14351         (DEBUG_LTO_ABBREV_SECTION): Likewise.
14352         (DEBUG_LTO_MACINFO_SECTION): Likewise.
14353         (DEBUG_MACRO_SECTION): Likewise.
14354         (DEBUG_LTO_MACRO_SECTION): Likewise.
14355         (DEBUG_STR_DWO_SECTION): Likewise.
14356         (DEBUG_LTO_STR_DWO_SECTION): Likewise.
14357         (DEBUG_LTO_LINE_SECTION): Drop .dwo suffix from the name.
14358         (DEBUG_LTO_DWO_LINE_SECTION): Define.
14359         (DEBUG_LTO_LINE_STR_SECTION): Define.
14360         (init_sections_and_labels): Initialize debug_line_str_section
14361         variable.  Initialize debug_loc_section for -gdwarf-5 to
14362         DEBUG_LOCLISTS_SECTION.  Formatting fixes.
14363
14364 2017-09-20  Richard Biener  <rguenther@suse.de>
14365
14366         * graphite-sese-to-poly.c (extract_affine): Properly handle
14367         POINTER_PLUS_EXPR, BIT_NOT_EXPR and conversion to signed.
14368
14369 2017-09-20  Richard Biener  <rguenther@suse.de>
14370
14371         PR tree-optimization/81373
14372         * graphite-scop-detection.c (build_cross_bb_scalars_def):
14373         Force SESE live-out defs to be handled even if they are
14374         scev_analyzable_p.
14375
14376 2017-09-19  Jeff Law  <law@redhat.com>
14377
14378         * combine-stack-adj.c (combine_stack_adjustments_for_block): Do
14379         nothing for stack adjustments with REG_STACK_CHECK.
14380         * sched-deps.c (parse_add_or_inc): Reject insns with
14381         REG_STACK_CHECK from dependency breaking.
14382         * config/i386/i386.c (pro_epilogue_adjust_stack): Return insn.
14383         (ix86_adjust_satck_and_probe_stack_clash): Add REG_STACK_NOTEs.
14384         * reg-notes.def (STACK_CHECK): New note.
14385
14386         * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): New.
14387         (ix86_expand_prologue): Dump stack clash info as needed.
14388         Call ix86_adjust_stack_and_probe_stack_clash as needed.
14389
14390         * function.c (dump_stack_clash_frame_info): New function.
14391         * function.h (dump_stack_clash_frame_info): Prototype.
14392         (enum stack_clash_probes): New enum.
14393
14394         * config/alpha/alpha.c (alpha_expand_prologue): Also check
14395         flag_stack_clash_protection.
14396         * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Likewise.
14397         (arm_expand_prologue, thumb1_expand_prologue): Likewise.
14398         (arm_frame_pointer_required): Likewise.
14399         * config/ia64/ia64.c (ia64_compute_frame_size): Likewise.
14400         (ia64_expand_prologue): Likewise.
14401         * config/mips/mips.c (mips_expand_prologue): Likewise.
14402         * config/powerpcspe/powerpcspe.c (rs6000_expand_prologue): Likewise.
14403         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
14404         (sparc_flat_expand_prologue): Likewise.
14405         * config/spu/spu.c (spu_expand_prologue): Likewise.
14406
14407         * explow.c: Include "params.h".
14408         (anti_adjust_stack_and_probe_stack_clash): New function.
14409         (get_stack_check_protect): Likewise.
14410         (compute_stack_clash_protection_loop_data): Likewise.
14411         (emit_stack_clash_protection_loop_start): Likewise.
14412         (emit_stack_clash_protection_loop_end): Likewise.
14413         (allocate_dynamic_stack_space): Use get_stack_check_protect.
14414         Use anti_adjust_stack_and_probe_stack_clash.
14415         * explow.h (compute_stack_clash_protection_loop_data): Prototype.
14416         (emit_stack_clash_protection_loop_start): Likewise.
14417         (emit_stack_clash_protection_loop_end): Likewise.
14418         * rtl.h (get_stack_check_protect): Prototype.
14419         * target.def (stack_clash_protection_final_dynamic_probe): New hook.
14420         * targhooks.c (default_stack_clash_protection_final_dynamic_probe): New.
14421         * targhooks.h (default_stack_clash_protection_final_dynamic_probe):
14422         Prototype.
14423         * doc/tm.texi.in (TARGET_STACK_CLASH_PROTECTION_FINAL_DYNAMIC_PROBE):
14424         Add @hook.
14425         * doc/tm.texi: Rebuilt.
14426         * config/aarch64/aarch64.c (aarch64_expand_prologue): Use
14427         get_stack_check_protect.
14428         * config/alpha/alpha.c (alpha_expand_prologue): Likewise.
14429         * config/arm/arm.c (arm_expand_prologue): Likewise.
14430         (arm_frame_pointer_required): Likewise.
14431         * config/i386/i386.c (ix86_expand_prologue): Likewise.
14432         * config/ia64/ia64.c (ia64_expand_prologue): Likewise.
14433         * config/mips/mips.c (mips_expand_prologue): Likewise.
14434         * config/powerpcspe/powerpcspe.c (rs6000_emit_prologue): Likewise.
14435         * config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
14436         * config/sparc/sparc.c (sparc_expand_prologue): Likewise.
14437         (sparc_flat_expand_prologue): Likewise.
14438
14439         * common.opt (-fstack-clash-protection): New option.
14440         * flag-types.h (enum stack_check_type): Note difference between
14441         -fstack-check= and -fstack-clash-protection.
14442         * params.def (PARAM_STACK_CLASH_PROTECTION_GUARD_SIZE): New PARAM.
14443         (PARAM_STACK_CLASH_PROTECTION_PROBE_INTERVAL): Likewise.
14444         * toplev.c (process_options): Issue warnings/errors for cases
14445         not handled with -fstack-clash-protection.
14446         * doc/invoke.texi (-fstack-clash-protection): Document new option.
14447         (-fstack-check): Note additional problem with -fstack-check=generic.
14448         Note that -fstack-check is primarily for Ada and refer users
14449         to -fstack-clash-protection for stack-clash-protection.
14450         Document new params for stack clash protection.
14451
14452 2017-09-19  Uros Bizjak  <ubizjak@gmail.com>
14453
14454         * config/i386/i386.c (ix86_split_long_move): Do not handle
14455         address used for LEA in a special way.
14456
14457 2017-09-19  Segher Boessenkool  <segher@kernel.crashing.org>
14458
14459         * simplify-rtx.c (simplify_binary_operation_1): Fix typo in comment.
14460
14461 2017-09-19  Martin Sebor  <msebor@redhat.com>
14462
14463         PR c/81854
14464         * cgraphunit.c (handle_alias_pairs): Reject aliases between functions
14465         of incompatible types.
14466
14467 2017-09-19  Will Schmidt  <will_schmidt@vnet.ibm.com>
14468
14469         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
14470         for early folding of vector loads (ALTIVEC_BUILTIN_LVX_*).
14471         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
14472         Remove obsoleted code for handling ALTIVEC_BUILTIN_VEC_LD.
14473
14474 2017-09-19  Richard Biener  <rguenther@suse.de>
14475
14476         PR tree-optimization/82244
14477         * tree-vrp.c (remove_range_assertions): Do not propagate
14478         a constant to abnormals but replace the assert with a copy.
14479
14480 2017-09-19  Alexander Monakov  <amonakov@ispras.ru>
14481
14482         PR rtl-optimization/57878
14483         PR rtl-optimization/68988
14484         * lra-assigns.c (reload_pseudo_compare_func): Remove fragmentation
14485         avoidance test involving non_reload_pseudos.  Move frequency test
14486         below the general fragmentation avoidance test.
14487
14488 2017-09-19  Richard Biener  <rguenther@suse.de>
14489
14490         PR tree-optimization/69728
14491         * graphite-sese-to-poly.c (schedule_error): New global.
14492         (add_loop_schedule): Handle empty domain by failing the
14493         schedule.
14494         (build_original_schedule): Handle schedule_error.
14495
14496 2017-09-19  Richard Biener  <rguenther@suse.de>
14497
14498         * graphite-scop-detection.c (scop_detection::can_represent_loop):
14499         Do not iterate to sibling loops but only to siblings of inner
14500         loops.
14501
14502 2017-09-18  Andreas Schwab  <schwab@linux-m68k.org>
14503
14504         PR target/81613
14505         * config/m68k/m68k.md (moveq feeding equality comparison): Check
14506         that the registers are different.
14507
14508 2017-09-18  Uros Bizjak  <ubizjak@gmail.com>
14509
14510         * config/i386/i386.c (fold_builtin_cpu): Add M_AMDFAM17H
14511         to processor_model and "amdfam17h" to arch_names_table.
14512         * doc/extend.texi (__builtin_cpu_is): Document amdfam17h CPU name.
14513
14514 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
14515
14516         PR c/82234
14517         * doc/extend.texi: Add @findex entry for __builtin_shuffle.
14518
14519 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
14520             Alan Hayward  <alan.hayward@arm.com>
14521             David Sherwood  <david.sherwood@arm.com>
14522
14523         * tree-vectorizer.h (vect_slp_analyze_operations): Replace parameters
14524         with a vec_info *.
14525         * tree-vect-loop.c (vect_analyze_loop_operations): Update call
14526         accordingly.
14527         * tree-vect-slp.c (vect_slp_analyze_node_operations): Add vec_info *
14528         parameter.  Set SLP_TREE_NUMBER_OF_VEC_STMTS here rather than in
14529         vect_schedule_slp_instance.
14530         (vect_slp_analyze_operations): Replace parameters with a vec_info *.
14531         Update call to vect_slp_analyze_node_operations.  Simplify return
14532         value.
14533         (vect_slp_analyze_bb_1): Update call accordingly.
14534         (vect_schedule_slp_instance): Remove vectorization_factor parameter.
14535         Don't calculate SLP_TREE_NUMBER_OF_VEC_STMTS here.
14536         (vect_schedule_slp): Update call accordingly.
14537
14538 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
14539             Alan Hayward  <alan.hayward@arm.com>
14540             David Sherwood  <david.sherwood@arm.com>
14541
14542         * tree-vect-data-refs.c (vect_get_smallest_scalar_type): Cope
14543         with types that aren't in fact scalar.
14544
14545 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
14546
14547         * tree-vect-slp.c (vect_record_max_nunits): New function,
14548         split out from...
14549         (vect_build_slp_tree_1): ...here.
14550         (vect_build_slp_tree_2): Call it for phis too.
14551
14552 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
14553
14554         * tree-vect-stmts.c (vectorizable_mask_load_store): Pass mask_vectype
14555         to vect_get_vec_def_for_operand when getting the mask operand.
14556
14557 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
14558             Alan Hayward  <alan.hayward@arm.com>
14559             David Sherwood  <david.sherwood@arm.com>
14560
14561         * tree-vect-loop.c (vectorizable_live_operation): Fix type of
14562         bitstart.
14563
14564 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
14565             Alan Hayward  <alan.hayward@arm.com>
14566             David Sherwood  <david.sherwood@arm.com>
14567
14568         * tree-vect-loop.c (vectorizable_live_operation): Fix element size
14569         calculation for vector booleans.
14570
14571 2017-09-18  Richard Sandiford  <richard.sandiford@linaro.org>
14572             Alan Hayward  <alan.hayward@arm.com>
14573             David Sherwood  <david.sherwood@arm.com>
14574
14575         * tree-vect-stmts.c (can_vectorize_live_stmts): New function,
14576         split out from...
14577         (vect_transform_stmt): ...here.
14578         (vect_analyze_stmt): Use it instead of calling
14579         vectorizable_live_operation directly.
14580
14581 2017-09-18  Cesar Philippidis  <cesar@codesourcery.com>
14582
14583         * omp-offload.c (oacc_xform_loop): Enable SIMD vectorization on
14584         non-SIMT targets in acc vector loops.
14585
14586 2017-09-18  Claudiu Zissulescu  <claziss@synopsys.com>
14587
14588         * configure.ac: Add arc and check if assembler supports gdwarf2.
14589         * configure: Regenerate.
14590
14591 2017-09-18  Richard Biener  <rguenther@suse.de>
14592
14593         PR tree-optimization/82220
14594         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Exclude
14595         epilogue niters from the min_profitable_iters compute.
14596
14597 2017-09-18  Jakub Jelinek  <jakub@redhat.com>
14598
14599         PR target/82145
14600         * config/i386/i386.c (ix86_init_large_pic_reg): Revert 2017-09-01
14601         changes.  Turn CODE_LABEL into NOTE_INSN_DELETED_LABEL immediately.
14602         (ix86_init_pic_reg): Revert 2017-09-01 changes.
14603
14604 2017-09-18  Eric Botcazou  <ebotcazou@adacore.com>
14605
14606         PR target/81361
14607         * dwarf2cfi.c (add_cfis_to_fde): Do not generate DW_CFA_set_loc after
14608         switching to a new text section.
14609
14610 2017-09-18  Richard Biener  <rguenther@suse.de>
14611
14612         * graphite-scop-detection.c (scop_detection::stmt_has_simple_data_ref):
14613         Simplify.
14614         (build_alias_set): Reject aliases with no access function.
14615
14616 2017-09-18  Richard Biener  <rguenther@suse.de>
14617
14618         PR tree-optimization/79622
14619         * graphite-scop-detection.c (build_cross_bb_scalars_def): Properly
14620         handle PHIs.
14621         (build_cross_bb_scalars_use): Likewise.
14622
14623 2017-09-18  Pierre-Marie de Rodat  <derodat@adacore.com>
14624
14625         * cgraph.h (cgraph_thunk_info): Fix a typo in a comment.
14626
14627 2017-09-18  Alan Modra  <amodra@gmail.com>
14628
14629         PR target/81996
14630         * gcc/config/rs6000/rs6000.c (rs6000_return_addr): Use
14631         stack_pointer_rtx for count 0.  Update comments.  Break up
14632         large rtl expression.
14633
14634 2017-09-17  Daniel Santos  <daniel.santos@pobox.com>
14635
14636         * config/i386/i386.c (xlogue_layout::STUB_NAME_MAX_LEN):
14637         Increase to 20 bytes.
14638         (xlogue_layout::s_stub_names): Add an additional size-2 diminsion.
14639         (xlogue_layout::get_stub_name): Modify to select the appropairate sse
14640         or avx version of the stub.
14641
14642 2017-09-17  H.J. Lu  <hongjiu.lu@intel.com>
14643
14644         PR target/82166
14645         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Properly
14646         compute the minimum stack alignment.  Also update preferred stack
14647         boundary for leaf functions.
14648
14649 2017-09-16  Richard Sandiford  <richard.sandiford@linaro.org>
14650
14651         PR tree-optimization/82228
14652         * tree-vect-loop.c (vectorizable_live_operation): Move initialization
14653         of ncopies.
14654
14655 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
14656
14657         * common/config/nds32/nds32-common.c
14658         (nds32_option_optimization_table): Refine formatting.
14659         (nds32_option_optimization_table): Use -fsched-pressure and
14660         -fomit-frame-pointer for specific optimization level.
14661
14662 2017-09-16  Chung-Ju Wu  <jasonwucj@gmail.com>
14663
14664         * config/nds32/nds32.c: Refine formatting and comments.
14665         * config/nds32/nds32.h: Likewise.
14666         * config/nds32/nds32.md: Likewise.
14667         * config/nds32/nds32-cost.c: Likewise.
14668         * config/nds32/nds32-isr.c: Likewise.
14669         * config/nds32/nds32-md-auxiliary.c: Likewise.
14670         * config/nds32/nds32-multiple.md: Likewise.
14671         * config/nds32/nds32-predicates.c: Likewise.
14672
14673 2017-09-15  Andrew Sutton  <andrew.n.sutton@gmail.com>
14674             Jakub Jelinek  <jakub@redhat.com>
14675
14676         Add support for -std=c++2a.
14677         * doc/cpp.texi (__cplusplus): Document value for -std=c++2a
14678         or -std=gnu+2a.
14679         * doc/invoke.texi: Document -std=c++2a and -std=gnu++2a.
14680
14681 2017-09-15  Steve Ellcey  <sellcey@cavium.com>
14682
14683         PR target/82066
14684         * doc/extend.texi (Common Function Attributes): Add 
14685         references to ARM, AArch64, and S/390 specific attributes.
14686         (Function Specific Option Pragmas): Add AArch64 and S/390
14687         to list of back ends that support the target pragma.
14688
14689 2017-09-15  Nathan Sidwell  <nathan@acm.org>
14690
14691         * doc/standards.texi: Fix C++17 description.  Update URLs for
14692         C++11 & 14.
14693
14694 2017-09-15  Bernd Edlinger  <bernd.edlinger@hotmail.de>
14695
14696         * common.opt (Wcast-align=strict): New warning option.
14697         * doc/invoke.texi: Document -Wcast-align=strict. 
14698
14699 2017-09-15  Pierre-Marie de Rodat  <derodat@adacore.com>
14700
14701         * cgraph.h (cgraph_thunk_info): Add comments.
14702         * cgraph.c (cgraph_node::create_thunk): Adjust comment, make
14703         assert for VIRTUAL_* arguments stricter.
14704
14705 2017-09-15  Jackson Woodruff  <jackson.woodruff@arm.com>
14706
14707         PR tree-optimization/71026
14708         * match.pd: Move RDIV patterns from fold-const.c
14709         * fold-const.c (distribute_real_division): Removed.
14710         (fold_binary_loc): Remove calls to distribute_real_divison.
14711
14712 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
14713
14714         * doc/invoke.texi: Document -std=c++17 and -std=gnu++17 and document
14715         c++1z and gnu++1z as deprecated.  Change other references to
14716         -std=c++1z to -std=c++17 and -std=gnu++1z to -std=gnu++17.
14717         Change -Wc++1z-compat to -Wc++17-compat.
14718         * doc/cpp.texi: Document -std=c++17 defines __cplusplus 201703L.
14719         * dwarf2out.c (highest_c_language): Handle C++17.
14720         (gen_compile_unit_die): Likewise.
14721
14722 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
14723
14724         PR rtl-optimization/82192
14725         * combine.c (make_extraction): Don't look through non-paradoxical
14726         SUBREGs or TRUNCATE if pos + len is or might be bigger than
14727         inner's mode.
14728
14729 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
14730             Alan Hayward  <alan.hayward@arm.com>
14731             David Sherwood  <david.sherwood@arm.com>
14732
14733         * target.def (function_arg_offset): New hook.
14734         * targhooks.h (default_function_arg_offset): Declare.
14735         * targhooks.c (default_function_arg_offset): New function.
14736         * function.c (locate_and_pad_parm): Use
14737         targetm.calls.function_arg_offset instead of FUNCTION_ARG_OFFSET.
14738         * doc/tm.texi.in (FUNCTION_ARG_OFFSET): Replace with...
14739         (TARGET_FUNCTION_ARG_OFFSET): ...this.
14740         * doc/tm.texi: Regenerate.
14741         * config/spu/spu.h (FUNCTION_ARG_OFFSET): Delete.
14742         * config/spu/spu.c (spu_function_arg_offset): New function.
14743         (TARGET_FUNCTION_ARG_OFFSET): Redefine.
14744         * system.h (FUNCTION_ARG_OFFSET): Poison.
14745
14746 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
14747             Alan Hayard  <alan.hayward@arm.com>
14748             David Sherwood  <david.sherwood@arm.com>
14749
14750         * target.def (truly_noop_truncation): New hook.
14751         (mode_rep_extended): Refer to TARGET_TRULY_NOOP_TRUNCATION rather
14752         than TRULY_NOOP_TRUNCATION.
14753         * hooks.h (hook_bool_uint_uint_true): Declare.
14754         * hooks.c (hook_bool_uint_uint_true): New function.
14755         * doc/tm.texi.in (TRULY_NOOP_TRUNCATION): Replace with...
14756         (TARGET_TRULY_NOOP_TRUNCATION): ...this.
14757         * doc/tm.texi: Regenerate.
14758         * combine.c (make_extraction): Refer to TARGET_TRULY_NOOP_TRUNCATION
14759         rather than TRULY_NOOP_TRUNCATION in comments.
14760         (simplify_comparison): Likewise.
14761         (record_truncated_value): Likewise.
14762         * expmed.c (extract_bit_field_1): Likewise.
14763         (extract_split_bit_field): Likewise.
14764         * convert.c (convert_to_integer_1): Use targetm.truly_noop_truncation
14765         instead of TRULY_NOOP_TRUNCATION.
14766         * function.c (assign_parm_setup_block): Likewise.
14767         * machmode.h (TRULY_NOOP_TRUNCATION_MODES_P): Likewise.
14768         * rtlhooks.c: Include target.h.
14769         * config/aarch64/aarch64.h (TRULY_NOOP_TRUNCATION): Delete.
14770         * config/alpha/alpha.h (TRULY_NOOP_TRUNCATION): Delete.
14771         * config/arc/arc.h (TRULY_NOOP_TRUNCATION): Delete.
14772         * config/arm/arm.h (TRULY_NOOP_TRUNCATION): Delete.
14773         * config/avr/avr.h (TRULY_NOOP_TRUNCATION): Delete.
14774         * config/bfin/bfin.h (TRULY_NOOP_TRUNCATION): Delete.
14775         * config/c6x/c6x.h (TRULY_NOOP_TRUNCATION): Delete.
14776         * config/cr16/cr16.h (TRULY_NOOP_TRUNCATION): Delete.
14777         * config/cris/cris.h (TRULY_NOOP_TRUNCATION): Delete.
14778         * config/epiphany/epiphany.h (TRULY_NOOP_TRUNCATION): Delete.
14779         * config/fr30/fr30.h (TRULY_NOOP_TRUNCATION): Delete.
14780         * config/frv/frv.h (TRULY_NOOP_TRUNCATION): Delete.
14781         * config/ft32/ft32.h (TRULY_NOOP_TRUNCATION): Delete.
14782         * config/h8300/h8300.h (TRULY_NOOP_TRUNCATION): Delete.
14783         * config/i386/i386.h (TRULY_NOOP_TRUNCATION): Delete.
14784         * config/ia64/ia64.h (TRULY_NOOP_TRUNCATION): Delete.
14785         * config/iq2000/iq2000.h (TRULY_NOOP_TRUNCATION): Delete.
14786         * config/lm32/lm32.h (TRULY_NOOP_TRUNCATION): Delete.
14787         * config/m32c/m32c.h (TRULY_NOOP_TRUNCATION): Delete.
14788         * config/m32r/m32r.h (TRULY_NOOP_TRUNCATION): Delete.
14789         * config/m68k/m68k.h (TRULY_NOOP_TRUNCATION): Delete.
14790         * config/mcore/mcore.h (TRULY_NOOP_TRUNCATION): Delete.
14791         * config/microblaze/microblaze.h (TRULY_NOOP_TRUNCATION): Delete.
14792         * config/mips/mips.h (TRULY_NOOP_TRUNCATION): Delete.
14793         * config/mips/mips.c (mips_truly_noop_truncation): New function.
14794         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
14795         * config/mips/mips.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
14796         rather than TRULY_NOOP_TRUNCATION in comments.
14797         * config/mmix/mmix.h (TRULY_NOOP_TRUNCATION): Delete.
14798         * config/mn10300/mn10300.h (TRULY_NOOP_TRUNCATION): Delete.
14799         * config/moxie/moxie.h (TRULY_NOOP_TRUNCATION): Delete.
14800         * config/msp430/msp430.h (TRULY_NOOP_TRUNCATION): Delete.
14801         * config/nds32/nds32.h (TRULY_NOOP_TRUNCATION): Delete.
14802         * config/nios2/nios2.h (TRULY_NOOP_TRUNCATION): Delete.
14803         * config/nvptx/nvptx.h (TRULY_NOOP_TRUNCATION): Delete.
14804         * config/pa/pa.h (TRULY_NOOP_TRUNCATION): Delete.
14805         * config/pdp11/pdp11.h (TRULY_NOOP_TRUNCATION): Delete.
14806         * config/powerpcspe/powerpcspe.h (TRULY_NOOP_TRUNCATION): Delete.
14807         * config/riscv/riscv.h (TRULY_NOOP_TRUNCATION): Delete.
14808         * config/riscv/riscv.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
14809         rather than TRULY_NOOP_TRUNCATION in comments.
14810         * config/rl78/rl78.h (TRULY_NOOP_TRUNCATION): Delete.
14811         * config/rs6000/rs6000.h (TRULY_NOOP_TRUNCATION): Delete.
14812         * config/rx/rx.h (TRULY_NOOP_TRUNCATION): Delete.
14813         * config/s390/s390.h (TRULY_NOOP_TRUNCATION): Delete.
14814         * config/sh/sh.h (MAYBE_BASE_REGISTER_RTX_P): Remove
14815         TRULY_NOOP_TRUNCATION condition.
14816         (MAYBE_INDEX_REGISTER_RTX_P): Likewise.
14817         (TRULY_NOOP_TRUNCATION): Delete.
14818         * config/sparc/sparc.h (TRULY_NOOP_TRUNCATION): Delete.
14819         * config/spu/spu.h (TRULY_NOOP_TRUNCATION): Delete.
14820         * config/spu/spu.c (spu_truly_noop_truncation): New function.
14821         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
14822         * config/stormy16/stormy16.h (TRULY_NOOP_TRUNCATION): Delete.
14823         * config/tilegx/tilegx.h (TRULY_NOOP_TRUNCATION): Delete.
14824         * config/tilegx/tilegx.c (tilegx_truly_noop_truncation): New fuction.
14825         (TARGET_TRULY_NOOP_TRUNCATION): Redefine.
14826         * config/tilegx/tilegx.md: Refer to TARGET_TRULY_NOOP_TRUNCATION
14827         rather than TRULY_NOOP_TRUNCATION in comments.
14828         * config/tilepro/tilepro.h (TRULY_NOOP_TRUNCATION): Delete.
14829         * config/v850/v850.h (TRULY_NOOP_TRUNCATION): Delete.
14830         * config/vax/vax.h (TRULY_NOOP_TRUNCATION): Delete.
14831         * config/visium/visium.h (TRULY_NOOP_TRUNCATION): Delete.
14832         * config/xtensa/xtensa.h (TRULY_NOOP_TRUNCATION): Delete.
14833         * system.h (TRULY_NOOP_TRUNCATION): Poison.
14834
14835 2017-09-15  Christophe Lyon  <christophe.lyon@linaro.org>
14836
14837         PR target/67591
14838         * config/arm/arm.md (*cmp_and): Add enabled_for_depr_it attribute.
14839         (*cmp_ior): Likewise.
14840         (*ior_scc_scc): Add alternative for enabled_for_depr_it attribute.
14841         (*ior_scc_scc_cmp): Likewise.
14842         (*and_scc_scc): Likewise.
14843         (*and_scc_scc_cmp): Likewise.
14844
14845 2017-09-15  Richard Sandiford  <richard.sandiford@linaro.org>
14846             Alan Hayard  <alan.hayward@arm.com>
14847             David Sherwood  <david.sherwood@arm.com>
14848
14849         * target.def (can_change_mode_class): New hook.
14850         (mode_rep_extended): Refer to it instead of CANNOT_CHANGE_MODE_CLASS.
14851         (hard_regno_nregs): Likewise.
14852         * hooks.h (hook_bool_mode_mode_reg_class_t_true): Declare.
14853         * hooks.c (hook_bool_mode_mode_reg_class_t_true): New function.
14854         * doc/tm.texi.in (CANNOT_CHANGE_MODE_CLASS): Replace with...
14855         (TARGET_CAN_CHANGE_MODE_CLASS): ...this.
14856         (LOAD_EXTEND_OP): Update accordingly.
14857         * doc/tm.texi: Regenerate.
14858         * doc/rtl.texi: Refer to TARGET_CAN_CHANGE_MODE_CLASS instead of
14859         CANNOT_CHANGE_MODE_CLASS.
14860         * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): Replace with...
14861         (REG_CAN_CHANGE_MODE_P): ...this new macro.
14862         * combine.c (simplify_set): Update accordingly.
14863         * emit-rtl.c (validate_subreg): Likewise.
14864         * recog.c (general_operand): Likewise.
14865         * regcprop.c (mode_change_ok): Likewise.
14866         * reload1.c (choose_reload_regs): Likewise.
14867         (inherit_piecemeal_p): Likewise.
14868         * rtlanal.c (simplify_subreg_regno): Likewise.
14869         * postreload.c (reload_cse_simplify_set): Use REG_CAN_CHANGE_MODE_P
14870         instead of CANNOT_CHANGE_MODE_CLASS.
14871         (reload_cse_simplify_operands): Likewise.
14872         * reload.c (push_reload): Use targetm.can_change_mode_class
14873         instead of CANNOT_CHANGE_MODE_CLASS.
14874         (push_reload): Likewise.  Also use REG_CAN_CHANGE_MODE_P instead of
14875         REG_CANNOT_CHANGE_MODE_P.
14876         * config/alpha/alpha.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14877         * config/alpha/alpha.c (alpha_can_change_mode_class): New function.
14878         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14879         * config/arm/arm.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14880         * config/arm/arm.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14881         (arm_can_change_mode_class): New function.
14882         * config/arm/neon.md: Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
14883         than CANNOT_CHANGE_MODE_CLASS in comments.
14884         * config/i386/i386.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14885         * config/i386/i386-protos.h (ix86_cannot_change_mode_class): Delete.
14886         * config/i386/i386.c (ix86_cannot_change_mode_class): Replace with...
14887         (ix86_can_change_mode_class): ...this new function, inverting the
14888         sense of the return value.
14889         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14890         * config/ia64/ia64.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14891         * config/ia64/ia64.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14892         (ia64_can_change_mode_class): New function.
14893         * config/m32c/m32c.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14894         * config/m32c/m32c-protos.h (m32c_cannot_change_mode_class): Delete.
14895         * config/m32c/m32c.c (m32c_cannot_change_mode_class): Replace with...
14896         (m32c_can_change_mode_class): ...this new function, inverting the
14897         sense of the return value.
14898         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14899         * config/mips/mips.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14900         * config/mips/mips-protos.h (mips_cannot_change_mode_class): Delete.
14901         * config/mips/mips.c (mips_cannot_change_mode_class): Replace with...
14902         (mips_can_change_mode_class): ...this new function, inverting the
14903         sense of the return value.
14904         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14905         * config/msp430/msp430.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14906         * config/msp430/msp430.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14907         (msp430_can_change_mode_class): New function.
14908         * config/nvptx/nvptx.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14909         * config/nvptx/nvptx.c (nvptx_can_change_mode_class): New function.
14910         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14911         * config/pa/pa32-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14912         * config/pa/pa64-regs.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14913         * config/pa/pa-protos.h (pa_cannot_change_mode_class): Delete.
14914         * config/pa/pa.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14915         (pa_cannot_change_mode_class): Replace with...
14916         (pa_can_change_mode_class): ...this new function, inverting the
14917         sense of the return value.
14918         (pa_modes_tieable_p): Refer to TARGET_CAN_CHANGE_MODE_CLASS rather
14919         than CANNOT_CHANGE_MODE_CLASS in comments.
14920         * config/pdp11/pdp11.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14921         * config/pdp11/pdp11-protos.h (pdp11_cannot_change_mode_class): Delete.
14922         * config/pdp11/pdp11.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14923         (pdp11_cannot_change_mode_class): Replace with...
14924         (pdp11_can_change_mode_class): ...this new function, inverting the
14925         sense of the return value.
14926         * config/powerpcspe/powerpcspe.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14927         * config/powerpcspe/powerpcspe-protos.h
14928         (rs6000_cannot_change_mode_class_ptr): Delete.
14929         * config/powerpcspe/powerpcspe.c
14930         (rs6000_cannot_change_mode_class_ptr): Delete.
14931         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14932         (rs6000_option_override_internal): Assign to
14933         targetm.can_change_mode_class instead of
14934         rs6000_cannot_change_mode_class_ptr.
14935         (rs6000_cannot_change_mode_class): Replace with...
14936         (rs6000_can_change_mode_class): ...this new function, inverting the
14937         sense of the return value.
14938         (rs6000_debug_cannot_change_mode_class): Replace with...
14939         (rs6000_debug_can_change_mode_class): ...this new function.
14940         * config/riscv/riscv.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14941         * config/riscv/riscv.c (riscv_can_change_mode_class): New function.
14942         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14943         * config/rs6000/rs6000.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14944         * config/rs6000/rs6000-protos.h (rs6000_cannot_change_mode_class_ptr):
14945         Delete.
14946         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class_ptr): Delete.
14947         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14948         (rs6000_option_override_internal): Assign to
14949         targetm.can_change_mode_class instead of
14950         rs6000_cannot_change_mode_class_ptr.
14951         (rs6000_cannot_change_mode_class): Replace with...
14952         (rs6000_can_change_mode_class): ...this new function, inverting the
14953         sense of the return value.
14954         (rs6000_debug_cannot_change_mode_class): Replace with...
14955         (rs6000_debug_can_change_mode_class): ...this new function.
14956         * config/s390/s390.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14957         * config/s390/s390-protos.h (s390_cannot_change_mode_class): Delete.
14958         * config/s390/s390.c (s390_cannot_change_mode_class): Replace with...
14959         (s390_can_change_mode_class): ...this new function, inverting the
14960         sense of the return value.
14961         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14962         * config/sh/sh.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14963         * config/sh/sh-protos.h (sh_cannot_change_mode_class): Delete.
14964         * config/sh/sh.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14965         (sh_cannot_change_mode_class): Replace with...
14966         (sh_can_change_mode_class): ...this new function, inverting the
14967         sense of the return value.
14968         * config/sparc/sparc.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14969         * config/sparc/sparc.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14970         (sparc_can_change_mode_class): New function.
14971         * config/spu/spu.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14972         * config/spu/spu.c (spu_can_change_mode_class): New function.
14973         (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14974         * config/visium/visium.h (CANNOT_CHANGE_MODE_CLASS): Delete.
14975         * config/visium/visium.c (TARGET_CAN_CHANGE_MODE_CLASS): Redefine.
14976         (visium_can_change_mode_class): New function.
14977         * system.h (CANNOT_CHANGE_MODE_CLASS): Poison.
14978
14979 2017-09-15  Richard Biener  <rguenther@suse.de>
14980
14981         PR tree-optimization/82217
14982         * tree-ssa-sccvn.c (visit_phi): Properly handle all VN_TOP
14983         but not undefined case.
14984
14985 2017-09-15  Jakub Jelinek  <jakub@redhat.com>
14986
14987         PR target/82145
14988         * postreload.c (reload_cse_simplify_operands): Skip
14989         NOTE_INSN_DELETED_LABEL similarly to skipping CODE_LABEL.
14990
14991 2017-09-15  Richard Biener  <rguenther@suse.de>
14992
14993         PR tree-optimization/68823
14994         * graphite-scop-detection.c (build_alias_set): If we have a
14995         possible dependence check whether we can handle them by just
14996         looking at the DRs DR_ACCESS_FNs.
14997         (build_scops): If build_alias_set fails, fail the SCOP.
14998
14999 2017-09-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
15000
15001         * config/rs6000/rs6000-builtin.def (BU_FLOAT128_1_HW): New macros
15002         to support float128 built-in functions that require the ISA 3.0
15003         hardware.
15004         (BU_FLOAT128_3_HW): Likewise.
15005         (SQRTF128): Add support for the IEEE 128-bit square root and fma
15006         built-in functions.
15007         (FMAF128): Likewise.
15008         (FMAQ): Likewise.
15009         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
15010         support for built-in functions that need the ISA 3.0 IEEE 128-bit
15011         floating point instructions.
15012         (rs6000_invalid_builtin): Likewise.
15013         (rs6000_builtin_mask_names): Likewise.
15014         * config/rs6000/rs6000.h (MASK_FLOAT128_HW): Likewise.
15015         (RS6000_BTM_FLOAT128_HW): Likewise.
15016         (RS6000_BTM_COMMON): Likewise.
15017         * config/rs6000/rs6000.md (fma<mode>4_hw): Add a generator
15018         function.
15019         * doc/extend.texi (RS/6000 built-in functions): Document the
15020         IEEE 128-bit floating point square root and fused multiply-add
15021         built-in functions.
15022
15023 2017-09-14  Pat Haugen  <pthaugen@us.ibm.com>
15024
15025         * config/rs6000/rs6000.c (rs6000_set_up_by_prologue): Make sure the TOC
15026         reg (r2) isn't in the set of registers defined in the prologue.
15027
15028 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
15029             Alan Hayward  <alan.hayward@arm.com>
15030             David Sherwood  <david.sherwood@arm.com>
15031
15032         * tree-vectorizer.h (_loop_vec_info): Add max_vectorization_factor.
15033         (LOOP_VINFO_MAX_VECT_FACTOR): New macro.
15034         (LOOP_VINFO_ORIG_VECT_FACTOR): Replace with...
15035         (LOOP_VINFO_ORIG_MAX_VECT_FACTOR): ...this new macro.
15036         * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Update
15037         accordingly.
15038         * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15039         max_vectorization_factor.
15040         (vect_analyze_loop_2): Set LOOP_VINFO_MAX_VECT_FACTOR.
15041
15042 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
15043             Alan Hayward  <alan.hayward@arm.com>
15044             David Sherwood  <david.sherwood@arm.com>
15045
15046         * tree-vectorizer.h (vect_min_worthwhile_factor): Delete.
15047         (vect_worthwhile_without_simd_p): Declare.
15048         * tree-vect-loop.c (vect_worthwhile_without_simd_p): New function.
15049         (vectorizable_reduction): Use it.
15050         * tree-vect-stmts.c (vectorizable_shift): Likewise.
15051         (vectorizable_operation): Likewise.
15052
15053 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
15054             Alan Hayward  <alan.hayward@arm.com>
15055             David Sherwood  <david.sherwood@arm.com>
15056
15057         * tree-vectorizer.h (vect_get_num_copies): New function.
15058         * tree-vect-data-refs.c (vect_get_data_access_cost): Use it.
15059         * tree-vect-loop.c (vectorizable_reduction): Likewise.
15060         (vectorizable_induction): Likewise.
15061         (vectorizable_live_operation): Likewise.
15062         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
15063         (vectorizable_bswap): Likewise.
15064         (vectorizable_call): Likewise.
15065         (vectorizable_conversion): Likewise.
15066         (vectorizable_assignment): Likewise.
15067         (vectorizable_shift): Likewise.
15068         (vectorizable_operation): Likewise.
15069         (vectorizable_store): Likewise.
15070         (vectorizable_load): Likewise.
15071         (vectorizable_condition): Likewise.
15072         (vectorizable_comparison): Likewise.
15073         (vect_analyze_stmt): Pass the slp node to vectorizable_live_operation.
15074
15075 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
15076             Alan Hayward  <alan.hayward@arm.com>
15077             David Sherwood  <david.sherwood@arm.com>
15078
15079         * tree-vect-loop.c (vectorizable_induction): Use gimple_build instead
15080         of vect_init_vector.
15081
15082 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
15083             Alan Hayward  <alan.hayward@arm.com>
15084             David Sherwood  <david.sherwood@arm.com>
15085
15086         * gimple-fold.h (gimple_build_vector_from_val): Declare, and provide
15087         an inline wrapper that provides a location.
15088         (gimple_build_vector): Likewise.
15089         * gimple-fold.c (gimple_build_vector_from_val): New function.
15090         (gimple_build_vector): Likewise.
15091         * tree-vect-loop.c (get_initial_def_for_reduction): Use the new
15092         functions to build the initial value.  Always return a gimple value.
15093         (get_initial_defs_for_reduction): Likewise.  Only compute
15094         neutral_vec once.
15095         (vect_create_epilog_for_reduction): Don't call force_gimple_operand or
15096         vect_init_vector on the results from get_initial_def(s)_for_reduction.
15097         (vectorizable_induction): Use gimple_build_vector rather than
15098         vect_init_vector.
15099
15100 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
15101             Alan Hayward  <alan.hayward@arm.com>
15102             David Sherwood  <david.sherwood@arm.com>
15103
15104         * target.h (vec_perm_indices): New typedef.
15105         (auto_vec_perm_indices): Likewise.
15106         * optabs-query.h: Include target.h
15107         (can_vec_perm_p): Take a vec_perm_indices *.
15108         * optabs-query.c (can_vec_perm_p): Likewise.
15109         (can_mult_highpart_p): Update accordingly.  Use auto_vec_perm_indices.
15110         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
15111         * tree-vect-generic.c (lower_vec_perm): Likewise.
15112         * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
15113         (vect_grouped_load_supported): Likewise.
15114         (vect_shift_permute_load_chain): Likewise.
15115         (vect_permute_store_chain): Use auto_vec_perm_indices.
15116         (vect_permute_load_chain): Likewise.
15117         * fold-const.c (fold_vec_perm): Take vec_perm_indices.
15118         (fold_ternary_loc): Update accordingly.  Use auto_vec_perm_indices.
15119         Update uses of can_vec_perm_p.
15120         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Replace the
15121         mode with a number of elements.  Take a vec_perm_indices *.
15122         (vect_create_epilog_for_reduction): Update accordingly.
15123         Use auto_vec_perm_indices.
15124         (have_whole_vector_shift): Likewise.  Update call to can_vec_perm_p.
15125         * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
15126         (vect_transform_slp_perm_load): Likewise.
15127         (vect_schedule_slp_instance): Use auto_vec_perm_indices.
15128         * tree-vectorizer.h (vect_gen_perm_mask_any): Take a vec_perm_indices.
15129         (vect_gen_perm_mask_checked): Likewise.
15130         * tree-vect-stmts.c (vect_gen_perm_mask_any): Take a vec_perm_indices.
15131         (vect_gen_perm_mask_checked): Likewise.
15132         (vectorizable_mask_load_store): Use auto_vec_perm_indices.
15133         (vectorizable_store): Likewise.
15134         (vectorizable_load): Likewise.
15135         (perm_mask_for_reverse): Likewise.  Update call to can_vec_perm_p.
15136         (vectorizable_bswap): Likewise.
15137
15138 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
15139             Alan Hayward  <alan.hayward@arm.com>
15140             David Sherwood  <david.sherwood@arm.com>
15141
15142         * tree.h (build_vector): Take a vec<tree> instead of a tree *.
15143         * tree.c (build_vector): Likewise.
15144         (build_vector_from_ctor): Update accordingly.
15145         (build_vector_from_val): Likewise.
15146         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
15147         * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
15148         * tree-vect-generic.c (add_rshift): Likewise.
15149         (expand_vector_divmod): Likewise.
15150         (optimize_vector_constructor): Likewise.
15151         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
15152         (vect_transform_slp_perm_load): Likewise.
15153         (vect_schedule_slp_instance): Likewise.
15154         * tree-vect-stmts.c (vectorizable_bswap): Likewise.
15155         (vectorizable_call): Likewise.
15156         (vect_gen_perm_mask_any): Likewise.  Add elements in order.
15157         * expmed.c (make_tree): Likewise.
15158         * fold-const.c (fold_negate_expr_1): Use auto_vec<tree> when building
15159         a vector passed to build_vector.
15160         (fold_convert_const): Likewise.
15161         (exact_inverse): Likewise.
15162         (fold_ternary_loc): Likewise.
15163         (fold_relational_const): Likewise.
15164         (const_binop): Likewise.  Use VECTOR_CST_ELT directly when operating
15165         on VECTOR_CSTs, rather than going through vec_cst_ctor_to_array.
15166         (const_unop): Likewise.  Store the reduction accumulator in a
15167         variable rather than an array.
15168         (vec_cst_ctor_to_array): Take the number of elements as a parameter.
15169         (fold_vec_perm): Update calls accordingly.  Use auto_vec<tree> for
15170         the new vector, rather than constructing it after the input arrays.
15171         (native_interpret_vector): Use auto_vec<tree> when building
15172         a vector passed to build_vector.  Add elements in order.
15173         * tree-vect-loop.c (get_initial_defs_for_reduction): Use
15174         auto_vec<tree> when building a vector passed to build_vector.
15175         (vect_create_epilog_for_reduction): Likewise.
15176         (vectorizable_induction): Likewise.
15177         (get_initial_def_for_reduction): Likewise.  Fix indentation of
15178         case statements.
15179         * config/sparc/sparc.c (sparc_handle_vis_mul8x16): Change n_elts
15180         to a vec<tree> *.
15181         (sparc_fold_builtin): Use auto_vec<tree> when building a vector
15182         passed to build_vector.
15183
15184 2017-09-14  Richard Sandiford  <richard.sandiford@linaro.org>
15185             Alan Hayward  <alan.hayward@arm.com>
15186             David Sherwood  <david.sherwood@arm.com>
15187
15188         * tree-core.h (tree_base::u): Add an "nelts" field.
15189         (tree_vector): Use VECTOR_CST_NELTS as the length.
15190         * tree.c (tree_size): Likewise.
15191         (make_vector): Initialize VECTOR_CST_NELTS.
15192         * tree.h (VECTOR_CST_NELTS): Use the u.nelts field.
15193         * cfgexpand.c (expand_debug_expr): Use VECTOR_CST_NELTS instead of
15194         TYPE_VECTOR_SUBPARTS.
15195         * expr.c (const_vector_mask_from_tree): Consistently use "units"
15196         as the number of units, setting it from VECTOR_CST_NELTS.
15197         (const_vector_from_tree): Likewise.
15198         * fold-const.c (negate_expr_p): Use VECTOR_CST_NELTS instead of
15199         TYPE_VECTOR_SUBPARTS for the number of elements in a VECTOR_CST.
15200         (fold_negate_expr_1): Likewise.
15201         (fold_convert_const): Likewise.
15202         (const_binop): Likewise.  Differentiate the number of output and
15203         input elements.
15204         (const_unop): Likewise.
15205         (fold_ternary_loc): Use VECTOR_CST_NELTS for the number of elements
15206         in a VECTOR_CST, asserting that it is the same as TYPE_VECTOR_SUBPARTS
15207         in cases that did the opposite.
15208
15209 2017-09-14  Richard Biener  <rguenther@suse.de>
15210
15211         * tree-ssa-sccvn.c (visit_phi): Merge undefined values similar
15212         to VN_TOP.
15213
15214 2017-09-14  Eric Botcazou  <ebotcazou@adacore.com>
15215
15216         * dwarf2out.c (dwarf2out_source_line): Remove superfluous test.
15217
15218 2017-09-14  Jakub Jelinek  <jakub@redhat.com>
15219
15220         PR target/81325
15221         * cfgbuild.c (find_bb_boundaries): Ignore debug insns in decisions
15222         if and where to split a bb, except for splitting before debug insn
15223         sequences followed by non-label real insn.  Delete debug insns
15224         in between basic blocks.
15225
15226         * combine.c (make_compound_operation_int): Formatting fixes.
15227
15228         * config/alpha/elf.h (LINK_EH_SPEC): Add -static-pie support.
15229         * config/alpha/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
15230         * config/netbsd.h (LINK_EH_SPEC): Likewise.
15231         * config/sol2.h (LINK_EH_SPEC): Likewise.
15232         * config/arm/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
15233         * config/s390/linux.h (LINK_SPEC): Likewise.
15234         * config/freebsd.h (LINK_EH_SPEC): Likewise.
15235         * config/openbsd.h (LINK_EH_SPEC): Likewise.
15236         * config/lm32/uclinux-elf.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
15237         * config/aarch64/aarch64-linux.h (LINUX_TARGET_LINK_SPEC): Likewise.
15238         * config/powerpcspe/sysv4.h (LINK_EH_SPEC): Likewise.
15239         * config/bfin/linux.h (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
15240         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Fix a typo.
15241         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Formatting fix.
15242
15243 2017-09-13  Jakub Jelinek  <jakub@redhat.com>
15244
15245         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Add -static-pie
15246         support.
15247         (ENDFILE_LINUX_SPEC): Likewise.
15248         (LINK_EH_SPEC): Likewise.
15249         * config/rs6000/linux64.h (LINK_SHLIB_SPEC): Likewise.
15250         (LINK_OS_LINUX_SPEC32): Likewise.
15251         (LINK_OS_LINUX_SPEC64): Likewise.
15252         * config/rs6000/linux.h (LINK_SHLIB_SPEC): Likewise.
15253         (LINK_OS_LINUX_SPEC): Likewise.
15254
15255 2017-09-13  Martin Liska  <mliska@suse.cz>
15256
15257         PR middle-end/82154
15258         * stmt.c (expand_sjlj_dispatch_table): Use CASE_LOW when
15259         CASE_HIGH is NULL_TREE.
15260
15261 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
15262             Alan Hayward  <alan.hayward@arm.com>
15263             David Sherwood  <david.sherwood@arm.com>
15264
15265         * target.def (secondary_memory_needed): New hook.
15266         (secondary_reload): Refer to TARGET_SECONDARY_MEMORY_NEEDED
15267         instead of SECONDARY_MEMORY_NEEDED.
15268         (secondary_memory_needed_mode): Likewise.
15269         * hooks.h (hook_bool_mode_reg_class_t_reg_class_t_false): Declare.
15270         * hooks.c (hook_bool_mode_reg_class_t_reg_class_t_false): New function.
15271         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED): Replace with...
15272         (TARGET_SECONDARY_MEMORY_NEEDED): ...this.
15273         (SECONDARY_MEMORY_NEEDED_RTX): Update reference accordingly.
15274         * doc/tm.texi: Regenerate.
15275         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED): Delete.
15276         * config/alpha/alpha.c (alpha_secondary_memory_needed): New function.
15277         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
15278         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED): Delete.
15279         * config/i386/i386-protos.h (ix86_secondary_memory_needed): Delete.
15280         * config/i386/i386.c (inline_secondary_memory_needed): Put the
15281         mode argument first and change the reg_class arguments to reg_class_t.
15282         (ix86_secondary_memory_needed): Likewise.  Remove the strict parameter.
15283         Make static.  Update the call to inline_secondary_memory_needed.
15284         (ix86_register_move_cost): Update the call to
15285         inline_secondary_memory_needed.
15286         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
15287         * config/ia64/ia64.h (SECONDARY_MEMORY_NEEDED): Delete commented-out
15288         definition.
15289         * config/ia64/ia64.c (spill_xfmode_rfmode_operand): Refer to
15290         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
15291         in comment.
15292         * config/mips/mips.h (SECONDARY_MEMORY_NEEDED): Delete.
15293         * config/mips/mips-protos.h (mips_secondary_memory_needed): Delete.
15294         * config/mips/mips.c (mips_secondary_memory_needed): Make static
15295         and match hook interface.  Add comment from mips.h.
15296         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
15297         * config/mmix/mmix.md (truncdfsf2): Refer to
15298         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
15299         in comment.
15300         * config/pa/pa-64.h (SECONDARY_MEMORY_NEEDED): Rename to...
15301         (PA_SECONDARY_MEMORY_NEEDED): ...this, and put the mode argument first.
15302         * config/pa/pa.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
15303         (pa_secondary_memory_needed): New function.
15304         * config/pdp11/pdp11.h (SECONDARY_MEMORY_NEEDED): Delete.
15305         * config/pdp11/pdp11-protos.h (pdp11_secondary_memory_needed): Delete.
15306         * config/pdp11/pdp11.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
15307         (pdp11_secondary_memory_needed): Make static and match hook interface.
15308         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED): Delete.
15309         * config/powerpcspe/powerpcspe-protos.h
15310         (rs6000_secondary_memory_needed_ptr): Delete.
15311         * config/powerpcspe/powerpcspe.c (rs6000_secondary_memory_needed_ptr):
15312         Delete.
15313         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
15314         (rs6000_option_override_internal): Assign to
15315         targetm.secondary_memory_needed rather than
15316         rs6000_secondary_memory_needed_ptr.
15317         (rs6000_secondary_memory_needed): Match hook interface.
15318         (rs6000_debug_secondary_memory_needed): Likewise.
15319         * config/riscv/riscv.h (SECONDARY_MEMORY_NEEDED): Delete.
15320         * config/riscv/riscv.c (riscv_secondary_memory_needed): New function.
15321         (riscv_register_move_cost): Use it instead of SECONDARY_MEMORY_NEEDED.
15322         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
15323         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED): Delete.
15324         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_ptr):
15325         Delete.
15326         * config/rs6000/rs6000.c (rs6000_secondary_memory_needed_ptr): Delete.
15327         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
15328         (rs6000_option_override_internal): Assign to
15329         targetm.secondary_memory_needed rather than
15330         rs6000_secondary_memory_needed_ptr.
15331         (rs6000_secondary_memory_needed): Match hook interface.
15332         (rs6000_debug_secondary_memory_needed): Likewise.
15333         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED): Delete.
15334         * config/s390/s390.c (s390_secondary_memory_needed): New function.
15335         (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
15336         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED): Delete.
15337         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED): Redefine.
15338         (sparc_secondary_memory_needed): New function.
15339         * lra-constraints.c (check_and_process_move): Refer to
15340         TARGET_SECONDARY_MEMORY_NEEDED rather than SECONDARY_MEMORY_NEEDED
15341         in comment.
15342         (curr_insn_transform): Likewise.
15343         (process_alt_operands): Use targetm.secondary_memory_needed
15344         instead of TARGET_SECONDARY_MEMORY_NEEDED.
15345         (check_secondary_memory_needed_p): Likewise.
15346         (choose_split_class): Likewise.
15347         * reload.c: Unconditionally include code that was previously
15348         conditional on SECONDARY_MEMORY_NEEDED.
15349         (push_secondary_reload): Use targetm.secondary_memory_needed
15350         instead of TARGET_SECONDARY_MEMORY_NEEDED.
15351         (push_reload): Likewise.
15352         * reload1.c: Unconditionally include code that was previously
15353         conditional on SECONDARY_MEMORY_NEEDED.
15354         (choose_reload_regs): Use targetm.secondary_memory_needed
15355         instead of TARGET_SECONDARY_MEMORY_NEEDED.
15356         (gen_reload): Likewise.
15357         * system.h (SECONDARY_MEMORY_NEEDED): Poison.
15358
15359 2017-09-13  Richard Sandiford  <richard.sandiford@linaro.org>
15360             Alan Hayward  <alan.hayward@arm.com>
15361             David Sherwood  <david.sherwood@arm.com>
15362
15363         * target.def (secondary_memory_needed_mode): New hook:
15364         * targhooks.c (default_secondary_memory_needed_mode): Declare.
15365         * targhooks.h (default_secondary_memory_needed_mode): New function.
15366         * doc/tm.texi.in (SECONDARY_MEMORY_NEEDED_MODE): Replace with...
15367         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): ...this.
15368         * doc/tm.texi: Regenerate.
15369         * lra-constraints.c (check_and_process_move): Use
15370         targetm.secondary_memory_needed_mode instead of
15371         TARGET_SECONDARY_MEMORY_NEEDED_MODE.
15372         (curr_insn_transform): Likewise.
15373         * reload.c (get_secondary_mem): Likewise.
15374         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
15375         * config/alpha/alpha.c (alpha_secondary_memory_needed_mode): New
15376         function.
15377         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
15378         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
15379         * config/i386/i386.c (ix86_secondary_memory_needed_mode): New function.
15380         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
15381         * config/powerpcspe/powerpcspe.h (SECONDARY_MEMORY_NEEDED_MODE):
15382         Delete.
15383         * config/powerpcspe/powerpcspe-protos.h
15384         (rs6000_secondary_memory_needed_mode): Delete.
15385         * config/powerpcspe/powerpcspe.c
15386         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
15387         (rs6000_secondary_memory_needed_mode): Make static.
15388         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
15389         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_mode):
15390         Delete.
15391         * config/rs6000/rs6000.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
15392         Redefine.
15393         (rs6000_secondary_memory_needed_mode): Make static.
15394         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
15395         * config/s390/s390.c (s390_secondary_memory_needed_mode): New function.
15396         (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Redefine.
15397         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Delete.
15398         * config/sparc/sparc.c (TARGET_SECONDARY_MEMORY_NEEDED_MODE):
15399         Redefine.
15400         (sparc_secondary_memory_needed_mode): New function.
15401         * system.h (TARGET_SECONDARY_MEMORY_NEEDED_MODE): Poison.
15402
15403 2017-09-13  Jackson Woodruff  <jackson.woodruff@arm.com>
15404
15405         * config/aarch64/constraints.md (Umq): New constraint.
15406         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>):
15407         Change to use Umq.
15408         (mov<mode>): Update condition.
15409
15410 2017-09-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
15411
15412         * gimple-ssa-store-merging.c (sort_by_bitpos): Compare store order
15413         when bitposition is the same.
15414
15415 2017-09-13  Richard Biener  <rguenther@suse.de>
15416
15417         * dwarf2out.c (output_die_symbol): Remove.
15418         (output_die): Do not output a DIEs symbol.
15419
15420 2017-09-13  Richard Biener  <rguenther@suse.de>
15421
15422         PR middle-end/82128
15423         * gimple-fold.c (gimple_fold_call): Update SSA name in-place to
15424         default-def to avoid breaking iterator update with the weird
15425         interaction with cgraph_update_edges_for_call_stmt_node.
15426
15427 2017-09-13  Richard Biener  <rguenther@suse.de>
15428
15429         * tree-cfg.c (verify_gimple_assign_binary): Add verification
15430         for WIDEN_SUM_EXPR, VEC_WIDEN_MULT_{HI,LO,EVEN,ODD}_EXPR,
15431         VEC_PACK_{TRUNC,SAT,FIX_TRUNC}_EXPR.
15432         (verify_gimple_assign_ternary): Add verification for DOT_PROD_EXPR.
15433
15434 2017-09-13  Kugan Vivekanandarajah  <kuganv@linaro.org>
15435
15436         * config/aarch64/aarch64.c (aarch64_override_options_after_change_1):
15437         Disable pc relative literal load irrespective of
15438         TARGET_FIX_ERR_A53_84341 for default.
15439
15440 2017-09-12  Eric Botcazou  <ebotcazou@adacore.com>
15441
15442         * config/sparc/sparc.c (output_return): Output the source location of
15443         the insn in the delay slot, if any.
15444         (output_sibcall): Likewise.
15445
15446 2017-09-12  H.J. Lu  <hongjiu.lu@intel.com>
15447
15448         PR driver/81498
15449         * common.opt (-static-pie): New alias.
15450         (shared): Negate static-pie.
15451         (-no-pie): Update help text.
15452         (-pie): Likewise.
15453         (static-pie): New option.
15454         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Add
15455         -static-pie support.
15456         (GNU_USER_TARGET_ENDFILE_SPEC): Likewise.
15457         (LINK_EH_SPEC): Likewise.
15458         (LINK_GCC_C_SEQUENCE_SPEC): Likewise.
15459         * config/i386/gnu-user.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
15460         * config/i386/gnu-user64.h (GNU_USER_TARGET_LINK_SPEC): Likewise.
15461         * gcc.c (LINK_COMMAND_SPEC): Likewise.
15462         (init_gcc_specs): Likewise.
15463         (init_spec): Likewise.
15464         (display_help): Update help message for -pie.
15465         * doc/invoke.texi: Update -pie, -no-pie and -static.  Document
15466         -static-pie.
15467
15468 2017-09-12  Wilco Dijkstra  <wdijkstr@arm.com>
15469
15470         * config/aarch64/aarch64.md (movsi_aarch64): Remove all '*'.
15471         (movdi_aarch64): Likewise.
15472         (movti_aarch64): Likewise.
15473
15474 2017-09-12 Simon Wright <simon@pushface.org>
15475
15476         PR target/80204
15477         * config/darwin-driver.c (darwin_find_version_from_kernel): Eliminate
15478         calculation of the minor version, always output as 0.
15479
15480 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
15481
15482         PR target/82112
15483         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
15484         ALTIVEC_BUILTIN_VEC_LD if arg1 has array type call default_conversion
15485         on it early, rather than manual conversion late.  For
15486         ALTIVEC_BUILTIN_VEC_ST if arg2 has array type call default_conversion
15487         instead of performing manual conversion.
15488
15489 2017-09-12  Carl Love  <cel@us.ibm.com>
15490
15491         * config/rs6000/altivec.md (vec_widen_umult_even_v4si,
15492         vec_widen_smult_even_v4si): Add define expands for vmuleuw, vmulesw,
15493         vmulouw, vmulosw.
15494         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
15495         VMULOSW): Add definitions.
15496         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
15497         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
15498         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
15499         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
15500         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
15501
15502 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
15503
15504         * config/aarch64/aarch64.md (movdi_aarch64): Set load/store
15505         types correctly.
15506         (movti_aarch64): Likewise.
15507         (movdf_aarch64): Likewise.
15508         (movtf_aarch64): Likewise.
15509         (load_pairdi): Likewise.
15510         (store_pairdi): Likewise.
15511         (load_pairdf): Likewise.
15512         (store_pairdf): Likewise.
15513         (loadwb_pair<GPI:mode>_<P:mode>): Likewise.
15514         (storewb_pair<GPI:mode>_<P:mode>): Likewise.
15515         (ldr_got_small_<mode>): Likewise.
15516         (ldr_got_small_28k_<mode>): Likewise.
15517         (ldr_got_tiny): Likewise.
15518         * config/aarch64/iterators.md (ldst_sz): New.
15519         (ldpstp_sz): Likewise.
15520         * config/aarch64/thunderx.md (thunderx_storepair): Split store_8
15521         to store_16.
15522         (thunderx_load): Split load_8 to load_16.
15523         * config/aarch64/thunderx2t99.md (thunderx2t99_loadpair): Split
15524         load_8 to load_16.
15525         (thunderx2t99_storepair_basic): Split store_8 to store_16.
15526         * config/arm/xgene1.md (xgene1_load_pair): Split load_8 to load_16.
15527         (xgene1_store_pair): Split store_8 to store_16.
15528         * config/aarch64/falkor.md (falkor_ld_3_ld): Split load_8 to load_16.
15529         (falkor_st_0_st_sd): Split store_8 to store_16.
15530
15531 2017-09-12  James Greenhalgh  <james.greenhalgh@arm.com>
15532
15533         * config/arm/types.md (type): Rename load1/2/3/4 to load_4/8/12/16
15534         and store1/2/3/4 to store_4/8/12/16.
15535         * config/aarch64/aarch64.md: Update for rename.
15536         * config/arm/arm.md: Likewise.: Likewise.
15537         * config/arm/arm.c: Likewise.
15538         * config/arm/thumb1.md: Likewise.
15539         * config/arm/thumb2.md: Likewise.
15540         * config/arm/vfp.md: Likewise.
15541         * config/arm/arm-generic.md: Likewise.
15542         * config/arm/arm1020e.md: Likewise.
15543         * config/arm/arm1026ejs.md: Likewise.
15544         * config/arm/arm1136jfs.md: Likewise.
15545         * config/arm/arm926ejs.md: Likewise.
15546         * config/arm/cortex-a15.md: Likewise.
15547         * config/arm/cortex-a17.md: Likewise.
15548         * config/arm/cortex-a5.md: Likewise.
15549         * config/arm/cortex-a53.md: Likewise.
15550         * config/arm/cortex-a57.md: Likewise.
15551         * config/arm/cortex-a7.md: Likewise.
15552         * config/arm/cortex-a8.md: Likewise.
15553         * config/arm/cortex-a9.md: Likewise.
15554         * config/arm/cortex-m4.md: Likewise.
15555         * config/arm/cortex-m7.md: Likewise.
15556         * config/arm/cortex-r4.md: Likewise.
15557         * config/arm/exynos-m1.md: Likewise.
15558         * config/arm/fa526.md: Likewise.
15559         * config/arm/fa606te.md: Likewise.
15560         * config/arm/fa626te.md: Likewise.
15561         * config/arm/fa726te.md: Likewise.
15562         * config/arm/fmp626.md: Likewise.
15563         * config/arm/iwmmxt.md: Likewise.
15564         * config/arm/ldmstm.md: Likewise.
15565         * config/arm/marvell-pj4.md: Likewise.
15566         * config/arm/xgene1.md: Likewise.
15567         * config/aarch64/thunderx.md: Likewise.
15568         * config/aarch64/thunderx2t99.md: Likewise.
15569         * config/aarch64/falkor.md: Likewise.
15570
15571 2017-09-12  Martin Liska  <mliska@suse.cz>
15572
15573         * attribs.c (private_lookup_attribute): New function.
15574         * attribs.h (private_lookup_attribute): Declared here.
15575         (lookup_attribute): Called from this place.
15576
15577 2017-09-12  Richard Biener  <rguenther@suse.de>
15578
15579         PR tree-optimization/82157
15580         * tree-ssa-pre.c (remove_dead_inserted_code): Do not remove
15581         stmts with side-effects.
15582
15583 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
15584             Alan Hayward  <alan.hayward@arm.com>
15585             David Sherwood <david.sherwood@arm.com>
15586
15587         * target.def (hard_regno_nregs): New hook.
15588         (class_max_nregs): Refer to it instead of HARD_REGNO_NREGS.
15589         * targhooks.h (default_hard_regno_nregs): Declare.
15590         * targhooks.c (default_hard_regno_nregs): New function.
15591         * doc/tm.texi.in (HARD_REGNO_NREGS): Replace with...
15592         (TARGET_HARD_REGNO_NREGS): ...this hook.
15593         (HARD_REGNO_NREGS_HAS_PADDING): Update accordingly.
15594         (CLASS_MAX_NREGS): Likewise.
15595         * doc/tm.texi: Regenerate.
15596         * reginfo.c (init_reg_modes_target): Use targetm.hard_regno_nregs
15597         instead of HARD_REGNO_NREGS.
15598         * rtl.h (REG_NREGS): Refer to TARGET_HARD_REGNO_NREGS rather than
15599         HARD_REGNO_NREGS in the comment.
15600         * config/aarch64/aarch64.h (HARD_REGNO_NREGS): Delete.
15601         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_nregs): Delete.
15602         * config/aarch64/aarch64.c (aarch64_hard_regno_nregs): Make static.
15603         Return an unsigned int.
15604         (TARGET_HARD_REGNO_NREGS): Redefine.
15605         * config/alpha/alpha.h (HARD_REGNO_NREGS): Delete.
15606         * config/arc/arc.h (HARD_REGNO_NREGS): Delete.
15607         * config/arc/arc.c (TARGET_HARD_REGNO_NREGS): Redefine.
15608         (arc_hard_regno_nregs): New function.
15609         * config/arm/arm.h (HARD_REGNO_NREGS): Delete.
15610         * config/arm/arm.c (TARGET_HARD_REGNO_NREGS): Redefine.
15611         (arm_hard_regno_nregs): New function.
15612         * config/avr/avr.h (HARD_REGNO_NREGS): Delete.
15613         * config/bfin/bfin.h (HARD_REGNO_NREGS): Delete.
15614         * config/bfin/bfin.c (bfin_hard_regno_nregs): New function.
15615         (TARGET_HARD_REGNO_NREGS): Redefine.
15616         * config/c6x/c6x.h (HARD_REGNO_NREGS): Delete.
15617         * config/cr16/cr16.h (LONG_REG_P): Use targetm.hard_regno_nregs.
15618         (HARD_REGNO_NREGS): Delete.
15619         * config/cr16/cr16.c (TARGET_HARD_REGNO_NREGS): Redefine.
15620         (cr16_hard_regno_nregs): New function.
15621         (cr16_memory_move_cost): Use it instead of HARD_REGNO_NREGS.
15622         * config/cris/cris.h (HARD_REGNO_NREGS): Delete.
15623         * config/cris/cris.c (TARGET_HARD_REGNO_NREGS): Redefine.
15624         (cris_hard_regno_nregs): New function.
15625         * config/epiphany/epiphany.h (HARD_REGNO_NREGS): Delete.
15626         * config/fr30/fr30.h (HARD_REGNO_NREGS): Delete.
15627         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
15628         * config/frv/frv.h (HARD_REGNO_NREGS): Delete.
15629         (CLASS_MAX_NREGS): Remove outdated copy of documentation.
15630         * config/frv/frv-protos.h (frv_hard_regno_nregs): Delete.
15631         * config/frv/frv.c (TARGET_HARD_REGNO_NREGS): Redefine.
15632         (frv_hard_regno_nregs): Make static.  Take and return an
15633         unsigned int.
15634         (frv_class_max_nregs): Remove outdated copy of documentation.
15635         * config/ft32/ft32.h (HARD_REGNO_NREGS): Delete.
15636         * config/h8300/h8300.h (HARD_REGNO_NREGS): Delete.
15637         * config/h8300/h8300-protos.h (h8300_hard_regno_nregs): Delete.
15638         * config/h8300/h8300.c (h8300_hard_regno_nregs): Delete.
15639         * config/i386/i386.h (HARD_REGNO_NREGS): Delete.
15640         * config/i386/i386.c (ix86_hard_regno_nregs): New function.
15641         (TARGET_HARD_REGNO_NREGS): Redefine.
15642         * config/ia64/ia64.h (HARD_REGNO_NREGS): Delete.
15643         (CLASS_MAX_NREGS): Update comment.
15644         * config/ia64/ia64.c (TARGET_HARD_REGNO_NREGS): Redefine.
15645         (ia64_hard_regno_nregs): New function.
15646         * config/iq2000/iq2000.h (HARD_REGNO_NREGS): Delete.
15647         * config/lm32/lm32.h (HARD_REGNO_NREGS): Delete.
15648         * config/m32c/m32c.h (HARD_REGNO_NREGS): Delete.
15649         * config/m32c/m32c-protos.h (m32c_hard_regno_nregs): Delete.
15650         * config/m32c/m32c.c (m32c_hard_regno_nregs_1): Take and return
15651         an unsigned int.
15652         (m32c_hard_regno_nregs): Likewise.  Make static.
15653         (TARGET_HARD_REGNO_NREGS): Redefine.
15654         * config/m32r/m32r.h (HARD_REGNO_NREGS): Delete.
15655         * config/m68k/m68k.h (HARD_REGNO_NREGS): Delete.
15656         * config/m68k/m68k.c (TARGET_HARD_REGNO_NREGS): Redefine.
15657         (m68k_hard_regno_nregs): New function.
15658         * config/mcore/mcore.h (HARD_REGNO_NREGS): Delete.
15659         * config/microblaze/microblaze.h (HARD_REGNO_NREGS): Delete.
15660         * config/mips/mips.h (HARD_REGNO_NREGS): Delete.
15661         * config/mips/mips-protos.h (mips_hard_regno_nregs): Delete.
15662         * config/mips/mips.c (mips_hard_regno_nregs): Make static.
15663         Take and return an unsigned int.
15664         (TARGET_HARD_REGNO_NREGS): Redefine.
15665         * config/mmix/mmix.h (HARD_REGNO_NREGS): Delete.
15666         (CLASS_MAX_NREGS): Use targetm.hard_regno_nregs.
15667         * config/mn10300/mn10300.h (HARD_REGNO_NREGS): Delete.
15668         * config/moxie/moxie.h (HARD_REGNO_NREGS): Delete.
15669         * config/msp430/msp430.h (HARD_REGNO_NREGS): Delete.
15670         * config/msp430/msp430-protos.h (msp430_hard_regno_nregs): Delete.
15671         * config/msp430/msp430.c (TARGET_HARD_REGNO_NREGS): Redefine.
15672         (msp430_hard_regno_nregs): Make static.  Take and return an
15673         unsigned int.
15674         * config/nds32/nds32.h (HARD_REGNO_NREGS): Delete.
15675         * config/nds32/nds32-protos.h (nds32_hard_regno_nregs): Delete.
15676         * config/nds32/nds32.c (nds32_hard_regno_nregs): Delete.
15677         (nds32_hard_regno_mode_ok): Use targetm.hard_regno_nregs.
15678         * config/nios2/nios2.h (HARD_REGNO_NREGS): Delete.
15679         * config/nvptx/nvptx.h (HARD_REGNO_NREGS): Delete.
15680         * config/nvptx/nvptx.c (nvptx_hard_regno_nregs): New function.
15681         (TARGET_HARD_REGNO_NREGS): Redefine.
15682         * config/pa/pa32-regs.h (HARD_REGNO_NREGS): Rename to...
15683         (PA_HARD_REGNO_NREGS): ...this.
15684         * config/pa/pa64-regs.h (HARD_REGNO_NREGS): Rename to...
15685         (PA_HARD_REGNO_NREGS): ...this.
15686         * config/pa/pa.c (TARGET_HARD_REGNO_NREGS): Redefine.
15687         (pa_hard_regno_nregs): New function.
15688         * config/pdp11/pdp11.h (HARD_REGNO_NREGS): Delete.
15689         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_NREGS): Redefine.
15690         (pdp11_hard_regno_nregs): New function.
15691         * config/powerpcspe/powerpcspe.h (HARD_REGNO_NREGS): Delete.
15692         * config/powerpcspe/powerpcspe.c (TARGET_HARD_REGNO_NREGS): Redefine.
15693         (rs6000_hard_regno_nregs_hook): New function.
15694         * config/riscv/riscv.h (HARD_REGNO_NREGS): Delete.
15695         * config/riscv/riscv-protos.h (riscv_hard_regno_nregs): Delete.
15696         * config/riscv/riscv.c (riscv_hard_regno_nregs): Make static.
15697         Take and return an unsigned int.  Move earlier in file.
15698         (TARGET_HARD_REGNO_NREGS): Redefine.
15699         * config/rl78/rl78.h (HARD_REGNO_NREGS): Delete.
15700         * config/rl78/rl78-protos.h (rl78_hard_regno_nregs): Delete.
15701         * config/rl78/rl78.c (TARGET_HARD_REGNO_NREGS): Reefine.
15702         (rl78_hard_regno_nregs): Make static.  Take and return an
15703         unsigned int.
15704         * config/rs6000/rs6000.h (HARD_REGNO_NREGS): Delete.
15705         * config/rs6000/rs6000.c (TARGET_HARD_REGNO_NREGS): Redefine.
15706         (rs6000_hard_regno_nregs_hook): New function.
15707         * config/rx/rx.h (HARD_REGNO_NREGS): Delete.
15708         * config/rx/rx.c (rx_hard_regno_nregs): New function.
15709         (TARGET_HARD_REGNO_NREGS): Redefine.
15710         * config/s390/s390.h (HARD_REGNO_NREGS): Delete.
15711         * config/s390/s390.c (REGNO_PAIR_OK): Use s390_hard_regno_nregs
15712         instead of HARD_REGNO_NREGS.
15713         (s390_hard_regno_nregs): New function.
15714         (s390_hard_regno_mode_ok): Add comment from s390.h.
15715         (TARGET_HARD_REGNO_NREGS): Redefine.
15716         * config/sh/sh.h (HARD_REGNO_NREGS): Delete.
15717         * config/sh/sh.c (TARGET_HARD_REGNO_NREGS): Redefine.
15718         (sh_hard_regno_nregs): New function.
15719         (sh_pass_in_reg_p): Use it.
15720         * config/sparc/sparc.h (HARD_REGNO_NREGS): Delete.
15721         * config/sparc/sparc.c (TARGET_HARD_REGNO_NREGS): Redefine.
15722         (sparc_hard_regno_nregs): New function.
15723         * config/spu/spu.h (HARD_REGNO_NREGS): Delete.
15724         * config/spu/spu.c (spu_hard_regno_nregs): New function.
15725         (spu_function_arg_advance): Use it, supplying a valid register number.
15726         (TARGET_HARD_REGNO_NREGS): Redefine.
15727         * config/stormy16/stormy16.h (HARD_REGNO_NREGS): Delete.
15728         * config/tilegx/tilegx.h (HARD_REGNO_NREGS): Delete.
15729         * config/tilepro/tilepro.h (HARD_REGNO_NREGS): Delete.
15730         * config/v850/v850.h (HARD_REGNO_NREGS): Delete.
15731         * config/vax/vax.h (HARD_REGNO_NREGS): Delete.
15732         * config/visium/visium.h (HARD_REGNO_NREGS): Delete.
15733         (CLASS_MAX_NREGS): Remove copy of old documentation.
15734         * config/visium/visium.c (TARGET_HARD_REGNO_NREGS): Redefine.
15735         (visium_hard_regno_nregs): New function.
15736         (visium_hard_regno_mode_ok): Use it instead of HARD_REGNO_NREGS.
15737         * config/xtensa/xtensa.h (HARD_REGNO_NREGS): Delete.
15738         * config/xtensa/xtensa.c (TARGET_HARD_REGNO_NREGS): Redefine.
15739         xtensa_hard_regno_nregs): New function.
15740         * system.h (HARD_REGNO_NREGS): Poison.
15741
15742 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
15743
15744         * config/arm/arm.h (THUMB_SECONDARY_INPUT_RELOAD_CLASS): Use
15745         hard_regno_nregs instead of HARD_REGNO_NREGS.
15746         (THUMB_SECONDARY_OUTPUT_RELOAD_CLASS): Likewise.
15747         * config/c6x/c6x.c (c6x_expand_prologue): Likewise.
15748         (c6x_expand_epilogue): Likewise.
15749         * config/frv/frv.c (frv_alloc_temp_reg): Likewise.
15750         (frv_read_iacc_argument): Likewise.
15751         * config/sh/sh.c: Include regs.h.
15752         (sh_print_operand): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
15753         (regs_used): Likewise.
15754         (output_stack_adjust): Likewise.
15755         * config/xtensa/xtensa.c (xtensa_copy_incoming_a7): Likewise.
15756         * expmed.c: Include regs.h.
15757         (store_bit_field_1): Use hard_regno_nregs instead of HARD_REGNO_NREGS.
15758         * ree.c: Include regs.h.
15759         (combine_reaching_defs): Use hard_regno_nregs instead of
15760         HARD_REGNO_NREGS.
15761         (add_removable_extension): Likewise.
15762
15763 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
15764
15765         * regs.h (hard_regno_nregs): Turn into a function.
15766         (end_hard_regno): Update accordingly.
15767         * caller-save.c (setup_save_areas): Likewise.
15768         (save_call_clobbered_regs): Likewise.
15769         (replace_reg_with_saved_mem): Likewise.
15770         (insert_restore): Likewise.
15771         (insert_save): Likewise.
15772         * combine.c (can_change_dest_mode): Likewise.
15773         (move_deaths): Likewise.
15774         (distribute_notes): Likewise.
15775         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): Likewise.
15776         * config/powerpcspe/powerpcspe.c (rs6000_cannot_change_mode_class)
15777         (rs6000_split_multireg_move): Likewise.
15778         (rs6000_register_move_cost): Likewise.
15779         (rs6000_memory_move_cost): Likewise.
15780         * config/rs6000/rs6000.c (rs6000_cannot_change_mode_class): Likewise.
15781         (rs6000_split_multireg_move): Likewise.
15782         (rs6000_register_move_cost): Likewise.
15783         (rs6000_memory_move_cost): Likewise.
15784         * cselib.c (cselib_reset_table): Likewise.
15785         (cselib_lookup_1): Likewise.
15786         * emit-rtl.c (set_mode_and_regno): Likewise.
15787         * function.c (aggregate_value_p): Likewise.
15788         * ira-color.c (setup_profitable_hard_regs): Likewise.
15789         (check_hard_reg_p): Likewise.
15790         (calculate_saved_nregs): Likewise.
15791         (assign_hard_reg): Likewise.
15792         (improve_allocation): Likewise.
15793         (calculate_spill_cost): Likewise.
15794         * ira-emit.c (modify_move_list): Likewise.
15795         * ira-int.h (ira_hard_reg_set_intersection_p): Likewise.
15796         (ira_hard_reg_in_set_p): Likewise.
15797         * ira.c (setup_reg_mode_hard_regset): Likewise.
15798         (clarify_prohibited_class_mode_regs): Likewise.
15799         (check_allocation): Likewise.
15800         * lra-assigns.c (find_hard_regno_for_1): Likewise.
15801         (lra_setup_reg_renumber): Likewise.
15802         (setup_try_hard_regno_pseudos): Likewise.
15803         (spill_for): Likewise.
15804         (assign_hard_regno): Likewise.
15805         (setup_live_pseudos_and_spill_after_risky_transforms): Likewise.
15806         * lra-constraints.c (in_class_p): Likewise.
15807         (lra_constraint_offset): Likewise.
15808         (simplify_operand_subreg): Likewise.
15809         (lra_constraints): Likewise.
15810         (split_reg): Likewise.
15811         (split_if_necessary): Likewise.
15812         (invariant_p): Likewise.
15813         (inherit_in_ebb): Likewise.
15814         * lra-lives.c (process_bb_lives): Likewise.
15815         * lra-remat.c (reg_overlap_for_remat_p): Likewise.
15816         (get_hard_regs): Likewise.
15817         (do_remat): Likewise.
15818         * lra-spills.c (assign_spill_hard_regs): Likewise.
15819         * mode-switching.c (create_pre_exit): Likewise.
15820         * postreload.c (reload_combine_recognize_pattern): Likewise.
15821         * recog.c (peep2_find_free_register): Likewise.
15822         * regcprop.c (kill_value_regno): Likewise.
15823         (set_value_regno): Likewise.
15824         (copy_value): Likewise.
15825         (maybe_mode_change): Likewise.
15826         (find_oldest_value_reg): Likewise.
15827         (copyprop_hardreg_forward_1): Likewise.
15828         * regrename.c (check_new_reg_p): Likewise.
15829         (regrename_do_replace): Likewise.
15830         * reload.c (push_reload): Likewise.
15831         (combine_reloads): Likewise.
15832         (find_dummy_reload): Likewise.
15833         (operands_match_p): Likewise.
15834         (find_reloads): Likewise.
15835         (find_equiv_reg): Likewise.
15836         (reload_adjust_reg_for_mode): Likewise.
15837         * reload1.c (count_pseudo): Likewise.
15838         (count_spilled_pseudo): Likewise.
15839         (find_reg): Likewise.
15840         (clear_reload_reg_in_use): Likewise.
15841         (free_for_value_p): Likewise.
15842         (allocate_reload_reg): Likewise.
15843         (choose_reload_regs): Likewise.
15844         (reload_adjust_reg_for_temp): Likewise.
15845         (emit_reload_insns): Likewise.
15846         (delete_output_reload): Likewise.
15847         * rtlanal.c (subreg_get_info): Likewise.
15848         * sched-deps.c (sched_analyze_reg): Likewise.
15849         * sel-sched.c (init_regs_for_mode): Likewise.
15850         (mark_unavailable_hard_regs): Likewise.
15851         (choose_best_reg_1): Likewise.
15852         (verify_target_availability): Likewise.
15853         * valtrack.c (dead_debug_insert_temp): Likewise.
15854         * var-tracking.c (track_loc_p): Likewise.
15855         (emit_note_insn_var_location): Likewise.
15856         * varasm.c (make_decl_rtl): Likewise.
15857         * reginfo.c (choose_hard_reg_mode): Likewise.
15858         (init_reg_modes_target): Refer directly to
15859         this_target_regs->x_hard_regno_nregs.
15860
15861 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
15862
15863         * ira-costs.c (record_operand_costs): Use in_hard_reg_set_p
15864         instead of hard_regno_nregs.
15865
15866 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
15867
15868         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Use
15869         end_hard_regno instead of hard_regno_nregs.
15870         * config/s390/s390.c (s390_reg_clobbered_rtx): Likewise.
15871         * config/sparc/sparc.h (ASM_DECLARE_REGISTER_GLOBAL): Likewise.
15872         * config/visium/visium.c (visium_hard_regno_mode_ok): Likewise.
15873         * ira-color.c (improve_allocation): Likewise.
15874         * lra-assigns.c (find_hard_regno_for_1): Likewise.
15875         * lra-lives.c (mark_regno_live): Likewise.
15876         (mark_regno_dead): Likewise.
15877         * lra-remat.c (operand_to_remat): Likewise.
15878         * lra.c (collect_non_operand_hard_regs): Likewise.
15879         * postreload.c (reload_combine_note_store): Likewise.
15880         (move2add_valid_value_p): Likewise.
15881         * reload.c (regno_clobbered_p): Likewise.
15882
15883 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
15884
15885         * config/frv/frv.c (FOR_EACH_REGNO): Use END_REGNO instead of
15886         hard_regno_nregs.
15887         * config/v850/v850.c (v850_reorg): Likewise.
15888         * reload.c (refers_to_regno_for_reload_p): Likewise.
15889         (find_equiv_reg): Likewise.
15890         * reload1.c (reload_reg_reaches_end_p): Likewise.
15891
15892 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
15893
15894         * caller-save.c (add_used_regs): Use REG_NREGS instead of
15895         hard_regno_nregs.
15896         * config/aarch64/aarch64.c (aarch64_split_combinev16qi): Likewise.
15897         * config/arm/arm.c (output_move_neon): Likewise.
15898         (arm_attr_length_move_neon): Likewise.
15899         (neon_split_vcombine): Likewise.
15900         * config/c6x/c6x.c (c6x_mark_reg_read): Likewise.
15901         (c6x_mark_reg_written): Likewise.
15902         (c6x_dwarf_register_span): Likewise.
15903         * config/i386/i386.c (ix86_save_reg): Likewise.
15904         * config/ia64/ia64.c (mark_reg_gr_used_mask): Likewise.
15905         (rws_access_reg): Likewise.
15906         * config/s390/s390.c (s390_call_saved_register_used): Likewise.
15907         * mode-switching.c (create_pre_exit): Likewise.
15908         * ree.c (combine_reaching_defs): Likewise.
15909         (add_removable_extension): Likewise.
15910         * regcprop.c (find_oldest_value_reg): Likewise.
15911         (copyprop_hardreg_forward_1): Likewise.
15912         * reload.c (reload_inner_reg_of_subreg): Likewise.
15913         (push_reload): Likewise.
15914         (combine_reloads): Likewise.
15915         (find_dummy_reload): Likewise.
15916         (reload_adjust_reg_for_mode): Likewise.
15917         * reload1.c (find_reload_regs): Likewise.
15918         (forget_old_reloads_1): Likewise.
15919         (reload_reg_free_for_value_p): Likewise.
15920         (reload_adjust_reg_for_temp): Likewise.
15921         (emit_reload_insns): Likewise.
15922         (delete_output_reload): Likewise.
15923         * sel-sched.c (choose_best_reg_1): Likewise.
15924         (choose_best_pseudo_reg): Likewise.
15925
15926 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
15927             Alan Hayward  <alan.hayward@arm.com>
15928             David Sherwood <david.sherwood@arm.com>
15929
15930         * defaults.h (SLOW_UNALIGNED_ACCESS): Delete.
15931         * target.def (slow_unaligned_access): New hook.
15932         * targhooks.h (default_slow_unaligned_access): Declare.
15933         * targhooks.c (default_slow_unaligned_access): New function.
15934         * doc/tm.texi.in (SLOW_UNALIGNED_ACCESS): Replace with...
15935         (TARGET_SLOW_UNALIGNED_ACCESS): ...this.
15936         * doc/tm.texi: Regenerate.
15937         * config/alpha/alpha.h (SLOW_UNALIGNED_ACCESS): Delete.
15938         * config/arm/arm.h (SLOW_UNALIGNED_ACCESS): Delete.
15939         * config/i386/i386.h (SLOW_UNALIGNED_ACCESS): Delete commented-out
15940         definition.
15941         * config/powerpcspe/powerpcspe.h (SLOW_UNALIGNED_ACCESS): Delete.
15942         * config/powerpcspe/powerpcspe.c (TARGET_SLOW_UNALIGNED_ACCESS):
15943         Redefine.
15944         (rs6000_slow_unaligned_access): New function.
15945         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
15946         (expand_block_compare): Likewise.
15947         (expand_strn_compare): Likewise.
15948         (rs6000_rtx_costs): Likewise.
15949         * config/riscv/riscv.h (SLOW_UNALIGNED_ACCESS): Delete.
15950         (riscv_slow_unaligned_access): Likewise.
15951         * config/riscv/riscv.c (riscv_slow_unaligned_access): Rename to...
15952         (riscv_slow_unaligned_access_p): ...this and make static.
15953         (riscv_option_override): Update accordingly.
15954         (riscv_slow_unaligned_access): New function.
15955         (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
15956         * config/rs6000/rs6000.h (SLOW_UNALIGNED_ACCESS): Delete.
15957         * config/rs6000/rs6000.c (TARGET_SLOW_UNALIGNED_ACCESS): Redefine.
15958         (rs6000_slow_unaligned_access): New function.
15959         (rs6000_emit_move): Use it instead of SLOW_UNALIGNED_ACCESS.
15960         (rs6000_rtx_costs): Likewise.
15961         * config/rs6000/rs6000-string.c (expand_block_compare)
15962         (expand_strn_compare): Use targetm.slow_unaligned_access instead
15963         of SLOW_UNALIGNED_ACCESS.
15964         * config/tilegx/tilegx.h (SLOW_UNALIGNED_ACCESS): Delete.
15965         * config/tilepro/tilepro.h (SLOW_UNALIGNED_ACCESS): Delete.
15966         * calls.c (expand_call): Use targetm.slow_unaligned_access instead
15967         of SLOW_UNALIGNED_ACCESS.
15968         * expmed.c (simple_mem_bitfield_p): Likewise.
15969         * expr.c (alignment_for_piecewise_move): Likewise.
15970         (emit_group_load_1): Likewise.
15971         (emit_group_store): Likewise.
15972         (copy_blkmode_from_reg): Likewise.
15973         (emit_push_insn): Likewise.
15974         (expand_assignment): Likewise.
15975         (store_field): Likewise.
15976         (expand_expr_real_1): Likewise.
15977         * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
15978         * lra-constraints.c (simplify_operand_subreg): Likewise.
15979         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
15980         * gimple-ssa-store-merging.c: Likewise in block comment at start
15981         of file.
15982         * tree-ssa-strlen.c: Include target.h.
15983         (handle_builtin_memcmp): Use targetm.slow_unaligned_access instead
15984         of SLOW_UNALIGNED_ACCESS.
15985         * system.h (SLOW_UNALIGNED_ACCESS): Poison.
15986
15987 2017-09-12  Richard Sandiford  <richard.sandiford@linaro.org>
15988
15989         PR rtl-optimization/82185
15990         * expmed.c (emit_store_flag_int): Only test tem if it has been
15991         initialized.
15992
15993 2017-09-12  Richard Biener  <rguenther@suse.de>
15994
15995         PR middle-end/82149
15996         * match.pd ((FTYPE) N CMP CST): Fix typo.
15997
15998 2017-09-12  Simon Atanasyan  <simon.atanasyan@imgtec.com>
15999
16000         * config/mips/mips.c (mips_attribute_table): Add 'short_call'
16001         attribute.
16002         (mips_near_type_p): Add 'short_call' attribute as a synonym
16003         for 'near'.
16004         * doc/extend.texi (short_call): Document new function attribute.
16005
16006 2017-09-12  Jakub Jelinek  <jakub@redhat.com>
16007
16008         PR target/82112
16009         * c-common.c (sync_resolve_size): Instead of c_dialect_cxx ()
16010         assertion check that in the condition.
16011         (get_atomic_generic_size): Likewise.  Before testing if parameter
16012         has pointer type, if it has array type, call for C++
16013         default_conversion to perform array-to-pointer conversion.
16014
16015 2017-09-12  Richard Biener  <rguenther@suse.de>
16016
16017         * tree-vect-generic.c (expand_vector_operations_1): Do nothing
16018         for operations we cannot scalarize.
16019
16020 2017-09-12  Aldy Hernandez  <aldyh@redhat.com>
16021
16022         * tree-ssa-threadbackward.c (fsm_find_thread_path): Make GC
16023         vectors heap vectors.  Clean up comments.
16024         Make visited_bbs a reference.
16025         (profitable_jump_thread_path): Make GC
16026         vectors heap vectors.  Clean up comments.
16027         Misc cleanups.
16028         (convert_and_register_jump_thread_path): Make GC vectors heap
16029         vectors.
16030         (check_subpath_and_update_thread_path): Same.  Clean up comments.
16031         Make visited_bbs a reference.
16032         (handle_phi): Abstract common code to to
16033         register_jump_thread_path_if_profitable.
16034         Rename VAR_BB to DEF_BB.
16035         Update comments.
16036         Make GC vectors heap vectors.
16037         Make visited_bbs a reference.
16038         (handle_assignment): Same.
16039         (register_jump_thread_path_if_profitable): New.
16040         (fsm_find_control_statement_thread_paths): Rename VAR_BB to
16041         DEF_BB.
16042         Make GC vectors heap vectors.  Clean up comments.
16043         Make visited_bbs a reference.
16044         (find_jump_threads_backwards): Make visited_bbs live in the stack.
16045         * tree-ssa-threadupdate.c (delete_jump_thread_path): Fix typo in
16046         comment.
16047
16048 2017-09-11  Max Filippov  <jcmvbkbc@gmail.com>
16049
16050         PR target/82181
16051         * config/xtensa/xtensa.c (xtensa_mem_offset): Check that both
16052         words of E_DImode object are reachable by xtensa_uimm8x4 access.
16053
16054 2017-09-11  Vidya Praveen  <vidyapraveen@arm.com>
16055
16056         Revert r251800 and r251799.
16057
16058 2017-09-11  Martin Jambor  <mjambor@suse.cz>
16059
16060         PR hsa/82119
16061         * hsa-gen.c (gen_hsa_phi_from_gimple_phi): Process ADDR_EXPRs in
16062         arguments in advance.
16063         * hsa-regalloc.c (naive_process_phi): New parameter predecessors,
16064         use it to find predecessor edges.
16065         (naive_outof_ssa): Collect vector of predecessors.
16066
16067 2017-09-08  Jason Merrill  <jason@redhat.com>
16068
16069         PR c++/70029 - ICE with ref-qualifier and -flto
16070         * langhooks.h (struct lang_hooks_for_types): Add
16071         copy_lang_qualifiers.
16072         * attribs.c (build_type_attribute_qual_variant): Use it.
16073         * langhooks-def.h (LANG_HOOKS_COPY_LANG_QUALIFIERS): Default to
16074         NULL.
16075         (LANG_HOOKS_FOR_TYPES_INITIALIZER): Use it.
16076         * tree.c (verify_type): Re-enable TYPE_CANONICAL main variant check.
16077
16078 2017-09-08  Eric Botcazou  <ebotcazou@adacore.com>
16079
16080         PR target/81988
16081         * config/sparc/sparc.md (mulsi3): Rename into *mulsi3_sp32.
16082         (*mulsi3_sp64): New instruction.
16083         (mulsi3): New expander.
16084
16085 2017-09-08  Uros Bizjak  <ubizjak@gmail.com>
16086
16087         * config/alpha/alpha.c (alpha_print_operand) <case 'S'>: Remove.
16088
16089 2017-09-08  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
16090
16091         * sancov.c: Include memmodel.h.
16092
16093 2017-09-07  Eric Botcazou  <ebotcazou@adacore.com>
16094
16095         PR target/80897
16096         * config/sparc/sparc.c (sparc_emit_set_symbolic_const64): Deal with too
16097         large offsets.
16098
16099 2017-09-07  Carl Love  <cel@us.ibm.com>
16100
16101         * config/rs6000/vsx.md (define_insn "*stxvl"): Add missing argument to
16102         the sldi instruction.
16103
16104 2017-09-07  David Edelsohn  <dje.gcc@gmail.com>
16105
16106         * sancov.c: Include tm_p.h.
16107
16108 2017-09-07  Jakub Jelinek  <jakub@redhat.com>
16109
16110         PR target/81979
16111         * output.h (switch_to_other_text_partition): New declaration.
16112         * varasm.c (switch_to_other_text_partition): New function.
16113         * config/rs6000/rs6000.c (uses_TOC): Return 2 if
16114         NOTE_INSN_SWITCH_TEXT_SECTIONS is seen before finding load_toc_* insn.
16115         (rs6000_elf_declare_function_name): If uses_TOC returned 2, switch
16116         to the other text partition before emitting LCL label and switch back
16117         after emitting the word after it.
16118
16119 2017-09-07  Richard Biener  <rguenther@suse.de>
16120
16121         * passes.def (pass_split_crit_edges): Remove instance before PRE.
16122         * tree-ssa-pre.c (pass_pre::execute): Instead manually split
16123         critical edges here, after loop init.
16124         (pass_data_pre): Remove PROP_no_crit_edges flags.
16125         * tree-ssa-sccvn.c (vn_reference_lookup_3): Use vn_valueize
16126         for valueization of call args to avoid leaking VN_TOP.
16127         (visit_use): Assert we do not visit default defs.
16128         (init_scc_vn): Use build_decl for VN_TOP to make name nicer.
16129         Use error_mark_node to more easily detect leaking VN_TOP.
16130         All default-defs are varying, not VN_TOP.  Mark them visited.
16131         (run_scc_vn): Make code match comment.
16132
16133 2017-09-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
16134
16135         * config/rs6000/rs6000-cpus.def (OTHER_VSX_VECTOR_MASKS): Delete
16136         OPTION_MASK_FLOAT128_KEYWORD.
16137         (POWERPC_MASKS): Likewise.
16138         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Delete
16139         support for the -mfloat128-type option, and make -mfloat128
16140         default on PowerPC Linux systems.  Define or undefine
16141         __FLOAT128__ and  __FLOAT128_HARDWARE__ for the current options.
16142         Define __float128 to be __ieee128 if IEEE 128-bit support is
16143         enabled, or undefine it.
16144         (rs6000_cpu_cpp_builtins): Delete defining __FLOAT128__ here.
16145         Delete defining __FLOAT128_TYPE__.
16146         * config/rs6000/rs6000.opt (x_TARGET_FLOAT128_TYPE): Delete the
16147         -mfloat128-type option and make -mfloat128 default on PowerPC
16148         Linux systems.
16149         (TARGET_FLOAT128_TYPE): Likewise.
16150         (-mfloat128-type): Likewise.
16151         * config/rs6000/rs6000.c (rs6000_option_override_internal):
16152         Delete the -mfloat128-type option and make -mfloat128 default on
16153         PowerPC Linux systems.  Always use __ieee128 to be the keyword for
16154         the IEEE 128-bit type, and map __float128 to __ieee128 if IEEE
16155         128-bit floating point is enabled.  Change tests from using
16156         -mfloat128-type to -mfloat128.
16157         (rs6000_mangle_type): Use the correct mangling for the __float128
16158         type even if normal long double is restricted to 64-bits.
16159         (floatn_mode): Enable the _Float128 type by default on VSX Linux
16160         systems.
16161         * config/rs6000/rs6000.h (MASK_FLOAT128_TYPE): Delete.
16162         (MASK_FLOAT128_KEYWORD): Define new shortcut macro.
16163         (RS6000BTM_FLOAT128): Define in terms of -mfloat128, not
16164         -mfloat128-type.
16165         * doc/invoke.texi (RS/6000 and PowerPC Options): Update
16166         documentation for -mfloat128.
16167
16168 2017-09-06  Olivier Hainque  <hainque@adacore.com>
16169
16170         * config.gcc (powerpc-wrs-vxworksspe): Now match as vxworks*spe.
16171
16172 2017-09-06  Wish Wu  <wishwu007@gmail.com>
16173             Jakub Jelinek  <jakub@redhat.com>
16174
16175         * asan.c (initialize_sanitizer_builtins): Add
16176         BT_FN_VOID_UINT8_UINT8, BT_FN_VOID_UINT16_UINT16,
16177         BT_FN_VOID_UINT32_UINT32, BT_FN_VOID_UINT64_UINT64,
16178         BT_FN_VOID_FLOAT_FLOAT, BT_FN_VOID_DOUBLE_DOUBLE and
16179         BT_FN_VOID_UINT64_PTR variables.
16180         * builtin-types.def (BT_FN_VOID_UINT8_UINT8): New fn type.
16181         (BT_FN_VOID_UINT16_UINT16): Likewise.
16182         (BT_FN_VOID_UINT32_UINT32): Likewise.
16183         (BT_FN_VOID_FLOAT_FLOAT): Likewise.
16184         (BT_FN_VOID_DOUBLE_DOUBLE): Likewise.
16185         (BT_FN_VOID_UINT64_PTR): Likewise.
16186         * common.opt (flag_sanitize_coverage): New variable.
16187         (fsanitize-coverage=trace-pc): Remove.
16188         (fsanitize-coverage=): Add.
16189         * flag-types.h (enum sanitize_coverage_code): New enum.
16190         * fold-const.c (fold_range_test): Disable non-short-circuit
16191         optimization if flag_sanitize_coverage.
16192         (fold_truth_andor): Likewise.
16193         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
16194         * opts.c (COVERAGE_SANITIZER_OPT): Define.
16195         (coverage_sanitizer_opts): New array.
16196         (get_closest_sanitizer_option): Add OPTS argument, handle also
16197         OPT_fsanitize_coverage_.
16198         (parse_sanitizer_options): Adjusted to also handle
16199         OPT_fsanitize_coverage_.
16200         (common_handle_option): Add OPT_fsanitize_coverage_.
16201         * sancov.c (instrument_comparison, instrument_switch): New function.
16202         (sancov_pass): Add trace-cmp support.
16203         * sanitizer.def (BUILT_IN_SANITIZER_COV_TRACE_CMP1,
16204         BUILT_IN_SANITIZER_COV_TRACE_CMP2, BUILT_IN_SANITIZER_COV_TRACE_CMP4,
16205         BUILT_IN_SANITIZER_COV_TRACE_CMP8,
16206         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP1,
16207         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP2,
16208         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP4,
16209         BUILT_IN_SANITIZER_COV_TRACE_CONST_CMP8,
16210         BUILT_IN_SANITIZER_COV_TRACE_CMPF, BUILT_IN_SANITIZER_COV_TRACE_CMPD,
16211         BUILT_IN_SANITIZER_COV_TRACE_SWITCH): New builtins.
16212         * doc/invoke.texi: Document -fsanitize-coverage=trace-cmp.
16213
16214 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
16215
16216         * config/arm/parsecpu.awk (fatal): Note that we've encountered an
16217         error.  Only quit immediately if parsing is complete.
16218         (BEGIN): Initialize fatal_err and parse_done.
16219         (begin fpu, end fpu): Check number of arguments.
16220         (begin arch, end arch): Likewise.
16221         (begin cpu, end cpu): Likewise.
16222         (cname, tune for, tune flags, architecture, fpu, option): Likewise.
16223         (optalias): Likewise.
16224
16225 2017-09-06  Richard Earnshaw  <rearnsha@arm.com>
16226
16227         * config.gcc (arm*-*-*): Don't add arm-isa.h to tm_p_file.
16228         * config/arm/arm-isa.h: Delete.  Move definitions to ...
16229         * arm-cpus.in: ... here.  Use new feature and fgroup values.
16230         * config/arm/arm.c (arm_option_override): Use lower case for feature
16231         bit names.
16232         * config/arm/arm.h (TARGET_HARD_FLOAT): Likewise.
16233         (TARGET_VFP3, TARGET_VFP5, TARGET_FMA): Likewise.
16234         * config/arm/parsecpu.awk (END): Add new command 'isa'.
16235         (isa_pfx): Delete.
16236         (print_isa_bits_for): New function.
16237         (gen_isa): New function.
16238         (gen_comm_data): Use print_isa_bits_for.
16239         (define feature): New keyword.
16240         (define fgroup): New keyword.
16241         * config/arm/t-arm (OPTIONS_H_EXTRA): Add arm-isa.h
16242         (arm-isa.h): Add rule to generate file.
16243         * common/config/arm/arm-common.c: (arm_canon_arch_option): Use lower
16244         case for feature bit names.
16245
16246 2017-09-06  Richard Biener  <rguenther@suse.de>
16247
16248         * tree-ssa-pre.c (NECESSARY): Remove.
16249         (create_expression_by_pieces): Do not touch pass-local flags.
16250         (insert_into_preds_of_block): Likewise.
16251         (do_pre_regular_insertion): Likewise.
16252         (eliminate_insert): Likewise.
16253         (eliminate_dom_walker::before_dom_children): Likewise.
16254         (fini_eliminate): Do not look at inserted_exprs.
16255         (mark_operand_necessary): Remove.
16256         (remove_dead_inserted_code): Replace with simple work-list
16257         algorithm based on inserted_exprs and SSA uses.
16258         (pass_pre::execute): Re-order fini_eliminate and
16259         remove_dead_inserted_code.
16260
16261 2017-09-06  Olivier Hainque  <hainque@adacore.com>
16262
16263         * config/powerpcspe/vxworks.h (VXCPU_FOR_8548): Correct definition
16264         for VxWorks 7.  Adjust surrounding comments.
16265
16266 2017-09-06  Richard Biener  <rguenther@suse.de>
16267
16268         * gimple-ssa-strength-reduction.c
16269         (find_candidates_dom_walker::before_dom_children): Also allow
16270         pointer types.
16271
16272 2017-09-06  Richard Biener  <rguenther@suse.de>
16273
16274         PR tree-optimization/82108
16275         * tree-vect-stmts.c (vectorizable_load): Fix pointer adjustment
16276         for gap in the non-permutation SLP case.
16277
16278 2017-09-06  Martin Jambor  <mjambor@suse.cz>
16279
16280         PR tree-optimization/82078
16281         * tree-sra.c (sort_and_splice_var_accesses): Move call to
16282         add_access_to_work_queue...
16283         (build_accesses_from_assign): ...here.
16284         (propagate_all_subaccesses): Make sure racc is the group
16285         representative, if there is one.
16286
16287 2017-09-06  Jakub Jelinek  <jakub@redhat.com>
16288
16289         PR middle-end/82095
16290         * varasm.c (categorize_decl_for_section): Use SECCAT_TBSS for TLS vars with
16291         NULL DECL_INITIAL.
16292
16293 2017-09-06  Richard Biener  <rguenther@suse.de>
16294
16295         * gimple-ssa-strength-reduction.c
16296         (find_candidates_dom_walker::before_doom_children): Use a
16297         type and not a mode check.
16298
16299 2017-09-06  Bernd Edlinger  <bernd.edlinger@hotmail.de>
16300
16301         PR target/77308
16302         * config/arm/predicates.md (arm_general_adddi_operand): Create new
16303         non-vfp predicate.
16304         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Use new predicates.
16305
16306 2017-09-05  Jeff Law  <law@redhat.com>
16307
16308         PR tree-optimization/64910
16309         * tree-ssa-reassoc.c (reassociate_bb): Restrict last change to
16310         cases where we have 3 or more operands.
16311
16312 2017-09-05  Jakub Jelinek  <jakub@redhat.com>
16313
16314         PR middle-end/81768
16315         * omp-low.c (lower_omp_for): Recompute tree invariant if
16316         gimple_omp_for_initial/final is ADDR_EXPR.
16317
16318         PR middle-end/81768
16319         * omp-expand.c (expand_omp_simd): Force second operands of COND_EXPR
16320         into gimple val before gimplification fo the COND_EXPR.
16321
16322 2017-09-05  Aldy Hernandez  <aldyh@redhat.com>
16323
16324         * tree-ssa-threadupdate.c (duplicate_thread_path): Remove unused
16325         REGION_COPY argument.
16326         (thread_through_all_blocks): Remove unused argument to
16327         duplicate_thread_path.
16328
16329 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
16330             Alan Hayward  <alan.hayward@arm.com>
16331             David Sherwood  <david.sherwood@arm.com>
16332
16333         * config/aarch64/aarch64-protos.h (aarch64_gen_adjusted_ldpstp):
16334         Take a scalar_mode rather than a machine_mode.
16335         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
16336         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Likewise.
16337         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
16338         (aarch64_gen_adjusted_ldpstp): Likewise.
16339         (aarch64_expand_vector_init): Use scalar_mode instead of machine_mode.
16340
16341 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
16342             Alan Hayward  <alan.hayward@arm.com>
16343             David Sherwood  <david.sherwood@arm.com>
16344
16345         * config/aarch64/aarch64-protos.h (aarch64_is_extend_from_extract):
16346         Take a scalar_int_mode instead of a machine_mode.
16347         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
16348         (aarch64_output_scalar_simd_mov_immediate): Likewise.
16349         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
16350         (aarch64_simd_attr_length_rglist): Delete.
16351         * config/aarch64/aarch64.c (aarch64_is_extend_from_extract): Take
16352         a scalar_int_mode instead of a machine_mode.
16353         (aarch64_add_offset): Likewise.
16354         (aarch64_internal_mov_immediate): Likewise
16355         (aarch64_add_constant_internal): Likewise.
16356         (aarch64_add_constant): Likewise.
16357         (aarch64_movw_imm): Likewise.
16358         (aarch64_rtx_arith_op_extract_p): Likewise.
16359         (aarch64_mask_and_shift_for_ubfiz_p): Likewise.
16360         (aarch64_simd_scalar_immediate_valid_for_move): Likewise.
16361         Remove assert that the mode isn't a vector.
16362         (aarch64_output_scalar_simd_mov_immediate): Likewise.
16363         (aarch64_expand_mov_immediate): Update calls after above changes.
16364         (aarch64_output_casesi): Use as_a <scalar_int_mode>.
16365         (aarch64_and_bitmask_imm): Check for scalar integer modes.
16366         (aarch64_move_imm): Likewise.
16367         (aarch64_can_const_movi_rtx_p): Likewise.
16368         (aarch64_strip_extend): Likewise.
16369         (aarch64_extr_rtx_p): Likewise.
16370         (aarch64_rtx_costs): Likewise, using wode_mode as the mode of
16371         a CONST_INT when the mode parameter is VOIDmode.
16372         (aarch64_float_const_rtx_p): Use scalar_int_mode for a temporary.
16373
16374 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
16375
16376         * machmode.h (bitwise_mode_for_mode): Return opt_mode.
16377         * stor-layout.c (bitwise_mode_for_mode): Likewise.
16378         (bitwise_type_for_mode): Update accordingly.
16379
16380 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
16381
16382         * stor-layout.h (mode_for_size_tree): Return an opt_mode.
16383         * stor-layout.c (mode_for_size_tree): Likewise.
16384         (mode_for_array): Update accordingly.
16385         (layout_decl): Likewise.
16386         (compute_record_mode): Likewise.  Only set the mode once.
16387
16388 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
16389
16390         * target.def (get_mask_mode): Change return type to opt_mode.
16391         Expand commentary.
16392         * doc/tm.texi: Regenerate.
16393         * targhooks.h (default_get_mask_mode): Return an opt_mode.
16394         * targhooks.c (default_get_mask_mode): Likewise.
16395         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
16396         * optabs-query.c (can_vec_mask_load_store_p): Update use of
16397         targetm.get_mask_mode.
16398         * tree.c (build_truth_vector_type): Likewise.
16399
16400 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
16401
16402         * machmode.h (mode_for_vector): Return an opt_mode.
16403         * stor-layout.c (mode_for_vector): Likewise.
16404         (mode_for_int_vector): Update accordingly.
16405         (layout_type): Likewise.
16406         * config/i386/i386.c (emit_memmov): Likewise.
16407         (ix86_expand_set_or_movmem): Likewise.
16408         (ix86_expand_vector_init): Likewise.
16409         (ix86_get_mask_mode): Likewise.
16410         * config/powerpcspe/powerpcspe.c (rs6000_expand_vec_perm_const_1):
16411         Likewise.
16412         * config/rs6000/rs6000.c (rs6000_expand_vec_perm_const_1): Likewise.
16413         * expmed.c (extract_bit_field_1): Likewise.
16414         * expr.c (expand_expr_real_2): Likewise.
16415         * optabs-query.c (can_vec_perm_p): Likewise.
16416         (can_vec_mask_load_store_p): Likewise.
16417         * optabs.c (expand_vec_perm): Likewise.
16418         * targhooks.c (default_get_mask_mode): Likewise.
16419         * tree-vect-stmts.c (vectorizable_store): Likewise.
16420         (vectorizable_load): Likewise.
16421         (get_vectype_for_scalar_type_and_size): Likewise.
16422
16423 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
16424
16425         * machmode.h (mode_for_int_vector): New function.
16426         * stor-layout.c (mode_for_int_vector): Likewise.
16427         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Use it.
16428         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Likewise.
16429         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
16430         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
16431         (s390_expand_vcond): Likewise.
16432
16433 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
16434
16435         * machmode.h (opt_machine_mode): New type.
16436         (opt_mode<T>): Allow construction from anything that can be
16437         converted to a T.
16438         (is_a, as_a, dyn_cast): Add overloads for opt_mode.
16439         (mode_for_size): Return an opt_machine_mode.
16440         * stor-layout.c (mode_for_size): Likewise.
16441         (mode_for_size_tree): Update call accordingly.
16442         (bitwise_mode_for_mode): Likewise.
16443         (make_fract_type): Likewise.
16444         (make_accum_type): Likewise.
16445         * caller-save.c (replace_reg_with_saved_mem): Update call
16446         accordingly.
16447         * config/alpha/alpha.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
16448         * config/i386/i386.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
16449         * config/s390/s390.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
16450         * config/sparc/sparc.h (SECONDARY_MEMORY_NEEDED_MODE): Likewise.
16451         * expmed.c (extract_bit_field_1): Likewise.
16452         * reload.c (get_secondary_mem): Likewise.
16453         * varasm.c (assemble_integer): Likewise.
16454         * lower-subreg.c (simplify_subreg_concatn): Likewise.  Move
16455         early-out.
16456
16457 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
16458
16459         * machmode.h (decimal_float_mode_for_size): New function.
16460         * real.h (REAL_VALUE_TO_TARGET_LONG_DOUBLE): Use float_mode_for_size.
16461         (REAL_VALUE_TO_TARGET_DOUBLE): Likewise.
16462         (REAL_VALUE_TO_TARGET_SINGLE): Likewise.
16463         (REAL_VALUE_TO_TARGET_DECIMAL128): Use decimal_float_mode_for_size.
16464         (REAL_VALUE_TO_TARGET_DECIMAL64): Likewise.
16465         (REAL_VALUE_TO_TARGET_DECIMAL32): Likewise.
16466
16467 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
16468
16469         * builtins.c (expand_builtin_powi): Use int_mode_for_size.
16470         (get_builtin_sync_mode): Likewise.
16471         (expand_ifn_atomic_compare_exchange): Likewise.
16472         (expand_builtin_atomic_clear): Likewise.
16473         (expand_builtin_atomic_test_and_set): Likewise.
16474         (fold_builtin_atomic_always_lock_free): Likewise.
16475         * calls.c (compute_argument_addresses): Likewise.
16476         (emit_library_call_value_1): Likewise.
16477         (store_one_arg): Likewise.
16478         * combine.c (combine_instructions): Likewise.
16479         * config/aarch64/aarch64.c (aarch64_function_value): Likewise.
16480         * config/arm/arm.c (arm_function_value): Likewise.
16481         (aapcs_allocate_return_reg): Likewise.
16482         * config/c6x/c6x.c (c6x_expand_movmem): Likewise.
16483         * config/i386/i386.c (construct_container): Likewise.
16484         (ix86_gimplify_va_arg): Likewise.
16485         (ix86_expand_sse_cmp): Likewise.
16486         (emit_memmov): Likewise.
16487         (emit_memset): Likewise.
16488         (expand_small_movmem_or_setmem): Likewise.
16489         (ix86_expand_pextr): Likewise.
16490         (ix86_expand_pinsr): Likewise.
16491         * config/lm32/lm32.c (lm32_block_move_inline): Likewise.
16492         * config/microblaze/microblaze.c (microblaze_block_move_straight):
16493         Likewise.
16494         * config/mips/mips.c (mips_function_value_1) Likewise.
16495         (mips_block_move_straight): Likewise.
16496         (mips_expand_ins_as_unaligned_store): Likewise.
16497         * config/powerpcspe/powerpcspe.c
16498         (rs6000_darwin64_record_arg_advance_flush): Likewise.
16499         (rs6000_darwin64_record_arg_flush): Likewise.
16500         * config/rs6000/rs6000.c
16501         (rs6000_darwin64_record_arg_advance_flush): Likewise.
16502         (rs6000_darwin64_record_arg_flush): Likewise.
16503         * config/sparc/sparc.c (sparc_function_arg_1): Likewise.
16504         (sparc_function_value_1): Likewise.
16505         * config/spu/spu.c (adjust_operand): Likewise.
16506         (spu_emit_branch_or_set): Likewise.
16507         (arith_immediate_p): Likewise.
16508         * emit-rtl.c (gen_lowpart_common): Likewise.
16509         * expr.c (expand_expr_real_1): Likewise.
16510         * function.c (assign_parm_setup_block): Likewise.
16511         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): Likewise.
16512         * reload1.c (alter_reg): Likewise.
16513         * stor-layout.c (mode_for_vector): Likewise.
16514         (layout_type): Likewise.
16515
16516 2017-09-05  Richard Sandiford  <richard.sandiford@linaro.org>
16517
16518         * config/spu/spu.c (exp2_immediate_p): Use int_mode_for_mode.
16519         (spu_convert_move): Likewise.
16520         * lower-subreg.c (resolve_simple_move): Likewise.
16521
16522 2017-09-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
16523
16524         PR target/81833
16525         * config/rs6000/altivec.md (altivec_vsum2sws): Convert from a
16526         define_insn to a define_expand.
16527         (altivec_vsum2sws_direct): New define_insn.
16528         (altivec_vsumsws): Convert from a define_insn to a define_expand.
16529
16530 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
16531
16532         * config/arm/arm.c (arm_option_params_internal): Improve setting of
16533         max_insns_skipped.
16534
16535 2017-09-05  H.J. Lu  <hongjiu.lu@intel.com>
16536
16537         PR target/59501
16538         PR target/81624
16539         PR target/81769
16540         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Don't
16541         realign stack if stack alignment needed is less than incoming
16542         stack boundary.
16543
16544 2017-09-05  Marek Polacek  <polacek@redhat.com>
16545
16546         PR sanitizer/82072
16547         * convert.c (convert_to_integer_1) <case NEGATE_EXPR>: Move the ubsan
16548         check earlier.
16549
16550 2017-09-05  Wilco Dijkstra  <wdijkstr@arm.com>
16551
16552         * explow.c (get_dynamic_stack_size): Improve dynamic alignment.
16553
16554 2017-09-05  Richard Biener  <rguenther@suse.de>
16555
16556         PR tree-optimization/82084
16557         * fold-const.c (can_native_encode_string_p): Handle wide characters.
16558
16559 2017-09-05  Richard Biener  <rguenther@suse.de>
16560
16561         PR tree-optimization/82102
16562         * tree-ssa-pre.c (fini_eliminate): Check if lhs is NULL.
16563
16564 2017-09-05  Martin Liska  <mliska@suse.cz>
16565
16566         PR tree-optimization/82032
16567         * tree-cfg.c (generate_range_test): New function.
16568         * tree-cfg.h (generate_range_test): Declared here.
16569         * tree-cfgcleanup.c (convert_single_case_switch): New function.
16570         (cleanup_control_expr_graph): Use it.
16571         * tree-switch-conversion.c (try_switch_expansion): Remove
16572         assert.
16573         (emit_case_nodes): Use generate_range_test.
16574
16575 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
16576
16577         PR target/82098
16578         * config/i386/i386.md (*<btsc><mode>_mask): Add
16579         TARGET_USE_BT to insn constraint.
16580         (*btr<mode>_mask): Ditto.
16581
16582 2017-09-04  Wilco Dijkstra  <wdijkstr@arm.com>
16583
16584         * config/arm/arm.c (arm_legitimate_index_p): Add comment.
16585         (thumb2_legitimate_index_p): Use correct range for DI/DF mode.
16586
16587 2017-09-04  Bernd Edlinger  <bernd.edlinger@hotmail.de>
16588
16589         PR target/77308
16590         * config/arm/arm.md (*arm_adddi3, *arm_subdi3): Split early except for
16591         TARGET_NEON and TARGET_IWMMXT.
16592         (anddi3, iordi3, xordi3, one_cmpldi2): Split while expanding except for
16593         TARGET_NEON and TARGET_IWMMXT.
16594         (*one_cmpldi2_insn): Moved the body of one_cmpldi2 here.
16595
16596 2017-09-04  Uros Bizjak  <ubizjak@gmail.com>
16597
16598         * config/i386/i386-protos.h (ix86_tls_address_pattern_p) New prototype.
16599         (ix86_rewrite_tls_address): Ditto.
16600         * config/i386/i386.c (ix86_tls_address_pattern_p) New function.
16601         (ix86_rewrite_tls_address_1): Ditto.
16602         (ix86_rewrite_tls_address): Ditto.
16603         * config/i386/predicates.md (tls_address_pattern): New predicate.
16604         * config/i386/i386.md (TLS address splitter): New splitter.
16605
16606 2017-09-04  Richard Biener  <rguenther@suse.de>
16607
16608         PR tree-optimization/82084
16609         * fold-const.h (can_native_encode_string_p): Declare.
16610         * fold-const.c (can_native_encode_string_p): Factor out from ...
16611         (native_encode_string): ... here.
16612         * tree-vect-stmts.c (vectorizable_store): Call it to avoid
16613         vectorizing stores from constants we later cannot handle.
16614
16615 2017-09-04  Marek Polacek  <polacek@redhat.com>
16616
16617         PR c/81783
16618         * doc/invoke.texi: Update -Wtautological-compare documentation.
16619
16620 2017-09-04  Jeff Law  <law@redhat.com>
16621
16622         PR tree-optimization/64910
16623         * tree-ssa-reassoc.c (reassociate_bb): For bitwise binary ops,
16624         swap the first and last operand if the last is a constant.
16625
16626 2017-09-04  Marek Polacek  <polacek@redhat.com>
16627
16628         PR sanitizer/82072
16629         * convert.c (do_narrow): When sanitizing signed integer overflows,
16630         bail out for signed types.
16631         (convert_to_integer_1) <case NEGATE_EXPR>: Likewise.
16632
16633 2017-09-04  Richard Biener  <rguenther@suse.de>
16634
16635         PR tree-optimization/82060
16636         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
16637         Move devirtualization after stmt folding and before EH/AB/noreturn
16638         cleanup to get the stmt refs canonicalized.  Use a bool instead
16639         of gimple_modified_p since that doesn't work for NOPs.  Schedule
16640         NOPs generated by folding for removal.
16641
16642 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
16643             Alan Hayward  <alan.hayward@arm.com>
16644             David Sherwood  <david.sherwood@arm.com>
16645
16646         * coretypes.h (pad_direction): New enum.
16647         * defaults.h (DEFAULT_FUNCTION_ARG_PADDING): Delete.
16648         (FUNCTION_ARG_PADDING): Likewise.
16649         * target.def (function_arg_padding): New hook.
16650         * targhooks.h (default_function_arg_padding): Declare.
16651         * targhooks.c (default_function_arg_padding): New function.
16652         * doc/tm.texi.in (FUNCTION_ARG_PADDING): Replace with...
16653         (TARGET_FUNCTION_ARG_PADDING): ...this.
16654         * doc/tm.texi: Regenerate.
16655         * calls.c (store_unaligned_arguments_into_pseudos): Use pad_direction
16656         instead of direction.
16657         (compute_argument_addresses): Likewise.
16658         (load_register_parameters): Likewise.
16659         (emit_library_call_value_1): Likewise.
16660         (store_one_arg): Use targetm.calls.function_arg_padding instead
16661         of FUNCTION_ARG_PADDING.
16662         (must_pass_in_stack_var_size_or_pad): Likewise.
16663         * expr.c (emit_group_load_1): Use pad_direction instead of direction.
16664         (emit_group_store): Likewise.
16665         (emit_single_push_insn_1): Use targetm.calls.function_arg_padding
16666         instead of FUNCTION_ARG_PADDING.
16667         (emit_push_insn): Likewise, and propagate enum change throughout
16668         function.
16669         * function.h (direction): Delete.
16670         (locate_and_pad_arg_data::where_pad): Use pad_direction instead
16671         of direction.
16672         * function.c (assign_parm_find_stack_rtl): Likewise.
16673         (assign_parm_setup_block_p): Likewise.
16674         (assign_parm_setup_block): Likewise.
16675         (gimplify_parameters): Likewise.
16676         (locate_and_pad_parm): Use targetm.calls.function_arg_padding
16677         instead of FUNCTION_ARG_PADDING, and propagate enum change throughout
16678         function.
16679         * config/aarch64/aarch64.h (FUNCTION_ARG_PADDING): Delete.
16680         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
16681         * config/aarch64/aarch64-protos.h (aarch64_pad_arg_upward): Delete.
16682         * config/aarch64/aarch64.c (aarch64_pad_arg_upward): Replace with...
16683         (aarch64_function_arg_padding): ...this new function.
16684         (aarch64_gimplify_va_arg_expr): Use pad_direction instead of direction.
16685         (TARGET_FUNCTION_ARG_PADDING): Redefine.
16686         * config/arm/arm.h (FUNCTION_ARG_PADDING): Delete.
16687         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
16688         * config/arm/arm-protos.h (arm_pad_arg_upward): Delete.
16689         * config/arm/arm.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
16690         (arm_pad_arg_upward): Replace with...
16691         (arm_function_arg_padding): ...this new function.
16692         * config/c6x/c6x.h (BLOCK_REG_PADDING): Use pad_direction instead
16693         of direction.
16694         * config/ia64/hpux.h (FUNCTION_ARG_PADDING): Delete.
16695         * config/ia64/ia64-protos.h (ia64_hpux_function_arg_padding): Delete.
16696         * config/ia64/ia64.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
16697         (ia64_hpux_function_arg_padding): Replace with...
16698         (ia64_function_arg_padding): ...this new function.  Use pad_direction
16699         instead of direction.  Check for TARGET_HPUX.
16700         * config/iq2000/iq2000.h (FUNCTION_ARG_PADDING): Delete.
16701         * config/iq2000/iq2000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
16702         (iq2000_function_arg_padding): New function.
16703         * config/mips/mips-protos.h (mips_pad_arg_upward): Delete.
16704         * config/mips/mips.c (mips_pad_arg_upward): Replace with...
16705         (mips_function_arg_padding): ...this new function.
16706         (mips_pad_reg_upward): Update accordingly.
16707         (TARGET_FUNCTION_ARG_PADDING): Redefine.
16708         * config/mips/mips.h (PAD_VARARGS_DOWN): Use
16709         targetm.calls.function_arg_padding.
16710         (FUNCTION_ARG_PADDING): Delete.
16711         (BLOCK_REG_PADDING): Use pad_direction instead of direction.
16712         * config/nios2/nios2.h (FUNCTION_ARG_PADDING): Delete.
16713         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
16714         * config/nios2/nios2-protos.h (nios2_function_arg_padding): Delete.
16715         (nios2_block_reg_padding): Return pad_direction instead of direction.
16716         * config/nios2/nios2.c (nios2_block_reg_padding): Return pad_direction
16717         instead of direction.
16718         (nios2_function_arg_padding): Likewise.  Make static.
16719         (TARGET_FUNCTION_ARG_PADDING): Redefine.
16720         * config/pa/pa.h (FUNCTION_ARG_PADDING): Delete.
16721         (BLOCK_REG_PADDING): Use targetm.calls.function_arg_padding.
16722         * config/pa/pa-protos.h (pa_function_arg_padding): Delete.
16723         * config/pa/pa.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
16724         (pa_function_arg_padding): Make static.  Return pad_direction instead
16725         of direction.
16726         * config/powerpcspe/powerpcspe.h (FUNCTION_ARG_PADDING): Delete.
16727         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
16728         * config/powerpcspe/aix.h (BLOCK_REG_PADDING): Use pad_direction
16729         instead of direction.  Use targetm.calls.function_arg_padding.
16730         * config/powerpcspe/darwin.h (BLOCK_REG_PADDING): Likewise.
16731         * config/powerpcspe/freebsd64.h (BLOCK_REG_PADDING): Likewise.
16732         * config/powerpcspe/linux64.h (BLOCK_REG_PADDING): Likewise.
16733         * config/powerpcspe/powerpcspe-protos.h (function_arg_padding): Delete.
16734         * config/powerpcspe/powerpcspe.c (TARGET_FUNCTION_ARG_PADDING):
16735         Redefine.
16736         (function_arg_padding): Rename to...
16737         (rs6000_function_arg_padding): ...this.  Make static.  Return
16738         pad_direction instead of direction.
16739         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
16740         * config/rs6000/rs6000.h (FUNCTION_ARG_PADDING): Delete.
16741         (PAD_VARARGS_DOWN): Use targetm.calls.function_arg_padding.
16742         * config/rs6000/aix.h (BLOCK_REG_PADDING): Use pad_direction
16743         instead of direction.  Use targetm.calls.function_arg_padding.
16744         * config/rs6000/darwin.h (BLOCK_REG_PADDING): Likewise.
16745         * config/rs6000/freebsd64.h (BLOCK_REG_PADDING): Likewise.
16746         * config/rs6000/linux64.h (BLOCK_REG_PADDING): Likewise.
16747         * config/rs6000/rs6000-protos.h (function_arg_padding): Delete.
16748         * config/rs6000/rs6000.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
16749         (function_arg_padding): Rename to...
16750         (rs6000_function_arg_padding): ...this.  Make static.  Return
16751         pad_direction instead of direction.
16752         (rs6000_return_in_msb): Use rs6000_function_arg_padding.
16753         * config/s390/s390.h (FUNCTION_ARG_PADDING): Delete.
16754         * config/s390/s390.c (s390_function_arg_padding): New function.
16755         (TARGET_FUNCTION_ARG_PADDING): Redefine.
16756         * config/sparc/sparc.h (FUNCTION_ARG_PADDING): Delete.
16757         * config/sparc/sparc-protos.h (function_arg_padding): Delete.
16758         * config/sparc/sparc.c (TARGET_FUNCTION_ARG_PADDING): Redefine.
16759         (function_arg_padding): Rename to...
16760         (sparc_function_arg_padding): ...this.  Make static.  Return
16761         pad_direction instead of direction.
16762         * config/spu/spu.h (FUNCTION_ARG_PADDING): Delete.
16763         * config/spu/spu.c (spu_function_arg_padding): New function.
16764         (TARGET_FUNCTION_ARG_PADDING): Redefine.
16765         * system.h (FUNCTION_ARG_PADDING): Poison.
16766
16767 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
16768             Alan Hayward  <alan.hayward@arm.com>
16769             David Sherwood  <david.sherwood@arm.com>
16770
16771         * target.def (modes_tieable_p): New hook.
16772         * doc/tm.texi (MODES_TIEABLE_P): Replace with...
16773         (TARGET_MODES_TIEABLE_P): ...this.
16774         * doc/tm.texi.in: Regenerate.
16775         * hooks.h (hook_bool_mode_mode_true): Declare.
16776         * hooks.c (hook_bool_mode_mode_true): New function.
16777         * combine.c (subst): Use targetm.modes_tieable_p instead of
16778         MODES_TIEABLE_P.
16779         * dse.c (find_shift_sequence): Likewise.
16780         * expmed.c (extract_low_bits): Likewise.
16781         * lower-subreg.c: Include target.h.
16782         (find_decomposable_subregs): Use targetm.modes_tieable_p instead of
16783         MODES_TIEABLE_P.
16784         * rtlanal.c (rtx_cost): Likewise.
16785         * config/aarch64/aarch64.h (MODES_TIEABLE_P): Delete.
16786         * config/aarch64/aarch64-protos.h (aarch64_modes_tieable_p): Delete.
16787         * config/aarch64/aarch64.c (aarch64_modes_tieable_p): Make static.
16788         (TARGET_MODES_TIEABLE_P): Redefine.
16789         * config/alpha/alpha.h (MODES_TIEABLE_P): Delete.
16790         * config/alpha/alpha.c (alpha_modes_tieable_p): New function.
16791         (TARGET_MODES_TIEABLE_P): Redefine.
16792         * config/arc/arc.h (MODES_TIEABLE_P): Delete.
16793         * config/arc/arc.c (TARGET_MODES_TIEABLE_P): Redefine.
16794         (arc_modes_tieable_p): New function.
16795         * config/arm/arm.h (MODES_TIEABLE_P): Delete.
16796         * config/arm/arm-protos.h (arm_modes_tieable_p): Delete.
16797         * config/arm/arm.c (TARGET_MODES_TIEABLE_P): Redefine.
16798         (arm_modes_tieable_p): Make static.
16799         * config/avr/avr.h (MODES_TIEABLE_P): Delete.
16800         * config/bfin/bfin.h (MODES_TIEABLE_P): Delete.
16801         * config/bfin/bfin.c (bfin_modes_tieable_p): New function.
16802         (TARGET_MODES_TIEABLE_P): Redefine.
16803         * config/c6x/c6x.h (MODES_TIEABLE_P): Delete.
16804         * config/c6x/c6x.c (c6x_modes_tieable_p): New function.
16805         (TARGET_MODES_TIEABLE_P): Redefine.
16806         * config/cr16/cr16.h (MODES_TIEABLE_P): Delete.
16807         * config/cr16/cr16.c (TARGET_MODES_TIEABLE_P): Redefine.
16808         (cr16_modes_tieable_p): New function.
16809         * config/cris/cris.h (MODES_TIEABLE_P): Delete.
16810         * config/epiphany/epiphany.h (MODES_TIEABLE_P): Delete.
16811         * config/fr30/fr30.h (MODES_TIEABLE_P): Delete.
16812         (TRULY_NOOP_TRUNCATION): Update comment.
16813         * config/frv/frv.h (MODES_TIEABLE_P): Delete.
16814         (TRULY_NOOP_TRUNCATION): Update comment.
16815         * config/frv/frv.c (TARGET_MODES_TIEABLE_P): Redefine.
16816         (frv_modes_tieable_p): New function.
16817         * config/ft32/ft32.h (MODES_TIEABLE_P): Delete.
16818         * config/h8300/h8300.h (MODES_TIEABLE_P): Delete.
16819         * config/h8300/h8300.c (h8300_modes_tieable_p): New function.
16820         (TARGET_MODES_TIEABLE_P): Redefine.
16821         * config/i386/i386.h (MODES_TIEABLE_P): Delete.
16822         * config/i386/i386-protos.h (ix86_modes_tieable_p): Delete.
16823         * config/i386/i386.c (ix86_modes_tieable_p): Make static.
16824         (TARGET_MODES_TIEABLE_P): Redefine.
16825         * config/ia64/ia64.h (MODES_TIEABLE_P): Delete.
16826         * config/ia64/ia64.c (TARGET_MODES_TIEABLE_P): Redefine.
16827         (ia64_modes_tieable_p): New function.
16828         * config/iq2000/iq2000.h (MODES_TIEABLE_P): Delete.
16829         * config/iq2000/iq2000.c (TARGET_MODES_TIEABLE_P): Redefine.
16830         (iq2000_modes_tieable_p): New function.
16831         * config/lm32/lm32.h (MODES_TIEABLE_P): Delete.
16832         * config/lm32/lm32.c (TARGET_MODES_TIEABLE_P): Redefine.
16833         (lm32_modes_tieable_p): New function.
16834         * config/m32c/m32c.h (MODES_TIEABLE_P): Delete.
16835         * config/m32c/m32c-protos.h (m32c_modes_tieable_p): Delete.
16836         * config/m32c/m32c.c (m32c_modes_tieable_p): Make static.
16837         (TARGET_MODES_TIEABLE_P): Redefine.
16838         * config/m32r/m32r.h (MODES_TIEABLE_P): Delete.
16839         * config/m32r/m32r.c (TARGET_MODES_TIEABLE_P): Redefine.
16840         (m32r_modes_tieable_p): New function.
16841         * config/m68k/m68k.h (MODES_TIEABLE_P): Delete.
16842         * config/m68k/m68k.c (TARGET_MODES_TIEABLE_P): Redefine.
16843         (m68k_modes_tieable_p): New function.
16844         * config/mcore/mcore.h (MODES_TIEABLE_P): Delete.
16845         * config/mcore/mcore.c (TARGET_MODES_TIEABLE_P): Redefine.
16846         (mcore_modes_tieable_p): New function.
16847         * config/microblaze/microblaze.h (MODES_TIEABLE_P): Delete.
16848         * config/microblaze/microblaze.c (microblaze_modes_tieable_p): New
16849         function.
16850         (TARGET_MODES_TIEABLE_P): Redefine.
16851         * config/mips/mips.h (MODES_TIEABLE_P): Delete.
16852         * config/mips/mips-protos.h (mips_modes_tieable_p): Delete.
16853         * config/mips/mips.c (mips_modes_tieable_p): Make static.
16854         (TARGET_MODES_TIEABLE_P): Redefine.
16855         * config/mmix/mmix.h (MODES_TIEABLE_P): Delete.
16856         * config/mn10300/mn10300.h (MODES_TIEABLE_P): Delete.
16857         * config/mn10300/mn10300-protos.h (mn10300_modes_tieable): Delete.
16858         * config/mn10300/mn10300.c (mn10300_modes_tieable): Rename to...
16859         (mn10300_modes_tieable_p): ...this and make static.
16860         (TARGET_MODES_TIEABLE_P): Redefine.
16861         * config/moxie/moxie.h (MODES_TIEABLE_P): Delete.
16862         * config/msp430/msp430.h (MODES_TIEABLE_P): Delete.
16863         * config/msp430/msp430-protos.h (msp430_modes_tieable_p): Delete.
16864         * config/msp430/msp430.c (TARGET_MODES_TIEABLE_P): Redefine.
16865         (msp430_modes_tieable_p): Make static.
16866         * config/nds32/nds32.h (MODES_TIEABLE_P): Delete.
16867         * config/nds32/nds32.c (nds32_modes_tieable_p): New function.
16868         (TARGET_MODES_TIEABLE_P): Redefine.
16869         * config/nios2/nios2.h (MODES_TIEABLE_P): Delete.
16870         * config/nvptx/nvptx.h (MODES_TIEABLE_P): Delete.
16871         * config/nvptx/nvptx.c (nvptx_modes_tieable_p): New function.
16872         (TARGET_MODES_TIEABLE_P): Redefine.
16873         * config/pa/pa.h (MODES_TIEABLE_P): Delete.
16874         * config/pa/pa-protos.h (pa_modes_tieable_p): Delete.
16875         * config/pa/pa.c (pa_modes_tieable_p): Make static.
16876         (TARGET_MODES_TIEABLE_P): Redefine.
16877         * config/pdp11/pdp11.h (MODES_TIEABLE_P): Delete.
16878         * config/pdp11/pdp11.c (TARGET_MODES_TIEABLE_P): Redefine.
16879         (pdp11_modes_tieable_p): New function.
16880         * config/powerpcspe/powerpcspe.h (MODES_TIEABLE_P): Delete.
16881         * config/powerpcspe/powerpcspe.c (TARGET_MODES_TIEABLE_P): Redefine.
16882         (rs6000_modes_tieable_p): New function.
16883         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
16884         * config/powerpcspe/powerpcspe.md: Update comment.
16885         * config/riscv/riscv.h (MODES_TIEABLE_P): Delete.
16886         * config/riscv/riscv.c (riscv_modes_tieable_p): New function.
16887         (TARGET_MODES_TIEABLE_P): Redefine.
16888         * config/rl78/rl78.h (MODES_TIEABLE_P): Delete.
16889         * config/rl78/rl78.c (TARGET_MODES_TIEABLE_P): Redefine.
16890         (rl78_modes_tieable_p): New function.
16891         * config/rs6000/rs6000.h (MODES_TIEABLE_P): Delete.
16892         * config/rs6000/rs6000.c (TARGET_MODES_TIEABLE_P): Redefine.
16893         (rs6000_modes_tieable_p): New function.
16894         (rs6000_debug_reg_global): Use it instead of MODES_TIEABLE_P.
16895         * config/rs6000/rs6000.md: Update comment.
16896         * config/rx/rx.h (MODES_TIEABLE_P): Delete.
16897         * config/rx/rx.c (rx_modes_tieable_p): New function.
16898         (TARGET_MODES_TIEABLE_P): Redefine.
16899         * config/s390/s390.h (MODES_TIEABLE_P): Delete.
16900         * config/s390/s390.c (s390_modes_tieable_p): New function.
16901         (TARGET_MODES_TIEABLE_P): Redefine.
16902         * config/sh/sh.h (MODES_TIEABLE_P): Delete.
16903         * config/sh/sh.c (TARGET_MODES_TIEABLE_P): Redefine.
16904         (sh_modes_tieable_p): New function.
16905         * config/sparc/sparc.h (MODES_TIEABLE_P): Delete.
16906         * config/sparc/sparc-protos.h (sparc_modes_tieable_p): Delete.
16907         * config/sparc/sparc.c (TARGET_MODES_TIEABLE_P): Redefine.
16908         (sparc_modes_tieable_p): Make static.
16909         * config/spu/spu.h (MODES_TIEABLE_P): Delete.
16910         * config/spu/spu.c (spu_modes_tieable_p): New function.
16911         (TARGET_MODES_TIEABLE_P): Redefine.
16912         * config/stormy16/stormy16.h (MODES_TIEABLE_P): Delete.
16913         * config/stormy16/stormy16.c (xstormy16_modes_tieable_p): New function.
16914         (TARGET_MODES_TIEABLE_P): Redefine.
16915         * config/tilegx/tilegx.h (MODES_TIEABLE_P): Delete.
16916         * config/tilepro/tilepro.h (MODES_TIEABLE_P): Delete.
16917         * config/v850/v850.h (MODES_TIEABLE_P): Delete.
16918         * config/v850/v850.c (v850_modes_tieable_p): New function.
16919         (TARGET_MODES_TIEABLE_P): Redefine.
16920         * config/vax/vax.h (MODES_TIEABLE_P): Delete.
16921         * config/visium/visium.h (MODES_TIEABLE_P): Delete.
16922         * config/visium/visium.c (TARGET_MODES_TIEABLE_P): Redefine.
16923         (visium_modes_tieable_p): New function.
16924         * config/xtensa/xtensa.h (MODES_TIEABLE_P): Delete.
16925         * config/xtensa/xtensa.c (TARGET_MODES_TIEABLE_P): Redefine.
16926         (xtensa_modes_tieable_p): New function.
16927         * system.h (MODES_TIEABLE_P): Poison.
16928
16929 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
16930             Alan Hayward  <alan.hayward@arm.com>
16931             David Sherwood  <david.sherwood@arm.com>
16932
16933         * target.def (hard_regno_mode_ok): New hook.
16934         * doc/tm.texi (HARD_REGNO_MODE_OK): Replace with...
16935         (TARGET_HARD_REGNO_MODE_OK): ...this.
16936         * doc/tm.texi.in: Regenerate.
16937         * hooks.h (hook_bool_uint_mode_true): Declare.
16938         * hooks.c (hook_bool_uint_mode_true): New function.
16939         * doc/md.texi: Refer to targetm.hard_regno_mode_ok instead of
16940         HARD_REGNO_MODE_OK.
16941         * genpreds.c (write_insn_preds_c): Add an include of target.h.
16942         * alias.c (init_alias_target): Use targetm.hard_regno_mode_ok
16943         instead of HARD_REGNO_MODE_OK.
16944         * caller-save.c: Include target.h.
16945         (reg_save_code): Use targetm.hard_regno_mode_ok instead of
16946         HARD_REGNO_MODE_OK.
16947         * combine.c (can_combine_p): Likewise.
16948         (combinable_i3pat): Likewise.
16949         (can_change_dest_mode): Likewise.
16950         * expr.c (init_expr_target): Likewise.
16951         (convert_move): Likewise.
16952         (convert_modes): Likewise.
16953         * ira.c (setup_prohibited_class_mode_regs): Likewise.
16954         (setup_prohibited_mode_move_regs): Likewise.
16955         * ira.h (target_ira): Likewise.
16956         * lra-assigns.c (find_hard_regno_for_1): Likewise.
16957         * lra-constraints.c (process_alt_operands): Likewise.
16958         (split_reg): Likewise.
16959         * recog.c (peep2_find_free_register): Likewise.
16960         * ree.c (combine_reaching_defs): Likewise.
16961         * regcprop.c (maybe_mode_change): Likewise.
16962         * reginfo.c (init_reg_sets_1): Likewise.
16963         (choose_hard_reg_mode): Likewise.
16964         (simplifiable_subregs): Likewise.
16965         * regrename.c (check_new_reg_p): Likewise.
16966         * reload.c (find_valid_class): Likewise.
16967         (find_valid_class_1): Likewise.
16968         (reload_inner_reg_of_subreg): Likewise.
16969         (push_reload): Likewise.
16970         (combine_reloads): Likewise.
16971         (find_dummy_reload): Likewise.
16972         (find_reloads): Likewise.
16973         * reload1.c (find_reg): Likewise.
16974         (set_reload_reg): Likewise.
16975         (allocate_reload_reg): Likewise.
16976         (choose_reload_regs): Likewise.
16977         (reload_adjust_reg_for_temp): Likewise.
16978         * rtlanal.c (subreg_size_offset_from_lsb): Likewise.
16979         (simplify_subreg_regno): Likewise.
16980         * sel-sched.c (init_regs_for_mode): Likewise.
16981         * varasm.c (make_decl_rtl): Likewise.
16982         * config/aarch64/aarch64.h (HARD_REGNO_MODE_OK): Delete.
16983         (MODES_TIEABLE_P): Use targetm.hard_regno_mode_ok instead of
16984         HARD_REGNO_MODE_OK.
16985         * config/aarch64/aarch64-protos.h (aarch64_hard_regno_mode_ok): Delete.
16986         * config/aarch64/aarch64.c (aarch64_hard_regno_mode_ok): Make static.
16987         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16988         * config/alpha/alpha.h (HARD_REGNO_MODE_OK): Delete.
16989         * config/alpha/alpha.c (alpha_hard_regno_mode_ok): New function.
16990         (TARGET_HARD_REGNO_MODE_OK): Redefine.
16991         * config/arc/arc.h (arc_hard_regno_mode_ok): Delete.
16992         (arc_mode_class): Delete.
16993         (HARD_REGNO_MODE_OK): Delete.
16994         * config/arc/arc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
16995         (arc_hard_regno_mode_ok): Rename old array to...
16996         (arc_hard_regno_mode_ok_modes): ...this.
16997         (arc_conditional_register_usage): Update accordingly.
16998         (arc_mode_class): Make static.
16999         (arc_hard_regno_mode_ok): New function.
17000         * config/arm/arm.h (HARD_REGNO_MODE_OK): Delete.
17001         * config/arm/arm-protos.h (arm_hard_regno_mode_ok): Delete.
17002         * config/arm/arm.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
17003         (arm_hard_regno_mode_ok): Make static.
17004         * config/arm/arm.md (movdi): Use targetm.hard_regno_mode_ok instead of
17005         HARD_REGNO_MODE_OK.
17006         * config/avr/avr-protos.h (avr_hard_regno_mode_ok): Delete.
17007         * config/avr/avr.h (HARD_REGNO_MODE_OK): Delete.
17008         * config/avr/avr.c (avr_hard_regno_mode_ok): Make static and
17009         return a bool.
17010         (TARGET_HARD_REGNO_MODE_OK): Redefine.
17011         * config/bfin/bfin-protos.h (hard_regno_mode_ok): Delete.
17012         * config/bfin/bfin.h (HARD_REGNO_MODE_OK): Delete.
17013         * config/bfin/bfin.c (hard_regno_mode_ok): Rename to...
17014         (bfin_hard_regno_mode_ok): ...this.  Make static and return a bool.
17015         (TARGET_HARD_REGNO_MODE_OK): Redefine.
17016         * config/bfin/predicates.md (valid_reg_operand): Use
17017         targetm.hard_regno_mode_ok instead of HARD_REGNO_MODE_OK.
17018         * config/c6x/c6x.h (HARD_REGNO_MODE_OK): Delete.
17019         * config/c6x/c6x.c (c6x_hard_regno_mode_ok): New function.
17020         (TARGET_HARD_REGNO_MODE_OK): Redefine.
17021         * config/cr16/cr16.h (HARD_REGNO_MODE_OK): Delete.
17022         * config/cr16/cr16-protos.h (cr16_hard_regno_mode_ok): Delete.
17023         * config/cr16/cr16.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
17024         (cr16_hard_regno_mode_ok): Make static and return a bool.
17025         * config/cris/cris.h (HARD_REGNO_MODE_OK): Delete.
17026         * config/cris/cris.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
17027         (cris_hard_regno_mode_ok): New function.
17028         * config/epiphany/epiphany.h (epiphany_hard_regno_mode_ok): Delete.
17029         (epiphany_mode_class): Delete.
17030         (HARD_REGNO_MODE_OK): Delete.
17031         * config/epiphany/epiphany-protos.h (hard_regno_mode_ok): Delete.
17032         * config/epiphany/epiphany.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
17033         (hard_regno_mode_ok): Rename to...
17034         (epiphany_hard_regno_mode_ok): ...this.  Make static and return a bool.
17035         * config/fr30/fr30.h (HARD_REGNO_MODE_OK): Delete.
17036         * config/fr30/fr30.md: Refer to targetm.hard_regno_mode_ok instead of
17037         HARD_REGNO_MODE_OK.
17038         * config/frv/frv.h (HARD_REGNO_MODE_OK): Delete.
17039         * config/frv/frv-protos.h (frv_hard_regno_mode_ok): Delete.
17040         * config/frv/frv.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
17041         (frv_hard_regno_mode_ok): Make static and return a bool.
17042         * config/frv/frv.md: Refer to targetm.hard_regno_mode_ok instead of
17043         HARD_REGNO_MODE_OK.
17044         * config/ft32/ft32.h (HARD_REGNO_MODE_OK): Delete.
17045         * config/h8300/h8300.h (HARD_REGNO_MODE_OK): Delete.
17046         * config/h8300/h8300-protos.h (h8300_hard_regno_mode_ok): Delete.
17047         * config/h8300/h8300.c (h8300_hard_regno_mode_ok): Make static
17048         and return a bool.
17049         (TARGET_HARD_REGNO_MODE_OK): Redefine.
17050         * config/i386/i386.h (HARD_REGNO_MODE_OK): Delete.
17051         * config/i386/i386-protos.h (ix86_hard_regno_mode_ok): Delete.
17052         * config/i386/i386.c (ix86_hard_regno_mode_ok): Make static and
17053         return a bool.
17054         (TARGET_HARD_REGNO_MODE_OK): Redefine.
17055         * config/ia64/ia64.h (HARD_REGNO_MODE_OK): Delete.
17056         * config/ia64/ia64.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
17057         (ia64_hard_regno_mode_ok): New function.
17058         * config/iq2000/iq2000.h (HARD_REGNO_MODE_OK): Delete.
17059         * config/iq2000/iq2000.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
17060         (iq2000_hard_regno_mode_ok): New function.
17061         * config/lm32/lm32.h (HARD_REGNO_MODE_OK): Delete.
17062         * config/lm32/lm32.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
17063         (lm32_hard_regno_mode_ok): New function.
17064         * config/m32c/m32c.h (HARD_REGNO_MODE_OK): Delete.
17065         * config/m32c/m32c-protos.h (m32c_hard_regno_ok): Delete.
17066         * config/m32c/m32c.c (class_can_hold_mode): Use m32c_hard_regno_mode_ok
17067         instead of HARD_REGNO_MODE_OK.
17068         (m32c_hard_regno_ok): Rename to...
17069         (m32c_hard_regno_mode_ok): ...this.  Make static and return a bool.
17070         (m32c_cannot_change_mode_class): Update accordingly.
17071         (TARGET_HARD_REGNO_MODE_OK): Redefine.
17072         * config/m32r/m32r.h (m32r_hard_regno_mode_ok): Delete.
17073         (m32r_mode_class): Delete.
17074         (HARD_REGNO_MODE_OK): Delete.
17075         * config/m32r/m32r.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
17076         (m32r_hard_regno_mode_ok): Rename to...
17077         (m32r_hard_regno_modes): ...this.
17078         (m32r_mode_class): Make static.
17079         (m32r_hard_regno_mode_ok): New function.
17080         * config/m68k/m68k.h (HARD_REGNO_MODE_OK): Delete.
17081         * config/m68k/m68k-protos.h (m68k_regno_mode_ok): Delete.
17082         * config/m68k/m68k.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
17083         (m68k_hard_regno_mode_ok): Make static.
17084         * config/mcore/mcore.h (HARD_REGNO_MODE_OK): Delete.
17085         * config/mcore/mcore.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
17086         (mcore_hard_regno_mode_ok): New function.
17087         * config/microblaze/microblaze.h (microblaze_hard_regno_mode_ok)
17088         (HARD_REGNO_MODE_OK): Delete.
17089         * config/microblaze/microblaze.c (microblaze_hard_regno_mode_ok):
17090         Rename to...
17091         (microblaze_hard_regno_mode_ok_p): ...this and make static.
17092         (microblaze_hard_regno_mode_ok): New function.
17093         (TARGET_HARD_REGNO_MODE_OK): Redefine.
17094         * config/mips/mips.h (HARD_REGNO_MODE_OK): Delete.
17095         (mips_hard_regno_mode_ok): Delete.
17096         * config/mips/mips.c (mips_hard_regno_mode_ok): Rename to...
17097         (mips_hard_regno_mode_ok_p): ...this and make static.
17098         (mips_hard_regno_mode_ok_p): Rename to...
17099         (mips_hard_regno_mode_ok_uncached): ...this.
17100         (mips_hard_regno_mode_ok): New function.
17101         (mips_class_max_nregs): Use mips_hard_regno_mode_ok instead
17102         of HARD_REGNO_MODE_OK.
17103         (mips_option_override): Update after above name changes.
17104         (TARGET_HARD_REGNO_MODE_OK): Redefine.
17105         * config/mmix/mmix.h (HARD_REGNO_MODE_OK): Delete.
17106         * config/mn10300/mn10300.h (HARD_REGNO_MODE_OK): Delete.
17107         * config/mn10300/mn10300-protos.h (mn10300_hard_regno_mode_ok): Delete.
17108         * config/mn10300/mn10300.c (mn10300_hard_regno_mode_ok): Make static.
17109         (TARGET_HARD_REGNO_MODE_OK): Redefine.
17110         * config/moxie/moxie.h (HARD_REGNO_MODE_OK): Delete.
17111         * config/msp430/msp430.h (HARD_REGNO_MODE_OK): Delete.
17112         * config/msp430/msp430-protos.h (msp430_hard_regno_mode_ok): Delete.
17113         * config/msp430/msp430.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
17114         (msp430_hard_regno_mode_ok): Make static and return a bool.
17115         * config/nds32/nds32.h (HARD_REGNO_MODE_OK): Delete.
17116         * config/nds32/nds32-protos.h (nds32_hard_regno_mode_ok): Delete.
17117         * config/nds32/nds32.c (nds32_hard_regno_mode_ok): Make static
17118         and return a bool.
17119         (TARGET_HARD_REGNO_MODE_OK): Redefine.
17120         * config/nios2/nios2.h (HARD_REGNO_MODE_OK): Delete.
17121         * config/nvptx/nvptx.h (HARD_REGNO_MODE_OK): Delete.
17122         * config/pa/pa.h (MODES_TIEABLE_P): Update commentary.
17123         * config/pa/pa32-regs.h (HARD_REGNO_MODE_OK): Rename to...
17124         (PA_HARD_REGNO_MODE_OK): ...this
17125         * config/pa/pa64-regs.h (HARD_REGNO_MODE_OK): Rename to...
17126         (PA_HARD_REGNO_MODE_OK): ...this.
17127         * config/pa/pa.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
17128         (pa_hard_regno_mode_ok): New function.
17129         * config/pdp11/pdp11.h (HARD_REGNO_MODE_OK): Delete.
17130         * config/pdp11/pdp11.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
17131         (pdp11_hard_regno_mode_ok): New function.
17132         * config/powerpcspe/powerpcspe.h (HARD_REGNO_MODE_OK): Delete.
17133         * config/powerpcspe/powerpcspe-protos.h (rs6000_hard_regno_mode_ok_p):
17134         Delete.
17135         * config/powerpcspe/powerpcspe.c (rs6000_hard_regno_mode_ok_p):
17136         Make static.
17137         (TARGET_HARD_REGNO_MODE_OK): Redefine.
17138         (rs6000_hard_regno_mode_ok): Rename to...
17139         (rs6000_hard_regno_mode_ok_uncached): ...this.
17140         (rs6000_init_hard_regno_mode_ok): Update accordingly.
17141         (rs6000_hard_regno_mode_ok): New function.
17142         * config/riscv/riscv.h (HARD_REGNO_MODE_OK): Delete.
17143         * config/riscv/riscv-protos.h (riscv_hard_regno_mode_ok_p): Delete.
17144         * config/riscv/riscv.c (riscv_hard_regno_mode_ok_p): Rename to...
17145         (riscv_hard_regno_mode_ok): ...this and make static.
17146         (TARGET_HARD_REGNO_MODE_OK): Redefine.
17147         * config/rl78/rl78.h (HARD_REGNO_MODE_OK): Delete.
17148         * config/rl78/rl78-protos.h (rl78_hard_regno_mode_ok): Delete.
17149         * config/rl78/rl78.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
17150         (rl78_hard_regno_mode_ok): Make static and return bool.
17151         * config/rs6000/rs6000.h (HARD_REGNO_MODE_OK): Delete.
17152         * config/rs6000/rs6000-protos.h (rs6000_hard_regno_mode_ok_p):
17153         Delete.
17154         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok_p): Make static.
17155         (TARGET_HARD_REGNO_MODE_OK): Redefine.
17156         (rs6000_hard_regno_mode_ok): Rename to...
17157         (rs6000_hard_regno_mode_ok_uncached): ...this.
17158         (rs6000_init_hard_regno_mode_ok): Update accordingly.
17159         (rs6000_hard_regno_mode_ok): New function.
17160         * config/rx/rx.h (HARD_REGNO_MODE_OK): Delete.
17161         * config/rx/rx.c (rx_hard_regno_mode_ok): New function.
17162         (TARGET_HARD_REGNO_MODE_OK): Redefine.
17163         * config/s390/s390.h (HARD_REGNO_MODE_OK): Delete.
17164         * config/s390/s390-protos.h (s390_hard_regno_mode_ok): Delete.
17165         * config/s390/s390.c (s390_hard_regno_mode_ok): Make static.
17166         (TARGET_HARD_REGNO_MODE_OK): Redefine.
17167         * config/sh/sh.h (HARD_REGNO_MODE_OK): Delete.
17168         * config/sh/sh-protos.h (sh_hard_regno_mode_ok): Delete.
17169         * config/sh/sh.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
17170         (sh_hard_regno_mode_ok): Make static.
17171         * config/sparc/constraints.md: Refer to targetm.hard_regno_mode_ok
17172         instead of HARD_REGNO_MODE_OK.
17173         * config/sparc/sparc.h (hard_regno_mode_classes): Delete.
17174         (sparc_mode_class): Delete.
17175         (HARD_REGNO_MODE_OK): Delete.
17176         * config/sparc/sparc.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
17177         (hard_regno_mode_classes): Make static.
17178         (sparc_mode_class): Likewise.
17179         (sparc_hard_regno_mode_ok): New function.
17180         * config/spu/spu.h (HARD_REGNO_MODE_OK): Delete.
17181         * config/stormy16/stormy16.h (HARD_REGNO_MODE_OK): Delete.
17182         * config/stormy16/stormy16.c (xstormy16_hard_regno_mode_ok): New
17183         function.
17184         (TARGET_HARD_REGNO_MODE_OK): Redefine.
17185         * config/tilegx/tilegx.h (HARD_REGNO_MODE_OK): Delete.
17186         * config/tilepro/tilepro.h (HARD_REGNO_MODE_OK): Delete.
17187         * config/v850/v850.h (HARD_REGNO_MODE_OK): Delete.
17188         * config/v850/v850.c (v850_hard_regno_mode_ok): New function.
17189         (TARGET_HARD_REGNO_MODE_OK): Redefine.
17190         * config/vax/vax.h (HARD_REGNO_MODE_OK): Delete.
17191         * config/visium/visium.h (HARD_REGNO_MODE_OK): Delete.
17192         * config/visium/visium.c (TARGET_HARD_REGNO_MODE_OK): Redefine.
17193         (visium_hard_regno_mode_ok): New function.
17194         * config/visium/visium.md: Refer to targetm.hard_regno_mode_ok
17195         instead of HARD_REGNO_MODE_OK.
17196         * config/xtensa/xtensa.h (xtensa_hard_regno_mode_ok): Delete.
17197         (HARD_REGNO_MODE_OK): Delete.
17198         * config/xtensa/xtensa.c (xtensa_hard_regno_mode_ok): Rename to...
17199         (xtensa_hard_regno_mode_ok_p): ...this and make static.
17200         (xtensa_option_override): Update accordingly.
17201         (TARGET_HARD_REGNO_MODE_OK): Redefine.
17202         (xtensa_hard_regno_mode_ok): New function.
17203         * system.h (HARD_REGNO_MODE_OK): Poison.
17204
17205 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
17206             Alan Hayward  <alan.hayward@arm.com>
17207             David Sherwood  <david.sherwood@arm.com>
17208
17209         * target.def (hard_regno_call_part_clobbered): New hook.
17210         * doc/tm.texi.in (HARD_REGNO_CALL_PART_CLOBBERED): Replace with...
17211         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): ...this hook.
17212         * doc/tm.texi: Regenerate.
17213         * hooks.h (hook_bool_uint_mode_false): Declare.
17214         * hooks.c (hook_bool_uint_mode_false): New function.
17215         * regs.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
17216         * cselib.c (cselib_process_insn): Use
17217         targetm.hard_regno_call_part_clobbered instead of
17218         HARD_REGNO_CALL_PART_CLOBBERED.
17219         * ira-conflicts.c (ira_build_conflicts): Likewise.
17220         * ira-costs.c (ira_tune_allocno_costs): Likewise.
17221         * lra-constraints.c (need_for_call_save_p): Likewise.
17222         * lra-lives.c: Include target.h.
17223         (check_pseudos_live_through_calls): Use
17224         targetm.hard_regno_call_part_clobbered instead of
17225         HARD_REGNO_CALL_PART_CLOBBERED.
17226         * regcprop.c: Include target.h.
17227         (copyprop_hardreg_forward_1): Use
17228         targetm.hard_regno_call_part_clobbered instead of
17229         HARD_REGNO_CALL_PART_CLOBBERED.
17230         * reginfo.c (choose_hard_reg_mode): Likewise.
17231         * regrename.c (check_new_reg_p): Likewise.
17232         * reload.c (find_equiv_reg): Likewise.
17233         * reload1.c (emit_reload_insns): Likewise.
17234         * sched-deps.c (deps_analyze_insn): Likewise.
17235         * sel-sched.c (init_regs_for_mode): Likewise.
17236         (mark_unavailable_hard_regs): Likewise.
17237         * targhooks.c (default_dwarf_frame_reg_mode): Likewise.
17238         * config/aarch64/aarch64.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
17239         * config/aarch64/aarch64.c (aarch64_hard_regno_call_part_clobbered):
17240         New function.
17241         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
17242         * config/avr/avr.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
17243         * config/avr/avr-protos.h (avr_hard_regno_call_part_clobbered):
17244         Delete.
17245         * config/avr/avr.c (avr_hard_regno_call_part_clobbered): Make static
17246         and return a bool.
17247         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
17248         * config/i386/i386.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
17249         * config/i386/i386.c (ix86_hard_regno_call_part_clobbered): New
17250         function.
17251         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
17252         * config/mips/mips.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
17253         * config/mips/mips.c (mips_hard_regno_call_part_clobbered): New
17254         function.
17255         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
17256         * config/powerpcspe/powerpcspe.h (HARD_REGNO_CALL_PART_CLOBBERED):
17257         Delete.
17258         * config/powerpcspe/powerpcspe.c
17259         (rs6000_hard_regno_call_part_clobbered): New function.
17260         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
17261         * config/rs6000/rs6000.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
17262         * config/rs6000/rs6000.c (rs6000_hard_regno_call_part_clobbered):
17263         New function.
17264         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
17265         * config/s390/s390.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
17266         * config/s390/s390.c (s390_hard_regno_call_part_clobbered): New
17267         function.
17268         (TARGET_HARD_REGNO_CALL_PART_CLOBBERED): Redefine.
17269         * config/sh/sh.h (HARD_REGNO_CALL_PART_CLOBBERED): Delete.
17270         * system.h (HARD_REGNO_CALL_PART_CLOBBERED): Poison.
17271
17272 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
17273             Alan Hayward  <alan.hayward@arm.com>
17274             David Sherwood  <david.sherwood@arm.com>
17275
17276         * rtl.h (subreg_memory_offset): Declare.
17277         * emit-rtl.c (subreg_memory_offset): New function.
17278         * expmed.c (store_bit_field_1): Use it.
17279         * expr.c (undefined_operand_subword_p): Likewise.
17280         * simplify-rtx.c (simplify_subreg): Likewise.
17281
17282 2017-09-04  Alexander Monakov  <amonakov@ispras.ru>
17283
17284         PR rtl-optimization/57448
17285         PR target/67458
17286         PR target/81316
17287         * optabs.c (expand_atomic_load): Place compiler memory barriers if
17288         using atomic_load pattern.
17289         (expand_atomic_store): Likewise.
17290
17291 2017-09-04  Jakub Jelinek  <jakub@redhat.com>
17292
17293         PR sanitizer/81981
17294         * gimple-fold.c (gimple_fold_call): Optimize away useless UBSAN_PTR
17295         and UBSAN_BOUNDS internal calls.  Clean up IFN_UBSAN_OBJECT_SIZE
17296         handling.  Use replace_call_with_value with NULL instead of
17297         gsi_replace, unlink_stmt_vdef and release_defs.
17298
17299         * gdbhooks.py (OptMachineModePrinter.to_string): Use 8 spaces
17300         instead of tab.
17301
17302         * lra-remat.c (reg_overlap_for_remat_p): Fix a pasto.
17303
17304 2017-09-04  Richard Sandiford  <richard.sandiford@linaro.org>
17305
17306         PR bootstrap/82045
17307         * rtl.h (emit_library_call_value_1): Declare.
17308         (emit_library_call): Replace declaration with a series of overloads.
17309         Remove the parameter count argument.
17310         (emit_library_call_value): Likewise.
17311         * calls.c (emit_library_call_value_1): Make global.  Replace varargs
17312         with an "rtx_mode_t *".
17313         (emit_library_call_value): Delete.
17314         (emit_library_call): Likewise.
17315         * asan.c (asan_emit_stack_protection): Update calls accordingly.
17316         (asan_emit_allocas_unpoison): Likewise.
17317         * builtins.c (expand_builtin_powi): Likewise.
17318         (expand_asan_emit_allocas_unpoison): Likewise.
17319         * cfgexpand.c (expand_main_function): Likewise.
17320         * config/aarch64/aarch64.c (aarch64_trampoline_init): Likewise.
17321         * config/aarch64/aarch64.h (PROFILE_HOOK): Likewise.
17322         * config/alpha/alpha.c (alpha_trampoline_init): Likewise.
17323         * config/arm/arm.c (arm_trampoline_init): Likewise.
17324         (arm_call_tls_get_addr): Likewise.
17325         (arm_expand_divmod_libfunc): Likewise.
17326         * config/bfin/bfin.md (umulsi3_highpart): Likewise.
17327         (smulsi3_highpart): Likewise.
17328         * config/c6x/c6x.c (c6x_initialize_trampoline): Likewise.
17329         (c6x_expand_compare): Likewise.
17330         (c6x_expand_movmem): Likewise.
17331         * config/frv/frv.c (frv_trampoline_init): Likewise.
17332         * config/i386/i386.c (ix86_trampoline_init): Likewise.
17333         (ix86_expand_divmod_libfunc): Likewise.
17334         * config/ia64/ia64.c (ia64_expand_tls_address): Likewise.
17335         (ia64_expand_compare): Likewise.
17336         (ia64_profile_hook): Likewise.
17337         * config/ia64/ia64.md (save_stack_nonlocal): Likewise.
17338         (nonlocal_goto): Likewise.
17339         (restore_stack_nonlocal): Likewise.
17340         * config/m32r/m32r.c (block_move_call): Likewise.
17341         (m32r_trampoline_init): Likewise.
17342         * config/m68k/linux.h (FINALIZE_TRAMPOLINE): Likewise.
17343         * config/m68k/m68k.c (m68k_call_tls_get_addr): Likewise.
17344         (m68k_call_m68k_read_tp): Likewise.
17345         * config/microblaze/microblaze.c (microblaze_call_tls_get_addr)
17346         (microblaze_expand_divide): Likewise.
17347         * config/mips/mips.h (mips_args): Likewise.
17348         * config/mips/sdemtk.h (mips_sync_icache): Likewise.
17349         (MIPS_ICACHE_SYNC): Likewise.
17350         * config/nios2/nios2.c (nios2_emit_expensive_div): Likewise.
17351         (nios2_trampoline_init): Likewise.
17352         * config/pa/pa.c (hppa_tls_call): Likewise.
17353         (pa_trampoline_init): Likewise.
17354         * config/pa/pa.md (canonicalize_funcptr_for_compare): Likewise.
17355         * config/powerpcspe/powerpcspe.c (rs6000_legitimize_tls_address)
17356         (expand_strn_compare): Likewise.
17357         (rs6000_generate_compare): Likewise.
17358         (rs6000_expand_float128_convert): Likewise.
17359         (output_profile_hook): Likewise.
17360         (rs6000_trampoline_init): Likewise.
17361         * config/powerpcspe/powerpcspe.md (neg<mode>2): Likewise.
17362         * config/riscv/riscv.h (PROFILE_HOOK): Likewise.
17363         * config/rs6000/rs6000-string.c (expand_strn_compare): Likewise.
17364         * config/rs6000/rs6000.c (rs6000_legitimize_tls_address): Likewise.
17365         (rs6000_generate_compare): Likewise.
17366         (rs6000_expand_float128_convert): Likewise.
17367         (output_profile_hook): Likewise.
17368         (rs6000_trampoline_init): Likewise.
17369         * config/rs6000/rs6000.md (neg<mode>2): Likewise.
17370         * config/sh/sh.c (sh_trampoline_init): Likewise.
17371         * config/sparc/sparc.c (emit_soft_tfmode_libcall): Likewise.
17372         (sparc_emit_float_lib_cmp): Likewise.
17373         (sparc32_initialize_trampoline): Likewise.
17374         (sparc64_initialize_trampoline): Likewise.
17375         (sparc_profile_hook): Likewise.
17376         * config/spu/spu.c (ea_load_store): Likewise.
17377         * config/spu/spu.md (floatunssidf2): Likewise.
17378         * config/tilegx/tilegx.c (tilegx_trampoline_init): Likewise.
17379         * config/tilepro/tilepro.c (tilepro_trampoline_init): Likewise.
17380         * config/visium/visium.c (expand_block_move_4): Likewise.
17381         (expand_block_move_2): Likewise.
17382         (expand_block_move_1): Likewise.
17383         (expand_block_set_4): Likewise.
17384         (expand_block_set_2): Likewise.
17385         (expand_block_set_1): Likewise.
17386         (visium_trampoline_init): Likewise.
17387         (visium_profile_hook): Likewise.
17388         * config/xtensa/xtensa.c (xtensa_expand_nonlocal_goto): Likewise.
17389         (xtensa_setup_frame_addresses): Likewise.
17390         (xtensa_trampoline_init): Likewise.
17391         * except.c (sjlj_emit_function_enter): Likewise.
17392         (sjlj_emit_function_exit): Likewise.
17393         * explow.c (allocate_dynamic_stack_space): Likewise.
17394         (probe_stack_range): Likewise.
17395         * expr.c (convert_mode_scalar): Likewise.
17396         * optabs.c (expand_binop): Likewise.
17397         (expand_twoval_binop_libfunc): Likewise.
17398         (expand_unop): Likewise.
17399         (prepare_cmp_insn): Likewise.
17400         (prepare_float_lib_cmp): Likewise.
17401         (expand_float): Likewise.
17402         (expand_fix): Likewise.
17403         (expand_fixed_convert): Likewise.
17404         (maybe_emit_sync_lock_test_and_set): Likewise.
17405         (expand_atomic_compare_and_swap): Likewise.
17406         (expand_mem_thread_fence): Likewise.
17407         (expand_atomic_fetch_op): Likewise.
17408
17409 2017-09-03  Gerald Pfeifer  <gerald@pfeifer.com>
17410
17411         * doc/generic.texi (OpenACC): Adjust URL.
17412         * doc/invoke.texi (C Dialect Options): Ditto.
17413
17414 2017-09-03  Uros Bizjak  <ubizjak@gmail.com>
17415
17416         * config/i386/i386.md (*bt<mode>): Use nonimmediate_operand
17417         predicate for operand 1.  Add (m,<S>) constraint.
17418         (*jcc_bt<mode>): Use nonimmediate_operand predicate for operand 1.
17419         Prevent memory operand 1 with register operand 2.
17420
17421 2017-09-01  Segher Boessenkool  <segher@kernel.crashing.org>
17422
17423         PR rtl-optimization/82024
17424         * combine.c (try_combine): If the combination result is a PARALLEL,
17425         and we only need to retain the SET in there that would be placed
17426         at I2, check that we can place that at I3 instead, before doing so.
17427
17428 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
17429
17430         PR target/81766
17431         * config/i386/i386.c (ix86_init_large_pic_reg): Return label
17432         instead of void.
17433         (ix86_init_pic_reg): Remember label from ix86_init_large_pic_reg,
17434         if non-NULL and preceded by NOTE_INSN_BASIC_BLOCK, swap the note
17435         and label.
17436
17437 2017-09-01  Joerg Sonnenberger  <joerg@bec.de>
17438             Jeff Law  <law@redhat.com>
17439
17440         * varasm.c (bss_initializer_p): Do not put constants into .bss
17441         (categorize_decl_for_section): Handle bss_initializer_p returning
17442         false when DECL_INITIAL is NULL.
17443
17444 2017-09-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
17445
17446         PR target/82012
17447         * config/s390/s390.c (s390_can_inline_p): New function.
17448
17449 2017-09-01  Jeff Law  <law@redhat.com>
17450
17451         PR tree-optimization/82052
17452         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
17453         Always initialize the returned slot after a hash table miss
17454         when INSERT is true.
17455
17456 2017-09-01  Alexander Monakov  <amonakov@ispras.ru>
17457
17458         * config/s390/s390.md (mem_signal_fence): Remove.
17459         * doc/md.texi (mem_signal_fence): Remove.
17460         * optabs.c (expand_mem_signal_fence): Remove uses of mem_signal_fence.
17461         Update comments.
17462         * target-insns.def (mem_signal_fence): Remove.
17463
17464 2017-09-01  Jakub Jelinek  <jakub@redhat.com>
17465
17466         PR sanitizer/81902
17467         * doc/invoke.texi: Document -fsanitize=pointer-overflow.
17468
17469         PR sanitizer/81923
17470         * asan.c (create_odr_indicator): Strip name encoding from assembler
17471         name before appending it after __odr_asan_.
17472
17473 2017-09-01  Martin Liska  <mliska@suse.cz>
17474
17475         PR tree-optimization/82059
17476         * gimple-ssa-isolate-paths.c (isolate_path): Add profile and
17477         frequency only when an edge is redirected.
17478
17479 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
17480
17481         * config/arc/arc-c.c (__ARC_LPC_WIDTH__): Add builtin define.
17482         * config/arc/arc.c (ARC_MAX_LOOP_LENGTH): Define.
17483         (arc_conditional_register_usage): Remove ARC600 lp_count
17484         exception.
17485         (arc_file_start): Emit Tag_ARC_CPU_variation.
17486         (arc_can_use_doloop_p): New conditions to use ZOLs.
17487         (hwloop_fail): New function.
17488         (hwloop_optimize): Likewise.
17489         (hwloop_pattern_reg): Likewise.
17490         (arc_doloop_hooks): New struct, to be used with reorg_loops.
17491         (arc_reorg_loops): New function, calls reorg_loops.
17492         (arc_reorg): Call arc_reorg_loops.  Remove old ZOL handling.
17493         (arc600_corereg_hazard): Remove ZOL checking, case handled by
17494         hwloop_optimize.
17495         (arc_loop_hazard): Remove function, functionality moved into
17496         hwloop_optimize.
17497         (arc_hazard): Remove arc_loop_hazard call.
17498         (arc_adjust_insn_length): Remove ZOL handling, functionality moved
17499         into hwloop_optimize.
17500         (arc_label_align): Remove ZOL handling.
17501         * config/arc/arc.h (LOOP_ALIGN): Changed to 0.
17502         * config/arc/arc.md (doloop_begin): Remove pattern.
17503         (doloop_begin_i): Likewise.
17504         (doloop_end_i): Likewise.
17505         (doloop_fallback): Likewise.
17506         (doloop_fallback_m): Likewise.
17507         (doloop_end): Reimplement expand.
17508         (arc_lp): New pattern for LP instruction.
17509         (loop_end): New pattern.
17510         (loop_fail): Likewise.
17511         (decrement_and_branch_until_zero): Likewise.
17512         * config/arc/arc.opt (mlpc-width): New option.
17513         * doc/invoke.texi (mlpc-width): Document option.
17514
17515 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
17516
17517         * config/arc/arc.c (arc_ifcvt): Remove use of merge_blocks call.
17518         (arc_ccfsm_advance): Fix checking for delay slots.
17519         (arc_reorg): Add rtl dump after each call to arc_ifcvt.
17520
17521 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
17522
17523         * config/arc/arc.md (movqi_insn): Add stores to save constant long
17524         immediates.
17525         (movhi_insn): Update store instruction constraint which are saving
17526         6-bit short immediates.
17527         (movsi_insn): Consider also short scaled load operations.
17528         (zero_extendhisi2_i): Use Usd constraint instead of T.
17529         (extendhisi2_i): Add q constraint.
17530         (arc_clzsi2): Add type and length attributes.
17531         (arc_ctzsi2): Likewise.
17532         * config/arc/constraints.md (Usc): Update constraint, the
17533         assembler can parse two relocations for a single instruction.
17534
17535 2017-09-01  Claudiu Zissulescu  <claziss@synopsys.com>
17536
17537         * config/arc/arc.c (arc_use_anchors_for_symbol_p): New function.
17538         (TARGET_USE_ANCHORS_FOR_SYMBOL_P): Define.
17539
17540 2017-08-31  Olivier Hainque  <hainque@adacore.com>
17541
17542         * config.gcc (powerpc-wrs-vxworks|vxworksae|vxworksmils): Now
17543         match as powerpc-wrs-vxworks*.
17544
17545 2017-08-31  James Greenhalgh  <james.greenhalgh@arm.com>
17546
17547         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): Fix
17548         register constraint for by-element operand.
17549         (aarch64_mls_elt_merge<mode>): Likewise.
17550
17551 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
17552
17553         * config/arc/arc.c (arc_can_follow_jump): Check for short
17554         branches.
17555
17556 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
17557
17558         * config.gcc: Use g.opt for arc.
17559         * config/arc/arc.c (LEGITIMATE_SCALED_ADDRESS_P): Deleted,
17560         functionality moved to ...
17561         (legitimate_scaled_address_p): New function, ...here.
17562         (LEGITIMATE_SMALL_DATA_OFFSET_P): New define.
17563         (LEGITIMATE_SMALL_DATA_ADDRESS_P): Use the above define.
17564         (legitimate_offset_address_p): Delete TARGET_NO_SDATA_SET
17565         condition.
17566         (arc_override_options): Handle G option.
17567         (arc_output_pic_addr_const): Correct function definition.
17568         (arc_legitimate_address_p): Use legitimate_scaled_address_p.
17569         (arc_decl_anon_ns_mem_p): Delete.
17570         (arc_in_small_data_p): Overhaul this function to take into
17571         consideration the value given via G option.
17572         (arc_rewrite_small_data_1): Renamed and corrected old
17573         arc_rewrite_small_data function.
17574         (arc_rewrite_small_data): New function.
17575         (small_data_pattern): Don't use pic_offset_table_rtx.
17576         * config/arc/arc.h (CC1_SPEC): Recognize G option.
17577         * config/arc/simdext.md (movmisalignv2hi): Use
17578         prepare_move_operands function.
17579         (mov*): Likewise.
17580         (movmisalign*): Likewise.
17581         * doc/invoke.texi (ARC options): Document -G option.
17582
17583 2017-08-31  Claudiu Zissulescu  <claziss@synopsys.com>
17584
17585         * config/arc/arc-protos.h (compact_sda_memory_operand): Update
17586         prototype.
17587         * config/arc/arc.c (arc_print_operand): Output scalled address for
17588         sdata whenever is possible.
17589         (arc_in_small_data_p): Allow sdata for 64bit datum when double
17590         load/stores are available.
17591         (compact_sda_memory_operand): Check for the alignment required by
17592         code density instructions.
17593         * config/arc/arc.md (movsi_insn): Use newly introduced Us0
17594         constraint.
17595         * config/arc/constraints.md (Usd): Update constraint.
17596         (Us0): New constraint.
17597         (Usc): Update constraint.
17598
17599 2017-08-31  Richard Biener  <rguenther@suse.de>
17600
17601         PR middle-end/82054
17602         * dwarf2out.c (dwarf2out_early_global_decl): Process each
17603         function only once.
17604
17605 2017-08-31  Tamar Christina  <tamar.christina@arm.com>
17606
17607         * config/aarch64/aarch64-builtins.c (aarch64_init_simd_builtins):
17608         Resize type_signature.
17609
17610 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
17611             Alan Hayward  <alan.hayward@arm.com>
17612             David Sherwood  <david.sherwood@arm.com>
17613
17614         * config/aarch64/aarch64.c (aarch64_base_register_rtx_p): Only allow
17615         subregs whose inner modes can be stored in GPRs.
17616         (aarch64_classify_index): Likewise.
17617
17618 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
17619             Alan Hayward  <alan.hayward@arm.com>
17620             David Sherwood  <david.sherwood@arm.com>
17621
17622         * config/aarch64/iterators.md (V_cmp_result): Rename to...
17623         (V_INT_EQUIV): ...this.
17624         (v_cmp_result): Rename to...
17625         (v_int_equiv): ...this.
17626         * config/aarch64/aarch64.md (xorsign<mode>3): Update accordingly.
17627         * config/aarch64/aarch64-simd.md (xorsign<mode>3): Likewise.
17628         (copysign<mode>3): Likewise.
17629         (aarch64_simd_bsl<mode>_internal): Likewise.
17630         (aarch64_simd_bsl<mode>): Likewise.
17631         (vec_cmp<mode><mode>): Likewise.
17632         (vcond<mode><mode>): Likewise.
17633         (vcond<v_cmp_mixed><mode>): Likewise.
17634         (vcondu<mode><v_cmp_mixed>): Likewise.
17635         (aarch64_cm<optab><mode>): Likewise.
17636         (aarch64_cmtst<mode>): Likewise.
17637         (aarch64_fac<optab><mode>): Likewise.
17638         (vec_perm_const<mode>): Likewise.
17639         (vcond_mask_<mode><v_cmp_result>): Rename to...
17640         (vcond_mask_<mode><v_int_equiv>): ...this.
17641         (vec_cmp<mode><v_cmp_result>): Rename to...
17642         (vec_cmp<mode><v_int_equiv>): ...this.
17643
17644 2017-08-31  Richard Sandiford  <richard.sandiford@linaro.org>
17645             Alan Hayward  <alan.hayward@arm.com>
17646             David Sherwood  <david.sherwood@arm.com>
17647
17648         * config/aarch64/aarch64-modes.def: Remove 32-, 48- and 64-byte
17649         vector modes.
17650         * config/aarch64/iterators.md (VRL2, VRL3, VRL4): Delete.
17651         * config/aarch64/aarch64.md (UNSPEC_LD2_DREG, UNSPEC_LD3_DREG)
17652         (UNSPEC_LD4_DREG): New unspecs.
17653         * config/aarch64/aarch64-simd.md (aarch64_ld2<mode>_dreg_le)
17654         (aarch64_ld2<mode>_dreg_be): Replace with...
17655         (aarch64_ld2<mode>_dreg): ...this pattern and use the new DREG
17656         unspec.
17657         (aarch64_ld3<mode>_dreg_le)
17658         (aarch64_ld3<mode>_dreg_be): Replace with...
17659         (aarch64_ld3<mode>_dreg): ...this pattern and use the new DREG
17660         unspec.
17661         (aarch64_ld4<mode>_dreg_le)
17662         (aarch64_ld4<mode>_dreg_be): Replace with...
17663         (aarch64_ld4<mode>_dreg): ...this pattern and use the new DREG
17664         unspec.
17665
17666 2017-08-30  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
17667
17668         PR tree-optimization/81987
17669         * gimple-ssa-strength-reduction.c (insert_initializers): Don't
17670         insert an initializer in a location not dominated by the stride
17671         definition.
17672
17673 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
17674
17675         * tree-eh.c (lower_try_finally_switch): Set the location of the finally
17676         on the entire header of the finally block in the fallthru case.
17677
17678 2017-08-30  Eric Botcazou  <ebotcazou@adacore.com>
17679
17680         * varasm.c (decode_addr_const): Deal with INDIRECT_REF <INTEGER_CST>.
17681
17682 2017-08-30  Pat Haugen  <pthaugen@us.ibm.com>
17683
17684         * config/rs6000/rs6000.c (rs6000_emit_prologue_move_from_cr): Rename from
17685         rs6000_emit_move_from_cr and call renamed function.
17686         (rs6000_emit_prologue): Call renamed functions.
17687         * config/rs6000/rs6000.md (prologue_movesi_from_cr): Rename from
17688         movesi_from_cr, remove volatile CRs.
17689
17690 2017-08-30  Jon Beniston  <jon@beniston.com>
17691             Richard Biener  <rguenther@suse.de>
17692
17693         * tree-vect-patterns.c (vect_pattern_recog_1): Use VECTOR_TYPE_P instead
17694         of VECTOR_MODE_P check.
17695         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Allow single
17696         element vector types.
17697
17698 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17699
17700         * df.h (df_read_modify_subreg_p): Remove in favor of...
17701         * rtl.h (read_modify_subreg_p): ...this new function.  Take a
17702         const_rtx instead of an rtx.
17703         * cprop.c (local_cprop_find_used_regs): Update accordingly.
17704         * df-problems.c (df_word_lr_mark_ref): Likewise.
17705         * ira-lives.c (mark_pseudo_reg_live): Likewise.
17706         (mark_pseudo_reg_dead): Likewise.
17707         (mark_ref_dead): Likewise.
17708         * reginfo.c (init_subregs_of_mode): Likewise.
17709         * sched-deps.c (sched_analyze_1): Likewise.
17710         * df-scan.c (df_def_record_1): Likewise.
17711         (df_uses_record): Likewise.
17712         (df_read_modify_subreg_p): Remove in favor of...
17713         * rtlanal.c (read_modify_subreg_p): ...this new function.  Take a
17714         const_rtx instead of an rtx.
17715
17716 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17717             Alan Hayward  <alan.hayward@arm.com>
17718             David Sherwood  <david.sherwood@arm.com>
17719
17720         * rtl.h (partial_subreg_p): New function.
17721         * caller-save.c (save_call_clobbered_regs): Use it.
17722         * calls.c (expand_call): Likewise.
17723         * combine.c (combinable_i3pat): Likewise.
17724         (simplify_set): Likewise.
17725         (make_extraction): Likewise.
17726         (make_compound_operation_int): Likewise.
17727         (gen_lowpart_or_truncate): Likewise.
17728         (force_to_mode): Likewise.
17729         (make_field_assignment): Likewise.
17730         (reg_truncated_to_mode): Likewise.
17731         (record_truncated_value): Likewise.
17732         (move_deaths): Likewise.
17733         * cse.c (record_jump_cond): Likewise.
17734         (cse_insn): Likewise.
17735         * cselib.c (cselib_lookup_1): Likewise.
17736         * expmed.c (extract_bit_field_using_extv): Likewise.
17737         * function.c (assign_parm_setup_reg): Likewise.
17738         * ifcvt.c (noce_convert_multiple_sets): Likewise.
17739         * ira-build.c (create_insn_allocnos): Likewise.
17740         * lra-coalesce.c (merge_pseudos): Likewise.
17741         * lra-constraints.c (match_reload): Likewise.
17742         (simplify_operand_subreg): Likewise.
17743         (curr_insn_transform): Likewise.
17744         * lra-lives.c (process_bb_lives): Likewise.
17745         * lra.c (new_insn_reg): Likewise.
17746         (lra_substitute_pseudo): Likewise.
17747         * regcprop.c (mode_change_ok): Likewise.
17748         (maybe_mode_change): Likewise.
17749         (copyprop_hardreg_forward_1): Likewise.
17750         * reload.c (push_reload): Likewise.
17751         (find_reloads): Likewise.
17752         (find_reloads_subreg_address): Likewise.
17753         * reload1.c (alter_reg): Likewise.
17754         (eliminate_regs_1): Likewise.
17755         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
17756
17757 2017-08-30  David Edelsohn  <dje.gcc@gmail.com>
17758
17759         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Revert
17760         back to if statements, including unpack.
17761
17762 2017-08-30  Martin Liska  <mliska@suse.cz>
17763
17764         PR inline-asm/82001
17765         * ipa-icf-gimple.c (func_checker::compare_tree_list_operand):
17766         Rename to ...
17767         (func_checker::compare_asm_inputs_outputs): ... this function.
17768         (func_checker::compare_gimple_asm): Use the function to compare
17769         also ASM constrains.
17770         * ipa-icf-gimple.h: Rename the function.
17771
17772 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17773             Alan Hayward  <alan.hayward@arm.com>
17774             David Sherwood  <david.sherwood@arm.com>
17775
17776         * coretypes.h (complex_mode): New type.
17777         * gdbhooks.py (build_pretty_printer): Handle it.
17778         * machmode.h (complex_mode): New class.
17779         (complex_mode::includes_p): New function.
17780         (is_complex_int_mode): Likewise.
17781         (is_complex_float_mode): Likewise.
17782         * genmodes.c (get_mode_class): Handle complex mode classes.
17783         * function.c (expand_function_end): Use is_complex_int_mode.
17784
17785 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17786             Alan Hayward  <alan.hayward@arm.com>
17787             David Sherwood  <david.sherwood@arm.com>
17788
17789         * coretypes.h (scalar_mode_pod): New typedef.
17790         * gdbhooks.py (build_pretty_printer): Handle it.
17791         * machmode.h (gt_ggc_mx, gt_pch_nx): New functions.
17792         * fixed-value.h (fixed_value::mode): Change type to scalar_mode_pod.
17793         * fold-const.c (fold_convert_const_int_from_fixed): Use scalar_mode.
17794         * tree-streamer-in.c (unpack_ts_fixed_cst_value_fields): Use
17795         as_a <scalar_mode>.
17796
17797 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17798             Alan Hayward  <alan.hayward@arm.com>
17799             David Sherwood  <david.sherwood@arm.com>
17800
17801         * machmode.h (mode_for_vector): Take a scalar_mode instead
17802         of a machine_mode.
17803         * stor-layout.c (mode_for_vector): Likewise.
17804         * explow.c (promote_mode): Use as_a <scalar_mode>.
17805         * sdbout.c (sdbout_parms): Use is_a <scalar_mode>.
17806
17807 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17808             Alan Hayward  <alan.hayward@arm.com>
17809             David Sherwood  <david.sherwood@arm.com>
17810
17811         * target.def (preferred_simd_mode): Take a scalar_mode
17812         instead of a machine_mode.
17813         * targhooks.h (default_preferred_simd_mode): Likewise.
17814         * targhooks.c (default_preferred_simd_mode): Likewise.
17815         * config/arc/arc.c (arc_preferred_simd_mode): Likewise.
17816         * config/arm/arm.c (arm_preferred_simd_mode): Likewise.
17817         * config/c6x/c6x.c (c6x_preferred_simd_mode): Likewise.
17818         * config/epiphany/epiphany.c (epiphany_preferred_simd_mode): Likewise.
17819         * config/i386/i386.c (ix86_preferred_simd_mode): Likewise.
17820         * config/mips/mips.c (mips_preferred_simd_mode): Likewise.
17821         * config/nvptx/nvptx.c (nvptx_preferred_simd_mode): Likewise.
17822         * config/powerpcspe/powerpcspe.c (rs6000_preferred_simd_mode):
17823         Likewise.
17824         * config/rs6000/rs6000.c (rs6000_preferred_simd_mode): Likewise.
17825         * config/s390/s390.c (s390_preferred_simd_mode): Likewise.
17826         * config/sparc/sparc.c (sparc_preferred_simd_mode): Likewise.
17827         * config/aarch64/aarch64.c (aarch64_preferred_simd_mode): Likewise.
17828         (aarch64_simd_scalar_immediate_valid_for_move): Update accordingly.
17829         * doc/tm.texi: Regenerate.
17830         * optabs-query.c (can_vec_mask_load_store_p): Return false for
17831         non-scalar modes.
17832
17833 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17834             Alan Hayward  <alan.hayward@arm.com>
17835             David Sherwood  <david.sherwood@arm.com>
17836
17837         * target.def (scalar_mode_supported_p): Take a scalar_mode
17838         instead of a machine_mode.
17839         * targhooks.h (default_scalar_mode_supported_p): Likewise.
17840         * targhooks.c (default_scalar_mode_supported_p): Likewise.
17841         * config/aarch64/aarch64.c (aarch64_scalar_mode_supported_p): Likewise.
17842         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
17843         * config/arm/arm.c (arm_scalar_mode_supported_p): Likewise.
17844         * config/avr/avr.c (avr_scalar_mode_supported_p): Likewise.
17845         * config/c6x/c6x.c (c6x_scalar_mode_supported_p): Likewise.
17846         * config/i386/i386.c (ix86_scalar_mode_supported_p): Likewise.
17847         * config/ia64/ia64.c (ia64_scalar_mode_supported_p): Likewise.
17848         * config/mips/mips.c (mips_scalar_mode_supported_p): Likewise.
17849         * config/msp430/msp430.c (msp430_scalar_mode_supported_p): Likewise.
17850         * config/pa/pa.c (pa_scalar_mode_supported_p): Likewise.
17851         * config/pdp11/pdp11.c (pdp11_scalar_mode_supported_p): Likewise.
17852         * config/powerpcspe/powerpcspe.c (rs6000_scalar_mode_supported_p):
17853         Likewise.
17854         * config/rs6000/rs6000.c (rs6000_scalar_mode_supported_p): Likewise.
17855         * config/s390/s390.c (s390_scalar_mode_supported_p): Likewise.
17856         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
17857         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
17858         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p):
17859         Likewise.
17860         * doc/tm.texi: Regenerate.
17861
17862 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17863             Alan Hayward  <alan.hayward@arm.com>
17864             David Sherwood  <david.sherwood@arm.com>
17865
17866         * coretypes.h (opt_scalar_mode): New typedef.
17867         * gdbhooks.py (build_pretty_printers): Handle it.
17868         * machmode.h (mode_iterator::get_2xwider): Add overload for
17869         opt_mode<T>.
17870         * emit-rtl.c (init_emit_once): Use opt_scalar_mode when iterating
17871         over scalar modes.
17872         * expr.c (convert_mode_scalar): Likewise.
17873         * omp-low.c (omp_clause_aligned_alignment): Likewise.
17874         * optabs.c (expand_float): Likewise.
17875         (expand_fix): Likewise.
17876         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
17877
17878 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17879             Alan Hayward  <alan.hayward@arm.com>
17880             David Sherwood  <david.sherwood@arm.com>
17881
17882         * optabs.c (expand_float): Explicitly check for scalars before
17883         using a branching expansion.
17884         (expand_fix): Likewise.
17885
17886 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17887             Alan Hayward  <alan.hayward@arm.com>
17888             David Sherwood  <david.sherwood@arm.com>
17889
17890         * expr.c (convert_mode): Split scalar handling out into...
17891         (convert_mode_scalar): ...this new function.  Treat the modes
17892         as scalar_modes.
17893
17894 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17895             Alan Hayward  <alan.hayward@arm.com>
17896             David Sherwood  <david.sherwood@arm.com>
17897
17898         * omp-expand.c (expand_omp_atomic): Use is_int_mode, is_float_mode
17899         and scalar_mode.
17900         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Likewise.
17901
17902 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17903             Alan Hayward  <alan.hayward@arm.com>
17904             David Sherwood  <david.sherwood@arm.com>
17905
17906         * fixed-value.h (fixed_from_double_int): Take a scalar_mode
17907         rather than a machine_mode.
17908         (fixed_from_string): Likewise.
17909         (fixed_convert): Likewise.
17910         (fixed_convert_from_int): Likewise.
17911         (fixed_convert_from_real): Likewise.
17912         (real_convert_from_fixed): Likewise.
17913         * fixed-value.c (fixed_from_double_int): Likewise.
17914         (fixed_from_string): Likewise.
17915         (fixed_convert): Likewise.
17916         (fixed_convert_from_int): Likewise.
17917         (fixed_convert_from_real): Likewise.
17918         (real_convert_from_fixed): Likewise.
17919         * config/avr/avr.c (avr_out_round): Use as_a <scalar_mode>.
17920
17921 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17922             Alan Hayward  <alan.hayward@arm.com>
17923             David Sherwood  <david.sherwood@arm.com>
17924
17925         * emit-rtl.c (immed_double_const): Use is_a <scalar_mode> instead
17926         of separate mode class checks.  Do not allow vector modes here.
17927         (immed_wide_int_const): Use as_a <scalar_mode>.
17928         * explow.c (trunc_int_for_mode): Likewise.
17929         * rtl.h (wi::int_traits<rtx_mode_t>::get_precision): Likewise.
17930         (wi::shwi): Likewise.
17931         (wi::min_value): Likewise.
17932         (wi::max_value): Likewise.
17933         * dwarf2out.c (loc_descriptor): Likewise.
17934         * simplify-rtx.c (simplify_immed_subreg): Fix rtx_mode_t argument
17935         for CONST_WIDE_INT.
17936
17937 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17938             Alan Hayward  <alan.hayward@arm.com>
17939             David Sherwood  <david.sherwood@arm.com>
17940
17941         * tree.h (SCALAR_TYPE_MODE): New macro.
17942         * expr.c (expand_expr_addr_expr_1): Use it.
17943         (expand_expr_real_2): Likewise.
17944         * fold-const.c (fold_convert_const_fixed_from_fixed): Likeise.
17945         (fold_convert_const_fixed_from_int): Likewise.
17946         (fold_convert_const_fixed_from_real): Likewise.
17947         (native_encode_fixed): Likewise
17948         (native_encode_complex): Likewise
17949         (native_encode_vector): Likewise.
17950         (native_interpret_fixed): Likewise.
17951         (native_interpret_real): Likewise.
17952         (native_interpret_complex): Likewise.
17953         (native_interpret_vector): Likewise.
17954         * omp-simd-clone.c (simd_clone_adjust_return_type): Likewise.
17955         (simd_clone_adjust_argument_types): Likewise.
17956         (simd_clone_init_simd_arrays): Likewise.
17957         (simd_clone_adjust): Likewise.
17958         * stor-layout.c (layout_type): Likewise.
17959         * tree.c (build_minus_one_cst): Likewise.
17960         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
17961         * tree-inline.c (estimate_move_cost): Likewise.
17962         * tree-ssa-math-opts.c (convert_plusminus_to_widen): Likewise.
17963         * tree-vect-loop.c (vect_create_epilog_for_reduction): Likewise.
17964         (vectorizable_reduction): Likewise.
17965         * tree-vect-patterns.c (vect_recog_widen_mult_pattern): Likewise.
17966         (vect_recog_mixed_size_cond_pattern): Likewise.
17967         (check_bool_pattern): Likewise.
17968         (adjust_bool_pattern): Likewise.
17969         (search_type_for_mask_1): Likewise.
17970         * tree-vect-slp.c (vect_schedule_slp_instance): Likewise.
17971         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
17972         (vectorizable_load): Likewise.
17973         (vectorizable_store): Likewise.
17974         * ubsan.c (ubsan_encode_value): Likewise.
17975         * varasm.c (output_constant): Likewise.
17976
17977 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
17978             Alan Hayward  <alan.hayward@arm.com>
17979             David Sherwood  <david.sherwood@arm.com>
17980
17981         * coretypes.h (scalar_mode): New class.
17982         * machmode.h (scalar_mode): Likewise.
17983         (scalar_mode::includes_p): New function.
17984         (mode_to_inner): Return a scalar_mode rather than a machine_mode.
17985         * gdbhooks.py (build_pretty_printers): Handle scalar_mode.
17986         * genmodes.c (get_mode_class): Handle remaining scalar modes.
17987         * cfgexpand.c (expand_debug_expr): Use scalar_mode.
17988         * expmed.c (store_bit_field_1): Likewise.
17989         (extract_bit_field_1): Likewise.
17990         * expr.c (write_complex_part): Likewise.
17991         (read_complex_part): Likewise.
17992         (emit_move_complex_push): Likewise.
17993         (expand_expr_real_2): Likewise.
17994         * function.c (assign_parm_setup_reg): Likewise.
17995         (assign_parms_unsplit_complex): Likewise.
17996         * optabs.c (expand_binop): Likewise.
17997         * rtlanal.c (subreg_get_info): Likewise.
17998         * simplify-rtx.c (simplify_immed_subreg): Likewise.
17999         * varasm.c (output_constant_pool_2): Likewise.
18000
18001 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18002             Alan Hayward  <alan.hayward@arm.com>
18003             David Sherwood  <david.sherwood@arm.com>
18004
18005         * expmed.c (extract_high_half): Use scalar_int_mode and remove
18006         assertion.
18007         (expmed_mult_highpart_optab): Likewise.
18008         (expmed_mult_highpart): Likewise.
18009
18010 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18011             Alan Hayward  <alan.hayward@arm.com>
18012             David Sherwood  <david.sherwood@arm.com>
18013
18014         * builtins.h (builtin_strncpy_read_str): Take a scalar_int_mode
18015         instead of a machine_mode.
18016         (builtin_memset_read_str): Likewise.
18017         * builtins.c (c_readstr): Likewise.
18018         (builtin_memcpy_read_str): Likewise.
18019         (builtin_strncpy_read_str): Likewise.
18020         (builtin_memset_read_str): Likewise.
18021         (builtin_memset_gen_str): Likewise.
18022         (expand_builtin_signbit): Use scalar_int_mode for local variables.
18023         * cfgexpand.c (convert_debug_memory_address): Take a scalar_int_mode
18024         instead of a machine_mode.
18025         * combine.c (simplify_if_then_else): Use scalar_int_mode for local
18026         variables.
18027         (make_extraction): Likewise.
18028         (try_widen_shift_mode): Take and return scalar_int_modes instead
18029         of machine_modes.
18030         * config/aarch64/aarch64.c (aarch64_libgcc_cmp_return_mode): Return
18031         a scalar_int_mode instead of a machine_mode.
18032         * config/avr/avr.c (avr_addr_space_address_mode): Likewise.
18033         (avr_addr_space_pointer_mode): Likewise.
18034         * config/cr16/cr16.c (cr16_unwind_word_mode): Likewise.
18035         * config/msp430/msp430.c (msp430_addr_space_pointer_mode): Likewise.
18036         (msp430_unwind_word_mode): Likewise.
18037         * config/spu/spu.c (spu_unwind_word_mode): Likewise.
18038         (spu_addr_space_pointer_mode): Likewise.
18039         (spu_addr_space_address_mode): Likewise.
18040         (spu_libgcc_cmp_return_mode): Likewise.
18041         (spu_libgcc_shift_count_mode): Likewise.
18042         * config/rl78/rl78.c (rl78_addr_space_address_mode): Likewise.
18043         (rl78_addr_space_pointer_mode): Likewise.
18044         (fl78_unwind_word_mode): Likewise.
18045         (rl78_valid_pointer_mode): Take a scalar_int_mode instead of a
18046         machine_mode.
18047         * config/alpha/alpha.c (vms_valid_pointer_mode): Likewise.
18048         * config/ia64/ia64.c (ia64_vms_valid_pointer_mode): Likewise.
18049         * config/mips/mips.c (mips_mode_rep_extended): Likewise.
18050         (mips_valid_pointer_mode): Likewise.
18051         * config/tilegx/tilegx.c (tilegx_mode_rep_extended): Likewise.
18052         * config/ft32/ft32.c (ft32_valid_pointer_mode): Likewise.
18053         (ft32_addr_space_pointer_mode): Return a scalar_int_mode instead
18054         of a machine_mode.
18055         (ft32_addr_space_address_mode): Likewise.
18056         * config/m32c/m32c.c (m32c_valid_pointer_mode): Take a
18057         scalar_int_mode instead of a machine_mode.
18058         (m32c_addr_space_pointer_mode): Return a scalar_int_mode instead
18059         of a machine_mode.
18060         (m32c_addr_space_address_mode): Likewise.
18061         * config/powerpcspe/powerpcspe.c (rs6000_abi_word_mode): Likewise.
18062         (rs6000_eh_return_filter_mode): Likewise.
18063         * config/rs6000/rs6000.c (rs6000_abi_word_mode): Likewise.
18064         (rs6000_eh_return_filter_mode): Likewise.
18065         * config/s390/s390.c (s390_libgcc_cmp_return_mode): Likewise.
18066         (s390_libgcc_shift_count_mode): Likewise.
18067         (s390_unwind_word_mode): Likewise.
18068         (s390_valid_pointer_mode): Take a scalar_int_mode rather than a
18069         machine_mode.
18070         * target.def (mode_rep_extended): Likewise.
18071         (valid_pointer_mode): Likewise.
18072         (addr_space.valid_pointer_mode): Likewise.
18073         (eh_return_filter_mode): Return a scalar_int_mode rather than
18074         a machine_mode.
18075         (libgcc_cmp_return_mode): Likewise.
18076         (libgcc_shift_count_mode): Likewise.
18077         (unwind_word_mode): Likewise.
18078         (addr_space.pointer_mode): Likewise.
18079         (addr_space.address_mode): Likewise.
18080         * doc/tm.texi: Regenerate.
18081         * dojump.c (prefer_and_bit_test): Take a scalar_int_mode rather than
18082         a machine_mode.
18083         (do_jump): Use scalar_int_mode for local variables.
18084         * dwarf2cfi.c (init_return_column_size): Take a scalar_int_mode
18085         rather than a machine_mode.
18086         * dwarf2out.c (convert_descriptor_to_mode): Likewise.
18087         (scompare_loc_descriptor_wide): Likewise.
18088         (scompare_loc_descriptor_narrow): Likewise.
18089         * emit-rtl.c (adjust_address_1): Use scalar_int_mode for local
18090         variables.
18091         * except.c (sjlj_emit_dispatch_table): Likewise.
18092         (expand_builtin_eh_copy_values): Likewise.
18093         * explow.c (convert_memory_address_addr_space_1): Likewise.
18094         Take a scalar_int_mode rather than a machine_mode.
18095         (convert_memory_address_addr_space): Take a scalar_int_mode rather
18096         than a machine_mode.
18097         (memory_address_addr_space): Use scalar_int_mode for local variables.
18098         * expmed.h (expand_mult_highpart_adjust): Take a scalar_int_mode
18099         rather than a machine_mode.
18100         * expmed.c (mask_rtx): Likewise.
18101         (init_expmed_one_conv): Likewise.
18102         (expand_mult_highpart_adjust): Likewise.
18103         (extract_high_half): Likewise.
18104         (expmed_mult_highpart_optab): Likewise.
18105         (expmed_mult_highpart): Likewise.
18106         (expand_smod_pow2): Likewise.
18107         (expand_sdiv_pow2): Likewise.
18108         (emit_store_flag_int): Likewise.
18109         (adjust_bit_field_mem_for_reg): Use scalar_int_mode for local
18110         variables.
18111         (extract_low_bits): Likewise.
18112         * expr.h (by_pieces_constfn): Take a scalar_int_mode rather than
18113         a machine_mode.
18114         * expr.c (pieces_addr::adjust):  Likewise.
18115         (can_store_by_pieces): Likewise.
18116         (store_by_pieces): Likewise.
18117         (clear_by_pieces_1): Likewise.
18118         (expand_expr_addr_expr_1): Likewise.
18119         (expand_expr_addr_expr): Use scalar_int_mode for local variables.
18120         (expand_expr_real_1): Likewise.
18121         (try_casesi): Likewise.
18122         * final.c (shorten_branches): Likewise.
18123         * fold-const.c (fold_convert_const_int_from_fixed): Change the
18124         type of "mode" to machine_mode.
18125         * internal-fn.c (expand_arith_overflow_result_store): Take a
18126         scalar_int_mode rather than a machine_mode.
18127         (expand_mul_overflow): Use scalar_int_mode for local variables.
18128         * loop-doloop.c (doloop_modify): Likewise.
18129         (doloop_optimize): Likewise.
18130         * optabs.c (expand_subword_shift): Take a scalar_int_mode rather
18131         than a machine_mode.
18132         (expand_doubleword_shift_condmove): Likewise.
18133         (expand_doubleword_shift): Likewise.
18134         (expand_doubleword_clz): Likewise.
18135         (expand_doubleword_popcount): Likewise.
18136         (expand_doubleword_parity): Likewise.
18137         (expand_absneg_bit): Use scalar_int_mode for local variables.
18138         (prepare_float_lib_cmp): Likewise.
18139         * rtl.h (convert_memory_address_addr_space_1): Take a scalar_int_mode
18140         rather than a machine_mode.
18141         (convert_memory_address_addr_space): Likewise.
18142         (get_mode_bounds): Likewise.
18143         (get_address_mode): Return a scalar_int_mode rather than a
18144         machine_mode.
18145         * rtlanal.c (get_address_mode): Likewise.
18146         * stor-layout.c (get_mode_bounds): Take a scalar_int_mode rather
18147         than a machine_mode.
18148         * targhooks.c (default_mode_rep_extended): Likewise.
18149         (default_valid_pointer_mode): Likewise.
18150         (default_addr_space_valid_pointer_mode): Likewise.
18151         (default_eh_return_filter_mode): Return a scalar_int_mode rather
18152         than a machine_mode.
18153         (default_libgcc_cmp_return_mode): Likewise.
18154         (default_libgcc_shift_count_mode): Likewise.
18155         (default_unwind_word_mode): Likewise.
18156         (default_addr_space_pointer_mode): Likewise.
18157         (default_addr_space_address_mode): Likewise.
18158         * targhooks.h (default_eh_return_filter_mode): Likewise.
18159         (default_libgcc_cmp_return_mode): Likewise.
18160         (default_libgcc_shift_count_mode): Likewise.
18161         (default_unwind_word_mode): Likewise.
18162         (default_addr_space_pointer_mode): Likewise.
18163         (default_addr_space_address_mode): Likewise.
18164         (default_mode_rep_extended): Take a scalar_int_mode rather than
18165         a machine_mode.
18166         (default_valid_pointer_mode): Likewise.
18167         (default_addr_space_valid_pointer_mode): Likewise.
18168         * tree-ssa-address.c (addr_for_mem_ref): Use scalar_int_mode for
18169         local variables.
18170         * tree-ssa-loop-ivopts.c (get_shiftadd_cost): Take a scalar_int_mode
18171         rather than a machine_mode.
18172         * tree-switch-conversion.c (array_value_type): Use scalar_int_mode
18173         for local variables.
18174         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
18175         * var-tracking.c (use_narrower_mode): Take a scalar_int_mode rather
18176         than a machine_mode.
18177
18178 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18179             Alan Hayward  <alan.hayward@arm.com>
18180             David Sherwood  <david.sherwood@arm.com>
18181
18182         * dojump.c (do_jump_by_parts_greater_rtx): Change the type of
18183         the mode argument to scalar_int_mode.
18184         (do_jump_by_parts_zero_rtx): Likewise.
18185         (do_jump_by_parts_equality_rtx): Likewise.
18186         (do_jump_by_parts_greater): Take a mode argument.
18187         (do_jump_by_parts_equality): Likewise.
18188         (do_jump_1): Update calls accordingly.
18189
18190 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18191             Alan Hayward  <alan.hayward@arm.com>
18192             David Sherwood  <david.sherwood@arm.com>
18193
18194         * is-a.h (safe_dyn_cast): New function.
18195         * rtl.h (rtx_jump_table_data::get_data_mode): New function.
18196         (jump_table_for_label): Likewise.
18197         * final.c (final_addr_vec_align): Take an rtx_jump_table_data *
18198         instead of an rtx_insn *.
18199         (shorten_branches): Use dyn_cast instead of LABEL_P and
18200         JUMP_TABLE_DATA_P.  Use jump_table_for_label and
18201         rtx_jump_table_data::get_data_mode.
18202         (final_scan_insn): Likewise.
18203
18204 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18205             Alan Hayward  <alan.hayward@arm.com>
18206             David Sherwood  <david.sherwood@arm.com>
18207
18208         * combine.c (try_combine): Use is_a <scalar_int_mode> when
18209         trying to combine a full-register integer set with a subreg
18210         integer set.
18211
18212 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18213             Alan Hayward  <alan.hayward@arm.com>
18214             David Sherwood  <david.sherwood@arm.com>
18215
18216         * expr.c (expand_expr_addr_expr): Add a new_tmode local variable
18217         that is always either address_mode or pointer_mode.
18218
18219 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18220             Alan Hayward  <alan.hayward@arm.com>
18221             David Sherwood  <david.sherwood@arm.com>
18222
18223         * expr.c (expand_expr_real_2): Use word_mode instead of innermode
18224         when the two are known to be equal.
18225
18226 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18227             Alan Hayward  <alan.hayward@arm.com>
18228             David Sherwood  <david.sherwood@arm.com>
18229
18230         * simplify-rtx.c (simplify_const_unary_operation): Use
18231         is_a <scalar_int_mode> instead of checking for a nonzero
18232         precision.  Forcibly convert op_mode to a scalar_int_mode
18233         in that case.  More clearly differentiate the operand and
18234         result modes and use the former when deciding what the value
18235         of a count-bits operation should be.  Use is_int_mode instead
18236         of checking for a MODE_INT.  Remove redundant check for whether
18237         this mode has a zero precision.
18238
18239 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18240             Alan Hayward  <alan.hayward@arm.com>
18241             David Sherwood  <david.sherwood@arm.com>
18242
18243         * optabs.c (widen_leading): Change the type of the mode argument
18244         to scalar_int_mode.  Use opt_scalar_int_mode for the mode iterator.
18245         (widen_bswap): Likewise.
18246         (expand_parity): Likewise.
18247         (expand_ctz): Change the type of the mode argument to scalar_int_mode.
18248         (expand_ffs): Likewise.
18249         (epand_unop): Check for scalar integer modes before calling the
18250         above routines.
18251
18252 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18253             Alan Hayward  <alan.hayward@arm.com>
18254             David Sherwood  <david.sherwood@arm.com>
18255
18256         * expr.c (const_scalar_mask_from_tree): Add a mode argument.
18257         Expand commentary.
18258         (expand_expr_real_1): Update call accordingly.
18259
18260 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18261             Alan Hayward  <alan.hayward@arm.com>
18262             David Sherwood  <david.sherwood@arm.com>
18263
18264         * expmed.c (store_bit_field_using_insv): Add op0_mode and
18265         value_mode arguments.  Use scalar_int_mode internally.
18266         (store_bit_field_1): Rename the new integer mode from imode
18267         to op0_mode and use it instead of GET_MODE (op0).  Update calls
18268         to store_split_bit_field, store_bit_field_using_insv and
18269         store_fixed_bit_field.
18270         (store_fixed_bit_field): Add op0_mode and value_mode arguments.
18271         Use scalar_int_mode internally.  Use a bit count rather than a mode
18272         when calculating the largest bit size for get_best_mode.
18273         Update calls to store_split_bit_field and store_fixed_bit_field_1.
18274         (store_fixed_bit_field_1): Add mode and value_mode arguments.
18275         Remove assertion that OP0 has a scalar integer mode.
18276         (store_split_bit_field): Add op0_mode and value_mode arguments.
18277         Update calls to extract_fixed_bit_field.
18278         (extract_bit_field_using_extv): Add an op0_mode argument.
18279         Use scalar_int_mode internally.
18280         (extract_bit_field_1): Rename the new integer mode from imode to
18281         op0_mode and use it instead of GET_MODE (op0).  Update calls to
18282         extract_split_bit_field, extract_bit_field_using_extv and
18283         extract_fixed_bit_field.
18284         (extract_fixed_bit_field): Add an op0_mode argument.  Update calls
18285         to extract_split_bit_field and extract_fixed_bit_field_1.
18286         (extract_fixed_bit_field_1): Add a mode argument.  Remove assertion
18287         that OP0 has a scalar integer mode.  Use as_a <scalar_int_mode>
18288         on the target mode.
18289         (extract_split_bit_field): Add an op0_mode argument.  Update call
18290         to extract_fixed_bit_field.
18291
18292 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18293             Alan Hayward  <alan.hayward@arm.com>
18294             David Sherwood  <david.sherwood@arm.com>
18295
18296         * cse.c (cse_insn): Use opt_scalar_int_mode for the mode iterator.
18297         * explow.c (hard_function_value): Likewise.
18298         * expmed.c (extract_fixed_bit_field_1): Likewise.  Move the
18299         convert_to_mode call outside the loop.
18300         * expr.c (alignment_for_piecewise_move): Use opt_scalar_int_mode
18301         for the mode iterator.  Require the mode specified by max_pieces
18302         to exist.
18303         (emit_block_move_via_movmem): Use opt_scalar_int_mode for the
18304         mode iterator.
18305         (copy_blkmode_to_reg): Likewise.
18306         (set_storage_via_setmem): Likewise.
18307         * optabs.c (prepare_cmp_insn): Likewise.
18308         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
18309         * stor-layout.c (finish_bitfield_representative): Likewise.
18310
18311 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18312             Alan Hayward  <alan.hayward@arm.com>
18313             David Sherwood  <david.sherwood@arm.com>
18314
18315         * rtl.h (subreg_unpromoted_mode, subreg_promoted_mode): New functions.
18316         * expr.c (convert_move): Use them.
18317         (convert_modes): Likewise.
18318         (store_expr_with_bounds): Likewise.
18319
18320 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18321             Alan Hayward  <alan.hayward@arm.com>
18322             David Sherwood  <david.sherwood@arm.com>
18323
18324         * rtl.h (rtl_hooks::reg_nonzero_bits): Add a scalar_int_mode
18325         parameter for the mode of "x".  Remove the "known_x", "known_mode"
18326         and "known_ret" arguments.  Change the type of the mode argument
18327         to scalar_int_mode.
18328         (rtl_hooks:reg_num_sign_bit_copies): Likewise.
18329         * combine.c (reg_nonzero_bits_for_combine): Update accordingly.
18330         (reg_num_sign_bit_copies_for_combine): Likewise.
18331         * rtlanal.c (nonzero_bits1): Likewise.
18332         (num_sign_bit_copies1): Likewise.
18333         * rtlhooks-def.h (reg_nonzero_bits_general): Likewise.
18334         (reg_num_sign_bit_copies_general): Likewise.
18335         * rtlhooks.c (reg_num_sign_bit_copies_general): Likewise.
18336         (reg_nonzero_bits_general): Likewise.
18337
18338 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18339             Alan Hayward  <alan.hayward@arm.com>
18340             David Sherwood  <david.sherwood@arm.com>
18341
18342         * rtlanal.c (num_sign_bit_copies): Handle VOIDmode here rather
18343         than in subroutines.  Return 1 for non-integer modes.
18344         (cached_num_sign_bit_copies): Change the type of the mode parameter
18345         to scalar_int_mode.
18346         (num_sign_bit_copies1): Likewise.  Remove early exit for other mode
18347         classes.  Handle CONST_INT_P first and then check whether X also
18348         has a scalar integer mode.  Check the same thing for inner registers
18349         of a SUBREG and for values that are being extended or truncated.
18350
18351 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18352             Alan Hayward  <alan.hayward@arm.com>
18353             David Sherwood  <david.sherwood@arm.com>
18354
18355         * rtlanal.c (nonzero_bits): Handle VOIDmode here rather than
18356         in subroutines.  Return the mode mask for non-integer modes.
18357         (cached_nonzero_bits): Change the type of the mode parameter
18358         to scalar_int_mode.
18359         (nonzero_bits1): Likewise.  Remove early exit for other mode
18360         classes.  Handle CONST_INT_P first and then check whether X
18361         also has a scalar integer mode.
18362
18363 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18364             Alan Hayward  <alan.hayward@arm.com>
18365             David Sherwood  <david.sherwood@arm.com>
18366
18367         * expr.c (widest_int_mode_for_size): Make the comment match the code.
18368         Return a scalar_int_mode and assert that the size is greater than
18369         one byte.
18370         (by_pieces_ninsns): Update accordingly and remove VOIDmode handling.
18371         (op_by_pieces_d::op_by_pieces_d): Likewise.
18372         (op_by_pieces_d::run): Likewise.
18373         (can_store_by_pieces): Likewise.
18374
18375 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18376             Alan Hayward  <alan.hayward@arm.com>
18377             David Sherwood  <david.sherwood@arm.com>
18378
18379         * combine.c (extract_left_shift): Add a mode argument and update
18380         recursive calls.
18381         (make_compound_operation_int): Change the type of the mode parameter
18382         to scalar_int_mode and update the call to extract_left_shift.
18383
18384 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18385             Alan Hayward  <alan.hayward@arm.com>
18386             David Sherwood  <david.sherwood@arm.com>
18387
18388         * combine.c (simplify_and_const_int): Change the type of the mode
18389         parameter to scalar_int_mode.
18390         (simplify_and_const_int_1): Likewise.  Update recursive call.
18391
18392 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18393             Alan Hayward  <alan.hayward@arm.com>
18394             David Sherwood  <david.sherwood@arm.com>
18395
18396         * combine.c (simplify_compare_const): Check that the mode is a
18397         scalar_int_mode (rather than VOIDmode) before testing its
18398         precision.
18399         (simplify_comparison): Move COMPARISON_P handling out of the
18400         loop and restrict the latter part of the loop to scalar_int_modes.
18401         Check is_a <scalar_int_mode> before calling HWI_COMPUTABLE_MODE_P
18402         and when considering SUBREG_REGs.  Use is_int_mode instead of
18403         checking GET_MODE_CLASS against MODE_INT.
18404
18405 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18406             Alan Hayward  <alan.hayward@arm.com>
18407             David Sherwood  <david.sherwood@arm.com>
18408
18409         * combine.c (try_widen_shift_mode): Move check for equal modes to...
18410         (simplify_shift_const_1): ...here.  Use scalar_int_mode for
18411         shift_unit_mode and for modes involved in scalar shifts.
18412
18413 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18414             Alan Hayward  <alan.hayward@arm.com>
18415             David Sherwood  <david.sherwood@arm.com>
18416
18417         * combine.c (force_int_to_mode): New function, split out from...
18418         (force_to_mode): ...here.  Keep xmode up-to-date and use it
18419         instead of GET_MODE (x).
18420
18421 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18422             Alan Hayward  <alan.hayward@arm.com>
18423             David Sherwood  <david.sherwood@arm.com>
18424
18425         * optabs-query.h (extraction_insn::struct_mode): Change type to
18426         opt_scalar_int_mode and update comment.
18427         (extraction_insn::field_mode): Change type to scalar_int_mode.
18428         (extraction_insn::pos_mode): Likewise.
18429         * combine.c (make_extraction): Update accordingly.
18430         * optabs-query.c (get_traditional_extraction_insn): Likewise.
18431         (get_optab_extraction_insn): Likewise.
18432         * recog.c (simplify_while_replacing): Likewise.
18433         * expmed.c (narrow_bit_field_mem): Change the type of the mode
18434         parameter to opt_scalar_int_mode.
18435
18436 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18437             Alan Hayward  <alan.hayward@arm.com>
18438             David Sherwood  <david.sherwood@arm.com>
18439
18440         * machmode.h (bit_field_mode_iterator::next_mode): Take a pointer
18441         to a scalar_int_mode instead of a machine_mode.
18442         (bit_field_mode_iterator::m_mode): Change type to opt_scalar_int_mode.
18443         (get_best_mode): Return a boolean and use a pointer argument to store
18444         the selected mode.  Replace the limit mode parameter with a bit limit.
18445         * expmed.c (adjust_bit_field_mem_for_reg): Use scalar_int_mode
18446         for the values returned by bit_field_mode_iterator::next_mode.
18447         (store_bit_field): Update call to get_best_mode.
18448         (store_fixed_bit_field): Likewise.
18449         (extract_fixed_bit_field): Likewise.
18450         * expr.c (optimize_bitfield_assignment_op): Likewise.
18451         * fold-const.c (optimize_bit_field_compare): Likewise.
18452         (fold_truth_andor_1): Likewise.
18453         * stor-layout.c (bit_field_mode_iterator::next_mode): As above.
18454         Update for new type of m_mode.
18455         (get_best_mode): As above.
18456
18457 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18458             Alan Hayward  <alan.hayward@arm.com>
18459             David Sherwood  <david.sherwood@arm.com>
18460
18461         * expmed.c (strict_volatile_bitfield_p): Change the type of fieldmode
18462         to scalar_int_mode.  Remove check for SCALAR_INT_MODE_P.
18463         (store_bit_field): Check is_a <scalar_int_mode> before calling
18464         strict_volatile_bitfield_p.
18465         (extract_bit_field): Likewise.
18466
18467 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18468             Alan Hayward  <alan.hayward@arm.com>
18469             David Sherwood  <david.sherwood@arm.com>
18470
18471         * target.def (cstore_mode): Return a scalar_int_mode.
18472         * doc/tm.texi: Regenerate.
18473         * config/sparc/sparc.c (sparc_cstore_mode): Return a scalar_int_mode.
18474         * targhooks.h (default_cstore_mode): Likewise.
18475         * targhooks.c (default_cstore_mode): Likewise, using a forced
18476         conversion.
18477         * expmed.c (emit_cstore): Expect the target of the cstore to be
18478         a scalar_int_mode.
18479
18480 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18481             Alan Hayward  <alan.hayward@arm.com>
18482             David Sherwood  <david.sherwood@arm.com>
18483
18484         * cfgloop.h (rtx_iv): Change type of extend_mode and mode to
18485         scalar_int_mode.
18486         (niter_desc): Likewise mode.
18487         (iv_analyze): Add a mode parameter.
18488         (biv_p): Likewise.
18489         (iv_analyze_expr): Pass the mode paraeter before the rtx it describes
18490         and change its type to scalar_int_mode.
18491         * loop-iv.c: Update commentary at head of file.
18492         (iv_constant): Pass the mode paraeter before the rtx it describes
18493         and change its type to scalar_int_mode.  Remove VOIDmode handling.
18494         (iv_subreg): Change the type of the mode parameter to scalar_int_mode.
18495         (iv_extend): Likewise.
18496         (shorten_into_mode): Likewise.
18497         (iv_add): Use scalar_int_mode.
18498         (iv_mult): Likewise.
18499         (iv_shift): Likewise.
18500         (canonicalize_iv_subregs): Likewise.
18501         (get_biv_step_1): Pass the outer_mode parameter before the rtx
18502         it describes and change its mode to scalar_int_mode.   Also change
18503         the type of the returned inner_mode to scalar_int_mode.
18504         (get_biv_step): Likewise, turning outer_mode from a pointer
18505         into a direct parameter.  Update call to get_biv_step_1.
18506         (iv_analyze_biv): Add an outer_mode parameter.  Update calls to
18507         iv_constant and get_biv_step.
18508         (iv_analyze_expr): Pass the mode parameter before the rtx it describes
18509         and change its type to scalar_int_mode.  Don't initialise iv->mode
18510         to VOIDmode and remove later checks for its still being VOIDmode.
18511         Update calls to iv_analyze_op and iv_analyze_expr.  Check
18512         is_a <scalar_int_mode> when changing the mode under consideration.
18513         (iv_analyze_def): Ignore registers that don't have a scalar_int_mode.
18514         Update call to iv_analyze_expr.
18515         (iv_analyze_op): Add a mode parameter.  Reject subregs whose
18516         inner register is not also a scalar_int_mode.  Update call to
18517         iv_analyze_biv.
18518         (iv_analyze): Add a mode parameter.  Update call to iv_analyze_op.
18519         (biv_p): Add a mode parameter.  Update call to iv_analyze_biv.
18520         (iv_number_of_iterations): Use is_a <scalar_int_mode> instead of
18521         separate mode class checks.  Update calls to iv_analyze.  Remove
18522         fix-up of VOIDmodes after iv_analyze_biv.
18523         * loop-unroll.c (analyze_iv_to_split_insn): Reject registers that
18524         don't have a scalar_int_mode.  Update call to biv_p.
18525
18526 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18527             Alan Hayward  <alan.hayward@arm.com>
18528             David Sherwood  <david.sherwood@arm.com>
18529
18530         * cfgexpand.c (convert_debug_memory_address): Use
18531         as_a <scalar_int_mode>.
18532         * combine.c (expand_compound_operation): Likewise.
18533         (make_extraction): Likewise.
18534         (change_zero_ext): Likewise.
18535         (simplify_comparison): Likewise.
18536         * cse.c (cse_insn): Likewise.
18537         * dwarf2out.c (minmax_loc_descriptor): Likewise.
18538         (mem_loc_descriptor): Likewise.
18539         (loc_descriptor): Likewise.
18540         * expmed.c (init_expmed_one_mode): Likewise.
18541         (synth_mult): Likewise.
18542         (emit_store_flag_1): Likewise.
18543         (expand_divmod): Likewise.  Use HWI_COMPUTABLE_MODE_P instead
18544         of a comparison with size.
18545         * expr.c (expand_assignment): Use as_a <scalar_int_mode>.
18546         (reduce_to_bit_field_precision): Likewise.
18547         * function.c (expand_function_end): Likewise.
18548         * internal-fn.c (expand_arith_overflow_result_store): Likewise.
18549         * loop-doloop.c (doloop_modify): Likewise.
18550         * optabs.c (expand_binop): Likewise.
18551         (expand_unop): Likewise.
18552         (expand_copysign_absneg): Likewise.
18553         (prepare_cmp_insn): Likewise.
18554         (maybe_legitimize_operand): Likewise.
18555         * recog.c (const_scalar_int_operand): Likewise.
18556         * rtlanal.c (get_address_mode): Likewise.
18557         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18558         (simplify_cond_clz_ctz): Likewise.
18559         * tree-nested.c (get_nl_goto_field): Likewise.
18560         * tree.c (build_vector_type_for_mode): Likewise.
18561         * var-tracking.c (use_narrower_mode): Likewise.
18562
18563 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18564             Alan Hayward  <alan.hayward@arm.com>
18565             David Sherwood  <david.sherwood@arm.com>
18566
18567         * tree.h (SCALAR_INT_TYPE_MODE): New macro.
18568         * builtins.c (expand_builtin_signbit): Use it.
18569         * cfgexpand.c (expand_debug_expr): Likewise.
18570         * dojump.c (do_jump): Likewise.
18571         (do_compare_and_jump): Likewise.
18572         * dwarf2cfi.c (expand_builtin_init_dwarf_reg_sizes): Likewise.
18573         * expmed.c (make_tree): Likewise.
18574         * expr.c (expand_expr_real_2): Likewise.
18575         (expand_expr_real_1): Likewise.
18576         (try_casesi): Likewise.
18577         * fold-const-call.c (fold_const_call_ss): Likewise.
18578         * fold-const.c (unextend): Likewise.
18579         (extract_muldiv_1): Likewise.
18580         (fold_single_bit_test): Likewise.
18581         (native_encode_int): Likewise.
18582         (native_encode_string): Likewise.
18583         (native_interpret_int): Likewise.
18584         * gimple-fold.c (gimple_fold_builtin_memset): Likewise.
18585         * internal-fn.c (expand_addsub_overflow): Likewise.
18586         (expand_neg_overflow): Likewise.
18587         (expand_mul_overflow): Likewise.
18588         (expand_arith_overflow): Likewise.
18589         * match.pd: Likewise.
18590         * stor-layout.c (layout_type): Likewise.
18591         * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
18592         * tree-ssa-math-opts.c (convert_mult_to_widen): Likewise.
18593         * tree-ssanames.c (get_range_info): Likewise.
18594         * tree-switch-conversion.c (array_value_type) Likewise.
18595         * tree-vect-patterns.c (vect_recog_rotate_pattern): Likewise.
18596         (vect_recog_divmod_pattern): Likewise.
18597         (vect_recog_mixed_size_cond_pattern): Likewise.
18598         * tree-vrp.c (extract_range_basic): Likewise.
18599         (simplify_float_conversion_using_ranges): Likewise.
18600         * tree.c (int_fits_type_p): Likewise.
18601         * ubsan.c (instrument_bool_enum_load): Likewise.
18602         * varasm.c (mergeable_string_section): Likewise.
18603         (narrowing_initializer_constant_valid_p): Likewise.
18604         (output_constant): Likewise.
18605
18606 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18607             Alan Hayward  <alan.hayward@arm.com>
18608             David Sherwood  <david.sherwood@arm.com>
18609
18610         * machmode.h (NARROWEST_INT_MODE): New macro.
18611         * expr.c (alignment_for_piecewise_move): Use it instead of
18612         GET_CLASS_NARROWEST_MODE (MODE_INT).
18613         (push_block): Likewise.
18614         * stor-layout.c (bit_field_mode_iterator::bit_field_mode_iterator):
18615         Likewise.
18616         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
18617
18618 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18619             Alan Hayward  <alan.hayward@arm.com>
18620             David Sherwood  <david.sherwood@arm.com>
18621
18622         * postreload.c (move2add_valid_value_p): Change the type of the
18623         mode parameter to scalar_int_mode.
18624         (move2add_use_add2_insn): Add a mode parameter and use it instead
18625         of GET_MODE (reg).
18626         (move2add_use_add3_insn): Likewise.
18627         (reload_cse_move2add): Update accordingly.
18628
18629 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18630             Alan Hayward  <alan.hayward@arm.com>
18631             David Sherwood  <david.sherwood@arm.com>
18632
18633         * expr.c (expand_expr_real_2): Use scalar_int_mode for the
18634         double-word mode.
18635         * lower-subreg.c (resolve_shift_zext): Use is_a <scalar_int_mode>.
18636         * optabs.c (expand_unop): Likewise.
18637
18638 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18639             Alan Hayward  <alan.hayward@arm.com>
18640             David Sherwood  <david.sherwood@arm.com>
18641
18642         * dwarf2out.c (typed_binop): Change mode parameter to scalar_int_mode.
18643         (clz_loc_descriptor): Likewise.  Remove SCALAR_INT_MODE_P check.
18644         (popcount_loc_descriptor): Likewise.
18645         (bswap_loc_descriptor): Likewise.
18646         (rotate_loc_descriptor): Likewise.
18647         (mem_loc_descriptor): Add is_a <scalar_int_mode> checks before
18648         calling the functions above.
18649
18650 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18651             Alan Hayward  <alan.hayward@arm.com>
18652             David Sherwood  <david.sherwood@arm.com>
18653
18654         * combine.c (sign_extend_short_imm): Add is_a <scalar_int_mode>
18655         checks.
18656         (try_combine): Likewise.
18657         (simplify_if_then_else): Likewise.
18658         * cse.c (cse_insn): Likewise.
18659         * dwarf2out.c (mem_loc_descriptor): Likewise.
18660         * emit-rtl.c (gen_lowpart_common): Likewise.
18661         * simplify-rtx.c (simplify_truncation): Likewise.
18662         (simplify_binary_operation_1): Likewise.
18663         (simplify_const_relational_operation): Likewise.
18664         (simplify_ternary_operation): Likewise.
18665         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Likewise.
18666
18667 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18668             Alan Hayward  <alan.hayward@arm.com>
18669             David Sherwood  <david.sherwood@arm.com>
18670
18671         * cse.c (cse_insn): Add is_a <scalar_int_mode> checks.
18672         * reload.c (push_reload): Likewise.
18673         (find_reloads): Likewise.
18674
18675 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18676             Alan Hayward  <alan.hayward@arm.com>
18677             David Sherwood  <david.sherwood@arm.com>
18678
18679         * combine.c (find_split_point): Add is_a <scalar_int_mode> checks.
18680         (make_compound_operation_int): Likewise.
18681         (change_zero_ext): Likewise.
18682         * expr.c (convert_move): Likewise.
18683         (convert_modes): Likewise.
18684         * fwprop.c (forward_propagate_subreg): Likewise.
18685         * loop-iv.c (get_biv_step_1): Likewise.
18686         * optabs.c (widen_operand): Likewise.
18687         * postreload.c (move2add_valid_value_p): Likewise.
18688         * recog.c (simplify_while_replacing): Likewise.
18689         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18690         (simplify_binary_operation_1): Likewise.  Remove redundant
18691         mode equality check.
18692
18693 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18694             Alan Hayward  <alan.hayward@arm.com>
18695             David Sherwood  <david.sherwood@arm.com>
18696
18697         * combine.c (combine_simplify_rtx): Add checks for
18698         is_a <scalar_int_mode>.
18699         (simplify_if_then_else): Likewise.
18700         (make_field_assignment): Likewise.
18701         (simplify_comparison): Likewise.
18702         * ifcvt.c (noce_try_bitop): Likewise.
18703         * loop-invariant.c (canonicalize_address_mult): Likewise.
18704         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18705
18706 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18707             Alan Hayward  <alan.hayward@arm.com>
18708             David Sherwood  <david.sherwood@arm.com>
18709
18710         * gimple-fold.c (gimple_fold_builtin_memory_op): Use
18711         is_a <scalar_int_mode> instead of != BLKmode.
18712
18713 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18714             Alan Hayward  <alan.hayward@arm.com>
18715             David Sherwood  <david.sherwood@arm.com>
18716
18717         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>
18718         instead of != VOIDmode.
18719         * combine.c (if_then_else_cond): Likewise.
18720         (change_zero_ext): Likewise.
18721         * dwarf2out.c (mem_loc_descriptor): Likewise.
18722         (loc_descriptor): Likewise.
18723         * rtlanal.c (canonicalize_condition): Likewise.
18724         * simplify-rtx.c (simplify_relational_operation_1): Likewise.
18725
18726 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18727             Alan Hayward  <alan.hayward@arm.com>
18728             David Sherwood  <david.sherwood@arm.com>
18729
18730         * simplify-rtx.c (simplify_binary_operation_1): Use
18731         is_a <scalar_int_mode> instead of !VECTOR_MODE_P.
18732
18733 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18734             Alan Hayward  <alan.hayward@arm.com>
18735             David Sherwood  <david.sherwood@arm.com>
18736
18737         * wide-int.h (int_traits<unsigned char>) New class.
18738         (int_traits<unsigned short>) Likewise.
18739         * cfgexpand.c (expand_debug_expr): Use is_a <scalar_int_mode>.
18740         Use GET_MODE_UNIT_PRECISION and remove redundant test for
18741         SCALAR_INT_MODE_P.
18742         * combine.c (set_nonzero_bits_and_sign_copies): Use
18743         is_a <scalar_int_mode>.
18744         (find_split_point): Likewise.
18745         (combine_simplify_rtx): Likewise.
18746         (simplify_logical): Likewise.
18747         (expand_compound_operation): Likewise.
18748         (expand_field_assignment): Likewise.
18749         (make_compound_operation): Likewise.
18750         (extended_count): Likewise.
18751         (change_zero_ext): Likewise.
18752         (simplify_comparison): Likewise.
18753         * dwarf2out.c (scompare_loc_descriptor): Likewise.
18754         (ucompare_loc_descriptor): Likewise.
18755         (minmax_loc_descriptor): Likewise.
18756         (mem_loc_descriptor): Likewise.
18757         (loc_descriptor): Likewise.
18758         * expmed.c (init_expmed_one_mode): Likewise.
18759         * lra-constraints.c (lra_constraint_offset): Likewise.
18760         * optabs.c (prepare_libcall_arg): Likewise.
18761         * postreload.c (move2add_note_store): Likewise.
18762         * reload.c (operands_match_p): Likewise.
18763         * rtl.h (load_extend_op): Likewise.
18764         * rtlhooks.c (gen_lowpart_general): Likewise.
18765         * simplify-rtx.c (simplify_truncation): Likewise.
18766         (simplify_unary_operation_1): Likewise.
18767         (simplify_binary_operation_1): Likewise.
18768         (simplify_const_binary_operation): Likewise.
18769         (simplify_const_relational_operation): Likewise.
18770         (simplify_subreg): Likewise.
18771         * stor-layout.c (bitwise_mode_for_mode): Likewise.
18772         * var-tracking.c (adjust_mems): Likewise.
18773         (prepare_call_arguments): Likewise.
18774
18775 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18776             Alan Hayward  <alan.hayward@arm.com>
18777             David Sherwood  <david.sherwood@arm.com>
18778
18779         * machmode.h (is_int_mode): New fuction.
18780         * combine.c (find_split_point): Use it.
18781         (combine_simplify_rtx): Likewise.
18782         (simplify_if_then_else): Likewise.
18783         (simplify_set): Likewise.
18784         (simplify_shift_const_1): Likewise.
18785         (simplify_comparison): Likewise.
18786         * config/aarch64/aarch64.c (aarch64_rtx_costs): Likewise.
18787         * cse.c (notreg_cost): Likewise.
18788         (cse_insn): Likewise.
18789         * cselib.c (cselib_lookup_1): Likewise.
18790         * dojump.c (do_jump_1): Likewise.
18791         (do_compare_rtx_and_jump): Likewise.
18792         * dse.c (get_call_args): Likewise.
18793         * dwarf2out.c (rtl_for_decl_init): Likewise.
18794         (native_encode_initializer): Likewise.
18795         * expmed.c (emit_store_flag_1): Likewise.
18796         (emit_store_flag): Likewise.
18797         * expr.c (convert_modes): Likewise.
18798         (store_field): Likewise.
18799         (expand_expr_real_1): Likewise.
18800         * fold-const.c (fold_read_from_constant_string): Likewise.
18801         * gimple-ssa-sprintf.c (get_format_string): Likewise.
18802         * optabs-libfuncs.c (gen_int_libfunc): Likewise.
18803         * optabs.c (expand_binop): Likewise.
18804         (expand_unop): Likewise.
18805         (expand_abs_nojump): Likewise.
18806         (expand_one_cmpl_abs_nojump): Likewise.
18807         * simplify-rtx.c (mode_signbit_p): Likewise.
18808         (val_signbit_p): Likewise.
18809         (val_signbit_known_set_p): Likewise.
18810         (val_signbit_known_clear_p): Likewise.
18811         (simplify_relational_operation_1): Likewise.
18812         * tree.c (vector_type_mode): Likewise.
18813
18814 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18815             Alan Hayward  <alan.hayward@arm.com>
18816             David Sherwood  <david.sherwood@arm.com>
18817
18818         * machmode.h (smallest_mode_for_size): Fix formatting.
18819         (smallest_int_mode_for_size): New function.
18820         * cfgexpand.c (expand_debug_expr): Use smallest_int_mode_for_size
18821         instead of smallest_mode_for_size.
18822         * combine.c (make_extraction): Likewise.
18823         * config/arc/arc.c (arc_expand_movmem): Likewise.
18824         * config/arm/arm.c (arm_expand_divmod_libfunc): Likewise.
18825         * config/i386/i386.c (ix86_get_mask_mode): Likewise.
18826         * config/s390/s390.c (s390_expand_insv): Likewise.
18827         * config/sparc/sparc.c (assign_int_registers): Likewise.
18828         * config/spu/spu.c (spu_function_value): Likewise.
18829         (spu_function_arg): Likewise.
18830         * coverage.c (get_gcov_type): Likewise.
18831         (get_gcov_unsigned_t): Likewise.
18832         * dse.c (find_shift_sequence): Likewise.
18833         * expmed.c (store_bit_field_1): Likewise.
18834         * expr.c (convert_move): Likewise.
18835         (store_field): Likewise.
18836         * internal-fn.c (expand_arith_overflow): Likewise.
18837         * optabs-query.c (get_best_extraction_insn): Likewise.
18838         * optabs.c (expand_twoval_binop_libfunc): Likewise.
18839         * stor-layout.c (layout_type): Likewise.
18840         (initialize_sizetypes): Likewise.
18841         * targhooks.c (default_get_mask_mode): Likewise.
18842         * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Likewise.
18843
18844 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18845             Alan Hayward  <alan.hayward@arm.com>
18846             David Sherwood  <david.sherwood@arm.com>
18847
18848         * machmode.h (opt_mode::else_blk): New function.
18849         (int_mode_for_mode): Declare.
18850         * stor-layout.c (int_mode_for_mode): Return an opt_scalar_int_mode.
18851         * builtins.c (expand_builtin_signbit): Adjust for new int_mode_for_mode
18852         return type.
18853         * cfgexpand.c (expand_debug_expr): Likewise.
18854         * combine.c (gen_lowpart_or_truncate): Likewise.
18855         (gen_lowpart_for_combine): Likewise.
18856         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Likewise.
18857         * config/avr/avr.c (avr_to_int_mode): Likewise.
18858         (avr_out_plus_1): Likewise.
18859         (avr_out_plus): Likewise.
18860         (avr_out_round): Likewise.
18861         * config/i386/i386.c (ix86_split_to_parts): Likewise.
18862         * config/s390/s390.c (s390_expand_vec_compare_cc): Likewise.
18863         (s390_expand_vcond): Likewise.
18864         * config/spu/spu.c (spu_split_immediate): Likewise.
18865         (spu_expand_mov): Likewise.
18866         * dse.c (get_stored_val): Likewise.
18867         * expmed.c (store_bit_field_1): Likewise.
18868         (convert_extracted_bit_field): Use int_mode_for_mode instead of
18869         int_mode_for_size.
18870         (extract_bit_field_1): Adjust for new int_mode_for_mode return type.
18871         (extract_low_bits): Likewise.
18872         * expr.c (emit_group_load_1): Likewise.  Separate out the BLKmode
18873         handling rather than repeating the check.
18874         (emit_group_store): Likewise.
18875         (emit_move_via_integer): Adjust for new int_mode_for_mode return type.
18876         * optabs.c (expand_absneg_bit): Likewise.
18877         (expand_copysign_absneg): Likewise.
18878         (expand_copysign_bit): Likewise.
18879         * tree-if-conv.c (ifcvt_can_use_mask_load_store): Likewise.
18880         * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
18881         * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
18882         * var-tracking.c (prepare_call_arguments):  Likewise.
18883         * config/powerpcspe/powerpcspe.c (rs6000_do_expand_vec_perm): Use
18884         int_mode_for_mode instead of mode_for_size.
18885         * config/rs6000/rs6000.c (rs6000_do_expand_vec_perm): Likewise.
18886
18887 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18888             Alan Hayward  <alan.hayward@arm.com>
18889             David Sherwood  <david.sherwood@arm.com>
18890
18891         * machmode.h (int_mode_for_size): New function.
18892         * builtins.c (set_builtin_user_assembler_name): Use int_mode_for_size
18893         instead of mode_for_size.
18894         * calls.c (save_fixed_argument_area): Likewise.  Make use of BLKmode
18895         explicit.
18896         * combine.c (expand_field_assignment): Use int_mode_for_size
18897         instead of mode_for_size.
18898         (make_extraction): Likewise.
18899         (simplify_shift_const_1): Likewise.
18900         (simplify_comparison): Likewise.
18901         * dojump.c (do_jump): Likewise.
18902         * dwarf2out.c (mem_loc_descriptor): Likewise.
18903         * emit-rtl.c (init_derived_machine_modes): Likewise.
18904         * expmed.c (flip_storage_order): Likewise.
18905         (convert_extracted_bit_field): Likewise.
18906         * expr.c (copy_blkmode_from_reg): Likewise.
18907         * graphite-isl-ast-to-gimple.c (max_mode_int_precision): Likewise.
18908         * internal-fn.c (expand_mul_overflow): Likewise.
18909         * lower-subreg.c (simple_move): Likewise.
18910         * optabs-libfuncs.c (init_optabs): Likewise.
18911         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18912         * tree.c (vector_type_mode): Likewise.
18913         * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
18914         * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Likewise.
18915         * tree-vect-generic.c (expand_vector_parallel): Likewise.
18916         * tree-vect-stmts.c (vectorizable_load): Likewise.
18917         (vectorizable_store): Likewise.
18918
18919 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18920             Alan Hayward  <alan.hayward@arm.com>
18921             David Sherwood  <david.sherwood@arm.com>
18922
18923         * coretypes.h (pod_mode): New type.
18924         (scalar_int_mode_pod): New typedef.
18925         * machmode.h (pod_mode): New class.
18926         (int_n_data_t::m): Change type to scalar_int_mode_pod.
18927         * genmodes.c (emit_mode_int_n): Update accordingly.
18928         * lower-subreg.h (target_lower_subreg): Change type to
18929         scalar_int_mode_pod.
18930         * gdbhooks.py (build_pretty_printer): Handle pod_mode and
18931         scalar_int_mode_pod.
18932
18933 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18934             Alan Hayward  <alan.hayward@arm.com>
18935             David Sherwood  <david.sherwood@arm.com>
18936
18937         * config/powerpcspe/powerpcspe.h (rs6000_pmode): Change type from
18938         machine_mode to scalar_int_mode.
18939         * config/powerpcspe/powerpcspe.c (rs6000_pmode): Likewise.
18940         (rs6000_option_override_internal): Remove cast to int.
18941         * config/rs6000/rs6000.h (rs6000_pmode): Change type from
18942         machine_mode to scalar_int_mode.
18943         * config/rs6000/rs6000.c (rs6000_pmode): Likewise.
18944         (rs6000_option_override_internal): Remove cast to int.
18945         * config/s390/s390.h (Pmode): Remove cast to machine_mode.
18946         * config/epiphany/epiphany.h (RTX_OK_FOR_OFFSET_P): Add cast
18947         to machine_mode.
18948         * config/s390/s390.c (s390_expand_builtin): Likewise.
18949         * coretypes.h (scalar_int_mode): New type.
18950         (opt_scalar_int_mode): New typedef.
18951         * machmode.h (scalar_int_mode): New class.
18952         (scalar_int_mode::includes_p): New function.
18953         (byte_mode): Change type to scalar_int_mode.
18954         (word_mode): Likewise.
18955         (ptr_mode): Likewise.
18956         * emit-rtl.c (byte_mode): Likewise.
18957         (word_mode): Likewise.
18958         (ptr_mode): Likewise.
18959         (init_derived_machine_modes): Update accordingly.
18960         * genmodes.c (get_mode_class): Return scalar_int_mode for MODE_INT
18961         and MODE_PARTIAL_INT.
18962         * gdbhooks.py (build_pretty_printer): Handle scalar_int_mode and
18963         opt_scalar_int_mode.
18964
18965 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18966             Alan Hayward  <alan.hayward@arm.com>
18967             David Sherwood  <david.sherwood@arm.com>
18968
18969         * target.def (libgcc_floating_mode_supported_p): Take a
18970         scalar_float_mode.
18971         * doc/tm.texi: Regenerate.
18972         * targhooks.h (default_libgcc_floating_mode_supported_p): Take a
18973         scalar_float_mode.
18974         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
18975         * config/aarch64/aarch64.c (aarch64_libgcc_floating_mode_supported_p):
18976         Likewise.
18977
18978 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18979             Alan Hayward  <alan.hayward@arm.com>
18980             David Sherwood  <david.sherwood@arm.com>
18981
18982         * target.def (default_floatn_mode): Return an opt_scalar_float_mode.
18983         * doc/tm.texi: Regenerate.
18984         * config/arm/arm.c (arm_floatn_mode): Return an opt_scalar_float_mode.
18985         * config/powerpcspe/powerpcspe.c (rs6000_floatn_mode): Likewise.
18986         * config/rs6000/rs6000.c (rs6000_floatn_mode): Likewise.
18987         * targhooks.h (default_floatn_mode): Likewise.
18988         * targhooks.c (default_floatn_mode): Likewise.
18989         * tree.c (build_common_tree_nodes): Update accordingly.
18990
18991 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
18992             Alan Hayward  <alan.hayward@arm.com>
18993             David Sherwood  <david.sherwood@arm.com>
18994
18995         * machmode.h (mode_iterator::start): Provide overload for opt_modes.
18996         (mode_iterator::iterate_p): Likewise.
18997         (mode_iterator::get_wider): Likewise.
18998         * expr.c (init_expr_target): Use opt_scalar_float_mode.
18999
19000 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
19001             Alan Hayward  <alan.hayward@arm.com>
19002             David Sherwood  <david.sherwood@arm.com>
19003
19004         * coretypes.h (opt_scalar_float_mode): New typedef.
19005         * machmode.h (float_mode_for_size): New function.
19006         * emit-rtl.c (double_mode): Delete.
19007         (init_emit_once): Use float_mode_for_size.
19008         * stor-layout.c (layout_type): Likewise.
19009         * gdbhooks.py (build_pretty_printer): Handle opt_scalar_float_mode.
19010
19011 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
19012             Alan Hayward  <alan.hayward@arm.com>
19013             David Sherwood  <david.sherwood@arm.com>
19014
19015         * output.h (assemble_real): Take a scalar_float_mode.
19016         * config/arm/arm.c (arm_assemble_integer): Update accordingly.
19017         * config/arm/arm.md (consttable_4): Likewise.
19018         (consttable_8): Likewise.
19019         (consttable_16): Likewise.
19020         * config/mips/mips.md (consttable_float): Likewise.
19021         * config/s390/s390.c (s390_output_pool_entry): Likewise.
19022         * varasm.c (assemble_real): Take a scalar_float_mode.
19023         (output_constant_pool_2): Update accordingly.
19024         (output_constant): Likewise.
19025
19026 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
19027             Alan Hayward  <alan.hayward@arm.com>
19028             David Sherwood  <david.sherwood@arm.com>
19029
19030         * tree.h (SCALAR_FLOAT_TYPE_MODE): New macro.
19031         * builtins.c (expand_builtin_signbit): Use it instead of TYPE_MODE.
19032         * fold-const.c (fold_convert_const_real_from_fixed): Likewise.
19033         (native_encode_real): Likewise.
19034         (native_interpret_real): Likewise.
19035         * hsa-brig.c (emit_immediate_scalar_to_buffer): Likewise.
19036         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
19037
19038 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
19039             Alan Hayward  <alan.hayward@arm.com>
19040             David Sherwood  <david.sherwood@arm.com>
19041
19042         * optabs-libfuncs.c (gen_trunc_conv_libfunc): Use is_a
19043         <scalar_float_mode>.  Simplify.
19044         (gen_extend_conv_libfunc): Likewise.
19045
19046 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
19047             Alan Hayward  <alan.hayward@arm.com>
19048             David Sherwood  <david.sherwood@arm.com>
19049
19050         * coretypes.h (scalar_float_mode): New type.
19051         * machmode.h (mode_traits::from_int): Use machine_mode if
19052         USE_ENUM_MODES is defined.
19053         (is_a): New function.
19054         (as_a): Likewise.
19055         (dyn_cast): Likewise.
19056         (scalar_float_mode): New class.
19057         (scalar_float_mode::includes_p): New function.
19058         (is_float_mode): Likewise.
19059         * gdbhooks.py (MachineModePrinter): New class.
19060         (build_pretty_printer): Use it for scalar_float_mode.
19061         * real.h (FLOAT_MODE_FORMAT): Use as_a <scalar_float_mode>.
19062         (format_helper::format_helper): Turn into a template.
19063         * genmodes.c (get_mode_class): New function.
19064         (emit_insn_modes_h): Give modes the class returned by get_mode_class,
19065         or machine_mode if none.
19066         * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Use
19067         as_a <scalar_float_mode>.
19068         * dwarf2out.c (mem_loc_descriptor): Likewise.
19069         (insert_float): Likewise.
19070         (add_const_value_attribute): Likewise.
19071         * simplify-rtx.c (simplify_immed_subreg): Likewise.
19072         * optabs.c (expand_absneg_bit): Take a scalar_float_mode.
19073         (expand_unop): Update accordingly.
19074         (expand_abs_nojump): Likewise.
19075         (expand_copysign_absneg): Take a scalar_float_mode.
19076         (expand_copysign_bit): Likewise.
19077         (expand_copysign): Update accordingly.
19078
19079 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
19080             Alan Hayward  <alan.hayward@arm.com>
19081             David Sherwood  <david.sherwood@arm.com>
19082
19083         * coretypes.h (opt_mode): New class.
19084         * machmode.h (opt_mode): Likewise.
19085         (opt_mode::else_void): New function.
19086         (opt_mode::require): Likewise.
19087         (opt_mode::exists): Likewise.
19088         (GET_MODE_WIDER_MODE): Turn into a function and return an opt_mode.
19089         (GET_MODE_2XWIDER_MODE): Likewise.
19090         (mode_iterator::get_wider): Update accordingly.
19091         (mode_iterator::get_2xwider): Likewise.
19092         (mode_iterator::get_known_wider): Likewise, turning into a template.
19093         * combine.c (make_extraction): Update use of GET_MODE_WIDER_MODE,
19094         forcing a wider mode to exist.
19095         * config/cr16/cr16.h (LONG_REG_P): Likewise.
19096         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
19097         * config/c6x/c6x.c (c6x_rtx_costs): Update use of
19098         GET_MODE_2XWIDER_MODE, forcing a wider mode to exist.
19099         * lower-subreg.c (init_lower_subreg): Likewise.
19100         * optabs-libfuncs.c (init_sync_libfuncs_1): Likewise, but not
19101         on the final iteration.
19102         * config/i386/i386.c (ix86_expand_set_or_movmem): Check whether
19103         a wider mode exists before asking for a move pattern.
19104         (get_mode_wider_vector): Update use of GET_MODE_WIDER_MODE,
19105         forcing a wider mode to exist.
19106         (expand_vselect_vconcat): Update use of GET_MODE_2XWIDER_MODE,
19107         returning false if no such mode exists.
19108         * config/ia64/ia64.c (expand_vselect_vconcat): Likewise.
19109         * config/mips/mips.c (mips_expand_vselect_vconcat): Likewise.
19110         * expmed.c (init_expmed_one_mode): Update use of GET_MODE_WIDER_MODE.
19111         Avoid checking for a MODE_INT if we already know the mode is not a
19112         SCALAR_INT_MODE_P.
19113         (extract_high_half): Update use of GET_MODE_WIDER_MODE,
19114         forcing a wider mode to exist.
19115         (expmed_mult_highpart_optab): Likewise.
19116         (expmed_mult_highpart): Likewise.
19117         * expr.c (expand_expr_real_2): Update use of GET_MODE_WIDER_MODE,
19118         using else_void.
19119         * lto-streamer-in.c (lto_input_mode_table): Likewise.
19120         * optabs-query.c (find_widening_optab_handler_and_mode): Likewise.
19121         * stor-layout.c (bit_field_mode_iterator::next_mode): Likewise.
19122         * internal-fn.c (expand_mul_overflow): Update use of
19123         GET_MODE_2XWIDER_MODE.
19124         * omp-low.c (omp_clause_aligned_alignment): Likewise.
19125         * tree-ssa-math-opts.c (convert_mult_to_widen): Update use of
19126         GET_MODE_WIDER_MODE.
19127         (convert_plusminus_to_widen): Likewise.
19128         * tree-switch-conversion.c (array_value_type): Likewise.
19129         * var-tracking.c (emit_note_insn_var_location): Likewise.
19130         * tree-vrp.c (simplify_float_conversion_using_ranges): Likewise.
19131         Return false inside rather than outside the loop if no wider mode
19132         exists
19133         * optabs.c (expand_binop): Update use of GET_MODE_WIDER_MODE
19134         and GET_MODE_2XWIDER_MODE
19135         (can_compare_p): Use else_void.
19136         * gdbhooks.py (OptMachineModePrinter): New class.
19137         (build_pretty_printer): Use it for opt_mode.
19138
19139 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
19140             Alan Hayward  <alan.hayward@arm.com>
19141             David Sherwood  <david.sherwood@arm.com>
19142
19143         * tree-switch-conversion.c (array_value_type): Only read TYPE_MODE
19144         once.  Use get_narrowest_mode instead of GET_CLASS_NARROWEST_MODE.
19145
19146 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
19147             Alan Hayward  <alan.hayward@arm.com>
19148             David Sherwood  <david.sherwood@arm.com>
19149
19150         * machmode.h (mode_traits): New structure.
19151         (get_narrowest_mode): New function.
19152         (mode_iterator::start): Likewise.
19153         (mode_iterator::iterate_p): Likewise.
19154         (mode_iterator::get_wider): Likewise.
19155         (mode_iterator::get_known_wider): Likewise.
19156         (mode_iterator::get_2xwider): Likewise.
19157         (FOR_EACH_MODE_IN_CLASS): New mode iterator.
19158         (FOR_EACH_MODE): Likewise.
19159         (FOR_EACH_MODE_FROM): Likewise.
19160         (FOR_EACH_MODE_UNTIL): Likewise.
19161         (FOR_EACH_WIDER_MODE): Likewise.
19162         (FOR_EACH_2XWIDER_MODE): Likewise.
19163         * builtins.c (expand_builtin_strlen): Use new mode iterators.
19164         * combine.c (simplify_comparison): Likewise
19165         * config/i386/i386.c (type_natural_mode): Likewise.
19166         * cse.c (cse_insn): Likewise.
19167         * dse.c (find_shift_sequence): Likewise.
19168         * emit-rtl.c (init_derived_machine_modes): Likewise.
19169         (init_emit_once): Likewise.
19170         * explow.c (hard_function_value): Likewise.
19171         * expmed.c (extract_fixed_bit_field_1): Likewise.
19172         (extract_bit_field_1): Likewise.
19173         (expand_divmod): Likewise.
19174         (emit_store_flag_1): Likewise.
19175         * expr.c (init_expr_target): Likewise.
19176         (convert_move): Likewise.
19177         (alignment_for_piecewise_move): Likewise.
19178         (widest_int_mode_for_size): Likewise.
19179         (emit_block_move_via_movmem): Likewise.
19180         (copy_blkmode_to_reg): Likewise.
19181         (set_storage_via_setmem): Likewise.
19182         (compress_float_constant): Likewise.
19183         * omp-low.c (omp_clause_aligned_alignment): Likewise.
19184         * optabs-query.c (get_best_extraction_insn): Likewise.
19185         * optabs.c (expand_binop): Likewise.
19186         (expand_twoval_unop): Likewise.
19187         (expand_twoval_binop): Likewise.
19188         (widen_leading): Likewise.
19189         (widen_bswap): Likewise.
19190         (expand_parity): Likewise.
19191         (expand_unop): Likewise.
19192         (prepare_cmp_insn): Likewise.
19193         (prepare_float_lib_cmp): Likewise.
19194         (expand_float): Likewise.
19195         (expand_fix): Likewise.
19196         (expand_sfix_optab): Likewise.
19197         * postreload.c (move2add_use_add2_insn): Likewise.
19198         * reg-stack.c (reg_to_stack): Likewise.
19199         * reginfo.c (choose_hard_reg_mode): Likewise.
19200         * rtlanal.c (init_num_sign_bit_copies_in_rep): Likewise.
19201         * stor-layout.c (mode_for_size): Likewise.
19202         (smallest_mode_for_size): Likewise.
19203         (mode_for_vector): Likewise.
19204         (finish_bitfield_representative): Likewise.
19205         * tree-ssa-math-opts.c (target_supports_divmod_p): Likewise.
19206         * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
19207         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
19208         * var-tracking.c (prepare_call_arguments): Likewise.
19209
19210 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
19211             Alan Hayward  <alan.hayward@arm.com>
19212             David Sherwood  <david.sherwood@arm.com>
19213
19214         * genconditions.c (write_header): Add a "#define USE_ENUM_MODES".
19215         * genmodes.c (emit_insn_modes_h): Define FOOmode to E_FOOmode if
19216         USE_ENUM_MODES is defined and to ((void) 0, E_FOOmode) otherwise.
19217         * machmode.h (mode_size): Move earlier in file.
19218         (mode_precision): Likewise.
19219         (mode_inner): Likewise.
19220         (mode_nunits): Likewise.
19221         (mode_unit_size): Likewise.
19222         (unit_unit_precision): Likewise.
19223         (mode_wider): Likewise.
19224         (mode_2xwider): Likewise.
19225         (machine_mode): New class.
19226         (mode_to_bytes): New function.
19227         (mode_to_bits): Likewise.
19228         (mode_to_precision): Likewise.
19229         (mode_to_inner): Likewise.
19230         (mode_to_unit_size): Likewise.
19231         (mode_to_unit_precision): Likewise.
19232         (mode_to_nunits): Likewise.
19233         (GET_MODE_SIZE): Use mode_to_bytes.
19234         (GET_MODE_BITSIZE): Use mode_to_bits.
19235         (GET_MODE_PRECISION): Use mode_to_precision.
19236         (GET_MODE_INNER): Use mode_to_inner.
19237         (GET_MODE_UNIT_SIZE): Use mode_to_unit_size.
19238         (GET_MODE_UNIT_PRECISION): Use mode_to_unit_precision.
19239         (GET_MODE_NUNITS): Use mode_to_nunits.
19240         * system.h (ALWAYS_INLINE): New macro.
19241         * config/powerpcspe/powerpcspe-c.c
19242         (altivec_resolve_overloaded_builtin): Use machine_mode instead of
19243         int for arg1_mode and arg2_mode.
19244
19245 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
19246             Alan Hayward  <alan.hayward@arm.com>
19247             David Sherwood  <david.sherwood@arm.com>
19248
19249         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
19250         Prefix mode names with E_ in case statements.
19251         * config/aarch64/aarch64-elf.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19252         * config/aarch64/aarch64.c (aarch64_split_simd_combine): Likewise.
19253         (aarch64_split_simd_move): Likewise.
19254         (aarch64_gen_storewb_pair): Likewise.
19255         (aarch64_gen_loadwb_pair): Likewise.
19256         (aarch64_gen_store_pair): Likewise.
19257         (aarch64_gen_load_pair): Likewise.
19258         (aarch64_get_condition_code_1): Likewise.
19259         (aarch64_constant_pool_reload_icode): Likewise.
19260         (get_rsqrte_type): Likewise.
19261         (get_rsqrts_type): Likewise.
19262         (get_recpe_type): Likewise.
19263         (get_recps_type): Likewise.
19264         (aarch64_gimplify_va_arg_expr): Likewise.
19265         (aarch64_simd_container_mode): Likewise.
19266         (aarch64_emit_load_exclusive): Likewise.
19267         (aarch64_emit_store_exclusive): Likewise.
19268         (aarch64_expand_compare_and_swap): Likewise.
19269         (aarch64_gen_atomic_cas): Likewise.
19270         (aarch64_emit_bic): Likewise.
19271         (aarch64_emit_atomic_swap): Likewise.
19272         (aarch64_emit_atomic_load_op): Likewise.
19273         (aarch64_evpc_trn): Likewise.
19274         (aarch64_evpc_uzp): Likewise.
19275         (aarch64_evpc_zip): Likewise.
19276         (aarch64_evpc_ext): Likewise.
19277         (aarch64_evpc_rev): Likewise.
19278         (aarch64_evpc_dup): Likewise.
19279         (aarch64_gen_ccmp_first): Likewise.
19280         (aarch64_gen_ccmp_next): Likewise.
19281         * config/alpha/alpha.c (alpha_scalar_mode_supported_p): Likewise.
19282         (alpha_emit_xfloating_libcall): Likewise.
19283         (emit_insxl): Likewise.
19284         (alpha_arg_type): Likewise.
19285         * config/arc/arc.c (arc_vector_mode_supported_p): Likewise.
19286         (arc_preferred_simd_mode): Likewise.
19287         (arc_secondary_reload): Likewise.
19288         (get_arc_condition_code): Likewise.
19289         (arc_print_operand): Likewise.
19290         (arc_legitimate_constant_p): Likewise.
19291         * config/arc/arc.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19292         * config/arc/arc.md (casesi_load): Likewise.
19293         (casesi_compact_jump): Likewise.
19294         * config/arc/predicates.md (proper_comparison_operator): Likewise.
19295         (cc_use_register): Likewise.
19296         * config/arm/aout.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19297         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
19298         (arm_init_iwmmxt_builtins): Likewise.
19299         * config/arm/arm.c (thumb1_size_rtx_costs): Likewise.
19300         (neon_expand_vector_init): Likewise.
19301         (arm_attr_length_move_neon): Likewise.
19302         (maybe_get_arm_condition_code): Likewise.
19303         (arm_emit_vector_const): Likewise.
19304         (arm_preferred_simd_mode): Likewise.
19305         (arm_output_iwmmxt_tinsr): Likewise.
19306         (thumb1_output_casesi): Likewise.
19307         (thumb2_output_casesi): Likewise.
19308         (arm_emit_load_exclusive): Likewise.
19309         (arm_emit_store_exclusive): Likewise.
19310         (arm_expand_compare_and_swap): Likewise.
19311         (arm_evpc_neon_vuzp): Likewise.
19312         (arm_evpc_neon_vzip): Likewise.
19313         (arm_evpc_neon_vrev): Likewise.
19314         (arm_evpc_neon_vtrn): Likewise.
19315         (arm_evpc_neon_vext): Likewise.
19316         (arm_validize_comparison): Likewise.
19317         * config/arm/neon.md (neon_vc<cmp_op><mode>): Likewise.
19318         * config/avr/avr-c.c (avr_resolve_overloaded_builtin): Likewise.
19319         * config/avr/avr.c (avr_rtx_costs_1): Likewise.
19320         * config/c6x/c6x.c (c6x_vector_mode_supported_p): Likewise.
19321         (c6x_preferred_simd_mode): Likewise.
19322         * config/epiphany/epiphany.c (get_epiphany_condition_code): Likewise.
19323         (epiphany_rtx_costs): Likewise.
19324         * config/epiphany/predicates.md (proper_comparison_operator):
19325         Likewise.
19326         * config/frv/frv.c (condexec_memory_operand): Likewise.
19327         (frv_emit_move): Likewise.
19328         (output_move_single): Likewise.
19329         (output_condmove_single): Likewise.
19330         (frv_hard_regno_mode_ok): Likewise.
19331         (frv_matching_accg_mode): Likewise.
19332         * config/h8300/h8300.c (split_adds_subs): Likewise.
19333         (h8300_rtx_costs): Likewise.
19334         (h8300_print_operand): Likewise.
19335         (compute_mov_length): Likewise.
19336         (output_logical_op): Likewise.
19337         (compute_logical_op_length): Likewise.
19338         (compute_logical_op_cc): Likewise.
19339         (h8300_shift_needs_scratch_p): Likewise.
19340         (output_a_shift): Likewise.
19341         (compute_a_shift_length): Likewise.
19342         (compute_a_shift_cc): Likewise.
19343         (expand_a_rotate): Likewise.
19344         (output_a_rotate): Likewise.
19345         * config/i386/i386.c (classify_argument): Likewise.
19346         (function_arg_advance_32): Likewise.
19347         (function_arg_32): Likewise.
19348         (function_arg_64): Likewise.
19349         (function_value_64): Likewise.
19350         (ix86_gimplify_va_arg): Likewise.
19351         (ix86_legitimate_constant_p): Likewise.
19352         (put_condition_code): Likewise.
19353         (split_double_mode): Likewise.
19354         (ix86_avx256_split_vector_move_misalign): Likewise.
19355         (ix86_expand_vector_logical_operator): Likewise.
19356         (ix86_split_idivmod): Likewise.
19357         (ix86_expand_adjust_ufix_to_sfix_si): Likewise.
19358         (ix86_build_const_vector): Likewise.
19359         (ix86_build_signbit_mask): Likewise.
19360         (ix86_match_ccmode): Likewise.
19361         (ix86_cc_modes_compatible): Likewise.
19362         (ix86_expand_branch): Likewise.
19363         (ix86_expand_sse_cmp): Likewise.
19364         (ix86_expand_sse_movcc): Likewise.
19365         (ix86_expand_int_sse_cmp): Likewise.
19366         (ix86_expand_vec_perm_vpermi2): Likewise.
19367         (ix86_expand_vec_perm): Likewise.
19368         (ix86_expand_sse_unpack): Likewise.
19369         (ix86_expand_int_addcc): Likewise.
19370         (ix86_split_to_parts): Likewise.
19371         (ix86_vectorize_builtin_gather): Likewise.
19372         (ix86_vectorize_builtin_scatter): Likewise.
19373         (avx_vpermilp_parallel): Likewise.
19374         (inline_memory_move_cost): Likewise.
19375         (ix86_tieable_integer_mode_p): Likewise.
19376         (x86_maybe_negate_const_int): Likewise.
19377         (ix86_expand_vector_init_duplicate): Likewise.
19378         (ix86_expand_vector_init_one_nonzero): Likewise.
19379         (ix86_expand_vector_init_one_var): Likewise.
19380         (ix86_expand_vector_init_concat): Likewise.
19381         (ix86_expand_vector_init_interleave): Likewise.
19382         (ix86_expand_vector_init_general): Likewise.
19383         (ix86_expand_vector_set): Likewise.
19384         (ix86_expand_vector_extract): Likewise.
19385         (emit_reduc_half): Likewise.
19386         (ix86_emit_i387_round): Likewise.
19387         (ix86_mangle_type): Likewise.
19388         (ix86_expand_round_sse4): Likewise.
19389         (expand_vec_perm_blend): Likewise.
19390         (canonicalize_vector_int_perm): Likewise.
19391         (ix86_expand_vec_one_operand_perm_avx512): Likewise.
19392         (expand_vec_perm_1): Likewise.
19393         (expand_vec_perm_interleave3): Likewise.
19394         (expand_vec_perm_even_odd_pack): Likewise.
19395         (expand_vec_perm_even_odd_1): Likewise.
19396         (expand_vec_perm_broadcast_1): Likewise.
19397         (ix86_vectorize_vec_perm_const_ok): Likewise.
19398         (ix86_expand_vecop_qihi): Likewise.
19399         (ix86_expand_mul_widen_hilo): Likewise.
19400         (ix86_expand_sse2_abs): Likewise.
19401         (ix86_expand_pextr): Likewise.
19402         (ix86_expand_pinsr): Likewise.
19403         (ix86_preferred_simd_mode): Likewise.
19404         (ix86_simd_clone_compute_vecsize_and_simdlen): Likewise.
19405         * config/i386/sse.md (*andnot<mode>3): Likewise.
19406         (<mask_codefor><code><mode>3<mask_name>): Likewise.
19407         (*<code><mode>3): Likewise.
19408         * config/ia64/ia64.c (ia64_expand_vecint_compare): Likewise.
19409         (ia64_expand_atomic_op): Likewise.
19410         (ia64_arg_type): Likewise.
19411         (ia64_mode_to_int): Likewise.
19412         (ia64_scalar_mode_supported_p): Likewise.
19413         (ia64_vector_mode_supported_p): Likewise.
19414         (expand_vec_perm_broadcast): Likewise.
19415         * config/iq2000/iq2000.c (iq2000_move_1word): Likewise.
19416         (iq2000_function_arg_advance): Likewise.
19417         (iq2000_function_arg): Likewise.
19418         * config/m32c/m32c.c (m32c_preferred_reload_class): Likewise.
19419         * config/m68k/m68k.c (output_dbcc_and_branch): Likewise.
19420         (m68k_libcall_value): Likewise.
19421         (m68k_function_value): Likewise.
19422         (sched_attr_op_type): Likewise.
19423         * config/mcore/mcore.c (mcore_output_move): Likewise.
19424         * config/microblaze/microblaze.c (microblaze_function_arg_advance):
19425         Likewise.
19426         (microblaze_function_arg): Likewise.
19427         * config/mips/mips.c (mips16_build_call_stub): Likewise.
19428         (mips_print_operand): Likewise.
19429         (mips_mode_ok_for_mov_fmt_p): Likewise.
19430         (mips_vector_mode_supported_p): Likewise.
19431         (mips_preferred_simd_mode): Likewise.
19432         (mips_expand_vpc_loongson_even_odd): Likewise.
19433         (mips_expand_vec_unpack): Likewise.
19434         (mips_expand_vi_broadcast): Likewise.
19435         (mips_expand_vector_init): Likewise.
19436         (mips_expand_vec_reduc): Likewise.
19437         (mips_expand_msa_cmp): Likewise.
19438         * config/mips/mips.md (casesi_internal_mips16_<mode>): Likewise.
19439         * config/mn10300/mn10300.c (mn10300_print_operand): Likewise.
19440         (cc_flags_for_mode): Likewise.
19441         * config/msp430/msp430.c (msp430_print_operand): Likewise.
19442         * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Likewise.
19443         (nds32_output_casesi_pc_relative): Likewise.
19444         * config/nds32/nds32.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19445         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Likewise.
19446         (nvptx_gen_unpack): Likewise.
19447         (nvptx_gen_pack): Likewise.
19448         (nvptx_gen_shuffle): Likewise.
19449         (nvptx_gen_wcast): Likewise.
19450         (nvptx_preferred_simd_mode): Likewise.
19451         * config/pa/pa.c (pa_secondary_reload): Likewise.
19452         * config/pa/predicates.md (base14_operand): Likewise.
19453         * config/powerpcspe/powerpcspe-c.c
19454         (altivec_resolve_overloaded_builtin): Likewise.
19455         * config/powerpcspe/powerpcspe.c (rs6000_setup_reg_addr_masks):
19456         Likewise.
19457         (rs6000_preferred_simd_mode): Likewise.
19458         (output_vec_const_move): Likewise.
19459         (rs6000_expand_vector_extract): Likewise.
19460         (rs6000_split_vec_extract_var): Likewise.
19461         (reg_offset_addressing_ok_p): Likewise.
19462         (rs6000_legitimate_offset_address_p): Likewise.
19463         (rs6000_legitimize_address): Likewise.
19464         (rs6000_emit_set_const): Likewise.
19465         (rs6000_const_vec): Likewise.
19466         (rs6000_emit_move): Likewise.
19467         (spe_build_register_parallel): Likewise.
19468         (rs6000_darwin64_record_arg_recurse): Likewise.
19469         (swap_selector_for_mode): Likewise.
19470         (spe_init_builtins): Likewise.
19471         (paired_init_builtins): Likewise.
19472         (altivec_init_builtins): Likewise.
19473         (do_load_for_compare): Likewise.
19474         (rs6000_generate_compare): Likewise.
19475         (rs6000_expand_float128_convert): Likewise.
19476         (emit_load_locked): Likewise.
19477         (emit_store_conditional): Likewise.
19478         (rs6000_output_function_epilogue): Likewise.
19479         (rs6000_handle_altivec_attribute): Likewise.
19480         (rs6000_function_value): Likewise.
19481         (emit_fusion_gpr_load): Likewise.
19482         (emit_fusion_p9_load): Likewise.
19483         (emit_fusion_p9_store): Likewise.
19484         * config/powerpcspe/predicates.md (easy_fp_constant): Likewise.
19485         (fusion_gpr_mem_load): Likewise.
19486         (fusion_addis_mem_combo_load): Likewise.
19487         (fusion_addis_mem_combo_store): Likewise.
19488         * config/rs6000/predicates.md (easy_fp_constant): Likewise.
19489         (fusion_gpr_mem_load): Likewise.
19490         (fusion_addis_mem_combo_load): Likewise.
19491         (fusion_addis_mem_combo_store): Likewise.
19492         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
19493         Likewise.
19494         * config/rs6000/rs6000-string.c (do_load_for_compare): Likewise.
19495         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
19496         (rs6000_preferred_simd_mode): Likewise.
19497         (output_vec_const_move): Likewise.
19498         (rs6000_expand_vector_extract): Likewise.
19499         (rs6000_split_vec_extract_var): Likewise.
19500         (reg_offset_addressing_ok_p): Likewise.
19501         (rs6000_legitimate_offset_address_p): Likewise.
19502         (rs6000_legitimize_address): Likewise.
19503         (rs6000_emit_set_const): Likewise.
19504         (rs6000_const_vec): Likewise.
19505         (rs6000_emit_move): Likewise.
19506         (rs6000_darwin64_record_arg_recurse): Likewise.
19507         (swap_selector_for_mode): Likewise.
19508         (paired_init_builtins): Likewise.
19509         (altivec_init_builtins): Likewise.
19510         (rs6000_expand_float128_convert): Likewise.
19511         (emit_load_locked): Likewise.
19512         (emit_store_conditional): Likewise.
19513         (rs6000_output_function_epilogue): Likewise.
19514         (rs6000_handle_altivec_attribute): Likewise.
19515         (rs6000_function_value): Likewise.
19516         (emit_fusion_gpr_load): Likewise.
19517         (emit_fusion_p9_load): Likewise.
19518         (emit_fusion_p9_store): Likewise.
19519         * config/rx/rx.c (rx_gen_move_template): Likewise.
19520         (flags_from_mode): Likewise.
19521         * config/s390/predicates.md (s390_alc_comparison): Likewise.
19522         (s390_slb_comparison): Likewise.
19523         * config/s390/s390.c (s390_handle_vectorbool_attribute): Likewise.
19524         (s390_vector_mode_supported_p): Likewise.
19525         (s390_cc_modes_compatible): Likewise.
19526         (s390_match_ccmode_set): Likewise.
19527         (s390_canonicalize_comparison): Likewise.
19528         (s390_emit_compare_and_swap): Likewise.
19529         (s390_branch_condition_mask): Likewise.
19530         (s390_rtx_costs): Likewise.
19531         (s390_secondary_reload): Likewise.
19532         (__SECONDARY_RELOAD_CASE): Likewise.
19533         (s390_expand_cs): Likewise.
19534         (s390_preferred_simd_mode): Likewise.
19535         * config/s390/vx-builtins.md (vec_packsu_u<mode>): Likewise.
19536         * config/sh/sh.c (sh_print_operand): Likewise.
19537         (dump_table): Likewise.
19538         (sh_secondary_reload): Likewise.
19539         * config/sh/sh.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19540         * config/sh/sh.md (casesi_worker_1): Likewise.
19541         (casesi_worker_2): Likewise.
19542         * config/sparc/predicates.md (icc_comparison_operator): Likewise.
19543         (fcc_comparison_operator): Likewise.
19544         * config/sparc/sparc.c (sparc_expand_move): Likewise.
19545         (emit_soft_tfmode_cvt): Likewise.
19546         (sparc_preferred_simd_mode): Likewise.
19547         (output_cbranch): Likewise.
19548         (sparc_print_operand): Likewise.
19549         (sparc_expand_vec_perm_bmask): Likewise.
19550         (vector_init_bshuffle): Likewise.
19551         * config/spu/spu.c (spu_scalar_mode_supported_p): Likewise.
19552         (spu_vector_mode_supported_p): Likewise.
19553         (spu_expand_insv): Likewise.
19554         (spu_emit_branch_or_set): Likewise.
19555         (spu_handle_vector_attribute): Likewise.
19556         (spu_builtin_splats): Likewise.
19557         (spu_builtin_extract): Likewise.
19558         (spu_builtin_promote): Likewise.
19559         (spu_expand_sign_extend): Likewise.
19560         * config/tilegx/tilegx.c (tilegx_scalar_mode_supported_p): Likewise.
19561         (tilegx_simd_int): Likewise.
19562         * config/tilepro/tilepro.c (tilepro_scalar_mode_supported_p): Likewise.
19563         (tilepro_simd_int): Likewise.
19564         * config/v850/v850.c (const_double_split): Likewise.
19565         (v850_print_operand): Likewise.
19566         (ep_memory_offset): Likewise.
19567         * config/vax/vax.c (vax_rtx_costs): Likewise.
19568         (vax_output_int_move): Likewise.
19569         (vax_output_int_add): Likewise.
19570         (vax_output_int_subtract): Likewise.
19571         * config/visium/predicates.md (visium_branch_operator): Likewise.
19572         * config/visium/visium.c (rtx_ok_for_offset_p): Likewise.
19573         (visium_print_operand_address): Likewise.
19574         * config/visium/visium.h (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
19575         * config/xtensa/xtensa.c (xtensa_mem_offset): Likewise.
19576         (xtensa_expand_conditional_branch): Likewise.
19577         (xtensa_copy_incoming_a7): Likewise.
19578         (xtensa_output_literal): Likewise.
19579         * dfp.c (decimal_real_maxval): Likewise.
19580         * targhooks.c (default_libgcc_floating_mode_supported_p): Likewise.
19581
19582 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
19583             Alan Hayward  <alan.hayward@arm.com>
19584             David Sherwood  <david.sherwood@arm.com>
19585
19586         * genmodes.c (mode_size_inline): Add an E_ prefix to mode names.
19587         (mode_nunits_inline): Likewise.
19588         (mode_inner_inline): Likewise.
19589         (mode_unit_size_inline): Likewise.
19590         (mode_unit_precision_inline): Likewise.
19591         (emit_insn_modes_h): Likewise.  Also emit a #define of the
19592         unprefixed name.
19593         (emit_mode_wider): Add an E_ prefix to mode names.
19594         (emit_mode_complex): Likewise.
19595         (emit_mode_inner): Likewise.
19596         (emit_mode_adjustments): Likewise.
19597         (emit_mode_int_n): Likewise.
19598         * config/aarch64/aarch64-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP)
19599         (v2si_UP, v2sf_UP, v1df_UP, di_UP, df_UP, v16qi_UP, v8hi_UP, v8hf_UP)
19600         (v4si_UP, v4sf_UP, v2di_UP, v2df_UP, ti_UP, oi_UP, ci_UP, xi_UP)
19601         (si_UP, sf_UP, hi_UP, hf_UP, qi_UP): Likewise.
19602         (CRC32_BUILTIN, ENTRY): Likewise.
19603         * config/aarch64/aarch64.c (aarch64_push_regs): Likewise.
19604         (aarch64_pop_regs): Likewise.
19605         (aarch64_process_components): Likewise.
19606         * config/alpha/alpha.c (alpha_emit_conditional_move): Likewise.
19607         * config/arm/arm-builtins.c (v8qi_UP, v4hi_UP, v4hf_UP, v2si_UP)
19608         (v2sf_UP, di_UP, v16qi_UP, v8hi_UP, v8hf_UP, v4si_UP, v4sf_UP)
19609         (v2di_UP, ti_UP, ei_UP, oi_UP, hf_UP, si_UP, void_UP): Likewise.
19610         * config/arm/arm.c (arm_init_libfuncs): Likewise.
19611         * config/i386/i386-builtin-types.awk (ix86_builtin_type_vect_mode):
19612         Likewise.
19613         * config/i386/i386-builtin.def (pcmpestr): Likewise.
19614         (pcmpistr): Likewise.
19615         * config/microblaze/microblaze.c (double_memory_operand): Likewise.
19616         * config/mmix/mmix.c (mmix_output_condition): Likewise.
19617         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
19618         Likewise.
19619         * config/rl78/rl78.c (mduc_regs): Likewise.
19620         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
19621         (htm_expand_builtin): Likewise.
19622         * config/sh/sh.h (REGISTER_NATURAL_MODE): Likewise.
19623         * config/sparc/sparc.c (emit_save_or_restore_regs): Likewise.
19624         * config/xtensa/xtensa.c (print_operand): Likewise.
19625         * expmed.h (NUM_MODE_PARTIAL_INT): Likewise.
19626         (NUM_MODE_VECTOR_INT): Likewise.
19627         * genoutput.c (null_operand): Likewise.
19628         (output_operand_data): Likewise.
19629         * genrecog.c (print_parameter_value): Likewise.
19630         * lra.c (debug_operand_data): Likewise.
19631
19632 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
19633
19634         * dwarf2out.c (scompare_loc_descriptor_wide)
19635         (scompare_loc_descriptor_narrow): New functions, split out from...
19636         (scompare_loc_descriptor): ...here.
19637         * expmed.c (emit_store_flag_int): New function, split out from...
19638         (emit_store_flag): ...here.
19639
19640 2017-08-30  Richard Biener  <rguenther@suse.de>
19641
19642         * dwarf2out.c (dwarf2out_finish): Remove setting AT_pubnames.
19643         (dwarf2out_early_finish): Move setting of AT_pubnames from
19644         early debug output to early finish.
19645
19646 2017-08-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
19647
19648         * gcc/config/msp430/msp430.h: Pass -mcode/data-region to the linker
19649         and -mdata-region to the assembler.
19650
19651 2017-08-30  Richard Biener  <rguenther@suse.de>
19652
19653         * dwarf2out.c (add_dwarf_attr): Check we don't add duplicate
19654         attributes.
19655         (gen_subprogram_die): Add DW_AT_object_pointer only early.
19656         (dwarf2out_early_global_decl): Only generate a DIE for the
19657         abstract origin if it doesn't already exist or is a declaration DIE.
19658         (resolve_addr): Do not add the linkage name twice when
19659         generating a stub DIE for the DW_TAG_GNU_call_site target.
19660
19661 2017-08-30  Richard Sandiford  <richard.sandiford@linaro.org>
19662
19663         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
19664         Use machine_mode rather than int for arg1_mode.
19665
19666 2017-08-29  Michael Meissner  <meissner@linux.vnet.ibm.com>
19667
19668         PR target/82015
19669         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Insure
19670         that the second argument of the built-in functions to unpack
19671         128-bit scalar types to 64-bit values is 0 or 1.  Change to use a
19672         switch statement instead a lot of if statements.
19673         * config/rs6000/rs6000.md (unpack<mode>, FMOVE128_VSX iterator):
19674         Allow 64-bit values to be in Altivec registers as well as
19675         traditional floating point registers.
19676         (pack<mode>, FMOVE128_VSX iterator): Likewise.
19677
19678 2017-08-29  Alexander Monakov  <amonakov@ispras.ru>
19679
19680         * ira-costs.c (record_address_regs): Handle both operands of PLUS for
19681         MAX_REGS_PER_ADDRESS == 1.
19682
19683 2017-08-29  Uros Bizjak  <ubizjak@gmail.com>
19684
19685         * config/i386/i386.opt (flag_fentry): Do not init to -1.
19686         * config/i386/i386.c (ix86_option_override_internal): Simplify
19687         setting of opts->x_flag_entry.
19688
19689 2017-08-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19690             Jakub Jelinek  <jakub@redhat.com>
19691             Richard Biener  <rguenther@suse.de>
19692
19693         PR tree-optimization/81503
19694         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Ensure
19695         folded constant fits in the target type; reorder tests for clarity.
19696
19697 2017-08-29  Martin Liska  <mliska@suse.cz>
19698
19699         * passes.def: Include pass_lower_switch.
19700         * stmt.c (dump_case_nodes): Remove and move to
19701         tree-switch-conversion.
19702         (case_values_threshold): Likewise.
19703         (expand_switch_as_decision_tree_p): Likewise.
19704         (emit_case_decision_tree): Likewise.
19705         (expand_case): Likewise.
19706         (balance_case_nodes): Likewise.
19707         (node_has_low_bound): Likewise.
19708         (node_has_high_bound): Likewise.
19709         (node_is_bounded): Likewise.
19710         (emit_case_nodes): Likewise.
19711         (struct simple_case_node): New struct.
19712         (add_case_node): Remove.
19713         (emit_case_dispatch_table): Use vector instead of case_list.
19714         (reset_out_edges_aux): Remove.
19715         (compute_cases_per_edge): Likewise.
19716         (expand_case): Build list of simple_case_node.
19717         (expand_sjlj_dispatch_table): Use it.
19718         * tree-switch-conversion.c (struct case_node): Moved from
19719         stmt.c and adjusted.
19720         (emit_case_nodes): Likewise.
19721         (node_has_low_bound): Likewise.
19722         (node_has_high_bound): Likewise.
19723         (node_is_bounded): Likewise.
19724         (case_values_threshold): Likewise.
19725         (reset_out_edges_aux): Likewise.
19726         (compute_cases_per_edge): Likewise.
19727         (add_case_node): Likewise.
19728         (dump_case_nodes): Likewise.
19729         (balance_case_nodes): Likewise.
19730         (expand_switch_as_decision_tree_p): Likewise.
19731         (emit_jump): Likewise.
19732         (emit_case_decision_tree): Likewise.
19733         (try_switch_expansion): Likewise.
19734         (do_jump_if_equal): Likewise.
19735         (emit_cmp_and_jump_insns): Likewise.
19736         (fix_phi_operands_for_edge): New function.
19737         (record_phi_operand_mapping): Likewise.
19738         (class pass_lower_switch): New pass.
19739         (pass_lower_switch::execute): New function.
19740         (make_pass_lower_switch): Likewise.
19741         (conditional_probability):
19742         * timevar.def: Add TV_TREE_SWITCH_LOWERING.
19743         * tree-pass.h: Add make_pass_lower_switch.
19744
19745 2017-08-29  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
19746
19747         PR target/80993
19748         * gcc/config/msp430/msp430.c (msp430_attr): Mark interrupt
19749         handlers as used.
19750
19751 2017-08-29  Richard Biener  <rguenther@suse.de>
19752
19753         * dwarf2out.c (add_dwarf_attr): When checking is enabled verify
19754         we do not add a DW_AT_inline attribute twice.
19755         (gen_subprogram_die): Remove code setting DW_AT_inline on
19756         DECL_ABSTRACT_P nodes.
19757
19758 2017-08-29  Richard Sandiford  <richard.sandiford@linaro.org>
19759
19760         * gimplify.c (gimplify_call_expr): Copy the nothrow flag to
19761         calls to internal functions.
19762         (gimplify_modify_expr): Likewise.
19763         * tree-call-cdce.c (use_internal_fn): Likewise.
19764         * tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
19765         (convert_to_divmod): Set the nothrow flag.
19766         * tree-if-conv.c (predicate_mem_writes):  Likewise.
19767         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
19768         (vectorizable_call): Likewise.
19769         (vectorizable_store): Likewise.
19770         (vectorizable_load): Likewise.
19771         * tree-vect-patterns.c (vect_recog_pow_pattern): Likewise.
19772         (vect_recog_mask_conversion_pattern): Likewise.
19773
19774 2017-08-29  Martin Liska  <mliska@suse.cz>
19775
19776         PR other/39851
19777         * gcc.c (driver_handle_option): Add new argument.
19778         * opts-common.c (handle_option): Pass
19779         target_option_override_hook.
19780         * opts-global.c (lang_handle_option): Add new option.
19781         (set_default_handlers):  Add new argument.
19782         (decode_options): Likewise.
19783         * opts.c (target_handle_option): Likewise.
19784         (common_handle_option): Call target_option_override_hook.
19785         * opts.h (struct cl_option_handler_func): Add hook for
19786         target option override.
19787         (struct cl_option_handlers): Likewise.
19788         (set_default_handlers): Add new argument.
19789         (decode_options): Likewise.
19790         (common_handle_option): Likewise.
19791         (target_handle_option): Likewise.
19792         * toplev.c (toplev::main): Pass targetm.target_option.override
19793         hook.
19794
19795 2017-08-29  Richard Biener  <rguenther@suse.de>
19796         Dominik Infuehr <dominik.infuehr@theobroma-systems.com>
19797
19798         * tree-vect-slp.c (vect_bb_slp_scalar_cost): Properly confine
19799         life to the active subtree.
19800
19801 2017-08-28  Jeff Law  <law@redhat.com>
19802
19803         * tree-ssa-dom.c (edge_info::record_simple_equiv): Call
19804         derive_equivalences.
19805         (derive_equivalences_from_bit_ior, record_temporary_equivalences):
19806         Code moved into....
19807         (edge_info::derive_equivalences): New private member function
19808
19809         * tree-ssa-dom.c (class edge_info): Changed from a struct
19810         to a class.  Add ctor/dtor, methods and data members.
19811         (edge_info::edge_info): Renamed from allocate_edge_info.
19812         Initialize additional members.
19813         (edge_info::~edge_info): New.
19814         (free_dom_edge_info): Delete the edge info.
19815         (record_edge_info): Use new class & associated member functions.
19816         Tighten forms for testing for edge equivalences.
19817         (record_temporary_equivalences): Iterate over the simple
19818         equivalences rather than assuming there's only one per edge.
19819         (cprop_into_successor_phis): Iterate over the simple
19820         equivalences rather than assuming there's only one per edge.
19821         (optimize_stmt): Use operand_equal_p rather than pointer
19822         equality for mini-DSE code.
19823
19824 2017-08-28  Nathan Sidwell  <nathan@acm.org>
19825
19826         * gcc.c (execute): Fold SIGPIPE handling into switch
19827         statement.  Adjust internal error message.
19828
19829 2017-08-28  Richard Biener  <rguenther@suse.de>
19830
19831         PR debug/81993
19832         * dwarf2out.c (gen_remaining_tmpl_value_param_die_attributes):
19833         Do nothing for removed DIEs.
19834
19835 2017-08-28  Richard Biener  <rguenther@suse.de>
19836
19837         PR tree-optimization/81977
19838         * tree-ssa-sccvn.c (vn_reference_lookup_3): Fix look through
19839         memcpy.
19840
19841 2017-08-28  Alexander Monakov  <amonakov@ispras.ru>
19842
19843         PR target/80640
19844         * doc/md.texi (mem_thread_fence): Remove mention of mode.  Rewrite.
19845         * optabs.c (expand_mem_thread_fence): Emit a compiler barrier when
19846         using targetm.gen_mem_thread_fence.
19847
19848 2017-08-27  Uros Bizjak  <ubizjak@gmail.com>
19849
19850         PR target/81995
19851         * config/i386/i386.md (*<btsc><mode>): Change operand 2
19852         predicate to register_operand.  Reorder operands.
19853         (*btr<mode>): Ditto.
19854         (*<btsc><mode>_mask): Change operand 3 predicate to register_operand.
19855         (*btr<mode>_mask): Ditto.
19856
19857 2017-08-25  Steven Munroe  <munroesj@gcc.gnu.org>
19858
19859         * config.gcc (powerpc*-*-*): Add xmmintrin.h and mm_malloc.h.
19860         * config/rs6000/xmmintrin.h: New file.
19861         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include xmmintrin.h.
19862
19863 2017-08-25  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
19864
19865         PR target/81504
19866         * config/rs6000/rs6000-p8swap.c (find_alignment_op): Add reference
19867         parameter and_insn and return it.
19868         (recombine_lvx_pattern): Insert a copy to ensure availability of
19869         the base register of the copied masking operation at the point of
19870         the instruction replacement.
19871         (recombine_stvx_pattern): Likewise.
19872
19873 2017-08-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
19874
19875         * config/rs6000/rs6000.opt (-mpower9-dform-scalar): Delete
19876         undocumented switches.
19877         (-mpower9-dform-vector): Likewise.
19878         (-mpower9-dform): Likewise.
19879         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
19880         comments to delete references to -mpower9-dform* switches.
19881         * config/rs6000/predicates.md (vsx_quad_dform_memory_operand):
19882         Delete reference to -mpower9-dform* switches, test for
19883         -mpower9-vector instead.
19884         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Likewise.
19885         (OTHER_P9_VECTOR_MASKS): Likewise.
19886         (POWERPC_MASKS): Likewise.
19887         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Change
19888         tests against -mpower9-dform* to -mpower9-vector.  Delete code
19889         that checked for -mpower9-dform* consistancy with other options.
19890         Add test for -mpower9-misc to enable other power9 switches.
19891         (rs6000_init_hard_regno_mode_ok): Likewise.
19892         (rs6000_option_override_internal): Likewise.
19893         (rs6000_emit_prologue): Likewise.
19894         (rs6000_emit_epilogue): Likewise.
19895         (rs6000_opt_masks): Delete -mpower9-dform-{scalar,vector}.
19896         (rs6000_disable_incompatiable_switches): Delete -mpower9-dform.
19897         (emit_fusion_p9_load): Change tests for -mpower9-dform-scalar
19898         -mpower9-vector.
19899         (emit_fusion_p9_store): Likewise.
19900         * config/rs6000/rs6000.h (TARGET_P9_DFORM_SCALAR): Delete
19901         resetting these macros if the assembler does not support ISA 3.0
19902         instructions.
19903         (TARGET_P9_DFORM_VECTOR): Likewise.
19904         * config/rs6000/rs6000.md (peepholes to optimize altivec memory):
19905         Change to use -mpower9-vector instead of -mpower9-dform-scalar.
19906
19907 2017-08-25  Alan Modra  <amodra@gmail.com>
19908
19909         PR rtl-optimization/81747
19910         * cse.c (cse_extended_basic_block): Don't attempt to record
19911         equivalences for degenerate conditional branches that branch
19912         to their fall-through.
19913
19914 2017-08-24  Martin Sebor  <msebor@redhat.com>
19915
19916         PR middle-end/81908
19917         * gimple-fold.c (size_must_be_zero_p): New function.
19918         (gimple_fold_builtin_memory_op): Call it.
19919
19920 2017-08-24  Steven Munroe  <munroesj@gcc.gnu.org>
19921
19922         * config/rs6000/mm_malloc.h: New file.
19923
19924 2017-08-24  Bin Cheng  <bin.cheng@arm.com>
19925
19926         PR tree-optimization/81913
19927         * tree-ssa-loop-niter.c (number_of_iterations_cond): Skip niter
19928         analysis when either IVs in condition can wrap.
19929
19930 2017-08-24  Uros Bizjak  <ubizjak@gmail.com>
19931
19932         * dwarf2out.c (MAX_ARTIFICIAL_LABEL_BYTES): Increase to 40.
19933         * dwarf2cfi.c (MAX_ARTIFICIAL_LABEL_BYTES): Remove.
19934
19935 2017-08-24  Richard Biener  <rguenther@suse.de>
19936
19937         PR target/81921
19938         * targhooks.c (default_target_can_inline_p): Properly
19939         use target_option_default_node when no DECL_FUNCTION_SPECIFIC_TARGET
19940         is present and always compare.
19941         * config/i386/i386.c (ix86_valid_target_attribute_tree): Do not
19942         infer -mfpmath=sse from TARGET_SSE_P.
19943         (ix86_can_inline_p): Properly use target_option_default_node when
19944         no DECL_FUNCTION_SPECIFIC_TARGET is present and always compare.
19945
19946 2017-08-24  Richard Biener  <rguenther@suse.de>
19947
19948         PR debug/81936
19949         * dwarf2out.c (output_die): Handle flag_generate_offload like
19950         flag_generate_lto.
19951         (output_comp_unit): Likewise.
19952         (gen_array_type_die): Likewise.
19953         (dwarf2out_early_finish): Likewise.
19954         (note_variable_value_in_expr): Likewise.
19955         (dwarf2out_finish): Likewise.  Adjust assert.
19956         * cgraphunit.c (symbol_table::compile): Move setting of
19957         flag_generate_offload earlier ...
19958         (symbol_table::finalize_compilation_unit): ... here, before
19959         early debug finalization.
19960
19961 2017-08-24  Richard Biener  <rguenther@suse.de>
19962
19963         * config/i386/i386.c: Include symbol-summary.h, ipa-prop.h
19964         and ipa-fnsummary.h.
19965         (ix86_can_inline_p): When ix86_fpmath flags do not match
19966         check whether the callee uses FP math at all.
19967
19968 2017-08-24  Aldy Hernandez  <aldyh@redhat.com>
19969
19970         PR middle-end/81931
19971         * tree-ssanames.c (get_nonzero_bits): Use element_precision
19972         instead of TYPE_PRECISION.
19973
19974 2017-08-24  Richard Sandiford  <richard.sandiford@linaro.org>
19975             Alan Hayward  <alan.hayward@arm.com>
19976             David Sherwood  <david.sherwood@arm.com>
19977
19978         * combine.c (make_extraction): Use subreg_offset_from_lsb.
19979
19980 2017-08-23  Daniel Santos  <daniel.santos@pobox.com>
19981
19982         * config/i386/i386.h (ix86_frame::stack_realign_allocate_offset):
19983         Remove field.
19984         (ix86_frame::stack_realign_allocate): New field.
19985         (struct machine_frame_state): Modify comments.
19986         (machine_frame_state::sp_realigned_fp_end): New field.
19987         * config/i386/i386.c (ix86_compute_frame_layout): Rework stack frame
19988         layout calculation.
19989         (sp_valid_at): Add assertion to assure no attempt to access invalid
19990         offset of a realigned stack.
19991         (fp_valid_at): Likewise.
19992         (choose_baseaddr): Modify comments.
19993         (ix86_emit_outlined_ms2sysv_save): Adjust to changes in
19994         ix86_expand_prologue.
19995         (ix86_expand_prologue): Modify stack realignment and allocation.
19996         (ix86_expand_epilogue): Modify comments.
19997         * doc/sourcebuild.texi: Add documentation for target selectors avx2,
19998         avx2_runtime, avx512f, and avx512f_runtime.
19999
20000 2017-08-23  Uros Bizjak  <ubizjak@gmail.com>
20001
20002         * config/i386/i386.opt: Remove unneeded Init(0) initializations.
20003         (mstackrealign): Do not init to -1.
20004         * config/i386/i386.c (ix86_option_override_internal):
20005         Check opts_set, not opts when setting default value of
20006         opts->x_ix86_force_align_arg_pointer.
20007
20008 2017-08-23  Richard Biener  <rguenther@suse.de>
20009
20010         * function.c (fndecl_name): Use verbosity 1 (no arguments) for
20011         lang_hooks.decl_printable_name.
20012         * print-rtl-function.c (print_rtx_function): Likewise.
20013         * tree-pretty-print.c (dump_function_header): Likewise.
20014
20015 2017-08-23  Richard Biener  <rguenther@suse.de>
20016
20017         PR lto/81940
20018         * dwarf2out.c (dwarf2out_abstract_function): Handle LTO with
20019         -g0 at compile-time.
20020
20021 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
20022
20023         PR middle-end/19706
20024         * doc/sourcebuild.texi (Other hardware attributes):
20025         Document xorsign.
20026
20027 2017-08-23  Tamar Christina  <tamar.christina@arm.com>
20028
20029         PR middle-end/19706
20030         * tree-ssa-math-opts.c (convert_expand_mult_copysign):
20031         Fix single-use check.
20032
20033 2017-08-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>
20034
20035         * gcc.c (execute): Only test for SIGKILL and SIGQUIT if available.
20036
20037 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
20038
20039         * doc/install.texi: Modify to add more details on running selected
20040         tests.
20041
20042 2017-08-22  Daniel Santos  <daniel.santos@pobox.com>
20043
20044         * config/i386/i386.c (ix86_option_override_internal): Error when -mx32
20045         is combined with -mabi=ms.
20046         (ix86_function_type_abi): Limit errors for mixing -mx32 with attribute
20047         ms_abi.
20048
20049 2017-08-22  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20050
20051         PR tree-optimization/81488
20052         * gimple-ssa-strength-reduction (struct slsr_cand_d): Add visited
20053         and cached_basis fields.
20054         (MAX_SPREAD): New constant.
20055         (alloc_cand_and_find_basis): Initialize new fields.
20056         (clear_visited): New function.
20057         (create_phi_basis_1): Rename from create_phi_basis, set visited
20058         and cached_basis fields.
20059         (create_phi_basis): New wrapper function.
20060         (phi_add_costs_1): Rename from phi_add_costs, add spread
20061         parameter, set visited field, short-circuit when limits reached.
20062         (phi_add_costs): New wrapper function.
20063         (record_phi_increments_1): Rename from record_phi_increments, set
20064         visited field.
20065         (record_phi_increments): New wrapper function.
20066         (phi_incr_cost_1): Rename from phi_incr_cost, set visited field.
20067         (phi_incr_cost): New wrapper function.
20068         (all_phi_incrs_profitable_1): Rename from
20069         all_phi_incrs_profitable, set visited field.
20070         (all_phi_incrs_profitable): New wrapper function.
20071
20072 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
20073             Alan Hayward  <alan.hayward@arm.com>
20074             David Sherwood  <david.sherwood@arm.com>
20075
20076         * rtl.h (paradoxical_subreg_p): Define inline, and add a version
20077         that takes the outer and inner modes.
20078         * doc/rtl.texi: Use paradoxical_subreg_p instead of a GET_MODE_SIZE
20079         comparison as the canonical test for a paradoxical subreg.
20080         * combine.c (simplify_set): Use paradoxical_subreg_p.
20081         (make_extraction): Likewise.
20082         (force_to_mode): Likewise.
20083         (rtx_equal_for_field_assignment_p): Likewise.
20084         (gen_lowpart_for_combine): Likewise.
20085         (simplify_comparison): Likewise.
20086         * cse.c (equiv_constant): Likewise.
20087         * expmed.c (store_bit_field_1): Likewise.
20088         * final.c (alter_subreg): Likewise.
20089         * fwprop.c (propagate_rtx): Likewise.
20090         (forward_propagate_subreg): Likewise.
20091         * ira-conflicts.c (ira_build_conflicts): Likewise.
20092         * lower-subreg.c (simplify_gen_subreg_concatn): Likewise.
20093         * lra-constraints.c (curr_insn_transform): Likewise.
20094         (split_reg): Likewise.
20095         * lra-eliminations.c (move_plus_up): Likewise.
20096         (lra_eliminate_regs_1): Likewise.
20097         * recog.c (general_operand): Likewise.
20098         * ree.c (combine_reaching_defs): Likewise.
20099         * reload.c (push_reload): Likewise.
20100         (find_reloads): Likewise.
20101         * reload1.c (elimination_effects): Likewise.
20102         (compute_reload_subreg_offset): Likewise.
20103         (choose_reload_regs): Likewise.
20104         * rtlanal.c (subreg_lsb_1): Likewise.
20105         * simplify-rtx.c (simplify_unary_operation_1): Likewise.
20106         (simplify_subreg): Likewise.
20107         * var-tracking.c (track_loc_p): Likewise.
20108         * emit-rtl.c (byte_lowpart_offset): Likewise.
20109         (paradoxical_subreg_p): Delete out-of-line definition.
20110
20111 2017-08-22  Jeff Law  <law@redhat.com>
20112
20113         PR tree-optimization/81741
20114         PR tree-optimization/71947
20115         * tree-ssa-dom.c: Include tree-inline.h.
20116         (record_temporary_equivalences): Only record SSA_NAME = SSA_NAME
20117         equivalences if one is more expensive to compute than the other.
20118         * tree-ssa-scopedtables.h (class const_or_copies): Make
20119         record_const_or_copy_raw method private.
20120         (class avail_exprs_stack): New method simplify_binary_operation.
20121         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr): Call
20122         avail_exprs_stack::simplify_binary_operation as needed.
20123         (avail_exprs_stack::simplify_binary_operation): New function.
20124
20125 2017-08-22  Sebastian Huber  <sebastian.huber@embedded-brains.de>
20126
20127         * config.gcc (powerpc-*-rtems*): Add rs6000/linux64.opt.
20128         * config/rs6000/rtems.h (ASM_PREFERRED_EH_DATA_FORMAT): New define.
20129         (DOT_SYMBOLS): Likewise.
20130         (MINIMAL_TOC_SECTION_ASM_OP): Likewise.
20131         (RELOCATABLE_NEEDS_FIXUP): Likewise.
20132         (RS6000_ABI_NAME): Likewise.
20133         (TARGET_CMODEL): Likewise.
20134         (TOC_SECTION_ASM_OP): Likewise.
20135         (SET_CMODEL): New macro.
20136         (SUBSUBTARGET_OVERRIDE_OPTIONS): Evaluate cmodel options.
20137
20138 2017-08-22  Richard Biener  <rguenther@suse.de>
20139
20140         * tree-inline.c (remap_type_1): Change asserts on TYPE_SIZE[_UNIT]
20141         to allow for free-lang-data replacements similar to verify_type_variant.
20142
20143 2017-08-22  Richard Sandiford  <richard.sandiford@linaro.org>
20144             Alan Hayward  <alan.hayward@arm.com>
20145             David Sherwood  <david.sherwood@arm.com>
20146
20147         * config/aarch64/aarch64.md (casesi): Use DImode rather than
20148         VOIDmode for the LABEL_REF.
20149
20150 2017-08-22  Richard Biener  <rguenther@suse.de>
20151
20152         * tree-cfg.c (gimple_split_edge): Avoid reallocating target PHI nodes.
20153
20154 2017-08-22  Richard Biener  <rguenther@suse.de>
20155
20156         * common.opt (feliminate-dwarf2-dups): Ignore.
20157         * doc/invoke.texi (feliminate-dwarf2-dups): Remove documentation.
20158         * dwarf2out.c (push_new_compile_unit, pop_compile_unit,
20159         same_die_p_wrap, compute_section_prefix,
20160         is_symbol_die, assign_symbol_names, break_out_includes): Remove.
20161         (comdat_symbol_id, comdat_symbol_number): Likewise.
20162         (cu_hash_table_entry, cu_hash_table_entry_hasher, cu_hash_type):
20163         Likewise.
20164         (check_duplicate_cu, record_comdat_symbol_number): Likewise.
20165         (output_die): Mark unreachable path unreachable.
20166         (dwarf2out_start_source_file): Do not create DW_TAG_GNU_BINCL.
20167         (dwarf2out_end_source_file): Do not create DW_TAG_GNU_EINCL.
20168         (dwarf2out_init): Remove code handling flag_eliminate_dwarf2_dups.
20169         (dwarf2out_early_finish): Likewise.
20170
20171 2017-08-22  Aldy Hernandez  <aldyh@redhat.com>
20172
20173         * wide-int.h (hwi_with_prec::hwi_with_prec): Sign extend.
20174
20175 2017-08-22  Georg-Johann Lay  <avr@gjlay.de>
20176
20177         PR target/81910
20178         * config/avr/avr.c (avr_handle_addr_attribute): Early return if
20179         not VAR_P. Filter attribute warnings with OPT_Wattributes.
20180         (avr_attribute_table) <io, io_low, address>: Initialize
20181         .decl_required with true.
20182
20183 2017-08-21  Michael Meissner  <meissner@linux.vnet.ibm.com>
20184
20185         * config/rs6000/rs6000-cpus.def (-mvsx-scalar-float): Delete
20186         undocumented debugging options.
20187         (-mvsx-scalar-double): Likewise.
20188         (-mallow-df-permute): Likewise.
20189         (-mvectorize-builtins): Likewise.
20190         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
20191         (rs6000_builtin_vectorized_function): Likewise.
20192         (rs6000_builtin_md_vectorized_function): Likewise.
20193         (rs6000_opt_vars): Likewise.
20194
20195 2017-08-21  Uros Bizjak  <ubizjak@gmail.com>
20196
20197         PR target/46091
20198         * config/i386/i386.md (*btsq_imm): Rename from *btsq.
20199         (*btrq_imm): Rename from *btrq.
20200         (*btcq_imm): Rename from *btcq.
20201         (btsc): New code attribute.
20202         (*<btsc><mode>): New insn pattern.
20203         (*btr<mode>): Ditto.
20204         (*<btsc><mode>_mask): New insn_and_split pattern.
20205         (*btr<mode>_mask): Ditto.
20206
20207 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
20208             Alan Hayward  <alan.hayward@arm.com>
20209             David Sherwood  <david.sherwood@arm.com>
20210
20211         * function.c (pad_below): Simplify padding calculation.
20212
20213 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
20214             Alan Hayward  <alan.hayward@arm.com>
20215             David Sherwood  <david.sherwood@arm.com>
20216
20217         * target.def (function_prologue): Remove frame size argument.
20218         (function_epilogue): Likewise.
20219         * doc/tm.texi: Regenerate.
20220         * final.c (final_start_function): Update call to function_prologue.
20221         (final_end_function): Update call to function_epilogue.
20222         (default_function_pro_epilogue): Remove frame size argument.
20223         * output.h (default_function_pro_epilogue): Likewise.
20224         * config/arm/arm.c (arm_output_function_epilogue): Likewise.
20225         (arm_output_function_prologue): Likewise.
20226         * config/frv/frv.c (frv_function_prologue): Likewise.
20227         (frv_function_epilogue): Likewise.
20228         * config/i386/i386.c (ix86_output_function_epilogue): Likewise.
20229         * config/ia64/ia64.c (ia64_output_function_prologue): Likewise.
20230         (ia64_output_function_epilogue): Likewise.
20231         * config/m32r/m32r.c (m32r_output_function_prologue): Likewise.
20232         (m32r_output_function_epilogue): Likewise.
20233         * config/microblaze/microblaze.c (microblaze_function_prologue)
20234         (microblaze_function_epilogue): Likewise.
20235         * config/mips/mips.c (mips_output_function_prologue): Likewise.
20236         (mips_output_function_epilogue): Likewise.
20237         * config/mmix/mmix.c (mmix_target_asm_function_prologue): Likewise.
20238         (mmix_target_asm_function_epilogue): Likewise.
20239         * config/msp430/msp430.c (msp430_start_function): Likewise.
20240         * config/nds32/nds32.c (nds32_asm_function_prologue): Likewise.
20241         (nds32_asm_function_epilogue): Likewise.
20242         * config/nios2/nios2.c (nios2_asm_function_prologue): Likewise.
20243         * config/pa/pa.c (pa_output_function_prologue): Likewise.
20244         (pa_output_function_epilogue): Likewise.
20245         * config/powerpcspe/powerpcspe.c (rs6000_output_function_prologue)
20246         (rs6000_output_function_epilogue): Likewise.
20247         * config/rl78/rl78.c (rl78_start_function): Likewise.
20248         * config/rs6000/rs6000.c (rs6000_output_function_prologue): Likewise.
20249         (rs6000_output_function_epilogue): Likewise.
20250         * config/rx/rx.c (rx_output_function_prologue): Likewise.
20251         * config/sh/sh.c (sh_output_function_epilogue): Likewise.
20252         * config/sparc/sparc.c (sparc_asm_function_prologue): Likewise.
20253         (sparc_asm_function_epilogue): Likewise.
20254
20255 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
20256
20257         * tree.h (type_has_mode_precision_p): New function.
20258         * convert.c (convert_to_integer_1): Use it.
20259         * expr.c (expand_expr_real_2): Likewise.
20260         (expand_expr_real_1): Likewise.
20261         * fold-const.c (fold_single_bit_test_into_sign_test): Likewise.
20262         * match.pd: Likewise.
20263         * tree-ssa-forwprop.c (simplify_rotate): Likewise.
20264         * tree-ssa-math-opts.c (convert_mult_to_fma): Likewise.
20265         * tree-tailcall.c (process_assignment): Likewise.
20266         * tree-vect-loop.c (vectorizable_reduction): Likewise.
20267         * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern)
20268         (vect_recog_mult_pattern, vect_recog_divmod_pattern): Likewise.
20269         * tree-vect-stmts.c (vectorizable_conversion): Likewise.
20270         (vectorizable_assignment): Likewise.
20271         (vectorizable_shift): Likewise.
20272         (vectorizable_operation): Likewise.
20273         * tree-vrp.c (register_edge_assert_for_2): Likewise.
20274
20275 2017-08-21  Wilco Dijkstra  <wdijkstr@arm.com>
20276
20277         * match.pd: Add pow (C, x) simplification.
20278
20279 2017-08-21  Richard Biener  <rguenther@suse.de>
20280
20281         PR tree-optimization/81900
20282         * tree-ssa-pre.c (compute_antic_aux): Properly compute changed
20283         for blocks with abnormal predecessors.
20284         (compute_antic): Do not set visited flag prematurely.
20285
20286 2017-08-21  Georg-Johann Lay  <avr@gjlay.de>
20287
20288         PR target/79883
20289         * config/avr/avr.c (avr_set_current_function): Typo in diagnostic.
20290
20291 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
20292
20293         * stor-layout.h (vector_type_mode): Move to...
20294         * tree.h (vector_type_mode): ...here.
20295         * stor-layout.c (vector_type_mode): Move to...
20296         * tree.c (vector_type_mode): ...here.  Include rtl.h and regs.h.
20297
20298 2017-08-21  Richard Biener  <rguenther@suse.de>
20299
20300         * debug.h (struct gcc_debug_hooks): Add die_ref_for_decl and
20301         register_external_die hooks.
20302         (debug_false_tree_charstarstar_uhwistar): Declare.
20303         (debug_nothing_tree_charstar_uhwi): Likewise.
20304         * debug.c (do_nothing_debug_hooks): Adjust.
20305         (debug_false_tree_charstarstar_uhwistar): New do nothing.
20306         (debug_nothing_tree_charstar_uhwi): Likewise.
20307         * dbxout.c (dbx_debug_hooks): Adjust.
20308         (xcoff_debug_hooks): Likewise.
20309         * sdbout.c (sdb_debug_hooks): Likewise.
20310         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
20311         * dwarf2out.c (macinfo_label_base): New global.
20312         (dwarf2out_register_external_die): New function for the
20313         register_external_die hook.
20314         (dwarf2out_die_ref_for_decl): Likewise for die_ref_for_decl.
20315         (dwarf2_debug_hooks): Use them.
20316         (dwarf2_lineno_debug_hooks): Adjust.
20317         (struct die_struct): Add with_offset flag.
20318         (DEBUG_LTO_DWO_INFO_SECTION, DEBUG_LTO_INFO_SECTION,
20319         DEBUG_LTO_DWO_ABBREV_SECTION, DEBUG_LTO_ABBREV_SECTION,
20320         DEBUG_LTO_DWO_MACINFO_SECTION, DEBUG_LTO_MACINFO_SECTION,
20321         DEBUG_LTO_DWO_MACRO_SECTION, DEBUG_LTO_MACRO_SECTION,
20322         DEBUG_LTO_LINE_SECTION, DEBUG_LTO_DWO_STR_OFFSETS_SECTION,
20323         DEBUG_LTO_STR_DWO_SECTION, DEBUG_STR_LTO_SECTION): New macros
20324         defining section names for the early LTO debug variants.
20325         (reset_indirect_string): New helper.
20326         (add_AT_external_die_ref): Helper for dwarf2out_register_external_die.
20327         (print_dw_val): Add support for offsetted symbol references.
20328         (get_ultimate_context): Split out from is_cxx.
20329         (is_cxx): Use get_ultimate_context.
20330         (is_fortran): Add decl overload.
20331         (compute_comp_unit_symbol): Split out worker from
20332         compute_section_prefix.
20333         (compute_section_prefix): Call compute_comp_unit_symbol and
20334         set comdat_type_p here.
20335         (output_die): Skip DIE symbol output for the LTO added one.
20336         Handle DIE symbol references with offset.
20337         (output_comp_unit): Guard section name mangling properly.
20338         For LTO debug sections emit a symbol at the section beginning
20339         which we use to refer to its DIEs.
20340         (add_abstract_origin_attribute): For DIEs registered via
20341         dwarf2out_register_external_die directly refer to the early
20342         DIE rather than indirectly through the shadow one we created.
20343         Remove obsolete call to dwarf2out_abstract_function for
20344         non-function/block origins.
20345         (gen_array_type_die): When generating early LTO debug do
20346         not emit DW_AT_string_length.
20347         (gen_formal_parameter_die): Do not re-create DIEs for PARM_DECLs
20348         late when in LTO.  As suggested place a gcc_unreachable for
20349         the DECL_ABSTRACT_P case.
20350         (gen_subprogram_die): Avoid another specification DIE
20351         for early built declarations/definitions for the late LTO case.
20352         (gen_variable_die): Add type references for late duplicated VLA dies
20353         when in late LTO.
20354         (gen_inlined_subroutine_die): Do not call dwarf2out_abstract_function,
20355         we have the abstract instance already.
20356         (process_scope_var): Adjust decl DIE contexts in LTO which
20357         first puts them in limbo.
20358         (gen_decl_die): Do not generate type DIEs late apart from
20359         types for VLAs or for decls we do not yet have a DIE.  Do not
20360         call dwarf2out_abstract_function late.
20361         (dwarf2out_early_global_decl): Make sure to create DIEs
20362         for abstract instances of a decl first.
20363         (dwarf2out_late_global_decl): Adjust comment.
20364         (output_macinfo_op): With multiple macro sections use
20365         macinfo_label_base to distinguish labels.
20366         (output_macinfo): Likewise.  Update macinfo_label_base.
20367         Pass in the line info label.
20368         (note_variable_value_in_expr): When generating LTO resolve
20369         all variable values here by generating DIEs as needed.
20370         (init_sections_and_labels): Add early LTO debug flag parameter
20371         and generate different sections and names if set.  Add generation
20372         counter for the labels so we can have multiple of them.
20373         (reset_dies): Helper to allow DIEs to be output multiple times.
20374         (dwarf2out_finish): When outputting DIEs to the fat part of an
20375         LTO object first reset DIEs.
20376         (dwarf2out_early_finish): Output early DIEs when generating LTO.
20377         (modified_type_die): Check for decl_ultimate_origin being self
20378         before recursing.
20379         (gen_type_die_with_usage): Likewise.
20380         (gen_typedef_die): Allow decl_ultimate_origin being self.
20381         (set_decl_abstract_flags): Remove.
20382         (set_block_abstract_flags): Likewise.
20383         (dwarf2out_abstract_function): Treat the early generated DIEs
20384         as the abstract copy and only add DW_AT_inline and
20385         DW_AT_artificial here and call set_decl_origin_self.
20386         If the DIE has an abstract origin don't do anything.
20387         * tree.c (free_lang_data): Build a dummy TRANSLATION_UNIT_DECL
20388         if we have none yet (Go fails to build one, PR78628).
20389         (variably_modified_type_p): Prevent endless recursion for Ada
20390         cyclic pointer types.
20391         * lto-streamer-in.c: Include debug.h.
20392         (dref_queue): New global.
20393         (lto_read_tree_1): Stream in DIE references.
20394         (lto_input_tree): Register DIE references.
20395         (input_function): Stream DECL_DEBUG_ARGS.
20396         * lto-streamer-out.c: Include debug.h.
20397         (lto_write_tree_1): Output DIE references.
20398         (DFS::DFS_write_tree_body): Follow DECL_ABSTRACT_ORIGIN.
20399         Force a TRANSLATION_UNIT_DECL DECL_CONTEXT for file-scope decls.
20400         (output_function): Stream DECL_DEBUG_ARGS.
20401         * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
20402         Stream DECL_ABSTRACT_ORIGIN.
20403         * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
20404         (write_ts_decl_minimal_tree_pointers): Force a TRANSLATION_UNIT_DECL
20405         DECL_CONTEXT for file-scope decls.
20406         * lto-streamer.h (struct dref_entry): Declare.
20407         (dref_queue): Likewise.
20408         * cfgexpand.c (pass_expand::execute): Do not call the
20409         outlining_inline_function hook here.
20410         * lto-wrapper.c (debug_obj): New global.
20411         (tool_cleanup): Unlink it if required.
20412         (debug_objcopy): New function.
20413         (run_gcc): Handle early debug sections in the IL files by
20414         extracting them to separate files, partially linkin them and
20415         feeding the result back as result to the linker.
20416         * config/darwin.h (DEBUG_LTO_INFO_SECTION, DEBUG_LTO_ABBREV_SECTION,
20417         DEBUG_LTO_MACINFO_SECTION, DEBUG_LTO_LINE_SECTION,
20418         DEBUG_STR_LTO_SECTION, DEBUG_LTO_MACRO_SECTION): Put early debug
20419         sections into a separate segment.
20420         * config/darwin.c (darwin_asm_named_section): Handle __GNU_DWARF_LTO
20421         segments.
20422         (darwin_asm_dwarf_section): Likewise.
20423         (darwin_asm_output_dwarf_offset): Likewise.
20424         * config/i386/i386.c (make_resolver_func): Set DECL_IGNORED_P.
20425
20426 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
20427             Alan Hayward  <alan.hayward@arm.com>
20428             David Sherwood  <david.sherwood@arm.com>
20429
20430         * read-md.h (md_reader::record_potential_iterator_use): Replace
20431         pointer argument with an rtx and an index.
20432         * read-rtl.c (iterator_group::apply_iterator): Likewise.
20433         (apply_mode_iterator): Likewise.
20434         (apply_code_iterator): Likewise.
20435         (apply_int_iterator): Likewise.
20436         (apply_subst_iterator): Likewise.
20437         (record_iterator_use): Likewise.
20438         (record_attribute_use): Likewise.
20439         (md_reader::record_potential_iterator_use): Likewise.  Update calls
20440         to record_iterator_use and apply_iterator.
20441         (iterator_use): Replace ptr with x and index.
20442         (attribute_use): Likewise.
20443         (apply_attribute_uses): Update calls to apply_iterator.
20444         (apply_iterators): Likewise.  Update initialization of iterator_use.
20445         (rtx_reader::read_rtx_code): Update calls to record_iterator_use
20446         and record_potential_iterator_use.
20447         (rtx_reader::read_rtx_operand): Likewise.
20448
20449 2017-08-21  Richard Sandiford  <richard.sandiford@linaro.org>
20450             Alan Hayward  <alan.hayward@arm.com>
20451             David Sherwood  <david.sherwood@arm.com>
20452
20453         * varasm.c (const_rtx_hash_1): Don't hash in the mode of a
20454         CONST_WIDE_INT.
20455
20456 2017-08-21  Richard Biener  <rguenther@suse.de>
20457
20458         PR middle-end/81884
20459         * tree-ssa-alias.c (stmt_kills_ref_p): Handle array accesses
20460         at struct end conservatively when comparing common bases.
20461
20462 2017-08-21  Richard Biener  <rguenther@suse.de>
20463
20464         * tree-ssa-loop-im.c (struct lim_aux_data): Add ref index member.
20465         (mem_ref_in_stmt): Remove.
20466         (determine_max_movement): Use ref index to get at the reference.
20467         (invariantness_dom_walker::before_dom_children): Deal with
20468         lim data already initialized.
20469         (gather_mem_refs_stmt): Initialize lim data and record ref index.
20470
20471 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
20472
20473         * config/i386/i386.h (OPTION_MASK_ISA_ROUND): Remove.
20474         (TARGET_ISA_ROUND): Ditto.
20475         (TARGET_ROUND): Ditto.
20476         * config/i386/i386.c: Substitute TARGET_ROUND with TARGET_SSE4_1.
20477         * config/i386/i386.md: Ditto.
20478         * config/i386/sse.md: Ditto.
20479         * config/i386/i386-builtin.def: Substitute OPTION_MASK_ISA_ROUND
20480         with OPTION_MASK_ISA_SSE4_1.
20481
20482 2017-08-19  Uros Bizjak  <ubizjak@gmail.com>
20483
20484         PR target/81894
20485         * doc/extend.texi (x86 Built-in Functions): Correct the name of
20486         __builtin_ia32_lzcnt_u16.
20487
20488 2017-08-18  Peter Bergner  <bergner@vnet.ibm.com>
20489
20490         PR target/80210
20491         * config/rs6000/rs6000.c (rs6000_activate_target_options): New function.
20492         (rs6000_set_current_function): Rewrite function to use it.
20493
20494 2017-08-18  H.J. Lu  <hongjiu.lu@intel.com>
20495
20496         PR c/53037
20497         * print-tree.c (print_node): Support DECL_WARN_IF_NOT_ALIGN
20498         and TYPE_WARN_IF_NOT_ALIGN.
20499         * stor-layout.c (do_type_align): Merge DECL_WARN_IF_NOT_ALIGN.
20500         (handle_warn_if_not_align): New.
20501         (place_union_field): Call handle_warn_if_not_align.
20502         (place_field): Call handle_warn_if_not_align.
20503         Copy TYPE_WARN_IF_NOT_ALIGN.
20504         (finish_builtin_struct): Copy TYPE_WARN_IF_NOT_ALIGN.
20505         (layout_type): Likewise.
20506         * tree-core.h (tree_type_common): Add warn_if_not_align.  Set
20507         spare to 18.
20508         (tree_decl_common): Add warn_if_not_align.
20509         * tree.c (build_range_type_1): Copy TYPE_WARN_IF_NOT_ALIGN.
20510         * tree.h (TYPE_WARN_IF_NOT_ALIGN): New.
20511         (SET_TYPE_WARN_IF_NOT_ALIGN): Likewise.
20512         (DECL_WARN_IF_NOT_ALIGN): Likewise.
20513         (SET_DECL_WARN_IF_NOT_ALIGN): Likewise.
20514         * doc/extend.texi: Document warn_if_not_aligned attribute.
20515         * doc/invoke.texi: Document -Wif-not-aligned and -Wpacked-not-aligned.
20516
20517 2017-08-17  Martin Liska  <mliska@suse.cz>
20518
20519         PR bootstrap/81864
20520         * tree-loop-distribution.c (ddrs_table): Change type to pointer type.
20521         (get_data_dependence): Use it as pointer type.
20522         (distribute_loop): Likewise.
20523
20524 2017-08-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20525
20526         * config/rs6000/altivec.md (UNSPEC_VMRGOW_DIRECT): New constant.
20527         (p8_vmrgew_v4sf_direct): Generalize to p8_vmrgew_<mode>_direct.
20528         (p8_vmrgow_<mode>_direct): New define_insn.
20529         * config/rs6000/rs6000.c (altivec_expand_vec_perm_const): Properly
20530         handle endianness for vmrgew and vmrgow permute patterns.
20531
20532 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
20533
20534         * config/rs6000/altivec.md (VParity): Remove TARGET_VSX_TIMODE.
20535         * config/rs6000/rs6000-cpus.def: Remove comment.
20536         (ISA_2_7_MASKS_SERVER): Delete OPTION_MASK_VSX_TIMODE;
20537         (POWERPC_MASKS): Likewise.
20538         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Remove unneeded
20539         use of TARGET_VSX_TIMODE.
20540         (rs6000_setup_reg_addr_masks): Change TARGET_VSX_TIMODE to TARGET_VSX.
20541         (rs6000_init_hard_regno_mode_ok): Remove unneeded uses of
20542         TARGET_VSX_TIMODE.  Change use of TARGET_VSX_TIMODE to TARGET_VSX.
20543         (rs6000_option_override_internal): Remove dead code.
20544         (rs6000_legitimize_address): Change TARGET_VSX_TIMODE to TARGET_VSX.
20545         (rs6000_legitimize_reload_address): Likewise.
20546         (rs6000_legitimate_address_p): Likewise.
20547         (rs6000_opt_masks): Delete "vsx-timode".
20548         (rs6000_disable_incompatible_switches): Remove mention of -mvsx-timode
20549         from function comment.
20550         * config/rs6000/rs6000.h (MASK_VSX_TIMODE): Delete.
20551         * config/rs6000/rs6000.md (FMOVE128_GPR): Remove TARGET_VSX_TIMODE.
20552         (V16QI, V8HI, V4SI, V4SF, V2DI, V2DF, V1TI): Remove useless empty
20553         condition.
20554         * config/rs6000/rs6000.opt (mvsx-timode): Replace with stub.
20555         * config/rs6000/vector.md (VEC_IP): Remove TARGET_VSX_TIMODE.
20556         * config/rs6000/vsx.md (VSX_LE_128): Likewise.
20557         (VSX_TI): Likewise.
20558         (VSX_M): Likewise.
20559         (define_peephole2): Likewise.
20560
20561 2017-08-17  Martin Sebor  <msebor@redhat.com>
20562
20563         PR c/81859
20564         * pretty-print.c (pp_format): Use strnlen in %.*s to avoid reading
20565         past the end of an array.
20566         (test_pp_format): Add test cases.
20567
20568 2017-08-17  Richard Sandiford  <richard.sandiford@linaro.org>
20569
20570         * internal-fn.def (CLRSB, CLZ, CTZ, FFS, PARITY, POPCOUNT): Add
20571         missing ECF_NOTHROW flags.
20572
20573 2017-08-17  Peter Bergner  <bergner@vnet.ibm.com>
20574
20575         PR target/72804
20576         * config/rs6000/vsx.md (*vsx_le_permute_<mode>): Add support for
20577         operands residing in integer registers.
20578         (*vsx_le_perm_load_<mode>): Likewise.
20579         (*vsx_le_perm_store_<mode>): Likewise.
20580         (define_peephole2): Add peepholes to optimize the above.
20581
20582 2017-08-17  Marek Polacek  <polacek@redhat.com>
20583
20584         PR middle-end/81814
20585         * fold-const.c (operand_equal_for_comparison_p): Remove code that used
20586         to mimic what shorten_compare did.  Change the return type to bool.
20587         (fold_cond_expr_with_comparison): Update call to
20588         operand_equal_for_comparison_p.
20589         (fold_ternary_loc): Likewise.
20590
20591 2017-08-17  Jackson Woodruff  <jackson.woodruff@arm.com>
20592
20593         * aarch64-simd.md (mov<mode>): No longer force zero immediate into
20594         register.
20595         (*aarch64_simd_mov<mode>): Add new case for stp using zero immediate.
20596
20597 2017-08-17  Richard Biener  <rguenther@suse.de>
20598
20599         * tree-ssa-structalias.c (solve_graph): When propagating
20600         to successors update the graphs succ edges and avoid duplicate work.
20601
20602 2017-08-17  Maxim Ostapenko  <m.ostapenko@samsung.com>
20603
20604         PR target/81861
20605         * config/i386/i386.c (ix86_option_override_internal): Save target
20606         specific options after ix86_stack_protector_guard_reg was changed.
20607
20608 2017-08-17  Richard Biener  <rguenther@suse.de>
20609
20610         PR tree-optimization/81827
20611         * tree-ssa-structalias.c (struct variable_info): Add is_reg_var flag.
20612         (new_var_info): Initialize it conservatively.
20613         (get_call_vi): Mark register vars.
20614         (new_scalar_tmp_constraint_exp): Likewise.
20615         (handle_rhs_call): Likewise.
20616         (handle_const_call): Likewise.
20617         (create_function_info_for): Likewise.
20618         (solve_constraints): Sort varinfos to separate register from
20619         non-register vars to pack points-to solution bitmaps during
20620         iteration.
20621
20622 2017-08-17  Marek Polacek  <polacek@redhat.com>
20623
20624         * gimplify.c (gimplify_adjust_omp_clauses): Compare with 0 instead of 1.
20625
20626 2017-08-17  Richard Biener  <rguenther@suse.de>
20627
20628         * tree-vrp.c (vrp_int_const_binop): Do not set *overflow_p
20629         to true when overflow is undefined and we saturated the result.
20630
20631 2017-08-17  Alan Modra  <amodra@gmail.com>
20632
20633         PR target/80938
20634         * config/rs6000/rs6000.c (rs6000_savres_strategy): Revert 2017-08-09.
20635         Don't use store multiple if only one reg needs saving.
20636         (interesting_frame_related_regno): New function.
20637         (rs6000_frame_related): Don't emit frame info for regs that
20638         don't need saving.
20639         (rs6000_emit_epilogue): Likewise.
20640
20641 2017-08-16  Nathan Sidwell  <nathan@acm.org>
20642
20643         * tree-core.h (tree_type_non_common): Rename binfo to lang_1.
20644         * tree.h (TYPE_BINFO): Use type_non_common.maxval.
20645         (TYPE_LANG_SLOT_1): Use type_non_common.lang_1, for any type.
20646         * tree.c (free_lang_data_in_type): Use else-if chain.  Always
20647         clear TYPE_LANG_1.  Remove obsolete member-function stripping.
20648         (find_decls_types_r): Comment about TYPE_MAX_VALUES_RAW.
20649         (verify_type): Adjust for TYPE_BINFO move.
20650         * lto-streamer-out.c (DFS::DFS_write_tree_body): No need to
20651         process TYPE_BINFO directly.
20652         (hash_tree): Likewise.
20653         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
20654         Likewise.
20655         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
20656         Likewise.
20657
20658 2017-08-16  David Malcolm  <dmalcolm@redhat.com>
20659
20660         * diagnostic-show-locus.c (colorizer::m_caret): Remove unused field.
20661
20662 2017-08-16  Uros Bizjak  <ubizjak@gmail.com>
20663
20664         PR target/46091
20665         * config/i386/i386.md (*anddi_1_btr): Change predicates of
20666         operand 0 and operand 1 to nomimmediate_operand. Add "m" constraint.
20667         Add ix86_binary_operator_ok to insn constraint.
20668         (*iordi_1_bts): Ditto.
20669         (*xordi_1_btc): Ditto.
20670         (*btsq): Change predicate of operand 0 to nonimmediate_operand.
20671         Update corresponding peephole2 pattern.
20672         (*btrq): Ditto.
20673         (*btcq): Ditto.
20674
20675 2017-08-16  Bin Cheng  <bin.cheng@arm.com>
20676
20677         PR tree-optimization/81832
20678         * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Don't
20679         copy loop header which has IFN_LOOP_DIST_ALIAS call.
20680
20681 2017-08-16  Marek Polacek  <polacek@redhat.com>
20682
20683         PR middle/81695
20684         * fold-const.c (fold_indirect_ref_1): Restore original behavior
20685         regarding size_zero_node.
20686
20687 2017-08-16  Martin Liska  <mliska@suse.cz>
20688
20689         PR target/81753
20690         * config.gcc: Respect previously set extra_objs in case
20691         of darwin target.
20692
20693 2017-08-16  Richard Sandiford  <richard.sandiford@linaro.org>
20694
20695         PR tree-optimization/81835
20696         * tree-vect-loop.c (vect_is_simple_reduction): Simply checks for
20697         the phi SSA_NAME.  Check that the condition in a COND_EXPR does
20698         not depend on the phi.
20699
20700 2017-08-16  Alan Modra  <amodra@gmail.com>
20701
20702         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Delete
20703         dead code.
20704
20705 2017-08-16  Alan Modra  <amodra@gmail.com>
20706
20707         * config/rs6000/rs6000.c (rs6000_reg_live_or_pic_offset_p): Merge..
20708         (save_reg_p): ..into this.  Update all callers.
20709         (first_reg_to_save): Simplify.
20710
20711 2017-08-16  Alan Modra  <amodra@gmail.com>
20712
20713         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't restore
20714         fixed regs.
20715
20716 2017-08-15  Joseph Myers  <joseph@codesourcery.com>
20717
20718         PR target/78460
20719         PR target/67712
20720         * config/sh/sh-mem.cc (sh_expand_cmpnstr): Only unroll for
20721         constant count if that count is less than 32.
20722
20723 2017-08-15  Nathan Sidwell  <nathan@acm.org>
20724
20725         * gcc.c (execute): Emit friendlier message if inferior is killed
20726         by an external cause.
20727
20728 2017-08-15  Richard Biener  <rguenther@suse.de>
20729
20730         PR tree-optimization/81790
20731         * tree-ssa-sccvn.c (vn_lookup_simplify_result): Handle both
20732         CONSTRUCTORs from simplifying and VN.
20733
20734 2017-08-14  Martin Sebor  <msebor@redhat.com>
20735
20736         * builtin-attrs.def: Add comments.
20737
20738 2017-08-14  Martin Sebor  <msebor@redhat.com>
20739
20740         PR c/81117
20741         * doc/extend.texi (attribute nonstring): Document new attribute.
20742
20743 2017-08-14  Martin Sebor  <msebor@redhat.com>
20744
20745         PR c/81117
20746         * tree-diagnostic.c (default_tree_printer): Handle %G.
20747         * gimple-pretty-print.h (percent_G_format): Declare new function.
20748         * gimple-pretty-print.c (percent_G_format): Define.
20749         * tree-pretty-print.c (percent_K_format): Add argument.
20750
20751 2017-08-14  Martin Sebor  <msebor@redhat.com>
20752
20753         PR translation/79998
20754         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call):
20755         Remove a stray space.
20756
20757 2017-08-14  Uros Bizjak  <ubizjak@gmail.com>
20758
20759         PR target/46091
20760         * config/i386/i386.md (*anddi_1_btr): New insn_and_split pattern.
20761         (*iordi_1_bts): Ditto.
20762         (*xordi_1_btc): Ditto.
20763
20764 2017-08-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
20765
20766         PR target/79845
20767         * config/rs6000/linux64.h (INVALID_64BIT): Use quoted strings.
20768         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
20769         Likewise.
20770         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Use
20771         quoted strings, and make more translator-friendly.
20772         (darwin_rs6000_override_options): Likewise.
20773         (rs6000_option_override_internal): Likewise.
20774         (rs6000_return_in_memory): Fix overlong line.
20775         (init_cmulative_args): Use quoted strings, and make more
20776         translator-friendly.
20777         (rs6000_pass_by_reference): Fix overlong line.
20778         (def_builtin): Use quoted strings.
20779         (altivec_expand_predicate_builtin): Use quoted strings, and make
20780         more translator-friendly.
20781         (htm_expand_builtin): Use quoted strings.
20782         (cpu_expand_builtin): Use quoted strings, and make more
20783         translator-friendly.
20784         (altivec_expand_builtin): Likewise.
20785         (paired_expand_predicate_builtin): Likewise.
20786         (rs6000_invalid_builtin): Likewise.
20787         (builtin_function_type): Use quoted strings.
20788         (rs6000_expand_split_stack_prologue): Use quoted strings, and make
20789         more translator-friendly.
20790         (rs6000_trampoline_init): Likewise.
20791         (rs6000_handle_altivec_attribute): Likewise.
20792         (rs6000_inner_target_options): Use quoted strings.
20793         (rs6000_disable_incompatible_switches): Likewise.
20794         * config/rs6000/sysv4.h (SUBTARGET_OVERRIDE_OPTIONS): Use quoted
20795         strings, and make more translator-friendly.
20796         (SUBSUBTARGET_OVERRIDE_OPTIONS): Use quoted strings.
20797
20798 2017-08-14  Bin Cheng  <bin.cheng@arm.com>
20799
20800         PR tree-optimization/81799
20801         * tree-loop-distribution.c (version_loop_by_alias_check): Force
20802         cond_expr to simple gimple operand.
20803
20804 2017-08-14  Wilco Dijkstra  <wdijkstr@arm.com>
20805
20806         PR middle-end/46932
20807         * doc/sourcebuild.texi (autoincdec): Add autoincdec description.
20808
20809 2017-08-14  Georg-Johann Lay  <avr@gjlay.de>
20810
20811         PR target/81754
20812         PR target/81268
20813         * config/avr/avr.opt (mgas-isr-prologues): New Var avr_gasisr_prologues.
20814         * config/avr/avr.md (gasisr, *gasisr): Use it instead of
20815         TARGET_GASISR_PROLOGUES.
20816         * config/avr/avr.c (avr_option_override): Same.
20817         (avr_pass_pre_proep::execute): Same.
20818
20819 2017-08-13  H.J. Lu  <hongjiu.lu@intel.com>
20820
20821         PR target/81820
20822         * config/i386/i386.c (ix86_finalize_stack_frame_flags): Replace
20823         frame pointer with stack pointer - UNITS_PER_WORD in debug insns.
20824
20825 2017-08-13  Uros Bizjak  <ubizjak@gmail.com>
20826
20827         * config/i386/i386.md (*load_tp_<mode>): Redefine as
20828         define_insn_and_split.  Split to a memory load from 0 in
20829         DEFAULT_TLS_SEG_REG address space.  Merge with *load_tp_x32
20830         using PTR mode iterator.
20831         (*load_tp_x32_zext"): Redefine as define_insn_and_split.
20832         Split to a memory load from 0 in DEFAULT_TLS_SEG_REG address space.
20833         (*add_tp_<mode>): Redefine as define_insn_and_split.
20834         Split to an add with a memory load from 0 in DEFAULT_TLS_SEG_REG
20835         address space.  Merge with *add_tp_x32 using PTR mode iterator.
20836         (*add_tp_x32_zext"): Redefine as define_insn_and_split.
20837         Split to an add with a  memory load from 0 in
20838         DEFAULT_TLS_SEG_REG address space.
20839
20840 2017-08-12  Andrew Pinski  <apinski@cavium.com>
20841
20842         * config/aarch64/aarch64-option-extensions.def (rdma):
20843         Fix feature string to what Linux prints out in /proc/cpuinfo.
20844
20845 2017-08-12  Pierre-Marie de Rodat  <derodat@adacore.com>
20846
20847         PR ada/79542
20848         * dwarf2out.c (modified_type_die): For C typedef types that have
20849         an ultimate origin, process the ultimate origin instead of the
20850         input type.
20851         (gen_typedef_die): Assert that input DECLs have no ultimate
20852         origin.
20853         (gen_type_die_with_usage): For typedef variants that have an
20854         ultimate origin, just call gen_decl_die on the original DECL.
20855         (process_scope_var): Avoid creating DIEs for local typedefs and
20856         concrete static variables.
20857
20858 2017-08-12  Alan Modra  <amodra@gmail.com>
20859
20860         PR target/81170
20861         PR target/81295
20862         * config/rs6000/sysv4.h (STARTFILE_LINUX_SPEC): Upgrade to
20863         match gnu-user.h startfile.
20864         (ENDFILE_LINUX_SPEC): Similarly.
20865
20866 2017-08-11  Thomas Schwinge  <thomas@codesourcery.com>
20867
20868         PR lto/81430
20869         * config/nvptx/nvptx.c (nvptx_override_options_after_change):
20870         Remove function.
20871         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Remove definition.
20872
20873 2017-08-11  Tamar Christina  <tamar.christina@arm.com>
20874         * config/aarch64/aarch64.md (mov<mode>): Change.
20875         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
20876         aarch64_reg_or_fp_float into aarch64_reg_or_fp_zero.
20877         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): Removed.
20878
20879 2017-08-11  Eric Botcazou  <ebotcazou@adacore.com>
20880
20881         * tree-sra.c (build_access_from_expr_1): Use more precise diagnostics
20882         for storage order barriers.
20883
20884 2017-08-11  Martin Liska  <mliska@suse.cz>
20885
20886         PR tree-opt/79987
20887         * tree-chkp.c (chkp_get_bounds_for_decl_addr): Do not instrument
20888         variables of void type.
20889
20890 2017-08-11  Martin Liska  <mliska@suse.cz>
20891
20892         * asan.c (asan_protect_global): Replace ASM_OUTPUT_DEF with
20893         TARGET_SUPPORTS_ALIASES.
20894         * cgraph.c (cgraph_node::create_same_body_alias): Likewise.
20895         * ipa-visibility.c (can_replace_by_local_alias): Likewise.
20896         (optimize_weakref): Likewise.
20897         * symtab.c (symtab_node::noninterposable_alias): Likewise.
20898         * varpool.c (varpool_node::create_extra_name_alias): Likewise.
20899         * defaults.h: Introduce TARGET_SUPPORTS_ALIASES.
20900
20901 2017-08-11  Martin Liska  <mliska@suse.cz>
20902
20903         PR ipa/81213
20904         * config/i386/i386.c (make_resolver_func): Do complete
20905         refactoring of the function.
20906
20907 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
20908
20909         PR target/81708
20910         * config/i386/i386.opt (mstack-protector-guard-symbol=): New option
20911         * config/i386/i386.c (ix86_stack_protect_guard): Use
20912         ix86_stack_protect_guard_symbol_str to generate varible declaration.
20913         * doc/invoke.texi (x86 Options): Document
20914         -mstack-protector-guard-symbol= option.
20915
20916 2017-08-10  Uros Bizjak  <ubizjak@gmail.com>
20917
20918         * config/i386/i386-protos.h (ix86_split_stack_guard): New prototype.
20919         * config/i386/i386.c (ix86_split_stack_guard): New function.
20920         (ix86_xpand_split_stack_prologue): Call ix86_split_stack_guard.
20921         (ix86_legitimate_address_p) <case UNSPEC_STACK_CHECK>: Remove.
20922         (i386_asm_output_addr_const_extra) <case UNSPEC_STACK_CHECK>: Ditto.
20923         (optput_pic_addr_const): Remove UNSPEC_STACK_CHECK handling.
20924         * config/i386/i386.md (unspec): Remove UNSPEC_STACK_CHECK.
20925         (split_stack_space_check): Call ix86_split_stack_guard.
20926
20927 2017-08-10  Martin Sebor  <msebor@redhat.com>
20928
20929         * print-tree.c (print_node): Print location using the established
20930         format %s:%i%i.
20931         Replace spaces with colons.
20932         (debug_raw, debug): Ditto.
20933
20934 2017-08-10  Martin Sebor  <msebor@redhat.com>
20935
20936         PR c++/81586
20937         * pretty-print.c (pp_format): Correct the handling of %s precision.
20938
20939 2017-08-10  H.J. Lu  <hongjiu.lu@intel.com>
20940
20941         PR target/81736
20942         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
20943         to ...
20944         (ix86_finalize_stack_frame_flags): This.  Also clear
20945         frame_pointer_needed if -fno-omit-frame-pointer is used without
20946         stack access.
20947         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
20948         with ix86_finalize_stack_frame_flags.
20949         (ix86_expand_epilogue): Likewise.
20950         (ix86_expand_split_stack_prologue): Likewise.
20951         * doc/invoke.texi: Add a note for -fno-omit-frame-pointer.
20952
20953 2017-08-10  Martin Liska  <mliska@suse.cz>
20954
20955         PR c++/81355
20956         * c-attribs.c (handle_target_attribute):
20957         Report warning for an empty string argument of target attribute.
20958
20959 2017-08-09  Jakub Jelinek  <jakub@redhat.com>
20960
20961         PR c/81687
20962         * omp-low.c (omp_copy_decl): Don't remap FORCED_LABEL or DECL_NONLOCAL
20963         LABEL_DECLs.
20964         * tree-cfg.c (move_stmt_op): Don't adjust DECL_CONTEXT of FORCED_LABEL
20965         or DECL_NONLOCAL labels.
20966         (move_stmt_r) <case GIMPLE_LABEL>: Adjust DECL_CONTEXT of FORCED_LABEL
20967         or DECL_NONLOCAL labels here.
20968
20969 2017-08-09  Will Schmidt  <will_schmidt@vnet.ibm.com>
20970
20971         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add blurb
20972         to indicate when early gimple folding has been disabled.
20973         (rs6000_gimple_fold_builtin): Add debug content.
20974         (rs6000_invalid_builtin): Fix whitespace.
20975         (rs6000_expand_builtin): Fix whitespace.
20976         * config/rs6000/rs6000.opt: Add option for -mfold-gimple.
20977
20978 2017-08-09  Segher Boessenkool  <segher@kernel.crashing.org>
20979
20980         PR target/80938
20981         * config/rs6000/rs6000.c (rs6000_savres_strategy): Don't use
20982         SAVE_MULTIPLE if not all the registers that saves, should be saved.
20983
20984 2017-08-09  Jim Wilson  <jim.wilson@linaro.org>
20985
20986         * config/aarch64/aarch64-cores.def (falkor): Use falkor pipeline.
20987         (qdf24xx): Likewise.
20988         * config/aarch64/aarch64.md: Include falkor.md.
20989         * config/aarch64/falkor.md: New.
20990
20991 2017-08-09  Marek Polacek  <polacek@redhat.com>
20992
20993         PR c/81233
20994         * diagnostic-core.h (emit_diagnostic_valist): Add declaration.
20995         * diagnostic.c (emit_diagnostic): Add a comment.
20996         (emit_diagnostic_valist): New function.
20997
20998 2017-08-09  Marek Polacek  <polacek@redhat.com>
20999
21000         PR c/81417
21001         * input.c (make_location): New overload.
21002         * input.h (make_location): Declare.
21003
21004 2017-08-08  Alan Modra  <amodra@gmail.com>
21005             H.J. Lu  <hongjiu.lu@intel.com>
21006
21007         PR driver/81523
21008         * gcc.c (NO_PIE_SPEC): Delete.
21009         (PIE_SPEC): Define as !no-pie/pie.  Move static|shared|r
21010         exclusion..
21011         (LINK_PIE_SPEC): ..to here.
21012         (LINK_COMMAND_SPEC): Support -no-pie.
21013         * config/gnu-user.h (GNU_USER_TARGET_STARTFILE_SPEC): Correct
21014         chain of crtbegin*.o selection, update for PIE_SPEC changes and
21015         format.
21016         (GNU_USER_TARGET_ENDFILE_SPEC): Similarly.
21017         * config/sol2.h (STARTFILE_CRTBEGIN_SPEC): Similarly.
21018         (ENDFILE_CRTEND_SPEC): Similarly.
21019
21020 2017-08-08  Uros Bizjak  <ubizjak@gmail.com>
21021
21022         PR target/81708
21023         * config/i386/i386.opt (mstack-protector-guard-reg=): New option
21024         (mstack-protector-guard-offset=): Ditto.
21025         * config/i386/i386.c (ix86_option_override): Handle
21026         -mstack-protector-guard-reg= and -mstack-protector-guard-offset=
21027         options.
21028         (ix86_stack_protect_guard): Use ix86_stack_protect_guard_reg and
21029         ix86_stack_protect_guard_offset variables.
21030         (TARGET_STACK_PROTECT_GUARD): Always define.
21031         * doc/invoke.texi (x86 Options): Document -mstack-protector-guard-reg=
21032         and -mstack-protector-guard-offset= options.
21033
21034 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
21035
21036         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): Handle
21037         boundary case for the last candidate.
21038
21039 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
21040
21041         * doc/invoke.texi: Document -ftree-loop-distribution for O3.
21042         * opts.c (default_options_table): Add OPT_ftree_loop_distribution.
21043
21044 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
21045
21046         PR middle-end/19706
21047         * config/aarch64/aarch64.md (xorsign<mode>3): New optabs.
21048         * config/aarch64/aarch64-builtins.c
21049         (aarch64_builtin_vectorized_function): Added CASE_CFN_XORSIGN.
21050         * config/aarch64/aarch64-simd-builtins.def: Added xorsign BINOP.
21051         * config/aarch64/aarch64-simd.md: Added xorsign<mode>3
21052
21053 2017-08-08  Tamar Christina  <tamar.christina@arm.com>
21054             Andrew Pinski <pinskia@gmail.com>
21055
21056         PR middle-end/19706
21057         * internal-fn.def (XORSIGN): New.
21058         * optabs.def (xorsign_optab): New.
21059         * tree-ssa-math-opts.c (is_copysign_call_with_1): New.
21060         (convert_expand_mult_copysign): New.
21061         (pass_optimize_widening_mul::execute): Call
21062         convert_expand_mult_copysign.
21063
21064 2017-08-08  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21065
21066         PR tree-optimization/81354
21067         * gimple-ssa-strength-reduction.c (create_add_on_incoming_edge):
21068         Insert on edges rather than explicitly creating landing pads.
21069         (analyze_candidates_and_replace): Commit edge inserts.
21070
21071 2017-08-08  Richard Biener  <rguenther@suse.de>
21072
21073         PR middle-end/81719
21074         * tree-ssa-loop-niter.c: Include tree-dfa.h.
21075         (expand_simple_operations): Also look through ADDR_EXPRs with
21076         MEM_REF bases treating them as POINTER_PLUS_EXPR.
21077
21078 2017-08-08  Richard Biener  <rguenther@suse.de>
21079
21080         PR tree-optimization/81723
21081         * tree-vect-slp.c (struct bst_traits): New hash traits.
21082         (bst_fail): New global.
21083         (vect_build_slp_tree_2): New worker, split out from ...
21084         (vect_build_slp_tree): ... this now wrapping it with using
21085         bst_fail set to cache SLP tree build fails.  Properly handle
21086         max_tree_size.
21087         (vect_analyze_slp_instance): Allocate and free bst_fail.
21088
21089 2017-08-08  Martin Liska  <mliska@suse.cz>
21090
21091         PR tree-opt/81696
21092         * ipa-icf-gimple.c (func_checker::compare_cst_or_decl): Consider
21093         LABEL_DECLs that can be from a different function.
21094
21095 2017-08-08  Bin Cheng  <bin.cheng@arm.com>
21096
21097         PR tree-optimization/81744
21098         * tree-predcom.c (prepare_finalizers_chain): Deep copy expr of
21099         loop's number of iterations.
21100
21101 2017-08-08  Martin Liska  <mliska@suse.cz>
21102
21103         * asan.c: Include header files.
21104         * attribs.c (build_decl_attribute_variant): New function moved
21105         from tree.[ch].
21106         (build_type_attribute_qual_variant): Likewise.
21107         (cmp_attrib_identifiers): Likewise.
21108         (simple_cst_list_equal): Likewise.
21109         (omp_declare_simd_clauses_equal): Likewise.
21110         (attribute_value_equal): Likewise.
21111         (comp_type_attributes): Likewise.
21112         (build_type_attribute_variant): Likewise.
21113         (lookup_ident_attribute): Likewise.
21114         (remove_attribute): Likewise.
21115         (merge_attributes): Likewise.
21116         (merge_type_attributes): Likewise.
21117         (merge_decl_attributes): Likewise.
21118         (merge_dllimport_decl_attributes): Likewise.
21119         (handle_dll_attribute): Likewise.
21120         (attribute_list_equal): Likewise.
21121         (attribute_list_contained): Likewise.
21122         * attribs.h (lookup_attribute): New function moved from tree.[ch].
21123         (lookup_attribute_by_prefix): Likewise.
21124         * bb-reorder.c: Include header files.
21125         * builtins.c: Likewise.
21126         * calls.c: Likewise.
21127         * cfgexpand.c: Likewise.
21128         * cgraph.c: Likewise.
21129         * cgraphunit.c: Likewise.
21130         * convert.c: Likewise.
21131         * dwarf2out.c: Likewise.
21132         * final.c: Likewise.
21133         * fold-const.c: Likewise.
21134         * function.c: Likewise.
21135         * gimple-expr.c: Likewise.
21136         * gimple-fold.c: Likewise.
21137         * gimple-pretty-print.c: Likewise.
21138         * gimple.c: Likewise.
21139         * gimplify.c: Likewise.
21140         * hsa-common.c: Likewise.
21141         * hsa-gen.c: Likewise.
21142         * internal-fn.c: Likewise.
21143         * ipa-chkp.c: Likewise.
21144         * ipa-cp.c: Likewise.
21145         * ipa-devirt.c: Likewise.
21146         * ipa-fnsummary.c: Likewise.
21147         * ipa-inline.c: Likewise.
21148         * ipa-visibility.c: Likewise.
21149         * ipa.c: Likewise.
21150         * lto-cgraph.c: Likewise.
21151         * omp-expand.c: Likewise.
21152         * omp-general.c: Likewise.
21153         * omp-low.c: Likewise.
21154         * omp-offload.c: Likewise.
21155         * omp-simd-clone.c: Likewise.
21156         * opts-global.c: Likewise.
21157         * passes.c: Likewise.
21158         * predict.c: Likewise.
21159         * sancov.c: Likewise.
21160         * sanopt.c: Likewise.
21161         * symtab.c: Likewise.
21162         * toplev.c: Likewise.
21163         * trans-mem.c: Likewise.
21164         * tree-chkp.c: Likewise.
21165         * tree-eh.c: Likewise.
21166         * tree-into-ssa.c: Likewise.
21167         * tree-object-size.c: Likewise.
21168         * tree-parloops.c: Likewise.
21169         * tree-profile.c: Likewise.
21170         * tree-ssa-ccp.c: Likewise.
21171         * tree-ssa-live.c: Likewise.
21172         * tree-ssa-loop.c: Likewise.
21173         * tree-ssa-sccvn.c: Likewise.
21174         * tree-ssa-structalias.c: Likewise.
21175         * tree-ssa.c: Likewise.
21176         * tree-streamer-in.c: Likewise.
21177         * tree-vectorizer.c: Likewise.
21178         * tree-vrp.c: Likewise.
21179         * tsan.c: Likewise.
21180         * ubsan.c: Likewise.
21181         * varasm.c: Likewise.
21182         * varpool.c: Likewise.
21183         * tree.c: Remove functions moved to attribs.[ch].
21184         * tree.h: Likewise.
21185         * config/aarch64/aarch64.c: Add attrs.h header file.
21186         * config/alpha/alpha.c: Likewise.
21187         * config/arc/arc.c: Likewise.
21188         * config/arm/arm.c: Likewise.
21189         * config/avr/avr.c: Likewise.
21190         * config/bfin/bfin.c: Likewise.
21191         * config/c6x/c6x.c: Likewise.
21192         * config/cr16/cr16.c: Likewise.
21193         * config/cris/cris.c: Likewise.
21194         * config/darwin.c: Likewise.
21195         * config/epiphany/epiphany.c: Likewise.
21196         * config/fr30/fr30.c: Likewise.
21197         * config/frv/frv.c: Likewise.
21198         * config/ft32/ft32.c: Likewise.
21199         * config/h8300/h8300.c: Likewise.
21200         * config/i386/winnt.c: Likewise.
21201         * config/ia64/ia64.c: Likewise.
21202         * config/iq2000/iq2000.c: Likewise.
21203         * config/lm32/lm32.c: Likewise.
21204         * config/m32c/m32c.c: Likewise.
21205         * config/m32r/m32r.c: Likewise.
21206         * config/m68k/m68k.c: Likewise.
21207         * config/mcore/mcore.c: Likewise.
21208         * config/microblaze/microblaze.c: Likewise.
21209         * config/mips/mips.c: Likewise.
21210         * config/mmix/mmix.c: Likewise.
21211         * config/mn10300/mn10300.c: Likewise.
21212         * config/moxie/moxie.c: Likewise.
21213         * config/msp430/msp430.c: Likewise.
21214         * config/nds32/nds32-isr.c: Likewise.
21215         * config/nds32/nds32.c: Likewise.
21216         * config/nios2/nios2.c: Likewise.
21217         * config/nvptx/nvptx.c: Likewise.
21218         * config/pa/pa.c: Likewise.
21219         * config/pdp11/pdp11.c: Likewise.
21220         * config/powerpcspe/powerpcspe.c: Likewise.
21221         * config/riscv/riscv.c: Likewise.
21222         * config/rl78/rl78.c: Likewise.
21223         * config/rx/rx.c: Likewise.
21224         * config/s390/s390.c: Likewise.
21225         * config/sh/sh.c: Likewise.
21226         * config/sol2.c: Likewise.
21227         * config/sparc/sparc.c: Likewise.
21228         * config/spu/spu.c: Likewise.
21229         * config/stormy16/stormy16.c: Likewise.
21230         * config/tilegx/tilegx.c: Likewise.
21231         * config/tilepro/tilepro.c: Likewise.
21232         * config/v850/v850.c: Likewise.
21233         * config/vax/vax.c: Likewise.
21234         * config/visium/visium.c: Likewise.
21235         * config/xtensa/xtensa.c: Likewise.
21236
21237 2017-08-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
21238
21239         PR target/81593
21240         * config/rs6000/vsx.md (vsx_concat_<mode>, VSX_D): Cleanup
21241         constraints since the -mupper-regs-* switches have been
21242         eliminated.
21243         (vsx_concat_<mode>_1): New combiner insns to recognize inserting
21244         into a vector from a double word element that was extracted from
21245         another vector, and eliminate extra XXPERMDI instructions.
21246         (vsx_concat_<mode>_2): Likewise.
21247         (vsx_concat_<mode>_3): Likewise.
21248         (vsx_set_<mode>, VSX_D): Rewrite vector set in terms of vector
21249         concat to allow optimizing inserts from previous extracts.
21250
21251 2017-08-07  Uros Bizjak  <ubizjak@gmail.com>
21252
21253         * config/i386/i386.c (ix86_stack_protect_guard): Generate
21254         memory reference to a SSP offset in TLS address space.
21255         (ix86_print_operand) <case '@'>: Remove.
21256         (ix86_print_operand_punct_valid_p): Remove '@' code.
21257         * config/i386/i386.md (unspec): Remove UNSPEC_SP_TLS_SET and
21258         UNSPEC_SP_TLS_TEST.
21259         (stack_tls_protect_set_<mode>): Remove.
21260         (stack_protect_set): Do not call gen_stack_tls_protect_set_<mode>.
21261         (stack_tls_protect_test_<mode>): Remove.
21262         (stack_protect_test): Do not call gen_stack_tls_protect_test_<mode>.
21263
21264 2017-08-07  Olivier Hainque  <hainque@adacore.com>
21265
21266         PR target/81755
21267         * config/vxworksae.h (VXWORKS_HAVE_TLS): Define.
21268
21269 2017-08-07  Douglas Rupp  <rupp@adacore.com>
21270
21271         * Makefile.in (install-mkheaders): Fix typo, where the multi_dir
21272         variable was referenced as multidir in command.
21273
21274 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
21275
21276         PR c/69389
21277         * gimplify.c (goa_stabilize_expr): Handle BIT_INSERT_EXPR and
21278         BIT_FIELD_REF.
21279
21280 2017-08-07  Martin Liska  <mliska@suse.cz>
21281
21282         * config/m32c/m32c.c: Add include of stringpool.h and attribs.h.
21283         * config/rl78/rl78.c: Add include of attribs.h.
21284         * config/sh/sh.c: Likewise.
21285         * config/v850/v850.c: Likewise.
21286
21287 2017-08-07  Tom de Vries  <tom@codesourcery.com>
21288
21289         PR middle-end/78266
21290         * omp-expand.c (expand_oacc_for): Ensure diff_type is large enough.
21291
21292 2017-08-07  Martin Liska  <mliska@suse.cz>
21293
21294         * config/mips/mips.c: Include attribs.h.
21295
21296 2017-08-07  Thomas Koenig  <tkoenig@gcc.gnu.org>
21297
21298         PR fortran/68829
21299         * doc/invoke.texi: Document change in behvaior for -Ofast for
21300         Fortran.
21301
21302 2017-08-07  Wilco Dijkstra  <wdijkstr@arm.com>
21303
21304         * config/aarch64/aarch64.c (aarch64_pushwb_single_reg):
21305         Use gen_frame_mem.
21306         (aarch64_pop_regs): Likewise.
21307         (aarch64_gen_load_pair): Likewise.
21308         (aarch64_save_callee_saves): Likewise.
21309         (aarch64_restore_callee_saves): Likewise.
21310
21311 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
21312
21313         * config/i386/i386.c: Revert the last change.
21314
21315 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
21316
21317         PR target/81736
21318         * config/i386/i386.c (ix86_finalize_stack_realign_flags): Renamed
21319         to ...
21320         (ix86_finalize_stack_frame_flags): This.  Also clear
21321         frame_pointer_needed if -fno-omit-frame-pointer is used without
21322         stack access.
21323         (ix86_expand_prologue): Replace ix86_finalize_stack_realign_flags
21324         with ix86_finalize_stack_frame_flags.
21325         (ix86_expand_epilogue): Likewise.
21326         (ix86_expand_split_stack_prologue): Likewise.
21327
21328 2017-08-07  H.J. Lu  <hongjiu.lu@intel.com>
21329
21330         PR target/81743
21331         * config/i386/i386.c (get_builtin_code_for_version): Set priority
21332         to P_AES for Westmere.
21333
21334 2017-08-07  Jonathan Yong  <10walls@gmail.com>
21335
21336         * config/i386/mingw.opt (fset-stack-executable): Removed.
21337         * config/i386/cygming.opt (fset-stack-executable): Moved
21338         from mingw.opt.
21339         * config/i386/cygwin.h: Define CHECK_EXECUTE_STACK_ENABLED.
21340
21341 2017-08-07  Segher Boessenkool  <segher@kernel.crashing.org>
21342
21343         * print-rtl.c (print_exp): Print NOT as "~" instead of as "!".
21344
21345 2017-08-07  Marek Polacek  <polacek@redhat.com>
21346
21347         PR middle-end/81737
21348         * fold-const.c (fold_indirect_ref_1): Check type_domain.
21349
21350 2017-08-07  Martin Liska  <mliska@suse.cz>
21351
21352         * attribs.h (canonicalize_attr_name): New function.
21353         (cmp_attribs): Move from c-format.c and adjusted.
21354         (is_attribute_p): Moved from tree.h.
21355         * tree-inline.c: Add new includes.
21356         * tree.c (cmp_attrib_identifiers): Use cmp_attribs.
21357         (private_is_attribute_p): Remove.
21358         (private_lookup_attribute): Likewise.
21359         (private_lookup_attribute_by_prefix): Simplify.
21360         (remove_attribute): Use is_attribute_p.
21361         * tree.h: Remove removed declarations.
21362
21363 2017-08-07  Jakub Jelinek  <jakub@redhat.com>
21364
21365         PR middle-end/81698
21366         * stmt.c (emit_case_dispatch_table): Add DEFAULT_EDGE argument,
21367         instead of computing it in the function.  Formatting fix.
21368         (expand_case): Don't rely on default_edge being the first edge,
21369         clear it if removing it, pass default_edge to
21370         emit_case_dispatch_table.
21371         (expand_sjlj_dispatch_table): Pass NULL as DEFAULT_EDGE, formatting
21372         fix.
21373
21374 2017-08-06  Uros Bizjak  <ubizjak@gmail.com>
21375
21376         * config/alpha/alpha.c (alpha_reorg): If trap is the last active
21377         insn in the function, emit NOP after the insn.
21378
21379 2017-08-06  Tom de Vries  <tom@codesourcery.com>
21380
21381         * omp-expand.c (expand_oacc_for): Add missing edge probability for tile
21382         and element loops.
21383
21384 2017-08-06  Tom de Vries  <tom@codesourcery.com>
21385
21386         * omp-expand.c (expand_oacc_for): Add missing edge probability for chunk
21387         loop.
21388
21389 2017-08-04  Yury Gribov  <tetra2005@gmail.com>
21390
21391         PR tree-optimization/57371
21392         * match.pd: New pattern.
21393
21394 2017-08-04  Marek Polacek  <polacek@redhat.com>
21395
21396         PR middle-end/81695
21397         * fold-const.c (fold_indirect_ref_1): For ((int *)&a + 4 -> a[1],
21398         perform the computation in offset_int.
21399
21400 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
21401
21402         PR tree-optimization/81136
21403         * tree-vectorizer.h: Include tree-hash-traits.h.
21404         (vec_base_alignments): New typedef.
21405         (vec_info): Add a base_alignments field.
21406         (vect_record_base_alignments): Declare.
21407         * tree-data-ref.h (data_reference): Add an is_conditional_in_stmt
21408         field.
21409         (DR_IS_CONDITIONAL_IN_STMT): New macro.
21410         (create_data_ref): Add an is_conditional_in_stmt argument.
21411         * tree-data-ref.c (create_data_ref): Likewise.  Use it to initialize
21412         the is_conditional_in_stmt field.
21413         (data_ref_loc): Add an is_conditional_in_stmt field.
21414         (get_references_in_stmt): Set the is_conditional_in_stmt field.
21415         (find_data_references_in_stmt): Update call to create_data_ref.
21416         (graphite_find_data_references_in_stmt): Likewise.
21417         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Likewise.
21418         * tree-vect-data-refs.c (vect_analyze_data_refs): Likewise.
21419         (vect_record_base_alignment): New function.
21420         (vect_record_base_alignments): Likewise.
21421         (vect_compute_data_ref_alignment): Adjust base_addr and aligned_to
21422         for nested statements even if we fail to compute a misalignment.
21423         Use pooled base alignments for unconditional references.
21424         (vect_find_same_alignment_drs): Compare base addresses instead
21425         of base objects.
21426         (vect_analyze_data_refs_alignment): Call vect_record_base_alignments.
21427         * tree-vect-slp.c (vect_slp_analyze_bb_1): Likewise.
21428
21429 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
21430
21431         * tree-vectorizer.h (vec_info): Add a constructor and destructor.
21432         Add an explicit name for the enum.  Use auto_vec for slp_instances
21433         and grouped_stores.
21434         (_loop_vec_info): Add a constructor and destructor.  Use auto_vec
21435         for all vectors.
21436         (_bb_vec_info): Add a constructor and destructor.
21437         (vinfo_for_stmt): Return NULL for uids of -1 as well.
21438         (destroy_loop_vec_info): Delete.
21439         (vect_destroy_datarefs): Likewise.
21440         * tree-vectorizer.c (vect_destroy_datarefs): Delete.
21441         (vec_info::vec_info): New function.
21442         (vec_info::~vec_info): Likewise.
21443         (vectorize_loops): Use delete instead of destroy_loop_vec_info.
21444         * tree-parloops.c (gather_scalar_reductions): Use delete instead of
21445         destroy_loop_vec_info.
21446         * tree-vect-loop.c (new_loop_vec_info): Replace with...
21447         (_loop_vec_info::_loop_vec_info): ...this.
21448         (destroy_loop_vec_info): Replace with...
21449         (_loop_vec_info::~_loop_vec_info): ...this.  Unconditionally delete
21450         the stmt_vec_infos.  Leave handling of vec_info information to its
21451         destructor.  Remove explicit vector releases.
21452         (vect_analyze_loop_form): Use new instead of new_loop_vec_info.
21453         (vect_analyze_loop): Use delete instead of destroy_loop_vec_info.
21454         * tree-vect-slp.c (new_bb_vec_info): Replace with...
21455         (_bb_vec_info::_bb_vec_info): ...this.  Don't reserve space in
21456         BB_VINFO_GROUPED_STORES or BB_VINFO_SLP_INSTANCES.
21457         (destroy_bb_vec_info): Replace with...
21458         (_bb_vec_info::~_bb_vec_info): ...this.  Leave handling of vec_info
21459         information to its destructor.
21460         (vect_slp_analyze_bb_1): Use new and delete instead of
21461         new_bb_vec_info and destroy_bb_vec_info.
21462         (vect_slp_bb): Replace 2 calls to destroy_bb_vec_info with a
21463         single delete.
21464
21465 2017-08-04  Richard Sandiford  <richard.sandiford@linaro.org>
21466
21467         * tree-data-ref.h (subscript): Add access_fn field.
21468         (data_dependence_relation): Add could_be_independent_p.
21469         (SUB_ACCESS_FN, DDR_COULD_BE_INDEPENDENT_P): New macros.
21470         (same_access_functions): Move to tree-data-ref.c.
21471         * tree-data-ref.c (ref_contains_union_access_p): New function.
21472         (access_fn_component_p): Likewise.
21473         (access_fn_components_comparable_p): Likewise.
21474         (dr_analyze_indices): Add a reference to access_fn_component_p.
21475         (dump_data_dependence_relation): Use SUB_ACCESS_FN instead of
21476         DR_ACCESS_FN.
21477         (constant_access_functions): Likewise.
21478         (add_other_self_distances): Likewise.
21479         (same_access_functions): Likewise.  (Moved from tree-data-ref.h.)
21480         (initialize_data_dependence_relation): Use XCNEW and remove
21481         explicit zeroing of DDR_REVERSED_P.  Look for a subsequence
21482         of access functions that have the same type.  Allow the
21483         subsequence to end with different bases in some circumstances.
21484         Record the chosen access functions in SUB_ACCESS_FN.
21485         (build_classic_dist_vector_1): Replace ddr_a and ddr_b with
21486         a_index and b_index.  Use SUB_ACCESS_FN instead of DR_ACCESS_FN.
21487         (subscript_dependence_tester_1): Likewise dra and drb.
21488         (build_classic_dist_vector): Update calls accordingly.
21489         (subscript_dependence_tester): Likewise.
21490         * tree-ssa-loop-prefetch.c (determine_loop_nest_reuse): Check
21491         DDR_COULD_BE_INDEPENDENT_P.
21492         * tree-vectorizer.h (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Test
21493         comp_alias_ddrs instead of may_alias_ddrs.
21494         * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
21495         New function.
21496         (vect_analyze_data_ref_dependence): Use it if
21497         DDR_COULD_BE_INDEPENDENT_P, but fall back to using the recorded
21498         distance vectors if that fails.
21499         (dependence_distance_ge_vf): New function.
21500         (vect_prune_runtime_alias_test_list): Use it.  Don't clear
21501         LOOP_VINFO_MAY_ALIAS_DDRS.
21502
21503 2017-08-04  Richard Biener  <rguenther@suse.de>
21504
21505         PR middle-end/81705
21506         * fold-const.c (fold_binary_loc): Properly restrict
21507         minus_var0 && minus_var1 case when associating undefined overflow
21508         entities.
21509
21510 2017-08-04  Tom de Vries  <tom@codesourcery.com>
21511
21512         * omp-simd-clone.c (simd_clone_adjust): Add missing edge probability.
21513
21514 2017-08-03  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
21515
21516         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
21517         Don't start diagnostic messages with a capital letter.
21518         * config/rs6000/rs6000.c (rs6000_option_override_internal):
21519         Likewise.
21520         (rs6000_invalid_builtin): Likewise.
21521         (rs6000_trampoline_init): Likewise.
21522
21523 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
21524
21525         PR target/81621
21526         * bb-reorder.c (pass_partition_blocks::execute): Return TODO_df_finish
21527         after setting changeable df flags.
21528
21529 2017-08-03  Richard Biener  <rguenther@suse.de>
21530
21531         * tree-ssa-reassoc.c (should_break_up_subtract): Also break
21532         up if the use is in USE - X.
21533
21534 2017-08-03  Alexander Monakov  <amonakov@ispras.ru>
21535
21536         * toplev.c (dumpfile.h): New include.
21537         (internal_error_reentered): New static function.  Use it...
21538         (internal_error_function): ...here to handle reentered internal_error.
21539
21540 2017-08-03  Richard Biener  <rguenther@suse.de>
21541
21542         PR middle-end/81148
21543         * fold-const.c (split_tree): Add minus_var and minus_con
21544         arguments, remove unused loc arg.  Never generate NEGATE_EXPRs
21545         here but always use minus_*.
21546         (associate_trees): Assert we never associate with MINUS_EXPR
21547         and NULL first operand.  Do not recurse for PLUS_EXPR operands
21548         when associating as MINUS_EXPR either.
21549         (fold_binary_loc): Track minus_var and minus_con.
21550
21551 2017-08-03  Tom de Vries  <tom@codesourcery.com>
21552
21553         PR lto/81430
21554         * tree-streamer-in.c (lto_input_ts_function_decl_tree_pointers): If
21555         ACCEL_COMPILER, apply finish_options on
21556         DECL_FUNCTION_SPECIFIC_OPTIMIZATION.
21557
21558 2017-08-03  Tom de Vries  <tom@codesourcery.com>
21559
21560         PR target/81662
21561         * config/nvptx/nvptx.c (nvptx_option_override): Emit sorry if
21562         function_entry_patch_area_size > 0.
21563
21564 2017-08-03  Jakub Jelinek  <jakub@redhat.com>
21565
21566         PR driver/81650
21567         * calls.c (alloc_max_size): Use HOST_WIDE_INT_UC (10??)
21568         instead of 10??LU, perform unit multiplication in wide_int,
21569         don't change alloc_object_size_limit if the limit is larger
21570         than SSIZE_MAX.
21571
21572         PR tree-optimization/81655
21573         PR tree-optimization/81588
21574         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Handle also
21575         the case when ranges[i].low and high are 1 for unsigned type with
21576         precision 1.
21577
21578         PR middle-end/81052
21579         * omp-low.c (diagnose_sb_0): Handle flag_openmp_simd like flag_openmp.
21580         (pass_diagnose_omp_blocks::gate): Enable also for flag_openmp_simd.
21581
21582 2017-08-03  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
21583
21584         * tree-vrp.h: Add include guard.
21585
21586 2017-08-02  Uros Bizjak  <ubizjak@gmail.com>
21587
21588         PR target/81644
21589         * config/i386/i386.md (unspecv): Add UNSPECV_UD2.
21590         (ud2): New insn pattern.
21591         * config/i386/i386.c (ix86_expand_epilogue):
21592         For naked functions, generate ud2 instead of trap insn.
21593
21594 2017-08-02  Marek Polacek  <polacek@redhat.com>
21595
21596         PR other/81667
21597         * alloc-pool.h (base_pool_allocator): Initialize m_elt_size.
21598
21599 2017-08-02  Tom de Vries  <tom@codesourcery.com>
21600             Cesar Philippidis  <cesar@codesourcery.com>
21601
21602         * config/nvptx/nvptx.c (nvptx_lockless_update, nvptx_lockfull_update):
21603         Add missing edge probabilities.
21604
21605 2017-08-02  Tamar Christina  <tamar.christina@arm.com>
21606
21607         * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
21608         Correct endianness.
21609
21610 2017-08-02  Jakub Jelinek  <jakub@redhat.com>
21611
21612         PR middle-end/79499
21613         * function.c (thread_prologue_and_epilogue_insns): Determine blocks
21614         for find_many_sub_basic_blocks bitmap by looking up BLOCK_FOR_INSN
21615         of first NONDEBUG_INSN_P in each of the split_prologue_seq and
21616         prologue_seq sequences - if any.
21617
21618 2017-08-02  Richard Biener  <rguenther@suse.de>
21619
21620         * tree-vect-stmts.c (vectorizable_store): Perform vector extracts
21621         via vectors if supported, integer extracts via punning if supported
21622         or otherwise vector extracts.
21623
21624 2017-08-02  Richard Biener  <rguenther@suse.de>
21625
21626         * tree-ssa-pre.c (bitmap_insert_into_set_1): Remove and inline
21627         into ...
21628         (bitmap_insert_into_set): ... this.
21629
21630 2017-08-02  Richard Biener  <rguenther@suse.de>
21631
21632         PR tree-optimization/81633
21633         Revert
21634         2015-08-17  Alan Hayward  <alan.hayward@arm.com>
21635
21636         PR tree-optimization/71752
21637         * tree-vect-slp.c (vect_get_slp_defs): Handle null operands.
21638
21639 2017-08-01  Daniel Santos  <daniel.santos@pobox.com>
21640
21641         * config/i386/i386.h (ix86_frame::outlined_save_offset): Remove field.
21642         (machine_function::call_ms2sysv_pad_out): Remove field.
21643         * config/i386/i386.c (xlogue_layout::get_stack_space_used): Modify.
21644         (ix86_compute_frame_layout): Likewise.
21645
21646 2017-08-01  H.J. Lu  <hongjiu.lu@intel.com>
21647
21648         PR target/81654
21649         * config/i386/i386.c (ix86_set_func_type): Disallow naked
21650         attribute with interrupt attribute.
21651
21652 2017-08-01  Andrew Pinski  <apinski@cavium.com>
21653
21654         * tree-ssa-scopedtables.c (hashable_expr_equal_p): Check
21655         BIT_INSERT_EXPR's operand 1
21656         to see if the types precision matches.
21657
21658 2017-08-01  Martin Liska  <mliska@suse.cz>
21659
21660         PR middle-end/70140
21661         * builtins.c (expand_builtin_memcpy_args): Remove.
21662         (expand_builtin_memcpy): Call newly added function
21663         expand_builtin_memory_copy_args.
21664         (expand_builtin_memcpy_with_bounds): Likewise.
21665         (expand_builtin_mempcpy): Remove last argument.
21666         (expand_builtin_mempcpy_with_bounds): Likewise.
21667         (expand_builtin_memory_copy_args): New function created from
21668         expand_builtin_mempcpy_args with small modifications.
21669         (expand_builtin_mempcpy_args): Remove.
21670         (expand_builtin_stpcpy): Remove unused argument.
21671         (expand_builtin): Likewise.
21672         (expand_builtin_with_bounds): Likewise.
21673
21674 2017-08-01  Martin Liska  <mliska@suse.cz>
21675
21676         Revert r250771
21677         Make mempcpy more optimal (PR middle-end/70140).
21678
21679 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
21680
21681         PR target/81622
21682         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): For
21683         __builtin_vec_cmpne verify both arguments are compatible vectors
21684         before looking at TYPE_MODE on the element type.  For __builtin_vec_ld
21685         verify arg1_type is a pointer or array type.  For __builtin_vec_st,
21686         move computation of aligned to after checking the argument types.
21687         Formatting fixes.
21688
21689         PR target/80846
21690         * config/rs6000/vsx.md (vextract_fp_from_shorth,
21691         vextract_fp_from_shortl): Add element mode after mode in gen_vec_init*
21692         calls.
21693
21694 2017-08-01  Jerome Lambourg  <lambourg@adacore.com>
21695             Doug Rupp  <rupp@adacore.com>
21696             Olivier Hainque  <hainque@adacore.com>
21697
21698         * config.gcc (arm-wrs-vxworks*): Rework to handle arm-wrs-vxworks7 as
21699         well as arm-wrs-vxworks. Update target_cpu_name from arm6 (arch v3) to
21700         arm8 (arch v4).
21701         * config/arm/vxworks.h (MAYBE_TARGET_BPABI_CPP_BUILTINS): New, helper
21702         for TARGET_OS_CPP_BUILTIN.
21703         (TARGET_OS_CPP_BUILTIN): Invoke MAYBE_TARGET_BPABI_CPP_BUILTINS(),
21704         refine CPU definitions for arm_arch5 and add those for arm_arch6 and
21705         arm_arch7.
21706         (MAYBE_ASM_ABI_SPEC): New, helper for SUBTARGET_EXTRA_ASM_SPEC,
21707         passing required abi options to the assembler for EABI configurations.
21708         (EXTRA_CC1_SPEC): New macro, to help prevent the implicit production
21709         of .text.hot and .text.unlikely sections for kernel modules when
21710         using ARM style exceptions.
21711         (CC1_SPEC): Remove obsolete attempt at mimicking Diab toolchain
21712         options. Add EXTRA_CC1_SPEC.
21713         (VXWORKS_ENDIAN_SPEC): Adjust comment and remove handling of Diab
21714         toolchain options.
21715         (DWARF2_UNWIND_INFO): Redefine to handle the pre/post VxWorks 7
21716         transition.
21717         (ARM_TARGET2_DWARF_FORMAT): Define.
21718         * config/arm/t-vxworks: Adjust multilib control to removal of the
21719         Diab command line options.
21720
21721 2017-08-01  Martin Liska  <mliska@suse.cz>
21722
21723         PR gcov-profile/81561
21724         * gcov.c (unblock): Make unblocking safe as we need to preserve
21725         index correspondence of blocks and block_lists.
21726
21727 2017-08-01  Richard Biener  <rguenther@suse.de>
21728
21729         PR tree-optimization/81181
21730         * tree-ssa-pre.c (compute_antic_aux): Defer clean() to ...
21731         (compute_antic): ... end of iteration here.
21732
21733 2017-08-01  James Greenhalgh  <james.greenhalgh@arm.com>
21734
21735         * common.opt (ftree-vectorize): No longer set flag_tree_vectorize.
21736         (ftree-loop-vectorize): Set as EnabledBy ftree-vectorize.
21737         (ftree-slp-vectorize): Likewise.
21738         * omp-expand (expand_omp_simd): Remove flag_tree_vectorize, as it
21739         can no longer be set independent of flag_tree_loop_vectorize.
21740         * omp-general.c (emp_max_vf): Likewise.
21741         * opts.c (enable_fdo_optimizations): Remove references to
21742         flag_tree_vectorize, these are now implicit.
21743         (common_handle_option): Remove handling for OPT_ftree_vectorize,
21744         and leave it for the options machinery.
21745
21746 2017-08-01  Martin Liska  <mliska@suse.cz>
21747
21748         PR middle-end/70140
21749         * builtins.c (expand_builtin_memcpy_args): Remove.
21750         (expand_builtin_memcpy): Call newly added function
21751         expand_builtin_memory_copy_args.
21752         (expand_builtin_memcpy_with_bounds): Likewise.
21753         (expand_builtin_mempcpy): Remove last argument.
21754         (expand_builtin_mempcpy_with_bounds): Likewise.
21755         (expand_builtin_memory_copy_args): New function created from
21756         expand_builtin_mempcpy_args with small modifications.
21757         (expand_builtin_mempcpy_args): Remove.
21758         (expand_builtin_stpcpy): Remove unused argument.
21759         (expand_builtin): Likewise.
21760         (expand_builtin_with_bounds): Likewise.
21761
21762 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
21763
21764         PR target/81641
21765         * config/i386/i386.c (ix86_print_operand_address_as): For -masm=intel
21766         print "ds:" only for immediates in generic address space.
21767
21768 2017-08-01  Uros Bizjak  <ubizjak@gmail.com>
21769
21770         PR target/81639
21771         * config/i386/i386.c (ix86_funciton_naked): New prototype.
21772         (ix86_function_ok_for_sibcall): Return false for naked functions.
21773
21774 2017-08-01  Richard Biener  <rguenther@suse.de>
21775
21776         * tree-ssa-pre.c (print_pre_expr): Handle NULL expr.
21777         (compute_antic): Seed worklist with exit block predecessors.
21778         * cfganal.c (dfs_find_deadend): For a cycle return the source
21779         of the edge closing it.
21780
21781 2017-08-01  Tamar Christina  <tamar.christina@arm.com>
21782
21783         * config/aarch64/aarch64.c
21784         (aarch64_can_const_movi_rtx_p): Move 0 check.
21785
21786 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
21787
21788         * tree.h (POINTER_TYPE_OVERFLOW_UNDEFINED): Delete.
21789         * fold-const.c (fold_comparison, fold_binary_loc): Delete use of
21790         above macro.
21791         * match.pd: Ditto in address comparison pattern.
21792
21793 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
21794
21795         PR tree-optimization/81627
21796         * tree-predcom.c (prepare_finalizers): Always rewrite into loop
21797         closed ssa form for store-store chain.
21798
21799 2017-08-01  Bin Cheng  <bin.cheng@arm.com>
21800
21801         PR tree-optimization/81620
21802         * tree-predcom.c (add_ref_to_chain): Don't set has_max_use_after
21803         for store-store chain.
21804
21805 2017-08-01  Jakub Jelinek  <jakub@redhat.com>
21806
21807         PR tree-optimization/81588
21808         * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If
21809         ranges[i].in_p, invert comparison code ccode.  For >/>=,
21810         swap rhs1 and rhs2 and comparison code unconditionally,
21811         for </<= don't do that.  Don't swap rhs1/rhs2 again if
21812         ranges[i].in_p, instead invert comparison code ccode if
21813         opcode or oe->rank is BIT_IOR_EXPR.
21814
21815         PR target/80846
21816         * optabs.def (vec_extract_optab, vec_init_optab): Change from
21817         a direct optab to conversion optab.
21818         * optabs.c (expand_vector_broadcast): Use convert_optab_handler
21819         with GET_MODE_INNER as last argument instead of optab_handler.
21820         * expmed.c (extract_bit_field_1): Likewise.  Use vector from
21821         vector extraction if possible and optab is available.
21822         * expr.c (store_constructor): Use convert_optab_handler instead
21823         of optab_handler.  Use vector initialization from smaller
21824         vectors if possible and optab is available.
21825         * tree-vect-stmts.c (vectorizable_load): Likewise.
21826         * doc/md.texi (vec_extract, vec_init): Document that the optabs
21827         now have two modes.
21828         * config/i386/i386.c (ix86_expand_vector_init): Handle expansion
21829         of vec_init from half-sized vectors with the same element mode.
21830         * config/i386/sse.md (ssehalfvecmode): Add V4TI case.
21831         (ssehalfvecmodelower, ssescalarmodelower): New mode attributes.
21832         (reduc_plus_scal_v8df, reduc_plus_scal_v4df, reduc_plus_scal_v2df,
21833         reduc_plus_scal_v16sf, reduc_plus_scal_v8sf, reduc_plus_scal_v4sf,
21834         reduc_<code>_scal_<mode>, reduc_umin_scal_v8hi): Add element mode
21835         after mode in gen_vec_extract* calls.
21836         (vec_extract<mode>): Renamed to ...
21837         (vec_extract<mode><ssescalarmodelower>): ... this.
21838         (vec_extract<mode><ssehalfvecmodelower>): New expander.
21839         (rotl<mode>3, rotr<mode>3, <shift_insn><mode>3, ashrv2di3): Add
21840         element mode after mode in gen_vec_init* calls.
21841         (VEC_INIT_HALF_MODE): New mode iterator.
21842         (vec_init<mode>): Renamed to ...
21843         (vec_init<mode><ssescalarmodelower>): ... this.
21844         (vec_init<mode><ssehalfvecmodelower>): New expander.
21845         * config/i386/mmx.md (vec_extractv2sf): Renamed to ...
21846         (vec_extractv2sfsf): ... this.
21847         (vec_initv2sf): Renamed to ...
21848         (vec_initv2sfsf): ... this.
21849         (vec_extractv2si): Renamed to ...
21850         (vec_extractv2sisi): ... this.
21851         (vec_initv2si): Renamed to ...
21852         (vec_initv2sisi): ... this.
21853         (vec_extractv4hi): Renamed to ...
21854         (vec_extractv4hihi): ... this.
21855         (vec_initv4hi): Renamed to ...
21856         (vec_initv4hihi): ... this.
21857         (vec_extractv8qi): Renamed to ...
21858         (vec_extractv8qiqi): ... this.
21859         (vec_initv8qi): Renamed to ...
21860         (vec_initv8qiqi): ... this.
21861         * config/rs6000/vector.md (VEC_base_l): New mode attribute.
21862         (vec_init<mode>): Renamed to ...
21863         (vec_init<mode><VEC_base_l>): ... this.
21864         (vec_extract<mode>): Renamed to ...
21865         (vec_extract<mode><VEC_base_l>): ... this.
21866         * config/rs6000/paired.md (vec_initv2sf): Renamed to ...
21867         (vec_initv2sfsf): ... this.
21868         * config/rs6000/altivec.md (splitter, altivec_copysign_v4sf3,
21869         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
21870         vec_unpacku_lo_v8hi, mulv16qi3, altivec_vreve<mode>2): Add
21871         element mode after mode in gen_vec_init* calls.
21872         * config/aarch64/aarch64-simd.md (vec_init<mode>): Renamed to ...
21873         (vec_init<mode><Vel>): ... this.
21874         (vec_extract<mode>): Renamed to ...
21875         (vec_extract<mode><Vel>): ... this.
21876         * config/aarch64/iterators.md (Vel): New mode attribute.
21877         * config/s390/s390.c (s390_expand_vec_strlen, s390_expand_vec_movstr):
21878         Add element mode after mode in gen_vec_extract* calls.
21879         * config/s390/vector.md (non_vec_l): New mode attribute.
21880         (vec_extract<mode>): Renamed to ...
21881         (vec_extract<mode><non_vec_l>): ... this.
21882         (vec_init<mode>): Renamed to ...
21883         (vec_init<mode><non_vec_l>): ... this.
21884         * config/s390/s390-builtins.def (s390_vlgvb, s390_vlgvh, s390_vlgvf,
21885         s390_vlgvf_flt, s390_vlgvg, s390_vlgvg_dbl): Add element mode after
21886         vec_extract mode.
21887         * config/arm/iterators.md (V_elem_l): New mode attribute.
21888         * config/arm/neon.md (vec_extract<mode>): Renamed to ...
21889         (vec_extract<mode><V_elem_l>): ... this.
21890         (vec_extractv2di): Renamed to ...
21891         (vec_extractv2didi): ... this.
21892         (vec_init<mode>): Renamed to ...
21893         (vec_init<mode><V_elem_l>): ... this.
21894         (reduc_plus_scal_<mode>, reduc_plus_scal_v2di, reduc_smin_scal_<mode>,
21895         reduc_smax_scal_<mode>, reduc_umin_scal_<mode>,
21896         reduc_umax_scal_<mode>, neon_vget_lane<mode>, neon_vget_laneu<mode>):
21897         Add element mode after gen_vec_extract* calls.
21898         * config/mips/mips-msa.md (vec_init<mode>): Renamed to ...
21899         (vec_init<mode><unitmode>): ... this.
21900         (vec_extract<mode>): Renamed to ...
21901         (vec_extract<mode><unitmode>): ... this.
21902         * config/mips/loongson.md (vec_init<mode>): Renamed to ...
21903         (vec_init<mode><unitmode>): ... this.
21904         * config/mips/mips-ps-3d.md (vec_initv2sf): Renamed to ...
21905         (vec_initv2sfsf): ... this.
21906         (vec_extractv2sf): Renamed to ...
21907         (vec_extractv2sfsf): ... this.
21908         (reduc_plus_scal_v2sf, reduc_smin_scal_v2sf, reduc_smax_scal_v2sf):
21909         Add element mode after gen_vec_extract* calls.
21910         * config/mips/mips.md (unitmode): New mode iterator.
21911         * config/spu/spu.c (spu_expand_prologue, spu_allocate_stack,
21912         spu_builtin_extract): Add element mode after gen_vec_extract* calls.
21913         * config/spu/spu.md (inner_l): New mode attribute.
21914         (vec_init<mode>): Renamed to ...
21915         (vec_init<mode><inner_l>): ... this.
21916         (vec_extract<mode>): Renamed to ...
21917         (vec_extract<mode><inner_l>): ... this.
21918         * config/sparc/sparc.md (veltmode): New mode iterator.
21919         (vec_init<VMALL:mode>): Renamed to ...
21920         (vec_init<VMALL:mode><VMALL:veltmode>): ... this.
21921         * config/ia64/vect.md (vec_initv2si): Renamed to ...
21922         (vec_initv2sisi): ... this.
21923         (vec_initv2sf): Renamed to ...
21924         (vec_initv2sfsf): ... this.
21925         (vec_extractv2sf): Renamed to ...
21926         (vec_extractv2sfsf): ... this.
21927         * config/powerpcspe/vector.md (VEC_base_l): New mode attribute.
21928         (vec_init<mode>): Renamed to ...
21929         (vec_init<mode><VEC_base_l>): ... this.
21930         (vec_extract<mode>): Renamed to ...
21931         (vec_extract<mode><VEC_base_l>): ... this.
21932         * config/powerpcspe/paired.md (vec_initv2sf): Renamed to ...
21933         (vec_initv2sfsf): ... this.
21934         * config/powerpcspe/altivec.md (splitter, altivec_copysign_v4sf3,
21935         vec_unpacku_hi_v16qi, vec_unpacku_hi_v8hi, vec_unpacku_lo_v16qi,
21936         vec_unpacku_lo_v8hi, mulv16qi3): Add element mode after mode in
21937         gen_vec_init* calls.
21938
21939 2017-08-01  Richard Biener  <rguenther@suse.de>
21940
21941         PR tree-optimization/81297
21942         * tree-vrp.c (get_single_symbol): Remove assert, instead drop
21943         TREE_OVERFLOW from INTEGER_CSTs.
21944
21945 2017-07-31  Segher Boessenkool  <segher@kernel.crashing.org>
21946
21947         * config/rs6000/rs6000.c (enum rs6000_reg_type): Delete trailing comma.
21948
21949 2017-07-31  Carl Love  <cel@us.ibm.com>
21950
21951         * config/rs6000/rs6000-c: Add support for built-in functions
21952         vector signed char vec_xl_be (signed long long, signed char *);
21953         vector unsigned char vec_xl_be (signed long long, unsigned char *);
21954         vector signed int vec_xl_be (signed long long, signed int *);
21955         vector unsigned int vec_xl_be (signed long long, unsigned int *);
21956         vector signed long long vec_xl_be (signed long long, signed long long *);
21957         vector unsigned long long vec_xl_be (signed long long, unsigned long long *);
21958         vector signed short vec_xl_be (signed long long, signed short *);
21959         vector unsigned short vec_xl_be (signed long long, unsigned short *);
21960         vector double vec_xl_be (signed long long, double *);
21961         vector float vec_xl_be (signed long long, float *);
21962         * config/rs6000/altivec.h (vec_xl_be): Add #define.
21963         * config/rs6000/rs6000-builtin.def (XL_BE_V16QI, XL_BE_V8HI, XL_BE_V4SI)
21964         XL_BE_V2DI, XL_BE_V4SF, XL_BE_V2DF, XL_BE): Add definitions
21965         for the builtins.
21966         * config/rs6000/rs6000.c (altivec_expand_xl_be_builtin): Add function.
21967         (altivec_expand_builtin): Add switch statement to call
21968         altivec_expand_xl_be for each builtin.
21969         (altivec_init_builtins): Add def_builtin for _builtin_vsx_le_be_v8hi,
21970         __builtin_vsx_le_be_v4si, __builtin_vsx_le_be_v2di,
21971         __builtin_vsx_le_be_v4sf, __builtin_vsx_le_be_v2df,
21972         __builtin_vsx_le_be_v16qi.
21973         * doc/extend.texi: Update the built-in documentation file for the
21974         new built-in functions.
21975
21976 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
21977
21978         PR target/25967
21979         * config/i386/i386.c (ix86_allocate_stack_slots_for_args):
21980         New function.
21981         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
21982
21983 2017-07-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
21984
21985         * config.gcc: Add z14.
21986         * config/s390/driver-native.c (s390_host_detect_local_cpu): Add
21987         CPU model numbers for z13s and z14.
21988         * config/s390/s390-c.c (s390_resolve_overloaded_builtin): Replace
21989         arch12 with z14.
21990         * config/s390/s390-opts.h (enum processor_type): Rename
21991         PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
21992         * config/s390/s390.c (processor_table): Add field for CPU name to
21993         be passed to Binutils.
21994         (s390_asm_output_machine_for_arch): Use the new field in
21995         processor_table for Binutils.
21996         (s390_expand_builtin): Replace arch12 with z14.
21997         (s390_issue_rate): Rename PROCESSOR_ARCH12 to PROCESSOR_3906_Z14.
21998         (s390_get_sched_attrmask): Likewise.
21999         (s390_get_unit_mask): Likewise.
22000         * config/s390/s390.opt: Add z14 to processor_type enum.
22001
22002 2017-07-31  Martin Jambor  <mjambor@suse.cz>
22003
22004         PR hsa/81477
22005         * ipa-fnsummary.c (ipa_fn_summary_generate): Set versionable
22006         regardless of optimization level.
22007
22008 2017-07-31  Jan Hubicka <hubicka@ucw.cz>
22009             Martin Liska  <mliska@suse.cz>
22010
22011         * predict.def: Remove old comment and adjust probability.
22012         * gimplify.c (should_warn_for_implicit_fallthrough): Ignore
22013         PREDICT statements.
22014
22015 2017-07-31  Uros Bizjak  <ubizjak@gmail.com>
22016
22017         PR target/25967
22018         * config/i386/i386.c (ix86_function_naked): New function.
22019         (ix86_can_use_return_insn_p): Return false for naked functions.
22020         (ix86_expand_prologue): Skip prologue for naked functions.
22021         (ix86_expand_epilogue): Skip epilogue for naked functions
22022         and emit trap instruction.
22023         (ix86_warn_func_return): New function.
22024         (ix86_attribute_table): Add "naked" attribute specification.
22025         (TARGET_WARN_FUNC_RETURN): Define.
22026         * doc/extend.texi (x86 Function Attributes) <naked>: Document it.
22027
22028 2017-07-31  Martin Liska  <mliska@suse.cz>
22029
22030         * gimple-pretty-print.c (dump_gimple_label): Never dump BB info.
22031         (dump_gimple_bb_header): Always dump BB info.
22032         (pp_cfg_jump): Do not append info about BB when dumping a jump.
22033
22034 2017-07-31  Martin Liska  <mliska@suse.cz>
22035
22036         PR sanitize/81530
22037         * convert.c (convert_to_integer_1): Guard condition with flag_sanitize_p
22038         also with current_function_decl non-null equality.
22039
22040 2017-07-31  Jakub Jelinek  <jakub@redhat.com>
22041
22042         PR sanitizer/81604
22043         * ubsan.c (ubsan_type_descriptor): For UBSAN_PRINT_ARRAY don't
22044         change type to the element type, instead add eltype variable and
22045         use it where we are interested in the element type.
22046
22047         PR tree-optimization/81603
22048         * ipa-polymorphic-call.c
22049         (ipa_polymorphic_call_context::ipa_polymorphic_call_context): Perform
22050         offset arithmetic in offset_int, bail out if the resulting bit offset
22051         doesn't fit into shwi.
22052
22053 2017-07-31  Martin Liska  <mliska@suse.cz>
22054
22055         * gimplify.c (mostly_copy_tree_r): Remove Java specific hunk.
22056         (gimplify_save_expr): Fix comment.
22057
22058 2017-07-30  H.J. Lu  <hongjiu.lu@intel.com>
22059
22060         PR target/79793
22061         * config/i386/i386.c (ix86_function_arg): Update arguments for
22062         exception handler.
22063         (ix86_compute_frame_layout): Set the initial stack offset to
22064         INCOMING_FRAME_SP_OFFSET.  Update red-zone offset with
22065         INCOMING_FRAME_SP_OFFSET.
22066         (ix86_expand_epilogue): Don't pop the 'ERROR_CODE' off the
22067         stack before exception handler returns.
22068         * config/i386/i386.h (INCOMING_FRAME_SP_OFFSET): Add the
22069         the 'ERROR_CODE' for exception handler.
22070
22071 2017-07-30  Uros Bizjak  <ubizjak@gmail.com>
22072
22073         * config/i386/i386.h (ASM_PRINTF_EXTENSIONS): New macro.
22074         (ASM_OUTPUT_REG_PUSH): Rewrite with new operand modifiers.
22075         (ASM_OUTPUT_REG_POP): Ditto.
22076         * config/i386/i386.c (ix86_asm_output_function_label): Use fputs
22077         instead of asm_fprintf to output pure string.
22078
22079 2017-07-29  Jakub Jelinek  <jakub@redhat.com>
22080
22081         * debug.h (struct gcc_debug_hooks): Add IMPLICIT argument
22082         to imported_module_or_decl hook.
22083         (debug_nothing_tree_tree_tree_bool): Remove.
22084         (debug_nothing_tree_tree_tree_bool_bool): New declaration.
22085         * debug.c (do_nothing_debug_hooks): Use
22086         debug_nothing_tree_tree_tree_bool_bool instead of
22087         debug_nothing_tree_tree_tree_bool.
22088         * vmsdbgout.c (vmsdbg_debug_hooks): Likewise.
22089         * dbxout.c (dbx_debug_hooks, xcoff_debug_hooks): Likewise.
22090         * sdbout.c (sdb_debug_hooks): Likewise.
22091         * dwarf2out.c (dwarf2_lineno_debug_hooks): Likewise.
22092         (gen_namespace_die): Add DW_AT_export_symbols attribute if
22093         langhook wants it.
22094         (dwarf2out_imported_module_or_decl): Add IMPLICIT argument,
22095         if true, -gdwarf-5 and decl will have DW_AT_export_symbols
22096         attribute, don't add anything.
22097
22098 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22099
22100         * fold-const.c (fold_build1_stat_loc): Remove _stat from name.
22101         (fold_build2_stat_loc): Likewise.
22102         (fold_build3_stat_loc): Likewise.
22103         * fold-const.h (fold_build1, fold_build2, fold_build3): Adjust.
22104         (fold_build1_loc): Remove macro.
22105         (fold_build2_loc): Likewise.
22106         (fold_build3_loc): Likewise.
22107
22108 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22109
22110         * gimple.c (gimple_build_debug_bind_stat): Remove _stat from name.
22111         (gimple_build_debug_bind_source_stat): Likewise.
22112         * gimple.h (gimple_build_debug_bind): Remove macro.
22113         (gimple_build_debug_bind_source): Likewise.
22114
22115 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22116
22117         * bitmap.c (bitmap_alloc): Adjust.
22118         (bitmap_gc_alloc): Likewise.
22119         * bitmap.h (bitmap_initialize_stat): Remove _stat from name.
22120
22121 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22122
22123         * bitmap.c (bitmap_obstack_alloc_stat): Rename to bitmap_alloc.
22124         (bitmap_gc_alloc_stat): Rename to bitmap_gc_alloc.
22125         * bitmap.h (bitmap_obstack_alloc_stat): Adjust prototype.
22126         (bitmap_gc_alloc_stat): Likewise.
22127         (BITMAP_ALLOC, BITMAP_GGC_ALLOC): Adjust.
22128
22129 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22130
22131         * rtl.c (shallow_copy_rtx_stat): Remove _stat from name.
22132         * rtl.h (shallow_copy_rtx): Remove macro.
22133
22134 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22135
22136         * emit-rtl.c (gen_raw_REG): Adjust.
22137         * gengenrtl.c (gendef): Likewise.
22138         * rtl.c (rtx_alloc_stat): Remove _stat from name.
22139         * rtl.h (rtx_alloc): Remove macro.
22140
22141 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22142
22143         * tree.c (build_tree_list_vec_stat): Remove _stat from name.
22144         (build_tree_list_stat): Likewise.
22145         * tree.h (build_tree_list): Remove macro.
22146         (build_tree_list_vec): Likewise.
22147
22148 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22149
22150         * tree.c (make_vector_stat): Remove _stat from name.
22151         (build_vector_stat): Likewise.
22152         * tree.h (make_vector_stat): Remove macro.
22153         (build_vector_stat): Likewise.
22154
22155 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22156
22157         * tree.h (build_var_debug_value): Remove prototype.
22158
22159 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22160
22161         * tree.c (tree_cons_stat): Remove _stat from name.
22162         * tree.h (tree_cons): Remove macro.
22163
22164 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22165
22166         * tree.c (build_vl_exp_stat): Remove _stat from name.
22167         * tree.h (build_vl_exp): Remove macro.
22168
22169 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22170
22171         * tree.c (build_decl_stat): Remove _stat from name.
22172         * tree.h (build_decl): Remove macro.
22173
22174 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22175
22176         * gimple.c (gimple_build_with_ops_stat): Adjust.
22177         (gimple_alloc_stat): Remove _stat from name.
22178         * gimple.h (gimple_alloc): Remove macro.
22179
22180 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22181
22182         * tree.c (make_tree_vec_stat): Remove _stat from name.
22183         (grow_tree_vec_stat): Likewise.
22184         * tree.h (make_tree_vec_stat): Adjust prototype.
22185         (grow_tree_vec_stat): Likewise.
22186         (make_tree_vec): Remove macro.
22187         (grow_tree_vec): Likewise.
22188
22189 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22190
22191         * fold-const.c (fold_build1_stat_loc): Adjust.
22192         (fold_build2_stat_loc): Likewise.
22193         (fold_build3_stat_loc): Likewise.
22194         * tree.c (build0_stat): Remove _stat from name.
22195         (build1_stat): Likewise.
22196         (build2_stat): Likewise.
22197         (build3_stat): Likewise.
22198         (build4_stat): Likewise.
22199         (build5_stat): Likewise.
22200         * tree.h (build1_loc): Remove macro, and rename _stat function
22201         to this.
22202         (build2_loc): Likewise.
22203         (build3_loc): Likewise.
22204         (build4_loc): Likewise.
22205         (build5_loc): Likewise.
22206
22207 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22208
22209         * tree.c (make_int_cst_stat): Remove _stat from name.
22210         * tree.h (make_int_cst_stat): Adjust prototype.
22211         (make_int_cst): Remove macro.
22212
22213 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22214
22215         * tree.c (make_tre_binfo_stat): Remove _stat from name.
22216         * tree.h (make_tree_binfo_stat): Adjust prototype.
22217         (make_tree_binfo): Remove.
22218
22219 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22220
22221         * tree.c (copy_node_stat): Rename to copy_node.
22222         (build_distinct_type_copy): Adjust.
22223         * tree.h (copy_node_stat): Adjust prototype.
22224         (copy_node): Remove macro.
22225
22226 2017-07-28  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
22227
22228         * tree.c (make_node_stat): rename to make_node.
22229         (build_tree_list_stat): Adjust.
22230         (build0_stat): Likewise.
22231         (build2_stat): Likewise.
22232         (build3_stat): Likewise.
22233         (build4_stat): Likewise.
22234         (build5_stat): Likewise.
22235         (build_decl_stat): Likewise.
22236         * tree.h (make_node_stat): Adjust prototype.
22237         (make_node): remove macro.
22238
22239 2017-07-28  Peter Bergner  <bergner@vnet.ibm.com>
22240
22241         * config/rs6000/ppc-auxv.h (PPC_FEATURE2_DARN): New define.
22242         (PPC_FEATURE2_SCV): Likewise.
22243         * config/rs6000/rs6000.c (cpu_supports_info): Use them.
22244
22245 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
22246
22247         * config/aarch64/aarch64.c
22248         (aarch64_internal_mov_immediate): Add new special pattern.
22249         * config/aarch64/aarch64.md (*movdi_aarch64):
22250         Add reg/32bit const mov case.
22251
22252 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
22253             Richard Sandiford <richard.sandiford@linaro.org>
22254
22255         * config/aarch64/aarch64.md (mov<mode>): Generalize.
22256         (*movhf_aarch64, *movsf_aarch64, *movdf_aarch64):
22257         Add integer and movi cases.
22258         (movi-split-hf-df-sf split, fp16): New.
22259         (enabled): Added TARGET_FP_F16INST.
22260         * config/aarch64/iterators.md (GPF_HF): New.
22261         * config/aarch64/predicates.md (aarch64_reg_or_fp_float): New.
22262
22263 2017-07-28  Tamar Christina  <tamar.christina@arm.com>
22264
22265         * config/aarch64/aarch64.c
22266         (aarch64_simd_container_mode): Add prototype.
22267         (aarch64_expand_mov_immediate): Add HI support.
22268         (aarch64_reinterpret_float_as_int, aarch64_float_const_rtx_p: New.
22269         (aarch64_can_const_movi_rtx_p): New.
22270         (aarch64_preferred_reload_class):
22271         Remove restrictions of using FP registers for certain SIMD operations.
22272         (aarch64_rtx_costs): Added new cost for CONST_DOUBLE moves.
22273         (aarch64_valid_floating_const): Add integer move validation.
22274         (aarch64_simd_imm_scalar_p): Remove.
22275         (aarch64_output_scalar_simd_mov_immediate): Generalize function.
22276         (aarch64_legitimate_constant_p): Expand list of supported cases.
22277         * config/aarch64/aarch64-protos.h
22278         (aarch64_float_const_rtx_p, aarch64_can_const_movi_rtx_p): New.
22279         (aarch64_reinterpret_float_as_int): New.
22280         (aarch64_simd_imm_scalar_p): Remove.
22281         * config/aarch64/constraints.md (Uvi): New.
22282         (Dd): Split into Ds and new Dd.
22283         * config/aarch64/aarch64.md (*movsi_aarch64):
22284         Add SIMD mov case.
22285         (*movdi_aarch64): Add SIMD mov case.
22286
22287 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
22288
22289         * tree-predcom.c: (struct chain): Handle store-store chain in which
22290         stores for elimination only store loop invariant values.
22291         (execute_pred_commoning_chain): Ditto.
22292         (prepare_initializers_chain_store_elim): Ditto.
22293         (prepare_finalizers): Ditto.
22294         (is_inv_store_elimination_chain): New function.
22295         (initialize_root_vars_store_elim_1): New function.
22296
22297 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
22298
22299         * tree-predcom.c: Revise general description of the pass.
22300         (enum chain_type): New enum type for store elimination.
22301         (struct chain): New field supporting store elimination.
22302         (struct component): Ditto.
22303         (dump_chain): Dump store-stores chain.
22304         (release_chain): Release resources.
22305         (split_data_refs_to_components): Compute and create component
22306         contains only stores for elimination.
22307         (get_chain_last_ref_at): New function.
22308         (make_invariant_chain): Initialization.
22309         (make_rooted_chain): Specify chain type in parameter and record it.
22310         (add_looparound_copies): Skip for store-stores chain.
22311         (determine_roots_comp): Compute type of chain and pass it to
22312         make_rooted_chain.
22313         (initialize_root_vars_store_elim_2): New function.
22314         (finalize_eliminated_stores): New function.
22315         (remove_stmt): Handle store for elimination.
22316         (execute_pred_commoning_chain): Execute predictive commoning on
22317         store-store chains.
22318         (determine_unroll_factor): Skip unroll for store-stores chain.
22319         (prepare_initializers_chain_store_elim): New function.
22320         (prepare_initializers_chain): Hanlde store-store chain.
22321         (prepare_finalizers_chain, prepare_finalizers): New function.
22322         (tree_predictive_commoning_loop): Return integer value indicating
22323         if loop is unrolled or lcssa form is corrupted.
22324         (tree_predictive_commoning): Rewrite for lcssa form if necessary.
22325
22326 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
22327
22328         * tree-predcom.c (initialize_root): Delete.
22329         (execute_pred_commoning_chain): Initialize root vars and replace
22330         reference of non-combined chain directly, rather than call above
22331         function.
22332
22333 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
22334
22335         * tree-predcom.c (ref_at_iteration): Add parameter NITERS.  Compute
22336         memory reference to DR at (NITERS + ITERS)-th iteration of loop.
22337
22338 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
22339
22340         * tree-predcom.c (struct chain): New field init_seq.
22341         (release_chain): Release init_seq.
22342         (prepare_initializers_chain): Record intialization stmts in above
22343         field.
22344         (insert_init_seqs): New function.
22345         (tree_predictive_commoning_loop): Call insert_init_seqs.
22346
22347 2017-07-28  Bin Cheng  <bin.cheng@arm.com>
22348
22349         * tree-predcom.c (determine_roots_comp): Skip trivial components.
22350
22351 2017-07-28  Richard Biener  <rguenther@suse.de>
22352
22353         * match.pd: Remove superfluous :c.
22354         * genmatch.c (simplify::id): Add member.
22355         (lower_commutative, lower_opt_convert, lower_cond, lower_for):
22356         Copy id.
22357         (current_id): New global.
22358         (dt_node::parent): Move from ...
22359         (dt_operand::parent): ... here.  Add for_id member.
22360         (is_a_helper <dt_operand *>::test): DT_TRUE is also a dt_operand.
22361         (decision_tree::find_node): Relax order requirement when
22362         merging DT_TRUE nodes to ones inbetween the current simplify
22363         and the one we try to merge with.  Add diagnostic whenever
22364         we need to enforce pattern order by not merging.
22365         (decision_tree::insert): Set current_id.
22366         (decision_tree::print_node): Dump parent node and for_id.
22367         (parser::last_id): Add member.
22368         (parser::push_simplify): Assign unique id.
22369         (parser::parser): Initialize last_id.
22370
22371 2017-07-28  Martin Liska  <mliska@suse.cz>
22372
22373         PR sanitizer/81340
22374         * sanopt.c (sanitize_rewrite_addressable_params): Set VALUE_EXPR after
22375         gimple_build_debug_bind.
22376
22377 2017-07-28  Richard Biener  <rguenther@suse.de>
22378
22379         PR tree-optimization/81502
22380         * match.pd: Add pattern combining BIT_INSERT_EXPR with
22381         BIT_FIELD_REF.
22382         * tree-cfg.c (verify_expr): Verify types of BIT_FIELD_REF
22383         size/pos operands.
22384         (verify_gimple_assign_ternary): Likewise for BIT_INSERT_EXPR pos.
22385         * gimple-fold.c (maybe_canonicalize_mem_ref_addr): Use bitsizetype
22386         for BIT_FIELD_REF args.
22387         * fold-const.c (make_bit_field_ref): Likewise.
22388         * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
22389
22390 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
22391
22392         PR sanitizer/80998
22393         * sanopt.c (pass_sanopt::execute): Handle IFN_UBSAN_PTR.
22394         * tree-ssa-alias.c (call_may_clobber_ref_p_1): Likewise.
22395         * flag-types.h (enum sanitize_code): Add SANITIZER_POINTER_OVERFLOW.
22396         Or it into SANITIZER_UNDEFINED.
22397         * ubsan.c: Include gimple-fold.h and varasm.h.
22398         (ubsan_expand_ptr_ifn): New function.
22399         (instrument_pointer_overflow): New function.
22400         (maybe_instrument_pointer_overflow): New function.
22401         (instrument_object_size): Formatting fix.
22402         (pass_ubsan::execute): Call instrument_pointer_overflow
22403         and maybe_instrument_pointer_overflow.
22404         * internal-fn.c (expand_UBSAN_PTR): New function.
22405         * ubsan.h (ubsan_expand_ptr_ifn): Declare.
22406         * sanitizer.def (__ubsan_handle_pointer_overflow,
22407         __ubsan_handle_pointer_overflow_abort): New builtins.
22408         * tree-ssa-tail-merge.c (merge_stmts_p): Handle IFN_UBSAN_PTR.
22409         * internal-fn.def (UBSAN_PTR): New internal function.
22410         * opts.c (sanitizer_opts): Add pointer-overflow.
22411         * lto-streamer-in.c (input_function): Handle IFN_UBSAN_PTR.
22412         * fold-const.c (build_range_check): Compute pointer range check in
22413         integral type if pointer arithmetics would be needed.  Formatting
22414         fixes.
22415
22416 2017-07-28  Martin Liska  <mliska@suse.cz>
22417
22418         PR sanitizer/81460
22419         * sanopt.c (sanitize_rewrite_addressable_params): Do not rewrite
22420         parameters that are of a variable-length.
22421
22422 2017-07-28  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22423
22424         * config.gcc (powerpc-*-rtems*): Remove rs6000/eabi.h.  Add
22425         rs6000/biarch64.h.
22426         * config/rs6000/rtems.h (ASM_DECLARE_FUNCTION_SIZE): New macro.
22427         (ASM_OUTPUT_SPECIAL_POOL_ENTRY_P): Likewise.
22428         (CRT_CALL_STATIC_FUNCTION): Likewise.
22429         (ASM_DEFAULT_SPEC): New define.
22430         (ASM_SPEC32): Likewise.
22431         (ASM_SPEC64): Likewise.
22432         (ASM_SPEC_COMMON): Likewise.
22433         (ASM_SPEC): Likewise.
22434         (INVALID_64BIT): Likewise.
22435         (LINK_OS_DEFAULT_SPEC): Likewise.
22436         (LINK_OS_SPEC32): Likewise.
22437         (LINK_OS_SPEC64): Likewise.
22438         (POWERPC_LINUX): Likewise.
22439         (PTRDIFF_TYPE): Likewise.
22440         (RESTORE_FP_PREFIX): Likewise.
22441         (RESTORE_FP_SUFFIX): Likewise.
22442         (SAVE_FP_PREFIX): Likewise.
22443         (SAVE_FP_SUFFIX): Likewise.
22444         (SIZE_TYPE): Likewise.
22445         (SUBSUBTARGET_OVERRIDE_OPTIONS): Likewise.
22446         (TARGET_64BIT): Likewise.
22447         (TARGET_64BIT): Likewise.
22448         (TARGET_AIX): Likewise.
22449         (WCHAR_TYPE_SIZE): Likewise.
22450         (WCHAR_TYPE): Undefine.
22451         (TARGET_OS_CPP_BUILTINS): Add 64-bit PowerPC defines.
22452         (CPP_OS_DEFAULT_SPEC): Use previous CPP_OS_RTEMS_SPEC.
22453         (CPP_OS_RTEMS_SPEC): Delete.
22454         (SUBSUBTARGET_EXTRA_SPECS): Remove cpp_os_rtems.  Add
22455         asm_spec_common, asm_spec32, asm_spec64, link_os_spec32, and
22456         link_os_spec64.
22457         * config/rs6000/t-rtems: Add mcpu=e6500/m64 multilibs.
22458
22459 2017-07-28  Jakub Jelinek  <jakub@redhat.com>
22460
22461         PR tree-optimization/81578
22462         * tree-parloops.c (build_new_reduction): Bail out if
22463         reduction_code isn't one of the standard OpenMP reductions.
22464         Move the details printing after that decision.
22465
22466 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
22467
22468         * config/rs6000/predicates.md (volatile_mem_operand): Remove code
22469         related to reload_in_progress.
22470         (splat_input_operand): Likewise.
22471         * config/rs6000/rs6000-protos.h (rs6000_secondary_memory_needed_rtx):
22472         Delete prototype.
22473         * config/rs6000/rs6000.c (machine_function): Remove sdmode_stack_slot
22474         field.
22475         (TARGET_EXPAND_TO_RTL_HOOK): Delete.
22476         (TARGET_INSTANTIATE_DECLS): Likewise.
22477         (legitimate_indexed_address_p): Delete reload_in_progress code.
22478         (rs6000_debug_legitimate_address_p): Likewise.
22479         (rs6000_eliminate_indexed_memrefs): Likewise.
22480         (rs6000_emit_le_vsx_store): Likewise.
22481         (rs6000_emit_move_si_sf_subreg): Likewise.
22482         (rs6000_emit_move): Likewise.
22483         (register_to_reg_type): Likewise.
22484         (rs6000_pre_atomic_barrier): Likewise.
22485         (rs6000_machopic_legitimize_pic_address): Likewise.
22486         (rs6000_allocate_stack_temp): Likewise.
22487         (rs6000_address_for_fpconvert): Likewise.
22488         (rs6000_address_for_altivec): Likewise.
22489         (rs6000_secondary_memory_needed_rtx): Delete function.
22490         (rs6000_check_sdmode): Likewise.
22491         (rs6000_alloc_sdmode_stack_slot): Likewise.
22492         (rs6000_instantiate_decls): Likewise.
22493         * config/rs6000/rs6000.h (SECONDARY_MEMORY_NEEDED_RTX): Delete.
22494         * config/rs6000/rs6000.md (splitter for *movsi_got_internal):
22495         Delete reload_in_progress.
22496         (*vec_reload_and_plus_<mptrsize>): Likewise.
22497         * config/rs6000/vsx.md (vsx_mul_v2di): Likewise.
22498         (vsx_div_v2di): Likewise.
22499         (vsx_udiv_v2di): Likewise.
22500
22501 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
22502
22503         * config/rs6000/rs6000.opt (mlra): Replace with stub.
22504         * config/rs6000/rs6000-cpus.def (POWERPC_MASKS): Delete OPTION_MASK_LRA.
22505         * config/rs6000/rs6000.c (TARGET_LRA_P): Delete.
22506         (rs6000_debug_reg_global): Delete print of LRA status.
22507         (rs6000_option_override_internal): Delete dead LRA related code.
22508         (rs6000_lra_p): Delete function.
22509         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mlra.
22510
22511 2017-07-27  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22512
22513         * config.gcc (riscv*-*-elf*): Add (riscv*-*-rtems*).
22514         * config/riscv/rtems.h: New file.
22515
22516 2017-07-27  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
22517             Sudakshina Das  <sudi.das@arm.com>
22518
22519         * config/aarch64/aarch64.md
22520         (define_split for and<mode>3nr_compare): Move
22521         non aarch64_logical_operand to a register.
22522         (define_split for and_<SHIFT:optab><mode>3nr_compare0): Move non
22523         register immediate operand to a register.
22524         * config/aarch64/predicates.md (aarch64_mov_imm_operand): New.
22525
22526 2017-07-27  Peter Bergner  <bergner@vnet.ibm.com>
22527
22528         PR middle-end/81564
22529         * tree-cfg.c (group_case_labels_stmt): Handle already deleted blocks.
22530
22531 2017-07-27  Richard Biener  <rguenther@suse.de>
22532
22533         PR tree-optimization/81573
22534         PR tree-optimization/81494
22535         * tree-vect-loop.c (vect_create_epilog_for_reduction): Handle
22536         multi defuse cycle case.
22537
22538 2017-07-27  Richard Biener  <rguenther@suse.de>
22539
22540         PR tree-optimization/81571
22541         * tree-vect-slp.c (vect_build_slp_tree): Properly verify reduction
22542         PHIs.
22543
22544 2017-07-27  Eric Botcazou  <ebotcazou@adacore.com>
22545
22546         * config/sparc/sparc.c (sparc_option_override): Set MASK_FSMULD flag
22547         earlier and only if MASK_FPU is set.  Adjust formatting.
22548
22549 2017-07-27  Martin Liska  <mliska@suse.cz>
22550
22551         * opt-functions.awk: Add validation of value of Init.
22552         * optc-gen.awk: Pass new argument.
22553
22554 2017-07-27  Martin Liska  <mliska@suse.cz>
22555
22556         * auto-profile.c (autofdo_source_profile::update_inlined_ind_target):
22557         Fix wrong condition.
22558
22559 2017-07-27  Martin Liska  <mliska@suse.cz>
22560
22561         * auto-profile.c (afdo_annotate_cfg): Assign zero counts to
22562         BBs and edges seen by autoFDO.
22563
22564 2017-07-27  Richard Biener  <rguenther@suse.de>
22565
22566         PR tree-optimization/81502
22567         * tree-ssa.c (non_rewritable_lvalue_p): Handle BIT_INSERT_EXPR
22568         with incompatible but same sized type.
22569         (execute_update_addresses_taken): Likewise.
22570
22571 2017-07-27  James Greenhalgh  <james.greenhalgh@arm.com>
22572
22573         * tree-ssa-loop-ch.c (pass_ch::process_loop_p): Guard on
22574         flag_tree_loop_vectorize rather than flag_tree_vectorize.
22575
22576 2017-07-27  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
22577
22578         PR target/81534
22579         * config/s390/s390.md ("*atomic_compare_and_swap<mode>_1")
22580         ("*atomic_compare_and_swapdi_2", "*atomic_compare_and_swapsi_3"):
22581         Change s_operand to memory_operand.
22582
22583 2017-07-27  Richard Sandiford  <richard.sandiford@linaro.org>
22584
22585         * config/rs6000/rs6000-protos.h (rs6000_emit_le_vsx_permute): Declare.
22586         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Replace with...
22587         (rs6000_emit_le_vsx_permute): ...this.  Take the destination as input.
22588         Emit instructions rather than returning an expression.  Handle TFmode
22589         and KFmode by casting to TImode.
22590         (rs6000_emit_le_vsx_load): Update to use rs6000_emit_le_vsx_permute.
22591         (rs6000_emit_le_vsx_store): Likewise.
22592         * config/rs6000/vsx.md (VSX_TI): New iterator.
22593         (*vsx_le_permute_<mode>): Use it instead of VSX_LE_128.
22594         (*vsx_le_undo_permute_<mode>): Likewise.
22595         (*vsx_le_perm_load_<mode>): Use rs6000_emit_le_vsx_permute to
22596         emit the split sequence.
22597         (*vsx_le_perm_store_<mode>): Likewise.
22598
22599 2017-07-27  Jakub Jelinek  <jakub@redhat.com>
22600
22601         PR tree-optimization/81555
22602         PR tree-optimization/81556
22603         * tree-ssa-reassoc.c (rewrite_expr_tree): Add NEXT_CHANGED argument,
22604         if true, force CHANGED for the recursive invocation.
22605         (reassociate_bb): Remember original length of ops array, pass
22606         len != orig_len as NEXT_CHANGED in rewrite_expr_tree call.
22607
22608         * attribs.c (decl_attributes): Imply noinline, noclone and no_icf
22609         attributes for noipa attribute.  For naked attribute use
22610         lookup_attribute first before lookup_attribute_spec.
22611         * final.c (rest_of_handle_final): Disable IPA RA for functions with
22612         noipa attribute.
22613         * ipa-visibility.c (non_local_p): Fix comment typos.  Return true
22614         for functions with noipa attribute.
22615         (cgraph_externally_visible_p): Return true for functions with noipa
22616         attribute.
22617         * cgraph.c (cgraph_node::get_availability): Return AVAIL_INTERPOSABLE
22618         for functions with noipa attribute.
22619         * doc/extend.texi: Document noipa function attribute.
22620         * tree-ssa-structalias.c (refered_from_nonlocal_fn): Set *nonlocal_p
22621         also for functions with noipa attribute.
22622         (ipa_pta_execute): Set nonlocal_p also for nodes with noipa attribute.
22623
22624 2017-07-26  Andrew Pinski  <apinski@cavium.com>
22625
22626         * config/aarch64/aarch64.c (thunderx_vector_cost): Decrease cost of
22627         vec_unalign_load_cost and vec_unalign_store_cost.
22628
22629 2017-07-26  Michael Meissner  <meissner@linux.vnet.ibm.com>
22630
22631         * config/rs6000/rs6000-cpus.def (ISA_2_7_MASKS_SERVER): Delete
22632         -mvsx-small-integer option.
22633         (ISA_3_0_MASKS_IEEE): Likewise.
22634         (OTHER_VSX_VECTOR_MASKS): Likewise.
22635         (POWERPC_MASKS): Likewise.
22636         * config/rs6000/rs6000.opt (-mvsx-small-integer): Likewise.
22637         * config/rs6000/rs6000.c (rs6000_hard_regno_mode_ok): Simplify
22638         code, only testing for DImode being allowed in non-VSX floating
22639         point registers.
22640         (rs6000_init_hard_regno_mode_ok): Change TARGET_VSX_SMALL_INTEGER
22641         to TARGET_P8_VECTOR test.  Remove redundant VSX test inside of
22642         another VSX test.
22643         (rs6000_option_override_internal): Delete -mvsx-small-integer.
22644         (rs6000_expand_vector_set): Change TARGET_VSX_SMALL_INTEGER to
22645         TARGET_P8_VECTOR test.
22646         (rs6000_secondary_reload_simple_move): Likewise.
22647         (rs6000_preferred_reload_class): Delete TARGET_VSX_SMALL_INTEGER,
22648         since TARGET_P9_VECTOR was already tested.
22649         (rs6000_opt_masks): Remove -mvsx-small-integer.
22650         * config/rs6000/vsx.md (vsx_extract_<mode>): Delete
22651         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
22652         used.
22653         (vsx_extract_<mode>_p9): Delete TARGET_VSX_SMALL_INTEGER, since a
22654         test for TARGET_VEXTRACTUB was used, and that uses
22655         TARGET_P9_VECTOR.
22656         (p9 extract splitter): Likewise.
22657         (vsx_extract_<mode>_di_p9): Likewise.
22658         (vsx_extract_<mode>_store_p9): Likewise.
22659         (vsx_extract_si): Delete TARGET_VSX_SMALL_INTEGER, since a test
22660         for TARGET_P9_VECTOR was used.  Delete code that is now dead with
22661         the elimination of TARGET_VSX_SMALL_INTEGER.
22662         (vsx_extract_<mode>_p8): Likewise.
22663         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_fl_<FL_CONV:mode>): Likewise.
22664         (vsx_ext_<VSX_EXTRACT_I:VS_scalar>_ufl_<FL_CONV:mode>): Likewise.
22665         (vsx_set_<mode>_p9): Likewise.
22666         (vsx_set_v4sf_p9): Likewise.
22667         (vsx_set_v4sf_p9_zero): Likewise.
22668         (vsx_insert_extract_v4sf_p9): Likewise.
22669         (vsx_insert_extract_v4sf_p9_2): Likewise.
22670         * config/rs6000/rs6000.md (sign extend splitter): Change
22671         TARGET_VSX_SMALL_INTEGER to TARGET_P8_VECTOR test.
22672         (floatsi<mode>2_lfiwax_mem): Likewise.
22673         (floatunssi<mode>2_lfiwzx_mem): Likewise.
22674         (float<QHI:mode><FP_ISA3:mode>2): Delete TARGET_VSX_SMALL_INTEGER,
22675         since a test for TARGET_P9_VECTOR was used.
22676         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
22677         (floatuns<QHI:mode><FP_ISA3:mode>2): Likewise.
22678         (floatuns<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
22679         (fix_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
22680         TARGET_P8_VECTOR test.
22681         (fix_trunc<mode>si2_stfiwx): Likewise.
22682         (fix_trunc<mode>si2_internal): Likewise.
22683         (fix_trunc<SFDF:mode><QHI:mode>2): Delete
22684         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
22685         used.
22686         (fix_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
22687         (fixuns_trunc<mode>si2): Change TARGET_VSX_SMALL_INTEGER to
22688         TARGET_P8_VECTOR test.
22689         (fixuns_trunc<mode>si2_stfiwx): Likewise.
22690         (fixuns_trunc<SFDF:mode><QHI:mode>2): Delete
22691         TARGET_VSX_SMALL_INTEGER, since a test for TARGET_P9_VECTOR was
22692         used.
22693         (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
22694         (fctiw<u>z_<mode>_smallint): Delete TARGET_VSX_SMALL_INTEGER,
22695         since a test for TARGET_P9_VECTOR was used.
22696         (splitter for loading small constants): Likewise.
22697
22698 2017-07-26  Andrew Pinski  <apinski@cavium.com>
22699
22700         * config/aarch64/aarch64.c (thunderx_vector_cost): Fix
22701         vec_fp_stmt_cost.
22702
22703 2017-07-26  H.J. Lu  <hongjiu.lu@intel.com>
22704
22705         PR target/81563
22706         * config/i386/i386.c (sp_valid_at): Properly check CFA offset.
22707         (fp_valid_at): Likewise.
22708
22709 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
22710
22711         * config/aarch64/aarch64.c (cortexa57_addrcost_table): Remove.
22712         (qdf24xx_addrcost_table): Likewise.
22713         (cortexa57_tunings): Update to use generic_branch_cost.
22714         (cortexa72_tunings): Likewise.
22715         (cortexa73_tunings): Likewise.
22716         (qdf24xx_tunings): Likewise.
22717
22718 2017-07-26  James Greenhalgh  <james.greenhalgh@arm.com>
22719
22720         * config/aarch64/aarch64.c (cortexa57_branch_cost): Remove.
22721         (thunderx2t99_branch_cost): Likewise.
22722         (cortexa35_tunings): Update to use generic_branch_cost.
22723         (cortexa53_tunings): Likewise.
22724         (cortexa57_tunings): Likewise.
22725         (cortexa72_tunings): Likewise.
22726         (cortexa73_tunings): Likewise.
22727         (thunderx2t99_tunings): Likewise.
22728
22729 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22730
22731         * config/sparc/sparc.c (dump_target_flag_bits): Dump MASK_FSMULD.
22732         (sparc_option_override): Honour MASK_FSMULD.
22733         * config/sparc/sparc.h (MASK_FEATURES): Add MASK_FSMULD.
22734         * config/sparc/sparc.md (muldf3_extend): Use TARGET_FSMULD.
22735         * config/sparc/sparc.opt (mfsmuld): New option.
22736         * doc/invoke.texi (mfsmuld): Document option.
22737
22738 2017-07-26  Marek Polacek  <polacek@redhat.com>
22739
22740         PR middle-end/70992
22741         * tree.c (build2_stat): Don't set TREE_CONSTANT on divisions by zero.
22742
22743 2017-07-26  Richard Biener  <rguenther@suse.de>
22744
22745         * gimple-match-head.c (do_valueize): Return OP if valueize
22746         returns NULL_TREE.
22747         (get_def): New helper to get at the def stmt of a SSA name
22748         if valueize allows.
22749         * genmatch.c (dt_node::gen_kids_1): Use get_def instead of
22750         do_valueize to get at the def stmt.
22751         (dt_operand::gen_gimple_expr): Simplify do_valueize calls.
22752
22753 2017-07-26  Wilco Dijkstra  <wdijkstr@arm.com>
22754
22755         PR middle-end/46932
22756         * auto-inc-dec.c (parse_add_or_inc): Block autoinc on sfp.
22757
22758 2017-07-26  Martin Liska  <mliska@suse.cz>
22759
22760         PR sanitize/81186
22761         * function.c (expand_function_start): Make expansion of
22762         nonlocal_goto_save_area after parm_birth_insn.
22763
22764 2017-07-26  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22765
22766         * config/sparc/sparc.c (sparc_option_override): Remove MASK_FPU
22767         from all CPU target flags enable members.
22768
22769 2017-07-26  Richard Biener  <rguenther@suse.de>
22770
22771         * genmatch.c (dt_simplify::gen): Make iterator vars const.
22772         (decision_tree::gen): Make 'type' const.
22773         (write_predicate): Likewise.
22774
22775 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
22776
22777         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok):
22778         Eliminate TARGET_UPPER_REGS_{DF,DI,SF} usage.
22779         (rs6000_option_override_internal): Likewise.
22780         (rs6000_expand_vector_set): Likewise.
22781         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Delete.
22782         (TARGET_UPPER_REGS_SF): Likewise.
22783         (TARGET_UPPER_REGS_DI): Likewise.
22784         (TARGET_VEXTRACTUB): Eliminate TARGET_UPPER_REGS_{DF,DI,SF}.
22785         (TARGET_DIRECT_MOVE_64BIT): Likewise.
22786         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Likewise.
22787         (float<QHI:mode><FP_ISA3:mode>2_internal): Likewise.
22788         (Splitters for DI constants in Altivec registers): Likewise.
22789         * config/rs6000/vsx.md (vsx_set_<mode>_p9): Likewise.
22790         (vsx_set_v4sf_p9): Likewise.
22791         (vsx_set_v4sf_p9_zero): Likewise.
22792         (vsx_insert_extract_v4sf_p9): Likewise.
22793         (vsx_insert_extract_v4sf_p9_2): Likewise.
22794
22795 2017-07-25  Carl Love  <cel@us.ibm.com>
22796
22797         * doc/extend.texi: Update the built-in documentation file for the
22798         existing built-in functions
22799         vector signed char vec_cnttz (vector signed char);
22800         vector unsigned char vec_cnttz (vector unsigned char);
22801         vector signed short vec_cnttz (vector signed short);
22802         vector unsigned short vec_cnttz (vector unsigned short);
22803         vector signed int vec_cnttz (vector signed int);
22804         vector unsigned int vec_cnttz (vector unsigned int);
22805         vector signed long long vec_cnttz (vector signed long long);
22806         vector unsigned long long vec_cnttz (vector unsigned long long);
22807
22808 2017-07-25  Andrew Pinski  <apinski@cavium.com>
22809
22810         * tree-ssa-uninit.c (warn_uninitialized_vars): Don't warn about memory
22811         accesses where the use is for the first operand of a BIT_INSERT.
22812
22813 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
22814
22815         PR bootstrap/81521
22816         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
22817         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
22818
22819 2017-07-25  Jim Wilson  <jim.wilson@linaro.org>
22820
22821         * config/i386/gstabs.h: Delete.
22822         * config/i386/openbsd.h, config/i386/t-openbsd: Likewise.
22823
22824 2017-07-25  Uros Bizjak  <ubizjak@gmail.com>
22825
22826         * config/i386/i386.c (ix86_decompose_address): Do not check for
22827         register RTX when looking at index_reg or base_reg.
22828         * config/i386/i386.h (INCOMING_RETURN_ADDR_RTX): Use stack_pointer_rtx.
22829
22830 2017-07-25  Eric Botcazou  <ebotcazou@adacore.com>
22831
22832         * gimple.c (gimple_assign_set_rhs_with_ops): Do not ask gsi_replace
22833         to update EH info here.
22834
22835 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
22836
22837         * match.pd ((X * CST1) * CST2): Simplify to X * (CST1 * CST2).
22838
22839 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
22840
22841         * match.pd ((X * CST) * Y): Reassociate to (X * Y) * CST.
22842
22843 2017-07-25  Torsten Duwe  <duwe@suse.de>
22844
22845         * common.opt: Introduce -fpatchable-function-entry
22846         command line option, and its variables function_entry_patch_area_size
22847         and function_entry_patch_area_start.
22848         * opts.c (common_handle_option): Add -fpatchable_function_entry_ case,
22849         including a two-value parser.
22850         * target.def (print_patchable_function_entry): New target hook.
22851         * targhooks.h (default_print_patchable_function_entry): New function.
22852         * targhooks.c (default_print_patchable_function_entry): Likewise.
22853         * toplev.c (process_options): Switch off IPA-RA if
22854         patchable function entries are being generated.
22855         * varasm.c (assemble_start_function): Look at the
22856         patchable-function-entry command line switch and current
22857         function attributes and maybe generate NOP instructions by
22858         calling the print_patchable_function_entry hook.
22859         * doc/extend.texi: Document patchable_function_entry attribute.
22860         * doc/invoke.texi: Document -fpatchable_function_entry
22861         command line option.
22862         * doc/tm.texi.in (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY):
22863         New target hook.
22864         * doc/tm.texi: Re-generate.
22865
22866 2017-07-25  Jakub Jelinek  <jakub@redhat.com>
22867
22868         PR target/81532
22869         * config/i386/constraints.md (Yd, Ye): Use ALL_SSE_REGS for
22870         TARGET_AVX512DQ rather than TARGET_AVX512BW.
22871
22872 2017-07-25  Tamar Christina  <tamar.christina@arm.com>
22873
22874         * config/arm/parsecpu.awk (all_cores): Remove duplicates.
22875
22876 2017-07-25  Richard Biener  <rguenther@suse.de>
22877
22878         PR tree-optimization/81455
22879         * tree-ssa-loop-unswitch.c (find_loop_guard): Make sure to
22880         not walk in cycles when looking for guards.
22881
22882 2017-07-25  Richard Biener  <rguenther@suse.de>
22883
22884         PR tree-optimization/81529
22885         * tree-vect-stmts.c (process_use): Disregard live induction PHIs
22886         when optimizing backedge uses.
22887
22888 2017-07-25  David Edelsohn  <dje.gcc@gmail.com>
22889
22890         * dwarf2asm.c (dw2_asm_output_nstring): Encode double quote
22891         character for AIX.
22892         * dwarf2out.c (output_macinfo): Copy debug_line_section_label
22893         to dl_section_ref.  On AIX, append an expression to subtract
22894         the size of the section length to dl_section_ref.
22895
22896 2017-07-25  Segher Boessenkool  <segher@kernel.crashing.org>
22897
22898         * configure.ac: If any of the config.* scripts fail, exit 1.
22899         * configure: Regenerate.
22900
22901 2017-07-25  Richard Biener  <rguenther@suse.de>
22902
22903         PR middle-end/81546
22904         * tree-ssa-operands.c (verify_imm_links): Remove cap on number
22905         of immediate uses, be more verbose on errors.
22906
22907 2017-07-25  Richard Biener  <rguenther@suse.de>
22908
22909         PR tree-optimization/81510
22910         * tree-vect-loop.c (vect_is_simple_reduction): When the
22911         reduction stmt is not inside the loop bail out.
22912
22913 2017-07-25  Richard Biener  <rguenther@suse.de>
22914
22915         PR tree-optimization/81303
22916         * tree-vect-loop-manip.c (vect_loop_versioning): Build
22917         profitability check against LOOP_VINFO_NITERSM1.
22918
22919 2017-07-25  Alexander Monakov  <amonakov@ispras.ru>
22920
22921         * domwalk.c (cmp_bb_postorder): Simplify.
22922         (sort_bbs_postorder): New function.  Use it...
22923         (dom_walker::walk): ...here to optimize common cases.
22924
22925 2017-07-25  Martin Liska  <mliska@suse.cz>
22926
22927         PR ipa/81520
22928         * ipa-visibility.c (function_and_variable_visibility): Make the
22929         redirection just on target that supports aliasing.
22930         Fix GNU coding style.
22931
22932 2017-07-25  Sebastian Huber  <sebastian.huber@embedded-brains.de>
22933
22934         PR libgcc/61152
22935         * config/aarch64/rtems.h: Add GCC Runtime Library Exception.
22936         Format changes.
22937         * config/arm/rtems.h: Likewise.
22938         * config/bfin/rtems.h: Likewise.
22939         * config/i386/rtemself.h: Likewise.
22940         * config/lm32/rtems.h: Likewise.
22941         * config/m32c/rtems.h: Likewise.
22942         * config/m68k/rtemself.h: Likewise.
22943         * config/microblaze/rtems.h: Likewise.
22944         * config/mips/rtems.h: Likewise.
22945         * config/moxie/rtems.h: Likewise.
22946         * config/nios2/rtems.h: Likewise.
22947         * config/powerpcspe/rtems.h: Likewise.
22948         * config/rs6000/rtems.h: Likewise.
22949         * config/rtems.h: Likewise.
22950         * config/sh/rtems.h: Likewise.
22951         * config/sh/rtemself.h: Likewise.
22952         * config/sparc/rtemself.h: Likewise.
22953
22954 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
22955
22956         PR 81487
22957         * hsa-brig.c (brig_init): Use xasprintf instead of asprintf.
22958         * gimple-pretty-print.c (dump_profile, dump_probability): Same.
22959         * tree-ssa-structalias.c (alias_get_name): Same.
22960
22961 2017-07-25  Bin Cheng  <bin.cheng@arm.com>
22962
22963         PR target/81414
22964         * config/aarch64/cortex-a57-fma-steering.c (analyze): Skip fmul/fmac
22965         instructions if no du chain is found.
22966
22967 2017-07-25  Georg-Johann Lay  <avr@gjlay.de>
22968
22969         * config/avr/avr-log.c (avr_log_vadump) ['T']: Print NULL-TREE.
22970
22971 2017-07-25  Richard Biener  <rguenther@suse.de>
22972
22973         PR middle-end/81505
22974         * fold-const.c (fold_negate_const): TREE_OVERFLOW should be
22975         sticky.
22976
22977 2017-07-24  Michael Meissner  <meissner@linux.vnet.ibm.com>
22978
22979         * config/rs6000/rs6000-cpus.def (ISA_2_6_MASKS_SERVER): Delete
22980         upper-regs options.
22981         (ISA_2_7_MASKS_SERVER): Likewise.
22982         (ISA_3_0_MASKS_IEEE): Likewise.
22983         (OTHER_P8_VECTOR_MASKS): Likewise.
22984         (OTHER_VSX_VECTOR_MASKS): Likewise.
22985         (POWERPC_MASKS): Likewise.
22986         (power7 cpu): Use ISA_2_6_MASKS_SERVER instead of using a
22987         duplicate list of options.
22988         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove
22989         explicit -mupper-regs options.
22990         * config/rs6000/rs6000.opt (-mvsx-scalar-memory): Delete
22991         -mupper-regs* options.  Delete -mvsx-scalar-memory, which was an
22992         alias for -mupper-regs-df.
22993         * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): Likewise.
22994         (rs6000_init_hard_regno_mode_ok): Likewise.
22995         (rs6000_option_override_internal): Likewise.
22996         (rs6000_opt_masks): Likewise.
22997         * config/rs6000/rs6000.h (TARGET_UPPER_REGS_DF): Define upper regs
22998         options in terms of whether -mvsx or -mpower8-vector was used.
22999         (TARGET_UPPER_REGS_DI): Likewise.
23000         (TARGET_UPPER_REGS_SF): Likewise.
23001         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete the
23002         -mupper-regs-* options.
23003
23004 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
23005
23006         * passes.c (emergency_dump_function): Print some empty lines and a
23007         header before the RTL dump.
23008
23009 2017-07-24  Segher Boessenkool  <segher@kernel.crashing.org>
23010
23011         * cfgrtl.c (rtl_dump_bb): Don't call NEXT_INSN on NULL.
23012
23013 2017-07-24  Wilco Dijkstra  <wdijkstr@arm.com>
23014
23015         PR target/79041
23016         * config/aarch64/aarch64.c (aarch64_classify_symbol):
23017         Avoid SYMBOL_SMALL_ABSOLUTE for literals with pc-relative literals.
23018
23019 2017-07-24  Carl Love  <cel@us.ibm.com>
23020
23021         * config/rs6000/rs6000-c.c: Add support for built-in functions
23022         vector float vec_extract_fp32_from_shorth (vector unsigned short);
23023         vector float vec_extract_fp32_from_shortl (vector unsigned short);
23024         * config/rs6000/altivec.h (vec_extract_fp_from_shorth,
23025         vec_extract_fp_from_shortl): Add defines for the two builtins.
23026         * config/rs6000/rs6000-builtin.def (VEXTRACT_FP_FROM_SHORTH,
23027         VEXTRACT_FP_FROM_SHORTL): Add BU_P9V_OVERLOAD_1 and BU_P9V_VSX_1
23028         new builtins.
23029         * config/rs6000/vsx.md vsx_xvcvhpsp): Add define_insn.
23030         (vextract_fp_from_shorth, vextract_fp_from_shortl): Add define_expands.
23031         * doc/extend.texi: Update the built-in documentation file for the
23032         new built-in function.
23033
23034 2017-07-24  Jakub Jelinek  <jakub@redhat.com>
23035
23036         PR bootstrap/81521
23037         * tree.def: Remove TYPE_METHODS documentation, adjust TYPE_FIELDS
23038         documentation.
23039         * doc/generic.texi: Likewise.
23040         * config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
23041         for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
23042
23043 2017-07-24  Jackson Woodruff  <jackson.woodruff@arm.com>
23044
23045         * config/aarch64/aarch64-simd.md (aarch64_mla_elt_merge<mode>): New.
23046         (aarch64_mls_elt_merge<mode>): Likewise.
23047
23048 2017-07-23  Krister Walfridsson  <krister.walfridsson@gmail.com>
23049
23050         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
23051         having __cxa_atexit.
23052
23053 2017-07-23  Michael Collison  <michael.collison@arm.com>
23054
23055         * config/arm/arm.c (arm_option_override): Deprecate
23056         use of -mstructure-size-boundary.
23057         * config/arm/arm.opt: Deprecate -mstructure-size-boundary.
23058         * doc/invoke.texi: Deprecate -mstructure-size-boundary.
23059
23060 2017-07-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23061
23062         PR target/80695
23063         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
23064         Reduce cost estimate for direct moves.
23065
23066 2017-07-23  Uros Bizjak  <ubizjak@gmail.com>
23067
23068         PR target/80569
23069         * config/i386/i386.c (ix86_option_override_internal): Disable
23070         BMI, BMI2 and TBM instructions for -m16.
23071
23072 2017-07-21  Carl Love  <cel@us.ibm.com>
23073
23074         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
23075         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
23076         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
23077         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
23078         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
23079         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
23080         VMULOSW): New enum "unspec" values.
23081         (altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
23082         altivec_vmulosw): New patterns.
23083         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
23084         VMULOSW): Add definitions.
23085
23086 2017-07-21  Jim Wilson  <jim.wilson@linaro.org>
23087
23088         * config/aarch64/aarch64-cores.def (falkor): Add AARCH64_FL_RDMA.
23089         (qdf24xx): Likewise.
23090         * config/aarch64/aarch64-options-extensions.def (rdma); New.
23091         * config/aarch64/aarch64.h (AARCH64_FL_RDMA): New.
23092         (AARCH64_FL_V8_1): Renumber.
23093         (AARCH64_FL_FOR_ARCH8_1): Add AARCH64_FL_RDMA.
23094         (AARCH64_ISA_RDMA): Use AARCH64_FL_RDMA.
23095         * config/aarch64/arm_neon.h: Use +rdma instead of arch=armv8.1-a.
23096         * doc/invoke.texi (AArch64 Options): Mention +rmda in -march docs.  Add
23097         rdma to feature modifiers list.
23098
23099 2017-07-21  Yury Gribov  <tetra2005@gmail.com>
23100
23101         PR middle-end/56727
23102         * ipa-visibility (function_and_variable_visibility): Convert
23103         recursive PLT call to direct call if appropriate.
23104
23105 2017-07-21  Andrew Pinski  <apinski@cavium.com>
23106
23107         * tree-ssa-sccvn.c (vn_nary_op_eq): Check BIT_INSERT_EXPR's
23108         operand 1 to see if the types precision matches.
23109         * fold-const.c (operand_equal_p): Likewise.
23110
23111 2017-07-21  Richard Biener  <rguenther@suse.de>
23112
23113         PR tree-optimization/81303
23114         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs): Pass
23115         in datarefs vector.  Allow NULL dr0 for no peeling cost estimate.
23116         (vect_peeling_hash_get_lowest_cost): Adjust.
23117         (vect_enhance_data_refs_alignment): Likewise.  Use
23118         vect_get_peeling_costs_all_drs to compute the penalty for no
23119         peeling to match up costs.
23120
23121 2017-07-21  Richard Biener  <rguenther@suse.de>
23122
23123         PR tree-optimization/81500
23124         * tree-vect-loop.c (vect_is_simple_reduction): Properly fail if
23125         we didn't identify a reduction path.
23126
23127 2017-07-21  Tom de Vries  <tom@codesourcery.com>
23128             Cesar Philippidis  <cesar@codesourcery.com>
23129
23130         PR gcov-profile/81442
23131         * config/nvptx/nvptx.c (nvptx_goacc_reduction_init): Add missing edge
23132         probabilities.
23133
23134 2017-07-21  Tom de Vries  <tom@codesourcery.com>
23135
23136         PR lto/81430
23137         * config/nvptx/nvptx.c (nvptx_override_options_after_change): New
23138         function.
23139         (TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE): Define to
23140         nvptx_override_options_after_change.
23141
23142 2017-07-21  Ulrich Drepper  <drepper@redhat.com>
23143
23144         * dwarf2out.c (output_file_names): Avoid double testing for
23145         dwarf_version >= 5.
23146
23147 2017-07-21  Georg-Johann Lay  <avr@gjlay.de>
23148
23149         * doc/invoke.texi (AVR Built-in Functions): Re-layout section.
23150
23151 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
23152
23153         * cfgcleanup.c (flow_find_cross_jump): Do not crossjump across
23154         hot/cold regions.
23155         (try_crossjump_to_edge): Do not punt on partitioned functions.
23156
23157 2016-07-21  Jan Hubicka  <hubicka@ucw.cz>
23158
23159         * bb-reorder.c (find_rarely_executed_basic_blocks_and_crossing_edges):
23160         Put all BBs reachable only via paths crossing cold region to cold
23161         region.
23162         * cfgrtl.c (find_bbs_reachable_by_hot_paths): New function.
23163
23164 2016-07-21  Richard Biener  <rguenther@suse.de>
23165
23166         PR tree-optimization/81303
23167         * tree-vect-loop.c (vect_estimate_min_profitable_iters): Take
23168         into account prologue and epilogue iterations when raising
23169         min_profitable_iters to sth at least covering one vector iteration.
23170
23171 2017-07-21  Tamar Christina  <tamar.christina@arm.com>
23172
23173         * config/arm/arm.c (arm_test_cpu_arch_dat):
23174         Check for overlap.
23175
23176 2017-07-20  Nathan Sidwell  <nathan@acm.org>
23177
23178         Remove TYPE_METHODS.
23179         * tree.h (TYPE_METHODS): Delete.
23180         * dwarf2out.c (gen_member_die): Member fns are on TYPE_FIELDS.
23181         * dbxout.c (dbxout_type_fields): Ignore FUNCTION_DECLs.
23182         (dbxout_type_methods): Scan TYPE_FIELDS.
23183         (dbxout_type): Don't check TYPE_METHODS here.
23184         * function.c (use_register_for_decl): Always ignore register for
23185         class types when not optimizing.
23186         * ipa-devirt.c (odr_types_equivalent_p): Delete TYPE_METHODS scan.
23187         * tree.c (free_lang_data_in_type): Stitch out member functions and
23188         templates from TYPE_FIELDS.
23189         (build_distinct_type_copy, verify_type_variant,
23190         verify_type): Member fns are on TYPE_FIELDS.
23191         * tree-dump.c (dequeue_and_dump): No TYPE_METHODS.
23192         * tree-pretty-print.c (dump_generic_node): Likewise.
23193
23194 2017-07-20  Jakub Jelinek  <jakub@redhat.com>
23195
23196         PR target/80846
23197         * config/i386/i386.c (ix86_expand_vector_init_general): Handle
23198         V2TImode and V4TImode.
23199         (ix86_expand_vector_extract): Likewise.
23200         * config/i386/sse.md (VMOVE): Enable V4TImode even for just
23201         TARGET_AVX512F, instead of only for TARGET_AVX512BW.
23202         (ssescalarmode): Handle V4TImode and V2TImode.
23203         (VEC_EXTRACT_MODE): Add V4TImode and V2TImode.
23204         (*vec_extractv2ti, *vec_extractv4ti): New insns.
23205         (VEXTRACTI128_MODE): New mode iterator.
23206         (splitter for *vec_extractv?ti first element): New.
23207         (VEC_INIT_MODE): New mode iterator.
23208         (vec_init<mode>): Consolidate 3 expanders into one using
23209         VEC_INIT_MODE mode iterator.
23210
23211 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
23212
23213         * lra-assigns.c (pseudo_compare_func): Fix comparison step based on
23214         non_spilled_static_chain_regno_p.
23215
23216 2017-07-20  Alexander Monakov  <amonakov@ispras.ru>
23217
23218         * gimple-ssa-store-merging.c (sort_by_bitpos): Return 0 on equal bitpos.
23219
23220 2017-07-20  Jan Hubicka  <hubicka@ucw.cz>
23221
23222         * bb-reorder.c (connect_traces): Allow copying of blocks within
23223         single partition.
23224
23225 2017-07-20  Richard Biener  <rguenther@suse.de>
23226
23227         * gimple.h (gimple_phi_result): Add gphi * overload.
23228         (gimple_phi_result_ptr): Likewise.
23229         (gimple_phi_arg): Likewise.  Adjust index assert to only
23230         allow actual argument accesses rather than all slots available
23231         by capacity.
23232         (gimple_phi_arg_def): Add gphi * overload.
23233         * tree-phinodes.c (make_phi_node): Initialize only actual
23234         arguments.
23235         (resize_phi_node): Clear memory not covered by old node,
23236         do not initialize excess argument slots.
23237         (reserve_phi_args_for_new_edge): Initialize new argument slot
23238         completely.
23239
23240 2017-07-20  Bin Cheng  <bin.cheng@arm.com>
23241
23242         PR tree-optimization/81388
23243         Revert r238585:
23244         2016-07-21  Bin Cheng  <bin.cheng@arm.com>
23245
23246         * tree-ssa-loop-niter.c (number_of_iterations_lt_to_ne): Clean up
23247         by removing computation of may_be_zero.
23248
23249 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
23250             Tom de Vries  <tom@codesourcery.com>
23251
23252         PR middle-end/81030
23253         * cfgbuild.c (find_many_sub_basic_blocks): Update REG_BR_PROB note
23254         when gimple level profile disagrees with what RTL expander did.
23255
23256 2017-07-20  Richard Biener  <rguenther@suse.de>
23257
23258         PR tree-optimization/61171
23259         * tree-vectorizer.h (slp_instance): Add reduc_phis member.
23260         (vect_analyze_stmt): Add slp instance parameter.
23261         (vectorizable_reduction): Likewise.
23262         * tree-vect-loop.c (vect_analyze_loop_operations): Adjust.
23263         (vect_is_simple_reduction): Deal with chains not detected
23264         as SLP reduction chain, specifically not properly associated
23265         chains containing a mix of plus/minus.
23266         (get_reduction_op): Remove.
23267         (get_initial_defs_for_reduction): Simplify, pass in whether
23268         this is a reduction chain, pass in the SLP node for the PHIs.
23269         (vect_create_epilog_for_reduction): Get the SLP instance as
23270         arg and adjust.
23271         (vectorizable_reduction): Get the SLP instance as arg.
23272         During analysis remember the SLP node with the PHIs in the
23273         instance.  Simplify getting at the vectorized reduction PHIs.
23274         * tree-vect-slp.c (vect_slp_analyze_node_operations): Pass
23275         through SLP instance.
23276         (vect_slp_analyze_operations): Likewise.
23277         * tree-vect-stms.c (vect_analyze_stmt): Likewise.
23278         (vect_transform_stmt): Likewise.
23279
23280 2017-07-20  Tom de Vries  <tom@codesourcery.com>
23281
23282         PR tree-optimization/81489
23283         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Move
23284         read of phi arg location to before loop that modifies phi.
23285
23286 2017-07-20  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
23287
23288         * match.pd (((m1 >/</>=/<= m2) * d -> (m1 >/</>=/<= m2) ? d : 0):
23289         New pattern.
23290
23291 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
23292
23293         PR middle-end/81331
23294         * except.c (execute): Fix ordering issue.
23295
23296 2018-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
23297
23298         PR rtl-optimization/81423
23299         * combine.c (make_compound_operation_int): Don't try to optimize
23300         the AND of a SUBREG of an LSHIFTRT if that SUBREG is paradoxical.
23301
23302 2017-07-19  Segher Boessenkool  <segher@kernel.crashing.org>
23303
23304         PR rtl-optimization/81423
23305         * simplify-rtx.c (simplify_truncation): Handle truncating an IOR
23306         with a constant that is -1 in the truncated to mode.
23307
23308 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
23309
23310         * predict.c (propagate_unlikely_bbs_forward): Break out from ...
23311         (determine_unlikely_bbs): ... here.
23312         * predict.h (propagate_unlikely_bbs_forward): Declare.
23313         * cfgexpand.c (pass_expand::execute): Use it.
23314         * bb-reorder.c (sanitize_hot_paths): Do not consider known to be
23315         unlikely edges.
23316         (find_rarely_executed_basic_blocks_and_crossing_edges): Use
23317         propagate_unlikely_bbs_forward.
23318
23319 2017-07-19  Jan Hubicka  <hubicka@ucw.cz>
23320
23321         PR middle-end/81331
23322         * except.c (maybe_add_nop_after_section_switch): New function.
23323         (execute): Use it.
23324
23325 2017-07-19  Tom de Vries  <tom@codesourcery.com>
23326
23327         * gimple.h (gimple_phi_set_arg): Make assert more strict.
23328
23329 2017-07-19  Tom de Vries  <tom@codesourcery.com>
23330
23331         * gimple.h (gimple_phi_arg): Make assert more strict.
23332
23333 2017-07-19  Steven Munroe  <munroesj@gcc.gnu.org>
23334
23335         * config.gcc (powerpc*-*-*): Add mmintrin.h.
23336         * config/rs6000/mmintrin.h: New file.
23337         * config/rs6000/x86intrin.h [__ALTIVEC__]: Include mmintrin.h.
23338
23339 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
23340
23341         PR tree-optimization/81346
23342         * match.pd: Optimize (X - 1U) <= INT_MAX-1U into (int) X > 0.
23343
23344 2017-07-19  Tom de Vries  <tom@codesourcery.com>
23345
23346         * config/nvptx/nvptx.md (VECIM): Add V2DI.
23347
23348 2017-07-19  Tom de Vries  <tom@codesourcery.com>
23349
23350         * config/nvptx/nvptx-modes.def: Add V2DImode.
23351         * config/nvptx/nvptx-protos.h (nvptx_data_alignment): Declare.
23352         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2DImode.
23353         (nvptx_output_mov_insn): Handle lack of mov.b128.
23354         (nvptx_print_operand): Handle 'H' and 'L' codes.
23355         (nvptx_vector_mode_supported): Allow V2DImode.
23356         (nvptx_preferred_simd_mode): New function.
23357         (nvptx_data_alignment): New function.
23358         (TARGET_VECTORIZE_PREFERRED_SIMD_MODE): Redefine to
23359         nvptx_preferred_simd_mode.
23360         * config/nvptx/nvptx.h (STACK_BOUNDARY, BIGGEST_ALIGNMENT): Change from
23361         64 to 128 bits.
23362         (DATA_ALIGNMENT): Define.  Set to nvptx_data_alignment.
23363
23364 2017-07-19  Tom de Vries  <tom@codesourcery.com>
23365
23366         * config/nvptx/nvptx-modes.def: New file.  Add V2SImode.
23367         * config/nvptx/nvptx.c (nvptx_ptx_type_from_mode): Handle V2SImode.
23368         (nvptx_vector_mode_supported): New function.  Allow V2SImode.
23369         (TARGET_VECTOR_MODE_SUPPORTED_P): Redefine to nvptx_vector_mode_supported.
23370         * config/nvptx/nvptx.md (VECIM): New mode iterator. Add V2SI.
23371         (mov<VECIM>_insn): New define_insn.
23372         (define_expand "mov<VECIM>): New define_expand.
23373
23374 2017-07-19  Tom de Vries  <tom@codesourcery.com>
23375
23376         * config/nvptx/nvptx.c (nvptx_print_operand): Handle v2 vector mode.
23377
23378 2017-07-19  Jakub Jelinek  <jakub@redhat.com>
23379
23380         PR tree-optimization/81346
23381         * fold-const.h (fold_div_compare, range_check_type): Declare.
23382         * fold-const.c (range_check_type): New function.
23383         (build_range_check): Use range_check_type.
23384         (fold_div_compare): No longer static, rewritten into
23385         a match.pd helper function.
23386         (fold_comparison): Don't call fold_div_compare here.
23387         * match.pd (X / C1 op C2): New optimization using fold_div_compare
23388         as helper function.
23389
23390 2017-07-19  Nathan Sidwell  <nathan@acm.org>
23391
23392         * tree.h (TYPE_MINVAL, TYPE_MAXVAL): Rename to ...
23393         (TYPE_MIN_VALUE_RAW, TYPE_MAX_VALUE_RAW): ... these.
23394         * tree.c (find_decls_types_r, verify_type): Use
23395         TYPE_{MIN,MAX}_VALUE_RAW.
23396         * lto-streamer-out.c (DFS::DFS_write_tree_body): Likewise.
23397         (hash_tree): Likewise.
23398         * tree-streamer-in.c (lto_input_ts_type_non_common_tree_pointers):
23399         Likewise.
23400         * tree-streamer-out.c (write_ts_type_non_common_tree_pointers):
23401         Likewise.
23402
23403 2017-07-18  Tom de Vries  <tom@codesourcery.com>
23404
23405         PR middle-end/81464
23406         * omp-expand.c (expand_omp_for_static_chunk): Handle
23407         equal-argument loop exit phi.
23408
23409 2017-07-18  Uros Bizjak  <ubizjak@gmail.com>
23410
23411         PR target/81471
23412         * config/i386/i386.md (rorx_immediate_operand): New mode attribute.
23413         (*bmi2_rorx<mode>3_1): Use rorx_immediate_operand as
23414         operand 2 predicate.
23415         (*bmi2_rorxsi3_1_zext): Use const_0_to_31_operand as
23416         operand 2 predicate.
23417         (ror,rol -> rorx splitters): Use const_int_operand as
23418         operand 2 predicate.
23419
23420 2017-06-18  Richard Biener  <rguenther@suse.de>
23421
23422         PR tree-optimization/81410
23423         * tree-vect-stmts.c (vectorizable_load): Properly adjust for
23424         the gap in the ! slp_perm SLP case after each group.
23425
23426 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
23427
23428         PR middle-end/81463
23429         * cfgloopmanip.c (scale_loop_profile): Watch out for zero frequency
23430         again.
23431
23432 2017-07-18  Jan Hubicka  <hubicka@ucw.cz>
23433
23434         PR middle-end/81462
23435         * predict.c (set_even_probabilities): Cleanup; do not affect
23436         probabilities that are already known.
23437         (combine_predictions_for_bb): Call even when count is set.
23438
23439 2017-07-18  Nathan Sidwell  <nathan@acm.org>
23440
23441         * tree-parloops.c (try_transform_to_exit_first_loop_alt): Use
23442         TYPE_MAX_VALUE.
23443
23444 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
23445
23446         PR target/81408
23447         * tree-ssa-loop-niter.c (number_of_iterations_exit): Dump missed
23448         optimization for loop niter analysis.
23449
23450 2017-07-18  Georg-Johann Lay  <avr@gjlay.de>
23451
23452         PR target/81473
23453         * config/avr/avr.c (avr_optimize_casesi): Don't use
23454         INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX.
23455
23456 2017-07-18  Robin Dapp  <rdapp@linux.vnet.ibm.com>
23457
23458         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Remove
23459         body_cost_vec from _vect_peel_extended_info.
23460         (vect_peeling_hash_get_lowest_cost): Do not set body_cost_vec.
23461         (vect_peeling_hash_choose_best_peeling): Remove body_cost_vec and
23462         npeel.
23463
23464 2017-07-18  Bin Cheng  <bin.cheng@arm.com>
23465
23466         * config/arm/arm.c (emit_unlikely_jump): Remove unused var.
23467
23468 2017-07-18  Richard Biener  <rguenther@suse.de>
23469
23470         PR tree-optimization/80620
23471         PR tree-optimization/81403
23472         * tree-ssa-pre.c (phi_translate_1): Clear range and points-to
23473         info when re-using a VN table entry.
23474
23475 2017-07-18  Richard Biener  <rguenther@suse.de>
23476
23477         PR tree-optimization/81418
23478         * tree-vect-loop.c (vectorizable_reduction): Properly compute
23479         vectype_in.  Verify that with lane-reducing reduction operations
23480         we have a single def-use cycle.
23481
23482 2017-07-17  Carl Love  <cel@us.ibm.com>
23483
23484         Revert commit r249424   2017-06-20  Carl Love  <cel@us.ibm.com>
23485
23486         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
23487         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
23488         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
23489         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
23490         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
23491         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
23492         VMULOSW): New enum "unspec" values.
23493         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
23494         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
23495         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
23496         altivec_vmulosw): New patterns.
23497         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
23498         VMULOSW): Add definitions.
23499
23500 2017-07-17  Uros Bizjak  <ubizjak@gmail.com>
23501
23502         * config/alpha/alpha.c: Include predict.h.
23503
23504 2017-07-17  Yury Gribov  <tetra2005@gmail.com>
23505
23506         * tree-vrp.c (compare_assert_loc): Fix comparison function
23507         to return predictable results.
23508
23509 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
23510
23511         * config/arc/arc.md (adddi3): Remove support for mexpand-adddi
23512         option.
23513         (subdi3): Likewise.
23514         * config/arc/arc.opt (mexpand-adddi): Deprecate it.
23515         * doc/invoke.texi (mexpand-adddi): Update text.
23516
23517 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
23518
23519         * config/arc/arc.md (clzsi2): Expand to an arc_clzsi2 instruction
23520         that also clobbers the CC register. The old expand code is moved
23521         to ...
23522         (*arc_clzsi2): ... here.
23523         (ctzsi2): Expand to an arc_ctzsi2 instruction that also clobbers
23524         the CC register. The old expand code is moved to ...
23525         (arc_ctzsi2): ... here.
23526
23527 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
23528
23529         * config/arc/arc.opt (mindexed-loads): Use initial value
23530         TARGET_INDEXED_LOADS_DEFAULT.
23531         (mauto-modify-reg): Use initial value
23532         TARGET_AUTO_MODIFY_REG_DEFAULT.
23533         * config/arc/elf.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
23534         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
23535         * config/arc/linux.h (TARGET_INDEXED_LOADS_DEFAULT): Define.
23536         (TARGET_AUTO_MODIFY_REG_DEFAULT): Likewise.
23537
23538 2017-07-17  Martin Liska  <mliska@suse.cz>
23539
23540         PR sanitizer/81302
23541         * opts.c (finish_options): Do not allow -fgnu-tm
23542         w/ -fsanitize={kernel-,}address.  Say sorry.
23543
23544 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
23545
23546         PR target/81369
23547         * tree-loop-distribution.c (classify_partition): Only assert on
23548         numer of iterations.
23549         (merge_dep_scc_partitions): Delete prameter.  Update function call.
23550         (distribute_loop): Remove code handling loop with unknown niters.
23551         (pass_loop_distribution::execute): Skip loop with unknown niters.
23552
23553 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
23554
23555         PR target/81369
23556         * tree-loop-distribution.c (merge_dep_scc_partitions): Sink call to
23557         function sort_partitions_by_post_order.
23558
23559 2017-07-17  Bin Cheng  <bin.cheng@arm.com>
23560
23561         PR tree-optimization/81374
23562         * tree-loop-distribution.c (pass_loop_distribution::execute): Record
23563         the max index of basic blocks, rather than number of basic blocks.
23564
23565 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
23566
23567         * config/arc/arc-protos.h (arc_legitimate_pc_offset_p): Remove
23568         proto.
23569         (arc_legitimate_pic_operand_p): Likewise.
23570         * config/arc/arc.c (arc_legitimate_pic_operand_p): Remove
23571         function.
23572         (arc_needs_pcl_p): Likewise.
23573         (arc_legitimate_pc_offset_p): Likewise.
23574         (arc_legitimate_pic_addr_p): Remove LABEL_REF case, as this
23575         function is also used in constrains.md.
23576         (arc_legitimate_constant_p): Use arc_legitimate_pic_addr_p to
23577         validate pic constants. Handle CONST_INT, CONST_DOUBLE, MINUS and
23578         PLUS.  Only return true/false in known cases, otherwise assert.
23579         (arc_legitimate_address_p): Remove arc_legitimate_pic_addr_p as it
23580         is already called in arc_legitimate_constant_p.
23581         * config/arc/arc.h (CONSTANT_ADDRESS_P): Consider also LABEL for
23582         pic addresses.
23583         (LEGITIMATE_PIC_OPERAND_P): Use
23584         arc_raw_symbolic_reference_mentioned_p function.
23585         * config/arc/constraints.md (Cpc): Use arc_legitimate_pic_addr_p
23586         function.
23587         (Cal): Likewise.
23588         (C32): Likewise.
23589
23590 2017-07-17  Claudiu Zissulescu  <claziss@synopsys.com>
23591         Andrew Burgess  <andrew.burgess@embecosm.com>
23592
23593         * config/arc/arc-protos.h (arc_compute_function_type): Change prototype.
23594         (arc_return_address_register): New function.
23595         * config/arc/arc.c (arc_handle_fndecl_attribute): New function.
23596         (arc_handle_fndecl_attribute): Add naked attribute.
23597         (TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS): Define.
23598         (TARGET_WARN_FUNC_RETURN): Likewise.
23599         (arc_allocate_stack_slots_for_args): New function.
23600         (arc_warn_func_return): Likewise.
23601         (machine_function): Change type fn_type.
23602         (arc_compute_function_type): Consider new naked function type,
23603         change function return type.
23604         (arc_must_save_register): Adapt to handle new
23605         arc_compute_function_type's return type.
23606         (arc_expand_prologue): Likewise.
23607         (arc_expand_epilogue): Likewise.
23608         (arc_return_address_regs): Delete.
23609         (arc_return_address_register): New function.
23610         (arc_epilogue_uses): Use above function.
23611         * config/arc/arc.h (arc_return_address_regs): Delete prototype.
23612         (arc_function_type): Change encoding, add naked type.
23613         (ARC_INTERRUPT_P): Change to handle the new encoding.
23614         (ARC_FAST_INTERRUPT_P): Likewise.
23615         (ARC_NORMAL_P): Define.
23616         (ARC_NAKED_P): Likewise.
23617         (arc_compute_function_type): Delete prototype.
23618         * config/arc/arc.md (in_ret_delay_slot): Use
23619         arc_return_address_register function.
23620         (simple_return): Likewise.
23621         (p_return_i): Likewise.
23622
23623 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
23624
23625         PR tree-optimization/81428
23626         * match.pd (X / X -> one): Don't optimize _Fract divisions, as 1
23627         can't be built for those types.
23628
23629 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
23630
23631         Remove stuff dead since r239246.
23632
23633         * config/avr/avr-arch.h (avr_inform_devices): Remove dead proto.
23634         * config/avr/avr-devices.c (mcu_name, comparator, avr_mcus_str)
23635         (avr_inform_devices): Remove dead stuff.
23636
23637 2017-07-17  Tamar Christina  <tamar.christina@arm.com>
23638
23639         * config/arm/arm_neon.h: Fix softp typo.
23640
23641 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
23642
23643         PR tree-optimization/81365
23644         * tree-ssa-phiprop.c (propagate_with_phi): When considering hoisting
23645         aggregate moves onto bb predecessor edges, make sure there are no
23646         loads that could alias the lhs in between the start of bb and the
23647         loads from *phi.
23648
23649 2017-07-17  Georg-Johann Lay  <avr@gjlay.de>
23650
23651         PR 80929
23652         * config/avr/avr.c (avr_mul_highpart_cost): New static function.
23653         (avr_rtx_costs_1) [TRUNCATE]: Use it to compute mul_highpart cost.
23654         [LSHIFTRT, outer_code = TRUNCATE]: Same.
23655
23656 2017-07-17  Jakub Jelinek  <jakub@redhat.com>
23657
23658         PR tree-optimization/81396
23659         * tree-ssa-math-opts.c (struct symbolic_number): Add n_ops field.
23660         (init_symbolic_number): Initialize it to 1.
23661         (perform_symbolic_merge): Add n_ops from both operands into the new
23662         n_ops.
23663         (find_bswap_or_nop): Don't consider n->n == cmpnop computations
23664         without base_addr as useless if they need more than one operation.
23665         (bswap_replace): Handle !bswap case for NULL base_addr.
23666
23667 2017-07-17  Tom de Vries  <tom@codesourcery.com>
23668
23669         PR target/81069
23670         * config/nvptx/nvptx.c (nvptx_single): Insert diverging branch as late
23671         as possible.
23672
23673 2017-07-17  Sebastian Huber  <sebastian.huber@embedded-brains.de>
23674
23675         * config/sparc/rtemself.h (TARGET_OS_CPP_BUILTINS): Add
23676         conditional builtin define __FIX_LEON3FT_B2BST.
23677
23678 2017-07-17  Daniel Cederman  <cederman@gaisler.com>
23679
23680         * config/sparc/t-rtems: Add mfix-gr712rc multilibs. Replace
23681         MULTILIB_EXCEPTIONS with MULTILIB_REQUIRED. Match -mfix-gr712rc
23682         with -mfix-ut700.
23683
23684 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
23685
23686         PR rtl-optimization/81424
23687         * optabs.c (prepare_cmp_insn): Use copy_to_reg instead of force_reg
23688         to remove potential trapping from operands if -fnon-call-exceptions.
23689
23690 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
23691
23692         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Use
23693         profile_proability for scalling.
23694         * scale_profile_for_vect_loop.c (scale_profile_for_vect_loop): Likewise.
23695
23696 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
23697
23698         * cgraph.c (cgraph_edge::redirect_call_stmt_to_caller): Cleanup.
23699
23700 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
23701
23702         * cfgloopmanip.c (scale_loop_profile): Avoid use of REG_BR_PROB_BASE
23703         fixpoint arithmetics.
23704
23705 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
23706
23707         * tree-ssa-loop-unswitch.c (hoist_guard): Avoid use of REG_BR_PROB_BASE
23708         fixpoint arithmetics.
23709
23710 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
23711
23712         * asan.c (create_cond_insert_point): Avoid use of REG_BR_PROB_BASE
23713         fixpoint arithmetics.
23714
23715 2017-07-16  Jan Hubicka  <hubicka@ucw.cz>
23716
23717         * profile-count.h (profile_probability::from_reg_br_prob_note,
23718         profile_probability::to_reg_br_prob_note): New functions.
23719         * doc/rtl.texi (REG_BR_PROB_NOTE): Update documentation.
23720         * reg-notes.h (REG_BR_PROB, REG_BR_PRED): Update docs.
23721         * predict.c (probability_reliable_p): Update.
23722         (edge_probability_reliable_p): Update.
23723         (br_prob_note_reliable_p): Update.
23724         (invert_br_probabilities): Update.
23725         (add_reg_br_prob_note): New function.
23726         (combine_predictions_for_insn): Update.
23727         * asan.c (asan_clear_shadow): Update.
23728         * cfgbuild.c (compute_outgoing_frequencies): Update.
23729         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
23730         (update_br_prob_note): Update.
23731         (rtl_verify_edges): Update.
23732         (purge_dead_edges): Update.
23733         (fixup_reorder_chain): Update.
23734         * emit-rtl.c (try_split): Update.
23735         * ifcvt.c (cond_exec_process_insns): Update.
23736         (cond_exec_process_if_block): Update.
23737         (dead_or_predicable): Update.
23738         * internal-fn.c (expand_addsub_overflow): Update.
23739         (expand_neg_overflow): Update.
23740         (expand_mul_overflow): Update.
23741         * loop-doloop.c (doloop_modify): Update.
23742         * loop-unroll.c (compare_and_jump_seq): Update.
23743         * optabs.c (emit_cmp_and_jump_insn_1): Update.
23744         * predict.h: Update.
23745         * reorg.c (mostly_true_jump): Update.
23746         * rtl.h: Update.
23747         * config/aarch64/aarch64.c (aarch64_emit_unlikely_jump): Update.
23748         * config/alpha/alpha.c (emit_unlikely_jump): Update.
23749         * config/arc/arc.c: (emit_unlikely_jump): Update.
23750         * config/arm/arm.c: (emit_unlikely_jump): Update.
23751         * config/bfin/bfin.c (cbranch_predicted_taken_p): Update.
23752         * config/frv/frv.c (frv_print_operand_jump_hint): Update.
23753         * config/i386/i386.c (ix86_expand_split_stack_prologue): Update.
23754         (ix86_print_operand): Update.
23755         (ix86_split_fp_branch): Update.
23756         (predict_jump): Update.
23757         * config/ia64/ia64.c (ia64_print_operand): Update.
23758         * config/mmix/mmix.c (mmix_print_operand): Update.
23759         * config/powerpcspe/powerpcspe.c (output_cbranch): Update.
23760         (rs6000_expand_split_stack_prologue): Update.
23761         * config/rs6000/rs6000.c: Update.
23762         * config/s390/s390.c (s390_expand_vec_strlen): Update.
23763         (s390_expand_vec_movstr): Update.
23764         (s390_expand_cs_tdsi): Update.
23765         (s390_expand_split_stack_prologue): Update.
23766         * config/sh/sh.c (sh_print_operand): Update.
23767         (expand_cbranchsi4): Update.
23768         (expand_cbranchdi4): Update.
23769         * config/sparc/sparc.c (output_v9branch): Update.
23770         * config/spu/spu.c (get_branch_target): Update.
23771         (ea_load_store_inline): Update.
23772         * config/tilegx/tilegx.c (cbranch_predicted_p): Update.
23773         * config/tilepro/tilepro.c: Update.
23774
23775 2017-07-16  Eric Botcazou  <ebotcazou@adacore.com>
23776
23777         * gimplify.c (mostly_copy_tree_r): Revert latest change.
23778         (gimplify_save_expr): Likewise.
23779
23780 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
23781
23782         * ipa-visibility.c (function_and_variable_visibility): Fix pasto.
23783
23784 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
23785
23786         * ipa-fnsummary.c (pass_data_ipa_fn_summary): Use
23787         TV_IPA_FNSUMMARY.
23788         * timevar.def (TV_IPA_FNSUMMARY): Define.
23789
23790 2017-07-16  Daniel Cederman  <cederman@gaisler.com>
23791
23792         * config/sparc/sparc.md (divdf3_fix): Add NOP to prevent back
23793         to back store errata sensitive sequence from being generated.
23794         (sqrtdf2_fix): Likewise.
23795
23796 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
23797
23798         * tree-ssa-threadupdate.c (compute_path_counts,
23799         update_joiner_offpath_counts): Use profile_probability.
23800
23801 2017-07-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23802
23803         Revert:
23804         2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23805
23806         * config/arm/arm-c.c (arm_cpu_builtins): Define
23807         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
23808
23809 2017-07-14  Kelvin Nilsen  <kelvin@gcc.gnu.org>
23810
23811         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
23812         array entries to represent __ieee128 versions of the
23813         scalar_test_data_class, scalar_test_neg, scalar_extract_exp,
23814         scalar_extract_sig, and scalar_insert_exp built-in functions.
23815         (altivec_resolve_overloaded_builtin): Add special case handling
23816         for the __builtin_scalar_insert_exp function, as represented by
23817         the P9V_BUILTIN_VEC_VSIEDP constant.
23818         * config/rs6000/rs6000-builtin.def (VSEEQP): Add scalar extract
23819         exponent support for __ieee128 argument.
23820         (VSESQP): Add scalar extract signature support for __ieee128
23821         argument.
23822         (VSTDCNQP): Add scalar test negative support for __ieee128
23823         argument.
23824         (VSIEQP): Add scalar insert exponent support for __int128 argument
23825         with __ieee128 result.
23826         (VSIEQPF): Add scalar insert exponent support for __ieee128
23827         argument with __ieee128 result.
23828         (VSTDCQP): Add scalar test data class support for __ieee128
23829         argument.
23830         (VSTDCNQP): Add overload support for scalar test negative with
23831         __ieee128 argument.
23832         (VSTDCQP): Add overload support for scalar test data class
23833         __ieee128 argument.
23834         * config/rs6000/vsx.md (UNSPEC_VSX_SXSIG) Replace
23835         UNSPEC_VSX_SXSIGDP.
23836         (UNSPEC_VSX_SIEXPQP): New constant.
23837         (xsxexpqp): New insn for VSX scalar extract exponent quad
23838         precision.
23839         (xsxsigqp): New insn for VSX scalar extract significand quad
23840         precision.
23841         (xsiexpqpf): New insn for VSX scalar insert exponent quad
23842         precision with floating point argument.
23843         (xststdcqp): New expand for VSX scalar test data class quad
23844         precision.
23845         (xststdcnegqp): New expand for VSX scalar test negative quad
23846         precision.
23847         (xststdcqp): New insn to match expansions for VSX scalar test data
23848         class quad precision and VSX scalar test negative quad precision.
23849         * config/rs6000/rs6000.c (rs6000_expand_binop_builtin): Add
23850         special case operand checking to enforce that second operand of
23851         VSX scalar test data class with quad precision argument is a 7-bit
23852         unsigned literal.
23853         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
23854         prototypes and descriptions of __ieee128 versions of
23855         scalar_extract_exp, scalar_extract_sig, scalar_insert_exp,
23856         scalar_test_data_class, and scalar_test_neg built-in functions.
23857
23858 2016-07-14  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
23859
23860         PR tree-optimization/81162
23861         * gimple-ssa-strength-reduction.c (replace_mult_candidate): Don't
23862         replace a negate with an add.
23863
23864 2017-07-14  James Greenhalgh  <james.greenhalgh@arm.com>
23865
23866         * doc/invoke.texi (arm/-mcpu): Document +crypto.
23867
23868 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23869
23870         * config/arm/arm-c.c (arm_cpu_builtins): Define
23871         __ARM_FEATURE_NUMERIC_MAXMIN solely based on TARGET_VFP5.
23872
23873 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23874
23875         * config/arm/arm-cpus.in (cortex-r52): Add new entry.
23876         (armv8-r): Set ARM Cortex-R52 as default CPU.
23877         * config/arm/arm-tables.opt: Regenerate.
23878         * config/arm/arm-tune.md: Regenerate.
23879         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
23880         Cortex-R52.
23881         * doc/invoke.texi: Mention -mtune=cortex-r52 and availability of fp.dp
23882         extension for -mcpu=cortex-r52.
23883
23884 2017-07-14  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23885
23886         * config/arm/arm-isa.h (isa_bit_FP_ARMv8): Delete enumerator.
23887         (ISA_FP_ARMv8): Define as ISA_FPv5 and ISA_FP_D32.
23888         * config/arm/arm-cpus.in (armv8-r): Define fp.sp as enabling FPv5.
23889         (fp-armv8): Define it as FP_ARMv8 only.
23890         config/arm/arm.h (TARGET_FPU_ARMV8): Delete.
23891         (TARGET_VFP_FP16INST): Define using TARGET_VFP5 rather than
23892         TARGET_FPU_ARMV8.
23893         config/arm/arm.c (arm_rtx_costs_internal): Replace checks against
23894         TARGET_FPU_ARMV8 by checks against TARGET_VFP5.
23895         * config/arm/arm-builtins.c (arm_builtin_vectorized_function): Define
23896         first ARM_CHECK_BUILTIN_MODE definition using TARGET_VFP5 rather
23897         than TARGET_FPU_ARMV8.
23898         * config/arm/arm-c.c (arm_cpu_builtins): Likewise for
23899         __ARM_FEATURE_NUMERIC_MAXMIN macro definition.
23900         * config/arm/arm.md (cmov<mode>): Condition on TARGET_VFP5 rather than
23901         TARGET_FPU_ARMV8.
23902         * config/arm/neon.md (neon_vrint): Likewise.
23903         (neon_vcvt): Likewise.
23904         (neon_<fmaxmin_op><mode>): Likewise.
23905         (<fmaxmin><mode>3): Likewise.
23906         * config/arm/vfp.md (l<vrint_pattern><su_optab><mode>si2): Likewise.
23907         * config/arm/predicates.md (arm_cond_move_operator): Check against
23908         TARGET_VFP5 rather than TARGET_FPU_ARMV8 and fix spacing.
23909
23910 2017-07-14  Jackson Woodruff  <jackson.woodruff@arm.com>
23911
23912         * config/aarch64/aarch64.c (aarch64_print_operand): Move comments
23913         to top of function.
23914
23915 2017-07-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
23916
23917         * gimple-ssa-store-merging.c (clear_bit_region): Replace reference to
23918         loop in comment with memset.
23919
23920 2017-07-14  Martin Liska  <mliska@suse.cz>
23921
23922         * cfgexpand.c (expand_gimple_basic_block): Remove dead comment.
23923         * dwarf2out.c (is_java): Remove the function.
23924         (output_pubname): Remove usage of the function.
23925         (lower_bound_default): Remove usage of DW_LANG_Java.
23926         (gen_compile_unit_die): Likewise.
23927         * gcc.c: Remove compiler defaults for .java and .zip files.
23928         * gimple-expr.c (remove_suffix): Change as there's no longer
23929         extension than 4-letter one.
23930         * gimplify.c (mostly_copy_tree_r): Remove Java-special part.
23931         (gimplify_save_expr): Likewise.
23932         * ipa-utils.h (polymorphic_type_binfo_p): Remove the comment
23933         as it's possible even for other languages than Java.
23934         * langhooks.h (struct lang_hooks): Remove Java from a comment.
23935         * lto-opts.c (lto_write_options): Remove reference to Java.
23936         * opts.c (strip_off_ending): Update file extension handling.
23937         * tree-cfg.c (verify_gimple_call): Remove comment with Java.
23938         * tree-eh.c (lower_resx): Likewise.
23939         * tree.c (free_lang_data_in_type): Remove dead code.
23940         (find_decls_types_r): Likewise.
23941         (build_common_builtin_nodes): Remove Java from a comment.
23942         (verify_type): Remove dead code.
23943         * varasm.c (assemble_external): Remove Java from a comment.
23944
23945 2017-07-14  Martin Liska  <mliska@suse.cz>
23946
23947         * opts.c (finish_options): Add quotes.
23948         (common_handle_option): Likewise.
23949
23950 2017-07-14  Martin Liska  <mliska@suse.cz>
23951
23952         * dbxout.c (get_lang_number): Do not handle GNU Pascal.
23953         * dbxout.h (extern void dbxout_stab_value_internal_label_diff):
23954         Remove N_SO_PASCAL.
23955         * dwarf2out.c (lower_bound_default): Do not handle
23956         DW_LANG_Pascal83.
23957         (gen_compile_unit_die): Likewise.
23958         * gcc.c: Remove default extension binding for GNU Pascal.
23959         * stmt.c: Remove Pascal language from a comment.
23960         * xcoffout.c: Likewise.
23961
23962 2017-07-13  David Malcolm  <dmalcolm@redhat.com>
23963
23964         PR c/81405
23965         * diagnostic-show-locus.c (fixit_cmp): New function.
23966         (layout::layout): Sort m_fixit_hints.
23967         (column_range::column_range): Assert that the values are valid.
23968         (struct char_span): New struct.
23969         (correction::overwrite): New method.
23970         (struct source_line): New struct.
23971         (line_corrections::add_hint): Add assertions.  Reimplement memcpy
23972         calls in terms of classes source_line and char_span, and
23973         correction::overwrite.
23974         (selftest::test_overlapped_fixit_printing_2): New function.
23975         (selftest::diagnostic_show_locus_c_tests): Call it.
23976
23977 2017-07-13  Will Schmidt  <will_schmidt@vnet.ibm.com>
23978
23979         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Return
23980         early if there is no lhs.
23981
23982 2017-07-13  Martin Liska  <mliska@suse.cz>
23983
23984         * dwarf2out.c (gen_pointer_type_die): Remove dead code.
23985         (gen_reference_type_die): Likewise.
23986         * stor-layout.c: Remove Pascal-related comment.
23987
23988 2017-07-13  Martin Liska  <mliska@suse.cz>
23989
23990         * opts.c (finish_options): Add quotes to error messages.
23991         (parse_sanitizer_options): Likewise.
23992
23993 2017-07-13  Thomas Preud'homme  <thomas.preudhomme@arm.com>
23994
23995         * doc/invoke.texi (armv8-r): Document +fp.sp ARMv8-R extension.
23996
23997 2017-07-13  Richard Earnshaw  <rearnsha@arm.com>
23998
23999         * config/arm/vxworks.h (TARGET_ENDIAN_DEFAULT): Define.
24000
24001 2017-07-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
24002
24003         * asan.c (asan_emit_allocas_unpoison): Use ptr_mode for arguments
24004         during expansion.
24005         * builtins.c (expand_asan_emit_allocas_unpoison): Likewise.
24006
24007 2017-07-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
24008
24009         PR target/81193
24010         * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If GLIBC
24011         provides the hardware capability bits, define the macro
24012         __BUILTIN_CPU_SUPPORTS__.
24013         * config/rs6000/rs6000.c (cpu_expand_builtin): Generate a warning
24014         if GLIBC does not provide the hardware capability bits.  Add a
24015         gcc_unreachable call if the built-in cpu function is neither
24016         __builtin_cpu_is nor __builtin_cpu_supports.
24017         (rs6000_get_function_versions_dispatcher): Change the warning
24018         that an old GLIBC is used which does not export the capability
24019         bits to be an error.
24020         * doc/extend.texi (target_clones attribute): Document the
24021         restriction that GLIBC 2.23 or newer is needed on the PowerPC.
24022         (PowerPC built-in functions): Document that GLIBC 2.23 or newer is
24023         needed by __builtin_cpu_is and __builtin_cpu_supports.  Document
24024         the macros defined by GCC if the newer GLIBC is available.
24025
24026 2017-07-12  Jeff Law  <law@redhat.com>
24027
24028         * config/riscv/riscv.c: Remove unnecessary includes.  Reorder
24029         remaining includes slightly.
24030         * config/riscv/riscv-builtins.c: Include profile-count.h.
24031
24032 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
24033
24034         PR target/79883
24035         * config/avr/avr.c (avr_set_current_function): In diagnostic
24036         messages: Quote keywords and (parts of) identifiers.
24037         [WITH_AVRLIBC]: Warn for functions named "ISR", "SIGNAL" or
24038         "INTERUPT".
24039
24040 2017-07-12  Carl Love  <cel@us.ibm.com>
24041
24042         * config/rs6000/rs6000-c.c: Add support for built-in functions
24043         vector bool char vec_revb (vector bool char);
24044         vector bool short vec_revb (vector short char);
24045         vector bool int vec_revb (vector bool int);
24046         vector bool long long vec_revb (vector bool long long);
24047         * doc/extend.texi: Update the built-in documentation file for the
24048         new built-in functions.
24049
24050 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24051
24052         * config/s390/s390.md: Remove movcc splitter.
24053
24054 2017-07-12  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
24055
24056         * config/s390/s390.c (s390_rtx_costs): Return proper costs for
24057         load/store on condition.
24058
24059 2017-07-12  Georg-Johann Lay  <avr@gjlay.de>
24060
24061         PR target/81407
24062         * config/avr/avr.c (avr_encode_section_info)
24063         [progmem && !TREE_READONLY]: Error if progmem object needs
24064         constructing.
24065
24066 2017-07-11  Michael Collison  <michael.collison@arm.com>
24067
24068         * config/aarch64/aarch64-simd.md (aarch64_sub<mode>_compare0):
24069         New pattern.
24070
24071 2017-07-11  Carl Love  <cel@us.ibm.com>
24072
24073         * config/rs6000/rs6000-c.c: Add support for builtins
24074         vector unsigned int vec_parity_lsbb (vector signed int);
24075         vector unsigned int vec_parity_lsbb (vector unsigned int);
24076         vector unsigned __int128 vec_parity_lsbb (vector signed __int128);
24077         vector unsigned __int128 vec_parity_lsbb (vector unsigned __int128);
24078         vector unsigned long long vec_parity_lsbb (vector signed long long);
24079         vector unsigned long long vec_parity_lsbb (vector unsigned long long);
24080         * config/rs6000/rs6000-builtin.def (VPARITY_LSBB): Add BU_P9V_OVERLOAD1.
24081         * config/rs6000/altivec.h (vec_parity_lsbb): Add define.
24082         * doc/extend.texi: Update the built-in documentation file for the
24083         new built-in functions.
24084
24085 2017-07-11  David Malcolm  <dmalcolm@redhat.com>
24086
24087         * diagnostic-show-locus.c: Include "gcc-rich-location.h".
24088         (layout::m_primary_loc): New field.
24089         (layout::layout): Initialize new field.  Move location filtering
24090         logic from here to...
24091         (layout::maybe_add_location_range): ...this new method.  Add
24092         support for filtering to just the lines already specified by other
24093         locations.
24094         (layout::will_show_line_p): New method.
24095         (gcc_rich_location::add_location_if_nearby): New method.
24096         (selftest::test_add_location_if_nearby): New test function.
24097         (selftest::diagnostic_show_locus_c_tests): Call it.
24098         * gcc-rich-location.h (gcc_rich_location::add_location_if_nearby):
24099         New method.
24100
24101 2017-07-11  Tom de Vries  <tom@codesourcery.com>
24102
24103         * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG): New macro.
24104         (bb_first_real_insn): New function.
24105         (nvptx_single): Add extra initialization of broadcasted condition
24106         variables.
24107
24108 2017-07-11  Nathan Sidwell  <nathan@acm.org>
24109
24110         * dwarf2out.c (gen_member_die): Remove useless check for anon ctors.
24111
24112 2017-07-11  Georg-Johann Lay  <avr@gjlay.de>
24113
24114         * doc/extend.texi (AVR Function Attributes): Remove weblink to
24115         Binutils doc as TEXI will mess them up.
24116         * doc/invoke.texi (AVR Options): Same here.
24117
24118 2017-07-11  Daniel Cederman  <cederman@gaisler.com>
24119
24120         * config/sparc/sparc.opt (mfix-ut700): New option.
24121         (mfix-gr712rc): Likewise.
24122         (sparc_fix_b2bst): New variable.
24123         * doc/invoke.texi (SPARC options): Document them.
24124         (ARM options): Fix warnings.
24125         * config/sparc/sparc.c (sparc_do_work_around_errata): Insert NOP
24126         instructions to prevent sequences that can trigger the store-store
24127         errata for certain LEON3FT processors.
24128         (pass_work_around_errata::gate): Also test sparc_fix_b2bst.
24129         (sparc_option_override): Set sparc_fix_b2bst appropriately.
24130         * config/sparc/sparc.md (fix_b2bst): New attribute.
24131         (in_branch_delay): Prevent stores in delay slot if fix_b2bst.
24132
24133 2017-07-10  Uros Bizjak  <ubizjak@gmail.com>
24134
24135         PR target/81375
24136         * config/i386/i386.md (divsf3): Add TARGET_SSE to TARGET_SSE_MATH.
24137         (rcpps): Ditto.
24138         (*rsqrtsf2_sse): Ditto.
24139         (rsqrtsf2): Ditto.
24140         (div<mode>3): Macroize insn from divdf3 and divsf3
24141         using MODEF mode iterator.
24142
24143 2017-07-10  Martin Sebor  <msebor@redhat.com>
24144
24145         PR tree-optimization/80397
24146         * gimple-ssa-sprintf.c (format_integer): Use INTEGRAL_TYPE_P()
24147         instead of testing for equality to INTEGER_TYPE.
24148
24149 2017-07-10  Vineet Gupta <vgupta@synopsys.com>
24150
24151         * config.gcc: Remove uclibc from arc target spec.
24152
24153 2017-07-10  Claudiu Zissulescu  <claziss@synopsys.com>
24154
24155         * config/arc/arc.h (ADDITIONAL_REGISTER_NAMES): Define.
24156
24157 2017-07-07  Jan Hubicka  <hubicka@ucw.cz>
24158
24159         PR lto/80838
24160         * lto-wrapper.c (remove_option): New function.
24161         (merge_and_complain): Merge PIC/PIE options more realistically.
24162
24163 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
24164
24165         Better ISR prologues by supporting GASes __gcc_isr pseudo insn.
24166
24167         PR target/20296
24168         PR target/81268
24169         * configure.ac [target=avr]: Add GAS check for -mgcc-isr.
24170         (HAVE_AS_AVR_MGCCISR_OPTION):  If so, AC_DEFINE it.
24171         * config.in: Regenerate.
24172         * configure: Regenerate.
24173         * doc/extend.texi (AVR Function Attributes) <no_gccisr>: Document it.
24174         * doc/invoke.texi (AVR Options) <-mgas-isr-prologues>: Document it.
24175         * config/avr/avr.opt (-mgas-isr-prologues): New option and...
24176         (TARGET_GASISR_PROLOGUES): ...target mask.
24177         * common/config/avr/avr-common.c
24178         (avr_option_optimization_table) [OPT_LEVELS_1_PLUS_NOT_DEBUG]:
24179         Set -mgas-isr-prologues.
24180         * config/avr/avr-passes.def (avr_pass_pre_proep): Add
24181         INSERT_PASS_BEFORE for it.
24182         * config/avr/avr-protos.h (make_avr_pass_pre_proep): New proto.
24183         * config/avr/avr.c (avr_option_override)
24184         [!HAVE_AS_AVR_MGCCISR_OPTION]: Unset TARGET_GASISR_PROLOGUES.
24185         (avr_no_gccisr_function_p, avr_hregs_split_reg): New static functions.
24186         (avr_attribute_table) <no_gccisr>: Add new function attribute.
24187         (avr_set_current_function) <is_no_gccisr>: Init machine field.
24188         (avr_pass_data_pre_proep, avr_pass_pre_proep): New pass data
24189         and rtl_opt_pass.
24190         (make_avr_pass_pre_proep): New function.
24191         (emit_push_sfr) <treg>: Add argument to function and use it
24192         instead of TMP_REG.
24193         (avr_expand_prologue) [machine->gasisr.maybe]: Emit gasisr insn
24194         and set machine->gasisr.yes.
24195         (avr_expand_epilogue) [machine->gasisr.yes]: Similar.
24196         (avr_asm_function_end_prologue) [machine->gasisr.yes]: Add
24197         __gcc_isr.n_pushed to .L__stack_usage.
24198         (TARGET_ASM_FINAL_POSTSCAN_INSN): Define to...
24199         (avr_asm_final_postscan_insn): ...this new static function.
24200         * config/avr/avr.h (machine_function)
24201         <is_no_gccisr, use_L__stack_usage>: New fields.
24202         <gasisr, gasisr.yes, gasisr.maybe, gasisr.regno>: New fields.
24203         * config/avr/avr.md (UNSPECV_GASISR): Add unspecv enum.
24204         (GASISR_Prologue, GASISR_Epilogue, GASISR_Done): New define_constants.
24205         (gasisr, *gasisr): New expander and insn.
24206         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
24207         [HAVE_AS_AVR_MGCCISR_OPTION]: Print asm_gccisr spec.
24208         * config/avr/specs.h (ASM_SPEC) <asm_gccisr>: Add sub spec.
24209
24210 2017-07-10  Richard Earnshaw  <rearnsha@arm.com>
24211
24212         * config/arm/parsecpu.awk (gen_comm_data): Do not escape single quotes
24213         in quoted strings.
24214
24215 2017-07-10  Georg-Johann Lay  <avr@gjlay.de>
24216
24217         Move jump-tables out of .text again.
24218
24219         PR target/81075
24220         * config/avr/avr.c (ASM_OUTPUT_ADDR_VEC_ELT): Remove function.
24221         (ASM_OUTPUT_ADDR_VEC): New function.
24222         (avr_adjust_insn_length) [JUMP_TABLE_DATA_P]: Return 0.
24223         (avr_final_prescan_insn) [avr_log.insn_addresses]: Dump
24224         INSN_ADDRESSes as asm comment.
24225         * config/avr/avr.h (JUMP_TABLES_IN_TEXT_SECTION): Adjust comment.
24226         (ASM_OUTPUT_ADDR_VEC_ELT): Remove define.
24227         (ASM_OUTPUT_ADDR_VEC): Define to avr_output_addr_vec.
24228         * config/avr/avr.md (*tablejump): Adjust comment.
24229         * config/avr/elf.h (ASM_OUTPUT_BEFORE_CASE_LABEL): Remove.
24230         * config/avr/avr-log.c (avr_log_set_avr_log) <insn_addresses>:
24231         New detail.
24232         * config/avr/avr-protos.h (avr_output_addr_vec_elt): Remove proto.
24233         (avr_output_addr_vec): New proto.
24234         (avr_log_t) <insn_addresses>: New field.
24235
24236 2017-07-09  H.J. Lu  <hongjiu.lu@intel.com>
24237
24238         PR target/81313
24239         * config/i386/i386.c (ix86_function_arg_advance): Set
24240         outgoing_args_on_stack to true if there are outgoing arguments
24241         on stack.
24242         (ix86_function_arg): Likewise.
24243         (ix86_get_drap_rtx): Use DRAP only if there are outgoing
24244         arguments on stack and ACCUMULATE_OUTGOING_ARGS is false.
24245         * config/i386/i386.h (machine_function): Add
24246         outgoing_args_on_stack.
24247
24248 2017-07-09  Krister Walfridsson  <krister.walfridsson@gmail.com>
24249
24250         * config.gcc (*-*-netbsd*): Remove check for NetBSD versions not
24251         supporting pthreds.
24252         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always enable pthreads.
24253
24254 2017-07-08  Richard Sandiford  <richard.sandiford@linaro.org>
24255
24256         * Makefile.in (HOOKS_H, RTL_BASE_H, FUNCTION_H, EXPR_H, REGS_H)
24257         (REAL_H): Remove $(MACHMODE_H).
24258         (FIXED_VALUE_H, TREE_CORE_H, CFGLOOP_H): Remove $(MACHMODE_H) and
24259         double-int.h.
24260         (CORETYPES_H): Add signop.h, wide-int.h, wide-int-print.h,
24261         $(MACHMODE_H) and double-int.h.
24262         (build/min-insn-modes.o): Depend on $(CORETYPES_H) rather than
24263         $(MACHMODE_H).
24264         (gengtype-state.o, gengtype.o, build/gengtype.o): Don't depend on
24265         double-int.h.
24266
24267 2017-07-07  Andrew Pinski  <apinski@cavium.com>
24268
24269         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Check
24270         prev_set and curr_set for AARCH64_FUSE_ALU_BRANCH.
24271
24272 2017-07-07  Michael Meissner  <meissner@linux.vnet.ibm.com>
24273
24274         * config/rs6000/rs6000.c (rs6000_get_function_versions_dispatcher):
24275         Add warning if GCC was not configured to link against a GLIBC that
24276         exports the hardware capability bits.
24277         (make_resolver_func): Make resolver function private and not a
24278         COMDAT function.  Create the name with clone_function_name instead
24279         of make_unique_name.
24280
24281         PR target/81348
24282         * config/rs6000/rs6000.md (HI sign_extend splitter): Use the
24283         correct operand in doing the split.
24284
24285 2017-07-07 Carl Love  <cel@us.ibm.com>
24286
24287         * config/rs6000/rs6000-c: Add support for built-in function
24288         vector unsigned short vec_pack_to_short_fp32 (vector float,
24289                                                       vector float).
24290         * config/rs6000/rs6000-builtin.def (CONVERT_4F32_8I16): Add
24291         BU_P9V_AV_2 and BU_P9V_OVERLOAD_2 definitions.
24292         * config/rs6000/altivec.h (vec_pack_to_short_fp32): Add define.
24293         * config/rs6000/altivec.md(UNSPEC_CONVERT_4F32_8I16): Add UNSPEC.
24294         (convert_4f32_8i16): Add define_expand.
24295         * doc/extend.texi: Update the built-in documentation file for the
24296         new built-in function.
24297
24298 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
24299
24300         * config/sparc/m8.md: New file.
24301         * config/sparc/sparc.md: Include m8.md.
24302
24303 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
24304
24305         * config/sparc/sparc.opt: New option -mvis4b.
24306         * config/sparc/sparc.c (dump_target_flag_bits): Handle MASK_VIS4B.
24307         (sparc_option_override): Handle VIS4B.
24308         (enum sparc_builtins): Define
24309         SPARC_BUILTIN_DICTUNPACK{8,16,32},
24310         SPARC_BUILTIN_FPCMP{LE,GT,EQ,NE}{8,16,32}SHL,
24311         SPARC_BUILTIN_FPCMPU{LE,GT}{8,16,32}SHL,
24312         SPARC_BUILTIN_FPCMPDE{8,16,32}SHL and
24313         SPARC_BUILTIN_FPCMPUR{8,16,32}SHL.
24314         (check_constant_argument): New function.
24315         (sparc_vis_init_builtins): Define builtins
24316         __builtin_vis_dictunpack{8,16,32},
24317         __builtin_vis_fpcmp{le,gt,eq,ne}{8,16,32}shl,
24318         __builtin_vis_fpcmpu{le,gt}{8,16,32}shl,
24319         __builtin_vis_fpcmpde{8,16,32}shl and
24320         __builtin_vis_fpcmpur{8,16,32}shl.
24321         (sparc_expand_builtin): Check that the constant operands to
24322         __builtin_vis_fpcmp*shl and _builtin_vis_dictunpack* are indeed
24323         constant and in range.
24324         * config/sparc/sparc-c.c (sparc_target_macros): Handle
24325         TARGET_VIS4B.
24326         * config/sparc/sparc.h (SPARC_IMM2_P): Define.
24327         (SPARC_IMM5_P): Likewise.
24328         * config/sparc/sparc.md (cpu_feature): Add new feagure "vis4b".
24329         (enabled): Handle vis4b.
24330         (UNSPEC_DICTUNPACK): New unspec.
24331         (UNSPEC_FPCMPSHL): Likewise.
24332         (UNSPEC_FPUCMPSHL): Likewise.
24333         (UNSPEC_FPCMPDESHL): Likewise.
24334         (UNSPEC_FPCMPURSHL): Likewise.
24335         (cpu_feature): New CPU feature `vis4b'.
24336         (dictunpack{8,16,32}): New insns.
24337         (FPCSMODE): New mode iterator.
24338         (fpcscond): New code iterator.
24339         (fpcsucond): Likewise.
24340         (fpcmp{le,gt,eq,ne}{8,16,32}{si,di}shl): New insns.
24341         (fpcmpu{le,gt}{8,16,32}{si,di}shl): Likewise.
24342         (fpcmpde{8,16,32}{si,di}shl): Likewise.
24343         (fpcmpur{8,16,32}{si,di}shl): Likewise.
24344         * config/sparc/constraints.md: Define constraints `q' for unsigned
24345         2-bit integer constants and `t' for unsigned 5-bit integer
24346         constants.
24347         * config/sparc/predicates.md (imm5_operand_dictunpack8): New
24348         predicate.
24349         (imm5_operand_dictunpack16): Likewise.
24350         (imm5_operand_dictunpack32): Likewise.
24351         (imm2_operand): Likewise.
24352         * doc/invoke.texi (SPARC Options): Document -mvis4b.
24353         * doc/extend.texi (SPARC VIS Built-in Functions): Document the
24354         ditunpack* and fpcmp*shl builtins.
24355
24356 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
24357
24358         * config.gcc: Handle m8 in --with-{cpu,tune} options.
24359         * config.in: Add HAVE_AS_SPARC6 define.
24360         * config/sparc/driver-sparc.c (cpu_names): Add entry for the SPARC
24361         M8.
24362         * config/sparc/sol2.h (CPP_CPU64_DEFAULT_SPEC): Define for
24363         TARGET_CPU_m8.
24364         (ASM_CPU32_DEFAUILT_SPEC): Likewise.
24365         (CPP_CPU_SPEC): Handle m8.
24366         (ASM_CPU_SPEC): Likewise.
24367         * config/sparc/sparc-opts.h (enum processor_type): Add
24368         PROCESSOR_M8.
24369         * config/sparc/sparc.c (m8_costs): New struct.
24370         (sparc_option_override): Handle TARGET_CPU_m8.
24371         (sparc32_initialize_trampoline): Likewise.
24372         (sparc64_initialize_trampoline): Likewise.
24373         (sparc_issue_rate): Likewise.
24374         (sparc_register_move_cost): Likewise.
24375         * config/sparc/sparc.h (TARGET_CPU_m8): Define.
24376         (CPP_CPU64_DEFAULT_SPEC): Define for M8.
24377         (ASM_CPU64_DEFAULT_SPEC): Likewise.
24378         (CPP_CPU_SPEC): Handle M8.
24379         (ASM_CPU_SPEC): Likewise.
24380         (AS_M8_FLAG): Define.
24381         * config/sparc/sparc.md: Add m8 to the cpu attribute.
24382         * config/sparc/sparc.opt: New option -mcpu=m8 for sparc targets.
24383         * configure.ac (HAVE_AS_SPARC6): Check for assembler support for
24384         M8 instructions.
24385         * configure: Regenerate.
24386         * doc/invoke.texi (SPARC Options): Document -mcpu=m8 and
24387         -mtune=m8.
24388
24389 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
24390
24391         * config/sparc/niagara7.md: Rework the DFA scheduler to use insn
24392         subtypes.
24393         * config/sparc/sparc.md: Remove the `v3pipe' insn attribute.
24394         ("*movdi_insn_sp32"): Do not set v3pipe.
24395         ("*movsi_insn"): Likewise.
24396         ("*movdi_insn_sp64"): Likewise.
24397         ("*movsf_insn"): Likewise.
24398         ("*movdf_insn_sp32"): Likewise.
24399         ("*movdf_insn_sp64"): Likewise.
24400         ("*zero_extendsidi2_insn_sp64"): Likewise.
24401         ("*sign_extendsidi2_insn"): Likewise.
24402         ("*mov<VM32:mode>_insn"): Likewise.
24403         ("*mov<VM64:mode>_insn_sp64"): Likewise.
24404         ("*mov<VM64:mode>_insn_sp32"): Likewise.
24405         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
24406         ("<vlop:code><VL:mode>3"): Likewise.
24407         ("*not_<vlop:code><VL:mode>3"): Likewise.
24408         ("*nand<VL:mode>_vis"): Likewise.
24409         ("*<vlnotop:code>_not1<VL:mode>_vis"): Likewise.
24410         ("*<vlnotop:code>_not2<VL:mode>_vis"): Likewise.
24411         ("one_cmpl<VL:mode>2"): Likewise.
24412         ("faligndata<VM64:mode>_vis"): Likewise.
24413         ("alignaddrsi_vis"): Likewise.
24414         ("alignaddrdi_vis"): Likweise.
24415         ("alignaddrlsi_vis"): Likewise.
24416         ("alignaddrldi_vis"): Likewise.
24417         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
24418         ("bmaskdi_vis"): Likewise.
24419         ("bmasksi_vis"): Likewise.
24420         ("bshuffle<VM64:mode>_vis"): Likewise.
24421         ("cmask8<P:mode>_vis"): Likewise.
24422         ("cmask16<P:mode>_vis"): Likewise.
24423         ("cmask32<P:mode>_vis"): Likewise.
24424         ("pdistn<P:mode>_vis"): Likewise.
24425         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
24426
24427 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
24428
24429         * config/sparc/sparc.md ("subtype"): New insn attribute.
24430         ("*wrgsr_sp64"): Set insn subtype.
24431         ("*rdgsr_sp64"): Likewise.
24432         ("alignaddrsi_vis"): Likewise.
24433         ("alignaddrdi_vis"): Likewise.
24434         ("alignaddrlsi_vis"): Likewise.
24435         ("alignaddrldi_vis"): Likewise.
24436         ("<plusminus_insn><VADDSUB:mode>3"): Likewise.
24437         ("fexpand_vis"): Likewise.
24438         ("fpmerge_vis"): Likewise.
24439         ("faligndata<VM64:mode>_vis"): Likewise.
24440         ("bshuffle<VM64:mode>_vis"): Likewise.
24441         ("cmask8<P:mode>_vis"): Likewise.
24442         ("cmask16<P:mode>_vis"): Likewise.
24443         ("cmask32<P:mode>_vis"): Likewise.
24444         ("fchksm16_vis"): Likewise.
24445         ("v<vis3_shift_patname><GCM:mode>3"): Likewise.
24446         ("fmean16_vis"): Likewise.
24447         ("fp<plusminus_insn>64_vis"): Likewise.
24448         ("<plusminus_insn>v8qi3"): Likewise.
24449         ("<vis3_addsub_ss_patname><VASS:mode>3"): Likewise.
24450         ("<vis4_minmax_patname><VMMAX:mode>3"): Likewise.
24451         ("<vis4_uminmax_patname><VMMAX:mode>3"): Likewise.
24452         ("<vis3_addsub_ss_patname>v8qi3"): Likewise.
24453         ("<vis4_addsub_us_patname><VAUS:mode>3"): Likewise.
24454         ("*movqi_insn"): Likewise.
24455         ("*movhi_insn"): Likewise.
24456         ("*movsi_insn"): Likewise.
24457         ("movsi_pic_gotdata_op"): Likewise.
24458         ("*movdi_insn_sp32"): Likewise.
24459         ("*movdi_insn_sp64"): Likewise.
24460         ("movdi_pic_gotdata_op"): Likewise.
24461         ("*movsf_insn"): Likewise.
24462         ("*movdf_insn_sp32"): Likewise.
24463         ("*movdf_insn_sp64"): Likewise.
24464         ("*zero_extendhisi2_insn"): Likewise.
24465         ("*zero_extendqihi2_insn"): Likewise.
24466         ("*zero_extendqisi2_insn"): Likewise.
24467         ("*zero_extendqidi2_insn"): Likewise.
24468         ("*zero_extendhidi2_insn"): Likewise.
24469         ("*zero_extendsidi2_insn_sp64"): Likewise.
24470         ("ldfsr"): Likewise.
24471         ("prefetch_64"): Likewise.
24472         ("prefetch_32"): Likewise.
24473         ("tie_ld32"): Likewise.
24474         ("tie_ld64"): Likewise.
24475         ("*tldo_ldub_sp32"): Likewise.
24476         ("*tldo_ldub1_sp32"): Likewise.
24477         ("*tldo_ldub2_sp32"): Likewise.
24478         ("*tldo_ldub_sp64"): Likewise.
24479         ("*tldo_ldub1_sp64"): Likewise.
24480         ("*tldo_ldub2_sp64"): Likewise.
24481         ("*tldo_ldub3_sp64"): Likewise.
24482         ("*tldo_lduh_sp32"): Likewise.
24483         ("*tldo_lduh1_sp32"): Likewise.
24484         ("*tldo_lduh_sp64"): Likewise.
24485         ("*tldo_lduh1_sp64"): Likewise.
24486         ("*tldo_lduh2_sp64"): Likewise.
24487         ("*tldo_lduw_sp32"): Likewise.
24488         ("*tldo_lduw_sp64"): Likewise.
24489         ("*tldo_lduw1_sp64"): Likewise.
24490         ("*tldo_ldx_sp64"): Likewise.
24491         ("*mov<VM32:mode>_insn"): Likewise.
24492         ("*mov<VM64:mode>_insn_sp64"): Likewise.
24493         ("*mov<VM64:mode>_insn_sp32"): Likewise.
24494
24495 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
24496
24497         * config/sparc/sparc.md ("type"): New insn type viscmp.
24498         ("fcmp<gcond:code><GCM:gcm_name><P:mode>_vis"): Set insn type to
24499         viscmp.
24500         ("fpcmp<gcond:code>8<P:mode>_vis"): Likewise.
24501         ("fucmp<gcond:code>8<P:mode>_vis"): Likewise.
24502         ("fpcmpu<gcond:code><GCM:gcm_name><P:mode>_vis"): Likewise.
24503         * config/sparc/niagara7.md ("n7_vis_logical_v3pipe"): Handle
24504         viscmp.
24505         ("n7_vis_logical_11cycle"): Likewise.
24506         * config/sparc/niagara4.md ("n4_vis_logical"): Likewise.
24507         * config/sparc/niagara2.md ("niag3_vis": Likewise.
24508         * config/sparc/niagara.md ("niag_vis"): Likewise.
24509         * config/sparc/ultra3.md ("us3_fga"): Likewise.
24510         * config/sparc/ultra1_2.md ("us1_fga_double"): Likewise.
24511
24512 2017-07-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
24513
24514         * config/sparc/sparc.md: New instruction type `bmask'.
24515         (bmaskdi_vis): Use the `bmask' type.
24516         (bmasksi_vis): Likewise.
24517         * config/sparc/ultra3.md (us3_array): Likewise.
24518         * config/sparc/niagara7.md (n7_array): Likewise.
24519         * config/sparc/niagara4.md (n4_array): Likewise.
24520         * config/sparc/niagara2.md (niag2_vis): Likewise.
24521         (niag3_vis): Likewise.
24522         * config/sparc/niagara.md (niag_vis): Likewise.
24523
24524 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
24525
24526         * ipa-comdats.c: Remove optimize check from gate.
24527         * ipa-fnsummary.c (ipa_fn_summary_generate): do not generate summary
24528         for functions not optimized.
24529         (ipa_fn_summary_read): Skip optimize check.
24530         (ipa_fn_summary_write): Likewise.
24531         * ipa-inline-analysis.c (do_estimate_growth_1): Check that caller
24532         is optimized.
24533         * ipa-inline.c (can_inline_edge_p): Not optimized functions are
24534         uninlinable.
24535         (can_inline_edge_p): Check flag_pcc_struct_return for match.
24536         (check_callers): Give up on caller which is not optimized.
24537         (inline_small_functions): Likewise.
24538         (ipa_inline): Do not give up when not optimizing.
24539         * ipa-visbility.c (function_and_variable_visibility): Do not optimize
24540         away unoptimizes cdtors.
24541         (whole_program_function_and_variable_visibility): Do
24542         ipa_discover_readonly_nonaddressable_vars in LTO mode.
24543         * ipa.c (process_references): Do not check optimize.
24544         (symbol_table::remove_unreachable_nodes): Update optimize check.
24545         (set_writeonly_bit): Update optimize check.
24546         (pass_ipa_cdtor_merge::gate): Do not check optimize.
24547         (pass_ipa_single_use::gate): Remove.
24548
24549 2017-07-06  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
24550
24551         * config/rs6000/rs6000.c (union_defs, union_uses, insn_is_load_p,
24552         insn_is_store_p, insn_is_swap_p, const_load_sequence_p, v2df_reduction_p,
24553         rtx_is_swappable_p, insn_is_swappable_p, chain_contains_only_swaps,
24554         mark_swaps_for_removal, swap_const_vector_halves, adjust_subreg_index,
24555         permute_load, permute_store, adjust_extract, adjust_splat,
24556         adjust_xxpermdi, adjust_concat, adjust_vperm, handle_special_swappables,
24557         replace_swap_with_copy, dump_swap_insn_table,
24558         alignment_with_canonical_addr, alignment_mask, find_alignment_op,
24559         recombine_lvx_pattern, recombine_stvx_pattern,
24560         recombine_lvx_stvx_patterns, rs6000_analyze_swaps,
24561         make_pass_analyze_swaps): Move all code related to p8 swap optimizations
24562         to file rs6000-p8swap.c.
24563         * config/rs6000/rs6000-p8swap.c: New file.
24564         * config/rs6000/t-rs6000: Add rule to build rs6000-p8swap.o.
24565         * config.gcc: Add rs6000-p8swap.o to extra_objs for powerpc*-*-*
24566         and rs6000*-*-* targets.
24567
24568 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
24569
24570         * Makefile.in (selftest): Remove dependency on s-selftest-c++.
24571
24572 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
24573
24574         * lto-wrapper.c (merge_and_complain): Do not merge
24575         fexceptions, fnon_call_exceptions, ftrapv, ffp_contract_, fmath_errno,
24576         fsigned_zeros, ftrapping_math, fwrapv.
24577         (append_compiler_options): Do not track these options.
24578         (append_linker_options): Likewie
24579
24580 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
24581
24582         * cgraphunit.c (cgraph_node::finalize_function): When
24583         !flag_toplevel_reorde set no_reorder flag.
24584         (varpool_node::finalize_decl): Likewise.
24585         (symbol_table::compile): Drop no toplevel reorder path.
24586
24587 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
24588
24589         * bb-reorder.c (better_edge_p): Do not build traces across abnormal/eh
24590         edges; zero probability is not better than uninitialized.
24591
24592 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
24593
24594         * asan.h (asan_sanitize_allocas_p): Declare.
24595         * asan.c (asan_sanitize_allocas_p): New function.
24596         (handle_builtin_stack_restore): Bail out if !asan_sanitize_allocas_p.
24597         (handle_builtin_alloca): Likewise.
24598         * cfgexpand.c (expand_used_vars): Do not add allocas unpoisoning stuff
24599         if !asan_sanitize_allocas_p.
24600         * params.def (asan-instrument-allocas): Add new option.
24601         * params.h (ASAN_PROTECT_ALLOCAS): Define.
24602         * opts.c (common_handle_option): Disable allocas sanitization for
24603         KASan by default.
24604
24605 2017-07-06  Maxim Ostapenko  <m.ostapenko@samsung.com>
24606
24607         * asan.c: Include gimple-fold.h.
24608         (get_last_alloca_addr): New function.
24609         (handle_builtin_stackrestore): Likewise.
24610         (handle_builtin_alloca): Likewise.
24611         (asan_emit_allocas_unpoison): Likewise.
24612         (get_mem_refs_of_builtin_call): Add new parameter, remove const
24613         quallifier from first paramerer. Handle BUILT_IN_ALLOCA,
24614         BUILT_IN_ALLOCA_WITH_ALIGN and BUILT_IN_STACK_RESTORE builtins.
24615         (instrument_builtin_call): Pass gimple iterator to
24616         get_mem_refs_of_builtin_call.
24617         (last_alloca_addr): New global.
24618         * asan.h (asan_emit_allocas_unpoison): Declare.
24619         * builtins.c (expand_asan_emit_allocas_unpoison): New function.
24620         (expand_builtin): Handle BUILT_IN_ASAN_ALLOCAS_UNPOISON.
24621         * cfgexpand.c (expand_used_vars): Call asan_emit_allocas_unpoison
24622         if function calls alloca.
24623         * gimple-fold.c (replace_call_with_value): Remove static keyword.
24624         * gimple-fold.h (replace_call_with_value): Declare.
24625         * internal-fn.c: Include asan.h.
24626         * sanitizer.def (BUILT_IN_ASAN_ALLOCA_POISON,
24627         BUILT_IN_ASAN_ALLOCAS_UNPOISON): New builtins.
24628
24629 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
24630
24631         * Makefile.in (SELFTEST_FLAGS): Drop "-x c", moving it to...
24632         (C_SELFTEST_FLAGS): New.
24633         (CPP_SELFTEST_FLAGS): New.
24634         (SELFTEST_DEPS): New, from deps of s-selftest.
24635         (C_SELFTEST_DEPS): New, from deps of s-selftest.
24636         (CPP_SELFTEST_DEPS): New.
24637         (selftest): Add dependency on s-selftest-c++.
24638         (s-selftest): Rename to...
24639         (s-selftest-c): ...this, moving deps to SELFTEST_DEPS
24640         and C_SELFTEST_DEPS, and using C_SELFTEST_FLAGS rather
24641         than SELFTEST_FLAGS.
24642         (selftest-gdb): Rename to...
24643         (selftest-c-gdb): ...this, using C_SELFTEST_DEPS and
24644         C_SELFTEST_FLAGS.
24645         (selftest-gdb): Reintroduce as an alias for selftest-c-gdb.
24646         (selftest-valgrind): Rename to...
24647         (selftest-c-valgrind): ...this, using C_SELFTEST_DEPS and
24648         C_SELFTEST_FLAGS.
24649         (selftest-valgrind): Reintroduce as an alias for
24650         selftest-c-valgrind.
24651         (s-selftest-c++): New.
24652         (selftest-c++-gdb): New.
24653         (selftest-c++-valgrind): New.
24654
24655 2017-07-06  Olivier Hainque  <hainque@adacore.com>
24656
24657         * gcc.c (process_command): When deciding if undefined variables
24658         should be ignored when processing specs, accept "gcc -v" as well.
24659
24660 2017-07-06  Jan Hubicka  <hubicka@ucw.cz>
24661
24662         * auto-profile.c (afdo_set_bb_count, afdo_propagate_edge,
24663         afdo_annotate_cfg): Set counts/probabilities as determined by afdo.
24664
24665 2017-07-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
24666
24667         * config/arm/arm-cpus.in (armv8-r): Add new entry.
24668         * config/arm/arm-isa.h (ISA_ARMv8r): Define macro.
24669         * config/arm/arm-tables.opt: Regenerate.
24670         * config/arm/arm.h (enum base_architecture): Add BASE_ARCH_8R
24671         enumerator.
24672         * doc/invoke.texi: Mention -march=armv8-r and its extensions.
24673
24674 2017-07-06  Carl Love  <cel@us.ibm.com>
24675
24676         * ChangeLog: Clean up from mid air collision
24677
24678 2017-07-06  Carl Love  <cel@us.ibm.com>
24679
24680         * config/rs6000/rs6000-c.c: Add support for built-in functions
24681         vector signed int vec_subc (vector signed int, vector signed int);
24682         vector signed __int128 vec_subc (vector signed __int128,
24683                                          vector signed __int128);
24684         vector unsigned __int128 vec_subc (vector unsigned __int128,
24685                                            vector unsigned __int128);
24686         vector signed int vec_sube (vector signed int, vector signed int,
24687                                     vector signed int);
24688         vector unsigned int vec_sube (vector unsigned int,
24689                                       vector unsigned int,
24690                                       vector unsigned int);
24691         vector signed __int128 vec_sube (vector signed __int128,
24692                                          vector signed __int128,
24693                                          vector signed__int128);
24694         vector unsigned __int128 vec_sube (vector unsigned __int128,
24695                                            vector unsigned __int128,
24696                                            vector unsigned __int128);
24697         vector signed int vec_subec (vector signed int, vector signed int,
24698                                      vector signed int);
24699         vector unsigned int vec_subec (vector unsigned int,
24700                                        vector unsigned int,
24701                                        vector unsigned int);
24702         vector signed __int128 vec_subec (vector signed __int128,
24703                                           vector signed __int128,
24704                                           vector signed__int128);
24705         vector unsigned __int128 vec_subec (vector unsigned __int128,
24706                                             vector unsigned __int128,
24707                                             vector unsigned __int128);
24708         * config/rs6000/rs6000.c (ALTIVEC_BUILTIN_VEC_SUBE,
24709         ALTIVEC_BUILTIN_VEC_SUBEC): Add ef_builtins.
24710         * config/rs6000/rs6000-builtin.def (SUBE, SUBEC): Add
24711         BU_ALTIVEC_OVERLOAD_X definitions.
24712         * config/rs6000/altivec.h (vec_sube, vec_subec): Add builtin defines.
24713         * doc/extend.texi: Update the built-in documentation file for the new
24714         built-in functions.
24715
24716 2017-07-06  David Malcolm  <dmalcolm@redhat.com>
24717
24718         PR c++/79300
24719         * diagnostic-show-locus.c (layout::layout): Use start and finish
24720         spelling location for the start and finish of each range.
24721         * genmatch.c (linemap_client_expand_location_to_spelling_point):
24722         Add unused aspect param.
24723         * input.c (expand_location_1): Add "aspect" param, and use it
24724         to access the correct part of the location.
24725         (expand_location): Pass LOCATION_ASPECT_CARET to new param of
24726         expand_location_1.
24727         (expand_location_to_spelling_point): Likewise.
24728         (linemap_client_expand_location_to_spelling_point): Add "aspect"
24729         param, and pass it to expand_location_1.
24730
24731 2017-07-06  Sebastian Peryt  <sebastian.peryt@intel.com>
24732
24733         * config/i386/avx512fintrin.h (_mm_mask_getexp_round_ss,
24734         _mm_maskz_getexp_round_ss, _mm_mask_getexp_round_sd,
24735         _mm_maskz_getexp_round_sd, _mm_mask_getmant_round_sd,
24736         _mm_maskz_getmant_round_sd, _mm_mask_getmant_round_ss,
24737         _mm_maskz_getmant_round_ss, _mm_mask_getexp_ss, _mm_maskz_getexp_ss,
24738         _mm_mask_getexp_sd, _mm_maskz_getexp_sd, _mm_mask_getmant_sd,
24739         _mm_maskz_getmant_sd, _mm_mask_getmant_ss,
24740         _mm_maskz_getmant_ss): New intrinsics.
24741         (__builtin_ia32_getexpss128_mask): Changed to ...
24742         __builtin_ia32_getexpss128_round ... this.
24743         (__builtin_ia32_getexpsd128_mask): Changed to ...
24744         __builtin_ia32_getexpsd128_round ... this.
24745         * config/i386/i386-builtin-types.def
24746         ((V2DF, V2DF, V2DF, INT, V2DF, UQI, INT),
24747         (V4SF, V4SF, V4SF, INT, V4SF, UQI, INT)): New function type aliases.
24748         * config/i386/i386-builtin.def (__builtin_ia32_getexpsd_mask_round,
24749         __builtin_ia32_getexpss_mask_round,     __builtin_ia32_getmantsd_mask_round,
24750         __builtin_ia32_getmantss_mask_round): New builtins.
24751         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_INT_V2DF_UQI_INT,
24752         V4SF_FTYPE_V4SF_V4SF_INT_V4SF_UQI_INT): Handle new types.
24753         (CODE_FOR_avx512f_vgetmantv2df_mask_round,
24754         CODE_FOR_avx512f_vgetmantv4sf_mask_round): New cases.
24755         * config/i386/sse.md
24756         (avx512f_sgetexp<mode><round_saeonly_name>): Changed to ...
24757         avx512f_sgetexp<mode><mask_scalar_name>
24758         <round_saeonly_scalar_name> ... this.
24759         (vgetexp<ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|
24760         %0, %1, %2<round_saeonly_op3>}): Changed to ...
24761         vgetexp<ssescalarmodesuffix>
24762         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
24763         %0<mask_scalar_operand3>, %1, %2<round_saeonly_scalar_mask_op3>} ... this.
24764         (avx512f_vgetmant<mode><round_saeonly_name>): Changed to ...
24765         avx512f_vgetmant<mode><mask_scalar_name>
24766         <round_saeonly_scalar_name> ... this.
24767         (vgetmant<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
24768         %0, %1, %2<round_saeonly_op4>, %3}): Changed to ...
24769         vgetmant<ssescalarmodesuffix>
24770         \t{%3, <round_saeonly_scalar_mask_op4>%2, %1, %0<mask_scalar_operand4>|
24771         %0<mask_scalar_operand4>, %1, %2
24772         <round_saeonly_scalar_mask_op4>, %3} ... this.
24773         * config/i386/subst.md (mask_scalar_operand4,
24774         round_saeonly_scalar_mask_operand4,     round_saeonly_scalar_mask_op4,
24775         round_saeonly_scalar_nimm_predicate): New subst attributes.
24776
24777 2017-07-06  Julia Koval  <julia.koval@intel.com>
24778
24779         * config/i386/i386.c (ix86_erase_embedded_rounding):
24780         Remove code for old rounding pattern.
24781
24782 2017-07-06  Richard Earnshaw  <rearnsha@arm.com>
24783
24784         * config/arm/t-arm (GTM_H): Add arm-cpu.h.
24785
24786 2017-07-06  Christophe Lyon  <christophe.lyon@linaro.org>
24787
24788         * doc/sourcebuild.texi (Test Directives, Variants of
24789         dg-require-support): Add documentation for dg-require-stack-check.
24790
24791 2017-07-05  Sebastian Peryt  <sebastian.peryt@intel.com>
24792
24793         * config/i386/subst.md (mask_scalar, round_scalar,
24794         round_saeonly_scalar): New meta-templates.
24795         (mask_scalar_name, mask_scalar_operand3, round_scalar_name,
24796         round_scalar_mask_operand3, round_scalar_mask_op3,
24797         round_scalar_constraint, round_scalar_prefix, round_saeonly_scalar_name,
24798         round_saeonly_scalar_mask_operand3, round_saeonly_scalar_mask_op3,
24799         round_saeonly_scalar_constraint,
24800         round_saeonly_scalar_prefix): New subst attribute.
24801         * config/i386/sse.md
24802         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): Renamed to ...
24803         <sse>_vm<plusminus_insn><mode>3<mask_scalar_name>
24804         <round_scalar_name> ... this.
24805         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): Renamed to ...
24806         <sse>_vm<multdiv_mnemonic><mode>3<mask_scalar_name>
24807         <round_scalar_name> ... this.
24808         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): Renamed to ...
24809         <sse>_vm<code><mode>3<mask_scalar_name>
24810         <round_saeonly_scalar_name> ... this.
24811         (v<plusminus_mnemonic><ssescalarmodesuffix>
24812         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
24813         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
24814         v<plusminus_mnemonic><ssescalarmodesuffix>
24815         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
24816         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
24817         (v<multdiv_mnemonic><ssescalarmodesuffix>
24818         \t{<round_mask_op3>%2, %1, %0<mask_operand3>|
24819         %0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}): Changed to ...
24820         v<multdiv_mnemonic><ssescalarmodesuffix>
24821         \t{<round_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
24822         %0<mask_scalar_operand3>, %1, %<iptr>2<round_scalar_mask_op3>} ... this.
24823         (v<maxmin_float><ssescalarmodesuffix>
24824         \t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|
24825         %0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}): Changed to ...
24826         v<maxmin_float><ssescalarmodesuffix>
24827         \t{<round_saeonly_scalar_mask_op3>%2, %1, %0<mask_scalar_operand3>|
24828         %0<mask_scalar_operand3>, %1, %<iptr>2
24829         <round_saeonly_scalar_mask_op3>} ... this.
24830
24831 2017-07-05  Richard Earnshaw  <rearnsha@arm.com>
24832
24833         * config/arm/arm.c (arm_fixed_condition_code_regs): New function.
24834         (TARGET_FIXED_CONDITION_CODE_REGS): Redefine.
24835
24836 2017-07-05  Richard Sandiford  <richard.sandiford@linaro.org>
24837             Alan Hayward  <alan.hayward@arm.com>
24838             David Sherwood  <david.sherwood@arm.com>
24839
24840         * combine.c (simplify_if_then_else): Remove "enum" before
24841         "machine_mode".
24842         * compare-elim.c (can_eliminate_compare): Likewise.
24843         * config/aarch64/aarch64-builtins.c (aarch64_simd_builtin_std_type):
24844         Likewise.
24845         (aarch64_lookup_simd_builtin_type): Likewise.
24846         (aarch64_simd_builtin_type): Likewise.
24847         (aarch64_init_simd_builtin_types): Likewise.
24848         (aarch64_simd_expand_args): Likewise.
24849         * config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_rglist):
24850         Likewise.
24851         (aarch64_reverse_mask): Likewise.
24852         (aarch64_simd_emit_reg_reg_move): Likewise.
24853         (aarch64_gen_adjusted_ldpstp): Likewise.
24854         (aarch64_ccmp_mode_to_code): Likewise.
24855         (aarch64_operands_ok_for_ldpstp): Likewise.
24856         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
24857         * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
24858         Likewise.
24859         (aarch64_min_divisions_for_recip_mul): Likewise.
24860         (aarch64_reassociation_width): Likewise.
24861         (aarch64_get_condition_code_1): Likewise.
24862         (aarch64_simd_emit_reg_reg_move): Likewise.
24863         (aarch64_simd_attr_length_rglist): Likewise.
24864         (aarch64_reverse_mask): Likewise.
24865         (aarch64_operands_ok_for_ldpstp): Likewise.
24866         (aarch64_operands_adjust_ok_for_ldpstp): Likewise.
24867         (aarch64_gen_adjusted_ldpstp): Likewise.
24868         * config/aarch64/cortex-a57-fma-steering.c (fma_node::rename):
24869         Likewise.
24870         * config/arc/arc.c (legitimate_offset_address_p): Likewise.
24871         * config/arm/arm-builtins.c (arm_simd_builtin_std_type): Likewise.
24872         (arm_lookup_simd_builtin_type): Likewise.
24873         (arm_simd_builtin_type): Likewise.
24874         (arm_init_simd_builtin_types): Likewise.
24875         (arm_expand_builtin_args): Likewise.
24876         * config/arm/arm-protos.h (arm_expand_builtin): Likewise.
24877         * config/ft32/ft32.c (ft32_libcall_value): Likewise.
24878         (ft32_setup_incoming_varargs): Likewise.
24879         (ft32_function_arg): Likewise.
24880         (ft32_function_arg_advance): Likewise.
24881         (ft32_pass_by_reference): Likewise.
24882         (ft32_arg_partial_bytes): Likewise.
24883         (ft32_valid_pointer_mode): Likewise.
24884         (ft32_addr_space_pointer_mode): Likewise.
24885         (ft32_addr_space_legitimate_address_p): Likewise.
24886         * config/i386/i386-protos.h (ix86_operands_ok_for_move_multiple):
24887         Likewise.
24888         * config/i386/i386.c (ix86_setup_incoming_vararg_bounds): Likewise.
24889         (ix86_emit_outlined_ms2sysv_restore): Likewise.
24890         (iamcu_alignment): Likewise.
24891         (canonicalize_vector_int_perm): Likewise.
24892         (ix86_noce_conversion_profitable_p): Likewise.
24893         (ix86_mpx_bound_mode): Likewise.
24894         (ix86_operands_ok_for_move_multiple): Likewise.
24895         * config/microblaze/microblaze-protos.h
24896         (microblaze_expand_conditional_branch_reg): Likewise.
24897         * config/microblaze/microblaze.c
24898         (microblaze_expand_conditional_branch_reg): Likewise.
24899         * config/powerpcspe/powerpcspe.c (rs6000_init_hard_regno_mode_ok):
24900         Likewise.
24901         (rs6000_reassociation_width): Likewise.
24902         (rs6000_invalid_binary_op): Likewise.
24903         (fusion_p9_p): Likewise.
24904         (emit_fusion_p9_load): Likewise.
24905         (emit_fusion_p9_store): Likewise.
24906         * config/riscv/riscv-protos.h (riscv_regno_mode_ok_for_base_p):
24907         Likewise.
24908         (riscv_hard_regno_mode_ok_p): Likewise.
24909         (riscv_address_insns): Likewise.
24910         (riscv_split_symbol): Likewise.
24911         (riscv_legitimize_move): Likewise.
24912         (riscv_function_value): Likewise.
24913         (riscv_hard_regno_nregs): Likewise.
24914         (riscv_expand_builtin): Likewise.
24915         * config/riscv/riscv.c (riscv_build_integer_1): Likewise.
24916         (riscv_build_integer): Likewise.
24917         (riscv_split_integer): Likewise.
24918         (riscv_legitimate_constant_p): Likewise.
24919         (riscv_cannot_force_const_mem): Likewise.
24920         (riscv_regno_mode_ok_for_base_p): Likewise.
24921         (riscv_valid_base_register_p): Likewise.
24922         (riscv_valid_offset_p): Likewise.
24923         (riscv_valid_lo_sum_p): Likewise.
24924         (riscv_classify_address): Likewise.
24925         (riscv_legitimate_address_p): Likewise.
24926         (riscv_address_insns): Likewise.
24927         (riscv_load_store_insns): Likewise.
24928         (riscv_force_binary): Likewise.
24929         (riscv_split_symbol): Likewise.
24930         (riscv_force_address): Likewise.
24931         (riscv_legitimize_address): Likewise.
24932         (riscv_move_integer): Likewise.
24933         (riscv_legitimize_const_move): Likewise.
24934         (riscv_legitimize_move): Likewise.
24935         (riscv_address_cost): Likewise.
24936         (riscv_subword): Likewise.
24937         (riscv_output_move): Likewise.
24938         (riscv_canonicalize_int_order_test): Likewise.
24939         (riscv_emit_int_order_test): Likewise.
24940         (riscv_function_arg_boundary): Likewise.
24941         (riscv_pass_mode_in_fpr_p): Likewise.
24942         (riscv_pass_fpr_single): Likewise.
24943         (riscv_pass_fpr_pair): Likewise.
24944         (riscv_get_arg_info): Likewise.
24945         (riscv_function_arg): Likewise.
24946         (riscv_function_arg_advance): Likewise.
24947         (riscv_arg_partial_bytes): Likewise.
24948         (riscv_function_value): Likewise.
24949         (riscv_pass_by_reference): Likewise.
24950         (riscv_setup_incoming_varargs): Likewise.
24951         (riscv_print_operand): Likewise.
24952         (riscv_elf_select_rtx_section): Likewise.
24953         (riscv_save_restore_reg): Likewise.
24954         (riscv_for_each_saved_reg): Likewise.
24955         (riscv_register_move_cost): Likewise.
24956         (riscv_hard_regno_mode_ok_p): Likewise.
24957         (riscv_hard_regno_nregs): Likewise.
24958         (riscv_class_max_nregs): Likewise.
24959         (riscv_memory_move_cost): Likewise.
24960         * config/rl78/rl78-protos.h (rl78_split_movsi): Likewise.
24961         * config/rl78/rl78.c (rl78_split_movsi): Likewise.
24962         (rl78_addr_space_address_mode): Likewise.
24963         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
24964         Likewise.
24965         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Likewise.
24966         (rs6000_reassociation_width): Likewise.
24967         (rs6000_invalid_binary_op): Likewise.
24968         (fusion_p9_p): Likewise.
24969         (emit_fusion_p9_load): Likewise.
24970         (emit_fusion_p9_store): Likewise.
24971         * config/visium/visium-protos.h (prepare_move_operands): Likewise.
24972         (ok_for_simple_move_operands): Likewise.
24973         (ok_for_simple_move_strict_operands): Likewise.
24974         (ok_for_simple_arith_logic_operands): Likewise.
24975         (visium_legitimize_reload_address): Likewise.
24976         (visium_select_cc_mode): Likewise.
24977         (output_cbranch): Likewise.
24978         (visium_split_double_move): Likewise.
24979         (visium_expand_copysign): Likewise.
24980         (visium_expand_int_cstore): Likewise.
24981         (visium_expand_fp_cstore): Likewise.
24982         * config/visium/visium.c (visium_pass_by_reference): Likewise.
24983         (visium_function_arg): Likewise.
24984         (visium_function_arg_advance): Likewise.
24985         (visium_libcall_value): Likewise.
24986         (visium_setup_incoming_varargs): Likewise.
24987         (visium_legitimate_constant_p): Likewise.
24988         (visium_legitimate_address_p): Likewise.
24989         (visium_legitimize_address): Likewise.
24990         (visium_secondary_reload): Likewise.
24991         (visium_register_move_cost): Likewise.
24992         (visium_memory_move_cost): Likewise.
24993         (prepare_move_operands): Likewise.
24994         (ok_for_simple_move_operands): Likewise.
24995         (ok_for_simple_move_strict_operands): Likewise.
24996         (ok_for_simple_arith_logic_operands): Likewise.
24997         (visium_function_value_1): Likewise.
24998         (rtx_ok_for_offset_p): Likewise.
24999         (visium_legitimize_reload_address): Likewise.
25000         (visium_split_double_move): Likewise.
25001         (visium_expand_copysign): Likewise.
25002         (visium_expand_int_cstore): Likewise.
25003         (visium_expand_fp_cstore): Likewise.
25004         (visium_split_cstore): Likewise.
25005         (visium_select_cc_mode): Likewise.
25006         (visium_split_cbranch): Likewise.
25007         (output_cbranch): Likewise.
25008         (visium_print_operand_address): Likewise.
25009         * expmed.c (flip_storage_order): Likewise.
25010         * expmed.h (emit_cstore): Likewise.
25011         (flip_storage_order): Likewise.
25012         * genrecog.c (validate_pattern): Likewise.
25013         * hsa-gen.c (gen_hsa_addr): Likewise.
25014         * internal-fn.c (expand_arith_overflow): Likewise.
25015         * ira-color.c (allocno_copy_cost_saving): Likewise.
25016         * lra-assigns.c (find_hard_regno_for_1): Likewise.
25017         * lra-constraints.c (prohibited_class_reg_set_mode_p): Likewise.
25018         (process_invariant_for_inheritance): Likewise.
25019         * lra-eliminations.c (move_plus_up): Likewise.
25020         * omp-low.c (lower_oacc_reductions): Likewise.
25021         * simplify-rtx.c (simplify_subreg): Likewise.
25022         * target.def (TARGET_SETUP_INCOMING_VARARG_BOUNDS): Likewise.
25023         (TARGET_CHKP_BOUND_MODE): Likewise..
25024         * targhooks.c (default_chkp_bound_mode): Likewise.
25025         (default_setup_incoming_vararg_bounds): Likewise.
25026         * targhooks.h (default_chkp_bound_mode): Likewise.
25027         (default_setup_incoming_vararg_bounds): Likewise.
25028         * tree-ssa-math-opts.c (divmod_candidate_p): Likewise.
25029         * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
25030         (have_whole_vector_shift): Likewise.
25031         * tree-vect-stmts.c (vectorizable_load): Likewise.
25032         * doc/tm.texi: Regenerate.
25033
25034 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
25035
25036         Graceful degrade if Binutils PR21472 is not available.
25037
25038         PR target/81072
25039         * configure.ac [target=avr]: WARN instead of ERROR if avrxmega3
25040         .rodata in flash test fails.
25041         (HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH): Define it if test passes.
25042         * confgure: Regenerate.
25043         * config.in: Regenerate.
25044         * config/avr/avr.c (avr_asm_named_section)
25045         [HAVE_LD_AVR_AVRXMEGA3_RODATA_IN_FLASH]: Only trigger
25046         __do_copy_data for stuff in .rodata if flash_pm_offset = 0.
25047         (avr_asm_init_sections): Same.
25048
25049 2017-07-05  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
25050
25051         * config/arm/neon.md (fma<VCVTF:mode>4): Remove %?.
25052         (fma<VH:mode>4_intrinsic): Likewise.
25053         (*fmsub<VCVTF:mode>4): Likewise.
25054         (*fmsub<VH:mode>4_intrinsic): Likewise.
25055
25056 2017-07-05  Georg-Johann Lay  <avr@gjlay.de>
25057
25058         PR target/81305
25059         * config/avr/avr.c (avr_out_movhi_mr_r_xmega) [CONSTANT_ADDRESS_P]:
25060         Don't depend on "optimize > 0".
25061         (out_movhi_r_mr, out_movqi_mr_r): Same.
25062         (out_movhi_mr_r, out_movqi_r_mr): Same.
25063         (avr_address_cost) [CONSTANT_ADDRESS_P]: Don't depend cost for
25064         io_address_operand on "optimize > 0".
25065
25066 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
25067
25068         * tree-loop-distribution.c: Add general explanantion on the pass.
25069         (generate_loops_for_partition): Mark distributed loop.
25070         (pg_add_dependence_edges): New parameter.  Handle alias data
25071         dependence specially and record it in the parameter if asked.
25072         (struct pg_vdata, pg_edata, pg_edge_callback_data): New structs.
25073         (init_partition_graph_vertices, add_partition_graph_edge): New.
25074         (pg_skip_alias_edge, free_partition_graph_edata_cb): New.
25075         (free_partition_graph_vdata, build_partition_graph): New.
25076         (sort_partitions_by_post_order, merge_dep_scc_partitions): New.
25077         (pg_collect_alias_ddrs, break_alias_scc_partitions): New.
25078         (data_ref_segment_size, latch_dominated_by_data_ref): New.
25079         (compute_alias_check_pairs, version_loop_by_alias_check): New.
25080         (version_for_distribution_p, finalize_partitions): New.
25081         (distribute_loop): Handle alias data dependence specially.  Factor
25082         out loop fusion code as functions and call these functions.
25083
25084 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
25085
25086         * tree-loop-distribution.c (classify_partition): New parameter and
25087         better handle reduction statement.
25088         (rdg_build_partitions): Revise comment.
25089         (distribute_loop): Compute statements in all partitions and pass it
25090         to classify_partition.
25091
25092 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
25093
25094         * tree-loop-distribution.c (enum partition_type): New.
25095         (struct partition): New field type.
25096         (partition_merge_into): Add parameter.  Update partition type.
25097         (data_dep_in_cycle_p, update_type_for_merge): New functions.
25098         (build_rdg_partition_for_vertex): Compute partition type.
25099         (rdg_build_partitions): Dump partition type.
25100         (distribute_loop): Update calls to partition_merge_into.
25101
25102 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
25103
25104         * tree-loop-distribution.c (struct ddr_hasher): New.
25105         (ddr_hasher::hash, ::equal, get_data_dependence): New function.
25106         (ddrs_table): New.
25107         (classify_partition): Call get_data_dependence.
25108         (pg_add_dependence_edges): Ditto.
25109         (distribute_loop): Release data dependence hash table.
25110
25111 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
25112
25113         * tree-loop-distribution.c (ref_base_address): Delete.
25114         (similar_memory_accesses): Rename ...
25115         (share_memory_accesses): ... to this.  Check if partitions access
25116         the same memory reference.
25117         (distribute_loop): Call share_memory_accesses.
25118
25119 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
25120
25121         * tree-loop-distribution.c (struct partition): New field recording
25122         its data reference.
25123         (partition_alloc, partition_free): Init and release data refs.
25124         (partition_merge_into): Merge data refs.
25125         (build_rdg_partition_for_vertex): Collect data refs for partition.
25126         (pg_add_dependence_edges): Change parameters from vector to bitmap.
25127         Update uses.
25128         (distribute_loop): Remve data refs from vertice data of partition
25129         graph.
25130
25131 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
25132
25133         * tree-loop-distribution.c (params.h): Include header file.
25134         (MAX_DATAREFS_NUM, DR_INDEX): New macro.
25135         (datarefs_vec): New global var.
25136         (create_rdg_vertices): Use datarefs_vec directly.
25137         (free_rdg): Don't free data references.
25138         (build_rdg): Update use.  Don't free data references.
25139         (distribute_loop): Compute global variable for data references.
25140         Bail out if there are too many data references.
25141
25142 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
25143
25144         * tree-loop-distribution.c (loop_nest): New global var.
25145         (build_rdg): Use loop directly, rather than loop nest.
25146         (pg_add_dependence_edges): Remove loop nest parameter.  Use global
25147         variable directly.
25148         (distribute_loop): Compute global variable loop nest.  Update use.
25149
25150 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
25151
25152         * tree-loop-distribution.c (enum fuse_type, fuse_message): New.
25153         (partition_merge_into): New parameter.  Dump reason for fusion.
25154         (distribute_loop): Update use of partition_merge_into.
25155
25156 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
25157
25158         * tree-loop-distribution.c (bb_top_order_index): New.
25159         (bb_top_order_index_size, bb_top_order_cmp): New.
25160         (stmts_from_loop): Use topological order.
25161         (pass_loop_distribution::execute): Compute and release topological
25162         order for basic blocks.
25163
25164 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
25165
25166         * tree-loop-distribution.c (pass_loop_distribution::execute): Skip
25167         if no loops.
25168
25169 2017-07-05  Bin Cheng  <bin.cheng@arm.com>
25170
25171         * cfgloop.h (struct loop): Add comment.  New field orig_loop_num.
25172         * cfgloopmanip.c (lv_adjust_loop_entry_edge): Comment change.
25173         * internal-fn.c (expand_LOOP_DIST_ALIAS): New function.
25174         * internal-fn.def (LOOP_DIST_ALIAS): New.
25175         * tree-vectorizer.c (fold_loop_vectorized_call): Rename to ...
25176         (fold_loop_internal_call): ... this.
25177         (vect_loop_dist_alias_call): New function.
25178         (set_uid_loop_bbs): Call fold_loop_internal_call.
25179         (vectorize_loops): Fold IFN_LOOP_VECTORIZED and IFN_LOOP_DIST_ALIAS
25180         internal calls.
25181
25182 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
25183
25184         PR target/81300
25185         * config/i386/i386.md (setcc + movzbl/and to xor + setcc peepholes):
25186         Require dead FLAGS_REG at the beginning of a peephole.
25187
25188 2017-07-04  Uros Bizjak  <ubizjak@gmail.com>
25189
25190         PR target/81294
25191         * config/i386/adxintrin.h (_subborrow_u32): Swap _X and _Y
25192         arguments in the call to __builtin_ia32_sbb_u32.
25193         (_subborrow_u64): Swap _X and _Y arguments in the call to
25194         __builtin_ia32_sbb_u64.
25195
25196 2017-07-04  Jakub Jelinek  <jakub@redhat.com>
25197
25198         PR debug/81278
25199         * tree-vrp.c (compare_assert_loc): Turn into a function template
25200         with stable template parameter.  Only test if a->e is NULL,
25201         !a->e == !b->e has been verified already.  Use e == NULL or
25202         e != NULL instead of e or ! e tests.  If stable is true, don't use
25203         iterative_hash_expr, on the other side allow a or b or both NULL
25204         and sort the NULLs last.
25205         (process_assert_insertions): Sort using compare_assert_loc<false>
25206         instead of compare_assert_loc, later sort using
25207         compare_assert_loc<true> before calling process_assert_insertions_for
25208         in a loop.  Use break instead of continue once seen NULL pointer.
25209
25210 2017-07-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
25211
25212         * config/arm/driver-arm.c (arm_cpu_table): Add entry for ARM
25213         Cortex-R7 and Cortex-R8 processors.
25214
25215 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
25216
25217         * ipa-utils.c (ipa_merge_profiles): Fix merging when dst is
25218         uninitialized while src is not.
25219
25220 2017-07-04  Richard Earnshaw  <rearnsha@arm.com>
25221
25222         * common/config/arm/arm-common.c: Adjust include path for
25223         arm-cpu-cdata.h
25224         * config/arm/t-arm (TM_H): Adjust path for arm-cpu.h.
25225         (arm-cpu.h): Create in build directory.  Adjust dependency rules.
25226         (arm-cpu-data.h): Likewise.
25227         (arm-cpu-cdata.h): Likewise.
25228         * config/arm/arm-cpu.h: Delete.
25229         * config/arm/arm-cpu-cdata.h: Delete.
25230         * config/arm/arm-cpu-data.h: Delete.
25231
25232 2017-07-04  James Greenhalgh  <james.greenhalgh@arm.com>
25233
25234         * config/arm/arm-cpus.in (cortex-a55): New.
25235         (cortex-a75): Likewise.
25236         (cortex-a75.cortex-a55): Likewise.
25237         * config/arm/driver-arm.c (arm_cpu_table): Add cortex-a55 and
25238         cortex-a75.
25239         * doc/invoke.texi (-mcpu): Document cortex-a55 and cortex-a75.
25240         * config/arm/arm-cpu-cdata.h: Regenerate.
25241         * config/arm/arm-cpu-data.h: Regenerate.
25242         * config/arm/arm-cpu.h: Regenerate.
25243         * config/arm/arm-tables.opt: Regenerate.
25244         * config/arm/arm-tune.md: Regenerate.
25245
25246 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
25247
25248         * haifa-sched.c (sched_create_recovery_edges): Update profile.
25249
25250 2017-07-04  Jan Hubicka  <hubicka@ucw.cz>
25251
25252         * bb-reorder.c (better_edge_p): Fix handling of uninitialized
25253         probability.
25254
25255 2017-07-04  Richard Sandiford  <richard.sandiford@linaro.org>
25256
25257         PR tree-optimization/81292
25258         * tree-ssa-strlen.c (handle_builtin_strlen): When setting
25259         full_string_p, also call adjust_related_strinfos if the adjustment
25260         is simple, otherwise invalidate related strinfos.
25261
25262 2017-07-04  Martin Liska  <mliska@suse.cz>
25263
25264         PR sanitizer/81040
25265         * sanopt.c (sanitize_rewrite_addressable_params): Mark the
25266         newly created variable as DECL_IGNORED_P.
25267
25268 2017-07-04  Martin Liska  <mliska@suse.cz>
25269
25270         PR ipa/81293
25271         * ipa-inline.c (inline_small_functions):
25272         Use xstrdup_for_dump.
25273
25274 2017-07-04  Tom de Vries  <tom@codesourcery.com>
25275
25276         * graph.c (draw_cfg_edges): Save and restore EDGE_DFS_BACK.
25277
25278 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
25279
25280         PR target/81033
25281         * config/darwin.c (darwin_function_switched_text_sections):
25282         Fix spaces.
25283
25284 2017-07-03  Jan Hubicka  <hubicka@ucw.cz>
25285
25286         * tree-vect-loop-manip.c (vect_do_peeling): Fix scaling up.
25287
25288 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
25289
25290         * doc/invoke.texi (ARM Options): Add -mbe8 and -mbe32 to option summary.
25291
25292 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
25293
25294         * tree-vect-loop.c (vect_analyze_loop_2): Treat min_scalar_loop_bound,
25295         min_profitable_iters, and th as inclusive lower bounds.
25296         Fix LOOP_VINFO_PEELING_FOR_GAPS condition.
25297         (vect_estimate_min_profitable_iters): Return inclusive lower bounds
25298         for min_profitable_iters and min_profitable_estimate.
25299         (vect_transform_loop): Treat th as an inclusive lower bound.
25300         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
25301
25302 2017-07-03  Dominique d'Humieres  <dominiq@lps.ens.fr>
25303
25304         PR target/81033
25305         * config/darwin.c (darwin_function_switched_text_sections):
25306         Replace DECL_NAME with DECL_ASSEMBLER_NAME, split assemble_name_raw
25307         in two pieces, and suppress the use of buf.
25308
25309 2017-07-03  Nathan Sidwell  <nathan@acm.org>
25310
25311         * hash-table.h (hash_table_mod1): Fix indentation.
25312
25313 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
25314
25315         PR middle-end/81290
25316         * predict.c (force_edge_cold): Be more careful about propagation
25317         backward.
25318         * profile-count.h (profile_probability::guessed,
25319         profile_probability::fdo, profile_count::guessed, profile_count::fdo):
25320         New.
25321         * tree-ssa-threadupdate.c (recompute_probabilities): Result is guessed.
25322
25323 2017-07-03  James Greenhalgh  <james.greenhalgh@arm.com>
25324
25325         * doc/invoke.texi (rcpc architecture extension): Document it.
25326
25327 2017-07-03  Richard Biener  <rguenther@suse.de>
25328
25329         PR tree-optimization/60510
25330         * tree-vect-loop.c (vect_create_epilog_for_reduction): Pass in
25331         the scalar reduction PHI and use it.
25332         (vectorizable_reduction): Properly guard the single_defuse_cycle
25333         path for non-SLP reduction chains where we cannot use it.
25334         Rework reduc_def/index and vector type deduction.  Rework
25335         vector operand gathering during reduction op code-gen.
25336         * tree-vect-slp.c (vect_analyze_slp): For failed SLP reduction
25337         chains dissolve the chain and leave it to non-SLP reduction
25338         handling.
25339
25340 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
25341
25342         * tree-data-ref.h (dr_alignment): Declare.
25343         * tree-data-ref.c (dr_alignment): New function.
25344         * tree-vectorizer.h (dataref_aux): Remove base_element_aligned.
25345         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
25346         set it.
25347         * tree-vect-stmts.c (vectorizable_store): Use dr_alignment.
25348
25349 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
25350
25351         * tree-data-ref.h (innermost_loop_behavior): Add base_alignment
25352         and base_misalignment fields.
25353         (DR_BASE_ALIGNMENT, DR_BASE_MISALIGNMENT): New macros.
25354         * tree-data-ref.c: Include builtins.h.
25355         (dr_analyze_innermost): Set up the new innmost_loop_behavior fields.
25356         * tree-vectorizer.h (STMT_VINFO_DR_BASE_ALIGNMENT): New macro.
25357         (STMT_VINFO_DR_BASE_MISALIGNMENT): Likewise.
25358         * tree-vect-data-refs.c: Include tree-cfg.h.
25359         (vect_compute_data_ref_alignment): Use the new innermost_loop_behavior
25360         fields instead of calculating an alignment here.
25361         (vect_analyze_data_refs): Use dr_analyze_innermost.  Dump the new
25362         innermost_loop_behavior fields.
25363
25364 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
25365
25366         * tree-data-ref.h (innermost_loop_behavior): Add a step_alignment
25367         field.
25368         (DR_STEP_ALIGNMENT): New macro.
25369         * tree-vectorizer.h (STMT_VINFO_DR_STEP_ALIGNMENT): Likewise.
25370         * tree-data-ref.c (dr_analyze_innermost): Initalize step_alignment.
25371         (create_data_ref): Print it.
25372         * tree-vect-stmts.c (vectorizable_load): Use the step alignment
25373         to tell whether the step preserves vector (mis)alignment.
25374         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
25375         Move the check for an integer step and generalise to all INTEGER_CST.
25376         (vect_analyze_data_refs): Set DR_STEP_ALIGNMENT when setting DR_STEP.
25377         Print the outer step alignment.
25378
25379 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
25380
25381         * tree-data-ref.h (innermost_loop_behavior): Replace aligned_to
25382         with offset_alignment.
25383         (DR_ALIGNED_TO): Delete.
25384         (DR_OFFSET_ALIGNMENT): New macro.
25385         * tree-vectorizer.h (STMT_VINFO_DR_ALIGNED_TO): Delete.
25386         (STMT_VINFO_DR_OFFSET_ALIGNMENT): New macro.
25387         * tree-data-ref.c (dr_analyze_innermost): Update after above changes.
25388         (create_data_ref): Likewise.
25389         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Likewise.
25390         (vect_analyze_data_refs): Likewise.
25391         * tree-if-conv.c (if_convertible_loop_p_1): Use memset before
25392         creating dummy innermost behavior.
25393
25394 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
25395
25396         * tree-data-ref.h (dr_analyze_innermost): Replace the dr argument
25397         with a "innermost_loop_behavior *" and refeence tree.
25398         * tree-data-ref.c (dr_analyze_innermost): Likewise.
25399         (create_data_ref): Update call accordingly.
25400         * tree-predcom.c (find_looparound_phi): Likewise.
25401
25402 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
25403
25404         * tree-vectorizer.h (_stmt_vec_info): Replace individual dr_*
25405         fields with dr_wrt_vec_loop.
25406         (STMT_VINFO_DR_BASE_ADDRESS, STMT_VINFO_DR_INIT, STMT_VINFO_DR_OFFSET)
25407         (STMT_VINFO_DR_STEP, STMT_VINFO_DR_ALIGNED_TO): Update accordingly.
25408         (STMT_VINFO_DR_WRT_VEC_LOOP): New macro.
25409         (vect_dr_behavior): New function.
25410         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
25411         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
25412         vect_dr_behavior.  Use a step_preserves_misalignment_p boolean to
25413         track whether the step preserves the misalignment.
25414         (vect_create_addr_base_for_vector_ref): Remove loop parameter.
25415         Use vect_dr_behavior.
25416         (vect_setup_realignment): Update call accordingly.
25417         (vect_create_data_ref_ptr): Likewise.  Use vect_dr_behavior.
25418         * tree-vect-loop-manip.c (vect_gen_prolog_loop_niters): Update
25419         call to vect_create_addr_base_for_vector_ref.
25420         (vect_create_cond_for_align_checks): Likewise.
25421         * tree-vect-patterns.c (vect_recog_bool_pattern): Copy
25422         STMT_VINFO_DR_WRT_VEC_LOOP as a block.
25423         (vect_recog_mask_conversion_pattern): Likewise.
25424         * tree-vect-stmts.c (compare_step_with_zero): Use vect_dr_behavior.
25425         (new_stmt_vec_info): Remove redundant zeroing.
25426
25427 2017-07-03  Richard Earnshaw  <rearnsha@arm.com>
25428
25429         * common/config/arm/arm-common.c (arm_be8_option): New function.
25430         * config/arm/arm-isa.h (isa_feature): Add new feature bit isa_bit_be8.
25431         (ISA_ARMv6): Add isa_bit_be8.
25432         * config/arm/arm.h (arm_be8_option): Add prototype.
25433         (BE8_SPEC_FUNCTION): New define.
25434         (EXTRA_SPEC_FUNCTIONS): Add BE8_SPEC_FUNCTION.
25435         * config/arm/arm.opt (mbig-endian): Mark as Negative of mlittle-endian.
25436         (mlittle-endian): Similarly.
25437         (mbe8, mbe32): New options.
25438         * config/arm/bpabi.h (BE8_LINK_SPEC): Call arm_be8_option.
25439         * doc/invoke.texi (ARM Options): Document -mbe8 and -mbe32.
25440
25441 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
25442
25443         * tree-cfg.c (gimple_find_sub_bbs): Fix profile updating.
25444
25445 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
25446
25447         * tree-cfgcleanup.c (want_merge_blocks_p): New function.
25448         (cleanup_tree_cfg_bb): Use it.
25449         * profile-count.h (profile_count::of_for_merging, profile_count::merge):
25450         New functions.
25451         * tree-cfg.c (gimple_merge_blocks): Use profile_count::merge.
25452
25453 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
25454
25455         PR bootstrap/81285
25456         * loop-doloop.c (add_test): Update profile.
25457
25458 2017-07-03  Martin Liska  <mliska@suse.cz>
25459
25460         PR sanitize/81040
25461         * sanopt.c (rewrite_usage_of_param): New function.
25462         (sanitize_rewrite_addressable_params): Likewise.
25463         (pass_sanopt::execute): Call rewrite_usage_of_param.
25464
25465 2017-07-03  Richard Biener  <rguenther@suse.de>
25466
25467         * tree-vect-loop.c (vect_create_epilog_for_reduction): Revert
25468         back to using VIEW_CONVERT_EXPR.
25469
25470 2017-07-03  Martin Liska  <mliska@suse.cz>
25471
25472         PR other/78366
25473         * doc/extend.texi: Document when a resolver function is
25474         generated for target_clones.
25475
25476 2017-07-03  Martin Liska  <mliska@suse.cz>
25477
25478         * asan.c (asan_emit_stack_protection): Unpoison just red zones
25479         and shadow memory of auto variables which are subject of
25480         use-after-scope sanitization.
25481         (asan_expand_mark_ifn): Add do set only when is_poison.
25482
25483 2016-07-03  Richard Biener  <rguenther@suse.de>
25484
25485         * tree-vect-loop.c (vect_analyze_loop_operations): Also analyze
25486         reduction PHIs.
25487         (vect_force_simple_reduction): Record reduction def -> phi mapping.
25488         (vectorizable_reduction): Perform reduction PHI creation when
25489         visiting a reduction PHI and adjust and simplify code generation
25490         phase of the reduction op.  Cache dts, use fold_binary, not fold_build2.
25491         (vect_transform_loop): Visit reduction PHIs.
25492         * tree-vect-slp.c (vect_get_and_check_slp_defs): Record reduction
25493         defs into the SLP tree.
25494         (vect_build_slp_tree): Reduction defs terminate the recursion.
25495         * tree-vect-stmts.c (vect_get_vec_def_for_operand_1): Allow lookup
25496         of reduction defs.
25497         (vect_get_vec_defs_for_stmt_copy): Export.
25498         (vect_get_vec_defs): Likewise.
25499         * tree-vectorizer.h (struct _stmt_vec_info): Amend reduc_def
25500         purpose.
25501         (vect_get_vec_defs_for_stmt_copy): Declare.
25502         (vect_get_vec_defs): Likewise.
25503
25504 2017-07-03  Richard Sandiford  <richard.sandiford@linaro.org>
25505
25506         * tree-data-ref.c (dr_analyze_innermost): Replace the "nest"
25507         parameter with a "loop" parameter and use it instead of the
25508         loop containing DR_STMT.  Don't check simple_iv when doing
25509         BB analysis.  Describe the two analysis modes in the comment.
25510
25511 2017-07-03  Tom de Vries  <tom@codesourcery.com>
25512
25513         PR tree-optimization/69468
25514         * tree-ssa-tail-merge.c (ignore_edge_flags): New constant.
25515         (find_same_succ_bb): Handle ignore_edge_flags.
25516
25517 2017-07-03  Tom de Vries  <tom@codesourcery.com>
25518
25519         PR tree-optimization/81192
25520         * tree-ssa-tail-merge.c (same_succ_hash): Use bb->loop_father->num in
25521         hash.
25522         (same_succ::equal): Don't find bbs to be equal if bb->loop_father
25523         differs.
25524         (find_same_succ_bb): Remove obsolete test on bb->loop_father->latch.
25525
25526 2017-07-03  Tom de Vries  <tom@codesourcery.com>
25527
25528         PR tree-optimization/81192
25529         * tree-ssa-tail-merge.c (same_succ_flush_bb): Handle
25530         BB_SAME_SUCC (bb) == NULL.
25531
25532 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
25533
25534         * cfgrtl.c (rtl_verify_edges): Enable checking of profile_probability
25535         consistency.
25536
25537 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
25538
25539         * dumpfile.c: Include profile-count.h
25540         * tree-cfg.c (gimple_duplicate_sese_tail): Drop UNUSED attributes;
25541         update profile.
25542         (insert_cond_bb): Update profile.
25543         * tree-cfg.h (insert_cond_bb): Update prototype.
25544         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Update.
25545         * tree-dump.c: Do not include tree-cfg.
25546
25547 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
25548
25549         * bb-reorder.c (fix_up_crossing_landing_pad): Update profile.
25550
25551 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
25552
25553         * expect.c (dw2_build_landing_pads): Update profile of the landing pad
25554         bb.
25555
25556 2017-07-02  Jan Hubicka  <hubicka@ucw.cz>
25557
25558         * tree-complex.c (expand_complex_div_wide): update profile.
25559
25560 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
25561             Alan Hayward  <alan.hayward@arm.com>
25562             David Sherwood  <david.sherwood@arm.com>
25563
25564         * Makefile.in (MACHMODE_H): Remove insn-modes.h
25565         (CORETYPES_H): New define.
25566         (MOSTLYCLEANFILES): Add insn-modes-inline.h.
25567         (insn-modes-inline.h, s-modes-inline-h): New rules.
25568         (generated_files): Add insn-modes-inline.h.
25569         (RTL_BASE_H, TREE_CORE_H): Use CORETYPES_H instead of coretypes.h.
25570         (build/gensupport.o, build/ggc-none.o, build/print-rtl.o): Likewise.
25571         (build/read-md.o, build/read-rtl.o, build/rtl.o): Likewise.
25572         (build/vec.o, build/hash-table.o, build/inchash.o): Likewise.
25573         (build/gencondmd.o, build/genattr.o, build/genattr-common.o): Likewise.
25574         (build/genattrtab.o, build/genautomata.o, build/gencheck.o): Likewise.
25575         (build/gencodes.o, build/genconditions.o): Likewise.
25576         (build/genconfig.o, build/genconstants.o, build/genemit.o): Likewise.
25577         (build/genenums.o, build/genextract.o, build/genflags.o): Likewise.
25578         (build/gentarget-def.o, build/genmddeps.o, build/genopinit.o)
25579         (build/genoutput.o, build/genpeep.o, build/genpreds.o): Likewise.
25580         (build/genrecog.o, build/genmddump.o, build/genmatch.o): Likewise.
25581         (build/gencfn-macros.o, build/gcov-iov.o): Likewise.
25582         * coretypes.h: Include everything up to real.h for generators.
25583         Include insn-modes.h first.  Include wide-int-print.h after
25584         wide-int.h.  Include insn-modes-inline.h and then machmode.h.
25585         * machmode.h: Don't include insn-modes.h here.
25586         * function-tests.c: Remove includes of signop.h, machmode.h,
25587         double-int.h and wide-int.h.
25588         * rtl.h: Likewise.
25589         * gcc-rich-location.c: Remove includes of machmode.h, double-int.h
25590         and wide-int.h.
25591         * optc-save-gen.awk: Likewise.
25592         * gencheck.c (BITS_PER_UNIT): Delete dummy definition.
25593         * godump.c: Remove include of wide-int-print.h.
25594         * pretty-print.h: Likewise.
25595         * wide-int-print.cc: Likewise.
25596         * wide-int.cc: Likewise.
25597         * hash-map-tests.c: Remove include of signop.h.
25598         * hash-set-tests.c: Likewise.
25599         * rtl-tests.c: Likewise.
25600         * mkconfig.sh: Remove include of machmode.h.
25601         * genmodes.c (emit_insn_modes_h): Split emission of inline functions
25602         into...
25603         (emit_insn_modes_inline_h): ...this new function.  Emit the code
25604         into an insn-modes-inline.h header file, adding appropriate
25605         include guards and end comments.
25606         (emit_insn_modes_c_header): Remove include of machmode.h.
25607         (emit_min_insn_modes_c_header): Include coretypes.h rather than
25608         machmode.h.
25609         (main): Handle -i flag and call emit_insn_modes_inline_h when
25610         it is passed.
25611
25612 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
25613
25614         * tree-ssa-strlen.c (strinfo): Rename the length field to
25615         nonzero_chars.  Add a full_string_p field.
25616         (compare_nonzero_chars, zero_length_string_p): New functions.
25617         (get_addr_stridx): Add an offset_out parameter.
25618         Use compare_nonzero_chars.
25619         (get_stridx): Update accordingly.  Use compare_nonzero_chars.
25620         (new_strinfo): Update after above changes to strinfo.
25621         (set_endptr_and_length): Set full_string_p.
25622         (get_string_length): Update after above changes to strinfo.
25623         (unshare_strinfo): Update call to new_strinfo.
25624         (maybe_invalidate): Likewise.
25625         (get_stridx_plus_constant): Change off to unsigned HOST_WIDE_INT.
25626         Use compare_nonzero_chars and zero_string_p.  Treat nonzero_chars
25627         as a uhwi instead of an shwi.  Update after above changes to
25628         strinfo and new_strinfo.
25629         (zero_length_string): Assert that chainsi contains full strings.
25630         Use zero_length_string_p.  Update call to new_strinfo.
25631         (adjust_related_strinfos): Update after above changes to strinfo.
25632         Copy full_string_p from origsi.
25633         (adjust_last_stmt): Use zero_length_string_p.
25634         (handle_builtin_strlen): Update after above changes to strinfo and
25635         new_strinfo.  Install the lhs as the string length if the previous
25636         entry didn't describe a full string.
25637         (handle_builtin_strchr): Update after above changes to strinfo
25638         and new_strinfo.
25639         (handle_builtin_strcpy): Likewise.
25640         (handle_builtin_strcat): Likewise.
25641         (handle_builtin_malloc): Likewise.
25642         (handle_pointer_plus): Likewise.
25643         (handle_builtin_memcpy): Likewise.  Track nonzero characters
25644         that aren't necessarily followed by a nul terminator.
25645         (handle_char_store): Likewise.
25646
25647 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
25648
25649         PR tree-optimization/80769
25650         * tree-ssa-strlen.c (strinfo): Document that "stmt" is also used
25651         for malloc and calloc.  Document the new invariant that all related
25652         strinfos have delayed lengths or none do.
25653         (verify_related_strinfos): Move earlier in file.
25654         (set_endptr_and_length): New function, split out from...
25655         (get_string_length): ...here.  Also set the lengths of related
25656         strinfos.
25657         (zero_length_string): Assert that chainsi has known (rather than
25658         delayed) lengths.
25659         (adjust_related_strinfos): Likewise.
25660
25661 2017-07-02  Richard Sandiford  <richard.sandiford@linaro.org>
25662
25663         PR tree-optimization/81136
25664         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Only
25665         assert that two references with the same misalignment have the same
25666         compile-time misalignment if those compile-time misalignments
25667         are known.
25668
25669 2017-07-01  Andi Kleen  <ak@linux.intel.com>
25670
25671         * print-tree.c (print_node): Print all attributes.
25672
25673 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
25674
25675         * cfg.c (scale_bbs_frequencies): New function.
25676         * cfg.h (scale_bbs_frequencies): Declare it.
25677         * cfgloopanal.c (single_likely_exit): Cleanup.
25678         * cfgloopmanip.c (scale_loop_frequencies): Take profile_probability
25679         as parameter.
25680         (scale_loop_profile): Likewise.
25681         (loop_version): Likewise.
25682         (create_empty_loop_on_edge): Update.
25683         * cfgloopmanip.h (scale_loop_frequencies, scale_loop_profile,
25684         scale_loop_frequencies, scale_loop_profile, loopify,
25685         loop_version): Update prototypes.
25686         * modulo-sched.c (sms_schedule): Update.
25687         * predict.c (unlikely_executed_edge_p): Also check probability.
25688         (probably_never_executed_edge_p): Fix typo.
25689         * tree-if-conv.c (version_loop_for_if_conversion): Update.
25690         * tree-parloops.c (gen_parallel_loop): Update.
25691         * tree-ssa-loop-ivcanon.c (try_peel_loop): Update.
25692         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
25693         * tree-ssa-loop-split.c (split_loop): Update.
25694         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
25695         * tree-vect-loop-manip.c (vect_do_peeling): Update.
25696         (vect_loop_versioning): Update.
25697         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
25698
25699 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
25700
25701         * trans-mem.c (split_bb_make_tm_edge): Update profile.
25702
25703 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
25704
25705         * tree-if-conv.c (combine_blocks): Use make_single_succ_edge
25706         to keep profile consistent.
25707
25708 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
25709
25710         * cfgrtl.c (rtl_flow_call_edges_add): Update profile.
25711         * tree-cfg.c (gimple_flow_call_edges_add): Likewise.
25712         * profile-count.h (max_safe_multiplier): Make unsigned.
25713         (profile_count::guessed_zero): New.
25714
25715 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
25716
25717         * bb-reorder.c (fix_up_crossing_landing_pad,
25718         fix_crossing_conditional_branches): Use make_single_succ_edge
25719         to keep profile consistent.
25720
25721 2017-07-01  Jan Hubicka  <hubicka@ucw.cz>
25722
25723         * tree-vect-loop.c (optimize_mask_stores): Use make_single_succ_edge
25724         to update profile.
25725
25726 2017-07-01  Jakub Jelinek  <jakub@redhat.com>
25727
25728         PR sanitizer/81262
25729         * bb-reorder.c (fix_up_fall_thru_edges): Move variable declarations to
25730         the right scopes, make sure cond_jump isn't preserved between multiple
25731         iterations.  Search for fallthru edge whenever there are 3+ edges and
25732         use find_fallthru_edge for it.
25733
25734 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
25735
25736         Patch by Alexander Monakov <amonakov@ispras.ru>
25737         * sel-sched-ir.c (compute_succs_info): Handle uninitialized
25738         probabilities consistently.
25739
25740 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
25741
25742         * pa.c (pa_expand_compare_and_swap_loop): Update call of
25743         emit_cmp_and_jump_insns.
25744
25745 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
25746
25747         PR ipa/81261
25748         * tree-inline.c (expand_call_inline): Combine profile statuses.
25749
25750 2017-06-30  Andrew Pinski  <apinski@cavium.com>
25751
25752         * tree-if-conv.c (predicate_scalar_phi): Update new_stmt if
25753         fold_stmt returned true.
25754
25755 2017-06-30  Nathan Sidwell  <nathan@acm.org>
25756
25757         * ggc.h (empty_string): Delete.
25758         * cfgexpand.c (expand_asm_stmt): Use plain "".
25759         * optabs.c (expand_asm_memory_barrier): Likewise.
25760         * stringpool.c (empty_string): Delete.
25761         (digit_vector, digit_string): Delete.
25762         (ggc_alloc_string): Use plain "", don't optimize single digit
25763         strings.  Use ggc_alloc_atomic.
25764
25765 2017-06-30  Richard Earnshaw  <rearnsha@arm.com>
25766
25767         * rtlanal.c (insn_rtx_cost): If a parallel contains exactly one
25768         comparison set and one other set, use the cost of the non-comparison
25769         set.
25770
25771 2017-06-30  Nathan Sidwell  <nathan@acm.org>
25772
25773         * ggc.h: Replace all 'static inline' with plain 'inline'.  Fix
25774         some formatting.
25775
25776 2017-06-30  Peter Bergner  <bergner@vnet.ibm.com>
25777
25778         * tree-cfg.c (group_case_labels_stmt): Merge scanning and compressing
25779         loops.  Remove now unneeded calls to gimple_switch_set_label() that
25780         just set removed labels to NULL_TREE.
25781
25782 2017-06-30  Aldy Hernandez  <aldyh@redhat.com>
25783
25784         * tree-ssanames.c (set_range_info_raw): Abstract from ...
25785         (set_range_info): ...here.  Only call set_range_info_raw if domain
25786         is useful.
25787         (set_nonzero_bits): Call set_range_info_raw.
25788         * tree-ssanames.h (set_range_info_raw): New.
25789
25790 2017-06-30  Jakub Jelinek  <jakub@redhat.com>
25791
25792         PR target/81225
25793         * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): For V8FI,
25794         V16FI and VI8F_256 iterators, use <store_mask_predicate> instead
25795         of nonimmediate_operand and <store_mask_constraint> instead of m
25796         for the input operand.  For V8FI iterator, always split if input
25797         is a MEM.  For V16FI and V8SF_256 iterators, don't test if both
25798         operands are MEM if <mask_applied>.  For VI4F_256 iterator, use
25799         <store_mask_predicate> instead of register_operand and
25800         <store_mask_constraint> instead of v for the input operand.  Make
25801         sure both operands aren't MEMs for if not <mask_applied>.
25802
25803 2017-06-30  Sylvestre Ledru  <sylvestre@debian.org>
25804
25805         * lto-wrapper.c (copy_file) Close both file descriptors before
25806         exiting normally.
25807
25808 2017-06-30  Martin Liska  <mliska@suse.cz>
25809
25810         PR ipa/81214
25811         * multiple_target.c (create_dispatcher_calls): Make ifunc
25812         also for function that don't have calls or are not referenced.
25813
25814 2017-06-30  Richard Biener  <rguenther@suse.de>
25815
25816         * tree-vect-slp.c (vect_slp_analyze_node_operations): Only
25817         analyze the first scalar stmt.  Move vector type computation
25818         for the BB case here from ...
25819         * tree-vect-stmts.c (vect_analyze_stmt): ... here.  Guard
25820         live operation processing in the SLP case properly.
25821
25822 2017-06-30  Richard Biener  <rguenther@suse.de>
25823
25824         * graph.c (draw_cfg_node_succ_edges): Fix broken dot syntax.
25825
25826 2017-06-30  Martin Liska  <mliska@suse.cz>
25827
25828         PR sanitizer/81021
25829         * tree-eh.c (lower_resx): Call BUILT_IN_ASAN_HANDLE_NO_RETURN
25830         before BUILT_IN_UNWIND_RESUME when ASAN is used.
25831
25832 2017-06-30  Yvan Roux  <yvan.roux@linaro.org>
25833
25834         * doc/invoke.texi (AArch64): Add missing options and remove redundant
25835         ones.
25836
25837 2017-06-30  Richard Biener  <rguenther@suse.de>
25838
25839         PR tree-optimization/81249
25840         * tree-vect-loop.c (vect_create_epilog_for_reduction): Convert
25841         condition reduction result to original scalar type.
25842
25843 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25844
25845         * profile-count.h (enum profile_quality): Fix typos and whitespace
25846         issues.
25847
25848 2017-06-30  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
25849
25850         * config/s390/s390.c (s390_expand_setmem): Adjust to the new data
25851         type for branch probabilities.
25852
25853 2017-06-29  Julian Brown  <julian@codesourcery.com>
25854             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
25855
25856         * config/aarch64/aarch64-fusion-pairs.def: Add ALU_BRANCH entry.
25857         * config/aarch64/aarch64.c (AARCH64_FUSE_ALU_BRANCH): New fusion type.
25858         (thunderx2t99_tunings): Set AARCH64_FUSE_ALU_BRANCH flag.
25859         (aarch_macro_fusion_pair_p): Add support for AARCH64_FUSE_ALU_BRANCH.
25860
25861 2017-06-29  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
25862
25863         * config/aarch64/aarch64.c (aarch_macro_fusion_pair_p): Push the
25864         check for CC usage into AARCH64_FUSE_CMP_BRANCH.
25865         * config/i386/i386.c (ix86_macro_fusion_pair_p): Push the check for
25866         CC usage from generic code to here.
25867         * sched-deps.c (sched_macro_fuse_insns): Move the condition for
25868         CC usage into the target macros.
25869
25870 2017-06-29  Maya Rashish  <coypu@sdf.org>
25871
25872         * config/netbsd.h (NETBSD_LIB_SPEC): Add -lc when creating shared
25873         objects.
25874
25875 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
25876
25877         * arm/arm-builtins.c: Include profile-count.h
25878         * except.c (sjlj_emit_function_enter): Use
25879         profile_probability::unlikely.
25880
25881 2017-06-29  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
25882
25883         * config/rs6000/rs6000.c (toc_relative_expr_p): Make tocrel_base
25884         and tocrel_offset be pointer args rather than implicitly using
25885         static versions.
25886         (legitimate_constant_pool_address_p, rs6000_emit_move,
25887         const_load_sequence_p, adjust_vperm): Add local tocrel_base and
25888         tocrel_offset and use in toc_relative_expr_p call.
25889         (print_operand, print_operand_address): Use static tocrel_base_oac
25890         and tocrel_offset_oac.
25891         (rs6000_output_addr_const_extra): Use static tocrel_base_oac and
25892         tocrel_offset_oac.
25893
25894 2017-06-29  Maya Rashish  <coypu@sdf.org>
25895
25896         * config/vax/builtins.md (ffssi2_internal): Correct constraint.
25897
25898 2017-06-29  Eric Botcazou  <ebotcazou@adacore.com>
25899
25900         * expr.c (expand_expr) <normal_inner_ref>: When testing for unaligned
25901         objects, take into account only the alignment of 'op0' and 'mode1' if
25902         'op0' is a MEM.
25903
25904 2017-06-29  Steve Ellcey  <sellcey@cavium.com>
25905
25906         * ccmp.c (ccmp_tree_comparison_p): New function.
25907         (ccmp_candidate_p): Update to use above function.
25908         (get_compare_parts): New function.
25909         (expand_ccmp_next): Update to use new functions.
25910         (expand_ccmp_expr_1): Take tree arg instead of gimple, update to use
25911         new functions.
25912         (expand_ccmp_expr): Pass tree instead of gimple to expand_ccmp_expr_1,
25913         take mode as argument.
25914         * ccmp.h (expand_ccmp_expr): Add mode as argument.
25915         * expr.c (expand_expr_real_1): Pass mode as argument.
25916
25917 2017-06-29  Segher Boessenkool  <segher@kernel.crashing.org>
25918
25919         * combine.c (combine_instructions): Print insns to dump_file, together
25920         with their costs.
25921
25922 2017-06-29  Jan Hubicka  <hubicka@ucw.cz>
25923
25924         * asan.c (asan_emit_stack_protection): Update.
25925         (create_cond_insert_point): Update.
25926         * auto-profile.c (afdo_propagate_circuit): Update.
25927         * basic-block.h (struct edge_def): Turn probability to
25928         profile_probability.
25929         (EDGE_FREQUENCY): Update.
25930         * bb-reorder.c (find_traces_1_round): Update.
25931         (better_edge_p): Update.
25932         (sanitize_hot_paths): Update.
25933         * cfg.c (unchecked_make_edge): Initialize probability to uninitialized.
25934         (make_single_succ_edge): Update.
25935         (check_bb_profile): Update.
25936         (dump_edge_info): Update.
25937         (update_bb_profile_for_threading): Update.
25938         * cfganal.c (connect_infinite_loops_to_exit): Initialize new edge
25939         probabilitycount to 0.
25940         * cfgbuild.c (compute_outgoing_frequencies): Update.
25941         * cfgcleanup.c (try_forward_edges): Update.
25942         (outgoing_edges_match): Update.
25943         (try_crossjump_to_edge): Update.
25944         * cfgexpand.c (expand_gimple_cond): Update make_single_succ_edge.
25945         (expand_gimple_tailcall): Update.
25946         (construct_init_block): Use make_single_succ_edge.
25947         (construct_exit_block): Use make_single_succ_edge.
25948         * cfghooks.c (verify_flow_info): Update.
25949         (redirect_edge_succ_nodup): Update.
25950         (split_edge): Update.
25951         (account_profile_record): Update.
25952         * cfgloopanal.c (single_likely_exit): Update.
25953         * cfgloopmanip.c (scale_loop_profile): Update.
25954         (set_zero_probability): Remove.
25955         (duplicate_loop_to_header_edge): Update.
25956         * cfgloopmanip.h (loop_version): Update prototype.
25957         * cfgrtl.c (try_redirect_by_replacing_jump): Update.
25958         (force_nonfallthru_and_redirect): Update.
25959         (update_br_prob_note): Update.
25960         (rtl_verify_edges): Update.
25961         (purge_dead_edges): Update.
25962         (rtl_lv_add_condition_to_bb): Update.
25963         * cgraph.c: (cgraph_edge::redirect_call_stmt_to_calle): Update.
25964         * cgraphunit.c (init_lowered_empty_function): Update.
25965         (cgraph_node::expand_thunk): Update.
25966         * cilk-common.c: Include profile-count.h
25967         * dojump.c (inv): Remove.
25968         (jumpifnot): Update.
25969         (jumpifnot_1): Update.
25970         (do_jump_1): Update.
25971         (do_jump): Update.
25972         (do_jump_by_parts_greater_rtx): Update.
25973         (do_compare_rtx_and_jump): Update.
25974         * dojump.h (jumpifnot, jumpifnot_1, jumpif_1, jumpif, do_jump,
25975         do_jump_1. do_compare_rtx_and_jump): Update prototype.
25976         * dwarf2cfi.c: Include profile-count.h
25977         * except.c (dw2_build_landing_pads): Use make_single_succ_edge.
25978         (sjlj_emit_dispatch_table): Likewise.
25979         * explow.c: Include profile-count.h
25980         * expmed.c (emit_store_flag_force): Update.
25981         (do_cmp_and_jump): Update.
25982         * expr.c (compare_by_pieces_d::generate): Update.
25983         (compare_by_pieces_d::finish_mode): Update.
25984         (emit_block_move_via_loop): Update.
25985         (store_expr_with_bounds): Update.
25986         (store_constructor): Update.
25987         (expand_expr_real_2): Update.
25988         (expand_expr_real_1): Update.
25989         * expr.h (try_casesi, try_tablejump): Update prototypes.
25990         * gimple-pretty-print.c (dump_probability): Update.
25991         (dump_profile): New.
25992         (dump_gimple_label): Update.
25993         (dump_gimple_bb_header): Update.
25994         * graph.c (draw_cfg_node_succ_edges): Update.
25995         * hsa-gen.c (convert_switch_statements): Update.
25996         * ifcvt.c (cheap_bb_rtx_cost_p): Update.
25997         (find_if_case_1): Update.
25998         (find_if_case_2): Update.
25999         * internal-fn.c (expand_arith_overflow_result_store): Update.
26000         (expand_addsub_overflow): Update.
26001         (expand_neg_overflow): Update.
26002         (expand_mul_overflow): Update.
26003         (expand_vector_ubsan_overflow): Update.
26004         * ipa-cp.c (good_cloning_opportunity_p): Update.
26005         * ipa-split.c (split_function): Use make_single_succ_edge.
26006         * ipa-utils.c (ipa_merge_profiles): Update.
26007         * loop-doloop.c (add_test): Update.
26008         (doloop_modify): Update.
26009         * loop-unroll.c (compare_and_jump_seq): Update.
26010         (unroll_loop_runtime_iterations): Update.
26011         * lra-constraints.c (lra_inheritance): Update.
26012         * lto-streamer-in.c (input_cfg): Update.
26013         * lto-streamer-out.c (output_cfg): Update.
26014         * mcf.c (adjust_cfg_counts): Update.
26015         * modulo-sched.c (sms_schedule): Update.
26016         * omp-expand.c (expand_omp_for_init_counts): Update.
26017         (extract_omp_for_update_vars): Update.
26018         (expand_omp_ordered_sink): Update.
26019         (expand_omp_for_ordered_loops): Update.
26020         (expand_omp_for_generic): Update.
26021         (expand_omp_for_static_nochunk): Update.
26022         (expand_omp_for_static_chunk): Update.
26023         (expand_cilk_for): Update.
26024         (expand_omp_simd): Update.
26025         (expand_omp_taskloop_for_outer): Update.
26026         (expand_omp_taskloop_for_inner): Update.
26027         * omp-simd-clone.c (simd_clone_adjust): Update.
26028         * optabs.c (expand_doubleword_shift): Update.
26029         (expand_abs): Update.
26030         (emit_cmp_and_jump_insn_1): Update.
26031         (expand_compare_and_swap_loop): Update.
26032         * optabs.h (emit_cmp_and_jump_insns): Update prototype.
26033         * predict.c (predictable_edge_p): Update.
26034         (edge_probability_reliable_p): Update.
26035         (set_even_probabilities): Update.
26036         (combine_predictions_for_insn): Update.
26037         (combine_predictions_for_bb): Update.
26038         (propagate_freq): Update.
26039         (estimate_bb_frequencies): Update.
26040         (force_edge_cold): Update.
26041         * profile-count.c (profile_count::dump): Add missing space into dump.
26042         (profile_count::debug): Add newline.
26043         (profile_count::differs_from_p): Explicitly convert to unsigned.
26044         (profile_count::stream_in): Update.
26045         (profile_probability::dump): New member function.
26046         (profile_probability::debug): New member function.
26047         (profile_probability::differs_from_p): New member function.
26048         (profile_probability::differs_lot_from_p): New member function.
26049         (profile_probability::stream_in): New member function.
26050         (profile_probability::stream_out): New member function.
26051         * profile-count.h (profile_count_quality): Rename to ...
26052         (profile_quality): ... this one.
26053         (profile_probability): New.
26054         (profile_count): Update.
26055         * profile.c (compute_branch_probabilities): Update.
26056         * recog.c (peep2_attempt): Update.
26057         * sched-ebb.c (schedule_ebbs): Update.
26058         * sched-rgn.c (find_single_block_region): Update.
26059         (compute_dom_prob_ps): Update.
26060         (schedule_region): Update.
26061         * sel-sched-ir.c (compute_succs_info): Update.
26062         * stmt.c (struct case_node): Update.
26063         (do_jump_if_equal): Update.
26064         (get_outgoing_edge_probs): Update.
26065         (conditional_probability): Update.
26066         (emit_case_dispatch_table): Update.
26067         (expand_case): Update.
26068         (expand_sjlj_dispatch_table): Update.
26069         (emit_case_nodes): Update.
26070         * targhooks.c: Update.
26071         * tracer.c (better_p): Update.
26072         (find_best_successor): Update.
26073         * trans-mem.c (expand_transaction): Update.
26074         * tree-call-cdce.c: Update.
26075         * tree-cfg.c (gimple_split_edge): Upate.
26076         (move_sese_region_to_fn): Upate.
26077         * tree-cfgcleanup.c (cleanup_control_expr_graph): Upate.
26078         * tree-eh.c (lower_resx): Upate.
26079         (cleanup_empty_eh_move_lp): Upate.
26080         * tree-if-conv.c (version_loop_for_if_conversion): Update.
26081         * tree-inline.c (copy_edges_for_bb): Update.
26082         (copy_cfg_body): Update.
26083         * tree-parloops.c (gen_parallel_loop): Update.
26084         * tree-profile.c (gimple_gen_ic_func_profiler): Update.
26085         (gimple_gen_time_profiler): Update.
26086         * tree-ssa-dce.c (remove_dead_stmt): Update.
26087         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
26088         * tree-ssa-loop-im.c (execute_sm_if_changed): Update.
26089         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update.
26090         (unloop_loops): Update.
26091         (try_peel_loop): Update.
26092         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
26093         * tree-ssa-loop-split.c (connect_loops): Update.
26094         (split_loop): Update.
26095         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Update.
26096         (hoist_guard): Update.
26097         * tree-ssa-phionlycprop.c (propagate_rhs_into_lhs): Update.
26098         * tree-ssa-phiopt.c (replace_phi_edge_with_variable): Update.
26099         (value_replacement): Update.
26100         * tree-ssa-reassoc.c (branch_fixup): Update.
26101         * tree-ssa-tail-merge.c (replace_block_by): Update.
26102         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges): Update.
26103         (create_edge_and_update_destination_phis): Update.
26104         (compute_path_counts): Update.
26105         (recompute_probabilities): Update.
26106         (update_joiner_offpath_counts): Update.
26107         (freqs_to_counts_path): Update.
26108         (duplicate_thread_path): Update.
26109         * tree-switch-conversion.c (hoist_edge_and_branch_if_true): Update.
26110         (struct switch_conv_info): Update.
26111         (gen_inbound_check): Update.
26112         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
26113         (vect_do_peeling): Update.
26114         (vect_loop_versioning): Update.
26115         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
26116         (optimize_mask_stores): Update.
26117         * ubsan.c (ubsan_expand_null_ifn): Update.
26118         * value-prof.c (gimple_divmod_fixed_value): Update.
26119         (gimple_divmod_fixed_value_transform): Update.
26120         (gimple_mod_pow2): Update.
26121         (gimple_mod_pow2_value_transform): Update.
26122         (gimple_mod_subtract): Update.
26123         (gimple_mod_subtract_transform): Update.
26124         (gimple_ic): Update.
26125         (gimple_stringop_fixed_value): Update.
26126         (gimple_stringops_transform): Update.
26127         * value-prof.h: Update.
26128
26129 2017-06-29  Carl Love  <cel@us.ibm.com>
26130
26131         * config/rs6000/rs6000-c.c: Add support for built-in functions
26132         vector signed int vec_signed (vector float);
26133         vector signed long long vec_signed (vector double);
26134         vector signed int vec_signed2 (vector double, vector double);
26135         vector signed int vec_signede (vector double);
26136         vector signed int vec_signedo (vector double);
26137         * config/rs6000/rs6000.c (rs6000_generate_vsigned2_code): Add
26138         instruction generator.
26139         * config/rs6000/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
26140         UNSPEC_VSX_VSIGNED2): Add UNSPECS.
26141         (vsx_xvcvspsxws, vsx_xvcvdpuxds_scale, vsx_xvcvspuxws, vsigned2_v2df):
26142         Add define_insn.
26143         (vsignedo_v2df, vsignede_v2df, vunsigned2_v2df, vunsignedo_v2df,
26144         vunsignede_v2df): Add define_expands.
26145         * config/rs6000/rs6000-builtin.def (VEC_SIGNED, VEC_UNSIGNED,
26146         VEC_SIGNED2, VEC_UNSIGNED2, VEC_SIGNEDE, VEC_UNSIGNEDE, VEC_SIGNEDO,
26147         VEC_UNSIGNEDO): Add definitions.
26148         * config/vsx.md (UNSPEC_VSX_XVCVSPSXWS, UNSPEC_VSX_XVCVSPSXDS,
26149         UNSPEC_VSX_VSIGNED2): Add UNSPECs.
26150         (vsx_xvcvspsxws, vsx_xvcvspuxws): Add define_insn.
26151         (vsigned2_v2df, vsigendo_v2df, vsignede_v2df,
26152         vunsigned2_v2df, vunsignedo_v2df, vunsignede_v2df): Add define_expands.
26153         * config/rs6000/altivec.h (vec_signed, vec_signed2,
26154         vec_signede and vec_signedo, vec_unsigned, vec_unsigned2,
26155         vec_unsignede, vec_unsignedo): Add builtin defines.
26156         * config/rs6000-protos.h (rs6000_generate_vsigned2_code): Add extern
26157         declaration.
26158         * doc/extend.texi: Update the built-in documentation file for the
26159         new built-in functions.
26160
26161 2017-06-29  Richard Biener  <rguenther@suse.de>
26162
26163         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Do not add
26164         reduction chains to LOOP_VINFO_REDUCTIONS.
26165         * tree-vect-slp.c (vect_analyze_slp): Continue looking for
26166         SLP reductions after processing reduction chains.
26167
26168 2017-06-29  Nathan Sidwell  <nathan@acm.org>
26169
26170         * builtins.c (fold_builtin_FUNCTION): Use
26171         lang_hooks.decl_printable_name.
26172
26173 2017-06-29  Peter Bergner  <bergner@vnet.ibm.com>
26174
26175         PR middle-end/81194
26176         * cfgexpand.c (expand_gimple_stmt_1): Handle switch statements
26177         with only one label.
26178         * stmt.c (expand_case): Assert NCASES is greater than one.
26179
26180 2017-06-29  Richard Biener  <rguenther@suse.de>
26181
26182         * tree-cfg.c (group_case_labels_stmt): Return whether we changed
26183         anything.
26184         (group_case_labels): Likewise.
26185         (find_taken_edge): Push sanity checking on val to workers...
26186         (find_taken_edge_cond_expr): ... here
26187         (find_taken_edge_switch_expr): ... and here, handle cases
26188         with just a default label.
26189         * tree-cfg.h (group_case_labels_stmt): Adjust prototype.
26190         (group_case_labels): Likewise.
26191         * tree-cfgcleanup.c (execute_cleanup_cfg_post_optimizing): When
26192         group_case_labels does anything cleanup the CFG again.
26193
26194 2017-06-29  Bin Cheng  <bin.cheng@arm.com>
26195
26196         PR tree-optimization/81196
26197         * tree-ssa-loop-niter.c (number_of_iterations_cond): Handle loop
26198         exit condition comparing two IVs.
26199
26200 2017-06-29  Richard Earnshaw  <rearnsha@arm.com>
26201
26202         * config/arm/parsecpu.awk (gen_comm_data): Add initializer for
26203         profile to the dummy entry at the end of the list of architectures.
26204         * config/arm/arm-cpu-cdata.h: Regenerated.
26205
26206 2017-06-29  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26207             Michael Collison <michael.collison@arm.com>
26208
26209         PR target/70119
26210         * config/aarch64/aarch64.md (*aarch64_<optab>_reg_<mode>3_mask1):
26211         New pattern.
26212         (*aarch64_reg_<mode>3_neg_mask2): New pattern.
26213         (*aarch64_reg_<mode>3_minus_mask): New pattern.
26214         (*aarch64_<optab>_reg_di3_mask2): New pattern.
26215         * config/aarch64/aarch64.c (aarch64_rtx_costs): Account for cost
26216         of shift when the shift amount is masked with constant equal to
26217         the size of the mode.
26218         * config/aarch64/predicates.md (subreg_lowpart_operator): New
26219         predicate.
26220
26221 2017-06-29  Martin Liska  <mliska@suse.cz>
26222
26223         * config/i386/i386.opt: Change range from [1,5] to [0,5].
26224
26225 2017-06-29  Yury Gribov  <tetra2005@gmail.com>
26226
26227         PR bootstrap/80565
26228         * ipa-cp.c (allocate_and_init_ipcp_value): Add initialization
26229         code.
26230         * ipa-inline.h
26231         (edge_growth_cache_entry::edge_growth_cache_entry): New
26232         function.
26233         (reset_edge_growth_cache): Update to use constructor.
26234
26235 2017-06-28  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
26236
26237         * config/aarch64/aarch64.h (AARCH64_EXPAND_ALIGNMENT): New.
26238         (DATA_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
26239         (LOCAL_ALIGNMENT): Update to use AARCH64_EXPAND_ALIGNMENT.
26240
26241 2017-06-28  Sebastian Peryt  <sebastian.peryt@intel.com>
26242
26243         * config/i386/avx512vlintrin.h (_mm256_permutexvar_epi64)
26244         (_mm256_permutexvar_epi32, _mm256_permutex_epi64): New intrinsics.
26245
26246 2017-06-28  Szabolcs Nagy  <szabolcs.nagy@arm.com>
26247
26248         * config.gcc (*-linux-musl*): Add t-musl tmake_file.
26249         (*-linux-uclibc*): Add t-uclibc tmake_file.
26250         * config/t-musl: New.
26251         * config/t-uclibc: New.
26252
26253 2017-06-28  Richard Earnshaw  <rearnsha@arm.com>
26254
26255         * config/arm/parsecpu.awk (profile): Parse new keyword in an arch
26256         context.
26257         (gen_comm_data): Emit architectural setting of arch_prof.
26258         * config/arm/arm-cpus.in (armv6-m, armv6s-m, armv7-a, armv7ve): Set the
26259         profile.
26260         (armv7-r, armv7-m, armv7e-m, armv8-a, armv8.1-a, armv8.2-a): Likewise.
26261         (armv8-m.base, armv8-m.main): Likewise.
26262         * arm-protos.h (arm_build_target): Add profile field.
26263         (arch_option): Likewise.
26264         * config/arm/arm.c (arm_configure_build_target): Copy the profile to
26265         the active target.
26266         * config/arm/arm.h (TARGET_ARM_ARCH_PROFILE): Use
26267         arm_active_target.profile.
26268
26269 2017-06-28  Richard Biener  <rguenther@suse.de>
26270
26271         PR middle-end/81227
26272         * fold-const.c (negate_expr_p): Use TYPE_UNSIGNED, not
26273         TYPE_OVERFLOW_WRAPS.
26274         * match.pd (negate_expr_p): Likewise.
26275         * tree-ssa-reassoc.c (optimize_range_tests_diff): Use
26276         fold_build2, not fold_binary.
26277
26278 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
26279
26280         * config/aarch64/aarch64 (aarch64_expand_mov_immediate):
26281         Convert memory address to Pmode.
26282         (aarch64_print_operand): Assert MEM operands are always Pmode.
26283
26284 2017-06-28  Wilco Dijkstra  <wdijkstr@arm.com>
26285
26286         PR target/79665
26287         * config/arm/aarch-common.c (arm_no_early_alu_shift_dep):
26288         Remove redundant if.
26289         (aarch_forward_to_shift_is_not_shifted_reg): Remove.
26290         * config/arm/aarch-common-protos.h
26291         (aarch_forward_to_shift_is_not_shifted_re): Remove.
26292         * config/arm/cortex-a53.md: Use arm_no_early_alu_shift_dep in bypass.
26293
26294 2017-06-28  Michael Meissner  <meissner@linux.vnet.ibm.com>
26295
26296         PR ipa/81238
26297         * multiple_target.c (create_dispatcher_calls): Set the default
26298         clone to be static, not public.
26299
26300 2017-06-28  Richard Biener  <rguenther@suse.de>
26301
26302         * tree-vect-loop.c (vectorizable_reduction): Move special
26303         cond reduction IV var creation ...
26304         (vect_create_epilog_for_reduction): ... here.  Remove induction_index
26305         parameter.  Use STMT_VINFO_VECTYPE.
26306         * tree-vect-slp.c (vect_get_constant_vectors): Properly reset
26307         constant_p.
26308
26309 2017-06-28  Martin Liska  <mliska@suse.cz>
26310
26311         PR ipa/81128
26312         * ipa-visibility.c (non_local_p): Handle visibility.
26313
26314 2017-06-28  Martin Liska  <mliska@suse.cz>
26315
26316         PR driver/79659
26317         * common.opt: Add IntegerRange to various options.
26318         * opt-functions.awk (integer_range_info): New function.
26319         * optc-gen.awk: Add integer_range_info to cl_options struct.
26320         * opts-common.c (decode_cmdline_option): Handle
26321         CL_ERR_INT_RANGE_ARG.
26322         (cmdline_handle_error): Likewise.
26323         * opts.c (print_filtered_help): Show valid interval in
26324         when --help is provided.
26325         * opts.h (struct cl_option): Add range_min and range_max fields.
26326         * config/i386/i386.opt: Add IntegerRange for -mbranch-cost.
26327
26328 2017-06-28  Marc Glisse  <marc.glisse@inria.fr>
26329
26330         * match.pd ((X & ~Y) | (~X & Y)): Generalize to + and ^.
26331         (x * C EQ/NE y * C): New transformation.
26332
26333 2017-06-28  Christophe Lyon  <christophe.lyon@linaro.org>
26334
26335         * genmultilib (combination_space): Accept '+' in option names.
26336
26337 2017-06-28  Martin Liska  <mliska@suse.cz>
26338
26339         PR sanitizer/81224
26340         * asan.c (instrument_derefs): Bail out inner references
26341         that are hard register variables.
26342
26343 2017-06-28  Jakub Jelinek  <jakub@redhat.com>
26344
26345         PR target/81175
26346         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Use def_builtin
26347         rather than def_builtin_pure for __builtin_ia32_gatherpf*.
26348
26349 2017-06-28  Richard Biener  <rguenther@suse.de>
26350
26351         * tree-vectorizer.h (vect_get_vec_defs): Remove.
26352         (vect_get_slp_defs): Adjust.
26353         * tree-vect-loop.c (get_initial_defs_for_reduction): Split
26354         out from ...
26355         * tree-vect-slp.c (vect_get_constant_vectors): ... here and
26356         simplify.
26357         * tree-vect-loop.c (vect_create_epilog_for_reduction): Use
26358         get_initial_defs_for_reduction instead of vect_get_vec_defs.
26359         (vectorizable_reduction): Adjust.
26360         * tree-vect-slp.c (vect_get_constant_vectors): Remove reduction
26361         handling.
26362         (vect_get_slp_defs): Likewise.
26363         * tree-vect-stmts.c (vect_get_vec_defs): Make static and adjust.
26364         (vectorizable_bswap): Adjust.
26365         (vectorizable_call): Likewise.
26366         (vectorizable_conversion): Likewise.
26367         (vectorizable_assignment): Likewise.
26368         (vectorizable_shift): Likewise.
26369         (vectorizable_operation): Likewise.
26370         (vectorizable_store): Likewise.
26371         (vectorizable_condition): Likewise.
26372         (vectorizable_comparison): Likewise.
26373
26374 2017-06-28  Michael Collison  <michael.collison@arm.com>
26375
26376         PR target/68535
26377         * config/arm/arm.c (gen_ldm_seq): Remove last unnecessary
26378         set of base_reg
26379         (arm_gen_movmemqi): Removed unused variable 'i'.
26380         Convert 'for' loop into 'while' loop.
26381         (arm_expand_prologue): Remove last unnecessary set of insn.
26382         (thumb_pop): Remove unused variable 'pushed_words'.
26383         (thumb_exit): Remove last unnecessary set of regs_to_pop.
26384
26385 2017-06-28  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
26386
26387         * config/s390/predicates.md: Use s390_rel_address_ok_p.
26388         * config/s390/s390-protos.h: Add prototype of
26389         s390_rel_address_ok_p.
26390         * config/s390/s390.c (s390_got_symbol): New function.
26391         (s390_rel_address_ok_p): New function.
26392         (legitimize_pic_address): Use s390_rel_address_ok_p.
26393         (s390_load_got): Use s390_got_symbol.
26394         (s390_option_override): Issue error if
26395         -mno-pic-data-is-text-relative is used without -fpic/-fPIC.
26396         * config/s390/s390.h (TARGET_DEFAULT_PIC_DATA_IS_TEXT_RELATIVE):
26397         New macro.
26398         * config/s390/s390.opt: New option mpic-data-is-text-relative.
26399
26400 2017-06-27  Andrew Pinski  <apinski@cavium.com>
26401
26402         * match.pd (X >/>=/</<= 0 ? 1.0 : -1.0): New patterns.
26403         (X * copysign (1.0, X)): New pattern.
26404         (X * copysign (1.0, -X)): New pattern.
26405         (copysign (-1.0, CST)): New pattern.
26406
26407 2017-06-27  Joseph Myers  <joseph@codesourcery.com>
26408
26409         * genmultilib (combination_space): Remove variable.
26410         Validate reuse rules against regular expression for any sequence
26411         of multilib options in any order.
26412
26413 2017-06-27  Michael Collison  <michael.collison@arm.com>
26414
26415         * config/aarch64/aarch64-simd.md (aarch64_combine<mode>): Directly
26416         call aarch64_split_simd_combine.
26417         * (aarch64_combine_internal<mode>): Delete pattern.
26418         * config/aarch64/aarch64.c (aarch64_split_simd_combine):
26419         Allow register and subreg operands.
26420
26421 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
26422
26423         * config/i386/vxworks.h (ASM_SPEC): Remove definition. No target
26424         specific need, just fallback on defaults.
26425         (ASM_OUTPUT_ALIGNED_BSS): Add #undef before #define.
26426
26427 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
26428             Olivier Hainque  <hainque@adacore.com>
26429
26430         * config/i386/vxworks.h (DBX_REGISTER_NUMBER): Pick distinct
26431         map for 64bits.
26432         (TARGET_OS_CPP_BUILTINS): builtin_define CPU to X86_64 for 64bit
26433         targets. Pick a default if no particular attempt applied.
26434         (STACK_CHECK_PROTECT): Double for 64bit targets, which have
26435         larger contexts.
26436
26437 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
26438
26439         * config.gcc (i*86-wrs-vxworks7): Handle new acceptable triplet.
26440         (x86_64-wrs-vxworks7): Likewise.
26441
26442 2017-06-27  Marek Polacek  <polacek@redhat.com>
26443
26444         PR sanitizer/81223
26445         * ubsan.c (instrument_null): Check get_base_address's result for null.
26446
26447 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
26448
26449         * match.pd ((A+-B)+(C-A), (A+B)-(A-C)): New transformations.
26450
26451 2017-06-27  Marc Glisse  <marc.glisse@inria.fr>
26452
26453         * builtin-types.def (BT_FENV_T_PTR, BT_CONST_FENV_T_PTR,
26454         BT_FEXCEPT_T_PTR, BT_CONST_FEXCEPT_T_PTR): New primitive types.
26455         (BT_FN_INT_FENV_T_PTR, BT_FN_INT_CONST_FENV_T_PTR,
26456         BT_FN_INT_FEXCEPT_T_PTR_INT, BT_FN_INT_CONST_FEXCEPT_T_PTR_INT):
26457         New function types.
26458         * builtins.def (BUILT_IN_FECLEAREXCEPT, BUILT_IN_FEGETENV,
26459         BUILT_IN_FEGETEXCEPTFLAG, BUILT_IN_FEGETROUND,
26460         BUILT_IN_FEHOLDEXCEPT, BUILT_IN_FERAISEEXCEPT,
26461         BUILT_IN_FESETENV, BUILT_IN_FESETEXCEPTFLAG,
26462         BUILT_IN_FESETROUND, BUILT_IN_FETESTEXCEPT,
26463         BUILT_IN_FEUPDATEENV): New builtins.
26464         * tree-core.h (TI_FENV_T_PTR_TYPE, TI_CONST_FENV_T_PTR_TYPE,
26465         TI_FEXCEPT_T_PTR_TYPE, TI_CONST_FEXCEPT_T_PTR_TYPE): New entries.
26466         * tree.h (fenv_t_ptr_type_node, const_fenv_t_ptr_type_node,
26467         fexcept_t_ptr_type_node, const_fexcept_t_ptr_type_node): New
26468         macros.
26469         (builtin_structptr_types): Adjust size.
26470         * tree.c (builtin_structptr_types): Add four entries.
26471
26472 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
26473             Olivier Hainque  <hainque@adacore.com>
26474
26475         * config/vxworks.h (VXWORKS_LIB_SPEC): Incorporate ...
26476         (TLS_SYM): New local macro, forcing reference to __tls__ on
26477         link command lines for VxWorks 7 RTPs, triggering initialization
26478         of tlsLib.
26479         (VXWORKS_HAVE_TLS): New macro. State whether the target VxWorks
26480         OS features TLS support, true for RTPs on VxWorks 7.
26481         * config/vxworks.c (vxworks_override_options): Setup emutls
26482         accordingly.
26483
26484 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
26485
26486         * predict.c (test_prediction_value_range): Use -1U instead of -1
26487         to avoid narrowing conversion warning.
26488         * dumpfile.c (dump_options): Wrap all value into dump_flags_t cast
26489         to avoid narrowing conversion warning.
26490         * opt-functions.awk (var_ref): Return (unsigned short) -1 instead of
26491         -1.
26492         * optc-gen.awk (END): Expect (unsigned short) -1 instead of -1.
26493
26494 2017-06-27  Jerome Lambourg  <lambourg@adacore.com>
26495
26496         * config/vxworks.h (VXWORKS_LIBS_RTP): Alternative definition for
26497         64bit configurations.
26498         (PTR_DIFF_TYPE): Alternative definition for TARGET_LP64.
26499         (SIZE_TYPE): Likewise.
26500         * config/vxworks.c (vxworks_emutls_var_fields): Use
26501         long_unsigned_type_node instead of unsigned_type_node as the offset
26502         field type, which is "pointer" mode in emutls.c.
26503
26504 2017-06-27  Jakub Jelinek  <jakub@redhat.com>
26505
26506         PR sanitizer/81209
26507         * ubsan.c (ubsan_encode_value): Initialize DECL_CONTEXT on var.
26508
26509         PR middle-end/81207
26510         * gimple-fold.c (replace_call_with_call_and_fold): Handle
26511         gimple_vuse copying separately from gimple_vdef copying.
26512
26513 2017-06-27  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
26514
26515         * value-prof.c (free_hist): Remove call to memset and the enclosing if
26516         condition.
26517
26518 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
26519             Olivier Hainque  <hainque@adacore.com>
26520
26521         * config.gcc (*-*-vxworks*): Add TARGET_VXWORKS7=1 to tm_defines
26522         for all vxworks7 targets.
26523         * config/vxworks.h (TARGET_VXWORKS7): If not defined, define to 0.
26524         (VXWORKS_ADDITIONAL_CPP_SPEC): Alternative definition for VXWORKS7.
26525         (VXWORKS_LIBS_RTP, VXWORKS_LIBS_RTP_DIR): New macros, allowing
26526         variations for VX6/VX7 and 32/64bits later on in ...
26527         (VXWORKS_LIB_SPEC): Leverage new macros.
26528         (VXWORKS_OS_CPP_BUILTINS): Define _VSB_CONFIG_FILE for VXWORKS7,
26529         as well as _ALLOW_KEYWORD_MACROS when "inline" is not a keyword.
26530
26531 2017-06-26  Jerome Lambourg  <lambourg@adacore.com>
26532
26533         * config/vxworks.h (VXWORKS_OS_CPP_BUILTINS): builtin_define
26534         _VX_TOOL_FAMILY and _VX_TOOL to gnu.
26535
26536 2017-06-26  Carl Love  <cel@us.ibm.com>
26537
26538         * config/rs6000/rs6000-c.c: Add support for built-in functions
26539         vector bool char vec_reve (vector bool char);
26540         vector signed char vec_reve (vector signed char);
26541         vector unsigned char vec_reve (vector unsigned char);
26542         vector bool int vec_reve (vector bool int);
26543         vector signed int vec_reve (vector signed int);
26544         vector unsigned int vec_reve (vector unsigned int);
26545         vector bool long long vec_reve (vector bool long long);
26546         vector signed long long vec_reve (vector signed long long);
26547         vector unsigned long long vec_reve (vector unsigned long long);
26548         vector bool short vec_reve (vector bool short);
26549         vector signed short vec_reve (vector signed short);
26550         vector double vec_reve (vector double);
26551         vector float vec_reve (vector float);
26552         * config/rs6000/rs6000-builtin.def (VREVE_V2DI, VREVE_V4SI,
26553         VREVE_V8HI, VREVE_V16QI, VREVE_V2DF, VREVE_V4SF, VREVE): New builtin.
26554         * config/rs6000/altivec.md (UNSPEC_VREVEV): New UNSPEC.
26555         (altivec_vreve): New pattern.
26556         * config/rs6000/altivec.h (vec_reve): New define.
26557         * doc/extend.texi (vec_rev): Update the built-in documentation file
26558         for the new built-in functions.
26559
26560 2016-06-26  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
26561
26562         PR tree-optimization/71815
26563         * gimple-ssa-strength-reduction.c (uses_consumed_by_stmt): New
26564         function.
26565         (find_basis_for_candidate): Call uses_consumed_by_stmt rather than
26566         has_single_use.
26567         (slsr_process_phi): Likewise.
26568         (replace_uncond_cands_and_profitable_phis): Don't replace a
26569         multiply candidate with a stride of 1 (copy or cast).
26570         (phi_incr_cost): Call uses_consumed_by_stmt rather than
26571         has_single_use.
26572         (lowest_cost_path): Likewise.
26573         (total_savings): Likewise.
26574
26575 2017-06-26  Richard Biener  <rguenther@suse.de>
26576
26577         PR target/81175
26578         * config/i386/i386.c (ix86_init_mmx_sse_builtins):
26579         Use def_builtin_pure for all gather builtins.
26580
26581 2017-06-26  Richard Biener  <rguenther@suse.de>
26582
26583         PR tree-optimization/81203
26584         * tree-tailcall.c (find_tail_calls): Do not move stmts into
26585         non-dominating BBs.
26586
26587 2017-06-26  Marek Polacek  <polacek@redhat.com>
26588
26589         PR c/80116
26590         * doc/invoke.texi: Document -Wmultistatement-macros.
26591
26592 2017-06-26  Christophe Lyon  <christophe.lyon@linaro.org>
26593
26594         * doc/sourcebuild.texi (ARM-specific attributes): Document new
26595         arm_neon_ok_no_float_abi effective target.
26596
26597 2017-06-26  Richard Biener  <rguenther@suse.de>
26598
26599         PR tree-optimization/80928
26600         * cfghooks.c (duplicate_block): Do not copy BB_DUPLICATED flag.
26601         (copy_bbs): Set BB_DUPLICATED flag early.
26602         (execute_on_growing_pred): Do not execute for BB_DUPLICATED
26603         marked blocks.
26604         (execute_on_shrinking_pred): Likewise.
26605         * tree-ssa.c (ssa_redirect_edge): Do not look for PHI args in
26606         BB_DUPLICATED blocks.
26607         * tree-ssa-phionlycoprop.c (eliminate_degenerate_phis_1): Properly
26608         iterate over all PHIs considering removal of *gsi.
26609
26610 2017-06-23  Jim Wilson  <jim.wilson@linaro.org>
26611
26612         * doc/invoke.texi (AArch64 Options, -mtune): Re-add falkor and
26613         qdf24xx.
26614
26615 2017-06-23  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
26616
26617         * config/rs6000/rs6000-string.c: (expand_block_clear,
26618         do_load_for_compare, select_block_compare_mode,
26619         compute_current_alignment, expand_block_compare,
26620         expand_strncmp_align_check, expand_strn_compare,
26621         expand_block_move, rs6000_output_load_multiple)
26622         Move functions related to string/block move/compare
26623         to a separate file.
26624         * config/rs6000/rs6000.c: Move above functions to rs6000-string.c.
26625         * config/rs6000/rs6000-protos.h (rs6000_emit_dot_insn): Add prototype
26626         for this function which is now used in two files.
26627         * config/rs6000/t-rs6000: Add rule to compile rs6000-string.o.
26628         * config.gcc: Add rs6000-string.o to extra_objs for
26629         targets powerpc*-*-* and rs6000*-*-*.
26630
26631 2017-06-23  Michael Meissner  <meissner@linux.vnet.ibm.com>
26632
26633         PR target/80510
26634         * config/rs6000/rs6000.md (ALTIVEC_DFORM): Do not allow DImode in
26635         32-bit, since indexed is not valid for DImode.
26636         (mov<mode>_hardfloat32): Reorder ISA 2.07 load/stores before ISA
26637         3.0 d-form load/stores to be the same as mov<mode>_hardfloat64.
26638         (define_peephole2 for Altivec d-form load): Add 32-bit support.
26639         (define_peephole2 for Altivec d-form store): Likewise.
26640
26641         PR ipa/81185
26642         * multiple_target.c (create_dispatcher_calls): Only create the
26643         dispatcher call if the function is the default clone of a
26644         versioned function.
26645
26646 2017-06-23  Segher Boessenkool  <segher@kernel.crashing.org>
26647
26648         PR middle-end/80902
26649         * builtins.c (expand_builtin_atomic_fetch_op): If emitting code after
26650         a call, force the call to not be a tail call.
26651
26652 2017-06-23  Jeff Law  <law@redhat.com>
26653
26654         * doc/contrib.texi: Add entry for Steven Pemberton's work on
26655         enquire.
26656
26657 2017-06-23  Will Schmidt  <will_schmidt@vnet.ibm.com>
26658
26659         * config/rs6000/rs6000.c: Add include of ssa-propagate.h for
26660         update_call_from_tree().  (rs6000_gimple_fold_builtin): Add
26661         handling for early expansion of vector shifts (sl,sr,sra,rl).
26662         (builtin_function_type): Add vector shift right instructions
26663         to the unsigned argument list.
26664
26665 2017-06-23  Bernd Edlinger  <bernd.edlinger@hotmail.de>
26666
26667         rtl-optimizatoin/79286
26668         * ira.c (update_equiv_regs): Revert to using may_trap_or_fault_p again.
26669         * rtlanal.c (rtx_addr_can_trap_p_1): SYMBOL_REF_FUNCTION_P can never
26670         trap.  PIC register plus a const unspec without offset can never trap.
26671
26672 2017-06-23  Marc Glisse  <marc.glisse@inria.fr>
26673
26674         * tree.h (builtin_structptr_type): New type.
26675         (builtin_structptr_types): Declare new array.
26676         * tree.c (builtin_structptr_types): New array.
26677         (free_lang_data, build_common_tree_nodes): Use it.
26678
26679 2017-06-23  Jonathan Wakely  <jwakely@redhat.com>
26680
26681         PR c++/81187
26682         * doc/invoke.texi (-Wnoexcept-type): Fix name of option, from
26683         -Wnoexcept.
26684
26685 2017-06-22  Matt Turner  <mattst88@gmail.com>
26686
26687         * config/i386/driver-i386.c (host_detect_local_cpu): Add Kaby
26688         Lake models to skylake case.  Assume skylake for unknown
26689         models with clflushopt.
26690
26691 2017-06-22  Jeff Law  <law@redhat.com>
26692
26693         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Handle
26694         frame sizes that do not satisfy aarch64_uimm12_shift.
26695
26696 2017-06-22  Jan Hubicka <hubicka@ucw.cz>
26697
26698         * profile-count.h (apply_probability,
26699         apply_scale, probability_in): Fix checks for zero.
26700
26701 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26702
26703         * incpath.c (add_sysroot_to_chain): Allow for $SYSROOT prefix.
26704         * doc/cppdiropts.texi (-I @var{dir}): Document it.
26705
26706 2016-06-22  Richard Biener  <rguenther@suse.de>
26707
26708         * tree-vect-loop.c (vect_model_reduction_cost): Handle
26709         COND_REDUCTION and INTEGER_INDUC_COND_REDUCTION without
26710         REDUC_MAX_EXPR support.
26711         (vectorizable_reduction): Likewise.
26712         (vect_create_epilog_for_reduction): Likewise.
26713
26714 2017-06-22  James Greenhalgh  <james.greenhalgh@arm.com>
26715
26716         * match.pd (A / (1 << B) -> A >> B): New.
26717         * generic-match-head.c: Include optabs-tree.h.
26718         * gimple-match-head.c: Likewise.
26719         * optabs-tree.h (target_supports_op_p): New.
26720         * optabs-tree.c (target_supports_op_p): New.
26721
26722 2017-06-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
26723
26724         * configure.ac (gcc_cv_ld_static_dynamic): Also check stderr for
26725         $gcc_cv_ld --help output.
26726         (gcc_cv_ld_demangle): Likewise.
26727         (gcc_cv_ld_eh_frame_hdr): Likewise.
26728         (gcc_cv_ld_pie): Likewise.
26729         (gcc_cv_ld_as_needed): Likewise.  Prefer native forms unless $gnu_ld.
26730         (gcc_cv_ld_buildid): Likewise.
26731         (gcc_cv_ld_sysroot): Likewise.
26732         (ld_bndplt_support): Likewise.
26733         (ld_pushpopstate_support): Likewise.
26734         * configure: Regenerate.
26735         * config/sol2.h [!USE_GLD] (SYSROOT_SPEC): Define.
26736
26737 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
26738
26739         PR target/81151
26740         * config/i386/sse.md (round<mode>2): Renumber match_dup and
26741         operands indexes to avoid gap between operands and match_dups.
26742
26743 2017-06-21  Andrew Pinski  <apinski@cavium.com>
26744
26745         * config/aarch64/aarch64-cost-tables.h (thunderx_extra_costs):
26746         Increment Arith_shift and Arith_shift_reg by 1.
26747         * config/aarch64/aarch64-tuning-flags.def (cheap_shift_extend):
26748         New tuning flag.
26749         * config/aarch64/aarch64.c (thunderx_tunings): Enable
26750         AARCH64_EXTRA_TUNE_CHEAP_SHIFT_EXTEND.
26751         (aarch64_strip_extend): Add new argument and test for it.
26752         (aarch64_cheap_mult_shift_p): New function.
26753         (aarch64_rtx_mult_cost): Call aarch64_cheap_mult_shift_p and don't
26754         add a cost if it is true.
26755         Update calls to aarch64_strip_extend.
26756         (aarch64_rtx_costs): Update calls to aarch64_strip_extend.
26757
26758 2017-06-21  Andrew Pinski  <apinski@cavium.com>
26759
26760         * config/aarch64/aarch64-cores.def (thunderxt88p1): Use thunderxt88
26761         tunings.
26762         (thunderxt88): Likewise.
26763         * config/aarch64/aarch64.c (thunderxt88_prefetch_tune): New variable.
26764         (thunderx_prefetch_tune): New variable.
26765         (thunderx2t99_prefetch_tune): Update for the correct values.
26766         (thunderxt88_tunings): New variable.
26767         (thunderx_tunings): Use thunderx_prefetch_tune instead of
26768         generic_prefetch_tune.
26769         (thunderx2t99_tunings): Use AUTOPREFETCHER_WEAK.
26770
26771 2017-06-21  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
26772
26773         * config/aarch64/atomics.md (aarch64_compare_and_swap<mode>_lse,
26774         SHORT): Relax operand 3 to aarch64_reg_or_zero and constraint to Z.
26775         (aarch64_compare_and_swap<mode>_lse, GPI): Likewise.
26776         (aarch64_atomic_cas<mode>, SHORT): Likewise for operand 2.
26777         (aarch64_atomic_cas<mode>, GPI): Likewise.
26778
26779 2017-06-21  Martin Liska  <mliska@suse.cz>
26780
26781         * gimplify.c (gimplify_label_expr): Insert GIMPLE_PREDICT
26782         statements on cold and hot labels.
26783         * predict.c (tree_estimate_probability_bb): Remove the
26784         prediction from this place.
26785
26786 2017-06-21  Martin Liska  <mliska@suse.cz>
26787
26788         PR tree-optimization/79489
26789         * gimplify.c (maybe_add_early_return_predict_stmt): New
26790         function.
26791         (gimplify_return_expr): Call the function.
26792         * predict.c (tree_estimate_probability_bb): Remove handling
26793         of early return.
26794         * predict.def: Update comment about early return predictor.
26795         * gimple-predict.h (is_gimple_predict): New function.
26796         * predict.def: Change default value of early return to 66.
26797         * tree-tailcall.c (find_tail_calls): Skip GIMPLE_PREDICT
26798         statements.
26799         * passes.def: Put pass_strip_predict_hints to the beginning of
26800         IPA passes.
26801
26802 2017-06-21  Pierre-Marie de Rodat  <derodat@adacore.com>
26803
26804         * dwarf2out.c (gen_decl_die): Remove the guard to skip file-scope
26805         FUNCTION_DECL declarations.
26806         (dwarf2out_early_global_decl): Remove the guard to skip FUNCTION_DECL
26807         declarations.
26808         (dwaf2out_decl): Likewise.
26809         * godump.c (go_early_global_decl): Skip call to the real debug hook
26810         for FUNCTION_DECL declarations.
26811         * passes.c (rest_of_decl_compilation): Skip call to the
26812         early_global_decl debug hook for FUNCTION_DECL declarations, unless
26813         -fdump-go-spec is passed.
26814
26815 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
26816
26817         * config/i386/i386.c (struct builtin_isa): New field pure_p.
26818         Reorder for compactness.
26819         (def_builtin, def_builtin2, ix86_add_new_builtins): Handle pure_p.
26820         (def_builtin_pure, def_builtin_pure2): New functions.
26821         (ix86_init_mmx_sse_builtins) [__builtin_ia32_stmxcsr]: Mark as pure.
26822
26823 2017-06-21  Marc Glisse  <marc.glisse@inria.fr>
26824
26825         * match.pd (nop_convert): New predicate.
26826         ((A +- CST1) +- CST2): Allow some NOP conversions.
26827
26828 2017-06-21  Jakub Jelinek  <jakub@redhat.com>
26829
26830         PR c++/81130
26831         * gimplify.c (omp_add_variable): Don't force GOVD_SEEN for types
26832         with ctors/dtors if GOVD_SHARED is set.
26833
26834 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
26835
26836         * config/aarch64/aarch64.md (movti_aarch64):
26837         Emit mov rather than orr.
26838         (movtf_aarch64): Likewise.
26839         * config/aarch64/aarch64-simd.md (aarch64_simd_mov):
26840         Emit mov rather than orr.
26841
26842 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
26843
26844         * config/aarch64/aarch64-simd.md (aarch64_simd_dup):
26845         Swap alternatives, make integer dup more expensive.
26846
26847 2017-06-21  Wilco Dijkstra  <wdijkstr@arm.com>
26848
26849         * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
26850         Return true for non-tls symbols.
26851
26852 2017-06-21  James Greenhalgh  <james.greenhalgh@arm.com>
26853
26854         * config/aarch64/aarch64-cores.def (cortex-a55): New.
26855         (cortex-a75): Likewise.
26856         (cortex-a75.cortex-a55): Likewise.
26857         * config/aarch64/aarch64-tune.md: Regenerate.
26858         * doc/invoke.texi (-mtune): Document new values for -mtune.
26859
26860 2017-06-21  Tom de Vries  <tom@codesourcery.com>
26861
26862         * doc/sourcebuild.texi (Add Options, Features for dg-add-options): Add
26863         stack_size feature.
26864         (Effective-Target Keywords, Other attributes): Suggest using
26865         dg-add-options stack_size feature to get stack limit in stack_size
26866         effective target documentation.
26867
26868 2017-06-21  Julian Brown  <julian@codesourcery.com>
26869             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
26870
26871         * config/aarch64/aarch64-simd.md (aarch64_crypto_pmulldi)
26872         (aarch64_crypto_pmullv2di): Change type attribute to crypto_pmull.
26873         * config/aarch64/thunderx2t99.md (thunderx2t99_pmull): New
26874         reservation.
26875         * config/arm/cortex-a53.md (cortex_a53_advsimd_type): Add crypto_pmull to
26876         attribute type list for neon_multiply.
26877         * config/arm/cortex-a57.md (cortex_a57_neon_type): Add crypto_pmull to
26878         attribute type list for neon_multiply.
26879         * config/arm/crypto.md (crypto_vmullp64): Change type to crypto_pmull.
26880         * config/arm/exynos-m1.md (exynos_m1_neon_type): Add crypto_pmull to
26881         attribute type list for neon_multiply.
26882         * config/arm/types.md (crypto_pmull): Add.
26883         * config/arm/xgene1.md (xgene1_neon_pmull): Add crypto_pmull to
26884         attribute type list.
26885
26886 2017-06-20  Andreas Tobler  <andreast@gcc.gnu.org>
26887
26888         * config.gcc (armv6*-*-freebsd*): Change the target_cpu_cname to
26889         arm1176jzf-s.
26890
26891 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
26892
26893         * ira-costs.c (find_costs_and_classes): Initialize cost_classes later
26894         to make sure not to dereference a NULL cost_classes_ptr pointer.
26895
26896 2017-06-20  Carl Love  <cel@us.ibm.com>
26897
26898         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
26899         ALTIVEC_BUILTIN_VMULESW, ALTIVEC_BUILTIN_VMULEUW,
26900         ALTIVEC_BUILTIN_VMULOSW, ALTIVEC_BUILTIN_VMULOUW entries.
26901         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin,
26902         builtin_function_type): Add ALTIVEC_BUILTIN_* case statements.
26903         * config/rs6000/altivec.md (MVULEUW, VMULESW, VMULOUW,
26904         VMULOSW): New enum "unspec" values.
26905         (vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
26906         vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si,
26907         altivec_vmuleuw, altivec_vmulesw, altivec_vmulouw,
26908         altivec_vmulosw): New patterns.
26909         * config/rs6000/rs6000-builtin.def (VMLEUW, VMULESW, VMULOUW,
26910         VMULOSW): Add definitions.
26911
26912 2017-06-20  Julia Koval  <julia.koval@intel.com>
26913
26914         * config/i386/i386.c: Fix rounding expand for new pattern.
26915         * config/i386/subst.md: Fix pattern (parallel -> unspec).
26916
26917 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
26918
26919         * config/aarch64/aarch64-option-extensions.def (rcpc): New.
26920         * config/aarch64/aarch64.h (AARCH64_FL_RCPC): New.
26921
26922 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
26923
26924         * config/aarch64/aarch64-option-extensions.def (fp16): Fix expected
26925         feature string.
26926
26927 2017-06-20  James Greenhalgh  <james.greenhalgh@arm.com>
26928
26929         * config/aarch64/aarch64-cores.def: Rearrange to sort by
26930         architecture, then by implementer ID.
26931         * config/aarch64/aarch64-tune.md: Regenerate.
26932
26933 2017-06-20  Richard Biener  <rguenther@suse.de>
26934
26935         PR middle-end/81097
26936         * fold-const.c (split_tree): Fold to type before negating.
26937
26938 2017-06-20  David Malcolm  <dmalcolm@redhat.com>
26939
26940         * diagnostic-show-locus.c
26941         (selftest::test_fixit_deletion_affecting_newline): New function.
26942         (selftest::diagnostic_show_locus_c_tests): Call it.
26943
26944 2017-06-20  Andreas Schwab  <schwab@suse.de>
26945
26946         PR target/80970
26947         * config/m68k/m68k.md (bsetdreg, bchgdreg, bclrdreg): Use "=d"
26948         instead of "+d".
26949
26950 2017-06-20  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
26951
26952         * config/arm/arm-c.c (arm_cpu_builtins): New block to define
26953         __ARM_FEATURE_COPROC according to support.
26954
26955 2017-06-20  Jakub Jelinek  <jakub@redhat.com>
26956
26957         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
26958         Rewritten to avoid overflow for > 32-bit pointers.
26959
26960         PR sanitizer/81125
26961         * ubsan.h (ubsan_encode_value): Workaround buggy clang++ parser
26962         by removing enum keyword.
26963         (ubsan_type_descriptor): Likewise.  Formatting fix.
26964
26965         PR target/81121
26966         * config/i386/i386.md (TARGET_USE_VECTOR_CONVERTS float si->{sf,df}
26967         splitter): Require TARGET_SSE2 in the condition.
26968
26969 2017-06-20  Michael Meissner  <meissner@linux.vnet.ibm.com>
26970
26971         PR target/79799
26972         * config/rs6000/rs6000.c (rs6000_expand_vector_init): Add support
26973         for doing vector set of SFmode on ISA 3.0.
26974         * config/rs6000/vsx.md (vsx_set_v4sf_p9): Likewise.
26975         (vsx_set_v4sf_p9_zero): Special case setting 0.0f to a V4SF
26976         element.
26977         (vsx_insert_extract_v4sf_p9): Add an optimization for inserting a
26978         SFmode value into a V4SF variable that was extracted from another
26979         V4SF variable without converting the element to double precision
26980         and back to single precision vector format.
26981         (vsx_insert_extract_v4sf_p9_2): Likewise.
26982
26983 2017-06-19  Jakub Jelinek  <jakub@redhat.com>
26984
26985         * tree-ssa-structalias.c (get_constraint_for_ptr_offset): Multiply
26986         in UWHI to avoid undefined overflow.
26987
26988         PR sanitizer/81125
26989         * ubsan.h (enum ubsan_encode_value_phase): New.
26990         (ubsan_encode_value): Change second argument to
26991         enum ubsan_encode_value_phase with default value of
26992         UBSAN_ENCODE_VALUE_GENERIC.
26993         * ubsan.c (ubsan_encode_value): Change second argument to
26994         enum ubsan_encode_value_phase PHASE from bool IN_EXPAND_P,
26995         adjust uses, for UBSAN_ENCODE_VALUE_GENERIC use just
26996         create_tmp_var_raw instead of create_tmp_var and use a
26997         TARGET_EXPR.
26998         (ubsan_expand_bounds_ifn, ubsan_build_overflow_builtin,
26999         instrument_bool_enum_load, ubsan_instrument_float_cast): Adjust
27000         ubsan_encode_value callers.
27001
27002         PR sanitizer/81111
27003         * ubsan.c (ubsan_encode_value): If current_function_decl is NULL,
27004         use create_tmp_var_raw instead of create_tmp_var, mark it addressable
27005         just by setting TREE_ADDRESSABLE on the result and use a TARGET_EXPR.
27006
27007 2017-06-19  Richard Biener  <rguenther@suse.de>
27008
27009         PR middle-end/81118
27010         * tree-cfgcleanup.c (cleanup_tree_cfg_noloop): Clear niter
27011         estimates if we changed anything.
27012
27013 2017-06-19  Richard Biener  <rguenther@suse.de>
27014
27015         PR tree-optimization/80887
27016         * tree-ssa-sccvn.c (mprts_hook_cnt): New global.
27017         (vn_lookup_simplify_result): Allow only mprts_hook_cnt succesful
27018         simplified lookups, then reset mprts_hook.
27019         (vn_nary_build_or_lookup_1): Set mprts_hook_cnt to 9 before
27020         simplifying.
27021         (try_to_simplify): Likewise.
27022
27023 2017-06-19  Martin Liska  <mliska@suse.cz>
27024
27025         PR sanitizer/80879
27026         * gimplify.c (gimplify_switch_expr):
27027         Initialize live_switch_vars for SWITCH_BODY == STATEMENT_LIST.
27028
27029 2017-06-19  Martin Liska  <mliska@suse.cz>
27030
27031         * doc/install.texi: Document that PGO runs in 4 stages.
27032
27033 2017-06-19  Martin Liska  <mliska@suse.cz>
27034
27035         PR ipa/80732
27036         * attribs.c (make_dispatcher_decl): Do not append '.ifunc'
27037         to dispatcher function name.
27038         * multiple_target.c (replace_function_decl): New function.
27039         (create_dispatcher_calls): Redirect both edges and references.
27040
27041 2017-06-19  Jan Hubicka <hubicka@ucw.cz>
27042
27043         * profile-count.c (profile_count::dump): Dump quality.
27044         (profile_count::differs_from_p): Update for unsigned val.
27045         * profile-count.h (profile_count_quality): New enum.
27046         (profile_count): Turn m_val to 62bit unsigned, add quality tracking.
27047
27048 2017-06-19  Richard Biener  <rguenther@suse.de>
27049
27050         * tree-ssa-loop-niter.h (estimate_numbers_of_iterations): Take
27051         struct function as arg.
27052         (estimate_numbers_of_iterations): Export overload with loop arg.
27053         (free_numbers_of_iterations_estimates_loop): Use an overload of
27054         free_numbers_of_iterations_estimates instead.
27055         * tree-cfg.c (remove_bb): Adjust.
27056         * tree-cfgcleanup.c (remove_forwarder_block_with_phi): Likewise.
27057         * tree-parloops.c (gen_parallel_loop): Likewise.
27058         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables):
27059         Likewise.
27060         (tree_unroll_loops_completely): Likewise.
27061         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop):
27062         Use an overload instead and export.
27063         (estimated_loop_iterations): Adjust.
27064         (max_loop_iterations): Likewise.
27065         (likely_max_loop_iterations): Likewise.
27066         (estimate_numbers_of_iterations): Take struct function as arg
27067         and adjust.
27068         (loop_exits_before_overflow): Adjust.
27069         (free_numbers_of_iterations_estimates_loop): Use an overload.
27070         * tree-vect-loop.c (vect_analyze_loop_form): Adjust.
27071         * tree-vectorizer.c (vect_free_loop_info_assumptions): Likewise.
27072
27073 2017-06-19  Richard Biener  <rguenther@suse.de>
27074
27075         PR ipa/81112
27076         * ipa-prop.c (find_constructor_constant_at_offset): Handle
27077         RANGE_EXPR conservatively.
27078
27079 2017-06-16  Carl Love  <cel@us.ibm.com>
27080
27081         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
27082         definitions for vec_float, vec_float2, vec_floato,
27083         vec_floate built-ins.
27084         * config/rs6000/vsx.md (define_c_enum "unspec"): Add RTL code
27085         for instructions vsx_xvcvsxws vsx_xvcvuxwsp, float2, floato and
27086         floate.
27087         * config/rs6000/rs6000-builtin.def (FLOAT2_V2DI, FLOATE_V2DF,
27088         FLOATE_2DI, FLOATO_V2DF, FLOATEE_V2DI, XVCVSXWSP_V4SF,
27089         UNS_FLOATO_V2DI, UNS_FLOATE_V2DI): Add definitions.
27090         * config/altivec.md (define_insn "p8_vmrgew_<mode>",
27091         define_mode_attr VF_sxddp): Add V4SF type to p8_vmrgew.
27092         * config/rs6000/altivec.h (vec_float, vec_float2, vec_floate,
27093         vec_floato): Add builtin defines.
27094         * doc/extend.texi (vec_float, vec_float2, vec_floate, vec_floato):
27095         Update the built-in documentation file for the new built-in
27096         functions.
27097
27098 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27099
27100         * config/arm/arm.opt (marm): Mark as the negative of of -mthumb.
27101         (mthumb): Mark as the negative of -marm.
27102
27103 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27104
27105         * doc/invoke.texi (ARM Options, -mcpu): Document supported
27106         extension options.
27107         (ARM Options, -mtune): Document that this accepts the same
27108         extension options as -mcpu.
27109         (ARM Options, -mfpu): Document addition of -mfpu=auto.
27110
27111 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27112
27113         * doc/invoke.texi (ARM Options, -march=): Document new syntax and
27114         permitted extensions.
27115
27116 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27117
27118         * config/arm/arm-cpus.in (armv7): Add extension +nofp.
27119         (armv7-r): Add aliases vfpv3xd and vfpv3-d16.
27120         (armv8-m.main): Add option +nodsp.
27121         * config/arm/arm-cpu-cdata.h: Regenerated.
27122
27123 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27124
27125         * config/arm/t-fuchsia: New file.
27126         * config.gcc (arm*-*-fuchsia*): Use it.
27127
27128 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27129
27130         * config/arm/t-symbian: Rewrite for new option infrastructure.
27131
27132 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27133
27134         * config/arm/t-phoenix (MULTILIB_REUSE): Clear variable.
27135         (MULTILIB_REQUIRED): Likewise.
27136
27137 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27138
27139         * config/arm/t-linux-eabi (MULTILIB_EXCEPTIONS): Set to empty.
27140         (MULTILIB_RESUE): Likewise.
27141         (MULTILIB_MATCHES): Likewise.
27142         (MULTLIB_REQUIRED): Likewise.
27143
27144 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27145
27146         * config/arm/t-rtems: Rewrite for new option framework.
27147
27148 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27149
27150         * config/arm/t-aprofile (v7_a_nosimd_variants, v7_a_simd_variants)
27151         (v7ve_nosimd_variatns, v7ve_vfpv3_simd_variants)
27152         (v7ve_vfpv4_simd_variants, v8_a_nosimd_variants, v8_a_simd_variants)
27153         (v8_1_a_simd_variants, v8_2_a_simd_variants): Move to ...
27154         * config/arm/t-multilib: ... here.
27155         (MULTILIB_OPTIONS): Add armv7 and armv7+fp architectures.
27156         (MULTILIB_MATCHES): Use armv7 libraries for armv7-r.  Also use for
27157         armv7-a and armv8*-a when A-profile libraries have not been built.
27158         * config/arm/t-rmprofile: Rewrite.
27159
27160 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27161
27162         * genmultilib (multilib_reuse): Allow an explicit period to be escaped
27163         with a backslash.  Remove the backslash after substituting unescaped
27164         periods.
27165         * doc/fragments.texi (MULTILIB_REUSE): Document it.
27166
27167 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27168
27169         * config.gcc: (arm*-*-*): When building a-profile libraries, force
27170         the driver to pass through the default setting of -mfloat-abi.
27171         * common/config/arm/arm-common.c (arm_target_thumb_only): Return -marm
27172         rather than NULL.
27173         * config/arm/t-multilib (MULTILIB_REUSE): Initialize to empty.
27174         (all_feat_combs): New rule.
27175         (MULTILIB_OPTIONS): Use explicit ARM and Thumb directories.  Rework
27176         default libraries.
27177         * config/arm/t-aprofile: Rewrite.
27178
27179 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27180
27181         * config/arm/arm.h (FPUTYPE_AUTO): Define.
27182         * config/arm/arm.c (arm_option_override): Use FPUTYPE_AUTO if the
27183         fpu is not specified by the user/command-line.
27184         * config/arm/bpabi.h (FPUTYPE_DEFAULT): Delete.
27185         * config/arm/netbsd-elf.h (FPUTYPE_DEFAULT): Delete.
27186         * config/arm/linux-elf.h (FPUTYPE_DEFAULT): Delete.
27187         * config/arm/vxworks.h (FPUTYPE_DEFAULT): Delete.
27188         * common/config/arm/arm-common.c (arm_canon_arch_option): Use
27189         FPUTYPE_AUTO insted of FPUTYPE_DEFAULT.
27190
27191 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27192
27193         * config/arm/elf.h (MULTILIB_DEFAULTS): Delete.
27194         * config/arm/t-arm-elf: Rewritten.
27195
27196 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27197
27198         * config/arm/arm.h (TARGET_HARD_FLOAT): Also check that we
27199         have some floating-point instructions.
27200         (TARGET_SOFT_FLOAT): Define as inverse of TARGET_HARD_FLOAT.
27201         (TARGET_MAYBE_HARD_FLOAT): New macro.
27202         * config/arm/arm-builtins.c (arm_init_builtins): Use
27203         TARGET_MAYBE_HARD_FLOAT.
27204         * config/arm/arm.c (arm_option_override): Use TARGET_HARD_FLOAT_ABI.
27205
27206 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27207
27208         * common/config/arm/arm-common.c: Define INCLUDE_LIST.
27209         (configargs.h): Include it.
27210         (arm_print_hint_for_fpu_option): New function.
27211         (arm_parse_fpu_option): New function.
27212         (candidate_extension): New class.
27213         (arm_canon_for_multilib): New function.
27214         * config/arm/arm.h (CANON_ARCH_SPEC_FUNCTION): New macro.
27215         (EXTRA_SPEC_FUNCTIONS): Add CANON_ARCH_SPEC_FUNCTION.
27216         (ARCH_CANONICAL_SPECS): New macro.
27217         (DRIVER_SELF_SPECS): Add ARCH_CANONICAL_SPECS.
27218
27219 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27220
27221         * config.gcc (arm*-*-*): Ensure both target_cpu_cname and with_cpu
27222         are set after handling multilib fragments.  Set target_cpu_default2
27223         from with_cpu.
27224
27225 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27226
27227         * config.gcc (arm*-*-fucshia*): Set target_cpu_cname to the real
27228         cpu name.
27229         (arm*-*-*): Set target_cpu_default2 to a quoted string.
27230         * config/arm/parsecpu.awk (check_cpu): Validate any extension
27231         options.
27232         (check_arch): Likewise.
27233         * config/arm/arm.c (arm_configure_build_target): Handle
27234         TARGET_CPU_DEFAULT being a string constant.  Scan any feature
27235         options in the default.
27236
27237 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27238
27239         * config/arm/arm-protos.h (cpu_arch_extension): Add field to record
27240         when an option is an alias of another.
27241         * config/arm/parsecpu.awk (optalias): New parser token.
27242         (gen_comm_data): Mark non-alias options as such.  Emit entries
27243         for extension aliases.
27244         * config/arm/arm-cpus.in (armv5e): Make vfpv2 an alias.
27245         (armv5te, armv5tej, armv6, armv6j, armv6k, armv6z): Likewise.
27246         (armv6kz, armv6zk, armv6t2): Likewise.
27247         (armv7): Make vfpv3-d16 an alias.
27248         (armv7-a): Make vfpv3-d16, neon and neon-vfpv3 aliases.  Sort in
27249         canonical order.
27250         (armv7ve): Make vfpv4-d16, neon-vfpv3 and neon-vfpv4 aliases.
27251         Sort in canonical order.
27252         (armv8-a): Sort in canonical order.
27253         (armv8.1-a, armv8.2-a):  Likewise.
27254         (generic-armv7-a): Make neon and neon-vfpv3 aliases.  Sort in
27255         canonical order.
27256         (cortex-a9): Sort in canonical order.
27257         * config/arm/arm.c (selftests.h): Include it.
27258         (arm_test_cpu_arch_data): New function.
27259         (arm_run_self_tests): New function.
27260         (TARGET_RUN_TARGET_SELFTESTS): Redefine.
27261         (targetm): Move declaration to the end of the file.
27262         * arm-cpu-cdata.h: Regenerated.
27263
27264 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27265
27266         * config/arm/arm.h (TARGET_MODE_SPECS): Add additional parameter to
27267         call to target_mode_check describing the type of option passed.
27268         * common/config/arm/arm-common.c (arm_arch_core_flag): Delete.
27269         (arm_target_thumb_only): Use arm_parse_arch_option_name or
27270         arm_parse_cpu_option_name to match parameters against list of
27271         available targets.
27272         * config/arm/parsecpu.awk (gen_comm_data): Don't generate
27273         arm_arch_core_flags data structure.
27274         * config/arm/arm-cpu_cdata.h: Regenerated.
27275
27276 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27277
27278         * common/config/arm/arm-common.c (arm_initialize_isa): Moved here from
27279         config/arm/arm.c.
27280         (arm_print_hint_for_cpu_option): Likewise.
27281         (arm_print_hint_for_arch_option): Likewise.
27282         (arm_parse_cpu_option_name): Likewise.
27283         (arm_parse_arch_option_name): Likewise.
27284         * config/arm/arm.c (arm_identify_fpu_from_isa): Use the computed number
27285         of entries in the all_fpus list.
27286         * config/arm/arm-protos.h (all_architectures, all_cores): Declare.
27287         (arm_parse_cpu_option_name): Declare.
27288         (arm_parse_arch_option_name): Declare.
27289         (arm_parse_option_features): Declare.
27290         (arm_intialize_isa): Declare.
27291         * config/arm/parsecpu.awk (gen_data): Move CPU and architecture
27292         data tables to ...
27293         (gen_comm_data): ... here.  Make definitions non-static.
27294         * config/arm/arm-cpu-data.h: Regenerated.
27295         * config/arm/arm-cpu-cdata.h: Regenerated.
27296
27297 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27298
27299         * config/arm/arm-protos.h (arm_build_target): Remove arch_core.
27300         (cpu_arch_extension): New structure.
27301         (cpu_arch_option, arch_option, cpu_option): New structures.
27302         * config/arm/parsecpu.awk (gen_headers): Build an enumeration of
27303         architecture types.
27304         (gen_data): Generate new format data tables.
27305         * config/arm/arm.c (cpu_tune): New structure.
27306         (cpu_option, processors): Delete.
27307         (arm_print_hint_for_core_or_arch): Delete.  Replace with ...
27308         (arm_print_hint_for_cpu_option): ... this and ...
27309         (arm_print_hint_for_arch_option): ... this.
27310         (arm_parse_arch_cpu_name): Delete.  Replace with ...
27311         (arm_parse_cpu_option_name): ... this and ...
27312         (arm_parse_arch_option_name): ... this.
27313         (arm_unrecognized_feature): Change type of target parameter to
27314         cpu_arch_option.
27315         (arm_parse_arch_cpu_features): Delete.  Replace with ...
27316         (arm_parse_option_features): ... this.
27317         (arm_configure_build_target): Rework to use new configuration data
27318         tables.
27319         (arm_print_tune_info): Rework for new configuration data tables.
27320         * config/arm/arm-cpu-data.h: Regenerated.
27321         * config/arm/arm-cpu.h: Regenerated.
27322
27323 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27324
27325         * Makefile.in (OBJS): Move sbitmap.o from here ...
27326         (OBJS-libcommon): ... to here.
27327
27328 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27329
27330         * config/arm/arm-isa.h (ISA_ALL_FPU_INTERNAL): Renamed from ISA_ALL_FPU.
27331         (ISA_ALL_CRYPTO): New macro.
27332         (ISA_ALL_SIMD): New macro
27333         (ISA_ALL_FP): New macro.
27334         * config/arm/arm.c (fpu_bitlist): Update initializer.
27335         * config/arm/arm-cpus.in: Use new ISA_ALL macros to disable crypto,
27336         simd or fp.
27337         (arm9e): Add fpu.  Add option for nofp
27338         (arm946e-s, arm966e-s, arm968e-s, arm10e, arm1020e, arm1022e): Likewise.
27339         (arm926ej-s, arm1026ej-s): Likewise.
27340         (generic-armv7-a): Add fpu.  Add options for simd, vfpv3, vfpv3-d16,
27341         vfpv3-fp16, vfpv3-d16-fp16, vfpv4, vfpv4-d16, neon, neon-vfp3,
27342         neon-fp16, neon-vfpv4, nofp and nosimd.
27343         (cortex-a5, cortex-a7): Add fpu.  Add options for nosimd and nofp.
27344         (cortex-a8): Add fpu.  Add option for nofp.
27345         (cortex-a9): Add fpu.  Add options for nosimd and nofp.
27346         (cortex-a12, cortex-a15, cortex-a17): Add fpu.  Add option for nofp.
27347         (cortex-r4f): Add fpu.
27348         (cortex-r5): Add fpu.  Add options for nofp.dp and nofp.
27349         (cortex-r7): Use idiv option from architecture.  Add fpu.  Add option
27350         for nofp.
27351         (cortex-r8): Likewise.
27352         (cortex-m4): Add fpu.  Add option for nofp.
27353         (cortex-a15.cortex-a7): Add fpu.  Add option for nofp.
27354         (cortex-a17.cortex-a7): Likewise.
27355         (cortex-a32): Add fpu.  Add options for crypto and nofp.
27356         (cortex-a35, cortex-a53): Likewise.
27357         (cortex-a57): Add fpu.  Add option for crypto.
27358         (cortex-a72, cortex-a73): Likewise.
27359         (exynos-m1): Likewise.
27360         (cortex-a57.cortex-a53, cortex-a72.cortex-a53): Likewise.
27361         (cortex-a73.cortex-a35, cortex-a73.cortex-a53): Likewise.
27362         (cortex-m33): Add fpu.  Add option for nofp.
27363         * config/arm/arm-cpu-cdata.h: Regenerated
27364         * config/arm/arm-cpu-data.h: Regenerated.
27365
27366 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27367
27368         * arm-cpus.in (armv5e): Add options fp, vfpv2 and nofp.
27369         (armv5te, armv5tej): Likewise.
27370         (armv6, armv6j, armv6k, armv6z, armv6kz, armv6zk, armv6t2): Likewise.
27371         (armv7): Add options fp and vfpv3-d16.
27372         (armv7-a): Add options fp, simd, vfpv3, vfpv3-d16, vfpv3-d16-fp16,
27373         vfpv3-fp16, vfpv4, vfpv4-d16, neon, neon-vfpv3, neon-fp16, neon-vfpv4,
27374         nofp and nosimd.
27375         (armv7ve): Likewise.
27376         (armv7-r): Add options fp, fp.sp, idiv, nofp and noidiv.
27377         (armv7e-m): Add options fp, fpv5, fp.dp and nofp.
27378         (armv8-a): Add nocrypto option.
27379         (armv8.1-a, armv8.2-a): Likewise.
27380         (armv8-m.main): add options fp, fp.dp and nofp.
27381
27382 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27383
27384         * config/arm/arm-cpus.in (armv8-a): Add options crc, simd crypto and
27385         nofp.
27386         (armv8-a+crc): Delete.
27387         (armv8.1-a): Add options simd, crypto and nofp.
27388         (armv8.2-a): Add options fp16, simd, crypto and nofp.
27389         (armv8.2-a+fp16): Delete.
27390         (armv8-m.main): Add option dsp.
27391         (armv8-m.main+dsp): Delete.
27392         (cortex-a8): Add fpu.  Add nofp option.
27393         (cortex-a9): Add fpu.  Add nofp and nosimd options.
27394         * config/arm/parsecpu.awk (gen_data): Generate option tables and
27395         link to main cpu and architecture data structures.
27396         (gen_comm_data): Only put isa attributes from the main architecture
27397         in common tables.
27398         (option): New statement for architecture and CPU entries.
27399         * arm.c (struct cpu_option): New structure.
27400         (struct processors): Add entry for options.
27401         (arm_unrecognized_feature): New function.
27402         (arm_parse_arch_cpu_name): Ignore any characters after the first
27403         '+' character.
27404         (arm_parse_arch_cpu_feature): New function.
27405         (arm_configure_build_target): Separate out any CPU and architecture
27406         features and parse separately.  Don't error out if -mfpu=auto is
27407         used with only an architecture string.
27408         (arm_print_asm_arch_directives): New function.
27409         (arm_file_start): Call it.
27410         * config/arm/arm-cpu-cdata.h: Regenerated.
27411         * config/arm/arm-cpu-data.h: Likewise.
27412         * config/arm/arm-tables.opt: Likewise.
27413
27414 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27415
27416         * config/arm/elf.h (ASM_SPEC): Only pass -mfpu through to the
27417         assembler when it is not -mfpu=auto.
27418
27419 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27420
27421         * config/arm/arm.h (BIG_LITTLE_SPEC): Delete macro.
27422         (ASM_REWRITE_SPEC_FUNCTIONS): New macro.
27423         (BIG_LITTLE_CPU_SPEC_FUNCTIONS): Delete macro.
27424         (ASM_CPU_SPEC): Rewrite.
27425         (MCPU_MTUNE_NATIVE_FUNCTIONS): New macro.
27426         (EXTRA_SPEC_FUNCTIONS): Move outside of ifdef.  Use
27427         MCPU_MTUNE_NATIVE_FUNCTIONS and ASM_REWRITE_SPEC_FUNCTIONS.  Remove
27428         reference to BIG_LITTLE_CPU_SPEC_FUNCTIONS.
27429         * common/config/arm/arm-common.c (arm_rewrite_selected_cpu): Ensure
27430         copied string is NUL-terminated.  Also strip any characters prefixed
27431         by '+'.
27432         (arm_rewrite_selected_arch): New function.
27433         (arm_rewrite_march): New function.
27434
27435 2017-06-16  Richard Earnshaw  <rearnsha@arm.com>
27436
27437         * config/arm/arm.opt (x_arm_arch_string): New TargetSave option.
27438         (x_arm_cpu_string, x_arm_tune_string): Likewise.
27439         (march, mcpu, mtune): Convert to string-based options.
27440         * config/arm/arm.c (arm_print_hint_for_core_or_arch): New function.
27441         (arm_parse_arch_cpu_name): New function.
27442         (arm_configure_build_target): Use arm_parse_arch_cpu_name to
27443         identify selected architecture or CPU.
27444         (arm_option_save): New function.
27445         (TARGET_OPTION_SAVE): Redefine.
27446         (arm_option_restore): Restore string options.
27447         (arm_option_print): Print string options.
27448
27449 2017-06-16  Martin Sebor  <msebor@redhat.com>
27450
27451         PR tree-optimization/80933
27452         PR tree-optimization/80934
27453         * builtins.c (fold_builtin_3): Do not handle bcmp here.
27454         * gimple-fold.c (gimple_fold_builtin_bcmp): New function.
27455         (gimple_fold_builtin_bcopy, gimple_fold_builtin_bzero): Likewise.
27456         (gimple_fold_builtin): Call them.
27457
27458 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
27459
27460         * gimple-ssa-isolate-paths.c (isolate_path): Set edge leading to path
27461         as unlikely; update profile.
27462
27463 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
27464
27465         * predict.c (force_edge_cold): Handle declaring edges impossible
27466         more aggresively.
27467
27468 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
27469
27470         * tree-ssa-loop-ivcanon.c (remove_exits_and_undefined_stmts): Update
27471         profile.
27472         (try_unroll_loop_completely): Fix reporting.
27473
27474 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
27475
27476         * tree-ssa-tail-merge.c (replace_block_by): Fix profile updating.
27477
27478 2017-06-16  James Greenhalgh  <james.greenhalgh@arm.com>
27479
27480         PR target/71778
27481         * config/arm/arm-builtins.c (arm_expand_builtin_args): Return TARGET
27482         if given a non-constant argument for an intrinsic which requires a
27483         constant.
27484
27485 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
27486
27487         * profile.c (compare_freqs): New function.
27488         (branch_prob): Sort edge list.
27489         (find_spanning_tree): Assume that the list is priority sorted.
27490
27491 2017-06-16  Richard Biener  <rguenther@suse.de>
27492
27493         PR tree-optimization/81090
27494         * passes.def (pass_record_bounds): Remove.
27495         * tree-pass.h (make_pass_record_bounds): Likewise.
27496         * tree-ssa-loop.c (pass_data_record_bounds, pass_record_bounds,
27497         make_pass_record_bounds): Likewise.
27498         * tree-ssa-loop-ivcanon.c (canonicalize_induction_variables): Do
27499         not free niter estimates at the beginning but at the end.
27500         * tree-scalar-evolution.c (scev_finalize): Free niter estimates.
27501
27502 2017-06-16  Richard Biener  <rguenther@suse.de>
27503
27504         * tree-switch-conversion.c (emit_case_bit_tests): Adjust
27505         initializer to workaround ICE in host GCC 4.8.
27506
27507 2017-06-16  Jan Hubicka  <hubicka@ucw.cz>
27508
27509         * ipa-inline-transform.c (update_noncloned_frequencies): Update also
27510         counts.
27511         (clone_inlined_nodes): Update.
27512
27513 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
27514
27515         * config/aarch64/aarch64.c (qdf24xx_prefetch_tune): Update
27516         prefetch settings, and enable prefetching by default at -O3.
27517
27518 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
27519
27520         * config/aarch64/aarch64.c (aarch64_override_options_internal):
27521         Set flag_prefetch_loop_arrays according to tuning data.
27522
27523 2017-06-16  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
27524
27525         * config/aarch64/aarch64-protos.h (struct cpu_prefetch_tune):
27526         New tune structure.
27527         (struct tune_params): Use cpu_prefetch_tune instead of cache_line_size.
27528         [Unrelated to main purpose of the patch] Place the pointer field last
27529         to enable type checking errors when tune structure are wrongly merged.
27530         * config/aarch64/aarch64.c (generic_prefetch_tune,)
27531         (exynosm1_prefetch_tune, qdf24xx_prefetch_tune,)
27532         (thunderx2t99_prefetch_tune): New tune constants.
27533         (tune_params *_tunings): Update all tunings (no functional change).
27534         (aarch64_override_options_internal): Set PARAM_SIMULTANEOUS_PREFETCHES,
27535         PARAM_L1_CACHE_SIZE, PARAM_L1_CACHE_LINE_SIZE, and PARAM_L2_CACHE_SIZE
27536         from tunings structures.
27537
27538 2017-06-16  Jakub Jelinek  <jakub@redhat.com>
27539
27540         PR sanitizer/81094
27541         * ubsan.c (instrument_null): Add T argument, use it instead
27542         of computing it based on IS_LHS.
27543         (instrument_object_size): Likewise.
27544         (pass_ubsan::execute): Adjust instrument_null and
27545         instrument_object_size callers to pass gimple_get_lhs or
27546         gimple_assign_rhs1 result to it.  Use instrument_null instead of
27547         calling get_base_address and instrument_mem_ref.  Handle
27548         aggregate call arguments for object-size sanitization.
27549
27550 2017-06-16  Yury Gribov  <tetra2005@gmail.com>
27551
27552         PR tree-optimization/81089
27553         * tree-vrp.c (is_masked_range_test): Validate operands of
27554         subexpression.
27555
27556 2017-06-15  Martin Sebor  <msebor@redhat.com>
27557
27558         PR c++/80560
27559         * dumpfile.c (dump_register): Avoid calling memset to initialize
27560         a class with a default ctor.
27561         * gcc.c (struct compiler): Remove const qualification.
27562         * genattrtab.c (gen_insn_reserv): Replace memset with initialization.
27563         * hash-table.h: Ditto.
27564         * ipa-cp.c (allocate_and_init_ipcp_value): Replace memset with
27565           assignment.
27566         * ipa-prop.c (ipa_free_edge_args_substructures): Ditto.
27567         * omp-low.c (lower_omp_ordered_clauses): Replace memset with
27568         default ctor.
27569         * params.h (struct param_info): Make struct members non-const.
27570         * tree-switch-conversion.c (emit_case_bit_tests): Replace memset
27571         with default initialization.
27572         * vec.h (vec_copy_construct, vec_default_construct): New helper
27573         functions.
27574         (vec<T>::copy, vec<T>::splice, vec<T>::reserve): Replace memcpy
27575         with vec_copy_construct.
27576         (vect<T>::quick_grow_cleared): Replace memset with default ctor.
27577         (vect<T>::vec_safe_grow_cleared, vec_safe_grow_cleared): Same.
27578         * doc/invoke.texi (-Wclass-memaccess): Document.
27579
27580 2017-06-15  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
27581
27582         * emit-rtl.h (is_leaf): Update comment about local
27583         register allocator.
27584
27585 2017-06-15  Jozef Lawrynowicz   <jozef.l@somniumtech.com>
27586
27587         PR target/78818
27588         * config/msp430/msp430.c (msp430_data_attr): Check that it's possible
27589         for a variable to have a section before checking if the section has a
27590         name.
27591         Set section to.persistent if persistent attribute is set.
27592         Warn if .persistent attribute is used on an automatic variable.
27593
27594 2017-06-15  Eric Botcazou  <ebotcazou@adacore.com>
27595
27596         PR rtl-optimization/80474
27597         * reorg.c (update_block): Do not ignore instructions in a delay slot.
27598
27599 2017-06-15  Segher Boessenkool  <segher@kernel.crashing.org>
27600
27601         * config/rs6000/rs6000.md (add<mode>3): Use reg_or_subregno instead
27602         of REGNO.
27603
27604 2017-06-14  Maciej W. Rozycki  <macro@imgtec.com>
27605
27606         * config/mips/mips.md (MIPS16_T_REGNUM): Remove constant.
27607         (casesi): Emit bounds checking as RTL.
27608         (casesi_internal_mips16_<mode>): Remove bounds checking.
27609
27610 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
27611
27612         * config/xtensa/xtensa.c (xtensa_option_override): Append
27613         MASK_CONST16 to target_flags in the absence of TARGET_L32R.
27614         (hwloop_optimize, hwloop_fail, hwloop_pattern_reg,
27615          xtensa_doloop_hooks): Define unconditionally.
27616         (xtensa_reorg_loops): Only call reorg_loops in the presence of
27617         TARGET_LOOPS.
27618         * config/xtensa/xtensa.h (TARGET_L32R): New definition.
27619         (TARGET_DEFAULT): Remove XCHAL_HAVE_L32R condition and account
27620         for it in xtensa_option_override.
27621         (HARD_FRAME_POINTER_IS_FRAME_POINTER,
27622          HARD_FRAME_POINTER_IS_ARG_POINTER): New definitions.
27623
27624 2017-06-14  Boris Kolpackov  <boris@codesynthesis.com>
27625
27626         * doc/cppopts.texi: Document '-' special value to -MF.
27627
27628 2017-06-14  Wilco Dijkstra  <wdijkstr@arm.com>
27629
27630         * config/arm/cortex-a53.md (cortex_a53_fpalu) Adjust latency.
27631         (cortex_a53_fconst): Likewise.
27632         (cortex_a53_fpmul): Likewise.
27633         (cortex_a53_f_load_64): Likewise.
27634         (cortex_a53_f_load_many): Likewise.
27635         (cortex_a53_advsimd_alu): Likewise.
27636         (cortex_a53_advsimd_alu_q): Likewise.
27637         (cortex_a53_advsimd_mul): Likewise.
27638         (cortex_a53_advsimd_mul_q): Likewise.
27639         (fpmac bypass): Add new bypass for fpmac-fpmac case.
27640         Add missing fmul, r2f_cvt and fconst cases.
27641
27642 2017-06-14  Richard Biener  <rguenther@suse.de>
27643
27644         PR middle-end/81088
27645         * fold-const.c (split_tree): Drop TREE_OVERFLOW flag from
27646         literal constants.
27647         (fold_binary_loc): When associating do not treat pre-existing
27648         TREE_OVERFLOW on literal constants as a reason to allow
27649         TREE_OVERFLOW on associated literal constants.
27650
27651 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
27652
27653         * config/sparc/sparc.h (MASK_ISA): Add MASK_LEON and MASK_LEON3.
27654         (MASK_FEATURES): New macro.
27655         * config/sparc/sparc.c (sparc_option_override): Remove the special
27656         handling of -mfpu and generalize it to all MASK_FEATURES switches.
27657
27658 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
27659
27660         * simplify-rtx.c (simplify_binary_operation_1) <UDIV>: Do not simplify
27661         a division of 0 if non-call exceptions are enabled.
27662
27663 2017-06-14  Andrew Pinski  <apinski@cavium.com>
27664             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
27665
27666         PR target/71663
27667         * config/aarch64/aarch64.c (aarch64_expand_vector_init):
27668         Improve vector initialization code gen for only variable case.
27669
27670 2017-06-14  Eric Botcazou  <ebotcazou@adacore.com>
27671
27672         * config/sparc/driver-sparc.c (cpu_names): Add SPARC-T5 entry.
27673
27674 2017-06-14  Richard Biener  <rguenther@suse.de>
27675
27676         PR tree-optimization/81083
27677         * tree-ssa-sccvn.c (vn_reference_lookup_3): Do not use abnormals
27678         as values.
27679
27680 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
27681
27682         * config/rs6000/rs6000.c: Update all comments that mentioned SPE.
27683         (rs6000_expand_builtin): Remove RS6000_BTC_EVSEL.
27684         * config/rs6000/rs6000.h (RS6000_BTC_EVSEL): Delete.
27685         * config/rs6000/vxworks.h (VXCPU_FOR_8548): Delete.  Adjust former use.
27686         * config/rs6000/vxworksae.h (VXCPU_FOR_8548): Delete.
27687         * config/rs6000/vxworksmils.h (VXCPU_FOR_8548): Delete.
27688
27689 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
27690
27691         * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete VECTOR_SPE.
27692         * config/rs6000/rs6000.c (rs6000_debug_vector_unit): Delete VECTOR_SPE.
27693
27694 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
27695
27696         * config/rs6000/rs6000.h (FIXED_SCRATCH): Delete.
27697
27698 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
27699
27700         * config/rs6000/t-rtems: Don't handle SPE.
27701
27702 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
27703
27704         * config/rs6000/t-linux: Don't handle SPE.
27705
27706 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
27707
27708         * config/rs6000/eabispe.h: Delete file.
27709
27710 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
27711
27712         * config/rs6000/t-spe: Delete file.
27713
27714 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
27715
27716         * config/rs6000/rs6000.c (SPE_CONST_OFFSET_OK): Delete.
27717         (rs6000_legitimate_offset_address_p): Return false for anything in
27718         V2SImode or V2SFmode.
27719
27720 2017-06-13  Segher Boessenkool  <segher@kernel.crashing.org>
27721
27722         * config/rs6000/rs6000-modes.def: Remove all 8-byte vector modes
27723         except V2SF and V2SI.  Rearrange the vector modes, and add comments.
27724         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove V8QImode
27725         and V4HImode.
27726         (reg_offset_addressing_ok_p): Remove V4HImode and V1DImode.
27727         (rs6000_legitimate_offset_address_p): Ditto.
27728         (rs6000_emit_move): Ditto.
27729         (rs6000_init_builtins): Remove V4HI_type_node.
27730
27731 2017-06-13  Martin Liska  <mliska@suse.cz>
27732
27733         PR sanitize/78204
27734         * asan.c (asan_sanitize_stack_p): Use sanitize_flags_p.
27735         (gate_asan): Likewise.
27736         * asan.h (asan_no_sanitize_address_p): Remove the function.
27737         (sanitize_flags_p): New function.
27738         * builtins.def: Fix coding style.
27739         * common.opt: Use renamed enum value.
27740         * convert.c (convert_to_integer_1): Use sanitize_flags_p.
27741         * doc/extend.texi: Document no_sanitize attribute.
27742         * flag-types.h (enum sanitize_code): Rename SANITIZE_NONDEFAULT
27743         to SANITIZE_UNDEFINED_NONDEFAULT.
27744         * gcc.c (sanitize_spec_function): Use the renamed enum value.
27745         * gimple-fold.c (optimize_atomic_compare_exchange_p):
27746         Use sanitize_flags_p.
27747         * gimplify.c (gimplify_function_tree): Likewise.
27748         * ipa-inline.c (sanitize_attrs_match_for_inline_p): Likewise.
27749         * opts.c (parse_no_sanitize_attribute): New function.
27750         (common_handle_option): Use renamed enum value.
27751         * opts.h (parse_no_sanitize_attribute): Declare.
27752         * tree.c (sanitize_flags_p): New function.
27753         * tree.h: Declared here.
27754         * tsan.c: Use sanitize_flags_p.
27755         * ubsan.c (ubsan_expand_null_ifn): Likewise.
27756         (instrument_mem_ref): Likewise.
27757         (instrument_bool_enum_load): Likewise.
27758         (do_ubsan_in_current_function): Remove the function.
27759         (pass_ubsan::execute): Use sanitize_flags_p.
27760         * ubsan.h: Remove do_ubsan_in_current_function
27761         * tree-cfg.c (print_no_sanitize_attr_value): New function.
27762         (dump_function_to_file): Use it here.
27763
27764 2017-06-13  Martin Jambor  <mjambor@suse.cz>
27765
27766         PR tree-optimization/80803
27767         PR tree-optimization/81063
27768         * tree-sra.c (subtree_mark_written_and_enqueue): Move up in the file.
27769         (propagate_subaccesses_across_link): Enqueue subtree whenever
27770         necessary instead of relying on the caller.
27771
27772 2017-06-13  Martin Jambor  <mjambor@suse.cz>
27773
27774         * tree-sra.c (add_access_to_work_queue): Only enqueue accesses
27775         that have a first_link.
27776         (sort_and_splice_var_accesses): Do not check first_link before
27777         enquing.
27778         (subtree_mark_written_and_enqueue): Likewise.
27779         (propagate_all_subaccesses): Likewise and do not stop at first
27780         parent with a first_link.
27781
27782 2017-06-13  Martin Jambor  <mjambor@suse.cz>
27783
27784         * tree-sra.c (dump_access_tree_1): Fix accidental dumping to stderr
27785         instead of f.
27786
27787 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
27788
27789         * match.pd: New pattern.
27790
27791 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
27792
27793         * tree-vrp.c (is_masked_range_test): New function.
27794         (register_edge_assert_for): Determine ranges for
27795         some bit tests.
27796
27797 2017-06-13  Yury Gribov  <tetra2005@gmail.com>
27798
27799         PR tree-optimization/67328
27800         * fold-const.c (maskable_range_p): New function.
27801         (build_range_check): Generate bittests if possible.
27802
27803 2017-06-13  Martin Liska  <mliska@suse.cz>
27804
27805         * gimple-pretty-print.c (dump_probability): Add new argument.
27806         (dump_edge_probability): Dump both probability and count.
27807         (dump_gimple_label): Likewise.
27808         (dump_gimple_bb_header): Likewise.
27809
27810 2017-06-13  Georg-Johann Lay  <avr@gjlay.de>
27811
27812         PR target/81072
27813         * config/avr/avr-devices.c: Fix indentation.
27814         * config/avr/gen-avr-mmcu-specs.c: Dito.
27815
27816 2017-06-13  Richard Biener  <rguenther@suse.de>
27817
27818         * tree-vect-loop.c (vect_model_reduction_cost): Do not fail,
27819         instead get vector type from stmt_info.
27820         (vectorizable_reduction): Adjust.  Remove dead code.
27821
27822 2017-06-13  Richard Biener  <rguenther@suse.de>
27823
27824         PR middle-end/81065
27825         * fold-const.c (extract_muldiv_1): Remove bogus distribution
27826         case of C * (x * C2 + C3).
27827         (fold_addr_of_array_ref_difference): Properly fold index difference.
27828
27829 2017-06-12  David S. Miller  <davem@davemloft.net>
27830
27831         PR target/80968
27832         * config/sparc/sparc.md (return expander): Emit frame blockage if
27833         function uses alloca.
27834
27835 2017-06-12  Richard Sandiford  <richard.sandiford@linaro.org>
27836
27837         * combine.c (make_field_assignment): Check len rather than the mode
27838         precision when calling force_to_mode.
27839
27840 2017-06-12  Georg-Johann Lay  <avr@gjlay.de>
27841
27842         Support multilibs and devices that see flash in RAM address range.
27843
27844         PR target/81072
27845         * config/avr/avr-arch.h (avr_arch_id) <ARCH_AVRXMEGA3>: New enum.
27846         (avr_mcu_t) <flash_pm_offset>: New field.
27847         (avr_device_specific_features) <AVR_ISA_RCALL>: New enum.
27848         * config/avr/avr.h (AVR_SHORT_CALLS): New define.
27849         (AVR_HAVE_JMP_CALL): Don't set if AVR_SHORT_CALLS.
27850         (AVR_TINY_PM_OFFSET): Remove macro.
27851         * config/avr/avr.opt (-mshort-calls): New option.
27852         * config/avr/gen-avr-mmcu-specs.c (print_mcu)
27853         [*self_spec]: Add / remove -mshort-calls depending on AVR_ISA_RCALL.
27854         * config/avr/avr-c.c (avr_cpu_cpp_builtins)
27855         <__AVR_SHORT_CALLS__>: Built-in define if AVR_SHORT_CALLS.
27856         <__AVR_HAVE_JMP_CALL__>: Use AVR_HAVE_JMP_CALL as condition
27857         instead of avr_arch->have_jmp_call.
27858         <__AVR_PM_BASE_ADDRESS__>: Built-in define if avr_arch->flash_pm_offset.
27859         [AVR_TINY] <__AVR_TINY_PM_BASE_ADDRESS__>: Use
27860         avr_arch->flash_pm_offset to define.
27861         * config/avr/avr-devices.c (avr_arch_types): Add initializers for
27862         new field flash_pm_offset.  Add entry for avrxmega3.
27863         (avr_texinfo): Add entry for avrxmega3.
27864         * config/avr/avr-mcus.def: Add entries for: avrxmega3,
27865         attiny212, attiny214,
27866         attiny412, attiny414, attiny416, attiny417,
27867         attiny814, attiny816, attiny817,
27868         attiny1614, attiny1616, attiny1617,
27869         attiny3214, attiny3216, attiny3217.
27870         * config/avr/avr.c (avr_assemble_integer)[AVR_TINY]: Use
27871         avr_arch->flash_pm_offset instead of AVR_TINY_PM_OFFSET.
27872         (avr_print_operand_address) [AVR_TINY]: Same.
27873         (avr_asm_init_sections) <readonly_data_section>: Only patch
27874         callback if avr_arch->flash_pm_offset = 0.
27875         (avr_asm_named_section) <avr_need_copy_data_p>: Skip setting it
27876         for rodata if avr_arch->flash_pm_offset != 0.
27877         (avr_encode_section_info) [AVR_TINY]: Adjust comment.
27878         * config/avr/genmultilib.awk (dir_rcall, opt_rcall): New vars.
27879         (opts) [AVR_ISA_RCALL]: Append opt_rcall.
27880         (m_options): Append opt_rcall.
27881         (m_dirnames): Append dir_rcall.
27882         * config/avr/t-multilib: Regenerate.
27883
27884         * configure.ac [target=avr]: Check whether avrxmega3 default
27885         linker description file works as needed.
27886         * configure: Regenerate.
27887         * doc/avr-mmcu.texi: Regenerate.
27888         * doc/invoke.texi (AVR Options) <-mshort-calls>: Document it.
27889         <__AVR_ARCH__>: Document avrxmega3 and 103.
27890         <__AVR_HAVE_JMP_CALL__>: Adjust documentation.
27891         <__AVR_SHORT_CALLS__>: Document it.
27892         <__AVR_PM_BASE_ADDRESS__>: Document it.
27893         * doc/extend.texi (AVR Options) <-mshort-calls>: Document it.
27894         (AVR Variable Attributes) <progmem>: Document this is
27895         not needed for avrxmega3.
27896         (AVR Named Address Spaces) <__flash>: Dito.
27897
27898 2017-06-12  Jan Hubicka  <hubicka@ucw.cz>
27899
27900         * cgraph.c (cgraph_node::dump): Complain about profile insanities.
27901
27902 2017-06-12  Doug Rupp  <rupp@adacore.com>
27903
27904         * config.gcc (*-*-vxworks*): Set use_gcc_stdint to "provide".
27905         Append vxworks-stdint.h to the tm_file list.
27906         * config/vxworks-stdint.h: New file.
27907
27908 2017-06-12  Martin Liska  <mliska@suse.cz>
27909
27910         PR tree-optimization/81041
27911         * tree-profile.c (gimple_gen_ic_func_profiler):
27912         Create an extra BB in profile-generate
27913         (gimple_gen_time_profiler): Likewise.
27914
27915 2017-06-12  Jakub Jelinek  <jakub@redhat.com>
27916
27917         PR tree-optimization/81003
27918         * tree-ssa-reassoc.c (force_into_ssa_name): New function.
27919         (update_range_test): Use it instead of force_gimple_operand_gsi.
27920
27921 2017-06-12  Richard Biener  <rguenther@suse.de>
27922
27923         PR tree-optimization/81053
27924         * tree-vect-loop.c (vect_is_simple_reduction): Handle PHI
27925         with backedge value not defined in loop.  Simplify def stmt
27926         compute.
27927
27928 2017-06-11  Tom de Vries  <tom@codesourcery.com>
27929
27930         PR target/79939
27931         * config/nvptx/nvptx.c (nvptx_cannot_force_const_mem): New function.
27932         Return true.
27933         (TARGET_CANNOT_FORCE_CONST_MEM): Redefine to
27934         nvptx_cannot_force_const_mem.
27935
27936 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
27937
27938         * opts.c (finish_options): Move test for flag_split_stack after
27939         it has been initialized.
27940
27941 2017-06-11  Jason Merrill  <jason@redhat.com>
27942
27943         * tree.h (id_equal): New.
27944         * dwarf2out.c, hsa-gen.c, ipa-devirt.c, omp-expand.c,
27945         omp-simd-clone.c, read-rtl-function.c, tree-chkp.c, tree.c: Use it
27946         instead of strcmp of IDENTIFIER_POINTER.
27947
27948 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
27949
27950         * ipa-inline-transform.c: Include function.h, cfg.h and basic-block.h
27951         (mark_all_inlined_calls_cdtor): Fix formating.
27952         (inline_transform): Rescale profile before inlining.
27953
27954 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
27955
27956         * cgraph.h (cgraph_edge::clone): Update prototype.
27957         * cgraphclones.c (cgraph_edge::clone): Update profile scaling.
27958         (cgraph_node::create_clone): Update.
27959         (cgraph_node::create_version_clone): Update.
27960         * tree-inline.c (copy_bb): Update.
27961         (expand_call_inline): Update.
27962
27963 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
27964
27965         * config/rs6000/rs6000.c (emit_vrsave_prologue): New function,
27966         factored out from ...
27967         (rs6000_emit_prologue): ... here.
27968
27969 2017-06-10  Segher Boessenkool  <segher@kernel.crashing.org>
27970
27971         * config/rs6000/rs6000.c (emit_split_stack_prologue): New function,
27972         factored out from ...
27973         (rs6000_emit_prologue): ... here.
27974
27975 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
27976
27977         * predict.c (drop_profile): Also drop individual bb/edge and cgraph
27978         edge counts.
27979         (handle_missing_profiles): Fix computation of tp_first_run.
27980         (counts_to_freqs): Do not touch freqs when count is 0.
27981
27982 2017-06-10  Jan Hubicka  <hubicka@ucw.cz>
27983
27984         * cgraphbuild.c (cgraph_edge::rebuild_references): Do not touch
27985         profile.
27986
27987 2017-06-10  Tom de Vries  <tom@codesourcery.com>
27988
27989         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
27990         attributes): Document signal effective target.
27991
27992 2017-06-10  Tom de Vries  <tom@codesourcery.com>
27993
27994         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
27995         Document effective target stack_size.
27996
27997 2017-06-09  David Malcolm  <dmalcolm@redhat.com>
27998
27999         * diagnostic.c (diagnostic_report_diagnostic): Only add fixits
28000         to the edit_context if they can be auto-applied.
28001
28002 2017-06-9  Ian Lance Taylor  <iant@golang.org>
28003
28004         * opts.c (finish_options): If -fsplit-stack, disable implicit
28005         -forder-blocks-and-partition.
28006         * doc/invoke.texi (Optimize Options): Document that when using
28007         -fsplit-stack -forder-blocks-and-partition is not implicitly
28008         enabled.
28009
28010 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
28011
28012         * builtin-attrs.def (ATTR_NORETURN_NOTHROW_LEAF_COLD_LIST,
28013         ATTR_CONST_NORETURN_NOTHROW_LEAF_COLD_LIST,
28014         ATTR_TMPURE_NORETURN_NOTHROW_LEAF_COLD_LIST): New.
28015         * builtins.def (abort, trap, unreachable): Declare cold.
28016         * calls.c (flags_from_decl_or_type): Lookup ECF_COLD.
28017         * tree-core.h (ECF_COLD): New.
28018         * tree.c (set_call_expr_flags): Handle ECF_COLD.
28019         (build_common_builtin_nodes): Mark unreachable and abort as cold.
28020
28021 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
28022
28023         * predict.c (unlikely_executed_stmt_p): Cleanup.
28024
28025 2017-06-09  Richard Biener  <rguenther@suse.de>
28026
28027         * tree-ssa-loop-im.c (execute_sm): Do not force multi-threaded
28028         model if the ref is always written to.
28029
28030 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
28031
28032         * config/aarch64/aarch64.md (lrint<GPF:mode><GPI:mode>2): New.
28033
28034 2017-06-09  Tamar Christina  <tamar.christina@arm.com>
28035
28036         * config/arm/arm.c (arm_rtx_costs_internal): Make sdiv more expensive
28037         than udiv.
28038
28039 2017-06-09  Tom de Vries  <tom@codesourcery.com>
28040
28041         PR target/80855
28042         * config/nvptx/nvptx.md (define_expand "mov<QHSDISDFM>"): Error out with
28043         "target cannot support label values" when encountering LABEL_REF.
28044
28045 2017-06-09  Martin Liska  <mliska@suse.cz>
28046
28047         * tree-profile.c (gimple_gen_ic_profiler): Update comment.
28048         (gimple_gen_ic_func_profiler): Emit direct comparison
28049         of __gcov_indirect_call_callee with NULL.
28050         (gimple_gen_time_profiler): Change probability from
28051         PROB_VERY_UNLIKELY to PROB_UNLIKELY.
28052
28053 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
28054
28055         * profile.c (edge_gcov_counts): Turn to pointer.
28056         (compute_branch_probabilities, compute_branch_probabilities): Update.
28057         (branch_prob): Do not clear edge_gcov_count.
28058         * profile.h (edge_gcov_counts): Turn to pointer.
28059         (edge_gcov_count): Update.
28060
28061 2017-06-09  Jan Hubicka  <hubicka@ucw.cz>
28062
28063         * gimple.h (gimple_check_failed): Mark cold.
28064
28065 2017-06-09  Richard Biener  <rguenther@suse.de>
28066
28067         PR tree-optimization/66623
28068         * tree-vect-loop.c (vect_is_simple_reduction): Cleanup,
28069         refactor check_reduction into two parts, properly computing
28070         whether we have to check reduction validity for outer loop
28071         vectorization.
28072
28073 2017-06-09  Richard Biener  <rguenther@suse.de>
28074
28075         PR tree-optimization/79483
28076         * graphite-scop-detection.c (order): New global.
28077         (get_order): Compute bb to order mapping that satisfies code
28078         generation constraints.
28079         (cmp_pbbs): New helper.
28080         (build_scops): Start domwalk at entry block, sort generated
28081         pbbs.
28082
28083 2017-06-09  Richard Biener  <rguenther@suse.de>
28084
28085         PR middle-end/81007
28086         * ipa-polymorphic-call.c
28087         (ipa_polymorphic_call_context::restrict_to_inner_class):
28088         Skip FIELD_DECLs with error_mark_node type.
28089         * passes.def (all_lowering_passes): Run pass_build_cgraph_edges
28090         last again.
28091
28092 2017-06-09  Martin Liska  <mliska@suse.cz>
28093
28094         * predict.c (struct branch_predictor): New struct.
28095         (test_prediction_value_range): New test.
28096         (predict_c_tests): New function.
28097         * selftest-run-tests.c (selftest::run_tests): Run the function.
28098         * selftest.h: Declare new tests.
28099
28100 2017-06-09  Segher Boessenkool  <segher@kernel.crashing.org>
28101
28102         PR target/80966
28103         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Assert that
28104         gen_add3_insn did not fail.
28105         * config/rs6000/rs6000.md (add<mode>3): If asked to add a constant to
28106         r0, construct that number in a temporary reg and add that reg to r0.
28107         If asked to put the result in r0 as well, fail.
28108
28109 2017-06-08  Will Schmidt  <will_schmidt@vnet.ibm.com>
28110
28111         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
28112         for early expansion of vec_eqv.
28113
28114 2017-06-08  Jakub Jelinek  <jakub@redhat.com>
28115
28116         PR middle-end/81005
28117         * ubsan.c (instrument_null): Avoid pointless code temporary.
28118         (pass_ubsan::execute): Instrument aggregate arguments of calls.
28119
28120 2017-06-08  Uros Bizjak  <ubizjak@gmail.com>
28121
28122         PR target/81015
28123         Revert:
28124         2016-12-14  Uros Bizjak  <ubizjak@gmail.com>
28125
28126         PR target/59874
28127         * config/i386/i386.md (*ctzhi2): New insn_and_split pattern.
28128         (*clzhi2): Ditto.
28129
28130 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
28131
28132         * predict.c (unlikely_executed_edge_p): Move ahead.
28133         (probably_never_executed_edge_p): Use it.
28134
28135 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
28136
28137         PR middle-end/79988
28138         * tree-chkp.c (chkp_gimple_call_builtin_p): Remove
28139         gimple_call_builtin_p call.
28140
28141 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
28142
28143         * system.h (fancy_abort): Annotate by ATTRIBUTE_COLD.
28144         * rtl.h (rtl_check_failed_bounds, rtl_check_failed_type1,
28145         rtl_check_failed_type2, rtl_check_failed_code1,
28146         rtl_check_failed_code2, rtl_check_failed_code_mode,
28147         rtl_check_failed_block_symbol, cwi_check_failed_bounds,
28148         rtvec_check_failed_bounds, rtl_check_failed_flag,
28149         _fatal_insn_not_found, _fatal_insn): Likewise.
28150         * tree.h (tree_contains_struct_check_failed,
28151         tree_check_failed, tree_not_check_failed,
28152         tree_class_check_failed, tree_range_check_failed,
28153         tree_not_class_check_failed, tree_int_cst_elt_check_failed,
28154         tree_vec_elt_check_failed, phi_node_elt_check_failed,
28155         tree_operand_check_failed, omp_clause_check_failed,
28156         omp_clause_operand_check_failed, omp_clause_range_check_failed):
28157         Likewise.
28158
28159 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
28160
28161         * cgraph.c (cgraph_edge::maybe_hot_p): Do not check
28162         flag_branch_probabilities.
28163         * ipa-inline.c (edge_badness): Likewise.
28164         * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
28165         * postreload-gcse.c (eliminate_partially_redundant_load): Likewise.
28166         * predict.c (maybe_hot_frequency_p): Likewise.
28167         (probably_never_executed): Likewise.
28168         * sched-ebb.c (schedule_ebbs): Likewise.
28169         * sched-rgn.c (find_single_block_region): Likewise.
28170         * tracer.c (tail_duplicate): Likewise.
28171
28172 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
28173
28174         * opts.c (finish_options): x_flag_reorder_blocks_and_partition no
28175         longer requires x_flag_profile_use.
28176
28177 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
28178
28179         * cfgrtl.c (cfg_layout_initialize): Check crtl->has_bb_partition
28180         instead of flag_reorder_blocks_and_partition.
28181         * dbxout.c (dbxout_function_end): Likewise.
28182         * dwarf2out.c (gen_subprogram_die): Likewise.
28183         * haifa-sched.c (sched_create_recovery_edges): Likewise.
28184         * hw-doloop.c (reorg_loops): Likewise.
28185         * varasm.c (assemble_start_function,
28186         assemble_end_function): Likewise.
28187         (decide_function_section): Do not check for
28188         flag_reorder_blocks_and_partition.
28189
28190 2017-06-08  Alexander Ivchenko  <alexander.ivchenko@intel.com>
28191
28192         * tree-chkp.c (chkp_get_hard_register_var_fake_base_address):
28193         New function.
28194         (chkp_get_hard_register_fake_addr_expr): Ditto.
28195         (chkp_build_addr_expr): Add check for hard reg case.
28196         (chkp_parse_array_and_component_ref): Ditto.
28197         (chkp_find_bounds_1): Ditto.
28198         (chkp_process_stmt): Don't generate bounds store for
28199         hard reg case.
28200
28201 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
28202
28203         * predict.c (maybe_hot_bb_p): Do not check profile status.
28204         (maybe_hot_edge_p): Likewise.
28205         (probably_never_executed): Check for zero counts even if profile
28206         is not read.
28207         (unlikely_executed_edge_p): New function.
28208         (unlikely_executed_stmt_p): New function.
28209         (unlikely_executed_bb_p): New function.
28210         (set_even_probabilities): Use unlikely predicates.
28211         (combine_predictions_for_bb): Likewise.
28212         (predict_paths_for_bb): Likewise.
28213         (predict_paths_leading_to_edge): Likewise.
28214         (determine_unlikely_bbs): New function.
28215         (estimate_bb_frequencies): Use it.
28216         (compute_function_frequency): Use zero counts even if profile is
28217         not read.
28218         * profile-count.h: Fix typo.
28219
28220 2017-08-08  Julia Koval  <julia.koval@intel.com>
28221
28222         * config/i386/avx512bwintrin.h (_mm512_mask_cvtepi16_storeu_epi8,
28223         _mm512_mask_cvtsepi16_storeu_epi8,
28224         _mm512_mask_cvtusepi16_storeu_epi8): New intrinsics.
28225         * config/i386/avx512vlbwintrin.h (_mm256_mask_cvtepi16_storeu_epi8,
28226         _mm_mask_cvtsepi16_storeu_epi8, _mm256_mask_cvtsepi16_storeu_epi8,
28227         _mm_mask_cvtusepi16_storeu_epi8, _mm256_mask_cvtusepi16_storeu_epi8,
28228         _mm_mask_cvtepi16_storeu_epi8): New intrinsics.
28229         * config/i386/i386-builtin-types.def (PV8Q, V8QI): New pointer type.
28230         (VOID_FTYPE_PV32QI_V32HI_USI, VOID_FTYPE_PV8QI_V8HI_UQI,
28231         VOID_FTYPE_PV16QI_V16HI_UHI): New function types.
28232         * config/i386/i386-builtin.def (__builtin_ia32_pmovwb128mem_mask,
28233         __builtin_ia32_pmovwb256mem_mask, __builtin_ia32_pmovswb128mem_mask,
28234         __builtin_ia32_pmovswb256mem_mask, __builtin_ia32_pmovuswb128mem_mask,
28235         __builtin_ia32_pmovuswb256mem_mask,
28236         __builtin_ia32_pmovuswb512mem_mask, __builtin_ia32_pmovswb512mem_mask)
28237         __builtin_ia32_pmovwb512mem_mask): New builtins.
28238
28239 2017-08-08  Julia Koval  <julia.koval@intel.com>
28240
28241         PR target/73350,80862
28242         * config/i386/subst.md (round): Fix round pattern.
28243         * config/i386/i386.c (ix86_erase_embedded_rounding):
28244         Fix erasing rounding for the fixed pattern.
28245
28246 2017-06-08  Jan Hubicka  <hubicka@ucw.cz>
28247
28248         * cfgbuild.c (find_many_sub_basic_blocks): Fix thinko.
28249
28250 2017-06-08  Martin Liska  <mliska@suse.cz>
28251
28252         PR gcov-profile/80911
28253         * gcov.c (block_info::block_info): New constructor.
28254
28255 2017-06-07  Carl Love  <cel@us.ibm.com>
28256
28257         * config/rs6000/rs6000-c: The return type of the following
28258         built-in functions was implemented as int not long long.  Fix sign
28259         of return value for the unsigned version of vec_mulo and vec_mule.
28260         vector unsigned long long vec_bperm (vector unsigned long long,
28261                                              vector unsigned char)
28262         vector signed long long vec_mule (vector signed int,
28263                                           vector signed int)
28264         vector unsigned long long vec_mule (vector unsigned int,
28265                                             vector unsigned int)
28266         vector signed long long vec_mulo (vector signed int,
28267                                           vector signed int)
28268         vector unsigned long long vec_mulo (vector unsigned int,
28269                                             vector unsigned int)
28270         * doc/extend.texi: Fix the documentation for the built-in
28271         functions.
28272
28273 2017-06-07  Carl Love  <cel@us.ibm.com>
28274
28275         PR target/80982
28276         * config/rs6000/altivec.md (double<mode>2): Fix the implementation of
28277         for BE.
28278
28279 2017-06-07  Carl Love  <cel@us.ibm.com>
28280
28281         * config/rs6000/altivec.md: Fix argument swizzle in vec_doublel
28282         support, Generate       doublehv for signed int/float for BE case only.
28283
28284 2017-06-07  Alexander Monakov  <amonakov@ispras.ru>
28285
28286         * doc/invoke.texi (mcx16): Rewrite.
28287
28288 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
28289
28290         * config/rs6000/predicates.md (rs6000_nonimmediate_operand): Delete.
28291         * config/rs6000/rs6000.md (*movsi_internal1, movsi_from_sf,
28292         *mov<mode>_softfloat, and an anonymous splitter): Use
28293         nonimmediate_operand instead of rs6000_nonimmediate_operand.
28294
28295 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
28296
28297         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE_ACC and
28298         SPEFSCR registers.
28299         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
28300         (enum rs6000_reg_type): Delete SPE_ACC_TYPE and SPEFSCR_REG_TYPE.
28301         (rs6000_debug_reg_global): Adjust.
28302         (rs6000_init_hard_regno_mode_ok): Adjust.
28303         (rs6000_dbx_register_number): Adjust.
28304         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change to 115.
28305         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
28306         Remove SPE_ACC and SPEFSCR.
28307         (REG_ALLOC_ORDER): Ditto.
28308         (FRAME_POINTER_REGNUM): Change to 111.
28309         (enum reg_class): Remove the SPE_ACC and SPEFSCR registers.
28310         (REG_CLASS_NAMES): Ditto.
28311         (REG_CLASS_CONTENTS): Delete the SPE_ACC and SPEFSCR registers.
28312         (REGISTER_NAMES): Ditto.
28313         (ADDITIONAL_REG_NAMES): Ditto.
28314         (rs6000_reg_names): Ditto.
28315         * config/rs6000/rs6000.md: Renumber some register number
28316         define_constants.
28317
28318 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
28319
28320         * config/rs6000/darwin.h (REGISTER_NAMES): Delete the SPE high
28321         registers.
28322         * config/rs6000/rs6000.c (rs6000_reg_names, alt_reg_names): Ditto.
28323         * config/rs6000/rs6000.h (FIRST_PSEUDO_REGISTER): Change from 149
28324         to 117.
28325         (DWARF_REG_TO_UNWIND_COLUMN): Do not define.
28326         (FIXED_REGISTERS, CALL_USED_REGISTERS, CALL_REALLY_USED_REGISTERS):
28327         Delete the SPE high registers.
28328         (REG_ALLOC_ORDER): Ditto.
28329         (enum reg_class): Remove SPE_HIGH_REGS.
28330         (REG_CLASS_NAMES): Ditto.
28331         (REG_CLASS_CONTENTS): Delete the SPE high registers.
28332         (REGISTER_NAMES): Ditto.
28333         (rs6000_reg_names): Ditto.
28334         * doc/tm.texi.in: Remove SPE as example.
28335         * doc/tm.texi: Regenerate.
28336
28337 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
28338
28339         * config/rs6000/8540.md (ppc8540_brinc): Delete.
28340         * config/rs6000/e500mc.md (e500mc_brinc): Delete.
28341         * config/rs6000/e500mc64.md (e500mc64_brinc): Delete.
28342         * config/rs6000/rs6000.md (type): Remove "brinc".
28343
28344 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
28345
28346         * config.gcc (powerpc*-*-*): Don't add spe.h to extra_headers.
28347         (powerpc*-linux*spe*): Use ${cpu_type} instead of rs6000.
28348         * config/rs6000/linuxspe.h: Delete file.
28349         * config/rs6000/rs6000.md: Don't include spe.md.
28350         * config/rs6000/spe.h: Delete file.
28351         * config/rs6000/spe.md: Delete file.
28352         * config/rs6000/t-rs6000: Remove spe.md.
28353
28354 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
28355
28356         * config/rs6000/predicates.md (reg_or_mem_operand): Reformat.
28357         (reg_or_none500mem_operand): Delete.
28358         * config/rs6000/rs6000.md (extendsfdf2): Use reg_or_mem_operand
28359         instead of reg_or_none500mem_operand.
28360
28361 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
28362
28363         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
28364         handling of SPE flags.
28365         * config/rs6000/rs6000.opt (-mspe, -mspe=no, -mspe=yes): Delete.
28366
28367 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
28368
28369         * config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
28370         SPE ABI handling.
28371         * config/rs6000/paired.md (paired_negv2sf2): Rename to negv2sf2.
28372         (paired_absv2sf2, paired_addv2sf3, paired_subv2sf3, paired_mulv2sf3,
28373         paired_divv2sf3): Similar.
28374         * config/rs6000/predicates.md: Replace TARGET_SPE, TARGET_SPE_ABI,
28375         SPE_VECTOR_MODE and SPE_HIGH_REGNO_P by 0; simplify.
28376         * config/rs6000/rs6000-builtin.def: Delete RS6000_BUILTIN_E and
28377         RS6000_BUILTIN_S.
28378         Delete BU_SPE_1, BU_SPE_2, BU_SPE_3, BU_SPE_E, BU_SPE_P, and BU_SPE_X.
28379         Rename the paired_* instruction patterns.
28380         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Do not
28381         define __SPE__.
28382         * config/rs6000/rs6000-protos.h (invalid_e500_subreg): Delete.
28383         * config/rs6000/rs6000.c: Delete RS6000_BUILTIN_E and RS6000_BUILTIN_S.
28384         (struct rs6000_stack): Delete fields spe_gp_save_offset, spe_gp_size,
28385         spe_padding_size, and spe_64bit_regs_used.  Replace TARGET_SPE and
28386         TARGET_SPE_ABI with 0, simplify.  Replace SPE_VECTOR_MODE with
28387         PAIRED_VECTOR_MODE.
28388         (struct machine_function): Delete field spe_insn_chain_scanned_p.
28389         (spe_func_has_64bit_regs_p): Delete.
28390         (spe_expand_predicate_builtin): Delete.
28391         (spe_expand_evsel_builtin): Delete.
28392         (TARGET_DWARF_REGISTER_SPAN): Do not define.
28393         (TARGET_MEMBER_TYPE_FORCES_BLK): Do not define.
28394         (invalid_e500_subreg): Delete.
28395         (rs6000_legitimize_address): Always force_reg op2 as well, for
28396         paired single memory accesses.
28397         (rs6000_member_type_forces_blk): Delete.
28398         (rs6000_spe_function_arg): Delete.
28399         (rs6000_expand_unop_builtin): Delete SPE handling.
28400         (rs6000_expand_binop_builtin): Ditto.
28401         (spe_expand_stv_builtin): Delete.
28402         (bdesc_2arg_spe): Delete.
28403         (spe_expand_builtin): Delete.
28404         (spe_expand_predicate_builtin): Delete.
28405         (spe_expand_evsel_builtin): Delete.
28406         (rs6000_invalid_builtin): Remove RS6000_BTM_SPE handling.
28407         (spe_init_builtins): Delete.
28408         (spe_func_has_64bit_regs_p): Delete.
28409         (savres_routine_name): Delete "info" parameter.  Adjust callers.
28410         (rs6000_emit_stack_reset): Ditto.
28411         (rs6000_dwarf_register_span): Delete.
28412         * config/rs6000/rs6000.h (TARGET_SPE_ABI, TARGET_SPE,
28413         UNITS_PER_SPE_WORD, SPE_HIGH_REGNO_P, SPE_SIMD_REGNO_P,
28414         SPE_VECTOR_MODE, RS6000_BTM_SPE, RS6000_BUILTIN_E, RS6000_BUILTIN_S):
28415         Delete.
28416         * config/rs6000/rs6000.md (FIRST_SPE_HIGH_REGNO, LAST_SPE_HIGH_REGNO):
28417         Delete.
28418         * config/rs6000/rs6000.opt (-mabi=spe, -mabi=no-spe): Delete.
28419         * config/rs6000/spe.md: Delete every pattern that uses TARGET_SPE.
28420         * config/rs6000/vector.md (absv2sf2, negv2sf2, addv2sf3, subv2sf3,
28421         mulv2sf3, divv2sf3): Delete expanders.
28422
28423 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
28424
28425         config/rs6000/rs6000.md (UNSPEC_MV_CR_GT): Delete.
28426
28427 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
28428
28429         * config/rs6000/rs6000-protos.h (output_e500_flip_gt_bit): Delete.
28430         * config/rs6000/rs6000.c: Ditto.
28431
28432 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
28433
28434         * config/rs6000/predicated.md (rs6000_cbranch_operator): Delete.
28435         * config/rs6000/rs6000.md: Replace rs6000_cbranch_operator by
28436         comparison_operator.
28437
28438 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
28439
28440         * config/rs6000/rs6000.c: Remove everything related to -mfloat-gprs.
28441         * config/rs6000/rs6000.opt: Ditto.
28442         * config/rs6000/t-rtems: Ditto.
28443
28444 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
28445
28446         * config/rs6000/predicates.md: Replace TARGET_E500_DOUBLE and
28447         TARGET_E500_SINGLE by 0, simplify.
28448         * config/rs6000/rs6000.c: Ditto.
28449         (rs6000_option_override_internal): Delete CHECK_E500_OPTIONS.
28450         (spe_build_register_parallel): Delete.
28451         * config/rs6000/rs6000.h: Delete TARGET_E500_SINGLE,
28452         TARGET_E500_DOUBLE, and CHECK_E500_OPTIONS.
28453         * config/rs6000/rs6000.md: Replace TARGET_E500_DOUBLE,
28454         TARGET_E500_SINGLE, and <E500_CONVERT> by 0, simplify.
28455         (E500_CONVERT): Delete.
28456         * config/rs6000/spe.md: Remove many patterns and all define_constants.
28457
28458 2017-06-07  Segher Boessenkool  <segher@kernel.crashing.org>
28459
28460         * config/rs6000/darwin.md: Replace TARGET_FPRS by 1 and simplify.
28461         * config/rs6000/dfp.md: Ditto.
28462         (negdd2, *negdd2_fpr): Merge.
28463         (absdd2, *absdd2_fpr): Merge.
28464         (negtd2, *negtd2_fpr): Merge.
28465         (abstd2, *abstd2_fpr): Merge.
28466         * config/rs6000/e500.h: Delete file.
28467         * config/rs6000/predicates.md (rs6000_cbranch_operator): Replace
28468         TARGET_FPRS by 1 and simplify.
28469         * config/rs6000/rs6000-c.c: Ditto.
28470         * config/rs6000/rs6000.c: Ditto.  Also replace TARGET_SF_SPE and
28471         TARGET_DF_SPE by 0.
28472         * config/rs6000/rs6000.h: Ditto.  Delete TARGET_SF_SPE and
28473         TARGET_DF_SPE.
28474         * config/rs6000/rs6000.md: Ditto.
28475         (floatdidf2, *floatdidf2_fpr): Merge.
28476         (move_from_CR_gt_bit): Delete.
28477         * config/rs6000/spe.md: Replace TARGET_FPRS by 1 and simplify.
28478         (E500_CR_IOR_COMPARE): Delete.
28479         (All patterns that require !TARGET_FPRS): Delete.
28480         * config/rs6000/vsx.md: Replace TARGET_FPRS by 1 and simplify.
28481
28482 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
28483
28484         * passes.def (pass_iv_canon): Move before pass_loop_distribution.
28485
28486 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
28487
28488         * graphds.c (add_edge): Intitialize edge's attached data.
28489         (foll_in_subgraph, dfs_fst_edge, dfs_next_edge): New function
28490         pointer parameter.  Call pointed function on each edge during
28491         graph traversing.  Skip traversing the edge when the function
28492         returns true.
28493         (graphds_dfs, graphds_scc): Ditto.
28494         (for_each_edge): New parameter.  Pass the new parameter to callback
28495         function.
28496         * graphds.h (skip_edge_callback): New function pointer type.
28497         (graphds_dfs, graphds_scc): New function pointer parameter.
28498         (graphds_edge_callback, for_each_edge): New parameter.
28499
28500 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
28501
28502         * tree-vect-data-refs.c (vect_mark_for_runtime_alias_test): Factor
28503         out code checking if runtime alias check is possible to below ...
28504         Call the new function.
28505         * tree-data-ref.c (runtime_alias_check_p): ... to new function.
28506         * tree-data-ref.h (runtime_alias_check_p): New decalaration.
28507
28508 2017-06-07  Marek Polacek  <polacek@redhat.com>
28509
28510         PR sanitizer/80932
28511         * fold-const.c (extract_muldiv_1) <case MINUS_EXPR>: Add
28512         TYPE_OVERFLOW_WRAPS check.
28513
28514 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
28515
28516         * tree-vect-loop-manip.c (vect_do_peeling): Don't skip vector loop
28517         if versioning is required.
28518         * tree-vect-loop.c (vect_analyze_loop_2): Merge niter check for loop
28519         peeling with the check for versioning.
28520
28521 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
28522
28523         * tree-vectorizer.h (vect_build_loop_niters): New parameter.
28524         * tree-vect-loop-manip.c (vect_build_loop_niters): New parameter.
28525         Set true to new parameter if new ssa variable is defined.
28526         (vect_gen_vector_loop_niters): Refactor.  Set range information
28527         for the new vector loop bound variable.
28528         (vect_do_peeling): Ditto.
28529
28530 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
28531
28532         * tree-affine.c (ssa.h): Include header file.
28533         (tree_to_aff_combination): Handle (T1)(X - CST) when inner type
28534         has wrapping overflow behavior.
28535
28536 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
28537
28538         * tree-affine.c (tree_to_aff_combination): Handle (T1)(X + X).
28539
28540 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
28541
28542         (aff_combination_expand): Move (T1)(X *+- CST) simplification to ...
28543         (tree_to_aff_combination): ... here.
28544
28545 2017-06-07  Bin Cheng  <bin.cheng@arm.com>
28546
28547         * tree-ssa-loop-ivopts.c (ivopts_estimate_reg_pressure): New
28548         reg_pressure model function.
28549         (ivopts_global_cost_for_size): Delete.
28550         (determine_set_costs, iv_ca_recount_cost): Call new model function
28551         ivopts_estimate_reg_pressure.
28552
28553 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
28554
28555         * config/aarch64/aarch64.c (aarch64_rtx_costs): Make sdiv more
28556         expensive than udiv.  Remove floating point cases from mod.
28557
28558 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
28559
28560         * config/arm/aarch-cost-tables.h (cortexa53_extra_cost):
28561         Increase idiv cost.
28562
28563 2017-06-07  Tamar Christina  <tamar.christina@arm.com>
28564
28565         * config/aarch64/aarch64.md
28566         (copysignsf3): Fix mask generation.
28567
28568 2017-06-07  Jakub Jelinek  <jakub@redhat.com>
28569
28570         * dumpfile.h (enum tree_dump_index): Rename TDI_generic to
28571         TDI_gimple.
28572         (class dump_manager): Add register_dumps method.
28573         * dumpfile.c: Include langhooks.h.
28574         (dump_files): Use 0 instead of 3/4/5 for TDI_{original,gimple,nested}.
28575         (FIRST_AUTO_NUMBERED_DUMP): Decrease to 1.
28576         (FIRST_ME_AUTO_NUMBERED_DUMP): Define.
28577         (dump_manager::dump_register): Start with 512 entries instead of 32.
28578         (dump_manager::register_dumps): New method.
28579         * toplev.c (general_init): Instead of invoking register_dumps
28580         langhook, invoke register_dumps method on the dump manager.
28581         * gimplify.c (gimplify_function_tree): Use TDI_gimple instead of
28582         TDI_generic.
28583
28584 2017-06-07  Richard Sandiford  <richard.sandiford@linaro.org>
28585
28586         * doc/md.texi: Clarify the restrictions on a define_insn condition.
28587         Say that # requires an associated define_split to exist, and that
28588         the define_split must be suitable for use after register allocation.
28589
28590 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
28591
28592         * cfgbuild.c (find_bb_boundaries): Initialize profile of split blocks.
28593         (compute_outgoing_frequencies): Also initialize zero counts.
28594         (find_many_sub_basic_blocks): Do not produce uninitialized profile
28595         around loops; preserve more of profile when nothing changes.
28596
28597 2017-06-06  Jim Wilson  <jim.wilson@linaro.org>
28598
28599         * config/aarch64/aarch64-cost-tables.h (qdf24xx_extra_costs): Move to
28600         here.
28601         * config/arm/aarch-cost-tables.h (qdf24xx_extra_costs): From here.
28602         * config/arm/arm-cpu-cdata.h: Regenerate.
28603         * config/arm/arm-cpu-data.h, config/arm/arm-cpu.h: Likewise.
28604         * config/arm/arm-tables.opt, config/arm/arm-tune.md: Likewise.
28605         * config/arm/arm-cpus.in: Delete falkor and qdf24xx entries.
28606         * config/arm/arm.c (arm_qdf24xx_tune): Delete.
28607         * config/arm/bpabi.h (BE8_LINK_SPEC): Delete falkor and qdf24xx
28608         support.
28609         * config/arm/t-aprofile (MULTILIB_MATCHES): Delete falkor and qdf24xx
28610         support.
28611         * config/arm/t-rmprofile: Likewise.
28612         * doc/invoke.texi (ARM Options): Drop falkor and qdf24xx support.
28613
28614 2017-06-06  David S. Miller  <davem@davemloft.net>
28615
28616         PR target/80968
28617         * config/sparc/sparc.c (sparc_expand_prologue): Emit frame
28618         blockage if function uses alloca.
28619
28620 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
28621
28622         * tree-ssa-loop-prefetch.c (struct mem_ref_group, struct mem_ref):
28623         New "uid" fields to hold pretty-print IDs of group and ref.
28624         Memory references are now identified as <group_id>:<ref_id>
28625         instead of using [random] addresses.
28626         (dump_mem_details): Simplify, no functional change.
28627         (dump_mem_ref): Simplify and make output more concise.
28628         Replace couple of fprintf's throughout code with calls to dump_mem_ref.
28629         (find_or_create_group): Initialize group uid.
28630         (record_ref): Initialize ref uid.  Improve debug output.
28631         (prune_group_by_reuse, should_issue_prefetch_p,)
28632         (should_issue_prefetch_p, schedule_prefetches, issue_prefetch_ref,)
28633         (mark_nontemporal_store, determine_loop_nest_reuse):
28634         Improve debug output.
28635
28636 2017-06-06  Maxim Kuvyrkov  <maxim.kuvyrkov@linaro.org>
28637
28638         * dbgcnt.def (prefetch): New debug counter.
28639         * tree-ssa-loop-prefetch.c (dbgcnt.h): New include.
28640         (schedule_prefetches): Stop issueing prefetches if debug counter
28641         tripped.
28642
28643 2017-06-06  Tom de Vries  <tom@codesourcery.com>
28644
28645         * doc/sourcebuild.texi (Testsuites, C Language Testsuites,
28646         gcc.c-torture/compile): Remove mention of NO_LABEL_VALUES in fixme.
28647
28648 2017-06-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28649
28650         * config/aarch64/atomics.md (atomic_compare_and_swap<mode> expander):
28651         Use aarch64_reg_or_zero predicate for operand 4.
28652         (aarch64_compare_and_swap<mode> define_insn_and_split):
28653         Use aarch64_reg_or_zero predicate for operand 3.  Add 'Z' constraint.
28654         (aarch64_store_exclusive<mode>): Likewise for operand 2.
28655
28656 2017-06-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
28657
28658         * config/arm/arm.c (arm_compute_save_reg_mask): Rename into ...
28659         (arm_compute_save_core_reg_mask): This.
28660         (thumb1_compute_save_reg_mask): Rename into ...
28661         (thumb1_compute_save_core_reg_mask): This.
28662         (arm_compute_save_reg0_reg12_mask): Adapt comment.
28663         (arm_compute_frame_layout): Likewise.
28664
28665 2017-06-06  Richard Biener  <rguenther@suse.de>
28666
28667         PR tree-optimization/80974
28668         * tree-ssa-sccvn.c (set_ssa_val_to): Do not change but only
28669         keep or clear leaders SSA info.
28670
28671 2017-06-06  Tom de Vries  <tom@codesourcery.com>
28672
28673         * config/nvptx/nvptx.c (split_mode_p): New function.
28674         (nvptx_declare_function_name, nvptx_print_operand): Use split_mode_p.
28675
28676 2017-06-06  Tom de Vries  <tom@codesourcery.com>
28677
28678         * config/nvptx/nvptx.c (nvptx_print_operand): Use maybe_split_mode.
28679
28680 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
28681
28682         PR bootstrap/80978
28683         * tree-cfg.c (execute_fixup_cfg): Fix condition on when to rescale
28684         profile.
28685
28686 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
28687
28688         * shrink-wrap.c (handle_simple_exit): Update profile.
28689         (try_shrink_wrapping): Upate profile.
28690
28691 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
28692
28693         * predict.c (tree_estimate_probability_bb): Add LOCAL_ONLY.
28694         (tree_guess_outgoing_edge_probabilities): New.
28695         * predict.h (tree_guess_outgoing_edge_probabilities): Declare.
28696         * tree-cfg.c (gimple_find_sub_bbs): Propagate profile.
28697
28698 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
28699
28700         * ipa-split.c (split_function): Initialize return bb profile.
28701
28702 2017-06-06  Jan Hubicka  <hubicka@ucw.cz>
28703
28704         * profile.c (compute_branch_probabilities): Also initialize
28705         EXIT_BLOCK profile.
28706
28707 2017-06-06  Richard Biener  <rguenther@suse.de>
28708
28709         PR tree-optimization/80928
28710         * tree-vect-loop.c (vect_update_vf_for_slp): Amend dumps.
28711         (vect_analyze_loop_operations): Properly guard analysis for
28712         pure SLP case.
28713         (vect_transform_loop): Likewise.
28714         (vect_analyze_loop_2): Also reset SLP type on PHIs.
28715         (vect_model_induction_cost): Do not cost for pure SLP.
28716         (vectorizable_induction): Pass in SLP node, implement SLP vectorization
28717         of induction in inner loop vectorization.
28718         * tree-vect-slp.c (vect_create_new_slp_node): Handle PHIs.
28719         (vect_get_and_check_slp_defs): Handle vect_induction_def.
28720         (vect_build_slp_tree): Likewise.  Handle PHIs as terminating the
28721         recursion.
28722         (vect_analyze_slp_cost_1): Cost induction.
28723         (vect_detect_hybrid_slp_stmts): Handle PHIs.
28724         (vect_get_slp_vect_defs): Likewise.
28725         * tree-vect-stmts.c (vect_analyze_stmt): Handle induction.
28726         (vect_transform_stmt): Handle SLP reductions.
28727         * tree-vectorizer.h (vectorizable_induction): Adjust.
28728
28729 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
28730
28731         * config/rs6000/rs6000.c (make_resolver_func): Update
28732         init_lowered_empty_function call.
28733
28734 2017-06-05  Bernd Edlinger  <bernd.edlinger@hotmail.de>
28735
28736         * doc/invoke.texi: Document the -fprofile-abs-path option.
28737         * common.opt (fprofile-abs-path): New option.
28738         * gcov-io.h (gcov_write_filename): Declare.
28739         * gcov-io.c (gcov_write_filename): New function.
28740         * coverage.c (coverage_begin_function): Use gcov_write_filename.
28741         * profile.c (output_location): Likewise.
28742
28743 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
28744
28745         * shring-wrap.c: Revert accidental commit.
28746
28747 2017-06-05  Volker Reichelt  <v.reichelt@netcologne.de>
28748
28749         * doc/invoke.texi (-Wduplicated-branches): Add to warning list.
28750
28751 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
28752
28753         * cfgexpand.c (expand_gimple_tailcall): Initialize profile of
28754         new edge.
28755         * ipa-inline.c (want_inline_self_recursive_call_p): Watch for missing
28756         profile in callgraph edge.
28757         * profile-count.h (apply_probability): If THIS is 0, then result is 0
28758         (apply_scale): Likewise.
28759         * tree-inline.c (copy_bb, copy_edges_for_bb, copy_cfg_body):
28760         Also scale profile when inlining function with zero profile.
28761         (initialize_cfun): Update exit block profile even when it is zero.
28762         * tree-ssa-threadupdate.c (clear_counts_path): Handle correctly case
28763         when profile is read.
28764
28765 2017-06-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
28766
28767         * config/rs6000/rs6000.c (toplevel): Include attribs.h.
28768         (CLONE_*): New constants to define the processors we can generate
28769         code for with the target_clone attribute.
28770         (rs6000_clone_map): New array to identify which clone processors
28771         the current program is running on.
28772         (TARGET_COMPARE_VERSION_PRIORITY): Define to enable the
28773         target_clone attribute.
28774         (TARGET_GENERATE_VERSION_DISPATCHER_BODY): Likewise.
28775         (TARGET_GET_FUNCTION_VERSIONS_DISPATCHER): Likewise.
28776         (TARGET_OPTION_FUNCTION_VERSIONS): Likewise.
28777         (cpu_expand_builtin): Add support for target_clone attribute.
28778         (rs6000_valid_attribute_p): Allow "default" attribute.
28779         (get_decl_name): New debug function to simplify printing the
28780         current function name in debugging statements.
28781         (rs6000_clone_priority): New functions to support the target_clone
28782         attribute, and be able to generate code to switch between ISA 2.05
28783         through ISA 3.0 (power6 through power9).
28784         (rs6000_compare_version_priority): Likewise.
28785         (rs6000_get_function_versions_dispatcher): Likewise.
28786         (make_resolver_func): Likewise.
28787         (add_condition_to_bb): Likewise.
28788         (dispatch_function_versions): Likewise.
28789         (rs6000_generate_version_dispatcher_body): Likewise.
28790         (rs6000_can_inline_p): Call get_decl_name for debugging usage.
28791         (fusion_gpr_load_p): Fix a spacing issue.
28792         * doc/extend.texi (Common Function Attributes): Document that the
28793         PowerPC supports the target_clone attribute.
28794
28795 2017-06-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
28796
28797         * config/arm/arm.h: explain F symbol found in description of ARM
28798         register allocation in its legend.
28799
28800 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
28801
28802         * config/mips/frame-header-opt.c: Include profile-count.h.
28803         * config/riscv/riscv.c: Include profile-count.h
28804
28805 2017-06-05  Jan Hubicka  <hubicka@ucw.cz>
28806
28807         * tree-ssa-loop-im.c (execute_sm_if_changed): Add FLAG_BBS parameter;
28808         update profile.
28809         (sm_set_flag_if_changed): Add bbs field.
28810         (execute_sm_if_changed_flag_set): Pass BBS.
28811         (execute_sm): Update.
28812
28813 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28814
28815         * config/aarch64/aarch64-simd.md (aarch64_store_lane0<mode>):
28816         New pattern.
28817
28818 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28819
28820         * config/aarch64/aarch64.md (sub<mode>3_compare1_imm): New define_insn.
28821         (peephole2): New peephole2 to emit the above.
28822         * config/aarch64/predicates.md (aarch64_sub_immediate): New predicate.
28823
28824 2017-06-05  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
28825
28826         * config/aarch64/aarch64.c (define_peephole2 above
28827         *sub_<shift>_<mode>): New peephole.
28828
28829 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
28830
28831         * config/i386/i386.c (make_resolver_func): Update.
28832         * Makefile.in: Add profile-count.h and profile-count.o
28833         * auto-profile.c (afdo_indirect_call): Update to new API.
28834         (afdo_set_bb_count): Update.
28835         (afdo_propagate_edge): Update.
28836         (afdo_propagate_circuit): Update.
28837         (afdo_calculate_branch_prob): Update.
28838         (afdo_annotate_cfg): Update.
28839         * basic-block.h: Include profile-count.h
28840         (struct edge_def): Turn count to profile_count.
28841         (struct basic_block_def): Likewie.
28842         (REG_BR_PROB_BASE): Move to profile-count.h
28843         (RDIV): Move to profile-count.h
28844         * bb-reorder.c (max_entry_count): Turn to profile_count.
28845         (find_traces): Update.
28846         (rotate_loop):Update.
28847         (connect_traces):Update.
28848         (sanitize_hot_paths):Update.
28849         * bt-load.c (migrate_btr_defs): Update.
28850         * cfg.c (RDIV): Remove.
28851         (init_flow): Use alloc_block.
28852         (alloc_block): Uninitialize count.
28853         (unchecked_make_edge): Uninitialize count.
28854         (check_bb_profile): Update.
28855         (dump_edge_info): Update.
28856         (dump_bb_info): Update.
28857         (update_bb_profile_for_threading): Update.
28858         (scale_bbs_frequencies_int): Update.
28859         (scale_bbs_frequencies_gcov_type): Update.
28860         (scale_bbs_frequencies_profile_count): New.
28861         * cfg.h (update_bb_profile_for_threading): Update.
28862         (scale_bbs_frequencies_profile_count): Declare.
28863         * cfgbuild.c (compute_outgoing_frequencies): Update.
28864         (find_many_sub_basic_blocks): Update.
28865         * cfgcleanup.c (try_forward_edges): Update.
28866         (try_crossjump_to_edge): Update.
28867         * cfgexpand.c (expand_gimple_tailcall): Update.
28868         (construct_exit_block): Update.
28869         * cfghooks.c (verify_flow_info): Update.
28870         (dump_bb_for_graph): Update.
28871         (split_edge): Update.
28872         (make_forwarder_block): Update.
28873         (duplicate_block): Update.
28874         (account_profile_record): Update.
28875         * cfgloop.c (find_subloop_latch_edge_by_profile): Update.
28876         (get_estimated_loop_iterations): Update.
28877         * cfgloopanal.c (expected_loop_iterations_unbounded): Update.
28878         (single_likely_exit): Update.
28879         * cfgloopmanip.c (scale_loop_profile): Update.
28880         (loopify): Update.
28881         (set_zero_probability): Update.
28882         (lv_adjust_loop_entry_edge): Update.
28883         * cfgrtl.c (force_nonfallthru_and_redirect): Update.
28884         (purge_dead_edges): Update.
28885         (rtl_account_profile_record): Update.
28886         * cgraph.c (cgraph_node::create): Uninitialize count.
28887         (symbol_table::create_edge): Uninitialize count.
28888         (cgraph_update_edges_for_call_stmt_node): Update.
28889         (cgraph_edge::dump_edge_flags): Update.
28890         (cgraph_node::dump): Update.
28891         (cgraph_edge::maybe_hot_p): Update.
28892         * cgraph.h: Include profile-count.h
28893         (create_clone), create_edge, create_indirect_edge): Update.
28894         (cgraph_node): Turn count to profile_count.
28895         (cgraph_edge0: Likewise.
28896         (make_speculative, clone): Update.
28897         (create_edge): Update.
28898         (init_lowered_empty_function): Update.
28899         * cgraphclones.c (cgraph_edge::clone): Update.
28900         (duplicate_thunk_for_node): Update.
28901         (cgraph_node::create_clone): Update.
28902         * cgraphunit.c (cgraph_node::analyze): Update.
28903         (cgraph_node::expand_thunk): Update.
28904         * final.c (dump_basic_block_info): Update.
28905         * gimple-streamer-in.c (input_bb): Update.
28906         * gimple-streamer-out.c (output_bb): Update.
28907         * graphite.c (print_global_statistics): Update.
28908         (print_graphite_scop_statistics): Update.
28909         * hsa-brig.c: Include basic-block.h.
28910         * hsa-dump.c: Include basic-block.h.
28911         * hsa-gen.c (T sum_slice): Update.
28912         (convert_switch_statements):Update.
28913         * hsa-regalloc.c: Include basic-block.h.
28914         * ipa-chkp.c (chkp_produce_thunks): Update.
28915         * ipa-cp.c (struct caller_statistics): Update.
28916         (init_caller_stats): Update.
28917         (gather_caller_stats): Update.
28918         (ipcp_cloning_candidate_p): Update.
28919         (good_cloning_opportunity_p): Update.
28920         (get_info_about_necessary_edges): Update.
28921         (dump_profile_updates): Update.
28922         (update_profiling_info): Update.
28923         (update_specialized_profile): Update.
28924         (perhaps_add_new_callers): Update.
28925         (decide_about_value): Update.
28926         (ipa_cp_c_finalize): Update.
28927         * ipa-devirt.c (struct odr_type_warn_count): Update.
28928         (struct decl_warn_count): Update.
28929         (struct final_warning_record): Update.
28930         (possible_polymorphic_call_targets): Update.
28931         (ipa_devirt): Update.
28932         * ipa-fnsummary.c (redirect_to_unreachable): Update.
28933         * ipa-icf.c (sem_function::merge): Update.
28934         * ipa-inline-analysis.c (do_estimate_edge_time): Update.
28935         * ipa-inline.c (compute_uninlined_call_time): Update.
28936         (compute_inlined_call_time): Update.
28937         (want_inline_small_function_p): Update.
28938         (want_inline_self_recursive_call_p): Update.
28939         (edge_badness): Update.
28940         (lookup_recursive_calls): Update.
28941         (recursive_inlining): Update.
28942         (inline_small_functions): Update.
28943         (dump_overall_stats): Update.
28944         (dump_inline_stats): Update.
28945         * ipa-profile.c (ipa_profile_generate_summary): Update.
28946         (ipa_propagate_frequency): Update.
28947         (ipa_profile): Update.
28948         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
28949         * ipa-utils.c (ipa_merge_profiles): Update.
28950         * loop-doloop.c (doloop_modify): Update.
28951         * loop-unroll.c (report_unroll): Update.
28952         (unroll_loop_runtime_iterations): Update.
28953         * lto-cgraph.c (lto_output_edge): Update.
28954         (lto_output_node): Update.
28955         (input_node): Update.
28956         (input_edge): Update.
28957         (merge_profile_summaries): Update.
28958         * lto-streamer-in.c (input_cfg): Update.
28959         * lto-streamer-out.c (output_cfg): Update.
28960         * mcf.c (create_fixup_graph): Update.
28961         (adjust_cfg_counts): Update.
28962         (sum_edge_counts): Update.
28963         * modulo-sched.c (sms_schedule): Update.
28964         * postreload-gcse.c (eliminate_partially_redundant_load): Update.
28965         * predict.c (maybe_hot_count_p): Update.
28966         (probably_never_executed): Update.
28967         (dump_prediction): Update.
28968         (combine_predictions_for_bb): Update.
28969         (propagate_freq): Update.
28970         (handle_missing_profiles): Update.
28971         (counts_to_freqs): Update.
28972         (rebuild_frequencies): Update.
28973         (force_edge_cold): Update.
28974         * predict.h: Include profile-count.h
28975         (maybe_hot_count_p, counts_to_freqs): UPdate.
28976         * print-rtl-function.c: Do not include cfg.h
28977         * print-rtl.c: Include basic-block.h
28978         * profile-count.c: New file.
28979         * profile-count.h: New file.
28980         * profile.c (is_edge_inconsistent): Update.
28981         (correct_negative_edge_counts): Update.
28982         (is_inconsistent): Update.
28983         (set_bb_counts): Update.
28984         (read_profile_edge_counts): Update.
28985         (compute_frequency_overlap): Update.
28986         (compute_branch_probabilities): Update; Initialize and deinitialize
28987         gcov_count tables.
28988         (branch_prob): Update.
28989         * profile.h (bb_gcov_counts, edge_gcov_counts): New.
28990         (edge_gcov_count): New.
28991         (bb_gcov_count): New.
28992         * shrink-wrap.c (try_shrink_wrapping): Update.
28993         * tracer.c (better_p): Update.
28994         * trans-mem.c (expand_transaction): Update.
28995         (ipa_tm_insert_irr_call): Update.
28996         (ipa_tm_insert_gettmclone_call): Update.
28997         * tree-call-cdce.c: Update.
28998         * tree-cfg.c (gimple_duplicate_sese_region): Update.
28999         (gimple_duplicate_sese_tail): Update.
29000         (gimple_account_profile_record): Update.
29001         (execute_fixup_cfg): Update.
29002         * tree-inline.c (copy_bb): Update.
29003         (copy_edges_for_bb): Update.
29004         (initialize_cfun): Update.
29005         (freqs_to_counts): Update.
29006         (copy_cfg_body): Update.
29007         (expand_call_inline): Update.
29008         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): Update.
29009         * tree-ssa-loop-ivcanon.c (unloop_loops): Update.
29010         (try_unroll_loop_completely): Update.
29011         (try_peel_loop): Update.
29012         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Update.
29013         * tree-ssa-loop-niter.c (estimate_numbers_of_iterations_loop): Update.
29014         * tree-ssa-loop-split.c (connect_loops): Update.
29015         * tree-ssa-loop-unswitch.c (hoist_guard): Update.
29016         * tree-ssa-reassoc.c (branch_fixup): Update.
29017         * tree-ssa-tail-merge.c (replace_block_by): Update.
29018         * tree-ssa-threadupdate.c (create_block_for_threading): Update.
29019         (compute_path_counts): Update.
29020         (update_profile): Update.
29021         (recompute_probabilities): Update.
29022         (update_joiner_offpath_counts): Update.
29023         (estimated_freqs_path): Update.
29024         (freqs_to_counts_path): Update.
29025         (clear_counts_path): Update.
29026         (ssa_fix_duplicate_block_edges): Update.
29027         (duplicate_thread_path): Update.
29028         * tree-switch-conversion.c (case_bit_test_cmp): Update.
29029         (struct switch_conv_info): Update.
29030         * tree-tailcall.c (decrease_profile): Update.
29031         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Update.
29032         * tree-vect-loop.c (scale_profile_for_vect_loop): Update.
29033         * value-prof.c (check_counter): Update.
29034         (gimple_divmod_fixed_value): Update.
29035         (gimple_mod_pow2): Update.
29036         (gimple_mod_subtract): Update.
29037         (gimple_ic_transform): Update.
29038         (gimple_stringop_fixed_value): Update.
29039         * value-prof.h (gimple_ic): Update.
29040
29041 2017-06-02  Carl Love  <cel@us.ibm.com>
29042
29043         * config/rs6000/rs6000-c: Add support for built-in functions
29044         vector double vec_doublee (vector signed int);
29045         vector double vec_doublee (vector unsigned int);
29046         vector double vec_doublee (vector float);
29047         vector double vec_doubleh (vector signed int);
29048         vector double vec_doubleh (vector unsigned int);
29049         vector double vec_doubleh (vector float);
29050         vector double vec_doublel (vector signed int);
29051         vector double vec_doublel (vector unsigned int);
29052         vector double vec_doublel (vector float);
29053         vector double vec_doubleo (vector signed int);
29054         vector double vec_doubleo (vector unsigned int);
29055         vector double vec_doubleo (vector float);.
29056         * config/rs6000/rs6000-builtin.def: Add definitions for DOUBLEE,
29057         DOUBLEO, DOUBLEH, DOUBLEL, UNS_DOUBLEO, UNS_DOUBLEE, UNS_DOUBLEH,
29058         UNS_DOUBLEL.
29059         * config/rs6000/altivec.md: Add code generator for doublee<mode>2,
29060         unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2, doubleh<mode>2,
29061         unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2, add mode attribute
29062         VS_sxwsp.
29063         * config/rs6000/altivec.h: Add define for vec_doublee, vec_doubleo,
29064         vec_doublel, vec_doubleh.
29065         * doc/extend.texi: Update the built-in documentation file for the
29066         new built-in functions.
29067
29068 2017-06-02  David Malcolm  <dmalcolm@redhat.com>
29069
29070         PR jit/80954
29071         * ipa-inline-analysis.c (free_growth_caches): Set
29072         edge_removal_hook_holder to NULL after removing it.
29073
29074 2017-06-02  Sudakshina Das  <sudi.das@arm.com>
29075
29076         * config/aarch64/aarch64.c (aarch64_select_cc_mode): Return CC_SWP for
29077         comparision with zero.
29078
29079 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
29080         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
29081         for early expansion of vec_min and vec_max builtins.
29082         (builtin_function_type): Add min/max unsigned variants to those
29083         identified as having unsigned arguments.
29084
29085 2017-06-02  Olivier Hainque  <hainque@adacore.com>
29086
29087         * config/vx-common.h (DWARF_UNWIND_INFO): Switch #define to 1.
29088
29089 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29090
29091         * config/aarch64/aarch64-simd.md (*aarch64_simd_vec_copy_lane<mode>):
29092         Use VALL_F16 iterator rather than VALL.
29093
29094 2017-06-02  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
29095
29096         * config/aarch64/aarch64.c (aarch64_split_compare_and_swap):
29097         Emit CBNZ inside loop when doing a strong exchange and comparing
29098         against zero.  Generate the CC flags after the loop.
29099
29100 2017-06-02  David Edelsohn  <dje.gcc@gmail.com>
29101
29102         * dwarf2out.c (DWARF_INITIAL_LENGTH_SIZE_STR): New.
29103         (dl_section_ref): New.
29104         (dwarf2out_finish): Copy debug_line_section_label to dl_section_ref.
29105         On AIX, append an expression to subtract the size of the
29106         section length to dl_section_ref.
29107
29108 2017-06-02  Will Schmidt  <will_schmidt@vnet.ibm.com>
29109
29110         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling
29111         for early expansion of vector absolute builtins.
29112
29113 2017-06-02  Richard Biener  <rguenther@suse.de>
29114
29115         * tree-vect-slp.c (vect_detect_hybrid_slp_2): Match up
29116         what we consider a relevant use stmt with vect_detect_hybrid_slp_stmts.
29117
29118 2017-06-02  Richard Biener  <rguenther@suse.de>
29119
29120         PR tree-optimization/80948
29121         * tree-tailcall.c (find_tail_calls): Track stmts to move in
29122         stmt order as well.
29123
29124 2017-06-02  Richard Biener  <rguenther@suse.de>
29125
29126         * tree-vect-loop.c (vect_analyze_loop_operations): Not relevant
29127         PHIs are ok.
29128         * tree-vect-stmts.c (process_use): Do not mark backedge defs
29129         for inductions as relevant.
29130
29131 2017-06-02  Richard Biener  <rguenther@suse.de>
29132
29133         * tree-vect-loop.c (get_initial_def_for_induction): Inline into ...
29134         (vectorizable_induction): ... this.  Remove dead code.
29135
29136 2017-06-02  Eric Botcazou  <ebotcazou@adacore.com>
29137
29138         * builtins. (expand_builtin_alloca): Remove second parameter and
29139         infer its value from the first parameter instead.
29140         (expand_builtin) <BUILT_IN_ALLOCA>: Adjust call to above.
29141
29142 2017-06-02  Jakub Jelinek  <jakub@redhat.com>
29143
29144         PR rtl-optimization/80903
29145         * loop-doloop.c (add_test): Unshare sequence.
29146
29147 2017-06-02  Bernd Edlinger  <bernd.edlinger@hotmail.de>
29148
29149         * doc/invoke.texi: Document the -Wsizeof-pointer-div warning.
29150
29151 2017-06-01  Bernd Edlinger  <bernd.edlinger@hotmail.de>
29152
29153         * config/i386/i386.c (x86_64_ms_sysv_extra_clobbered_registers): Make
29154         static.
29155         (xlogue_layout::get_stack_space_used, xlogue_layout::s_instances,
29156         xlogue_layout::get_instance, logue_layout::xlogue_layout,
29157         sp_valid_at, fp_valid_at, choose_basereg): Formatting.
29158         (xlogue_layout::get_stub_rtx): Make static.
29159         (xlogue_layout::get_stub_name): Avoid const-cast, make static.
29160         (xlogue_layout::compute_stub_managed_regs): Rename to...
29161         (xlogue_layout::count_stub_managed_regs): ...this.
29162         (xlogue_layout::is_stub_managed_reg): New function.
29163         (xlogue_layout::m_stub_names): Rename to...
29164         (xlogue_layout::s_stub_names): ...this, make static.
29165         (xlogue_layout::STUB_INDEX_OFFSET, xlogue_layout::MIN_REGS,
29166         xlogue_layout::MAX_REGS, xlogue_layout::MAX_EXTRA_REGS,
29167         xlogue_layout::VARIANT_COUNT, xlogue_layout::STUB_NAME_MAX_LEN,
29168         xlogue_layout::s_stub_names): Instantiate statics.
29169         (stub_managed_regs): Remove.
29170         (ix86_save_reg): Use xlogue_layout::compute_stub_managed_regs.
29171         (disable_call_ms2sysv_xlogues): Rename to...
29172         (warn_once_call_ms2sysv_xlogues): ...this, and warn only once.
29173         (ix86_initial_elimination_offset, ix86_expand_call): Fix call_ms2sysv
29174         warning logic.
29175         (ix86_static_chain): Make sure that ix86_static_chain_on_stack can't
29176         change after reload_completed.
29177         (ix86_can_use_return_insn_p): Use the ix86_frame data structure
29178         directly.
29179         (ix86_expand_prologue): Likewise.
29180         (ix86_expand_epilogue): Likewise.
29181         (ix86_expand_split_stack_prologue): Likewise.
29182         (ix86_compute_frame_layout): Remove frame parameter ...
29183         (TARGET_COMPUTE_FRAME_LAYOUT): ... and export it as a target hook.
29184         (ix86_finalize_stack_realign_flags): Call ix86_compute_frame_layout
29185         only if necessary.
29186         (ix86_init_machine_status): Don't set use_fast_prologue_epilogue_nregs.
29187         (ix86_frame): Move from here ...
29188         * config/i386/i386.h (ix86_frame): ... to here.
29189         (machine_function): Remove use_fast_prologue_epilogue_nregs, cache the
29190         complete ix86_frame data structure instead.  Remove some_ld_name.
29191
29192 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
29193
29194         * dwarf2out.c (dwarf2out_late_global_decl): Add locations for
29195         symbols that hold a DECL_VALUE_EXPR.
29196
29197 2017-06-01  Martin Jambor  <mjambor@suse.cz>
29198
29199         PR tree-optimization/80898
29200         * tree-sra.c (process_subtree_disqualification): Removed.
29201         (disqualify_candidate): Do not acll
29202         process_subtree_disqualification.
29203         (subtree_mark_written_and_enqueue): New function.
29204         (propagate_all_subaccesses): Set grp_write of LHS subtree if the
29205         RHS has been disqualified and re-queue LHS if necessary.  Apart
29206         from that, ignore disqualified RHS.
29207
29208 2017-06-01  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29209
29210         * config/s390/s390.c (s390_emit_epilogue): Disable early return
29211         address fetch for z10 or later.
29212
29213 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
29214
29215         * config/arc/arc.md (tst_movb): Add guard when splitting.
29216
29217 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
29218
29219         * config/arc/arc.c (arc_can_eliminate): Test against
29220         arc_frame_pointer_needed.
29221
29222 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
29223
29224         * config/arc/arc.c (arc_expand_prologue): Emit a special barrier
29225         to prevent store reordering.
29226         * config/arc/arc.md (UNSPEC_ARC_STKTIE): Define.
29227         (type): Add block type.
29228         (stack_tie): Define special instruction to be used in
29229         expand_prologue.
29230
29231 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
29232
29233         * config/arc/arc.md (commutative_binary_comparison): Remove 'I'
29234         constraint. It is not valid for the pattern.
29235         (noncommutative_binary_comparison): Likewise.
29236
29237 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
29238
29239         * config/arc/simdext.md (movv2hi_insn): Change predicate to avoid
29240         scaled addresses.
29241
29242 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
29243
29244         * config/arc/arc.c (arc_conditional_register_usage): Allow r30 to
29245         be used by the reg-alloc.
29246
29247 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
29248
29249         * config/arc/arc.md (mulsi3): Avoid use of hard registers before
29250         reg-alloc when having mul64 or mul32x16 instructions.
29251         (mulsidi3): Likewise.
29252         (umulsidi3): Likewise.
29253         (mulsi32x16): New pattern.
29254         (mulsi64): Likewise.
29255         (mulsidi64): Likewise.
29256         (umulsidi64): Likewise.
29257         (MUL32x16_REG): Define.
29258         (mul64_600): Use MUL32x16_REG.
29259         (mac64_600): Likewise.
29260         (umul64_600): Likewise.
29261         (umac64_600): Likewise.
29262
29263 2017-06-01  Claudiu Zissulescu  <claziss@synopsys.com>
29264
29265         * config/arc/arc.md (mulsi3_700): Make it commutative.
29266
29267 2017-06-01  Jose E. Marchesi  <jose.marchesi@oracle.com>
29268
29269         * config/sparc/sparc.md (*zero_extendsidi2_insn_sp64): Set insn
29270         type for movstouw.
29271         (*sign_extendsidi2_insn): Likewise for movstosw.
29272
29273 2017-06-01  Pierre-Marie de Rodat  <derodat@adacore.com>
29274
29275         * dwarf2out.c (get_discr_value): Call the get_debug_type hook on
29276         the type of the input discriminant value.  Convert the
29277         discriminant value of signedness vary.
29278
29279 2017-06-01  Volker Reichelt  <v.reichelt@netcologne.de>
29280
29281         * doc/invoke.texi (-Wcatch-value): Document new shortcut.
29282         Add to -Wall section.
29283
29284 2017-06-01  Richard Biener  <rguenther@suse.de>
29285
29286         PR middle-end/66313
29287         * fold-const.c (fold_plusminus_mult_expr): If the factored
29288         factor may be zero use a wrapping type for the inner operation.
29289         * tree-tailcall.c (independent_of_stmt_p): Pass in to_move bitmap
29290         and handle moved defs.
29291         (process_assignment): Properly guard the unary op case.  Return a
29292         tri-state indicating that moving the stmt before the call may allow
29293         to continue.  Pass through to_move.
29294         (find_tail_calls): Handle moving unrelated defs before
29295         the call.
29296
29297 2017-05-31  Segher Boessenkool  <segher@kernel.crashing.org>
29298
29299         PR target/80618
29300         * config/rs6000/vector.md (*vector_uneq<mode>): Write the nor in the
29301         splitter result in the canonical way.
29302
29303 2017-05-31  Uros Bizjak  <ubizjak@gmail.com>
29304
29305         * config/i386/i386.md (*zero_extendsidi2): Enable alternative (?r, *Yj)
29306         also for 32bit target.  Update insn attributes.
29307         (zero-extendsidi2 splitter): Allow all registers for operand 1.
29308
29309 2017-05-31  Sebastian Peryt  <sebastian.peryt@intel.com>
29310
29311         * config/i386/avx512fintrin.h (_mm_mask_max_sd)
29312         (_mm_maskz_max_sd, _mm_mask_max_ss, _mm_maskz_max_ss)
29313         (_mm_mask_min_sd, _mm_maskz_min_sd, _mm_mask_min_ss)
29314         (_mm_maskz_min_ss): New intrinsics.
29315
29316 2017-05-31  Martin Liska  <mliska@suse.cz>
29317
29318         * tree-vect-loop.c (vect_create_epilog_for_reduction):
29319         Change comment style to one we normally use.
29320         (vectorizable_reduction): Likewise.
29321         (vectorizable_induction): Likewise.
29322         * tree-vect-stmts.c (vectorizable_mask_load_store): Likewise.
29323         (vectorizable_call): Likewise.
29324         (vectorizable_simd_clone_call): Likewise.
29325         (vectorizable_conversion): Likewise.
29326         (vectorizable_assignment): Likewise.
29327         (vectorizable_shift): Likewise.
29328         (vectorizable_operation): Likewise.
29329         (vectorizable_store): Likewise.
29330         (vectorizable_load): Likewise.
29331         * tree-vectorizer.h: Likewise.
29332
29333 2017-05-31  Alexander Monakov  <amonakov@ispras.ru>
29334
29335         * passes.c (emergency_dump_function): New.
29336         * tree-pass.h (emergency_dump_function): Declare.
29337         * plugin.c (plugins_internal_error_function): Remove.
29338         * plugin.h (plugins_internal_error_function): Remove declaration.
29339         * toplev.c (internal_error_function): New static function.  Use it...
29340         (general_init): ...here.
29341
29342 2017-05-31  Graham Markall  <graham.markall@embecosm.com>
29343
29344         * config/arc/arc.c (arc_print_operand): Handle constant operands.
29345         (arc_rtx_costs): Add costs for new patterns.
29346         * config/arc/arc.md: Additional *add_n and *sub_n patterns.
29347         * config/arc/predicates.md: Add _1_2_3_operand predicate.
29348
29349 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
29350
29351         * tree-ssa-strlen.c (get_next_strinfo): New function.
29352         (get_stridx_plus_constant): Use it.
29353         (zero_length_string): Likewise.
29354         (adjust_related_strinfos): Likewise.
29355         (adjust_last_stmt): Likewise.
29356
29357 2017-05-31  Richard Biener  <rguenther@suse.de>
29358
29359         PR target/80880
29360         * config/i386/i386.c (ix86_expand_builtin): Remove assert
29361         for arg being an SSA name when expanding IX86_BUILTIN_BNDRET.
29362
29363 2017-05-31  Richard Sandiford  <richard.sandiford@linaro.org>
29364
29365         * tree-vect-data-refs.c (vect_find_same_alignment_drs): Remove
29366         loop_vinfo argument and use of dependence distance vectors.
29367         Check instead whether the two references differ only in their
29368         initial value and assume that they have the same alignment if the
29369         difference is a multiple of the vector alignment.
29370         (vect_analyze_data_refs_alignment): Update call accordingly.
29371
29372 2017-05-31  Martin Liska  <mliska@suse.cz>
29373
29374         PR target/79155
29375         * config/i386/cpuid.h: Fix typo in a comment in cpuid.h.
29376
29377 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
29378
29379         * tree-vect-loop-manip.c (create_intersect_range_checks_index)
29380         (create_intersect_range_checks): Move from ...
29381         * tree-data-ref.c (create_intersect_range_checks_index)
29382         (create_intersect_range_checks): ... to here.
29383         (create_runtime_alias_checks): New function factored from ...
29384         * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): ...
29385         here.  Call above function.
29386         * tree-data-ref.h (create_runtime_alias_checks): New function.
29387
29388 2017-05-31  Bin Cheng  <bin.cheng@arm.com>
29389
29390         * tree-data-ref.c (prune_runtime_alias_test_list): Relax minimal
29391         segment length for dr_b and compute it in wide_int.
29392
29393 2017-05-31  Richard Biener  <rguenther@suse.de>
29394
29395         PR tree-optimization/80906
29396         * graphite-isl-ast-to-gimple.c (copy_loop_close_phi_nodes): Get
29397         and pass through iv_map.
29398         (copy_bb_and_scalar_dependences): Adjust.
29399         (translate_pending_phi_nodes): Likewise.
29400         (copy_loop_close_phi_args): Handle code-generating IVs instead
29401         of ICEing.
29402
29403 2017-05-30  David Malcolm  <dmalcolm@redhat.com>
29404
29405         * diagnostic-color.c (color_dict): Add "type-diff".
29406         (parse_gcc_colors): Update comment.
29407         * doc/invoke.texi (Diagnostic Message Formatting Options): Add
29408         -fdiagnostics-show-template-tree and -fno-elide-type.
29409         (GCC_COLORS): Add type-diff to example.
29410         (type-diff=): New.
29411         (-fdiagnostics-show-template-tree): New.
29412         (-fno-elide-type): New.
29413         * pretty-print.c (pp_format): Pass quote and formatters[argno] to
29414         the pp_format_decoder callback.  Call any m_format_postprocessor's
29415         "handle" method.
29416         (pretty_printer::pretty_printer): Initialize
29417         m_format_postprocessor.
29418         (pretty_printer::~pretty_printer): Delete any
29419         m_format_postprocessor.
29420         * pretty-print.h (printer_fn): Add bool and const char ** parameters.
29421         (class format_postprocessor): New class.
29422         (struct pretty_printer::format_decoder): Document the new parameters.
29423         (struct pretty_printer::m_format_postprocessor): New field.
29424         * tree-diagnostic.c (default_tree_printer): Update for new
29425         bool and const char ** params.
29426         * tree-diagnostic.h (default_tree_printer): Likewise.
29427
29428 2017-05-30  Segher Boessenkool  <segher@kernel.crashing.org>
29429
29430         * config/rs6000/predicates.md (cc_reg_not_micro_cr0_operand): Delete.
29431         (lwa_operand): Delete rs6000_gen_cell_microcode test.
29432         * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
29433         rs6000_gen_cell_microcode code.
29434         (rs6000_final_prescan_insn): Delete.
29435         (rs6000_opt_vars): Delete the "gen-cell-microcode" and
29436         "warn-cell-microcode" entries.
29437         * config/rs6000/rs6000.h (FINAL_PRESCAN_INSN): Delete.
29438         * config/rs6000/rs6000.md: Delete rs6000_gen_cell_microcode tests
29439         throughout.  Change cc_reg_not_micro_cr0_operand to
29440         cc_reg_not_cr0_operand throughout.
29441         (*extendhi<mode>2_noload): Delete.
29442         * config/rs6000/rs6000.opt (mgen-cell-microcode): Replace by stub.
29443         (mwarn-cell-microcode): Delete.
29444         * doc/invoke.texi (RS/6000 and PowerPC Options): Delete
29445         -mgen-cell-microcode and -mwarn-cell-microcode.
29446
29447 2017-05-30  Uros Bizjak  <ubizjak@gmail.com>
29448
29449         PR target/80833
29450         * config/i386/constraints.md (Yd): New constraint.
29451         (Ye): Ditto.
29452         * config/i386/i386.md (*movti_internal): Add (?r, Ye)
29453         and (?Yd, r) alternatives.  Update insn attributes.
29454         * config/i386/i386.md (*movti_internal): Add (?r, *Ye)
29455         and (?*Yd, r) alternatives.  Update insn attributes.
29456         (double-mode inter-unit splitters): Add new GR<->XMM splitters.
29457
29458 2017-05-30  Pierre-Marie de Rodat  <derodat@adacore.com>
29459
29460         * gimplify.c (gimplify_modify_expr): Don't create a
29461         DECL_DEBUG_EXPR link if *FROM_P does not belong to the current
29462         function.
29463
29464 2017-05-30  Wilco Dijkstra  <wdijkstr@arm.com>
29465
29466         * config/arm/arm-builtins.c (arm_expand_builtin): Remove const.
29467
29468 2017-05-30  Richard Biener  <rguenther@suse.de>
29469
29470         * tree-vectorizer.h (struct _stmt_vec_info): Add reduc_type
29471         and reduc_def fields.
29472         (STMT_VINFO_REDUC_TYPE): New define.
29473         (STMT_VINFO_REDUC_DEF): Likewise.
29474         (vect_force_simple_reduction): Adjust prototype.
29475         * tree-vect-loop.c (vect_analyze_scalar_cycles_1): Adjust.
29476         (vect_is_simple_reduction): Remove check_reduction argument.
29477         (vect_force_simple_reduction): Adjust and set
29478         STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
29479         (vectorizable_reduction): Do not re-do reduction analysis
29480         but use STMT_VINFO_REDUC_TYPE and STMT_VINFO_REDUC_DEF.
29481         * tree-parloops.c (gather_scalar_reductions): Adjust.
29482
29483 2017-05-30  Richard Biener  <rguenther@suse.de>
29484
29485         PR middle-end/80901
29486         * cfgexpand.c (expand_gimple_cond): Match up loop fixup with
29487         split_edge code.
29488
29489 2017-05-24  Robin Dapp  <rdapp@linux.vnet.ibm.com>
29490
29491         * tree-vect-data-refs.c (vect_get_peeling_costs_all_drs):
29492         Introduce unknown_misalignment parameter and remove vf.
29493         (vect_peeling_hash_get_lowest_cost):
29494         Pass unknown_misalignment parameter.
29495         (vect_enhance_data_refs_alignment):
29496         Fix unsupportable data ref treatment.
29497
29498 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
29499
29500         * tree-vect-data-refs.c (vect_get_data_access_cost):
29501         Workaround for SLP handling.
29502         (vect_enhance_data_refs_alignment):
29503         Compute costs for doing no peeling at all, compare to the best
29504         peeling costs so far and avoid peeling if cheaper.
29505
29506 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
29507
29508         * tree-vect-data-refs.c (vect_peeling_hash_choose_best_peeling):
29509         Return peeling info and set costs to zero for unlimited cost
29510         model.
29511         (vect_enhance_data_refs_alignment): Also inspect all datarefs
29512         with unknown misalignment. Compute and costs for unknown
29513         misalignment, compare them to the costs for known misalignment
29514         and choose the cheapest for peeling.
29515
29516 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
29517
29518         * tree-vect-data-refs.c (vect_update_misalignment_for_peel): Rename.
29519         (vect_get_peeling_costs_all_drs): Create function.
29520         (vect_peeling_hash_get_lowest_cost):
29521         Use vect_get_peeling_costs_all_drs.
29522         (vect_peeling_supportable): Create function.
29523         (vect_enhance_data_refs_alignment): Use vect_peeling_supportable.
29524
29525 2017-05-30  Robin Dapp  <rdapp@linux.vnet.ibm.com>
29526
29527         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Create
29528         DR_HAS_NEGATIVE_STEP.
29529         (vect_update_misalignment_for_peel): Define DR_MISALIGNMENT.
29530         (vect_enhance_data_refs_alignment): Use.
29531         (vect_duplicate_ssa_name_ptr_info): Use.
29532         * tree-vectorizer.h (dr_misalignment): Use.
29533         (known_alignment_for_access_p): Use.
29534
29535 2017-05-30  Jozef Lawrynowicz  <jozef.l@somniumtech.com>
29536
29537         PR target/78838
29538         * config/msp430/msp430.c (gen_prefix): Return NULL when section name is
29539         .lowtext.
29540         (has_section_name): New function.
29541
29542 2017-05-30  Martin Liska  <mliska@suse.cz>
29543
29544         PR other/80909
29545         * auto-profile.c (get_function_decl_from_block): Fix
29546         parenthesis.
29547
29548 2017-05-30  Richard Biener  <rguenther@suse.de>
29549
29550         PR middle-end/80876
29551         * cfgexpand.c (expand_gimple_cond): Fixup preserving loops again.
29552
29553 2017-05-30  Martin Liska  <mliska@suse.cz>
29554
29555         * dumpfile.c: Use newly added macro DUMP_FILE_INFO.
29556         * dumpfile.h (struct dump_file_info): Remove ctors.
29557
29558 2017-05-30  Martin Liska  <mliska@suse.cz>
29559
29560         * predict.def: Fix GNU coding style.
29561
29562 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
29563
29564         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
29565         Mark 'to' argument with ATTRIBUTE_UNUSED.
29566
29567 2017-05-29  Max Filippov  <jcmvbkbc@gmail.com>
29568
29569         * config/xtensa/xtensa.c (xtensa_emit_call): Use
29570         HOST_WIDE_INT_PRINT_HEX instead of 0x%lx format string.
29571         (print_operand): Use HOST_WIDE_INT_PRINT_DEC instead of %ld
29572         format string.
29573
29574 2017-05-29  Eric Botcazou  <ebotcazou@adacore.com>
29575
29576         * doc/install.texi (Options specification): Restore entry of
29577         --enable-sjlj-exceptions.
29578
29579 2017-05-27  Michael Eager  <eager@eagercon.com>
29580
29581         Revert:
29582         2016-01-21  Ajit Agarwal  <ajitkum@xilinx.com>
29583
29584         See https://gcc.gnu.org/ml/gcc/2017-05/msg00221.html.
29585
29586         * config/microblaze/microblaze.h
29587         (FIXED_REGISTERS): Update in macro.
29588         (CALL_USED_REGISTERS): Update in macro.
29589
29590 2017-05-27  François-Xavier Coudett  <fxcoudert@gcc.gnu.org>
29591
29592         * doc/install.texi: Add links to macOS binary distributions.
29593
29594 2017-05-27  Jakub Jelinek  <jakub@redhat.com>
29595
29596         PR bootstrap/80887
29597         Revert:
29598         2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
29599
29600         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
29601
29602 2017-05-26  Martin Liska  <mliska@suse.cz>
29603
29604         * dumpfile.h (enum dump_kind): Renumber TDF_* flags to be contiguous.
29605
29606 2017-05-26  Martin Liska  <mliska@suse.cz>
29607
29608         * cfg.c (check_bb_profile): Do not use TDF_COMMENT and print
29609         always leading ';; '.
29610         (dump_bb_info): Likewise.
29611         (brief_dump_cfg): Likewise.
29612         * cfgrtl.c (print_rtl_with_bb): Do not use TDF_COMMENT.
29613         * dumpfile.c: Remove usage of TDF_VERBOSE.
29614         * dumpfile.h (enum dump_kind): Likewise.
29615         (dump_gimple_bb_header): Do not use TDF_COMMENT.
29616         * print-tree.c (debug_verbose): Remove.
29617         * tree-cfg.c (gimple_dump_cfg): Do not use TDF_COMMENT.
29618         (dump_function_to_file): Remove dumps guarded with TDF_VERBOSE.
29619         * tree-diagnostic.c (default_tree_printer): Replace
29620         TDF_DIAGNOSTIC with TDF_SLIM.
29621
29622 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
29623
29624         * tree-vect-loop-manip.c (create_intersect_range_checks_index): Pass
29625         in parameter loop, rather than loop_vinfo.
29626         (create_intersect_range_checks): Ditto.
29627         (vect_create_cond_for_alias_checks): Update call to above functions.
29628
29629 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
29630
29631         PR tree-optimization/80815
29632         * tree-data-ref.c (prune_runtime_alias_test_list): Simplify condition
29633         for merging runtime alias checks.  Handle negative DR_STEPs.
29634
29635 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
29636
29637         * tree-vect-data-refs.c (Operator==, comp_dr_with_seg_len_pair):
29638         Move from ...
29639         * tree-data-ref.c (Operator==, comp_dr_with_seg_len_pair): To here.
29640         * tree-vect-data-refs.c (vect_prune_runtime_alias_test_list): Factor
29641         out code pruning runtime alias checks.
29642         * tree-data-ref.c (prune_runtime_alias_test_list): New function
29643         factored out from above.
29644         * tree-vectorizer.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
29645         Move from ...
29646         * tree-data-ref.h (struct dr_with_seg_len, dr_with_seg_len_pair_t):
29647         ... to here.
29648         (prune_runtime_alias_test_list): New decalaration.
29649
29650 2017-05-26  Bin Cheng  <bin.cheng@arm.com>
29651
29652         * tree-vect-data-refs.c (compare_tree): Rename and move ...
29653         * tree-data-ref.c (data_ref_compare_tree): ... to here.
29654         * tree-data-ref.h (data_ref_compare_tree): New decalaration.
29655         * tree-vect-data-refs.c (dr_group_sort_cmp): Update uses.
29656         (operator==, comp_dr_with_seg_len_pair): Ditto.
29657         (vect_prune_runtime_alias_test_list): Ditto.
29658
29659 2017-05-26  Martin Liska  <mliska@suse.cz>
29660
29661         PR ipa/80663
29662         * params.def: Bound partial-inlining-entry-probability param.
29663
29664 2017-05-26  Marek Polacek  <polacek@redhat.com>
29665
29666         PR sanitizer/80875
29667         * fold-const.c (fold_binary_loc) <case MULT_EXPR>: Check if OP1
29668         can be negated.
29669
29670 2017-05-26  Richard Biener  <rguenther@suse.de>
29671
29672         PR tree-optimization/80842
29673         * tree-ssa-ccp.c (set_lattice_value): Always meet with the old
29674         value.
29675
29676 2017-05-26  Richard Biener  <rguenther@suse.de>
29677
29678         PR tree-optimization/80844
29679         * tree-vectorizer.c (adjust_simduid_builtins): Propagate results.
29680
29681 2017-05-25  Sebastian Peryt  <sebastian.peryt@intel.com>
29682
29683         * doc/md.texi (Machine Constraints): Update x86 family
29684         machine constraints section to match 'config/i386/constraints.md'.
29685
29686 2017-05-25  Volker Reichelt  <v.reichelt@netcologne.de>
29687
29688         * doc/invoke.texi (-Wcatch-value=): Document new warning option.
29689
29690 2017-05-25  Nathan Sidwell  <nathan@acm.org>
29691
29692         * doc/invoke.texi (--enable-languages): Update documentation.
29693
29694 2017-05-25  Martin Liska  <mliska@suse.cz>
29695
29696         * dumpfile.c: Add TDF_FOLDING.
29697         * dumpfile.h (enum dump_kind): Likewise.
29698         * genmatch.c (dt_simplify::gen_1): Use it.
29699
29700 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
29701
29702         * match.pd (view_convert (convert@0 @1)): Handle zero-extension.
29703
29704 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
29705
29706         * match.pd ((A +- CST1) +- CST2): Allow some conversions.
29707         * tree.c (drop_tree_overflow): Handle COMPLEX_CST and VECTOR_CST.
29708
29709 2017-05-25  Marc Glisse  <marc.glisse@inria.fr>
29710
29711         * fold-const.c (fold_binary_loc) [(A & C) == D]: Remove transformation.
29712         * match.pd (X == C): Rewrite it here.
29713         (with_possible_nonzero_bits, with_possible_nonzero_bits2,
29714         with_certain_nonzero_bits2): New predicates.
29715         * tree-ssanames.c (get_nonzero_bits): Handle INTEGER_CST.
29716
29717 2017-05-24  Nathan Sidwell  <nathan@acm.org>
29718
29719         * lto-streamer-in.c (lto_input_data_block): Adjust T const cast to
29720         avoid warning.
29721
29722         * auto-profile.c (afdo_propagate): Adjust T const cast to avoid
29723         warning.
29724
29725 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
29726
29727         * config/powerpcspe: New port.  Files are copied from the rs6000
29728         port, with "rs6000" in filenames replaced by "powerpcspe".
29729
29730 2017-05-24  Wilco Dijkstra  <wdijkstr@arm.com>
29731
29732         PR rtl-optimization/80754
29733         * lra-remat.c (do_remat): Add overlap checks for dst_regno.
29734
29735 2017-05-24  Sheldon Lobo  <smlobo@sheldon.us.oracle.com>
29736
29737         * config/sparc/sparc.md (length): Return the correct value for -mflat
29738         sibcalls to match output_sibcall.
29739
29740 2017-05-24  Segher Boessenkool  <segher@kernel.crashing.org>
29741
29742         PR bootstrap/80860
29743         PR bootstrap/80843
29744         * config/rs6000/rs6000.c (struct machine_function): Add new field
29745         n_components.
29746         (rs6000_get_separate_components): Init that field, use it.
29747         (rs6000_components_for_bb): Use the field.
29748
29749 2017-05-24  Thomas Preud'homme  <thomas.preudhomme@arm.com>
29750
29751         * config/arm/arm.c (arm_expand_prologue): Fix typo in comment.
29752
29753 2017-05-24  Peter Bergner  <bergner@vnet.ibm.com>
29754
29755         PR middle-end/80823
29756         * tree-cfg.c (group_case_labels_stmt): Delete increment of "i";
29757
29758 2017-05-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
29759
29760         PR target/80725
29761         * config/s390/s390.c (s390_check_qrst_address): Check incoming
29762         address against address_operand predicate.
29763         * config/s390/s390.md ("*indirect_jump"): Swap alternatives.
29764
29765 2017-05-24  Eric Botcazou  <ebotcazou@adacore.com>
29766
29767         * var-tracking.c (track_expr_p): Do not return 0 for tracked record
29768         parameters passed indirectly.
29769
29770 2017-05-23  Uros Bizjak  <ubizjak@gmail.com>
29771
29772         * config/i386/i386.md (*movdi_internal): Remove SSE4
29773         alternative 18 (?r, *v).  Update insn attributes.
29774         (*movsi_internal): Remove SSE4 alternative 13 (?r, *v).
29775         Update insn attributes.
29776         (*zero_extendsidi2): Remove SSE4 alternative (?r, *x).
29777         Update insn attributes.
29778         * config/i386/sse.md (vec_extract<ssevecmodelower>_0): Remove SSE4
29779         alternative 1 (r, v). Remove isa attribute.
29780         * config/i386/i386.c (dimode_scalar_chain::make_vector_copies):
29781         Always move value through stack for !TARGET_INTER_UNIT_MOVES_TO_VEC
29782         and !TARGET_INTER_UNIT_MOVES_TO_VEC targets.
29783
29784 2017-05-23  Tom de Vries  <tom@codesourcery.com>
29785
29786         * doc/sourcebuild.texi (Directives, Verify compiler message): Document
29787         dg-line directive.
29788
29789 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
29790
29791         * cgraphunit.c (symbol_table::process_new_functions): Update.
29792         * ipa-fnsummary.c (pass_data_inline_parameters): Remove.
29793         (inline_generate_summary): Rename to ...
29794         (ipa_fn_summary_generate): ... this one.
29795         (inline_read_summary): Rename to ...
29796         (ipa_fn_summary_read): ... this one.
29797         (inline_write_summary): Rename to ...
29798         (ipa_fn_summary_write): ... this one.
29799         (inline_free_summary): Rename to ...
29800         (ipa_free_fn_summary): ... this one.
29801         (pass_data_local_fn_summary, pass_local_fn_summary,
29802         make_pass_local_fn_summary, pass_data_ipa_free_fn_summary,
29803         pass_ipa_free_fn_summary, make_pass_ipa_free_fn_summary,
29804         pass_data_ipa_fn_summary, pass_ipa_fn_summary,
29805         make_pass_ipa_fn_summary): New.
29806         * ipa-fnsummary.h (inline_generate_summary, inline_read_summary,
29807         inline_write_summary, inline_free_summary): Remove.
29808         (ipa_free_fn_summary) : New.
29809         * ipa-inline.c (ipa_inline): Update.
29810         (pass_ipa_inline): Do not generate summaries.
29811         * ipa.c (pass_data_ipa_free_fn_summary, pass_ipa_free_fn_summary):
29812         Remove.
29813         * passes.def: Replace pass_inline_parameters by pass_local_fn_summary
29814         and add pass_ipa_fn_summary.
29815         * tree-pass.h (make_pass_ipa_fn_summary, make_pass_local_fn_summary):
29816         New.
29817         (make_pass_inline_parameters): Remove.
29818
29819 2017-05-23  Thomas Schwinge  <thomas@codesourcery.com>
29820
29821         * omp-low.c (struct omp_context): Remove "default_kind" member.
29822         Adjust all users.
29823
29824         * omp-offload.c (execute_oacc_device_lower): Remove the
29825         parallelism dimensions function attributes for unparallelized
29826         OpenACC kernels constructs.
29827
29828 2017-05-23  Martin Liska  <mliska@suse.cz>
29829
29830         * cgraph.c (cgraph_node::get_create): Use symtab_node::dump_{asm_,}name
29831         functions.
29832         (cgraph_edge::make_speculative): Likewise.
29833         (cgraph_edge::resolve_speculation): Likewise.
29834         (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
29835         (cgraph_node::dump): Likewise.
29836         * cgraph.h: Likewise.
29837         * cgraphunit.c (analyze_functions): Likewise.
29838         (symbol_table::compile): Likewise.
29839         * ipa-cp.c (print_all_lattices): Likewise.
29840         (determine_versionability): Likewise.
29841         (initialize_node_lattices): Likewise.
29842         (ipcp_verify_propagated_values): Likewise.
29843         (estimate_local_effects): Likewise.
29844         (update_profiling_info): Likewise.
29845         (create_specialized_node): Likewise.
29846         (perhaps_add_new_callers): Likewise.
29847         (decide_about_value): Likewise.
29848         (decide_whether_version_node): Likewise.
29849         (identify_dead_nodes): Likewise.
29850         (ipcp_store_bits_results): Likewise.
29851         * ipa-devirt.c (dump_targets): Likewise.
29852         (ipa_devirt): Likewise.
29853         * ipa-icf.c (sem_item::dump): Likewise.
29854         (sem_function::equals): Likewise.
29855         (sem_variable::equals): Likewise.
29856         (sem_item_optimizer::read_section): Likewise.
29857         (sem_item_optimizer::execute): Likewise.
29858         (congruence_class::dump): Likewise.
29859         * ipa-inline-analysis.c (dump_ipa_call_summary): Likewise.
29860         (dump_inline_summary): Likewise.
29861         (estimate_node_size_and_time): Likewise.
29862         (inline_analyze_function): Likewise.
29863         * ipa-inline-transform.c (inline_call): Likewise.
29864         * ipa-inline.c (report_inline_failed_reason): Likewise.
29865         (want_early_inline_function_p): Likewise.
29866         (edge_badness): Likewise.
29867         (update_edge_key): Likewise.
29868         (inline_small_functions): Likewise.
29869         * ipa-profile.c (ipa_profile): Likewise.
29870         * ipa-prop.c (ipa_print_node_jump_functions): Likewise.
29871         (ipa_make_edge_direct_to_target): Likewise.
29872         (remove_described_reference): Likewise.
29873         (ipa_impossible_devirt_target): Likewise.
29874         (propagate_controlled_uses): Likewise.
29875         (ipa_print_node_params): Likewise.
29876         (ipcp_transform_function): Likewise.
29877         * ipa-pure-const.c (pure_const_read_summary): Likewise.
29878         (propagate_pure_const): Likewise.
29879         * ipa-reference.c (generate_summary): Likewise.
29880         (read_write_all_from_decl): Likewise.
29881         (propagate): Likewise.
29882         (ipa_reference_read_optimization_summary): Likewise.
29883         * ipa-utils.c (ipa_merge_profiles): Likewise.
29884         * ipa.c (walk_polymorphic_call_targets): Likewise.
29885         (symbol_table::remove_unreachable_nodes): Likewise.
29886         (ipa_single_use): Likewise.
29887         * passes.c (execute_todo): Likewise.
29888         * predict.c (drop_profile): Likewise.
29889         * symtab.c (symtab_node::get_dump_name): New function.
29890         (symtab_node::dump_name): Likewise.
29891         (symtab_node::dump_asm_name): Likewise.
29892         (symtab_node::dump_references): Likewise.
29893         (symtab_node::dump_referring): Likewise.
29894         (symtab_node::dump_base): Likewise.
29895         (symtab_node::debug_symtab): Likewise.
29896         * tree-sra.c (convert_callers_for_node): Likewise.
29897         * tree-ssa-structalias.c (ipa_pta_execute): Likewise.
29898         * value-prof.c (init_node_map): Likewise.
29899
29900 2017-05-23  Martin Liska  <mliska@suse.cz>
29901
29902         * cgraph.h: Move symtab_node::dump_table to symbol_table::dump
29903         and symtab_node::debug_symtab to symbol_table::debug.
29904         * cgraphunit.c (analyze_functions): Use the renamed function.
29905         (symbol_table::compile): Likewise.
29906         * ipa-cp.c (ipcp_verify_propagated_values): Likewise.
29907         * ipa-icf.c (sem_item_optimizer::execute): Likewise.
29908         * passes.c (execute_todo): Likewise.
29909         * symtab.c (symbol_table::dump): New function.
29910         * tree-ssa-structalias.c (ipa_pta_execute): Use the renamed function.
29911
29912 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
29913
29914         * ipa-fnsummary.c (estimate_node_size_and_time): Do not sanity check
29915         that nonconst implies exec.
29916
29917 2017-05-23  Jan Hubicka  <hubicka@ucw.cz>
29918
29919         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
29920         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
29921         (inline_edge_summary_vec): Turn into ...
29922         (ipa_call_summaries): ... this one.
29923         (redirect_to_unreachable, edge_set_predicate,
29924         evaluate_properties_for_edge, inline_summary_alloc,
29925         reset_ipa_call_summary, reset_inline_summary,
29926         inline_summary_t::duplicate): Update.
29927         (inline_edge_duplication_hook): Turn to ...
29928         (ipa_call_summary_t::duplicate): ... this one.
29929         (inline_edge_removal_hook): Turn to ...
29930         (ipa_call_summary_t::remove): ... this one.
29931         (dump_inline_edge_summary): Turn to ...
29932         (dump_ipa_call_summary): ... this one.
29933         (estimate_function_body_sizes): Update.
29934         (inline_update_callee_summaries): Update.
29935         (remap_edge_change_prob): Update.
29936         (remap_edge_summaries): Update.
29937         (inline_merge_summary): Update.
29938         (do_estimate_edge_time): Update.
29939         (inline_generate_summary): Update.
29940         (inline_read_section): Update.
29941         (inline_read_summary): Update.
29942         (inline_free_summary): Update.
29943         * ipa-inline.c (can_inline_edge_p): Update.
29944         (compute_inlined_call_time): Update.
29945         (want_inline_small_function_p): Update.
29946         (edge_badness): Update.
29947         (early_inliner): Update.
29948         * ipa-inline.h (inline_edge_summary): Turn to ...
29949         (ipa_call_summary): ... this one.
29950         (ipa_call_summary_t): New class.
29951         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
29952         (ipa_call_summaries): New.
29953         (inline_edge_summary): Remove.
29954         (estimate_edge_growth): Update.
29955         * ipa-profile.c (ipa_propagate_frequency_1): Update.
29956         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
29957         * ipa-split.c (execute_split_functions): Update.
29958         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
29959
29960 2017-05-23  Tom de Vries  <tom@codesourcery.com>
29961
29962         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
29963         attributes): Document rdrand effective target.
29964
29965 2017-05-23  Tom de Vries  <tom@codesourcery.com>
29966
29967         * doc/sourcebuild.texi (Effective-Target Keywords, Other hardware
29968         attributes): Sort alphabetically.
29969
29970 2017-05-23  Georg-Johann Lay  <avr@gjlay.de>
29971
29972         * config/avr/genmultilib.awk: Use gsub instead of gensub.
29973
29974 2017-05-22  Michael Meissner  <meissner@linux.vnet.ibm.com>
29975
29976         PR target/80718
29977         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Split
29978         V2DF/V2DI splat into two separate patterns, one that handles
29979         registers, and the other that only handles memory.  Drop support
29980         for splatting from a GPR on ISA 2.07 and then splitting the
29981         splat into direct move and splat.
29982         (vsx_splat_<mode>_reg): Likewise.
29983         (vsx_splat_<mode>_mem): Likewise.
29984
29985 2017-05-22  Segher Boessenkool  <segher@kernel.crashing.org>
29986
29987         * cfgcleanup.c (bb_is_just_return): Allow CLOBBERs.
29988
29989 2017-05-22  Jakub Jelinek  <jakub@redhat.com>
29990
29991         PR middle-end/80809
29992         * omp-low.c (finish_taskreg_remap): New function.
29993         (finish_taskreg_scan): If unit size of ctx->record_type
29994         is non-constant, unshare the size expression and replace
29995         decls in it with possible outer var refs.
29996
29997         PR middle-end/80809
29998         * gimplify.c (omp_add_variable): For GOVD_DEBUG_PRIVATE use
29999         GOVD_SHARED rather than GOVD_PRIVATE with it.
30000         (gimplify_adjust_omp_clauses_1, gimplify_adjust_omp_clauses): Expect
30001         GOVD_SHARED rather than GOVD_PRIVATE with GOVD_DEBUG_PRIVATE.
30002
30003         PR middle-end/80853
30004         * omp-low.c (lower_reduction_clauses): Pass OMP_CLAUSE_PRIVATE
30005         as last argument to build_outer_var_ref for pointer bases of array
30006         section reductions.
30007
30008 2017-05-19  Martin Sebor  <msebor@redhat.com>
30009
30010         * print-tree.c (print_node): Print DECL_READ_P flag.
30011
30012 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
30013
30014         * Makefile.in: Add ipa-fnsummary.o and ipa-fnsummary.h
30015         * auto-profile.c: Replace ipa-inline.h by ipa-fnsummary.h
30016         * cgraph.c: Likewise.
30017         * cgraphunit.c: Likewise.
30018         * gengtype.c: Likewise.
30019         * ipa-cp.c: Likewise.
30020         * ipa-devirt.c: Likewise.
30021         * ipa-icf.c: Likewise.
30022         * ipa-predicate.c: Likewise.
30023         * ipa-profile.c: Likewise.
30024         * ipa-prop.c: Likewise.
30025         * ipa-split.c: Likewise.
30026         * ipa.c: Likewise.
30027         * ipa-inline-analysis.c (inline_summaries, ipa_call_summaries,
30028         edge_predicate_pool, dump_inline_hints,
30029         inline_summary::account_size_time, redirect_to_unreachable,
30030         edge_set_predicate, set_hint_predicate,
30031         evaluate_conditions_for_known_args, evaluate_properties_for_edge,
30032         inline_summary_alloc, ipa_call_summary::reset, inline_summary::reset,
30033         inline_summary_t::remove, remap_hint_predicate_after_duplication,
30034         inline_summary_t::duplicate, ipa_call_summary_t::duplicate,
30035         ipa_call_summary_t::remove, initialize_growth_caches,
30036         free_growth_caches, dump_ipa_call_summary, dump_inline_summary,
30037         debug_inline_summary, dump_inline_summaries, initialize_inline_failed,
30038         mark_modified, unmodified_parm_1, unmodified_parm,
30039         unmodified_parm_or_parm_agg_item, eliminated_by_inlining_prob,
30040         set_cond_stmt_execution_predicate, set_switch_stmt_execution_predicate,
30041         compute_bb_predicates, will_be_nonconstant_expr_predicate,
30042         will_be_nonconstant_predicate, record_modified_bb_info,
30043         get_minimal_bb, record_modified, param_change_prob,
30044         phi_result_unknown_predicate, predicate_for_phi_result,
30045         array_index_predicate, clobber_only_eh_bb_p, fp_expression_p,
30046         estimate_function_body_sizes, compute_inline_parameters,
30047         compute_inline_parameters_for_curren, pass_data_inline_parameters,
30048         estimate_node_size_and_time, estimate_ipcp_clone_size_and_time,
30049         inline_update_callee_summaries, remap_edge_change_prob,
30050         remap_edge_summaries, remap_hint_predicate, inline_merge_summary,
30051         inline_update_overall_summary, inline_indirect_intraprocedural_analysis,
30052         inline_analyze_function, inline_summary_t::insert,
30053         inline_generate_summary, read_ipa_call_summary, inline_read_section,
30054         inline_read_summary, write_ipa_call_summary, inline_write_summary,
30055         inline_free_summary): Move to ipa-fnsummary.h
30056         (predicate_t): Remove.
30057         * ipa-fnsummary.c: New file.
30058         * ipa-inline.h:  Do not include sreal.h and ipa-predicate.h
30059         (enum inline_hints_vals, inline_hints, agg_position_info,
30060         INLINE_SIZE_SCALE, size_time_entry, inline_summary, inline_summary_t,
30061         inline_summaries, ipa_call_summary, ipa_call_summary_t,
30062         ipa_call_summaries, debug_inline_summary, dump_inline_summaries,
30063         dump_inline_summary, dump_inline_hints, inline_generate_summary,
30064         inline_read_summary, inline_write_summary, inline_free_summary,
30065         inline_analyze_function, initialize_inline_failed,
30066         inline_merge_summary, inline_update_overall_summary,
30067         compute_inline_parameters): Move to ipa-fnsummary.h
30068         * ipa-fnsummary.h: New file.
30069         * ipa-inline-transform.h: Include ipa-inline.h.
30070         * ipa-inline.c: LIkewise.
30071
30072 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
30073
30074         * ipa-inline.c (edge_badness): Use inlined_time instead of
30075         inline_summaries->get.
30076
30077 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
30078
30079         * ipa-inline.c (edge_badness): Use estimate_size_after_inlining.
30080
30081 2017-05-22  Nathan Sidwell  <nathan@acm.org>
30082
30083         * doc/invoke.texi (fdump-translation-unit): Delete documentation.
30084         (fdump-lang): Document 'raw' option.
30085         * dumpfile.h (TDI_tu): Delete.
30086         * dumpfile.c (dump_files): Remove translation-unit.
30087         (FIRST_AUTO_NUMBERED_DUMP): Decrement.
30088
30089 2017-05-22  Georg-Johann Lay  <avr@gjlay.de>
30090
30091         * config/avr/t-avr (AWK) [t-multilib]: Remove "-v FORMAT=Makefile"
30092         command option from $(AWK) call.
30093         * config/avr/genmultilib.awk: Simplify and rewrite so that it
30094         generates MULTILIB_REQUIRED instead of MULTILIB_EXCEPTIONS.
30095         [FORMAT]: Remove handling of variable.
30096         * config/avr/t-multilib: Regenerate.
30097
30098 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
30099
30100         * ipa-inline-analysis.c (inline_summary::reset): Do not reset
30101         self_time.
30102         (dump_inline_summary): Do not print self_time.
30103         (estimate_function_body_sizes): Do not set self_time.
30104         (compute_inline_parameters): Likewise.
30105         (inline_read_section, inline_write_summary): Do not stream self_time.
30106         * ipa-inline.h (inline_summary): Drop self_time.
30107
30108 2017-05-22  Jan Hubicka  <hubicka@ucw.cz>
30109
30110         * ipa-inline-analysis.c (account_size_time): Rename to ...
30111         (inline_summary::account_size_time): ... this one.
30112         (reset_ipa_call_summary): Turn to ...
30113         (ipa_call_summary::reset): ... this one.
30114         (reset_inline_summary): Turn to ...
30115         (inline_summary::reset): ... this one.
30116         (inline_summary_t::remove): Update.
30117         (inline_summary_t::duplicate): Update.
30118         (ipa_call_summary_t::remove): Update.
30119         (dump_inline_summary): Update.
30120         (estimate_function_body_sizes): Update.
30121         (compute_inline_parameters): Update.
30122         (estimate_node_size_and_time): Update.
30123         (inline_merge_summary): Update.
30124         (inline_update_overall_summary): Update.
30125         (inline_read_section): Update.
30126         (inline_write_summary): Update.
30127         * ipa-inline.h (inline_summary): Rename entry to size_time_table;
30128         add account_size_time and reset member functions.
30129         (ipa_call_summary): Add reset function.
30130         * ipa-predicate.h (predicate::operator &): Constify.
30131
30132 2017-05-22  Richard Biener  <rguenther@suse.de>
30133
30134         * df-scan.c (df_insn_refs_verify): Speedup when not verifying.
30135
30136 2017-05-19  Jason Merrill  <jason@redhat.com>
30137
30138         * tree.c (make_tree_vec_stat, grow_tree_vec_stat): Use size_t.
30139
30140 2017-05-19  Marek Polacek  <polacek@redhat.com>
30141
30142         PR sanitizer/80800
30143         * fold-const.c (extract_muldiv_1) <case TRUNC_DIV_EXPR>: Add
30144         TYPE_OVERFLOW_WRAPS checks.
30145
30146 2017-05-19  Thomas Schwinge  <thomas@codesourcery.com>
30147
30148         * tree-core.h (enum omp_clause_default_kind): Add
30149         "OMP_CLAUSE_DEFAULT_PRESENT".
30150         * tree-pretty-print.c (dump_omp_clause): Handle it.
30151         * gimplify.c (enum gimplify_omp_var_data): Add
30152         "GOVD_MAP_FORCE_PRESENT".
30153         (gimplify_adjust_omp_clauses_1): Map it to
30154         "GOMP_MAP_FORCE_PRESENT".
30155         (oacc_default_clause): Handle "OMP_CLAUSE_DEFAULT_PRESENT".
30156
30157         * gimplify.c (oacc_default_clause): Clarify.
30158
30159 2017-05-19  Nathan Sidwell  <nathan@acm.org>
30160
30161         LANG_HOOK_REGISTER_DUMPS
30162         * toplev.c (general_init): Call register dump lang hook.
30163         * doc/invoke.texi: Document -fdump-lang option family.
30164         * dumpfile.c (dump_files): Remove class dump here.
30165         (FIRST_AUTO_NUMBERED_DUMP): Adjust.
30166         * dumpfile.h (tree_dump_index): Remove TDI_class.
30167         * langhooks-def.h (lhd_register_dumps): Declare.
30168         (LANG_HOOKS_REGISTER_DUMPS): Define.
30169         (LANG_HOOKS_INITIALIZER): Add it.
30170         * langhooks.c (lhd_register_dumps): Define.
30171         * langhooks.h (struct lang_hooks): Add register_dumps.
30172
30173 2017-05-19  Nathan Sidwell  <nathan@acm.org>
30174
30175         * context.h (context::set_passes): New.
30176         * context.c (context::context): Do not create pass manager.
30177         * toplev.c (general_init): Create pass manager here.
30178
30179 2017-05-19  Segher Boessenkool  <segher@kernel.crashing.org>
30180
30181         * config/rs6000/rs6000.md (splitter to load of -1 and mask): Don't
30182         use this splitter if two add or or instructions would also work for
30183         the constant we want to generate.
30184
30185 2017-05-19  Richard Biener  <rguenther@suse.de>
30186
30187         PR build/80821
30188         * genmatch.c (dt_node::gen_kids_1): Add missing scope around
30189         predicate evaluation.
30190
30191 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
30192
30193         * ipa-inline.h (ipa_call_summary): Turn sizes into signed;
30194         add ctor.
30195         * ipa-inline.c (want_inline_small_function_p): Do not cast to
30196         unsigned.
30197
30198 2017-05-19  Jan Hubicka  <hubicka@ucw.cz>
30199
30200         * ipa-inline-analysis.c (cgraph_2edge_hook_list, cgraph_edge_hook_list,
30201         inline_edge_removal_hook, inline_edge_duplication_hook): Remove.
30202         (inline_edge_summary_vec): Turn into ...
30203         (ipa_call_summaries): ... this one.
30204         (redirect_to_unreachable, edge_set_predicate,
30205         evaluate_properties_for_edge, inline_summary_alloc,
30206         reset_ipa_call_summary, reset_inline_summary,
30207         inline_summary_t::duplicate): Update.
30208         (inline_edge_duplication_hook): Turn to ...
30209         (ipa_call_summary_t::duplicate): ... this one.
30210         (inline_edge_removal_hook): Turn to ...
30211         (ipa_call_summary_t::remove): ... this one.
30212         (dump_inline_edge_summary): Turn to ...
30213         (dump_ipa_call_summary): ... this one.
30214         (estimate_function_body_sizes): Update.
30215         (inline_update_callee_summaries): Update.
30216         (remap_edge_change_prob): Update.
30217         (remap_edge_summaries): Update.
30218         (inline_merge_summary): Update.
30219         (do_estimate_edge_time): Update.
30220         (inline_generate_summary): Update.
30221         (inline_read_section): Update.
30222         (inline_read_summary): Update.
30223         (inline_free_summary): Update.
30224         * ipa-inline.c (can_inline_edge_p): Update.
30225         (compute_inlined_call_time): Update.
30226         (want_inline_small_function_p): Update.
30227         (edge_badness): Update.
30228         (early_inliner): Update.
30229         * ipa-inline.h (inline_edge_summary): Turn to ...
30230         (ipa_call_summary): ... this one.
30231         (ipa_call_summary_t): New class.
30232         (inline_edge_summary_t, inline_edge_summary_vec): Remove.
30233         (ipa_call_summaries): New.
30234         (inline_edge_summary): Remove.
30235         (estimate_edge_growth): Update.
30236         * ipa-profile.c (ipa_propagate_frequency_1): Update.
30237         * ipa-prop.c (ipa_make_edge_direct_to_target): Update.
30238         * ipa-split.c (execute_split_functions): Update.
30239         * ipa.c (symbol_table::remove_unreachable_nodes): Update.
30240
30241 2017-05-19  Richard Biener  <rguenther@suse.de>
30242
30243         PR middle-end/80764
30244         * cfgexpand.c (expand_gimple_cond): Fix loop fixup.
30245
30246 2017-05-18  Segher Boessenkool  <segher@kernel.crashing.org>
30247
30248         * config/rs6000/rs6000.c (struct machine_function): Add field
30249         fpr_is_wrapped_separately.
30250         (rs6000_get_separate_components): Use 64 components.  Handle the
30251         new FPR components.
30252         (rs6000_components_for_bb): Handle the FPR components.
30253         (rs6000_emit_prologue_components): Handle the FPR components.
30254         (rs6000_emit_epilogue_components): Handle the FPR components.
30255         (rs6000_set_handled_components): Handle the FPR components.
30256         (rs6000_emit_prologue): Don't output prologue code for those FPRs
30257         that are already separately shrink-wrapped.
30258         (rs6000_emit_epilogue): Don't output epilogue code for those FPRs
30259         that are already separately shrink-wrapped.
30260
30261 2017-05-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
30262
30263         PR target/80510
30264         * config/rs6000/predicates.md (simple_offsettable_mem_operand):
30265         New predicate.
30266
30267         * config/rs6000/rs6000.md (ALTIVEC_DFORM): New iterator.
30268         (define_peephole2 for Altivec d-form load): Add peepholes to catch
30269         cases where the register allocator uses a move and an offsettable
30270         memory operation to/from a FPR register on ISA 2.06/2.07.
30271         (define_peephole2 for Altivec d-form store): Likewise.
30272
30273 2017-05-18  Uros Bizjak  <ubizjak@gmail.com>
30274
30275         PR target/80799
30276         * config/i386/mmx.md (*mov<mode>_internal): Enable
30277         alternatives 11, 12, 13 and 14 also for 32bit targets.
30278         Remove alternatives 15, 16, 17 and 18.
30279         * config/i386/sse.md (vec_concatv2di): Change
30280         alternative (!x, *y) to (x, ?!*Yn).
30281
30282 2017-05-18  Paolo Carlini  <paolo.carlini@oracle.com>
30283
30284         * dumpfile.h (enum dump_kind): Remove stray comma.
30285
30286 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
30287
30288         * Makefile.in: Add ipa-predicate.o and ipa-predicate.h
30289         * ipa-inline-analysis.c (NUM_CONDITIONS): turn into
30290         predicate::num_conditions
30291         (IS_NOT_CONSTANT): turn into predicate::is_not_constant.
30292         (CHANGED): turn into predicate::changed.
30293         (agg_position_info): Move to ipa-predicate.h
30294         (add_condition, predicate::add_clause, predicate::operator &=,
30295         predicate::or_with, predicate::evaluate, predicate::probability,
30296         dump_condition, dump_clause, predicate::dump,
30297         predicate::remap_after_duplication, predicate::remap_after_inlining,
30298         predicate::stream_in, predicate::stream_out): Move to ipa-predicate.c
30299         (evaluate_conditions_for_known_args): Update.
30300         (set_cond_stmt_execution_predicate): Update.
30301         * ipa-inline.h: Include ipa-predicate.h
30302         (condition, inline_param_summary, conditions, agg_position_info,
30303         predicate): Move to ipa-predicate.h
30304         * ipa-predicate.c: New file.
30305         * ipa-predicate.h: New file.
30306
30307 2017-05-18  Wilco Dijkstra  <wdijkstr@arm.com>
30308
30309         * final.c (leaf_function_p): Check we are not in a sequence.
30310
30311 2017-05-18  Martin Liska  <mliska@suse.cz>
30312
30313         * cfgrtl.c (rtl_verify_edges): Remove usage of TDF_RTL.
30314         * dumpfile.c (dump_register): Use new enum dump_kind.
30315         (get_dump_file_name): Likewise.
30316         (dump_enable_all): Likewise.
30317         (dump_switch_p_1): Likewise.
30318         (enable_rtl_dump_file): Remove usage of TDF_RTL.
30319         * dumpfile.h (enum dump_kind): New enum type.
30320         (struct dump_file_info): Create constructor and
30321         format fields and comments.
30322         * passes.c (pass_manager::register_one_dump_file):
30323         Use num dump_kind.
30324         * statistics.c (statistics_early_init): Likewise.
30325         * tree-ssa-loop-prefetch.c (dump_mem_details): Replace
30326         TDF_TREE with TDF_SLIM.
30327         (gather_memory_references_ref): Likewise.
30328
30329 2017-05-18  Martin Liska  <mliska@suse.cz>
30330
30331         * vec.h (struct vnull): Use it.
30332
30333 2017-05-18  Jan Hubicka  <hubicka@ucw.cz>
30334
30335         * ipa-inline-analysis.c (predicate_conditions): Move to ipa-inline.h
30336         (true_predicate, false_predicate, true_predicate_p,
30337         false_predicate_p): Remove.
30338         (single_cond_predicate, not_inlined_predicate): Turn to member function
30339         in ipa-inline.h
30340         (add_condition): Update.
30341         (add_clause): Turn to...
30342         (predicate::add_clause): ... this one; update; allow passing NULL
30343         as parameter.
30344         (and_predicates): Turn to ...
30345         (predicate::operator &=): ... this one.
30346         (predicates_equal_p): Move to predicate::operator == in ipa-inline.h
30347         (or_predicates): Turn to ...
30348         (predicate::or_with): ... this one.
30349         (evaluate_predicate): Turn to ...
30350         (predicate::evaluate): ... this one.
30351         (predicate_probability): Turn to ...
30352         (predicate::probability): ... this one.
30353         (dump_condition): Update.
30354         (dump_predicate): Turn to ...
30355         (predicate::dump): ... this one.
30356         (account_size_time): Update.
30357         (edge_set_predicate): Update.
30358         (set_hint_predicate): UPdate.
30359         (evaluate_conditions_for_known_args): Update.
30360         (evaluate_properties_for_edge): Update.
30361         (remap_predicate_after_duplication): Turn to...
30362         (predicate::remap_after_duplication): ... this one.
30363         (remap_hint_predicate_after_duplication): Update.
30364         (inline_summary_t::duplicate): UPdate.
30365         (dump_inline_edge_summary): Update.
30366         (dump_inline_summary): Update.
30367         (set_cond_stmt_execution_predicate): Update.
30368         (set_switch_stmt_execution_predicate): Update.
30369         (compute_bb_predicates): Update.
30370         (will_be_nonconstant_expr_predicate): Update.
30371         (will_be_nonconstant_predicate): Update.
30372         (phi_result_unknown_predicate): Update.
30373         (predicate_for_phi_result): Update.
30374         (array_index_predicate): Update.
30375         (estimate_function_body_sizes): Update.
30376         (estimate_node_size_and_time): Update.
30377         (estimate_ipcp_clone_size_and_time): Update.
30378         (remap_predicate): Rename to ...
30379         (predicate::remap_after_inlining): ... this one.
30380         (remap_hint_predicate): Update.
30381         (inline_merge_summary): Update.
30382         (inline_update_overall_summary): Update.
30383         (estimate_size_after_inlining): Update.
30384         (read_predicate): Rename to ...
30385         (predicate::stream_in): ... this one.
30386         (read_inline_edge_summary): Update.
30387         (write_predicate): Rename to ...
30388         (predicate::stream_out): ... this one.
30389         (write_inline_edge_summary): Update.
30390         * ipa-inline.h (MAX_CLAUSES): Turn to predicate::max_clauses.
30391         (clause_t): Turn to uint32_t
30392         (predicate): Turn to class; implement constructor and operators
30393         ==, !=, &
30394         (size_time_entry): Update.
30395         (inline_summary): Update.
30396         (inline_edge_summary): Update.
30397
30398 2017-05-18  Marc Glisse  <marc.glisse@inria.fr>
30399
30400         * fold-const.c (fold_binary_loc): Move transformation...
30401         * match.pd (C - X CMP X): ... here.
30402
30403 2017-05-18  Sheldon Lobo  <sheldon.lobo@oracle.com>
30404
30405         * config/sparc/sparc.c (sparc_option_override): Set function
30406         alignment for -mcpu=niagara7 to 64 to match the I$ line.
30407         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC M7 branch
30408         latency to 1.
30409         * config/sparc/sparc.h (BRANCH_COST): Set the SPARC T4 branch
30410         latency to 2.
30411         * config/sparc/sol2.h: Fix a ASM_CPU32_DEFAULT_SPEC typo.
30412
30413 2017-05-18  Marek Polacek  <polacek@redhat.com>
30414
30415         PR sanitizer/80797
30416         * ubsan.c (instrument_null): Unwrap ADDR_EXPRs.
30417         (pass_ubsan::execute): Call gimple_assign_single_p instead of
30418         gimple_assign_load_p.
30419
30420 2017-05-17  Segher Boessenkool  <segher@kernel.crashing.org>
30421
30422         PR middle-end/80692
30423         * real.c (do_compare): Give decimal_do_compare preference over
30424         comparing just the signs.
30425
30426 2017-05-17  Uros Bizjak  <ubizjak@gmail.com>
30427
30428         * doc/md.texi (Canonicalization of Instructions): Describe the
30429         canonical form of instructions that inherently set a condition
30430         code register.
30431
30432 2017-05-17  Peter Bergner  <bergner@vnet.ibm.com>
30433
30434         PR middle-end/80775
30435         * tree-cfg.c: Move deletion of unreachable case statements to after
30436         the merging of consecutive case labels.
30437
30438 2017-05-17  Thomas Preud'homme  <thomas.preudhomme@arm.com>
30439
30440         * config/arm/arm.c (cmse_nonsecure_call_clear_caller_saved): Refer
30441         readers to __gnu_cmse_nonsecure_call libcall for saving, clearing and
30442         restoring of callee-saved registers.
30443
30444 2017-05-17  Eric Botcazou  <ebotcazou@adacore.com>
30445
30446         * compare-elim.c (equivalent_reg_at_start): Adjust outdated comment.
30447         * config/visium/visium.c (single_set_and_flags): Likewise.
30448         * config/visium/visium.md (Substitutions): Likewise.
30449
30450 2017-05-17  Martin Liska  <mliska@suse.cz>
30451
30452         * cfg.c: Introduce dump_flags_t type and
30453         use it instead of int type.
30454         * cfg.h: Likewise.
30455         * cfghooks.c: Likewise.
30456         * cfghooks.h (struct cfg_hooks): Likewise.
30457         * cfgrtl.c: Likewise.
30458         * cfgrtl.h: Likewise.
30459         * cgraph.c (cgraph_node::get_body): Likewise.
30460         * coretypes.h: Likewise.
30461         * domwalk.c: Likewise.
30462         * domwalk.h: Likewise.
30463         * dumpfile.c (struct dump_option_value_info): Likewise.
30464         (dump_enable_all): Likewise.
30465         (dump_switch_p_1): Likewise.
30466         (opt_info_switch_p): Likewise.
30467         * dumpfile.h (enum tree_dump_index): Likewise.
30468         (struct dump_file_info): Likewise.
30469         * genemit.c: Likewise.
30470         * generic-match-head.c: Likewise.
30471         * gengtype.c (open_base_files): Likewise.
30472         * gimple-pretty-print.c: Likewise.
30473         * gimple-pretty-print.h: Likewise.
30474         * graph.c (print_graph_cfg): Likewise.
30475         * graphite-scop-detection.c (dot_all_sese): Likewise.
30476         * ipa-devirt.c (build_type_inheritance_graph): Likewise.
30477         * loop-unroll.c (report_unroll): Likewise.
30478         * passes.c (pass_manager::register_one_dump_file): Likewise.
30479         * print-tree.c: Likewise.
30480         * statistics.c: Likewise.
30481         * tree-cfg.c: Likewise.
30482         * tree-cfg.h: Likewise.
30483         * tree-dfa.c: Likewise.
30484         * tree-dfa.h: Likewise.
30485         * tree-dump.c (dump_function): Likewise.
30486         * tree-dump.h (struct dump_info): Likewise.
30487         * tree-pretty-print.c: Likewise.
30488         * tree-pretty-print.h: Likewise.
30489         * tree-ssa-live.c: Likewise.
30490         * tree-ssa-live.h: Likewise.
30491         * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Likewise.
30492         * tree-vect-loop.c: Likewise.
30493         * tree-vect-slp.c: Likewise.
30494
30495 2017-05-16  James Greenhalgh  <james.greenhalgh@arm.com>
30496             Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
30497
30498         PR tree-optimization/80457
30499         * tree-vect-stmts.c (vect_model_simple_cost): Model the cost
30500         of all arguments to a statement as scalar_to_vec operations.
30501         (vectorizable_call): Adjust call to vect_model_simple_cost for
30502         new parameter.
30503         (vectorizable_conversion): Likewise.
30504         (vectorizable_assignment): Likewise.
30505         (vectorizable_shift): Likewise.
30506         (vectorizable_operation): Likewise.
30507         (vectorizable_comparison): Likewise.
30508         (vect_is_simple_cond): Record the def types for operands.
30509         (vectorizable_condition): Likewise, call vect_model_simple_cost.
30510         * tree-vectorizer.h (vect_model_simple_cost): Add new parameter
30511         for statement argument count.
30512
30513 2017-05-16  Carl Love  <cel@us.ibm.com>
30514
30515         * config/rs6000/rs6000-c: Add support for built-in functions
30516         vector unsigned long long vec_bperm (vector unsigned long long,
30517                                              vector unsigned char)
30518         vector signed long long vec_mule (vector signed int,
30519                                           vector signed int)
30520         vector unsigned long long vec_mule (vector unsigned int,
30521                                             vector unsigned int)
30522         vector signed long long vec_mulo (vector signed int,
30523                                           vector signed int)
30524         vector unsigned long long vec_mulo (vector unsigned int,
30525                                             vector unsigned int)
30526         vector signed char vec_sldw (vector signed char,
30527                                      vector signed char,
30528                                      const int)
30529         vector unsigned char vec_sldw (vector unsigned char,
30530                                        vector unsigned char,
30531                                        const int)
30532         vector signed short vec_sldw (vector signed short,
30533                                       vector signed short,
30534                                       const int)
30535         vector unsigned short vec_sldw (vector unsigned short,
30536                                         vector unsigned short,
30537                                         const int)
30538         vector signed int vec_sldw (vector signed int,
30539                                     vector signed int,
30540                                     const int)
30541         vector unsigned int vec_sldw (vector unsigned int,
30542                                       vector unsigned int,
30543                                       const int)
30544         vector signed long long vec_sldw (vector signed long long,
30545                                           vector signed long long,
30546                                           const int)
30547         vector unsigned long long vec_sldw (vector unsigned long long,
30548                                             vector unsigned long long,
30549                                             const int)
30550         * config/rs6000/rs6000-c: Add support for built-in functions
30551         * config/rs6000/rs6000-builtin.def: Add definition for SLDW.
30552         * config/rs6000/altivec.h: Add defintion for vec_sldw.
30553         * doc/extend.texi: Update the built-in documentation for the
30554         new built-in functions.
30555
30556 2017-05-16  Marek Polacek  <polacek@redhat.com>
30557
30558         PR sanitizer/80536
30559         PR sanitizer/80386
30560         * tree.c (save_expr): Don't fold the expression.
30561
30562 2017-05-16  Uros Bizjak  <ubizjak@gmail.com>
30563
30564         * config/i386/i386.md (*movsi_internal): Split (?rm,*y) alternative
30565         to (?r,*Yn) and (?m,*y) alternatives, and (?*y,rm) to (?*Ym,r)
30566         and (?*y,m).  Update insn attributes.
30567
30568 2017-05-16  Martin Liska  <mliska@suse.cz>
30569
30570         * cgraph.c (cgraph_edge::resolve_speculation): Add default value for
30571         flags argument of print_gimple_stmt, print_gimple_expr,
30572         print_generic_stmt and print_generic_expr.
30573         * cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
30574         * coretypes.h: Likewise.
30575         * except.c (dump_eh_tree): Likewise.
30576         * gimple-fold.c (gimple_fold_stmt_to_constant_1): Likewise.
30577         * gimple-pretty-print.h: Likewise.
30578         * gimple-ssa-backprop.c (dump_usage_prefix): Likewise.
30579         (backprop::push_to_worklist): Likewise.
30580         (backprop::pop_from_worklist): Likewise.
30581         (backprop::process_use): Likewise.
30582         (backprop::intersect_uses): Likewise.
30583         (note_replacement): Likewise.
30584         * gimple-ssa-store-merging.c
30585         (pass_store_merging::terminate_all_aliasing_chains): Likewise.
30586         (imm_store_chain_info::coalesce_immediate_stores): Likewise.
30587         (pass_store_merging::execute): Likewise.
30588         * gimple-ssa-strength-reduction.c (dump_candidate): Likewise.
30589         (ssa_base_cand_dump_callback): Likewise.
30590         (dump_incr_vec): Likewise.
30591         (replace_refs): Likewise.
30592         (replace_mult_candidate): Likewise.
30593         (create_add_on_incoming_edge): Likewise.
30594         (create_phi_basis): Likewise.
30595         (insert_initializers): Likewise.
30596         (all_phi_incrs_profitable): Likewise.
30597         (introduce_cast_before_cand): Likewise.
30598         (replace_one_candidate): Likewise.
30599         * gimplify.c (gimplify_expr): Likewise.
30600         * graphite-isl-ast-to-gimple.c (is_valid_rename): Likewise.
30601         (set_rename): Likewise.
30602         (rename_uses): Likewise.
30603         (copy_loop_phi_nodes): Likewise.
30604         (add_close_phis_to_merge_points): Likewise.
30605         (copy_loop_close_phi_args): Likewise.
30606         (copy_cond_phi_args): Likewise.
30607         (graphite_copy_stmts_from_block): Likewise.
30608         (translate_pending_phi_nodes): Likewise.
30609         * graphite-poly.c (print_pdr): Likewise.
30610         (dump_gbb_cases): Likewise.
30611         (dump_gbb_conditions): Likewise.
30612         (print_scop_params): Likewise.
30613         * graphite-scop-detection.c (build_cross_bb_scalars_def): Likewise.
30614         (build_cross_bb_scalars_use): Likewise.
30615         (gather_bbs::before_dom_children): Likewise.
30616         * hsa-dump.c (dump_hsa_immed): Likewise.
30617         * ipa-cp.c (print_ipcp_constant_value): Likewise.
30618         (get_replacement_map): Likewise.
30619         * ipa-inline-analysis.c (dump_condition): Likewise.
30620         (estimate_function_body_sizes): Likewise.
30621         * ipa-polymorphic-call.c (check_stmt_for_type_change): Likewise.
30622         (ipa_polymorphic_call_context::get_dynamic_type): Likewise.
30623         * ipa-prop.c (ipa_dump_param): Likewise.
30624         (ipa_print_node_jump_functions_for_edge): Likewise.
30625         (ipa_modify_call_arguments): Likewise.
30626         (ipa_modify_expr): Likewise.
30627         (ipa_dump_param_adjustments): Likewise.
30628         (ipa_dump_agg_replacement_values): Likewise.
30629         (ipcp_modif_dom_walker::before_dom_children): Likewise.
30630         * ipa-pure-const.c (check_stmt): Likewise.
30631         (pass_nothrow::execute): Likewise.
30632         * ipa-split.c (execute_split_functions): Likewise.
30633         * omp-offload.c (dump_oacc_loop_part): Likewise.
30634         (dump_oacc_loop): Likewise.
30635         * trans-mem.c (tm_log_emit): Likewise.
30636         (tm_memopt_accumulate_memops): Likewise.
30637         (dump_tm_memopt_set): Likewise.
30638         (dump_tm_memopt_transform): Likewise.
30639         * tree-cfg.c (gimple_verify_flow_info): Likewise.
30640         (print_loop): Likewise.
30641         * tree-chkp-opt.c (chkp_print_addr): Likewise.
30642         (chkp_gather_checks_info): Likewise.
30643         (chkp_get_check_result): Likewise.
30644         (chkp_remove_check_if_pass): Likewise.
30645         (chkp_use_outer_bounds_if_possible): Likewise.
30646         (chkp_reduce_bounds_lifetime): Likewise.
30647         * tree-chkp.c (chkp_register_addr_bounds): Likewise.
30648         (chkp_mark_completed_bounds): Likewise.
30649         (chkp_register_incomplete_bounds): Likewise.
30650         (chkp_mark_invalid_bounds): Likewise.
30651         (chkp_maybe_copy_and_register_bounds): Likewise.
30652         (chkp_build_returned_bound): Likewise.
30653         (chkp_get_bound_for_parm): Likewise.
30654         (chkp_build_bndldx): Likewise.
30655         (chkp_get_bounds_by_definition): Likewise.
30656         (chkp_generate_extern_var_bounds): Likewise.
30657         (chkp_get_bounds_for_decl_addr): Likewise.
30658         * tree-chrec.c (chrec_apply): Likewise.
30659         * tree-data-ref.c (dump_data_reference): Likewise.
30660         (dump_subscript): Likewise.
30661         (dump_data_dependence_relation): Likewise.
30662         (analyze_overlapping_iterations): Likewise.
30663         * tree-inline.c (expand_call_inline): Likewise.
30664         (tree_function_versioning): Likewise.
30665         * tree-into-ssa.c (dump_defs_stack): Likewise.
30666         (dump_currdefs): Likewise.
30667         (dump_names_replaced_by): Likewise.
30668         (dump_update_ssa): Likewise.
30669         (update_ssa): Likewise.
30670         * tree-object-size.c (pass_object_sizes::execute): Likewise.
30671         * tree-parloops.c (build_new_reduction): Likewise.
30672         (try_create_reduction_list): Likewise.
30673         (ref_conflicts_with_region): Likewise.
30674         (oacc_entry_exit_ok_1): Likewise.
30675         (oacc_entry_exit_single_gang): Likewise.
30676         * tree-pretty-print.h: Likewise.
30677         * tree-scalar-evolution.c (set_scalar_evolution): Likewise.
30678         (get_scalar_evolution): Likewise.
30679         (add_to_evolution): Likewise.
30680         (get_loop_exit_condition): Likewise.
30681         (analyze_evolution_in_loop): Likewise.
30682         (analyze_initial_condition): Likewise.
30683         (analyze_scalar_evolution): Likewise.
30684         (instantiate_scev): Likewise.
30685         (number_of_latch_executions): Likewise.
30686         (gather_chrec_stats): Likewise.
30687         (final_value_replacement_loop): Likewise.
30688         (scev_const_prop): Likewise.
30689         * tree-sra.c (dump_access): Likewise.
30690         (disqualify_candidate): Likewise.
30691         (create_access): Likewise.
30692         (reject): Likewise.
30693         (maybe_add_sra_candidate): Likewise.
30694         (create_access_replacement): Likewise.
30695         (analyze_access_subtree): Likewise.
30696         (analyze_all_variable_accesses): Likewise.
30697         (sra_modify_assign): Likewise.
30698         (initialize_constant_pool_replacements): Likewise.
30699         (find_param_candidates): Likewise.
30700         (decide_one_param_reduction): Likewise.
30701         (replace_removed_params_ssa_names): Likewise.
30702         * tree-ssa-ccp.c (ccp_fold_stmt): Likewise.
30703         * tree-ssa-copy.c (dump_copy_of): Likewise.
30704         (copy_prop_visit_cond_stmt): Likewise.
30705         * tree-ssa-dce.c (mark_operand_necessary): Likewise.
30706         * tree-ssa-dom.c (pass_dominator::execute): Likewise.
30707         (record_equivalences_from_stmt): Likewise.
30708         * tree-ssa-dse.c (compute_trims): Likewise.
30709         (delete_dead_call): Likewise.
30710         (delete_dead_assignment): Likewise.
30711         * tree-ssa-forwprop.c (forward_propagate_into_gimple_cond): Likewise.
30712         (forward_propagate_into_cond): Likewise.
30713         (pass_forwprop::execute): Likewise.
30714         * tree-ssa-ifcombine.c (ifcombine_ifandif): Likewise.
30715         * tree-ssa-loop-im.c (invariantness_dom_walker::before_dom_children):
30716         Likewise.
30717         (move_computations_worker): Likewise.
30718         (execute_sm): Likewise.
30719         * tree-ssa-loop-ivcanon.c (tree_estimate_loop_size): Likewise.
30720         (remove_exits_and_undefined_stmts): Likewise.
30721         (remove_redundant_iv_tests): Likewise.
30722         * tree-ssa-loop-ivopts.c (dump_use): Likewise.
30723         (adjust_iv_update_pos): Likewise.
30724         * tree-ssa-math-opts.c (bswap_replace): Likewise.
30725         * tree-ssa-phiopt.c (factor_out_conditional_conversion): Likewise.
30726         (value_replacement): Likewise.
30727         * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
30728         * tree-ssa-pre.c (print_pre_expr): Likewise.
30729         (get_representative_for): Likewise.
30730         (create_expression_by_pieces): Likewise.
30731         (insert_into_preds_of_block): Likewise.
30732         (eliminate_insert): Likewise.
30733         (eliminate_dom_walker::before_dom_children): Likewise.
30734         (eliminate): Likewise.
30735         (remove_dead_inserted_code): Likewise.
30736         * tree-ssa-propagate.c (substitute_and_fold): Likewise.
30737         * tree-ssa-reassoc.c (get_rank): Likewise.
30738         (eliminate_duplicate_pair): Likewise.
30739         (eliminate_plus_minus_pair): Likewise.
30740         (eliminate_not_pairs): Likewise.
30741         (undistribute_ops_list): Likewise.
30742         (eliminate_redundant_comparison): Likewise.
30743         (update_range_test): Likewise.
30744         (optimize_range_tests_var_bound): Likewise.
30745         (optimize_vec_cond_expr): Likewise.
30746         (rewrite_expr_tree): Likewise.
30747         (rewrite_expr_tree_parallel): Likewise.
30748         (linearize_expr): Likewise.
30749         (break_up_subtract): Likewise.
30750         (linearize_expr_tree): Likewise.
30751         (attempt_builtin_powi): Likewise.
30752         (attempt_builtin_copysign): Likewise.
30753         (transform_stmt_to_copy): Likewise.
30754         (transform_stmt_to_multiply): Likewise.
30755         (dump_ops_vector): Likewise.
30756         * tree-ssa-sccvn.c (vn_nary_build_or_lookup_1): Likewise.
30757         (print_scc): Likewise.
30758         (set_ssa_val_to): Likewise.
30759         (visit_reference_op_store): Likewise.
30760         (visit_use): Likewise.
30761         (sccvn_dom_walker::before_dom_children): Likewise.
30762         (run_scc_vn): Likewise.
30763         * tree-ssa-scopedtables.c (avail_exprs_stack::lookup_avail_expr):
30764         Likewise.
30765         (expr_hash_elt::print): Likewise.
30766         (const_and_copies::pop_to_marker): Likewise.
30767         (const_and_copies::record_const_or_copy_raw): Likewise.
30768         * tree-ssa-structalias.c (compute_dependence_clique): Likewise.
30769         * tree-ssa-uninit.c (collect_phi_def_edges): Likewise.
30770         (dump_predicates): Likewise.
30771         (find_uninit_use): Likewise.
30772         (warn_uninitialized_phi): Likewise.
30773         (pass_late_warn_uninitialized::execute): Likewise.
30774         * tree-ssa.c (verify_vssa): Likewise.
30775         (verify_ssa): Likewise.
30776         (maybe_optimize_var): Likewise.
30777         * tree-vrp.c (dump_value_range): Likewise.
30778         (dump_all_value_ranges): Likewise.
30779         (dump_asserts_for): Likewise.
30780         (register_edge_assert_for_2): Likewise.
30781         (vrp_visit_cond_stmt): Likewise.
30782         (vrp_visit_switch_stmt): Likewise.
30783         (vrp_visit_stmt): Likewise.
30784         (vrp_visit_phi_node): Likewise.
30785         (simplify_cond_using_ranges_1): Likewise.
30786         (fold_predicate_in): Likewise.
30787         (evrp_dom_walker::before_dom_children): Likewise.
30788         (evrp_dom_walker::push_value_range): Likewise.
30789         (evrp_dom_walker::pop_value_range): Likewise.
30790         (execute_early_vrp): Likewise.
30791
30792 2017-05-16  Richard Biener  <rguenther@suse.de>
30793
30794         * dwarf2out.c (loc_list_from_tree_1): Do not create
30795         DW_OP_GNU_variable_value for DECL_IGNORED_P decls.
30796
30797 2017-05-16  Richard Biener  <rguenther@suse.de>
30798
30799         * dwarf2out.c (resolve_variable_value_in_expr): Lookup DIE
30800         just generated.
30801         (note_variable_value_in_expr): If we resolved the decl ref
30802         do not push to the stack.
30803
30804 2017-05-16  Matthew Wahab  <matthew.wahab@arm.com>
30805
30806         * config/arm/arm_neon.h (vadd_f16): Use standard arithmetic
30807         operations in fast-math mode.
30808         (vaddq_f16): Likewise.
30809         (vmul_f16): Likewise.
30810         (vmulq_f16): Likewise.
30811         (vsub_f16): Likewise.
30812         (vsubq_f16): Likewise.
30813         * config/arm/neon.md (add<mode>3): New.
30814         (sub<mode>3): New.
30815         (fma:<VH:mode>3): New.  Also remove outdated comment.
30816         (mul<mode>3): New.
30817
30818 2017-05-16  Martin Liska  <mliska@suse.cz>
30819
30820         PR ipa/79849.
30821         PR ipa/79850.
30822         * ipa-devirt.c (warn_types_mismatch): Fix typo.
30823         (odr_types_equivalent_p): Likewise.
30824
30825 2017-05-15  Sylvestre Ledru  <sylvestre@debian.org>
30826
30827         * plugin.c (try_init_one_plugin): Fix ressource leaks (CID 726637).
30828
30829 2017-05-15  Uros Bizjak  <ubizjak@gmail.com>
30830
30831         PR target/80425
30832         * config/i386.i386.md (*zero_extendsidi2): Do not penalize
30833         non-interunit SSE move alternatives with '?'.
30834         (zero-extendsidi peephole2): New peephole to skip intermediate
30835         general register in SSE zero-extend sequence.
30836
30837 2017-05-15  Jeff Law  <law@redhat.com>
30838
30839         * reorg.c (relax_delay_slots): Create a new variable to hold
30840         the temporary target rather than clobbering TARGET_LABEL.
30841
30842         * config/tilegx/tilegx.c (tilegx_expand_unaligned_load): Add
30843         missing argument to extract_bit_field call.
30844         * config/tilepro/tilepro.c (tilepro_expand_unaligned_load): Likewise.
30845
30846 2017-05-15  Martin Liska  <mliska@suse.cz>
30847
30848         PR driver/31468
30849         * gcc.c (process_command): Do not allow empty argument of -o option.
30850
30851 2017-05-15  Renlin Li  <renlin.li@arm.com>
30852
30853         * config/aarch64/aarch64-protos.h (aarch64_expand_call): Declare.
30854         * config/aarch64/aarch64.c (aarch64_expand_call): Define.
30855         * config/aarch64/constraints.md (Usf): Add long call check.
30856         * config/aarch64/aarch64.md (call): Use aarch64_expand_call.
30857         (call_value): Likewise.
30858         (sibcall): Likewise.
30859         (sibcall_value): Likewise.
30860         (call_insn): New.
30861         (call_value_insn): New.
30862         (sibcall_insn): Update rtx pattern.
30863         (sibcall_value_insn): Likewise.
30864         (call_internal): Remove.
30865         (call_value_internal): Likewise.
30866         (sibcall_internal): Likewise.
30867         (sibcall_value_internal): Likewise.
30868         (call_reg): Likewise.
30869         (call_symbol): Likewise.
30870         (call_value_reg): Likewise.
30871         (call_value_symbol): Likewise.
30872
30873 2017-05-14  Krister Walfridsson  <krister.walfridsson@gmail.com>
30874
30875         PR target/80600
30876         * config/netbsd.h (NETBSD_LIBGCC_SPEC): Always add -lgcc.
30877
30878 2017-05-14  Uros Bizjak  <ubizjak@gmail.com>
30879
30880         * config/i386.i386.c (ix86_cc_modes_compatible): CCNOmode is
30881         compatible with CCGOCmode and with CCZmode.
30882
30883 2017-05-14  Martin Sebor  <msebor@redhat.com>
30884
30885         PR middle-end/77671
30886         * gimple-fold.c (gimple_fold_builtin_sprintf): Make extern.
30887         (gimple_fold_builtin_snprintf): Same.
30888         * gimple-fold.h (gimple_fold_builtin_sprintf): Declare.
30889         (gimple_fold_builtin_snprintf): Same.
30890         * gimple-ssa-sprintf.c (get_format_string): Correct the detection
30891         of character types.
30892         (is_call_safe): New function.
30893         (try_substitute_return_value): Call it.
30894         (try_simplify_call): New function.
30895         (pass_sprintf_length::handle_gimple_call): Call it.
30896
30897 2017-05-14  Martin Sebor  <msebor@redhat.com>
30898
30899         PR middle-end/80669
30900         * builtins.c (expand_builtin_stpncpy): Simplify.
30901
30902 2017-05-14  Daniel Santos  <daniel.santos@pobox.com>
30903
30904         * config/i386/i386.opt: Add option -mcall-ms2sysv-xlogues.
30905         * config/i386/i386.h
30906         (x86_64_ms_sysv_extra_clobbered_registers): Change type to unsigned.
30907         (NUM_X86_64_MS_CLOBBERED_REGS): New macro.
30908         (struct machine_function): Add new members call_ms2sysv,
30909         call_ms2sysv_pad_in, call_ms2sysv_pad_out and call_ms2sysv_extra_regs.
30910         (struct machine_frame_state): New fields sp_realigned and
30911         sp_realigned_offset.
30912         * config/i386/i386.c
30913         (enum xlogue_stub): New enum.
30914         (enum xlogue_stub_sets): New enum.
30915         (class xlogue_layout): New class.
30916         (struct ix86_frame): New fields stack_realign_allocate_offset,
30917         stack_realign_offset and outlined_save_offset.  Modify comments to
30918         detail stack layout when using out-of-line stubs.
30919         (ix86_target_string): Add -mcall-ms2sysv-xlogues option.
30920         (ix86_option_override_internal): Add sorry() for TARGET_SEH and
30921         -mcall-ms2sysv-xlogues.
30922         (stub_managed_regs): New static variable.
30923         (ix86_save_reg): Add new parameter ignore_outlined to optionally omit
30924         registers managed by out-of-line stub.
30925         (disable_call_ms2sysv_xlogues): New function.
30926         (ix86_compute_frame_layout): Modify re-alignment calculations, disable
30927         m->call_ms2sysv when appropriate and compute frame layout for
30928         out-of-line stubs.
30929         (sp_valid_at, fp_valid_at): New inline functions.
30930         (choose_basereg): New function.
30931         (choose_baseaddr): Add align parameter, use choose_basereg and modify
30932         all callers.
30933         (ix86_emit_save_reg_using_mov, ix86_emit_restore_sse_regs_using_mov):
30934         Use align parameter of choose_baseaddr to generated aligned SSE movs
30935         when possible.
30936         (pro_epilogue_adjust_stack): Modify to track
30937         machine_frame_state::sp_realigned.
30938         (ix86_nsaved_regs): Modify to accommodate changes to ix86_save_reg.
30939         (ix86_nsaved_sseregs): Likewise.
30940         (ix86_emit_save_regs): Likewise.
30941         (ix86_emit_save_regs_using_mov): Likewise.
30942         (ix86_emit_save_sse_regs_using_mov): Likewise.
30943         (get_scratch_register_on_entry): Likewise.
30944         (gen_frame_set): New function.
30945         (gen_frame_load): Likewise.
30946         (gen_frame_store): Likewise.
30947         (emit_outlined_ms2sysv_save): Likewise.
30948         (emit_outlined_ms2sysv_restore): Likewise.
30949         (ix86_expand_prologue): Modify stack re-alignment code and call
30950         emit_outlined_ms2sysv_save when appropriate.
30951         (ix86_emit_leave): Clear machine_frame_state::sp_realigned.  Add
30952         parameter rtx_insn *insn, which allows the function to be used to only
30953         generate the notes.
30954         (ix86_expand_epilogue): Modify validity checks of frame and stack
30955         pointers, and call emit_outlined_ms2sysv_restore when appropriate.
30956         (ix86_expand_call): Modify to enable m->call_ms2sysv when appropriate.
30957         * config/i386/predicates.md
30958         (save_multiple): New predicate.
30959         (restore_multiple): Likewise.
30960         * config/i386/sse.md
30961         (save_multiple<mode>): New pattern.
30962         (save_multiple_realign<mode>): Likewise.
30963         (restore_multiple<mode>): Likewise.
30964         (restore_multiple_and_return<mode>): Likewise.
30965         (restore_multiple_leave_return<mode>): Likewise.
30966         * Makefile.in: Export HOSTCXX and HOSTCXXFLAGS to site.exp
30967
30968 2017-05-14  Julia Koval  <julia.koval@intel.com>
30969
30970         * config/i386/i386-builtin-types.def (VOID_FTYPE_INT_INT64): New type.
30971         * config/i386/i386-builtin.def (__builtin_ia32_xgetbv)
30972         (__builtin_ia32_xsetbv): New builtins.
30973         * config/i386/i386.c (ix86_expand_special_args_builtin):
30974         Process new types.
30975         (ix86_expand_builtin): Special expand for new intrinsics.
30976         * config/i386/i386.md (UNSPECV_XGETBV, UNSPECV_XSETBV): New.
30977         (xsetbv, xsetbv_rex64, xgetbv, xgetbv_rex64): New insn patterns.
30978         * config/i386/xsaveintrin.h (_xsetbv, _getbv): New intrinsics.
30979
30980 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
30981
30982         * cfganal.c (inverted_post_order_compute): Change argument type
30983         to vec *.
30984         * cfganal.h (inverted_post_order_compute): Adjust prototype.
30985         * df-core.c (rest_of_handle_df_initialize): Adjust.
30986         (rest_of_handle_df_finish): Likewise.
30987         (df_analyze_1): Likewise.
30988         (df_analyze): Likewise.
30989         (loop_inverted_post_order_compute): Change argument to be a vec *.
30990         (df_analyze_loop): Adjust.
30991         (df_get_n_blocks): Likewise.
30992         (df_get_postorder): Likewise.
30993         * df.h (struct df_d): Change field to be a vec.
30994         * lcm.c (compute_laterin): Adjust.
30995         (compute_available): Likewise.
30996         * lra-lives.c (lra_create_live_ranges_1): Likewise.
30997         * tree-ssa-dce.c (remove_dead_stmt): Likewise.
30998         * tree-ssa-pre.c (compute_antic): Likewise.
30999
31000 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
31001
31002         * cfganal.c (connect_infinite_loops_to_exit): Adjust.
31003         (depth_first_search::depth_first_search): Change structure init
31004         function to this constructor.
31005         (depth_first_search::add_bb): Rename function to this member.
31006         (depth_first_search::execute): Likewise.
31007         (flow_dfs_compute_reverse_finish): Adjust.
31008
31009 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
31010
31011         * ddg.c (find_nodes_on_paths): Use auto_sbitmap.
31012         (longest_simple_path): Likewise.
31013         * shrink-wrap.c (spread_components): Likewise.
31014         (disqualify_problematic_components): Likewise.
31015         (emit_common_heads_for_components): Likewise.
31016         (emit_common_tails_for_components): Likewise.
31017         (insert_prologue_epilogue_for_components): Likewise.
31018
31019 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
31020
31021         * tree-ssa-dse.c (dse_dom_walker): Make m_live_byes a
31022         auto_sbitmap.
31023
31024 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
31025
31026         * df-core.c (df_set_blocks): Start using auto_bitmap.
31027         (df_compact_blocks): Likewise.
31028         * df-problems.c (df_rd_confluence_n): Likewise.
31029         * df-scan.c (df_insn_rescan_all): Likewise.
31030         (df_process_deferred_rescans): Likewise.
31031         (df_update_entry_block_defs): Likewise.
31032         (df_update_exit_block_uses): Likewise.
31033         (df_entry_block_bitmap_verify): Likewise.
31034         (df_exit_block_bitmap_verify): Likewise.
31035         (df_scan_verify): Likewise.
31036         * lra-constraints.c (lra_constraints): Likewise.
31037         (undo_optional_reloads): Likewise.
31038         (lra_undo_inheritance): Likewise.
31039         * lra-remat.c (calculate_gen_cands): Likewise.
31040         (do_remat): Likewise.
31041         * lra-spills.c (assign_spill_hard_regs): Likewise.
31042         (spill_pseudos): Likewise.
31043         * tree-ssa-pre.c (bitmap_set_and): Likewise.
31044         (bitmap_set_subtract_values): Likewise.
31045
31046 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
31047
31048         * haifa-sched.c (estimate_shadow_tick): Replace manual bitmap
31049         management with auto_bitmap.
31050         (fix_inter_tick): Likewise.
31051         (fix_recovery_deps): Likewise.
31052         * ira.c (add_store_equivs): Likewise.
31053         (find_moveable_pseudos): Likewise.
31054         (split_live_ranges_for_shrink_wrap): Likewise.
31055         * print-rtl.c (rtx_reuse_manager::rtx_reuse_manager): Likewise.
31056         (rtx_reuse_manager::seen_def_p): Likewise.
31057         (rtx_reuse_manager::set_seen_def): Likewise.
31058         * print-rtl.h (class rtx_reuse_manager): Likewise.
31059
31060 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
31061
31062         * bt-load.c (combine_btr_defs): Use auto_bitmap to manage bitmap
31063         lifetime.
31064         (migrate_btr_def): Likewise.
31065         * cfgloop.c (get_loop_body_in_bfs_order): Likewise.
31066         * df-core.c (loop_post_order_compute): Likewise.
31067         (loop_inverted_post_order_compute): Likewise.
31068         * hsa-common.h: Likewise.
31069         * hsa-gen.c (hsa_bb::~hsa_bb): Likewise.
31070         * init-regs.c (initialize_uninitialized_regs): Likewise.
31071         * ipa-inline.c (resolve_noninline_speculation): Likewise.
31072         (inline_small_functions): Likewise.
31073         * ipa-reference.c (ipa_reference_write_optimization_summary): Likewise.
31074         * ira.c (combine_and_move_insns): Likewise.
31075         (build_insn_chain): Likewise.
31076         * loop-invariant.c (find_invariants): Likewise.
31077         * lower-subreg.c (propagate_pseudo_copies): Likewise.
31078         * predict.c (tree_predict_by_opcode): Likewise.
31079         (predict_paths_leading_to): Likewise.
31080         (predict_paths_leading_to_edge): Likewise.
31081         (estimate_loops_at_level): Likewise.
31082         (estimate_loops): Likewise.
31083         * shrink-wrap.c (try_shrink_wrapping): Likewise.
31084         (spread_components): Likewise.
31085         * tree-cfg.c (remove_edge_and_dominated_blocks): Likewise.
31086         * tree-loop-distribution.c (rdg_build_partitions): Likewise.
31087         * tree-predcom.c (tree_predictive_commoning_loop): Likewise.
31088         * tree-ssa-coalesce.c (coalesce_ssa_name): Likewise.
31089         * tree-ssa-phionlycprop.c (pass_phi_only_cprop::execute): Likewise.
31090         * tree-ssa-pre.c (remove_dead_inserted_code): Likewise.
31091         * tree-ssa-sink.c (nearest_common_dominator_of_uses): Likewise.
31092         * tree-ssa-threadupdate.c (compute_path_counts): Likewise.
31093         (mark_threaded_blocks): Likewise.
31094         (thread_through_all_blocks): Likewise.
31095         * tree-ssa.c (verify_ssa): Likewise.
31096         (execute_update_addresses_taken): Likewise.
31097         * tree-ssanames.c (verify_ssaname_freelists): Likewise.
31098
31099 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
31100
31101         * cfganal.c (mark_dfs_back_edges): Replace manual stack with
31102         auto_vec.
31103         (post_order_compute): Likewise.
31104         (inverted_post_order_compute): Likewise.
31105         (pre_and_rev_post_order_compute_fn): Likewise.
31106
31107 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
31108
31109         * genrecog.c (int_set::int_set): Explicitly construct our
31110         auto_vec base class.
31111         * vec.h (auto_vec::auto_vec): New constructor.
31112
31113 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
31114
31115         * bitmap.h (class auto_bitmap): New constructor taking
31116         bitmap_obstack * argument.
31117
31118 2017-05-13  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
31119
31120         * bitmap.h (class auto_bitmap): Change type of m_bits to
31121         bitmap_head, and adjust ctor / dtor and member operators.
31122
31123 2017-05-13  Uros Bizjak  <ubizjak@gmail.com>
31124
31125         * compare-elim.c (equivalent_reg_at_start): Return NULL_RTX
31126         when returned register mode doesn't match original mode.
31127
31128 2017-05-12  Jeff Law  <law@redhat.com>
31129             Jakub Jelinek  <jakub@redhat.com>
31130
31131         * config/mn10300/mn10300.c (mn10300_match_ccmode): Fix where
31132         we look for cc setter after the compare-elim changes.
31133         * config/mn10300/mn10300.md (addsi3_flags): Fix order of patterns
31134         within the vector to match what compare-elim now expects.
31135         (subsi3_flags, andsi3_flags, iorsi3_flags): Likewise.
31136         (xorsi3_flags, one_cmplsi2_flags): Likewise.
31137
31138         * config/rx/rx.c (rx_match_ccmode): Fix where we look cc setter
31139         after the compare-elim changes.
31140         * config/rx/rx.md (abssi2_flags): Fix order of patterns within
31141         the vector to match what compare-elim now expects.
31142         (addsi3_flags, adc_flags, addsi3_flags peepholes): Likewise.
31143         (andsi3_flags, negsi2_flags, one_cmplsi2_flags): Likewise.
31144         (iorsi3_flags, rotlsi3_flags, rotrsi3_flags): Likewise.
31145         (ashrsi3_flags, lshrsi3_flags, ashlsi3_flags): Likewise.
31146         (ssaddsi3, subsi3_flags, sbb_flags, xorsi3_flags): Likewise.
31147
31148         * config/visium/visium.c (single_set_and_flags): Fix where
31149         we look for cc setter after the compare-elim changes.
31150         * config/visium/visium.md (flags_subst_logic): Fix order of patterns
31151         with the vector to match what compare-elim now expects.
31152         (flags_subst_arith, add<mode>3_insn_set_carry): Likewise.
31153         (add<mode>3_insn_set_overflow, addsi3_insn_set_carry): Likewise.
31154         (addsi3_insn_set_overflow, sub<mode>3_insn_set_carry): Likewise.
31155         (sub<mode>3_insn_set_overflow, subsi3_insn_set_carry): Likewise.
31156         (subsi3_insn_set_overflow, negsi2_insn_set_carry): Likewise.
31157         (neg<mode>2_insn_set_overflow): Likewise.
31158
31159 2017-05-12  Jim Wilson  <jim.wilson@linaro.org>
31160
31161         PR middle-end/79794
31162         * expmed.c (extract_bit_field_1): Add alt_rtl argument.  Before
31163         maybe_expand_insn call, set ops[0].target.  If still set after call,
31164         set alt_rtl.  Add extra arg to recursive calls.
31165         (extract_bit_field): Add alt_rtl argument.  Pass to
31166         extract_bit_field.
31167         * expmed.h (extract_bit_field): Fix prototype.
31168         * expr.c (emit_group_load_1, copy_blkmode_from_reg)
31169         (copy_blkmode_to_reg, read_complex_part, store_field): Pass extra NULL
31170         to extract_bit_field_calls.
31171         (expand_expr_real_1): Pass alt_rtl to expand_expr_real instead of 0.
31172         Pass alt_rtl to extract_bit_field calls.
31173         * calls.c (store_unaligned_arguments_into_psuedos)
31174         load_register_parameters): Pass extra NULL to extract_bit_field calls.
31175         * optabs.c (maybe_legitimize_operand): Clear op->target when call
31176         gen_reg_rtx.
31177         * optabs.h (struct expand_operand): Add target bitfield.
31178
31179 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
31180
31181         * compare-elim.c (try_eliminate_compare): Canonicalize
31182         operation with embedded compare to
31183         [(set (reg:CCM) (compare:CCM (operation) (immediate)))
31184          (set (reg) (operation)].
31185
31186         * config/i386/i386.c (TARGET_FLAGS_REGNUM): New define.
31187
31188 2017-05-12  Uros Bizjak  <ubizjak@gmail.com>
31189
31190         PR target/80723
31191         * config/i386/i386.c (ix86_rtx_cost) [case PLUS]: Ignore the
31192         cost of adding a carry flag for ADC instruction.
31193         [case MINUS]: Ignore the cost of subtracting a carry flag
31194         for SBB instruction.
31195
31196 2017-05-12  Steven Munroe  <munroesj@gcc.gnu.org>
31197
31198         * config.gcc (powerpc*-*-*): Add bmi2intrin.h, bmiintrin.h,
31199         and x86intrin.h
31200         * config/rs6000/bmiintrin.h: New file.
31201         * config/rs6000/bmi2intrin.h: New file.
31202         * config/rs6000/x86intrin.h: New file.
31203
31204 2017-05-12  Jeff Law  <law@redhat.com>
31205
31206         * tree-vrp.c (vrp_dom_walker::before_dom_children): Push unwinding
31207         markers.
31208
31209 2017-05-12  Peter Bergner  <bergner@vnet.ibm.com>
31210
31211         PR middle-end/80707
31212         * tree-cfg.c: Remove cfg edges of unreachable case statements.
31213
31214 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
31215
31216         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
31217         early expansion of vector divide builtins.
31218         (builtin_function_type): Add VSX_BUILTIN_UDIV_V2DI to the list of
31219         builtins identified as having unsigned arguments.
31220
31221 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
31222
31223         * config/rs6000/rs6000.c (gimple-fold.h): New #include.
31224         (rs6000_gimple_fold_builtin): Add handling for early GIMPLE
31225         expansion of vector logical operations (and, andc, or, xor,
31226         nor, orc, nand).
31227
31228 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
31229
31230         * gimple-fold.c (create_tmp_reg_or_ssa_name): Remove static declaration.
31231         * gimple-fold.h (create_tmp_reg_or_ssa_name): New prototype.
31232
31233 2017-05-12  Will Schmidt  <will_schmidt@vnet.ibm.com>
31234
31235         * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Add handling for
31236         early GIMPLE expansion of vector multiplies.
31237
31238 2017-05-12  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
31239
31240         * config/arm/arm.md (movsi): Add TARGET_32BIT in addition to the
31241         TARGET_HAVE_MOVT conditional.
31242         (movt splitter): Likewise.
31243
31244 2017-05-12  Richard Biener  <rguenther@suse.de>
31245
31246         * tree-ssa-sccvn.h (has_VN_INFO): Declare.
31247         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
31248         Fold all stmts not inplace.
31249
31250 2017-05-12  Richard Biener  <rguenther@suse.de>
31251
31252         PR tree-optimization/80713
31253         * tree-ssa-pre.c (remove_dead_inserted_code): Clear
31254         inserted_exprs bit for not removed stmts.
31255
31256 2017-05-12  Thomas Schwinge  <thomas@codesourcery.com>
31257
31258         PR middle-end/69921
31259         * tree-parloops.c (create_parallel_loop): Set "oacc kernels
31260         parallelized" attribute for parallelized OpenACC kernels.
31261         * omp-offload.c (execute_oacc_device_lower): Use it.
31262
31263         * omp-expand.c (expand_omp_target) <GF_OMP_TARGET_KIND_OACC_KERNELS>:
31264         Set "oacc kernels" attribute.
31265         * omp-general.c (oacc_set_fn_attrib): Remove is_kernel formal
31266         parameter.  Adjust all users.
31267         (oacc_fn_attrib_kernels_p): Remove function.
31268         * omp-offload.c (execute_oacc_device_lower): Look for "oacc
31269         kernels" attribute instead of calling oacc_fn_attrib_kernels_p.
31270         * tree-ssa-loop.c (gate_oacc_kernels): Likewise.
31271         * tree-parloops.c (create_parallel_loop): If oacc_kernels_p,
31272         assert "oacc kernels" attribute is set.
31273
31274 2017-05-11  Carl Love  <cel@us.ibm.com>
31275
31276         * config/rs6000/rs6000-c: Add support for built-in functions
31277         vector unsigned char vec_popcnt (vector signed char)
31278         vector unsigned char vec_popcnt (vector unsigned char)
31279         vector unsigned short vec_popcnt (vector signed short)
31280         vector unsigned short vec_popcnt (vector unsigned short)
31281         vector unsigned int vec_popcnt (vector signed int)
31282         vector unsigned int vec_popcnt (vector unsigned int)
31283         vector unsigned long long vec_popcnt (vector signed long long)
31284         vector unsigned long long vec_popcnt (vector unsigned long long)
31285         vector signed long long vec_slo (vector signed long long,
31286                                          vector signed char)
31287         vector signed long long vec_slo (vector signed long long,
31288                                          vector unsigned char)
31289         vector unsigned long long vec_slo (vector unsigned long long,
31290                                            vector signed char)
31291         vector unsigned long long vec_slo (vector unsigned long long,
31292                                            vector unsigned char)
31293         * config/rs6000/rs6000-builtin.def: Add definitions for VPOPCNTUB,
31294         VPOPCNTUH, VPOPCNTUW, and VPOPCNTUD overloads.
31295         * config/rs6000/altivec.h: Add define for vec_popcnt, vec_popcntb,
31296         vec_popcnth, vec_popcntw and vec_popcntd built-in functions.
31297         * doc/extend.texi: Update the built-in documentation file for the
31298         new built-in functions.
31299
31300 2017-05-11  Michael Meissner  <meissner@linux.vnet.ibm.com>
31301
31302         * attribs.h (sorted_attr_string): Move machine independent
31303         functions for target clone support from the i386 port to common
31304         code.  Rename ix86_function_versions to common_function_versions.
31305         Rename make_name to make_unique_name.
31306         (common_function_versions): Likewise.
31307         (make_unique_name): Likewise.
31308         (make_dispatcher_decl): Likewise.
31309         (is_function_default_version): Likewise.
31310         * attribs.c (attr_strcmp): Likewise.
31311         (sorted_attr_string): Likewise.
31312         (common_function_versions): Likewise.
31313         (make_unique_name): Likewise.
31314         (make_dispatcher_decl): Likewise.
31315         (is_function_default_version): Likewise.
31316         * config/i386/i386.c (attr_strcmp): Likewise.
31317         (sorted_attr_string): Likewise.
31318         (ix86_function_versions): Likewise.
31319         (make_name): Likewise.
31320         (make_dispatcher_decl): Likewise.
31321         (is_function_default_version): Likewise.
31322         (TARGET_OPTION_FUNCTION_VERSIONS): Update target function hook.
31323
31324 2017-05-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31325
31326         PR target/80695
31327         * config/rs6000/rs6000.c (rs6000_builtin_vectorization_cost):
31328         Account for direct move costs for vec_construct of integer
31329         vectors.
31330
31331 2017-05-11  Uros Bizjak  <ubizjak@gmail.com>
31332
31333         PR target/80706
31334         * config/i386/sync.md (UNSPEC_LDX_ATOMIC): New unspec.
31335         (UNSPEC_STX_ATOMIC): Ditto.
31336         (loaddi_via_sse): New insn.
31337         (storedi_via_sse): Ditto.
31338         (atomic_loaddi_fpu): Emit loaddi_via_sse and storedi_via_sse.
31339         Update corresponding peephole2 patterns.
31340         (atomic_storedi_fpu): Ditto.
31341
31342 2017-05-11  Julia Koval  <julia.koval@intel.com>
31343
31344         * config/i386/avx512fintrin.h (_mm_mask_rsqrt14_sd)
31345         (_mm_maskz_rsqrt14_sd, _mm_mask_rsqrt14_ss, _mm_maskz_rsqrt14_ss):
31346         New intrinsics.
31347         * config/i386/i386-builtin.def (__builtin_ia32_rsqrt14sd_mask)
31348         (__builtin_ia32_rsqrt14ss_mask): New builtins.
31349         * config/i386/sse.md (rsqrt14_<mode>_mask): New pattern.
31350
31351 2017-05-11  Nathan Sidwell  <nathan@acm.org>
31352
31353         * graphite-poly.c: Include dumpfile.h.
31354
31355         * dumpfle.h (dump_function): Declare here ...
31356         * tree-dump.h (dump_function): ... not here.
31357         * dumpfile.c: #include tree-cfg.h.
31358         (dump_function): Move here from ...
31359         * tree-dump.c (dump_function): ... here.
31360         * gimplify.c: #include splay-tree.h, not tree-dump.h.
31361         * graphite-poly.c: Don't include tree-dump.h.
31362         * cgraphclones.c: Include dumpfile.h not tree-dump.h.
31363         * print-tree.c: Likewise.
31364         * stor-layout.c: Likewise.
31365         * tree-nested.c: Likewise.
31366
31367         * dumpfile.c (dump_start): Use TDF_FLAGS.
31368         (dump_enable_all): Fix TDF_KIND check thinko.
31369
31370 2017-05-11  Kelvin Nilsen  <kelvin@gcc.gnu.org>
31371
31372         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
31373         array entries to represent two legal parameterizations of the
31374         overloaded __builtin_cmpb function, as represented by the
31375         P6_OV_BUILTIN_CMPB constant.
31376         (altivec_resolve_overloaded_builtin): Add special case handling
31377         for the __builtin_cmpb function, as represented by the
31378         P6_OV_BUILTIN_CMPB constant.
31379         * config/rs6000/rs6000-builtin.def (BU_P6_2): New macro.
31380         (BU_P6_64BIT_2): New macro.
31381         (BU_P6_OVERLOAD_2): New macro
31382         (CMPB_32): Add 32-bit compare-bytes support for 32-bit only targets.
31383         (CMPB): Add 64-bit compare-bytes support for 32-bit and 64-bit targets.
31384         (CMPB): Add overload support to represent both 32-bit and 64-bit
31385         compare-bytes function.
31386         * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add
31387         support for TARGET_CMPB.
31388         * config/rs6000/rs6000.h: Add support for RS6000_BTM_CMPB.
31389         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
31390         documentation of the __builtin_cmpb overloaded built-in function.
31391
31392 2017-05-11  Richard Biener  <rguenther@suse.de>
31393
31394         PR tree-optimization/80705
31395         * tree-vect-data-refs.c (vect_analyze_data_refs): DECL_NONALIASED
31396         bases are not vectorizable.
31397
31398 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31399
31400         * tree-ssa-loop-ivopts.c (determine_set_costs): Skip non-interger
31401         when counting register pressure.
31402
31403 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31404
31405         * tree-ssa-loop-ivopts.c (compare_cost_pair): New.
31406         (iv_ca_more_deps): Renamed to ...
31407         (iv_ca_compare_deps): ... this.
31408         (iv_ca_extend): Extend iv_ca if NEW_CP is cheaper than OLD_CP.
31409
31410 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31411
31412         * tree-ssa-loop-ivopts.c (find_interesting_uses): Move inv vars dump
31413         to ...
31414         (determine_group_iv_costs): ... here.
31415         (find_inv_vars_cb): Record inv var if it's not recorded before.
31416
31417 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31418
31419         * tree-ssa-loop-ivopts.c (allow_ip_end_pos_p): Refine comments.
31420         (get_shiftadd_cost): Ditto.
31421
31422 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31423
31424         * tree-ssa-address.c: Include header file.
31425         (move_hint_to_base): Return TRUE if BASE_HINT is moved to memory
31426         address.
31427         (add_to_parts): Refactor.
31428         (addr_to_parts): New parameter.  Update use of move_hint_to_base.
31429         (create_mem_ref): Update use of addr_to_parts.  Re-associate addr
31430         in new order.
31431
31432 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31433
31434         PR tree-optimization/53090
31435         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New enum value
31436         COMP_IV_EXPR_2.
31437         (extract_cond_operands): Detect condition with IV on both sides
31438         and return COMP_IV_EXPR_2.
31439         (find_interesting_uses_cond): Add iv_use for both IVs in condition.
31440         (rewrite_use_compare): Simplify by removing call to function
31441         extract_cond_operands.
31442
31443 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31444
31445         * tree-ssa-loop-ivopts.c (enum comp_iv_rewrite): New.
31446         (extract_cond_operands): Detect condition comparing against non-
31447         invariant bound and return appropriate enum value.
31448         (find_interesting_uses_cond): Update use of extract_cond_operands.
31449         Handle its return value accordingly.
31450         (determine_group_iv_cost_cond, rewrite_use_compare): Ditto.
31451
31452 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31453
31454         * tree-ssa-loop-ivopts.c (rewrite_use_nonlinear_expr): Re-associate
31455         nonlinear iv_use computation in loop invariant sensitive way.
31456
31457 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31458
31459         * tree-ssa-loop-ivopts.c (relate_compare_use_with_all_cands): New.
31460         (find_iv_candidates): Call relate_compare_use_with_all_cands.
31461
31462 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31463
31464         * tree-ssa-loop-ivopts.c (struct iv_cand): New field inv_exprs.
31465         (dump_cand): Support iv_cand.inv_exprs.
31466         (add_candidate_1): Record invariant exprs in iv_cand.inv_exprs
31467         for candidates.
31468         (iv_ca_set_no_cp, iv_ca_set_cp, free_loop_data): Support
31469         iv_cand.inv_exprs.
31470
31471 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31472
31473         * tree-ssa-loop-ivopts.c (multiplier_allowed_in_address_p): Move
31474         from ...
31475         * tree-ssa-address.c (multiplier_allowed_in_address_p): ... to here
31476         as local function.  Include necessary header files.
31477         * tree-ssa-loop-ivopts.h (multiplier_allowed_in_address_p): Delete.
31478
31479 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31480
31481         * tree-ssa-loop-ivopts.c (autoinc_possible_for_pair): Simplify.
31482
31483 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31484
31485         * tree-ssa-loop-ivopts.c (force_expr_to_var_cost): Handle more
31486         operators: TRUNC_DIV_EXPR, BIT_AND_EXPR, BIT_IOR_EXPR, LSHIFT_EXPR,
31487         RSHIFT_EXPR and BIT_NOT_EXPR.
31488
31489 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31490
31491         * tree-ssa-loop-ivopts.c (get_loop_invariant_expr): Simplify.
31492         (adjust_setup_cost): New parameter supporting round up adjustment.
31493         (struct address_cost_data): Delete.
31494         (force_expr_to_var_cost): Don't bound cost with spill_cost.
31495         (split_address_cost, ptr_difference_cost): Delete.
31496         (difference_cost, compare_aff_trees, record_inv_expr): Delete.
31497         (struct ainc_cost_data): New struct.
31498         (get_address_cost_ainc): New function.
31499         (get_address_cost, get_computation_cost): Reimplement.
31500         (determine_group_iv_cost_address): Record inv_expr for all uses of
31501         a group.
31502         (determine_group_iv_cost_cond): Call get_loop_invariant_expr.
31503         (iv_ca_has_deps): Reimplemented to ...
31504         (iv_ca_more_deps): ... this.  Check if NEW_CP introduces more deps
31505         than OLD_CP.
31506         (iv_ca_extend): Call iv_ca_more_deps.
31507
31508 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31509
31510         * tree-ssa-address.c (struct mem_address): Move to header file.
31511         (valid_mem_ref_p, move_fixed_address_to_symbol): Make it global.
31512         * tree-ssa-address.h (struct mem_address): Move from C file.
31513         (valid_mem_ref_p, move_fixed_address_to_symbol): Declare.
31514
31515 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31516
31517         * tree-affine.h (aff_combination_type): New interface.
31518         (aff_combination_zero_p): Remove static.
31519         (aff_combination_const_p): New interface.
31520         (aff_combination_singleton_var_p): New interfaces.
31521
31522 2017-05-11  Richard Biener  <rguenther@suse.de>
31523
31524         * tree-ssa-pre.c (eliminate_dom_walker::before_dom_children):
31525         Skip unreachable blocks and destinations.
31526         (eliminate): Move stmt removal and fixup ...
31527         (fini_eliminate): ... here.  Skip inserted exprs.
31528         (pass_pre::execute): Move fini_pre after fini_eliminate.
31529         * tree-ssa-tailmerge.c: Include tree-cfgcleanup.h.
31530         (tail_merge_optimize): Run cleanup_tree_cfg if requested by
31531         PRE to get rid of dead code that has invalid SSA form and
31532         split critical edges again.
31533
31534 2017-05-11  Bin Cheng  <bin.cheng@arm.com>
31535
31536         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
31537
31538 2017-05-11  Richard Biener  <rguenther@suse.de>
31539
31540         * passes.c (execute_function_todo): Verify loops if they are
31541         said to be up-to-date.
31542         * cfgexpand.c (pass_expand::execute): Discard loops for -dx.
31543         * trans-mem.c (pass_tm_edges::execute): Mark loops for fixup.
31544
31545 2017-05-10  John David Anglin  <danglin@gcc.gnu.org>
31546
31547         PR target/80090
31548         * config/pa/pa.c (pa_assemble_integer): When outputting a SYMBOL_REF,
31549         handle calling assemble_external ourself.
31550
31551         PR target/79027
31552         * config/pa/pa.c (pa_cannot_change_mode_class): Reject changes to/from
31553         modes with zero size.  Enhance comment.
31554
31555 2017-05-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31556
31557         * config/rs6000/rs6000.c (altivec_init_builtins): Define POWER8
31558         built-ins for vec_xl and vec_xst with short and char pointer
31559         arguments.
31560
31561 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
31562
31563         * config/i386/avx512fintrin.h (_mm_mask_max_round_sd)
31564         (_mm_maskz_max_round_sd, _mm_mask_max_round_ss)
31565         (_mm_maskz_max_round_ss, _mm_mask_min_round_sd)
31566         (_mm_maskz_min_round_sd, _mm_mask_min_round_ss)
31567         (_mm_maskz_min_round_ss): New intrinsics.
31568         * config/i386/i386-builtin-types.def (V2DF, V2DF, V2DF, V2DF, UQI, INT)
31569         (V4SF, V4SF, V4SF, V4SF, UQI, INT): New function type aliases.
31570         * config/i386/i386-builtin.def (__builtin_ia32_maxsd_mask_round)
31571         (__builtin_ia32_maxss_mask_round, __builtin_ia32_minsd_mask_round)
31572         (__builtin_ia32_minss_mask_round): New builtins.
31573         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
31574         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
31575         * config/i386/sse.md (<sse>_vm<code><mode>3<round_saeonly_name>):
31576         Rename to ...
31577         (<sse>_vm<code><mode>3<mask_name><round_saeonly_name>): ... this.
31578         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_op3>%2, %1, %0|%0, %1, %<iptr>2<round_saeonly_op3>}):
31579         Change to ...
31580         (v<maxmin_float><ssescalarmodesuffix>\t{<round_saeonly_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_saeonly_mask_op3>}):
31581         ... this.
31582
31583 2017-05-10  Sebastian Peryt  <sebastian.peryt@intel.com>
31584
31585         * config/i386/avx512fintrin.h (_mm_mask_mul_round_sd)
31586         (_mm_maskz_mul_round_sd, _mm_mask_mul_round_ss)
31587         (_mm_maskz_mul_round_ss, _mm_mask_div_round_sd)
31588         (_mm_maskz_div_round_sd, _mm_mask_div_round_ss)
31589         (_mm_maskz_div_round_ss, _mm_mask_mul_sd, _mm_maskz_mul_sd)
31590         (_mm_mask_mul_ss, _mm_maskz_mul_ss, _mm_mask_div_sd)
31591         (_mm_maskz_div_sd, _mm_mask_div_ss, _mm_maskz_div_ss): New intrinsics.
31592         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
31593         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
31594         * config/i386/i386-builtin.def (__builtin_ia32_divsd_mask_round)
31595         (__builtin_ia32_divss_mask_round, __builtin_ia32_mulsd_mask_round)
31596         (__builtin_ia32_mulss_mask_round): New builtins.
31597         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
31598         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
31599         * config/i386/sse.md (<sse>_vm<multdiv_mnemonic><mode>3<round_name>):
31600         Rename to ...
31601         (<sse>_vm<multdiv_mnemonic><mode>3<mask_name><round_name>): ... this.
31602         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
31603         Change to ...
31604         (v<multdiv_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
31605         ... this.
31606
31607 2017-05-10  Julia Koval  <julia.koval@intel.com>
31608
31609         * config/i386/avxintrin.h (_mm256_set_m128, _mm256_set_m128d)
31610         (_mm256_set_m128i, _mm256_setr_m128, _mm256_setr_m128d)
31611         (_mm256_setr_m128i): New intrinsics.
31612
31613 2017-05-10  Julia Koval  <julia.koval@intel.com>
31614
31615         * config/i386/avx512fintrin.h (_mm_mask_rcp14_sd)
31616         (_mm_maskz_rcp14_sd, _mm_mask_rcp14_ss)
31617         (_mm_maskz_rcp14_ss): New intrinsics.
31618         * config/i386/i386-builtin.def (__builtin_ia32_rcp14sd_mask)
31619         (__builtin_ia32_rcp14ss_mask): New builtins.
31620         * config/i386/sse.md (srcp14<mode>_mask): New pattern.
31621
31622 2017-05-10  Peter Bergner  <bergner@vnet.ibm.com>
31623
31624         PR tree-optimization/51513
31625         * tree-cfg.c (gimple_seq_unreachable_p): New function.
31626         (assert_unreachable_fallthru_edge_p): Use it.
31627         (group_case_labels_stmt): Likewise.
31628         * tree-cfg.h: Prototype it.
31629         * stmt.c: Include cfghooks.h and tree-cfg.h.
31630         (emit_case_dispatch_table) <gap_label>: New local variable.
31631         Use it to fill dispatch table gaps.
31632         Test for default_label before updating probabilities.
31633         (expand_case) <default_label>: Remove unneeded initialization.
31634         Test for unreachable default case statement and remove its edge.
31635         Set default_label accordingly.
31636         * tree-ssa-ccp.c (optimize_unreachable): Update comment.
31637
31638 2017-05-10  Carl Love  <cel@us.ibm.com>
31639
31640         * config/rs6000/rs6000-c: Add support for built-in functions
31641         vector signed char      vec_neg (vector signed char)
31642         vector signed short int vec_neg (vector short int)
31643         vector signed int       vec_neg (vector signed int)
31644         vector signed long long vec_neg (vector signed long long)
31645         vector float            vec_neg (vector float)
31646         vector double           vec_neg (vector double)
31647         * config/rs6000/rs6000-builtin.def: Add definitions for NEG function
31648         overload.
31649         * config/rs6000/altivec.h: Add define for vec_neg
31650         * doc/extend.texi: Update the built-in documentation for the
31651         new built-in functions.
31652
31653 2017-05-10  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
31654
31655         PR tree-optimization/77644
31656         * match.pd (sqrt(x) cmp sqrt(y) -> x cmp y): New pattern.
31657
31658 2017-05-10  Nathan Sidwell  <nathan@acm.org>
31659
31660         * dumpfile.h (TDI_lang_all): New.
31661         (TDF_KIND): New. Renumber others
31662         (TDF_LANG, TDF_TREE, TDF_RTL, TDF_IPA): Enumerate value, rather
31663         than bits.
31664         * dumpfile.c (dump_files): Mark language dumps as TDF_LANG.  add
31665         lang-all.
31666         (get_dump_file_name): Adjust suffix generation.
31667         (dump_enable_all): Use TDF_KIND.
31668         * doc/invoke.texi (-fdump-lang-all): Document.
31669
31670         * dumpfile.h: Tabify.
31671
31672 2017-05-10  Wilco Dijkstra  <wdijkstr@arm.com>
31673
31674         PR target/80671
31675         * config/aarch64/cortex-a57-fma-steering.c (merge_forest):
31676         Move member access before delete.
31677
31678 2017-05-10  Alexandre Oliva  <aoliva@redhat.com>
31679
31680         * tree-inline.c (expand_call_inline): Split block at stmt
31681         before the call.
31682
31683 2017-05-09  Michael Meissner  <meissner@linux.vnet.ibm.com>
31684
31685         PR target/68163
31686         * config/rs6000/rs6000.md (f32_lr): Delete mode attributes that
31687         are now unused after splitting mov{sf,sd}_hardfloat.
31688         (f32_lr2): Likewise.
31689         (f32_lm): Likewise.
31690         (f32_lm2): Likewise.
31691         (f32_li): Likewise.
31692         (f32_li2): Likewise.
31693         (f32_lv): Likewise.
31694         (f32_sr): Likewise.
31695         (f32_sr2): Likewise.
31696         (f32_sm): Likewise.
31697         (f32_sm2): Likewise.
31698         (f32_si): Likewise.
31699         (f32_si2): Likewise.
31700         (f32_sv): Likewise.
31701         (f32_dm): Likewise.
31702         (f32_vsx): Likewise.
31703         (f32_av): Likewise.
31704         (mov<mode>_hardfloat): Split into separate movsf and movsd pieces.
31705         For movsf, order stores so the VSX stores occur before the GPR
31706         store which encourages the register allocator to use a traditional
31707         FPR instead of a GPR.  For movsd, order the stores so that the GPR
31708         store comes before the VSX stores to allow the power6 to work.
31709         This is due to the power6 not having a 32-bit integer store
31710         instruction from a FPR.
31711         (movsf_hardfloat): Likewise.
31712         (movsd_hardfloat): Likewise.
31713
31714 2017-05-09  Martin Sebor  <msebor@redhat.com>
31715
31716         PR translation/80280
31717         * config/sol2-c.c (cmn_err_flag_specs): Initialize new data member
31718         added in r247778.
31719
31720         PR translation/80280
31721         * config/i386/msformat-c.c (ms_printf_flag_specs): Initialize new
31722         data member added in r247778.
31723         (ms_scanf_flag_specs, ms_strftime_flag_specs): Same.
31724
31725 2017-05-09  Nathan Sidwell  <nathan@acm.org>
31726
31727         * tree.h (tree_fits_shwi_p, tree_fits_uhwi_p): Unconditionally pure.
31728
31729         * ipa-devirt.c (default_hash_traits<type_pair>): Skip struct-scope
31730         typedefs.
31731
31732 2017-05-09  Marek Polacek  <polacek@redhat.com>
31733
31734         * doc/invoke.texi: Fix typo.
31735
31736 2017-05-09  Richard Biener  <rguenther@suse.de>
31737
31738         * tree-vrp.c (vrp_val_is_max): Adjust comment.
31739         (vrp_val_is_min): Likewise.
31740         (set_value_range_to_value): Likewise.
31741         (set_value_range_to_nonnegative): Likewise.
31742         (gimple_assign_nonzero_p): Likewise.
31743         (gimple_stmt_nonzero_p): Likewise.
31744         (vrp_int_const_binop): Likewise.  Remove unreachable case.
31745         (adjust_range_with_scev): Adjust comments.
31746         (compare_range_with_value): Likewise.
31747         (extract_range_from_phi_node): Likewise.
31748         (test_for_singularity): Likewise.
31749
31750 2017-05-09  Richard Biener  <rguenther@suse.de>
31751
31752         * tree-vrp.c (get_single_symbol): Add assert that we don't
31753         get overflowed constants as invariant part.
31754         (compare_values_warnv): Add comment before the TREE_NO_WARNING
31755         checks.  Use wi::cmp instead of recursing for integer constants.
31756         (compare_values): Just ignore whether we assumed undefined
31757         overflow instead of failing the compare.
31758         (extract_range_for_var_from_comparison_expr): Add comment before the
31759         TREE_NO_WARNING sets.
31760         (test_for_singularity): Likewise.
31761         (extract_range_from_comparison): Do not disable optimization
31762         when we assumed undefined overflow.
31763         (extract_range_basic): Remove init of unused var.
31764
31765 2017-05-09  Richard Biener  <rguenther@suse.de>
31766
31767         * tree-vrp.c (vrp_int_const_binop): Use wide-ints and simplify.
31768         (extract_range_from_multiplicative_op_1): Adjust.
31769         (extract_range_from_binary_expr_1): Use int_const_binop.
31770
31771 2017-05-08  Kelvin Nilsen  <kelvin@gcc.gnu.org>
31772
31773         PR target/80101
31774         * config/rs6000/power6.md: Replace store_data_bypass_p calls with
31775         rs6000_store_data_bypass_p in seven define_bypass directives and
31776         in several comments.
31777         * config/rs6000/rs6000-protos.h: Add prototype for
31778         rs6000_store_data_bypass_p function.
31779         * config/rs6000/rs6000.c (rs6000_store_data_bypass_p): New
31780         function implements slightly different (rs6000-specific) semantics
31781         than store_data_bypass_p, returning false rather than aborting
31782         with assertion error when arguments do not satisfy the
31783         requirements of store data bypass.
31784         (rs6000_adjust_cost): Replace six calls of store_data_bypass_p with
31785         rs6000_store_data_bypass_p.
31786
31787 2017-05-08  Max Filippov  <jcmvbkbc@gmail.com>
31788
31789         * config/xtensa/xtensa-protos.h
31790         (xtensa_initial_elimination_offset): New declaration.
31791         * config/xtensa/xtensa.c (xtensa_initial_elimination_offset):
31792         New function. Move its body from the INITIAL_ELIMINATION_OFFSET
31793         macro definition, add case for FRAME_POINTER_REGNUM when
31794         FRAME_GROWS_DOWNWARD.
31795         * config/xtensa/xtensa.h (FRAME_GROWS_DOWNWARD): New macro definition.
31796         (INITIAL_ELIMINATION_OFFSET): Replace body with call to
31797         xtensa_initial_elimination_offset.
31798
31799 2017-05-08  Nathan Sidwell  <nathan@acm.org>
31800
31801         * doc/invoke.texi: Alphabetize -fdump options.
31802
31803 2017-05-08  Martin Sebor  <msebor@redhat.com>
31804
31805         PR translation/80280
31806         * config/sol2-c.c (solaris_pragma_align): Correct quoting.
31807
31808 2017-05-08  Bernd Edlinger  <bernd.edlinger@hotmail.de>
31809
31810         * target.def (compute_frame_layout): New optional target hook.
31811         * doc/tm.texi.in (TARGET_COMPUTE_FRAME_LAYOUT): Add hook.
31812         * doc/tm.texi (TARGET_COMPUTE_FRAME_LAYOUT): Add documentation.
31813         * lra-eliminations.c (update_reg_eliminate): Call compute_frame_layout
31814         target hook.
31815         * reload1.c (verify_initial_elim_offsets): Likewise.
31816         * config/arm/arm.c (TARGET_COMPUTE_FRAME_LAYOUT): Define.
31817         (use_simple_return_p): Call arm_compute_frame_layout if needed.
31818         (arm_get_frame_offsets): Split up into this ...
31819         (arm_compute_frame_layout): ... and this function.
31820
31821 2017-05-08  Richard Sandiford  <richard.sandiford@arm.com>
31822
31823         * config/aarch64/constraints.md (Usa): New constraint.
31824         * config/aarch64/aarch64.md (*movsi_aarch64, *movdi_aarch64): Use it.
31825
31826 2017-05-08  Thomas Preud'homme  <thomas.preudhomme@arm.com>
31827
31828         * config.gcc (arm*-*-*): Set TM_MULTILIB_CONFIG from
31829         with_multilib_list after it has been checked.
31830
31831 2017-05-08  Richard Biener  <rguenther@suse.de>
31832
31833         * tree-ssa-pre.c (bitmap_set_and): Avoid bitmap copy.
31834         (bitmap_set_subtract_values): Likewise.
31835
31836 2017-05-08  Richard Biener  <rguenther@suse.de>
31837
31838         * tree-vrp.c (gimple_assign_nonzero_warnv_p): Rename to ...
31839         (gimple_assign_nonzero): ... this and remove strict_overflow_p
31840         argument.
31841         (gimple_stmt_nonzero_warnv_p): Rename to ...
31842         (gimple_stmt_nonzero_p): ... this and remove strict_overflow_p
31843         argument.
31844         (vrp_stmt_computes_nonzero): Remove strict_overflow_p argument.
31845         (extract_range_basic): Adjust, do not disable propagation on
31846         strict overflow sensitive simplification.
31847         (vrp_visit_cond_stmt): Likewise.
31848
31849 2017-05-05  Jan Hubicka  <hubicka@ucw.cz>
31850
31851         * ipa-inline-analysis.c (estimate_function_body_sizes): Recompute
31852         body size unconditionally.
31853
31854 2017-05-07  Jeff Law  <law@redhat.com>
31855
31856         Revert:
31857         2017-05-06  Jeff Law  <law@redhat.com>
31858         PR tree-optimization/78496
31859         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
31860         code.
31861
31862         PR tree-optimization/78496
31863         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
31864         (simplify_stmt_using_ranges): Call it.
31865         (vrp_dom_walker::before_dom_children): Extract equivalences
31866         from an ASSERT_EXPR with an equality comparison against a
31867         constant.
31868
31869 2017-05-06  Jeff Law  <law@redhat.com>
31870
31871         PR tree-optimization/78496
31872         * tree-vrp.c (simplify_assert_expr_using_ranges): Remove debugging
31873         code.
31874
31875         PR tree-optimization/78496
31876         * tree-vrp.c (simplify_assert_expr_using_ranges): New function.
31877         (simplify_stmt_using_ranges): Call it.
31878         (vrp_dom_walker::before_dom_children): Extract equivalences
31879         from an ASSERT_EXPR with an equality comparison against a
31880         constant.
31881
31882 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
31883
31884         * lra-constraints.c (lra_copy_reg_equiv): New function.
31885         (split_reg): Use it to copy equivalence information from the
31886         original register to the spill register.
31887
31888 2017-05-06  Richard Sandiford  <richard.sandiford@linaro.org>
31889
31890         PR rtl-optimization/75964
31891         * simplify-rtx.c (simplify_const_relational_operation): Remove
31892         invalid handling of comparisons of integer ABS.
31893
31894 2017-05-06  Uros Bizjak  <ubizjak@gmail.com>
31895
31896         * config/i386/i386.c (ext_80387_constant_init): Do not explicitly
31897         initialize to zero.
31898         (init_regs): Remove declaration.
31899         (function_arg_advance_32): Initialize error_p as boolean variable.
31900
31901 2017-05-05  Nathan Sidwell  <nathan@acm.org>
31902
31903         * store-motion.c (remove_reachable_equiv_notes): Reformat long
31904         lines.  Use for (;;).
31905
31906 2017-05-05  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
31907
31908         * config/rs6000/rs6000.c (rs6000_vect_nonmem): New static var.
31909         (rs6000_init_cost): Initialize rs6000_vect_nonmem.
31910         (rs6000_add_stmt_cost): Update rs6000_vect_nonmem.
31911         (rs6000_finish_cost): Avoid vectorizing simple copy loops with
31912         VF=2 that require versioning.
31913
31914 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
31915
31916         * diagnostic.h (CARET_LINE_MARGIN): Convert from macro to const
31917         int.
31918
31919 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
31920
31921         * diagnostic.h (diagnostic_override_option_index): Convert from
31922         macro to inline function.
31923
31924 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
31925
31926         * diagnostic.c (last_module_changed_p): New function.
31927         (set_last_module): New function.
31928         (diagnostic_report_current_module): Convert macro usage to
31929         the above functions.
31930         * diagnostic.h (diagnostic_context::last_module): Strengthen
31931         from const line_map * to const line_map_ordinary *.
31932         (diagnostic_last_module_changed): Delete macro.
31933         (diagnostic_set_last_module): Delete macro.
31934
31935 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
31936
31937         * diagnostic.c (diagnostic_impl): Replace report_diagnostic
31938         with diagnostic_report_diagnostic.
31939         (diagnostic_n_impl_richloc): Likewise.
31940         * diagnostic.h (report_diagnostic): Delete macro.
31941         * rtl-error.c (diagnostic_for_asm): Replace report_diagnostic
31942         with diagnostic_report_diagnostic.
31943         * substring-locations.c (format_warning_va): Likewise.
31944
31945 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
31946
31947         * diagnostic.c (diagnostic_report_diagnostic): Eliminate
31948         save/restor of format_spec.  Move option-printing code to...
31949         (print_option_information): ...this new function, and
31950         reimplement by simply printing to the pretty_printer,
31951         rather than appending to the format string.
31952
31953 2017-05-05  David Malcolm  <dmalcolm@redhat.com>
31954
31955         * diagnostic.c (diagnostic_report_diagnostic): Split out pragma
31956         handling logic into...
31957         (update_effective_level_from_pragmas): ...this new function.
31958
31959 2017-05-04  Andrew Waterman  <andrew@sifive.com>
31960
31961         * config/riscv/riscv.opt (mstrict-align): New option.
31962         * config/riscv/riscv.h (STRICT_ALIGNMENT): Use it.  Update comment.
31963         (SLOW_UNALIGNED_ACCESS): Define.
31964         (riscv_slow_unaligned_access): Declare.
31965         * config/riscv/riscv.c (riscv_tune_info): Add slow_unaligned_access
31966         field.
31967         (riscv_slow_unaligned_access): New variable.
31968         (rocket_tune_info): Set slow_unaligned_access to true.
31969         (optimize_size_tune_info): Set slow_unaligned_access to false.
31970         (riscv_cpu_info_table): Add entry for optimize_size_tune_info.
31971         (riscv_valid_lo_sum_p): Use TARGET_STRICT_ALIGN.
31972         (riscv_option_override): Set riscv_slow_unaligned_access.
31973         * doc/invoke.texi: Add -mstrict-align to RISC-V.
31974
31975 2017-05-04  Kito Cheng  <kito.cheng@gmail.com>
31976
31977         * config/riscv/riscv.md: Unify indentation.
31978
31979 2017-05-05  Michael Meissner  <meissner@linux.vnet.ibm.com>
31980
31981         PR target/79038
31982         PR target/79202
31983         PR target/79203
31984         * config/rs6000/rs6000.md (u code attribute): Add FIX and
31985         UNSIGNED_FIX.
31986         (extendsi<mode>2): Add support for doing sign extension via
31987         VUPKHSW and XXPERMDI if the value is in Altivec registers and we
31988         don't have ISA 3.0 instructions.
31989         (extendsi<mode>2 splitter): Likewise.
31990         (fix_trunc<mode>si2): If we are at ISA 2.07 (VSX small integer),
31991         generate the normal insns since SImode can now go in vector
31992         registers.  Disallow the special UNSPECs needed for previous
31993         machines to hide SImode being used.  Add new insns
31994         fctiw{,w}_<mode>_smallint if SImode can go in vector registers.
31995         (fix_trunc<mode>si2_stfiwx): Likewise.
31996         (fix_trunc<mode>si2_internal): Likewise.
31997         (fixuns_trunc<mode>si2): Likewise.
31998         (fixuns_trunc<mode>si2_stfiwx): Likewise.
31999         (fctiw<u>z_<mode>_smallint): Likewise.
32000         (fctiw<u>z_<mode>_mem): New combiner pattern to prevent conversion
32001         of floating point to 32-bit integer from doing a direct move to
32002         the GPR registers to do a store.
32003         (fctiwz_<mode>): Break long line.
32004
32005 2017-05-05  Bin Cheng  <bin.cheng@arm.com>
32006
32007         * Makefile.in (GTFILES): Add tree-ssa-loop-ivopts.c.
32008         * tree-ssa-loop-ivopts.c (compute_max_addr_offset): Delete.
32009         (addr_list, addr_offset_valid_p): New.
32010         (split_address_groups): Check offset validity with above function.
32011         (gt-tree-ssa-loop-ivopts.h): Include header file.
32012
32013 2017-05-05  Nathan Sidwell  <nathan@acm.org>
32014
32015         * config.gcc (arm*-*-*): Add missing 'fi'.
32016
32017 2017-05-05  Steve Ellcey  <sellcey@cavium.com>
32018
32019         * doc/invoke.texi (-fopt-info): Explicitly say order of options
32020         included in -fopt-info does not matter.
32021         * doc/optinfo.texi (-fopt-info): Fix description of default
32022         behavour. Explicitly say order of options included in -fopt-info
32023         does not matter.
32024
32025 2017-05-05  Thomas Preud'homme  <thomas.preudhomme@arm.com>
32026
32027         * config.gcc: Allow combinations of aprofile and rmprofile values for
32028         --with-multilib-list.
32029         * config/arm/t-multilib: New file.
32030         * config/arm/t-aprofile: Remove initialization of MULTILIB_*
32031         variables.  Remove setting of ISA and floating-point ABI in
32032         MULTILIB_OPTIONS and MULTILIB_DIRNAMES.  Set architecture and FPU in
32033         MULTI_ARCH_OPTS_A and MULTI_ARCH_DIRS_A rather than MULTILIB_OPTIONS
32034         and MULTILIB_DIRNAMES respectively.  Add comment to introduce all
32035         matches.  Add architecture matches for marvel-pj4 and generic-armv7-a
32036         CPU options.
32037         * config/arm/t-rmprofile: Likewise except for the matches changes.
32038         * doc/install.texi (--with-multilib-list): Document the combination of
32039         aprofile and rmprofile values and warn about pitfalls in doing that.
32040
32041 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
32042
32043         * config/aarch64/aarch64.md (movsi_aarch64): Remove '*' from r=w.
32044         (movdi_aarch64): Likewise.
32045
32046 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
32047
32048         PR tree-optimization/80632
32049         * tree-switch-conversion.c (struct switch_conv_info): Add target_vop
32050         field.
32051         (build_arrays): Initialize it for virtual phis.
32052         (fix_phi_nodes): Use it for virtual phis.
32053
32054         PR tree-optimization/80558
32055         * tree-vrp.c (extract_range_from_binary_expr_1): Optimize
32056         [x, y] op z into [x op, y op z] for op & or | if conditions
32057         are met.
32058
32059 2017-05-05  Andre Vieira  <andre.simoesdiasvieira@arm.com>
32060             Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
32061
32062         PR target/71607
32063         * config/arm/arm.md (use_literal_pool): Remove.
32064         (64-bit immediate split): No longer takes cost into consideration
32065         if arm_disable_literal_pool is enabled.
32066         * config/arm/arm.c (arm_tls_referenced_p): Add diagnostic if TLS is
32067         used when arm_disable_literal_pool is enabled.
32068         (arm_max_const_double_inline_cost): Remove use of
32069         arm_disable_literal_pool.
32070         (push_minipool_fix): Add assert.
32071         (arm_reorg): Add return if arm_disable_literal_pool is enabled.
32072         * config/arm/vfp.md (no_literal_pool_df_immediate): New.
32073         (no_literal_pool_sf_immediate): New.
32074
32075 2017-05-05  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
32076
32077         PR tree-optimization/80613
32078         * tree-ssa-dce.c (propagate_necessity): Remove cases for
32079         BUILT_IN_STRDUP and BUILT_IN_STRNDUP.
32080
32081 2017-05-05  Richard Biener  <rguenther@suse.de>
32082
32083         * tree-ssa-pre.c (get_or_alloc_expr_for): Simplify.
32084
32085 2017-05-05  Georg-Johann Lay  <avr@gjlay.de>
32086
32087         * config/avr/avr.md [flag_strict_overflow]: Remove any occurence
32088         of this flag from insn conditions due to removal from r247495.
32089
32090 2017-05-05  Wilco Dijkstra  <wdijkstr@arm.com>
32091
32092         * config/arm/aarch-common.c (arm_early_load_addr_dep_ptr):
32093         New function.
32094         (arm_early_store_addr_dep_ptr): Likewise.
32095         * config/arm/aarch-common-protos.h
32096         (arm_early_load_addr_dep_ptr): Add prototype.
32097         (arm_early_store_addr_dep_ptr): Likewise.
32098         * config/arm/cortex-a53.md: Add new bypasses.
32099
32100 2017-05-05  Jakub Jelinek  <jakub@redhat.com>
32101
32102         * tree.c (next_type_uid): Change type to unsigned.
32103         (type_hash_canon): Decrement back next_type_uid if
32104         freeing a type node with the highest TYPE_UID.  For INTEGER_TYPEs
32105         also ggc_free TYPE_MIN_VALUE, TYPE_MAX_VALUE and TYPE_CACHED_VALUES
32106         if possible.
32107
32108 2017-05-04  Martin Sebor  <msebor@redhat.com>
32109
32110         * builtins.c: Fix a trivial typo in a comment.
32111
32112         PR middle-end/79234
32113         * builtins.c (check_sizes): Adjust to handle reading past the end.
32114         Avoid printing excessive upper bound of ranges.  Use %E to print
32115         tree nodes instead of converting them to %wu.
32116         (expand_builtin_memchr): New function.
32117         (compute_dest_size): Rename...
32118         (compute_objsize): ...to this.
32119         (expand_builtin_memcpy): Adjust.
32120         (expand_builtin_mempcpy): Adjust.
32121         (expand_builtin_strcat): Adjust.
32122         (expand_builtin_strcpy): Adjust.
32123         (check_strncat_sizes): Adjust.
32124         (expand_builtin_strncat): Adjust.
32125         (expand_builtin_strncpy): Adjust and simplify.
32126         (expand_builtin_memset): Adjust.
32127         (expand_builtin_bzero): Adjust.
32128         (expand_builtin_memcmp): Adjust.
32129         (expand_builtin): Handle memcmp.
32130         (maybe_emit_chk_warning): Check strncat just once.
32131
32132 2017-05-04  Martin Sebor  <msebor@redhat.com>
32133
32134         PR preprocessor/79214
32135         PR middle-end/79222
32136         PR middle-end/79223
32137         * builtins.c (check_sizes): Add inlining context and issue
32138         warnings even when -Wno-system-headers is set.
32139         (check_strncat_sizes): Same.
32140         (expand_builtin_strncat): Same.
32141         (expand_builtin_memmove): New function.
32142         (expand_builtin_stpncpy): Same.
32143         (expand_builtin): Handle memmove and stpncpy.
32144
32145 2017-05-04  Bin Cheng  <bin.cheng@arm.com>
32146
32147         * tree-ssa-loop-ivopts.c (struct cost_pair): Remove field inv_expr
32148         which is not used any more.
32149
32150 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
32151
32152         * config/aarch64/aarch64.c (generic_tunings): Update prefetch model.
32153
32154 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
32155
32156         * config/aarch64/aarch64.c (cortexa35_tunings): Set jump alignment to 4.
32157         (cortexa53_tunings): Likewise.
32158         (cortexa57_tunings): Likewise.
32159         (cortexa72_tunings): Likewise.
32160         (cortexa73_tunings): Likewise.
32161
32162 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
32163
32164         * config/aarch64/aarch64.c (generic_tunings): Set jump alignment to 4.
32165         Set loop alignment to 8.
32166
32167 2017-05-04  Martin Sebor  <msebor@redhat.com>
32168
32169         PR translation/80280
32170         * builtins.c (expand_builtin_object_size): Add missing quoting to
32171         %D and like directives.
32172         * hsa-gen.c (hsa_type_for_scalar_tree_type): Same.
32173         (hsa_type_for_tree_type): Same.
32174         (verify_function_arguments): Same.
32175         * symtab.c (symbol_table::change_decl_assembler_name): Same.
32176         * varasm.c (get_section): Same.
32177         (mark_weak): Same.
32178
32179 2017-05-04  Martin Sebor  <msebor@redhat.com>
32180
32181         PR translation/80280
32182         * config/i386/i386.c (ix86_function_versions): Quote a %D directive.
32183
32184 2017-05-04  Wilco Dijkstra  <wdijkstr@arm.com>
32185
32186         * config/aarch64/aarch64.c (generic_addrcost_table):
32187         Change HI/TI mode setting.
32188
32189 2017-05-04  Martin Jambor  <mjambor@suse.cz>
32190
32191         PR tree-optimization/80622
32192         * tree-sra.c (comes_initialized_p): New function.
32193         (build_accesses_from_assign): Only set write lazily when
32194         comes_initialized_p is false.
32195         (analyze_access_subtree): Use comes_initialized_p.
32196         (propagate_subaccesses_across_link): Assert !comes_initialized_p
32197         instead of testing for PARM_DECL.
32198
32199 2017-05-04  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
32200
32201         * config/aarch64/aarch64.md (prefetch); Adjust predicate and
32202         constraint on operand 0 to allow more general addressing modes.
32203         Adjust output template.
32204         * config/aarch64/aarch64.c (aarch64_address_valid_for_prefetch_p):
32205         New function.
32206         * config/aarch64/aarch64-protos.h
32207         (aarch64_address_valid_for_prefetch_p): Declare prototype.
32208         * config/aarch64/constraints.md (Dp): New address constraint.
32209         * config/aarch64/predicates.md (aarch64_prefetch_operand): New
32210         predicate.
32211
32212 2017-05-04  Jan Hubicka  <hubicka@ucw.cz>
32213
32214         * ipa-cp.c (perform_estimation_of_a_value): Drop base_time parameter;
32215         update use of estimate_ipcp_clone_size_and_time.
32216         (estimate_local_effects): Update use of
32217         estimate_ipcp_clone_size_and_time and perform_estimation_of_a_value.
32218         * ipa-inline.h (estimate_ipcp_clone_size_and_time): Update prototype.
32219         * ipa-inline-analysis.c (estimate_ipcp_clone_size_and_time):
32220         Return nonspecialized time.
32221
32222 2017-05-04  Richard Biener  <rguenther@suse.de>
32223
32224         * tree-ssa-alias.c (get_continuation_for_phi): Improve looking
32225         for the last VUSE which def dominates the PHI.  Directly call
32226         maybe_skip_until.
32227         (get_continuation_for_phi_1): Remove.
32228
32229 2017-05-04  Richard Sandiford  <richard.sandiford@linaro.org>
32230
32231         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): Add commentary
32232         to explain the use of truncating division.  Cap the number of
32233         iterations to the maximum given by nb_iterations_upper_bound,
32234         if defined.
32235
32236 2017-05-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
32237
32238         * configure.ac (--enable-mingw-wildcard): Add new configurable feature.
32239         * configure: Regenerate.
32240         * config.in: Regenerate.
32241         * config/i386/driver-mingw32.c: new file.
32242         * config/i386/x-mingw32: Add rule to build driver-mingw32.o.
32243         * config.host: Link driver-mingw32.o on MinGW host.
32244         * doc/install.texi: Document new --enable-mingw-wildcard configure
32245         option.
32246
32247 2017-05-04  Marek Polacek  <polacek@redhat.com>
32248
32249         PR tree-optimization/80612
32250         * calls.c (get_size_range): Check for INTEGRAL_TYPE_P.
32251
32252 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
32253             Andre Simoes Dias Vieira  <andre.simoesdiasvieira@arm.com>
32254
32255         * config/arm/arm.md (movsi): Change TARGET_32BIT to TARGET_HAVE_MOVT.
32256         (movt splitter): Likewise.
32257         * config/arm/arm.c (arm_option_check_internal): Change arm_arch_thumb2
32258         to TARGET_HAVE_MOVT, and merge with -mslow-flash-data check.
32259         (const_ok_for_arm): Change else to else if (TARGET_THUMB2) and add else
32260         block for Thumb-1 with MOVT.
32261         (thumb2_legitimate_address_p): Move code block ...
32262         (can_avoid_literal_pool_for_label_p): ... into this new function.
32263         (thumb1_legitimate_address_p): Add check for TARGET_HAVE_MOVT and
32264         literal pool.
32265         (thumb_legitimate_constant_p): Add conditional on TARGET_HAVE_MOVT
32266         * doc/invoke.texi (-mpure-code): Change "ARMv7-M targets" for
32267         "M-profile targets with the MOVT instruction".
32268
32269 2017-05-04  Prakhar Bahuguna  <prakhar.bahuguna@arm.com>
32270
32271         * config/arm/arm-builtins.c (arm_init_builtins): Rename
32272         __builtin_arm_ldfscr to __builtin_arm_get_fpscr, and rename
32273         __builtin_arm_stfscr to __builtin_arm_set_fpscr.
32274
32275 2017-05-04  Martin Liska  <mliska@suse.cz>
32276
32277         * tree-vrp.c (simplify_cond_using_ranges_2): Remove unused
32278         variable cond_code.
32279
32280 2017-05-04  Richard Biener  <rguenther@suse.de>
32281
32282         * tree.c (array_at_struct_end_p): Handle arrays at struct
32283         end with flexarrays more conservatively.  Refactor and treat
32284         arrays of arrays or aggregates more strict.  Fix
32285         VIEW_CONVERT_EXPR handling.  Remove allow_compref argument.
32286         * tree.c (array_at_struct_end_p): Adjust prototype.
32287         * emit-rtl.c (set_mem_attributes_minus_bitpos): Adjust.
32288         * gimple-fold.c (get_range_strlen): Likewise.
32289         * tree-chkp.c (chkp_may_narrow_to_field): Likewise.
32290
32291 2017-05-04  Richard Biener  <rguenther@suse.de>
32292
32293         PR tree-optimization/31130
32294         * tree-vrp.c (needs_overflow_infinity): Remove as always returning
32295         false.
32296         (supports_overflow_infinity): Likewise.
32297         (is_negative_overflow_infinity): Likewise.
32298         (is_positive_overflow_infinity): Likewise.
32299         (is_overflow_infinity): Likewise.
32300         (stmt_overflow_infinity): Likewise.
32301         (overflow_infinity_range_p): Likewise.
32302         (usable_range_p): Remove as always returning true.
32303         (make_overflow_infinity): Remove.
32304         (negative_overflow_infinity): Likewise.
32305         (positive_overflow_infinity): Likewise.
32306         (avoid_overflow_infinity): Likewise.
32307         (set_value_range): Adjust accordingly.
32308         (set_value_range_to_nonnegative): Likewise, remove now unused
32309         overflow_infinity arg.
32310         (vrp_operand_equal_p): Adjust.
32311         (update_value_range): Likewise.
32312         (range_int_cst_singleton_p): Likewise.
32313         (operand_less_p): Likewise.
32314         (compare_values_warnv): Likewise.
32315         (extract_range_for_var_from_comparison_expr): Likewise.
32316         (vrp_int_const_binop): Likewise.
32317         (zero_nonzero_bits_from_vr): Likewise.
32318         (extract_range_from_multiplicative_op_1): Likewise.
32319         (extract_range_from_binary_expr_1): Likewise.
32320         (extract_range_from_unary_expr): Likewise.
32321         (extract_range_from_comparison): Likewise.
32322         (extract_range_basic): Likewise.
32323         (adjust_range_with_scev): Likewise.
32324         (compare_ranges): Likewise.
32325         (compare_range_with_value): Likewise.
32326         (dump_value_range): Likewise.
32327         (test_for_singularity): Likewise, remove strict_overflow_p parameter
32328         never used.
32329         (simplify_cond_using_ranges): Adjust.
32330
32331 2017-05-04  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
32332
32333         * brig-builtins.def: Added a builtin for class_f64.
32334         * builtin-types.def: Added a builtin type needed by class_f64.
32335
32336 2017-05-03  Jason Merrill  <jason@redhat.com>
32337
32338         * timevar.def: Add TV_CONSTEXPR.
32339
32340 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
32341
32342         * common.opt (fdiagnostics-parseable-fixits): Fix typo.
32343
32344 2017-05-03  Martin Jambor  <mjambor@suse.cz>
32345
32346         * ipa-prop.c (ipa_update_after_lto_read): Removed.
32347         * ipa-prop.h (ipa_update_after_lto_read): Remove declaration.
32348         * ipa-cp.c (ipcp_propagate_stage): Do not call
32349         ipa_update_after_lto_read.
32350         * ipa-inline.c (ipa_inline): Likewise.
32351
32352 2017-05-03  Martin Jambor  <mjambor@suse.cz>
32353
32354         * ipa-prop.h (ipa_edge_args): Make a class.  Mark with for_user GTY
32355         tag.  Added a default constructor and a destructor.
32356         (ipa_edge_args_sum_t): New class;
32357         (ipa_edge_args_sum): Declare.
32358         (ipa_edge_args_vector): Remove declaration.
32359         (IPA_EDGE_REF): Use ipa_edge_args_sum.
32360         (ipa_free_edge_args_substructures): Remove declaration.
32361         (ipa_check_create_edge_args): Use ipa_edge_args_sum.
32362         (ipa_edge_args_info_available_for_edge_p): Likewise.
32363         * ipa-prop.c (ipa_edge_args_vector): Removed.
32364         (edge_removal_hook_holder): Likewise.
32365         (edge_duplication_hook_holder): Likewise.
32366         (ipa_edge_args_sum): New variable.
32367         (ipa_propagate_indirect_call_infos): Test ipa_edge_args_sum instead of
32368         ipa_edge_args_vector.
32369         (ipa_free_edge_args_substructures): Likewise.
32370         (ipa_free_all_edge_args): Free ipa_edge_args_sum instead of
32371         ipa_edge_args_vector.
32372         (ipa_edge_removal_hook): Turned into method
32373         ipa_edge_args_sum_t::remove.
32374         (ipa_edge_duplication_hook): Turned into method
32375         ipa_edge_args_sum_t::duplicate.
32376         (ipa_register_cgraph_hooks): Create ipa_edge_args_sum instead of
32377         registering edge hooks.
32378         (ipa_unregister_cgraph_hooks): Do not unregister edge hooks.
32379         * ipa-inline-analysis.c (estimate_function_body_sizes): Test
32380         ipa_edge_args_sum instead of ipa_edge_args_vector.
32381         * ipa-profile.c (ipa_profile): Likewise.
32382
32383 2017-05-03  Martin Jambor  <mjambor@suse.cz>
32384
32385         * symbol-summary.h (function_summary): New method exists.
32386         (function_summary::symtab_removal): Deallocate through release.
32387         (call_summary): New class.
32388         (gt_ggc_mx): New overload.
32389         (gt_pch_nx): Likewise.
32390         (gt_pch_nx): Likewise.
32391
32392 2017-05-03  Jeff Law  <law@redhat.com>
32393
32394         PR tree-optimization/78496
32395         * tree-vrp.c (simplify_cond_using_ranges_1): Renamed
32396         from simplify_cond_using_ranges.  Split off code to walk
32397         backwards through casts into ...
32398         (simplify_cond_using_ranges_2): New function.
32399         (simplify_stmt_using_ranges): Call simplify_cond_using_ranges_1.
32400         (execute_vrp): After identifying jump threads, call
32401         simplify_cond_using_ranges_2.
32402
32403 2017-05-03  Jan Hubicka  <hubicka@ucw.cz>
32404
32405         PR bootstrap/80609
32406         * ipa-inline.h (inline_summary): Add ctor.
32407         (create_ggc): Do not use ggc_cleared_alloc.
32408
32409 2017-05-03  Jeff Downs  <heydowns@somuchpressure.net>
32410             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
32411
32412         * gcc.c (handle_braces): Support escaping in switch matching
32413         text.
32414         * doc/invoke.texi (Spec Files): Document it.
32415         Remove superfluous @code markup in items.
32416
32417 2017-05-03  David Malcolm  <dmalcolm@redhat.com>
32418
32419         * diagnostic-show-locus.c (struct column_range): New struct.
32420         (get_affected_columns): New function.
32421         (get_printed_columns): New function.
32422         (struct correction): New struct.
32423         (correction::ensure_capacity): New function.
32424         (correction::ensure_terminated): New function.
32425         (struct line_corrections): New struct.
32426         (line_corrections::~line_corrections): New dtor.
32427         (line_corrections::add_hint): New function.
32428         (layout::print_trailing_fixits): Reimplement in terms of the new
32429         classes.
32430         (selftest::test_overlapped_fixit_printing): New function.
32431         (selftest::diagnostic_show_locus_c_tests): Call it.
32432
32433 2017-05-03  Nathan Sidwell  <nathan@acm.org>
32434
32435         Canonicalize canonical type hashing
32436         * tree.h (type_hash_canon_hash): Declare.
32437         * tree.c (type_hash_list, attribute_hash_list): Move into
32438         type_hash_canon_hash.
32439         (build_type_attribute_qual_variant): Break out hash code calc into
32440         type_hash_canon_hash.
32441         (type_hash_canon_hash): New.  Generic type hash computation.
32442         (build_range_type_1, build_array_type_1, build_function_type,
32443         build_method_type_directly, build_offset_type, build_complex_type,
32444         make_vector_type): Call it.
32445
32446 2017-05-03  Richard Biener  <rguenther@suse.de>
32447
32448         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment):
32449         When all DRs have unknown misaligned do not always peel
32450         when there is a store but apply the same costing model as if
32451         there were only loads.
32452
32453 2017-05-03  Richard Biener  <rguenther@suse.de>
32454
32455         Revert
32456         PR tree-optimization/80492
32457         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
32458         compare_base_decls returning dont-know properly.
32459
32460 2017-05-03  Thomas Preud'homme  <thomas.preudhomme@arm.com>
32461
32462         * config/arm/iterators.md (CCSI): New mode iterator.
32463         (arch): New mode attribute.
32464         * config/arm/sync.md (atomic_compare_and_swap<mode>_1): Rename into ...
32465         (atomic_compare_and_swap<CCSI:arch><NARROW:mode>_1): This and ...
32466         (atomic_compare_and_swap<CCSI:arch><SIDI:mode>_1): This.  Use CCSI
32467         code iterator for success result mode.
32468         * config/arm/arm.c (arm_expand_compare_and_swap): Adapt code to use
32469         the corresponding new insn generators.
32470
32471 2017-05-03  Bin Cheng  <bin.cheng@arm.com>
32472
32473         Revert r247509
32474         2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32475         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
32476
32477 2017-05-03  Richard Sandiford  <richard.sandiford@linaro.org>
32478
32479         * tree-data-ref.h (SUB_CONFLICTS_IN_A): Wrap SUB argument in brackets.
32480         (SUB_CONFLICTS_IN_B, SUB_LAST_CONFLICT, SUB_DISTANCE): Likewise.
32481         (DDR_A): Wrap DDR argument in brackets.
32482         (DDR_B, DDR_AFFINE_P, DDR_ARE_DEPENDENT, DDR_SUBSCRIPTS): Likewise.
32483         (DDR_LOOP_NEST, DDR_INNER_LOOP, DDR_SELF_REFERENCE): Likewise.
32484         (DDR_REVERSED_P): Likewise.
32485
32486 2017-05-03  Jakub Jelinek  <jakub@redhat.com>
32487
32488         PR tree-optimization/79472
32489         * tree-switch-conversion.c (struct switch_conv_info): Add
32490         contiguous_range and default_case_nonstandard fields.
32491         (collect_switch_conv_info): Compute contiguous_range and
32492         default_case_nonstandard fields, don't clear final_bb if
32493         contiguous_range and only the default case doesn't have the required
32494         structure.
32495         (check_all_empty_except_final): Set default_case_nonstandard instead
32496         of failing if contiguous_range and the default case doesn't have empty
32497         block.
32498         (check_final_bb): Add SWTCH argument, don't fail if contiguous_range
32499         and only the default case doesn't have the required constants.  Skip
32500         virtual phis.
32501         (gather_default_values): Skip virtual phis.  Allow non-NULL CASE_LOW
32502         if default_case_nonstandard.
32503         (build_constructors): Build constant 1 just once.  Assert that default
32504         values aren't inserted in between cases if contiguous_range.  Skip
32505         virtual phis.
32506         (build_arrays): Skip virtual phis.
32507         (prune_bbs): Add DEFAULT_BB argument, don't remove that bb.
32508         (fix_phi_nodes): Don't add e2f phi arg if default_case_nonstandard.
32509         Handle virtual phis.
32510         (gen_inbound_check): Handle default_case_nonstandard case.
32511         (process_switch): Adjust check_final_bb caller.  Call
32512         gather_default_values with the first non-default case instead of
32513         default case if default_case_nonstandard.
32514
32515 2017-05-02  Nathan Sidwell  <nathan@acm.org>
32516
32517         * ggc-page.c (move_ptes_to_front): Replace unsigned >0 with i--
32518         check.  Fix formatting.
32519
32520 2017-05-02  Jan Hubicka  <hubicka@ucw.cz>
32521
32522         * ipa-inline-analysis.c (estimate_node_size_and_time): Allow roundoff
32523         errors when comparing specialized and unspecialized times.
32524
32525 2017-05-02  David Malcolm  <dmalcolm@redhat.com>
32526
32527         * diagnostic-show-locus.c
32528         (layout::should_print_annotation_line_p): Make private.
32529         (layout::print_annotation_line): Make private.
32530         (layout::annotation_line_showed_range_p): Make private.
32531         (layout::show_ruler): Make private.
32532         (layout::print_source_line): Make private.  Pass in line and
32533         line_width, rather than calling location_get_source_line.  Drop
32534         returned value.
32535         (layout::print_leading_fixits): New method.
32536         (layout::print_any_fixits): Rename to...
32537         (layout::print_trailing_fixits): ...this, and make private.
32538         Don't print newline fixits.
32539         (diagnostic_show_locus): Move logic for printing one row into...
32540         (layout::print_line): ...this new function.  Move the
32541         location_get_source_line call and error-handling from
32542         print_source_line to here.  Call print_leading_fixits, and rename
32543         print_any_fixits to print_trailing_fixits.
32544         (selftest::test_fixit_insert_containing_newline): Update now that
32545         newlines are partially supported.
32546         (selftest::test_fixit_insert_containing_newline_2): New test.
32547         (selftest::test_fixit_replace_containing_newline): Update comments.
32548         (selftest::diagnostic_show_locus_c_tests): Call the new test.
32549         * edit-context.c (class added_line): New class.
32550         (class edited_line): Describe newline handling in comment.
32551         (edited_line::actually_edited_p): New method.
32552         (edited_line::print_content): Delete redundant decl.
32553         (edited_line::m_predecessors): New field.
32554         (edited_file::print_content): Call edited_line::print_content.
32555         (edited_file::print_diff): Update to support newlines.
32556         (edited_file::print_diff_hunk): Likewise.
32557         (edited_file::print_run_of_changed_lines): New function.
32558         (edited_file::print_diff_line): Convert to...
32559         (print_diff_line): ...this.
32560         (edited_file::get_effective_line_count): New function.
32561         (edited_line::edited_line): Initialize new field m_predecessors.
32562         (edited_line::~edited_line): Clean up m_predecessors.
32563         (edited_line::apply_fixit): Handle newlines.
32564         (edited_line::get_effective_line_count): New function.
32565         (edited_line::print_content): New function.
32566         (edited_line::print_diff_lines): New function.
32567         (selftest::test_applying_fixits_insert_containing_newline): New
32568         test.
32569         (selftest::test_applying_fixits_replace_containing_newline): New
32570         test.
32571         (selftest::insert_line): New function.
32572         (selftest::test_applying_fixits_multiple_lines): Add example of
32573         inserting a line.
32574         (selftest::edit_context_c_tests): Call the new tests.
32575
32576 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32577
32578         * tree-ssa-loop-ivopts.c (get_scaled_computation_cost_at): Delete
32579         parameter cand.  Update dump information.
32580         (get_computation_cost): Update uses.
32581
32582 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32583
32584         * tree-ssa-loop-ivopts.c (get_computation_aff_1): New.
32585         (get_computation_aff): Reorder parameters.  Use get_computation_aff_1.
32586         (get_computation_at, rewrite_use_address): Update use of
32587         get_computation_aff.
32588
32589 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32590
32591         * tree-ssa-loop-ivopts.c (get_computation_at): Reorder parameters.
32592         (get_computation): Delete.
32593         (get_computation_cost): Implement like get_computation_cost_at.
32594         Use get_computation_at.
32595         (get_computation_cost_at): Delete.
32596         (rewrite_use_nonlinear_expr): Use get_computation_at.
32597         (rewrite_use_compare, remove_unused_ivs): Ditto.
32598
32599 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32600
32601         * tree-ssa-loop-ivopts.c (rewrite_use_address): Simple refactor.
32602
32603 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32604
32605         * tree-ssa-loop-ivopts.c (struct iv_ca): Rename n_regs to n_invs.
32606         (ivopts_global_cost_for_size): Rename parameter and update uses.
32607         (iv_ca_recount_cost): Update uses.
32608         (iv_ca_set_remove_invs, iv_ca_set_no_cp): Record invariants and
32609         candidates seperately in n_invs and n_cands.
32610         (iv_ca_set_add_invs, iv_ca_set_cp, iv_ca_new): Ditto.
32611
32612 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32613
32614         * tree-ssa-loop-ivopts.c (struct walk_tree_data): New.
32615         (find_inv_vars_cb): New.
32616         (find_depends): Renamed to ...
32617         (find_inv_vars): ... this.
32618         (add_candidate_1, force_var_cost): Call find_inv_vars.
32619         (split_address_cost, determine_group_iv_cost_cond): Ditto.
32620
32621 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32622
32623         * tree-ssa-loop-ivopts.c (struct cost_pair): Rename depends_on to
32624         inv_vars.  Add inv_exprs.
32625         (struct iv_cand): Rename depends_on to inv_vars.
32626         (struct ivopts_data): Rename max_inv_id/n_invariant_uses to
32627         max_inv_var_id/n_inv_var_uses.  Move max_inv_expr_id around.
32628         Refactor field used_inv_exprs from has_map to array n_inv_expr_uses.
32629         (dump_cand): Dump inv_vars.
32630         (tree_ssa_iv_optimize_init): Support inv_vars and inv_exprs.
32631         (record_invariant, find_depends, add_candidate_1): Ditto.
32632         (set_group_iv_cost, force_var_cost): Ditto.
32633         (split_address_cost, ptr_difference_cost, difference_cost): Ditto.
32634         (get_computation_cost_at, get_computation_cost): Ditto.
32635         (determine_group_iv_cost_generic): Ditto.
32636         (determine_group_iv_cost_address): Ditto.
32637         (determine_group_iv_cost_cond, autoinc_possible_for_pair): Ditto.
32638         (determine_group_iv_costs): Ditto.
32639         (iv_ca_recount_cost): Update call to ivopts_global_cost_for_size.
32640         (iv_ca_set_remove_invariants): Renamed to ...
32641         (iv_ca_set_remove_invs): ... this.  Support inv_vars and inv_exprs.
32642         (iv_ca_set_no_cp): Use iv_ca_set_remove_invs.
32643         (iv_ca_set_add_invariants):  Renamed to ...
32644         (iv_ca_set_add_invs): ... this.  Support inv_vars and inv_exprs.
32645         (iv_ca_set_cp): Use iv_ca_set_add_invs.
32646         (iv_ca_has_deps): Support inv_vars and inv_exprs.
32647         (iv_ca_new, iv_ca_free, iv_ca_dump, free_loop_data): Ditto.
32648         (create_new_ivs): Remove useless dump.
32649
32650 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32651
32652         * tree-ssa-loop-ivopts.c (get_computation_cost_at): Remove pseudo
32653         iv_cand code.
32654         (determine_group_iv_cost_cond, determine_iv_cost): Ditto.
32655         (iv_ca_set_no_cp, create_new_iv): Ditto.
32656
32657 2017-05-02  Bin Cheng  <bin.cheng@arm.com>
32658
32659         * rtlanal.c (rtx_cost): Handle TRUNCATE between tieable modes.
32660
32661 2017-05-02  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
32662
32663         * tree.h (EXPR_CILK_SPAWN): Use macro TREE_CHECK2 instead of
32664         function tree_check2.
32665
32666 2017-05-02  Martin Liska  <mliska@suse.cz>
32667
32668         * doc/gcov.texi: Add missing preposition.
32669         * gcov.c (function_info::function_info): Properly fill up
32670         all member variables.
32671
32672 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
32673
32674         * expr.c (expand_expr_real_2): Re-cost if previous costs are the same.
32675
32676 2017-05-02  Tamar Christina  <tamar.christina@arm.com>
32677
32678         * simplify-rtx.c (simplify_binary_operation_1): Add LSHIFTRT case.
32679
32680 2017-05-02  Martin Liska  <mliska@suse.cz>
32681
32682         PR lto/77954.
32683         * lto-streamer-in.c (lto_read_tree_1): Remove
32684         LTO_STREAMER_DEBUG.
32685         * lto-streamer.c (struct tree_hash_entry): Likewise.
32686         (struct tree_entry_hasher): Likewise.
32687         (tree_entry_hasher::hash): Likewise.
32688         (tree_entry_hasher::equal): Likewise.
32689         (lto_streamer_init): Likewise.
32690         (lto_orig_address_map): Likewise.
32691         (lto_orig_address_get): Likewise.
32692         (lto_orig_address_remove): Likewise.
32693         * lto-streamer.h: Likewise.
32694         * tree-streamer-in.c (streamer_alloc_tree): Likewise.
32695         * tree-streamer-out.c (streamer_write_tree_header): Likewise.
32696
32697 2017-05-02  Sebastian Peryt  <sebastian.peryt@intel.com>
32698
32699         * config/i386/avx512fintrin.h (_mm_mask_add_round_sd)
32700         (_mm_maskz_add_round_sd, _mm_mask_add_round_ss)
32701         (mm_maskz_add_round_ss, _mm_mask_sub_round_sd)
32702         (mm_maskz_sub_round_sd, _mm_mask_sub_round_ss)
32703         (mm_maskz_sub_round_ss, _mm_mask_add_sd)
32704         (mm_maskz_add_sd, _mm_mask_add_ss, _mm_maskz_add_ss)
32705         (mm_mask_sub_sd, _mm_maskz_sub_sd, _mm_mask_sub_ss)
32706         (mm_maskz_sub_ss): New intrinsics.
32707         * config/i386/i386-builtin-types.def (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
32708         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): New function type aliases.
32709         * config/i386/i386-builtin.def (__builtin_ia32_addsd_mask_round)
32710         (__builtin_ia32_addss_mask_round, __builtin_ia32_subsd_mask_round)
32711         (__builtin_ia32_subss_mask_round): New builtins.
32712         * config/i386/i386.c (V2DF_FTYPE_V2DF_V2DF_V2DF_UQI_INT)
32713         (V4SF_FTYPE_V4SF_V4SF_V4SF_UQI_INT): Handle new types.
32714         * config/i386/sse.md (<sse>_vm<plusminus_insn><mode>3<round_name>):
32715         Renamed to ...
32716         (<sse>_vm<plusminus_insn><mode>3<mask_name><round_name>): ... this.
32717         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|%0, %1, %<iptr>2<round_op3>}):
32718         Changed to ...
32719         (v<plusminus_mnemonic><ssescalarmodesuffix>\t{<round_mask_op3>%2, %1, %0<mask_operand3>|%0<mask_operand3>, %1, %<iptr>2<round_mask_op3>}):
32720         ... this.
32721
32722 2017-05-02  Martin Jambor  <mjambor@suse.cz>
32723
32724         PR tree-optimization/78687
32725         * tree-sra.c (access): New field parent.
32726         (process_subtree_disqualification): New function.
32727         (disqualify_candidate): Call it.
32728         (build_accesses_from_assign): Reset write flag if creating an
32729         assighnment link.
32730         (build_access_subtree): Fill in parent field and also prpagate
32731         down grp_write flag.
32732         (create_artificial_child_access): New parameter set_grp_write, set
32733         grp_write to its value.
32734         (propagate_subaccesses_across_link): Also propagate grp_write flag
32735         values.
32736         (propagate_all_subaccesses): Push the closest parent back to work
32737         queue if add_access_to_work_queue returned true.
32738
32739 2017-05-02  Richard Biener  <rguenther@suse.de>
32740
32741         * common.opt (fstrict-overflow): Alias negative to fwrapv.
32742         * doc/invoke.texi (fstrict-overflow): Remove all traces of
32743         -fstrict-overflow documentation.
32744         * tree.h (TYPE_OVERFLOW_UNDEFINED): Do not test flag_strict_overflow.
32745         (POINTER_TYPE_OVERFLOW_UNDEFINED): Test !flag_wrapv instead of
32746         flag_strict_overflow.
32747         * ipa-inline.c (can_inline_edge_p): Do not test flag_strict_overflow.
32748         * lto-opts.c (lto_write_options): Do not stream it.
32749         * lto-wrapper.c (merge_and_complain): Do not handle it.
32750         * opts.c (default_options_table): Do not set -fstrict-overflow.
32751         (finish_options): Likewise do not clear it when sanitizing.
32752         * simplify-rtx.c (simplify_const_relational_operation): Do not
32753         test flag_strict_overflow.
32754
32755 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
32756
32757         * config/alpha/alpha.md (*add<mode>3_ieee): Merge to add<mode>3
32758         using enabled attribute.
32759         (*sub<mode>3_ieee): Merge to sub<mode>3 using enabled attribute.
32760         (*mul<mode>3_ieee): Merge to mul<mode>3 using enabled attribute.
32761         (*div<mode>3_ieee): Merge to div<mode>3 using enabled attribute.
32762         (*sqrt<mode>2_ieee): Merge to sqrt<mode>2 using enabled attribute.
32763         (*fix_truncdfdi_ieee): Merge to *fix_truncdfdi2 using enabled attribute.
32764         (*fix_truncsfdi_ieee): Merge to *fix_truncsfdi2 using enabled attribute.
32765         (*floatdisf_ieee): Merge to floatdisf2 using enabled attribute.
32766         (*floatdidf_ieee): Merge to floatdidf2 using enabled attribute.
32767         (*truncdfsf2_ieee): Merge to truncdfsf2 using enabled attribute.
32768         (*cmpdf_ieee): Merge to *cmpdf_internal using enabled attribute.
32769
32770 2017-05-02  Uros Bizjak  <ubizjak@gmail.com>
32771
32772         * config/i386/i386.c (ix86_code_end): Use {FIRST,LAST}_INT_REG.
32773
32774 2017-05-02  Richard Biener  <rguenther@suse.de>
32775
32776         PR tree-optimization/80591
32777         Revert
32778         2017-04-10  Richard Biener  <rguenther@suse.de>
32779
32780         * tree-ssa-structalias.c (find_func_aliases): Properly handle
32781         asm inputs.
32782
32783 2017-05-02  Richard Biener  <rguenther@suse.de>
32784
32785         PR tree-optimization/80549
32786         * tree-cfgcleanup.c (mfb_keep_latches): New helper.
32787         (cleanup_tree_cfg_noloop): Create forwarders to known loop
32788         headers if they do not have a preheader.
32789
32790 2017-05-02  Martin Liska  <mliska@suse.cz>
32791
32792         PR other/80589
32793         * common.opt: Fix typo.
32794         * doc/invoke.texi: Likewise.
32795
32796 2017-05-01  Jan Beulich  <jbeulich@suse.com>
32797
32798         * config/i386/sse.md (xop_vpermil2<mode>3): Do not allow operand
32799         swapping, add (x,x,m,x,n) alternative.
32800
32801 2017-05-01  Nathan Sidwell  <nathan@acm.org>
32802
32803         * calls.c (combine_pending_stack_adjustment_and_call): Remove
32804         unnecessary unadjusted_alignment check.
32805
32806 2017-05-01  Xi Ruoyao  <ryxi@stu.xidian.edu.cn>
32807
32808         PR c++/80038
32809         * cilk_common.c (expand_builtin_cilk_detach): Move pedigree
32810         operations here.
32811         * gimplify.c (gimplify_cilk_detach): New function.
32812         (gimplify_call_expr, gimplify_modify_expr): Call it as needed.
32813         * tree-core.h: Document EXPR_CILK_SPAWN.
32814         * tree.h (EXPR_CILK_SPAWN): Define.
32815
32816 2017-05-01  David Malcolm  <dmalcolm@redhat.com>
32817
32818         * diagnostic-show-locus.c (layout::get_expanded_location): Rewrite
32819         to use new fixit_hint representation, using the "replace" logic.
32820         (get_line_span_for_fixit_hint): Likewise.
32821         (layout::print_any_fixits): Likewise.
32822         (selftest::test_one_liner_many_fixits): Rename to...
32823         (selftest::test_one_liner_many_fixits_1): ...this, and update
32824         comment and expected output to reflect that the multiple fix-it
32825         hints are now consolidated into one insertion.
32826         (selftest::test_one_liner_many_fixits_2): New test.
32827         (selftest::test_diagnostic_show_locus_one_liner): Update for
32828         above.
32829         (selftest::test_fixit_consolidation): Update for fix-it API
32830         change.
32831         * diagnostic.c (print_parseable_fixits): Likewise.
32832         * edit-context.c (edited_line::m_line_events): Convert from
32833         auto_vec <line_event *> to auto_vec <line_event>.
32834         (class line_event): Convert from abstract base class to a concrete
32835         class, taking over the role of replace_event.
32836         (class insert_event): Delete.
32837         (class replace_event): Rename to class line_event.  Convert to
32838         half-open range.
32839         (edit_context::add_fixits): Reimplement.
32840         (edit_context::apply_insert): Delete.
32841         (edit_context::apply_replace): Rename to...
32842         (edit_context::apply_fixit): ...this.  Convert to half-open range.
32843         (edited_file::apply_insert): Delete.
32844         (edited_file::apply_replace): Rename to...
32845         (edited_file::apply_fixit): ...this.
32846         (edited_line::~edited_line): Drop deletion of events.
32847         (edited_line::apply_insert): Delete.
32848         (edited_line::apply_replace): Rename to...
32849         (edited_line::apply_fixit): ...this.  Convert to half-open range.
32850         Update for change to type of m_line_events.
32851         * edit-context.h (edit_context::apply_insert): Delete.
32852         (edit_context::apply_replace): Rename to...
32853         (edit_context::apply_fixit): ...this.
32854
32855 2017-05-01  Martin Sebor  <msebor@redhat.com>
32856
32857         * gimple-ssa-sprintf.c (format_integer): Set knownrange when it's
32858         known.
32859
32860 2017-05-01  Uros Bizjak  <ubizjak@gmail.com>
32861
32862         PR target/68491
32863         * config/i386/cpuid.h (__get_cpuid): Always return 0 when
32864         __get_cpuid_max returns 0.
32865         (__get_cpuid_count): Ditto.
32866
32867 2017-05-01  Eric Botcazou  <ebotcazou@adacore.com>
32868
32869         * tree.c (substitute_in_expr) <tcc_vl_exp>: Also inline a call if the
32870         replacement expression is another instance of one of its arguments.
32871
32872 2017-05-01  Jakub Jelinek  <jakub@redhat.com>
32873
32874         PR target/79430
32875         * rtlanal.c (reg_set_p): If reg is a stack_pointer_rtx, also
32876         check for stack push/pop autoinc.
32877         * config/i386/i386.c (ix86_agi_dependent): Return false
32878         if the only reason why modified_in_p returned true is that
32879         addr is SP based and set_insn is a push or pop.
32880
32881 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
32882
32883         * ipa-inline.c (compute_inlined_call_time): Remove now unnecesary
32884         overflow check.
32885
32886 2017-04-29  Jan Hubicka  <hubicka@ucw.cz>
32887
32888         PR ipa/79224
32889         * ipa-inline-analysis.c (dump_predicate): Add optional parameter NL.
32890         (account_size_time): Use two predicates - exec_pred and
32891         nonconst_pred_ptr.
32892         (evaluate_conditions_for_known_args): Compute both clause and
32893         nonspec_clause.
32894         (evaluate_properties_for_edge): Evaulate both clause and nonspec_clause.
32895         (inline_summary_t::duplicate): Update.
32896         (estimate_function_body_sizes): Caluculate exec and nonconst predicates
32897         separately.
32898         (compute_inline_parameters): Likewise.
32899         (estimate_edge_size_and_time): Update caluclation of time.
32900         (estimate_node_size_and_time): Compute both time and nonspecialized
32901         time.
32902         (estimate_ipcp_clone_size_and_time): Update.
32903         (inline_merge_summary): Update.
32904         (do_estimate_edge_time): Update.
32905         (do_estimate_edge_size): Update.
32906         (do_estimate_edge_hints): Update.
32907         (inline_read_section, inline_write_summary): Stream both new predicates.
32908         * ipa-inline.c (compute_uninlined_call_time): Take uninlined_call_time
32909         as argument.
32910         (compute_inlined_call_time): Cleanup.
32911         (big_speedup_p): Update.
32912         (edge_badness): Update.
32913         * ipa-inline.h (INLINE_TIME_SCALE): Remove.
32914         (size_time_entry): Replace predicate by exec_predicate and
32915         nonconst_predicate.
32916         (edge_growth_cache_entry): Cache both time nad nonspecialized time.
32917         (estimate_edge_time): Return also nonspec_time.
32918         (reset_edge_growth_cache): Update.
32919
32920 2017-04-29  Jakub Jelinek  <jakub@redhat.com>
32921
32922         PR rtl-optimization/80491
32923         * ifcvt.c (noce_process_if_block): When looking for x setter
32924         with missing else_bb, don't check only the insn right before
32925         cond_earliest, but look for the last insn that x is modified in
32926         within the same bb.
32927
32928         PR rtl-optimization/80491
32929         * alias.c (memory_modified_in_insn_p): Return true for CALL_INSNs.
32930
32931 2017-04-29  Marc Glisse  <marc.glisse@inria.fr>
32932
32933         PR tree-optimization/80487
32934         * tree-ssa-alias.c (stmt_kills_ref_p): Handle stpncpy and strncpy.
32935
32936 2017-04-29  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
32937
32938         PR tree-optimization/79697
32939         * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Check if callee
32940         is BUILT_IN_STRDUP, BUILT_IN_STRNDUP, BUILT_IN_REALLOC.
32941         (propagate_necessity): Check if def_callee is BUILT_IN_STRDUP or
32942         BUILT_IN_STRNDUP.
32943         * gimple-fold.c (gimple_fold_builtin_realloc): New function.
32944         (gimple_fold_builtin): Call gimple_fold_builtin_realloc.
32945
32946 2017-04-28  Martin Sebor  <msebor@redhat.com>
32947
32948         PR tree-optimization/80523
32949         * gimple-ssa-sprintf.c (target_to_host_charmap): New global variable.
32950         (init_target_to_host_charmap, target_to_host, target_strtol10): New
32951         functions.
32952         (maybe_warn, format_directive, parse_directive): Use new functions.
32953         (pass_sprintf_length::execute): Call init_target_to_host_charmap.
32954
32955 2017-04-28  Marc Glisse  <marc.glisse@inria.fr>
32956
32957         * match.pd (X+Z OP Y+Z, X-Z OP Y-Z, Z-X OP Z-Y): New transformations.
32958
32959 2017-04-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>
32960
32961         * configure.ac (SYSTEM_HEADER_DIR, BUILD_SYSTEM_HEADER_DIR,
32962         target_header_dir): Set correctly.
32963         * configure: Regenerated.
32964         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
32965         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
32966         instead of SYSTEM_HEADER_DIR.
32967
32968 2017-04-28  Jan Hubicka  <hubicka@ucw.cz>
32969
32970         * ipa-cp.c (perform_estimation_of_a_value): Turn time to sreal.
32971         (estimate_local_effects): Likewise.
32972         * ipa-inline.c (compute_inlined_call_time, want_inline_small_function_p,
32973         edge_badness, inline_small_functions, dump_overall_stats): LIkewise.
32974         * ipa-inline.h (edge_growth_cache_entry, estimate_time_after_inlining,
32975         estimate_ipcp_clone_size_and_time, do_estimate_edge_time,
32976         do_estimate_edge_time, estimate_edge_time): Likewise.
32977         * ipa-inline-analysis.c (estimate_node_size_and_time,
32978         estimate_ipcp_clone_size_and_time, do_estimate_edge_time): Likewise.
32979         (estimate_time_after_inlining): Remove.
32980
32981 2017-04-28  Martin Liska  <mliska@suse.cz>
32982
32983         * doc/gcov.texi: Enhance documentation of gcov.
32984
32985 2017-04-28  Martin Liska  <mliska@suse.cz>
32986
32987         * doc/gcov.texi: Sort options in alphabetic order.
32988         * doc/gcov-dump.texi: Likewise.
32989         * doc/gcov-tool.texi: Likewise.
32990         * gcov.c (print_usage): Likewise.
32991         * gcov-dump.c (print_usage): Likewise.
32992         * gcov-tool.c (print_merge_usage_message): Likewise.
32993         (print_rewrite_usage_message): Likewise.
32994         (print_overlap_usage_message): Likewise.
32995
32996 2017-04-28  Martin Liska  <mliska@suse.cz>
32997
32998         PR gcov-profile/53915
32999         * gcov.c (format_gcov): Print 'NAN %' when top > bottom.
33000
33001 2017-04-28  Martin Liska  <mliska@suse.cz>
33002
33003         PR gcov-profile/79891
33004         * gcov.c (add_line_counts): Assign BBs to lines just if the BB
33005         is marked by compiler as living on a line.
33006         (get_cycles_count): Remove usage of the union.
33007         (output_intermediate_file): Likewise.
33008         (find_source): Fix GNU coding style.
33009         (accumulate_line_counts): Remove old non-all block mode.
33010         (output_lines): Remove usage of the union.
33011         * profile.c (output_location): Include all BBs, even if
33012         belonging to a same line (and file) as a previous BB.
33013
33014 2017-04-28  Martin Liska  <mliska@suse.cz>
33015
33016         * gcov.c (process_args): Handle new argument 'w'.
33017         (read_graph_file): Assign ID to BBs.
33018         (output_branch_count): Display BB # if verbose flag is set.
33019         (output_lines): Likewise for arcs.
33020         (print_usage): Add '--verbose' option help.
33021         * doc/gcov.texi: Document --verbose (-w) option.
33022
33023 2017-04-28  Martin Liska  <mliska@suse.cz>
33024
33025         * gcov.c (struct block_location_info): New struct.
33026         (process_file): Fill up the new structure.
33027         (read_graph_file): Replace usage of encoding by the newly added
33028         struct.
33029         (add_line_counts): Likewise.
33030         (accumulate_line_counts): Remove usage of the union.
33031         (function_info::function_info): New function.
33032         (function_info::~function_info): Likewise.
33033         (process_file): Call delete instead of release_function.
33034         (release_function): Release the function.
33035         (release_structures): Call delete instead of release_function.
33036         (solve_flow_graph): Replace usage of num_blocks.
33037         (find_exception_blocks): Likewise.
33038         (output_lines): Fix GNU coding style.
33039
33040 2017-04-28  Martin Liska  <mliska@suse.cz>
33041
33042         PR driver/56469
33043         * coverage.c (coverage_remove_note_file): New function.
33044         * coverage.h: Declare the function.
33045         * toplev.c (finalize): Clean if an error has been seen.
33046
33047 2017-04-28  Martin Liska  <mliska@suse.cz>
33048
33049         PR gcov-profile/80031
33050         * gcov-dump.c (tag_blocks): Just print number of basic blocks.
33051         * gcov-io.h (GCOV_TAG_BLOCKS_NUM): Remove unused macro.
33052         * gcov.c (read_graph_file): Read just number of blocks.
33053         * profile.c (branch_prob): Do not stream 0 flags per a basic
33054         block.
33055
33056 2017-04-28  Martin Liska  <mliska@suse.cz>
33057
33058         * gcov-dump.c (tag_*): Add new argument to declarations.
33059         (dump_gcov_file): Likewise.
33060         (tag_blocks): Add and use new argument depth.
33061         (tag_arcs): Likewise.
33062         (tag_lines): Likewise.
33063         (tag_counters): Likewise.
33064         (tag_summary): Likewise.
33065         (dump_working_sets): Use depth to do a proper indentation.
33066
33067 2017-04-28  Jakub Jelinek  <jakub@redhat.com>
33068
33069         PR bootstrap/80531
33070         * cgraph.h (symtab_node::debug_symtab): No longer inline.
33071         * symtab.c (symtab_node::debug_symtab): Move definition here.
33072
33073 2017-04-28  Richard Biener  <rguenther@suse.de>
33074
33075         * lto-streamer.h (LTO_major_version): Bump to 7.
33076
33077 2017-04-28  Richard Biener  <rguenther@suse.de>
33078
33079         * tree-vrp.c (assert_info): New struct.
33080         (add_assert_info): New helper.
33081         (register_edge_assert_for_2): Refactor to add asserts to a vector
33082         of assert_info.
33083         (register_edge_assert_for_1): Likewise.
33084         (register_edge_assert_for): Likewise.
33085         (finish_register_edge_assert_for): New helper actually registering
33086         asserts where live on edge.
33087         (find_conditional_asserts): Adjust.
33088         (find_switch_asserts): Likewise.
33089         (evrp_dom_walker::try_find_new_range): Generalize.
33090         (evrp_dom_walker::before_dom_children): Use register_edge_assert_for.
33091
33092 2017-04-27  Marek Polacek  <polacek@redhat.com>
33093
33094         PR sanitizer/80349
33095         * fold-const.c (fold_binary_loc) <case EQ_EXPR, NE_EXPR>: Convert
33096         arg10 and arg11 to itype.
33097
33098 2017-04-27  Jonathan Wakely  <jwakely@redhat.com>
33099
33100         * doc/extend.texi (Object Size Checking): Improve grammar.
33101
33102 2017-04-27  Richard Earnshaw  <rearnsha@arm.com>
33103
33104         PR target/80530
33105         * config/aarch64/aarch64.c (aarch64_emit_approx_sqrt): Ensure
33106         that the logic for permitting reciprocal estimates matches that
33107         in use_rsqrt_p.
33108
33109 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
33110
33111         PR c++/80534
33112         * tree.c (type_cache_hasher::equal): Only compare
33113         TYPE_TYPELESS_STORAGE flag on non-aggregate element types.
33114         (build_array_type_1): Only hash TYPE_TYPELESS_STORAGE flag on
33115         non-aggregate element types.
33116         * tree.h (TYPE_TYPELESS_STORAGE): Fix comment typo, add more details
33117         about the flag on ARRAY_TYPEs in the comment, formatting fix.
33118
33119 2017-04-27  Richard Biener  <rguenther@suse.de>
33120
33121         PR middle-end/80533
33122         * emit-rtl.c (set_mem_attributes_minus_bitpos): When
33123         stripping ARRAY_REFs from MEM_EXPR make sure we're not
33124         keeping a reference to a trailing array.
33125
33126 2017-04-27  Richard Biener  <rguenther@suse.de>
33127
33128         PR middle-end/80539
33129         * tree-chrec.c (chrec_fold_plus_poly_poly): Deal with not
33130         being in loop-closed SSA form conservatively.
33131         (chrec_fold_multiply_poly_poly): Likewise.
33132
33133 2017-04-27  Tamar Christina  <tamar.christina@arm.com>
33134
33135         PR middle-end/79665
33136         * expr.c (expand_expr_real_2): Move TRUNC_MOD_EXPR, FLOOR_MOD_EXPR,
33137         CEIL_MOD_EXPR, ROUND_MOD_EXPR cases.
33138
33139 2017-04-27  Jakub Jelinek  <jakub@redhat.com>
33140
33141         PR target/77728
33142         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): Remove.
33143         (aarch64_function_arg_alignment): Return unsigned int again, but still
33144         ignore TYPE_FIELDS chain decls other than FIELD_DECLs.
33145         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
33146         Don't emit -Wpsabi note.
33147         (aarch64_function_arg_boundary): Likewise.
33148         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
33149         caller.
33150
33151 2017-04-26  Nathan Sidwell  <nathan@acm.org>
33152
33153         * tree.h (crc32_unsigned_n): Declare.
33154         (crc32_unsigned, crc32_unsigned): Make inline.
33155         * tree.c (crc32_unsigned_bits): Replace with ...
33156         (crc32_unsigned_n): ... this.
33157         (crc32_unsigned, crc32_byte): Remove.
33158         (crc32_string): Remove unnecessary braces.
33159
33160 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
33161
33162         * ipa-cp.c (estimate_local_effects): Convert sreal to int.
33163         * ipa-inline-analysis.c (MAX_TIME): Remove.
33164         (account_size_time): Use sreal for time.
33165         (dump_inline_summary): Update.
33166         (estimate_function_body_sizes): Update.
33167         (estimate_edge_size_and_time): Update.
33168         (estimate_calls_size_and_time): Update.
33169         (estimate_node_size_and_time): Update.
33170         (inline_merge_summary): Update.
33171         (inline_update_overall_summary): Update.
33172         (estimate_time_after_inlining): Update.
33173         (inline_read_section): Update.
33174         (inline_write_summary): Update.
33175         * ipa-inline.c (compute_uninlined_call_time): Update.
33176         (compute_inlined_call_time): Update.
33177         (recursive_inlining): Update.
33178         (inline_small_functions): Update.
33179         (dump_overall_stats): Update.
33180         * ipa-inline.h: Include sreal.h.
33181         (size_time_entry): Turn time to sreal.
33182         (inline_summary): Turn self_time nad time to sreal.
33183
33184 2017-04-25  Jan Hubicka  <hubicka@ucw.cz>
33185
33186         * sreal.c: Include backend.h, tree.h, gimple.h, cgraph.h and
33187         data-streamer.h
33188         (sreal::stream_out, sreal::stream_in): New.
33189         * sreal.h (sreal::stream_out, sreal::stream_in): Declare.
33190
33191 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
33192
33193         * Makefile.in (s-options): Invoke opt-gather.awk with LC_ALL=C in the
33194         environment.
33195
33196 2017-04-25  Uros Bizjak  <ubizjak@gmail.com>
33197
33198         PR target/70799
33199         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p):
33200         Handle ASHIFTRT.
33201         (dimode_scalar_chain::compute_convert_gain): Ditto.
33202         (dimode_scalar_chain::make_vector_copies): Ditto.
33203         (dimode_scalar_chain::convert_reg): Ditto.
33204         (dimode_scalar_chain::convert_insn): Ditto.
33205         * config/i386/sse.md (VI24_AVX512BW_1): Remove mode iterator.
33206         (VI248_AVX512BW_1): New mode iterator.
33207         (<mask_codefor>ashr<mode>3<mask_name>): Merge insn pattern with
33208         <mask_codefor>ashrv2di3<mask_name> insn using VI248_AVX512BW_1
33209         mode iterator.
33210
33211 2017-04-25  Martin Sebor  <msebor@redhat.com>
33212
33213         PR tree-optimization/80497
33214         * gimple-ssa-sprintf.c (get_int_range): Avoid assuming all integer
33215         constants are representable in HOST_WIDE_INT.
33216         (parse_directive): Ditto.
33217
33218 2017-04-25  Martin Sebor  <msebor@redhat.com>
33219
33220         PR bootstrap/80486
33221         * dominance.c (dom_info::m_n_basic_blocks): Change type to unsigned.
33222         (new_zero_array): Adjust signature.
33223         (dom_info::dom_init): Used unsigned rather that size_t.
33224         (dom_info::dom_info): Same.
33225
33226 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
33227             Jakub Jelinek  <jakub@redhat.com>
33228
33229         PR target/77728
33230         * config/arm/arm.c: Include gimple.h.
33231         (aapcs_layout_arg): Emit -Wpsabi note if arm_needs_doubleword_align
33232         returns negative, increment ncrn only if it returned positive.
33233         (arm_needs_doubleword_align): Return int instead of bool,
33234         ignore DECL_ALIGN of non-FIELD_DECL TYPE_FIELDS chain
33235         members, but if there is any such non-FIELD_DECL
33236         > PARM_BOUNDARY aligned decl, return -1 instead of false.
33237         (arm_function_arg): Emit -Wpsabi note if arm_needs_doubleword_align
33238         returns negative, increment nregs only if it returned positive.
33239         (arm_setup_incoming_varargs): Likewise.
33240         (arm_function_arg_boundary): Emit -Wpsabi note if
33241         arm_needs_doubleword_align returns negative, return
33242         DOUBLEWORD_ALIGNMENT only if it returned positive.
33243
33244 2017-04-25  Marek Polacek  <polacek@redhat.com>
33245
33246         PR sanitizer/80349
33247         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
33248         first argument to type.
33249
33250 2017-04-25  Bill Seurer  <seurer@linux.vnet.ibm.com>
33251
33252         PR target/80482
33253         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Change
33254         type checks to test for compatibility instead of equality.
33255
33256 2017-04-25  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
33257             Jakub Jelinek  <jakub@redhat.com>
33258
33259         PR target/77728
33260         * config/aarch64/aarch64.c (struct aarch64_fn_arg_alignment): New
33261         type.
33262         (aarch64_function_arg_alignment): Return aarch64_fn_arg_alignment
33263         struct.  Ignore DECL_ALIGN of decls other than FIELD_DECL for
33264         the alignment computation, but return their maximum in warn_alignment.
33265         (aarch64_layout_arg): Adjust aarch64_function_arg_alignment caller.
33266         Emit a -Wpsabi note if warn_alignment is 16 bytes, but alignment
33267         is smaller.
33268         (aarch64_function_arg_boundary): Likewise.  Simplify using MIN/MAX.
33269         (aarch64_gimplify_va_arg_expr): Adjust aarch64_function_arg_alignment
33270         caller.
33271
33272 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
33273
33274         * config/arc/simdext.md (dmpyh): Fix typo.
33275
33276 2017-04-25  Richard Biener  <rguenther@suse.de>
33277
33278         PR tree-optimization/80492
33279         * alias.c (compare_base_decls): Handle registers with asm
33280         specification conservatively.
33281         * tree-ssa-alias.c (decl_refs_may_alias_p): Handle
33282         compare_base_decls returning dont-know properly.
33283
33284 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
33285
33286         * config/arc/arc.c (LEGITIMATE_OFFSET_ADDRESS_P): Delete macro.
33287         (legitimate_offset_address_p): New function.
33288         (arc_legitimate_address_p): Use above function.
33289
33290 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
33291
33292         * config/arc/arc.c (arc_output_mi_thunk): Emit PIC calls.
33293
33294 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
33295
33296         * config/arc/arc.c (arc_conditional_register_usage): Use ACCL,
33297         ACCH registers whenever they are available.
33298
33299 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
33300
33301         * config/arc/arc.c (arc_conditional_register_usage): Make D0, D1
33302         double regs fix when not used.
33303
33304 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
33305
33306         * config/arc/arc.h (REGNO_OK_FOR_BASE_P): Consider also extension
33307         core registers.
33308         (REG_OK_FOR_INDEX_P_NONSTRICT): Likewise.
33309         (REG_OK_FOR_BASE_P_NONSTRICT): Likewise.
33310
33311 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
33312
33313         * config/arc/arc.c (arc_output_addsi): Check for h-register class
33314         when emitting short ADD instructions.
33315
33316 2017-04-25  Claudiu Zissulescu  <claziss@synopsys.com>
33317
33318         * config/arc/arc.md (cmpsi_cc_insn_mixed): Use 'h' register
33319         constraint.
33320         (cmpsi_cc_c_insn): Likewise.
33321         (cbranchsi4_scratch): Compute proper instruction length using
33322         compact_hreg_operand.
33323         * config/arc/predicates.md (compact_hreg_operand): New predicate.
33324
33325 2017-04-25  Richard Biener  <rguenther@suse.de>
33326
33327         PR middle-end/80509
33328         * passes.c (pass_manager::pass_manager): Initialize
33329         m_name_to_pass_map.
33330
33331 2017-04-25  Richard Biener  <rguenther@suse.de>
33332
33333         PR tree-optimization/79201
33334         * tree-ssa-sink.c (statement_sink_location): Handle calls.
33335
33336 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33337
33338         PR target/80464
33339         * config/s390/vector.md: Split MEM->GPR vector moves for
33340         non-s_operand addresses.
33341
33342 2017-04-25  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
33343
33344         PR target/79895
33345         * config/s390/predicates.md (reload_const_wide_int_operand): New
33346         predicate.
33347         * config/s390/s390.md ("movti"): Remove d/P alternative.
33348         ("movti_bigconst"): New pattern definition.
33349
33350 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
33351
33352         PR target/80080
33353         * s390-protos.h (s390_expand_cs_hqi): Removed.
33354         (s390_expand_cs, s390_expand_atomic_exchange_tdsi): New prototypes.
33355         * config/s390/s390.c (s390_emit_compare_and_swap): Handle all integer
33356         modes as well as CCZ1mode and CCZmode.
33357         (s390_expand_atomic_exchange_tdsi, s390_expand_atomic): Adapt to new
33358         signature of s390_emit_compare_and_swap.
33359         (s390_expand_cs_hqi): Likewise, make static.
33360         (s390_expand_cs_tdsi): Generate an explicit compare before trying
33361         compare-and-swap, in some cases.
33362         (s390_expand_cs): Wrapper function.
33363         (s390_expand_atomic_exchange_tdsi): New backend specific expander for
33364         atomic_exchange.
33365         (s390_match_ccmode_set): Allow CCZmode <-> CCZ1 mode.
33366         * config/s390/s390.md ("atomic_compare_and_swap<mode>"): Merge the
33367         patterns for small and large integers.  Forbid symref memory operands.
33368         Move expander to s390.c.  Require cc register.
33369         ("atomic_compare_and_swap<DGPR:mode><CCZZ1:mode>_internal")
33370         ("*atomic_compare_and_swap<TDI:mode><CCZZ1:mode>_1")
33371         ("*atomic_compare_and_swapdi<CCZZ1:mode>_2")
33372         ("*atomic_compare_and_swapsi<CCZZ1:mode>_3"): Use s_operand to forbid
33373         symref memory operands.  Remove CC mode and call s390_match_ccmode
33374         instead.
33375         ("atomic_exchange<mode>"): Allow and implement all integer modes.
33376
33377 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
33378
33379         * config/s390/s390.md (define_peephole2): New peephole to help
33380         combining the load-and-test pattern with volatile memory.
33381
33382 2017-04-25  Dominik Vogt  <vogt@linux.vnet.ibm.com>
33383
33384         * config/s390/s390.md ("cstorecc4"): Use load-on-condition and deal
33385         with CCZmode for TARGET_Z196.
33386
33387 2017-04-25  Jakub Jelinek  <jakub@redhat.com>
33388
33389         PR rtl-optimization/80501
33390         * combine.c (make_compound_operation_int): Set subreg_code to SET
33391         even for AND with mask of the sign bit of mode.
33392
33393         PR rtl-optimization/80500
33394         * loop-unroll.c (combine_var_copies_in_loop_exit): Call copy_rtx on
33395         sum's initial value.
33396
33397 2017-04-25  Julian Brown  <julian@codesourcery.com>
33398             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
33399
33400         * config/aarch64/thunderx2t99.md (thunderx2t99_crc): New Reservation.
33401
33402 2017-04-25  Marc Glisse  <marc.glisse@inria.fr>
33403
33404         * fold-const.c (tree_single_nonzero_warnv_p): Handle SSA_NAME.
33405
33406 2017-04-25  Julian Brown  <julian@codesourcery.com>
33407             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
33408
33409         * config/aarch64/thunderx2t99.md (thunderx2t99_aes): New Reservation.
33410         (thunderx2t99_sha): New Reservation.
33411
33412 2017-04-25  Julian Brown  <julian@codesourcery.com>
33413             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
33414
33415         * config/aarch64/aarch64-simd.md (aarch64_simd_vec_set<mode>): Fix
33416         type for 1-element load.
33417
33418 2017-04-24  Marc Glisse  <marc.glisse@inria.fr>
33419
33420         * match.pd (X/[ex]C CMP Y/[ex]C): New transformation.
33421
33422 2017-04-24  Martin Jambor  <mjambor@suse.cz>
33423
33424         PR tree-optimization/80293
33425         * tree-sra.c (scalarizable_type_p): New parameter const_decl, make
33426         char arrays not totally scalarizable if it is false.
33427         (analyze_all_variable_accesses): Pass correct value in the new
33428         parameter.  Add a statistics counter.
33429
33430 2017-04-24  Jan Hubicka  <hubicka@ucw.cz>
33431
33432         PR middle-end/79931
33433         * ipa-devirt.c (dump_possible_polymorphic_call_targets): Fix ICE.
33434
33435 2017-04-24  Richard Biener  <rguenther@suse.de>
33436
33437         PR tree-optimization/80494
33438         * tree-scalar-evolution.c (analyze_scalar_evolution_1): Bail
33439         out for complex types.
33440
33441 2017-04-24  Richard Biener  <rguenther@suse.de>
33442
33443         * tree-ssa-sccvn.h (run_scc_vn): Adjust prototype.
33444         * tree-ssa-sccvn.c (print_scc): Print SCC size.
33445         (extract_and_process_scc_for_name): Never fail but drop SCC to varying.
33446         (DFS): Adjust and never fail.
33447         (sccvn_dom_walker::fail): Remove.
33448         (sccvn_dom_walker::before_dom_children): Adjust.
33449         (run_scc_vn): Likewise and never fail.
33450         * tree-ssa-pre.c (pass_pre::execute): Adjust.
33451         (pass_fre::execute): Likewise.
33452
33453 2017-04-24  Richard Biener  <rguenther@suse.de>
33454
33455         PR tree-optimization/79725
33456         * tree-ssa-sink.c (statement_sink_location): Return whether
33457         failure reason was zero uses.  Move that check later.
33458         (sink_code_in_bb): Deal with zero uses by removing the stmt
33459         if possible.
33460
33461 2017-04-24  Richard Biener  <rguenther@suse.de>
33462
33463         PR c++/2972
33464         * tree-ssa-uninit.c (warn_uninitialized_vars): Handle some
33465         pointer-based references.
33466
33467 2017-04-24  Richard Biener  <rguenther@suse.de>
33468
33469         PR bootstrap/79814
33470         * pass_manager.h (pass_manager::operator new): Remove.
33471         (pass_manager::operator delete): Likewise.
33472         * passes.c (pass_manager::operator new): Remove.
33473         (pass_manager::operator delete): Likewise.
33474         (pass_manager::pass_manager): Zero individual pass members.
33475
33476 2017-04-23  Uros Bizjak  <ubizjak@gmail.com>
33477
33478         PR target/70799
33479         * config/i386/i386.c (dimode_scalar_to_vector_candidate_p)
33480         <case ASHIFT, case LSHIFTRT>: Also consider variable shifts.
33481         Check "XEXP (src, 1)" operand here.
33482         <case PLUS, case MINUS, case IOR, case XOR, case AND>:
33483         Check "XEXP (src, 1)" operand here.
33484         (dimode_scalar_chain::make_vector_copies): Detect count register
33485         of a shift instruction.  Zero extend count register from QImode
33486         to DImode to satisfy vector shift pattern count operand predicate.
33487         Substitute vector shift count operand with a DImode copy.
33488         (dimode_scalar_chain::convert_reg): Ditto, zero-extend from
33489         vector register.
33490
33491 2017-04-21  Uros Bizjak  <ubizjak@gmail.com>
33492
33493         * config/i386/i386.md (*extzvqi_mem_rex64): Move above *extzv<mode>.
33494         Remove UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
33495         (*insvqi_1_mem_rex64): Move above insv<mode>_1.  Remove
33496         UNSPEC_NOREX_MEM tag.  Update corresponding peephole2 pattern.
33497         (UNSPEC_NOREX_MEM): Remove definition.
33498
33499 2017-04-21  Richard Biener  <rguenther@suse.de>
33500
33501         PR tree-optimization/79547
33502         * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
33503         Handle strlen, strcmp, strncmp, strcasecmp, strncasecmp, memcmp,
33504         bcmp, strspn, strcspn, __builtin_object_size and __builtin_constant_p
33505         without any constraints.
33506
33507 2017-04-21  Richard Biener  <rguenther@suse.de>
33508
33509         PR tree-optimization/78847
33510         * fold-const.c (split_tree): Handle POINTER_PLUS_EXPR.
33511
33512 2017-04-21  Richard Biener  <rguenther@suse.de>
33513
33514         * tree.h (build_qualified_type): Annotate with CXX_MEM_STAT_INFO.
33515         (build_distinct_type_copy): Likewise.
33516         (build_variant_type_copy): Likewise.
33517         * tree.c (build_qualified_type): Pass down mem-stat info.
33518         (build_distinct_type_copy): Likewise.
33519         (build_variant_type_copy): Likewise.
33520
33521 2017-04-21  Richard Biener  <rguenther@suse.de>
33522
33523         PR tree-optimization/80237
33524         * tree-ssa-pre.c (find_leader_in_sets): Add third set argument,
33525         defaulted to NULL.
33526         (phi_translate_1): Also allow a leader in AVAIL_OUT of pred
33527         for a simplified result.
33528
33529 2016-04-21  Richard Biener  <rguenther@suse.de>
33530
33531         * tree-ssa-loop-ivcanon.c (constant_after_peeling): Do not require
33532         sth as strict as a simple_iv but a chrec without symbols and an
33533         operand defined in the loop we are peeling (and not some subloop).
33534         (propagate_constants_for_unrolling): Propagate all constants.
33535
33536 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
33537
33538         PR target/79804
33539         * config/i386/i386.c (print_reg): Remove assert for disalowed
33540         regno values, call output_operand_lossage instead.
33541
33542 2017-04-20  Uros Bizjak  <ubizjak@gmail.com>
33543
33544         PR target/78090
33545         * config/i386/constraints.md (Yc): New register constraint.
33546         * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
33547         Use Yc constraint for alternative 2 of operand 0.  Remove
33548         preferred_for_speed attribute.
33549
33550 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
33551
33552         * omp-low.c (lower_lastprivate_clauses): Correct handling of linear and
33553         lastprivate clauses in SIMT case.
33554
33555 2017-04-20  Volker Reichelt  <v.reichelt@netcologne.de>
33556
33557         * doc/invoke.texi (-Wextra-semi): Document new warning option.
33558
33559 2017-04-20  Richard Biener  <rguenther@suse.de>
33560
33561         PR tree-optimization/57796
33562         * tree-vect-stmts.c (vect_model_store_cost): Cost scatters
33563         as N scalar stores.
33564         (vect_model_load_cost): Cost gathers as N scalar loads.
33565
33566 2017-04-20  Richard Biener  <rguenther@suse.de>
33567
33568         * ggc-page.c (ggc_allocated_p): Rename to ...
33569         (safe_lookup_page_table_entry): ... this and return the lookup
33570         result.
33571         (gt_ggc_m_S): Use safe_lookup_page_table_entry.
33572
33573 2017-04-20  Richard Biener  <rguenther@suse.de>
33574
33575         PR tree-optimization/80453
33576         * tree-ssa-sccvn.h (struct vn_phi_s): Add cclhs and ccrhs members.
33577         * tree-ssa-sccvn.c (cond_stmts_equal_p): Use recorded lhs and rhs
33578         from the conditions.
33579         (vn_phi_eq): Pass them down.
33580         (vn_phi_lookup): Record them.
33581         (vn_phi_insert): Likewise.
33582
33583 2017-04-20  Matthew Fortune  <matthew.fortune@imgtec.com>
33584
33585         * config/mips/mips.c (mips_expand_vec_perm_const): Re-fix
33586         uninitialized variable warning to avoid buffer overrun.
33587
33588 2017-04-20  Alexander Monakov  <amonakov@ispras.ru>
33589
33590         PR other/71250
33591         * doc/invoke.texi (-Wmissing-field-initializers): Mention that warning
33592         is suppressed for '{ 0 }' in C.
33593
33594 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
33595
33596         * BASE-VER: Set to 8.0.0.
33597
33598 2017-04-20  Thomas Preud'homme  <thomas.preudhomme@arm.com>
33599
33600         * config/arm/arm.c (arm_elf_asm_cdtor): Create non-default
33601         priority .init_array and .fini_array section with SECTION_NOTYPE
33602         flag.
33603
33604 2017-04-20  Jakub Jelinek  <jakub@redhat.com>
33605
33606         PR middle-end/80423
33607         * tree.h (build_array_type): Add typeless_storage default argument.
33608         * tree.c (type_cache_hasher::equal): Also compare
33609         TYPE_TYPELESS_STORAGE flag for ARRAY_TYPEs.
33610         (build_array_type): Add typeless_storage argument, set
33611         TYPE_TYPELESS_STORAGE to it, if shared also hash it, and pass to
33612         recursive call.
33613         (build_nonshared_array_type): Adjust build_array_type_1 caller.
33614         (build_array_type): Likewise.  Add typeless_storage argument.
33615
33616 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
33617             Jakub Jelinek  <jakub@redhat.com>
33618
33619         PR tree-optimization/80426
33620         * tree-vrp.c (extract_range_from_binary_expr_1): For an additive
33621         operation on symbolic operands, also compute the overflow for the
33622         invariant part when the operation degenerates into a negation.
33623
33624 2017-04-19  Jakub Jelinek  <jakub@redhat.com>
33625
33626         PR debug/80461
33627         * dwarf2out.c (modified_type_die, gen_type_die_with_usage):
33628         Check for t with zero TYPE_QUALS_NO_ADDR_SPACE.
33629
33630         PR debug/80436
33631         * tree-ssa-loop-manip.c (find_uses_to_rename_def): Ignore debug uses.
33632
33633 2017-04-19  Georg-Johann Lay  <avr@gjlay.de>
33634
33635         PR target/80462
33636         * config/avr/avr.c (tree.h): Include it.
33637         (cgraph.h): Include it.
33638         (avr_encode_section_info): Don't warn for uninitialized progmem
33639         variable if it's just an alias.
33640
33641 2017-04-19  Richard Biener  <rguenther@suse.de>
33642
33643         PR ipa/65972
33644         * auto-profile.c (afdo_vpt_for_early_inline): Update SSA
33645         when needed by AutoPGO.
33646
33647 2017-04-19  Paulo J. Matos  <paulo@matos-sorge.com>
33648
33649         PR lto/50345
33650         * doc/lto.texi: Remove an extra 'that'.
33651
33652 2017-04-19  Segher Boessenkool  <segher@kernel.crashing.org>
33653
33654         PR rtl-optimization/80429
33655         * ira.c (split_live_ranges_for_shrink_wrap): Don't split regs that
33656         are only used in debug insns.
33657
33658 2017-04-19  Eric Botcazou  <ebotcazou@adacore.com>
33659             Vladimir Makarov  <vmakarov@redhat.com>
33660
33661         * config/sparc/predicates.md (input_operand): Add comment.  Return
33662         true for any memory operand when LRA is in progress.
33663         * config/sparc/sparc.c (sparc_expand_move): Minor formatting fix.
33664
33665 2017-04-18  Jeff Law  <law@redhat.com>
33666
33667         PR target/74563
33668         * mips.md ({return,simple_return}_internal): Do not overwrite
33669         operands[0].
33670
33671 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
33672
33673         PR tree-optimization/80443
33674         * tree-vrp.c (intersect_ranges): For signed 1-bit precision type,
33675         instead of adding 1, subtract -1 and similarly instead of subtracting
33676         1 add -1.
33677
33678 2017-04-18  Richard Sandiford  <richard.sandiford@arm.com>
33679
33680         PR rtl-optimization/80357
33681         * haifa-sched.c (tmp_bitmap): New variable.
33682         (model_recompute): Handle duplicate use records.
33683         (alloc_global_sched_pressure_data): Initialize tmp_bitmap.
33684         (free_global_sched_pressure_data): Free it.
33685
33686 2017-04-18  Bernd Edlinger  <bernd.edlinger@hotmail.de>
33687
33688         Revert:
33689         2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
33690         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
33691         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
33692         instead of SYSTEM_HEADER_DIR.
33693
33694 2017-04-18  Jeff Law  <law@redhat.com>
33695
33696         PR middle-end/80422
33697         * cfgcleanup.c (try_crossjump_to_edge): Verify SRC1 and SRC2 have
33698         predecessors after walking up the insn chain.
33699
33700 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
33701
33702         PR debug/80263
33703         * dwarf2out.c (modified_type_die): Try harder not to emit internal
33704         sizetype type into debug info.
33705
33706 2017-04-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
33707
33708         PR target/80099
33709         * config/rs6000/rs6000.c (rs6000_expand_vector_extract): Eliminate
33710         unneeded test for TARGET_UPPER_REGS_SF.
33711         * config/rs6000/vsx.md (vsx_extract_v4sf_var): Likewise.
33712
33713 2017-04-18  Jakub Jelinek  <jakub@redhat.com>
33714
33715         PR sanitizer/80444
33716         * sancov.c (sancov_pass): Use gsi_start_nondebug_after_labels_bb
33717         instead of gsi_after_labels.
33718
33719 2017-04-18  Jeff Law  <law@redhat.com>
33720
33721         * regcprop.c (maybe_mode_change): Avoid creating copies of the
33722         stack pointer.
33723
33724         Revert:
33725         2017-04-13  Jeff Law  <law@redhat.com>
33726         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
33727         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
33728
33729 2017-04-18  Georg-Johann Lay  <avr@gjlay.de>
33730
33731         PR target/79453
33732         * config/avr/avr.c (intl.h): Include it.
33733         (avr_pgm_check_var_decl) [reason]: Wrap diagnostic snippets into _().
33734
33735 2017-04-18  Martin Liska  <mliska@suse.cz>
33736
33737         PR gcov-profile/78783
33738         * gcov-tool.c (gcov_output_files): Validate that destination
33739         file is either removed by the tool or by a user.
33740
33741 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
33742             Guy Benyei  <guybe@mellanox.com>
33743
33744         * config/arc/arc.c (arc_reorg): Move loop_end_id into a more local
33745         block, and do not negate it, the stored id is already negative.
33746
33747 2017-04-14  Andrew Burgess  <andrew.burgess@embecosm.com>
33748
33749         * config/arc/arc.md (doloop_begin_i): Use @pcl assembler syntax.
33750
33751 2017-04-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
33752
33753         PR target/80098
33754         * config/rs6000/rs6000-cpus.def (OTHER_P9_VECTOR_MASKS): Define
33755         masks of options that should be turned off if the VSX vector
33756         options are turned off.
33757         (OTHER_P8_VECTOR_MASKS): Likewise.
33758         (OTHER_VSX_VECTOR_MASKS): Likewise.
33759         * config/rs6000/rs6000.c (rs6000_option_override_internal): Call
33760         rs6000_disable_incompatible_switches to validate no type switches
33761         like -mvsx.
33762         (rs6000_incompatible_switch): New function to disallow turning on
33763         other vector options if -mno-vsx, -mno-power8-vector, or
33764         -mno-power9-vector are specified.
33765
33766 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
33767
33768         * config/arc/arc.h (CRT_CALL_STATIC_FUNCTION): Use long calls.
33769
33770 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
33771
33772         * config/arc/arc-protos.h (arc_decl_pretend_args): Remove.
33773         * config/arc/arc.c (arc_decl_pretend_args): Likewise.
33774         * config/arc/arc.h (CFA_FRAME_BASE_OFFSET): Likewise.
33775         (ARG_POINTER_CFA_OFFSET): Likewise.
33776
33777 2017-04-14  Claudiu Zissulescu  <claziss@synopsys.com>
33778
33779         * config/arc/arc.c (arc_mode_dependent_address_p): Relax
33780         conditions to take advantage of various optimizations.
33781
33782 2017-04-13  Jeff Law  <law@redhat.com>
33783
33784         * config/mips.mips.md (zero_extendsidi2): Do not allow SP to appear
33785         in operands[1] if it is a MEM and TARGET_MIPS16 is active.
33786         (zero_extendsidi2_dext): Likewise.
33787
33788 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
33789
33790         PR sanitizer/80403
33791         * fold-const.c (fold_ternary_loc): Revert
33792         use op0 instead of fold_convert_loc (loc, type, arg0) part of
33793         2017-04-12 change.
33794
33795 2017-04-13  Vladimir Makarov  <vmakarov@redhat.com>
33796
33797         PR rtl-optimization/80343
33798         * lra-remat.c (update_scratch_ops): Assign original hard reg to
33799         new scratch pseudo.
33800
33801 2017-04-13  Denis Khalikov <d.khalikov@partner.samsung.com>
33802
33803         PR sanitizer/80414
33804         * ubsan.c (ubsan_expand_bounds_ifn): Pass original index
33805         to ubsan_encode_value.
33806
33807 2017-04-13  Jeff Law  <law@redhat.com>
33808
33809         * reload1.c (eliminate_regs_1): Call gen_rtx_raw_SUBREG for SUBREGs
33810         appearing in DEBUG_INSNs.
33811
33812 2017-04-13  Martin Liska  <mliska@suse.cz>
33813
33814         PR gcov-profile/80413
33815         * gcov-io.c (gcov_write_string): Copy to buffer just when
33816         allocated size is greater than zero.
33817
33818 2017-04-13  Jakub Jelinek  <jakub@redhat.com>
33819
33820         PR debug/80321
33821         * dwarf2out.c (decls_for_scope): Ignore declarations of
33822         current_function_decl in BLOCK_NONLOCALIZED_VARS.
33823
33824 2017-04-12  Jan Hubicka  <hubicka@ucw.cz>
33825
33826         PR lto/69953
33827         * ipa-visibility.c (non_local_p): Fix typos.
33828         (localize_node): When localizing symbol in same comdat group,
33829         dissolve the group only when we know external symbols are going
33830         to be privatized.
33831         (function_and_variable_visibility): Do not localize DECL_EXTERNAL.
33832
33833 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
33834
33835         PR tree-optimization/79390
33836         * optabs.c (emit_conditional_move): If the preferred op2/op3 operand
33837         order does not result in usable sequence, retry with reversed operand
33838         order.
33839
33840         PR sanitizer/80403
33841         PR sanitizer/80404
33842         PR sanitizer/80405
33843         * fold-const.c (fold_ternary_loc): Use op1 instead of arg1 as argument
33844         to fold_build2_loc.  Convert TREE_OPERAND (tem, 0) to type.  Use
33845         op0 instead of fold_convert_loc (loc, type, arg0).
33846
33847 2017-04-12  Jeff Law  <law@redhat.com>
33848
33849         * genattrtab.c (write_eligible_delay): Verify DELAY_INSN still
33850         has a delay slot in the generated code.
33851
33852         * config/cris/cris.md (cris_preferred_reload_class): Return
33853         GENNONACR_REGS rather than GENERAL_REGS.
33854
33855 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
33856
33857         PR c/80163
33858         * expr.c <CASE_CONVERT>: For EXPAND_INITIALIZER determine SIGN_EXTEND
33859         vs. ZERO_EXTEND based on signedness of treeop0's type rather than
33860         signedness of the result type.
33861
33862 2017-04-12  Richard Biener  <rguenther@suse.de>
33863             Jeff Law  <law@redhat.com>
33864
33865         PR tree-optimization/80359
33866         * tree-ssa-dse.c (maybe_trim_partially_dead_store): Do not
33867         trim stores to TARGET_MEM_REFs.
33868
33869 2017-04-12  Richard Biener  <rguenther@suse.de>
33870
33871         PR tree-optimization/79390
33872         * gimple-ssa-split-paths.c (is_feasible_trace): Restrict
33873         threading case even more.
33874
33875 2017-04-12  Segher Boessenkool  <segher@kernel.crashing.org>
33876
33877         PR target/80382
33878         * config/rs6000/sync.md (atomic_load<mode>, atomic_store<mode): Test
33879         for quad_address_p for TImode, instead of just not indexed_address.
33880
33881 2017-04-12  Richard Biener  <rguenther@suse.de>
33882             Bernd Edlinger  <bernd.edlinger@hotmail.de>
33883
33884         PR middle-end/79671
33885         * alias.c (component_uses_parent_alias_set_from): Handle
33886         TYPE_TYPELESS_STORAGE.
33887         (get_alias_set): Likewise.
33888         * tree-core.h (tree_type_common): Add typeless_storage flag.
33889         * tree.h (TYPE_TYPELESS_STORAGE): New macro.
33890         * stor-layout.c (place_union_field): Set TYPE_TYPELESS_STORAGE
33891         for types containing members with TYPE_TYPELESS_STORAGE.
33892         (place_field): Likewise.
33893         (layout_type): Likewise for ARRAY_TYPE.
33894         * lto-streamer-out.c (hash_tree): Hash TYPE_TYPELESS_STORAGE.
33895         * tree-streamer-in.c (unpack_ts_type_common_value_fields): Stream
33896         TYPE_TYPELESS_STORAGE.
33897         * tree-streamer-out.c (pack_ts_type_common_value_fields): Likewise.
33898
33899 2017-04-12  Jakub Jelinek  <jakub@redhat.com>
33900
33901         PR sanitizer/80349
33902         * fold-const.c (fold_binary_loc) <case BIT_IOR_EXPR>: Convert arg0's
33903         first argument to type.
33904
33905 2017-04-11  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
33906
33907         PR target/80376
33908         PR target/80315
33909         * config/rs6000/rs6000.c (rs6000_expand_unop_builtin): Return
33910         CONST0_RTX (mode) rather than const0_rtx where appropriate.
33911         (rs6000_expand_binop_builtin): Likewise.
33912         (rs6000_expand_ternop_builtin): Likewise; also add missing
33913         vsx_xxpermdi_* variants; also fix typo (arg1 => arg2) for
33914         vshasigma built-ins.
33915         * doc/extend.texi: Document that vec_xxpermdi's third argument
33916         must be a constant.
33917
33918 2017-04-11  Uros Bizjak  <ubizjak@gmail.com>
33919
33920         * config/i386/i386.c (dimode_scalar_chain::compute_convert_gain):
33921         Use shift_const cost parameter when calculating gain of STV shifts.
33922
33923 2017-04-11  Vladimir Makarov  <vmakarov@redhat.com>
33924
33925         PR rtl-optimization/70478
33926         * lra-constraints.c (process_alt_operands): Check memory for
33927         disfavoring memory insn operand.
33928
33929 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
33930
33931         PR middle-end/80100
33932         * simplify-rtx.c (simplify_binary_operation_1) <case IOR>: Perform
33933         left shift in unsigned HOST_WIDE_INT type.
33934
33935         PR rtl-optimization/80385
33936         * simplify-rtx.c (simplify_unary_operation_1): Don't transform
33937         (not (neg X)) into (plus X -1) for complex or non-integral modes.
33938
33939         PR libgomp/80394
33940         * omp-low.c (scan_omp_task): Don't optimize away empty tasks
33941         if they have any depend clauses.
33942
33943 2017-04-11  Martin Liska  <mliska@suse.cz>
33944
33945         PR ipa/80212
33946         * cgraph.c (cgraph_node::dump): Dump calls_comdat_local.
33947         * ipa-split.c (split_function): Create a local comdat symbol
33948         if caller is in a comdat group.
33949
33950 2017-04-11  Martin Liska  <mliska@suse.cz>
33951
33952         PR ipa/80212
33953         * ipa-cp.c (determine_versionability): Handle calls_comdat_local
33954         flags.
33955
33956 2017-04-11  Martin Sebor  <msebor@redhat.com>
33957
33958         PR middle-end/80364
33959         * gimple-ssa-sprintf.c (get_int_range): Remove second argument and
33960         always use the int type.  Use INTEGRAL_TYPE_P() rather than testing
33961         for INTEGER_TYPE.
33962         (directive::set_width, directive::set_precision, format_character):
33963         Adjust.
33964         (parse_directive): Use INTEGRAL_TYPE_P() rather than testing for
33965         INTEGER_TYPE.
33966
33967 2017-04-11  Richard Earnshaw  <rearnsha@arm.com>
33968
33969         PR target/80389
33970         * config/arm/arm.c (arm_configure_build_target): When -mcpu and -arch
33971         conflict, set target->arch_name instead of target->cpu_name.
33972
33973 2017-04-11  Richard Biener  <rguenther@suse.de>
33974
33975         PR tree-optimization/80374
33976         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Use
33977         build_zero_cst, remove fold_convertible_p check again.
33978
33979 2017-04-11  Martin Liska  <mliska@suse.cz>
33980
33981         PR sanitizer/70878
33982         * ubsan.c (instrument_object_size): Do not instrument register
33983         variables.
33984
33985 2017-04-11  Jakub Jelinek  <jakub@redhat.com>
33986
33987         PR target/80381
33988         * config/i386/i386-builtin-types.def
33989         (V16HI_FTYPE_V16HI_INT_V16HI_UHI_COUNT,
33990         V16HI_FTYPE_V16HI_V8HI_V16HI_UHI_COUNT,
33991         V16SI_FTYPE_V16SI_INT_V16SI_UHI_COUNT,
33992         V16SI_FTYPE_V16SI_V4SI_V16SI_UHI_COUNT,
33993         V2DI_FTYPE_V2DI_INT_V2DI_UQI_COUNT,
33994         V2DI_FTYPE_V2DI_V2DI_V2DI_UQI_COUNT,
33995         V32HI_FTYPE_V32HI_INT_V32HI_USI_COUNT,
33996         V32HI_FTYPE_V32HI_V8HI_V32HI_USI_COUNT,
33997         V4DI_FTYPE_V4DI_INT_V4DI_UQI_COUNT,
33998         V4DI_FTYPE_V4DI_V2DI_V4DI_UQI_COUNT,
33999         V4SI_FTYPE_V4SI_INT_V4SI_UQI_COUNT,
34000         V4SI_FTYPE_V4SI_V4SI_V4SI_UQI_COUNT,
34001         V8DI_FTYPE_V8DI_INT_V8DI_UQI_COUNT,
34002         V8DI_FTYPE_V8DI_V2DI_V8DI_UQI_COUNT,
34003         V8HI_FTYPE_V8HI_INT_V8HI_UQI_COUNT,
34004         V8HI_FTYPE_V8HI_V8HI_V8HI_UQI_COUNT,
34005         V8SI_FTYPE_V8SI_INT_V8SI_UQI_COUNT,
34006         V8SI_FTYPE_V8SI_V4SI_V8SI_UQI_COUNT): New function type aliases.
34007         * config/i386/i386-builtin.def (__builtin_ia32_pslld512_mask,
34008         __builtin_ia32_pslldi512_mask, __builtin_ia32_psllq512_mask,
34009         __builtin_ia32_psllqi512_mask, __builtin_ia32_psrad512_mask,
34010         __builtin_ia32_psradi512_mask, __builtin_ia32_psraq512_mask,
34011         __builtin_ia32_psraqi512_mask, __builtin_ia32_psrld512_mask,
34012         __builtin_ia32_psrldi512_mask, __builtin_ia32_psrlq512_mask,
34013         __builtin_ia32_psrlqi512_mask, __builtin_ia32_psllwi128_mask,
34014         __builtin_ia32_pslldi128_mask, __builtin_ia32_psllqi128_mask,
34015         __builtin_ia32_psllw128_mask, __builtin_ia32_pslld128_mask,
34016         __builtin_ia32_psllq128_mask, __builtin_ia32_psllwi256_mask,
34017         __builtin_ia32_psllw256_mask, __builtin_ia32_pslldi256_mask,
34018         __builtin_ia32_pslld256_mask, __builtin_ia32_psllqi256_mask,
34019         __builtin_ia32_psllq256_mask, __builtin_ia32_psradi128_mask,
34020         __builtin_ia32_psrad128_mask, __builtin_ia32_psradi256_mask,
34021         __builtin_ia32_psrad256_mask, __builtin_ia32_psraqi128_mask,
34022         __builtin_ia32_psraq128_mask, __builtin_ia32_psraqi256_mask,
34023         __builtin_ia32_psraq256_mask, __builtin_ia32_psrldi128_mask,
34024         __builtin_ia32_psrld128_mask, __builtin_ia32_psrldi256_mask,
34025         __builtin_ia32_psrld256_mask, __builtin_ia32_psrlqi128_mask,
34026         __builtin_ia32_psrlq128_mask, __builtin_ia32_psrlqi256_mask,
34027         __builtin_ia32_psrlq256_mask, __builtin_ia32_psrawi256_mask,
34028         __builtin_ia32_psraw256_mask, __builtin_ia32_psrawi128_mask,
34029         __builtin_ia32_psraw128_mask, __builtin_ia32_psrlwi256_mask,
34030         __builtin_ia32_psrlw256_mask, __builtin_ia32_psrlwi128_mask,
34031         __builtin_ia32_psrlw128_mask, __builtin_ia32_psllwi512_mask,
34032         __builtin_ia32_psllw512_mask, __builtin_ia32_psrawi512_mask,
34033         __builtin_ia32_psraw512_mask, __builtin_ia32_psrlwi512_mask,
34034         __builtin_ia32_psrlw512_mask): Use _COUNT suffixed function type
34035         aliases.
34036         * config/i386/i386.c (ix86_expand_args_builtin): Rename last_arg_count
34037         flag to second_arg_count, handle 4 argument function type _COUNT
34038         aliases, handle second_arg_count on second argument rather than last.
34039
34040 2017-04-10  Jeff Law  <law@redhat.com>
34041
34042         PR tree-optimization/80374
34043         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Do not try to
34044         record anything if we can not convert integer_zero_node to the
34045         desired type.
34046
34047 2017-04-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
34048
34049         PR target/80108
34050         * config/rs6000/rs6000.c (rs6000_option_override_internal):
34051         Enhance special handling given to the TARGET_P9_MINMAX option in
34052         relation to certain other options.
34053
34054 2017-04-10  Bin Cheng  <bin.cheng@arm.com>
34055
34056         PR tree-optimization/80153
34057         * tree-ssa-loop-ivopts.c (add_iv_candidate_for_use): Check and
34058         remove POINTER_PLUS_EXPR's base part directly, rather than through
34059         aff_tree.
34060
34061 2017-04-10  Richard Biener  <rguenther@suse.de>
34062             Bin Cheng  <bin.cheng@arm.com>
34063
34064         PR tree-optimization/80153
34065         * tree-affine.c (aff_combination_to_tree): Get base pointer from
34066         the first element of pointer type aff_tree.  Build result expr in
34067         aff_tree's type.
34068         (add_elt_to_tree): Convert to type unconditionally.  Remove other
34069         fold_convert calls.
34070         * tree-ssa-loop-ivopts.c (alloc_iv): Pass in consistent types.
34071         (rewrite_use_nonlinear_expr): Check invariant using iv information.
34072
34073 2017-04-10  Richard Biener  <rguenther@suse.de>
34074
34075         * tree-ssa-structalias.c (find_func_aliases): Properly handle
34076         asm inputs.
34077
34078 2017-04-10  Vladimir Makarov  <vmakarov@redhat.com>
34079
34080         PR rtl-optimization/70478
34081         * lra-constraints.c (curr_small_class_check): New.
34082         (update_and_check_small_class_inputs): New.
34083         (process_alt_operands): Update curr_small_class_check.  Disfavor
34084         alternative insn memory operands.  Check available regs for small
34085         class operands.
34086
34087 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
34088
34089         PR target/80057
34090         * config/mips/mips.opt (-mvirt): Update description.
34091         * doc/invoke.texi (-mvirt): Likewise.
34092
34093 2017-04-10  Richard Biener  <rguenther@suse.de>
34094
34095         PR middle-end/80362
34096         * fold-const.c (fold_binary_loc): Look at unstripped ops when
34097         looking for NEGATE_EXPR in -A / -B to A / B folding.
34098
34099 2017-04-10  Martin Liska  <mliska@suse.cz>
34100
34101         PR gcov-profile/80224
34102         * gcov.c (print_usage): Fix usage string.
34103         (get_gcov_intermediate_filename): Remove.
34104         (output_gcov_file): Use both for normal and intermediate format.
34105         (generate_results): Do not initialize special file for
34106         intermediate format.
34107
34108 2017-04-10  Richard Biener  <rguenther@suse.de>
34109
34110         PR tree-optimization/80304
34111         * tree-ssa-loop-im.c (ref_indep_loop_p_1): Also recurse
34112         for safelen.
34113
34114 2017-04-10  Nathan Sidwell  <nathan@acm.org>
34115
34116         PR target/79905
34117         * config/rs6000/rs6000.c (rs6000_vector_type): New.
34118         (rs6000_init_builtins): Use it.
34119
34120 2016-04-10  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
34121
34122         * config/arm/arm.md (<mrc>): Add mode to SET source.
34123         (<mrrc>): Likewise.
34124
34125 2017-04-10  Richard Biener  <rguenther@suse.de>
34126
34127         PR middle-end/80344
34128         * gimplify.c (is_gimple_mem_rhs_or_call): Allow CLOBBERs.
34129
34130 2017-04-10  Jakub Jelinek  <jakub@redhat.com>
34131
34132         PR target/80324
34133         * config/i386/avx512fintrin.h (_mm512_reduce_add_epi32,
34134         _mm512_reduce_mul_epi32, _mm512_reduce_and_epi32,
34135         _mm512_reduce_or_epi32, _mm512_mask_reduce_add_epi32,
34136         _mm512_mask_reduce_mul_epi32, _mm512_mask_reduce_and_epi32,
34137         _mm512_mask_reduce_or_epi32, _mm512_reduce_min_epi32,
34138         _mm512_reduce_max_epi32, _mm512_reduce_min_epu32,
34139         _mm512_reduce_max_epu32, _mm512_mask_reduce_min_epi32,
34140         _mm512_mask_reduce_max_epi32, _mm512_mask_reduce_min_epu32,
34141         _mm512_mask_reduce_max_epu32, _mm512_reduce_add_ps,
34142         _mm512_reduce_mul_ps, _mm512_mask_reduce_add_ps,
34143         _mm512_mask_reduce_mul_ps, _mm512_reduce_min_ps, _mm512_reduce_max_ps,
34144         _mm512_mask_reduce_min_ps, _mm512_mask_reduce_max_ps,
34145         _mm512_reduce_add_epi64, _mm512_reduce_mul_epi64,
34146         _mm512_reduce_and_epi64, _mm512_reduce_or_epi64,
34147         _mm512_mask_reduce_add_epi64, _mm512_mask_reduce_mul_epi64,
34148         _mm512_mask_reduce_and_epi64, _mm512_mask_reduce_or_epi64,
34149         _mm512_reduce_min_epi64, _mm512_reduce_max_epi64,
34150         _mm512_mask_reduce_min_epi64, _mm512_mask_reduce_max_epi64,
34151         _mm512_reduce_min_epu64, _mm512_reduce_max_epu64,
34152         _mm512_mask_reduce_min_epu64, _mm512_mask_reduce_max_epu64,
34153         _mm512_reduce_add_pd, _mm512_reduce_mul_pd, _mm512_mask_reduce_add_pd,
34154         _mm512_mask_reduce_mul_pd, _mm512_reduce_min_pd, _mm512_reduce_max_pd,
34155         _mm512_mask_reduce_min_pd, _mm512_mask_reduce_max_pd): New intrinsics.
34156
34157 2017-04-08  Vladimir Makarov  <vmakarov@redhat.com>
34158
34159         PR rtl-optimization/70478
34160         * lra-constraints.c: Reverse the last patch.
34161
34162 2017-04-08  Andreas Tobler  <andreast@gcc.gnu.org>
34163
34164         * config/aarch64/aarch64-freebsd.h: Define MCOUNT_NAME.
34165         Add comment for WCHAR_T.
34166
34167 2017-04-08  Martin Liska  <mliska@suse.cz>
34168
34169         Revert:
34170         2017-04-07  Martin Liska  <mliska@suse.cz>
34171
34172         PR ipa/80212
34173         * ipa-split.c (split_function): Add function part to a same comdat
34174         group.
34175
34176 2017-04-08  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
34177
34178         PR target/80358
34179         * config/rs6000/rs6000.c (expand_block_compare): Fix boundary check.
34180
34181 2017-04-07  Pat Haugen  <pthaugen@us.ibm.com>
34182
34183         * rs6000/rs6000.c (vec_load_pendulum): Rename...
34184         (vec_pairing): ...to this.
34185         (power9_sched_reorder2): Rewrite code for pairing vector/vecload insns.
34186         (rs6000_sched_init): Adjust for name change.
34187         (struct rs6000_sched_context): Likewise.
34188         (rs6000_init_sched_context): Likewise.
34189         (rs6000_set_sched_context): Likewise.
34190
34191 2017-04-07  Jakub Jelinek  <jakub@redhat.com>
34192
34193         PR target/80322
34194         PR target/80323
34195         PR target/80325
34196         PR target/80326
34197         * config/i386/avxintrin.h (_mm256_cvtsd_f64, _mm256_cvtss_f32): New
34198         intrinsics.
34199         * config/i386/avx512fintrin.h (_mm512_int2mask, _mm512_mask2int,
34200         _mm512_abs_ps, _mm512_mask_abs_ps, _mm512_abs_pd, _mm512_mask_abs_pd,
34201         _mm512_cvtsd_f64, _mm512_cvtss_f32): Likewise.
34202
34203 2017-04-07  Andreas Tobler  <andreast@gcc.gnu.org>
34204
34205         * config/aarch64/aarch64-freebsd.h: Define WCHAR_TYPE.
34206
34207 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
34208
34209         PR rtl-optimization/70703
34210         * ira-color.c (update_conflict_hard_regno_costs): Use
34211         int64_t instead of HOST_WIDE_INT.
34212
34213 2017-04-07  Vladimir Makarov  <vmakarov@redhat.com>
34214
34215         PR rtl-optimization/70478
34216         * lra-constraints.c (process_alt_operands): Disfavor alternative
34217         insn memory operands.
34218
34219 2017-04-07  Jeff Law  <law@redhat.com>
34220
34221         * config/iq2000/iq2000.c (final_prescan_insn): Do not separate a
34222         CALL and NOTE_INSN_CALL_ARG_LOCATION.
34223
34224 2017-04-07  Martin Liska  <mliska@suse.cz>
34225
34226         PR target/79889
34227         * config/aarch64/aarch64.c (aarch64_process_target_attr):
34228         Show error message instead of an ICE.
34229
34230 2017-04-07  Martin Liska  <mliska@suse.cz>
34231
34232         PR ipa/80212
34233         * ipa-split.c (split_function): Add function part to a same comdat
34234         group.
34235
34236 2017-04-07  Richard Biener  <rguenther@suse.de>
34237
34238         PR middle-end/80341
34239         * tree.c (get_unwidened): Also handle ! for_type case for
34240         INTEGER_CSTs.
34241         * convert.c (do_narrow): Split out from ...
34242         (convert_to_integer_1): ... here.  Do not pass final truncation
34243         type to get_unwidened for TRUNC_DIV_EXPR.
34244
34245 2017-04-07  Richard Biener  <rguenther@suse.de>
34246
34247         * tree-affine.c (wide_int_ext_for_comb): Take type rather
34248         than aff_tree.
34249         (aff_combination_const): Adjust.
34250         (aff_combination_scale): Likewise.
34251         (aff_combination_add_elt): Likewise.
34252         (aff_combination_add_cst): Likewise.
34253         (aff_combination_convert): Likewise.
34254         (add_elt_to_tree): Likewise.  Remove unused argument.
34255         (aff_combination_to_tree): Adjust calls to add_elt_to_tree.
34256
34257 2017-04-07  Sebastian Huber  <sebastian.huber@embedded-brains.de>
34258
34259         * config/arm/arm.h (ARM_DEFAULT_SHORT_ENUMS): Provide default
34260         definition.
34261         * config/arm/arm.c (arm_default_short_enums): Use
34262         ARM_DEFAULT_SHORT_ENUMS.
34263         * config/arm/rtems.h (ARM_DEFAULT_SHORT_ENUMS): Define.
34264
34265 2017-04-06  Jakub Jelinek  <jakub@redhat.com>
34266
34267         PR debug/80234
34268         * dwarf2out.c (gen_member_die): Handle C++17 inline static data
34269         members with redundant out-of-class redeclaration.
34270
34271 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
34272
34273         PR target/80286
34274         * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): New pattern.
34275         * config/i386/i386.md (*zero_extendsidi2):
34276         Add (?*x,*x) and (?*v,*v) alternatives.
34277
34278 2017-04-06  Uros Bizjak  <ubizjak@gmail.com>
34279
34280         PR target/79733
34281         * config/i386/i386.c (ix86_expand_builtin)
34282         <case IX86_BUILTIN_K{,OR}TEST{C,Z}{8,16,32,64}>: Determine insn operand
34283         mode from insn data. Convert operands to insn operand mode.
34284         Copy operands that don't satisfy insn predicate to a register.
34285
34286 2017-04-06  Sam Thursfield  <sam.thursfield@codethink.co.uk>
34287
34288         * config/rs6000/x-aix: Increase memory limit for genautomata on AIX.
34289         Update comments.
34290
34291 2017-04-06  Richard Biener  <rguenther@suse.de>
34292
34293         PR tree-optimization/80334
34294         * tree-ssa-loop-ivopts.c (rewrite_use_address): Properly
34295         preserve alignment of accesses.
34296
34297 2017-04-06  Richard Biener  <rguenther@suse.de>
34298
34299         PR tree-optimization/80262
34300         * tree-sra.c (build_ref_for_offset): Preserve address-space
34301         information.
34302         * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address):
34303         Drop useless address-space information on MEM_REF offsets.
34304
34305 2017-04-05  Andreas Schwab  <schwab@linux-m68k.org>
34306
34307         * builtins.def (BUILT_IN_UPDATE_SETJMP_BUF): Fix type.
34308
34309 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
34310
34311         PR rtl-optimization/70703
34312         * ira-color.c (update_conflict_hard_regno_costs): Use
34313         HOST_WIDE_INT instead of long.
34314
34315 2017-04-05  Uros Bizjak  <ubizjak@gmail.com>
34316
34317         PR target/80298
34318         * config/i386/mmintrin.h: Add -msse target option when __SSE__ is
34319         not defined for x86_64 target.  Add -mmmx target option when __SSE2__
34320         is not defined.
34321         * config/i386/mm3dnow.h: Add -msse target when __SSE__ is not defined
34322         for x86_64 target.  Handle -m3dnowa option.
34323
34324 2017-04-05  Vladimir Makarov  <vmakarov@redhat.com>
34325
34326         PR rtl-optimization/70703
34327         * ira-color.c (update_costs_from_allocno): Use the smallest mode.
34328         (update_conflict_hard_regno_costs): Use long instead of unsigned
34329         arithmetic for cost calculation.
34330
34331 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
34332             Bernd Edlinger  <bernd.edlinger@hotmail.de>
34333
34334         PR sanitizer/80308
34335         * asan.c (asan_store_shadow_bytes): Fix location of last_chunk_value
34336         for big endian.
34337
34338 2017-04-05  Eric Botcazou  <ebotcazou@adacore.com>
34339
34340         PR target/78002
34341         * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Replace
34342         ptr_mode with Pmode throughout.
34343         * config/aarch64/aarch64.md (probe_stack_range_<PTR:mode): Rename
34344         into probe_stack_range and use DImode.
34345
34346 2017-04-05  Dominik Vogt  <vogt@linux.vnet.ibm.com>
34347
34348         PR target/79890
34349         * config/s390/s390.c (s390_register_info_gprtofpr): Return if
34350         call_eh_return is true.
34351
34352 2017-04-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34353
34354         * config/s390/s390-c.c (s390_resolve_overloaded_builtin):
34355         Initialize last_match_fntype_index.
34356
34357 2017-04-05  Jakub Jelinek  <jakub@redhat.com>
34358
34359         PR target/80310
34360         * tree-nvr.c: Include internal-fn.h.
34361         (pass_return_slot::execute): Ignore internal calls without
34362         direct optab.
34363
34364 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
34365             Richard Biener  <rguenther@suse.de>
34366
34367         PR c++/80297
34368         * genmatch.c (capture::gen_transform): For GENERIC unshare_expr
34369         captures used multiple times, except for the last use.
34370         * generic-match-head.c: Include gimplify.h.
34371
34372 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
34373
34374         PR tree-optimization/79390
34375         * target.h (struct noce_if_info): Declare.
34376         * targhooks.h (default_noce_conversion_profitable_p): Declare.
34377         * target.def (noce_conversion_profitable_p): New target hook.
34378         * ifcvt.h (struct noce_if_info): New type, moved from ...
34379         * ifcvt.c (struct noce_if_info): ... here.
34380         (noce_conversion_profitable_p): Renamed to ...
34381         (default_noce_conversion_profitable_p): ... this.  No longer
34382         static nor inline.
34383         (noce_try_store_flag_constants, noce_try_addcc,
34384         noce_try_store_flag_mask, noce_try_cmove, noce_try_cmove_arith,
34385         noce_convert_multiple_sets): Use targetm.noce_conversion_profitable_p
34386         instead of noce_conversion_profitable_p.
34387         * config/i386/i386.c: Include ifcvt.h.
34388         (ix86_option_override_internal): Don't override
34389         PARAM_MAX_RTL_IF_CONVERSION_INSNS default.
34390         (ix86_noce_conversion_profitable_p): New function.
34391         (TARGET_NOCE_CONVERSION_PROFITABLE_P): Redefine.
34392         * config/i386/x86-tune.def (X86_TUNE_ONE_IF_CONV_INSN): Adjust comment.
34393         * doc/tm.texi.in (TARGET_NOCE_CONVERSION_PROFITABLE_P): Add.
34394         * doc/tm.texi: Regenerated.
34395
34396 2017-04-04  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34397
34398         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Grammar
34399         correction.
34400
34401 2017-04-04  Thomas Preud'homme  <thomas.preudhomme@arm.com>
34402
34403         PR target/80307
34404         * config/arm/arm.c (thumb1_rtx_costs): Give a cost of 32
34405         instructions for small multiply cores.
34406
34407 2017-04-04  Jeff Law  <law@redhat.com>
34408
34409         * config/mips/mips.c (mips_multi_add): Zero initialize the newly
34410         added member.
34411         (mips_expand_vec_perm_const): Initialize elements in orig_perm
34412         that are not set by the loop over the elements.
34413
34414 2017-04-04  Jakub Jelinek  <jakub@redhat.com>
34415
34416         PR target/80286
34417         * config/i386/i386.c (ix86_expand_args_builtin): If op has scalar
34418         int mode, convert_modes it to mode as unsigned, otherwise use
34419         lowpart_subreg to mode rather than SImode.
34420         * config/i386/sse.md (<mask_codefor>ashr<mode>3<mask_name>,
34421         ashr<mode>3, ashr<mode>3<mask_name>, <shift_insn><mode>3<mask_name>):
34422         Use DImode instead of SImode for the shift count operand.
34423         * config/i386/mmx.md (mmx_ashr<mode>3, mmx_<shift_insn><mode>3):
34424         Likewise.
34425
34426 2017-04-04  Richard Biener  <rguenther@suse.de>
34427
34428         PR middle-end/80281
34429         * match.pd (A + (-B) -> A - B): Make sure to preserve unsigned
34430         arithmetic done for the negate or the plus.  Simplify.
34431         (A - (-B) -> A + B): Likewise.
34432         * fold-const.c (split_tree): Make sure to not negate pointers.
34433
34434 2017-04-04  Segher Boessenkool  <segher@kernel.crashing.org>
34435
34436         PR rtl-optimization/60818
34437         * simplify-rtx.c (simplify_binary_operation_1): Do not replace
34438         a compare of comparisons with the thing compared if this results
34439         in a different machine mode.
34440
34441 2017-04-03  Jonathan Wakely  <jwakely@redhat.com>
34442
34443         * alias.c (base_alias_check): Fix typo in comment.
34444         * cgraph.h (class ipa_polymorphic_call_context): Likewise.
34445         * cgraphunit.c (symbol_table::compile): Likewise.
34446         * collect2.c (maybe_run_lto_and_relink): Likewise.
34447         * config/arm/arm.c (arm_thumb1_mi_thunk): Likewise.
34448         * config/avr/avr-arch.h (avr_arch_info_t): Likewise.
34449         * config/avr/avr.c (avr_map_op_t): Likewise.
34450         * config/cr16/cr16.h (DATA_ALIGNMENT): Likewise.
34451         * config/epiphany/epiphany.c (TARGET_ARG_PARTIAL_BYTES): Likewise.
34452         * config/epiphany/epiphany.md (movcc): Likewise.
34453         * config/i386/i386.c (legitimize_pe_coff_extern_decl): Likewise.
34454         * config/m68k/m68k.c (struct _sched_ib, m68k_sched_variable_issue):
34455         Likewise.
34456         * config/mips/mips.c (mips_save_restore_reg): Likewise.
34457         * config/rx/rx.c (rx_is_restricted_memory_address): Likewise.
34458         * config/s390/s390.c (Z10_EARLYLOAD_DISTANCE): Likewise.
34459         * config/sh/sh.c (sh_rtx_costs): Likewise.
34460         * fold-const.c (fold_truth_andor): Likewise.
34461         * genautomata.c (collapse_flag): Likewise.
34462         * gengtype.h (struct type::u::s): Likewise.
34463         * gensupport.c (has_subst_attribute, add_mnemonic_string): Likewise.
34464         * input.c (FORMAT_AMOUNT): Likewise.
34465         * ipa-cp.c (class ipcp_lattice, agg_replacements_to_vector)
34466         (known_aggs_to_agg_replacement_list): Likewise.
34467         * ipa-inline-analysis.c: Likewise.
34468         * ipa-inline.h (estimate_edge_time, estimate_edge_hints): Likewise.
34469         * ipa-polymorphic-call.c
34470         (ipa_polymorphic_call_context::restrict_to_inner_class): Likewise.
34471         * loop-unroll.c (analyze_insn_to_expand_var): Likewise.
34472         * lra.c (lra_optional_reload_pseudos, lra_subreg_reload_pseudos):
34473         Likewise.
34474         * modulo-sched.c (apply_reg_moves): Likewise.
34475         * omp-expand.c (build_omp_regions_1): Likewise.
34476         * trans-mem.c (struct tm_wrapper_hasher): Likewise.
34477         * tree-ssa-loop-ivopts.c (may_eliminate_iv): Likewise.
34478         * tree-ssa-loop-niter.c (maybe_lower_iteration_bound): Likewise.
34479         * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
34480         * value-prof.c: Likewise.
34481         * var-tracking.c (val_reset): Likewise.
34482
34483 2017-04-03  Richard Biener  <rguenther@suse.de>
34484
34485         PR tree-optimization/80275
34486         * fold-const.c (split_address_to_core_and_offset): Handle
34487         POINTER_PLUS_EXPR.
34488
34489 2017-04-03  Eric Botcazou  <ebotcazou@adacore.com>
34490
34491         * tree-nested.c (get_descriptor_type): Make sure that the alignment of
34492         descriptors is at least equal to that of functions.
34493
34494 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
34495
34496         * config/i386/sse.md (movdi_to_sse): Add missing DONE.
34497
34498 2017-04-02  Uros Bizjak  <ubizjak@gmail.com>
34499
34500         PR target/80250
34501         * config/i386/sse.md (mov<IMOD4:mode>): Remove insn pattern.
34502         (mov<IMOD4:mode>): New expander.
34503         (*mov<IMOD4:mode>_internal): New insn and split pattern.
34504
34505 2017-03-31  Segher Boessenkool  <segher@kernel.crashing.org>
34506
34507         PR rtl-optimization/79405
34508         * fwprop.c (propagations_left): New variable.
34509         (forward_propagate_into): Decrement it.
34510         (fwprop_init): Initialize it.
34511         (fw_prop): If the variable has reached zero, stop propagating.
34512         (fwprop_addr): Ditto.
34513
34514 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
34515
34516         PR debug/79255
34517         * dwarf2out.c (decls_for_scope): If BLOCK_NONLOCALIZED_VAR is
34518         a FUNCTION_DECL, pass it as decl instead of origin to
34519         process_scope_var.
34520
34521 2017-03-31  Alexander Monakov  <amonakov@ispras.ru>
34522
34523         * config/nvptx/nvptx.c (nvptx_output_softstack_switch): Correct format
34524         string.
34525
34526 2017-03-31  Pat Haugen  <pthaugen@us.ibm.com>
34527
34528         PR target/80107
34529         * config/rs6000/rs6000.md (extendhi<mode>2): Add test for
34530         TARGET_VSX_SMALL_INTEGER.
34531
34532 2017-03-31  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34533
34534         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Add
34535         reference to the OpenPOWER 64-Bit ELF V2 ABI Specification.
34536
34537 2017-03-31  Matthew Fortune  <matthew.fortune@imgtec.com>
34538
34539         * config/mips/mips-msa.md (msa_vec_extract_<msafmt_f>): Update
34540         extraction from odd-numbered MSA register.
34541
34542 2017-03-31  Jakub Jelinek  <jakub@redhat.com>
34543
34544         PR middle-end/80173
34545         * expmed.c (store_bit_field_1): Don't attempt to create
34546         a word subreg out of hard registers wider than word if they
34547         have HARD_REGNO_NREGS of 1 for their mode.
34548
34549         PR middle-end/80163
34550         * varasm.c (initializer_constant_valid_p_1): Disallow sign-extending
34551         conversions to integer types wider than word and pointer.
34552
34553         PR debug/80025
34554         * cselib.h (rtx_equal_for_cselib_1): Add depth argument.
34555         (rtx_equal_for_cselib_p): Pass 0 to it.
34556         * cselib.c (cselib_hasher::equal): Likewise.
34557         (rtx_equal_for_cselib_1): Add depth argument.  If depth
34558         is 128, don't look up VALUE locs and punt.  Increment
34559         depth in recursive calls when walking VALUE locs.
34560
34561 2017-03-31  Bernd Edlinger  <bernd.edlinger@hotmail.de>
34562
34563         * gcov.c (md5sum_to_hex): Fix output of MD5 hex bytes.
34564         (make_gcov_file_name): Use the canonical path name for generating
34565         the MD5 value.
34566         (read_line): Fix handling of files with ascii null bytes.
34567
34568 2017-03-30  Matthew Fortune  <matthew.fortune@imgtec.com>
34569
34570         * config/mips/mips.c (mips_expand_vector_init): Create a const_vector
34571         to initialise a vector register instead
34572         of using a const_int.
34573
34574 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
34575
34576         PR translation/80189
34577         * gimplify.c (omp_default_clause): Use %qs instead of %s in
34578         diagnostic messages.
34579
34580 2017-03-30  Peter Bergner  <bergner@vnet.ibm.com>
34581
34582         PR target/80246
34583         * config/rs6000/dfp.md (dfp_dxex_<mode>): Update mode of operand 0.
34584         (dfp_diex_<mode>): Update mode of operand 1.
34585         * doc/extend.texi (dxex, dxexq): Document change to return type.
34586         (diex, diexq): Document change to argument type.
34587
34588 2017-03-30  Martin Jambor  <mjambor@suse.cz>
34589
34590         PR ipa/77333
34591         * cgraph.h (cgraph_build_function_type_skip_args): Declare.
34592         * cgraph.c (redirect_call_stmt_to_callee): Set gimple fntype so that
34593         it reflects the signature changes performed at the callee side.
34594         * cgraphclones.c (build_function_type_skip_args): Make public, renamed
34595         to cgraph_build_function_type_skip_args.
34596         (build_function_decl_skip_args): Adjust call to the above function.
34597
34598 2017-03-30  Jakub Jelinek  <jakub@redhat.com>
34599
34600         PR target/80206
34601         * config/i386/sse.md
34602         (<extract_type>_vextract<shuffletype><extract_suf>_mask): Use
34603         register as dest whenever it is a MEM not rtx_equal_p to the
34604         corresponding dup operand, and when forcing into reg move the
34605         reg into the memory afterwards.
34606         (<extract_type_2>_vextract<shuffletype><extract_suf_2>_mask):
34607         Likewise.  Use <ssehalfvecmode> instead of <ssequartermode>
34608         for the force_reg mode.
34609         (avx512vl_vextractf128<mode>): Use register as dest either
34610         always when a MEM, or when it is a MEM not rtx_equal_p to the
34611         corresponding dup operand, or even not when it is a CONST_VECTOR
34612         depending on the mode and lo vs. hi.
34613         (avx512dq_vextract<shuffletype>64x2_1_maskm): Remove extraneous
34614         parens.
34615         (avx512f_vextract<shuffletype>32x4_1_maskm): Likewise.
34616         (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name>):
34617         Likewise.  Require that operands[2] is even.
34618         (<mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name>):
34619         Remove extraneous parens.  Require that operands[2] is a multiple
34620         of 4.
34621         (vec_extract_lo_<mode><mask_name>): Don't bother testing if
34622         operands[0] is a MEM if <mask_applied>, the predicates/constraints
34623         disallow memory then.
34624
34625 2017-03-30  Richard Biener  <rguenther@suse.de>
34626
34627         PR tree-optimization/77498
34628         * tree-ssa-pre.c (phi_translate_1): Do not allow simplifications
34629         to non-constants over backedges.
34630
34631 2017-03-29  Segher Boessenkool  <segher@kernel.crashing.org>
34632
34633         PR rtl-optimization/80233
34634         * combine.c (combine_instructions): Only take NONDEBUG_INSN_P insns
34635         as last_combined_insn.  Do not test for BARRIER_P separately.
34636
34637 2017-03-29  Andreas Schwab  <schwab@suse.de>
34638
34639         PR ada/80146
34640         * calls.c (prepare_call_address): Convert funexp to Pmode before
34641         copying to temp reg.
34642
34643 2017-03-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
34644
34645         PR tree-optimization/80158
34646         * gimple-ssa-strength-reduction.c (replace_mult_candidate):
34647         Handle possible future case of more than one alternate
34648         interpretation.
34649         (replace_rhs_if_not_dup): Likewise.
34650         (replace_one_candidate): Likewise.
34651
34652 2017-03-28  Vladimir Makarov  <vmakarov@redhat.com>
34653
34654         PR rtl-optimization/80193
34655         * ira.c (ira): Do not check allocation for LRA.
34656
34657 2017-03-28  Alexander Monakov  <amonakov@ispras.ru>
34658
34659         * config/nvptx/nvptx-protos.h (nvptx_output_simt_enter): Declare.
34660         (nvptx_output_simt_exit): Declare.
34661         * config/nvptx/nvptx.c (nvptx_init_unisimt_predicate): Use
34662         cfun->machine->unisimt_location.  Handle NULL unisimt_predicate.
34663         (init_softstack_frame): Move initialization of crtl->is_leaf to...
34664         (nvptx_declare_function_name): ...here.  Emit declaration of local
34665         memory space buffer for omp_simt_enter insn.
34666         (nvptx_output_unisimt_switch): New.
34667         (nvptx_output_softstack_switch): New.
34668         (nvptx_output_simt_enter): New.
34669         (nvptx_output_simt_exit): New.
34670         * config/nvptx/nvptx.h (struct machine_function): New fields
34671         has_simtreg, unisimt_location, simt_stack_size, simt_stack_align.
34672         * config/nvptx/nvptx.md (UNSPECV_SIMT_ENTER): New unspec.
34673         (UNSPECV_SIMT_EXIT): Ditto.
34674         (omp_simt_enter_insn): New insn.
34675         (omp_simt_enter): New expansion.
34676         (omp_simt_exit): New insn.
34677         * config/nvptx/nvptx.opt (msoft-stack-reserve-local): New option.
34678
34679         * internal-fn.c (expand_GOMP_SIMT_ENTER): New.
34680         (expand_GOMP_SIMT_ENTER_ALLOC): New.
34681         (expand_GOMP_SIMT_EXIT): New.
34682         * internal-fn.def (GOMP_SIMT_ENTER): New internal function.
34683         (GOMP_SIMT_ENTER_ALLOC): Ditto.
34684         (GOMP_SIMT_EXIT): Ditto.
34685         * target-insns.def (omp_simt_enter): New insn.
34686         (omp_simt_exit): Ditto.
34687         * omp-low.c (struct omplow_simd_context): New fields simt_eargs,
34688         simt_dlist.
34689         (lower_rec_simd_input_clauses): Implement SIMT privatization.
34690         (lower_rec_input_clauses): Likewise.
34691         (lower_lastprivate_clauses): Handle SIMT privatization.
34692
34693         * omp-offload.c: Include langhooks.h, tree-nested.h, stor-layout.h.
34694         (ompdevlow_adjust_simt_enter): New.
34695         (find_simtpriv_var_op): New.
34696         (execute_omp_device_lower): Handle IFN_GOMP_SIMT_ENTER,
34697         IFN_GOMP_SIMT_ENTER_ALLOC, IFN_GOMP_SIMT_EXIT.
34698
34699         * tree-inline.h (struct copy_body_data): New field dst_simt_vars.
34700         * tree-inline.c (expand_call_inline): Handle SIMT privatization.
34701         (copy_decl_for_dup_finish): Ditto.
34702
34703         * tree-ssa.c (execute_update_addresses_taken): Handle GOMP_SIMT_ENTER.
34704
34705 2017-03-28  Uros Bizjak  <ubizjak@gmail.com>
34706
34707         PR target/53383
34708         * config/i386/i386.c (ix86_option_override_internal): Always
34709         allow -mpreferred-stack-boundary=3 for 64-bit targets.
34710
34711 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
34712
34713         * tree-vect-loop.c (optimize_mask_stores): Add bb to the right loop.
34714
34715 2017-03-28  Bin Cheng  <bin.cheng@arm.com>
34716
34717         * tree-vect-loop-manip.c (slpeel_add_loop_guard): New param and
34718         mark new edge's irreducible flag accordign to it.
34719         (vect_do_peeling): Check loop preheader edge's irreducible flag
34720         and pass it to function slpeel_add_loop_guard.
34721
34722 2017-03-28  Richard Sandiford  <richard.sandiford@arm.com>
34723
34724         PR tree-optimization/80218
34725         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
34726         Update block frequencies and counts.
34727
34728 2017-03-28  Richard Biener  <rguenther@suse.de>
34729
34730         PR tree-optimization/78644
34731         * tree-ssa-ccp.c (evaluate_stmt): When we may not use the value
34732         of a simplification result we may not use it at all.
34733
34734 2017-03-28  Richard Biener  <rguenther@suse.de>
34735
34736         PR ipa/80205
34737         * tree-inline.c (copy_phis_for_bb): Do not create PHI node
34738         without arguments, generate default definition of a SSA name.
34739
34740 2017-03-28  Richard Biener  <rguenther@suse.de>
34741
34742         PR middle-end/80222
34743         * gimple-fold.c (gimple_fold_indirect_ref): Do not touch
34744         TYPE_REF_CAN_ALIAS_ALL references.
34745         * fold-const.c (fold_indirect_ref_1): Likewise.
34746
34747 2017-03-28  Martin Liska  <mliska@suse.cz>
34748
34749         PR ipa/80104
34750         * cgraphunit.c (cgraph_node::expand_thunk): Mark argument of a
34751         thunk call as DECL_GIMPLE_REG_P when vector or complex type.
34752
34753 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
34754             Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
34755
34756         * config/arc/arc.h (CPP_SPEC): Add subtarget_cpp_spec.
34757         (EXTRA_SPECS): Define.
34758         (SUBTARGET_EXTRA_SPECS): Likewise.
34759         (SUBTARGET_CPP_SPEC): Likewise.
34760         * config/arc/elf.h (EXTRA_SPECS): Renamed to
34761         SUBTARGET_EXTRA_SPECS.
34762         * config/arc/linux.h (SUBTARGET_CPP_SPEC): Define.
34763
34764 2017-03-28  Claudiu Zissulescu  <claziss@synopsys.com>
34765
34766         * config/arc/simdext.md (vst64_insn): Update pattern.
34767         (vld32wh_insn): Likewise.
34768         (vld32wl_insn): Likewise.
34769         (vld64_insn): Likewise.
34770         (vld32_insn): Likewise.
34771
34772 2017-03-28  Marek Polacek  <polacek@redhat.com>
34773
34774         PR sanitizer/80067
34775         * fold-const.c (fold_comparison): Use protected_set_expr_location
34776         instead of SET_EXPR_LOCATION.
34777
34778 2017-03-28  Markus Trippelsdorf  <markus@trippelsdorf.de>
34779
34780         * tree.c (add_expr): Avoid name lookup warning.
34781
34782 2017-03-27  Jeff Law  <law@redhat.com>
34783
34784         PR tree-optimization/80216
34785         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): Fix typo in
34786         function name.  Limit recursion depth.
34787         (record_temporary_equivalences): Corresponding changes.
34788
34789 2017-03-27  Jonathan Wakely  <jwakely@redhat.com>
34790
34791         * doc/invoke.texi (-Wno-narrowing): Reorder so default behavior is
34792         covered first.
34793
34794 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
34795
34796         PR target/80102
34797         * reg-notes.def (REG_CFA_NOTE): Define.  Use it for CFA related
34798         notes.
34799         * cfgcleanup.c (reg_note_cfa_p): New array.
34800         (insns_have_identical_cfa_notes): New function.
34801         (old_insns_match_p): Don't cross-jump in between /f
34802         and non-/f instructions.  If both i1 and i2 are frame related,
34803         verify all CFA notes, their order and content.
34804
34805 2017-03-27  Michael Meissner  <meissner@linux.vnet.ibm.com>
34806
34807         PR target/78543
34808         * config/rs6000/rs6000.md (bswaphi2_extenddi): Combine bswap
34809         HImode and SImode with zero extend to DImode to one insn.
34810         (bswap<mode>2_extenddi): Likewise.
34811         (bswapsi2_extenddi): Likewise.
34812         (bswaphi2_extendsi): Likewise.
34813         (bswaphi2): Combine bswap HImode and SImode into one insn.
34814         Separate memory insns from swapping register.
34815         (bswapsi2): Likewise.
34816         (bswap<mode>2): Likewise.
34817         (bswaphi2_internal): Delete, no longer used.
34818         (bswapsi2_internal): Likewise.
34819         (bswap<mode>2_load): Split bswap HImode/SImode into separate load,
34820         store, and gpr<-gpr swap insns.
34821         (bswap<mode>2_store): Likewise.
34822         (bswaphi2_reg): Register only splitter, combine with the splitter.
34823         (bswaphi2 splitter): Likewise.
34824         (bswapsi2_reg): Likewise.
34825         (bswapsi2 splitter): Likewise.
34826         (bswapdi2): If we have the LDBRX and STDBRX instructions, split
34827         the insns into load, store, and register/register insns.
34828         (bswapdi2_ldbrx): Likewise.
34829         (bswapdi2_load): Likewise.
34830         (bswapdi2_store): Likewise.
34831         (bswapdi2_reg): Likewise.
34832
34833 2017-03-27  Gunther Nikl  <gnikl@users.sourceforge.net>
34834
34835         * system.h (HAVE_DESIGNATED_INITIALIZERS): Fix non C++ case.
34836         (HAVE_DESIGNATED_UNION_INITIALIZERS): Likewise.
34837
34838 2017-03-27  Kelvin Nilsen  <kelvin@gcc.gnu.org>
34839
34840         PR target/80103
34841         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Edit and
34842         add comments.
34843         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
34844         special handling for target option conflicts between dform
34845         options (-mpower9-dform, -mpower9-dform-vector,
34846         -mpower9-dform-scalar) and -mno-direct-move.
34847
34848 2017-03-27  Richard Biener  <rguenther@suse.de>
34849
34850         PR tree-optimization/80181
34851         * tree-ssa-ccp.c (likely_value): UNDEFINED ^ X is UNDEFINED.
34852
34853 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
34854
34855         * config/arc/predicates.md (move_double_src_operand): Replace the
34856         call to move_double_src_operand with a call to address_operand.
34857
34858 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
34859
34860         * config/arc/elf.h (ARGET_ARC_TP_REGNO_DEFAULT): Define.
34861         * config/arc/linux.h (ARGET_ARC_TP_REGNO_DEFAULT): Likewise.
34862         * config/arc/arc.opt (mtp-regno): Use ARGET_ARC_TP_REGNO_DEFAULT.
34863
34864 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
34865
34866         * config/arc/predicates.md (long_immediate_loadstore_operand):
34867         Consider scaled addresses cases.
34868
34869 2017-03-27  Claudiu Zissulescu  <claziss@synopsys.com>
34870
34871         * config/arc/arc.c (arc_epilogue_uses): BLINK should be also
34872         restored when in interrupt.
34873         * config/arc/arc.md (simple_return): ARCv2 rtie instruction
34874         doesn't have delay slot.
34875
34876 2017-03-27  Richard Biener  <rguenther@suse.de>
34877
34878         PR ipa/79776
34879         * tree-ssa-structalias.c (associate_varinfo_to_alias): Skip
34880         inlined thunk clones.
34881
34882 2017-03-27  Jakub Jelinek  <jakub@redhat.com>
34883
34884         PR sanitizer/80168
34885         * asan.c (instrument_derefs): Copy over last operand from
34886         original COMPONENT_REF to the new COMPONENT_REF with
34887         DECL_BIT_FIELD_REPRESENTATIVE.
34888         * ubsan.c (instrument_object_size): Likewise.
34889
34890 2017-03-27  Richard Biener  <rguenther@suse.de>
34891
34892         PR tree-optimization/80170
34893         * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Make
34894         sure DR/SCEV didnt fold in constants we do not see when looking
34895         at the reference base alignment.
34896
34897 2017-03-27  Richard Biener  <rguenther@suse.de>
34898
34899         PR middle-end/80171
34900         * gimple-fold.c (fold_ctor_reference): Properly guard against
34901         NULL return value from canonicalize_constructor_val.
34902
34903 2017-03-25  Uros Bizjak  <ubizjak@gmail.com>
34904
34905         PR target/80180
34906         * config/i386/i386.c (ix86_expand_builtin)
34907         <IX86_BUILTIN_RDSEED{16,32,64}_STEP>: Do not expand arg0 between
34908         flags reg setting and flags reg using instructions.
34909         <IX86_BUILTIN_RDRAND{16,32,64}_STEP>: Ditto.  Use non-flags reg
34910         clobbering instructions to zero extend op2.
34911
34912 2017-03-25  Gerald Pfeifer  <gerald@pfeifer.com>
34913
34914         * doc/install.texi (Configuration) <--with-aix-soname>:
34915         Update link to AIX ld.
34916
34917 2017-03-25  Bernd Schmidt  <bschmidt@redhat.com>
34918
34919         PR rtl-optimization/80160
34920         PR rtl-optimization/80159
34921         * lra-assigns.c (must_not_spill_p): Tighten new test to also take
34922         reg_alternate_class into account.
34923
34924 2017-03-24  Vladimir Makarov  <vmakarov@redhat.com>
34925
34926         PR target/80148
34927         * lra-assigns.c (assign_by_spills): Add spilled non-reload pseudos
34928         to consider in curr_insn_transform.
34929
34930 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
34931
34932         * genrecog.c (validate_pattern): Add VEC_SELECT validation.
34933         * genmodes.c (emit_min_insn_modes_c): Call emit_mode_nunits
34934         and emit_mode_inner.
34935
34936 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34937
34938         * config/s390/s390-builtins.def: Add VXE builtins.  Add a flags
34939         argument to the overloaded builtin variants.  Use the new flag to
34940         deprecate certain builtin variants.
34941         * config/s390/s390-builtin-types.def: Add new builtin types.
34942         * config/s390/s390-builtins.h: Support new flags field for
34943         overloaded builtins.
34944         * config/s390/s390-c.c (OB_DEF_VAR): New flags field.
34945         (s390_macro_to_expand): Enable vector float data type.
34946         (s390_cpu_cpp_builtins_internal): Indicate support of the new
34947         builtins by incrementing the __VEC__ version number.
34948         (s390_expand_overloaded_builtin): Support expansion of vec_xl and
34949         vec_xst.
34950         (s390_resolve_overloaded_builtin): Emit error messages depending
34951         on the builtin flags.
34952         * config/s390/s390.c (s390_expand_builtin): Support additional
34953         flags argument.  Change error message to match the messages
34954         emitted in s390-c.c.
34955         * config/s390/s390.md: New UNSPEC_* constants.
34956         (op_type): Add new instruction types.
34957         * config/s390/vecintrin.h: Add new builtins and test data class
34958         constants.
34959         * config/s390/vx-builtins.md (V_HW_32_64): Add V4SF.
34960         (V_HW_4, VEC_HW, VECF_HW): New mode iterators.
34961         (VEC_INEXACT, VEC_NOINEXACT): New constants.
34962         ("vec_splats<mode>", "vec_insert<mode>", "vec_promote<mode>")
34963         ("vec_insert_and_zero<mode>", "vec_mergeh<mode>")
34964         ("vec_mergel<mode>"): V_HW -> VEC_HW.
34965
34966         ("vlrlrv16qi", "vstrlrv16qi", "vbpermv16qi", "vec_msumv2di")
34967         ("vmslg", "*vftci<mode>_cconly", "vftci<mode>_intcconly")
34968         ("*vftci<mode>", "vftci<mode>_intcc", "vec_double_s64")
34969         ("vec_double_u64", "vfmin<mode>", "vfmax<mode>"): New definition.
34970
34971         ("and_av2df3", "and_cv2df3", "vec_andc_av2df3")
34972         ("vec_andc_cv2df3", "xor_av2df3", "xor_cv2df3", "vec_nor_av2df3")
34973         ("vec_nor_cv2df3", "ior_av2df3", "ior_cv2df3", "vec_nabs")
34974         ("*vftcidb", "*vftcidb_cconly", "vftcidb"): Remove definition.
34975
34976         ("vec_all_<fpcmpcc:code>v2df", "vec_any_<fpcmpcc:code>v2df")
34977         ("vec_scatter_elementv4si_DI", "vec_cmp<fpcmp:code>v2df")
34978         ("vec_di_to_df_s64", "vec_di_to_df_u64", "vec_df_to_di_u64")
34979         ("vfidb", "*vldeb", "*vledb", "*vec_cmp<insn_cmp>v2df_cconly")
34980         ("vec_cmpeqv2df_cc", "vec_cmpeqv2df_cc", "vec_cmphv2df_cc")
34981         ("vec_cmphev2df_cc", "*vec_cmpeqv2df_cc")
34982         ("*vec_cmphv2df_cc", "*vec_cmphev2df_cc"): Enable new modes as ...
34983
34984         ("vec_all_<fpcmpcc:code><mode>", "vec_any_<fpcmpcc:code><mode>")
34985         ("vec_scatter_element<V_HW_4:mode>_DI")
34986         ("vec_cmp<fpcmp:code><mode>", "vcdgb", "vcdlgb", "vclgdb")
34987         ("vec_fpint<mode>", "vflls")
34988         ("vflrd", "*vec_cmp<insn_cmp><mode>_cconly", "vec_cmpeq<mode>_cc")
34989         ("vec_cmpeq<mode>_cc", "vec_cmph<mode>_cc", "vec_cmphe<mode>_cc")
34990         ("*vec_cmpeq<mode>_cc", "*vec_cmph<mode>_cc")
34991         ("*vec_cmphe<mode>_cc"): ... these.
34992
34993         ("vec_ctd_s64", "vec_ctsl", "vec_ctul", "vec_st2f"): Use rounding
34994         mode constant instead of magic value.
34995
34996 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
34997
34998         * config/s390/s390.c (s390_expand_vec_compare): Support other
34999         vector floating point modes than just V2DF.
35000         (s390_expand_vcond): Likewise.
35001         (s390_hard_regno_mode_ok): Allow SFmode values in VRs.
35002         (s390_cannot_change_mode_class): Prevent mode changes between TF
35003         and V1TF in vector registers.
35004         * config/s390/s390.md (DF, SF): New mode attributes.
35005         ("*cmp<mode>_ccs", "add<mode>3", "sub<mode>3", "mul<mode>3")
35006         ("fma<mode>4", "fms<mode>4", "div<mode>3", "*neg<mode>2"): Add
35007         SFmode support for VRs.
35008         * config/s390/vector.md (V_HW, V_HW2, VT_HW, ti*, nonvec): Add new
35009         vector fp modes.
35010         (VFT, VF_HW): New mode iterators.
35011         (vw, sdx): New mode attributes.
35012         ("addv2df3", "subv2df3", "mulv2df3", "divv2df3", "sqrtv2df2")
35013         ("fmav2df4","fmsv2df4", "negv2df2", "absv2df2", "*negabsv2df2")
35014         ("smaxv2df3", "sminv2df3", "*vec_cmp<VFCMP_HW_OP:code>v2df_nocc")
35015         ("vec_cmpuneqv2df", "vec_cmpltgtv2df", "vec_orderedv2df")
35016         ("vec_unorderedv2df"): Adjust the v2df only patterns to support
35017         also the new vector floating point modes.  Renaming to ...
35018
35019         ("add<mode>3", "sub<mode>3", "mul<mode>3", "div<mode>3")
35020         ("sqrt<mode>2", "fma<mode>4", "fms<mode>4", "neg<mode>2")
35021         ("abs<mode>2", "negabs<mode>2", "smax<mode>3")
35022         ("smin<mode>3", "*vec_cmp<VFCMP_HW_OP:code><mode>_nocc")
35023         ("vec_cmpuneq<mode>", "vec_cmpltgt<mode>", "vec_ordered<mode>")
35024         ("vec_unordered<mode>"): ... these.
35025
35026         ("neg_fma<mode>4", "neg_fms<mode>4", "*smax<mode>3_vxe")
35027         ("*smin<mode>3_vxe", "*sminv2df3_vx", "*vec_extendv4sf")
35028         ("*vec_extendv2df"): New insn definitions.
35029
35030 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35031
35032         * config/s390/s390.md ("*adddi3_sign", "*subdi3_sign", "mulditi3")
35033         ("mulditi3_2", "*muldi3_sign"): New patterns.
35034         ("muldi3", "*muldi3", "mulsi3", "*mulsi3"): Add an expander and
35035         rename the pattern definition.
35036
35037 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35038
35039         * config/s390/s390.md ("indirect_jump"): Turn insn definition into
35040         expander.
35041         ("*indirect_jump", "*indirect2_jump"): New pattern definitions.
35042
35043 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35044
35045         * config/s390/s390.c (s390_expand_vec_init): Use vllezl
35046         instruction if possible.
35047         * config/s390/vector.md (vec_halfnumelts): New mode
35048         attribute.
35049         ("*vec_vllezlf<mode>"): New pattern.
35050
35051 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35052
35053         * config/s390/vector.md ("popcountv16qi2", "popcountv8hi2")
35054         ("popcountv4si2", "popcountv2di2"): Rename to ...
35055         ("popcount<mode>2", "popcountv8hi2_vx", "popcountv4si2_vx")
35056         ("popcountv2di2_vx"): ... these and add !TARGET_VXE to the
35057         condition.
35058         ("popcount<mode>2_vxe"): New pattern.
35059
35060 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35061
35062         * common/config/s390/s390-common.c (processor_flags_table): Add
35063         arch12.
35064         * config.gcc: Add arch12.
35065         * config/s390/driver-native.c (s390_host_detect_local_cpu):
35066         Default to arch12 for unknown CPU model numbers.
35067         * config/s390/s390-builtins.def: Add B_VXE builtin flag.
35068         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Adjust
35069         PROCESSOR_max sanity check.
35070         * config/s390/s390-opts.h (enum processor_type): Add
35071         PROCESSOR_ARCH12.
35072         * config/s390/s390.c (processor_table): Add arch12.
35073         (s390_expand_builtin): Add check for B_VXE flag.
35074         (s390_issue_rate): Add PROCESSOR_ARCH12.
35075         (s390_get_sched_attrmask): Likewise.
35076         (s390_get_unit_mask): Likewise.
35077         (s390_sched_score): Enable z13 scheduling for arch12.
35078         (s390_sched_reorder): Likewise.
35079         (s390_sched_variable_issue): Likewise.
35080         * config/s390/s390.h (enum processor_flags): Add PF_ARCH12 and
35081         PF_VXE.
35082         (s390_tune_attr): Use z13 scheduling also for arch12.
35083         (TARGET_CPU_ARCH12, TARGET_CPU_ARCH12_P, TARGET_CPU_VXE)
35084         (TARGET_CPU_VXE_P, TARGET_ARCH12, TARGET_ARCH12_P, TARGET_VXE)
35085         (TARGET_VXE_P): New macros.
35086         * config/s390/s390.md: Add arch12 to cpu attribute.  Add arch12
35087         and vxe to cpu_facility.  Add arch12 and vxe to enabled attribute.
35088         * config/s390/s390.opt: Add arch12 as processor_type.
35089
35090 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35091
35092         * config/s390/s390.md
35093         ("fixuns_truncdddi2", "fixuns_trunctddi2")
35094         ("fixuns_trunc<BFP:mode><GPR:mode>2"): Merge into ...
35095         ("fixuns_trunc<FP:mode><GPR:mode>2"): New expander.
35096
35097         ("fixuns_trunc<BFP:mode><GPR:mode>2", "fixuns_trunc<mode>si2"):
35098         Rename expanders to ...
35099
35100         ("fixuns_trunc<BFP:mode><GPR:mode>2_emu")
35101         ("fixuns_truncdddi2_emu"): ... these.
35102
35103         ("fixuns_trunc<mode>si2_emu"): New expander.
35104
35105         ("*fixuns_truncdfdi2_z13"): Rename to ...
35106         ("*fixuns_truncdfdi2_vx"): ... this.
35107
35108 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35109
35110         * config/s390/2964.md: Remove the single element vector compare
35111         instructions which are no longer used.
35112         * config/s390/s390.c (s390_select_ccmode): Remove handling of
35113         vector CCmodes.
35114         (s390_canonicalize_comparison): Remove handling of DFmode
35115         compares.
35116         (s390_expand_vec_compare_scalar): Remove function.
35117         (s390_emit_compare): Don't call s390_expand_vec_compare_scalar.
35118         * config/s390/s390.md ("*vec_cmp<insn_cmp>df_cconly"): Remove
35119         pattern.
35120         ("*cmp<mode>_ccs"): Add wfcdb instruction.
35121
35122 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35123
35124         * config/s390/s390.md ("mov<mode>_64dfp" DD_DF): Use vleig for loading a
35125         FP zero.
35126         ("*mov<mode>_64" DD_DF): Remove the vector instructions. These
35127         will anyway by matched by mov<mode>_64dfp.
35128
35129 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35130
35131         * config/s390/s390.md ("mov<mode>" SD_SF): Change vleg/vsteg to
35132         vlef/vstef.  Add missing operand to vleif.
35133
35134 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35135
35136         * config/s390/s390.c (s390_expand_vec_init): Enable vector load
35137         pair for all vector types with 64 bit elements.
35138         * config/s390/vx-builtins.md (V_HW_64): Move mode iterator to ...
35139         * config/s390/vector.md (V_HW_64): ... here.
35140         (V_128_NOSINGLE): New mode iterator.
35141         ("vec_init<V_HW:mode>"): Use V_128 as mode iterator.
35142         ("*vec_splat<mode>"): Use V_128_NOSINGLE mode iterator.
35143         ("*vec_tf_to_v1tf", "*vec_ti_to_v1ti"): New pattern definitions.
35144         ("*vec_load_pairv2di"): Change to ...
35145         ("*vec_load_pair<mode>"): ... this one.
35146
35147 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35148
35149         * config/s390/constraints.md: Add comments.
35150         (jKK): Reject element sizes > 8 bytes.
35151         * config/s390/s390.c (s390_split_ok_p): Enable splitting also for
35152         s_operands.
35153         * config/s390/s390.md: Add the s_operand checks formerly in
35154         s390_split_ok_p to various splitters where they are still
35155         required.
35156         * config/s390/vector.md ("mov<mode>" V_128): Add GPR alternatives
35157         for 128 bit vectors.  Plus two splitters.
35158
35159 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35160
35161         * config/s390/s390.md: Rename the cpu facilty vec to vx throughout
35162         the file.
35163
35164 2017-03-24  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35165
35166         PR target/79893
35167         * config/s390/s390-c.c (s390_adjust_builtin_arglist): Issue an
35168         error if the boundary argument is not constant.
35169
35170 2017-03-24  Jakub Jelinek  <jakub@redhat.com>
35171
35172         PR rtl-optimization/80112
35173         * loop-doloop.c (doloop_condition_get): Don't check condition
35174         if cmp isn't SET with IF_THEN_ELSE src.
35175
35176 2017-03-24  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
35177
35178         PR tree-optimization/80158
35179         * gimple-ssa-strength-reduction.c (replace_mult_candidate): When
35180         replacing a candidate statement, also replace it for the
35181         candidate's alternate interpretation.
35182         (replace_rhs_if_not_dup): Likewise.
35183         (replace_one_candidate): Likewise.
35184
35185 2017-03-24  Richard Biener  <rguenther@suse.de>
35186
35187         PR tree-optimization/80167
35188         * graphite-isl-ast-to-gimple.c
35189         (translate_isl_ast_to_gimple::is_valid_rename): Handle default-defs
35190         properly.
35191         (translate_isl_ast_to_gimple::get_rename): Likewise.
35192
35193 2017-03-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
35194
35195         * config/rs6000/rs6000.c (rs6000_option_override_internal): Change
35196         handling of certain combinations of target options, including the
35197         combinations -mpower8-vector vs. -mno-vsx, -mpower9-vector vs.
35198         -mno-power8-vector, and -mpower9_dform vs. -mno-power9-vector.
35199
35200 2017-03-23  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
35201
35202         PR target/71436
35203         * config/arm/arm.md (*load_multiple): Add reload_completed to
35204         matching condition.
35205
35206 2017-03-23  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
35207             Richard Biener  <rguenth@suse.de>
35208
35209         PR tree-optimization/79908
35210         PR tree-optimization/80136
35211         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
35212         been cast away, gimplify_and_add suffices.
35213
35214 2017-03-23  Markus Trippelsdorf  <markus@trippelsdorf.de>
35215
35216         * tree-vrp.c (identify_jump_threads): Delete avail_exprs.
35217
35218 2017-03-23  Richard Biener  <rguenther@suse.de>
35219
35220         PR tree-optimization/80032
35221         * gimplify.c (gimple_push_cleanup): Forced unconditional
35222         cleanups still have to go to the conditional_cleanups
35223         sequence.
35224
35225 2017-03-22  Jakub Jelinek  <jakub@redhat.com>
35226
35227         PR tree-optimization/80072
35228         * tree-ssa-reassoc.c (struct operand_entry): Change id field type
35229         to unsigned int.
35230         (next_operand_entry_id): Change type to unsigned int.
35231         (sort_by_operand_rank): Make sure to return the right return value
35232         even if unsigned fields are bigger than INT_MAX.
35233         (struct oecount): Change cnt and id type to unsigned int.
35234         (oecount_hasher::equal): Formatting fix.
35235         (oecount_cmp): Make sure to return the right return value
35236         even if unsigned fields are bigger than INT_MAX.
35237         (undistribute_ops_list): Change next_oecount_id type to unsigned int.
35238
35239         PR c++/80129
35240         * gimplify.c (gimplify_modify_expr_rhs) <case COND_EXPR>: Clear
35241         TREE_READONLY on result if writing it more than once.
35242
35243         PR sanitizer/80110
35244         * doc/invoke.texi (-fsanitize=thread): Document that with
35245         -fnon-call-exceptions atomics are not able to throw
35246         exceptions.
35247
35248         PR sanitizer/80110
35249         * tsan.c: Include tree-eh.h.
35250         (instrument_builtin_call): Call maybe_clean_eh_stmt or
35251         maybe_clean_or_replace_eh_stmt where needed.
35252         (instrument_memory_accesses): Add cfg_changed argument.
35253         Call gimple_purge_dead_eh_edges on each block and set *cfg_changed
35254         if it returned true.
35255         (tsan_pass): Adjust caller.  Return TODO_cleanup_cfg if cfg_changed.
35256
35257         PR rtl-optimization/63191
35258         * config/i386/i386.c (ix86_delegitimize_address): Turn into small
35259         wrapper function, moved the whole old content into ...
35260         (ix86_delegitimize_address_1): ... this.  New inline function.
35261         (ix86_find_base_term): Use ix86_delegitimize_address_1 with
35262         true as last argument instead of ix86_delegitimize_address.
35263
35264 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
35265
35266         * config/aarch64/aarch64.c (generic_branch_cost): Copy
35267         cortexa57_branch_cost.
35268
35269 2017-03-22  Wilco Dijkstra  <wdijkstr@arm.com>
35270
35271         * config/aarch64/aarch64.c (generic_tunings): Add AES fusion.
35272
35273 2017-03-21  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
35274
35275         PR target/80123
35276         * doc/md.texi (Constraints): Document wA constraint.
35277         * config/rs6000/constraints.md (wA): New.
35278         * config/rs6000/rs6000.c (rs6000_debug_reg_global): Add wA reg_class.
35279         (rs6000_init_hard_regno_mode_ok): Init wA constraint.
35280         * config/rs6000/rs6000.h (RS6000_CONSTRAINT_wA): New.
35281         * config/rs6000/vsx.md (vsx_splat_<mode>): Use wA constraint.
35282
35283 2017-03-22  Cesar Philippidis  <cesar@codesourcery.com>
35284
35285         PR c++/80029
35286         * gimplify.c (is_oacc_declared): New function.
35287         (oacc_default_clause): Use it to set default flags for acc declared
35288         variables inside parallel regions.
35289         (gimplify_scan_omp_clauses): Strip firstprivate pointers for acc
35290         declared variables.
35291         (gimplify_oacc_declare): Gimplify the declare clauses.  Add the
35292         declare attribute to any decl as necessary.
35293
35294 2017-03-22  Thomas Preud'homme  <thomas.preudhomme@arm.com>
35295
35296         PR target/80082
35297         * config/arm/arm-isa.h (isa_bit_lpae): New feature bit.
35298         (ISA_ARMv7ve): Add isa_bit_lpae to the definition.
35299         * config/arm/arm-protos.h (arm_arch7ve): Rename into ...
35300         (arm_arch_lpae): This.
35301         * config/arm/arm.c (arm_arch7ve): Rename into ...
35302         (arm_arch_lpae): This.  Define it in term of isa_bit_lpae.
35303         * config/arm/arm.h (TARGET_HAVE_LPAE): Redefine in term of
35304         arm_arch_lpae.
35305
35306 2017-03-22  Martin Liska  <mliska@suse.cz>
35307
35308         PR target/79906
35309         * config/rs6000/rs6000.c (rs6000_inner_target_options): Show
35310         error message instead of an ICE.
35311
35312 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
35313
35314         * doc/extend.texi (6.11 Additional Floating Types): Revise.
35315
35316 2017-03-21  Kelvin Nilsen  <kelvin@gcc.gnu.org>
35317
35318         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
35319         comments.
35320         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
35321         comments.
35322
35323 2017-03-21  Martin Sebor  <msebor@redhat.com>
35324
35325         * doc/extend.texi: Use "cannot" instead of "can't."
35326         * doc/hostconfig.texi: Same.
35327         * doc/install.texi: Same.
35328         * doc/invoke.texi: Same.
35329         * doc/loop.texi: Same.
35330         * doc/md.texi: Same.
35331         * doc/objc.texi: Same.
35332         * doc/rtl.texi: Same.
35333         * doc/tm.texi: Same.
35334         * doc/tm.texi.in: Same.
35335         * doc/trouble.texi: Same.
35336
35337 2017-03-21  Alexandre Oliva  <aoliva@redhat.com>
35338
35339         PR debug/63238
35340         * dwarf2out.c (struct checksum_attributes): Add at_alignment.
35341         (collect_checksum_attributes): Set it.
35342         (die_checksum_ordered): Use it.
35343
35344 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
35345
35346         PR tree-optimization/79908
35347         * tree-stdarg.c (expand_ifn_va_arg_1): Revert the following
35348         change: For a VA_ARG whose LHS has been cast away, use
35349         force_gimple_operand to construct the side effects.
35350
35351 2017-03-21  David Malcolm  <dmalcolm@redhat.com>
35352
35353         PR translation/80001
35354         * omp-offload.c (oacc_loop_fixed_partitions): Make diagnostics
35355         more amenable to translation.
35356         (oacc_loop_auto_partitions): Likewise.
35357
35358 2017-03-21  Marek Polacek  <polacek@redhat.com>
35359             Martin Sebor  <msebor@redhat.com>
35360
35361         PR tree-optimization/80109
35362         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call get_range_info
35363         on INTEGRAL_TYPE_P.
35364
35365 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
35366             Segher Boessenkool  <segher@kernel.crashing.org>
35367
35368         PR target/80125
35369         * combine.c (can_combine_p): Revert the 2017-03-20 change, only
35370         check reg_used_between_p between insn and one of succ or succ2
35371         depending on if succ is artificial insn not inserted into insn
35372         stream.
35373
35374 2017-03-21  Martin Liska  <mliska@suse.cz>
35375
35376         PR gcov-profile/80081
35377         * Makefile.in: Add gcov-dump and fix installation of gcov-tool.
35378         * doc/gcc.texi: Include gcov-dump stuff.
35379         * doc/gcov-dump.texi: New file.
35380
35381 2017-03-21  Toma Tabacu  <toma.tabacu@imgtec.com>
35382
35383         PR rtl-optimization/79150
35384         * config/mips/mips.c (mips_block_move_loop): Emit a NOP after the
35385         conditional jump, if the jump is the last insn of the loop.
35386
35387 2017-03-21  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
35388             Richard Biener  <rguenth@suse.de>
35389
35390         PR tree-optimization/79908
35391         * tree-stdarg.c (expand_ifn_va_arg_1): For a VA_ARG whose LHS has
35392         been cast away, use force_gimple_operand to construct the side
35393         effects.
35394
35395 2017-03-21  Martin Liska  <mliska@suse.cz>
35396
35397         PR libfortran/79956
35398         * simplify-rtx.c (simplify_immed_subreg): Initialize a variable
35399         to NULL.
35400
35401 2017-03-21  Brad Spengler <spender@grsecurity.net>
35402
35403         PR plugins/80094
35404         * plugin.c (htab_hash_plugin): New function.
35405         (add_new_plugin): Use it and adjust.
35406         (parse_plugin_arg_opt): Adjust.
35407         (init_one_plugin): Likewise.
35408
35409 2017-03-21  Richard Biener  <rguenther@suse.de>
35410
35411         PR tree-optimization/80032
35412         * gimplify.c (gimple_push_cleanup): Add force_uncond parameter,
35413         if set force the cleanup to happen unconditionally.
35414         (gimplify_target_expr): Push inserted clobbers with force_uncond
35415         to avoid them being removed by control-dependent DCE.
35416
35417 2017-03-21  Richard Biener  <rguenther@suse.de>
35418
35419         PR tree-optimization/80122
35420         * tree-inline.c (copy_bb): Do not expans va-arg packs or
35421         va_arg_pack_len when the inlined call stmt requires pack
35422         expansion itself.
35423         * tree-inline.h (struct copy_body_data): Make call_stmt a gcall *.
35424
35425 2017-03-21  Jakub Jelinek  <jakub@redhat.com>
35426
35427         PR sanitizer/78158
35428         * tsan.c (instrument_builtin_call): If the memory model argument
35429         is not a constant, assume it is valid.
35430
35431         PR c/67338
35432         * fold-const.c (round_up_loc): Negate divisor in unsigned type to
35433         avoid UB.
35434
35435 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
35436
35437         PR rtl-optimization/79910
35438         * combine.c (can_combine_p): Do not allow combining an I0 or I1
35439         if its dest is used by an insn before I2 (other than the combined
35440         insns themselves, which are properly handled already).
35441
35442 2017-03-20  Segher Boessenkool  <segher@kernel.crashing.org>
35443
35444         Revert:
35445         2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
35446
35447         * combine.c (record_used_regs): New static function.
35448         (try_combine): Handle situations where there is an additional
35449         instruction between I2 and I3 which needs to have a LOG_LINK
35450         updated.
35451
35452         Revert:
35453         2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
35454
35455         * combine.c (try_combine): Delete redundant i1 test.  Call
35456         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
35457
35458 2017-03-20  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
35459
35460         PR target/80083
35461         * config/rs6000/rs6000.md (*movsi_internal1): Fix constraints for
35462         alternatives 13/14.
35463
35464 2017-03-20  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
35465
35466         PR tree-optimization/80054
35467         * gimple-ssa-strength-reduction.c (all_phi_incrs_profitable): Fail
35468         the optimization if a PHI or any of its arguments is not dominated
35469         by the candidate's basis.  Use gphi* rather than gimple* as
35470         appropriate.
35471         (replace_profitable_candidates): Clean up a gimple* variable that
35472         should be a gphi* variable.
35473
35474 2017-03-20  Martin Sebor  <msebor@redhat.com>
35475
35476         PR c++/52477
35477         * doc/extend.texi (attribute constructor): Document present limitation.
35478
35479 2017-03-20  Kelvin Nilsen  <kelvin@gcc.gnu.org>
35480
35481         PR target/79963
35482         * config/rs6000/altivec.h (vec_all_ne): Under __cplusplus__ and
35483         __POWER9_VECTOR__ #ifdef control, change template definition to
35484         use Power9-specific built-in function.
35485         (vec_any_eq): Likewise.
35486         * config/rs6000/vector.md (vector_ae_v2di_p): Change the flag used
35487         to control outcomes from this test.
35488         (vector_ae_<mode>p): For VEC_F modes, likewise.
35489
35490 2017-03-20  Ian Lance Taylor  <iant@google.com>
35491
35492         * config/i386/i386.c (ix86_function_regparm): Save an extra
35493         register for -fsplit-stack with DECL_STATIC_CHAIN.
35494
35495 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
35496
35497         PR target/79912
35498         * config/riscv/riscv.c (riscv_preferred_reload_class): Remove.
35499         (TARGET_PREFERRED_RELOAD_CLASS): Likewise.
35500
35501 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com>
35502
35503         * config/riscv/riscv.c (riscv_print_operand): Use "fence
35504         iorw,ow".
35505         * config/riscv/sync.mc (mem_thread_fence_1): Use "fence
35506         iorw,iorw".
35507
35508 2017-03-20  Marek Polacek  <polacek@redhat.com>
35509
35510         PR sanitizer/80063
35511         * asan.c (DEF_SANITIZER_BUILTIN): Use do { } while (0).
35512
35513 2017-03-20  Richard Biener  <rguenther@suse.de>
35514
35515         PR tree-optimization/80113
35516         * graphite-isl-ast-to-gimple.c (copy_loop_phi_nodes): Do not
35517         allocate extra SSA name for PHI def.
35518         (add_close_phis_to_outer_loops): Likewise.
35519         (add_close_phis_to_merge_points): Likewise.
35520         (copy_loop_close_phi_args): Likewise.
35521         (copy_cond_phi_nodes): Likewise.
35522
35523 2017-03-20  Martin Liska  <mliska@suse.cz>
35524
35525         PR middle-end/79753
35526         * tree-chkp.c (chkp_build_returned_bound): Do not build
35527         returned bounds for a LHS that's not a BOUNDED_P type.
35528
35529 2017-03-20  Martin Liska  <mliska@suse.cz>
35530
35531         PR target/79769
35532         PR target/79770
35533         * tree-chkp.c (chkp_find_bounds_1): Handle REAL_CST,
35534         COMPLEX_CST and VECTOR_CST.
35535
35536 2017-03-20  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
35537
35538         PR target/78857
35539         * config/s390/s390.md ("cmp<mode>_ccs_0"): Add a clobber of the
35540         target operand.  A new splitter adds the clobber statement in case
35541         the target operand is dead anyway.
35542
35543 2017-03-19  Gerald Pfeifer  <gerald@pfeifer.com>
35544
35545         * doc/install.texi (Specific) <sparc-*-linux*>: No longer refer
35546         to age-old versions of binutils and glibc.
35547
35548 2017-03-18  Segher Boessenkool  <segher@kernel.crashing.org>
35549
35550         * doc/contrib.texi (Contributors): Remove duplicate entry for myself.
35551
35552 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
35553
35554         * doc/contrib.texi (Contributors): Add Segher Boessenkool.
35555
35556 2017-03-18  Gerald Pfeifer  <gerald@pfeifer.com>
35557
35558         * doc/install.texi (Specific) <arm-*-eabi>: Remove old
35559         requirement for binutils 2.13.
35560
35561 2017-03-17  Jim Wilson  <jim.wilson@linaro.org>
35562
35563         * combine.c (try_combine): Delete redundant i1 test.  Call
35564         prev_nonnote_nondebug_insn instead of prev_nonnote_insn.
35565
35566 2017-03-17  Palmer Dabbelt  <palmer@dabbelt.com
35567
35568         * doc/install.texi (Specific) <riscv32-*-elf>: Add riscv32-*-elf,
35569         riscv32-*-linux, riscv64-*-elf, riscv64-*-linux to the table of
35570         contents.
35571         <riscv64-*-elf>: Re-arrange section
35572         <riscv32-*-elf>: Add a note about requiring binutils 2.28.
35573         <riscv32-*-linux>: Likewise.
35574         <riscv64-*-elf>: Likewise
35575         <riscv64-*-linux>: Likewise.
35576
35577 2017-03-17  Richard Earnshaw  <rearnsha@arm.com>
35578
35579         PR target/80052
35580         * aarch64.opt(verbose-cost-dump): Fix typo.
35581
35582 2017-03-17  Pat Haugen  <pthaugen@us.ibm.com>
35583
35584         PR target/79951
35585         * config/rs6000/rs6000.md (copysign<mode>3_fcpsgn): Test
35586         for VECTOR_UNIT_VSX_P (<MODE>mode) too.
35587
35588 2017-03-17  Bernd Schmidt  <bschmidt@redhat.com>
35589
35590         * reload.c (find_reloads): When reloading a nonoffsettable address,
35591         use RELOAD_OTHER for it and its address reloads.
35592
35593         PR rtl-optimization/79910
35594         * combine.c (record_used_regs): New static function.
35595         (try_combine): Handle situations where there is an additional
35596         instruction between I2 and I3 which needs to have a LOG_LINK
35597         updated.
35598
35599 2017-03-17  Jeff Law  <law@redhat.com>
35600
35601         PR tree-optimization/71437
35602         * tree-vrp.c (simplify_stmt_for_jump_threading): Lookup the
35603         conditional in the hash table first.
35604         (vrp_dom_walker::before_dom_children): Extract condition from
35605         ASSERT_EXPR.  Record condition, its inverion and any implied
35606         conditions as well.
35607
35608 2017-03-17  Marek Polacek  <polacek@redhat.com>
35609             Markus Trippelsdorf  <markus@trippelsdorf.de>
35610
35611         PR tree-optimization/80079
35612         * gimple-ssa-store-merging.c (class pass_store_merging): Initialize
35613         m_stores_head.
35614
35615 2017-03-17  Richard Biener  <rguenther@suse.de>
35616
35617         PR middle-end/80075
35618         * tree-eh.c (stmt_could_throw_1_p): Only handle gimple assigns.
35619         Properly verify the LHS before the RHS possibly claims to be
35620         handled.
35621         (stmt_could_throw_p): Hande gimple conds fully here.  Clobbers
35622         do not throw.
35623
35624 2017-03-17  Martin Jambor  <mjambor@suse.cz>
35625
35626         * doc/invoke.texi (Option Options): Include -fipa-vrp in the list.
35627         (List of -O2 options): Likewise.
35628         (-fipa-bit-cp): Replace "ipa" with "interprocedural."
35629         (-fipa-vrp) New.
35630
35631 2017-03-17  Tom de Vries  <tom@codesourcery.com>
35632
35633         * gcov-dump.c (print_usage): Print bug_report_url.
35634
35635 2017-03-17  Richard Biener  <rguenther@suse.de>
35636
35637         PR middle-end/80050
35638         * genmatch.c (parser::next): Remove pointless check for CPP_EOF.
35639         (parser::peek): Likewise.
35640
35641 2017-03-17  Richard Biener  <rguenther@suse.de>
35642
35643         PR tree-optimization/80048
35644         * sese.c (free_sese_info): Properly release rename_map and
35645         copied_bb_map elements.
35646
35647 2017-03-16  Alexandre Oliva  <aoliva@redhat.com>
35648
35649         * gimple-ssa-store-merging.c (struct imm_store_chain_info):
35650         Add linked-list forward and backlinks.  Insert on
35651         construction, remove on destruction.
35652         (class pass_store_merging): Add m_stores_head field.
35653         (pass_store_merging::terminate_and_process_all_chains):
35654         Iterate over m_stores_head list.
35655         (pass_store_merging::terminate_all_aliasing_chains):
35656         Likewise.
35657         (pass_store_merging::execute): Check for debug stmts first.
35658         Push new chains onto the m_stores_head stack.
35659
35660 2017-03-16  Michael Meissner  <meissner@linux.vnet.ibm.com>
35661
35662         PR target/71294
35663         * config/rs6000/vsx.md (vsx_splat_<mode>, VSX_D iterator): Allow a
35664         SPLAT operation on ISA 2.07 64-bit systems that have direct move,
35665         but no MTVSRDD support, by doing MTVSRD and XXPERMDI.
35666
35667 2017-03-16  Jeff Law  <law@redhat.com>
35668
35669         PR tree-optimization/71437
35670         * tree-ssa-dom.c (dom_opt_dom_walker): Remove thread_across_edge
35671         member function.  Implementation moved into after_dom_children
35672         member function and into the threader's thread_outgoing_edges
35673         function.
35674         (dom_opt_dom_walker::after_dom_children): Simplify by moving
35675         some code into new thread_outgoing_edges.
35676         * tree-ssa-threadedge.c (thread_across_edge): Make static and simplify
35677         definition.  Simplify marker handling (do it here).   Assume we always
35678         have the available expression and the const/copies tables.
35679         (thread_outgoing_edges): New function extracted from tree-ssa-dom.c
35680         and tree-vrp.c
35681         * tree-ssa-threadedge.h (thread_outgoing_edges): Declare.
35682         * tree-vrp.c (equiv_stack): No longer file scoped.
35683         (vrp_dom_walker): New class.
35684         (vrp_dom_walker::before_dom_children): New member function.
35685         (vrp_dom_walker::after_dom_children): Likewise.
35686         (identify_jump_threads):  Setup domwalker.  Use it rather than
35687         walking edges in a random order by hand.  Simplify setup/finalization.
35688         (finalize_jump_threads): Remove.
35689         (vrp_finalize): Do not call identify_jump_threads here.
35690         (execute_vrp): Do it here instead and call thread_through_all_blocks
35691         here too.
35692
35693         PR tree-optimization/71437
35694         * tree-ssa-dom.c (pfn_simplify): Add basic_block argument.  All
35695         callers changed.
35696         (simplify_stmt_for_jump_threading): Add basic_block argument.  All
35697         callers changed.
35698         (lhs_of_dominating_assert): Moved from here into tree-vrp.c.
35699         (dom_opt_dom_walker::thread_across_edge): Remove
35700         handle_dominating_asserts argument.  All callers changed.
35701         (record_temporary_equivalences_from_stmts_at_dest): Corresponding
35702         changes.  Remove calls to lhs_of_dominating_assert.  Other
35703         uses of handle_dominating_asserts turn into unconditional code
35704         (simplify_control_stmt_condition_1): Likewise.
35705         (simplify_control_stmt_condition): Likewise.
35706         (thread_through_normal_block, thread_across_edge): Likewise.
35707         * tree-ssa-threadedge.h (thread_across_edge): Corresponding changes.
35708         * tree-vrp.c (lhs_of_dominating_assert): Move here.  Return original
35709         object if it is not an SSA_NAME.
35710         (simplify_stmt_for_jump_threading): Call lhs_of_dominating_assert
35711         before calling into the VRP specific simplifiers.
35712         (identify_jump_threads): Remove handle_dominating_asserts
35713         argument.
35714
35715 2017-03-16  Jakub Jelinek  <jakub@redhat.com>
35716
35717         PR fortran/79886
35718         * tree-diagnostic.c (default_tree_printer): No longer static.
35719         * tree-diagnostic.h (default_tree_printer): New prototype.
35720
35721 2017-03-16  Tamar Christina  <tamar.christina@arm.com>
35722
35723         * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>)
35724         Change ins into fmov.
35725
35726 2017-03-16  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
35727
35728         * config/aarch64/iterators.md (h_con): Return "x" for V4HF and V8HF.
35729         * config/aarch64/aarch64-simd.md (*aarch64_fma4_elt_from_dup<mode>):
35730         Use h_con constraint for operand 1.
35731         (*aarch64_fnma4_elt_from_dup<mode>): Likewise.
35732         (*aarch64_mulx_elt_from_dup<mode>): Likewise for operand 2.
35733
35734 2017-03-15  Jeff Law  <law@redhat.com>
35735
35736         PR tree-optimization/71437
35737         * tree-ssa-dom.c (derive_equivalences_from_bit_ior): New function.
35738         (record_temporary_equivalences): Use it.
35739
35740         PR tree-optimization/71437
35741         * tree-ssa-dom.c (struct cond_equivalence): Moved from here into
35742         tree-ssa-scopedtables.
35743         (lookup_avail_expr, build_and_record_new_cond): Likewise.
35744         (record_conditions, record_cond, vuse_eq): Likewise.
35745         (record_edge_info): Adjust to API tweak of record_conditions.
35746         (simplify_stmt_for_jump_threading): Similarly for lookup_avail_expr.
35747         (record_temporary_equivalences, optimize_stmt): Likewise.
35748         (eliminate_redundant_computations): Likewise.
35749         (record_equivalences_from_stmt): Likewise.
35750         * tree-ssa-scopedtables.c: Include options.h and params.h.
35751         (vuse_eq): New function, moved from tree-ssa-dom.c
35752         (build_and_record_new_cond): Likewise.
35753         (record_conditions): Likewise.  Accept vector of conditions rather
35754         than edge_equivalence structure for first argument.
35755         for the first argument.
35756         (avail_exprs_stack::lookup_avail_expr): New member function, moved
35757         from tree-ssa-dom.c.
35758         (avail_exprs_stack::record_cond): Likewise.
35759         * tree-ssa-scopedtables.h (struct cond_equivalence): Moved here
35760         from tree-ssa-dom.c.
35761         (avail_exprs_stack): Add new member functions lookup_avail_expr
35762         and record_cond.
35763         (record_conditions): Declare.
35764
35765 2017-03-15  Vladimir Makarov  <vmakarov@redhat.com>
35766
35767         PR target/80017
35768         * lra-constraints.c (process_alt_operands): Increase reject for
35769         reloading an input/output operand.
35770
35771 2017-03-15  Michael Meissner  <meissner@linux.vnet.ibm.com>
35772
35773         PR target/79038
35774         * config/rs6000/rs6000.md (float<QHI:mode><IEEE128:mode>2): Define
35775         insns to convert from signed/unsigned char/short to IEEE 128-bit
35776         floating point.
35777         (floatuns<QHI:mode><IEEE128:mode>2): Likewise.
35778
35779 2017-03-15  Uros Bizjak  <ubizjak@gmail.com>
35780
35781         PR target/80019
35782         * config/i386/i386.c (ix86_vector_duplicate_value): Create
35783         subreg of inner mode for values already in registers.
35784
35785 2017-03-15  Bernd Schmidt  <bschmidt@redhat.com>
35786
35787         * config/c6x/c6x.c (hwloop_optimize): Handle case where the old
35788         iteration reg is used after the loop.
35789
35790 2017-03-14  Martin Sebor  <msebor@redhat.com>
35791
35792         PR tree-optimization/79800
35793         * gimple-ssa-sprintf.c (format_floating: Add argument.  Handle
35794         precision in negative-positive range.
35795         (format_floating): Call non-const overload with adjusted precision.
35796
35797 2017-03-14  Michael Meissner  <meissner@linux.vnet.ibm.com>
35798
35799         PR target/79947
35800         * config/rs6000/rs6000.h (TARGET_FRSQRTES): Add check for
35801         -mpowerpc-gfxopt.
35802
35803 2017-03-14  Martin Sebor  <msebor@redhat.com>
35804
35805         PR middle-end/80020
35806         * builtin-attrs.def (ATTR_ALLOC_SIZE_2_NOTHROW_LIST): New macro.
35807         * builtins.def (aligned_alloc): Use it.
35808
35809         PR c/79936
35810         * Makefile.in (GTFILES): Add calls.c.
35811         * calls.c: Include "gt-calls.h".
35812
35813 2017-03-14  Bernd Schmidt  <bschmidt@redhat.com>
35814
35815         PR rtl-optimization/79728
35816         * regs.h (struct target_regs): New field
35817         x_contains_allocatable_regs_of_mode.
35818         (contains_allocatable_regs_of_mode): New macro.
35819         * reginfo.c (init_reg_sets_1): Initialize it, and change
35820         contains_reg_of_mode so it includes global regs as well.
35821         * reload.c (push_reload): Use contains_allocatable_regs_of_mode
35822         rather than contains_regs_of_mode.
35823
35824 2017-03-14  Martin Liska  <mliska@suse.cz>
35825
35826         * doc/invoke.texi: Document options that can't be combined with
35827         -fcheck-pointer-bounds.
35828
35829 2017-03-14  Martin Liska  <mliska@suse.cz>
35830
35831         PR middle-end/79831
35832         * doc/invoke.texi (-Wchkp): Document the option.
35833
35834 2017-03-14  Martin Liska  <mliska@suse.cz>
35835
35836         * Makefile.in: Install gcov-dump.
35837
35838 2017-03-14  Martin Liska  <mliska@suse.cz>
35839
35840         * multiple_target.c (expand_target_clones): Bail out for
35841         an invalid attribute.
35842
35843 2017-03-14  Richard Biener  <rguenther@suse.de>
35844
35845         * alias.c (struct alias_set_entry): Pack properly.
35846         * cfgloop.h (struct loop): Likewise.
35847         * cse.c (struct set): Likewise.
35848         * ipa-utils.c (struct searchc_env): Likewise.
35849         * loop-invariant.c (struct invariant): Likewise.
35850         * lra-remat.c (struct cand): Likewise.
35851         * recog.c (struct change_t): Likewise.
35852         * rtl.h (struct address_info): Likewise.
35853         * symbol-summary.h (function_summary): Likewise.
35854         * tree-loop-distribution.c (struct partition): Likewise.
35855         * tree-object-size.c (struct object_size_info): Likewise.
35856         * tree-ssa-loop-ivopts.c (struct cost_pair): Likewise.
35857         * tree-ssa-threadupdate.c (struct ssa_local_info_t): Likewise.
35858         * tree-vect-data-refs.c (struct _vect_peel_info): Likewise.
35859         * tree-vect-slp.c (struct _slp_oprnd_info): Likewise.
35860         * tree-vect-stmts.c (struct simd_call_arg_info): Likewise.
35861         * tree-vectorizer.h (struct _loop_vec_info): Likewise.
35862         (struct _stmt_vec_info): Likewise.
35863
35864 2017-03-14  Martin Liska  <mliska@suse.cz>
35865
35866         PR target/79892
35867         * multiple_target.c (create_dispatcher_calls): Check that
35868         a target can create a function dispatcher.
35869
35870 2017-03-14  Martin Liska  <mliska@suse.cz>
35871
35872         PR lto/66295
35873         * multiple_target.c (expand_target_clones): Drop local.local
35874         flag for default implementation.
35875
35876 2017-03-14  Richard Biener  <rguenther@suse.de>
35877
35878         PR tree-optimization/80030
35879         * tree-vect-stmts.c (vectorizable_store): Plug memleak.
35880
35881 2017-03-13  Kito Cheng  <kito.cheng@gmail.com>
35882
35883         * config/riscv/riscv.c (riscv_emit_float_compare>: Use
35884         gcc_fallthrough() instead of __attribute__((fallthrough));
35885
35886 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
35887
35888         * doc/gcc.texi: Remove "up" link to (DIR).
35889         * doc/gccint.texi: Ditto.
35890
35891 2017-03-13  Gerald Pfeifer  <gerald@pfeifer.com>
35892
35893         * doc/install.texi (Specific) <avr>: Remove reference to
35894         binutils 2.13.
35895
35896 2017-03-13  Jeff Law  <law@redhat.com>
35897
35898         * config/riscv/riscv.c (riscv_emit_float_compare): Use fallthru
35899         attribute rather than comments.
35900
35901         * config/pdp11/pdp11.md (movmemhi): Adjust operand numbers to
35902         match_scratch operand is highest.
35903
35904 2017-03-13  Martin Liska  <mliska@suse.cz>
35905
35906         PR middle-end/78339
35907         * ipa-pure-const.c (warn_function_noreturn): If the declarations
35908         is a CHKP clone, use original declaration.
35909
35910 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
35911
35912         * config/arc/arc.c (arc_init): Use multiplier whenever we have it.
35913         (arc_conditional_register_usage): Use a different allocation order
35914         when optimizing for size.
35915         * common/config/arc/arc-common.c (arc_option_optimization_table):
35916         Section anchors default on when optimizing for size.
35917
35918 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
35919
35920         * config/arc/arc.md (*tst_bitfield_tst): Fix pattern.
35921
35922 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
35923
35924         * config/arc/arc.c (arc_output_addsi): Emit code density adds.
35925         * config/arc/arc.md (cpu_facility): Add cd variant.
35926         (*movqi_insn): Add code density variant.
35927         (*movhi_insn): Likewise.
35928         (*movqi_insn): Likewise.
35929         (*addsi3_mixed): Likewise.
35930         (subsi3_insn): Likewise.
35931
35932 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
35933
35934         * config/arc/arc.md (movsi_cond_exec): Update constraint.
35935
35936 2017-03-13  Claudiu Zissulescu  <claziss@synopsys.com>
35937
35938         * config/arc/arc.c (arc_legitimize_pic_address): Handle PIC
35939         expressions with MINUS and UNARY ops.
35940
35941 2017-03-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
35942
35943         PR target/79911
35944         * config/arm/neon.md (vec_sel_widen_ssum_lo<VQI:mode><VW:mode>3):
35945         Rename to...
35946         (vec_sel_widen_ssum_lo<mode><V_half>3): ... This. Avoid mismatch
35947         between vec_select and vector argument.
35948         (vec_sel_widen_ssum_hi<VQI:mode><VW:mode>3): Rename to...
35949         (vec_sel_widen_ssum_hi<mode><V_half>3): ... This. Likewise.
35950         (vec_sel_widen_usum_lo<VQI:mode><VW:mode>3): Rename to...
35951         (vec_sel_widen_usum_lo<mode><V_half>3): ... This.
35952         (vec_sel_widen_usum_hi<VQI:mode><VW:mode>3): Rename to...
35953         (vec_sel_widen_usum_hi<mode><V_half>3): ... This.
35954
35955 2017-03-13  Richard Biener  <rguenther@suse.de>
35956
35957         PR other/79991
35958         * params.def (vect-max-peeling-for-alignment): Fix typo.
35959
35960 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
35961
35962         * doc/install.texi (Specific) <mips-*-*>: Remove description of
35963         issue that only occurred with binutils below 2.18.
35964
35965 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
35966
35967         * doc/install.texi (Specific) <cris-axis-elf>: No longer
35968         refer to binutils 2.11/2.12 minimum.
35969
35970 2017-03-12  Gerald Pfeifer  <gerald@pfeifer.com>
35971
35972         * doc/install.texi (Specific) <powerpc-*-*>: Remove link to
35973         ftp.kernel.org and simplify binutils requirement.
35974
35975 2017-03-11  Gerald Pfeifer  <gerald@pfeifer.com>
35976
35977         * doc/invoke.texi (Warning Options): Fix spelling of link-time
35978         optimization.
35979         (Optimize Options): Ditto.  Also remove redundancy.
35980
35981 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
35982
35983         PR translation/79848
35984         * ipa-devirt.c (warn_types_mismatch): Simplify uses of "%<%s%>" to
35985         "%qs".
35986         * ipa-pure-const.c (suggest_attribute): Likewise.  Convert _
35987         to G_ to avoid double translation.
35988
35989 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
35990
35991         PR translation/79923
35992         * auto-profile.c (get_combined_location): Convert leading
35993         character of diagnostics to lower case and remove trailing period.
35994         (read_profile): Likewise for various diagnostics.
35995         * config/arm/arm.c (arm_option_override): Remove trailing period
35996         from various diagnostics.
35997         * config/msp430/msp430.c (msp430_expand_delay_cycles): Likewise.
35998         (msp430_expand_delay_cycles): Likewise.
35999
36000 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
36001
36002         PR target/79925
36003         * config/aarch64/aarch64.c (aarch64_validate_mcpu): Quote the
36004         full command-line argument, rather than just "str".
36005         (aarch64_validate_march): Likewise.
36006         (aarch64_validate_mtune): Likewise.
36007
36008 2017-03-10  Bernd Schmidt  <bschmidt@redhat.com>
36009
36010         PR rtl-optimization/78911
36011         * lra-assigns.c (must_not_spill_p): New function.
36012         (spill_for): Use it.
36013
36014 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
36015
36016         PR tree-optimization/79981
36017         * tree-vrp.c (extract_range_basic): Handle IMAGPART_EXPR of
36018         ATOMIC_COMPARE_EXCHANGE ifn result.
36019         (stmt_interesting_for_vrp, vrp_visit_stmt): Handle
36020         IFN_ATOMIC_COMPARE_EXCHANGE.
36021
36022 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
36023
36024         PR driver/79875
36025         * opts.c (parse_sanitizer_options): Add missing question mark to
36026         "did you mean" message.
36027
36028 2017-03-10  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
36029
36030         * config/rs6000/rs6000-builtin.def (VMULEUB_UNS): Remove orphaned
36031         built-in.
36032         (VMULEUH_UNS): Likewise.
36033         (VMULOUB_UNS): Likewise.
36034         (VMULOUH_UNS): Likewise.
36035         * config/rs6000/rs6000.c (builtin_function_type): Remove
36036         references to ALTIVEC_BUILTIN_VMUL[EO]U[BH]_UNS.
36037
36038 2017-03-10  David Malcolm  <dmalcolm@redhat.com>
36039
36040         PR bootstrap/79952
36041         * read-rtl-function.c (function_reader::read_rtx_operand): Update
36042         x with result of extra_parsing_for_operand_code_0.
36043         (function_reader::extra_parsing_for_operand_code_0): Convert
36044         return type from void to rtx, returning x.  When reading
36045         SYMBOL_REF with SYMBOL_FLAG_HAS_BLOCK_INFO, reallocate x to the
36046         larger size containing struct block_symbol.
36047
36048 2017-03-10  Segher Boessenkool  <segher@kernel.crashing.org>
36049
36050         * config/rs6000/rs6000.c (rs6000_option_override_internal): Disallow
36051         -mfloat128-hardware without -m64.
36052
36053 2017-03-10  Will Schmidt <will_schmidt@vnet.ibm.com>
36054
36055         PR target/79941
36056         * config/rs6000/rs6000.c (builtin_function_type): Add VMUL*U[HB]
36057         entries to the case statement that marks unsigned arguments to
36058         overloaded functions.
36059
36060 2017-03-10  Kelvin Nilsen  <kelvin@gcc.gnu.org>
36061
36062         * config/rs6000/rs6000.c (rs6000_option_override_internal): Fix
36063         two typographic errors in the handling of TARGET_UPPER_REGS_DI.
36064
36065 2017-03-10  Pat Haugen  <pthaugen@us.ibm.com>
36066
36067         PR target/79907
36068         * config/rs6000/rs6000.c (rs6000_init_hard_regno_mode_ok): Test
36069         TARGET_UPPER_REGS_DI when setting 'wi' constraint regclass.
36070
36071 2017-03-10  Martin Liska  <mliska@suse.cz>
36072
36073         PR target/65705
36074         PR target/69804
36075         * toplev.c (process_options): Enable MPX with LSAN and UBSAN.
36076         * tree-chkp.c (chkp_walk_pointer_assignments): Verify that
36077         FIELD != NULL.
36078
36079 2017-03-10  Olivier Hainque  <hainque@adacore.com>
36080
36081         * tree-switch-conversion (array_value_type): Start by resetting
36082         candidate type to it's main variant.
36083
36084 2017-03-10  Jakub Jelinek  <jakub@redhat.com>
36085
36086         PR rtl-optimization/79909
36087         * combine.c (try_combine): Use simplify_replace_rtx on individual
36088         CALL_INSN_FUNCTION_USAGE elements instead of replace_rtx on copy_rtx
36089         of the whole CALL_INSN_FUNCTION_USAGE.
36090
36091         PR tree-optimization/79972
36092         * gimple-ssa-warn-alloca.c (alloca_call_type): Only call
36093         get_range_info on SSA_NAMEs.  Formatting fixes.
36094
36095 2017-03-10  Richard Biener  <rguenther@suse.de>
36096             Jakub Jelinek  <jakub@redhat.com>
36097
36098         PR tree-optimization/77975
36099         * tree-ssa-loop-niter.c (get_base_for): Allow phi argument from latch
36100         edge to be constant.
36101         (get_val_for): For constant x return it.  Formatting fix.
36102         (loop_niter_by_eval): Avoid pointless looping if the next iteration
36103         would use the same bases as the current one.
36104
36105 2017-03-09  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
36106
36107         * config/rs6000/rs6000.c (rs6000_gen_le_vsx_permute): Use rotate
36108         instead of vec_select for V1TImode.
36109         * conifg/rs6000/vsx.md (VSX_LE): Remove mode iterator that is no
36110         longer needed.
36111         (VSX_LE_128): Add V1TI to this mode iterator.
36112         (*vsx_le_perm_load_<mode>): Change to use VSX_D mode iterator.
36113         (*vsx_le_perm_store_<mode>): Likewise.
36114         (pre-reload splitter for VSX stores): Likewise.
36115         (post-reload splitter for VSX stores): Likewise.
36116         (*vsx_xxpermdi2_le_<mode>): Likewise.
36117         (*vsx_lxvd2x2_le_<mode>): Likewise.
36118         (*vsx_stxvd2x2_le_<mode>): Likewise.
36119
36120 2017-03-09  Michael Eager  <eager@eagercon.com>
36121
36122         Correct failures with --enable-checking=yes,rtl.
36123
36124         * config/microblaze/microblaze.c (microblaze_expand_shift):
36125         Replace GET_CODE test with CONST_INT_P and INTVAL test with
36126         test for const0_rtx.
36127         * config/microblaze/microblaze.md (ashlsi3_byone, ashrsi3_byone,
36128         lshrsi3_byone): Replace INTVAL with test for const1_rtx.
36129
36130 2017-03-09  Richard Biener  <rguenther@suse.de>
36131
36132         PR tree-optimization/79977
36133         * graphite-scop-detection.c (scop_detection::merge_sese):
36134         Handle the case of extra exits to blocks dominating the entry.
36135
36136 2017-03-09  Toma Tabacu  <toma.tabacu@imgtec.com>
36137
36138         * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
36139         Document rdynamic.
36140
36141 2017-03-09  Vladimir Makarov  <vmakarov@redhat.com>
36142
36143         PR rtl-optimization/79949
36144         * lra-constraints.c (process_alt_operands): Check memory when
36145         trying to predict a cycle.  Print about the overall increase.
36146
36147 2017-03-09  Richard Biener  <rguenther@suse.de>
36148
36149         PR middle-end/79971
36150         * gimple-expr.c (useless_type_conversion_p): Preserve
36151         TYPE_SATURATING for fixed-point types.
36152
36153 2017-03-09  Richard Biener  <rguenther@suse.de>
36154
36155         PR ipa/79970
36156         * ipa-prop.c (ipa_modify_formal_parameters): Avoid changing
36157         alignment of BLKmode params.
36158
36159 2017-03-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
36160
36161         PR target/79913
36162         * config/aarch64/iterators.md (VALL_F16_NO_V2Q): New mode iterator.
36163         (VALL_NO_V2Q): Likewise.
36164         (VDQF_DF): Delete.
36165         * config/aarch64/aarch64-simd.md
36166         (aarch64_dup_lane_<vswap_width_name><mode>): Use VALL_F16_NO_V2Q
36167         iterator.
36168         (*aarch64_simd_vec_copy_lane_<vswap_width_name><mode>): Use
36169         VALL_NO_V2Q mode iterator.
36170         (*aarch64_vgetfmulx<mode>): Use VDQF iterator.
36171
36172 2017-03-09  Martin Liska  <mliska@suse.cz>
36173
36174         PR tree-optimization/79631
36175         * tree-chkp-opt.c (chkp_is_constant_addr): Call
36176         tree_int_cst_sign_bit just for INTEGER constants.
36177
36178 2017-03-09  Martin Liska  <mliska@suse.cz>
36179
36180         PR target/65705
36181         PR target/69804
36182         * toplev.c (process_options): Disable -fcheck-pointer-bounds with
36183         sanitizers.
36184
36185 2017-03-09  Marek Polacek  <polacek@redhat.com>
36186
36187         PR c++/79672
36188         * tree.c (inchash::add_expr): Handle TREE_VEC.
36189
36190 2017-03-09  Martin Liska  <mliska@suse.cz>
36191
36192         PR ipa/79764
36193         (chkp_narrow_size_and_offset): New function.
36194         (chkp_parse_array_and_component_ref): Support BIT_FIELD_REF.
36195         (void chkp_parse_bit_field_ref): New function.
36196         (chkp_make_addressed_object_bounds): Add case for BIT_FIELD_REF.
36197         (chkp_process_stmt): Use chkp_parse_bit_field_ref.
36198
36199 2017-03-09  Martin Liska  <mliska@suse.cz>
36200
36201         PR ipa/79761
36202         * tree-chkp.c (chkp_get_bound_for_parm): Get bounds for a param.
36203         (chkp_find_bounds_1): Remove gcc_unreachable.
36204
36205 2017-03-09  Jakub Jelinek  <jakub@redhat.com>
36206
36207         PR sanitizer/79944
36208         * asan.c (get_mem_refs_of_builtin_call): For BUILT_IN_ATOMIC* and
36209         BUILT_IN_SYNC*, determine the access type from the size suffix and
36210         always build a MEM_REF with that type.  Handle forgotten
36211         BUILT_IN_SYNC_FETCH_AND_NAND_16 and BUILT_IN_SYNC_NAND_AND_FETCH_16.
36212
36213         PR target/79932
36214         * config/i386/avx512vlintrin.h (_mm256_cmpge_epi32_mask,
36215         _mm256_cmpge_epi64_mask, _mm256_cmpge_epu32_mask,
36216         _mm256_cmpge_epu64_mask, _mm256_cmple_epi32_mask,
36217         _mm256_cmple_epi64_mask, _mm256_cmple_epu32_mask,
36218         _mm256_cmple_epu64_mask, _mm256_cmplt_epi32_mask,
36219         _mm256_cmplt_epi64_mask, _mm256_cmplt_epu32_mask,
36220         _mm256_cmplt_epu64_mask, _mm256_cmpneq_epi32_mask,
36221         _mm256_cmpneq_epi64_mask, _mm256_cmpneq_epu32_mask,
36222         _mm256_cmpneq_epu64_mask, _mm256_mask_cmpge_epi32_mask,
36223         _mm256_mask_cmpge_epi64_mask, _mm256_mask_cmpge_epu32_mask,
36224         _mm256_mask_cmpge_epu64_mask, _mm256_mask_cmple_epi32_mask,
36225         _mm256_mask_cmple_epi64_mask, _mm256_mask_cmple_epu32_mask,
36226         _mm256_mask_cmple_epu64_mask, _mm256_mask_cmplt_epi32_mask,
36227         _mm256_mask_cmplt_epi64_mask, _mm256_mask_cmplt_epu32_mask,
36228         _mm256_mask_cmplt_epu64_mask, _mm256_mask_cmpneq_epi32_mask,
36229         _mm256_mask_cmpneq_epi64_mask, _mm256_mask_cmpneq_epu32_mask,
36230         _mm256_mask_cmpneq_epu64_mask, _mm_cmpge_epi32_mask,
36231         _mm_cmpge_epi64_mask, _mm_cmpge_epu32_mask, _mm_cmpge_epu64_mask,
36232         _mm_cmple_epi32_mask, _mm_cmple_epi64_mask, _mm_cmple_epu32_mask,
36233         _mm_cmple_epu64_mask, _mm_cmplt_epi32_mask, _mm_cmplt_epi64_mask,
36234         _mm_cmplt_epu32_mask, _mm_cmplt_epu64_mask, _mm_cmpneq_epi32_mask,
36235         _mm_cmpneq_epi64_mask, _mm_cmpneq_epu32_mask, _mm_cmpneq_epu64_mask,
36236         _mm_mask_cmpge_epi32_mask, _mm_mask_cmpge_epi64_mask,
36237         _mm_mask_cmpge_epu32_mask, _mm_mask_cmpge_epu64_mask,
36238         _mm_mask_cmple_epi32_mask, _mm_mask_cmple_epi64_mask,
36239         _mm_mask_cmple_epu32_mask, _mm_mask_cmple_epu64_mask,
36240         _mm_mask_cmplt_epi32_mask, _mm_mask_cmplt_epi64_mask,
36241         _mm_mask_cmplt_epu32_mask, _mm_mask_cmplt_epu64_mask,
36242         _mm_mask_cmpneq_epi32_mask, _mm_mask_cmpneq_epi64_mask,
36243         _mm_mask_cmpneq_epu32_mask, _mm_mask_cmpneq_epu64_mask): Move
36244         definitions outside of __OPTIMIZE__ guarded section.
36245
36246         PR target/79932
36247         * config/i386/avx512bwintrin.h (_mm512_packs_epi32,
36248         _mm512_maskz_packs_epi32, _mm512_mask_packs_epi32,
36249         _mm512_packus_epi32, _mm512_maskz_packus_epi32,
36250         _mm512_mask_packus_epi32): Move definitions outside of __OPTIMIZE__
36251         guarded section.
36252
36253 2017-03-09  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
36254
36255         * config/s390/vx-builtins.md ("vfee<mode>", "vfeez<mode>")
36256         ("vfenez<mode>"): Add missing constraints.
36257
36258 2017-03-08  Martin Sebor  <msebor@redhat.com>
36259
36260         PR target/79928
36261         * config/nds32/nds32.c (nds32_option_override):
36262         Fix misspelled diagnostic.
36263
36264 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
36265
36266         PR c/79940
36267         * gimplify.c (gimplify_omp_for): Replace index var in outer
36268         taskloop statement with an artificial variable and add
36269         OMP_CLAUSE_PRIVATE clause for it.
36270
36271 2017-03-08  Richard Biener  <rguenther@suse.de>
36272
36273         PR tree-optimization/79955
36274         * tree-ssa-uninit.c (warn_uninitialized_vars): Do not warn
36275         for accesses that are completely outside of the variable.
36276
36277 2017-03-08  Andrew Haley  <aph@redhat.com>
36278
36279         PR tree-optimization/79943
36280         * tree-ssa-loop-split.c (compute_new_first_bound): When
36281         calculating the new upper bound, (END-BEG) should be added, not
36282         subtracted.
36283
36284 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
36285
36286         * config/avr/avr.md (setmemhi): Make sure match_dup
36287         operand number comes before match_scratch.
36288
36289 2017-03-08  Richard Biener  <rguenther@suse.de>
36290
36291         PR tree-optimization/79920
36292         * tree-vect-slp.c (vect_create_mask_and_perm): Remove and inline
36293         with ncopies == 1 to ...
36294         (vect_transform_slp_perm_load): ... here.  Properly compute
36295         all element loads by iterating VF times over the group.  Do
36296         not handle ncopies (computed in a broken way) in
36297         vect_create_mask_and_perm.
36298
36299 2017-03-08  Jakub Jelinek  <jakub@redhat.com>
36300
36301         PR sanitizer/79904
36302         * internal-fn.c (expand_vector_ubsan_overflow): If arg0 or arg1
36303         is a uniform vector, use uniform_vector_p return value instead of
36304         building ARRAY_REF on folded VIEW_CONVERT_EXPR to array type.
36305
36306 2017-03-07  Marek Polacek  <polacek@redhat.com>
36307
36308         PR middle-end/79809
36309         * gimple-ssa-warn-alloca.c (pass_walloca::gate): Use HOST_WIDE_INT.
36310         (alloca_call_type): Likewise.
36311
36312 2017-03-07  Martin Liska  <mliska@suse.cz>
36313
36314         * gcov.c (process_args): Put comment to correct location.
36315
36316 2017-03-07  Martin Liska  <mliska@suse.cz>
36317
36318         PR middle-end/68270
36319         * tree-chkp.c (chkp_may_narrow_to_field): Add new argument ref.
36320         Use array_at_struct_end_p instead of DECL_CHAIN (field).
36321         (chkp_narrow_bounds_for_field): Likewise.
36322         (chkp_parse_array_and_component_ref): Pass one more argument to
36323         call.
36324
36325 2017-03-07  Richard Biener  <rguenther@suse.de>
36326
36327         * tree-vect-loop-manip.c (slpeel_add_loop_guard): Preserve
36328         preheaders.
36329
36330 2017-03-07  Segher Boessenkool  <segher@kernel.crashing.org>
36331
36332         * config/i386/i386.c (ix86_local_alignment): Align most aggregates
36333         of 16 bytes and more to 16 bytes, not those of 16 bits and more.
36334
36335 2017-03-07  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
36336
36337         PR c/79855
36338         * params.def (PARAM_STORE_MERGING_ALLOW_UNALIGNED): Add full stop
36339         to end of description.
36340         (PARAM_MAX_STORES_TO_MERGE): Likewise.
36341
36342 2017-03-07  Jakub Jelinek  <jakub@redhat.com>
36343
36344         PR rtl-optimization/79901
36345         * config/i386/sse.md (*avx512bw_<code><mode>3<mask_name>): Renamed to
36346         ...
36347         (*avx512f_<code><mode>3<mask_name>): ... this.
36348         (<code><mode>3 with maxmin code iterator): Use VI8_AVX2_AVX512F
36349         iterator instead of VI8_AVX2_AVX512BW.
36350
36351         PR rtl-optimization/79901
36352         * expr.c (expand_expr_real_2): For vector MIN/MAX, if there is no
36353         min/max expander, expand it using expand_vec_cond_expr.
36354
36355         PR sanitizer/79897
36356         * ubsan.c (ubsan_encode_value): Call mark_addressable on the
36357         temporary.
36358
36359 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
36360
36361         PR c++/79821
36362         * dwarf2out.h (dw_vec_const): Change array type from unsigned char *
36363         to void * for PCH reasons.
36364         * dwarf2out.c (output_loc_operands, output_die): Cast
36365         v.val_vec.array to unsigned char *.
36366
36367 2017-03-06  John David Anglin  <danglin@gcc.gnu.org>
36368
36369         PR target/77850
36370         * config/pa/pa-64.h (PAD_VARARGS_DOWN): Don't pad down complex and
36371         vector types.
36372
36373 2017-03-06  Vladimir Makarov  <vmakarov@redhat.com>
36374
36375         PR rtl-optimization/79571
36376         * lra-constraints.c (process_alt_operands): Calculate static
36377         reject and subtract it from overall when only addresses will be
36378         reloaded.
36379
36380 2017-03-06  Julia Koval  <julia.koval@intel.com>
36381
36382         PR target/79793
36383         * config/i386/i386.c (ix86_minimum_incoming_stack_boundary): Set
36384         incoming stack boundary to 128 for 64-bit targets.
36385
36386 2017-03-06  Richard Biener  <rguenther@suse.de>
36387
36388         PR tree-optimization/79894
36389         * tree-vectorizer.c (vectorize_loops): Set loop_vectorized_call
36390         to NULL after folding it.
36391
36392 2017-03-06  Richard Biener  <rguenther@suse.de>
36393
36394         PR tree-optimization/79824
36395         * tree-vect-stmts.c (get_group_load_store_type): Fix alignment
36396         check disabling peeling for gaps.
36397
36398 2017-03-06  Toma Tabacu  <toma.tabacu@imgtec.com>
36399
36400         * doc/sourcebuild.texi (Effective-Target Keywords, Environment
36401         attributes): Document gettimeofday.
36402
36403 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
36404
36405         * config/s390/s390.c (s390_option_override_internal): Set
36406         PARAM_MIN_VECT_LOOP_BOUND
36407
36408 2017-03-06  Robin Dapp  <rdapp@linux.vnet.ibm.com>
36409
36410         * config/s390/s390.c (s390_asm_output_function_label): Use nopr %r0.
36411         * config/s390/s390.md: Likewise.
36412
36413 2017-03-06  Jakub Jelinek  <jakub@redhat.com>
36414
36415         PR target/79812
36416         * config/i386/sse.md (VI8F_256_512): Remove mode iterator.
36417         (<avx2_avx512>_perm<mode>): Rename to ...
36418         (avx2_perm<mode>): ... this.  Use VI8F_256 iterator instead
36419         of VI8F_256_512.
36420         (<avx512>_perm<mode>_mask): Rename to ...
36421         (avx512vl_perm<mode>_mask): ... this.  Use VI8F_256 iterator instead
36422         of VI8F_256_512.
36423         (<avx2_avx512>_perm<mode>_1<mask_name>): Rename to ...
36424         (avx2_perm<mode>_1<mask_name): ... this.  Use VI8F_256 iterator
36425         instead of VI8F_256_512.
36426         (avx512f_perm<mode>): New define_expand.
36427         (avx512f_perm<mode>_mask): Likewise.
36428         (avx512f_perm<mode>_1<mask_name>): New define_insn.
36429         (<avx512>_vec_dup<mode>_1): Fix up vec_select mode.
36430
36431 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
36432
36433         * config/mips/mips-msa.md (msa_fmax_a_<msafmt>, msa_fmin_a_<msafmt>,
36434         msa_max_a_<msafmt>, msa_min_a_<msafmt>): Introduce mode interator for
36435         if_then_else.
36436         (smin<mode>3, smax<mode>3): Change operand print code from 'B' to 'E'.
36437
36438 2017-03-06  Martin Liska  <mliska@suse.cz>
36439
36440         PR sanitize/79783
36441         * asan.c (asan_expand_poison_ifn): Do not expand ASAN_POISON
36442         when having a SSA NAME w/o VAR_DECL assigned to it.
36443
36444 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
36445
36446         * config/mips/mips-msa.md (msa_dotp_<su>_d, msa_dpadd_<su>_d,
36447         msa_dpsub_<su>_d): Fix MODE for vec_select.
36448
36449 2017-03-06  Prachi Godbole  <prachi.godbole@imgtec.com>
36450
36451         * config/mips/mips.c (mips_gen_const_int_vector): Change type of last
36452         argument.
36453         * config/mips/mips-protos.h (mips_gen_const_int_vector): Likewise.
36454
36455 2017-03-06  Richard Biener  <rguenther@suse.de>
36456
36457         * lto-streamer.c (lto_check_version): Use %qs in diagnostics.
36458         * plugin.c (register_plugin_info): Likewise.
36459         * tree-chkp.c (chkp_make_static_const_bounds): Likewise.
36460
36461 2017-03-05  Jakub Jelinek  <jakub@redhat.com>
36462
36463         * config/i386/sse.md (sse_storehps, sse_storelps,
36464         avx_<castmode><avxsizesuffix>_<castmode>,
36465         avx512f_<castmode><avxsizesuffix>_<castmode>,
36466         avx512f_<castmode><avxsizesuffix>_256<castmode>): Require
36467         in condition that at least one operand is not a MEM.
36468
36469 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
36470
36471         PR middle-end/79805
36472         * internal-fn.def (ATOMIC_BIT_TEST_AND_SET, ATOMIC_BIT_TEST_AND_RESET,
36473         ATOMIC_BIT_TEST_AND_COMPLEMENT, ATOMIC_COMPARE_EXCHANGE): Remove
36474         ECF_NOTHROW.
36475         * gimple-fold.c (fold_builtin_atomic_compare_exchange): Set
36476         gimple_call_nothrow_p flag based on whether original builtin can throw.
36477         If it can, emit following stmts on the fallthrough edge.
36478         * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Similarly, except
36479         don't create new bb if inserting just debug stmts on the edge, try to
36480         insert them on the fallthru bb or just reset debug stmts.
36481
36482 2017-03-03  Segher Boesssenkool  <segher@kernel.crashing.org>
36483
36484         PR target/43763
36485         * config/rs6000/rs6000.c (rs6000_final_prescan_insn): Save and
36486         restore recog_data (including the operand rtxes inside it) around
36487         the call to get_insn_template.
36488
36489 2017-03-03  Martin Sebor  <msebor@redhat.com>
36490
36491         PR tree-optimization/79699
36492         * context.c (context::~context): Free MPFR caches to avoid
36493         a memory leak on program exit.
36494
36495 2017-03-03  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
36496
36497         * config/aarch64/aarch64.c (aarch64_float_const_representable_p):
36498         Use wide_int::ulow () instead of .elt (0).
36499
36500 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
36501
36502         * config/i386/i386.md (*pushtf): Change *roF constraint to *roC.
36503         (*pushxf): Limit oF constraint to 32bit targets and add oC
36504         constraint for 64bit targets.
36505         (pushxf splitter): Use PUSH_ROUNDING to calculate stack adjustment.
36506         (*pushdf): Change rmF constraint to rmC.
36507
36508 2017-03-03  Martin Liska  <mliska@suse.cz>
36509
36510         * tree-ssa-loop-prefetch.c (pass_loop_prefetch::execute):
36511         Remove unused variable.
36512
36513 2017-03-03  Jakub Jelinek  <jakub@redhat.com>
36514
36515         PR target/79807
36516         * config/i386/i386.c (ix86_expand_multi_arg_builtin): If target
36517         is a memory operand, increase num_memory.
36518         (ix86_expand_args_builtin): Likewise.
36519
36520 2017-03-03  Jan Hubicka  <jh@suse.cz>
36521
36522         PR lto/79760
36523         * ipa-devirt.c (maybe_record_node): Properly handle
36524         __cxa_pure_virtual visibility.
36525
36526 2017-03-03  Martin Liska  <mliska@suse.cz>
36527
36528         PR tree-optimization/79803
36529         * tree-ssa-loop-prefetch.c (tree_ssa_prefetch_arrays): Remove
36530         assert.
36531         (pass_loop_prefetch::execute): Disabled optimization if an
36532         assumption about L1 cache size is not met.
36533
36534 2017-03-03  Martin Liska  <mliska@suse.cz>
36535
36536         PR rtl-optimization/79574
36537         * gcse.c (struct gcse_expr): Use HOST_WIDE_INT instead of int.
36538         (hash_scan_set): Likewise.
36539         (dump_hash_table): Likewise.
36540         (hoist_code): Likewise.
36541
36542 2017-03-03  Richard Biener  <rguenther@suse.de>
36543
36544         * fixed-value.c (fixed_from_string): Restore use of elt (1)
36545         in place of uhigh ().
36546         (fixed_convert_from_real): Likewise.
36547
36548 2017-03-03  Uros Bizjak  <ubizjak@gmail.com>
36549
36550         PR target/79514
36551         * config/i386/i386.md (*pushxf_rounded): Use Pmode instead of DImode.
36552
36553 2017-03-03  Richard Biener  <rguenther@suse.de>
36554
36555         PR middle-end/79818
36556         * match.pd ( X +- C1 CMP C2 -> X CMP C2 -+ C1): Add missing
36557         TYPE_OVERFLOW_UNDEFINED check.
36558
36559 2017-03-02  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
36560
36561         * config/rs6000/vector.md (vector_ne_<mode>_p): Correct operand
36562         numbers.
36563         (vector_ae_<mode>_p): Likewise.
36564         (vector_nez_<mode>_p): Likewise.
36565         (vector_ne_v2di_p): Likewise.
36566         (vector_ae_v2di_p): Likewise.
36567         (vector_ne_<mode>_p): Likewise.
36568         * config/rs6000/vsx.md (vsx_tsqrt<mode>2_fg): Correct operand
36569         numbers.
36570         (vsx_tsqrt<mode>2_fe): Likewise.
36571
36572 2017-03-02  Uros Bizjak  <ubizjak@gmail.com>
36573
36574         PR target/79514
36575         * config/i386/i386.md (*pushxf_rounded): New insn_and_split pattern.
36576
36577 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
36578
36579         PR rtl-optimization/79780
36580         * cprop.c (one_cprop_pass): When second and further conditional trap
36581         in a single basic block is turned into an unconditional trap, turn it
36582         into a deleted note to avoid RTL verification failures.
36583
36584 2017-03-02  Richard Biener  <rguenther@suse.de>
36585
36586         * fold-const.c (const_binop): Use ulow () instead of elt (0).
36587
36588 2017-03-02  Richard Biener  <rguenther@suse.de>
36589
36590         PR tree-optimization/79345
36591         PR c++/42000
36592         * tree-ssa-alias.c (walk_aliased_vdefs_1): Take a limit
36593         param and abort the walk, returning -1 if it is hit.
36594         (walk_aliased_vdefs): Take a limit param and pass it on.
36595         * tree-ssa-alias.h (walk_aliased_vdefs): Add a limit param,
36596         defaulting to 0 and return a signed int.
36597         * tree-ssa-uninit.c (struct check_defs_data): New struct.
36598         (check_defs): New helper.
36599         (warn_uninitialized_vars): Use walk_aliased_vdefs to warn
36600         about uninitialized memory.
36601         * fixed-value.c (fixed_from_string): Use ulow/uhigh to avoid
36602         bogus uninitialized warning.
36603         (fixed_convert_from_real): Likewise.
36604
36605 2017-03-02  Bin Cheng  <bin.cheng@arm.com>
36606
36607         PR tree-optimization/66768
36608         * tree-ssa-loop-ivopts.c (find_interesting_uses_address): Skip addr
36609         iv_use if base object can't be determined.
36610
36611 2017-03-02  Jakub Jelinek  <jakub@redhat.com>
36612
36613         PR tree-optimization/79345
36614         * gensupport.h (struct pattern_stats): Add min_scratch_opno field.
36615         * gensupport.c (get_pattern_stats_1) <case MATCH_SCRATCH>: Update it.
36616         (get_pattern_stats): Initialize it.
36617         * genemit.c (gen_expand): Verify match_scratch numbers come after
36618         match_operand/match_dup numbers.
36619         * config/i386/i386.md (<s>mul<mode>3_highpart): Swap match_dup and
36620         match_scratch numbers.
36621         * config/i386/sse.md (avx2_gathersi<mode>, avx2_gatherdi<mode>):
36622         Likewise.
36623         * config/s390/s390.md (trunctdsd2): Likewise.
36624
36625 2017-03-02  Richard Biener  <rguenther@suse.de>
36626
36627         * wide-int.h (wide_int_storage::operator=): Implement in terms
36628         of wi::copy.
36629
36630 2017-03-02  Richard Biener  <rguenther@suse.de>
36631
36632         PR tree-optimization/79777
36633         * tree-ssa-pre.c (eliminate_insert): Give up if we simplify
36634         the to insert expression to sth existing.
36635
36636 2017-03-01  Martin Sebor  <msebor@redhat.com>
36637
36638         PR middle-end/79692
36639         * gimple-ssa-sprintf.c
36640         (directive::known_width_and_precision): New function.
36641         (format_integer): Use it.
36642         (get_mpfr_format_length): Consider the full range of precision
36643         when computing %g output with the # flag.  Set the likely byte
36644         count to 3 rather than 1 when precision is indeterminate.
36645         (format_floating): Correct the lower bound of precision.
36646
36647 2017-03-01  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
36648
36649         * doc/invoke.texi: Document default code model for 64-bit Linux.
36650
36651 2017-03-01  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
36652
36653         PR target/79752
36654         * config/rs6000/rs6000.md (peephole2 for udiv/umod): Should emit
36655         udiv rather than div since input pattern is unsigned.
36656
36657 2017-03-01  Uros Bizjak  <ubizjak@gmail.com>
36658
36659         * config/i386/i386.c (print_reg): Warn for values of
36660         unsupported size in integer register.
36661
36662 2017-03-01  Michael Meissner  <meissner@linux.vnet.ibm.com>
36663
36664         PR target/79439
36665         * config/rs6000/predicates.md (current_file_function_operand): Do
36666         not allow self calls to be local if the function is replaceable.
36667
36668 2017-03-01  Kelvin Nilsen  <kelvin@gcc.gnu.org>
36669
36670         PR target/79395
36671         * config/rs6000/altivec.h (vec_ctz and others): Change the
36672         preprocessor macro that controls conditional compilation from
36673         _ARCH_PWR9 to __POWER9_VECTOR__.
36674         (vec_all_ne): Change parameterization of __altivec_scalar_pred
36675         macro expansion under preprocessor #ifdef __POWER9_VECTOR__
36676         control (instead of _ARCH_PWR9 control) so that template
36677         definition uses power9-specific function.
36678         (vec_any_eq): Likewise.
36679         (vec_all_ne): Change macro definition to use a power9-specific
36680         expansion under #ifdef __POWER9_VECTOR__ control (instead of
36681         _ARCH_PWR9 control).
36682         (vec_any_eq) Likewise.
36683         * config/rs6000/rs6000-builtin.def (CMPNEF): Remove BU_P9V_AV_2
36684         expansion for CMPNEF to remove support for xvcmpnesp instruction.
36685         (CMPNED): Remove BU_P9V_AV2 expansion for CMPNED to remove
36686         support for xvcmpnedp instruction.
36687         (VCMPNEB_P): Replace BU_P9V_AV_P macro expansion with BU_P9V_AV_2
36688         macro expansion so that Power9 implementation of vec_all_ne does
36689         not use the AltiVec predicate framework.
36690         (VCMPNEH_P): Likewise.
36691         (VCMPNEW_P): Likewise.
36692         (VCMPNED_P): Likewise.
36693         (VCMPNEFP_P): Likewise.
36694         (VCMPNEDP_P): Likewise.
36695         (VCMPAEB_P): Add BU_P9V_AV_2 macro expansion to change
36696         implementation of vec_any_eq to not use AltiVec predicate
36697         framework.
36698         (VCMPAEH_P): Likewise.
36699         (VCMPAEW_P): Likewise.
36700         (VCMPAED_P): Likewise.
36701         (VCMPAEFP_P): Likewise.
36702         (VCMPAEDP_P): Likewise.
36703         (VCMPNE_P): Replace BU_P9V_OVERLOAD_P macro expansion with
36704         BU_P9V_OVERLOAD_2 so that Power9 implementation of vec_all_ne does
36705         not use the AltiVec predicate framework.
36706         (VCMPAE_P): Add BU_P9V_OVERLOAD_2 macro to change implementation
36707         of vec_any_eq to not use AltiVec predicate framework.
36708         * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Add
36709         support for predefined __POWER9_VECTOR__ macro to indicate that
36710         Power9 instruction selection is enabled.
36711         (altivec_overloaded_builtins): Remove extraneous
36712         ALTIVEC_BUILTIN_VEC_CMPNE entry for overloaded
36713         function argument types RS6000_BTI_bool_V16QI and
36714         RS6000_BTI_bool_V16QI.  Remove erroneous ALTIVEC_BUILTIN_VEC_CMPNE
36715         entry for overloaded function argument types RS6000_BTI_bool_V4SI
36716         andRS6000_BTI_bool_V4SI, mapping to P9V_BUILTIN_CMPNEB.  Remove
36717         two entries mapping to P9V_BUITIN_CMPNED and one entry mapping to
36718         P9V_BUILTIN_CMPNEF to force use of instructions not specific to
36719         Power9 for implementations of vec_cmpne.  Change the signature for
36720         all definitions of the overloaded P9V_BUILTIN_VEC_CMPNE_P function
36721         (representing vec_all_ne) to remove the previously described first
36722         argument of type RS6000_BTI_INTSI, as this was an artifact of
36723         reliance on the AltiVec predicate framework, which is no longer
36724         used in the implementation of these functions.  Add
36725         P9V_BUILTIN_VEC_VCMPAE_P entries (representing the vec_anyeq
36726         function) to match all of the P9V_BUILTIN_VEC_VCMNE_P entries
36727         since, unlike the AltiVec predicate framework implementation, we
36728         do not share function descriptors between vec_alle and vec_anyeq.
36729         (altivec_resolve_overloaded_builtin): Add SFmode and DFmode to the
36730         set of modes that receive special treatment even when
36731         TARGET_P9_VECTOR is true.  The special treatment emits code that
36732         does not depend on Power9 instructions.
36733         * config/rs6000/vector.md (vector_ne_<mode>_p): Change this
36734         define_expand to not rely on AltiVec predicate framework.
36735         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
36736         function.
36737         (vector_ne_v2di_p): Change this define_expand to not rely on
36738         AltiVec predicate framework.
36739         (vector_ae_v2di_p): New define_expand to represent vec_any_eq
36740         function.
36741         (vector_ne_<mode>_p): Change this define_expand to not rely on
36742         AltiVec predicate framework.
36743         (vector_ae_<mode>p): New define_expand to represent vec_any_eq
36744         function.
36745         * config/rs6000/vsx.md (*vsx_ne_<mode>_p): For modes VSX_EXTRACT_I
36746         (V16QI, V8HI, V4SI), correct a typo in the code emitted for this
36747         define_insn pattern.
36748         (*vsx_ne_<mode>_p): For modes VSX_F (V4SF and V2DF), remove this
36749         define_insn pattern because the xvcmpne<VSs>. instruction is not
36750         supported.
36751         (vcmpne<VSs>): Remove this define_insn because xvcmpne<VSs>
36752         instruction is not supported.
36753
36754 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
36755
36756         * config/nvptx/nvptx.c: Include intl.h.
36757
36758 2017-03-01  Martin Jambor  <mjambor@suse.cz>
36759
36760         PR lto/78140
36761         * ipa-prop.h (ipa_bits): Removed field known.
36762         (ipa_jump_func): Removed field vr_known.  Changed fields bits and m_vr
36763         to pointers.  Adjusted their comments to warn about their sharing.
36764         (ipcp_transformation_summary): Change bits to a vector of pointers.
36765         (ipa_check_create_edge_args): Moved to ipa-prop.c, declare.
36766         (ipa_get_ipa_bits_for_value): Declare.
36767         * tree-vrp.h (value_range): Mark as GTY((for_user)).
36768         * ipa-prop.c (ipa_bit_ggc_hash_traits): New.
36769         (ipa_bits_hash_table): Likewise.
36770         (ipa_vr_ggc_hash_traits): Likewise.
36771         (ipa_vr_hash_table): Likewise.
36772         (ipa_print_node_jump_functions_for_edge): Adjust for bits and m_vr
36773         being pointers and vr_known being removed.
36774         (ipa_set_jf_unknown): Likewise.
36775         (ipa_get_ipa_bits_for_value): New function.
36776         (ipa_set_jfunc_bits): Likewise.
36777         (ipa_get_value_range): New overloaded functions.
36778         (ipa_set_jfunc_vr): Likewise.
36779         (ipa_compute_jump_functions_for_edge): Use the above functions to
36780         construct bits and vr parts of jump functions.
36781         (ipa_check_create_edge_args): Move here from ipa-prop.h, also allocate
36782         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
36783         exist.
36784         (ipcp_grow_transformations_if_necessary): Also allocate
36785         ipa_bits_hash_table and ipa_vr_hash_table if they do not already
36786         exist.
36787         (ipa_node_params_t::duplicate): Do not copy bits, just pointers to
36788         them.  Fix too long lines.
36789         (ipa_write_jump_function): Adjust for bits and m_vr being pointers and
36790         vr_known being removed.
36791         (ipa_read_jump_function): Use new setter functions to construct bits
36792         and vr parts of jump functions or set them to NULL.
36793         (write_ipcp_transformation_info): Adjust for bits being pointers.
36794         (read_ipcp_transformation_info): Likewise.
36795         (ipcp_update_bits): Likewise.  Fix excessively long lines a trailing
36796         space.
36797         Include gt-ipa-prop.h.
36798         * ipa-cp.c (propagate_bits_across_jump_function): Adjust for bits
36799         being pointers.
36800         (ipcp_store_bits_results): Likewise.
36801         (propagate_vr_across_jump_function): Adjust for m_vr being a pointer.
36802         Do not write to existing jump functions but use a temporary instead.
36803
36804 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
36805
36806         PR c++/79681
36807         * fold-const.c (make_bit_field_ref): If orig_inner is COMPONENT_REF,
36808         attempt to use its first operand as BIT_FIELD_REF base.
36809
36810 2017-03-01  Richard Biener  <rguenther@suse.de>
36811
36812         PR middle-end/79721
36813         * tree-chrec.c (chrec_evaluate): Perform computation of Newtons
36814         interpolating formula in wrapping arithmetic.
36815         (chrec_apply): Convert chrec_evaluate return value to wanted type.
36816
36817 2017-03-01  Jakub Jelinek  <jakub@redhat.com>
36818
36819         PR tree-optimization/79734
36820         * tree-vect-generic.c (expand_vector_condition): Optimize
36821         AVX512 vector boolean VEC_COND_EXPRs into bitwise operations.
36822         Handle VEC_COND_EXPR where comparison has different inner width from
36823         type's inner width.
36824
36825 2017-02-28  Sandra Loosemore  <sandra@codesourcery.com>
36826
36827         * doc/invoke.texi (ARC Options): Copy-edit to fix punctuation,
36828         markup, and similar issues.  Remove @opindex entries for things
36829         that aren't options.  Add missing -mmpy-option entries.
36830
36831 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
36832
36833         PR tree-optimization/79737
36834         * gimple-ssa-store-merging.c (encode_tree_to_bitpos): If bitlen is
36835         a multiple of BITS_PER_UNIT and !BYTES_BIG_ENDIAN, clear
36836         tmpbuf[byte_size - 1].  Call natice_encode_expr with byte_size - 1
36837         instead of byte_size.  Formatting fix.
36838         (shift_bytes_in_array_right): Formatting fix.
36839
36840 2017-02-28  Eric Botcazou  <ebotcazou@adacore.com>
36841
36842         PR target/79749
36843         * config/sparc/sparc.c (sparc_frame_pointer_required): Add missing
36844         condition on optimize for the leaf function test.
36845
36846 2017-02-28  Martin Liska  <mliska@suse.cz>
36847
36848         PR lto/79625
36849         * read-rtl-function.c (function_reader::handle_unknown_directive):
36850         Bail out when one uses -flto.
36851
36852 2017-02-28  Martin Liska  <mliska@suse.cz>
36853
36854         * common.opt: Replace space with tabular for options of <number>
36855         type.
36856         * config/i386/i386.opt: Show <number> value for
36857         -mlarge-data-threshold.
36858         * opts.c (print_filtered_help): Do not display number in hexadecimal
36859         format.
36860
36861 2017-02-28  Martin Liska  <mliska@suse.cz>
36862
36863         * common.opt: Fix --help=option -Q for options which are of
36864         an enum type.
36865
36866 2017-02-28  Uros Bizjak  <ubizjak@gmail.com>
36867
36868         * config/i386/i386.c (print_reg): Error out for values
36869         of 8-bit size in invalid integer register.
36870
36871 2017-02-28  Martin Sebor  <msebor@redhat.com>
36872
36873         PR tree-optimization/79691
36874         * passes.def (pass_all_optimizations_g): Enable pass_sprintf_length.
36875
36876 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
36877
36878         PR target/79729
36879         * config/i386/i386.c (ix86_print_operand) <case 'R'>: Replace
36880         gcc_unreachable with output_operand_lossage.
36881
36882 2017-02-28  Richard Biener  <rguenther@suse.de>
36883
36884         PR tree-optimization/79740
36885         * tree-ssa-sccvn.c (vn_nary_op_insert_into): Allow redundant
36886         inserts.
36887         (visit_nary_op): Insert the nary into the hashtable if we
36888         pattern-matched sth.
36889         * tree-ssa-pre.c (eliminate_insert): Robustify.
36890
36891 2017-02-28  Richard Biener  <rguenther@suse.de>
36892
36893         PR middle-end/79731
36894         * fold-const.c (decode_field_reference): Reject out-of-bound
36895         accesses.
36896
36897 2017-02-28  Jakub Jelinek  <jakub@redhat.com>
36898
36899         * config/i386/i386.c: Include intl.h.
36900         (ix86_option_override_internal): Use cond ? G_("...") : G_("...")
36901         instead of just cond ? "..." : "...".
36902         * config/nvptx/nvptx.c (nvptx_goacc_validate_dims): Likewise.
36903         * coverage.c (read_counts_file): Likewise.
36904         * omp-offload.c: Include intl.h.
36905         (oacc_loop_fixed_partitions): Use cond ? G_("...") : G_("...") instead
36906         of just cond ? "..." : "...".
36907         * gcov.c (read_count_file): Use cond ? N_("...") : N_("...") instead
36908         of just cond ? "..." : "...".
36909
36910 2017-02-28  Richard Earnshaw  <rearnsha@arm.com>
36911
36912         PR target/79742
36913         * config/arm/parsecpu.awk (gen_data): Set tuning target to 'tune for'
36914         entry, if present.
36915         * config/arm/arm-cpus.in (cortex-m0plus.small-multiply): Correct
36916         'tune for' CPU name.
36917         * config/arm/arm-cpu-data.h: Regenerated.
36918
36919 2017-02-28  Richard Biener  <rguenther@suse.de>
36920
36921         PR tree-optimization/79732
36922         * tree-inline.c (expand_call_inline): Do not shadow var.
36923
36924 2017-02-28  Richard Biener  <rguenther@suse.de>
36925
36926         PR tree-optimization/79723
36927         * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Preserve
36928         address-space properly.
36929
36930 2017-02-28  Thomas Schwinge  <thomas@codesourcery.com>
36931
36932         * doc/optinfo.texi (Optimization groups): Fix option used for
36933         OPTGROUP_ALL.
36934         * doc/invoke.texi (-fopt-info): Document "omp".
36935         * dumpfile.h: Sort OPTGROUP_OMP before OPTGROUP_VEC.
36936         (OPTGROUP_ALL): Add OPTGROUP_OMP.
36937         * hsa-gen.c (pass_data_gen_hsail): Use OPTGROUP_OMP.
36938         * ipa-hsa.c (pass_data_ipa_hsa): Likewise.
36939         * omp-simd-clone.c (pass_data_omp_simd_clone): Likewise.
36940
36941         * dumpfile.h (OPTGROUP_OPENMP): Rename to OPTGROUP_OMP.  Adjust
36942         all users.
36943         * dumpfile.c (optgroup_options): Instead of "openmp", associate
36944         OPTGROUP_OMP with "omp".
36945
36946 2017-02-27  Pat Haugen  <pthaugen@us.ibm.com>
36947
36948         PR target/79544
36949         * config/rs6000/rs6000-c.c (struct altivec_builtin_types): Use VSRAD
36950         for arithmetic shift of unsigned V2DI.
36951
36952 2017-02-27  Claudiu Zissulescu  <claziss@synopsys.com>
36953
36954         * config.gcc (arc*-): Clean up, use arc/big.h, arc/elf.h, and
36955         arc/linux.h headers.
36956         * config/arc/arc.h (TARGET_OS_CPP_BUILTINS): Remove.
36957         (LINK_SPEC): Likewise.
36958         (ARC_TLS_EXTRA_START_SPEC): Likewise.
36959         (EXTRA_SPECS): Likewise.
36960         (STARTFILE_SPEC): Likewise.
36961         (ENDFILE_SPEC): Likewise.
36962         (LIB_SPEC): Likewise.
36963         (TARGET_SDATA_DEFAULT): Likewise.
36964         (TARGET_MMEDIUM_CALLS_DEFAULT): Likewise.
36965         (MULTILIB_DEFAULTS): Likewise.
36966         (DWARF2_UNWIND_INFO): Likewise.
36967         * config/arc/big.h: New file.
36968         * config/arc/elf.h: Likewise.
36969         * config/arc/linux.h: Likewise.
36970         * config/arc/t-uClibc: Remove.
36971
36972 2017-02-27  Bin Cheng  <bin.cheng@arm.com>
36973
36974         PR tree-optimization/77536
36975         * tree-ssa-loop-manip.c (niter_for_unrolled_loop): New function.
36976         (tree_transform_and_unroll_loop): Use above function to compute the
36977         estimated niter of unrolled loop and use it when scaling profile.
36978         Also use count info rather than frequency if it's non-zero.
36979         * tree-ssa-loop-manip.h niter_for_unrolled_loop(): New declaration.
36980         * tree-vect-loop.c (scale_profile_for_vect_loop): New function.
36981         (vect_transform_loop): Call above function.
36982
36983 2017-02-27  Richard Biener  <rguenther@suse.de>
36984
36985         PR tree-optimization/45397
36986         * tree-ssa-pre.c (eliminate_insert): Handle BIT_AND_EXPR.
36987         * tree-ssa-sccvn.c (valueized_wider_op): New helper.
36988         (visit_nary_op): Add pattern matching for CSEing sign-changed
36989         or truncated operations with wider ones.
36990
36991 2017-02-27  Richard Biener  <rguenther@suse.de>
36992
36993         PR tree-optimization/79690
36994         * tree-vect-stmts.c (vectorizable_store): Use vector type
36995         built from the DR with address-space.
36996
36997 2017-02-26  Gerald Pfeifer  <gerald@pfeifer.com>
36998
36999         * doc/invoke.texi (Optimize Options): Refine the description
37000         of asan-use-after-return.
37001
37002 2017-02-25  Alan Modra  <amodra@gmail.com>
37003
37004         PR rtl-optimization/79584
37005         * lra-constraints.c (base_to_reg): Reload ad->base, the entire
37006         base, not ad->base_term, the reg within base.  Remove assertion
37007         that ad->base == ad->base_term.  Replace gen_int_mode using
37008         bogus mode with const0_rtx.
37009
37010 2017-02-25  Jakub Jelinek  <jakub@redhat.com>
37011
37012         PR middle-end/79396
37013         * tree-eh.c (operation_could_trap_p, stmt_could_throw_1_p): Handle
37014         FMA_EXPR like tcc_binary or tcc_unary.
37015
37016         * tree-ssa-loop-niter.c (number_of_iterations_exit): Simplify warning.
37017
37018         PR debug/77589
37019         * dwarf2out.c (struct dw_loc_list_struct): Add noted_variable_value
37020         bitfield.
37021         (size_of_loc_descr): Handle DW_OP_GNU_variable_value.
37022         (output_loc_operands): Handle DW_OP_call_ref and
37023         DW_OP_GNU_variable_value.
37024         (struct variable_value_struct): New type.
37025         (struct variable_value_hasher): Likewise.
37026         (variable_value_hash): New variable.
37027         (string_types): Remove.
37028         (copy_loc_descr): New function.
37029         (add_loc_descr_to_each): Clarify comment.  Use copy_loc_descr.
37030         (prepend_loc_descr_to_each): New function.
37031         (add_loc_list): Fix comment typo.  Use prepend_loc_descr_to_each
37032         instead of add_loc_descr_to_each if the first argument is single
37033         location list and the second has multiple.
37034         (resolve_args_picking_1): Handle DW_OP_GNU_variable_value.
37035         (loc_list_from_tree_1): For early_dwarf, emit DW_OP_GNU_variable_value
37036         when looking for variable value which doesn't have other location info.
37037         (loc_list_from_tree): Formatting fix.
37038         (gen_array_type_die): Simplify DW_AT_string_length handling.
37039         (adjust_string_types): Remove.
37040         (gen_subprogram_die): Don't call adjust_string_types nor test/set
37041         string_types.  Call resolve_variable_values.
37042         (prune_unused_types_walk_loc_descr): Handle DW_OP_GNU_variable_value.
37043         (resolve_addr_in_expr): Likewise.  Add A argument.
37044         (copy_deref_exprloc): Remove deref argument.  Adjust for the
37045         original expression being DW_OP_GNU_variable_value with optionally
37046         DW_OP_stack_value after it instead of DW_OP_call4 with DW_OP_deref
37047         optionally after it.
37048         (optimize_string_length): Rework for DW_OP_GNU_variable_value.
37049         (resolve_addr): Adjust optimize_string_length and resolve_addr_in_expr
37050         callers.  Set remove_AT_byte_size if removing DW_AT_string_length.
37051         (variable_value_hasher::hash, variable_value_hasher::equal): New
37052         methods.
37053         (resolve_variable_value_in_expr, resolve_variable_value,
37054         resolve_variable_values, note_variable_value_in_expr,
37055         note_variable_value): New functions.
37056         (dwarf2out_early_finish): Call note_variable_value on all toplevel
37057         DIEs.
37058
37059 2017-02-24  Jakub Jelinek  <jakub@redhat.com>
37060
37061         PR c/79677
37062         * opts.h (handle_generated_option): Add GENERATED_P argument.
37063         * opts-common.c (handle_option): Adjust function comment.
37064         (handle_generated_option): Add GENERATED_P argument, pass it to
37065         handle_option.
37066         (control_warning_option): Pass false to handle_generated_option
37067         GENERATED_P.
37068         * opts.c (maybe_default_option): Pass true to handle_generated_option
37069         GENERATED_P.
37070         * optc-gen.awk: Likewise.
37071
37072 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
37073
37074         * config/sh/sh.md (tstsi_t): If operands[0] is a SUBREG instead of
37075         a REG, look at the REG it is a SUBREG of.
37076         (splitter for cmpeqsi_t): Ditto.
37077
37078 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
37079
37080         * config/pa/pa.c (pa_combine_instructions): Do not share RTL.  Make
37081         the special USEs with the pattern of the insn, not the insn itself.
37082
37083 2017-02-24  Matthew Fortune  <matthew.fortune@imgtec.com>
37084
37085         PR target/79473
37086         * doc/invoke.texi: Document -mload-store-pairs.
37087
37088 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
37089             Sandra Loosemore  <sandra@codesourcery.com>
37090
37091         * config/nios2/nios2.c (nios2_simple_const_p): Returns false if the
37092         argument isn't a CONST_INT.
37093         (nios2_alternate_compare_const): Assert op is a CONST_INT.
37094         (nios2_valid_compare_const_p): Assert op is a CONST_INT.
37095         (nios2_validate_compare): Bypass alternate compare logic if *op2
37096         is not a CONST_INT.
37097         (ldstwm_operation_p): Return false if first_base is not a REG or
37098         if first_offset is not a CONST_INT.
37099
37100 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
37101
37102         * config/cris/cris.md: Use correct operand in a define_peephole2.
37103
37104 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
37105
37106         * config/c6x/c6x.c (predicate_insn): Do not incorrectly share RTL.
37107
37108 2017-02-24  Segher Boessenkool  <segher@kernel.crashing.org>
37109
37110         * config/arc/arc.c (arc_ccfsm_advance): Only take the PATTERN of
37111         this_insn if it is an INSN or JUMP_INSN.
37112         (force_offsettable): Look at base, not at addr.
37113         * config/arc/predicates.md (brcc_nolimm_operator): Don't call INTVAL
37114         on things that aren't necessarily CONST_INTs.
37115
37116 2017-02-24  Uros Bizjak  <ubizjak@gmail.com>
37117
37118         * doc/invoke.texi (x86 Options, -mfpmath=sse): Mention that
37119         -mfpmath=sse is the default also for x86-32 targets with SSE2
37120         instruction set when @option{-ffast-math} is enabled
37121
37122 2017-02-24  Jeff Law  <law@redhat.com>
37123
37124         PR rtl-optimizatoin/79286
37125         * ira.c (update_equiv_regs): Drop may_trap_p exception to
37126         dominance test.
37127
37128 2017-02-24  Richard Biener  <rguenther@suse.de>
37129
37130         PR tree-optimization/79389
37131         * gimple-ssa-split-paths.c (is_feasible_trace): Properly skip
37132         debug insns.
37133
37134 2017-02-24  Aldy Hernandez  <aldyh@redhat.com>
37135
37136         * tree-ssa-loop-niter.c (number_of_iterations_exit): Update
37137         function comment to reflect reality.
37138         (loop_exits_before_overflow): Fix typo in function description.
37139
37140 2017-02-24  Richard Biener  <rguenther@suse.de>
37141
37142         PR tree-optimization/79389
37143         * gimple-ssa-split-paths.c (is_feasible_trace): Verify more
37144         properly that a threading opportunity exists.  Detect conditional
37145         copy/constant propagation opportunities.
37146
37147 2017-02-23  Eric Botcazou  <ebotcazou@adacore.com>
37148
37149         * config/visium/visium.md (type): Add trap.
37150         (b): New mode attribute.
37151         (*btst): Rename into...
37152         (*btst<mode>): ...this and adjust.
37153         (*cbranchsi4_btst_insn): Rename into...
37154         (*cbranch<mode>4_btst_insn): ...this and adjust.
37155         (trap): New define_insn.
37156
37157 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
37158
37159         PR tree-optimization/79389
37160         * ifcvt.c (struct noce_if_info): Add rev_cond field.
37161         (noce_reversed_cond_code): New function.
37162         (noce_emit_store_flag): Use rev_cond if non-NULL instead of
37163         reversed_comparison_code.  Formatting fix.
37164         (noce_try_store_flag): Test rev_cond != NULL in addition to
37165         reversed_comparison_code.
37166         (noce_try_store_flag_constants): Likewise.
37167         (noce_try_store_flag_mask): Likewise.
37168         (noce_try_addcc): Use rev_cond if non-NULL instead of
37169         reversed_comparison_code.
37170         (noce_try_cmove_arith): Likewise.  Formatting fixes.
37171         (noce_try_minmax, noce_try_abs): Clear rev_cond.
37172         (noce_find_if_block): Initialize rev_cond.
37173         (find_cond_trap): Call noce_get_condition with then_bb == trap_bb
37174         instead of false as last argument never attempt to reverse it
37175         afterwards.
37176
37177 2017-02-23  Bin Cheng  <bin.cheng@arm.com>
37178
37179         PR tree-optimization/79663
37180         * tree-predcom.c (combine_chains): Process refs in reverse order
37181         only for ZERO length chains, and add explaining comment.
37182
37183 2017-02-23  Jeff Law  <law@redhat.com>
37184
37185         PR tree-optimization/79578
37186         * tree-ssa-dse.c (clear_bytes_written_by): Use OEP_ADDRESS_OF
37187         in call to operand_equal_p.
37188
37189 2017-01-23  Dominique d'Humieres  <dominiq@lps.ens.fr>
37190
37191         PR target/71017
37192         * config/i386/cpuid.h: Fix another undefined behavior.
37193
37194 2017-02-23  Richard Biener  <rguenther@suse.de>
37195
37196         PR tree-optimization/79683
37197         * tree-vect-stmts.c (vect_analyze_stmt): Do not overwrite
37198         vector types for data-refs.
37199
37200 2017-02-23  Martin Liska  <mliska@suse.cz>
37201
37202         * params.def (PARAM_MIN_NONDEBUG_INSN_UID): Change default to 0.
37203
37204 2017-02-23  Jakub Jelinek  <jakub@redhat.com>
37205
37206         PR middle-end/79665
37207         * internal-fn.c (get_range_pos_neg): Moved to ...
37208         * tree.c (get_range_pos_neg): ... here.  No longer static.
37209         * tree.h (get_range_pos_neg): New prototype.
37210         * expr.c (expand_expr_real_2) <case TRUNC_DIV_EXPR>: If both arguments
37211         are known to be in between 0 and signed maximum inclusive, try to
37212         expand both unsigned and signed divmod and use the cheaper one from
37213         those.
37214
37215 2017-02-22  Jeff Law  <law@redhat.com>
37216
37217         PR tree-optimization/79578
37218         * tree-ssa-dse.c (clear_bytes_written_by): Use operand_equal_p
37219         to compare base operands.
37220
37221 2017-02-22  Segher Boessenkool  <segher@kernel.crashing.org>
37222
37223         PR target/79211
37224         * config/rs6000/rs6000.md (*fsel<SFDF:mode><SFDF2:mode>4): Use
37225         gpc_reg_operand instead of fpr_reg_operand.
37226
37227 2017-02-22  Sameera Deshpande  <sameera.deshpande@imgtec.com>
37228
37229         * config/mips/mips.c (mips_return_in_memory): Force FP
37230         vector types to be returned in memory for o32 ABI.
37231
37232 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
37233
37234         * dwarf2out.c (gen_variable_die): For -gdwarf-5, use DW_TAG_variable
37235         instead of DW_TAG_member for static data member declarations and don't
37236         set no_linkage_name for static inline data members.
37237         (gen_member_die): For -gdwarf-5 don't change DW_TAG_variable
37238         to DW_TAG_member.
37239
37240 2017-02-22  Martin Liska  <mliska@suse.cz>
37241
37242         * doc/invoke.texi: Replace inequality signs with square brackets
37243         for -Wnormalized.
37244
37245 2017-02-22  Matthew Fortune  <matthew.fortune@imgtec.com>
37246
37247         PR target/78660
37248         * lra-constraints.c (simplify_operand_subreg): Handle
37249         WORD_REGISTER_OPERATIONS targets.
37250
37251 2017-02-22  Jakub Jelinek  <jakub@redhat.com>
37252
37253         PR target/70465
37254         * reg-stack.c (emit_swap_insn): Treat (float_extend:?F (mem:?F))
37255         and (const_double:?F) like (mem:?F) for the purpose of fxch %st(1)
37256         elimination by swapping fld*.
37257
37258 2017-02-22  Richard Biener  <rguenther@suse.de>
37259
37260         PR tree-optimization/79673
37261         * tree-ssa-pre.c (compute_avail): Use wide_int_to_tree to
37262         convert the [TARGET_]MEM_REF offset INTEGER_CST, scrapping off
37263         irrelevant address-space qualifiers and avoiding a
37264         ADDR_SPACE_CONVERT_EXPR from fold_convert.
37265
37266 2017-02-22  Richard Biener  <rguenther@suse.de>
37267
37268         PR tree-optimization/79666
37269         * tree-vrp.c (extract_range_from_binary_expr_1): Make sure
37270         to not symbolically negate if that may introduce undefined
37271         overflow.
37272
37273 2017-02-22  Martin Liska  <mliska@suse.cz>
37274
37275         PR lto/79587
37276         * data-streamer-in.c (streamer_read_gcov_count): Remove assert.
37277         * data-streamer-out.c (streamer_write_gcov_count_stream):
37278         Likewise.
37279         * value-prof.c (stream_out_histogram_value): Make assert more
37280         precise based on type of counter.
37281
37282 2017-02-21  Uros Bizjak  <ubizjak@gmail.com>
37283
37284         PR target/79593
37285         * config/i386/i386.md (standard_x87sse_constant_load splitter):
37286         Use nonimmediate_operand instead of memory_operand for operand 1.
37287         (float-extend standard_x87sse_constant_load splitter): Ditto.
37288
37289 2017-02-21  Jeff Law  <law@redhat.com>
37290
37291         PR tree-optimization/79621
37292         * gimple-ssa-isolate-paths.c (find_implicit_erroneous_behavior): Ignore
37293         blocks with edges to themselves.
37294
37295 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
37296
37297         PR target/79633
37298         * tree-chkp-opt.c (chkp_optimize_string_function_calls): Use
37299         is_gimple_call instead of comparing gimple_code with GIMPLE_CALL.
37300         Use gimple_call_builtin_p.
37301
37302         PR target/79570
37303         * sel-sched.c (moveup_expr_cached): Don't call sel_bb_head
37304         on temporarily removed DEBUG_INSNs.
37305
37306         PR tree-optimization/79649
37307         * tree-loop-distribution.c (classify_partition): Give up on
37308         non-generic address space loads/stores.
37309
37310 2017-02-21  Aldy Hernandez  <aldyh@redhat.com>
37311
37312         * doc/loop.texi (Loop manipulation): Remove nonexistent
37313         tree_ssa_loop_version from the documentation.
37314         * cfgloopmanip.c (loop_version): Document CONDITION_BB argument.
37315
37316 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
37317
37318         PR target/79494
37319         * config/i386/i386.c (ix86_expand_split_stack_prologue): Call
37320         make_reg_eh_region_note_nothrow_nononlocal on call_insn.
37321         * config/rs6000/rs6000.c: Include except.h.
37322         (rs6000_expand_split_stack_prologue): Call
37323         make_reg_eh_region_note_nothrow_nononlocal on the call insn.
37324
37325 2017-02-21  Martin Jambor  <mjambor@suse.cz>
37326
37327         PR lto/79579
37328         * ipa-prop.c (ipa_prop_write_jump_functions): Bail out if no edges
37329         have been analyzed.
37330
37331 2017-02-21  Martin Jambor  <mjambor@suse.cz>
37332
37333         * common.opt (-fipa-cp-alignment): Mark as ignored and preserved
37334         for backward compatibility only.
37335         * doc/invoke.texi (Option Summary): Remove all references to
37336         -fipa-cp-alignment.
37337
37338 2017-02-21  Matthew Fortune  <matthew.fortune@imgtec.com>
37339
37340         PR target/78660
37341         Revert:
37342         2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
37343
37344         * lra-constraints.c (curr_insn_transform): Handle
37345         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
37346
37347 2017-02-21  Martin Liska  <mliska@suse.cz>
37348
37349         * config/i386/i386.opt: Replace -masm-dialect with -masm.
37350
37351 2017-02-21  Thomas Schwinge  <thomas@codesourcery.com>
37352
37353         PR translation/79638
37354         * config/nvptx/nvptx.c (ENTRY_TEMPLATE): Single out "%ntid.y".
37355
37356 2017-02-21  Eric Botcazou  <ebotcazou@adacore.com>
37357
37358         PR ada/67205
37359         * config/arm/arm.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define.
37360         (arm_function_ok_for_sibcall): Return false for an indirect call by
37361         descriptor if all the argument registers are used.
37362         (arm_relayout_function): Use FUNCTION_ALIGNMENT macro to adjust the
37363         alignment of the function.
37364
37365 2017-02-21  Jakub Jelinek  <jakub@redhat.com>
37366
37367         PR tree-optimization/61441
37368         * simplify-rtx.c (simplify_const_unary_operation): For
37369         -fsignaling-nans and sNaN operand, return NULL_RTX rather than
37370         the sNaN unmodified.
37371
37372 2017-02-20  Bernd Edlinger  <bernd.edlinger@hotmail.de>
37373
37374         * Makefile.in (BUILD_SYSTEM_HEADER_DIR): New make variabe.
37375         (LIMITS_H_TEST, if_multiarch, stmp-fixinc): Use BUILD_SYSTEM_HEADER_DIR
37376         instead of SYSTEM_HEADER_DIR.
37377
37378 2017-02-20  Gerald Pfeifer  <gerald@pfeifer.com>
37379             Martin LiÅ¡ka  <mliska@suse.cz>
37380
37381         * doc/invoke.texi (use-after-scope-direct-emission-threshold):
37382         Fix typos and grammar, use active voice, and clarify.
37383
37384 2017-02-20  Marek Polacek  <polacek@redhat.com>
37385
37386         PR middle-end/79537
37387         * gimplify.c (gimplify_expr): Handle unused *&&L;.
37388
37389         PR sanitizer/79558
37390         * ubsan.c (ubsan_type_descriptor): Check if TYPE_MAX_VALUE is null.
37391
37392 2017-02-20  Jakub Jelinek  <jakub@redhat.com>
37393
37394         PR target/79568
37395         * config/i386/i386.c (ix86_expand_builtin): Handle
37396         OPTION_MASK_ISA_AVX512VL and OPTION_MASK_ISA_64BIT in
37397         ix86_builtins_isa[fcode].isa as a requirement of those
37398         flags and any other flag in the bitmask.
37399         (ix86_init_mmx_sse_builtins): Use 0 instead of
37400         ~OPTION_MASK_ISA_64BIT as mask.
37401         * config/i386/i386-builtin.def (__builtin_ia32_rdtsc,
37402         __builtin_ia32_rdtscp, __builtin_ia32_pause, __builtin_ia32_bsrsi,
37403         __builtin_ia32_rdpmc, __builtin_ia32_rolqi, __builtin_ia32_rolhi,
37404         __builtin_ia32_rorqi, __builtin_ia32_rorhi): Likewise.
37405
37406 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
37407
37408         PR target/78012
37409         * lra-constraints.c (split_reg): Check requested split mode
37410         is supported by the register.
37411
37412 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
37413
37414         * lra-constraints.c (simplify_operand_subreg): Remove early
37415         return false.
37416
37417 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
37418
37419         PR target/78660
37420         * lra-constraints.c (curr_insn_transform): Tighten condition
37421         for converting SUBREG reloads from OP_OUT to OP_INOUT.
37422
37423 2017-02-20  Matthew Fortune  <matthew.fortune@imgtec.com>
37424
37425         PR target/78660
37426         * lra-constraints.c (curr_insn_transform): Handle
37427         WORD_REGISTER_OPERATIONS requirements when reloading SUBREGs.
37428
37429 2017-02-19  Uros Bizjak  <ubizjak@gmail.com>
37430
37431         Revert:
37432         2016-05-30  Uros Bizjak  <ubizjak@gmail.com>
37433
37434         * config/i386/sync.md (mfence_nosse): Use "lock orl $0, -4(%esp)".
37435
37436 2017-02-19  Jonathan Wakely  <jwakely@redhat.com>
37437
37438         PR c++/69523
37439         * doc/invoke.texi (C++ Dialect Options) [-Wliteral-suffix]: Update
37440         description.
37441
37442 2017-02-19  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
37443
37444         * gimple-pretty-print.c (dump_ternary_rhs): Adjust gimple dump format
37445         for FMA_EXPR.
37446
37447 2017-02-18  Jakub Jelinek  <jakub@redhat.com>
37448
37449         * final.c (last_columnnum, override_columnnum): New variables.
37450         (final_start_function): Set last_columnnum, pass it to begin_prologue
37451         hook and pass 0 to dwarf2out_begin_prologue.
37452         (final_scan_insn): Update override_columnnum.  Pass last_columnnum
37453         to source_line debug hook.
37454         (notice_source_line): Compute last_columnnum and for debug_column_info
37455         return true on column changes.
37456         * debug.h (struct gcc_debug_hooks): Add column argument to
37457         source_line and begin_prologue hooks.
37458         (debug_nothing_int_charstar_int_bool): Remove prototype.
37459         (debug_nothing_int_int_charstar,
37460         debug_nothing_int_int_charstar_int_bool): New prototypes.
37461         (dwarf2out_begin_prologue): Add column argument.
37462         * debug.c (do_nothing_debug_hooks): Adjust source_line and
37463         begin_prologue hooks.
37464         (debug_nothing_int_charstar_int_bool): Remove.
37465         (debug_nothing_int_int_charstar,
37466         debug_nothing_int_int_charstar_int_bool): New functions.
37467         * dwarf2out.c (dwarf2out_begin_prologue): Add column argument, pass it
37468         through to dwarf2out_source_line.
37469         (dwarf2_lineno_debug_hooks): Adjust begin_prologue hook.
37470         (dwarf2out_source_line): Add column argument, emit it if requested.
37471         * sdbout.c (sdbout_source_line, sdbout_begin_prologue): Add column
37472         arguments.
37473         * xcoffout.h (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
37474         * xcoffout.c (xcoffout_begin_prologue, xcoffout_source_line): Likewise.
37475         * vmsdbgout.c (vmsdbgout_begin_prologue): Add column argument, pass it
37476         through to dwarf2out_begin_prologue.
37477         (vmsdbgout_source_line): Add column argument, pass it through to
37478         dwarf2out_source_line.
37479         * dbxout.c (dbxout_begin_prologue): Add column argument, adjust
37480         dbxout_source_line caller.
37481         (dbxout_source_line): Add column argument.
37482
37483         * common.opt (gno-column-info, gcolumn-info): New options.
37484         * dwarf2out.c (dwarf2_lineno_debug_hooks): Formatting fix.
37485         (check_die): Also test for multiple DW_AT_decl_column attributes.
37486         (add_src_coords_attributes, dwarf2out_imported_module_or_decl_1): Add
37487         DW_AT_decl_column if requested.
37488         (gen_subprogram_die): Compare and/or add also DW_AT_decl_column
37489         if requested.
37490         (gen_variable_die): Likewise.
37491         (add_call_src_coords_attributes): Add DW_AT_call_column if requested.
37492         * doc/invoke.texi (-gcolumn-info, -gno-column-info): Document.
37493
37494         PR target/79569
37495         * config/i386/i386.opt (m3dnowa): Replace Undocumented with Report.
37496         * common/config/i386/i386-common.c (OPTION_MASK_ISA_3DNOW_A_SET): Define.
37497         (ix86_handle_option): Handle OPT_m3dnowa.
37498         * doc/invoke.texi (-m3dnowa): Document.
37499         * doc/extend.texi (__builtin_ia32_pmulhuw, __builtin_ia32_pf2iw): Use
37500         -m3dnowa instead of -m3dnow -march=athlon.
37501
37502         PR target/79559
37503         * config/i386/i386.c (ix86_print_operand): Use output_operand_lossage
37504         instead of gcc_assert for K, r and R code checks.  Formatting fixes.
37505
37506 2017-02-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
37507
37508         PR target/79261
37509         * config/rs6000/rs6000.c (rs6000_expand_ternop_builtin): Add
37510         support for CODE_FOR_vsx_xxpermdi_v2d[fi]_be.
37511         * config/rs6000/rs6000.md (reload_gpr_from_vsx<mode>): Call
37512         generator for vsx_xxpermdi_<mode>_be.
37513         * config/rs6000/vsx.md (vsx_xxpermdi_<mode>): Remove logic to
37514         force big-endian semantics.
37515         (vsx_xxpermdi_<mode>_be): New define_expand with same
37516         implementation as previous version of vsx_xxpermdi_<mode>.
37517
37518 2017-02-17  Jakub Jelinek  <jakub@redhat.com>
37519
37520         PR tree-optimization/79327
37521         * gimple-ssa-sprintf.c (format_integer): Remove likely_adjust
37522         variable, its initialization and use.
37523
37524 2017-02-17  Julia Koval  <julia.koval@intel.com>
37525
37526         * common/config/i386/i386-common.c (OPTION_MASK_ISA_RDPID_SET): New.
37527         (OPTION_MASK_ISA_PKU_UNSET): New.
37528         (ix86_handle_option): Handle -mrdpid.
37529         * config/i386/cpuid.h (bit_RDPID): New.
37530         * config/i386/driver-i386.c (host_detect_local_cpu):
37531         Detect RDPID feature.
37532         * config/i386/i386-builtin.def (__builtin_ia32_rdpid): New.
37533         * config/i386/i386-c.c (ix86_target_macros_internal):
37534         Handle RDPID flag.
37535         * config/i386/i386.c (ix86_target_string): Add -mrdpid to isa2_opts.
37536         (ix86_valid_target_attribute_inner_p): Add "rdpid".
37537         (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
37538         * config/i386/i386.h (TARGET_RDPID, TARGET_RDPID_P): New.
37539         * config/i386/i386.md (define_insn "rdpid"): New.
37540         * config/i386/i386.opt Add -mrdpid.
37541         * config/i386/immintrin.h (_rdpid_u32): New.
37542
37543 2017-02-17  Vladimir Makarov  <vmakarov@redhat.com>
37544
37545         PR rtl-optimization/79541
37546         * lra-constraints.c (curr_insn_transform): Remove wrong asm insn
37547         instead of transforming it into USE.
37548
37549 2017-02-17  Segher Boessenkool  <segher@kernel.crashing.org>
37550
37551         * config/rs6000/rs6000.md (extendsfdf2): Remove default arguments.
37552         If HONOR_SNANS (SFmode) force the input to a register.
37553         (*extendsfdf2_fpr): Add !HONOR_SNANS (SFmode) condition.
37554         (*extendsfdf2_snan): New pattern, used when using SNaNs; it generates
37555         an frsp or similar insn.
37556
37557 2017-02-17  Martin Liska  <mliska@suse.cz>
37558
37559         PR rtl-optimization/79577
37560         * params.def (selsched-max-sched-times): Increase minimum to 1.
37561
37562 2017-02-17  Martin Liska  <mliska@suse.cz>
37563
37564         PR rtl-optimization/79574
37565         * gcse.c (want_to_gcse_p): Prevent integer overflow.
37566
37567 2017-02-17  Martin Liska  <mliska@suse.cz>
37568
37569         PR tree-optimization/79529
37570         * tree-ssa-loop-unswitch.c (is_maybe_undefined): Use
37571         ssa_defined_default_def_p to handle cases which are implicitly
37572         defined.
37573         * tree-ssa.c (ssa_defined_default_def_p): New function.
37574         (ssa_undefined_value_p): Use ssa_defined_default_def_p to handle cases
37575         which are implicitly defined.
37576         * tree-ssa.h (ssa_defined_default_def_p): Declare.
37577
37578 2017-02-17  Richard Biener  <rguenther@suse.de>
37579
37580         PR middle-end/79576
37581         * params.def (max-ssa-name-query-depth): Limit to 10.
37582
37583 2017-02-17  Richard Biener  <rguenther@suse.de>
37584
37585         PR tree-optimization/79552
37586         * tree-ssa-structalias.c (visit_loadstore): Properly verify
37587         default defs.
37588
37589 2017-02-17  Richard Biener  <rguenther@suse.de>
37590
37591         PR bootstrap/79567
37592         * genmatch.c (output_line_directive): Handle DIR_SEPARATOR_2.
37593
37594 2017-02-17  Marek Polacek  <polacek@redhat.com>
37595
37596         PR middle-end/79536
37597         * fold-const.c (fold_negate_expr_1): Renamed from fold_negate_expr.
37598         (fold_negate_expr): New wrapper.
37599
37600 2017-02-16  Sandra Loosemore  <sandra@codesourcery.com>
37601
37602         * doc/invoke.texi (C++ Dialect Options) [-Wno-non-template-friend]: 
37603         Correct terminology and de-emphasize pre-standard behavior.
37604
37605 2017-02-16  Alan Modra  <amodra@gmail.com>
37606
37607         PR rtl-optimization/79286
37608         * ira.c (def_dominates_uses): New function.
37609         (update_equiv_regs): Don't create an equivalence for insns that
37610         may trap where the register def does not dominate the use.
37611
37612 2017-02-16  Vladimir Makarov  <vmakarov@redhat.com>
37613
37614         PR rtl-optimization/78127
37615         * lra.c (lra): Call lra_eliminate before finish the loop after
37616         lra_constraint.
37617
37618 2017-02-16  Richard Biener  <rguenther@suse.de>
37619
37620         * graphite.h: Do not include isl/isl_val_gmp.h, instead include
37621         isl/isl_val.h.
37622         * graphite-isl-ast-to-gimple.c (gmp_cst_to_tree): Remove.
37623         (gcc_expression_from_isl_expr_int): Use generic isl_val interface.
37624         * graphite-sese-to-poly.c: Do not include isl/isl_val_gmp.h.
37625         (isl_val_int_from_wi): New function.
37626         (extract_affine_gmp): Rename to ...
37627         (extract_affine_wi): ... this, take a widest_int.
37628         (extract_affine_int): Just wrap extract_affine_wi.
37629         (add_param_constraints): Use isl_val_int_from_wi.
37630         (add_loop_constraints): Likewise, and extract_affine_wi.
37631
37632 2017-02-15  Jeff Law  <law@redhat.com>
37633
37634         PR middle-end/79521
37635         * ira-costs.c (scan_one_insn): Check have_regs_of_mode before calling
37636         ira_init_register_move_cost_if_necessary.
37637
37638 2017-02-15  Martin Sebor  <msebor@redhat.com>
37639
37640         PR middle-end/32003
37641         * doc/invoke.texi (-fdump-final-insns): Replace option accidentally
37642         removed in a prior commit.
37643
37644 2017-02-15  Bin Cheng  <bin.cheng@arm.com>
37645
37646         PR tree-optimization/79347
37647         * tree-vect-loop-manip.c (vect_do_peeling): Maintain profile
37648         counters during peeling.
37649
37650 2017-02-15  Thomas Schwinge  <thomas@codesourcery.com>
37651
37652         * Makefile.in (site.exp): Remove "set ISLVER".
37653
37654 2017-02-15  Jakub Jelinek  <jakub@redhat.com>
37655
37656         PR target/79487
37657         * real.c (real_from_integer): Call real_convert even for decimal.
37658
37659 2017-02-15  Dominik Vogt  <vogt@linux.vnet.ibm.com>
37660
37661         PR target/79421
37662         * config/s390/s390.c: define TARGET_CUSTOM_FUNCTION_DESCRIPTORS.
37663
37664 2017-02-14  Andrew Pinski  <apinski@cavium.com>
37665
37666         * config/aarch64/aarch64-cores.def (thunderx2t99): Move to under 'C"
37667         cores and change the partno/implementer to be correct.
37668         (thunderx2t99p1): New core which replaces thunderx2t99 and still has
37669         the 'B" as the implementer.
37670         * config/aarch64/aarch64-tune.md: Regenerate.
37671
37672 2017-02-14  Carl Love  <cel@us.ibm.com>
37673
37674         * config/rs6000/rs6000.c: Add case statement entry to make the
37675         xvcvuxdsp built-in argument unsigned.
37676         * config/rs6000/vsx.md: Fix the source and return operand types so they
37677         match the instruction definitions from the ISA document.  Fix typo
37678         in the instruction generation for the (define_insn "vsx_xvcvuxdsp"
37679         statement.
37680
37681 2017-02-14  Vladimir Makarov  <vmakarov@redhat.com>
37682
37683         PR target/79282
37684         * lra-int.h (struct lra_operand_data, struct lra_insn_reg): Add
37685         member early_clobber_alts.
37686         * lra-lives.c (reg_early_clobber_p): New.
37687         (process_bb_lives): Use it.
37688         * lra.c (new_insn_reg): New arg early_clobber_alts.  Use it.
37689         (debug_operand_data): Initialize early_clobber_alts.
37690         (setup_operand_alternative): Set up early_clobber_alts.
37691         (collect_non_operand_hard_regs): Ditto.  Pass early clobber
37692         alternatives to new_insn_reg.
37693         (add_regs_to_insn_regno_info): Add arg early_clobber_alts.  Use
37694         it.
37695         (lra_update_insn_regno_info): Pass the new arg.
37696
37697 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
37698
37699         PR middle-end/79505
37700         * omp-offload.c (free_oacc_loop): Release loop->ifns vector.
37701         (new_oacc_loop_raw): Don't clear already cleared fields.
37702
37703         PR target/79481
37704         * config/i386/avx512pfintrin.h (_mm512_prefetch_i32gather_pd,
37705         _mm512_prefetch_i32gather_ps, _mm512_prefetch_i64gather_pd,
37706         _mm512_prefetch_i64gather_ps): New inline functions and macros.
37707
37708 2017-02-14  Uros Bizjak  <ubizjak@gmail.com>
37709
37710         PR target/79495
37711         * config/i386/i386.md (*movxf_internal): Add (o,rC) alternative.
37712
37713 2017-02-14  H.J. Lu  <hongjiu.lu@intel.com>
37714
37715         PR target/79498
37716         * config/i386/i386.c (timode_scalar_chain::convert_insn): Insert
37717         the extra instruction to the right place to store 128-bit constant
37718         when needed.
37719
37720 2017-02-14  Martin Sebor  <msebor@redhat.com>
37721
37722         PR middle-end/79448
37723         * gimple-ssa-sprintf.c (format_directive): Avoid issuing INT_MAX
37724           warning for strings of unknown length.
37725
37726 2017-02-13  Segher Boessenkool  <segher@kernel.crashing.org>
37727
37728         * config.gcc (supported_defaults) [powerpc*-*-*]: Update.
37729
37730 2017-02-14  Jeff Law  <law@redhat.com>
37731
37732         PR target/79404
37733         * ira-costs.c (scan_one_insn): Initialize register move costs
37734         for pseudos seen in USE/CLOBBER insns.
37735
37736         PR tree-optimization/79095
37737         * tree-vrp.c (extract_range_from_binary_expr_1): For EXACT_DIV_EXPR,
37738         if the numerator has the range ~[0,0] make the resultant range ~[0,0].
37739         (extract_range_from_binary_expr): For MINUS_EXPR with no derived range,
37740         if the operands are known to be not equal, then the resulting range
37741         is ~[0,0].
37742         (intersect_ranges): If the new range is ~[0,0] and the old range is
37743         wide, then prefer ~[0,0].
37744         * tree-vrp.c (overflow_comparison_p_1): New function.
37745         (overflow_comparison_p): New function.
37746         * tree-vrp.c (register_edge_assert_for_2): Register additional asserts
37747         if NAME is used in an overflow test.
37748         (vrp_evaluate_conditional_warnv_with_ops): If the ops represent an
37749         overflow check that can be expressed as an equality test, then adjust
37750         ops to be that equality test.
37751
37752 2017-02-14  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
37753
37754         * config/s390/s390-builtin-types.def: Remove flags argument.
37755         * config/s390/s390.c (s390_init_builtins): Likewise.
37756
37757 2017-02-14  Martin Liska  <mliska@suse.cz>
37758
37759         * tree-ssa-loop-unswitch.c (hoist_guard): Release get_loop_body
37760         vector.  Fix trailing white spaces.
37761
37762 2017-02-14  James Greenhalgh  <james.greenhalgh@arm.com>
37763
37764         * config/aarch64/aarch64.c (aarch64_simd_container_mode): Handle
37765         HFmode.
37766
37767 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
37768
37769         PR rtl-optimization/68664
37770         * config/arm/arm.c (arm_sched_can_speculate_insn):
37771         New function.  Declare prototype.
37772         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
37773
37774 2017-02-14  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
37775
37776         PR rtl-optimization/68664
37777         * config/aarch64/aarch64.c (aarch64_sched_can_speculate_insn):
37778         New function.
37779         (TARGET_SCHED_CAN_SPECULATE_INSN): Define.
37780
37781 2017-02-14  Amit Pawar  <amit.pawar@amd.com>
37782
37783         * config/i386/i386.c (znver1_cost): Fix the alignment for function and
37784         max skip bytes for function, loop and jump.
37785
37786 2017-02-14  Prathamesh Kulkarni  <prathamesh.kulkarni@linaro.org>
37787
37788         * gimple-pretty-print.c (dump_unary_rhs): Adjust dump format for
37789         ABS_EXPR for gimple dump.
37790
37791 2017-02-14  Jakub Jelinek  <jakub@redhat.com>
37792
37793         PR target/79462
37794         * config/sh/sh.c (expand_cbranchdi4): Don't clear operands[4].
37795
37796         PR tree-optimization/79408
37797         * tree-vrp.c (simplify_div_or_mod_using_ranges): Handle also the
37798         case when on TRUNC_MOD_EXPR op0 is INTEGER_CST.
37799         (simplify_stmt_using_ranges): Call simplify_div_or_mod_using_ranges
37800         also if rhs1 is INTEGER_CST.
37801
37802 2017-02-14  Richard Biener  <rguenther@suse.de>
37803
37804         PR middle-end/79432
37805         * tree-into-ssa.c (insert_phi_nodes): When the function can
37806         have abnormal edges rewrite SSA names with broken use-def
37807         dominance out of SSA and register them for PHI insertion.
37808
37809 2017-02-13  Martin Sebor  <msebor@redhat.com>
37810
37811         PR middle-end/79496
37812         * gimple-ssa-sprintf.c (pass_sprintf_length::handle_gimple_call): Avoid
37813         clearing info.nowrite flag when snprintf size argument is a range.
37814
37815 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
37816
37817         * cprop.c (cprop_jump): Add missing space in string literal.
37818         * tree-ssa-structalias.c (rewrite_constraints): Likewise.
37819         (get_constraint_for_component_ref): Likewise.
37820         * df-core.c (df_worklist_dataflow_doublequeue): Likewise.
37821         * tree-outof-ssa.c (insert_partition_copy_on_edge): Likewise.
37822         * lra-constraints.c (process_alt_operands): Likewise.
37823         * ipa-inline.c (inline_small_functions): Likewise.
37824         * tree-ssa-sccvn.c (visit_reference_op_store): Likewise.
37825         * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
37826         * trans-mem.c (diagnose_tm_1_op): Likewise.
37827         * omp-grid.c (grid_find_single_omp_among_assignments): Likewise.
37828         (grid_parallel_clauses_gridifiable): Likewise.
37829
37830         * config/nvptx/mkoffload.c (process): Add space in between
37831         , and %d.
37832
37833         * config/i386/i386.h (REG_CLASS_NAMES): Add , in between
37834         "MOD4_SSE_REGS" and "ALL_REGS".
37835
37836         * spellcheck.c (test_data): Add , in between "foo" and "food".
37837
37838 2017-02-13  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
37839
37840         PR target/79449
37841         * config/rs6000/rs6000.c (expand_block_compare): Make sure runtime
37842         boundary crossing check and subsequent code generation agree.
37843
37844 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
37845
37846         * config/aarch64/aarch64.c (has_memory_op): Delete.
37847         (aarch64_madd_needs_nop): Use contains_mem_rtx_p instead of
37848         has_memory_op.
37849
37850 2017-02-13  Jakub Jelinek  <jakub@redhat.com>
37851
37852         PR rtl-optimization/79388
37853         PR rtl-optimization/79450
37854         * combine.c (distribute_notes): When removing TEM_INSN for which
37855         corresponding dest has last value recorded, invalidate that last
37856         value.
37857
37858 2017-02-13  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
37859
37860         * config/arm/arm.c (arm_print_tune_info): Use ASM_COMMENT_START instead
37861         of explicit '@'.  Add missing assembly comment marker on branch costs
37862         printout.
37863
37864 2017-02-13  Nathan Sidwell  <nathan@acm.org>
37865
37866         * gengtype-lex.l (<in_struct>): Add '/'.
37867
37868 2017-02-13  Martin Liska  <mliska@suse.cz>
37869
37870         PR c/79471
37871         * calls.c (expand_call): Replace XALLOCAVEC with XCNEWVEC.
37872
37873 2017-02-13  Richard Biener  <rguenther@suse.de>
37874
37875         * configure.ac (HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS):
37876         Remove.
37877         * configure: Re-generate.
37878         * config.in: Likewise.
37879         * graphite-dependences.c: Simplify as if
37880         HAVE_ISL_OPTIONS_SET_SCHEDULE_SERIALIZE_SCCS was defined.
37881         * graphite-isl-ast-to-gimple.c: Likewise.
37882         * graphite-optimize-isl.c: Likewise.
37883         * graphite-poly.c: Likewise.
37884         * graphite-sese-to-poly.c: Likewise.
37885         * graphite.h: Likewise.
37886         * toplev.c: Include isl/version.h and use isl_version () for
37887         printing the ISL version.
37888         * doc/install.texi: Update ISL requirement.
37889
37890 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
37891
37892         * doc/standards.texi (Standards): Update reference to
37893         Objective-C 2.0.
37894
37895 2017-02-12  Gerald Pfeifer  <gerald@pfeifer.com>
37896
37897         * doc/extend.texi (Named Address Spaces): sourceware.org now
37898         defaults to https.
37899         * doc/install.texi (Binaries): Ditto.
37900         (Specific): Ditto.
37901
37902 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
37903
37904         * doc/cpp.texi: Replace "stringify"/"stringification" with C
37905         standard terminology "stringize"/"stringizing" throughout.
37906         * doc/cppinternals.texi: Likewise.
37907
37908 2017-02-11  Sandra Loosemore  <sandra@codesourcery.com>
37909
37910         * doc/extend.texi: Fix some spelling mistakes and typos.
37911         * doc/invoke.texi: Likewise.
37912
37913 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
37914
37915         PR ipa/79224
37916         * params.def (inline-min-speedup) Change from 10 to 8.
37917
37918 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
37919
37920         * doc/invoke.texi (fopenmp): Bump OpenMP version from 4.0 to
37921         4.5.
37922
37923 2017-02-11  Jan Hubicka  <hubicka@ucw.cz>
37924
37925         PR ipa/79224
37926         * ipa-inline-analysis.c (get_minimal_bb): New function.
37927         (record_modified): Use it.
37928         (remap_edge_change_prob): Handle also ancestor functions.
37929
37930 2017-02-11  Gerald Pfeifer  <gerald@pfeifer.com>
37931
37932         * doc/contrib.texi (Contributors): Remove broken link into
37933         the Mauve CVS repository.
37934
37935 2017-02-11  Jakub Jelinek  <jakub@redhat.com>
37936
37937         PR middle-end/79454
37938         * internal-fn.c (expand_vector_ubsan_overflow): Use piece-wise
37939         result computation whenever lhs doesn't have vector mode, not
37940         just when it has BLKmode.
37941
37942 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
37943
37944         * doc/makefile.texi (profiledbootstrap): Refer to the
37945         installation instructions only in textual form.
37946
37947 2017-02-10  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
37948
37949         PR target/79295
37950         * config/rs6000/altivec.md (bcd<bcd_add_sub>): Fix constraints.
37951
37952 2017-02-10  Gerald Pfeifer  <gerald@pfeifer.com>
37953
37954         * doc/install.texi (Specific): Use https for blackfin.uclinux.org.
37955         (Specific): Update mingw-w64 reference.
37956         (Binaries): Ditto.
37957         (Specific): Remove broken link to Renesas RX processor.
37958
37959 2017-02-10  Richard Biener  <rguenther@suse.de>
37960
37961         * toplev.c (process_options): Do not mention obsolete graphite
37962         options when printing sorry message about missing graphite support.
37963         Mention -floop-nest-optimize.
37964
37965 2017-02-10  Christophe Lyon  <christophe.lyon@linaro.org>
37966
37967         * config/aarch64/arm_neon.h (vtst_p8): Rewrite without asm.
37968         (vtst_p16): Likewise.
37969         (vtstq_p8): Likewise.
37970         (vtstq_p16): Likewise.
37971         (vtst_p64): New.
37972         (vtstq_p64): Likewise.
37973         * config/arm/arm_neon.h (vgetq_lane_p64): New.
37974         (vset_lane_p64): New.
37975         (vsetq_lane_p64): New.
37976
37977 2017-02-10  Jakub Jelinek  <jakub@redhat.com>
37978
37979         PR tree-optimization/79411
37980         * tree-ssa-reassoc.c (is_reassociable_op): Return false if
37981         stmt operands are SSA_NAMEs used in abnormal phis.
37982         (can_reassociate_p): Return false if op is SSA_NAME used in abnormal
37983         phis.
37984
37985 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
37986
37987         PR ipa/70795
37988         * cgraphunit.c (cgraph_node::add_new_function): Set externally_visible
37989         flag if needed.
37990
37991 2017-02-09  Jan Hubicka  <hubicka@ucw.cz>
37992
37993         * tree-ssa-loop-unswitch.c (hoist_guard): Update profile.
37994
37995 2017-02-09  Jakub Jelinek  <jakub@redhat.com>
37996
37997         * omp-offload.c (oacc_loop_auto_partitions): Use || instead of |
37998         to avoid warning.
37999
38000         PR c/79413
38001         * gimplify.h (is_gimple_sizepos): Only test for INTEGER_CST constants,
38002         not arbitrary TREE_CONSTANT.
38003
38004         PR c/79431
38005         * gimplify.c (gimplify_adjust_omp_clauses): Ignore
38006         "omp declare target link" attribute unless is_global_var.
38007         * omp-offload.c (find_link_var_op): Likewise.
38008
38009 2017-02-09  Nathan Sidwell  <nathan@codesourcery.com>
38010             Chung-Lin Tang  <cltang@codesourcery.com>
38011
38012         * gimplify.c (gimplify_scan_omp_clauses): No special handling for
38013         OMP_CLAUSE_TILE.
38014         (gimplify_adjust_omp_clauses): Don't delete TILE.
38015         (gimplify_omp_for): Deal with TILE.
38016         * internal-fn.c (expand_GOACC_TILE): New function.
38017         * internal-fn.def (GOACC_DIM_POS): Comment may be overly conservative.
38018         (GOACC_TILE): New.
38019         * omp-expand.c (struct oacc_collapse): Add tile and outer fields.
38020         (expand_oacc_collapse_init): Add LOC paramter.  Initialize tile
38021         element fields.
38022         (expand_oacc_collapse_vars): Add INNER parm, adjust for tiling,
38023         avoid DIV for outermost collapse var.
38024         (expand_oacc_for): Insert tile element loop as needed.  Adjust.
38025         Remove out of date comments, fix whitespace.
38026         * omp-general.c (omp_extract_for_data): Deal with tiling.
38027         * omp-general.h (enum oacc_loop_flags): Add OLF_TILE flag,
38028         adjust OLF_DIM_BASE value.
38029         (struct omp_for_data): Add tiling field.
38030         * omp-low.c (scan_sharing_clauses): Allow OMP_CLAUSE_TILE.
38031         (lower_oacc_head_mark): Add OLF_TILE as appropriate.  Ensure 2 levels
38032         for auto loops.  Remove default auto determining, moved to
38033         oacc_loop_fixed_partitions.
38034         * omp-offload.c (struct oacc_loop): Change 'ifns' to vector of call
38035         stmts, add e_mask field.
38036         (oacc_dim_call): New function, abstracted out from oacc_thread_numbers.
38037         (oacc_thread_numbers): Use oacc_dim_call.
38038         (oacc_xform_tile): New.
38039         (new_oacc_loop_raw): Initialize e_mask, adjust for ifns vector.
38040         (finish_oacc_loop): Adjust for ifns vector.
38041         (oacc_loop_discover_walk): Append loop abstraction sites to list,
38042         add case for GOACC_TILE fns.
38043         (oacc_loop_xform_loop): Delete.
38044         (oacc_loop_process): Iterate over call list directly, and add
38045         handling for GOACC_TILE fns.
38046         (oacc_loop_fixed_partitions): Determine default auto, deal with TILE,
38047         dump partitioning.
38048         (oacc_loop_auto_partitions): Add outer_assign parm. Assign all but
38049         vector partitioning to outer loops.  Assign 2 partitions to loops
38050         when available. Add TILE handling.
38051         (oacc_loop_partition): Adjust oacc_loop_auto_partitions call.
38052         (execite_oacc_device_lower): Process GOACC_TILE fns,
38053         ignore unknown specs.
38054         * tree-nested.c (convert_nonlocal_omp_clauses): Allow OMP_CLAUSE_TILE.
38055         * tree.c (omp_clause_num_ops): Adjust TILE ops.
38056         * tree.h (OMP_CLAUSE_TILE_ITERVAR, OMP_CLAUSE_TILE_COUNT): New.
38057
38058 2017-02-09  Gerald Pfeifer  <gerald@pfeifer.com>
38059
38060         * configure.ac (ACX_BUGURL): Update.
38061         * configure: Regenerate.
38062
38063 2017-02-09  Richard Biener  <rguenther@suse.de>
38064
38065         PR tree-optimization/69823
38066         * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
38067         Properly enumerate all BBs in the region.  Use auto_vec/auto_bitmap.
38068
38069 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
38070
38071         * config/arc/arc-c.def: Add __NPS400__ definition.
38072         * config/arc/arc.h (CPP_SPEC): Don't define __NPS400__ here.
38073         (TARGET_NPS400): Define.
38074
38075 2017-02-09  Andrew Burgess  <andrew.burgess@embecosm.com>
38076
38077         * config/arc/arc-arch.h (arc_arch_t): Move unchanged to earlier in
38078         file.
38079         (arc_cpu_t): Change base_architecture field, arch, to a arc_arc_t
38080         pointer, arch_info.
38081         (arc_cpu_types): Fill the arch_info field with a pointer into the
38082         arc_arch_types table.
38083         (arc_selected_cpu): Declare.
38084         * config/arc/arc.c (arc_selected_cpu): Make global.
38085         (arc_selected_arch): Delete.
38086         (arc_base_cpu): Delete.
38087         (arc_override_options): Remove references to deleted variables,
38088         update access to arch information.
38089         (ARC_OPT): Update access to arch information.
38090         (ARC_OPTX): Likewise.
38091         * config/arc/arc.h (arc_base_cpu): Remove declaration.
38092         (TARGET_ARC600): Update access to arch information.
38093         (TARGET_ARC601): Likewise.
38094         (TARGET_ARC700): Likewise.
38095         (TARGET_EM): Likewise.
38096         (TARGET_HS): Likewise.
38097         * config/arc/driver-arc.c (arc_cpu_to_as): Update access to arch
38098         information.
38099
38100 2017-02-08  Pat Haugen  <pthaugen@us.ibm.com>
38101
38102         PR target/78604
38103         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Invert
38104         condition/operands for integer GE/LE/GEU/LEU operations.
38105
38106 2017-02-08  Segher Boessenkool  <segher@kernel.crashing.org>
38107
38108         PR translation/79397
38109         * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Fix spelling
38110         of AltiVec.
38111
38112 2017-02-08  Martin Jambor  <mjambor@suse.cz>
38113
38114         PR ipa/79375
38115         * ipa-prop.c (ipa_alloc_node_params): Make static, return bool
38116         whether allocation happened.
38117         (ipa_initialize_node_params): Do not call ipa_alloc_node_params if
38118         nothing was allocated.
38119
38120 2017-02-08  Jakub Jelinek  <jakub@redhat.com>
38121
38122         PR tree-optimization/79408
38123         * tree-vrp.c (simplify_div_or_mod_using_ranges): If op1 is not
38124         constant, but SSA_NAME with a known integer range, use the minimum
38125         of that range instead of op1 to determine if modulo can be replaced
38126         with its first operand.
38127
38128 2016-02-08  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
38129
38130         * config/riscv/riscv.c (riscv_build_integer_1): Avoid use of INT16_MAX.
38131
38132 2017-02-08  Richard Biener  <rguenther@suse.de>
38133
38134         PR tree-optimization/71824
38135         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
38136         Check all loops contained in the merged region.
38137
38138 2017-02-07  Andrew Pinski  <apinski@cavium.com>
38139
38140         * config/aarch64/aarch64.md (popcount<mode>2): New pattern.
38141
38142 2017-02-07  Andrew Pinski  <apinski@cavium.com>
38143
38144         * config/aarch64/aarch64-cores.def (thunderx): Disable LSE.
38145         (thunderxt88): Likewise.
38146         (thunderxt81): Disable LSE and change v8.1 to v8.
38147         (thunderxt83): Likewise.
38148
38149 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
38150             Richard Biener  <rguenther@suse.de>
38151
38152         PR middle-end/79399
38153         * ira-int.h (struct target_ira_int): Change x_max_struct_costs_size
38154         type from int to size_t.
38155         * ira-costs.c (struct_costs_size): Change type from int to size_t.
38156
38157 2017-02-07  Jakub Jelinek  <jakub@redhat.com>
38158
38159         PR rtl-optimization/79386
38160         * cprop.c (bypass_conditional_jumps): Initialize
38161         bypass_last_basic_block already before splitting bbs after
38162         unconditional traps...
38163         (bypass_conditional_jumps): ... rather than here.
38164
38165         PR target/79299
38166         * config/i386/sse.md (xtg_mode, gatherq_mode): New mode attrs.
38167         (*avx512f_gathersi<mode>, *avx512f_gathersi<mode>_2,
38168         *avx512f_gatherdi<mode>, *avx512f_gatherdi<mode>_2): Use them,
38169         fix -masm=intel patterns.
38170
38171 2017-02-07  Richard Biener  <rguenther@suse.de>
38172
38173         PR tree-optimization/79256
38174         PR middle-end/79278
38175         * builtins.c (get_object_alignment_2): Use min_align_of_type
38176         to extract alignment for MEM_REFs to honor BIGGEST_FIELD_ALIGNMENT
38177         and ADJUST_FIELD_ALIGN.
38178
38179         * doc/tm.texi.in (ADJUST_FIELD_ALIGN): Adjust to take additional
38180         type parameter.
38181         * doc/tm.texi: Regenerate.
38182         * stor-layout.c (layout_decl): Adjust.
38183         (update_alignment_for_field): Likewise.
38184         (place_field): Likewise.
38185         (min_align_of_type): Likewise.
38186         * config/arc/arc.h (ADJUST_FIELD_ALIGN): Adjust.
38187         * config/epiphany/epiphany.h (ADJUST_FIELD_ALIGN): Likewise.
38188         * config/epiphany/epiphany.c (epiphany_adjust_field_align): Likewise.
38189         * config/frv/frv.h (ADJUST_FIELD_ALIGN): Likewise.
38190         * config/frv/frv.c (frv_adjust_field_align): Likewise.
38191         * config/i386/i386.h (ADJUST_FIELD_ALIGN): Likewise.
38192         * config/i386/i386.c (x86_field_alignment): Likewise.
38193         * config/rs6000/aix.h (ADJUST_FIELD_ALIGN): Likewise.
38194         * config/rs6000/darwin.h (ADJUST_FIELD_ALIGN): Likewise.
38195         * config/rs6000/freebsd64.h (ADJUST_FIELD_ALIGN): Likewise.
38196         * config/rs6000/linux64.h (ADJUST_FIELD_ALIGN): Likewise.
38197         * config/rs6000/sysv4.h (ADJUST_FIELD_ALIGN): Likewise.
38198         * config/rs6000/rs6000.c (rs6000_special_adjust_field_align_p):
38199          Likewise.
38200
38201         Revert
38202         2017-01-30  Richard Biener  <rguenther@suse.de>
38203
38204         PR tree-optimization/79256
38205         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
38206         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
38207         alignment on TYPE.
38208
38209 2017-02-07  Toma Tabacu  <toma.tabacu@imgtec.com>
38210
38211         * config/mips/mips.c (mips_expand_builtin_insn): Convert the QImode
38212         argument of the pshufh, psllh, psllw, psrah, psraw, psrlh, psrlw
38213         builtins to SImode and emit a zero-extend, if necessary.
38214
38215 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
38216
38217         * docs/invoke.texi (RISC-V Options): Alphabetize.
38218
38219 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
38220
38221         * doc/invoke.texi (RISC-V Options): Use two spaces to separate
38222         options.
38223
38224 2017-02-06  Palmer Dabbelt  <palmer@dabbelt.com>
38225
38226         * config/riscv/riscv.c: New file.
38227         * common/config/riscv/riscv-common.c: Likewise.
38228         * config.gcc: Likewise.
38229         * config/riscv/constraints.md: Likewise.
38230         * config/riscv/elf.h: Likewise.
38231         * config/riscv/generic.md: Likewise.
38232         * config/riscv/linux.h: Likewise.
38233         * config/riscv/multilib-generator: Likewise.
38234         * config/riscv/peephole.md: Likewise.
38235         * config/riscv/pic.md: Likewise.
38236         * config/riscv/predicates.md: Likewise.
38237         * config/riscv/riscv-builtins.c: Likewise.
38238         * config/riscv/riscv-c.c: Likewise.
38239         * config/riscv/riscv-ftypes.def: Likewise.
38240         * config/riscv/riscv-modes.def: Likewise.
38241         * config/riscv/riscv-opts.h: Likewise.
38242         * config/riscv/riscv-protos.h: Likewise.
38243         * config/riscv/riscv.h: Likewise.
38244         * config/riscv/riscv.md: Likewise.
38245         * config/riscv/riscv.opt: Likewise.
38246         * config/riscv/sync.md: Likewise.
38247         * config/riscv/t-elf-multilib: Likewise.
38248         * config/riscv/t-linux: Likewise.
38249         * config/riscv/t-linux-multilib: Likewise.
38250         * config/riscv/t-riscv: Likewise.
38251         * configure.ac: Likewise.
38252         * doc/contrib.texi: Add Kito Cheng, Palmer Dabbelt, and Andrew
38253         Waterman as RISC-V maintainers.
38254         * doc/install.texi: Add RISC-V entries.
38255         * doc/invoke.texi: Add RISC-V options section.
38256         * doc/md.texi: Add RISC-V constraints section.
38257         * configure: Regenerated.
38258
38259 2017-02-06  Michael Meissner  <meissner@linux.vnet.ibm.com>
38260
38261         PR target/66144
38262         * config/rs6000/vector.md (vcond<mode><mode>): Allow the true and
38263         false values to be constant vectors with all 0 or all 1 bits set.
38264         (vcondu<mode><mode>): Likewise.
38265         * config/rs6000/predicates.md (vector_int_reg_or_same_bit): New
38266         predicate.
38267         (fpmask_comparison_operator): Update comment.
38268         (vecint_comparison_operator): New predicate.
38269         * config/rs6000/rs6000.c (rs6000_emit_vector_cond_expr): Optimize
38270         vector conditionals when the true and false values are constant
38271         vectors with all 0 bits or all 1 bits set.
38272
38273 2017-02-06  Martin Sebor  <msebor@redhat.com>
38274
38275         PR  tree-optimization/79376
38276         * gimple-fold.c (get_range_strlen): Set the minimum length to zero.
38277
38278 2017-02-06  Uros Bizjak  <ubizjak@gmail.com>
38279
38280         * config/i386/sse.md (vector modes -> vec_extract* splitter): Use
38281         explicit subreg RTX with operand 1.  Use VECTOR_MODE_P predicate
38282         to simplify split condition.
38283
38284 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
38285
38286         * omp-expand.c (oxpand_omp_atomic_fetch_op,
38287         expand_omp_atomic_pipeline): Return false if can_atomic_load_p is
38288         false.
38289
38290 2017-02-06  Segher Boessenkool  <segher@kernel.crashing.org>
38291
38292         PR rtl-optimization/68664
38293         * target.def (can_speculate_insn): New hook.
38294         * doc/tm.texi.in (TARGET_SCHED_CAN_SPECULATE_INSN): New hook.
38295         * doc/tm.texi: Regenerate.
38296         * sched-rgn.c (can_schedule_ready_p): Use the new hook.
38297         * config/rs6000/rs6000.c (TARGET_SCHED_CAN_SPECULATE_INSN): New macro.
38298         (rs6000_sched_can_speculate_insn): New function.
38299
38300 2017-02-06  Jakub Jelinek  <jakub@redhat.com>
38301
38302         PR tree-optimization/79284
38303         * tree-vectorizer.h (VECT_SCALAR_BOOLEAN_TYPE_P): Define.
38304         * tree-vect-stmts.c (vect_get_vec_def_for_operand,
38305         vectorizable_mask_load_store, vectorizable_operation,
38306         vect_is_simple_cond, get_same_sized_vectype): Use it instead
38307         of comparing TREE_CODE of a type against BOOLEAN_TYPE.
38308         * tree-vect-patterns.c (check_bool_pattern, search_type_for_mask_1,
38309         vect_recog_bool_pattern, vect_recog_mask_conversion_pattern): Likewise.
38310         * tree-vect-slp.c (vect_get_constant_vectors): Likewise.
38311         * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
38312         Remove redundant gimple_code (stmt) == GIMPLE_ASSIGN test after
38313         is_gimple_assign (stmt).  Replace another such test with
38314         is_gimple_assign (stmt).
38315
38316 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
38317
38318         PR target/78883
38319         * config/avr/avr.c (rtl-iter.h): Include it.
38320         (TARGET_LEGITIMATE_COMBINED_INSN): New hook define...
38321         (avr_legitimate_combined_insn): ...and implementation.
38322
38323 2017-02-06  Dominik Vogt  <vogt@linux.vnet.ibm.com>
38324
38325         * config/s390/predicates.md ("larl_operand"): Use macros from hwint.h.
38326         * config/s390/s390.c (s390_const_operand_ok)
38327         (s390_canonicalize_comparison, s390_extract_part)
38328         (s390_single_part, s390_contiguous_bitmask_nowrap_p)
38329         (s390_contiguous_bitmask_p, s390_rtx_costs)
38330         (legitimize_pic_address): Likewise.
38331         * config/s390/s390.md ("clzdi2", "clztidi2"): Likewise.
38332         * config/s390/vx-builtins.md ("vec_genbytemaskv16qi")
38333         ("vec_permi<mode>", "vfae<mode>", "*vfaes<mode>", "vstrc<mode>")
38334         ("*vstrcs<mode>"): Use UINTVAL() to set unsigned HOST_WIDE_INT.
38335         * config/s390/vector.md ("vec_vfenes<mode>"): Likewise.
38336
38337 2017-02-06  Georg-Johann Lay  <avr@gjlay.de>
38338
38339         * config/avr/avr.md (*addhi3_zero_extend): Add alternative where
38340         REGNO($0) == REGNO($1).
38341
38342 2017-02-06  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
38343
38344         * config/s390/linux.h(SIZE_TYPE): Add comment.
38345
38346 2017-02-06  Julian Brown  <julian@codesourcery.com>
38347             Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
38348             Virendra Pathak  <virendra.pathak@broadcom.com>
38349
38350         * config/aarch64/aarch64-cores.def: Change the scheduler
38351         to Thunderx2t99.
38352         * config/aarch64/aarch64.md: Include thunderx2t99.md.
38353         * config/aarch64/thunderx2t99.md: New file.
38354
38355 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
38356
38357         * doc/standards.texi (Go Language): Update link to language
38358         standard.
38359
38360 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
38361
38362         * tree-eh.c (lower_resx): Sanitize profile.
38363         (cleanup_empty_eh_move_lp): Likewise.
38364
38365 2017-02-05  Jan Hubicka  <hubicka@ucw.cz>
38366
38367         PR tree-ssa/79347
38368         * cfgloopmanip.c (lv_adjust_loop_entry_edge, loop_version): Add
38369         ELSE_PROB.
38370         * cfgloopmanip.h (loop_version): Update prototype.
38371         * modulo-sched.c (sms_schedule): Update call of loop_version.
38372         * tree-if-conv.c(version_loop_for_if_conversion): Likewise.
38373         * tree-parloops.c (gen_parallel_loop): Likewise.
38374         * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Likewise.
38375         * tree-ssa-loop-split.c (split_loop): Likewise.
38376         * tree-ssa-loop-unswitch.c (tree_unswitch_loop): Likewise.
38377         * tree-vect-loop-manip.c (vect_loop_versioning): Likewise.
38378
38379 2017-02-05  Martin Liska  <mliska@suse.cz>
38380
38381         PR bootstrap/78985
38382         * config/s390/s390.c (s390_gimplify_va_arg): Initialize local
38383         variable to NULL.
38384         (print_operand_address): Initialize a struct to zero.
38385
38386 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
38387
38388         * doc/contrib.texi (Contributors): Refer to Hans Boehm's
38389         garbage collector only in textual form.
38390
38391 2017-02-05  Gerald Pfeifer  <gerald@pfeifer.com>
38392
38393         * doc/extend.texi (x86 specific memory model extensions for
38394         transactional memory): Simplify a phrase.
38395
38396 2017-02-05  Eric Botcazou  <ebotcazou@adacore.com>
38397
38398         PR target/79353
38399         * config/sparc/sync.md (atomic_loaddi_1): Replace 'U' constraint with
38400         'r', 'm' constraint with 'T' and !TARGET_ARCH64 with TARGET_ARCH32.
38401         (atomic_storedi_1): Likewise.
38402
38403 2017-02-04  Jakub Jelinek  <jakub@redhat.com>
38404
38405         PR tree-optimization/79338
38406         * tree-parloops.c (gather_scalar_reductions): Don't call
38407         vect_analyze_loop_form for loop->inner before destroying loop's
38408         loop_vinfo.
38409
38410 2017-02-03  Martin Sebor  <msebor@redhat.com>
38411
38412         PR tree-optimization/79327
38413         * gimple-ssa-sprintf.c (tree_digits): Avoid adding the base prefix
38414         when precision has resulted in leading zeros.
38415         (format_integer): Adjust the likely counter to assume an unknown
38416         argument that may be zero is non-zero.
38417
38418 2017-02-03  Jason Merrill  <jason@redhat.com>
38419
38420         PR c++/78689
38421         * tree-inline.c (copy_tree_body_r) [COND_EXPR]: Revert change to
38422         avoid copying non-taken branch.
38423
38424 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
38425
38426         PR tree-optimization/79340
38427         * tree-vect-loop.c (vectorizable_reduction): Release
38428         vec_defs elements after safe_splicing them into other vectors.
38429         Formatting fixes.
38430
38431         PR tree-optimization/79327
38432         * gimple-ssa-sprintf.c (adjust_range_for_overflow): If returning
38433         true, always set *argmin and *argmax to TYPE_{MIN,MAX}_VALUE of
38434         dirtype.
38435         (format_integer): Use wide_int_to_tree instead of build_int_cst
38436         + to_?hwi.  If argmin is NULL, just set argmin and argmax to
38437         TYPE_{MIN,MAX}_VALUE of argtype.  Simplify and fix computation
38438         of shortest and longest sequence.
38439
38440 2017-02-03  Uros Bizjak  <ubizjak@gmail.com>
38441
38442         * config/i386/i386.c (dimode_scalar_chain::convert_reg):
38443         Use pextrd for TARGET_SSE4_1 when creating scalar copy.
38444
38445 2017-02-03  Walter Lee  <walt@tilera.com>
38446
38447         PR target/78862
38448         * config/tilegx/tilegx.md (tilegx_expand_prologue): Add blockage
38449         after initial stackframe link reg save.
38450         * config/tilepro/tilepro.md (tilepro_expand_prologue): Likewise.
38451
38452 2017-02-03  Jakub Jelinek  <jakub@redhat.com>
38453
38454         PR target/79354
38455         * config/rs6000/rs6000.md (movsi_from_sf): Use wb constraint instead of
38456         wu for stxssp alternative.
38457
38458 2017-02-03  Martin Sebor  <msebor@redhat.com>
38459
38460         PR tree-optimization/79352
38461         * gimple-fold.c (get_range_strlen): Add argument.
38462         (get_range_strlen): Change return type to bool.
38463         (get_maxval_strlen): Pass in a dummy argument.
38464         * gimple-fold.h (get_range_strlen): Change return type to bool.
38465         * gimple-ssa-sprintf.c (get_string_length): Set unlikely counter.
38466         * tree.h (array_at_struct_end_p): Add argument.
38467         * tree.c (array_at_struct_end_p): Handle it.
38468
38469 2017-02-03  Martin Liska  <mliska@suse.cz>
38470
38471         PR lto/66295
38472         * multiple_target.c (create_dispatcher_calls): Redirect edge
38473         from a caller of a dispatcher.
38474         (expand_target_clones): Make the clones local.
38475         (ipa_target_clone): Do both target clones and resolvers.
38476         (ipa_dispatcher_calls): Remove the pass.
38477         (pass_dispatcher_calls::gate): Likewise.
38478         (make_pass_dispatcher_calls): Likewise.
38479         * passes.def (pass_target_clone): Put as very first IPA early
38480         pass.
38481
38482 2017-02-03  Martin Liska  <mliska@suse.cz>
38483
38484         * symtab.c (symtab_node::binds_to_current_def_p): Bail out
38485         in case of a function with ifunc attribute.
38486
38487 2017-02-03  Martin Liska  <mliska@suse.cz>
38488
38489         * cgraph.c (cgraph_node::dump): Dump function version info.
38490         * symtab.c (symtab_node::dump_base): Add missing new line.
38491
38492 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
38493
38494         * tree-ssa-ifcombine.c (update_profile_after_ifcombine): New function.
38495         (ifcombine_ifandif): Use it.
38496
38497 2017-02-03  Martin Liska  <mliska@suse.cz>
38498
38499         * doc/invoke.texi: Document default value for
38500         use-after-scope-direct-emission-threshold.
38501
38502 2017-02-03  Martin Liska  <mliska@suse.cz>
38503
38504         PR tree-optimization/79339
38505         * gimple-ssa-sprintf.c (format_floating_max): Call mpfr_clear.
38506         (format_floating): Likewise.
38507
38508 2017-02-03  Martin Liska  <mliska@suse.cz>
38509
38510         PR ipa/79337
38511         * ipa-prop.c (ipa_node_params_t::insert): Remove current
38512         implementation.
38513         (ipa_node_params_t::remove): Likewise.
38514         * ipa-prop.h (ipa_node_params::ipa_node_params): Make default
38515         initialization from removed ipa_node_params_t::insert.
38516         (ipa_node_params::~ipa_node_params): Move from removed
38517         ipa_node_params_t::release.
38518         * symbol-summary.h (symbol_summary::m_released): New member.
38519         Do not release a summary twice.  Do not allow to call finalizer
38520         for types of a summary that live in GGC memory.
38521
38522 2017-02-02  Naveen H.S  <Naveen.Hurugalawadi@cavium.com>
38523
38524         * config/aarch64/aarch64.c (thunderx2t99_tunings): Enable AES and
38525         cmp_branch fusion.
38526
38527 2017-02-02  Martin Sebor  <msebor@redhat.com>
38528
38529         PR middle-end/79275
38530         * gimple-ssa-sprintf.c (get_string_length): Set lower bound to zero.
38531         (format_string): Tighten up the range of output for non-constant
38532         strings and correct the expected range for wide non-constant strings.
38533
38534 2017-02-02  Martin Sebor  <msebor@redhat.com>
38535
38536         * doc/invoke.texi (-maccumulate-args): Fix bad grammar.
38537
38538         PR middle-end/32003
38539         * doc/invoke.texi (-fdump-tree-): Remove pass-specific options from
38540         index.
38541         (-fdump-tree-@var): Add to index and document how to come up
38542         with pass-specific option and dump file names.
38543         (-fdump-passes): Clarify where to look for output.
38544
38545 2017-02-02  Jan Hubicka  <hubicka@ucw.cz>
38546
38547         PR middle-end/77445
38548         * tree-ssa-threadbackward.c (profitable_jump_thread_path): Dump
38549         statistics of the analyzed path; allow threading for speed when
38550         any of BBs along the path are optimized for speed.
38551
38552 2017-02-02  Eric Botcazou  <ebotcazou@adacore.com>
38553
38554         PR middle-end/78468
38555         * emit-rtl.c (init_emit): Add ??? comment for problematic alignment
38556         settings of the virtual registers.
38557
38558         Revert again
38559         2016-08-23  Dominik Vogt  <vogt@linux.vnet.ibm.com>
38560
38561         * explow.c (get_dynamic_stack_size): Take known alignment of stack
38562         pointer + STACK_DYNAMIC_OFFSET into account when calculating the size
38563         needed.
38564
38565 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
38566
38567         * config/s390/vx-builtins.md ("vec_ceil", "vec_floor")
38568         ("vec_trunc", "vec_roundc", "vec_round"): Remove expanders.
38569
38570 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
38571
38572         * config/s390/s390.md: Add missing comments with the expanded
38573         mnemonics.
38574         * config/s390/vector.md: Likewise.
38575         * config/s390/vx-builtins.md: Likewise.
38576
38577 2017-02-02  Jakub Jelinek  <jakub@redhat.com>
38578
38579         PR target/79197
38580         * config/rs6000/rs6000.md (*fixuns_trunc<mode>di2_fctiduz): Rename to ...
38581         (fixuns_trunc<mode>di2): ... this, remove previous expander.  Put all
38582         conditions on a single line.
38583
38584 2017-02-02  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
38585
38586         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
38587         __S390_VX__ to __VX__.
38588
38589 2017-02-01  Andrew Pinski  <apinski@cavium.com>
38590
38591         * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost): Pass
38592         stmt_info to record_stmt_cost.
38593         (vect_get_known_peeling_cost): Pass stmt_info if known to
38594         record_stmt_cost.
38595         * config/aarch64/aarch64-protos.h (cpu_vector_cost): Split
38596         cpu_vector_cost field into
38597         scalar_int_stmt_cost and scalar_fp_stmt_cost.  Split vec_stmt_cost
38598         field into vec_int_stmt_cost and vec_fp_stmt_cost.
38599         * config/aarch64/aarch64.c (generic_vector_cost): Update for the
38600         splitting of scalar_stmt_cost and vec_stmt_cost.
38601         (thunderx_vector_cost): Likewise.
38602         (cortexa57_vector_cost): LIkewise.
38603         (exynosm1_vector_cost): Likewise.
38604         (xgene1_vector_cost): Likewise.
38605         (thunderx2t99_vector_cost): Improve after the splitting of the two
38606         fields.
38607         (aarch64_builtin_vectorization_cost): Update for the splitting of
38608         scalar_stmt_cost and vec_stmt_cost.
38609
38610 2017-02-01  Torvald Riegel  <triegel@redhat.com>
38611             Richard Henderson  <rth@redhat.com>
38612
38613         * builtins.c (fold_builtin_atomic_always_lock_free): Make "lock-free"
38614         conditional on existance of a fast atomic load.
38615         * optabs-query.c (can_atomic_load_p): New function.
38616         * optabs-query.h (can_atomic_load_p): Declare it.
38617         * optabs.c (expand_atomic_exchange): Always delegate to libatomic if
38618         no fast atomic load is available for the particular size of access.
38619         (expand_atomic_compare_and_swap): Likewise.
38620         (expand_atomic_load): Likewise.
38621         (expand_atomic_store): Likewise.
38622         (expand_atomic_fetch_op): Likewise.
38623         * testsuite/lib/target-supports.exp
38624         (check_effective_target_sync_int_128): Remove x86 because it provides
38625         no fast atomic load.
38626         (check_effective_target_sync_int_128_runtime): Likewise.
38627
38628 2017-02-01  Richard Biener  <rguenther@suse.de>
38629
38630         * graphite.c: Include tree-vectorizer.h for find_loop_location.
38631         (graphite_transform_loops): Provide opt-info for optimized nests.
38632         * tree-parloop.c (parallelize_loops): Provide opt-info for
38633         parallelized loops.
38634
38635 2017-02-01  Richard Biener  <rguenther@suse.de>
38636
38637         PR middle-end/79315
38638         * tree-cfg.c (move_stmt_op): Never set TREE_BLOCK when it
38639         was not set before.
38640
38641 2017-02-01  Richard Biener  <rguenther@suse.de>
38642
38643         PR tree-optimization/71824
38644         * graphite-scop-detection.c (scop_detection::build_scop_breadth):
38645         Verify the loops are valid in the merged SESE region.
38646         (scop_detection::can_represent_loop_1): Check analyzing the
38647         evolution of the number of iterations in the region succeeds.
38648
38649 2017-01-31  Ian Lance Taylor  <iant@golang.org>
38650
38651         * config/i386/i386.c (ix86_expand_split_stack_prologue): Add
38652         REG_ARGS_SIZE note to 32-bit push insns and call insn.
38653
38654 2017-01-31  David Malcolm  <dmalcolm@redhat.com>
38655
38656         PR preprocessor/79210
38657         * input.c (get_substring_ranges_for_loc): Replace line_width
38658         assertion with error-handling.
38659
38660 2017-01-31  Richard Biener  <rguenther@suse.de>
38661
38662         PR tree-optimization/77318
38663         * graphite-sese-to-poly.c (extract_affine): Fix assert.
38664         (create_pw_aff_from_tree): Take loop parameter.
38665         (add_condition_to_pbb): Pass loop of the condition to
38666         create_pw_aff_from_tree.
38667
38668 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
38669
38670         * config/s390/s390.c (s390_asan_shadow_offset): New function.
38671         (TARGET_ASAN_SHADOW_OFFSET): Redefine.
38672
38673 2017-01-31  Michael Meissner  <meissner@linux.vnet.ibm.com>
38674
38675         PR target/78597
38676         PR target/79038
38677         * config/rs6000/rs6000-protos.h (convert_float128_to_int): Delete,
38678         no longer used.
38679         (convert_int_to_float128): Likewise.
38680         * config/rs6000/rs6000.c (convert_float128_to_int): Likewise.
38681         (convert_int_to_float128): Likewise.
38682         * config/rs6000/rs6000.md (UNSPEC_IEEE128_MOVE): Likewise.
38683         (UNSPEC_IEEE128_CONVERT): Likewise.
38684         (floatsi<mode>2, FLOAT128 iterator): Bypass calling
38685         rs6000_expand_float128_convert if we have IEEE 128-bit hardware.
38686         Use local variables for IBM extended format.
38687         (fix_trunc<mode>si2, FLOAT128 iterator): Likewise.
38688         (fix_trunc<mode>si2_fprs): Likewise.
38689         (fixuns_trunc<IEEE128:mode><SDI:mode>2): Likewise.
38690         (floatuns<IEEE128:mode>2, IEEE128 iterator): Likewise.
38691         (fix<uns>_<mode>si2_hw): Rework the IEEE 128-bt hardware support
38692         to know that we can now have integers of all sizes in vector
38693         registers.
38694         (fix<uns>_<mode>di2_hw): Likewise.
38695         (float<uns>_<mode>si2_hw): Likewise.
38696         (fix_<mode>si2_hw): Likewise.
38697         (fixuns_<mode>si2_hw): Likewise.
38698         (float<uns>_<mode>di2_hw): Likewise.
38699         (float_<mode>di2_hw): Likewise.
38700         (float_<mode>si2_hw): Likewise.
38701         (floatuns_<mode>di2_hw): Likewise.
38702         (floatuns_<mode>si2_hw): Likewise.
38703         (xscvqp<su>wz_<mode>): Delete, no longer used.
38704         (xscvqp<su>dz_<mode>): Likewise.
38705         (xscv<su>dqp_<mode>): Likewise.
38706         (ieee128_mfvsrd_64bit): Likewise.
38707         (ieee128_mfvsrd_32bit): Likewise.
38708         (ieee128_mfvsrwz): Likewise.
38709         (ieee128_mtvsrw): Likewise.
38710         (ieee128_mtvsrd_64bit): Likewise.
38711         (ieee128_mtvsrd_32bit): Likewise.
38712
38713 2017-01-31  Martin Liska  <mliska@suse.cz>
38714
38715         PR ipa/79285
38716         * ipa-prop.c (ipa_free_all_node_params): Call release method
38717         instead of ~sumbol_summary to not to trigger double times
38718         dtor of hash_map.
38719
38720 2017-01-31  Aldy Hernandez  <aldyh@redhat.com>
38721
38722         PR tree-optimization/71691
38723         * bitmap.h (class auto_bitmap): New.
38724         * tree-ssa-loop-unswitch.c (tree_may_unswitch_on): Call
38725         is_maybe_undefined instead of ssa_undefined_value_p.
38726
38727 2017-01-31  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
38728
38729         * config/s390/s390-c.c (s390_cpu_cpp_builtins_internal): Rename
38730         __S390_ARCH_LEVEL__ to __ARCH__.
38731
38732 2017-01-31  Jakub Jelinek  <jakub@redhat.com>
38733
38734         PR tree-optimization/79267
38735         * value-prof.c (gimple_ic): Only drop lhs for noreturn calls
38736         if should_remove_lhs_p is true.
38737
38738 2017-01-30  Alexandre Oliva  <aoliva@redhat.com>
38739
38740         PR debug/63238
38741         * dwarf2out.c (clone_as_declaration): Drop DW_AT_alignment.
38742         (add_alignment_attribute): New.
38743         (base_type_die): Add alignment attribute.
38744         (subrange_type_die): Likewise.
38745         (modified_type_die): Likewise.
38746         (gen_array_type_die): Likewise.
38747         (gen_descr_array_type_die: Likewise.
38748         (gen_enumeration_type_die): Likewise.
38749         (gen_subprogram_die): Likewise.
38750         (gen_variable_die): Likewise.
38751         (gen_field_die): Likewise.
38752         (gen_ptr_to_mbr_type_die): Likewise.
38753         (gen_struct_or_union_type_die): Likewise.
38754         (gen_subroutine_type_die): Likewise.
38755         (gen_typedef_die): Likewise.
38756         (base_type_cmp): Compare alignment attribute.
38757
38758 2017-01-30  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
38759
38760         PR target/79170
38761         * config/rs6000/altivec.md (*setb_internal): Rename to setb_signed.
38762         (setb_unsigned) New pattern for setb with CCUNS.
38763         * config/rs6000/rs6000.c (expand_block_compare): Use a different
38764         subfc./subfe sequence to avoid overflow problems.  Generate a
38765         shorter sequence with cmpld/setb for power9.
38766         * config/rs6000/rs6000.md (subf<mode>3_carry_dot2): Add a new pattern
38767         for generating subfc. instruction.
38768         (cmpstrsi): Add TARGET_POPCNTD predicate as the generate sequence
38769         now uses this instruction.
38770
38771 2017-01-30  Ian Lance Taylor  <iant@google.com>
38772
38773         PR debug/79289
38774         * dwarf2out.c (gen_type_die_with_usage): When picking a variant
38775         for FUNCTION_TYPE/METHOD_TYPE, use the first matching one.
38776
38777 2017-01-30  Martin Sebor  <msebor@redhat.com>
38778
38779         * gimple-ssa-sprintf.c (fmtresult::adjust_for_width_or_precision):
38780         Move constant to the right of a relational operator.
38781         (get_mpfr_format_length, format_character, format_string): Ditto.
38782         (should_warn_p, maybe_warn): Same.
38783
38784         * doc/invoke.texi (-Wformat-truncation=1): Fix typo.
38785
38786 2017-01-30  Maxim Ostapenko  <m.ostapenko@samsung.com>
38787
38788         PR lto/79061
38789         * asan.c (get_translation_unit_decl): Remove function.
38790         (asan_add_global): Force has_dynamic_init to zero in LTO mode.
38791
38792 2017-01-30  Martin Liska  <mliska@suse.cz>
38793
38794         PR gcov-profile/79259
38795         * opts.c (common_handle_option): Enable flag_ipa_bit_cp w/
38796         -fprofile-generate.
38797
38798 2017-01-30  Martin Liska  <mliska@suse.cz>
38799
38800         PR bootstrap/78985
38801         * config/aarch64/cortex-a57-fma-steering.c (func_fma_steering::analyze):
38802         Initialize variables with NULL value.
38803
38804 2017-01-30  Richard Earnshaw  <rearnsh@arm.com>
38805
38806         PR target/79260
38807         * config.gcc (arm*-*-*): Add arm/arm-flags.h and arm/arm-isa.h to
38808         tm_p_file.
38809         * arm/arm-protos.h: Don't directly include arm-flags.h and arm-isa.h.
38810
38811 2017-01-30  Richard Biener  <rguenther@suse.de>
38812
38813         PR tree-optimization/79276
38814         * tree-vrp.c (process_assert_insertions): Properly adjust common
38815         when removing a duplicate.
38816
38817 2017-01-30  Richard Biener  <rguenther@suse.de>
38818
38819         PR tree-optimization/79256
38820         * targhooks.c (default_builtin_vector_alignment_reachable): Honor
38821         BIGGEST_FIELD_ALIGNMENT and ADJUST_FIELD_ALIGN to fix up bogus
38822         alignment on TYPE.
38823         * tree.c (build_aligned_type): Set TYPE_USER_ALIGN.
38824
38825 2017-01-30  Dominik Vogt  <vogt@linux.vnet.ibm.com>
38826
38827         PR target/79240
38828         * config/s390/s390.md ("*r<noxa>sbg_<mode>_srl_bitmask")
38829         ("*r<noxa>sbg_<mode>_sll_bitmask")
38830         ("*extzv_<mode>_srl<clobbercc_or_nocc>")
38831         ("*extzv_<mode>_sll<clobbercc_or_nocc>"):
38832         Use contiguous_bitmask_nowrap_operand.
38833
38834 2017-01-29  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
38835
38836         PR target/79268
38837         * config/rs6000/altivec.h (vec_xl): Revise #define.
38838         (vec_xst): Likewise.
38839
38840 2017-01-27  Uros Bizjak  <ubizjak@gmail.com>
38841
38842         * config/i386/i386.c (print_reg): Use REGNO instead of true_regnum.
38843
38844 2017-01-27  Bernd Schmidt  <bschmidt@redhat.com>
38845
38846         PR rtl-optimization/79194
38847         * cprop.c (one_cprop_pass): Move deletion of code after unconditional
38848         traps before call to bypass_conditional_jumps.
38849
38850 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
38851
38852         PR tree-optimization/71374
38853         * lra-constraints.c (check_conflict_input_operands): New.
38854         (match_reload): Use it.
38855
38856 2017-01-27  Vladimir Makarov  <vmakarov@redhat.com>
38857
38858         PR target/79131
38859         * lra-assigns.c (find_hard_regno_for_1): Take endianess for into
38860         account to calculate conflict_set.
38861
38862 2017-01-27  Bin Cheng  <bin.cheng@arm.com>
38863
38864         PR rtl-optimization/78559
38865         * combine.c (try_combine): Discard REG_EQUAL and REG_EQUIV for
38866         other_insn in combine.
38867
38868 2017-01-27  Pekka Jääskeläinen  <pekka.jaaskelainen@parmance.com>
38869
38870         * builtin-types.def: Use unsigned_char_type_node for BT_UINT8.  Use
38871         uint16_type_node for BT_UINT16.
38872
38873 2017-01-27  David Malcolm  <dmalcolm@redhat.com>
38874
38875         * doc/sourcebuild.texi (Testsuites): Add "GIMPLE Tests" and
38876         "RTL Tests" to menu.
38877         (GIMPLE Tests): New node.
38878         (RTL Tests): New node.
38879
38880 2017-01-27  Richard Biener  <rguenther@suse.de>
38881
38882         PR tree-optimization/79245
38883         * tree-loop-distribution.c (distribute_loop): Apply cost
38884         modeling also to detected patterns.
38885
38886 2017-01-27  Richard Biener  <rguenther@suse.de>
38887
38888         PR tree-optimization/71433
38889         * tree-vrp.c (register_new_assert_for): Revert earlier changes.
38890         (compare_assert_loc): New function.
38891         (process_assert_insertions): Sort and optimize assert locations
38892         to remove duplicates and push down identical assertions on
38893         edges to their destination block.
38894
38895 2017-01-27  Richard Biener  <rguenther@suse.de>
38896
38897         PR tree-optimization/79244
38898         * tree-vrp.c (remove_range_assertions): Forcefully propagate
38899         out SSA names even if abnormal.
38900
38901 2017-01-27  Jakub Jelinek  <jakub@redhat.com>
38902
38903         * realmpfr.h: Poison MPFR_RND{N,Z,U,D}.
38904         * gimple-ssa-sprintf.c (format_floating_max): Use GMP_RNDN
38905         instead of MPFR_RNDN.
38906
38907 2017-01-27  Richard Earnshaw  <rearnsha@arm.com>
38908
38909         PR target/79239
38910         * arm.c (arm_option_override): Don't call build_target_option_node
38911         until after doing all option overrides.
38912         (arm_valid_target_attribute_tree): Likewise.
38913
38914 2017-01-27  Martin Liska  <mliska@suse.cz>
38915
38916         * doc/invoke.texi (-fprofile-arcs): Document profiling support
38917         for {cd}tors and C++ {cd}tors.
38918
38919 2017-01-27  Dominik Vogt  <vogt@linux.vnet.ibm.com>
38920
38921         * config/s390/s390.md ("*setmem_long_and")
38922         ("*setmem_long_and_31z"): Use zero_extend instead of and.
38923
38924 2017-01-26  Martin Sebor  <msebor@redhat.com>
38925
38926         * gimple-ssa-sprintf.c (format_floating): Simplify the computation
38927         of precision.
38928
38929 2017-01-26  Martin Sebor  <msebor@redhat.com>
38930
38931         * gimple-ssa-sprintf.c (format_floating): Test HAVE_XFmode and
38932         HAVE_DFmode before using XFmode or DFmode.
38933         (parse_directive): Avoid using the z length modifier to avoid
38934         the ISO C++98 does not support the â€˜z’ gnu_printf length modifier.
38935
38936         PR middle-end/78703
38937         * gimple-ssa-sprintf.c (adjust_for_width_or_precision): Change
38938         to accept adjustment as an array.
38939         (get_int_range): New function.
38940         (struct directive): Make width and prec arrays.
38941         (directive::set_width, directive::set_precision): Call get_int_range.
38942         (format_integer, format_floating): Handle width and precision ranges.
38943         (format_string, parse_directive): Same.
38944
38945 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
38946
38947         PR debug/79129
38948         * dwarf2out.c (generate_skeleton_bottom_up): For children with
38949         comdat_type_p set, just clone them, but keep the children in the
38950         original DIE.
38951
38952         PR debug/78835
38953         * dwarf2out.c (prune_unused_types): Mark all functions with DIEs
38954         which have direct callers with -fvar-tracking-assignments enabled
38955         in the current TU.
38956         (resolve_addr): Avoid adding skeleton DIEs for DW_AT_call_origin
38957         inside of type units.
38958
38959 2017-01-26  Martin Sebor  <msebor@redhat.com>
38960
38961         PR middle-end/78703
38962         * gimple-ssa-sprintf.c (struct result_range): Add likely and
38963         unlikely counters.
38964         (struct format_result): Replace number_chars, number_chars_min,
38965         and number_chars_max with a single member of struct result_range.
38966         Remove bounded.
38967         (format_result::operator+=): Adjust.
38968         (struct fmtresult): Remove bounded.  Handle likely and unlikely
38969         counters.
38970         (fmtresult::adjust_for_width_or_precision): New function.
38971         (fmtresult:type_max_digits): New function.
38972         (bytes_remaining): Handle likely and unlikely counters.
38973         (min_bytes_remaining): Remove.
38974         (format_percent): Simplify.
38975         (format_integer, format_floating): Set likely and unlikely counters.
38976         (get_string_length, format_character, format_string): Same.
38977         (format_plain, should_warn_p): New function.
38978         (maybe_warn): Call should_warn_p.  Update diagnostic messages
38979         and handle those for all directives, including plain strings.
38980         (format_directive): Handle likely and unlikely counters.
38981         Remove unnecessary quoting from diagnostics.  Add an informational
38982         note.
38983         (add_bytes): Remove.
38984         (pass_sprintf_length::compute_format_length): Simplify.
38985         (try_substitute_return_value): Handle likely and unlikely counters.
38986
38987 2017-01-26  Carl Love  <cel@us.ibm.com>
38988
38989         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Remove
38990         bogus entries for the P8V_BUILTIN_VEC_VGBBD built-ins
38991
38992 2017-01-26  Vladimir Makarov  <vmakarov@redhat.com>
38993
38994         PR target/79131
38995         * lra-assigns.c (setup_live_pseudos_and_spill_after_risky): Take
38996         endianess for subregs into account.
38997         * lra-constraints.c (lra_constraints): Do risky transformations
38998         always on the first iteration.
38999         * lra-lives.c (check_pseudos_live_through_calls): Add arg
39000         last_call_used_reg_set.
39001         (process_bb_lives): Define and use last_call_used_reg_set.
39002         * lra.c (lra): Always continue after lra_constraints on the first
39003         iteration.
39004
39005 2017-01-26  Kirill Yukhin  <kirill.yukhin@gmail.com>
39006
39007         * gcc.target/i386/avx512bw-kshiftlq-2.c: Use unsigned long long
39008         constant.
39009         * gcc.target/i386/avx512bw-kshiftrq-2.c: Ditto.
39010
39011 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
39012
39013         * config/i386/avx512fintrin.h (_ktest_mask16_u8,
39014         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): Move to ...
39015         * config/i386/avx512dqintrin.h (_ktest_mask16_u8,
39016         _ktestz_mask16_u8, _ktestc_mask16_u8, _kadd_mask16): ... here.
39017         * config/i386/i386-builtin.def (__builtin_ia32_ktestchi,
39018         __builtin_ia32_ktestzhi, __builtin_ia32_kaddhi): Use
39019         OPTION_MASK_ISA_AVX512DQ instead of OPTION_MASK_ISA_AVX512F.
39020         * config/i386/sse.md (SWI1248_AVX512BWDQ2): New mode iterator.
39021         (kadd<mode>, ktest<mode>): Use it instead of SWI1248_AVX512BWDQ.
39022
39023 2017-01-26  Marek Polacek  <polacek@redhat.com>
39024
39025         PR c/79199
39026         * fold-const.c (operand_equal_p) [COND_EXPR]: Use OP_SAME_WITH_NULL
39027         for the third operand.
39028
39029 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
39030
39031         PR middle-end/79236
39032         * omp-low.c (struct omp_context): Add simt_stmt field.
39033         (scan_omp_for): Return omp_context *.
39034         (scan_omp_simd): Set simt_stmt on the non-_simt_ SIMD
39035         context to the _simt_ SIMD stmt.
39036         (lower_omp_for): For combined SIMD with sibling _simt_
39037         SIMD, make sure to use the same decls in _looptemp_
39038         clauses as in the sibling.
39039
39040 2017-01-26  David Sherwood  <david.sherwood@arm.com>
39041
39042         PR middle-end/79212
39043         * gimplify.c (omp_notice_variable): Add GOVD_SEEN flag to variables in
39044         all contexts.
39045
39046 2017-01-26  Jakub Jelinek  <jakub@redhat.com>
39047
39048         PR target/70465
39049         * reg-stack.c (emit_swap_insn): Instead of fld a; fld b; fxchg %st(1);
39050         emit fld b; fld a; if possible.
39051
39052         * brig-builtins.def: Update copyright years.
39053         * config/arm/arm_acle_builtins.def: Update copyright years.
39054
39055 2017-01-25  Michael Meissner  <meissner@linux.vnet.ibm.com>
39056
39057         PR target/79179
39058         * config/rs6000/vsx.md (vsx_extract_<mode>_store): Use wY
39059         constraint instead of o for the stxsd instruction.
39060
39061 2017-01-25  Carl Love  <cel@us.ibm.com>
39062
39063         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Fix order
39064         of entries for ALTIVEC_BUILTIN_VEC_PACKS and P8V_BUILTIN_VEC_VGBBD.
39065
39066 2017-01-25  Jonathan Wakely  <jwakely@redhat.com>
39067
39068         * doc/invoke.texi (C++ Dialect Options): Fix typo.
39069
39070 2017-01-25  Richard Biener  <rguenther@suse.de>
39071
39072         PR tree-optimization/69264
39073         * target.def (vector_alignment_reachable): Improve documentation.
39074         * doc/tm.texi: Regenerate.
39075         * targhooks.c (default_builtin_vector_alignment_reachable): Simplify
39076         and add a comment.
39077         * tree-vect-data-refs.c (vect_supportable_dr_alignment): Revert
39078         earlier changes with respect to TYPE_USER_ALIGN.
39079         (vector_alignment_reachable_p): Likewise.  Improve dumping.
39080
39081 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
39082
39083         PR target/79145
39084         * config/arm/arm.md (xordi3): Force constant operand into a register
39085         for TARGET_IWMMXT.
39086
39087 2016-01-25  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
39088
39089         * doc/invoke.texi (-fstore-merging): Correct default optimization
39090         levels at which it is enabled.
39091         (-O): Move -fstore-merging from list to...
39092         (-O2): ... Here.
39093
39094 2017-01-25  Richard Biener  <rguenther@suse.de>
39095
39096         PR debug/78363
39097         * omp-expand.c: Include debug.h.
39098         (expand_omp_taskreg): Make sure to generate early debug before
39099         outlining anything from a function.
39100         (expand_omp_target): Likewise.
39101         (grid_expand_target_grid_body): Likewise.
39102
39103 2017-01-25  Maxim Ostapenko  <m.ostapenko@samsung.com>
39104
39105         PR lto/79061
39106         * asan.c (get_translation_unit_decl): New function.
39107         (asan_add_global): Extract modules file name from globals
39108         TRANSLATION_UNIT_DECL name.
39109
39110 2017-01-24  Eric Botcazou  <ebotcazou@adacore.com>
39111
39112         PR target/77439
39113         * config/arm/arm.c (arm_function_ok_for_sibcall): Add back restriction
39114         for long calls with APCS frame and VFP.
39115
39116 2017-01-24  David Malcolm  <dmalcolm@redhat.com>
39117
39118         * cfg.c (original_copy_tables_initialized_p): New function.
39119         * cfg.h (original_copy_tables_initialized_p): New decl.
39120         * cfgrtl.c (relink_block_chain): Guard the call to
39121         free_original_copy_tables with a call to
39122         original_copy_tables_initialized_p.
39123         * cgraph.h (symtab_node::native_rtl_p): New decl.
39124         * cgraphunit.c (symtab_node::native_rtl_p): New function.
39125         (symtab_node::needed_p): Don't assert for early assembly output
39126         for __RTL functions.
39127         (cgraph_node::finalize_function): Set "force_output" for __RTL
39128         functions.
39129         (cgraph_node::analyze): Bail out early for __RTL functions.
39130         (analyze_functions): Update assertion to support __RTL functions.
39131         (cgraph_node::expand): Bail out early for __RTL functions.
39132         * final.c (rest_of_clean_state): Don't call delete_tree_ssa for
39133         __RTL functions.
39134         * function.h (struct function): Update comment for field
39135         "pass_startwith".
39136         * gimple-expr.c: Include "tree-pass.h".
39137         (gimple_has_body_p): Return false for __RTL functions.
39138         * Makefile.in (OBJS): Add run-rtl-passes.o.
39139         * pass_manager.h (gcc::pass_manager::get_rest_of_compilation): New
39140         accessor.
39141         (gcc::pass_manager::get_clean_slate): New accessor.
39142         * passes.c: Include "insn-addr.h".
39143         (should_skip_pass_p): Add logging.  Update logic for running
39144         "expand" to be compatible with both __GIMPLE and __RTL.  Guard
39145         property-provider override so it is only done for gimple passes.
39146         Don't skip dfinit.
39147         (skip_pass): New function.
39148         (execute_one_pass): Call skip_pass when skipping passes.
39149         * read-md.c (md_reader::read_char): Support filtering
39150         the input to a subset of line numbers.
39151         (md_reader::md_reader): Initialize fields
39152         m_first_line and m_last_line.
39153         (md_reader::read_file_fragment): New function.
39154         * read-md.h (md_reader::read_file_fragment): New decl.
39155         (md_reader::m_first_line): New field.
39156         (md_reader::m_last_line): New field.
39157         * read-rtl-function.c (function_reader::create_function): Only
39158         create cfun if it doesn't already exist.  Set PROP_rtl on cfun's
39159         curr_properties.  Set DECL_INITIAL to a dummy block.
39160         (read_rtl_function_body_from_file_range): New function.
39161         * read-rtl-function.h (read_rtl_function_body_from_file_range):
39162         New decl.
39163         * run-rtl-passes.c: New file.
39164         * run-rtl-passes.h: New file.
39165
39166 2017-01-24  Jeff Law  <law@redhat.com>
39167
39168         * config/microblaze/microblaze.h (ASM_FORMAT_PRIVATE_NAME): Increase
39169         buffer size.
39170
39171 2017-01-24  Bin Cheng  <bin.cheng@arm.com>
39172
39173         PR tree-optimization/79159
39174         * tree-ssa-loop-niter.c (get_cst_init_from_scev): New function.
39175         (record_nonwrapping_iv): Improve boundary using above function if no
39176         value range information.
39177
39178 2017-01-24  Pekka Jääskeläinen  <pekka@parmance.com>
39179             Martin Jambor  <mjambor@suse.cz>
39180
39181         * brig-builtins.def: New file.
39182         * builtins.def (DEF_HSAIL_BUILTIN): New macro.
39183         (DEF_HSAIL_ATOMIC_BUILTIN): Likewise.
39184         (DEF_HSAIL_SAT_BUILTIN): Likewise.
39185         (DEF_HSAIL_INTR_BUILTIN): Likewise.
39186         (DEF_HSAIL_CVT_ZEROI_SAT_BUILTIN): Likewise.
39187         * builtin-types.def (BT_INT8): New.
39188         (BT_INT16): Likewise.
39189         (BT_UINT8): Likewise.
39190         (BT_UINT16): Likewise.
39191         (BT_FN_ULONG): Likewise.
39192         (BT_FN_UINT_INT): Likewise.
39193         (BT_FN_UINT_ULONG): Likewise.
39194         (BT_FN_UINT_LONG): Likewise.
39195         (BT_FN_UINT_PTR): Likewise.
39196         (BT_FN_ULONG_PTR): Likewise.
39197         (BT_FN_INT8_FLOAT): Likewise.
39198         (BT_FN_INT16_FLOAT): Likewise.
39199         (BT_FN_UINT32_FLOAT): Likewise.
39200         (BT_FN_UINT16_FLOAT): Likewise.
39201         (BT_FN_UINT8_FLOAT): Likewise.
39202         (BT_FN_UINT64_FLOAT): Likewise.
39203         (BT_FN_UINT16_UINT32): Likewise.
39204         (BT_FN_UINT32_UINT16): Likewise.
39205         (BT_FN_UINT16_UINT16_UINT16): Likewise.
39206         (BT_FN_INT_PTR_INT): Likewise.
39207         (BT_FN_UINT_PTR_UINT): Likewise.
39208         (BT_FN_LONG_PTR_LONG): Likewise.
39209         (BT_FN_ULONG_PTR_ULONG): Likewise.
39210         (BT_FN_VOID_UINT64_UINT64): Likewise.
39211         (BT_FN_UINT8_UINT8_UINT8): Likewise.
39212         (BT_FN_INT8_INT8_INT8): Likewise.
39213         (BT_FN_INT16_INT16_INT16): Likewise.
39214         (BT_FN_INT_INT_INT): Likewise.
39215         (BT_FN_UINT_FLOAT_UINT): Likewise.
39216         (BT_FN_FLOAT_UINT_UINT): Likewise.
39217         (BT_FN_ULONG_UINT_UINT): Likewise.
39218         (BT_FN_ULONG_UINT_PTR): Likewise.
39219         (BT_FN_ULONG_ULONG_ULONG): Likewise.
39220         (BT_FN_UINT_UINT_UINT): Likewise.
39221         (BT_FN_VOID_UINT_PTR): Likewise.
39222         (BT_FN_UINT_UINT_PTR: Likewise.
39223         (BT_FN_UINT32_UINT64_PTR): Likewise.
39224         (BT_FN_INT_INT_UINT_UINT): Likewise.
39225         (BT_FN_UINT_UINT_UINT_UINT): Likewise.
39226         (BT_FN_UINT_UINT_UINT_PTR): Likewise.
39227         (BT_FN_UINT_ULONG_ULONG_UINT): Likewise.
39228         (BT_FN_ULONG_ULONG_ULONG_ULONG): Likewise.
39229         (BT_FN_LONG_LONG_UINT_UINT): Likewise.
39230         (BT_FN_ULONG_ULONG_UINT_UINT): Likewise.
39231         (BT_FN_VOID_UINT32_UINT64_PTR): Likewise.
39232         (BT_FN_VOID_UINT32_UINT32_PTR): Likewise.
39233         (BT_FN_UINT_UINT_UINT_UINT_UINT): Likewise.
39234         (BT_FN_UINT_FLOAT_FLOAT_FLOAT_FLOAT): Likewise.
39235         (BT_FN_ULONG_ULONG_ULONG_UINT_UINT): Likewise.
39236         * doc/frontends.texi: List BRIG FE.
39237         * doc/install.texi (Testing): Add BRIG tesring requirements.
39238         * doc/invoke.texi (Overall Options): Mention BRIG.
39239         * doc/standards.texi (Standards): Doucment BRIG HSA version.
39240
39241 2017-01-24  Richard Biener  <rguenther@suse.de>
39242
39243         PR translation/79208
39244         * ipa-devirt.c (odr_types_equivalent_p): Fix typo in diagnostic.
39245
39246 2017-01-24  Martin Jambor  <mjambor@suse.cz>
39247
39248         PR bootstrap/79198
39249         * ipa-prop.c (ipa_free_all_node_params): Call summary destructor.
39250         * ipa-prop.c (ipa_node_params_t::insert): Initialize fields known_csts
39251         and known_contexts.
39252
39253 2017-01-24  Aldy Hernandez  <aldyh@redhat.com>
39254
39255         PR middle-end/79123
39256         * gimple-ssa-warn-alloca.c (alloca_call_type): Make sure
39257         casts from signed to unsigned really don't have a range.
39258
39259 2017-01-24  Markus Trippelsdorf  <markus@trippelsdorf.de>
39260
39261         * gimple-ssa-sprintf.c (format_floating): Change MPFR_RNDx to
39262         GMP_RNDx for compatiblity.
39263
39264 2017-01-24  Martin Liska  <mliska@suse.cz>
39265
39266         PR bootstrap/79132
39267         * tree-ssa-reassoc.c (rewrite_expr_tree_parallel): Insert assert
39268         that would prevent us to call alloca with -1 as argument.
39269
39270 2017-01-24  Jakub Jelinek  <jakub@redhat.com>
39271
39272         * dwarf2out.c (output_compilation_unit_header, output_file_names):
39273         Avoid -Wformat-security warning.
39274
39275 2017-01-23  Andrew Pinski  <apinski@cavium.com>
39276
39277         * config/aarch64/aarch64.c (thunderx2t99_addrcost_table): Improve
39278         cost table.
39279
39280 2017-01-23  Martin Sebor  <msebor@redhat.com>
39281
39282         PR middle-end/78703
39283         * gimple-ssa-sprintf.c (warn_level): New global.
39284         (format_integer): Use it here and throughout the rest of the file.
39285         Use the same switch to compute sign as base.
39286         (maybe_warn): New function.
39287         (format_directive): Factor out warnings into maybe_warn.
39288         Add debugging output.  Use warn_level.
39289         (add_bytes): Use warn_level.
39290         (pass_sprintf_length::compute_format_length): Add debugging output.
39291         (try_substitute_return_value): Same.
39292         (pass_sprintf_length::handle_gimple_call): Set and use warn_level.
39293
39294         PR middle-end/78703
39295         * gimple-ssa-sprintf.c (struct format_result): Remove constant member.
39296         (struct fmtresult, format_integer, format_floating): Adjust.
39297         (fmtresult::fmtresult): Set max correctly in two argument ctor.
39298         (get_string_length, format_string,format_directive): Same.
39299         (pass_sprintf_length::compute_format_length): Same.
39300         (try_substitute_return_value): Simplify slightly.
39301
39302         PR middle-end/78703
39303         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust formatting.
39304         (fmtresult::operator+=): Outlined.
39305         (struct fmtresult): Add ctors.
39306         (struct conversion_spec): Rename...
39307         (struct directive): ...to this.  Add and remove data members.
39308         (directive::set_width, directive::set_precision): New functions.
39309         (format_percent): Use fmtresult ctor.
39310         (get_width_and_precision): Remove.
39311         (format_integer): Make naming changes.  Avoid computing width and
39312         precision.
39313         (format_floating): Same.  Adjust indentation.
39314         (format_character, format_none): New functions.
39315         (format_string): Moved character handling to format_character.
39316         (format_directive): Remove arguments, change return type.
39317         (parse_directive): New function.
39318         (pass_sprintf_length::compute_format_length): Move directive
39319         parsing to parse_directive.
39320
39321 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
39322
39323         * tree.h (assign_assembler_name_if_neeeded): Rename to ...
39324         (assign_assembler_name_if_needed): ... this.
39325         * tree.c (assign_assembler_name_if_neeeded): Rename to ...
39326         (assign_assembler_name_if_needed): ... this.
39327         (free_lang_data_in_cgraph): Adjust callers.
39328         * cgraphunit.c (cgraph_node::analyze): Likewise.
39329         * omp-expand.c (expand_omp_taskreg, expand_omp_target):
39330         Likewise.
39331
39332 2017-01-23  Richard Biener  <rguenther@suse.de>
39333
39334         PR tree-optimization/79088
39335         PR tree-optimization/79188
39336         * tree-ssa-threadupdate.c (mark_threaded_blocks): Move code
39337         resetting loop bounds after last path deletion.  Reset loop
39338         bounds of the target loop, make code match the comments.
39339         * tree-ssa-threadbackwards.c (pass_early_thread_jumps::execute):
39340         Make sure loops need no fixups.
39341
39342 2017-01-23  Kelvin Nilsen  <kelvin@gcc.gnu.org>
39343
39344         * config/rs6000/rs6000-builtin.def (VSIEDPF): Add scalar insert
39345         exponent support with double type for first argument.
39346         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Changed
39347         type returned by __builtin_vec_extract_sig,
39348         __builtin_vec_extract_sig_sp, and __builtin_vec_extract_sig_dp
39349         functions from "vector int" to "vector unsigned int" or from
39350         "vector long long int" to "vector unsigned long long int".
39351         Changed type returned by __builtin_vec_extract_exp,
39352         __builtin_vec_extract_exp_sp, and __builtin_vec_extract_exp_dp
39353         functions from "vector int" to "vector unsigned int" or from
39354         "vector long long int" to "vector unsigned long long int".
39355         Changed return type of __builtin_vec_test_data_class,
39356         __builtin_vec_test_data_class_sp, and
39357         __builtin_vec_test_data_class_dp from "vector int" to
39358         "vector bool int" or from "vector long long int" to "vector bool
39359         long long int" and changed second argument type from "unsigned
39360         int" to "int".  Added new overloaded function forms "vector float
39361         __builtin_vec_insert_exp (vector float, vector unsigned int)" and
39362         "vector float __builtin_vec_insert_exp_sp (vector float, vector
39363         unsigned int)" and "vector double __builtin_vec_insert_exp (vector
39364         double, vector unsigned long long int)" and "vector double
39365         __builtin_vec_insert_exp_dp (vector double, vector unsigned long
39366         long int)".  Changed return type of
39367         __builtin_scalar_test_data_class and
39368         __builtin_scalar_test_data_class_sp and
39369         __builtin_scalar_test_data_class_dp from "unsigned int" to "bool
39370         int" and changed second argument from "unsigned int" to "int".
39371         Changed type returned by __builtin_scalar_test_neg,
39372         __builtin_scalar_test_neg_sp, and __builtin_scalar_test_neg_dp
39373         from "int" to "bool int".  Added new overloaded function form
39374         "double __builtin_scalar_insert_exp (double, unsigned long long int)".
39375         * config/rs6000/vsx.md (xsiexpdpf): New insn for scalar insert
39376         exponent double-precision with floating point first argument.
39377         * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
39378         documentation of scalar_test_data_class, scalar_test_neg,
39379         scalar_extract_sig, scalar_extract_exp, scalar_insert_exp,
39380         vector_extract_exp, vec_extract_sig, vec_insert_exp, and
39381         vec_test_data_class built-in functions to reflect refinements in
39382         their type signatures.
39383
39384 2017-01-23  Andreas Tobler  <andreast@gcc.gnu.org>
39385
39386         * config/aarch64/aarch64.c (aarch64_elf_asm_constructor): Increase
39387         size of buf.
39388         (aarch64_elf_asm_destructor): Likewise.
39389
39390 2017-01-23  Bernd Schmidt  <bschmidt@redhat.com>
39391
39392         PR rtl-optimization/78634
39393         * config/i386/i386.c (ix86_max_noce_ifcvt_seq_cost): New function.
39394         (TARGET_MAX_NOCE_IFCVT_SEQ_COST): Define.
39395         * ifcvt.c (noce_try_cmove): Add missing cost check.
39396
39397         PR rtl-optimization/71724
39398         * combine.c (if_then_else_cond): Look for situations where it is
39399         beneficial to undo the work of one of the recursive calls.
39400
39401 2017-01-23  Bin Cheng  <bin.cheng@arm.com>
39402
39403         PR tree-optimization/70754
39404         * tree-predcom.c (stmt_combining_refs): New parameter INSERT_BEFORE.
39405         (reassociate_to_the_same_stmt): New parameter INSERT_BEFORE.  Insert
39406         combined stmt before it if not NULL.
39407         (combine_chains): Process refs reversely and compute dominance point
39408         for root ref.
39409
39410 2017-01-23  Martin Liska  <mliska@suse.cz>
39411
39412         PR tree-optimization/79196
39413         * tree-ssa-strlen.c (fold_strstr_to_memcmp): Rename to ...
39414         (fold_strstr_to_strncmp): ... this.  Fold the pattern to strncmp
39415         instead of memcmp.
39416         (strlen_optimize_stmt): Call the renamed function.
39417
39418 2017-01-23  Michael Matz  <matz@suse.de>
39419
39420         PR tree-optimization/78384
39421         * tree-ssa-loop-split.c (patch_loop_exit): Use correct edge.
39422
39423 2017-01-23  Richard Biener  <rguenther@suse.de>
39424
39425         PR tree-optimization/79186
39426         * tree-vrp.c (register_new_assert_for): Make sure we've seen
39427         both incoming edges before moving an assert.
39428
39429 2017-01-23  Martin Jambor  <mjambor@suse.cz>
39430
39431         * ipa-prop.c (load_from_param_1): Removed.
39432         (load_from_unmodified_param): Bits from load_from_param_1 put back
39433         here.
39434         (load_from_param): Removed.
39435         (compute_complex_assign_jump_func): Removed stmt2 and just replaced it
39436         with stmt.  Reverted back to use of load_from_unmodified_param.
39437
39438 2017-01-23  Martin Jambor  <mjambor@suse.cz>
39439
39440         PR ipa/79108
39441         * ipa-prop.h (ipa_param_descriptor): Anotate with with GTY(()).
39442         (ipa_node_params): Annotate with GTY((for_user)).  Make descriptors
39443         field a pointer to garbage collected vector, mark lattices and
39444         ipcp_orig_node with GTY((skip)).
39445         (ipa_get_param_count): Adjust to descriptors being a pointer.
39446         (ipa_get_param): Likewise.
39447         (ipa_get_type): Likewise.
39448         (ipa_get_param_move_cost): Likewise.
39449         (ipa_set_param_used): Likewise.
39450         (ipa_get_controlled_uses): Likewise.
39451         (ipa_set_controlled_uses): Likewise.
39452         (ipa_is_param_used): Likewise.
39453         (ipa_node_params_t): Move into garbage collector.  New methods insert
39454         and remove.
39455         (ipa_node_params_sum): Annotate wth GTY(()).
39456         (ipa_check_create_node_params): Adjust to ipa_node_params_sum being
39457         garbage collected.
39458         (ipa_load_from_parm_agg): Adjust declaration.
39459         * ipa-icf.c (param_used_p): Adjust to descriptors being a pointer.
39460         * ipa-profile.c (ipa_profile): Likewise.
39461         * ipa-prop.c (ipa_get_param_decl_index_1): Likewise.
39462         (ipa_populate_param_decls): Make descriptors parameter garbage
39463         collected.
39464         (ipa_dump_param): Adjust to descriptors being a pointer.
39465         (ipa_alloc_node_params): Likewise.
39466         (ipa_initialize_node_params): Likewise.
39467         (load_from_param_1): Make descriptors parameter garbage collected.
39468         (load_from_unmodified_param): Likewise.
39469         (load_from_param): Likewise.
39470         (ipa_load_from_parm_agg): Likewise.
39471         (ipa_node_params::~ipa_node_params): Removed.
39472         (ipa_free_all_node_params): Remove call to delete operator.
39473         (ipa_node_params_t::insert): New.
39474         (ipa_node_params_t::remove): Likewise.
39475         (ipa_node_params_t::duplicate): Adjust to descriptors being a pointer,
39476         copy known_csts and known_contexts vectors.
39477         (ipa_read_node_info): Adjust to descriptors being a pointer.
39478         (ipcp_modif_dom_walker): Make m_descriptors field garbage
39479         collected.
39480         (ipcp_transform_function): Make descriptors variable garbage
39481         collected.
39482
39483 2017-01-23  Andrew Senkevich  <andrew.senkevich@intel.com>
39484
39485         * config/i386/avx512bwintrin.h: Add k-mask test, kortest intrinsics.
39486         * config/i386/avx512dqintrin.h: Ditto.
39487         * config/i386/avx512fintrin.h: Ditto.
39488         * config/i386/i386.c: Handle new builtins.
39489         * config/i386/i386-builtin.def: Add new builtins.
39490         * config/i386/sse.md (ktest<mode>, kortest<mode>): New.
39491         (UNSPEC_KORTEST, UNSPEC_KTEST): New.
39492
39493 2017-01-23  Jakub Jelinek  <jakub@redhat.com>
39494             Martin Liska  <mliska@suse.cz>
39495
39496         * asan.h: Define ASAN_USE_AFTER_SCOPE_ATTRIBUTE.
39497         * asan.c (asan_expand_poison_ifn): Support stores and use
39498         appropriate ASAN report function.
39499         * internal-fn.c (expand_ASAN_POISON_USE): New function.
39500         * internal-fn.def (ASAN_POISON_USE): Declare.
39501         * tree-into-ssa.c (maybe_add_asan_poison_write): New function.
39502         (maybe_register_def): Create ASAN_POISON_USE when sanitizing.
39503         * tree-ssa-dce.c (eliminate_unnecessary_stmts): Remove
39504         ASAN_POISON calls w/o LHS.
39505         * tree-ssa.c (execute_update_addresses_taken): Create clobber
39506         for ASAN_MARK (UNPOISON, &x, ...) in order to prevent usage of a LHS
39507         from ASAN_MARK (POISON, &x, ...) coming to a PHI node.
39508         * gimplify.c (asan_poison_variables): Add attribute
39509         use_after_scope_memory to variables that really needs to live
39510         in memory.
39511         * tree-ssa.c (is_asan_mark_p): Do not rewrite into SSA when
39512         having the attribute.
39513
39514 2017-01-23  Martin Liska  <mliska@suse.cz>
39515
39516         * asan.c (create_asan_shadow_var): New function.
39517         (asan_expand_poison_ifn): Likewise.
39518         * asan.h (asan_expand_poison_ifn): New declaration.
39519         * internal-fn.c (expand_ASAN_POISON): Likewise.
39520         * internal-fn.def (ASAN_POISON): New builtin.
39521         * sanopt.c (pass_sanopt::execute): Expand
39522         asan_expand_poison_ifn.
39523         * tree-inline.c (copy_decl_for_dup_finish): Make function
39524         external.
39525         * tree-inline.h (copy_decl_for_dup_finish): Likewise.
39526         * tree-ssa.c (is_asan_mark_p): New function.
39527         (execute_update_addresses_taken): Rewrite local variables
39528         (identified just by use-after-scope as addressable) into SSA.
39529
39530 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
39531
39532         * doc/install.texi (Specific): opensource.apple.com uses https
39533         now. Remove trailing slash.
39534
39535 2017-01-22  Gerald Pfeifer  <gerald@pfeifer.com>
39536
39537         * README.Portability: Remove note on an Irix compatibility issue.
39538
39539 2017-01-22  Dimitry Andric <dim@FreeBSD.org>
39540
39541         * gcov.c (INCLUDE_ALGORITHM): Define.
39542         (INCLUDE_VECTOR): Define.
39543         No longer include <vector> and <algorithm> directly.
39544
39545 2017-01-21  Gerald Pfeifer  <gerald@pfeifer.com>
39546
39547         * doc/extend.texi (Thread-Local): Change www.akkadia.org reference
39548         to https.
39549         * doc/invoke.texi (Code Gen Options): Ditto.
39550
39551 2017-01-21  Jan Hubicka  <hubicka@ucw.cz>
39552
39553         PR lto/78407
39554         * cfg.c (update_bb_profile_for_threading): Fix updating of probablity.
39555
39556 2017-01-21  Bernd Schmidt  <bschmidt@redhat.com>
39557
39558         rtl-optimization/79125
39559         * cprop.c (local_cprop_pass): Handle cases where we make an
39560         unconditional trap.
39561
39562 2017-01-20  Segher Boessenkool  <segher@kernel.crashing.org>
39563
39564         PR target/61729
39565         PR target/77850
39566         * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Adjust address to
39567         read from, for big endian.
39568
39569 2017-01-20  Jiong Wang  <jiong.wang@arm.com>
39570
39571         * config/aarch64/aarch64-builtins.c (aarch64_init_builtins): Register
39572         register pauth builtins for LP64 only.
39573
39574 2017-01-20  Marek Polacek  <polacek@redhat.com>
39575
39576         PR c/79152
39577         * gimplify.c (should_warn_for_implicit_fallthrough): Handle consecutive
39578         non-case labels.
39579
39580 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
39581
39582         * omp-expand.c (expand_omp_simd): Clear PROP_gimple_lomp_dev regardless
39583         of safelen status.
39584         * omp-offload.c (pass_omp_device_lower::gate): Use PROP_gimple_lomp_dev.
39585         * passes.c (dump_properties): Handle PROP_gimple_lomp_dev.
39586         * tree-inline.c (expand_call_inline): Propagate PROP_gimple_lomp_dev.
39587
39588 2017-01-20  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
39589
39590         PR target/71270
39591         * config/arm/arm.c (neon_valid_immediate): Reject vector constants
39592         in big-endian mode when they are not a single duplicated value.
39593
39594 2017-01-20  Richard Biener  <rguenther@suse.de>
39595
39596         * BASE-VER: Bump to 7.0.1.
39597
39598 2017-01-20  Alexander Monakov  <amonakov@ispras.ru>
39599
39600         * omp-low.c (omplow_simd_context): New struct.  Use it...
39601         (lower_rec_simd_input_clauses): ...here and...
39602         (lower_rec_input_clauses): ...here to hold common data.  Adjust all
39603         references to idx, lane, max_vf, is_simt.
39604
39605 2017-01-20  Graham Markall  <graham.markall@embecosm.com>
39606
39607         * config/arc/arc.h (LINK_SPEC): Use arclinux_nps emulation when
39608         mcpu=nps400.
39609
39610 2017-01-20  Martin Jambor  <mjambor@suse.cz>
39611
39612         * hsa.h: Renaed to hsa-common.h.  Adjusted a comment.
39613         * hsa.c: Renaed to hsa-common.c.  Change include of gt-hsa.h to
39614         gt-hsa-common.h.
39615         * Makefile.in (OBJS): Rename hsa.o to hsa-common.o.
39616         (GTFILES): Rename hsa.c to hsa-common.c.
39617         * hsa-brig.c: Change include of hsa.h to hsa-common.h.
39618         * hsa-dump.c: Likewise.
39619         * hsa-gen.c: Likewise.
39620         * hsa-regalloc.c: Likewise.
39621         * ipa-hsa.c: Likewise.
39622         * omp-expand.c: Likewise.
39623         * omp-low.c: Likewise.
39624         * toplev.c: Likewise.
39625
39626 2017-01-20  Marek Polacek  <polacek@redhat.com>
39627
39628         PR c/64279
39629         * doc/invoke.texi: Document -Wduplicated-branches.
39630         * fold-const.c (operand_equal_p): Handle MODIFY_EXPR, INIT_EXPR,
39631         COMPOUND_EXPR, PREDECREMENT_EXPR, PREINCREMENT_EXPR,
39632         POSTDECREMENT_EXPR, POSTINCREMENT_EXPR, CLEANUP_POINT_EXPR, EXPR_STMT,
39633         STATEMENT_LIST, and RETURN_EXPR.  For non-pure non-const functions
39634         return 0 only when not OEP_LEXICOGRAPHIC.
39635         (fold_build_cleanup_point_expr): Use the expression
39636         location when building CLEANUP_POINT_EXPR.
39637         * tree-core.h (enum operand_equal_flag): Add OEP_LEXICOGRAPHIC.
39638         * tree.c (add_expr): Handle error_mark_node.
39639
39640 2017-01-20  Martin Liska  <mliska@suse.cz>
39641
39642         PR lto/69188
39643         * tree-profile.c (init_ic_make_global_vars): Do not call
39644         finalize_decl.
39645         (gimple_init_gcov_profiler): Likewise.
39646
39647 2017-01-20  Martin Liska  <mliska@suse.cz>
39648
39649         PR ipa/71190
39650         * cgraph.h (maybe_create_reference): Remove argument and
39651         update comment.
39652         * cgraphclones.c (cgraph_node::create_virtual_clone): Remove one
39653         argument.
39654         * ipa-cp.c (create_specialized_node): Likewise.
39655         * symtab.c (symtab_node::maybe_create_reference): Handle
39656         VAR_DECLs and ADDR_EXPRs and select ipa_ref_use type.
39657
39658 2017-01-20  Martin Liska  <mliska@suse.cz>
39659
39660         * read-rtl-function.c (function_reader::create_function): Use
39661         build_decl instread of build_decl_stat.
39662
39663 2017-01-20  Andrew Senkevich  <andrew.senkevich@intel.com>
39664
39665         * config/i386/avx512bwintrin.h: Add k-mask registers shift intrinsics.
39666         * config/i386/avx512dqintrin.h: Ditto.
39667         * config/i386/avx512fintrin.h: Ditto.
39668         * config/i386/i386-builtin-types.def: Add new types.
39669         * config/i386/i386.c: Handle new types.
39670         * config/i386/i386-builtin.def (__builtin_ia32_kshiftliqi)
39671         (__builtin_ia32_kshiftlihi, __builtin_ia32_kshiftlisi)
39672         (__builtin_ia32_kshiftlidi, __builtin_ia32_kshiftriqi)
39673         (__builtin_ia32_kshiftrihi, __builtin_ia32_kshiftrisi)
39674         (__builtin_ia32_kshiftridi): New.
39675         * config/i386/sse.md (k<code><mode>): Rename *k<code><mode>.
39676
39677 2017-01-19  Segher Boessenkool  <segher@kernel.crashing.org>
39678
39679         PR target/78875
39680         PR target/79140
39681         * config/rs6000/rs6000.c (TARGET_STACK_PROTECT_GUARD): Unconditionally
39682         define to rs6000_init_stack_protect_guard.
39683         (rs6000_init_stack_protect_guard): New function.
39684
39685 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
39686             Yunqiang Su  <yunqiang.su@imgtec.com>
39687
39688         * config.gcc (supported_defaults): Add madd4.
39689         (with_madd4): Add validation.
39690         (all_defaults): Add madd4.
39691         * config/mips/mips.opt (mmadd4): New option.
39692         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
39693         mmadd4.
39694         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
39695         __mips_no_madd4.
39696         (ISA_HAS_UNFUSED_MADD4): Gate with mips_madd4.
39697         (ISA_HAS_FUSED_MADD4): Likewise.
39698         * doc/invoke.texi (-mmadd4): Document the new option.
39699         * doc/install.texi (--with-madd4): Document the new option.
39700
39701 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
39702
39703         * config/aarch64/aarch64-builtins.c (enum aarch64_builtins): New
39704         entries for AARCH64_PAUTH_BUILTIN_XPACLRI,
39705         AARCH64_PAUTH_BUILTIN_PACIA1716, AARCH64_PAUTH_BUILTIN_AUTIA1716.
39706         (aarch64_init_pauth_hint_builtins): New.
39707         (aarch64_init_builtins): Call aarch64_init_pauth_hint_builtins.
39708         (aarch64_expand_builtin): Expand new builtins.
39709
39710 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
39711
39712         * reg-notes.def (CFA_TOGGLE_RA_MANGLE): New reg-note.
39713         * combine-stack-adj.c (no_unhandled_cfa): Handle
39714         REG_CFA_TOGGLE_RA_MANGLE.
39715         * dwarf2cfi.c (dwarf2out_frame_debug): Handle REG_CFA_TOGGLE_RA_MANGLE.
39716         * config/aarch64/aarch64.c (aarch64_expand_prologue): Generates DWARF
39717         info for return address signing.
39718         (aarch64_expand_epilogue): Likewise.
39719
39720 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
39721
39722         * config/aarch64/aarch64-opts.h (aarch64_function_type): New enum.
39723         * config/aarch64/aarch64-protos.h
39724         (aarch64_return_address_signing_enabled): New declaration.
39725         * config/aarch64/aarch64.c (aarch64_return_address_signing_enabled):
39726         New function.
39727         (aarch64_expand_prologue): Sign return address before it's pushed onto
39728         stack.
39729         (aarch64_expand_epilogue): Authenticate return address fetched from
39730         stack.
39731         (aarch64_override_options): Sanity check for ILP32 and ISA level.
39732         (aarch64_attributes): New function attributes for "sign-return-address".
39733         * config/aarch64/aarch64.md (UNSPEC_AUTI1716, UNSPEC_AUTISP,
39734         UNSPEC_PACI1716, UNSPEC_PACISP, UNSPEC_XPACLRI): New unspecs.
39735         ("*do_return"): Generate combined instructions according to key index.
39736         ("<pauth_mnem_prefix>sp", "<pauth_mnem_prefix1716", "xpaclri"): New.
39737         * config/aarch64/iterators.md (PAUTH_LR_SP, PAUTH_17_16): New integer
39738         iterators.
39739         (pauth_mnem_prefix, pauth_hint_num_a): New integer attributes.
39740         * config/aarch64/aarch64.opt (msign-return-address=): New.
39741         * doc/extend.texi (AArch64 Function Attributes): Documents
39742         "sign-return-address=".
39743         * doc/invoke.texi (AArch64 Options): Documents "-msign-return-address=".
39744
39745 2017-01-19  Matthew Fortune  <matthew.fortune@imgtec.com>
39746
39747         * doc/invoke.texi: Add missing -mlxc1-sxc1 options to
39748         overall option summary.
39749
39750 2017-01-19  Jiong Wang  <jiong.wang@arm.com>
39751
39752         * config/aarch64/aarch64-arches.def: New entry for "armv8.3-a".
39753         * config/aarch64/aarch64.h (AARCH64_FL_V8_3, AARCH64_FL_FOR_ARCH8_3,
39754         AARCH64_ISA_V8_3, TARGET_ARMV8_3): New.
39755         * doc/invoke.texi (AArch64 Options): Document "armv8.3-a".
39756
39757 2017-01-19  Michael Meissner  <meissner@linux.vnet.ibm.com>
39758
39759         * config/rs6000/rs6000-cpus.def (ISA_3_0_MASKS_SERVER): Enable
39760         -mpower9-minmax by default for -mcpu=power9.
39761         (ISA_3_MASKS_IEEE): Require -mvsx-small-integer to enable IEEE
39762         128-bit floating point.
39763
39764 2017-01-20  Alan Modra  <amodra@gmail.com>
39765
39766         * config/rs6000/rs6000.md (cmpstrnsi, cmpstrsi): Fail if
39767         optimizing for size.
39768
39769 2017-01-20  Alan Modra  <amodra@gmail.com>
39770
39771         PR target/79144
39772         * config/rs6000/rs6000.c (expand_strn_compare): Get the asm name
39773         for strcmp and strncmp from corresponding builtin decl.
39774
39775 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
39776
39777         * config.gcc (x86_64-*-rtems*): Use i386/rtemself.h
39778         instead of i386/rtems-64.h.
39779         * config/i386/rtems-64.h: Remove.
39780
39781 2017-01-19  Uros Bizjak  <ubizjak@gmail.com>
39782
39783         PR target/78478
39784         Revert:
39785         2013-11-05  Uros Bizjak  <ubizjak@gmail.com>
39786
39787         * config/i386/rtemself.h (LONG_DOUBLE_TYPE_SIZE): New define.
39788
39789 2017-01-19  Tamar Christina  <tamar.christina@arm.com>
39790
39791         * config/aarch64/aarch64.c (aarch64_simd_gen_const_vector_dup):
39792         Change int to HOST_WIDE_INT.
39793         * config/aarch64/aarch64-protos.h
39794         (aarch64_simd_gen_const_vector_dup): Likewise.
39795         * config/aarch64/aarch64-simd.md: Add copysign<mode>3.
39796
39797 2017-01-19  David Malcolm  <dmalcolm@redhat.com>
39798
39799         * langhooks-def.h (lhd_type_for_size): New decl.
39800         (LANG_HOOKS_TYPE_FOR_SIZE): Define as lhd_type_for_size.
39801         * langhooks.c (lhd_type_for_size): New function, taken from
39802         lto_type_for_size.
39803
39804 2017-01-19  Pat Haugen  <pthaugen@us.ibm.com>
39805
39806         * config/rs6000/power9.md (power9-alu): Remove 'cmp' type and add
39807         define_bypass for CR latency.
39808         (power9-cracked-alu): Update bypass latency and remove power9-branch.
39809         (power9-alu2): Add define_bypass for CR latency.
39810         (power9-cmp): New.
39811         (power9-mul): Update insn latency.
39812         (power9-mul-compare): Update insn latency, bypass latency and remove
39813         power9-branch.
39814
39815 2016-01-19  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
39816
39817         * config/aarch64/aarch64-protos.h (aarch64_nopcrelative_literal_loads):
39818         Delete.
39819         * config/aarch64/aarch64.md
39820         (aarch64_reload_movcp<GPF_TF:mode><P:mode>): Delete reference to
39821         aarch64_nopcrelative_literal_loads.
39822         (aarch64_reload_movcp<VALL:mode><P:mode>): Likewise.
39823
39824 2017-01-19  Chenghua Xu  <paul.hua.gm@gmail.com>
39825
39826         * config/mips/mips.h (ISA_HAS_FUSED_MADD4): Enable for
39827         TARGET_LOONGSON_3A.
39828         (ISA_HAS_UNFUSED_MADD4): Exclude TARGET_LOONGSON_3A.
39829
39830 2017-01-19  Doug Gilmore  <doug.gilmore@imgtec.com>
39831
39832         PR target/78176
39833         * config.gcc (supported_defaults): Add lxc1-sxc1.
39834         (with_lxc1_sxc1): Add validation.
39835         (all_defaults): Add lxc1-sxc1.
39836         * config/mips/mips.opt (mlxc1-sxc1): New option.
39837         * config/mips/mips.h (OPTION_DEFAULT_SPECS): Add a default for
39838         mlxc1-sxc1.
39839         (TARGET_CPU_CPP_BUILTINS): Add builtin_define for
39840         __mips_no_lxc1_sxc1.
39841         (ISA_HAS_LXC1_SXC1): Gate with mips_lxc1_sxc1.
39842         * doc/invoke.texi (-mlxc1-sxc1): Document the new option.
39843         * doc/install.texi (--with-lxc1-sxc1): Document the new option.
39844
39845 2017-01-19  Richard Biener  <rguenther@suse.de>
39846
39847         PR tree-optimization/72488
39848         * tree-ssa-sccvn.c (run_scc_vn): When we abort the VN make
39849         sure to restore SSA info.
39850         * tree-ssa.c (verify_ssa): Verify SSA info is not shared.
39851
39852 2017-01-19  Richard Earnshaw  <rearnsha@arm.com>
39853
39854         PR rtl-optimization/79121
39855         * expr.c (expand_expr_real_2, case LSHIFT_EXPR): Look at the signedness
39856         of the inner type when shifting an extended value.
39857
39858 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
39859
39860         PR lto/78407
39861         * symtab.c (symtab_node::equal_address_to): Fix comparing of
39862         interposable aliases.
39863
39864 2017-01-18  Peter Bergner  <bergner@vnet.ibm.com>
39865
39866         PR target/78516
39867         * config/rs6000/spe.md (mov_si<mode>_e500_subreg0): Fix constraints.
39868         Use the evmergelohi instruction.
39869         (mov_si<mode>_e500_subreg4_2_le): Likewise.
39870         (mov_sitf_e500_subreg8_2_be): Likewise.
39871         (mov_sitf_e500_subreg12_2_le): Likewise.
39872         (mov_si<mode>_e500_subreg0_2_le): Fix constraints.
39873         (mov_si<mode>_e500_subreg4_2_be): Likewise.
39874         (mov_sitf_e500_subreg8_2_le): Likewise.
39875         (mov_sitf_e500_subreg12_2_be): Likewise.
39876
39877 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
39878
39879         * config/rs6000/altivec.md (altivec_vbpermq): Change "type"
39880         attribute from vecsimple to vecperm.
39881         (altivec_vbpermq2): Likewise.
39882
39883 2017-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
39884
39885         PR target/79040
39886         * config/rs6000/altivec.h: Fix typo of vec_cntlz to vec_cnttz.
39887
39888 2017-01-18  Aaron Sawdey  <acsawdey@linux.vnet.ibm.com>
39889         * config/rs6000/rs6000-protos.h (expand_strn_compare): Add arg.
39890         * config/rs6000/rs6000.c (expand_strn_compare): Add ability to expand
39891         strcmp. Fix bug where comparison didn't stop with zero byte. Fix
39892         case where N arg is SIZE_MAX.
39893         * config/rs6000/rs6000.md (cmpstrnsi): Args to expand_strn_compare.
39894         (cmpstrsi): Add pattern.
39895
39896 2017-01-18  Michael Meissner  <meissner@linux.vnet.ibm.com>
39897
39898         * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
39899         __builtin_vec_revb builtins.
39900         * config/rs6000/rs6000-builtins.def (P9V_BUILTIN_XXBRQ_V16QI): Add
39901         built-in functions to support generation of the ISA 3.0 XXBR<x>
39902         vector byte reverse instructions.
39903         (P9V_BUILTIN_XXBRQ_V1TI): Likewise.
39904         (P9V_BUILTIN_XXBRD_V2DI): Likewise.
39905         (P9V_BUILTIN_XXBRD_V2DF): Likewise.
39906         (P9V_BUILTIN_XXBGW_V4SI): Likewise.
39907         (P9V_BUILTIN_XXBGW_V4SF): Likewise.
39908         (P9V_BUILTIN_XXBGH_V8HI): Likewise.
39909         (P9V_BUILTIN_VEC_REVB): Likewise.
39910         * config/rs6000/vsx.md (p9_xxbrq_v1ti): New insns/expanders to
39911         generate the ISA 3.0 XXBR<x> vector byte reverse instructions.
39912         (p9_xxbrq_v16qi): Likewise.
39913         (p9_xxbrd_<mode>, VSX_D iterator): Likewise.
39914         (p9_xxbrw_<mode>, VSX_W iterator): Likewise.
39915         (p9_xxbrh_v8hi): Likewise.
39916         * config/rs6000/altivec.h (vec_revb): Define if ISA 3.0.
39917         * doc/extend.texi (RS/6000 Altivec Built-ins): Document the
39918         vec_revb built-in functions.
39919
39920 2017-01-18  Uros Bizjak  <ubizjak@gmail.com>
39921
39922         PR rtl-optimization/78952
39923         * config/i386/i386.md (any_extract): New code iterator.
39924         (*insvqi_2): Use any_extract for source operand.
39925         (*insvqi_3): Use any_shiftrt for source operand.
39926
39927 2017-01-18  Wilco Dijkstra  <wdijkstr@arm.com>
39928
39929         * config/aarch64/aarch64.c (aarch64_sched_adjust_priority)
39930         New function.
39931         (TARGET_SCHED_ADJUST_PRIORITY): Define target hook.
39932
39933 2017-01-18  Matthias Klose  <doko@ubuntu.com>
39934
39935         * doc/install.texi: Allow default for --with-target-bdw-gc-include.
39936
39937 2016-01-18  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
39938
39939         * config/rs6000/altivec.h (vec_bperm): Change #define.
39940         * config/rs6000/altivec.md (UNSPEC_VBPERMD): New enum constant.
39941         (altivec_vbpermq2): New define_insn.
39942         (altivec_vbpermd): Likewise.
39943         * config/rs6000/rs6000-builtin.def (VBPERMQ2): New monomorphic
39944         function interface.
39945         (VBPERMD): Likewise.
39946         (VBPERM): New polymorphic function interface.
39947         * config/rs6000/r6000-c.c (altivec_overloaded_builtins_table):
39948         Add entries for P9V_BUILTIN_VEC_VBPERM.
39949         * doc/extend.texi: Add interfaces for vec_bperm.
39950
39951 2017-01-18  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
39952
39953         * config/s390/s390-c.c (s390_expand_overloaded_builtin): Downcase
39954         first letter of error messages.
39955         (s390_resolve_overloaded_builtin): Likewise.
39956         * config/s390/s390.c (s390_expand_builtin): Likewise.
39957         (s390_invalid_arg_for_unprototyped_fn): Likewise.
39958         (s390_valid_target_attribute_inner_p): Likewise.
39959         * config/s390/s390.md ("tabort"): Likewise.
39960
39961 2017-01-18  Toma Tabacu  <toma.tabacu@imgtec.com>
39962
39963         * config/mips/mips.h (ISA_HAS_DIV3): Remove unused macro.
39964         (ISA_AVOID_DIV_HILO): New macro.
39965         (ISA_HAS_DIV): Use new ISA_AVOID_DIV_HILO macro.
39966         (ISA_HAS_DDIV): Likewise.
39967
39968 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
39969
39970         * doc/invoke.texi (fabi-version): Correct number of occurrences.
39971
39972 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
39973
39974         * doc/invoke.texi (fabi-version): Spelling fix.
39975
39976 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
39977
39978         PR c++/70182
39979         * doc/invoke.texi (fabi-version): Mention mangling fix for
39980         operator names.
39981
39982 2017-01-18  Markus Trippelsdorf  <markus@trippelsdorf.de>
39983
39984         PR c++/77489
39985         * doc/invoke.texi (fabi-version): Document discriminator mangling.
39986
39987 2017-01-17  Segher Boessenkool  <segher@kernel.crashing.org>
39988
39989         PR target/78875
39990         * config/rs6000/rs6000-opts.h (stack_protector_guard): New enum.
39991         * config/rs6000/rs6000.c (rs6000_option_override_internal): Handle
39992         the new options.
39993         * config/rs6000/rs6000.md (stack_protect_set): Handle the new more
39994         flexible settings.
39995         (stack_protect_test): Ditto.
39996         * config/rs6000/rs6000.opt (mstack-protector-guard=,
39997         mstack-protector-guard-reg=, mstack-protector-guard-offset=): New
39998         options.
39999         * doc/invoke.texi (Option Summary) [RS/6000 and PowerPC Options]:
40000         Add -mstack-protector-guard=, -mstack-protector-guard-reg=, and
40001         -mstack-protector-guard-offset=.
40002         (RS/6000 and PowerPC Options): Ditto.
40003
40004 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
40005
40006         * config/i386/i386.h (MASK_CLASS_P): New define.
40007         * config/i386/i386.c (inline_secondary_memory_needed): Ensure that
40008         there are no registers from different register sets also when
40009         mask registers are used.  Update function comment.
40010         * config/i386/i386.md (*movsi_internal): Split (*k/*krm) alternative
40011         to (*k/*r) and (*k/*km) alternatives.
40012
40013 2017-01-17  Wilco Dijkstra  <wdijkstr@arm.com>
40014
40015         * config/aarch64/aarch64.md (eh_return): Remove pattern and splitter.
40016         * config/aarch64/aarch64.h (AARCH64_EH_STACKADJ_REGNUM): Remove.
40017         (EH_RETURN_HANDLER_RTX): New define.
40018         * config/aarch64/aarch64.c (aarch64_frame_pointer_required):
40019         Force frame pointer in EH return functions.
40020         (aarch64_expand_epilogue): Add barrier for eh_return.
40021         (aarch64_final_eh_return_addr): Remove.
40022         (aarch64_eh_return_handler_rtx): New function.
40023         * config/aarch64/aarch64-protos.h (aarch64_final_eh_return_addr):
40024         Remove.
40025         (aarch64_eh_return_handler_rtx): New prototype.
40026
40027 2017-01-17  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
40028
40029         * config/rs6000/altivec.h (vec_rlmi): New #define.
40030         (vec_vrlnm): Likewise.
40031         (vec_rlnm): Likewise.
40032         * config/rs6000/altivec.md (UNSPEC_VRLMI): New UNSPEC enum value.
40033         (UNSPEC_VRLNM): Likewise.
40034         (VIlong): New mode iterator.
40035         (altivec_vrl<VI_char>mi): New define_insn.
40036         (altivec_vrl<VI_char>nm): Likewise.
40037         * config/rs6000/rs6000-builtin.def (VRLWNM): New monomorphic
40038         function entry.
40039         (VRLDNM): Likewise.
40040         (RLNM): New polymorphic function entry.
40041         (VRLWMI): New monomorphic function entry.
40042         (VRLDMI): Likewise.
40043         (RLMI): New polymorphic function entry.
40044         * config/rs6000/r6000-c.c (altivec_overloaded_builtin_table): Add
40045         new entries for P9V_BUILTIN_VEC_RLMI and P9V_BUILTIN_VEC_RLNM.
40046         * doc/extend.texi: Add description of vec_rlmi, vec_rlnm, and
40047         vec_vrlnm.
40048
40049 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
40050
40051         PR debug/78839
40052         * dwarf2out.c (field_byte_offset): Restore the
40053         PCC_BITFIELD_TYPE_MATTERS behavior for INTEGER_CST DECL_FIELD_OFFSET
40054         and DECL_FIELD_BIT_OFFSET.  Use fold_build2 instead of build2 + fold.
40055         (analyze_variants_discr, gen_variant_part): Use fold_build2 instead
40056         of build2 + fold.
40057
40058 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
40059
40060         PR ada/67205
40061         * config/aarch64/aarch64.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): Define
40062
40063 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
40064
40065         PR debug/71669
40066         * dwarf2out.c (add_data_member_location_attribute): For constant
40067         offset bitfield emit for -gdwarf-5 DW_AT_data_bit_offset attribute
40068         instead of DW_AT_data_member_location, DW_AT_bit_offset and
40069         DW_AT_byte_size attributes.
40070
40071 2017-01-17  Eric Botcazou  <ebotcazou@adacore.com>
40072
40073         * config/rs6000/rs6000.c (rs6000_emit_move): Also use a TOC reference
40074         after forcing to constant memory when the code model is medium.
40075
40076 2017-01-17  Julia Koval  <julia.koval@intel.com>
40077
40078         PR target/76731
40079         * config/i386/avx512fintrin.h
40080         (_mm512_i32gather_ps): Change __addr type to void const*.
40081         (_mm512_mask_i32gather_ps): Ditto.
40082         (_mm512_i32gather_pd): Ditto.
40083         (_mm512_mask_i32gather_pd): Ditto.
40084         (_mm512_i64gather_ps): Ditto.
40085         (_mm512_mask_i64gather_ps): Ditto.
40086         (_mm512_i64gather_pd): Ditto.
40087         (_mm512_mask_i64gather_pd): Ditto.
40088         (_mm512_i32gather_epi32): Ditto.
40089         (_mm512_mask_i32gather_epi32): Ditto.
40090         (_mm512_i32gather_epi64): Ditto.
40091         (_mm512_mask_i32gather_epi64): Ditto.
40092         (_mm512_i64gather_epi32): Ditto.
40093         (_mm512_mask_i64gather_epi32): Ditto.
40094         (_mm512_i64gather_epi64): Ditto.
40095         (_mm512_mask_i64gather_epi64): Ditto.
40096         (_mm512_i32scatter_ps): Change __addr type to void*.
40097         (_mm512_mask_i32scatter_ps): Ditto.
40098         (_mm512_i32scatter_pd): Ditto.
40099         (_mm512_mask_i32scatter_pd): Ditto.
40100         (_mm512_i64scatter_ps): Ditto.
40101         (_mm512_mask_i64scatter_ps): Ditto.
40102         (_mm512_i64scatter_pd): Ditto.
40103         (_mm512_mask_i64scatter_pd): Ditto.
40104         (_mm512_i32scatter_epi32): Ditto.
40105         (_mm512_mask_i32scatter_epi32): Ditto.
40106         (_mm512_i32scatter_epi64): Ditto.
40107         (_mm512_mask_i32scatter_epi64): Ditto.
40108         (_mm512_i64scatter_epi32): Ditto.
40109         (_mm512_mask_i64scatter_epi32): Ditto.
40110         (_mm512_i64scatter_epi64): Ditto.
40111         (_mm512_mask_i64scatter_epi64): Ditto.
40112         * config/i386/avx512pfintrin.h
40113         (_mm512_mask_prefetch_i32gather_pd): Change __addr type to void const*.
40114         (_mm512_mask_prefetch_i32gather_ps): Ditto.
40115         (_mm512_mask_prefetch_i64gather_pd): Ditto.
40116         (_mm512_mask_prefetch_i64gather_ps): Ditto.
40117         (_mm512_prefetch_i32scatter_pd): Change __addr type to void*.
40118         (_mm512_prefetch_i32scatter_ps): Ditto.
40119         (_mm512_mask_prefetch_i32scatter_pd): Ditto.
40120         (_mm512_mask_prefetch_i32scatter_ps): Ditto.
40121         (_mm512_prefetch_i64scatter_pd): Ditto.
40122         (_mm512_prefetch_i64scatter_ps): Ditto.
40123         (_mm512_mask_prefetch_i64scatter_pd): Ditto.
40124         (_mm512_mask_prefetch_i64scatter_ps): Ditto.
40125         * config/i386/avx512vlintrin.h
40126         (_mm256_mmask_i32gather_ps): Change __addr type to void const*.
40127         (_mm_mmask_i32gather_ps): Ditto.
40128         (_mm256_mmask_i32gather_pd): Ditto.
40129         (_mm_mmask_i32gather_pd): Ditto.
40130         (_mm256_mmask_i64gather_ps): Ditto.
40131         (_mm_mmask_i64gather_ps): Ditto.
40132         (_mm256_mmask_i64gather_pd): Ditto.
40133         (_mm_mmask_i64gather_pd): Ditto.
40134         (_mm256_mmask_i32gather_epi32): Ditto.
40135         (_mm_mmask_i32gather_epi32): Ditto.
40136         (_mm256_mmask_i32gather_epi64): Ditto.
40137         (_mm_mmask_i32gather_epi64): Ditto.
40138         (_mm256_mmask_i64gather_epi32): Ditto.
40139         (_mm_mmask_i64gather_epi32): Ditto.
40140         (_mm256_mmask_i64gather_epi64): Ditto.
40141         (_mm_mmask_i64gather_epi64): Ditto.
40142         (_mm256_i32scatter_ps): Change __addr type to void*.
40143         (_mm256_mask_i32scatter_ps): Ditto.
40144         (_mm_i32scatter_ps): Ditto.
40145         (_mm_mask_i32scatter_ps): Ditto.
40146         (_mm256_i32scatter_pd): Ditto.
40147         (_mm256_mask_i32scatter_pd): Ditto.
40148         (_mm_i32scatter_pd): Ditto.
40149         (_mm_mask_i32scatter_pd): Ditto.
40150         (_mm256_i64scatter_ps): Ditto.
40151         (_mm256_mask_i64scatter_ps): Ditto.
40152         (_mm_i64scatter_ps): Ditto.
40153         (_mm_mask_i64scatter_ps): Ditto.
40154         (_mm256_i64scatter_pd): Ditto.
40155         (_mm256_mask_i64scatter_pd): Ditto.
40156         (_mm_i64scatter_pd): Ditto.
40157         (_mm_mask_i64scatter_pd): Ditto.
40158         (_mm256_i32scatter_epi32): Ditto.
40159         (_mm256_mask_i32scatter_epi32): Ditto.
40160         (_mm_i32scatter_epi32): Ditto.
40161         (_mm_mask_i32scatter_epi32): Ditto.
40162         (_mm256_i32scatter_epi64): Ditto.
40163         (_mm256_mask_i32scatter_epi64): Ditto.
40164         (_mm_i32scatter_epi64): Ditto.
40165         (_mm_mask_i32scatter_epi64): Ditto.
40166         (_mm256_i64scatter_epi32): Ditto.
40167         (_mm256_mask_i64scatter_epi32): Ditto.
40168         (_mm_i64scatter_epi32): Ditto.
40169         (_mm_mask_i64scatter_epi32): Ditto.
40170         (_mm256_i64scatter_epi64): Ditto.
40171         (_mm256_mask_i64scatter_epi64): Ditto.
40172         (_mm_i64scatter_epi64): Ditto.
40173         (_mm_mask_i64scatter_epi64): Ditto.
40174         * config/i386/i386-builtin-types.def (V16SF_V16SF_PCFLOAT_V16SI_HI_INT)
40175         (V8DF_V8DF_PCDOUBLE_V8SI_QI_INT, V8SF_V8SF_PCFLOAT_V8DI_QI_INT)
40176         (V8DF_V8DF_PCDOUBLE_V8DI_QI_INT, V16SI_V16SI_PCINT_V16SI_HI_INT)
40177         (V8DI_V8DI_PCINT64_V8SI_QI_INT, V8SI_V8SI_PCINT_V8DI_QI_INT)
40178         (V8DI_V8DI_PCINT64_V8DI_QI_INT, V2DF_V2DF_PCDOUBLE_V4SI_QI_INT)
40179         (V4DF_V4DF_PCDOUBLE_V4SI_QI_INT, V2DF_V2DF_PCDOUBLE_V2DI_QI_INT)
40180         (V4DF_V4DF_PCDOUBLE_V4DI_QI_INT, V4SF_V4SF_PCFLOAT_V4SI_QI_INT)
40181         (V8SF_V8SF_PCFLOAT_V8SI_QI_INT, V4SF_V4SF_PCFLOAT_V2DI_QI_INT)
40182         (V4SF_V4SF_PCFLOAT_V4DI_QI_INT, V2DI_V2DI_PCINT64_V4SI_QI_INT)
40183         (V4DI_V4DI_PCINT64_V4SI_QI_INT, V2DI_V2DI_PCINT64_V2DI_QI_INT)
40184         (V4DI_V4DI_PCINT64_V4DI_QI_INT, V4SI_V4SI_PCINT_V4SI_QI_INT)
40185         (V8SI_V8SI_PCINT_V8SI_QI_INT, V4SI_V4SI_PCINT_V2DI_QI_INT)
40186         (V4SI_V4SI_PCINT_V4DI_QI_INT, VOID_PFLOAT_HI_V16SI_V16SF_INT)
40187         (VOID_PFLOAT_QI_V8SI_V8SF_INT, VOID_PFLOAT_QI_V4SI_V4SF_INT)
40188         (VOID_PDOUBLE_QI_V8SI_V8DF_INT, VOID_PDOUBLE_QI_V4SI_V4DF_INT)
40189         (VOID_PDOUBLE_QI_V4SI_V2DF_INT, VOID_PFLOAT_QI_V8DI_V8SF_INT)
40190         (VOID_PFLOAT_QI_V4DI_V4SF_INT, VOID_PFLOAT_QI_V2DI_V4SF_INT)
40191         (VOID_PDOUBLE_QI_V8DI_V8DF_INT, VOID_PDOUBLE_QI_V4DI_V4DF_INT)
40192         (VOID_PDOUBLE_QI_V2DI_V2DF_INT, VOID_PINT_HI_V16SI_V16SI_INT)
40193         (VOID_PINT_QI_V8SI_V8SI_INT, VOID_PINT_QI_V4SI_V4SI_INT)
40194         (VOID_PLONGLONG_QI_V8SI_V8DI_INT, VOID_PLONGLONG_QI_V4SI_V4DI_INT)
40195         (VOID_PLONGLONG_QI_V4SI_V2DI_INT, VOID_PINT_QI_V8DI_V8SI_INT)
40196         (VOID_PINT_QI_V4DI_V4SI_INT, VOID_PINT_QI_V2DI_V4SI_INT)
40197         (VOID_PLONGLONG_QI_V8DI_V8DI_INT, VOID_QI_V8SI_PCINT64_INT_INT)
40198         (VOID_PLONGLONG_QI_V4DI_V4DI_INT, VOID_PLONGLONG_QI_V2DI_V2DI_INT)
40199         (VOID_HI_V16SI_PCINT_INT_INT, VOID_QI_V8DI_PCINT64_INT_INT)
40200         (VOID_QI_V8DI_PCINT_INT_INT): Remove.
40201         (V16SF_V16SF_PCVOID_V16SI_HI_INT,  V8DF_V8DF_PCVOID_V8SI_QI_INT)
40202         (V8SF_V8SF_PCVOID_V8DI_QI_INT, V8DF_V8DF_PCVOID_V8DI_QI_INT)
40203         (V16SI_V16SI_PCVOID_V16SI_HI_INT, V8DI_V8DI_PCVOID_V8SI_QI_INT)
40204         (V8SI_V8SI_PCVOID_V8DI_QI_INT, V8DI_V8DI_PCVOID_V8DI_QI_INT)
40205         (VOID_PVOID_HI_V16SI_V16SF_INT, VOID_PVOID_QI_V8SI_V8DF_INT)
40206         (VOID_PVOID_QI_V8DI_V8SF_INT, VOID_PVOID_QI_V8DI_V8DF_INT)
40207         (VOID_PVOID_HI_V16SI_V16SI_INT, VOID_PVOID_QI_V8SI_V8DI_INT)
40208         (VOID_PVOID_QI_V8DI_V8SI_INT, VOID_PVOID_QI_V8DI_V8DI_INT)
40209         (V2DF_V2DF_PCVOID_V4SI_QI_INT, V4DF_V4DF_PCVOID_V4SI_QI_INT)
40210         (V2DF_V2DF_PCVOID_V2DI_QI_INT, V4DF_V4DF_PCVOID_V4DI_QI_INT
40211         (V4SF_V4SF_PCVOID_V4SI_QI_INT, V8SF_V8SF_PCVOID_V8SI_QI_INT)
40212         (V4SF_V4SF_PCVOID_V2DI_QI_INT, V4SF_V4SF_PCVOID_V4DI_QI_INT)
40213         (V2DI_V2DI_PCVOID_V4SI_QI_INT, V4DI_V4DI_PCVOID_V4SI_QI_INT)
40214         (V2DI_V2DI_PCVOID_V2DI_QI_INT, V4DI_V4DI_PCVOID_V4DI_QI_INT)
40215         (V4SI_V4SI_PCVOID_V4SI_QI_INT, V8SI_V8SI_PCVOID_V8SI_QI_INT)
40216         (V4SI_V4SI_PCVOID_V2DI_QI_INT, V4SI_V4SI_PCVOID_V4DI_QI_INT)
40217         (VOID_PVOID_QI_V8SI_V8SF_INT, VOID_PVOID_QI_V4SI_V4SF_INT)
40218         (VOID_PVOID_QI_V4SI_V4DF_INT, VOID_PVOID_QI_V4SI_V2DF_INT)
40219         (VOID_PVOID_QI_V4DI_V4SF_INT, VOID_PVOID_QI_V2DI_V4SF_INT)
40220         (VOID_PVOID_QI_V4DI_V4DF_INT, VOID_PVOID_QI_V2DI_V2DF_INT)
40221         (VOID_PVOID_QI_V8SI_V8SI_INT, VOID_PVOID_QI_V4SI_V4SI_INT)
40222         (VOID_PVOID_QI_V4SI_V4DI_INT, VOID_PVOID_QI_V4SI_V2DI_INT)
40223         (VOID_PVOID_QI_V4DI_V4SI_INT, VOID_PVOID_QI_V2DI_V4SI_INT)
40224         (VOID_PVOID_QI_V4DI_V4DI_INT, VOID_PVOID_QI_V2DI_V2DI_INT)
40225         (VOID_QI_V8SI_PCVOID_INT_INT, VOID_HI_V16SI_PCVOID_INT_INT)
40226         (VOID_QI_V8DI_PCVOID_INT_INT): Add.
40227         * config/i386/i386.c (ix86_init_mmx_sse_builtins): Adjust builtin
40228         definitions accordingly.
40229
40230 2017-01-17  Kito Cheng  <kito.cheng@gmail.com>
40231             Kuan-Lin Chen  <kuanlinchentw@gmail.com>
40232
40233         PR target/79079
40234         * internal-fn.c (expand_mul_overflow): Use convert_modes instead of
40235         gen_lowpart.
40236
40237 2017-01-17  Vladimir Makarov  <vmakarov@redhat.com>
40238
40239         PR target/79058
40240         * ira-conflicts.c (ira_build_conflicts): Update total conflict
40241         hard regs for inner regno.
40242
40243 2017-01-17  Martin Liska  <mliska@suse.cz>
40244
40245         PR ipa/71207
40246         * ipa-polymorphic-call.c (contains_type_p): Fix wrong
40247         assumption and add comment.
40248
40249 2017-01-17  Nathan Sidwell  <nathan@acm.org>
40250
40251         * ipa-visibility.c (localize_node): New function, broken out of ...
40252         (function_and_variable_visibility): ... here. Call it.
40253
40254 2017-01-17  Jan Hubicka  <hubicka@ucw.cz>
40255
40256         PR middle-end/77445
40257         * tree-ssa-threadupdate.c (remove_ctrl_stmt_and_useless_edges):
40258         correctly set frequency of oudgoing edge.
40259         (duplicate_thread_path): Fix profile updating.
40260
40261 2017-01-17  Jakub Jelinek  <jakub@redhat.com>
40262
40263         PR other/79046
40264         * configure.ac: Add GCC_BASE_VER.
40265         * Makefile.in (version): Use @get_gcc_base_ver@ instead of cat to get
40266         version from BASE-VER file.
40267         (CFLAGS-gcc.o): Add -DBASEVER=$(BASEVER_s).
40268         (gcc.o): Depend on $(BASEVER).
40269         * common.opt (dumpfullversion): New option.
40270         * gcc.c (driver_handle_option): Handle OPT_dumpfullversion.
40271         * doc/invoke.texi: Document -dumpfullversion.
40272         * doc/install.texi: Document --with-gcc-major-version-only.
40273         * configure: Regenerated.
40274
40275 2017-01-17  Richard Biener  <rguenther@suse.de>
40276
40277         PR tree-optimization/71433
40278         * tree-vrp.c (register_new_assert_for): Merge same asserts
40279         on all incoming edges.
40280         (process_assert_insertions_for): Handle insertions at the
40281         beginning of BBs.
40282
40283 2017-01-17  Gerald Pfeifer  <gerald@pfeifer.com>
40284
40285         * config/i386/cygwin.h (LIBGCJ_SONAME): Remove.
40286         * config/i386/mingw32.h (LIBGCJ_SONAME): Remove.
40287
40288 2017-01-17  Kaz Kojima  <kkojima@gcc.gnu.org>
40289
40290         PR target/78633
40291         * config/sh/sh.md (cmpeqsi_t+1): Call copy_rtx to avoid invalid
40292         RTL sharing.
40293
40294 2017-01-17  Alan Modra  <amodra@gmail.com>
40295
40296         PR target/79066
40297         * config/rs6000/rs6000.md (elf_high, elf_low): Disable when pic.
40298         * config/rs6000/rs6000.c (rs6000_emit_allocate_stack): Don't allow
40299         symbolic stack limit when pic.
40300
40301 2017-01-16  Martin Sebor  <msebor@redhat.com>
40302
40303         PR tree-optimization/78608
40304         * gimple-ssa-sprintf.c (tree_digits): Avoid negating TYPE_MIN.
40305
40306 2017-01-16  Jeff Law  <law@redhat.com>
40307
40308         Revert:
40309         2016-12-02  Tadek Kijkowski  <tkijkowski@gmail.com>
40310         * Makefile.in (PREPROCESSOR_DEFINES): Add a level of indirection
40311         for several include directories that may be relative to sysroot.
40312         * config/i386/x-mingw32 (gplus_includedir): Define.
40313         (gplus_tool_includedir, gplus_backward_include_dir): Likewise.
40314         (native_system_includedir): Likewise.
40315         * config/i386/mingw32.h (STANDARD_STARTFILE_PREFIX_1): Do not
40316         override if TARGET_SYSTEM_ROOT is defined.
40317         (NATIVE_SYSTEM_HEADER_DIR): Likewise.
40318
40319         PR tree-optimization/79090
40320         PR tree-optimization/33562
40321         PR tree-optimization/61912
40322         PR tree-optimization/77485
40323         * tree-ssa-dse.c (compute_trims): Accept STMT argument.  Dump STMT
40324         and computed trims into the dump file.
40325
40326 2017-01-17  Uros Bizjak  <ubizjak@gmail.com>
40327
40328         * config/i386/i386.h (LIMIT_RELOAD_CLASS): Remove.
40329
40330 2017-01-16  Jakub Jelinek  <jakub@redhat.com>
40331
40332         PR c/79089
40333         * gimplify.c (gimplify_init_constructor): If want_value and
40334         object == lhs, unshare lhs to avoid invalid tree sharing.  Formatting
40335         fix.
40336
40337         PR target/79080
40338         * loop-doloop.c (doloop_modify): Call unshare_all_rtl_in_chain on
40339         sequence.  Formatting fixes.
40340         (doloop_optimize): Formatting fixes.
40341
40342         PR driver/49726
40343         * gcc.c (debug_level_greater_than_spec_func): New function.
40344         (static_spec_functions): Add debug-level-gt spec function.
40345         (ASM_DEBUG_SPEC, cpp_options): Use %:debug-level-gt(0) instead of
40346         !g0.
40347         * config/darwin.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
40348         * config/darwin9.h (DSYMUTIL_SPEC, ASM_DEBUG_SPEC): Likewise.
40349         * common.opt (g, gcoff, gdwarf, gdwarf-, ggdb, gno-pubnames,
40350         gpubnames, ggnu-pubnames, gno-record-gcc-switches,
40351         grecord-gcc-switches, gno-strict-dwarf, gstrict-dwarf, gstabs,
40352         gstabs+, gtoggle, gvms, gxcoff, gxcoff+): Add Driver flag.
40353
40354 2017-01-16  Uros Bizjak  <ubizjak@gmail.com>
40355
40356         * config/i386/i386.h (HARD_REGNO_CALLER_SAVE_MODE): Apply HImode and
40357         QImode fixups to general and mask registers only.
40358
40359 2017-01-16  Carl Love  <cel@us.ibm.com>
40360
40361         * config/rs6000/rs6000-c (altivec_overloaded_builtins): Add support
40362         for built-in functions
40363         vector signed char vec_nabs (vector signed char)
40364         vector signed short vec_nabs (vector signed short)
40365         vector signed int vec_nabs (vector signed int)
40366         vector signed long long vec_nabs (vector signed long long)
40367         vector float vec_nabs (vector float)
40368         vector double vec_nabs (vector double)
40369         * config/rs6000/rs6000-builtin.def: Add definitions for NABS functions
40370         and NABS overload.
40371         * config/rs6000/altivec.md: New define_expand nabs<mode>2 types
40372         * config/rs6000/altivec.h: New define for vec_nabs built-in function.
40373         * doc/extend.texi: Update the documentation file for the new built-in
40374         functions.
40375
40376 2017-01-16  Martin Sebor  <msebor@redhat.com>
40377
40378         * gimple-ssa-sprintf.c (format_directive): Correct a typo in a warning
40379         message.
40380
40381 2017-01-16  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
40382
40383         * config/rs6000/rs6000.c (rtx_is_swappable_p): Change
40384         UNSPEC_VSX__XXSPLTD to require special splat handling.
40385
40386 2017-01-16  David Malcolm  <dmalcolm@redhat.com>
40387
40388         PR bootstrap/78616
40389         * system.h: Poison strndup.
40390
40391 2017-01-16  Alan Modra  <amodra@gmail.com>
40392
40393         PR target/79098
40394         * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Don't
40395         use a switch.
40396
40397 2017-01-16  Georg-Johann Lay  <avr@gjlay.de>
40398
40399         * config/avr/avr.h (BRANCH_COST) [reload_completed]: Increase by 4.
40400
40401 2017-01-15  Uros Bizjak  <ubizjak@gmail.com>
40402
40403         * config/i386/i386.c (ix86_legitimate_combined_insn): Do not
40404         call recog here.  Assert that INSN_CODE (insn) is non-negative.
40405
40406 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
40407
40408         PR target/72749
40409         * cfgrtl.c (rtl_split_edge): Also patch jump insns that jump to the
40410         fallthrough.
40411         * haifa-sched.c (dump_insn_stream): Don't crash if there is a label
40412         in the currently scheduled RTL fragment.
40413
40414 2017-01-15  Segher Boessenkool  <segher@kernel.crashing.org>
40415
40416         PR rtl-optimization/78751
40417         * ifcvt.c (find_cond_trap): If we generated a non-existing insn,
40418         give up.
40419
40420 2017-01-14  Jeff Law  <law@redhat.com>
40421
40422         PR tree-optimization/79090
40423         * tree-ssa-dse.c (valid_ao_ref_for_dse): Reject zero length and
40424         variable length stores.
40425         (compute_trims): Delete dead assignment to *trim_tail.
40426         (dse_dom_walker::dse_optimize_stmt): Optimize mem* calls with
40427         zero length.
40428
40429 2017-01-14  Bernd Schmidt  <bschmidt@redhat.com>
40430
40431         PR rtl-optimization/78626
40432         PR rtl-optimization/78727
40433         * cprop.c (one_cprop_pass): Collect unconditional traps in the middle
40434         of a block, and split such blocks after everything else is finished.
40435
40436 2017-01-14  Alan Modra  <amodra@gmail.com>
40437
40438         PR target/72749
40439         * combine.c (recog_for_combine_1): Set INSN_CODE before calling
40440         target legitimate_combined_insn.
40441         * config/rs6000/rs6000.c (TARGET_LEGITIMATE_COMBINED_INSN): Define.
40442         (rs6000_legitimate_combined_insn): New function.
40443         * config/rs6000/rs6000.md (UNSPEC_DOLOOP): Delete, and remove
40444         all uses.
40445         (ctr<mode>_internal3): Rename from *ctr<mode>_internal5.
40446         (ctr<mode>_internal4): Rename from *ctr<mode>_internal6.
40447         (ctr<mode>_internal1, ctr<mode>_internal2): Remove '*' from name.
40448
40449 2017-01-14  Gerald Pfeifer  <gerald@pfeifer.com>
40450
40451         * doc/frontends.texi (G++ and GCC): Remove references to Java.
40452
40453 2017-01-13  Jeff Law  <law@redhat.com>
40454
40455         PR tree-optimization/33562
40456         PR tree-optimization/61912
40457         PR tree-optimization/77485
40458         * tree-ssa-dse.c (delete_dead_call): Accept gsi rather than
40459         a statement.
40460         (delete_dead_assignment): Likewise.
40461         (dse_dom_walker::dse_optimize_stmt): Pass in the gsi rather than
40462         statement to delete_dead_call and delete_dead_assignment.
40463
40464 2017-01-13  David Malcolm  <dmalcolm@redhat.com>
40465
40466         PR c/78304
40467         * substring-locations.c (format_warning_va): Strengthen case 1 so
40468         that both endpoints of the substring must be within the format
40469         range for just the substring to be printed.
40470
40471 2017-01-13  Uros Bizjak  <ubizjak@gmail.com>
40472
40473         * config/i386/i386.opt (msgx): Use ix86_isa_flags2 variable.
40474         * config/i386/i386.c (ix86_target_string): Add missing options
40475         to isa_opts and reorder options by implied ISAs.  Rename isa_opts2 to
40476         isa2_opts, ix86_flag_opts to flag2_opts, ix86_target_other to
40477         flags_other and ix86_target_other to flags2_other.  Display unknown
40478         isa2 options.
40479         (ix86_valid_target_attribute_inner_p): Add missing options and
40480         reorder options by implied ISAs, as in ix86_target_string.
40481
40482 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
40483
40484         * hash-table.h (hash_table::too_empty_p): New function.
40485         (hash_table::expand): Use it.
40486         (hash_table::traverse): Likewise.
40487         (hash_table::empty_slot): Use sizeof (value_type) instead of
40488         sizeof (PTR) to convert bytes to elements.  Shrink the table
40489         if the current size is excessive for the current number of
40490         elements.
40491
40492 2017-01-13  Richard Sandiford  <richard.sandiford@arm.com>
40493
40494         * ira-costs.c (record_reg_classes): Break from the inner loop
40495         early once alt_fail is known to be true.  Update outer loop
40496         handling accordingly.
40497
40498 2017-01-13  Jeff Law  <law@redhat.com>
40499
40500         * tree-ssa-dse.c (decrement_count): New function.
40501         (increment_start_addr, maybe_trim_memstar_call): Likewise.
40502         (dse_dom_walker::optimize_stmt): Call maybe_trim_memstar_call directly
40503         when we know the partially dead statement is a mem* function.
40504
40505         PR tree-optimization/61912
40506         PR tree-optimization/77485
40507         * tree-ssa-dse.c: Include expr.h.
40508         (maybe_trim_constructor_store): New function.
40509         (maybe_trim_partially_dead_store): Call maybe_trim_constructor_store.
40510
40511         PR tree-optimization/33562
40512         PR tree-optimization/61912
40513         PR tree-optimization/77485
40514         * doc/invoke.texi: Document new dse-max-object-size param.
40515         * params.def (PARM_DSE_MAX_OBJECT_SIZE): New PARAM.
40516         * tree-ssa-dse.c: Include params.h.
40517         (dse_store_status): New enum.
40518         (initialize_ao_ref_for_dse): New, partially extracted from
40519         dse_optimize_stmt.
40520         (valid_ao_ref_for_dse, normalize_ref): New.
40521         (setup_live_bytes_from_ref, compute_trims): Likewise.
40522         (clear_bytes_written_by, maybe_trim_complex_store): Likewise.
40523         (maybe_trim_partially_dead_store): Likewise.
40524         (maybe_trim_complex_store): Likewise.
40525         (dse_classify_store): Renamed from dse_possibly_dead_store_p.
40526         Track what bytes live from the original store.  Return tri-state
40527         for dead, partially dead or live.
40528         (dse_dom_walker): Add constructor, destructor and new private members.
40529         (delete_dead_call, delete_dead_assignment): New extracted from
40530         dse_optimize_stmt.
40531         (dse_optimize_stmt): Make a member of dse_dom_walker.
40532         Use initialize_ao_ref_for_dse.
40533
40534         PR tree-optimization/33562
40535         PR tree-optimization/61912
40536         PR tree-optimization/77485
40537         * sbitmap.h (bitmap_count_bits): Prototype.
40538         (bitmap_clear_range, bitmap_set_range): Likewise.
40539         * sbitmap.c (bitmap_clear_range): New function.
40540         (bitmap_set_range, sbitmap_popcount, bitmap_count_bits): Likewise.
40541
40542 2017-01-13  Martin Liska  <mliska@suse.cz>
40543
40544         PR ipa/79043
40545         * function.c (set_cfun): Add new argument force.
40546         * function.h (set_cfun): Likewise.
40547         * ipa-inline-transform.c (inline_call): Use the function when
40548         strict alising from is dropped for function we inline to.
40549
40550 2017-01-13  Richard Biener  <rguenther@suse.de>
40551
40552         * tree-pretty-print.c (dump_generic_node): Fix inverted condition
40553         for dumping GIMPLE INTEGER_CSTs.
40554
40555 2017-01-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
40556
40557         * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define __STDC_VERSION__
40558         to 201112L since C++17.
40559
40560 2017-01-13  Maxim Ostapenko  <m.ostapenko@samsung.com>
40561
40562         PR sanitizer/78887
40563         * asan.c (asan_needs_odr_indicator_p): Don't emit ODR indicators
40564         if -fsanitize=kernel-address is present.
40565
40566 2017-01-13  Richard Biener  <rguenther@suse.de>
40567
40568         * tree-pretty-print.c (dump_generic_node): Dump INTEGER_CSTs
40569         as _Literal ( type ) number in case usual suffixes do not
40570         preserve all information.
40571
40572 2017-01-13  Richard Biener  <rguenther@suse.de>
40573
40574         PR tree-optimization/77283
40575         * gimple-ssa-split-paths.c: Include gimple-ssa.h, tree-phinodes.h
40576         and ssa-iterators.h.
40577         (is_feasible_trace): Implement a cost model based on joiner
40578         PHI node uses.
40579
40580 2017-01-12  Michael Meissner  <meissner@linux.vnet.ibm.com>
40581
40582         PR target/79004
40583         * config/rs6000/rs6000.md (FP_ISA3): Do not optimize converting
40584         char or short to __float128/_Float128 directly.
40585
40586 2017-01-12  Martin Sebor  <msebor@redhat.com>
40587
40588         to -Wformat-overflow.
40589         * gimple-ssa-sprintf.c (pass_sprintf_length::gate): Adjust.
40590         (min_bytes_remaining): Same.
40591         (get_string_length): Same.
40592         (format_string): Same.
40593         (format_directive): Same.
40594         (add_bytes): Same.
40595         (pass_sprintf_length::handle_gimple_call): Same.
40596
40597 2017-01-12  Jakub Jelinek  <jakub@redhat.com>
40598
40599         * gimple-ssa-sprintf.c (try_substitute_return_value): Remove
40600         info.nowrite calls with no lhs that can't throw.  Return bool
40601         whether gsi_remove has been called or not.
40602         (pass_sprintf_length::handle_gimple_call): Return bool whether
40603         try_substitute_return_value called gsi_remove.  Formatting fix.
40604         (pass_sprintf_length::execute): Don't use gsi_remove if
40605         handle_gimple_call returned true.
40606
40607         PR bootstrap/79069
40608         * cfgrtl.c (rtl_tidy_fallthru_edge): For any_uncondjump_p that can't
40609         be removed due to side-effects, don't remove following barrier nor
40610         turn the successor edge into fallthru edge.
40611
40612 2017-01-12  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
40613
40614         PR target/79044
40615         * config/rs6000/rs6000.c (insn_is_swappable_p): Mark
40616         element-reversing loads and stores as not swappable.
40617
40618 2017-01-12  Nathan Sidwell  <nathan@acm.org>
40619             Nicolai Stange  <nicstange@gmail.com>
40620
40621         * combine.c (try_combine): Don't ignore result of overlap checking
40622         loop.  Combine overlap & asm check into single loop.
40623
40624 2017-01-12  Richard Biener  <rguenther@suse.de>
40625
40626         * tree-pretty-print.c (dump_generic_node): Provide -gimple
40627         variant for MEM_REF.  Sanitize INTEGER_CST for -gimple.
40628
40629 2017-01-12  Richard Biener  <rguenther@suse.de>
40630
40631         * tree.c (initialize_tree_contains_struct): Make TS_OPTIMIZATION
40632         and TS_TARGET_OPTION directly derive from TS_BASE.
40633         * tree-core.h (tree_optimization_option): Derive from tree_base.
40634         (tree_target_option): Likewise.
40635
40636 2017-01-11  Uros Bizjak  <ubizjak@gmail.com>
40637
40638         * config/i386/i386.c (memory_address_length): Increase len
40639         only when rip_relative_addr_p returns false.
40640
40641 2017-01-11  Julia Koval  <julia.koval@intel.com>
40642
40643         * common/config/i386/i386-common.c (OPTION_MASK_ISA_SGX_UNSET): New.
40644         (OPTION_MASK_ISA_SGX_SET): New.
40645         (ix86_handle_option): Handle OPT_msgx.
40646         * config.gcc: Added sgxintrin.h.
40647         * config/i386/driver-i386.c (host_detect_local_cpu): Detect sgx.
40648         * config/i386/i386-c.c (ix86_target_macros_internal): Define __SGX__.
40649         * config/i386/i386.c (ix86_target_string): Add -msgx.
40650         (PTA_SGX): New.
40651         (ix86_option_override_internal): Handle new options.
40652         (ix86_valid_target_attribute_inner_p): Add sgx.
40653         * config/i386/i386.h (TARGET_SGX, TARGET_SGX_P): New.
40654         * config/i386/i386.opt: Add msgx.
40655         * config/i386/sgxintrin.h: New file.
40656         * config/i386/x86intrin.h: Add sgxintrin.h.
40657
40658 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
40659
40660         PR c++/71537
40661         * fold-const.c (maybe_nonzero_address): Return 1 for function
40662         local objects.
40663         (tree_single_nonzero_warnv_p): Don't handle function local objects
40664         here.
40665
40666         PR c++/72813
40667         * gcc.c (default_compilers): Don't add -o %g.s for -S -save-temps
40668         of c-header.
40669
40670 2017-01-11  David Malcolm  <dmalcolm@redhat.com>
40671
40672         PR driver/78877
40673         * opts.c: Include "spellcheck.h"
40674         (struct string_fragment): New struct.
40675         (struct edit_distance_traits<const string_fragment &>): New
40676         struct.
40677         (get_closest_sanitizer_option): New function.
40678         (parse_sanitizer_options): Offer suggestions for unrecognized arguments.
40679
40680 2017-01-11  Jakub Jelinek  <jakub@redhat.com>
40681
40682         * dwarf2out.c (DWARF_COMPILE_UNIT_HEADER_SIZE): For DWARF5 decrease
40683         by 12.
40684         (DWARF_COMDAT_TYPE_UNIT_HEADER_SIZE): Always
40685         DWARF_COMPILE_UNIT_HEADER_SIZE plus 12.
40686         (DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE): Define.
40687         (calc_base_type_die_sizes): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE
40688         for initial die_offset if dwarf_split_debug_info.
40689         (output_comp_unit): Use DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE for
40690         initial next_die_offset if dwo_id is non-NULL.  Don't emit padding
40691         fields.
40692         (output_skeleton_debug_sections): Formatting fix.  Use
40693         DWARF_COMPILE_UNIT_SKELETON_HEADER_SIZE instead of
40694         DWARF_COMPILE_UNIT_HEADER_SIZE.  Don't emit padding.
40695
40696 2017-01-11  Wilco Dijkstra  <wdijkstr@arm.com>
40697
40698         * config/arm/cortex-a53.md: Add bypasses for
40699         cortex_a53_r2f_cvt.
40700         (cortex_a53_r2f): Only use for transfers.
40701         (cortex_a53_f2r): Likewise.
40702         (cortex_a53_r2f_cvt): Add reservation for conversions.
40703         (cortex_a53_f2r_cvt): Likewise.
40704
40705 2017-01-11  Tamar Christina  <tamar.christina@arm.com>
40706
40707         * config/arm/arm_neon.h: Add __artificial__ and gnu_inline
40708         to all inlined functions, change static to extern.
40709
40710 2017-01-11  Christophe Lyon  <christophe.lyon@linaro.org>
40711
40712         PR target/78253
40713         * config/arm/arm.c (legitimize_pic_address): Handle reference to
40714         weak symbol.
40715         (arm_assemble_integer): Likewise.
40716
40717 2017-01-11  Richard Earnshaw  <rearnsha@arm.com>
40718
40719         * config.gcc: Use new awk script to check CPU, FPU and architecture
40720         parameters for --with-... options.
40721         * config/arm/parsecpu.awk: New file
40722         * config/arm/arm-cpus.in: New file.
40723         * config/arm/arm-opts.h: Include arm-cpu.h instead of processing .def
40724         files.
40725         * config/arm/arm.c: Include arm-cpu-data.h instead of processing .def
40726         files.
40727         * config/arm/t-arm: Update dependency rules.
40728         * common/config/arm/arm-common.c: Include arm-cpu-cdata.h instead
40729         of processing .def files.
40730         * config/arm/genopt.sh: Deleted.
40731         * config/arm/gentune.sh: Deleted.
40732         * config/arm/arm-cores.def: Deleted.
40733         * config/arm/arm-arches.def: Deleted.
40734         * config/arm/arm-fpus.def: Deleted.
40735         * config/arm/arm-tune.md: Regenerated.
40736         * config/arm/arm-tables.opt: Regenerated.
40737         * config/arm/arm-cpu.h: New generated file.
40738         * config/arm/arm-cpu-data.h: New generated file.
40739         * config/arm/arm-cpu-cdata.h: New generated file.
40740
40741 2017-01-11  Maxim Ostapenko  <m.ostapenko@samsung.com>
40742
40743         PR lto/79042
40744         * lto-cgraph.c (lto_output_varpool_node): Pack dynamically_initialized
40745         bit.
40746         (input_varpool_node): Unpack dynamically_initialized bit.
40747
40748 2017-01-11  Eric Botcazou  <ebotcazou@adacore.com>
40749
40750         PR rtl-optimization/79032
40751         * lra-constraints.c (simplify_operand_subreg): In the MEM case, test
40752         the alignment of the adjusted memory reference against that of MODE,
40753         instead of the alignment of the original memory reference.
40754
40755 2017-01-11  Martin Jambor  <mjambor@suse.cz>
40756
40757         * hsa.c (hsa_callable_function_p): Revert addition of DECL_ARTIFICIAL
40758         test.
40759         * ipa-hsa.c (process_hsa_functions): Only duplicate non-artificial
40760         decorated functions.
40761
40762 2017-01-11  Richard Biener  <rguenther@suse.de>
40763
40764         * tree-vrp.c (evrp_dom_walker::before_dom_children): Also
40765         set range/nonnull info for PHI results.  Do not set it on
40766         stmts marked for removal.
40767
40768 2017-01-10  Eric Botcazou  <ebotcazou@adacore.com>
40769
40770         * expr.c (store_field): In the bitfield case, fetch the return value
40771         from the registers before applying a single big-endian adjustment.
40772         Always do a final load for a BLKmode value not larger than a word.
40773
40774 2017-01-10  David Malcolm  <dmalcolm@redhat.com>
40775
40776         PR c++/77949
40777         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
40778         that we correctly handle column numbers greater than
40779         LINE_MAP_MAX_COLUMN_NUMBER.
40780
40781 2017-01-10  Martin Sebor  <msebor@redhat.com>
40782
40783         PR middle-end/78245
40784         * gimple-ssa-sprintf.c (get_destination_size): Call
40785         {init,fini}object_sizes.
40786         * tree-object-size.c (addr_object_size): Adjust.
40787         (pass_through_call): Adjust.
40788         (pass_object_sizes::execute): Adjust.
40789         * tree-object-size.h (fini_object_sizes): Declare.
40790
40791 2017-01-10  Martin Sebor  <msebor@redhat.com>
40792
40793         PR tree-optimization/78775
40794         * builtins.c (get_size_range): Move...
40795         * calls.c: ...to here.
40796         (alloc_max_size): Accept zero argument.
40797         (operand_signed_p): Remove.
40798         (maybe_warn_alloc_args_overflow): Call get_size_range.
40799         * calls.h (get_size_range): Declare.
40800
40801 2017-01-10  Joe Seymour  <joe.s@somniumtech.com>
40802
40803         * config/msp430/driver-msp430.c (msp430_mcu_data): Sync with data
40804         from TI's devices.csv file as of September 2016.
40805         * config/msp430/msp430.c (msp430_mcu_data): Likewise.
40806
40807 2017-01-10  Sandra Loosemore  <sandra@codesourcery.com>
40808
40809         * doc/extend.texi: Tweak formatting to fix overfull hbox warnings.
40810         * doc/invoke.texi: Likewise.
40811         * doc/md.texi: Likewise.
40812         * doc/objc.texi: Likewise.
40813
40814 2017-01-10  Joshua Conner  <joshconner@google.com>
40815
40816         * config/arm/fuchsia-elf.h: New file.
40817         * config/fuchsia.h: New file.
40818         * config.gcc (*-*-fuchsia*): Set native_system_header_dir.
40819         (aarch64*-*-fuchsia*, arm*-*-fuchsia*, x86_64-*-fuchsia*): Add to
40820         targets.
40821         * config.host: (aarch64*-*-fuchsia*, arm*-*-fuchsia*): Add to hosts.
40822
40823 2016-01-10  Richard Biener  <rguenther@suse.de>
40824
40825         PR tree-optimization/79034
40826         * tree-call-cdce.c (shrink_wrap_one_built_in_call_with_conds):
40827         Propagate out degenerate PHIs in the joiner.
40828
40829 2017-01-10  Martin Liska  <mliska@suse.cz>
40830
40831         * ipa-icf.c (sort_sem_items_by_decl_uid): New function.
40832         (sort_congruence_classes_by_decl_uid): Likewise.
40833         (sort_congruence_class_groups_by_decl_uid): Likewise.
40834         (sem_item_optimizer::merge_classes): Sort class, groups in these
40835         classes and members in the groups by DECL_UID of declarations.
40836         This would make merge operations stable.
40837
40838 2017-01-10  Martin Liska  <mliska@suse.cz>
40839
40840         * ipa-icf.c (sem_item_optimizer::sem_item_optimizer): Remove
40841         usage of m_classes_vec.
40842         (sem_item_optimizer::~sem_item_optimizer):  Likewise.
40843         (sem_item_optimizer::get_group_by_hash): Likewise.
40844         (sem_item_optimizer::subdivide_classes_by_equality): Likewise.
40845         (sem_item_optimizer::subdivide_classes_by_sensitive_refs): Likewise.
40846         (sem_item_optimizer::verify_classes): Likewise.
40847         (sem_item_optimizer::process_cong_reduction): Likewise.
40848         (sem_item_optimizer::dump_cong_classes): Likewise.
40849         (sem_item_optimizer::merge_classes): Likewise.
40850         * ipa-icf.h (congruence_class_hash): Rename from
40851         congruence_class_group_hash.  Remove declaration of m_classes_vec.
40852
40853 2017-01-10  Andrew Senkevich  <andrew.senkevich@intel.com>
40854
40855         * common/config/i386/i386-common.c (OPTION_MASK_ISA_AVX512VPOPCNTDQ_SET,
40856         OPTION_MASK_ISA_AVX512VPOPCNTDQ_UNSET): New.
40857         * config.gcc: Add avx512vpopcntdqintrin.h.
40858         * config/i386/avx512vpopcntdqintrin.h: New.
40859         * config/i386/cpuid.h (bit_AVX512VPOPCNTDQ): New.
40860         * config/i386/i386-builtin-types.def: Add new types.
40861         * config/i386/i386-builtin.def (__builtin_ia32_vpopcountd_v16si,
40862         __builtin_ia32_vpopcountd_v16si_mask, __builtin_ia32_vpopcountq_v8di,
40863         __builtin_ia32_vpopcountq_v8di_mask): New.
40864         * config/i386/i386-c.c (ix86_target_macros_internal): Define
40865         __AVX512VPOPCNTDQ__.
40866         * config/i386/i386.c (ix86_target_string): Add -mavx512vpopcntdq.
40867         (PTA_AVX512VPOPCNTDQ): Define.
40868         * config/i386/i386.h (TARGET_AVX512VPOPCNTDQ,
40869         TARGET_AVX512VPOPCNTDQ_P): Define.
40870         * config/i386/i386.opt: Add mavx512vpopcntdq.
40871         * config/i386/immintrin.h: Include avx512vpopcntdqintrin.h.
40872         * config/i386/sse.md (define_insn "vpopcount<mode><mask_name>"): New.
40873
40874 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
40875
40876         PR middle-end/77484
40877         * predict.def (PRED_CALL): Set to 67.
40878
40879 2017-01-09  Eric Botcazou  <ebotcazou@adacore.com>
40880
40881         * expr.c (store_field): In the bitfield case, if the value comes from
40882         a function call and is of an aggregate type returned in registers, do
40883         not modify the field mode; extract the value in all cases if the mode
40884         is BLKmode and the size is not larger than a word.
40885
40886 2017-01-09  Dominique d'Humieres  <dominiq@lps.ens.fr>
40887
40888         PR target/71017
40889         * config/i386/cpuid.h: Fix undefined behavior.
40890
40891 2017-01-04  Jeff Law  <law@redhat.com>
40892
40893         PR tree-optimization/79007
40894         PR tree-optimization/67955
40895         * tree-ssa-alias.c (same_addr_size_stores_p): Only need to be
40896         conservative for pt.null when flag_non_call_exceptions is on.
40897
40898 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
40899
40900         PR translation/79019
40901         PR translation/79020
40902         * params.def (PARAM_INLINE_MIN_SPEEDUP,
40903         PARAM_IPA_CP_SINGLE_CALL_PENALTY,
40904         PARAM_USE_AFTER_SCOPE_DIRECT_EMISSION_THRESHOLD): Fix typos
40905         in descriptions.
40906         * config/avr/avr.opt (maccumulate-args): Likewise.
40907         * config/msp430/msp430.opt (mwarn-mcu): Likewise.
40908         * common.opt (freport-bug): Likewise.
40909         * cif-code.def (CIF_FINAL_ERROR): Likewise.
40910         * doc/invoke.texi (ipa-cp-single-call-penalty): Likewise.
40911         * config/s390/s390.c (s390_invalid_binary_op): Fix spelling in
40912         translatable string.
40913         * config/i386/i386.c (function_value_32): Likewise.
40914         * config/nios2/nios2.c (nios2_valid_target_attribute_rec): Likewise.
40915         * config/msp430/msp430.c (msp430_option_override, msp430_attr):
40916         Likewise.
40917         * config/msp430/driver-msp430.c (msp430_select_hwmult_lib): Likewise.
40918         * common/config/msp430/msp430-common.c (msp430_handle_option):
40919         Likewise.
40920         * symtab.c (symtab_node::verify_base): Likewise.
40921         * opts.c (set_debug_level): Likewise.
40922         * tree.c (verify_type_variant): Likewise.  Fix typo in comment.
40923         * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Add
40924         missing whitespace to translatable strings.
40925         * config/avr/avr.md (bswapsi2): Fix typo in comment.
40926         * config/sh/superh.h: Likewise.
40927         * config/i386/xopintrin.h: Likewise.
40928         * config/i386/znver1.md: Likewise.
40929         * config/rs6000/rs6000.c (struct rs6000_opt_mask): Likewise.
40930         * ipa-inline-analysis.c (compute_inline_parameters): Likewise.
40931         * double-int.h (struct double_int): Likewise.
40932         * double-int.c (div_and_round_double): Likewise.
40933         * wide-int.cc: Likewise.
40934         * tree-ssa.c (non_rewritable_mem_ref_base): Likewise.
40935         * tree-ssa-sccvn.c (vn_reference_lookup_3): Likewise.
40936         * cfgcleanup.c (crossjumps_occured): Renamed to ...
40937         (crossjumps_occurred): ... this.
40938         (try_crossjump_bb, try_head_merge_bb, try_optimize_cfg, cleanup_cfg):
40939         Adjust all uses.
40940
40941         PR tree-optimization/78899
40942         * tree-if-conv.c (version_loop_for_if_conversion): Instead of
40943         returning bool return struct loop *, NULL for failure and the new
40944         loop on success.
40945         (versionable_outer_loop_p): Don't version outer loop if it has
40946         dont_vectorized bit set.
40947         (tree_if_conversion): When versioning outer loop, ensure
40948         tree_if_conversion is performed also on the inner loop of the
40949         non-vectorizable outer loop copy.
40950         * tree-vectorizer.c (set_uid_loop_bbs): Formatting fix.  Fold
40951         LOOP_VECTORIZED in inner loop of the scalar outer loop and
40952         prevent vectorization of it.
40953         (vectorize_loops): For outer + inner LOOP_VECTORIZED, ensure
40954         the outer loop vectorization of the non-scalar version is attempted
40955         before vectorization of the inner loop in scalar version.  If
40956         outer LOOP_VECTORIZED guarded loop is not vectorized, prevent
40957         vectorization of its inner loop.
40958         * tree-vect-loop-manip.c (rename_variables_in_bb): If outer_loop
40959         has 2 inner loops, rename also on edges from bb whose single pred
40960         is outer_loop->header.  Fix typo in function comment.
40961
40962 2017-01-09  Martin Sebor  <msebor@redhat.com>
40963
40964         PR bootstrap/79033
40965         * asan.c (asan_emit_stack_protection): Increase local buffer size
40966         to avoid snprintf truncation warning.
40967
40968 2017-01-09  Andrew Pinski  <apinski@cavium.com>
40969
40970         * config/aarch64/aarch64-cores.def: Add thunderx2t99.  Change vulcan
40971         to reference thunderx2t99 for the tuning structure
40972         * config/aarch64/aarch64-cost-tables.h (vulcan_extra_costs):
40973         Rename to ...
40974         (thunderx2t99_extra_costs): This.
40975         * config/aarch64/aarch64-tune.md: Regenerate.
40976         * config/aarch64/aarch64.c (vulcan_addrcost_table): Rename to ...
40977         (vulcan_addrcost_table): This.
40978         (vulcan_regmove_cost): Rename to ...
40979         (thunderx2t99_regmove_cost): This.
40980         (vulcan_vector_cost): Rename to ...
40981         (thunderx2t99_vector_cost): this.
40982         (vulcan_branch_cost): Rename to ...
40983         (thunderx2t99_branch_cost): This.
40984         (vulcan_tunings): Rename to ...
40985         (thunderx2t99_tunings): This and s/vulcan/thunderx2t99 .
40986         * doc/invoke.texi (AARCH64/mtune): Add thunderx2t99.
40987
40988 2017-01-09  Martin Jambor  <mjambor@suse.cz>
40989
40990         PR ipa/78365
40991         PR ipa/78599
40992         * ipa-prop.h (ipa_jump_func): Swap positions of vr_known and m_vr.
40993         * ipa-cp.c (ipa_vr_operation_and_type_effects): New function.
40994         (propagate_vr_accross_jump_function): Use the above function for all
40995         value range computations for pass-through jump functions and type
40996         converasion from explicit value range values.
40997         (ipcp_propagate_stage): Do not attempt to deduce types of formal
40998         parameters from TYPE_ARG_TYPES.
40999         * ipa-prop.c (ipa_write_jump_function): Remove trailing whitespace.
41000         (ipa_write_node_info): Stream type of the actual argument.
41001         (ipa_read_node_info): Likewise. Also remove trailing whitespace.
41002
41003 2017-01-09  Martin Liska  <mliska@suse.cz>
41004
41005         PR pch/78970
41006         * gcc.c (driver_handle_option): Handle OPT_E and set have_E.
41007         (lookup_compiler): Do not show error message with have_E.
41008
41009 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
41010
41011         PR tree-optimization/78938
41012         * tree-vect-stmts.c (vectorizable_condition): For non-masked COND_EXPR
41013         where comp_vectype is VECTOR_BOOLEAN_TYPE_P, use
41014         BIT_{NOT,XOR,AND,IOR}_EXPR on the comparison operands instead of
41015         {EQ,NE,GE,GT,LE,LT}_EXPR directly inside of VEC_COND_EXPR.  Formatting
41016         fixes.
41017
41018 2017-01-09  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
41019
41020         * tree-ssa-address.c (gen_addr_rtx): Don't handle index if it
41021         is const0_rtx.
41022
41023 2017-01-09  Richard Biener  <rguenther@suse.de>
41024
41025         PR tree-optimization/78997
41026         * tree-vect-slp.c (vect_mask_constant_operand_p): Handle SSA
41027         name condition properly.
41028
41029 2017-01-09  Richard Biener  <rguenther@suse.de>
41030
41031         PR debug/79000
41032         * dwarf2out.c (is_cxx): New overload with context.
41033         (is_naming_typedef_decl): Use it.
41034
41035 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
41036
41037         * invoke.texi (Option Summary): Correct spacing in option lists
41038         and add line breaks to fix over-long lines.
41039
41040 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
41041
41042         PR middle-end/17660
41043
41044         * extend.texi (Common Variable Attributes): Add xref to GCC
41045         Internals manual to explain mode attribute keywords.
41046
41047 2017-01-08  Sandra Loosemore  <sandra@codesourcery.com>
41048
41049         PR other/16519
41050         * doc/invoke.texi (Option Summary): Move -pthread to Linker Options
41051         and Preprocessor Options.
41052         (Options for Linking): Document -pthread here....
41053         (RS/6000 and PowerPC Options): ...not here.
41054         (Solaris 2 Options): ...or here.
41055         * doc/cppopts.texi: Document -pthread.
41056
41057 2017-01-08  Martin Sebor  <msebor@redhat.com>
41058
41059         PR middle-end/77708
41060         * doc/invoke.texi (Warning Options): Document -Wformat-truncation.
41061         * gimple-ssa-sprintf.c (call_info::reval_used, call_info::warnopt):
41062         New member functions.
41063         (format_directive): Used them.
41064         (add_bytes): Same.
41065         (pass_sprintf_length::handle_gimple_call): Same.
41066         * graphite-sese-to-poly.c (tree_int_to_gmp): Increase buffer size
41067         to avoid truncation for any argument.
41068         (extract_affine_mul): Same.
41069         * tree.c (get_file_function_name): Same.
41070
41071 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
41072
41073         PR middle-end/77484
41074         * predict.def (PRED_INDIR_CALL): Set to 86.
41075
41076 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
41077
41078         PR preprocessor/54124
41079         * doc/cppopts.texi: Reformat -d subtable to list the full name
41080         of the options.  Add cross-reference to the docs for the general
41081         compiler -d options.
41082         * doc/invoke.texi (Developer Options): Add cross-reference to the
41083         preprocessor-specific -d option documentation.
41084
41085 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
41086
41087         PR preprocessor/13498
41088         * doc/cpp.texi (Search Path): Rewrite to remove obsolete and
41089         redudant material, and reflect new command-line options.
41090         (System Headers): Likewise.
41091
41092 2017-01-07  Sandra Loosemore  <sandra@codesourcery.com>
41093
41094         * doc/cppdiropts.texi: Merge documentation of -I, -iquote,
41095         -isystem, and -idirafter.  Copy-edit.
41096         * doc/cppopts.texi: Copy-edit.  Remove contradiction about
41097         default for -ftrack-macro-expansion.  Delete obsolete and
41098         badly-formatted implementation details about -fdebug-cpp output.
41099         * doc/cppwarnopts.texi: Copy-edit.
41100
41101 2017-01-07  David Malcolm  <dmalcolm@redhat.com>
41102
41103         PR c++/72803
41104         * input.c (selftest::test_accessing_ordinary_linemaps): Verify
41105         that the transition from a max line width >= 1<<10 to narrower
41106         lines works correctly.
41107
41108 2017-01-07  Alexandre Oliva  <aoliva@redhat.com>
41109
41110         * doc/options.texi (PerFunction): New.
41111         * opt-functions.awk (switch_flags): Map both Optimization and
41112         PerFunction to CL_OPTIMIZATION.
41113         * opth-gen.awk: Test for PerFunction flag along with
41114         Optimization.
41115         * optc-save-gen.awk: Likewise.  Introduce var_opt_hash and set
41116         it only when the latter is present.  Skip those that don't in
41117         the hash function generator.
41118         * common.opt (fvar-tracking): Mark as PerFunction instead of
41119         Optimization.
41120         (fvar-tracking-assignments): Likewise.
41121         (fvar-tracking-assignments-toggle): Likewise.
41122         (fvar-tracking-uninit): Likewise.
41123
41124 2017-01-07  Jakub Jelinek  <jakub@redhat.com>
41125
41126         PR translation/79018
41127         * params.def (PARAM_MAX_STORES_TO_MERGE): Add missing space between
41128         the and store.
41129
41130 2017-01-06  Mikael Pettersson  <mikpelinux@gmail.com>
41131
41132         PR target/57583
41133         * config/m68k/m68k.opt (LONG_JUMP_TABLE_OFFSETS): New option.
41134         * config/m68k/linux.h (ASM_RETURN_CASE_JUMP): Handle
41135         TARGET_LONG_JUMP_TABLE_OFFSETS.
41136         * config/m68k/m68kelf.h (ASM_RETURN_CASE_JUMP): Likewise.
41137         * config/m68k/netbsd-elf.h (ASM_RETURN_CASE_JUMP): Likewise.
41138         * config/m68k/m68k.h (CASE_VECTOR_MODE): Likewise.
41139         (ASM_OUTPUT_ADDR_DIFF_ELF): Likewise.
41140         * config/m68k/m68k.md (tablejump expander): Likewise.
41141         (*tablejump_pcrel_hi): Renamed from unnamed insn, reject
41142         TARGET_LONG_JUMP_TABLE_OFFSETS.
41143         (*tablejump_pcrel_si): New insn, handle TARGET_LONG_JUMP_TABLE_OFFSETS.
41144         * doc/invoke.texi (M68K options): Add -mlong-jump-table-offsets.
41145
41146 2017-01-06  Edgar E. Iglesias <edgar.iglesias@xilinx.com>
41147             David Holsgrove <david.holsgrove@xilinx.com>
41148
41149         * common/config/microblaze/microblaze-common.c
41150         (TARGET_EXCEPT_UNWIND_INFO): Remove.
41151         * config/microblaze/microblaze-protos.h (microblaze_eh_return):
41152         New prototype.
41153         * config/microblaze/microblaze.c (microblaze_must_save_register)
41154         (microblaze_expand_epilogue, microblaze_return_addr): Handle
41155         calls_eh_return.
41156         (microblaze_eh_return): New function.
41157         * config/microblaze/microblaze.h (RETURN_ADDR_OFFSET)
41158         (EH_RETURN_DATA_REGNO, MB_EH_STACKADJ_REGNUM)
41159         (EH_RETURN_STACKADJ_RTX, ASM_PREFERRED_EH_DATA_FORMAT): New macros.
41160         * config/microblaze/microblaze.md (eh_return): New pattern.
41161
41162 2017-01-06  Jakub Jelinek  <jakub@redhat.com>
41163
41164         * system.h (GCC_DIAGNOSTIC_PUSH_IGNORED, GCC_DIAGNOSTIC_POP,
41165         GCC_DIAGNOSTIC_STRINGIFY): Define.
41166
41167         * read-rtl.c (rtx_reader::read_rtx_code): Avoid -Wsign-compare warning.
41168
41169 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
41170
41171         * config/arm/arm.md (<mcrr>): New.
41172         (<mrrc>): New.
41173         * config/arm/arm.c (arm_arch5te): New.
41174         (arm_option_override): Set arm_arch5te.
41175         (arm_coproc_builtin_available): Add support for mcrr, mcrr2, mrrc
41176         and mrrc2.
41177         * config/arm/arm-builtins.c (MCRR_QUALIFIERS): Define to...
41178         (arm_mcrr_qualifiers): ... this. New.
41179         (MRRC_QUALIFIERS): Define to...
41180         (arm_mrrc_qualifiers): ... this. New.
41181         * config/arm/arm_acle.h (__arm_mcrr, __arm_mcrr2, __arm_mrrc,
41182         __arm_mrrc2): New.
41183         * config/arm/arm_acle_builtins.def (mcrr, mcrr2, mrrc, mrrc2): New.
41184         * config/arm/iterators.md (MCRRI, mcrr, MCRR): New.
41185         (MRRCI, mrrc, MRRC): New.
41186         * config/arm/unspecs.md (VUNSPEC_MCRR, VUNSPEC_MCRR2, VUNSPEC_MRRC,
41187         VUNSPEC_MRRC2): New.
41188
41189 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
41190
41191         * config/arm/arm.md (<mcr>): New.
41192         (<mrc>): New.
41193         * config/arm/arm.c (arm_coproc_builtin_available): Add
41194         support for mcr, mrc, mcr2 and mrc2.
41195         * config/arm/arm-builtins.c (MCR_QUALIFIERS): Define to...
41196         (arm_mcr_qualifiers): ... this. New.
41197         (MRC_QUALIFIERS): Define to ...
41198         (arm_mrc_qualifiers): ... this. New.
41199         (MCR_QUALIFIERS): Define to ...
41200         (arm_mcr_qualifiers): ... this. New.
41201         * config/arm/arm_acle.h (__arm_mcr, __arm_mrc, __arm_mcr2,
41202         __arm_mrc2): New.
41203         * config/arm/arm_acle_builtins.def (mcr, mcr2, mrc, mrc2): New.
41204         * config/arm/iterators.md (MCRI, mcr, MCR, MRCI, mrc, MRC): New.
41205         * config/arm/unspecs.md (VUNSPEC_MCR, VUNSPEC_MCR2, VUNSPEC_MRC,
41206         VUNSPEC_MRC2): New.
41207
41208 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
41209
41210         * config/arm/arm.md (*ldc): New.
41211         (*stc): New.
41212         (<ldc>): New.
41213         (<stc>): New.
41214         * config/arm/arm.c (arm_coproc_builtin_available): Add
41215         support for ldc,ldcl,stc,stcl,ldc2,ldc2l,stc2 and stc2l.
41216         (arm_coproc_ldc_stc_legitimate_address): New.
41217         * config/arm/arm-builtins.c (arm_type_qualifiers): Add
41218         'qualifier_const_pointer'.
41219         (LDC_QUALIFIERS): Define to...
41220         (arm_ldc_qualifiers): ... this. New.
41221         (STC_QUALIFIERS): Define to...
41222         (arm_stc_qualifiers): ... this. New.
41223         * config/arm/arm-protos.h
41224         (arm_coproc_ldc_stc_legitimate_address): New.
41225         * config/arm/arm_acle.h (__arm_ldc, __arm_ldcl, __arm_stc,
41226         __arm_stcl, __arm_ldc2, __arm_ldc2l, __arm_stc2, __arm_stc2l): New.
41227         * config/arm/arm_acle_builtins.def (ldc, ldc2, ldcl, ldc2l, stc,
41228         stc2, stcl, stc2l): New.
41229         * config/arm/constraints.md (Uz): New.
41230         * config/arm/iterators.md (LDCI, STCI, ldc, stc, LDC STC): New.
41231         * config/arm/unspecs.md (VUNSPEC_LDC, VUNSPEC_LDC2, VUNSPEC_LDCL,
41232         VUNSPEC_LDC2L, VUNSPEC_STC, VUNSPEC_STC2, VUNSPEC_STCL,
41233         VUNSPEC_STC2L): New.
41234
41235 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
41236
41237         * config/arm/arm.md (<cdp>): New.
41238         * config/arm/arm.c (neon_const_bounds): Rename this ...
41239         (arm_const_bounds): ... this.
41240         (arm_coproc_builtin_available): New.
41241         * config/arm/arm-builtins.c (SIMD_MAX_BUILTIN_ARGS): Increase.
41242         (arm_type_qualifiers): Add 'qualifier_unsigned_immediate'.
41243         (CDP_QUALIFIERS): Define to...
41244         (arm_cdp_qualifiers): ... this. New.
41245         (void_UP): Define.
41246         (arm_expand_builtin_args): Add case for 6 arguments.
41247         * config/arm/arm-protos.h (neon_const_bounds): Rename this ...
41248         (arm_const_bounds): ... this.
41249         (arm_coproc_builtin_available): New.
41250         * config/arm/arm_acle.h (__arm_cdp): New.
41251         (__arm_cdp2): New.
41252         * config/arm/arm_acle_builtins.def (cdp): New.
41253         (cdp2): New.
41254         * config/arm/iterators.md (CDPI,CDP,cdp): New.
41255         * config/arm/neon.md: Rename all 'neon_const_bounds' to
41256         'arm_const_bounds'.
41257         * config/arm/types.md (coproc): New.
41258         * config/arm/unspecs.md (VUNSPEC_CDP, VUNSPEC_CDP2): New.
41259         * doc/extend.texi (ACLE): Add a mention of Coprocessor intrinsics.
41260         * doc/sourcebuild.texi (arm_coproc1_ok, arm_coproc2_ok,
41261         arm_coproc3_ok, arm_coproc4_ok): Document new effective targets.
41262
41263 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
41264
41265         * config/arm/arm-builtins.c (arm_unsigned_binop_qualifiers): New.
41266         (UBINOP_QUALIFIERS): New.
41267         (si_UP): Define.
41268         (acle_builtin_data): New. Change comment.
41269         (arm_builtins): Remove ARM_BUILTIN_CRC32B, ARM_BUILTIN_CRC32H,
41270         ARM_BUILTIN_CRC32W, ARM_BUILTIN_CRC32CB, ARM_BUILTIN_CRC32CH,
41271         ARM_BUILTIN_CRC32CW. Add ARM_BUILTIN_ACLE_BASE and include
41272         arm_acle_builtins.def.
41273         (ARM_BUILTIN_ACLE_PATTERN_START): Define.
41274         (arm_init_acle_builtins): New.
41275         (CRC32_BUILTIN): Remove.
41276         (bdesc_2arg): Remove entries for crc32b, crc32h, crc32w,
41277         crc32cb, crc32ch and crc32cw.
41278         (arm_init_crc32_builtins): Remove.
41279         (arm_init_builtins): Use arm_init_acle_builtins rather
41280         than arm_init_crc32_builtins.
41281         (arm_expand_acle_builtin): New.
41282         (arm_expand_builtin): Use 'arm_expand_acle_builtin'.
41283         * config/arm/arm_acle_builtins.def: New.
41284
41285 2017-01-06  Andre Vieira  <andre.simoesdiasvieira@arm.com>
41286
41287         * config/arm/arm-builtins.c (neon_builtin_datum): Rename to ..
41288         (arm_builtin_datum): ... this.
41289         (arm_init_neon_builtin): Rename to ...
41290         (arm_init_builtin): ... this. Add a new parameters PREFIX
41291         and USE_SIG_IN_NAME.
41292         (arm_init_neon_builtins): Replace 'arm_init_neon_builtin' with
41293         'arm_init_builtin'. Replace type 'neon_builtin_datum' with
41294         'arm_builtin_datum'.
41295         (arm_init_vfp_builtins): Likewise.
41296         (builtin_arg): Rename enum's replacing 'NEON_ARG' with
41297         'ARG_BUILTIN' and add a 'ARG_BUILTIN_NEON_MEMORY.
41298         (arm_expand_neon_args): Rename to ...
41299         (arm_expand_builtin_args): ... this. Rename builtin_arg
41300         enum values and differentiate between ARG_BUILTIN_MEMORY
41301         and ARG_BUILTIN_NEON_MEMORY.
41302         (arm_expand_neon_builtin_1): Rename to ...
41303         (arm_expand_builtin_1): ... this. Rename builtin_arg enum
41304         values, arm_expand_builtin_args and add bool parameter NEON.
41305         (arm_expand_neon_builtin): Use arm_expand_builtin_1.
41306         (arm_expand_vfp_builtin): Likewise.
41307         (NEON_MAX_BUILTIN_ARGS): Remove, it was unused.
41308
41309 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
41310
41311         PR middle-end/77484
41312         * predict.def (PRED_POLYMORPHIC_CALL): Set to 59.
41313         * predict.c (tree_estimate_probability_bb): Reverse direction of
41314         polymorphic call predictor.
41315
41316 2017-01-06  David Malcolm  <dmalcolm@redhat.com>
41317
41318         * passes.c (execute_one_pass): Split out pass-skipping logic into...
41319         (determine_pass_name_match): ...this new function and...
41320         (should_skip_pass_p): ...this new function.
41321
41322 2017-01-06  Nathan Sidwell  <nathan@acm.org>
41323
41324         * ipa-visibility.c (function_and_variable_visibility): Reformat
41325         comments and long lines.  Remove extrneous if.
41326         * symtab.c (symtab_node::make_decl_local): Fix code format.
41327         (symtab_node::set_section_for_node): Fix comment typo.
41328
41329 2017-01-06  Martin Liska  <mliska@suse.cz>
41330
41331         PR bootstrap/79003
41332         * lra-constraints.c: Rename invariant to lra_invariant.
41333         * predict.c (set_even_probabilities): Initialize e to NULL.
41334
41335 2017-01-05  Martin Sebor  <msebor@redhat.com>
41336
41337         PR tree-optimization/78910
41338         * gimple-ssa-sprintf.c (tree_digits): Add an argument.
41339         (format_integer): Correct off-by-one error in the handling
41340         of precision with negative numbers in signed conversions..
41341
41342 2017-01-05  Eric Botcazou  <ebotcazou@adacore.com>
41343
41344         * doc/invoke.texi (C Dialect Options): Adjust -fsso-struct entry.
41345
41346 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
41347
41348         PR tree-optimization/71016
41349         * tree-ssa-phiopt.c (tree_ssa_phiopt_worker): Pass cond_stmt to
41350         factor_out_conditional_conversion.  Formatting fix.
41351         (factor_out_conditional_conversion): Add cond_stmt argument.
41352         If arg1 is INTEGER_CST, punt if new_arg0 is not any operand of
41353         cond_stmt and if arg0_def_stmt is not the only stmt in its bb.
41354         Formatting fix.
41355
41356 2017-01-05  David Malcolm  <dmalcolm@redhat.com>
41357
41358         * Makefile.in (OBJS): Add read-md.o, read-rtl.o,
41359         read-rtl-function.o, and selftest-rtl.o.
41360         * config/aarch64/aarch64.c: Include selftest.h and selftest-rtl.h.
41361         (selftest::aarch64_test_loading_full_dump): New function.
41362         (selftest::aarch64_run_selftests): New function.
41363         (TARGET_RUN_TARGET_SELFTESTS): Wire it up to
41364         selftest::aarch64_run_selftests.
41365         * config/i386/i386.c
41366         (selftest::ix86_test_loading_dump_fragment_1): New function.
41367         (selftest::ix86_test_loading_call_insn): New function.
41368         (selftest::ix86_test_loading_full_dump): New function.
41369         (selftest::ix86_test_loading_unspec): New function.
41370         (selftest::ix86_run_selftests): Call the new functions.
41371         * emit-rtl.c (maybe_set_max_label_num): New function.
41372         * emit-rtl.h (maybe_set_max_label_num): New decl.
41373         * function.c (instantiate_decls): Guard call to
41374         instantiate_decls_1 with if (DECL_INITIAL (fndecl)).
41375         * function-tests.c (selftest::verify_three_block_rtl_cfg): Remove
41376         "static".
41377         * gensupport.c (gen_reader::gen_reader): Pass "false"
41378         for new "compact" param of rtx_reader.
41379         * print-rtl.c (rtx_writer::print_rtx_operand): Print "(nil)"
41380         rather than an empty string for NULL strings.
41381         * read-md.c: Potentially include config.h rather than bconfig.h.
41382         Wrap include of errors.h with #ifdef GENERATOR_FILE.
41383         (have_error): New global, copied from errors.c.
41384         (md_reader::read_name): Rename to...
41385         (md_reader::read_name_1): ...this, adding "out_loc" param,
41386         and converting "missing name or number" to returning false, rather
41387         than failing.
41388         (md_reader::read_name): Reimplement in terms of read_name_1.
41389         (md_reader::read_name_or_nil): New function.
41390         (md_reader::read_string): Handle "(nil)" by returning NULL.
41391         (md_reader::md_reader): Add new param "compact".
41392         (md_reader::read_md_files): Wrap with #ifdef GENERATOR_FILE.
41393         (md_reader::read_file): New method.
41394         * read-md.h (md_reader::md_reader): Add new param "compact".
41395         (md_reader::read_file): New method.
41396         (md_reader::is_compact): New accessor.
41397         (md_reader::read_name): Convert return type from void to file_location.
41398         (md_reader::read_name_or_nil): New decl.
41399         (md_reader::read_name_1): New decl.
41400         (md_reader::m_compact): New field.
41401         (noop_reader::noop_reader): Pass "false" for new "compact" param
41402         of rtx_reader.
41403         (rtx_reader::rtx_reader): Add new "compact" param.
41404         (rtx_reader::read_rtx_operand): Make virtual and convert return
41405         type from void to rtx.
41406         (rtx_reader::read_until): New decl.
41407         (rtx_reader::handle_any_trailing_information): New virtual function.
41408         (rtx_reader::postprocess): New virtual function.
41409         (rtx_reader::finalize_string): New virtual function.
41410         (rtx_reader::m_in_call_function_usage): New field.
41411         (rtx_reader::m_reuse_rtx_by_id): New field.
41412         * read-rtl-function.c: New file.
41413         * selftest-rtl.c (selftest::assert_rtx_ptr_eq_at): New function.
41414         * selftest-rtl.h (ASSERT_RTX_PTR_EQ): New macro.
41415         (selftest::verify_three_block_rtl_cfg): New decl.
41416         * read-rtl-function.h: New file.
41417         * read-rtl.c: Potentially include config.h rather than bconfig.h.
41418         For host, include function.h, memmodel.h, and emit-rtl.h.
41419         (one_time_initialization): New function.
41420         (struct compact_insn_name): New struct.
41421         (compact_insn_names): New array.
41422         (find_code): Handle insn codes in compact dumps.
41423         (apply_subst_iterator): Wrap with #ifdef GENERATOR_FILE.
41424         (bind_subst_iter_and_attr): Likewise.
41425         (add_condition_to_string): Likewise.
41426         (add_condition_to_rtx): Likewise.
41427         (apply_attribute_uses): Likewise.
41428         (add_current_iterators): Likewise.
41429         (apply_iterators): Likewise.
41430         (initialize_iterators): Guard usage of apply_subst_iterator with
41431         #ifdef GENERATOR_FILE.
41432         (read_conditions): Wrap with #ifdef GENERATOR_FILE.
41433         (md_reader::read_mapping): Likewise.
41434         (add_define_attr_for_define_subst): Likewise.
41435         (add_define_subst_attr): Likewise.
41436         (read_subst_mapping): Likewise.
41437         (check_code_iterator): Likewise.
41438         (rtx_reader::read_rtx): Likewise.  Move one-time initialization
41439         logic to...
41440         (one_time_initialization): New function.
41441         (rtx_reader::read_until): New method.
41442         (read_flags): New function.
41443         (parse_reg_note_name): New function.
41444         (rtx_reader::read_rtx_code): Initialize "iterator" to NULL.
41445         Handle reuse_rtx ids.
41446         Wrap iterator lookup within #ifdef GENERATOR_FILE.
41447         Add parsing support for RTL dumps, mirroring the special-cases in
41448         print_rtx, by calling read_flags, reading REG_NOTE names, INSN_UID
41449         values, and calling handle_any_trailing_information.
41450         (rtx_reader::read_rtx_operand): Convert return type from void
41451         to rtx, returning return_rtx.  Handle case 'e'.  Call
41452         finalize_string on XSTR and XTMPL fields.
41453         (rtx_reader::read_nested_rtx):  Handle dumps in which trailing
41454          "(nil)" values were omitted.  Call the postprocess vfunc on the
41455         return_rtx.
41456         (rtx_reader::rtx_reader): Add new "compact" param and pass to base
41457         class ctor.  Initialize m_in_call_function_usage.  Call
41458         one_time_initialization.
41459         * rtl-tests.c (selftest::test_uncond_jump): Call
41460         set_new_first_and_last_insn.
41461         * rtl.h (read_rtx): Wrap decl with #ifdef GENERATOR_FILE.
41462         * selftest-rtl.c: New file.
41463         * selftest-rtl.h (class selftest::rtl_dump_test): New class.
41464         (selftest::get_insn_by_uid): New decl.
41465         * selftest-run-tests.c (selftest::run_tests): Call
41466         read_rtl_function_c_tests.
41467         * selftest.h  (selftest::read_rtl_function_c_tests): New decl.
41468         * tree-dfa.c (ssa_default_def): Return NULL_TREE for rtl function
41469         dumps.
41470
41471 2017-01-05  Uros Bizjak  <ubizjak@gmail.com>
41472
41473         * config/i386/i386.md (*testqi_ext_3): No need to handle memory
41474         operands in a special way.  Assert that pos+len <= mode precision.
41475
41476 2017-01-05  Jakub Jelinek  <jakub@redhat.com>
41477
41478         * common.opt (fvect-cost-model): Remove RejectNegative flag, use
41479         3 argument Alias with unlimited for the negative form.
41480         (fno-vect-cost-model): Removed.
41481
41482 2017-01-05  Martin Liska  <mliska@suse.cz>
41483
41484         * hsa-gen.c (gen_hsa_divmod): New function.
41485         (gen_hsa_insn_for_internal_fn_call): Use the function for IFN_DIVMOD.
41486
41487 2017-01-05  Martin Liska  <mliska@suse.cz>
41488
41489         PR pch/78970
41490         * gcc.c (lookup_compiler): Reject '-' filename for a precompiled
41491         header.
41492
41493 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
41494
41495         * config/s390/s390.c (s390_expand_setmem): Unroll the loop for
41496         small constant length operands.
41497
41498 2017-01-05  Andreas Krebbel  <krebbel@linux.vnet.ibm.com>
41499
41500         * config/s390/s390.c (s390_expand_setmem): Avoid overlapping bytes
41501         between loop iterations.
41502
41503 2017-01-05  Martin Liska  <mliska@suse.cz>
41504
41505         PR sanitizer/78815
41506         * gimplify.c (gimplify_decl_expr): Compare to
41507         asan_poisoned_variables instread of checking flags.
41508         (gimplify_target_expr): Likewise.
41509         (gimplify_expr): Likewise.
41510         (gimplify_function_tree): Conditionally initialize
41511         asan_poisoned_variables.
41512
41513 2017-01-04  Jeff Law  <law@redhat.com>
41514
41515         PR tree-optimizatin/78812
41516         * rtl.h (contains_mem_rtx_p): Prototype.
41517         * ifcvt.c (containts_mem_rtx_p): Move from here to...
41518         * rtlanal.c (contains_mem_rtx_p): Here and remove static linkage.
41519         * gcse.c (prune_expressions): Use contains_mem_rtx_p to discover
41520         and prune MEMs that are not at the toplevel of a SET_SRC rtx.  Look
41521         through ZERO_EXTEND and SIGN_EXTEND when trying to avoid pruning MEMs.
41522
41523 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
41524
41525         * input.c (assert_char_at_range): Default-initialize actual_range.
41526
41527 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
41528
41529         * df-scan.c (df_ref_create_structure): Make regno unsigned,
41530         to match the caller.
41531
41532 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
41533
41534         * cfgexpand.c (expand_gimple_basic_block): Disregard debug
41535         insns after final jump in test to emit dummy move.
41536
41537 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
41538
41539         * gimple-iterator.h (gsi_one_nondebug_before_end_p): New.
41540         * tree-eh.c (cleanup_empty_eh): Skip more debug stmts.
41541
41542 2017-01-04  Alexandre Oliva  <aoliva@redhat.com>
41543
41544         * multiple_target.c (create_dispatcher_calls): Init e_next.
41545         * tree-ssa-loop-split.c (split_loop): Init border.
41546         * tree-vect-loop.c (vect_determine_vectorization_factor): Init
41547         scalar_type.
41548
41549 2017-01-04  Michael Meissner  <meissner@linux.vnet.ibm.com>
41550
41551         PR target/71977
41552         PR target/70568
41553         PR target/78823
41554         * config/rs6000/predicates.md (sf_subreg_operand): New predicate.
41555         (altivec_register_operand): Do not return true if the operand
41556         contains a SUBREG mixing SImode and SFmode.
41557         (vsx_register_operand): Likewise.
41558         (vsx_reg_sfsubreg_ok): New predicate.
41559         (vfloat_operand): Do not return true if the operand contains a
41560         SUBREG mixing SImode and SFmode.
41561         (vint_operand): Likewise.
41562         (vlogical_operand): Likewise.
41563         (gpc_reg_operand): Likewise.
41564         (int_reg_operand): Likewise.
41565         * config/rs6000/rs6000-protos.h (valid_sf_si_move): Add declaration.
41566         * config/rs6000/rs6000.c (valid_sf_si_move): New function to
41567         determine if a MOVSI or MOVSF operation contains SUBREGs that mix
41568         SImode and SFmode.
41569         (rs6000_emit_move_si_sf_subreg): New helper function.
41570         (rs6000_emit_move): Call rs6000_emit_move_si_sf_subreg to possbily
41571         fixup SUBREGs involving SImode and SFmode.
41572         * config/rs6000/vsx.md (SFBOOL_*): New constants that are operand
41573         numbers for the new peephole2 optimization.
41574         (peephole2 for SFmode unions): New peephole2 to optimize cases in
41575         the GLIBC math library that do AND/IOR/XOR operations on single
41576         precision floating point.
41577         * config/rs6000/rs6000.h (TARGET_NO_SF_SUBREG): New internal
41578         target macros to say whether we need to avoid SUBREGs mixing
41579         SImode and SFmode.
41580         (TARGET_ALLOW_SF_SUBREG): Likewise.
41581         * config/rs6000/rs6000.md (UNSPEC_SF_FROM_SI): New unspecs.
41582         (UNSPEC_SI_FROM_SF): Likewise.
41583         (iorxor): Change spacing.
41584         (and_ior_xor): New iterator for AND, IOR, and XOR.
41585         (movsi_from_sf): New insns for SImode/SFmode SUBREG support.
41586         (movdi_from_sf_zero_ext): Likewise.
41587         (mov<mode>_hardfloat, FMOVE32 iterator): Use register_operand
41588         instead of gpc_reg_operand.  Add SImode/SFmode SUBREG support.
41589         (movsf_from_si): New insn for SImode/SFmode SUBREG support.
41590         (fma<mode>4): Use gpc_reg_operand instead of register_operand.
41591         (fms<mode>4): Likewise.
41592         (fnma<mode>4): Likewise.
41593         (fnms<mode>4): Likewise.
41594         (nfma<mode>4): Likewise.
41595         (nfms<mode>4): Likewise.
41596
41597 2017-01-04  Marek Polacek  <polacek@redhat.com>
41598
41599         PR c++/64767
41600         * doc/invoke.texi: Document -Wpointer-compare.
41601
41602 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
41603
41604         * optc-gen.awk: Emit #error for -W*/-f*/-m* Enum without
41605         RejectNegative.
41606
41607         * dwarf2out.c (output_loc_list): Don't throw away 64K+ location
41608         descriptions for -gdwarf-5 and emit them as uleb128 instead of
41609         2-byte data.
41610
41611 2017-01-04  Kelvin Nilsen  <kelvin@gcc.gnu.org>
41612
41613         PR target/78056
41614         * doc/sourcebuild.texi (PowerPC-specific attributes): Add
41615         documentation of the powerpc_popcntb_ok attribute.
41616         * config/rs6000/rs6000.c (rs6000_option_override_internal): Add
41617         code to issue warning messages if a requested CPU configuration is
41618         not supported by the binary (assembler and loader) toolchain.
41619         (spe_init_builtins): Add two assertions to prevent ICE if attempt is
41620         made to define a built-in function that has been disabled.
41621         (paired_init_builtins): Add assertion to prevent ICE if attempt is
41622         made to define a built-in function that has been disabled.
41623         (altivec_init_builtins): Add comment explaining why definition
41624         of the DST built-in functions is not preceded by an assertion
41625         check.  Add assertions to prevent ICE if attempts are made to
41626         define an altivec predicate or an abs* built-in function that has
41627         been disabled.
41628         (htm_init_builtins): Add comment explaining why definition of the
41629         htm built-in functions is not preceded by an assertion check.
41630
41631 2017-01-04  Jeff Law  <law@redhat.com>
41632
41633         PR tree-optimizatin/67955
41634         * tree-ssa-alias.c (same_addr_size_stores_p): Check offsets first.
41635         Allow any SSA_VAR_P as the base objects.  Use integer_zerop.  Verify
41636         the points-to solution does not include pt_null.  Use DECL_PT_UID
41637         unconditionally.
41638
41639 2017-01-04  Uros Bizjak  <ubizjak@gmail.com>
41640
41641         * config/i386/i386.md (HI/SImode test with imm to QImode splitters):
41642         Use gen_int_mode instead of gen_lopwart for const_int operands.
41643
41644 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
41645
41646         PR tree-optimization/71563
41647         * match.pd: Simplify X << Y into X if Y is known to be 0 or
41648         out of range value - has low bits known to be zero.
41649
41650 2017-01-04  Alan Modra  <amodra@gmail.com>
41651
41652         * Makefile.in (aclocal_deps): Update and order as per aclocal.m4.
41653         * configure: Regenerate.
41654         * config.in: Regenerate.
41655
41656 2017-01-04  Jakub Jelinek  <jakub@redhat.com>
41657
41658         PR bootstrap/77569
41659         * input.c (ebcdic_execution_charset::on_error): Don't use strstr for
41660         a substring of the message, but strcmp with the whole message.  Ifdef
41661         ENABLE_NLS, translate the message first using dgettext.
41662
41663 2017-01-03  Jeff Law  <law@redhat.com>
41664
41665         PR tree-optimizatin/78856
41666         * tree-ssa-threadupdate.c: Include tree-vectorizer.h.
41667         (mark_threaded_blocks): Remove code to truncate thread paths that
41668         cross multiple loop headers.  Instead invalidate the cached loop
41669         iteration information and handle case of a thread path walking
41670         into an irreducible region.
41671
41672 2017-01-03  Michael Meissner  <meissner@linux.vnet.ibm.com>
41673
41674         PR target/78900
41675         * config/rs6000/rs6000.c (rs6000_split_signbit): Change some
41676         assertions.  Add support for doing the signbit if the IEEE 128-bit
41677         floating point value is in a GPR.
41678         * config/rs6000/rs6000.md (Fsignbit): Delete.
41679         (signbit<mode>2_dm): Delete using <Fsignbit> and just use "wa".
41680         Update the length attribute if the value is in a GPR.
41681         (signbit<mode>2_dm_<su>ext): Add combiner pattern to eliminate
41682         the sign or zero extension instruction, since the value is always 0/1.
41683         (signbit<mode>2_dm2): Delete using <Fsignbit>.
41684
41685         PR target/78953
41686         * config/rs6000/vsx.md (vsx_extract_<mode>_store_p9): If we are
41687         extracting SImode to a GPR register so that we can generate a
41688         store, limit the vector to be in a traditional Altivec register
41689         for the vextuwrx instruction.
41690
41691 2017-01-03  Ian Lance Taylor  <iant@google.com>
41692
41693         * godump.c (go_format_type): Treat ENUMERAL_TYPE like INTEGER_TYPE.
41694
41695 2017-01-03  Martin Sebor  <msebor@redhat.com>
41696
41697         PR tree-optimization/78696
41698         * gimple-ssa-sprintf.c (format_floating): Correct handling of
41699         precision.  Use MPFR for %f for greater fidelity.  Correct handling
41700         of %g.
41701         (pass_sprintf_length::compute_format_length): Set width and precision
41702         specified by asrerisk to void_node for vararg functions.
41703         (try_substitute_return_value): Adjust dump output.
41704
41705 2017-01-03  David Edelsohn  <dje.gcc@gmail.com>
41706
41707         * doc/invoke.texi (RS6000 options): LRA is enabled by default.
41708
41709 2017-01-03  Eric Botcazou  <ebotcazou@adacore.com>
41710
41711         * doc/invoke.texi (SPARC options): Document -mlra as the default.
41712         * config/sparc/sparc.c (sparc_option_override): Force LRA unless
41713         -mlra/-mno-lra was passed to the compiler.
41714
41715 2017-01-03  James Cowgill  <James.Cowgill@imgtec.com>
41716
41717         PR rtl-optimization/65618
41718         * emit-rtl.c (try_split): Move initialization of "before" and
41719         "after" to just before the call to emit_insn_after_setloc.
41720
41721 2017-01-03  Gerald Pfeifer  <gerald@pfeifer.com>
41722
41723         * doc/md.texi (Standard Names): Remove reference to Java frontend.
41724
41725 2017-01-03  Pierre-Marie de Rodat  <derodat@adacore.com>
41726
41727         * dwarf2out.c (gen_enumeration_type_die): When
41728         -gno-strict-dwarf, add a DW_AT_encoding attribute.
41729
41730 2017-01-03  Jakub Jelinek  <jakub@redhat.com>
41731
41732         PR tree-optimization/78965
41733         * gimple-ssa-sprintf.c (pass_sprintf_length::compute_format_length):
41734         Change first argument from const call_info & to call_info &.  For %n
41735         set info.nowrite to false.
41736
41737         PR middle-end/78901
41738         * gimple-ssa-sprintf.c (try_substitute_return_value): Don't change
41739         possibly throwing calls.
41740
41741         * genmatch.c (dt_node::gen_kids_1): If generic_exprs include SSA_NAME
41742         and exprs_len || fns_len, emit the code for SSA_NAME next to the exprs
41743         and fns handling, rather than in a separate case SSA_NAME.
41744
41745 2017-01-02  Jeff Law  <law@redhat.com>
41746
41747         * config/darwin-driver.c (darwin_driver_init): Const-correctness
41748         fixes for first_period and second_period variables.
41749
41750 2017-01-02  Uros Bizjak  <ubizjak@gmail.com>
41751
41752         PR target/78967
41753         * config/i386/i386.md (UNSPEC_NOREX_MEM): New unspec.
41754         (*insvqi_1): New insn pattern.
41755         (*insvqi_1_mem_rex64): Ditto.
41756         (*insvqi_2): Ditto.
41757         (*insvqi_3): Rename from *insvqi.
41758
41759         (*extzvqi_mem_rex64): Add UNSPEC_NOREX_MEM tag.
41760
41761 2017-01-02  Gerald Pfeifer  <gerald@pfeifer.com>
41762
41763         * doc/cfg.texi (Edges): Remove reference to Java.
41764         (Maintaining the CFG): Ditto.
41765
41766 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
41767
41768         PR middle-end/77674
41769         * symtab.c (symtab_node::binds_to_current_def_p): Fix handling of
41770         transparent aliases.
41771
41772 2017-01-01  Jan Hubicka  <hubicka@ucw.cz>
41773
41774         PR middle-end/77484
41775         * predict.def (PRED_CALL): Update hitrate.
41776         (PRED_INDIR_CALL, PRED_POLYMORPHIC_CALL): New predictors.
41777         * predict.c (tree_estimate_probability_bb): Split CALL predictor
41778         into direct/indirect/polymorphic variants.
41779
41780 2017-01-01  Jakub Jelinek  <jakub@redhat.com>
41781
41782         Update copyright years.
41783
41784         * gcc.c (process_command): Update copyright notice dates.
41785         * gcov-dump.c (print_version): Ditto.
41786         * gcov.c (print_version): Ditto.
41787         * gcov-tool.c (print_version): Ditto.
41788         * gengtype.c (create_file): Ditto.
41789         * doc/cpp.texi: Bump @copying's copyright year.
41790         * doc/cppinternals.texi: Ditto.
41791         * doc/gcc.texi: Ditto.
41792         * doc/gccint.texi: Ditto.
41793         * doc/gcov.texi: Ditto.
41794         * doc/install.texi: Ditto.
41795         * doc/invoke.texi: Ditto.
41796 \f
41797 Copyright (C) 2017 Free Software Foundation, Inc.
41798
41799 Copying and distribution of this file, with or without modification,
41800 are permitted in any medium without royalty provided the copyright
41801 notice and this notice are preserved.