tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
[gcc.git] / gcc / ChangeLog
1 2018-05-16 Richard Biener <rguenther@suse.de>
2
3 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
4 (dump_stmt_cost): Declare.
5 (add_stmt_cost): Dump cost we add.
6 (add_stmt_costs): New function.
7 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
8 No longer exported.
9 (vect_analyze_stmt): Adjust prototype.
10 (vectorizable_condition): Likewise.
11 (vectorizable_live_operation): Likewise.
12 (vectorizable_reduction): Likewise.
13 (vectorizable_induction): Likewise.
14 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
15 cost vector to pass to vectorizable_ and record afterwards.
16 (vect_model_reduction_cost): Take cost vector argument and adjust.
17 (vect_model_induction_cost): Likewise.
18 (vectorizable_reduction): Likewise.
19 (vectorizable_induction): Likewise.
20 (vectorizable_live_operation): Likewise.
21 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
22 SLP_TREE_NUMBER_OF_VEC_STMTS.
23 (vect_analyze_slp_cost_1): Remove.
24 (vect_analyze_slp_cost): Likewise.
25 (vect_slp_analyze_node_operations): Take visited args and
26 a target cost vector. Avoid processing already visited stmt sets.
27 (vect_slp_analyze_operations): Use a local cost vector to gather
28 costs and register those of non-discarded instances.
29 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
30 (vect_schedule_slp_instance): Remove copying of
31 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
32 zero.
33 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
34 adding cost. Record cost entry location.
35 (vect_prologue_cost_for_slp_op): Function to compute cost of
36 a constant or invariant generated for SLP vect in the prologue,
37 split out from vect_analyze_slp_cost_1.
38 (vect_model_simple_cost): Make static. Adjust for SLP costing.
39 (vect_model_promotion_demotion_cost): Likewise.
40 (vect_model_store_cost): Likewise, make static.
41 (vect_model_load_cost): Likewise.
42 (vectorizable_bswap): Add cost vector arg and adjust.
43 (vectorizable_call): Likewise.
44 (vectorizable_simd_clone_call): Likewise.
45 (vectorizable_conversion): Likewise.
46 (vectorizable_assignment): Likewise.
47 (vectorizable_shift): Likewise.
48 (vectorizable_operation): Likewise.
49 (vectorizable_store): Likewise.
50 (vectorizable_load): Likewise.
51 (vectorizable_condition): Likewise.
52 (vectorizable_comparison): Likewise.
53 (can_vectorize_live_stmts): Likewise.
54 (vect_analyze_stmt): Likewise.
55 (vect_transform_stmt): Adjust calls to vectorizable_*.
56 * tree-vectorizer.c: Include gimple-pretty-print.h.
57 (dump_stmt_cost): New function.
58
59 2018-05-16 Richard Biener <rguenther@suse.de>
60
61 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
62 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
63 * tree-ssa-dse.c: Include tree-ssa-loop.h.
64 (check_name): New callback.
65 (dse_classify_store): Track cycles via a visited bitmap of PHI
66 defs and simplify handling of in-loop and across loop dead stores
67 and properly fail for loop-variant refs. Handle byte-tracking with
68 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
69 limiting the walk.
70
71 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
72
73 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
74 (vect_get_mask_type_for_stmt): Likewise.
75 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
76 split out from...
77 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
78 to determine the statement's vector type and the vector type that
79 should be used for calculating nunits. Deal with cases in which
80 the type has to be deferred.
81 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
82 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
83 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
84 (vect_determine_vf_for_stmt): New functions, split out from...
85 (vect_determine_vectorization_factor): ...here.
86 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
87 (vect_get_mask_type_for_stmt): New functions, split out from
88 vect_determine_vectorization_factor.
89
90 2018-05-16 Richard Biener <rguenther@suse.de>
91
92 * tree-cfg.c (verify_gimple_assign_ternary): Properly
93 verify the [VEC_]COND_EXPR embedded comparison.
94
95 2018-05-15 Martin Sebor <msebor@redhat.com>
96
97 PR tree-optimization/85753
98 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
99 RECORD_TYPE in addition to ARRAY_TYPE.
100
101 2018-05-15 Martin Sebor <msebor@redhat.com>
102
103 PR middle-end/85643
104 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
105
106 2018-05-15 Richard Biener <rguenther@suse.de>
107
108 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
109 add by_clobber_p one. Change algorithm to collect all defs
110 representing uses we need to walk and try reducing them to
111 a single one before failing.
112 (dse_dom_walker::dse_optimize_stmt): Adjust.
113
114 2018-05-13 Mark Wielaard <mark@klomp.org>
115
116 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
117 (size_of_loc_descr): Likewise.
118 (output_loc_operands): Likewise.
119 (output_loc_operands_raw): Likewise.
120 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
121 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
122 (hash_loc_operands): Likewise.
123 (compare_loc_operands): Likewise.
124
125 2018-05-14 Mark Wielaard <mark@klomp.org>
126
127 * dwarf2out.c (count_index_addrs): New function.
128 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
129
130 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
131
132 PR tree-optimization/83648
133 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
134 return value as malloc candidate.
135
136 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
137
138 PR ipa/85734
139 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite param
140 as true in call to suggest_attribute.
141
142 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
143
144 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
145 -mreadonly-in-sdata.
146
147 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
148
149 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
150 New pattern.
151 (aarch64_crypto_aesd_fused): Likewise.
152
153 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
154
155 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
156 (movsi_aarch64): Likewise.
157 (load_pairsi): Likewise.
158 (load_pairdi): Likewise.
159 (store_pairsi): Likewise.
160 (store_pairdi): Likewise.
161 (load_pairsf): Likewise.
162 (load_pairdf): Likewise.
163 (store_pairsf): Likewise.
164 (store_pairdf): Likewise.
165 (zero_extend): Likewise.
166 (trunc): Swap alternatives.
167 (fcvt_target): Add '?' to prefer w over r.
168
169 2018-05-14 Jakub Jelinek <jakub@redhat.com>
170
171 PR target/85756
172 * config/i386/i386.md: Disallow non-commutative arithmetics in
173 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
174 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
175 in the peephole2 before it.
176
177 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
178
179 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
180 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
181 (ix86_handle_option): Handle -mcldemote.
182 * config.gcc: New header.
183 * config/i386/cldemoteintrin.h: New file.
184 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
185 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
186 -mcldemote.
187 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
188 OPTION_MASK_ISA_CLDEMOTE.
189 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
190 (ix86_valid_target_attribute_inner_p): Ditto.
191 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
192 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
193 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
194 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
195 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
196 (cldemote): New.
197 * config/i386/i386.opt: Add -mcldemote.
198 * config/i386/x86intrin.h: New header.
199 * doc/invoke.texi: Add -mcldemote.
200
201 2018-05-14 Richard Biener <rguenther@suse.de>
202
203 * doc/match-and-simplify.texi: Adjust :s documentation.
204
205 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
206
207 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
208 intended memcpy size.
209 (REORDER_45): Likewise.
210
211 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
212
213 * sort.cc: New file.
214 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
215 * vec.c (qsort_chk): Use gcc_qsort.
216 * Makefile.in (OBJS-libcommon): Add sort.o.
217 (build/sort.o): New target. Use it...
218 (BUILD_RTL): ... here, and...
219 (build/gencfn-macros): ... here, and...
220 (build/genmatch): ... here.
221
222 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
223 Chung-Ju Wu <jasonwucj@gmail.com>
224
225 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
226 * config/nds32/nds32-graywolf.md: New file.
227 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
228 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
229 pipeline.
230 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
231 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
232 * config/nds32/nds32.md (pipeline_model): Add graywolf.
233 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
234 * config/nds32/pipelines.md: Include n15 settings.
235
236 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
237 Chung-Ju Wu <jasonwucj@gmail.com>
238
239 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
240 * config/nds32/nds32-n13.md: New file.
241 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
242 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
243 pipeline.
244 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
245 * config/nds32/nds32.md (pipeline_model): Add n13.
246 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
247 * config/nds32/pipelines.md: Include n13 settings.
248
249 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
250 Chung-Ju Wu <jasonwucj@gmail.com>
251
252 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
253 * config/nds32/nds32-n10.md: New file.
254 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
255 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
256 pipeline.
257 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
258 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
259 * config/nds32/nds32.md (pipeline_model): Add n10.
260 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
261 * config/nds32/pipelines.md: Include n10 settings.
262
263 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
264 Kito Cheng <kito.cheng@gmail.com>
265 Chung-Ju Wu <jasonwucj@gmail.com>
266
267 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
268 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
269 Add enum values for DSP extension instructions.
270 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
271 New constraints.
272 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
273 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
274 New code iterators.
275 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
276 * config/nds32/nds32-dspext.md: New file for DSP implementation.
277 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
278 * config/nds32/nds32-intrinsic.md: Likewise.
279 * config/nds32/nds32_intrinsic.h: Likewise.
280 * config/nds32/nds32-md-auxiliary.c: Likewise.
281 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
282 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
283 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
284 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
285 * config/nds32/nds32-protos.h: New declarations for DSP extension.
286 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
287 TYPE_DMAC in switch statement.
288 * config/nds32/nds32.c: New checking and implementation for DSP
289 extension instructions.
290 * config/nds32/nds32.h: Likewise.
291 * config/nds32/nds32.md: Likewise.
292 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
293 * config/nds32/predicates.md: Implement new predicates for DSP
294 extension.
295
296 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
297
298 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
299 Reformat alternatives and attributes so it is easier to identify
300 which constraints/attributes go with which instruction.
301 (mov<mode>_hardfloat32, FMOVE64): Likewise.
302 (mov<mode>_softfloat32, FMOVE64): Likewise.
303 (mov<mode>_hardfloat64, FMOVE64): Likewise.
304 (mov<mode>_softfloat64, FMOVE64): Likewise.
305
306 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
307
308 * doc/extend.texi (PowerPC Built-in Functions): Rename this
309 subsection.
310 (Basic PowerPC Built-in Functions): The new name of the
311 subsection previously known as "PowerPC Built-in Functions".
312 (Basic PowerPC Built-in Functions Available on all Configurations):
313 New subsubsection.
314 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
315 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
316 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
317 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
318
319 2018-05-11 Martin Jambor <mjambor@suse.cz>
320
321 PR ipa/85655
322 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
323 single const.
324
325 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
326
327 PR target/85733
328 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
329
330 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
331
332 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
333 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
334 (ix86_handle_option): Handle -mwaitpkg.
335 * config.gcc: New header.
336 * config/i386/cpuid.h (bit_WAITPKG): New bit.
337 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
338 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
339 function type.
340 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
341 OPTION_MASK_ISA_WAITPKG.
342 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
343 (ix86_option_override_internal): Add PTA_WAITPKG.
344 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
345 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
346 IX86_BUILTIN_TPAUSE.
347 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
348 __builtin_ia32_umwait and __builtin_ia32_tpause.
349 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
350 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
351 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
352 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
353 UNSPECV_TPAUSE): New.
354 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
355 * config/i386/i386.opt: Add -mwaitpkg.
356 * config/i386/waitpkgintrin.h: New file.
357 * config/i386/x86intrin.h: New header.
358 * doc/invoke.texi: Add -mwaitpkg.
359
360 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
361
362 PR target/85606
363 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
364 equivalent.
365 (cortex-m0): Use armv6s-m isa.
366 (cortex-m0plus): Likewise.
367 (cortex-m1): Likewise.
368 (cortex-m0.small-multiply): Likewise.
369 (cortex-m0plus.small-multiply): Likewise.
370 (cortex-m1.small-multiply): Likewise.
371
372 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
373 Jakub Jelinek <jakub@redhat.com>
374
375 PR tree-optimization/85692
376 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
377 source permute as well.
378
379 2018-05-11 Martin Liska <mliska@suse.cz>
380
381 PR sanitizer/85556
382 * doc/extend.texi: Document LLVM style format for no_sanitize
383 attribute.
384
385 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
386
387 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
388 mode_supports_vsx_dform_quad to mode_supports_dq_form.
389 (mode_supports_vsx_dform_quad): Likewise.
390 (mode_supports_vmx_dform): Move these functions to be next to the
391 other mode_supports functions.
392 (mode_supports_dq_form): Likewise.
393 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
394 mode_supports_dq_form.
395 (reg_offset_addressing_ok_p): Likewise.
396 (offsettable_ok_by_alignment): Likewise.
397 (rs6000_legitimate_offset_address_p): Likewise.
398 (legitimate_lo_sum_address_p): Likewise.
399 (rs6000_legitimize_address): Likewise.
400 (rs6000_legitimize_reload_address): Likewise.
401 (rs6000_secondary_reload_inner): Likewise.
402 (rs6000_preferred_reload_class): Likewise.
403 (rs6000_output_move_128bit): Likewise.
404
405 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
406
407 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
408 Generate SImode target register for null target.
409 <case IX86_BUILTIN_XGETBV>: Ditto.
410 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
411 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
412
413 2018-05-10 Carl Love <cel@us.ibm.com>
414
415 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
416 dcbtt and dcbtstt if operands[2] is 0.
417
418 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
419
420 PR target/85693
421 * config/i386/sse.md (usadv64qi): New expander.
422
423 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
424
425 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
426 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
427 -maltivec=be support.
428 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
429 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
430 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
431 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
432 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
433 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
434 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
435 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
436 altivec_vsumsws): Adjust.
437 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
438 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
439 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
440 support.
441 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
442 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
443 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
444 (altivec_lve<VI_char>x): Delete expand.
445 (*altivec_lve<VI_char>x_internal): Rename to...
446 (altivec_lve<VI_char>x): ... this.
447 (altivec_lvxl_<mode>): Delete expand.
448 (*altivec_lvxl_<mode>_internal): Rename to ...
449 (altivec_lvxl_<mode>): ... this.
450 (altivec_stvxl_<mode>): Delete expand.
451 (*altivec_stvxl_<mode>_internal): Rename to ...
452 (altivec_stvxl_<mode>): ... this.
453 (altivec_stve<VI_char>x): Delete expand.
454 (*altivec_stve<VI_char>x_internal): Rename to ...
455 (altivec_stve<VI_char>x): ... this.
456 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
457 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
458 reduc_plus_scal_<mode>): Adjust.
459 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
460 comment.
461 (rs6000_cpu_cpp_builtins): Adjust.
462 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
463 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
464 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
465 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
466 -maltivec=be support.
467 (rs6000_split_vec_extract_var): Adjust.
468 (rs6000_split_v4si_init): Adjust.
469 (swap_selector_for_mode): Delete.
470 (altivec_expand_lvx_be, altivec_expand_stvx_be,
471 altivec_expand_stvex_be): Delete.
472 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
473 -maltivec=be support.
474 (rs6000_gimple_fold_builtin): Ditto.
475 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
476 Adjust.
477 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
478 (TARGET_DIRECT_MOVE_64BIT): Adjust.
479 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
480 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
481 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
482 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
483 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
484 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
485 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
486 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
487 anonymous split): Adjust.
488 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
489 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
490
491 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
492
493 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
494 when --with-gxx-include-dir is also specified.
495 * configure: Regenerate.
496
497 2018-05-09 Jim Wilson <jimw@sifive.com>
498
499 PR target/84797
500 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
501 * config/riscv/t-withmultilib: New.
502 * config/riscv/withmultilib.h: New.
503 * doc/install.texi: Document RISC-V --with-multilib-list support.
504
505 2018-05-09 Richard Biener <rguenther@suse.de>
506
507 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
508 vector.
509 (vect_bb_vectorization_profitable_p): Adjust. Compute
510 actual scalar cost using the cost vector and the add_stmt_cost
511 machinery.
512
513 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
514
515 PR rtl-optimization/85645
516 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
517 in the REG_CFA_REGISTER note for LR, don't leave it empty.
518
519 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
520
521 PR rtl-optimization/85645
522 * shrink-wrap.c (spread_components): Return a boolean saying if
523 anything was changed.
524 (try_shrink_wrapping_separate): Iterate spread_components until
525 nothing changes anymore.
526
527 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
528
529 PR rtl-optimization/85645
530 * regrename.c (build_def_use): Also kill the chains that include the
531 destination of a REG_CFA_REGISTER note.
532
533 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
534
535 PR rtl-optimization/85645
536 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
537 insn that has a REG_CFA_REGISTER note.
538
539 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
540
541 * cfgexpand.c (expand_clobber): New function.
542 (expand_gimple_stmt_1): Use it.
543 * tree-vect-stmts.c (vect_clobber_variable): New function,
544 split out from...
545 (vectorizable_simd_clone_call): ...here.
546 (vectorizable_store): Emit a clobber either side of an
547 IFN_STORE_LANES sequence.
548 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
549
550 2018-05-09 Tom de Vries <tom@codesourcery.com>
551
552 PR target/85626
553 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
554 (define_insn "trap_if_false"): Add exit after trap.
555
556 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
557
558 PR rtl-optimization/85638
559 * bb-reorder.c: Include common/common-target.h.
560 (create_forwarder_block): New function extracted from...
561 (fix_up_crossing_landing_pad): ...here. Rename into...
562 (dw2_fix_up_crossing_landing_pad): ...this.
563 (sjlj_fix_up_crossing_landing_pad): New function.
564 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
565 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
566 from both partitions and exit the loop after one iteration.
567
568 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
569
570 Revert:
571 * doc/extend.texi (PowerPC Built-in Functions): Rename this
572 subsection.
573 (Basic PowerPC Built-in Functions): The new name of the
574 subsection previously known as "PowerPC Built-in Functions".
575 (Basic PowerPC Built-in Functions Available on all Configurations):
576 New subsubsection.
577 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
578 subsubsection.
579 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
580 subsubsection.
581 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
582 subsubsection.
583 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
584 subsubsection.
585
586 2018-05-08 Jim Wilson <jimw@sifive.com>
587
588 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
589 (LD_EMUL_SUFFIX): New.
590 (LINK_SPEC): Use it.
591
592 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
593
594 * doc/extend.texi (PowerPC Built-in Functions): Rename this
595 subsection.
596 (Basic PowerPC Built-in Functions): The new name of the
597 subsection previously known as "PowerPC Built-in Functions".
598 (Basic PowerPC Built-in Functions Available on all Configurations):
599 New subsubsection.
600 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
601 subsubsection.
602 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
603 subsubsection.
604 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
605 subsubsection.
606 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
607 subsubsection.
608
609 2018-05-08 Jakub Jelinek <jakub@redhat.com>
610
611 PR target/85683
612 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
613 after cmpelim optimization.
614
615 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
616
617 * config.gcc: Support "goldmont".
618 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
619 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
620 PROCESSOR_GOLDMONT.
621 * config/i386/i386.c (m_GOLDMONT): Define.
622 (processor_target_table): Add "goldmont".
623 (PTA_GOLDMONT): Define.
624 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
625 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
626 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
627 (fold_builtin_cpu): Add "goldmont".
628 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
629 (ix86_option_override_internal): Add "goldmont".
630 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
631 (processor_type): Add PROCESSOR_GOLDMONT.
632 * config/i386/i386.md: Add CPU "glm".
633 * config/i386/glm.md: New file.
634 * config/i386/x86-tune.def: Add m_GOLDMONT.
635 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
636
637 2018-05-08 Jakub Jelinek <jakub@redhat.com>
638
639 PR target/85572
640 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
641 E_V4DImode.
642 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
643 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
644 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
645
646 PR target/85317
647 * config/i386/i386.c (ix86_fold_builtin): Handle
648 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
649
650 PR target/85480
651 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
652 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
653
654 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
655
656 PR target/85658
657 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
658 (check_arch): Likewise.
659 (check_fpu): Return the result rather than printing it.
660 (end arch): Fix operator precedence.
661 (end cpu): Likewise.
662 (END): Print the result from check_fpu.
663
664 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
665 Alan Hayward <alan.hayward@arm.com>
666 David Sherwood <david.sherwood@arm.com>
667
668 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
669 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
670 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
671 (*fcmuo<mode>_and): New patterns.
672
673 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
674
675 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
676 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
677 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
678 (cmp_op, sve_imm_con): New code attributes.
679 (SVE_COND_INT_CMP, imm_con): Delete.
680 (cmp_op): Remove above unspecs from int attribute.
681 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
682 to...
683 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
684 comparison-specific unspecs.
685 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
686 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
687 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
688 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
689 (*vec_fcm<cmp_op><mode>): Rename to...
690 (*fcm<cmp_op><mode>): ...this and adjust likewise.
691 (*vec_fcmuo<mode>): Rename to...
692 (*fcmuo<mode>): ...this and adjust likewise.
693 (*pred_fcm<cmp_op><mode>): New pattern.
694 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
695 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
696 functions.
697 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
698 and UNORDERED.
699 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
700 (aarch64_emit_sve_predicated_cond): New function.
701 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
702 (aarch64_emit_unspec_cond_or): Replace with...
703 (aarch64_emit_sve_or_conds): ...this new function. Use
704 aarch64_emit_sve_ptrue_op for the individual comparisons and
705 aarch64_emit_binop to OR them together.
706 (aarch64_emit_inverted_unspec_cond): Replace with...
707 (aarch64_emit_sve_inverted_cond): ...this new function. Use
708 aarch64_emit_sve_ptrue_op for the comparison and
709 aarch64_emit_unop to invert the result.
710 (aarch64_expand_sve_vec_cmp_float): Update after the above
711 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
712
713 2018-05-07 Nathan Sidwell <nathan@acm.org>
714
715 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
716 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
717 (Backwards Compatibility): Likewise.
718
719 2018-05-07 Luis Machado <luis.machado@linaro.org>
720
721 PR bootstrap/85681
722 Revert:
723 2018-05-07 Luis Machado <luis.machado@linaro.org>
724
725 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
726 <prefetch_dynamic_strides>: New const bool field.
727 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
728 prefetch_dynamic_strides.
729 (exynosm1_prefetch_tune): Likewise.
730 (thunderxt88_prefetch_tune): Likewise.
731 (thunderx_prefetch_tune): Likewise.
732 (thunderx2t99_prefetch_tune): Likewise.
733 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
734 (aarch64_override_options_internal): Update to set
735 PARAM_PREFETCH_DYNAMIC_STRIDES.
736 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
737 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
738 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
739 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
740 prefetch-dynamic-strides setting.
741
742 2018-05-07 Luis Machado <luis.machado@linaro.org>
743
744 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
745 <minimum_stride>: New const int field.
746 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
747 minimum_stride field.
748 (exynosm1_prefetch_tune): Likewise.
749 (thunderxt88_prefetch_tune): Likewise.
750 (thunderx_prefetch_tune): Likewise.
751 (thunderx2t99_prefetch_tune): Likewise.
752 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
753 (aarch64_override_options_internal): Update to set
754 PARAM_PREFETCH_MINIMUM_STRIDE.
755 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
756 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
757 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
758 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
759 stride is constant and is below the minimum stride threshold.
760
761 2018-05-07 Luis Machado <luis.machado@linaro.org>
762
763 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
764 to 512.
765
766 2018-05-07 Luis Machado <luis.machado@linaro.org>
767
768 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
769 <prefetch_dynamic_strides>: New const bool field.
770 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
771 prefetch_dynamic_strides.
772 (exynosm1_prefetch_tune): Likewise.
773 (thunderxt88_prefetch_tune): Likewise.
774 (thunderx_prefetch_tune): Likewise.
775 (thunderx2t99_prefetch_tune): Likewise.
776 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to false.
777 (aarch64_override_options_internal): Update to set
778 PARAM_PREFETCH_DYNAMIC_STRIDES.
779 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
780 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
781 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
782 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
783 prefetch-dynamic-strides setting.
784
785 2018-05-07 Luis Machado <luis.machado@linaro.org>
786
787 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
788 <minimum_stride>: New const int field.
789 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
790 minimum_stride field.
791 (exynosm1_prefetch_tune): Likewise.
792 (thunderxt88_prefetch_tune): Likewise.
793 (thunderx_prefetch_tune): Likewise.
794 (thunderx2t99_prefetch_tune): Likewise.
795 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
796 (aarch64_override_options_internal): Update to set
797 PARAM_PREFETCH_MINIMUM_STRIDE.
798 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
799 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
800 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
801 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
802 stride is constant and is below the minimum stride threshold.
803
804 2018-05-06 Jakub Jelinek <jakub@redhat.com>
805
806 PR c++/85659
807 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
808 the type is addressable. Don't force op into register if it has
809 BLKmode.
810
811 2018-05-05 Roland McGrath <mcgrathr@google.com>
812
813 PR other/77609
814 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
815 any section for which we don't know a specific type it should have,
816 regardless of name. Previously this was done only for the exact
817 names ".init_array", ".fini_array", and ".preinit_array".
818 (default_elf_asm_named_section): Add comment about
819 relationship with default_section_type_flags and SECTION_NOTYPE.
820 (get_section): Don't consider it a type conflict if one side has
821 SECTION_NOTYPE and the other doesn't, as long as neither has the
822 SECTION_BSS et al used in the default_section_type_flags logic.
823
824 2018-05-05 Tom de Vries <tom@codesourcery.com>
825
826 PR target/85653
827 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
828 (workaround_barsyncs): New function.
829 (nvptx_reorg): Use workaround_barsyncs.
830 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
831 (define_expand "nvptx_membar_cta"): New define_expand.
832 (define_insn "*nvptx_membar_cta"): New insn.
833
834 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
835
836 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
837 To improve optimization opportunities.
838 * builtin-types.def: The new needed builtin types for the above.
839
840 2018-05-04 Richard Biener <rguenther@suse.de>
841
842 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
843 * gimple-ssa-store-merging.c
844 (imm_store_chain_info::output_merged_store): Remove redundant create,
845 release split_store vector contents on failure.
846 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
847 scalar stmt vector on cache hit.
848
849 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
850
851 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
852 Xilinx FP support.
853 * config.gcc (powerpc-xilinx-eabi*): Remove.
854 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
855 support.
856 (fusion_addis_mem_combo_load): Ditto.
857 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
858 FP support.
859 (rs6000_cpu_cpp_builtins): Ditto.
860 * config/rs6000/rs6000-linux.c
861 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
862 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
863 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
864 support.
865 (rs6000_setup_reg_addr_masks): Ditto.
866 (rs6000_init_hard_regno_mode_ok): Ditto.
867 (rs6000_option_override_internal): Ditto.
868 (legitimate_lo_sum_address_p): Ditto.
869 (rs6000_legitimize_address): Ditto.
870 (rs6000_legitimize_reload_address): Ditto.
871 (rs6000_legitimate_address_p): Ditto.
872 (abi_v4_pass_in_fpr): Ditto.
873 (setup_incoming_varargs): Ditto.
874 (rs6000_gimplify_va_arg): Ditto.
875 (rs6000_split_multireg_move): Ditto.
876 (rs6000_savres_strategy): Ditto.
877 (rs6000_emit_prologue_components): Ditto.
878 (rs6000_emit_epilogue_components): Ditto.
879 (rs6000_emit_prologue): Ditto.
880 (rs6000_emit_epilogue): Ditto.
881 (rs6000_elf_file_end): Ditto.
882 (rs6000_function_value): Ditto.
883 (rs6000_libcall_value): Ditto.
884 * config/rs6000/rs6000.h: Ditto.
885 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
886 (TARGET_MINMAX): ... this. New.
887 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
888 * config/rs6000/rs6000.md: Remove Xilinx FP support.
889 (*movsi_internal1_single): Delete.
890 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
891 mfpu=, mxilinx-fpu): Delete.
892 * config/rs6000/singlefp.h: Delete.
893 * config/rs6000/sysv4.h: Remove Xilinx FP support.
894 * config/rs6000/t-rs6000: Ditto.
895 * config/rs6000/t-xilinx: Delete.
896 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
897 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
898 (VStype_simple): Delete.
899 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
900 * config/rs6000/xfpu.h: Delete.
901 * config/rs6000/xfpu.md: Delete.
902 * config/rs6000/xilinx.h: Delete.
903 * config/rs6000/xilinx.opt: Delete.
904 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
905 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
906
907 2018-05-04 Tom de Vries <tom@codesourcery.com>
908
909 PR libgomp/85639
910 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
911 if ignore == 0.
912
913 2018-05-04 Richard Biener <rguenther@suse.de>
914
915 PR middle-end/85627
916 * tree-complex.c (update_complex_assignment): We are always in SSA form.
917 (expand_complex_div_wide): Likewise.
918 (expand_complex_operations_1): Likewise.
919 (expand_complex_libcall): Preserve EH info of the original stmt.
920 (tree_lower_complex): Handle removed blocks.
921 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
922 on complex multiplication and division libcall builtins.
923
924 2018-05-04 Richard Biener <rguenther@suse.de>
925
926 PR middle-end/85574
927 * fold-const.c (negate_expr_p): Restrict negation of operand
928 zero of a division to when we know that can happen without
929 overflow.
930 (fold_negate_expr_1): Likewise.
931
932 2018-05-04 Jakub Jelinek <jakub@redhat.com>
933
934 PR libstdc++/85466
935 * real.h (real_nextafter): Declare.
936 * real.c (real_nextafter): New function.
937 * fold-const-call.c (fold_const_nextafter): New function.
938 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
939 CASE_CFN_NEXTTOWARD.
940 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
941 even when arg1_mode is different from arg0_mode.
942
943 2018-05-03 Nathan Sidwell <nathan@acm.org>
944
945 * doc/extend.texi (Deprecated Features): Remove
946 -ffriend-injection.
947 (Backwards Compatibility): Likewise.
948 * doc/invoke.texi (C++ Language Options): Likewise.
949 (C++ Dialect Options): Likewise.
950
951 2018-05-03 Jakub Jelinek <jakub@redhat.com>
952
953 PR target/85530
954 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
955 _mm512_mask_mullox_epi64): New intrinsics.
956
957 2018-05-03 Tom de Vries <tom@codesourcery.com>
958
959 PR testsuite/85106
960 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
961 dump files): Add offload-tree.
962
963 2018-05-03 Richard Biener <rguenther@suse.de>
964
965 PR tree-optimization/85615
966 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
967 to loops not nested in BBs loop father to avoid creating multi-entry
968 loops.
969
970 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
971
972 PR tree-optimization/70291
973 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
974 arguments. Change return type to tree. Emit libcall as a new
975 statement rather than replacing existing one when inplace_p is true.
976 (expand_complex_multiplication_components): New function.
977 (expand_complex_multiplication): Expand floating-point complex
978 multiplication using the above.
979 (expand_complex_division): Rename inner_type parameter to type.
980 Update expand_complex_libcall call-site.
981 (expand_complex_operations_1): Update expand_complex_multiplication
982 and expand_complex_division call-sites.
983
984 2018-05-02 Jakub Jelinek <jakub@redhat.com>
985
986 PR target/85582
987 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
988 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
989 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
990 the highest significant bit of the shift count mask is clear. In
991 check whether and[sq]i3 is needed verify that all significant bits
992 of the shift count other than the highest are set.
993
994 2018-05-02 Tom de Vries <tom@codesourcery.com>
995
996 PR libgomp/82428
997 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
998 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
999 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
1000 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
1001 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
1002 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
1003 __builtin_goacc_parlevel_size.
1004
1005 2018-05-02 Richard Biener <rguenther@suse.de>
1006
1007 PR tree-optimization/85597
1008 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
1009 do not use split vect_get_vec_defs call but call vect_get_slp_defs
1010 directly.
1011
1012 2018-05-02 Tom de Vries <tom@codesourcery.com>
1013
1014 PR testsuite/85106
1015 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
1016 dump files): Add ltrans-tree.
1017
1018 2018-05-02 Tom de Vries <tom@codesourcery.com>
1019
1020 PR testsuite/85106
1021 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
1022 dump files): Add wpa-ipa.
1023
1024 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
1025
1026 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
1027 powerpc*-*-linux*paired* target.
1028 * config/rs6000/750cl.h: Delete.
1029 * config/rs6000/paired.h: Delete.
1030 * config/rs6000/paired.md: Delete.
1031 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
1032 float support.
1033 * config/rs6000/rs6000-builtin.def: Remove paired float support.
1034 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
1035 comment. Remove paired float support.
1036 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
1037 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
1038 VECTOR_PAIRED.
1039 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
1040 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
1041 declarations.
1042 * config/rs6000/rs6000.c: Remove paired float support.
1043 (paired_expand_vector_init, paired_expand_vector_move,
1044 paired_emit_vector_compare, paired_emit_vector_cond_expr,
1045 (paired_expand_lv_builtin, paired_expand_stv_builtin,
1046 paired_expand_builtin, paired_expand_predicate_builtin,
1047 paired_init_builtins): Delete.
1048 * config/rs6000/rs6000.h: Remove paired float support.
1049 * config/rs6000/rs6000.md: Remove paired float support.
1050 (move_from_CR_ov_bit): Delete.
1051 * config/rs6000/rs6000.opt (mpaired): Delete.
1052 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
1053 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
1054
1055 2018-05-02 Richard Biener <rguenther@suse.de>
1056
1057 PR middle-end/85567
1058 * gimplify.c (gimplify_save_expr): When in SSA form allow
1059 SAVE_EXPRs to compute to SSA vars.
1060
1061 2018-05-02 Jakub Jelinek <jakub@redhat.com>
1062
1063 PR target/85582
1064 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
1065 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
1066 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
1067 clobber operands[2], instead use a new pseudo. Formatting fixes.
1068
1069 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
1070
1071 PR tree-optimization/85586
1072 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
1073 exit early for statements in the same group if the accesses are
1074 not strided.
1075
1076 2018-05-02 Tom de Vries <tom@codesourcery.com>
1077
1078 PR lto/85451
1079 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
1080 error message.
1081
1082 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
1083
1084 PR tree-optimization/85143
1085 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
1086
1087 2018-05-01 Tom de Vries <tom@codesourcery.com>
1088
1089 PR lto/85451
1090 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
1091 not found" error message.
1092
1093 2018-05-01 Tom de Vries <tom@codesourcery.com>
1094
1095 PR other/83786
1096 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
1097 * vec.c (test_ordered_remove_if): New function.
1098 (vec_c_tests): Call test_ordered_remove_if.
1099 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
1100 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
1101 * tree-vect-patterns.c (vect_pattern_recog_1): Use
1102 VEC_ORDERED_REMOVE_IF.
1103
1104 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
1105
1106 PR tree-optimization/82665
1107 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
1108 pointer subtraction where arguments come from a memchr call.
1109
1110 2018-05-01 Jakub Jelinek <jakub@redhat.com>
1111
1112 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
1113 --push-state --as-needed and --pop-state instead of --as-needed and
1114 --no-as-needed if ld supports it.
1115 * configure: Regenerated.
1116
1117 PR web/85578
1118 * doc/install.texi2html: Replace _002d with - and _002a with * in
1119 generated html files using sed.
1120
1121 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1122
1123 PR c++/85523
1124 * gcc-rich-location.c (blank_line_before_p): New function.
1125 (use_new_line): New function.
1126 (gcc_rich_location::add_fixit_insert_formatted): New function.
1127 * gcc-rich-location.h
1128 (gcc_rich_location::add_fixit_insert_formatted): New function.
1129
1130 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1131
1132 * selftest.c (assert_streq): Rename "expected" and "actual" to
1133 "val1" and "val2". Extend NULL-handling to cover both inputs
1134 symmetrically, while still requiring both to be non-NULL for a pass.
1135 * selftest.h (assert_streq): Rename "expected" and "actual" to
1136 "val1" and "val2".
1137 (ASSERT_EQ): Likewise.
1138 (ASSERT_EQ_AT): Likewise.
1139 (ASSERT_KNOWN_EQ): Likewise.
1140 (ASSERT_KNOWN_EQ_AT): Likewise.
1141 (ASSERT_NE): Likewise.
1142 (ASSERT_MAYBE_NE): Likewise.
1143 (ASSERT_MAYBE_NE_AT): Likewise.
1144 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
1145 the assertion to pass.
1146 (ASSERT_STREQ_AT): Likewise.
1147
1148 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
1149
1150 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
1151 interaction with -pie.
1152
1153 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1154
1155 * selftest.h: Fix alphabetization of per-source-file selftest
1156 declarations.
1157
1158 2018-04-30 Jason Merrill <jason@redhat.com>
1159
1160 PR c++/61982 - dead stores to destroyed objects.
1161 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
1162 of clobber.
1163
1164 2018-04-30 Jason Merrill <jason@redhat.com>
1165
1166 * tree.c (build_clobber): New.
1167 * tree.h: Declare it.
1168 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
1169
1170 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1171
1172 * diagnostic-show-locus.c (layout::layout): Update for
1173 location_get_source_line returning a char_span.
1174 (struct char_span): Move to input.h.
1175 (struct correction): Update for fields in char_span becoming
1176 private.
1177 (struct source_line): Update for location_get_source_line
1178 returning a char_span.
1179 (layout::print_line): Likewise.
1180 * edit-context.c (edited_file::print_content): Likewise.
1181 (edited_file::print_diff_hunk): Likewise.
1182 (edited_file::print_run_of_changed_lines): Likewise.
1183 (edited_file::get_num_lines): Likewise.
1184 (edited_line::edited_line): Likewise.
1185 * final.c (asm_show_source): Likewise.
1186 * input.c (location_get_source_line): Convert return type
1187 from const char * to char_span, losing the final "line_len"
1188 param.
1189 (dump_location_info): Update for the above.
1190 (get_substring_ranges_for_loc): Likewise. Use a char_span
1191 when handling the literal within the line.
1192 (test_reading_source_line): Update for location_get_source_line
1193 returning a char_span.
1194 * input.h (class char_span): Move here from
1195 diagnostic-show-locus.c, converting from a struct to a class.
1196 Make data members private.
1197 (char_span::operator bool): New.
1198 (char_span::length): New.
1199 (char_span::get_buffer): New.
1200 (char_span::operator[]): New.
1201 (char_span::subspan): Make const.
1202 (char_span::xstrdup): New.
1203 (location_get_source_line): Convert return type from const char *
1204 to char_span, losing the final "line_size" param.
1205
1206 2018-04-30 Jan Hubicka <jh@suse.cz>
1207
1208 * lto-wrapper.c (ltrans_priorities): New static var.
1209 (cmp_priority): New.
1210 (run_gcc): Read priorities and if doing parallel build order
1211 the Makefile by them.
1212
1213 2018-04-30 David Malcolm <dmalcolm@redhat.com>
1214
1215 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
1216
1217 2018-04-30 Richard Biener <rguenther@suse.de>
1218
1219 * tree-cfg.c (verify_address): Remove base argument, add
1220 flag whether to check TREE_ADDRESSABLE and do that.
1221 (verify_expr): Remove.
1222 (verify_types_in_gimple_reference): Add pieces from verify_expr.
1223 (verify_gimple_assign_single): Likewise.
1224 (verify_gimple_switch): Likewise.
1225 (verify_expr_location_1): Dereference tp once. Add (disabled)
1226 piece from verify_expr.
1227 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
1228
1229 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
1230
1231 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
1232
1233 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
1234
1235 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
1236 (small_data_pattern): Likewise.
1237 (arc_rewrite_small_data): Likewise.
1238 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
1239 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
1240 (get_symbol_alignment): New function.
1241 (legitimate_small_data_address_p): Likewise.
1242 (legitimate_scaled_address): Update, call
1243 legitimate_small_data_address_p.
1244 (output_sdata): New static variable.
1245 (arc_print_operand): Update how we handle small data operands.
1246 (arc_print_operand_address): Likewise.
1247 (arc_legitimate_address_p): Update, use
1248 legitimate_small_data_address_p.
1249 (arc_rewrite_small_data_p): Remove.
1250 (arc_rewrite_small_data_1): Likewise.
1251 (arc_rewrite_small_data): Likewise.
1252 (small_data_pattern): Likewise.
1253 (compact_sda_memory_operand): Update to use
1254 legitimate_small_data_address_p and get_symbol_alignment.
1255 (prepare_move_operands): Don't rewite sdata pattern.
1256 (prepare_extend_operands): Remove.
1257 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
1258 pattern.
1259 (zero_extendqisi2): Likewise.
1260 (zero_extendhisi2): Likewise.
1261 (extendqihi2): Likewise.
1262 (extendqisi2): Likewise.
1263 (extendhisi2): Likewise.
1264 (addsi3): Likewise.
1265 (subsi3): Likewise.
1266 (andsi3): Likewise.
1267 * config/arc/constraints.md (Usd): Change it to memory constraint.
1268
1269 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
1270
1271 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
1272 as source of std instructions.
1273 * config/arc/arc.md (movsi_insn): Update pattern predicate to
1274 allow 6-bit constants as source for store instructions.
1275 (movdi_insn): Update instruction pattern to allow 6-bit constants
1276 as source for store instructions.
1277
1278 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
1279
1280 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
1281
1282 2018-04-30 Nathan Sidwell <nathan@acm.org>
1283 Sandra Loosemore <sandra@codesourcery.com>
1284
1285 * dumpfile.c (dump_open): Allow '-' for stdout.
1286 * doc/invoke.texi (Developer Options): Document dump filename
1287 determination early. Document stdin/stdout selection.
1288
1289 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
1290
1291 Microblaze Target: PIC data text relative
1292
1293 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
1294 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
1295 Add declaration.
1296 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
1297 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
1298 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
1299 New addressing mode for data-text relative position indepenedent code.
1300 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
1301 'ADDRESS_SYMBOLIC_TXT_REL'.
1302 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
1303 (microblaze_legitimate_pic_operand): Exclude function calls from
1304 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
1305 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
1306 addresses cases.
1307 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
1308 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
1309 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
1310 for 'address + offset'.
1311 (microblaze_expand_prologue): Add new function prologue call for
1312 'r20' assignation.
1313 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
1314 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
1315 table in case of TARGET_PIC_DATA_TEXT_REL.
1316 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
1317 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
1318 Add new macros 'UNSPEC_TEXT',
1319 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
1320 + exclude function calls from 'UNSPEC_PLT' in case of data text
1321 relative mode.
1322 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
1323 new target hook for generating address diff vector tables in case of
1324 flag_pic.
1325 * doc/tm.texi : Regenerate.
1326 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
1327 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
1328 of addr diff vector generation.
1329 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
1330 target hook definition.
1331 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
1332 Add default function for generate_pic_addr_diff_vec -> flag_pic.
1333 * doc/invoke.texi (Add new pic option): Add new microblaze pic
1334 option for data text relative.
1335
1336 2018-04-30 Richard Biener <rguenther@suse.de>
1337
1338 * tree-chrec.h (evolution_function_is_constant_p): Remove
1339 redundant check.
1340 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
1341
1342 2018-04-30 Richard Biener <rguenther@suse.de>
1343
1344 PR bootstrap/85571
1345 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
1346
1347 2018-04-30 Richard Biener <rguenther@suse.de>
1348
1349 PR tree-optimization/28364
1350 PR tree-optimization/85275
1351 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
1352 copying first exit test.
1353
1354 2018-04-28 Mark Wielaard <mark@klomp.org>
1355
1356 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
1357 dwarf_version >= 5.
1358 (dwarf_AT): Handle DW_AT_addr_base.
1359 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
1360
1361 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
1362
1363 PR target/84431
1364 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
1365 (*ashl<dwi>3_doubleword_mask_1): Ditto.
1366 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
1367 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
1368
1369 2018-04-28 Richard Biener <rguenther@suse.de>
1370
1371 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
1372 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
1373 to reflect use. Only add interesting stmts.
1374
1375 2018-04-27 Martin Jambor <mjambor@suse.cz>
1376
1377 PR ipa/85549
1378 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
1379 the jump function allows for passing through aggregate values.
1380
1381 2018-04-27 David Malcolm <dmalcolm@redhat.com>
1382
1383 * input.h (in_system_header_at): Convert from macro to inline
1384 function.
1385 (from_macro_expansion_at): Likewise.
1386 (from_macro_definition_at): Likewise.
1387
1388 2018-04-27 Jeff Law <law@redhat.com>
1389
1390 * config.gcc: Mark tile* targets as deprecated/obsolete.
1391
1392 2018-04-27 Richard Biener <rguenther@suse.de>
1393
1394 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
1395 fix for ILP32.
1396
1397 2018-04-27 Richard Biener <rguenther@suse.de>
1398
1399 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
1400
1401 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
1402
1403 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
1404 with Yd constraint. Set "preferred_for_speed" attribute from
1405 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
1406 with Yd constraint.
1407 (*movdi_internal): Ditto.
1408 (movti_interunit splitters): Remove
1409 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
1410 (movdi_interunit splitters): Ditto.
1411 * config/i386/constraints.md (Ye): Remove.
1412 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
1413
1414 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1415
1416 PR target/85512
1417 * config/aarch64/constraints.md (Usg): Limit to 31.
1418 (Usj): Limit to 63.
1419
1420 2018-04-27 Jakub Jelinek <jakub@redhat.com>
1421
1422 PR tree-optimization/85529
1423 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
1424 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
1425 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
1426 zero extension or masking of the MSB bit.
1427 (optimize_range_tests): Add FIRST_BB argument, pass it through
1428 to optimize_range_tests_var_bound.
1429 (maybe_optimize_range_tests, reassociate_bb): Adjust
1430 optimize_range_tests callers.
1431
1432 2018-04-26 Richard Biener <rguenther@suse.de>
1433 Jakub Jelinek <jakub@redhat.com>
1434
1435 * cgraph.h (symbol_table): Just declare debug method here.
1436 * symtab.c (symbol_table::debug): Define.
1437
1438 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
1439
1440 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
1441
1442 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
1443
1444 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
1445 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
1446 (*movdi_internal): Substitute Yi and Yj constraint with x
1447 and Ym and Yn constraint with y constraint. Update "isa"
1448 attribute and set "preferred_for_speed" attribute from
1449 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
1450 (*movsi_internal): Ditto.
1451 (*movdf_internal): Ditto.
1452 (*movsf_internal): Ditto.
1453 (*zero_extendsidi2): Ditto.
1454 * config/i386/sse.md (vec_set<mode>_0): Ditto.
1455 (sse2_loadld): Ditto.
1456 (*vec_extract<ssevecmodelower>_0): Ditto.
1457 (*vec_extractv4si_0_zext_sse4): Ditto.
1458 (vec_concatv2di): Ditto.
1459 (*vec_dup<mode>): Ditto.
1460 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
1461 * config/i386/constraints.md (Yi): Remove.
1462 (Yj): Remove.
1463 (Ym): Remove.
1464 (Yn): Remove.
1465
1466 2018-04-26 Nathan Sidwell <nathan@acm.org>
1467
1468 * dumpfile.c (dump_open): New.
1469 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
1470 (dump_finish): Detect stdio/stderr by value not name.
1471
1472 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
1473
1474 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
1475
1476 2018-04-26 Tom de Vries <tom@codesourcery.com>
1477
1478 PR target/84952
1479 * config/nvptx/nvptx.c (verify_neutering_jumps)
1480 (verify_neutering_labels): New function
1481 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
1482
1483 2018-04-26 Tom de Vries <tom@codesourcery.com>
1484
1485 PR target/84025
1486 * config/nvptx/nvptx.c (needs_neutering_p): New function.
1487 (nvptx_single): Use needs_neutering_p to skip over insns that do not
1488 need neutering.
1489
1490 2018-04-26 Richard Biener <rguenther@suse.de>
1491 Tom de Vries <tom@codesourcery.com>
1492
1493 PR lto/85422
1494 * lto-streamer-out.c (output_function): Fixup loops if required to match
1495 discovery done in the reader.
1496
1497 2018-04-26 Richard Biener <rguenther@suse.de>
1498
1499 PR tree-optimization/85116
1500 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
1501 have a loop exit from the single latch predecessor. Remove
1502 case of header with just condition.
1503 (ch_base::copy_headers): Exclude infinite loops from any
1504 processing.
1505 (pass_ch::execute): Record exits.
1506
1507 2018-04-26 Richard Biener <rguenther@suse.de>
1508
1509 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
1510 prologue cost vector and pass it to vect_get_load_cost.
1511 (vect_get_peeling_costs_all_drs): Likewise.
1512 (vect_peeling_hash_get_lowest_cost): Likewise.
1513 (vect_enhance_data_refs_alignment): Likewise.
1514
1515 2018-04-26 Richard Biener <rguenther@suse.de>
1516
1517 PR middle-end/85450
1518 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
1519 checking of integer<->pointer conversions.
1520 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
1521 sign-/zero-extending pointer types.
1522 (expand_omp_for_static_chunk): Likewise.
1523
1524 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
1525 Jean Lee <xiaoyur347@gmail.com>
1526
1527 * config/mips/mips.c (mips_asan_shadow_offset): New function.
1528 (TARGET_ASAN_SHADOW_OFFSET): Define.
1529 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
1530 true for -fsanitize=address.
1531
1532 2018-04-25 Mark Wielaard <mark@klomp.org>
1533
1534 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
1535 shorter ones.
1536
1537 2018-04-25 Jakub Jelinek <jakub@redhat.com>
1538
1539 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
1540 than "alu", remove explicit "memory" and "imm_disp" attributes.
1541 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
1542
1543 PR middle-end/85414
1544 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
1545 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
1546 gen_lowpart_no_emit.
1547
1548 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
1549
1550 PR target/85473
1551 * config/i386/i386.c (ix86_expand_builtin): Change memory
1552 operand to XI, extend p0 to Pmode.
1553 * config/i386/i386.md: Change unspec volatile and operand
1554 1 mode to XI, change operand 0 mode to P.
1555
1556 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
1557
1558 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
1559 GET_MODE_MASK before any checking.
1560 (nds32_can_use_bset_p): Likewise.
1561 (nds32_can_use_btgl_p): Likewise.
1562
1563 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
1564
1565 * config/nds32/nds32-doubleword.md: New define_split pattern for
1566 illegal register number.
1567
1568 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
1569
1570 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
1571
1572 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
1573
1574 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
1575
1576 2018-04-25 Richard Biener <rguenther@suse.de>
1577
1578 * lto-streamer.h (LTO_major_version): Bump to 8.
1579
1580 2018-04-25 Jakub Jelinek <jakub@redhat.com>
1581
1582 * BASE-VER: Set to 9.0.0.
1583
1584 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
1585
1586 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
1587 in __abskf2 and __powikf2.
1588
1589 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1590
1591 PR target/85512
1592 * config/aarch64/constraints.md (Usg, Usj): New constraints.
1593 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
1594 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
1595 Use the above on operand 2. Reindent.
1596 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
1597
1598 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
1599
1600 PR target/85485
1601 * common/config/i386/i386-common.c (ix86_handle_option): Don't
1602 handle OPT_mcet.
1603 * config/i386/i386.opt (mcet): Removed.
1604 * doc/install.texi: Remove -mcet documentation.
1605 * doc/invoke.texi: Likewise.
1606
1607 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
1608
1609 PR target/85485
1610 * doc/install.texi: Remove -mcet from bootstrap-cet.
1611
1612 2018-04-24 Jakub Jelinek <jakub@redhat.com>
1613
1614 PR target/85511
1615 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
1616 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
1617 if TARGET_64BIT.
1618
1619 PR target/85503
1620 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
1621 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
1622 containing a CONST_VECTOR.
1623
1624 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
1625
1626 * doc/install.texi: Update newlib dependency for nvptx.
1627
1628 2018-04-24 Jakub Jelinek <jakub@redhat.com>
1629
1630 PR target/85508
1631 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
1632 instead of INTVAL when shifting x left.
1633
1634 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
1635
1636 PR tree-optimization/85478
1637 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
1638 vect_grouped_store_supported for single element vectors.
1639
1640 2018-04-24 Richard Biener <rguenther@suse.de>
1641
1642 PR target/85491
1643 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
1644 load cost increase to the case of non-constant step.
1645
1646 2018-04-24 Jakub Jelinek <jakub@redhat.com>
1647
1648 PR target/84828
1649 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
1650 destination if any_malformed_asm.
1651
1652 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
1653
1654 PR middle-end/85496
1655 * expr.c (store_field): In the bitfield case, if the value comes from
1656 a function call and is returned in registers by means of a PARALLEL,
1657 do not change the mode of the temporary unless BLKmode and VOIDmode.
1658
1659 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
1660
1661 PR rtl-optimization/85423
1662 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
1663 dependencies to debug insns when the previous insn is non-debug.
1664
1665 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
1666
1667 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
1668 enums into a single definition.
1669 (fls): Fix predicates and printing.
1670 (seti): Likewise.
1671
1672 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
1673
1674 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
1675 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
1676 and short u6 immediate.
1677 (check_if_valid_sleep_operand): Remove.
1678 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
1679
1680 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
1681
1682 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
1683 flag_always_save_lp condition.
1684 * config/nds32/nds32.opt (malways-save-lp): New option.
1685
1686 2018-04-22 Shiva Chen <shiva0217@gmail.com>
1687
1688 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
1689 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
1690 * config/nds32/nds32.h
1691 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
1692 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
1693
1694 2018-04-22 Shiva Chen <shiva0217@gmail.com>
1695
1696 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
1697 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
1698
1699 2018-04-22 Shiva Chen <shiva0217@gmail.com>
1700 Chung-Ju Wu <jasonwucj@gmail.com>
1701
1702 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
1703 Declare.
1704 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
1705 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
1706
1707 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
1708
1709 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
1710
1711 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
1712
1713 * config/nds32/nds32-protos.h (nds32_data_alignment,
1714 nds32_local_alignment): Declare.
1715 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
1716 nds32_local_alignment): New functions.
1717 (TARGET_CONSTANT_ALIGNMENT): Define.
1718 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
1719
1720 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
1721
1722 * config/nds32/nds32.c
1723 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
1724 (TARGET_MODES_TIEABLE_P): Likewise.
1725
1726 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
1727
1728 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
1729 level Ofast and Og.
1730
1731 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
1732 Chung-Ju Wu <jasonwucj@gmail.com>
1733
1734 * config/nds32/constants.md (unspec_volatile_element): Add enum values
1735 for unaligned access.
1736 * config/nds32/nds32-intrinsic.c: Implementation of expanding
1737 unaligned access.
1738 * config/nds32/nds32-intrinsic.md: Likewise.
1739 * config/nds32/nds32_intrinsic.h: Likewise.
1740 * config/nds32/nds32.h (nds32_builtins): Likewise.
1741 * config/nds32/nds32.opt (munaligned-access): New option.
1742 * config/nds32/nds32.c (nds32_asm_file_start): Display
1743 flag_unaligned_access status.
1744
1745 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
1746
1747 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
1748 -mno-relax is present.
1749 * config/riscv/linux.h (LINK_SPEC): Ditto.
1750
1751 2018-04-20 Martin Sebor <msebor@redhat.com>
1752
1753 PR c/85365
1754 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
1755 for null pointers.
1756 (gimple_fold_builtin_stxcpy_chk): Same.
1757 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
1758
1759 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
1760
1761 PR target/85456
1762 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
1763 __powikf2 when long double is IEEE 128-bit.
1764
1765 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
1766
1767 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
1768 step to make sure stack always aligned.
1769
1770 2018-04-20 Carl Love <cel@us.ibm.com>
1771
1772 PR target/83402
1773 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
1774 size check for arg0.
1775
1776 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
1777 Tom de Vries <tom@codesourcery.com>
1778
1779 PR target/85445
1780 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
1781 Emit insns for calls too.
1782 (nvptx_find_par): Always look for worker-level predecessor insn.
1783 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
1784 calls.
1785 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
1786 (nvptx_process_pars): Propagate frames for calls.
1787
1788 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
1789
1790 PR target/85469
1791 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
1792 Removed.
1793 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
1794 (ix86_handle_option): Don't handle OPT_mibt.
1795 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
1796 __SHSTK__.
1797 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
1798 has_ibt and ibt.
1799 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
1800 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
1801 (ix86_target_macros): Define __CET__ with flag_cf_protection
1802 for -fcf-protection.
1803 * config/i386/i386.c (isa2_opts): Remove -mibt.
1804 * config/i386/i386.h (TARGET_IBT): Removed.
1805 (TARGET_IBT_P): Likewise.
1806 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
1807 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
1808 * config/i386/i386.opt (mcet): Update help message.
1809 (mshstk): Likewise.
1810 (mibt): Removed.
1811 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
1812 -mcet as an alias for -mshstk.
1813
1814 2018-04-20 Richard Biener <rguenther@suse.de>
1815
1816 PR middle-end/85475
1817 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
1818 complexity by forcing a single use of the multiply operand.
1819
1820 2018-04-20 Martin Jambor <mjambor@suse.cz>
1821
1822 ipa/85449
1823 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
1824 recursion dependency to only apply to non-clones.
1825
1826 2018-04-20 Martin Jambor <mjambor@suse.cz>
1827
1828 ipa/85447
1829 * ipa-cp.c (create_specialized_node): Check that clones of
1830 self-recursive edges exist during IPA-CP.
1831
1832 2018-04-19 Toon Moene <toon@moene.org>
1833
1834 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
1835 by -O3.
1836
1837 2018-04-19 Jakub Jelinek <jakub@redhat.com>
1838
1839 PR tree-optimization/85467
1840 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
1841 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
1842 VECTOR_CST element to type.
1843
1844 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
1845
1846 PR target/85397
1847 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
1848 * config/i386/i386.md (builtin_setjmp_setup): Removed.
1849 (builtin_longjmp): Likewise.
1850 (save_stack_nonlocal): New pattern.
1851 (restore_stack_nonlocal): Likewise.
1852
1853 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
1854
1855 PR target/85404
1856 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
1857 Replace ASM_OUTPUT_LABEL with fprintf.
1858
1859 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
1860
1861 PR target/85417
1862 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
1863 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
1864 * config/i386/i386-c.c (ix86_target_macros_internal): Also
1865 define __IBT__ and __SHSTK__ for -fcf-protection.
1866 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
1867 TARGET_IBT.
1868 (ix86_trampoline_init): Likewise.
1869 (x86_output_mi_thunk): Likewise.
1870 (ix86_notrack_prefixed_insn_p): Likewise.
1871 (ix86_option_override_internal): Don't disallow -fcf-protection.
1872 * config/i386/i386.md (rdssp<mode>): Also enable for
1873 -fcf-protection.
1874 (incssp<mode>): Likewise.
1875 (nop_endbr): Likewise.
1876 * config/i386/i386.opt (mcet): Change help message to built-in
1877 functions only.
1878 (mibt): Likewise.
1879 (mshstk): Likewise.
1880 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
1881 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
1882 enable CET built-in functions.
1883
1884 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
1885
1886 * common/config/i386/i386-common.c
1887 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
1888 OPTION_MASK_ISA_MOVDIRI_UNSET,
1889 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
1890 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
1891 * config.gcc (movdirintrin.h): New header.
1892 * config/i386/cpuid.h (bit_MOVDIRI,
1893 bit_MOVDIR64B): New bits.
1894 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
1895 and -mmvodir64b.
1896 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
1897 (VOID, PVOID, PCVOID)): New function types.
1898 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
1899 __builtin_ia32_directstoreu_u64,
1900 __builtin_ia32_movdir64b): New builtins.
1901 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
1902 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
1903 and -mmovdiri.
1904 (ix86_valid_target_attribute_inner_p): Ditto.
1905 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
1906 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
1907 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
1908 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
1909 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
1910 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
1911 (movdiri<mode>, movdir64b_<mode>): New.
1912 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
1913 * config/i386/immintrin.h: Include movdirintrin.h.
1914 * config/i386/movdirintrin.h: New file.
1915 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
1916
1917 2018-04-19 Richard Biener <rguenther@suse.de>
1918
1919 PR middle-end/85455
1920 * cfg.c (clear_bb_flags): When loop state says we have
1921 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
1922
1923 2018-04-19 Richard Biener <rguenther@suse.de>
1924
1925 PR tree-optimization/84737
1926 * tree-vect-data-refs.c (vect_copy_ref_info): New function
1927 copying restrict info.
1928 (vect_setup_realignment): Use it.
1929 * tree-vectorizer.h (vect_copy_ref_info): Declare.
1930 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
1931 the first DR to all generated stores.
1932 (vectorizable_load): Likewise for loads.
1933
1934 2018-04-19 Jakub Jelinek <jakub@redhat.com>
1935
1936 PR tree-optimization/85446
1937 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
1938 the integral and pointer types to have the same precision.
1939
1940 * doc/install.texi: Document --disable-cet being the default and
1941 --enable-cet=auto.
1942
1943 2018-04-18 Martin Liska <mliska@suse.cz>
1944
1945 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
1946 style.
1947
1948 2018-04-18 Martin Liska <mliska@suse.cz>
1949
1950 Revert
1951 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
1952
1953 PR ipa/83983
1954 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
1955 arguments if they are comparable.
1956
1957 2018-04-18 Martin Liska <mliska@suse.cz>
1958
1959 Revert
1960 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
1961
1962 PR lto/84805
1963 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
1964 incomplete types.
1965
1966 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
1967
1968 PR target/85388
1969 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
1970 ENDBR after calling __morestack.
1971
1972 2018-04-18 David Malcolm <dmalcolm@redhat.com>
1973
1974 PR jit/85384
1975 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
1976 by using gcc_base_ver to generate a gcc_driver_version, and use
1977 it when generating GCC_DRIVER_NAME.
1978 * configure: Regenerate.
1979
1980 2018-04-18 Jakub Jelinek <jakub@redhat.com>
1981
1982 PR target/81084
1983 * config.gcc: Obsolete powerpc*-*-*spe*.
1984
1985 2018-04-17 Jakub Jelinek <jakub@redhat.com>
1986
1987 PR debug/84637
1988 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
1989 (stabstr_D): Change type of unum from unsigned int to
1990 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
1991 type.
1992
1993 2018-04-17 Jim Wilson <jimw@sifive.com>
1994
1995 PR 84856
1996 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
1997 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
1998 Set arg_pointer_offset after using pretend_args_size.
1999
2000 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2001
2002 PR rtl-optimization/85431
2003 * dse.c (record_store): Ignore zero width stores.
2004
2005 PR sanitizer/85230
2006 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
2007 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
2008 __builtin_stack_restore rather than after it.
2009 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
2010 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
2011 argument instead of virtual_dynamic_stack_rtx.
2012
2013 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
2014
2015 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
2016 New prototype.
2017 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
2018 Add note to error message to explain internal mapping of overloaded
2019 built-in function name to non-overloaded built-in function name.
2020 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
2021 function.
2022
2023 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
2024
2025 PR target/85424
2026 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
2027 where the inputs overlap with the output.
2028
2029 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2030
2031 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
2032 (=v, v) alternative and explicit "memory" attribute.
2033 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
2034 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
2035 attributes.
2036 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
2037 "sselog1" type instead of "sselog".
2038 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
2039 "sselog". Remove explicit "memory" attribute.
2040 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
2041 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
2042 attributes.
2043 (vec_extract_hi_v32hi): Merge all alternatives into one, use
2044 "sselog1" type instead of "sselog". Remove explicit "memory"
2045 attribute.
2046 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
2047 use "sselog1" type instead of "sselog". Remove explicit "memory"
2048 attribute.
2049 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
2050 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
2051 attributes.
2052 (vec_extract_hi_v64qi): Merge all alternatives into one, use
2053 "sselog1" type instead of "sselog". Remove explicit "memory"
2054 attribute.
2055 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
2056 use "sselog1" type instead of "sselog". Remove explicit "memory"
2057 attribute.
2058
2059 PR target/85430
2060 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
2061
2062 PR middle-end/85414
2063 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
2064 on a SUBREG.
2065
2066 2018-04-17 Martin Jambor <mjambor@suse.cz>
2067
2068 PR ipa/85421
2069 * ipa-cp.c (create_specialized_node): Call
2070 expand_all_artificial_thunks if necessary.
2071
2072 2018-04-17 Martin Liska <mliska@suse.cz>
2073
2074 PR lto/85405
2075 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
2076 in message, remote space in between '_G' and '('.
2077
2078 2018-04-17 Jakub Jelinek <jakub@redhat.com>
2079
2080 PR target/85281
2081 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
2082 avx512f_vmcmp<mode>3<round_saeonly_name>,
2083 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
2084 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
2085 avx512f_rndscale<mode><round_saeonly_name>,
2086 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
2087 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
2088 Use %<iptr>2 instead of %2 for -masm=intel.
2089 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
2090 avx512f_vcvttss2usi<round_saeonly_name>,
2091 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
2092 -masm=intel.
2093 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
2094 avx512f_vcvttsd2usi<round_saeonly_name>,
2095 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
2096 Use %q1 instead of %1 for -masm=intel.
2097 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
2098 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
2099 of %3 for -masm=intel.
2100 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
2101 -masm=intel.
2102 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
2103 -masm=intel.
2104 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
2105 -masm=intel.
2106 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
2107 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
2108 %g1.
2109 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
2110 -masm=intel.
2111 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
2112 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
2113 %g1 and one with %0 and %1.
2114 (avx512er_vmrcp28<mode><round_saeonly_name>,
2115 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
2116 %1 for -masm=intel.
2117 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
2118 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
2119 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
2120 of %0 and %{%4%} for -masm=intel.
2121 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
2122 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
2123 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
2124 order of %0 and %{%5%}%{z%} for -masm=intel.
2125
2126 2018-04-17 Jan Hubicka <jh@suse.cz>
2127
2128 PR lto/85405
2129 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
2130
2131 2018-04-17 Martin Liska <mliska@suse.cz>
2132
2133 PR ipa/85329
2134 * multiple_target.c (create_dispatcher_calls): Set apostrophes
2135 for target_clone error message. Make default implementation
2136 clone to be a local declaration.
2137 (separate_attrs): Add new argument and check for an empty
2138 string.
2139 (expand_target_clones): Handle it.
2140 (ipa_target_clone): Make redirection just for target_clones
2141 functions.
2142
2143 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
2144 Tom de Vries <tom@codesourcery.com>
2145
2146 PR middle-end/84955
2147 * omp-expand.c (expand_oacc_for): Add dummy false branch for
2148 tiled basic blocks without omp continue statements.
2149
2150 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
2151
2152 PR target/83660
2153 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
2154 vec_extract expression as having side effects to make sure it gets
2155 a cleanup point.
2156
2157 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
2158
2159 PR target/85403
2160 * config/i386/i386.c (get_builtin_code_for_version): Check
2161 error_mark_node.
2162
2163 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
2164
2165 PR target/84331
2166 * gcc/config.gcc: Support "skylake".
2167 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
2168 PROCESSOR_SKYLAKE.
2169 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
2170 (processor_target_table): Add "skylake".
2171 (ix86_option_override_internal): Add "skylake".
2172 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
2173 PROCESSOR_CANNONLAKE.
2174 (get_builtin_code_for_version): Fix priority for
2175 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
2176 PROCESSOR_SKYLAKE-AVX512.
2177 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
2178 (processor_type): Add PROCESSOR_SKYLAKE.
2179
2180 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
2181 Jason Merrill <jason@redhat.com>
2182
2183 PR c++/85112
2184 * convert.c (convert_to_integer_1): Use direct recursion for
2185 enumeral types and types with a precision less than the number
2186 of bits in their mode.
2187
2188 2018-04-16 Julia Koval <julia.koval@intel.com>
2189
2190 PR target/84413
2191 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
2192 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
2193
2194 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
2195
2196 PR target/85293
2197 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
2198 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
2199 and -mno-direct-move.
2200
2201 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
2202
2203 PR target/83402
2204 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
2205 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
2206 Ensure negative shifts result in {0}.
2207
2208 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
2209
2210 PR rtl-optimization/79916
2211 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
2212 regs (if any) to define how to gnerate SD moves when LRA is in
2213 progress.
2214
2215 2018-04-13 Jakub Jelinek <jakub@redhat.com>
2216
2217 PR rtl-optimization/85393
2218 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
2219 * except.c (expand_dw2_landing_pad_for_region): Make static.
2220 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
2221 a label and unconditional jump to old_bb, rather than
2222 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
2223 basic block.
2224
2225 PR rtl-optimization/85376
2226 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
2227 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
2228 instead of a specific value.
2229
2230 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
2231 Bin Cheng <bin.cheng@arm.com>
2232
2233 PR tree-optimization/82965
2234 PR tree-optimization/83991
2235 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
2236 by_profile_only parameter.
2237 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
2238 information if the loop was predicted to iterate too many times.
2239 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
2240
2241 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
2242
2243 PR lto/71991
2244 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
2245 always inline.
2246
2247 2018-04-13 Martin Liska <mliska@suse.cz>
2248 Jakub Jelinek <jakub@redhat.com>
2249
2250 PR middle-end/81657
2251 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
2252 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
2253 * builtins.c (expand_builtin_memory_copy_args): Use
2254 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
2255 handle dest_addr == pc_rtx.
2256
2257 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
2258
2259 PR target/85291
2260 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
2261 asked to not generate direct moves.
2262 (fix_trunc<mode>si2_stfiwx): Similar.
2263 (fix_trunc<mode>si2_internal): Similar.
2264
2265 2018-04-12 Jakub Jelinek <jakub@redhat.com>
2266
2267 PR debug/83157
2268 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
2269 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
2270 lookup if dest in some wider mode is known to be const0_rtx and
2271 if so, record permanent equivalence for it to be ZERO_EXTEND of
2272 the narrower mode destination.
2273
2274 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
2275
2276 * lto-streamer-out.c (output_function): Revert 259346.
2277 * omp-expand.c (expand_oacc_for): Likewise.
2278
2279 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
2280
2281 PR rtl-optimization/85354
2282 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
2283 * sel-sched.c (sel_global_init): ... here.
2284
2285 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
2286
2287 PR target/85238
2288 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
2289 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
2290 mode for PE-COFF targets.
2291 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
2292 (i386_pe_asm_lto_end): Likewise.
2293 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
2294 (TARGET_ASM_LTO_END): Likewise.
2295 * config/i386/winnt.c (saved_debug_info_level): New static variable.
2296 (i386_pe_asm_lto_start): New function.
2297 (i386_pe_asm_lto_end): Likewise.
2298
2299 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
2300 Richard Biener <rguenther@suse.de>
2301
2302 PR middle-end/84955
2303 * lto-streamer-out.c (output_function): Fix CFG loop state before
2304 streaming out.
2305 * omp-expand.c (expand_oacc_for): Handle calls to internal
2306 functions like regular functions.
2307
2308 2018-04-12 Richard Biener <rguenther@suse.de>
2309
2310 PR lto/85371
2311 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
2312 for the early LTO debug to properly generate references to it
2313 during DIE emission. Do not re-use that for the skeleton for
2314 split-dwarf.
2315 (dwarf2out_early_finish): Likewise.
2316
2317 2018-04-12 Jakub Jelinek <jakub@redhat.com>
2318
2319 PR target/85328
2320 * config/i386/sse.md
2321 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
2322 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
2323 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
2324 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
2325 and output is a reg, avoid creating invalid lowpart subreg, but
2326 instead split into a 512-bit move. Don't split if not AVX512VL,
2327 input is xmm16+ reg and output is a mem.
2328 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
2329 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
2330 xmm16+ reg and output is a mem.
2331
2332 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2333
2334 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
2335 also for flag_dwarf2_cfi_asm.
2336
2337 2018-04-12 Jakub Jelinek <jakub@redhat.com>
2338
2339 PR rtl-optimization/85342
2340 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
2341 a bool scalar var inside of the loop instead. Don't try to update
2342 recog_data.operand after failed apply_change_group.
2343
2344 2018-04-12 Tom de Vries <tom@codesourcery.com>
2345
2346 PR target/85296
2347 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
2348 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
2349 array with flexible array member as array without given dimension.
2350 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
2351 argument for undefined param to true.
2352
2353 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
2354
2355 PR target/85321
2356 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
2357 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
2358 from PowerPC section.
2359 * config/rs6000/sysv4.opt (mcall-): Improve help text.
2360 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
2361 help text that is too long.
2362 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
2363 help text that is too long.
2364 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
2365 help text that is too long.
2366
2367 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
2368
2369 * config/alpha/alpha.md (stack_probe_internal): Rename
2370 from "probe_stack". Update all callers.
2371
2372 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
2373
2374 PR rtl-optimization/84566
2375 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
2376 sched_macro_fuse_insns.
2377
2378 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
2379
2380 PR target/84301
2381 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
2382 (compute_block_dependences): ... from here.
2383
2384 2018-04-11 Jakub Jelinek <jakub@redhat.com>
2385
2386 PR tree-optimization/85331
2387 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
2388 from int to HOST_WIDE_INT.
2389
2390 2018-04-11 Martin Jambor <mjambor@suse.cz>
2391
2392 PR ipa/84149
2393 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
2394 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
2395 not the same as the source val.
2396 (cgraph_edge_brings_value_p): New parameter.
2397 (gather_edges_for_value): Pass destination value to
2398 cgraph_edge_brings_value_p.
2399 (perhaps_add_new_callers): Likewise.
2400 (get_info_about_necessary_edges): Likewise and exclude values brought
2401 only by self-recursive edges.
2402 (create_specialized_node): Redirect only clones of self-calling edges.
2403 (+self_recursive_pass_through_p): New function.
2404 (find_more_scalar_values_for_callers_subset): Use it.
2405 (find_aggregate_values_for_callers_subset): Likewise.
2406 (known_aggs_to_agg_replacement_list): Removed.
2407 (decide_whether_version_node): Re-calculate known constants for all
2408 remaining context clones.
2409
2410 2018-04-11 Richard Biener <rguenther@suse.de>
2411
2412 PR lto/85339
2413 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
2414 from early DWARF output.
2415 (dwarf2out_early_finish): Output line info unconditionally into
2416 early DWARF and add reference to it.
2417
2418 2018-04-11 Jakub Jelinek <jakub@redhat.com>
2419
2420 PR target/85281
2421 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
2422 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
2423 other than V2DFmode using iptr mode attribute.
2424 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
2425
2426 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
2427
2428 PR rtl-optimization/84659
2429 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
2430
2431 2018-04-11 Jakub Jelinek <jakub@redhat.com>
2432
2433 PR debug/85302
2434 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
2435 SIZEP is NULL.
2436 (output_loc_list): Pass address of a dummy size variable even in the
2437 locview handling loop.
2438 (index_location_lists): Add comment on why skip_loc_list_entry can't
2439 call size_of_locs.
2440
2441 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
2442
2443 PR target/85261
2444 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
2445 into register.
2446
2447 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
2448
2449 PR target/85321
2450 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
2451 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
2452 and -mstring-compare-inline-limit.
2453
2454 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
2455
2456 PR target/85287
2457 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
2458 for stack clash protection in a register whenever we need it to be in
2459 a register.
2460
2461 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
2462
2463 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
2464 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
2465
2466 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
2467
2468 PR target/85321
2469 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
2470 the help text.
2471 (mlong-double-): Ditto.
2472 * config/rs6000/sysv4.opt (msdata=): Ditto.
2473 (mtls-size=): Ditto.
2474
2475 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
2476
2477 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
2478 erroneous entries for
2479 "vector int vec_ldl (int, long int *)", and
2480 "vector unsigned int vec_ldl (int, unsigned long int *)".
2481 Add comments and entries for
2482 "vector bool char vec_ldl (int, bool char *)",
2483 "vector bool short vec_ldl (int, bool short *)",
2484 "vector bool int vec_ldl (int, bool int *)",
2485 "vector bool long long vec_ldl (int, bool long long *)",
2486 "vector pixel vec_ldl (int, pixel *)",
2487 "vector long long vec_ldl (int, long long *)",
2488 "vector unsigned long long vec_ldl (int, unsigned long long *)".
2489 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
2490 type tree bool_long_long_type_node and correct definition of
2491 bool_V2DI_type_node to make reference to this new type tree.
2492 (rs6000_mangle_type): Replace erroneous reference to
2493 bool_long_type_node with bool_long_long_type_node.
2494 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
2495 comments to emphasize sign distinctions for char and int types and
2496 replace RS6000_BTI_bool_long constant with
2497 RS6000_BTI_bool_long_long constant. Also add comment to restrict
2498 use of RS6000_BTI_pixel.
2499 (bool_long_type_node): Remove this macro definition.
2500 (bool_long_long_type_node): New macro definition
2501
2502 2018-04-10 Jakub Jelinek <jakub@redhat.com>
2503
2504 PR rtl-optimization/85300
2505 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
2506 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
2507 simplify_unary_operation fails.
2508
2509 2018-04-10 Martin Liska <mliska@suse.cz>
2510
2511 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
2512 cgraph_edge and ipa_ref.
2513
2514 2018-04-10 Jakub Jelinek <jakub@redhat.com>
2515
2516 PR target/85177
2517 PR target/85255
2518 * config/i386/sse.md
2519 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
2520 computation of the VEC_MERGE selector from mask.
2521 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
2522 Fix decoding of the VEC_MERGE selector into mask.
2523
2524 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
2525
2526 PR tree-optimization/85286
2527 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
2528
2529 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
2530
2531 * final.c (final_1): Set insn_last_address as well as
2532 insn_current_address.
2533
2534 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
2535
2536 PR target/85173
2537 * explow.c (emit_stack_probe): Call validize_mem on memory location
2538 before passing it to gen_probe_stack. Create address operand and
2539 legitimize it for the probe_stack_address case.
2540
2541 2018-04-09 Jan Hubicka <jh@suse.cz>
2542
2543 PR lto/85078
2544 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
2545 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
2546 * tree.c (free_lang_data_in_type): Fix handling of binfos;
2547 walk basetypes.
2548 (free_lang_data): Rebuild type inheritance graph.
2549
2550 2018-04-09 Martin Sebor <msebor@redhat.com>
2551
2552 * invoke.texi (-finline-small-functions): Mention other optimization
2553 options.
2554 (-findirect-inlining, -fpartial-inlining): Same.
2555 (-finline-functions-called-once): Same.
2556 (-freorder-blocks-and-partition): Same.
2557
2558 2018-04-09 Jan Hubicka <jh@suse.cz>
2559
2560 PR rtl/84058
2561 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
2562 jumps; choose last target that matches the criteria (i.e.
2563 no partition changes for non-crossing jumps).
2564 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
2565 support for redirecting crossing jumps to non-crossing.
2566
2567 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
2568
2569 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
2570 also for naked functions.
2571
2572 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
2573
2574 * config/arc/arc.md (add_shift): New pattern.
2575 (add_shift2): Likewise.
2576 (sub_shift): Likewise.
2577 (sub_shift_cmp0_noout): Likewise.
2578 (compare_si_ashiftsi): Likewise.
2579 (xbfu_cmp0_noout): New combine pattern.
2580 (xbfu_cmp0"): Likewise.
2581 (movsi_set_cc_insn): Place the predicable variant first.
2582 (commutative_binary_cmp0_noout): Remove clobber.
2583 (commutative_binary_cmp0): New pattern.
2584 (noncommutative_binary_cmp0): Likewise.
2585 (noncommutative_binary_cmp0_noout): Likewise.
2586 (noncommutative_binary_comparison_result_used): Removed.
2587 (rsub_cmp0): New pattern.
2588 (rsub_cmp0_noout): Likewise.
2589 (extzvsi): Changed, keep only meaningful variants.
2590 (SQH, SEZ): New iterators.
2591 (SQH_postfix): New mode attribute.
2592 (SEZ_prefix): New code attribute.
2593 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
2594 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
2595 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
2596 of numerical value.
2597 (noncommutative_operator): Check the availability of barrel
2598 shifter option.
2599
2600 2018-04-09 Richard Biener <rguenther@suse.de>
2601
2602 PR tree-optimization/85284
2603 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
2604 Only use the niter constraining form of simple_iv when the exit
2605 is always executed.
2606
2607 2018-04-09 Tom de Vries <tom@codesourcery.com>
2608
2609 PR target/84041
2610 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
2611 (define_expand "*memory_barrier"): New define_expand.
2612 (define_insn "memory_barrier"): New insn.
2613
2614 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
2615
2616 PR rtl-optimization/80463
2617 PR rtl-optimization/83972
2618 PR rtl-optimization/83480
2619
2620 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
2621 correct producer for the insn.
2622 (tidy_control_flow): Fixup seqnos in case of debug insns.
2623
2624 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
2625
2626 PR rtl-optimization/83913
2627
2628 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
2629 different sched-times when merging exprs.
2630
2631 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
2632
2633 PR rtl-optimization/83962
2634
2635 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
2636 tidy_fallthru_edge and tidy_control_flow.
2637
2638 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
2639
2640 PR rtl-optimization/83530
2641
2642 * sel-sched.c (force_next_insn): New global variable.
2643 (remove_insn_for_debug): When force_next_insn is true, also leave only
2644 next insn in the ready list.
2645 (sel_sched_region): When the region wasn't scheduled, make another pass
2646 over it with force_next_insn set to 1.
2647
2648 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
2649
2650 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
2651 into tm_file.
2652 * config/nds32/constants.md (unspec_volatile_element): Add enum values
2653 for interrupt control.
2654 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
2655 functions for interrupt control.
2656 * config/nds32/nds32-intrinsic.md: Likewise.
2657 * config/nds32/nds32_intrinsic.h: Likewise.
2658 * config/nds32/nds32.h (nds32_builtins): Likewise.
2659
2660 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
2661
2662 * config/nds32/nds32.c (nds32_init_machine_status,
2663 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
2664 strict_aligned_p field.
2665 (nds32_expand_to_rtl_hook): New function.
2666 (TARGET_EXPAND_TO_RTL_HOOK): Define.
2667 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
2668
2669 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
2670 Chung-Ju Wu <jasonwucj@gmail.com>
2671
2672 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
2673 * config/nds32/nds32-n7.md: New file.
2674 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
2675 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
2676 pipeline.
2677 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
2678 * config/nds32/nds32.md (pipeline_model): Add n7.
2679 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
2680 * config/nds32/pipelines.md: Include n7 settings.
2681
2682 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
2683 Chung-Ju Wu <jasonwucj@gmail.com>
2684
2685 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
2686 * config/nds32/nds32-e8.md: New file.
2687 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
2688 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
2689 pipeline.
2690 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
2691 * config/nds32/nds32.md (pipeline_model): Add e8.
2692 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
2693 * config/nds32/pipelines.md: Include e8 settings.
2694
2695 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
2696 Chung-Ju Wu <jasonwucj@gmail.com>
2697
2698 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
2699 * config/nds32/nds32-n8.md: New file.
2700 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
2701 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
2702 pipeline.
2703 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
2704 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
2705 * config/nds32/nds32.md (pipeline_model): Add n8.
2706 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
2707 * config/nds32/pipelines.md: Include n8 settings.
2708
2709 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
2710 Chung-Ju Wu <jasonwucj@gmail.com>
2711
2712 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
2713 * config/nds32/nds32-n9-2r1w.md: New file.
2714 * config/nds32/nds32-n9-3r2w.md: New file.
2715 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
2716 nds32_register_ports): New or modify for cpu n9.
2717 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
2718 pipeline.
2719 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
2720 * config/nds32/nds32-utils.c: New file.
2721 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
2722 TARGET_MUL_SLOW): Define.
2723 * config/nds32/nds32.md (pipeline_model): New attribute.
2724 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
2725 New options that support cpu n9.
2726 * config/nds32/pipelines.md: Include n9 settings.
2727 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
2728
2729 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
2730
2731 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
2732 information if necessary.
2733 (output_cond_branch_compare_zero): Likewise.
2734 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
2735 (nds32_target_alignment): Refine for alignment.
2736 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
2737 (FUNCTION_BOUNDARY): Modify.
2738 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
2739 align case.
2740 * config/nds32/nds32.opt (malways-align, malign-functions): New.
2741
2742 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
2743
2744 * config/nds32/constants.md (unspec_volatile_element): Add values for
2745 TLB operation and data prefetch.
2746 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
2747 functions for TLB operation and data prefetch.
2748 * config/nds32/nds32-intrinsic.md: Likewise.
2749 * config/nds32/nds32_intrinsic.h: Likewise.
2750 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
2751 (nds32_print_operand): Likewise.
2752 * config/nds32/nds32.h (nds32_builtins): Likewise.
2753
2754 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
2755 Andrew Pinski <pinsika@gcc.gnu.org>
2756
2757 PR middle-end/82976
2758 * match.pd: Use constant_boolean_node of correct type instead of
2759 boolean_true_node or boolean_false_node for simplifying
2760 pointer comparisons to zero.
2761
2762 2018-04-07 Jakub Jelinek <jakub@redhat.com>
2763
2764 PR tree-optimization/80021
2765 * tree.c (verify_type_variant): Make error call in verify_variant_match
2766 translatable and remove final full stop.
2767
2768 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
2769
2770 * config/nds32/constants.md (unspec_volatile_element): Add
2771 UNSPEC_VOLATILE_EH_RETURN.
2772 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
2773 nds32_output_stack_pop): Support dwarf exception handling process.
2774 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
2775 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
2776 exception handling process.
2777 (nds32_compute_stack_frame): Likewise.
2778 (nds32_return_addr_rtx): Likewise.
2779 (nds32_initial_elimination_offset): Likewise.
2780 (nds32_expand_prologue): Likewise.
2781 (nds32_expand_epilogue): Likewise.
2782 (nds32_dynamic_chain_address): New function.
2783 * config/nds32/nds32.h (machine_function): Add fields for dwarf
2784 exception handling.
2785 (DYNAMIC_CHAIN_ADDRESS): Define.
2786 (EH_RETURN_DATA_REGNO): Define.
2787 (EH_RETURN_STACKADJ_RTX): Define.
2788 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
2789 patterns for dwarf exception handling.
2790
2791 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
2792
2793 * config/nds32/nds32.h: Clean up obsolete macros.
2794
2795 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
2796
2797 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
2798 Add enum values for particular instructions.
2799 * config/nds32/nds32-intrinsic.c: Implementation of expanding
2800 particular intrinsic functions.
2801 * config/nds32/nds32-intrinsic.md: Likewise.
2802 * config/nds32/nds32_intrinsic.h: Likewise.
2803 * config/nds32/nds32.h (nds32_builtins): Likewise.
2804 * config/nds32/nds32.md (type): Add pbsad and pbsada.
2805 (btst, ave): New patterns for particular instructions.
2806
2807 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
2808
2809 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
2810 Add enum values for atomic load/store and memory sync.
2811 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
2812 and memory sync.
2813 * config/nds32/nds32-intrinsic.md: Likewise.
2814 * config/nds32/nds32_intrinsic.h: Likewise.
2815 * config/nds32/nds32.h (nds32_builtins): Likewise.
2816
2817 2018-04-07 Jakub Jelinek <jakub@redhat.com>
2818
2819 PR tree-optimization/85257
2820 * fold-const.c (native_encode_vector): If not all elts could fit
2821 and off is -1, return 0 rather than offset.
2822 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
2823 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
2824 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
2825 adjust buffer in native_interpret_expr call.
2826
2827 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
2828
2829 * config/nds32/constants.md (unspec_volatile_element): Add cache
2830 control enum values.
2831 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
2832 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
2833 * config/nds32/nds32.c (nds32_cctl_names): New.
2834 (nds32_print_operand): Handle cache control register names.
2835 * config/nds32/nds32.h (nds32_builtins): New enum values.
2836 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
2837 macros.
2838 * config/nds32/nds32.md (type): Add mmu.
2839 * config/nds32/pipelines.md (simple_insn): Add mmu.
2840
2841 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
2842
2843 * config/nds32/nds32.md (type): Remove call.
2844 * config/nds32/pipelines.md (simple_insn): Likewise.
2845
2846 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
2847
2848 * config/nds32/constants.md (unspec_volatile_element): Add
2849 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
2850 UNSPEC_VOLATILE_FMFCFG.
2851 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
2852 description for fmfcfg and fmfcsr.
2853 (bdesc_1arg): Add fmtcsr.
2854 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
2855 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
2856 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
2857 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
2858 unspec_fmfcfg): New patterns.
2859 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
2860 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
2861 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
2862 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
2863 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
2864 __nds32__fmfcfg): Define.
2865
2866 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
2867
2868 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
2869 intrinsic register names.
2870 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
2871 intrinsic register enum values and macros.
2872
2873 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
2874
2875 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
2876 for load/store addressing form.
2877 (nds32_print_operand_address): Likewise.
2878
2879 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
2880
2881 PR target/85196
2882 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
2883 based on LABEL_REF. Remove useless assertion.
2884 (pic_address_needs_scratch): Fix formatting.
2885 (sparc_legitimize_pic_address): Minor tweaks.
2886 (sparc_delegitimize_address): Adjust assertion accordingly.
2887 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
2888 into symbolic_operand.
2889 (movsi_high_pic_label_ref): Likewise.
2890 (movsi_lo_sum_pic_label_ref): Likewise.
2891 (movdi_pic_label_ref): Likewise.
2892 (movdi_high_pic_label_ref): Likewise.
2893 (movdi_lo_sum_pic_label_ref): Likewise.
2894
2895 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
2896
2897 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
2898 custom LIB_SPEC setup.
2899
2900 2018-04-06 Ruslan Bukin <br@bsdpad.com>
2901 Kito Cheng <kito.cheng@gmail.com>
2902
2903 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
2904 * config/riscv/freebsd.h: New.
2905
2906 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
2907
2908 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
2909 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
2910 file.
2911
2912 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
2913 Kito Cheng <kito.cheng@gmail.com>
2914
2915 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
2916 nds32_output_call, nds32_symbol_binds_local_p): New functions.
2917 * config/nds32/nds32-protos.h (nds32_output_call,
2918 nds32_output_return): Declare.
2919 * config/nds32/nds32.md: Refine all the call and return patterns.
2920
2921 2018-04-06 Jakub Jelinek <jakub@redhat.com>
2922
2923 PR debug/85252
2924 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
2925 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
2926
2927 PR rtl-optimization/84872
2928 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
2929 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
2930 EDGE_CROSSING edge.
2931
2932 2018-04-06 Tamar Christina <tamar.christina@arm.com>
2933
2934 * expr.c (copy_blkmode_to_reg): Revert 254862.
2935 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
2936
2937 2018-04-06 Richard Biener <rguenther@suse.de>
2938
2939 PR middle-end/85244
2940 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
2941 after seeing a component reference with an adjacent field. Treat
2942 refs to arrays at struct end of external decls similar to
2943 refs to unconstrained commons.
2944
2945 2018-04-06 Jakub Jelinek <jakub@redhat.com>
2946
2947 PR sanitizer/85213
2948 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
2949 look through SAVE_EXPRs with non-side-effects argument. Adjust
2950 recursive calls.
2951 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
2952 save_p here.
2953
2954 2018-04-06 Richard Biener <rguenther@suse.de>
2955
2956 PR middle-end/85180
2957 * alias.c (find_base_term): New wrapper around find_base_term
2958 unwinding CSELIB_VAL_PTR changes.
2959 (find_base_term): Do not restore CSELIB_VAL_PTR during the
2960 recursion.
2961
2962 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
2963
2964 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
2965 instructions.
2966 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
2967 constant definitions.
2968 ("nop"): lr 0,0 -> nopr r0
2969 ("nop_lr0", "nop_lr1"): New insn definitions.
2970
2971 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
2972
2973 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
2974 NDS32_V3PUSH_AVAILABLE_P macro.
2975
2976 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
2977 Chung-Ju Wu <jasonwucj@gmail.com>
2978
2979 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
2980 (nds32*-*-*): Add float and fpu_config into supported_defaults.
2981 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
2982 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
2983 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
2984 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
2985 * config/nds32/constraints.md: New constraints and checking for hard
2986 float configuration.
2987 * config/nds32/iterators.md: New mode iterator and attribute for hard
2988 float configuration.
2989 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
2990 patterns.
2991 * config/nds32/nds32-fpu.md: New file.
2992 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
2993 deal with hard float code generation.
2994 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
2995 ARCH_V3S.
2996 (abi_type, float_reg_number): New enum type.
2997 * config/nds32/nds32-predicates.c: New predicates for hard float.
2998 * config/nds32/nds32-protos.h: Declare functions for hard float.
2999 * config/nds32/nds32.c: Implementation for hard float configuration.
3000 * config/nds32/nds32.h: Definitions for hard float configuration.
3001 * config/nds32/nds32.md: Include hard float machine description and
3002 modify patterns for hard float configuration.
3003 * config/nds32/nds32.opt: New options for hard float configuration.
3004 * config/nds32/predicates.md: New predicates for hard float
3005 configuration.
3006
3007 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3008
3009 * common/config/nds32/nds32-common.c
3010 (nds32_option_optimization_table): Enable -mreleax-hint by default.
3011
3012 2018-04-05 Jakub Jelinek <jakub@redhat.com>
3013
3014 PR middle-end/85195
3015 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
3016 CONSTRUCTOR_ELT (ctor, ...)->value.
3017
3018 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
3019
3020 PR target/85193
3021 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
3022
3023 2018-04-05 Tom de Vries <tom@codesourcery.com>
3024
3025 PR target/85204
3026 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
3027 cond jump.
3028
3029 2018-04-05 Shiva Chen <shiva0217@gmail.com>
3030 Kito Cheng <kito.cheng@gmail.com>
3031
3032 * config/nds32/constraints.md (U33): Fine-tune checking condition.
3033 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
3034 * config/nds32/nds32.h (nds32_16bit_address_type): Add
3035 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
3036
3037 2018-04-05 Shiva Chen <shiva0217@gmail.com>
3038 Kito Cheng <kito.cheng@gmail.com>
3039
3040 * config/nds32/constraints.md (Ufe): New memory constraint.
3041 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
3042 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
3043 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
3044 operands.
3045 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
3046 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
3047
3048 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3049
3050 * config/nds32/nds32.md: Use optimize_size in the condition for
3051 alu-shift instructions.
3052
3053 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3054
3055 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
3056
3057 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3058
3059 * config/nds32/nds32.md (negsi2): Refine pattern.
3060
3061 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
3062 Chung-Ju Wu <jasonwucj@gmail.com>
3063
3064 * config/nds32/iterators.md (shift_rotate): New code iterator.
3065 (shift): New code attribute.
3066 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
3067 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
3068 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
3069 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
3070 bit-wise operations.
3071 (andsi3, *andsi3): Ditto.
3072 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
3073 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
3074 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
3075 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
3076 nds32_ior_operand, nds32_xor_operand): New predicates.
3077
3078 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3079
3080 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
3081 (addsi3, subsi3): ... this.
3082
3083 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3084
3085 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
3086
3087 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3088
3089 * config/nds32/nds32.md: Adjust indention.
3090
3091 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
3092
3093 * config/nds32/nds32.md (feature): New attribute.
3094
3095 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
3096
3097 * config/nds32/nds32.md (subtype): New attribute.
3098
3099 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
3100
3101 PR target/85203
3102 * config/arm/arm-builtins.c (arm_expand_builtin): Change
3103 expansion to perform a bitwise AND of the argument followed by a
3104 boolean negation of the result.
3105
3106 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
3107
3108 PR rtl-optimization/84878
3109 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
3110 the basic block. Assert the use reference is not artificial and that
3111 it has an associated insn.
3112
3113 2018-04-04 Michael Matz <matz@suse.de>
3114
3115 * builtins.c (compute_objsize): Pass correct operand
3116 to array_at_struct_end_p.
3117
3118 2018-04-04 Richard Biener <rguenther@suse.de>
3119
3120 PR lto/85176
3121 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
3122 from contexts for DINFO_LEVEL_TERSE and below.
3123
3124 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
3125
3126 * config/nds32/nds32-doubleword.md (move_<mode>): Require
3127 resiter_operand condition.
3128 * config/nds32/nds32.md (*move<mode>): Ditto.
3129
3130 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
3131 Monk Chiang <sh.chiang04@gmail.com>
3132
3133 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
3134
3135 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
3136
3137 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
3138
3139 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
3140 Kito Cheng <kito.cheng@gmail.com>
3141
3142 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
3143 nds32_cond_code_str, output_cond_branch,
3144 output_cond_branch_compare_zero, nds32_expand_cbranch,
3145 nds32_expand_cstore, nds32_expand_movcc,
3146 nds32_output_cbranchsi4_equality_zero,
3147 nds32_output_cbranchsi4_equality_reg,
3148 nds32_output_cbranchsi4_equality_reg_or_const_int,
3149 nds32_output_cbranchsi4_greater_less_zero: New functions.
3150 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
3151 nds32_expand_cstore, nds32_expand_movcc,
3152 nds32_output_cbranchsi4_equality_zero,
3153 nds32_output_cbranchsi4_equality_reg,
3154 nds32_output_cbranchsi4_equality_reg_or_const_int,
3155 nds32_output_cbranchsi4_greater_less_zero): Declare.
3156 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
3157 nds32_rimm11s_operand): New predicates.
3158 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
3159 * config/nds32/nds32.md: Rewrite all the branch and conditional move
3160 patterns.
3161
3162 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
3163
3164 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
3165 * config/nds32/nds32.md: Ditto.
3166 * config/nds32/pipelines.md: Ditto.
3167
3168 2018-04-04 Richard Biener <rguenther@suse.de>
3169
3170 PR tree-optimization/85168
3171 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
3172 propagating abnormals.
3173
3174 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
3175
3176 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
3177
3178 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
3179 Kito Cheng <kito.cheng@gmail.com>
3180
3181 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
3182 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
3183 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
3184 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
3185 * config/nds32/nds32.md (sibcall_internal): New.
3186 (sibcall_register): Remove.
3187 (sibcall_immediate): Remove.
3188 (sibcall_value_internal): New.
3189 (sibcall_value_register): Remove.
3190 (sibcall_value_immediate): Remove.
3191 * config/nds32/predicates.md (nds32_general_register_operand): New.
3192 (nds32_call_address_operand): New.
3193
3194 2018-04-03 Jakub Jelinek <jakub@redhat.com>
3195
3196 PR rtl-optimization/85167
3197 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
3198 bb_defs if *split_p, instead preinitialize it to NULL.
3199
3200 PR tree-optimization/85156
3201 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
3202 evaluating the argument multiple times.
3203
3204 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
3205
3206 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
3207 than vector.
3208 (_mm_cvtpd_ps): Likewise.
3209 (_mm_cvttpd_epi32): Likewise.
3210 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
3211 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
3212 vector, pixel, and bool following altivec.h include.
3213
3214 2018-04-03 Martin Sebor <msebor@redhat.com>
3215
3216 * doc/extend.texi (Common Function Attributes): Clarify.
3217 (const attribute): Likewise.
3218 (pure attribute): Likewise.
3219
3220 2018-04-03 Jakub Jelinek <jakub@redhat.com>
3221
3222 PR target/85169
3223 * config/i386/i386.c (ix86_expand_vector_set): Use
3224 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
3225
3226 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
3227
3228 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
3229 instructions when changing rounding bits to preserve precision bits
3230 in the x87 control word.
3231
3232 2018-04-03 Martin Liska <mliska@suse.cz>
3233
3234 PR tree-optimization/82491
3235 * rtl.h (strip_offset_and_add): Replace += suboffset with
3236 poly_uint64 () + suboffset.
3237
3238 2018-03-29 Martin Liska <mliska@suse.cz>
3239 Martin Jambor <mjambor@suse.cz>
3240
3241 PR ipa/84947
3242 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
3243 param_type is not an integral or pointer type.
3244
3245 2018-04-03 Richard Biener <rguenther@suse.de>
3246
3247 * sese.h (recompute_all_dominators): Remove.
3248
3249 2018-04-02 Martin Sebor <msebor@redhat.com>
3250
3251 * doc/invoke.texi (-Wrestrict): Fix typos.
3252
3253 2018-04-02 Jim Wilson <jimw@sifive.com>
3254
3255 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
3256 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
3257 (<optab>di3, <optab>si3_extend): Likewise.
3258 (<optab>si3_mask, <optab>si3_mask_1): New.
3259 (<optab>di3_mask, <optab>di3_mask_1): New.
3260 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
3261 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
3262 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
3263
3264 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
3265
3266 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
3267 example.
3268
3269 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
3270
3271 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
3272 (nds32_canonicalize_comparison): New function.
3273
3274 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
3275 Kito Cheng <kito.cheng@gmail.com>
3276 Kuan-Lin Chen <kuanlinchentw@gmail.com>
3277
3278 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
3279 * config/nds32/constants.md (unspec_volatile_element): Add
3280 UNSPEC_VOLATILE_RELAX_GROUP.
3281 * config/nds32/nds32-relax-opt.c: New file.
3282 * config/nds32/nds32-predicates.c
3283 (nds32_symbol_load_store_p): New function.
3284 * config/nds32/nds32-protos.h
3285 (nds32_symbol_load_store_p): Declare function.
3286 (make_pass_nds32_relax_opt): Declare new rtl pass function.
3287 * config/nds32/nds32.c
3288 (nds32_register_pass): New function to register pass.
3289 (nds32_register_passes): New function to register passes.
3290 * config/nds32/nds32.md (relax_group): New pattern.
3291 * config/nds32/nds32.opt (mrelax-hint): New option.
3292 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
3293
3294 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
3295
3296 * config/nds32/t-nds32: Modify files dependency.
3297
3298 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
3299
3300 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
3301 (PROFILE_HOOK): Define its implementation.
3302
3303 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
3304
3305 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
3306 type and 32-bit size.
3307
3308 2018-04-01 Jakub Jelinek <jakub@redhat.com>
3309
3310 PR middle-end/85090
3311 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
3312 (V_128_256): New mode iterator.
3313 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
3314 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
3315 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
3316 of V.
3317 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
3318 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
3319
3320 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
3321
3322 PR target/83315
3323 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
3324 NaN inputs correctly.
3325
3326 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
3327
3328 PR target/80546
3329 * config/rs6000/vsx.md (??r): New mode attribute.
3330 (*vsx_mov<mode>_64bit): Use it.
3331 (*vsx_mov<mode>_32bit): Likewise.
3332
3333 2018-03-30 Martin Sebor <msebor@redhat.com>
3334
3335 PR tree-optimization/84818
3336 * builtins.c (check_access): Use warning_n.
3337
3338 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
3339
3340 PR target/83822
3341 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
3342 condition.
3343 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
3344 condition.
3345
3346 2018-03-30 Julia Koval <julia.koval@intel.com>
3347
3348 PR target/84413
3349 * x86-tune.def (movx, partial_reg_dependency): Enable for
3350 m_SKYLAKE_AVX512.
3351
3352 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
3353
3354 PR inline-asm/84985
3355 * lra-constraints.c (process_alt_operands): Move setting
3356 this_alternative_matches below.
3357
3358 2018-03-29 Martin Liska <mliska@suse.cz>
3359
3360 PR lto/84995.
3361 * doc/invoke.texi: Document how LTO works with debug info.
3362 Describe auto-load support of binutils. Mention 'x86-64'
3363 as valid option value of -march option.
3364
3365 2018-03-29 Jakub Jelinek <jakub@redhat.com>
3366
3367 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
3368
3369 PR c/85094
3370 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
3371 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
3372 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
3373 checking.
3374
3375 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
3376
3377 PR target/84912
3378 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
3379 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
3380 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
3381 for RS6000_BTM_POWERPC64.
3382 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
3383 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
3384 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
3385 definition.
3386 (DIVDE): Use it.
3387 (DIVDEU): Likewise.
3388
3389 2018-03-28 Carl Love <cel@us.ibm.com>
3390
3391 Revert
3392 2017-09-27 Carl Love <cel@us.ibm.com>
3393
3394 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
3395 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
3396 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
3397 fctiw instruction.
3398
3399 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
3400
3401 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
3402 instead of __vector bool.
3403 (_mm_max_pu8): Likewise.
3404 (_mm_min_pi16): Likewise.
3405
3406 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
3407
3408 PR target/84912
3409 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
3410 (DIVWEUO): Likewise.
3411 (DIVDEO): Likewise.
3412 (DIVDEUO): Likewise.
3413 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
3414 DIVWEUO and DIVDEUO.
3415 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
3416 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
3417 (div_extend): Likewise.
3418 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
3419 builtin function.
3420 (__builtin_divweuo): Likewise.
3421 (__builtin_divdeo): Likewise.
3422 (__builtin_divdeuo): Likewise.
3423
3424 2018-03-28 Jakub Jelinek <jakub@redhat.com>
3425
3426 PR target/85095
3427 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
3428 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
3429
3430 PR tree-optimization/82004
3431 * gimple-match-head.c (optimize_pow_to_exp): New function.
3432 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
3433 Don't fold to exp if optimize_pow_to_exp is false.
3434
3435 2018-03-28 Martin Liska <mliska@suse.cz>
3436
3437 PR other/84819
3438 * calls.c (initialize_argument_information): Fix trailing space.
3439 * common.opt: Fix typo and provide better explanation for
3440 -fsanitize-coverage option.
3441 * config/i386/i386.opt: Fix typo.
3442
3443 2018-03-28 Jakub Jelinek <jakub@redhat.com>
3444 Martin Liska <mliska@suse.cz>
3445
3446 PR sanitizer/85081
3447 * gimplify.c (asan_poison_variable): Don't do the check for
3448 gimplify_omp_ctxp here.
3449 (gimplify_decl_expr): Do it here.
3450 (gimplify_target_expr): Likewise.
3451
3452 2018-03-28 Martin Liska <mliska@suse.cz>
3453
3454 PR target/84988
3455 * config/i386/i386.c (ix86_function_arg_advance): Do not call
3456 chkp_type_bounds_count if MPX is not enabled.
3457
3458 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
3459
3460 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
3461
3462 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
3463
3464 PR target/84914
3465 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
3466 function to create the function decl for complex long double
3467 multiply and divide for -mabi=ieeelongdouble.
3468 (init_float128_ieee): Call it.
3469
3470 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
3471
3472 PR target/85044
3473 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
3474 -fcf-protection=branch -mibt.
3475 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
3476
3477 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3478
3479 PR target/81863
3480 * config/arm/arm.c (arm_valid_symbolic_address): Handle arm_word_relocations
3481
3482 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
3483
3484 PR target/85056
3485 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
3486 extern array declarations.
3487
3488 2018-03-27 Richard Biener <rguenther@suse.de>
3489
3490 PR middle-end/84067
3491 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
3492 explicit single_use checks.
3493
3494 2018-03-27 Richard Biener <rguenther@suse.de>
3495
3496 PR tree-optimization/85082
3497 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
3498 Valueize the VUSE.
3499
3500 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3501
3502 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
3503 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
3504 Turn on fasynchronous-unwind-tables and funwind-tables.
3505
3506 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
3507
3508 PR target/85073
3509 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
3510 (*bmi_blsr_<mode>_ccz): Ditto.
3511
3512 2018-03-26 Tom de Vries <tom@codesourcery.com>
3513
3514 PR tree-optimization/85063
3515 * omp-general.c (offloading_function_p): New function. Factor out
3516 of ...
3517 * omp-offload.c (pass_omp_target_link::gate): ... here.
3518 * omp-general.h (offloading_function_p): Declare.
3519 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
3520 with attribute omp declare target for offloading functions.
3521
3522 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
3523
3524 PR tree-optimization/84005
3525 * tree-data-ref.h (get_base_for_alignment): Declare.
3526 * tree-data-ref.c (get_base_for_alignment_1): New function.
3527 (get_base_for_alignment): Likewise.
3528 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
3529 get_base_for_alignment to find a suitable base object, instead
3530 of always using drb->base_address.
3531
3532 2018-03-23 Jakub Jelinek <jakub@redhat.com>
3533
3534 PR inline-asm/85022
3535 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
3536 known size by default.
3537
3538 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
3539
3540 PR inline-asm/85030
3541 * lra-constraints.c (process_alt_operands): Don't match BLKmode
3542 and non BLKmode operands.
3543
3544 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3545
3546 PR target/85026
3547 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
3548 Clean up attributes.
3549
3550 2018-03-23 Richard Biener <rguenther@suse.de>
3551
3552 PR debug/85020
3553 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
3554 we are going to emit early debug for LTO.
3555
3556 2018-03-23 Jakub Jelinek <jakub@redhat.com>
3557
3558 PR inline-asm/85034
3559 * function.c (match_asm_constraints_1): Don't optimize if input
3560 doesn't satisfy general_operand predicate for output's mode.
3561
3562 PR inline-asm/85022
3563 * alias.c (write_dependence_p): Don't require for x_canonicalized
3564 non-VOIDmode if x has VOIDmode.
3565
3566 PR sanitizer/85029
3567 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
3568 just don't try to optimize it rather than assert it never happens.
3569
3570 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
3571
3572 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
3573 macro expansions for definition of ST_INTERNAL_<mode> and
3574 LD_INTERNAL_<mode> builtins.
3575 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
3576 Remove prototype.
3577 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
3578 function.
3579 (altivec_expand_st_builtin): Likewise.
3580 (altivec_expand_builtin): Remove calls to deleted functions.
3581 (rs6000_address_for_altivec): Delete this function.
3582 * config/rs6000/vector.md: Remove expands for
3583 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
3584
3585 2018-03-22 Sudakshina Das <sudi.das@arm.com>
3586
3587 PR target/84826
3588 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
3589 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
3590 re-computing once computed.
3591 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
3592 (arm_init_machine_status): Initialize
3593 machine->static_chain_stack_bytes.
3594
3595 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
3596
3597 PR target/84760
3598 * doc/extend.texi: Add four new prototypes for vec_ld.
3599 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
3600 definitions for more logical presentation.
3601 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
3602 entries for V1TI variants of __builtin_altivec_ld builtin.
3603 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
3604 handling of V1TI variant of LVX icode pattern.
3605 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
3606 (rs6000_gimple_fold_builtin): Likewise.
3607 (altivec_init_builtins): Add code to define
3608 __builtin_altivec_lvx_v1ti function.
3609
3610 2018-03-22 Jakub Jelinek <jakub@redhat.com>
3611
3612 PR inline-asm/84941
3613 * function.c (match_asm_constraints_1): Don't do the optimization
3614 if input isn't a REG, SUBREG, MEM or constant.
3615
3616 2018-03-22 Tom de Vries <tom@codesourcery.com>
3617
3618 PR tree-optimization/84956
3619 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
3620 bb_has_abnormal_pred.
3621
3622 2018-03-22 Jakub Jelinek <jakub@redhat.com>
3623
3624 PR sanitizer/85018
3625 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
3626 DECL_INITIAL (decl) to decl at the end.
3627 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
3628 adjust the comment.
3629
3630 2018-03-21 Joseph Myers <joseph@codesourcery.com>
3631
3632 * doc/extend.texi (__builtin_tgmath): Document when complex
3633 integer types are treated as _Complex _Float64.
3634
3635 2018-03-21 Tom de Vries <tom@codesourcery.com>
3636
3637 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
3638
3639 2018-03-21 Jakub Jelinek <jakub@redhat.com>
3640
3641 PR tree-optimization/84960
3642 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
3643 if it is ENTRY block, move them into single succ of ENTRY in that case.
3644
3645 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
3646
3647 PR tree-optimization/84811
3648 * poly-int.h (poly_span_traits): Remove the T3 parameter and
3649 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
3650 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
3651 (known_subrange_p): Update accordingly. Cast each value involved
3652 in the size comparison, rather than casting the result of the
3653 subtraction.
3654
3655 2018-03-21 Jakub Jelinek <jakub@redhat.com>
3656
3657 PR tree-optimization/84982
3658 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
3659 by flipping the least significant bit rather than all bits from
3660 bitpos to bitpos + bitsize - 1.
3661
3662 2018-03-21 Nathan Sidwell <nathan@acm.org>
3663
3664 * doc/extend.texi (Deprecated Features): Remove mention of
3665 long-deleted deprecations.
3666
3667 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3668
3669 PR jit/84288
3670 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
3671 * configure: Regenerate.
3672
3673 2018-03-21 Tom de Vries <tom@codesourcery.com>
3674
3675 PR tree-optimization/83126
3676 * tree-parloops.c (num_phis): New function.
3677 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
3678
3679 2018-03-21 Nathan Sidwell <nathan@acm.org>
3680
3681 * doc/extend.texi (Deprecated Features): Update deprecated flags,
3682 mention anon-struct/union members and trailing attributes.
3683
3684 2018-03-21 Bin Cheng <bin.cheng@arm.com>
3685
3686 PR tree-optimization/84969
3687 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
3688 builtin memset partitions if they set different rhs values.
3689
3690 2018-03-21 Jakub Jelinek <jakub@redhat.com>
3691
3692 PR rtl-optimization/84989
3693 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
3694 VEC_DUPLICATE with scalar result mode.
3695
3696 2018-03-21 Martin Liska <mliska@suse.cz>
3697
3698 PR ipa/84963
3699 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
3700 not intended return statement.
3701
3702 2018-03-21 Martin Liska <mliska@suse.cz>
3703
3704 PR target/84988
3705 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
3706 (chkp_find_bound_slots_1): Limit number of iterations.
3707
3708 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
3709
3710 PR target/84838
3711 * Minor grammar fixes for x86 options.
3712
3713 2018-03-20 Jakub Jelinek <jakub@redhat.com>
3714
3715 PR debug/84875
3716 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
3717 holding REG_CFA_RESTORE notes, instead turn them into a USE.
3718
3719 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
3720
3721 PR target/83789
3722 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
3723 (altivec_lvx_<mode>_1op): Likewise.
3724 (altivec_stvx_<mode>_2op): Likewise.
3725 (altivec_stvx_<mode>_1op): Likewise.
3726 (altivec_lvx_<VM2:mode>): New define_expand.
3727 (altivec_stvx_<VM2:mode>): Likewise.
3728 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
3729 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
3730 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
3731 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
3732 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
3733 (rs6000_gen_lvx): Likewise.
3734 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
3735 (altivec_expand_stv_builtin): Likewise.
3736 (altivec_expand_builtin): Likewise.
3737 * config/rs6000/vector.md: Likewise.
3738
3739 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
3740
3741 PR target/82518
3742 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
3743 BYTES_BIG_ENDIAN.
3744
3745 2018-03-20 Richard Biener <rguenther@suse.de>
3746
3747 PR target/84986
3748 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
3749 sign-conversions as zero, fall back to standard scalar_stmt
3750 cost for the rest.
3751
3752 2018-03-20 Martin Liska <mliska@suse.cz>
3753
3754 PR ipa/84825
3755 * predict.c (rebuild_frequencies): Handle case when we have
3756 PROFILE_ABSENT, but flag_guess_branch_prob is false.
3757
3758 2018-03-20 Jakub Jelinek <jakub@redhat.com>
3759
3760 PR target/84990
3761 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
3762 flag_section_anchors.
3763 * varasm.c (use_blocks_for_decl_p): Remove hack for
3764 dw2_force_const_mem.
3765
3766 PR target/84845
3767 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
3768 to ...
3769 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
3770 be created, use lowpart_subreg of operands[0] rather than operands[0]
3771 itself.
3772 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
3773 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
3774 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
3775 and n constraint instead of aarch64_shift_imm_di and Usd.
3776 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
3777 (*aarch64_<optab>_reg_minus<mode>3): ... this.
3778
3779 2018-03-20 Sudakshina Das <sudi.das@arm.com>
3780
3781 PR target/82989
3782 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
3783 to favor GPR over NEON registers.
3784 (<shift>di3_neon): Likewise.
3785
3786 2018-03-20 Tom de Vries <tom@codesourcery.com>
3787
3788 PR target/84952
3789 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
3790 (nvptx_process_pars): Emit bar.sync asap and alap.
3791
3792 2018-03-20 Tom de Vries <tom@codesourcery.com>
3793
3794 PR target/84954
3795 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
3796 seen_label if seen_label is already set.
3797
3798 2018-03-20 Jakub Jelinek <jakub@redhat.com>
3799
3800 PR target/84945
3801 * config/i386/i386.c (fold_builtin_cpu): For features above 31
3802 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
3803 Use 1U instead of 1. Formatting fixes.
3804
3805 PR c/84953
3806 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
3807 instead of TREE_TYPE (s1) for the return value.
3808
3809 2018-03-19 Jakub Jelinek <jakub@redhat.com>
3810
3811 PR tree-optimization/84946
3812 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
3813 bitsize + bitsize in poly_uint64 rather than poly_int64.
3814
3815 PR sanitizer/78651
3816 * dwarf2asm.c: Include fold-const.c.
3817 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
3818 of decl rather than decl itself.
3819
3820 PR rtl-optimization/84643
3821 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
3822
3823 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
3824
3825 PR sanitizer/78651
3826 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
3827 calling assemble_variable.
3828
3829 2018-03-19 Sudakshina Das <sudi.das@arm.com>
3830
3831 PR target/81647
3832 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
3833 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
3834
3835 2018-03-19 Jim Wilson <jimw@sifive.com>
3836
3837 PR bootstrap/84856
3838 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
3839 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
3840 (riscv_first_stack_step): Likewise.
3841 (riscv_option_override): Use STACK_BOUNDARY instead of
3842 MIN_STACK_BOUNDARY.
3843 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
3844 MIN_STACK_BOUNDARY.
3845 (BIGGEST_ALIGNMENT): Set to 128.
3846 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
3847 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
3848 STACK_BOUNDARY.
3849
3850 2018-03-19 Richard Biener <rguenther@suse.de>
3851
3852 PR tree-optimization/84933
3853 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
3854 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
3855
3856 2018-03-19 Richard Biener <rguenther@suse.de>
3857
3858 PR tree-optimization/84859
3859 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
3860 (cond_if_else_store_replacement): Perform sinking operation on
3861 single-store BBs regardless of MAX_STORES_TO_SINK setting.
3862 Generalize what a BB with a single eligible store is.
3863
3864 2018-03-19 Richard Biener <rguenther@suse.de>
3865
3866 PR tree-optimization/84929
3867 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
3868 chrec_is_positive against non-chrec arg.
3869
3870 2018-03-19 Tamar Christina <tamar.christina@arm.com>
3871
3872 PR target/84711
3873 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
3874
3875 2018-03-18 Martin Liska <mliska@suse.cz>
3876
3877 PR rtl-optimization/84635
3878 * regrename.c (build_def_use): Use matches_mode only when
3879 matches >= 0.
3880
3881 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
3882
3883 PR tree-optimization/84913
3884 * tree-vect-loop.c (vectorizable_reduction): Don't try to
3885 vectorize chains of COND_EXPRs.
3886
3887 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
3888
3889 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
3890
3891 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
3892
3893 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
3894
3895 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
3896
3897 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
3898
3899 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
3900 Kito Cheng <kito.cheng@gmail.com>
3901
3902 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
3903 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
3904 (nds32_adjust_reg_alloc_order): New function.
3905 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
3906
3907 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
3908
3909 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
3910 nds32_print_operand, nds32_print_operand_address): Use
3911 HOST_WIDE_INT_PRINT_DEC instead.
3912
3913 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
3914
3915 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
3916
3917 2018-03-17 Jakub Jelinek <jakub@redhat.com>
3918
3919 PR target/84902
3920 * config/i386/i386.c (initial_ix86_tune_features,
3921 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
3922 unsigned long long.
3923 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
3924 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
3925 rather than 1u << ix86_tune. Formatting fix.
3926 (ix86_option_override_internal): Change ix86_arch_mask from
3927 unsigned int to unsigned HOST_WIDE_INT, initialize to
3928 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
3929 (ix86_function_specific_restore): Likewise.
3930
3931 2018-03-16 Jakub Jelinek <jakub@redhat.com>
3932
3933 PR target/84899
3934 * postreload.c (reload_combine_recognize_pattern): Perform
3935 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
3936 truncate_int_for_mode the result for the destination's mode.
3937
3938 PR c/84909
3939 * hsa-gen.c (mem_type_for_type): Fix comment typo.
3940 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
3941 Likewise.
3942 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
3943 Likewise.
3944
3945 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
3946
3947 PR target/84876
3948 * lra-assigns.c (lra_split_hard_reg_for): Don't use
3949 regno_allocno_class_array and sorted_pseudos.
3950 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
3951 insns where regno is used.
3952
3953 2018-03-16 Martin Liska <mliska@suse.cz>
3954
3955 PR ipa/84833
3956 * multiple_target.c (create_dispatcher_calls): Redirect
3957 reference in the symbol table.
3958
3959 2018-03-16 Martin Liska <mliska@suse.cz>
3960
3961 PR ipa/84722
3962 * multiple_target.c (create_dispatcher_calls): Redirect also
3963 an alias.
3964
3965 2018-03-16 Jakub Jelinek <jakub@redhat.com>
3966
3967 PR c++/79937
3968 PR c++/82410
3969 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
3970 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
3971 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
3972
3973 2018-03-16 Julia Koval <julia.koval@intel.com>
3974
3975 * doc/invoke.texi (Skylake Server): Add CLWB.
3976 Cannonlake): Remove CLWB.
3977
3978 2018-03-16 Jakub Jelinek <jakub@redhat.com>
3979
3980 PR tree-optimization/84841
3981 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
3982 1 << 3.
3983 (FLOAT_ONE_CONST_TYPE): Define.
3984 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
3985 (sort_by_operand_rank): Put entries with higher constant_type last
3986 rather than first to match comments.
3987
3988 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
3989
3990 * config/nios2/nios2.md (movsi_internal): Fix thinko in
3991 split predicate.
3992
3993 2018-03-15 Jakub Jelinek <jakub@redhat.com>
3994
3995 PR c++/79085
3996 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
3997 check and use address of target always.
3998
3999 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
4000
4001 PR target/84574
4002 * config/i386/i386.c (indirect_thunk_needed): Update comments.
4003 (indirect_thunk_bnd_needed): Likewise.
4004 (indirect_thunks_used): Likewise.
4005 (indirect_thunks_bnd_used): Likewise.
4006 (indirect_return_needed): New.
4007 (indirect_return_bnd_needed): Likewise.
4008 (output_indirect_thunk_function): Add a bool argument for
4009 function return.
4010 (output_indirect_thunk_function): Don't generate alias for
4011 function return thunk.
4012 (ix86_code_end): Call output_indirect_thunk_function to generate
4013 function return thunks.
4014 (ix86_output_function_return): Set indirect_return_bnd_needed
4015 and indirect_return_needed instead of indirect_thunk_bnd_needed
4016 and indirect_thunk_needed.
4017
4018 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
4019
4020 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
4021 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
4022 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
4023
4024 2018-03-15 David Malcolm <dmalcolm@redhat.com>
4025 Paul Hua <paul.hua.gm@gmail.com>
4026
4027 PR c/84852
4028 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
4029
4030 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
4031
4032 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
4033 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
4034 resp. SFmode cases.
4035
4036 2018-03-15 Tamar Christina <tamar.christina@arm.com>
4037
4038 PR target/84711
4039 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
4040 instead of GET_MODE_SIZE when comparing Units.
4041
4042 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
4043
4044 PR target/68256
4045 * varasm.c (hash_section): Return an unchangeble hash value
4046 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
4047 Return !aarch64_can_use_per_function_literal_pools_p ().
4048
4049 2018-03-15 Jakub Jelinek <jakub@redhat.com>
4050
4051 PR target/84860
4052 * optabs.c (emit_conditional_move): Pass address of cmode's copy
4053 rather than address of cmode as last argument to prepare_cmp_insn.
4054
4055 2018-03-15 Julia Koval <julia.koval@intel.com>
4056
4057 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
4058 F_AVX512VNNI, F_AVX512BITALG): New.
4059
4060 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
4061
4062 PR target/83451
4063 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
4064 insn for floating-point loads and stores.
4065
4066 2018-03-14 Carl Love <cel@us.ibm.com>
4067
4068 * config/rs6000/rs6000-c.c: Add macro definitions for
4069 ALTIVEC_BUILTIN_VEC_PERMXOR.
4070 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
4071 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
4072 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
4073 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
4074 UNSPEC_VPERMXOR.
4075 * config/doc/extend.texi: Add prototypes for vec_permxor.
4076
4077 2018-03-14 David Malcolm <dmalcolm@redhat.com>
4078
4079 PR c/84852
4080 * diagnostic-show-locus.c (class layout_point): Convert m_line
4081 from int to linenum_type.
4082 (line_span::comparator): Use linenum "compare" function when
4083 comparing line numbers.
4084 (test_line_span): New function.
4085 (layout_range::contains_point): Convert param "row" from int to
4086 linenum_type.
4087 (layout_range::intersects_line_p): Likewise.
4088 (layout::will_show_line_p): Likewise.
4089 (layout::print_source_line): Likewise.
4090 (layout::should_print_annotation_line_p): Likewise.
4091 (layout::print_annotation_line): Likewise.
4092 (layout::print_leading_fixits): Likewise.
4093 (layout::annotation_line_showed_range_p): Likewise.
4094 (struct line_corrections): Likewise for field m_row.
4095 (line_corrections::line_corrections): Likewise for param "row".
4096 (layout::print_trailing_fixits): Likewise.
4097 (layout::get_state_at_point): Likewise.
4098 (layout::get_x_bound_for_row): Likewise.
4099 (layout::print_line): Likewise.
4100 (diagnostic_show_locus): Likewise for locals "last_line" and
4101 "row".
4102 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
4103 * input.c (selftest::test_linenum_comparisons): New function.
4104 (selftest::input_c_tests): Call it.
4105 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
4106 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
4107 * selftest.h (ASSERT_GT): New macro.
4108 (ASSERT_GT_AT): New macro.
4109 (ASSERT_LT): New macro.
4110 (ASSERT_LT_AT): New macro.
4111
4112 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
4113
4114 PR rtl-optimization/84780
4115 * combine.c (distribute_links): Don't make a link based on pc_rtx.
4116
4117 2018-03-14 Martin Liska <mliska@suse.cz>
4118
4119 * tree.c (record_node_allocation_statistics): Use
4120 get_stats_node_kind.
4121 (get_stats_node_kind): New function extracted from
4122 record_node_allocation_statistics.
4123 (free_node): Use get_stats_node_kind.
4124
4125 2018-03-14 Richard Biener <rguenther@suse.de>
4126
4127 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
4128 that the value-set of ANTIC_IN doesn't grow.
4129
4130 Revert
4131 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
4132 member.
4133 (BB_VISITED_WITH_VISITED_SUCCS): New define.
4134 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
4135
4136 2018-03-14 Julia Koval <julia.koval@intel.com>
4137
4138 * config.gcc (icelake-client, icelake-server): New.
4139 (icelake): Remove.
4140 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
4141 (initial_ix86_arch_features): Ditto.
4142 (PTA_SKYLAKE): Add SGX.
4143 (PTA_ICELAKE): Remove.
4144 (PTA_ICELAKE_CLIENT): New.
4145 (PTA_ICELAKE_SERVER): New.
4146 (ix86_option_override_internal): Split up icelake on icelake client and
4147 icelake server.
4148 (get_builtin_code_for_version): Ditto.
4149 (fold_builtin_cpu): Ditto.
4150 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
4151 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
4152 * config/i386/i386.h (processor_type): Ditto.
4153 * doc/invoke.texi: Ditto.
4154
4155 2018-03-14 Jakub Jelinek <jakub@redhat.com>
4156
4157 PR sanitizer/83392
4158 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
4159 INTEGER_CST offset, add it together with bitpos / 8 and
4160 sign extend based on POINTER_SIZE.
4161
4162 PR target/84844
4163 Revert
4164 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
4165
4166 PR target/78090
4167 * config/i386/constraints.md (Yc): New register constraint.
4168 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
4169 Use Yc constraint for alternative 2 of operand 0. Remove
4170 preferred_for_speed attribute.
4171
4172 2018-03-14 Richard Biener <rguenther@suse.de>
4173
4174 PR tree-optimization/84830
4175 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
4176 with the old one to avoid oscillations.
4177
4178 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
4179
4180 PR target/83712
4181 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
4182 pseudos.
4183 (assign_by_spills): Return a flag of reload assignment failure.
4184 Do not process the reload assignment failures. Do not spill other
4185 reload pseudos if they has the same reg class. Update n if
4186 necessary.
4187 (lra_assign): Add a return arg. Set up from the result of
4188 assign_by_spills call.
4189 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
4190 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
4191 usage_insns if it is not NULL.
4192 (spill_hard_reg_in_range): New function.
4193 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
4194 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
4195 function prototypes.
4196 (lra_assign): Change prototype.
4197 * lra.c (lra): Add code to deal with fails by splitting hard reg
4198 live ranges.
4199
4200 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
4201
4202 * config/riscv/riscv.opt (mrelax): New option.
4203 * config/riscv/riscv.c (riscv_file_start): Emit ".option
4204 "norelax" when riscv_mrelax is disabled.
4205 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
4206
4207 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
4208
4209 PR target/84743
4210 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
4211 reassociation for int modes.
4212
4213 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
4214
4215 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
4216 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
4217 for big-endian.
4218 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
4219 * config/aarch64/aarch64-sve.md
4220 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
4221 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
4222 (*extend<mode><Vwide>2): Rename to...
4223 (aarch64_sve_extend<mode><Vwide>2): ...this.
4224 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
4225 renaming the old pattern to...
4226 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
4227 unsigned packs.
4228 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
4229 define_expand, renaming the old pattern to...
4230 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
4231 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
4232 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
4233 account when deciding which SVE instruction the optab should use.
4234 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
4235
4236 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
4237
4238 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
4239 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
4240 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
4241 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
4242 (tlsdesc_small_<mode>): Turn a define_expand and use
4243 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
4244 (tlsdesc_small_advsimd_<mode>): ...this.
4245 (tlsdesc_small_sve_<mode>): New pattern.
4246
4247 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
4248
4249 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
4250 (UNSPEC_UMUL_HIGHPART): New constants.
4251 (MUL_HIGHPART): New int iteraor.
4252 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
4253 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
4254 define_expand.
4255 (*<su>mul<mode>3_highpart): New define_insn.
4256
4257 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
4258
4259 PR lto/84805
4260 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
4261 incomplete types.
4262
4263 2018-03-13 Martin Liska <mliska@suse.cz>
4264
4265 PR ipa/84658.
4266 * (sem_item_optimizer::sem_item_optimizer): Initialize new
4267 vector.
4268 (sem_item_optimizer::~sem_item_optimizer): Release it.
4269 (sem_item_optimizer::merge_classes): Register variable aliases.
4270 (sem_item_optimizer::fixup_pt_set): New function.
4271 (sem_item_optimizer::fixup_points_to_sets): Likewise.
4272 * ipa-icf.h: Declare new variables and functions.
4273
4274 2018-03-13 Jakub Jelinek <jakub@redhat.com>
4275
4276 PR middle-end/84834
4277 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
4278 integer_pow2p@2 and test integer_pow2p in condition.
4279 (A < 0 ? C : 0): Similarly for @1.
4280
4281 PR middle-end/84831
4282 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
4283 characters starting at p contain '\0' character, don't look beyond
4284 that.
4285
4286 PR target/84827
4287 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
4288 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
4289
4290 PR target/84828
4291 * reg-stack.c (change_stack): Change update_end var from int to
4292 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
4293 also call set_block_for_insn on the newly added insns and rescan.
4294
4295 PR target/84786
4296 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
4297 on the last operand.
4298
4299 PR c++/84704
4300 * tree.c (stabilize_reference_1): Return save_expr (e) for
4301 STATEMENT_LIST even if it doesn't have side-effects.
4302
4303 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
4304
4305 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
4306
4307 2018-03-12 Renlin Li <renlin.li@arm.com>
4308
4309 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
4310 aarch64_output_scalar_simd_mov_immediate.
4311
4312 2018-03-12 Martin Sebor <msebor@redhat.com>
4313
4314 PR tree-optimization/83456
4315 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
4316 for perfectly overlapping calls to memcpy.
4317 (gimple_fold_builtin_memory_chk): Same.
4318 (gimple_fold_builtin_strcpy): Handle no-warning.
4319 (gimple_fold_builtin_stxcpy_chk): Same.
4320 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
4321
4322 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
4323
4324 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
4325 parameter. Use it for SFmode.
4326 (rs6000_function_arg_advance_1): Adjust.
4327 (rs6000_function_arg): Adjust.
4328 (rs6000_gimplify_va_arg): Pass false for that new parameter.
4329
4330 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
4331
4332 PR rtl-optimization/84169
4333 PR rtl-optimization/84780
4334 * combine.c (can_combine_p): Check for a 2-insn combination whether
4335 the destination register is used between the two insns, too.
4336
4337 2018-03-12 Richard Biener <rguenther@suse.de>
4338
4339 PR tree-optimization/84803
4340 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
4341 for refs DR analysis didn't process.
4342
4343 2018-03-12 Richard Biener <rguenther@suse.de>
4344
4345 PR tree-optimization/84777
4346 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
4347 force-vectorize loops ignore whether we are optimizing for size.
4348
4349 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
4350
4351 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
4352 (TARGET_MD_ASM_ADJUST): Define.
4353
4354 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
4355 Kito Cheng <kito.cheng@gmail.com>
4356 Chung-Ju Wu <jasonwucj@gmail.com>
4357
4358 * config/nds32/nds32.c (nds32_compute_stack_frame,
4359 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
4360 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
4361 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
4362 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
4363 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
4364 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
4365 * config/nds32/nds32.md (prologue, epilogue): Use macro
4366 NDS32_V3PUSH_AVAILABLE_P to do checking.
4367
4368 2018-03-11 Jakub Jelinek <jakub@redhat.com>
4369
4370 PR debug/58150
4371 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
4372 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
4373 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
4374 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
4375 addition of most attributes on !orig_type_die or the attribute not
4376 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
4377
4378 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
4379 Chung-Ju Wu <jasonwucj@gmail.com>
4380
4381 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
4382 __NDS32_VH__ macro.
4383 * config/nds32/nds32.opt (mvh): New option.
4384
4385 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
4386 Chung-Ju Wu <jasonwucj@gmail.com>
4387
4388 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
4389 function.
4390 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
4391 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
4392 definition.
4393
4394 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
4395 Chung-Ju Wu <jasonwucj@gmail.com>
4396
4397 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
4398 function.
4399 * config/nds32/nds32-multiple.md (strlensi): New pattern.
4400 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
4401
4402 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
4403 Kito Cheng <kito.cheng@gmail.com>
4404 Chung-Ju Wu <jasonwucj@gmail.com>
4405
4406 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
4407 UNSPEC_FFMISM and UNSPEC_FLMISM.
4408 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
4409 for ffb, ffmism and flmism.
4410 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
4411 (unspec_ffmism): Ditto.
4412 (unspec_flmism): Ditto.
4413 (nds32_expand_builtin_impl): Check if string extension is available.
4414 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
4415 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
4416
4417 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
4418
4419 Reverting patch:
4420 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
4421
4422 PR target/83712
4423 * lra-assigns.c (assign_by_spills): Return a flag of reload
4424 assignment failure. Do not process the reload assignment
4425 failures. Do not spill other reload pseudos if they has the same
4426 reg class.
4427 (lra_assign): Add a return arg. Set up from the result of
4428 assign_by_spills call.
4429 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
4430 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
4431 usage_insns if it is not NULL.
4432 (spill_hard_reg_in_range): New function.
4433 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
4434 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
4435 function prototypes.
4436 (lra_assign): Change prototype.
4437 * lra.c (lra): Add code to deal with fails by splitting hard reg
4438 live ranges.
4439
4440 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
4441
4442 PR target/84807
4443 * config/i386/i386.opt: Replace Enforcment with Enforcement.
4444
4445 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
4446
4447 PR debug/84620
4448 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
4449 (dw_val_node): Add val_symbolic_view.
4450 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
4451 (symview_upper_bound): New.
4452 (new_line_info_table): Initialize symviews_since_reset.
4453 (dwarf2out_source_line): Count symviews_since_reset and set
4454 symview_upper_bound.
4455 (dw_val_equal_p): Handle symview.
4456 (add_AT_symview): New.
4457 (print_dw_val): Handle symview.
4458 (attr_checksum, attr_checksum_ordered): Likewise.
4459 (same_dw_val_p, size_of_die): Likewise.
4460 (value_format, output_die): Likewise.
4461 (add_high_low_attributes): Use add_AT_symview for entry_view.
4462 (dwarf2out_finish): Reset symview_upper_bound, clear
4463 zero_view_p.
4464
4465 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
4466
4467 PR target/83969
4468 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
4469 Add strict argument and use it.
4470 (rs6000_split_multireg_move): Update for new strict argument.
4471 (mem_operand_gpr): Disallow all non-offsettable addresses.
4472 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
4473
4474 2018-03-09 Jakub Jelinek <jakub@redhat.com>
4475
4476 PR target/84772
4477 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
4478 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
4479 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
4480
4481 PR c++/84767
4482 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
4483 decl, use remap_type if we want to use the type.
4484
4485 2018-03-09 Martin Sebor <msebor@redhat.com>
4486
4487 PR tree-optimization/84526
4488 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
4489 Remove dead code.
4490 (builtin_access::generic_overlap): Be prepared to handle non-array
4491 base objects.
4492
4493 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
4494
4495 PR rtl-optimization/84682
4496 * lra-constraints.c (process_address_1): Check is_address flag
4497 for address constraints.
4498 (process_alt_operands): Likewise.
4499 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
4500 preprocess_constraints.
4501 * recog.h (preprocess_constraints): Add oploc parameter.
4502 Adjust callers.
4503 * recog.c (preprocess_constraints): Test address_operand for
4504 CT_ADDRESS constraints.
4505
4506 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
4507
4508 PR target/83712
4509 * lra-assigns.c (assign_by_spills): Return a flag of reload
4510 assignment failure. Do not process the reload assignment
4511 failures. Do not spill other reload pseudos if they has the same
4512 reg class.
4513 (lra_assign): Add a return arg. Set up from the result of
4514 assign_by_spills call.
4515 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
4516 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
4517 usage_insns if it is not NULL.
4518 (spill_hard_reg_in_range): New function.
4519 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
4520 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
4521 function prototypes.
4522 (lra_assign): Change prototype.
4523 * lra.c (lra): Add code to deal with fails by splitting hard reg
4524 live ranges.
4525
4526 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4527
4528 PR target/83193
4529 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
4530 Accept complain bool parameter. Only emit errors if it is true.
4531 (arm_parse_cpu_option_name): Likewise.
4532 (arm_target_thumb_only): Adjust callers of the above.
4533 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
4534 prototype to take a default true bool parameter.
4535 (arm_parse_arch_option_name): Likewise.
4536
4537 2018-03-09 David Malcolm <dmalcolm@redhat.com>
4538 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
4539
4540 PR jit/64089
4541 PR jit/84288
4542 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
4543 * configure: Regenerate.
4544 * configure.ac ("linker --version-script option"): New.
4545 ("linker soname option"): New.
4546
4547 2018-03-09 Richard Biener <rguenther@suse.de>
4548
4549 PR tree-optimization/84775
4550 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
4551 immediate uses of predicate stmts and mark them modified.
4552
4553 Revert
4554 PR tree-optimization/84178
4555 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
4556 to caller.
4557 (version_loop_for_if_conversion): Delay update_ssa call.
4558 (tree_if_conversion): Delay update_ssa until after predicate
4559 insertion.
4560
4561 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
4562
4563 PR target/84763
4564 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
4565 when the function accesses prior frames.
4566
4567 2018-03-08 Jakub Jelinek <jakub@redhat.com>
4568
4569 PR debug/84456
4570 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
4571 gen_llsym, otherwise call maybe_gen_llsym.
4572
4573 PR inline-asm/84742
4574 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
4575 has ',' character inside of it.
4576
4577 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4578
4579 PR target/84748
4580 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
4581 as clobbering CC_REGNUM.
4582
4583 2018-03-08 Richard Biener <rguenther@suse.de>
4584
4585 PR middle-end/84552
4586 * tree-scalar-evolution.c: Include tree-into-ssa.h.
4587 (follow_copies_to_constant): Do not follow SSA names registered
4588 for update.
4589
4590 2018-03-08 Richard Biener <rguenther@suse.de>
4591
4592 PR tree-optimization/84178
4593 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
4594 to caller.
4595 (version_loop_for_if_conversion): Delay update_ssa call.
4596 (tree_if_conversion): Delay update_ssa until after predicate
4597 insertion.
4598
4599 2018-03-08 David Malcolm <dmalcolm@redhat.com>
4600
4601 PR tree-optimization/84178
4602 * tree-if-conv.c (release_bb_predicate): Remove the
4603 the assertion that the stmts have NULL use_ops.
4604 Discard the statements, asserting that they haven't
4605 yet been added to a BB.
4606
4607 2018-03-08 Richard Biener <rguenther@suse.de>
4608
4609 PR tree-optimization/84746
4610 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
4611 (phi_translate): Pass in destination ANTIC_OUT set.
4612 (phi_translate_1): Likewise. For a simplified result lookup
4613 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
4614 (phi_translate_set): Adjust.
4615 (do_pre_regular_insertion): Likewise.
4616 (do_pre_partial_partial_insertion): Likewise.
4617
4618 2018-03-08 Martin Liska <mliska@suse.cz>
4619
4620 PR gcov-profile/84735
4621 * doc/gcov.texi: Document usage of profile files.
4622 * gcov-io.h: Document changes in the format.
4623
4624 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
4625
4626 PR debug/84404
4627 PR debug/84408
4628 * dwarf2out.c (struct dw_line_info_table): Update comments for
4629 view == -1.
4630 (FORCE_RESET_NEXT_VIEW): New.
4631 (FORCE_RESETTING_VIEW_P): New.
4632 (RESETTING_VIEW_P): Check for -1 too.
4633 (ZERO_VIEW_P): Likewise.
4634 (new_line_info_table): Force-reset next view.
4635 (dwarf2out_begin_function): Likewise.
4636 (dwarf2out_source_line): Simplify zero_view_p initialization.
4637 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
4638 view directly. Omit view when omitting .loc at line 0.
4639
4640 2018-03-08 Jakub Jelinek <jakub@redhat.com>
4641
4642 PR tree-optimization/84740
4643 * tree-switch-conversion.c (process_switch): Call build_constructors
4644 only if info.phi_count is non-zero.
4645
4646 PR tree-optimization/84739
4647 * tree-tailcall.c (find_tail_calls): Check call arguments against
4648 DECL_ARGUMENTS (current_function_decl) rather than
4649 DECL_ARGUMENTS (func) when checking for tail recursion.
4650
4651 2018-03-07 Jakub Jelinek <jakub@redhat.com>
4652
4653 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
4654 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
4655 Volker Reichelt's entry and add entries for people that perform
4656 GCC fuzzy testing and report numerous bugs.
4657
4658 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
4659
4660 PR target/82411
4661 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
4662 readonly data in sdata, if that is disabled.
4663 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
4664 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
4665 -mreadonly-in-sdata option.
4666
4667 2018-03-07 Martin Sebor <msebor@redhat.com>
4668
4669 PR tree-optimization/84468
4670 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
4671 basic block when looking for nul assignment.
4672
4673 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
4674
4675 PR target/84277
4676 * except.h (output_function_exception_table): Adjust prototype.
4677 * except.c (output_function_exception_table): Remove FNNAME parameter
4678 and add SECTION parameter. Ouput one part of the table at a time.
4679 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
4680 the first part of the exception table and emit unwind directives.
4681 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
4682 (i386_pe_seh_cold_init): Likewise.
4683 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
4684 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
4685 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
4686 (ix86_output_call_insn): Emit a nop in one more case for SEH.
4687 * config/i386/winnt.c: Include except.h.
4688 (struct seh_frame_state): Add reg_offset, after_prologue and
4689 in_cold_section fields.
4690 (i386_pe_seh_end_prologue): Set seh->after_prologue.
4691 (i386_pe_seh_cold_init): New function.
4692 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
4693 to seh->in_cold_section.
4694 (seh_emit_push): Record the offset of the push.
4695 (seh_emit_save): Record the offet of the save.
4696 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
4697 Test seh->after_prologue to disregard the epilogue.
4698 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
4699 (i386_pe_end_cold_function): New function.
4700
4701 2018-03-07 Jakub Jelinek <jakub@redhat.com>
4702
4703 PR fortran/84565
4704 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
4705 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
4706
4707 PR c++/84704
4708 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
4709 on tmp_var.
4710 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
4711 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
4712
4713 PR middle-end/84723
4714 * multiple_target.c: Include tree-inline.h and intl.h.
4715 (expand_target_clones): Diagnose and fail if node->definition and
4716 !tree_versionable_function_p (node->decl).
4717
4718 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
4719
4720 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
4721 sprint_ul.
4722 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
4723 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
4724 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
4725
4726 2018-03-06 Jakub Jelinek <jakub@redhat.com>
4727
4728 PR target/84710
4729 * combine.c (try_combine): Use reg_or_subregno instead of handling
4730 just paradoxical SUBREGs and REGs.
4731
4732 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
4733
4734 * config/arc/arc.c (arc_finalize_pic): Remove function.
4735 (arc_must_save_register): We use single base PIC register, remove
4736 checks to save/restore the PIC register.
4737 (arc_expand_prologue): Likewise.
4738 * config/arc/arc-protos.h (arc_set_default_type_attributes):
4739 Remove.
4740 (arc_verify_short): Likewise.
4741 (arc_attr_type): Likewise.
4742 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
4743 (walk_stores): Likewise.
4744 (arc_address_cost): Make it static.
4745 (arc_verify_short): Likewise.
4746 (branch_dest): Likewise.
4747 (arc_attr_type): Likewise.
4748 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
4749 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
4750 (arc_final_prescan_insn): Remove inserting the nops due to
4751 hardware hazards. It is done in reorg step.
4752 (insn_length_variant_t): Remove.
4753 (insn_length_parameters_t): Likewise.
4754 (arc_insn_length_parameters): Likewise.
4755 (arc_get_insn_variants): Likewise.
4756 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
4757
4758 2018-03-06 Jakub Jelinek <jakub@redhat.com>
4759
4760 PR inline-asm/84683
4761 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
4762 assertion failure.
4763
4764 PR tree-optimization/84687
4765 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
4766 on new_node->decl.
4767 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
4768
4769 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
4770
4771 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
4772 Rename to ppc_speculation_barrier.
4773 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
4774 __builtin_ppc_speculation_barrier.
4775
4776 2018-03-05 Jakub Jelinek <jakub@redhat.com>
4777
4778 PR target/84700
4779 * combine.c (combine_simplify_rtx): Don't try to simplify if
4780 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
4781 are equal to x.
4782
4783 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
4784
4785 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
4786 to 32 bytes when compiling for POWER9.
4787
4788 2018-03-05 Jakub Jelinek <jakub@redhat.com>
4789
4790 PR target/84564
4791 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
4792 regparm >= 3 with no arg reg available also for calls with
4793 flag_force_indirect_call. Pass decl to ix86_function_regparm.
4794
4795 PR target/84524
4796 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
4797 orig,vex.
4798 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
4799
4800 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
4801
4802 PR target/84264
4803 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
4804
4805 2018-03-05 Richard Biener <rguenther@suse.de>
4806
4807 PR tree-optimization/84486
4808 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
4809 When inserting a __builtin_assume_aligned call set the LHS
4810 SSA name alignment info accordingly.
4811
4812 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
4813
4814 PR tree-optimization/84114
4815 * config/aarch64/aarch64.c (aarch64_reassociation_width)
4816 Avoid reassociation of FLOAT_MODE addition.
4817
4818 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
4819
4820 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
4821 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
4822 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
4823 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
4824 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
4825 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
4826 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
4827 and -mwbnoinvd.
4828 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
4829 __builtin_ia32_wbinvd): New builtins.
4830 (SPECIAL_ARGS2): New.
4831 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
4832 (SPECIAL_ARGS2): New.
4833 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
4834 (ix86_valid_target_attribute_inner_p): Ditto.
4835 (ix86_init_mmx_sse_builtins): Add special_args2.
4836 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
4837 TARGET_WBNOINVD_P): New.
4838 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
4839 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
4840 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
4841 * config/i386/immintrin.h (_wbinvd): New intrinsic.
4842 * config/i386/pconfigintrin.h: New file.
4843 * config/i386/wbnoinvdintrin.h: Ditto.
4844 * config/i386/x86intrin.h: Add headers pconfigintrin.h and wbnoinvdintrin.h.
4845 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
4846
4847 2018-03-05 Richard Biener <rguenther@suse.de>
4848
4849 PR tree-optimization/84670
4850 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
4851 member.
4852 (BB_VISITED_WITH_VISITED_SUCCS): New define.
4853 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
4854 (compute_antic_aux): Only assert the number of values in ANTIC_IN
4855 doesn't grow if all successors (recursively) were visited at least
4856 once.
4857
4858 2018-03-05 Richard Biener <rguenther@suse.de>
4859
4860 PR tree-optimization/84650
4861 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
4862 if executed in the loop pipeline.
4863
4864 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
4865
4866 * doc/configfiles.texi (Configuration Files): Move info about
4867 conditionalizing $target-protos.h to...
4868 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
4869 differs from $target-protos.h.
4870
4871 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
4872 Chung-Ju Wu <jasonwucj@gmail.com>
4873
4874 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
4875 * config/nds32/nds32-multiple.md (setmemsi): Define.
4876 * config/nds32/nds32-memory-manipulation.c
4877 (nds32_gen_dup_4_byte_to_word_value): New.
4878 (emit_setmem_word_loop): New.
4879 (emit_setmem_byte_loop): New.
4880 (nds32_expand_setmem_loop): New.
4881 (nds32_expand_setmem_loop_v3m): New.
4882 (nds32_expand_setmem_unroll): New.
4883 (nds32_expand_setmem): New.
4884
4885 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
4886 Chung-Ju Wu <jasonwucj@gmail.com>
4887
4888 * config/nds32/nds32-memory-manipulation.c
4889 (nds32_emit_load_store): New.
4890 (nds32_emit_post_inc_load_store): New.
4891 (nds32_emit_mem_move): New.
4892 (nds32_emit_mem_move_block): New.
4893 (nds32_expand_movmemsi_loop_unknown_size): New.
4894 (nds32_expand_movmemsi_loop_known_size): New.
4895 (nds32_expand_movmemsi_loop): New.
4896 (nds32_expand_movmemsi_unroll): New.
4897 (nds32_expand_movmemqi): Rename ...
4898 (nds32_expand_movmemsi): ... to this.
4899 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
4900 (movmemsi): ... to this.
4901 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
4902 (nds32_expand_movmemsi): ... to this.
4903
4904 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
4905 Monk Chiang <sh.chiang04@gmail.com>
4906 Chung-Ju Wu <jasonwucj@gmail.com>
4907
4908 * config/nds32/nds32-protos.h
4909 (nds32_expand_load_multiple): New arguments.
4910 (nds32_expand_store_multiple): Ditto.
4911 (nds32_valid_multiple_load_store): Rename ...
4912 (nds32_valid_multiple_load_store_p): ... to this.
4913 * config/nds32/nds32-memory-manipulation.c
4914 (nds32_expand_load_multiple): Refine implementation.
4915 (nds32_expand_store_multiple): Ditto.
4916 * config/nds32/nds32-multiple.md
4917 (load_multiple): Update nds32_expand_load_multiple interface.
4918 (store_multiple): Update nds32_expand_store_multiple interface.
4919 * config/nds32/nds32-predicates.c
4920 (nds32_valid_multiple_load_store): Rename ...
4921 (nds32_valid_multiple_load_store_p): ... to this and refine
4922 implementation.
4923 * config/nds32/predicates.md
4924 (nds32_load_multiple_and_update_address_operation): New predicate.
4925 (nds32_store_multiple_and_update_address_operation): New predicate.
4926
4927 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
4928 Chung-Ju Wu <jasonwucj@gmail.com>
4929
4930 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
4931 (combo): New attribute.
4932 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
4933
4934 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
4935
4936 * config/nds32/nds32.opt: Change -mcmodel= default value.
4937
4938 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
4939 Monk Chiang <sh.chiang04@gmail.com>
4940 Chung-Ju Wu <jasonwucj@gmail.com>
4941
4942 * config/nds32/constants.md (unspec_element): New enum.
4943 * config/nds32/constraints.md (Umw): New constraint.
4944 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
4945 * config/nds32/nds32-intrinsic.md: Likewise.
4946 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
4947 (nds32_valid_smw_lwm_base_p): New.
4948 (nds32_output_smw_single_word): New.
4949 (nds32_output_lmw_single_word): New.
4950 (nds32_expand_unaligned_load): New.
4951 (nds32_expand_unaligned_store): New.
4952 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
4953 (nds32_output_smw_single_word): Declare.
4954 (nds32_output_lmw_single_word): Declare.
4955 (nds32_expand_unaligned_load): Declare.
4956 (nds32_expand_unaligned_store): Declare.
4957 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
4958 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
4959 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
4960 NDS32_BUILTIN_UASTORE_DW.
4961 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
4962 predicate.
4963
4964 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
4965 Kito Cheng <kito.cheng@gmail.com>
4966 Chung-Ju Wu <jasonwucj@gmail.com>
4967
4968 * config/nds32/nds32-intrinsic.c
4969 (nds32_expand_builtin_null_ftype_reg): Delete.
4970 (nds32_expand_builtin_reg_ftype_imm): Ditto.
4971 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
4972 (nds32_read_argument): New.
4973 (nds32_legitimize_target): Ditto.
4974 (nds32_legitimize_argument): Ditto.
4975 (nds32_check_constant_argument): Ditto.
4976 (nds32_expand_unop_builtin): Ditto.
4977 (nds32_expand_unopimm_builtin): Ditto.
4978 (nds32_expand_binop_builtin): Ditto.
4979 (nds32_builtin_decl_impl): Ditto.
4980 (builtin_description): Ditto.
4981 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
4982 (nds32_init_builtins_impl): Ditto.
4983 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
4984 (nds32_builtin_decl): New.
4985 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
4986 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
4987
4988 2018-03-02 Jeff Law <law@redhat.com>
4989
4990 * reorg.c (stop_search_p): Handle DEBUG_INSN.
4991 (redundant_insn, fill_simple_delay_slots): Likewise.
4992 (fill_slots_from_thread): Likewise.
4993 * resource.c (mark_referenced_resources): Likewise.
4994 (mark_set_resources, find_dead_or_set_registers): Likewise.
4995
4996 2018-03-02 Jakub Jelinek <jakub@redhat.com>
4997
4998 * substring-locations.h (format_warning_va): Formatting fix for
4999 ATTRIBUTE_GCC_DIAG.
5000 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
5001 argument.
5002 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
5003 * substring-locations.c: Include intl.h.
5004 (format_warning_va): Turned into small wrapper around
5005 format_warning_n_va, renamed to ...
5006 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
5007 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
5008 use ngettext.
5009 (format_warning_at_substring_n): New function.
5010 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
5011 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
5012 format_warning_at_substring with just a shorter name instead of
5013 const function pointer.
5014 (fmtwarn_n): New function.
5015 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
5016 appropriate, get rid of all the fmtstr temporaries, move conditionals
5017 with G_() wrapped string literals directly into fmtwarn arguments,
5018 cast dir.len to (int), formatting fixes.
5019
5020 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
5021
5022 * doc/invoke.texi: Remove "Cilk Plus" references.
5023
5024 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5025 Richard Biener <rguenther@suse.de>
5026
5027 PR ipa/84628
5028 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
5029 for error or warning attributes if CALL_FROM_THUNK_P is set.
5030 Formatting fixes.
5031
5032 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5033
5034 PR target/56540
5035 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
5036 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
5037
5038 PR target/56540
5039 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
5040 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
5041
5042 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
5043 instead of -1U in last predictors element's probability member.
5044
5045 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
5046
5047 PR ipa/83983
5048 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
5049 arguments if they are comparable.
5050
5051 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
5052
5053 PR tree-optimization/84634
5054 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
5055 masks and masked_loop_p with a single loop_masks, making sure it's
5056 null for bb vectorization.
5057
5058 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
5059
5060 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
5061 (vect_analyze_data_ref_access): Use loop->safe_len rather than
5062 loop->force_vectorize to check whether there is no alias.
5063
5064 2018-03-02 Jakub Jelinek <jakub@redhat.com>
5065
5066 PR target/84614
5067 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
5068 prototypes.
5069 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
5070 comments.
5071 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
5072 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
5073 instead of a loop around prev_real_insn.
5074 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
5075 prev_real_insn.
5076
5077 PR inline-asm/84625
5078 * config/i386/i386.c (ix86_print_operand): Use conditional
5079 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
5080 zero vector.
5081
5082 2018-03-02 Richard Biener <rguenther@suse.de>
5083
5084 PR tree-optimization/84427
5085 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
5086 (bitmap_set_subtract_values): Rewrite to handle multiple
5087 exprs per value.
5088 (clean): Likewise.
5089 (prune_clobbered_mems): Likewise.
5090 (phi_translate): Take edge instead of pred/phiblock.
5091 (phi_translate_1): Likewise.
5092 (phi_translate_set): Likewise. Insert all translated
5093 exprs for a value into the set, keeping possibly multiple
5094 expressions per value.
5095 (compute_antic_aux): Adjust for phi_translate changes.
5096 When intersecting union the expressions and prune those
5097 not in the final value set, keeping possibly multiple
5098 expressions per value. Do not use value-insertion
5099 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
5100 all expressions. Add verification that the value-sets
5101 only shrink during iteration.
5102 (compute_partial_antic_aux): Adjust for the phi_translate changes.
5103 (do_pre_regular_insertion): Likewise.
5104 (do_pre_partial_partial_insertion): Likewise.
5105
5106 2018-03-02 Richard Biener <rguenther@suse.de>
5107
5108 PR target/82005
5109 * config/darwin.c (saved_debug_info_level): New static global.
5110 (darwin_asm_lto_start): Disable debug info generation for LTO out.
5111 (darwin_asm_lto_end): Restore debug info generation settings.
5112
5113 2018-03-01 Martin Liska <mliska@suse.cz>
5114
5115 PR sanitizer/82484
5116 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
5117 volatile arguments.
5118
5119 2018-03-01 Richard Biener <rguenther@suse.de>
5120
5121 PR debug/84645
5122 * dwarf2out.c (gen_variable_die): Properly handle late VLA
5123 type annotation with LTO when debug was disabled at compile-time.
5124
5125 2018-03-01 Matthew Fortune <mfortune@gmail.com>
5126
5127 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
5128 XINT with INTVAL.
5129 (mips_final_postscan_insn): Likewise.
5130
5131 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
5132
5133 PR rtl-optimization/84528
5134 * alias.c (init_alias_target): Add commentary.
5135 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
5136 a unique base value if the frame pointer is not eliminated
5137 to the stack pointer.
5138
5139 2018-03-01 Tom de Vries <tom@codesourcery.com>
5140
5141 PR rtl-optimization/83327
5142 * lra-int.h (hard_regs_spilled_into): Declare.
5143 * lra.c (hard_regs_spilled_into): Define.
5144 (init_reg_info): Init hard_regs_spilled_into.
5145 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
5146 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
5147 (process_bb_lives): Handle hard_regs_spilled_into.
5148 (lra_create_live_ranges_1): Before doing liveness propagation, clear
5149 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
5150
5151 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
5152
5153 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
5154 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
5155 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
5156 * config/rs6000/aix72.h: New file.
5157
5158 2018-02-28 Jakub Jelinek <jakub@redhat.com>
5159
5160 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
5161 instead of warning_at with conditional singular and plural messages
5162 where possible.
5163
5164 PR target/52991
5165 * stor-layout.c (update_alignment_for_field): For
5166 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
5167 && !DECL_PACKED (field), do the alignment update, just use
5168 only desired_align instead of MAX (type_align, desired_align)
5169 as the alignment.
5170 (place_field): Don't do known_align < desired_align handling
5171 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
5172 is non-NULL, instead do it after rli->prev_field handling and
5173 only if not within a bitfield word. For DECL_PACKED (field)
5174 use type_align of BITS_PER_UNIT.
5175
5176 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
5177
5178 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
5179 superfluous parentheses and trailing spaces.
5180
5181 2018-02-28 Richard Biener <rguenther@suse.de>
5182
5183 PR tree-optimization/84584
5184 * graphite-scop-detection.c (scop_detection::add_scop): Discard
5185 SCoPs with fake exit edge.
5186
5187 2018-02-28 Martin Liska <mliska@suse.cz>
5188
5189 PR testsuite/84597
5190 * timevar.c (timer::print): Fix format to properly print 100%
5191 values.
5192
5193 2018-02-28 Richard Biener <rguenther@suse.de>
5194
5195 PR middle-end/84607
5196 * genmatch.c (capture_info::walk_match): Do not mark
5197 captured expressions without operands as expr_p given
5198 they act more like predicates and should be subject to
5199 "lost tail" side-effect preserving.
5200
5201 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
5202
5203 PR rtl-optimization/81611
5204 * auto-inc-dec.c (attempt_change): Move dead note from
5205 mem_insn if it's the next use of regno
5206 (find_address): Take address use of reg holding
5207 non-incremented value. Add parm to limit search to the named
5208 reg only.
5209 (merge_in_block): Attempt to use a mem insn that is the next
5210 use of the original regno.
5211
5212 2018-02-27 Martin Sebor <msebor@redhat.com>
5213
5214 PR c++/83871
5215 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
5216 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
5217
5218 2018-02-27 Martin Sebor <msebor@redhat.com>
5219
5220 PR translation/84207
5221 * diagnostic-core.h (warning_n, error_n, inform_n): Change
5222 n argument to unsigned HOST_WIDE_INT.
5223 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
5224 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
5225 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
5226 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
5227
5228 2018-02-27 Richard Biener <rguenther@suse.de>
5229
5230 PR tree-optimization/84512
5231 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
5232 Do not use the estimate returned from record_stmt_cost for
5233 the scalar iteration cost but sum properly using add_stmt_cost.
5234
5235 2018-02-27 Richard Biener <rguenther@suse.de>
5236
5237 PR tree-optimization/84466
5238 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
5239 Adjust last change to less strictly validate use operands.
5240
5241 2018-02-27 Martin Liska <mliska@suse.cz>
5242
5243 PR gcov-profile/84548
5244 * gcov.c (process_file): Allow partial overlap and consider it
5245 also as group functions.
5246 (output_lines): Properly calculate range of lines for a group.
5247
5248 2018-02-27 Martin Liska <mliska@suse.cz>
5249
5250 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
5251 'ggc' suffixes. Change first column width.
5252 (timer::print): Fix formatting of the column.
5253
5254 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
5255
5256 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
5257 preserve inline entry blocks for the sake of debug inline
5258 entry point markers alone.
5259 (remove_unused_locals): Suggest in comments a better place to
5260 force the preservation of inline entry blocks that are
5261 otherwise unused, but do not preserve them.
5262
5263 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
5264
5265 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
5266
5267 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
5268
5269 PR target/84039
5270 * config/i386/constraints.md (Bs): Replace
5271 ix86_indirect_branch_register with
5272 TARGET_INDIRECT_BRANCH_REGISTER.
5273 (Bw): Likewise.
5274 * config/i386/i386.md (indirect_jump): Likewise.
5275 (tablejump): Likewise.
5276 (*sibcall_memory): Likewise.
5277 (*sibcall_value_memory): Likewise.
5278 Peepholes of indirect call and jump via memory: Likewise.
5279 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
5280 (*sibcall_value_GOT_32): Likewise.
5281 * config/i386/predicates.md (indirect_branch_operand): Likewise.
5282 (GOT_memory_operand): Likewise.
5283 (call_insn_operand): Likewise.
5284 (sibcall_insn_operand): Likewise.
5285 (GOT32_symbol_operand): Likewise.
5286 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
5287
5288 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
5289
5290 PR rtl-optimization/83496
5291 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
5292 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
5293 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
5294 redundant insn, if any.
5295 (relax_delay_slots): Likewise.
5296 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
5297
5298 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
5299
5300 PR tree-optimization/83965
5301 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
5302 that grouped statements are part of a reduction chain. Return
5303 true if the statement is not marked as a reduction itself but
5304 is part of a group.
5305 (vect_recog_dot_prod_pattern): Don't check whether the statement
5306 is part of a group here.
5307 (vect_recog_sad_pattern): Likewise.
5308 (vect_recog_widen_sum_pattern): Likewise.
5309
5310 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
5311
5312 PR debug/84545
5313 * final.c (rest_of_clean_state): Also look for calls inside sequences.
5314
5315 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
5316
5317 PR target/84530
5318 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
5319 the bool argument.
5320 (ix86_output_indirect_function_return): New prototype.
5321 (ix86_split_simple_return_pop_internal): Likewise.
5322 * config/i386/i386.c (indirect_return_via_cx): New.
5323 (indirect_return_via_cx_bnd): Likewise.
5324 (indirect_thunk_name): Handle return va CX_REG.
5325 (output_indirect_thunk_function): Create alias for
5326 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
5327 (ix86_output_indirect_jmp): Remove the bool argument.
5328 (ix86_output_indirect_function_return): New function.
5329 (ix86_split_simple_return_pop_internal): Likewise.
5330 * config/i386/i386.md (*indirect_jump): Don't pass false
5331 to ix86_output_indirect_jmp.
5332 (*tablejump_1): Likewise.
5333 (simple_return_pop_internal): Change it to define_insn_and_split.
5334 Call ix86_split_simple_return_pop_internal to split it for
5335 -mfunction-return=.
5336 (simple_return_indirect_internal): Call
5337 ix86_output_indirect_function_return instead of
5338 ix86_output_indirect_jmp.
5339
5340 2018-02-26 Jakub Jelinek <jakub@redhat.com>
5341
5342 PR bootstrap/84405
5343 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
5344 memset and value initialization afterwards.
5345
5346 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
5347
5348 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
5349
5350 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
5351
5352 PR target/84521
5353 * common/config/aarch64/aarch64-common.c
5354 (aarch_option_optimization_table[]): Switch
5355 off fomit-frame-pointer
5356
5357 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
5358 Chung-Ju Wu <jasonwucj@gmail.com>
5359
5360 * config/nds32/nds32-multiple.md (load_multiple): Disallow
5361 volatile memory.
5362 (store_multiple): Ditto.
5363
5364 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
5365
5366 * config.gcc: Add --with-cpu support for nds32 target.
5367 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
5368 * config/nds32/nds32.opt: Add -mcpu= option.
5369
5370 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
5371
5372 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
5373 isel=yes): Warn for these deprecated options.
5374
5375 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
5376
5377 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
5378 ISA_2_5_MASKS_EMBEDDED.
5379
5380 2018-02-23 Jakub Jelinek <jakub@redhat.com>
5381
5382 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
5383 p->max as pointers rather than using iterative_hash_expr.
5384
5385 2018-02-23 Carl Love <cel@us.ibm.com>
5386
5387 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
5388 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
5389 BU_P8V_OVERLOAD_2.
5390 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
5391 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
5392 P8V_BUILTIN_VEC_VUNSIGNED2.
5393
5394 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
5395
5396 PR target/81572
5397 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
5398 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
5399 LRA_UNKNOWN_ALT.
5400 * lra-constraints.c (curr_insn_transform): Set up
5401 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
5402 LRA_UNKNOWN_ALT.
5403 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
5404 * lra-eliminations.c (spill_pseudos): Ditto.
5405 (process_insn_for_elimination): Ditto.
5406 * lra-lives.c (reg_early_clobber_p): Use the new macros.
5407 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
5408 LRA_NON_CLOBBERED_ALT.
5409
5410 2018-02-22 Martin Sebor <msebor@redhat.com>
5411
5412 PR tree-optimization/84480
5413 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
5414 to maybe_diag_stxncpy_trunc. Call it.
5415 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
5416 from gimple_fold_builtin_strcpy. Print inlining stack.
5417 (handle_builtin_stxncpy): Print inlining stack.
5418 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
5419
5420 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
5421
5422 PR target/84176
5423 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
5424 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
5425 and -fcheck-pointer-bounds are used together.
5426 (indirect_thunk_prefix): New enum.
5427 (indirect_thunk_need_prefix): New function.
5428 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
5429 "_nt" instead of "_bnd" for NOTRACK prefix.
5430 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
5431 (output_indirect_thunk_function): Likewise.
5432 (): Likewise.
5433 (ix86_code_end): Update output_indirect_thunk_function calls.
5434 (ix86_output_indirect_branch_via_reg): Replace
5435 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
5436 (ix86_output_indirect_branch_via_push): Likewise.
5437 (ix86_output_function_return): Likewise.
5438 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
5439 incompatible with -fcf-protection=branch and
5440 -fcheck-pointer-bounds.
5441
5442 2018-02-22 Steve Ellcey <sellcey@cavium.com>
5443
5444 PR target/83335
5445 * config/aarch64/aarch64.c (aarch64_print_address_internal):
5446 Change gcc_assert call to output_operand_lossage.
5447
5448 2018-02-22 Steve Ellcey <sellcey@cavium.com>
5449
5450 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
5451
5452 2018-02-22 DJ Delorie <dj@redhat.com>
5453 Sebastian Perta <sebastian.perta@renesas.com>
5454 Oleg Endo <olegendo@gcc.gnu.org>
5455
5456 * config/rx/rx.c (rx_rtx_costs): New function.
5457 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
5458
5459 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
5460
5461 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
5462
5463 2018-02-22 Martin Liska <mliska@suse.cz>
5464
5465 PR driver/83193
5466 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
5467 Add "native" as a possible value.
5468
5469 2018-02-22 Martin Liska <mliska@suse.cz>
5470
5471 PR driver/83193
5472 * config/i386/i386.c (ix86_option_override_internal):
5473 Add "native" as a possible value for -march and -mtune.
5474
5475 2018-02-22 Jakub Jelinek <jakub@redhat.com>
5476
5477 PR target/84502
5478 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
5479 to all type variants.
5480
5481 PR tree-optimization/84503
5482 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
5483 width as info->bitpos + info->bitsize - start.
5484 (merged_store_group::merge_overlapping): Simplify width computation.
5485 (check_no_overlap): New function.
5486 (imm_store_chain_info::try_coalesce_bswap): Compute expected
5487 start + width and last_order of the group, fail if check_no_overlap
5488 fails.
5489 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
5490 to group if check_no_overlap fails.
5491
5492 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
5493
5494 * config/rs6000/altivec.md: Delete contraint arguments to
5495 define_expand, define_split, and define_peephole2, and in
5496 define_insn_and_split if always unused.
5497 * config/rs6000/darwin.md: Ditto.
5498 * config/rs6000/dfp.md: Ditto.
5499 * config/rs6000/rs6000.md: Ditto.
5500 * config/rs6000/sync.md: Ditto.
5501 * config/rs6000/vector.md: Ditto.
5502 * config/rs6000/vsx.md: Ditto.
5503
5504 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
5505
5506 * config/rs6000/altivec.md: Write output control strings as braced
5507 blocks instead of double-quoted strings.
5508 * config/rs6000/darwin.md: Ditto.
5509 * config/rs6000/rs6000.md: Ditto.
5510 * config/rs6000/vector.md: Ditto.
5511 * config/rs6000/vsx.md: Ditto.
5512
5513 2018-02-21 Jason Merrill <jason@redhat.com>
5514
5515 PR c++/84314 - ICE with templates and fastcall attribute.
5516 * attribs.c (build_type_attribute_qual_variant): Remove assert.
5517
5518 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
5519
5520 * ipa-cp.c (determine_versionability): Fix comment typos.
5521
5522 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
5523
5524 PR c/84229
5525 * ipa-cp.c (determine_versionability): Do not version functions caling
5526 va_arg_pack.
5527
5528 2018-02-21 Martin Liska <mliska@suse.cz>
5529
5530 PR driver/83193
5531 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
5532 Add "native" as a possible value.
5533 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
5534 the macro when native cpu detection is available.
5535
5536 2018-02-21 Martin Liska <mliska@suse.cz>
5537
5538 PR driver/83193
5539 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
5540 Add "native" as a possible value.
5541 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
5542 when native cpu detection is available.
5543
5544 2018-02-21 Jakub Jelinek <jakub@redhat.com>
5545 Martin Sebor <msebor@redhat.com>
5546
5547 PR tree-optimization/84478
5548 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
5549 false.
5550 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
5551 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
5552 support which is conservatively correct, for 2 only stay conservative
5553 for maxlen. Formatting and comment capitalization fixes. Add STRICT
5554 argument to the 2 argument get_range_strlen, adjust 6 arg
5555 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
5556 false.
5557 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
5558 (gimple_fold_builtin_strlen): Pass true as last argument to
5559 get_range_strlen.
5560
5561 2018-02-20 Martin Sebor <msebor@redhat.com>
5562
5563 PR middle-end/84095
5564 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
5565 (builtin_memref::set_base_and_offset): Same. Handle inner references.
5566 (builtin_memref::builtin_memref): Factor out parts into
5567 set_base_and_offset and call it.
5568
5569 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
5570
5571 PR middle-end/84406
5572 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
5573 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
5574 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
5575 search at the associated MODE_INT.
5576
5577 2018-02-20 Jeff Law <law@redhat.com>
5578
5579 PR middle-end/82123
5580 PR tree-optimization/81592
5581 PR middle-end/79257
5582 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
5583 for range data rather than using global data.
5584 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
5585 range data rather than using global data.
5586 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
5587 pass it to children as needed.
5588 (struct directive::fmtresult): Similarly.
5589 (struct directive::set_width): Similarly.
5590 (struct directive::set_precision): Similarly.
5591 (format_integer, format_directive, parse_directive): Similarly.
5592 (format_none): Accept unnamed vr_values parameter.
5593 (format_percent, format_floating, format_character): Similarly.
5594 (format_string, format_plain): Similarly.
5595 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
5596 the EVRP range analyzer for range data rather than using global data.
5597 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
5598 gimple-ssa-evrp-analyze.h
5599 (class sprintf_dom_walker): Add after_dom_children member function.
5600 Add evrp_range_analyzer member.
5601 (sprintf_dom_walker::before_dom_children): Call into the EVRP
5602 range analyzer as needed.
5603 (sprintf_dom_walker::after_dom_children): New member function.
5604 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
5605 if not optimizing.
5606 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
5607 (evrp_range_analyzer::pop_to_marker): Likewise.
5608
5609 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
5610
5611 PR tree-optimization/84419
5612 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
5613 with the required type if its current type is compatible but
5614 different.
5615
5616 2018-02-20 Jakub Jelinek <jakub@redhat.com>
5617
5618 PR middle-end/82004
5619 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
5620 after vectorization.
5621
5622 2018-02-20 Martin Liska <mliska@suse.cz>
5623
5624 PR driver/83193
5625 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
5626 possible values if we don't have a hint.
5627
5628 2018-02-20 Martin Liska <mliska@suse.cz>
5629
5630 PR c/84310
5631 PR target/79747
5632 * final.c (shorten_branches): Build align_tab array with one
5633 more element.
5634 * opts.c (finish_options): Add alignment option limit check.
5635 (MAX_CODE_ALIGN): Likewise.
5636 (MAX_CODE_ALIGN_VALUE): Likewise.
5637 * doc/invoke.texi: Document maximum allowed option value for
5638 all -falign-* options.
5639
5640 2018-02-19 Jakub Jelinek <jakub@redhat.com>
5641
5642 PR target/84146
5643 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
5644 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
5645 * var-tracking.c (emit_note_insn_var_location): Remove all references
5646 to NOTE_INSN_CALL_ARG_LOCATION.
5647 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
5648 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
5649 Use copy_rtx_if_shared.
5650 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
5651 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
5652 (dwarf2out_var_location): Remove handling of
5653 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
5654 on call_insn.
5655 * final.c (final_scan_insn): Remove all references to
5656 NOTE_INSN_CALL_ARG_LOCATION.
5657 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
5658 before dumping final insns.
5659 * except.c (emit_note_eh_region_end): Remove all references to
5660 NOTE_INSN_CALL_ARG_LOCATION.
5661 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
5662 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
5663 * config/arc/arc.c (hwloop_optimize): Likewise.
5664 * config/arm/arm.c (create_fix_barrier): Likewise.
5665 * config/s390/s390.c (s390_chunkify_start): Likewise.
5666 * config/sh/sh.c (find_barrier): Likewise.
5667 * config/i386/i386.c (rest_of_insert_endbranch,
5668 ix86_seh_fixup_eh_fallthru): Likewise.
5669 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
5670 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
5671 * config/frv/frv.c (frv_function_prologue): Likewise.
5672 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
5673 reg note.
5674 (note_outside_basic_block_p): Remove all references to
5675 NOTE_INSN_CALL_ARG_LOCATION.
5676 * gengtype.c (adjust_field_rtx_def): Likewise.
5677 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
5678 Likewise.
5679 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
5680 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
5681
5682 PR c++/84444
5683 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
5684 is ADDR_EXPR.
5685
5686 PR tree-optimization/84452
5687 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
5688 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
5689 is NULL.
5690
5691 2018-02-19 Martin Liska <mliska@suse.cz>
5692
5693 PR sanitizer/82183
5694 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
5695
5696 2018-02-19 Martin Liska <mliska@suse.cz>
5697 Richard Sandiford <richard.sandiford@linaro.org>
5698
5699 PR tree-optimization/82491
5700 * gimple-fold.c (get_base_constructor): Make earlier bail out
5701 to prevent ubsan.
5702
5703 2018-02-19 Carl Love <cel@us.ibm.com>
5704
5705 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
5706 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
5707 BU_P8V_OVERLOAD_1.
5708 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
5709 P8V_BUILTIN_VEC_NEG.
5710
5711 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
5712
5713 * config/rl78/rl78.md (movdf): New define expand.
5714
5715 2018-02-19 Martin Liska <mliska@suse.cz>
5716
5717 PR other/80589
5718 * doc/invoke.texi: Fix typo.
5719 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
5720
5721 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
5722
5723 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
5724 handle rs6000_single_float and rs6000_double_float specially for
5725 e500 family CPUs.
5726
5727 2018-02-16 Jeff Law <law@redhat.com>
5728
5729 * config/rx/rx.c (add_pop_cfi_notes): New function.;
5730 (pop_regs): Use it.
5731
5732 2018-02-16 Jakub Jelinek <jakub@redhat.com>
5733
5734 PR ipa/84425
5735 * ipa-inline.c (inline_small_functions): Fix a typo.
5736
5737 2018-02-16 Nathan Sidwell <nathan@acm.org>
5738
5739 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
5740
5741 2018-02-16 Carl Love <cel@us.ibm.com>
5742
5743 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
5744 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
5745 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
5746 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
5747 expansion to P8V_BUILTIN_VEC_FLOAT2.
5748
5749 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
5750
5751 PR rtl-optimization/70023
5752 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
5753 src_regno into account.
5754
5755 2018-02-16 Carl Love <cel@us.ibm.com>
5756
5757 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
5758 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
5759 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
5760 * config/rs6000/rs6000.c: Remove case statements for
5761 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
5762 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
5763 and P9V_BUILTIN_VEC_VINSERT4B.
5764 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
5765 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
5766 * config/rs6000/vsx.md:
5767 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
5768 vec_insert4b.
5769
5770 2018-02-16 Carl Love <cel@us.ibm.com>
5771
5772 * config/rs6000/altivec.h: Add builtin names vec_extract4b
5773 vec_insert4b.
5774 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
5775 definitions.
5776 * config/rs6000/rs6000-c.c: Add the definitions for
5777 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
5778 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
5779 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
5780 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
5781 definition for insert4b and define insn *insert3b_internal.
5782 * doc/extend.texi: Add documentation for vec_extract4b.
5783
5784 2018-02-16 Nathan Sidwell <nathan@acm.org>
5785
5786 * doc/extend.texi (Backwards Compatibility): Mention friend
5787 injection. Note for-scope is deprecated.
5788 * doc/invoke.texi (-ffriend-injection): Deprecate.
5789
5790 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
5791
5792 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
5793 that moved to I2, also allow destinations that are a paradoxical
5794 subreg (instead of a normal reg).
5795
5796 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
5797
5798 PR target/83831
5799 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
5800 to QImode.
5801
5802 2018-02-16 Richard Biener <rguenther@suse.de>
5803
5804 PR tree-optimization/84037
5805 PR tree-optimization/84016
5806 PR target/82862
5807 * config/i386/i386.c (ix86_builtin_vectorization_cost):
5808 Adjust vec_construct for the fact we need additional higher latency
5809 128bit inserts for AVX256 and AVX512 vector builds.
5810 (ix86_add_stmt_cost): Scale vector construction cost for
5811 elementwise loads.
5812
5813 2018-02-16 Richard Biener <rguenther@suse.de>
5814
5815 PR tree-optimization/84417
5816 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
5817 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
5818 (non_rewritable_lvalue_p): Likewise, use poly-ints.
5819
5820 2018-02-16 Martin Liska <mliska@suse.cz>
5821
5822 PR sanitizer/84307
5823 * internal-fn.def (ASAN_CHECK): Set proper flags.
5824 (ASAN_MARK): Likewise.
5825
5826 2018-02-16 Julia Koval <julia.koval@intel.com>
5827
5828 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
5829 from PTA_CANNONLAKE.
5830
5831 2018-02-16 Jakub Jelinek <jakub@redhat.com>
5832
5833 PR target/84272
5834 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
5835 Use ++iter rather than iter++ for std::list iterators.
5836 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
5837 defer deleting them until all nodes in the forest are processed. Do
5838 free even leaf nodes. Change to_process into auto_vec.
5839
5840 PR bootstrap/84405
5841 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
5842 * vec.h (vec_default_construct): Use memset instead of placement new
5843 if BROKEN_VALUE_INITIALIZATION is defined.
5844 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
5845 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
5846 is defined.
5847
5848 PR rtl-optimization/83723
5849 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
5850 * lra.c (lra_substitute_pseudo): Likewise. If true, use
5851 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
5852 recursive calls.
5853 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
5854 callers.
5855 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
5856
5857 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
5858
5859 PR rtl-optimization/81443
5860 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
5861 from inner REGs to paradoxical SUBREGs.
5862
5863 2018-02-16 Richard Biener <rguenther@suse.de>
5864
5865 PR tree-optimization/84399
5866 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
5867 For operands we can analyze at their definition make sure we can
5868 analyze them at each use as well.
5869
5870 2018-02-16 Richard Biener <rguenther@suse.de>
5871
5872 PR tree-optimization/84190
5873 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
5874 volatile accesses if the decl isn't volatile.
5875
5876 2018-02-15 Jason Merrill <jason@redhat.com>
5877
5878 PR c++/84314 - ICE with templates and fastcall attribute.
5879 * attribs.c (build_type_attribute_qual_variant): Don't clobber
5880 TYPE_CANONICAL on an existing type.
5881
5882 2018-02-15 Jakub Jelinek <jakub@redhat.com>
5883
5884 PR tree-optimization/84383
5885 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
5886 dstoff nor call operand_equal_p if dstbase is NULL.
5887
5888 PR tree-optimization/84334
5889 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
5890 also a CONSTANT_CLASS_P, punt.
5891
5892 2018-02-14 Jim Wilson <jimw@sifive.com>
5893
5894 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
5895 first SMALL_OPERAND check. New local min_second_step. Move assert
5896 to where locals are set. Add TARGET_RVC support.
5897 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
5898
5899 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
5900
5901 * doc/invoke.texi: Correct -Wformat-overflow code sample.
5902
5903 2018-02-14 Martin Sebor <msebor@redhat.com>
5904
5905 PR tree-optimization/83698
5906 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
5907 arrays constrain the offset range to their bounds.
5908 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
5909 (builtin_access::overlap): Avoid setting the size of overlap if it's
5910 already been set.
5911 (maybe_diag_overlap): Also consider arrays when deciding what values
5912 of offsets to include in diagnostics.
5913
5914 2018-02-14 Martin Sebor <msebor@redhat.com>
5915
5916 PR c/84108
5917 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
5918 that correspond to the kind of a declaration.
5919
5920 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
5921
5922 PR target/83984
5923 * config/pa/pa.md: Load address of PIC label using the linkage table
5924 if the label is nonlocal.
5925
5926 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
5927
5928 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
5929 warning message if user requests -maltivec=be.
5930 * doc/invoke.texi: Document deprecation of -maltivec=be.
5931
5932 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
5933
5934 PR target/84220
5935 * config/rs6000/rs6000-c.c: Update definitions for
5936 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
5937 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
5938
5939 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
5940
5941 PR target/84239
5942 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
5943 add _get_ssp intrinsics. Remove argument from
5944 __builtin_ia32_rdssp[d|q].
5945 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
5946 * config/i386/i386-builtin.def: Remove argument from
5947 __builtin_ia32_rdssp[d|q].
5948 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
5949 ix86_expand_special_args_builtin for _rdssp[d|q].
5950 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
5951 Clear register before usage.
5952 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
5953 Add documentation for new _get_ssp and _inc_ssp intrinsics.
5954
5955 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
5956
5957 PR tree-optimization/84357
5958 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
5959 operand 1 of an ARRAY_REF too.
5960
5961 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
5962
5963 PR target/83831
5964 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
5965 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
5966 declarations.
5967 (set_of_reg): New struct.
5968 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
5969 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
5970 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
5971 functions.
5972 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
5973 Split into bitclr, bitset, bitinvert patterns if appropriate.
5974 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
5975 use rx_fuse_in_memory_bitop.
5976 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
5977 to named insn, correct maximum insn length.
5978
5979 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
5980
5981 PR target/79242
5982 * machmode.def: Define a complex mode for PARTIAL_INT.
5983 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
5984 MODE_PARTIAL_INT.
5985 * doc/rtl.texi: Document CSPImode.
5986 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
5987 handling.
5988 (msp430_hard_regno_nregs_with_padding): Likewise.
5989
5990 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
5991
5992 PR target/84279
5993 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
5994
5995 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
5996
5997 PR rtl-optimization/84169
5998 * combine.c (try_combine): New variable split_i2i3. Set it to true if
5999 we generated a parallel as new i3 and we split that to new i2 and i3
6000 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
6001 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
6002 those to i2, not i1. Partially rewrite this scan code.
6003
6004 2018-02-13 Jakub Jelinek <jakub@redhat.com>
6005
6006 PR c/82210
6007 * stor-layout.c (place_field): For variable length fields, adjust
6008 offset_align afterwards not just based on the field's alignment,
6009 but also on the size.
6010
6011 PR middle-end/84309
6012 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
6013 of exps and logs in the use_exp2 case.
6014
6015 2018-02-13 Jeff Law <law@redhat.com>
6016
6017 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
6018 entry for "vector".
6019
6020 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
6021 ARGS as unused.
6022
6023 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
6024
6025 PR debug/84342
6026 PR debug/84319
6027 * common.opt (gas-loc-support, gas-locview-support): New.
6028 (ginline-points, ginternal-reset-location-views): New.
6029 * doc/invoke.texi: Document them. Use @itemx where intended.
6030 (gvariable-location-views): Adjust.
6031 * target.def (reset_location_view): New.
6032 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
6033 (TARGET_RESET_LOCATION_VIEW): New.
6034 * doc/tm.texi: Rebuilt.
6035 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
6036 (dwarf2out_default_as_locview_support): New.
6037 (output_asm_line_debug_info): Use option variables.
6038 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
6039 (output_loc_list): Likewise.
6040 (add_high_low_attributes): Check option variables.
6041 Don't output entry view attribute in strict mode.
6042 (gen_inlined_subroutine_die): Check option variables.
6043 (dwarf2out_inline_entry): Likewise.
6044 (init_sections_and_labels): Likewise.
6045 (dwarf2out_early_finish): Likewise.
6046 (maybe_reset_location_view): New, from...
6047 (dwarf2out_var_location): ... here. Call it.
6048 * debug.h (dwarf2out_default_as_loc_support): Declare.
6049 (dwarf2out_default_as_locview_support): Declare.
6050 * hooks.c (hook_int_rtx_insn_0): New.
6051 * hooks.h (hook_int_rtx_insn_0): Declare.
6052 * toplev.c (process_options): Take -gas-loc-support and
6053 -gas-locview-support from dwarf2out. Enable
6054 -gvariable-location-views by default only with locview
6055 assembler support. Enable -ginternal-reset-location-views by
6056 default only if the target defines the corresponding hook.
6057 Enable -ginline-points by default if location views are
6058 enabled; force it disabled if statement frontiers are
6059 disabled.
6060 * tree-inline.c (expand_call_inline): Check option variables.
6061 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
6062
6063 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
6064
6065 PR tree-optimization/84321
6066 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
6067 handling. Also check whether the anti-range contains any values
6068 that satisfy the mask; switch to a VR_RANGE if not.
6069
6070 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
6071
6072 PR sanitizer/84340
6073 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
6074
6075 2018-02-13 Martin Jambor <mjambor@suse.cz>
6076
6077 PR c++/83990
6078 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
6079 of call statements, also set location of a load to a temporary.
6080
6081 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
6082
6083 * config/rl78/rl78.c (add_vector_labels): New function.
6084 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
6085 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
6086 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
6087 which checks that no arguments are passed.
6088 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
6089 * doc/extend.texi: Documentation for the new attribute.
6090
6091 2018-02-13 Andreas Schwab <schwab@suse.de>
6092
6093 * config/riscv/linux.h (CPP_SPEC): Define.
6094
6095 2018-02-13 Jakub Jelinek <jakub@redhat.com>
6096
6097 PR target/84335
6098 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
6099 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
6100 OPTION_MASK_ISA_AES as first argument to def_builtin_const
6101 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
6102 instead of OPTION_MASK_ISA_PCLMUL as first argument to
6103 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
6104 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
6105 temporarily for AES and PCLMUL builtins.
6106
6107 PR tree-optimization/84339
6108 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
6109 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
6110 Formatting fixes.
6111
6112 PR middle-end/84309
6113 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
6114 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
6115 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
6116 inline function.
6117 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
6118 inline function.
6119 * omp-simd-clone.h: New file.
6120 * omp-simd-clone.c: Include omp-simd-clone.h.
6121 (expand_simd_clones): No longer static.
6122 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
6123 cgraph.h and omp-simd-clone.h.
6124 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
6125 (vect_recog_widen_shift_pattern): Formatting fix.
6126 (vect_pattern_recog_1): Don't check optab for calls.
6127
6128 PR target/84336
6129 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
6130 operands[2] into a REG before using gen_lowpart on it.
6131
6132 2018-02-12 Jeff Law <law@redhat.com>
6133
6134 PR target/83760
6135 * config/sh/sh.c (find_barrier): Consider a sibling call
6136 a barrier as well.
6137
6138 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
6139 successfully back substituting a reg.
6140
6141 2018-02-12 Richard Biener <rguenther@suse.de>
6142
6143 PR tree-optimization/84037
6144 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
6145 parameter, move visited init to caller.
6146 (vect_slp_analyze_operations): Separate cost from validity
6147 check, initialize visited once for all instances.
6148 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
6149 for all instances.
6150 * tree-vect-stmts.c (vect_model_simple_cost): Make early
6151 out an assert.
6152 (vect_model_promotion_demotion_cost): Likewise.
6153 (vectorizable_bswap): Guard cost modeling with !slp_node
6154 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
6155 SLP stmts.
6156 (vectorizable_call): Likewise.
6157 (vectorizable_conversion): Likewise.
6158 (vectorizable_assignment): Likewise.
6159 (vectorizable_shift): Likewise.
6160 (vectorizable_operation): Likewise.
6161 (vectorizable_store): Likewise.
6162 (vectorizable_load): Likewise.
6163 (vectorizable_condition): Likewise.
6164 (vectorizable_comparison): Likewise.
6165
6166 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
6167
6168 PR sanitizer/84307
6169 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
6170 (ASAN_MARK): Fix fnspec to account for return value, change pointer
6171 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
6172
6173 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
6174
6175 PR middle-end/83665
6176 * params.def (inline-min-speedup): Increase from 8 to 15.
6177 (max-inline-insns-auto): Decrease from 40 to 30.
6178 * ipa-split.c (consider_split): Add some buffer for function to
6179 be considered inlining candidate.
6180 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
6181 default values.
6182
6183 2018-02-12 Richard Biener <rguenther@suse.de>
6184
6185 PR tree-optimization/84037
6186 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
6187 matched stmts if we cannot swap the non-matched ones.
6188
6189 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
6190
6191 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
6192 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
6193 _mm_maskz_scalef_round_ss): New intrinsics.
6194 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
6195 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
6196 __builtin_ia32_scalefss_round): Remove.
6197 (__builtin_ia32_scalefsd_mask_round,
6198 __builtin_ia32_scalefss_mask_round): New intrinsics.
6199 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
6200 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
6201 ((match_operand:VF_128 2 "<round_nimm_predicate>"
6202 "<round_constraint>")): Changed to ...
6203 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
6204 "<round_scalar_constraint>")): ... this.
6205 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
6206 %0, %1, %2<round_op3>}"): Changed to ...
6207 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
6208 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
6209 %2<round_scalar_mask_op3>}"): ... this.
6210 * config/i386/subst.md (round_scalar_nimm_predicate): New.
6211
6212 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
6213
6214 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
6215 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
6216 (_mm_maskz_sqrt_round_ss): New intrinsics.
6217 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
6218 (__builtin_ia32_sqrtsd_mask_round)
6219 (__builtin_ia32_sqrtss_mask_round): New builtins.
6220 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
6221 (__builtin_ia32_sqrtss_round): Remove.
6222 (__builtin_ia32_sqrtsd_mask_round)
6223 (__builtin_ia32_sqrtss_mask_round): New builtins.
6224 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
6225 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
6226 ((match_operand:VF_128 1 "vector_operand"
6227 "xBm,<round_constraint>")): Changed to ...
6228 ((match_operand:VF_128 1 "vector_operand"
6229 "xBm,<round_scalar_constraint>")): ... this.
6230 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
6231 %0, %2, %<iptr>1<round_op3>}): Changed to ...
6232 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
6233 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
6234 %<iptr>1<round_scalar_mask_op3>}): ... this.
6235 ((set_attr "prefix" "<round_prefix>")): Changed to ...
6236 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
6237
6238 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
6239
6240 PR target/84266
6241 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
6242 Cast vec_cmpeq result to correct type.
6243 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
6244 Cast vec_cmpgt result to correct type.
6245
6246 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
6247
6248 * final.c (final_scan_insn_1): Renamed from...
6249 (final_scan_insn): ... this. New wrapper, to recover
6250 seen from the outermost call in recursive ones.
6251 * config/sparc/sparc.c (output_return): Drop seen from call.
6252 (output_sibcall): Likewise.
6253 * config/visium/visium.c (output_branch): Likewise.
6254
6255 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
6256
6257 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
6258 function label.
6259
6260 2018-02-10 Alan Modra <amodra@gmail.com>
6261
6262 PR target/84300
6263 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
6264 Specify LR as an input.
6265
6266 2018-02-10 Jakub Jelinek <jakub@redhat.com>
6267
6268 PR sanitizer/83987
6269 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
6270 remove_member_access_dummy_vars): New functions.
6271 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
6272 lower_omp_1, execute_lower_omp): Use them.
6273
6274 PR rtl-optimization/84308
6275 * shrink-wrap.c (spread_components): Release todo vector.
6276
6277 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
6278
6279 PR rtl-optimization/57193
6280 * ira-color.c (struct allocno_color_data): Add member
6281 conflict_allocno_hard_prefs.
6282 (update_conflict_allocno_hard_prefs): New.
6283 (bucket_allocno_compare_func): Add a preference based on
6284 conflict_allocno_hard_prefs.
6285 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
6286 (color_allocnos): Remove a dead code. Initiate
6287 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
6288
6289 2018-02-09 Jakub Jelinek <jakub@redhat.com>
6290
6291 PR target/84226
6292 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
6293 constraint from =wa to wa. Avoid a subreg on the output operand,
6294 instead use a pseudo and subreg it in a move.
6295 (p9_xxbrd_<mode>): Changed to ...
6296 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
6297 (p9_xxbrd_v2df): New expander.
6298 (p9_xxbrw_<mode>): Changed to ...
6299 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
6300 (p9_xxbrw_v4sf): New expander.
6301
6302 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
6303
6304 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
6305
6306 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
6307
6308 PR target/83926
6309 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
6310 multiply in 32-bit mode.
6311 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
6312 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
6313 mode.
6314
6315 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
6316
6317 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
6318 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
6319 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
6320 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
6321
6322 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
6323
6324 PR lto/84213
6325 * dwarf2out.c (is_trivial_indirect_ref): New function.
6326 (dwarf2out_late_global_decl): Do not generate a location
6327 attribute for variables that have a non-trivial DECL_VALUE_EXPR
6328 and that are not defined in the current unit.
6329
6330 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
6331
6332 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
6333 instead of a libcall for UNORDERED.
6334
6335 2018-02-09 Tamar Christina <tamar.christina@arm.com>
6336
6337 PR target/82641
6338 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
6339 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
6340
6341 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
6342
6343 PR target/PR84295
6344 * config/s390/s390.c (s390_set_current_function): Invoke
6345 s390_indirect_branch_settings also if fndecl didn't change.
6346
6347 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
6348
6349 * config/rs6000/rs6000.md (blockage): Set length to zero.
6350
6351 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
6352
6353 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
6354
6355 2018-02-09 Jakub Jelinek <jakub@redhat.com>
6356
6357 PR sanitizer/84285
6358 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
6359 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
6360 -static-lib*san.
6361
6362 PR debug/84252
6363 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
6364 PARALLEL incoming that failed vt_get_decl_and_offset check.
6365
6366 PR middle-end/84237
6367 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
6368 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
6369 TREE_READONLY bit.
6370 (get_variable_section): For decls in named .bss* sections pass true as
6371 second argument to bss_initializer_p.
6372
6373 2018-02-09 Marek Polacek <polacek@redhat.com>
6374 Jakub Jelinek <jakub@redhat.com>
6375
6376 PR c++/83659
6377 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
6378 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
6379 Sync some changes from cxx_fold_indirect_ref.
6380
6381 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
6382
6383 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
6384 markers.
6385 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
6386 (BLOCK_INLINE_ENTRY_LABEL): New.
6387 (dwarf2out_var_location): Disregard inline entry markers.
6388 (inline_entry_data): New struct.
6389 (inline_entry_data_hasher): New hashtable type.
6390 (inline_entry_data_hasher::hash): New.
6391 (inline_entry_data_hasher::equal): New.
6392 (inline_entry_data_table): New variable.
6393 (add_high_low_attributes): Add DW_AT_entry_pc and
6394 DW_AT_GNU_entry_view attributes if a pending entry is found
6395 in inline_entry_data_table. Add old entry_pc attribute only
6396 if debug nonbinding markers are disabled.
6397 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
6398 markers are enabled.
6399 (block_within_block_p, dwarf2out_inline_entry): New.
6400 (dwarf2out_finish): Check that no entries remained in
6401 inline_entry_data_table.
6402 * final.c (reemit_insn_block_notes): Handle inline entry notes.
6403 (final_scan_insn, notice_source_line): Likewise.
6404 (rest_of_clean_state): Skip inline entry markers.
6405 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
6406 markers.
6407 * gimple.c (gimple_build_debug_inline_entry): New.
6408 * gimple.h (enum gimple_debug_subcode): Add
6409 GIMPLE_DEBUG_INLINE_ENTRY.
6410 (gimple_build_debug_inline_entry): Declare.
6411 (gimple_debug_inline_entry_p): New.
6412 (gimple_debug_nonbind_marker_p): Adjust.
6413 * insn-notes.def (INLINE_ENTRY): New.
6414 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
6415 inline entry marker notes.
6416 (print_insn): Likewise.
6417 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
6418 (INSN_DEBUG_MARKER_KIND): Likewise.
6419 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
6420 * tree-inline.c (expand_call_inline): Build and insert
6421 debug_inline_entry stmt.
6422 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
6423 inline entry blocks early, if nonbind markers are enabled.
6424 (dump_scope_block): Dump fragment info.
6425 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
6426 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
6427 (gimple_build_debug_inline_entry): New.
6428 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
6429 Enable/disable inline entry points too.
6430 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
6431 (DEBUG_INSN): Describe inline entry markers.
6432
6433 * common.opt (gvariable-location-views): New.
6434 (gvariable-location-views=incompat5): New.
6435 * config.in: Rebuilt.
6436 * configure: Rebuilt.
6437 * configure.ac: Test assembler for view support.
6438 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
6439 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
6440 * dwarf2out.c (var_loc_view): New typedef.
6441 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
6442 (dwarf2out_locviews_in_attribute): New.
6443 (dwarf2out_locviews_in_loclist): New.
6444 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
6445 (enum dw_line_info_opcode): Add LI_adv_address.
6446 (struct dw_line_info_table): Add view.
6447 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
6448 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
6449 (zero_view_p): New variable.
6450 (ZERO_VIEW_P): New macro.
6451 (output_asm_line_debug_info): New.
6452 (struct var_loc_node): Add view.
6453 (add_AT_view_list, AT_loc_list): New.
6454 (add_var_loc_to_decl): Add view param. Test it against last.
6455 (new_loc_list): Add view params. Record them.
6456 (AT_loc_list_ptr): Handle loc and view lists.
6457 (view_list_to_loc_list_val_node): New.
6458 (print_dw_val): Handle dw_val_class_view_list.
6459 (size_of_die): Likewise.
6460 (value_format): Likewise.
6461 (loc_list_has_views): New.
6462 (gen_llsym): Set vl_symbol too.
6463 (maybe_gen_llsym, skip_loc_list_entry): New.
6464 (dwarf2out_maybe_output_loclist_view_pair): New.
6465 (output_loc_list): Output view list or entries too.
6466 (output_view_list_offset): New.
6467 (output_die): Handle dw_val_class_view_list.
6468 (output_dwarf_version): New.
6469 (output_compilation_unit_header): Use it.
6470 (output_skeleton_debug_sections): Likewise.
6471 (output_rnglists, output_line_info): Likewise.
6472 (output_pubnames, output_aranges): Update version comments.
6473 (output_one_line_info_table): Output view numbers in asm comments.
6474 (dw_loc_list): Determine current endview, pass it to new_loc_list.
6475 Call maybe_gen_llsym.
6476 (loc_list_from_tree_1): Adjust.
6477 (add_AT_location_description): Create view list attribute if
6478 needed, check it's absent otherwise.
6479 (convert_cfa_to_fb_loc_list): Adjust.
6480 (maybe_emit_file): Call output_asm_line_debug_info for test.
6481 (dwarf2out_var_location): Reset views as needed. Precompute
6482 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
6483 attribute. Set view.
6484 (new_line_info_table): Reset next view.
6485 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
6486 (dwarf2out_source_line): Likewise. Output view resets and labels to
6487 the assembler, or select appropriate line info opcodes.
6488 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
6489 (optimize_string_length): Catch it. Adjust.
6490 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
6491 dw_val_class_view_list, and remove it if no longer needed.
6492 (hash_loc_list): Hash view numbers.
6493 (loc_list_hasher::equal): Compare them.
6494 (optimize_location_lists): Check whether a view list symbol is
6495 needed, and whether the locview attribute is present, and
6496 whether they match. Remove the locview attribute if no longer
6497 needed.
6498 (index_location_lists): Call skip_loc_list_entry for test.
6499 (dwarf2out_finish): Call output_asm_line_debug_info for test.
6500 Use output_dwarf_version.
6501 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
6502 (struct dw_val_node): Add val_view_list.
6503 * final.c (SEEN_NEXT_VIEW): New.
6504 (set_next_view_needed): New.
6505 (clear_next_view_needed): New.
6506 (maybe_output_next_view): New.
6507 (final_start_function): Rename to...
6508 (final_start_function_1): ... this. Take pointer to FIRST,
6509 add SEEN parameter. Emit param bindings in the initial view.
6510 (final_start_function): Reintroduce SEEN-less interface.
6511 (final): Rename to...
6512 (final_1): ... this. Take SEEN parameter. Output final pending
6513 next view at the end.
6514 (final): Reintroduce seen-less interface.
6515 (final_scan_insn): Output pending next view before switching
6516 sections or ending a block. Mark the next view as needed when
6517 outputting variable locations. Notify debug backend of section
6518 changes, and of location view changes.
6519 (rest_of_handle_final): Adjust.
6520 * toplev.c (process_options): Autodetect value for debug variable
6521 location views option. Warn on incompat5 without -gdwarf-5.
6522 * doc/invoke.texi (gvariable-location-views): New.
6523 (gvariable-location-views=incompat5): New.
6524 (gno-variable-location-views): New.
6525
6526 2018-02-08 David Malcolm <dmalcolm@redhat.com>
6527
6528 PR tree-optimization/84136
6529 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
6530 that the result of find_edge is non-NULL.
6531
6532 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
6533
6534 PR target/83008
6535 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
6536 storing integer register in SImode. Fix cost of 256 and 512
6537 byte aligned SSE register store.
6538
6539 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
6540
6541 * config/i386/i386.c (ix86_multiplication_cost): Fix
6542 multiplication cost for TARGET_AVX512DQ.
6543
6544 2018-02-08 Marek Polacek <polacek@redhat.com>
6545
6546 PR tree-optimization/84238
6547 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
6548 get_range_strlen.
6549
6550 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
6551
6552 PR tree-optimization/84265
6553 * tree-vect-stmts.c (vectorizable_store): Don't treat
6554 VMAT_CONTIGUOUS accesses as grouped.
6555 (vectorizable_load): Likewise.
6556
6557 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
6558
6559 PR tree-optimization/81635
6560 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
6561 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
6562 (test_round_for_mask): New functions.
6563 (wide_int_cc_tests): Call test_round_for_mask.
6564 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
6565 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
6566 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
6567 range returned by get_range_info.
6568
6569 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
6570
6571 PR ipa/81360
6572 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
6573 * symtab.c: Include builtins.h
6574 (symtab_node::output_to_lto_symbol_table_p): Move here
6575 from lto-streamer-out.c:output_symbol_p.
6576 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
6577 (output_symbol_p): Move all logic to symtab.c
6578 (produce_symtab): Update.
6579
6580 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
6581
6582 * config/s390/s390-opts.h (enum indirect_branch): Define.
6583 * config/s390/s390-protos.h (s390_return_addr_from_memory)
6584 (s390_indirect_branch_via_thunk)
6585 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
6586 (enum s390_indirect_branch_type): Define.
6587 * config/s390/s390.c (struct s390_frame_layout, struct
6588 machine_function): Remove.
6589 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
6590 (indirect_branch_table_label_no, indirect_branch_table_name):
6591 Define variables.
6592 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
6593 (enum s390_indirect_branch_option): Define.
6594 (s390_return_addr_from_memory): New function.
6595 (s390_handle_string_attribute): New function.
6596 (s390_attribute_table): Add new attribute handler.
6597 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
6598 (s390_indirect_branch_via_thunk): New function.
6599 (s390_indirect_branch_via_inline_thunk): New function.
6600 (s390_function_ok_for_sibcall): When jumping via thunk disallow
6601 sibling call optimization for non z10 compiles.
6602 (s390_emit_call): Force indirect branch target to be a single
6603 register. Add r1 clobber for non-z10 compiles.
6604 (s390_emit_epilogue): Emit return jump via return_use expander.
6605 (s390_reorg): Handle JUMP_INSNs as execute targets.
6606 (s390_option_override_internal): Perform validity checks for the
6607 new command line options.
6608 (s390_indirect_branch_attrvalue): New function.
6609 (s390_indirect_branch_settings): New function.
6610 (s390_set_current_function): Invoke s390_indirect_branch_settings.
6611 (s390_output_indirect_thunk_function): New function.
6612 (s390_code_end): Implement target hook.
6613 (s390_case_values_threshold): Implement target hook.
6614 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
6615 macros.
6616 * config/s390/s390.h (struct s390_frame_layout)
6617 (struct machine_function): Move here from s390.c.
6618 (TARGET_INDIRECT_BRANCH_NOBP_RET)
6619 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
6620 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
6621 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
6622 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
6623 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
6624 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
6625 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
6626 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
6627 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
6628 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
6629 (mnemonic attribute): Add values which aren't recognized
6630 automatically.
6631 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
6632 pattern for branch conversion. Fix mnemonic attribute.
6633 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
6634 indirect branch via thunk if requested.
6635 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
6636 ("*indirect_jump"): Disable for branch conversion using out of
6637 line thunks.
6638 ("indirect_jump_via_thunk<mode>_z10")
6639 ("indirect_jump_via_thunk<mode>")
6640 ("indirect_jump_via_inlinethunk<mode>_z10")
6641 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
6642 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
6643 ("casesi_jump_via_inlinethunk<mode>_z10")
6644 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
6645 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
6646 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
6647 ("*indirect2_jump"): Disable for branch conversion.
6648 ("casesi_jump"): Turn into expander and expand patterns for branch
6649 conversion.
6650 ("return_use"): New expander.
6651 ("*return"): Emit return via thunk and rename it to ...
6652 ("*return<mode>"): ... this one.
6653 * config/s390/s390.opt: Add new options and and enum for the
6654 option values.
6655
6656 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
6657
6658 * lra-constraints.c (match_reload): Unconditionally use
6659 gen_lowpart_SUBREG, rather than selecting between that
6660 and equivalent gen_rtx_SUBREG code.
6661
6662 2018-02-08 Richard Biener <rguenther@suse.de>
6663
6664 PR tree-optimization/84233
6665 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
6666 changed flag instead of boguously re-using phi_inserted.
6667
6668 2018-02-08 Martin Jambor <mjambor@suse.cz>
6669
6670 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
6671 static local variables.
6672
6673 2018-02-08 Richard Biener <rguenther@suse.de>
6674
6675 PR tree-optimization/84278
6676 * tree-vect-stmts.c (vectorizable_store): When looking for
6677 smaller vector types to perform grouped strided loads/stores
6678 make sure the mode is supported by the target.
6679 (vectorizable_load): Likewise.
6680
6681 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
6682
6683 * config/aarch64/aarch64.c (aarch64_components_for_bb):
6684 Increase LDP/STP opportunities by adding adjacent callee-saves.
6685
6686 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
6687
6688 PR rtl-optimization/84068
6689 PR rtl-optimization/83459
6690 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
6691
6692 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
6693
6694 PR tree-optimization/84224
6695 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
6696 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
6697 non-zero arguments.
6698
6699 2018-02-07 Iain Sandoe <iain@codesourcery.com>
6700
6701 PR target/84113
6702 * config/rs6000/altivec.md (*restore_world): Remove LR use.
6703 * config/rs6000/predicates.md (restore_world_operation): Adjust op
6704 count, remove one USE.
6705
6706 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
6707
6708 * doc/install.texi (Configuration): Document the
6709 --with-long-double-format={ibm,ieee} PowerPC configuration
6710 options.
6711
6712 PR target/84154
6713 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
6714 Convert from define_expand to be define_insn_and_split. Rework
6715 float/double/_Float128 conversions to QI/HI/SImode to work with
6716 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
6717 conversions to QI/HImode types did a store and then a load to
6718 truncate the value. For conversions to VSX registers, don't split
6719 the insn, instead emit the code directly. Use the code iterator
6720 any_fix to combine signed and unsigned conversions.
6721 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
6722 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
6723 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
6724 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
6725 (fix_<mode>di2_hw): Likewise.
6726 (fixuns_<mode>di2_hw): Likewise.
6727 (fix_<mode>si2_hw): Likewise.
6728 (fixuns_<mode>si2_hw): Likewise.
6729 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
6730 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
6731 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
6732 fix<uns>_trunc<SFDF:mode>si2_p8.
6733 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer
6734 used.
6735 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
6736 (fix<uns>_<mode>_mem): Likewise.
6737 (fctiw<u>z_<mode>_mem): Likewise.
6738 (fix<uns>_<mode>_mem): Likewise.
6739 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
6740 the register allocator from doing a direct move to the GPRs to do
6741 a store, and instead use the ISA 3.0 store byte/half-word from
6742 vector register instruction. For IEEE 128-bit floating point,
6743 also optimize stores of 32-bit ints.
6744 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
6745
6746 2018-02-07 Alan Hayward <alan.hayward@arm.com>
6747
6748 * genextract.c (push_pathstr_operand): New function to support
6749 [a-zA-Z].
6750 (walk_rtx): Call push_pathstr_operand.
6751 (print_path): Support [a-zA-Z].
6752
6753 2018-02-07 Richard Biener <rguenther@suse.de>
6754
6755 PR tree-optimization/84037
6756 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
6757 (cse_and_gimplify_to_preheader): Declare.
6758 (vect_get_place_in_interleaving_chain): Likewise.
6759 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
6760 ivexpr_map.
6761 (_loop_vec_info::~_loop_vec_info): Delete it.
6762 (cse_and_gimplify_to_preheader): New function.
6763 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
6764 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
6765 (vectorizable_load): Likewise. For grouped stores always base
6766 the IV on the first element.
6767 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
6768 condition before gimplifying.
6769
6770 2018-02-07 Jakub Jelinek <jakub@redhat.com>
6771
6772 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
6773 *DIV_EXPR and *MOD_EXPR.
6774
6775 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
6776
6777 PR target/84248
6778 * config/i386/i386.c (ix86_option_override_internal): Mask out
6779 the CF_SET bit when checking -fcf-protection.
6780
6781 2018-02-07 Tom de Vries <tom@codesourcery.com>
6782
6783 PR libgomp/84217
6784 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
6785 enough.
6786
6787 2018-02-07 Richard Biener <rguenther@suse.de>
6788
6789 PR tree-optimization/84204
6790 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
6791 this place.
6792
6793 PR tree-optimization/84205
6794 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
6795 special-case isl_ast_op_zdiv_r.
6796
6797 PR tree-optimization/84223
6798 * graphite-scop-detection.c (gather_bbs::before_dom_children):
6799 Only add conditions from within the region.
6800 (gather_bbs::after_dom_children): Adjust.
6801
6802 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
6803
6804 PR target/84209
6805 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
6806 * config/avr/avr.md: Only post-reload split REG-REG moves if
6807 either register is GENERAL_REG_P.
6808
6809 2018-02-07 Jakub Jelinek <jakub@redhat.com>
6810
6811 PR tree-optimization/84235
6812 * tree-ssa-scopedtables.c
6813 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
6814 if the subtraction is performed in floating point type where NaNs are
6815 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
6816 build 1. Formatting fix.
6817
6818 2018-02-06 Jakub Jelinek <jakub@redhat.com>
6819
6820 PR target/84146
6821 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
6822 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
6823 and skip it regardless of bb boundaries. Use CALL_P macro,
6824 don't test INSN_P (insn) together with CALL_P or JUMP_P check
6825 unnecessarily, formatting fix.
6826
6827 2018-02-06 Michael Collison <michael.collison@arm.com>
6828
6829 * config/arm/thumb2.md:
6830 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
6831 (*thumb_mov_notscc): Ditto.
6832
6833 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
6834
6835 PR target/84154
6836 * config/rs6000/rs6000.md (su code attribute): Use "u" for
6837 unsigned_fix, not "s".
6838
6839 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6840
6841 * configure.ac (gcc_fn_eh_frame_ro): New function.
6842 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
6843 correct .eh_frame permissions.
6844 * configure: Regenerate.
6845
6846 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
6847
6848 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
6849 irrelevant options.
6850
6851 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
6852
6853 * config/rs6000/rs6000.c (rs6000_option_override_internal):
6854 Display warning message for -mno-speculate-indirect-jumps.
6855
6856 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
6857
6858 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
6859 Undocumented.
6860 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
6861
6862 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
6863
6864 PR tree-optimization/84225
6865 * tree-eh.c (find_trapping_overflow): Only call
6866 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
6867
6868 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
6869
6870 PR target/84145
6871 * config/i386/i386.c: Reimplement the check of possible options
6872 -mibt/-mshstk conbination. Change error messages.
6873 * doc/invoke.texi: Fix a typo: remove extra '='.
6874
6875 2018-02-06 Marek Polacek <polacek@redhat.com>
6876
6877 PR tree-optimization/84228
6878 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
6879
6880 2018-02-06 Tamar Christina <tamar.christina@arm.com>
6881
6882 PR target/82641
6883 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
6884 emitted arch directives.
6885 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
6886 __ARM_FEATURE_COPROC before changing architectures.
6887
6888 2018-02-06 Richard Biener <rguenther@suse.de>
6889
6890 * config/i386/i386.c (print_reg): Fix typo.
6891 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
6892
6893 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
6894
6895 * configure: Regenerate.
6896
6897 2018-02-05 Martin Sebor <msebor@redhat.com>
6898
6899 PR tree-optimization/83369
6900 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
6901 inlining context.
6902
6903 2018-02-05 Martin Liska <mliska@suse.cz>
6904
6905 * doc/invoke.texi: Cherry-pick upstream r323995.
6906
6907 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
6908
6909 * ira.c (ira_init_register_move_cost): Adjust comment.
6910
6911 2018-02-05 Martin Liska <mliska@suse.cz>
6912
6913 PR gcov-profile/84137
6914 * doc/gcov.texi: Fix typo in documentation.
6915
6916 2018-02-05 Martin Liska <mliska@suse.cz>
6917
6918 PR gcov-profile/83879
6919 * doc/gcov.texi: Document necessity of --dynamic-list-data when
6920 using dlopen functionality.
6921
6922 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
6923
6924 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
6925 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
6926 _mm_maskz_range_ss, _mm_mask_range_round_ss,
6927 _mm_maskz_range_round_ss): New intrinsics.
6928 (__builtin_ia32_rangesd128_round)
6929 (__builtin_ia32_rangess128_round): Remove.
6930 (__builtin_ia32_rangesd128_mask_round,
6931 __builtin_ia32_rangess128_mask_round): New builtins.
6932 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
6933 __builtin_ia32_rangess128_round): Remove.
6934 (__builtin_ia32_rangesd128_mask_round,
6935 __builtin_ia32_rangess128_mask_round): New builtins.
6936 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
6937 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
6938 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
6939 "<round_saeonly_constraint>")): Changed to ...
6940 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
6941 "<round_saeonly_scalar_constraint>")): ... this.
6942 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
6943 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
6944 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
6945 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
6946 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
6947
6948 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
6949
6950 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
6951 options.
6952 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
6953 Remove all values except native, 8540 and 8548.
6954
6955 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
6956
6957 * config/i386/i386.c (ix86_output_function_return): Pass
6958 INVALID_REGNUM, instead of -1, as invalid register number to
6959 indirect_thunk_name and output_indirect_thunk.
6960
6961 2018-02-02 Julia Koval <julia.koval@intel.com>
6962
6963 * config.gcc: Add -march=icelake.
6964 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
6965 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
6966 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
6967 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
6968 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
6969 (processor_target_table): Add icelake.
6970 (ix86_option_override_internal): Handle new PTAs.
6971 (get_builtin_code_for_version): Handle icelake.
6972 (M_INTEL_COREI7_ICELAKE): New.
6973 (fold_builtin_cpu): Handle icelake.
6974 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
6975 * doc/invoke.texi: Add -march=icelake.
6976
6977 2018-02-02 Julia Koval <julia.koval@intel.com>
6978
6979 * config/i386/i386.c (ix86_option_override_internal): Change flags type
6980 to wide_int_bitmask.
6981 * wide-int-bitmask.h: New.
6982
6983 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
6984
6985 PR target/84066
6986 * config/i386/i386.md: Replace Pmode with word_mode in
6987 builtin_setjmp_setup and builtin_longjmp to support x32.
6988
6989 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
6990
6991 PR target/56010
6992 PR target/83743
6993 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
6994 #include "opts.h".
6995 (rs6000_supported_cpu_names): New static variable.
6996 (linux_cpu_translation_table): Likewise.
6997 (elf_platform) <cpu>: Define new static variable and use it.
6998 Translate kernel AT_PLATFORM name to canonical name if needed.
6999 Error if platform name is unknown.
7000
7001 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
7002
7003 PR target/84089
7004 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
7005
7006 2018-02-01 Jeff Law <law@redhat.com>
7007
7008 PR target/84128
7009 * config/i386/i386.c (release_scratch_register_on_entry): Add new
7010 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
7011 the scratch if RELEASE_VIA_POP is false.
7012 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
7013 If we have to save a temporary register, decrement SIZE appropriately.
7014 Pass new arguments to release_scratch_register_on_entry.
7015 (ix86_adjust_stack_and_probe): Likewise.
7016 (ix86_emit_probe_stack_range): Pass new arguments to
7017 release_scratch_register_on_entry.
7018
7019 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
7020
7021 PR rtl-optimization/84157
7022 * combine.c (change_zero_ext): Use REG_P predicate in
7023 front of HARD_REGISTER_P predicate.
7024
7025 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
7026
7027 * config/avr/avr.c (avr_option_override): Move disabling of
7028 -fdelete-null-pointer-checks to...
7029 * common/config/avr/avr-common.c (avr_option_optimization_table):
7030 ...here.
7031
7032 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7033
7034 PR tree-optimization/81635
7035 * tree-data-ref.c (split_constant_offset_1): For types that
7036 wrap on overflow, try to use range info to prove that wrapping
7037 cannot occur.
7038
7039 2018-02-01 Renlin Li <renlin.li@arm.com>
7040
7041 PR target/83370
7042 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
7043 TAILCALL_ADDR_REGS.
7044 (aarch64_register_move_cost): Likewise.
7045 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
7046 TAILCALL_ADDR_REGS.
7047 (REG_CLASS_NAMES): Likewise.
7048 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
7049 TAILCALL_ADDR_REGS. Remove IP registers.
7050 * config/aarch64/aarch64.md (Ucs): Update register constraint.
7051
7052 2018-02-01 Richard Biener <rguenther@suse.de>
7053
7054 * domwalk.h (dom_walker::dom_walker): Add additional constructor
7055 for specifying RPO order and allow NULL for that.
7056 * domwalk.c (dom_walker::dom_walker): Likewise.
7057 (dom_walker::walk): Handle NULL RPO order.
7058 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
7059 in RPO order.
7060 (rewrite_update_dom_walker): Likewise.
7061 (mark_def_dom_walker): Likewise.
7062
7063 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7064
7065 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
7066 (aarch64_maybe_expand_sve_subreg_move): Declare.
7067 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
7068 * config/aarch64/predicates.md (aarch64_any_register_operand): New
7069 predicate.
7070 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
7071 that are semantically a reverse operation.
7072 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
7073 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
7074 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
7075 functions.
7076 (aarch64_can_change_mode_class): For big-endian, forbid changes
7077 between two SVE modes if they have different element sizes.
7078
7079 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7080
7081 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
7082 the TImode handling for big-endian targets.
7083
7084 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7085
7086 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
7087 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
7088 not just bytes.
7089 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
7090 Remove BSWAP handing for big-endian targets and use the form of
7091 LD1RQ appropariate for the mode.
7092
7093 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7094
7095 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
7096 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
7097 duplicated element.
7098
7099 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
7100
7101 PR tearget/83845
7102 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
7103 check for operands that need to go through aarch64_sve_reload_be.
7104
7105 2018-02-01 Jakub Jelinek <jakub@redhat.com>
7106
7107 PR tree-optimization/81661
7108 PR tree-optimization/84117
7109 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
7110 * tree-eh.c: Include gimplify.h.
7111 (find_trapping_overflow, replace_trapping_overflow,
7112 rewrite_to_non_trapping_overflow): New functions.
7113 * tree-vect-loop.c: Include tree-eh.h.
7114 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
7115 * tree-data-ref.c: Include tree-eh.h.
7116 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
7117
7118 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
7119
7120 PR rtl-optimization/84123
7121 * combine.c (change_zero_ext): Check if hard register satisfies
7122 can_change_dest_mode before calling gen_lowpart_SUBREG.
7123
7124 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
7125
7126 PR target/82444
7127 * ira.c (ira_init_register_move_cost): Remove assert.
7128
7129 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
7130
7131 PR rtl-optimization/84071
7132 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
7133 * doc/tm.texi: Regenerate.
7134
7135 2018-01-31 Richard Biener <rguenther@suse.de>
7136
7137 PR tree-optimization/84132
7138 * tree-data-ref.c (analyze_miv_subscript): Properly
7139 check whether evolution_function_is_affine_multivariate_p
7140 before calling gcd_of_steps_may_divide_p.
7141
7142 2018-01-31 Julia Koval <julia.koval@intel.com>
7143
7144 PR target/83618
7145 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
7146 * config/i386/i386.md (rdpid_rex64) New.
7147 (rdpid): Make 32bit only.
7148
7149 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
7150
7151 PR lto/84105
7152 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
7153 an IDENTIFIER_NODE for FUNCTION_TYPE's.
7154
7155 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
7156
7157 Revert
7158 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
7159
7160 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
7161
7162 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
7163
7164 PR rtl-optimization/84071
7165 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
7166 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
7167
7168 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
7169
7170 * config/arc/arc.c (arc_handle_aux_attribute): New function.
7171 (arc_attribute_table): Add 'aux' attribute.
7172 (arc_in_small_data_p): Consider aux like variables.
7173 (arc_is_aux_reg_p): New function.
7174 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
7175 (arc_get_aux_arg): New function.
7176 (prepare_move_operands): Handle aux-register access.
7177 (arc_handle_aux_attribute): New function.
7178 * doc/extend.texi (ARC Variable attributes): Add subsection.
7179
7180 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
7181
7182 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
7183 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
7184 (arc_attribute_table): Add 'uncached' attribute.
7185 (arc_print_operand): Print '.di' flag for uncached memory
7186 accesses.
7187 (arc_in_small_data_p): Do not consider for small data the uncached
7188 types.
7189 (arc_is_uncached_mem_p): New function.
7190 * config/arc/predicates.md (compact_store_memory_operand): Check
7191 for uncached memory accesses.
7192 (nonvol_nonimm_operand): Likewise.
7193 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
7194
7195 2018-01-31 Jakub Jelinek <jakub@redhat.com>
7196
7197 PR c/84100
7198 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
7199 falign-loops=): Add Optimization flag.
7200
7201 2018-01-30 Jeff Law <law@redhat.com>
7202
7203 PR target/84064
7204 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
7205 INT_REGISTERS_SAVED. Check it prior to calling
7206 get_scratch_register_on_entry.
7207 (ix86_adjust_stack_and_probe): Similarly.
7208 (ix86_emit_probe_stack_range): Similarly.
7209 (ix86_expand_prologue): Corresponding changes.
7210
7211 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7212
7213 PR target/40411
7214 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
7215 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
7216
7217 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
7218
7219 PR target/84112
7220 * lra-constraints.c (curr_insn_transform): Process AND in the
7221 address.
7222
7223 2018-01-30 Jakub Jelinek <jakub@redhat.com>
7224
7225 PR rtl-optimization/83986
7226 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
7227 dependence against last_pending_memory_flush in addition to
7228 pending_jump_insns.
7229
7230 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
7231
7232 PR tree-optimization/81611
7233 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
7234 copies.
7235
7236 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
7237
7238 PR target/83758
7239 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
7240 a reg rtx.
7241
7242 2018-01-30 Richard Biener <rguenther@suse.de>
7243 Jakub Jelinek <jakub@redhat.com>
7244
7245 PR tree-optimization/84111
7246 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
7247 inner loops added during recursion, as they don't have up-to-date
7248 SSA form.
7249
7250 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
7251
7252 PR ipa/81360
7253 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
7254 (can_inline_edge_by_limits_p): ... here.
7255 (can_early_inline_edge_p, check_callers,
7256 update_caller_keys, update_callee_keys, recursive_inlining,
7257 add_new_edges_to_heap, speculation_useful_p,
7258 inline_small_functions,
7259 inline_small_functions, flatten_function,
7260 inline_to_all_callers_1): Update.
7261
7262 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
7263
7264 * profile-count.c (profile_count::combine_with_ipa_count): Handle
7265 zeros correctly.
7266
7267 2018-01-30 Richard Biener <rguenther@suse.de>
7268
7269 PR tree-optimization/83008
7270 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
7271 invariant and constant vector uses in stmts when they need
7272 more than one stmt.
7273
7274 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7275
7276 PR bootstrap/84017
7277 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
7278 * configure: Regenerate.
7279
7280 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
7281
7282 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
7283 pattern.
7284 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
7285 Use gen_rtx_REG rather than gen_lowpart.
7286
7287 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
7288
7289 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
7290 rather than 0 when creating partial subregs.
7291
7292 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
7293
7294 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
7295 of usage.
7296
7297 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
7298
7299 PR target/81550
7300 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
7301 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
7302 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
7303 flags. This restores the settings used before the 2017-07-24.
7304 Turning off pre increment/decrement/modify allows IVOPTS to
7305 optimize DF/SF loops where the index is an int.
7306
7307 2018-01-29 Richard Biener <rguenther@suse.de>
7308 Kelvin Nilsen <kelvin@gcc.gnu.org>
7309
7310 PR bootstrap/80867
7311 * tree-vect-stmts.c (vectorizable_call): Don't call
7312 targetm.vectorize_builtin_md_vectorized_function if callee is
7313 NULL.
7314
7315 2018-01-22 Carl Love <cel@us.ibm.com>
7316
7317 * doc/extend.tex: Fix typo in second arg in
7318 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
7319
7320 2018-01-29 Richard Biener <rguenther@suse.de>
7321
7322 PR tree-optimization/84086
7323 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
7324 (flush_ssaname_freelist): When SSA names were released reset
7325 the SCEV hash table.
7326
7327 2018-01-29 Richard Biener <rguenther@suse.de>
7328
7329 PR tree-optimization/84057
7330 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
7331 removed paths when removing edges.
7332
7333 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
7334
7335 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
7336 -mfunction-return=@var{choice}.
7337
7338 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
7339
7340 PR diagnostic/84034
7341 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
7342 Handle CR like TAB.
7343 (layout::print_source_line): Likewise.
7344 (test_get_line_width_without_trailing_whitespace): Add test cases.
7345
7346 2018-01-27 Jakub Jelinek <jakub@redhat.com>
7347
7348 PR middle-end/84040
7349 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
7350 debug insns.
7351
7352 2018-01-26 Jim Wilson <jimw@sifive.com>
7353
7354 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
7355
7356 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
7357 specified.
7358
7359 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7360
7361 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
7362 and CMP + SUB-immediate -> SUBS.
7363
7364 2018-01-26 Martin Sebor <msebor@redhat.com>
7365
7366 PR tree-optimization/83896
7367 * tree-ssa-strlen.c (get_string_len): Rename...
7368 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
7369 Avoid assuming length is constant.
7370 (handle_char_store): Use HOST_WIDE_INT for string length.
7371
7372 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
7373
7374 PR target/81763
7375 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
7376 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
7377
7378 2018-01-26 Richard Biener <rguenther@suse.de>
7379
7380 PR rtl-optimization/84003
7381 * dse.c (record_store): Only record redundant stores when
7382 the earlier store aliases at least all accesses the later one does.
7383
7384 2018-01-26 Jakub Jelinek <jakub@redhat.com>
7385
7386 PR rtl-optimization/83985
7387 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
7388 REG_CFA_RESTORE insns.
7389 (delete_unmarked_insns): Don't ignore separate shrink wrapping
7390 REG_CFA_RESTORE insns here.
7391
7392 PR c/83989
7393 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
7394 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
7395
7396 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
7397
7398 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
7399 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
7400 (arc_init): Likewise.
7401 (arc_override_options): Likewise.
7402 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
7403 value.
7404 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
7405 support.
7406 * config/arc/arc.h (TARGET_DBNZ): Define.
7407 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
7408 properly set the tune attribute.
7409 (dbnz): Use TARGET_DBNZ guard.
7410 * config/arc/arc.opt (mtune): Add core3 option.
7411
7412 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
7413
7414 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
7415 recognize new pic like addresses.
7416 (arc_delegitimize_address): Clean up.
7417
7418 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
7419
7420 * config/arc/arc-arches.def: Option mrf16 valid for all
7421 architectures.
7422 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
7423 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
7424 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
7425 * config/arc/arc-tables.opt: Regenerate.
7426 * config/arc/arc.c (arc_conditional_register_usage): Handle
7427 reduced register file case.
7428 (arc_file_start): Set must have build attributes.
7429 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
7430 mrf16 option value.
7431 * config/arc/arc.opt (mrf16): Add new option.
7432 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
7433 * config/arc/genmultilib.awk: Handle new mrf16 option.
7434 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
7435 * config/arc/t-multilib: Regenerate.
7436 * doc/invoke.texi (ARC Options): Document mrf16 option.
7437
7438 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
7439
7440 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
7441 * config/arc/arc.c (arc_handle_secure_attribute): New function.
7442 (arc_attribute_table): Add 'secure_call' attribute.
7443 (arc_print_operand): Print secure call operand.
7444 (arc_function_ok_for_sibcall): Don't optimize tail calls when
7445 secure.
7446 (arc_is_secure_call_p): New function. * config/arc/arc.md
7447 (call_i): Add support for sjli instruction.
7448 (call_value_i): Likewise.
7449 * config/arc/constraints.md (Csc): New constraint.
7450
7451 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
7452 John Eric Martin <John.Martin@emmicro-us.com>
7453
7454 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
7455 * config/arc/arc.c (_arc_jli_section): New struct.
7456 (arc_jli_section): New type.
7457 (rc_jli_sections): New static variable.
7458 (arc_handle_jli_attribute): New function.
7459 (arc_attribute_table): Add jli_always and jli_fixed attribute.
7460 (arc_file_end): New function.
7461 (TARGET_ASM_FILE_END): Define.
7462 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
7463 (arc_add_jli_section): New function.
7464 (jli_call_scan): Likewise.
7465 (arc_reorg): Call jli_call_scan.
7466 (arc_output_addsi): Remove 'S' from printing asm operand.
7467 (arc_is_jli_call_p): New function.
7468 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
7469 operand.
7470 (movhi_insn): Likewise.
7471 (movsi_insn): Likewise.
7472 (movsi_set_cc_insn): Likewise.
7473 (loadqi_update): Likewise.
7474 (load_zeroextendqisi_update): Likewise.
7475 (load_signextendqisi_update): Likewise.
7476 (loadhi_update): Likewise.
7477 (load_zeroextendhisi_update): Likewise.
7478 (load_signextendhisi_update): Likewise.
7479 (loadsi_update): Likewise.
7480 (loadsf_update): Likewise.
7481 (movsicc_insn): Likewise.
7482 (bset_insn): Likewise.
7483 (bxor_insn): Likewise.
7484 (bclr_insn): Likewise.
7485 (bmsk_insn): Likewise.
7486 (bicsi3_insn): Likewise.
7487 (cmpsi_cc_c_insn): Likewise.
7488 (movsi_ne): Likewise.
7489 (movsi_cond_exec): Likewise.
7490 (clrsbsi2): Likewise.
7491 (norm_f): Likewise.
7492 (normw): Likewise.
7493 (swap): Likewise.
7494 (divaw): Likewise.
7495 (flag): Likewise.
7496 (sr): Likewise.
7497 (kflag): Likewise.
7498 (ffs): Likewise.
7499 (ffs_f): Likewise.
7500 (fls): Likewise.
7501 (call_i): Remove 'S' asm letter, add jli instruction.
7502 (call_value_i): Likewise.
7503 * config/arc/arc.op (mjli-always): New option.
7504 * config/arc/constraints.md (Cji): New constraint.
7505 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
7506 operand.
7507 (subsf3_fpx): Likewise.
7508 (mulsf3_fpx): Likewise.
7509 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
7510 asm operand.
7511 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
7512 function attrbutes.
7513 * doc/invoke.texi (ARC): Document mjli-always option.
7514
7515 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
7516
7517 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
7518 avoid addition with 0 and use incw and decw where possible.
7519
7520 2018-01-26 Richard Biener <rguenther@suse.de>
7521
7522 PR tree-optimization/81082
7523 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
7524 association if it requires casting to unsigned.
7525 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
7526 from fold_plusminus_mult_expr to catch important cases late when
7527 range info is available.
7528
7529 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7530
7531 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
7532 * configure.ac (hidden_linkonce): New test.
7533 * configure: Regenerate.
7534 * config.in: Regenerate.
7535
7536 2018-01-26 Julia Koval <julia.koval@intel.com>
7537
7538 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
7539 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
7540 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
7541 _mm_mask_bitshuffle_epi64_mask): Fix type.
7542 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
7543 USI_FTYPE_V4DI_V4DI_USI): Remove.
7544 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
7545 __builtin_ia32_vpshufbitqmb256_mask,
7546 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
7547 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
7548 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
7549
7550 2018-01-26 Alan Modra <amodra@gmail.com>
7551
7552 PR target/84033
7553 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
7554 UNSPEC_VBPERMQ. Sort other unspecs.
7555
7556 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
7557
7558 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
7559
7560 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
7561
7562 PR middle-end/83055
7563 * predict.c (drop_profile): Do not push/pop cfun; update also
7564 node->count.
7565 (handle_missing_profiles): Fix logic looking for zero profiles.
7566
7567 2018-01-25 Jakub Jelinek <jakub@redhat.com>
7568
7569 PR middle-end/83977
7570 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
7571 on functions with #pragma omp declare simd or functions with simd
7572 attribute.
7573 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
7574 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
7575 Remove trailing \n from warning_at calls.
7576
7577 2018-01-25 Tom de Vries <tom@codesourcery.com>
7578
7579 PR target/84028
7580 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
7581 for neutered workers.
7582
7583 2018-01-24 Joseph Myers <joseph@codesourcery.com>
7584
7585 PR target/68467
7586 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
7587 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
7588
7589 2018-01-24 Jeff Law <law@redhat.com>
7590
7591 PR target/83994
7592 * i386.c (get_probe_interval): Move to earlier point.
7593 (ix86_compute_frame_layout): If -fstack-clash-protection and
7594 the frame is larger than the probe interval, then use pushes
7595 to save registers rather than reg->mem moves.
7596 (ix86_expand_prologue): Remove conditional for int_registers_saved
7597 assertion.
7598
7599 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
7600
7601 PR target/84014
7602 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
7603 min/max for never referenced object.
7604
7605 2018-01-24 Jakub Jelinek <jakub@redhat.com>
7606
7607 PR middle-end/83977
7608 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
7609 here.
7610 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
7611 attributes from DECL_ATTRIBUTES (decl) without affecting
7612 DECL_ATTRIBUTES (current_function_decl).
7613 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
7614 functions with non-NULL DECL_ABSTRACT_ORIGIN.
7615
7616 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
7617
7618 PR tree-optimization/83979
7619 * fold-const.c (fold_comparison): Use constant_boolean_node
7620 instead of boolean_{true,false}_node.
7621
7622 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
7623
7624 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
7625 with zero counts.
7626
7627 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7628
7629 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
7630 Simplify the clause that sets the length attribute.
7631 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
7632 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
7633 clause that sets the length attribute.
7634 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
7635
7636 2018-01-24 Tom de Vries <tom@codesourcery.com>
7637
7638 PR target/83589
7639 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
7640 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
7641 Add strict parameter.
7642 (prevent_branch_around_nothing): Insert dummy insn between branch to
7643 label and label with no ptx insn inbetween.
7644 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
7645
7646 2018-01-24 Tom de Vries <tom@codesourcery.com>
7647
7648 PR target/81352
7649 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
7650 for neutered threads in warp.
7651 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
7652
7653 2018-01-24 Richard Biener <rguenther@suse.de>
7654
7655 PR tree-optimization/83176
7656 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
7657 operands.
7658
7659 2018-01-24 Richard Biener <rguenther@suse.de>
7660
7661 PR tree-optimization/82819
7662 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
7663 code generating pluses that are no-ops in the target precision.
7664
7665 2018-01-24 Richard Biener <rguenther@suse.de>
7666
7667 PR middle-end/84000
7668 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
7669
7670 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
7671
7672 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
7673 to merge probabilities.
7674 * predict.c (probably_never_executed): Also mark as cold functions
7675 with global 0 profile and guessed local profile.
7676 * profile-count.c (profile_probability::combine_with_count): New
7677 member function.
7678 * profile-count.h (profile_probability::operator*,
7679 profile_probability::operator*=, profile_probability::operator/,
7680 profile_probability::operator/=): Reduce precision to adjusted
7681 and set value to guessed on contradictory divisions.
7682 (profile_probability::combine_with_freq): Remove.
7683 (profile_probability::combine_wiht_count): Declare.
7684 (profile_count::force_nonzero):: Set to adjusted.
7685 (profile_count::probability_in):: Set quality to adjusted.
7686 * tree-ssa-tail-merge.c (replace_block_by): Use
7687 combine_with_count.
7688
7689 2018-01-23 Andrew Waterman <andrew@sifive.com>
7690 Jim Wilson <jimw@sifive.com>
7691
7692 * config/riscv/riscv.c (riscv_stack_boundary): New.
7693 (riscv_option_override): Set riscv_stack_boundary. Handle
7694 riscv_preferred_stack_boundary_arg.
7695 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
7696 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
7697 (STACK_BOUNDARY): Set to riscv_stack_boundary.
7698 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
7699 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
7700 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
7701
7702 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
7703
7704 PR target/83905
7705 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
7706 of struct ix86_frame.
7707 (ix86_expand_epilogue): Likewise. Add a local variable for
7708 the reg_save_offset field in struct ix86_frame.
7709
7710 2018-01-23 Bin Cheng <bin.cheng@arm.com>
7711
7712 PR tree-optimization/82604
7713 * tree-loop-distribution.c (enum partition_kind): New enum item
7714 PKIND_PARTIAL_MEMSET.
7715 (partition_builtin_p): Support above new enum item.
7716 (generate_code_for_partition): Ditto.
7717 (compute_access_range): Differentiate cases that equality can be
7718 proven at all loops, the innermost loops or no loops.
7719 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
7720 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
7721 (finalize_partitions, distribute_loop): Don't fuse partition of
7722 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
7723 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
7724 parloop is enabled.
7725
7726 2018-01-23 Martin Liska <mliska@suse.cz>
7727
7728 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
7729 order to ignore the predictor.
7730 (PRED_POLYMORPHIC_CALL): Likewise.
7731 (PRED_RECURSIVE_CALL): Likewise.
7732
7733 2018-01-23 Martin Liska <mliska@suse.cz>
7734
7735 * tree-profile.c (tree_profiling): Print function header to
7736 aware reader which function we are working on.
7737 * value-prof.c (gimple_find_values_to_profile): Do not print
7738 not interesting value histograms.
7739
7740 2018-01-23 Martin Liska <mliska@suse.cz>
7741
7742 * profile-count.h (enum profile_quality): Add
7743 profile_uninitialized as the first value. Do not number values
7744 as they are zero based.
7745 (profile_count::verify): Update sanity check.
7746 (profile_probability::verify): Likewise.
7747
7748 2018-01-23 Nathan Sidwell <nathan@acm.org>
7749
7750 * doc/invoke.texi (ffor-scope): Deprecate.
7751
7752 2018-01-23 David Malcolm <dmalcolm@redhat.com>
7753
7754 PR tree-optimization/83510
7755 * domwalk.c (set_all_edges_as_executable): New function.
7756 (dom_walker::dom_walker): Convert bool param
7757 "skip_unreachable_blocks" to enum reachability. Move setup of
7758 edge flags to set_all_edges_as_executable and only do it when
7759 reachability is REACHABLE_BLOCKS.
7760 * domwalk.h (enum dom_walker::reachability): New enum.
7761 (dom_walker::dom_walker): Convert bool param
7762 "skip_unreachable_blocks" to enum reachability.
7763 (set_all_edges_as_executable): New decl.
7764 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
7765 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
7766 "reachability".
7767 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
7768 but converting true to REACHABLE_BLOCKS.
7769 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
7770 * tree-vrp.c
7771 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
7772 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
7773 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
7774 REACHABLE_BLOCKS.
7775 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
7776 if check_all_array_refs will be called.
7777
7778 2018-01-23 David Malcolm <dmalcolm@redhat.com>
7779
7780 * tree.c (selftest::test_location_wrappers): Add more test
7781 coverage.
7782
7783 2018-01-23 David Malcolm <dmalcolm@redhat.com>
7784
7785 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
7786 (selftest::test_bit_in_range): Likewise.
7787
7788 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
7789
7790 PR testsuite/83888
7791 * doc/sourcebuild.texi (vect_float): Say that the selector
7792 only describes the situation when -funsafe-math-optimizations is on.
7793 (vect_float_strict): Document.
7794
7795 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
7796
7797 PR tree-optimization/83965
7798 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
7799 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
7800 instead of checking only for a reduction.
7801 (vect_recog_widen_sum_pattern): Likewise.
7802
7803 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
7804
7805 * predict.c (probably_never_executed): Only use precise profile info.
7806 (compute_function_frequency): Skip after inlining hack since we now
7807 have quality checking.
7808
7809 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
7810
7811 * profile-count.h (profile_probability::very_unlikely,
7812 profile_probability::unlikely, profile_probability::even): Set
7813 precision to guessed.
7814
7815 2018-01-23 Richard Biener <rguenther@suse.de>
7816
7817 PR tree-optimization/83963
7818 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
7819 Properly terminate dominator walk when crossing the exit edge not
7820 when visiting its source block.
7821
7822 2018-01-23 Jakub Jelinek <jakub@redhat.com>
7823
7824 PR c++/83918
7825 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
7826 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
7827
7828 2018-01-22 Jakub Jelinek <jakub@redhat.com>
7829
7830 PR tree-optimization/83957
7831 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
7832 semicolon after for body surrounded by braces.
7833
7834 PR tree-optimization/83081
7835 * profile-count.h (profile_probability::split): New method.
7836 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
7837 Use profile_probability::split.
7838 (do_compare_rtx_and_jump): Fix adjustment of probabilities
7839 when splitting a single conditional jump into 2.
7840
7841 2018-01-22 David Malcolm <dmalcolm@redhat.com>
7842
7843 PR tree-optimization/69452
7844 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
7845 decl.
7846
7847 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
7848
7849 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
7850 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
7851 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
7852
7853 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
7854
7855 * config/rl78/rl78-protos.h (rl78_split_movdi): New function declaration.
7856 * config/rl78/rl78.md (movdi): New define_expand.
7857 * config/rl78/rl78.c (rl78_split_movdi): New function.
7858
7859 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
7860
7861 PR target/83862
7862 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
7863 no longer used.
7864 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
7865 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
7866 128-bit to produce an UNSPEC move to get the double word with the
7867 signbit and then a shift directly to do signbit.
7868 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
7869 implementation with a new version that just does either a direct
7870 move or a regular move. Move memory interface to separate insns.
7871 Move insns so they are next to the expander.
7872 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
7873 with signbit move. Split big and little endian case.
7874 (signbit<mode>2_dm_mem_le): Likewise.
7875 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
7876 (signbit<mode>2_dm2): Likewise.
7877
7878 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
7879
7880 * config/rl78/rl78.md (anddi3): New define_expand.
7881
7882 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
7883
7884 * config/rl78/rl78.md (umindi3): New define_expand.
7885
7886 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
7887
7888 * config/rl78/rl78.md (smindi3): New define_expand.
7889
7890 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
7891
7892 * config/rl78/rl78.md (smaxdi3): New define_expand.
7893
7894 2018-01-22 Carl Love <cel@us.ibm.com>
7895
7896 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
7897 LVX_V1TI): Add macro expansion.
7898 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
7899 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
7900 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
7901 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
7902 Change check to determine if the instruction is a byte reversing
7903 entry. Fix typo in comment.
7904 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
7905 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
7906 Add def_builtin calls for new builtins.
7907 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
7908 Add define_insn expansion.
7909
7910 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
7911
7912 * config/rl78/rl78.md (umaxdi3): New define_expand.
7913
7914 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
7915
7916 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
7917 for non-QImode registers.
7918
7919 2018-01-22 Richard Biener <rguenther@suse.de>
7920
7921 PR tree-optimization/83963
7922 * graphite-scop-detection.c (scop_detection::get_sese): Delay
7923 including the loop exit block.
7924 (scop_detection::merge_sese): Likewise.
7925 (scop_detection::add_scop): Do it here instead.
7926
7927 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7928
7929 * doc/sourcebuild.texi (arm_softfloat): Document.
7930
7931 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
7932
7933 PR gcc/77734
7934 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
7935 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
7936 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
7937
7938 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
7939 David Edelsohn <dje.gcc@gmail.com>
7940
7941 PR target/83946
7942 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
7943 Change "crset eq" to "crset 2".
7944 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
7945 (*call_indirect_aix<mode>_nospec): Likewise.
7946 (*call_value_indirect_aix<mode>_nospec): Likewise.
7947 (*call_indirect_elfv2<mode>_nospec): Likewise.
7948 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
7949 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
7950 change assembly output from . to $.
7951 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
7952 (indirect_jump<mode>_nospec): Change assembly output from . to $.
7953 (*tablejump<mode>_internal1_nospec): Likewise.
7954
7955 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
7956
7957 PR target/80870
7958 * config/sh/sh_optimize_sett_clrt.cc:
7959 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
7960
7961 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
7962
7963 PR tree-optimization/83940
7964 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
7965 offset_dt to vect_constant_def rather than vect_unknown_def_type.
7966 (vect_check_load_store_mask): Add a mask_dt_out parameter and
7967 use it to pass back the definition type.
7968 (vect_check_store_rhs): Likewise rhs_dt_out.
7969 (vect_build_gather_load_calls): Add a mask_dt argument and use
7970 it instead of a call to vect_is_simple_use.
7971 (vectorizable_store): Update calls to vect_check_load_store_mask
7972 and vect_check_store_rhs. Use the dt returned by the latter instead
7973 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
7974 instead of calls to vect_is_simple_use. Pass the scalar rather
7975 than the vector operand to vect_is_simple_use when handling
7976 second and subsequent copies of an rhs value.
7977 (vectorizable_load): Update calls to vect_check_load_store_mask
7978 and vect_build_gather_load_calls. Use the cached mask_dt and
7979 gs_info.offset_dt instead of calls to vect_is_simple_use.
7980
7981 2018-01-20 Jakub Jelinek <jakub@redhat.com>
7982
7983 PR middle-end/83945
7984 * tree-emutls.c: Include gimplify.h.
7985 (lower_emutls_2): New function.
7986 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
7987 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
7988 it before further processing.
7989
7990 PR target/83930
7991 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
7992 UINTVAL (trueop1) instead of INTVAL (op1).
7993
7994 2018-01-19 Jakub Jelinek <jakub@redhat.com>
7995
7996 PR debug/81570
7997 PR debug/83728
7998 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
7999 INCOMING_FRAME_SP_OFFSET if not defined.
8000 (scan_trace): Add ENTRY argument. If true and
8001 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
8002 emit a note to adjust the CFA offset.
8003 (create_cfi_notes): Adjust scan_trace callers.
8004 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
8005 INCOMING_FRAME_SP_OFFSET in the CIE.
8006 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
8007 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
8008 Likewise.
8009 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
8010 * doc/tm.texi: Regenerated.
8011
8012 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8013
8014 PR rtl-optimization/83147
8015 * lra-constraints.c (remove_inheritance_pseudos): Use
8016 lra_substitute_pseudo_within_insn.
8017
8018 2018-01-19 Tom de Vries <tom@codesourcery.com>
8019 Cesar Philippidis <cesar@codesourcery.com>
8020
8021 PR target/83920
8022 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
8023
8024 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
8025
8026 PR target/83790
8027 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
8028 spaces for function labels.
8029
8030 2018-01-19 Martin Liska <mliska@suse.cz>
8031
8032 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
8033 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
8034 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
8035 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
8036 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
8037 (PRED_CONST_RETURN): Change from 69 to 65.
8038 (PRED_NULL_RETURN): Change from 91 to 71.
8039 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
8040 (PRED_LOOP_GUARD): Change from 66 to 73.
8041
8042 2018-01-19 Martin Liska <mliska@suse.cz>
8043
8044 * predict.c (predict_insn_def): Add new assert.
8045 (struct branch_predictor): Change type to signed integer.
8046 (test_prediction_value_range): Amend test to cover
8047 PROB_UNINITIALIZED.
8048 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
8049 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
8050 (PRED_LOOP_ITERATIONS_MAX): Likewise.
8051 (PRED_LOOP_IV_COMPARE): Likewise.
8052 * predict.h (PROB_UNINITIALIZED): Define new constant.
8053
8054 2018-01-19 Martin Liska <mliska@suse.cz>
8055
8056 * predict.c (dump_prediction): Add new format for
8057 analyze_brprob.py script which is enabled with -details
8058 suboption.
8059 * profile-count.h (precise_p): New function.
8060
8061 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
8062
8063 PR tree-optimization/83922
8064 * tree-vect-loop.c (vect_verify_full_masking): Return false if
8065 there are no statements that need masking.
8066 (vect_active_double_reduction_p): New function.
8067 (vect_analyze_loop_operations): Use it when handling phis that
8068 are not in the loop header.
8069
8070 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
8071
8072 PR tree-optimization/83914
8073 * tree-vect-loop.c (vectorizable_induction): Don't convert
8074 init_expr or apply the peeling adjustment for inductions
8075 that are nested within the vectorized loop.
8076
8077 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8078
8079 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
8080 instead of NEG.
8081
8082 2018-01-18 Jakub Jelinek <jakub@redhat.com>
8083
8084 PR sanitizer/81715
8085 PR testsuite/83882
8086 * function.h (gimplify_parameters): Add gimple_seq * argument.
8087 * function.c: Include gimple.h and options.h.
8088 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
8089 for the added local temporaries if needed.
8090 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
8091 if there are any parameter cleanups, wrap whole body into a
8092 try/finally with the cleanups.
8093
8094 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
8095
8096 PR target/82964
8097 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
8098 Use GET_MODE_CLASS for scalar floating point.
8099
8100 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
8101
8102 PR ipa/82256
8103 patch by PaX Team
8104 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
8105 Fix call of call_cgraph_insertion_hooks.
8106
8107 2018-01-18 Martin Sebor <msebor@redhat.com>
8108
8109 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
8110
8111 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
8112
8113 PR ipa/83619
8114 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
8115 frequencies.
8116
8117 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
8118
8119 PR other/70268
8120 * common.opt: (-ffile-prefix-map): New option.
8121 * opts.c (common_handle_option): Defer it.
8122 * opts-global.c (handle_common_deferred_options): Handle it.
8123 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
8124 * file-prefix-map.h: New file.
8125 (remap_debug_filename, add_debug_prefix_map): ...here.
8126 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
8127 * final.c (debug_prefix_map, add_debug_prefix_map
8128 remap_debug_filename): Move to...
8129 * file-prefix-map.c: New file.
8130 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
8131 generalize, get rid of alloca(), use strrchr() instead of strchr().
8132 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
8133 Implement in terms of add_prefix_map().
8134 (remap_macro_filename, remap_debug_filename): Implement in term of
8135 remap_filename().
8136 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
8137 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
8138 * dbxout.c: Include file-prefix-map.h.
8139 * varasm.c: Likewise.
8140 * vmsdbgout.c: Likewise.
8141 * xcoffout.c: Likewise.
8142 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
8143 * doc/cppopts.texi (-fmacro-prefix-map): Document.
8144 * doc/invoke.texi (-ffile-prefix-map): Document.
8145 (-fdebug-prefix-map): Update description.
8146
8147 2018-01-18 Martin Liska <mliska@suse.cz>
8148
8149 * config/i386/i386.c (indirect_thunk_name): Document that also
8150 lfence is emitted.
8151 (output_indirect_thunk): Document why both instructions
8152 (pause and lfence) are generated.
8153
8154 2018-01-18 Richard Biener <rguenther@suse.de>
8155
8156 PR tree-optimization/83887
8157 * graphite-scop-detection.c
8158 (scop_detection::get_nearest_dom_with_single_entry): Remove.
8159 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
8160 (scop_detection::merge_sese): Re-implement with a flood-fill
8161 algorithm that properly finds a SESE region if it exists.
8162
8163 2018-01-18 Jakub Jelinek <jakub@redhat.com>
8164
8165 PR c/61240
8166 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
8167 pointer_diff optimizations use view_convert instead of convert.
8168
8169 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8170
8171 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
8172 Generate different code for -mno-speculate-indirect-jumps.
8173 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
8174 (*call_indirect_aix<mode>): Disable for
8175 -mno-speculate-indirect-jumps.
8176 (*call_indirect_aix<mode>_nospec): New define_insn.
8177 (*call_value_indirect_aix<mode>): Disable for
8178 -mno-speculate-indirect-jumps.
8179 (*call_value_indirect_aix<mode>_nospec): New define_insn.
8180 (*sibcall_nonlocal_sysv<mode>): Generate different code for
8181 -mno-speculate-indirect-jumps.
8182 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
8183
8184 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
8185
8186 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
8187 long double type, set the flags for noting the default long double
8188 type, even if we don't pass or return a long double type.
8189
8190 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
8191
8192 PR ipa/83051
8193 * ipa-inline.c (flatten_function): Do not overwrite final inlining
8194 failure.
8195
8196 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
8197
8198 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
8199 support for merge[hl].
8200 (fold_mergehl_helper): New helper function.
8201 (tree-vector-builder.h): New #include for tree_vector_builder usage.
8202 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
8203 (altivec_vmrglw_direct): Add xxmrglw insn.
8204
8205 2018-01-17 Andrew Waterman <andrew@sifive.com>
8206
8207 * config/riscv/riscv.c (riscv_conditional_register_usage): If
8208 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
8209
8210 2018-01-17 David Malcolm <dmalcolm@redhat.com>
8211
8212 PR lto/83121
8213 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
8214 call the lto_location_cache before reading the
8215 DECL_SOURCE_LOCATION of the types.
8216
8217 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
8218 Richard Sandiford <richard.sandiford@linaro.org>
8219
8220 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
8221 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
8222 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
8223 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
8224 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
8225 Add declaration.
8226 * config/aarch64/constraints.md (aarch64_movti_operand):
8227 Limit immediates.
8228 * config/aarch64/predicates.md (Uti): Add new constraint.
8229
8230 2018-01-17 Carl Love <cel@us.ibm.com>
8231
8232 * config/rs6000/vsx.md (define_expand xl_len_r,
8233 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
8234 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
8235 lxvll.
8236 (define_expand, define_insn): Move the shift left from the
8237 define_insn to the define_expand for lxvl and stxvl instructions.
8238 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
8239 and XL_LEN_R definitions to PURE.
8240
8241 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
8242
8243 * config/i386/i386.c (indirect_thunk_name): Declare regno
8244 as unsigned int. Compare regno with INVALID_REGNUM.
8245 (output_indirect_thunk): Ditto.
8246 (output_indirect_thunk_function): Ditto.
8247 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
8248 in the call to output_indirect_thunk_function.
8249
8250 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
8251
8252 PR middle-end/83884
8253 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
8254 rather than the size of inner_type to determine the stack slot size
8255 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
8256
8257 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
8258
8259 PR target/83546
8260 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
8261 to PTA_SILVERMONT.
8262
8263 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
8264
8265 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
8266 endian Linux systems to optionally enable multilibs for selecting
8267 the long double type if the user configured an explicit type.
8268 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
8269 have no long double multilibs if not defined.
8270 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
8271 warn if the user used -mabi={ieee,ibm}longdouble and we built
8272 multilibs for long double.
8273 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
8274 appropriate multilib option.
8275 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
8276 multilib options.
8277 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
8278 for building long double multilibs.
8279 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
8280
8281 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
8282
8283 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
8284 copies.
8285
8286 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
8287 64 bits.
8288 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
8289 128 bits.
8290
8291 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
8292 variables.
8293
8294 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
8295 return value.
8296
8297 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
8298
8299 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
8300 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
8301
8302 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
8303
8304 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
8305 different rtl trees depending on TARGET_64BIT.
8306 (rs6000_gen_lvx): Likewise.
8307
8308 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
8309
8310 * config/visium/visium.md (nop): Tweak comment.
8311 (hazard_nop): Likewise.
8312
8313 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
8314
8315 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
8316 -mspeculate-indirect-jumps.
8317 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
8318 for -mno-speculate-indirect-jumps.
8319 (*call_indirect_elfv2<mode>_nospec): New define_insn.
8320 (*call_value_indirect_elfv2<mode>): Disable for
8321 -mno-speculate-indirect-jumps.
8322 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
8323 (indirect_jump): Emit different RTL for
8324 -mno-speculate-indirect-jumps.
8325 (*indirect_jump<mode>): Disable for
8326 -mno-speculate-indirect-jumps.
8327 (*indirect_jump<mode>_nospec): New define_insn.
8328 (tablejump): Emit different RTL for
8329 -mno-speculate-indirect-jumps.
8330 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
8331 (tablejumpsi_nospec): New define_expand.
8332 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
8333 (tablejumpdi_nospec): New define_expand.
8334 (*tablejump<mode>_internal1): Disable for
8335 -mno-speculate-indirect-jumps.
8336 (*tablejump<mode>_internal1_nospec): New define_insn.
8337 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
8338 option.
8339
8340 2018-01-16 Artyom Skrobov tyomitch@gmail.com
8341
8342 * caller-save.c (insert_save): Drop unnecessary parameter. All
8343 callers updated.
8344
8345 2018-01-16 Jakub Jelinek <jakub@redhat.com>
8346 Richard Biener <rguenth@suse.de>
8347
8348 PR libgomp/83590
8349 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
8350 return early, inline manually is_gimple_sizepos. Make sure if we
8351 call gimplify_expr we don't end up with a gimple constant.
8352 * tree.c (variably_modified_type_p): Don't return true for
8353 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
8354 * gimplify.h (is_gimple_sizepos): Remove.
8355
8356 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
8357
8358 PR tree-optimization/83857
8359 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
8360 vectorizable_live_operation for pure SLP statements.
8361 (vectorizable_live_operation): Handle PHIs.
8362
8363 2018-01-16 Richard Biener <rguenther@suse.de>
8364
8365 PR tree-optimization/83867
8366 * tree-vect-stmts.c (vect_transform_stmt): Precompute
8367 nested_in_vect_loop_p since the scalar stmt may get invalidated.
8368
8369 2018-01-16 Jakub Jelinek <jakub@redhat.com>
8370
8371 PR c/83844
8372 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
8373 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
8374 If off is not INTEGER_CST, issue a may not be aligned warning
8375 rather than isn't aligned. Use isn%'t rather than isn't.
8376 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
8377 into MULT_EXPR.
8378 <case MULT_EXPR>: Improve the case when bottom and one of the
8379 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
8380 operand, in that case check if the other operand is multiple of
8381 bottom divided by the INTEGER_CST operand.
8382
8383 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
8384
8385 PR target/83858
8386 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
8387 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
8388 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
8389 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
8390 * config/pa/pa.c (pa_function_arg_advance): Likewise.
8391 (pa_function_arg, pa_arg_partial_bytes): Likewise.
8392 (pa_function_arg_size): New function.
8393
8394 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
8395
8396 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
8397 in a separate statement.
8398
8399 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
8400
8401 PR tree-optimization/83847
8402 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
8403 group gathers and scatters.
8404
8405 2018-01-16 Jakub Jelinek <jakub@redhat.com>
8406
8407 PR rtl-optimization/86620
8408 * params.def (max-sched-ready-insns): Bump minimum value to 1.
8409
8410 PR rtl-optimization/83213
8411 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
8412 to last if both are JUMP_INSNs.
8413
8414 PR tree-optimization/83843
8415 * gimple-ssa-store-merging.c
8416 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
8417 store_immediate_info for bswap/nop orig_stores.
8418
8419 2018-01-15 Andrew Waterman <andrew@sifive.com>
8420
8421 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
8422 !TARGET_MUL.
8423 <UDIV>: Increase cost if !TARGET_DIV.
8424
8425 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
8426
8427 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
8428 (define_attr "cr_logical_3op"): New.
8429 (cceq_ior_compare): Adjust.
8430 (cceq_ior_compare_complement): Adjust.
8431 (*cceq_rev_compare): Adjust.
8432 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
8433 (is_cracked_insn): Adjust.
8434 (insn_must_be_first_in_group): Adjust.
8435 * config/rs6000/40x.md: Adjust.
8436 * config/rs6000/440.md: Adjust.
8437 * config/rs6000/476.md: Adjust.
8438 * config/rs6000/601.md: Adjust.
8439 * config/rs6000/603.md: Adjust.
8440 * config/rs6000/6xx.md: Adjust.
8441 * config/rs6000/7450.md: Adjust.
8442 * config/rs6000/7xx.md: Adjust.
8443 * config/rs6000/8540.md: Adjust.
8444 * config/rs6000/cell.md: Adjust.
8445 * config/rs6000/e300c2c3.md: Adjust.
8446 * config/rs6000/e500mc.md: Adjust.
8447 * config/rs6000/e500mc64.md: Adjust.
8448 * config/rs6000/e5500.md: Adjust.
8449 * config/rs6000/e6500.md: Adjust.
8450 * config/rs6000/mpc.md: Adjust.
8451 * config/rs6000/power4.md: Adjust.
8452 * config/rs6000/power5.md: Adjust.
8453 * config/rs6000/power6.md: Adjust.
8454 * config/rs6000/power7.md: Adjust.
8455 * config/rs6000/power8.md: Adjust.
8456 * config/rs6000/power9.md: Adjust.
8457 * config/rs6000/rs64.md: Adjust.
8458 * config/rs6000/titan.md: Adjust.
8459
8460 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
8461
8462 * config/i386/predicates.md (indirect_branch_operand): Rewrite
8463 ix86_indirect_branch_register logic.
8464
8465 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
8466
8467 * config/i386/constraints.md (Bs): Update
8468 ix86_indirect_branch_register check. Don't check
8469 ix86_indirect_branch_register with GOT_memory_operand.
8470 (Bw): Likewise.
8471 * config/i386/predicates.md (GOT_memory_operand): Don't check
8472 ix86_indirect_branch_register here.
8473 (GOT32_symbol_operand): Likewise.
8474
8475 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
8476
8477 * config/i386/predicates.md (constant_call_address_operand):
8478 Rewrite ix86_indirect_branch_register logic.
8479 (sibcall_insn_operand): Likewise.
8480
8481 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
8482
8483 * config/i386/constraints.md (Bs): Replace
8484 ix86_indirect_branch_thunk_register with
8485 ix86_indirect_branch_register.
8486 (Bw): Likewise.
8487 * config/i386/i386.md (indirect_jump): Likewise.
8488 (tablejump): Likewise.
8489 (*sibcall_memory): Likewise.
8490 (*sibcall_value_memory): Likewise.
8491 Peepholes of indirect call and jump via memory: Likewise.
8492 * config/i386/i386.opt: Likewise.
8493 * config/i386/predicates.md (indirect_branch_operand): Likewise.
8494 (GOT_memory_operand): Likewise.
8495 (call_insn_operand): Likewise.
8496 (sibcall_insn_operand): Likewise.
8497 (GOT32_symbol_operand): Likewise.
8498
8499 2018-01-15 Jakub Jelinek <jakub@redhat.com>
8500
8501 PR middle-end/83837
8502 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
8503 type rather than type addr's type points to.
8504 (expand_omp_atomic_mutex): Likewise.
8505 (expand_omp_atomic): Likewise.
8506
8507 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
8508
8509 PR target/83839
8510 * config/i386/i386.c (output_indirect_thunk_function): Use
8511 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
8512 for __x86_return_thunk.
8513
8514 2018-01-15 Richard Biener <rguenther@suse.de>
8515
8516 PR middle-end/83850
8517 * expmed.c (extract_bit_field_1): Fix typo.
8518
8519 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8520
8521 PR target/83687
8522 * config/arm/iterators.md (VF): New mode iterator.
8523 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
8524 Remove integer-related logic from pattern.
8525 (neon_vabd<mode>_3): Likewise.
8526
8527 2018-01-15 Jakub Jelinek <jakub@redhat.com>
8528
8529 PR middle-end/82694
8530 * common.opt (fstrict-overflow): No longer an alias.
8531 (fwrapv-pointer): New option.
8532 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
8533 also for pointer types based on flag_wrapv_pointer.
8534 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
8535 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
8536 opts->x_flag_wrapv got set.
8537 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
8538 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
8539 POINTER_TYPE_OVERFLOW_UNDEFINED.
8540 * match.pd: Likewise in address comparison pattern.
8541 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
8542
8543 2018-01-15 Richard Biener <rguenther@suse.de>
8544
8545 PR lto/83804
8546 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
8547 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
8548 Reset type names to their identifier if their TYPE_DECL doesn't
8549 have linkage (and thus is used for ODR and devirt).
8550 (save_debug_info_for_decl): Remove.
8551 (save_debug_info_for_type): Likewise.
8552 (add_tree_to_fld_list): Adjust.
8553 * tree-pretty-print.c (dump_generic_node): Make dumping of
8554 type names more robust.
8555
8556 2018-01-15 Richard Biener <rguenther@suse.de>
8557
8558 * BASE-VER: Bump to 8.0.1.
8559
8560 2018-01-14 Martin Sebor <msebor@redhat.com>
8561
8562 PR other/83508
8563 * builtins.c (check_access): Avoid warning when the no-warning bit
8564 is set.
8565
8566 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
8567
8568 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
8569 * ira-color (allocno_hard_regs_compare): Likewise.
8570
8571 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
8572
8573 PR target/83013
8574 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
8575 Use .pushsection/.popsection.
8576
8577 2018-01-14 Martin Sebor <msebor@redhat.com>
8578
8579 PR c++/81327
8580 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
8581
8582 2018-01-14 Jakub Jelinek <jakub@redhat.com>
8583
8584 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
8585 entry from extra_headers.
8586 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
8587 extra_headers, make the list bitwise identical to the i?86-*-* one.
8588
8589 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
8590
8591 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
8592 -mcmodel=large with -mindirect-branch=thunk,
8593 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
8594 -mfunction-return=thunk-extern.
8595 * doc/invoke.texi: Document -mcmodel=large is incompatible with
8596 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
8597 -mfunction-return=thunk and -mfunction-return=thunk-extern.
8598
8599 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
8600
8601 * config/i386/i386.c (print_reg): Print the name of the full
8602 integer register without '%'.
8603 (ix86_print_operand): Handle 'V'.
8604 * doc/extend.texi: Document 'V' modifier.
8605
8606 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
8607
8608 * config/i386/constraints.md (Bs): Disallow memory operand for
8609 -mindirect-branch-register.
8610 (Bw): Likewise.
8611 * config/i386/predicates.md (indirect_branch_operand): Likewise.
8612 (GOT_memory_operand): Likewise.
8613 (call_insn_operand): Likewise.
8614 (sibcall_insn_operand): Likewise.
8615 (GOT32_symbol_operand): Likewise.
8616 * config/i386/i386.md (indirect_jump): Call convert_memory_address
8617 for -mindirect-branch-register.
8618 (tablejump): Likewise.
8619 (*sibcall_memory): Likewise.
8620 (*sibcall_value_memory): Likewise.
8621 Disallow peepholes of indirect call and jump via memory for
8622 -mindirect-branch-register.
8623 (*call_pop): Replace m with Bw.
8624 (*call_value_pop): Likewise.
8625 (*sibcall_pop_memory): Replace m with Bs.
8626 * config/i386/i386.opt (mindirect-branch-register): New option.
8627 * doc/invoke.texi: Document -mindirect-branch-register option.
8628
8629 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
8630
8631 * config/i386/i386-protos.h (ix86_output_function_return): New.
8632 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
8633 set function_return_type.
8634 (indirect_thunk_name): Add ret_p to indicate thunk for function
8635 return.
8636 (output_indirect_thunk_function): Pass false to
8637 indirect_thunk_name.
8638 (ix86_output_indirect_branch_via_reg): Likewise.
8639 (ix86_output_indirect_branch_via_push): Likewise.
8640 (output_indirect_thunk_function): Create alias for function
8641 return thunk if regno < 0.
8642 (ix86_output_function_return): New function.
8643 (ix86_handle_fndecl_attribute): Handle function_return.
8644 (ix86_attribute_table): Add function_return.
8645 * config/i386/i386.h (machine_function): Add
8646 function_return_type.
8647 * config/i386/i386.md (simple_return_internal): Use
8648 ix86_output_function_return.
8649 (simple_return_internal_long): Likewise.
8650 * config/i386/i386.opt (mfunction-return=): New option.
8651 (indirect_branch): Mention -mfunction-return=.
8652 * doc/extend.texi: Document function_return function attribute.
8653 * doc/invoke.texi: Document -mfunction-return= option.
8654
8655 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
8656
8657 * config/i386/i386-opts.h (indirect_branch): New.
8658 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
8659 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
8660 with local indirect jump when converting indirect call and jump.
8661 (ix86_set_indirect_branch_type): New.
8662 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
8663 (indirectlabelno): New.
8664 (indirect_thunk_needed): Likewise.
8665 (indirect_thunk_bnd_needed): Likewise.
8666 (indirect_thunks_used): Likewise.
8667 (indirect_thunks_bnd_used): Likewise.
8668 (INDIRECT_LABEL): Likewise.
8669 (indirect_thunk_name): Likewise.
8670 (output_indirect_thunk): Likewise.
8671 (output_indirect_thunk_function): Likewise.
8672 (ix86_output_indirect_branch_via_reg): Likewise.
8673 (ix86_output_indirect_branch_via_push): Likewise.
8674 (ix86_output_indirect_branch): Likewise.
8675 (ix86_output_indirect_jmp): Likewise.
8676 (ix86_code_end): Call output_indirect_thunk_function if needed.
8677 (ix86_output_call_insn): Call ix86_output_indirect_branch if
8678 needed.
8679 (ix86_handle_fndecl_attribute): Handle indirect_branch.
8680 (ix86_attribute_table): Add indirect_branch.
8681 * config/i386/i386.h (machine_function): Add indirect_branch_type
8682 and has_local_indirect_jump.
8683 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
8684 to true.
8685 (tablejump): Likewise.
8686 (*indirect_jump): Use ix86_output_indirect_jmp.
8687 (*tablejump_1): Likewise.
8688 (simple_return_indirect_internal): Likewise.
8689 * config/i386/i386.opt (mindirect-branch=): New option.
8690 (indirect_branch): New.
8691 (keep): Likewise.
8692 (thunk): Likewise.
8693 (thunk-inline): Likewise.
8694 (thunk-extern): Likewise.
8695 * doc/extend.texi: Document indirect_branch function attribute.
8696 * doc/invoke.texi: Document -mindirect-branch= option.
8697
8698 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
8699
8700 PR ipa/83051
8701 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
8702
8703 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
8704
8705 * ipa-inline.c (want_inline_small_function_p): Return false if
8706 inlining has already failed with CIF_FINAL_ERROR.
8707 (update_caller_keys): Call want_inline_small_function_p before
8708 can_inline_edge_p.
8709 (update_callee_keys): Likewise.
8710
8711 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
8712
8713 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
8714 New function.
8715 (rs6000_quadword_masked_address_p): Likewise.
8716 (quad_aligned_load_p): Likewise.
8717 (quad_aligned_store_p): Likewise.
8718 (const_load_sequence_p): Add comment to describe the outer-most loop.
8719 (mimic_memory_attributes_and_flags): New function.
8720 (rs6000_gen_stvx): Likewise.
8721 (replace_swapped_aligned_store): Likewise.
8722 (rs6000_gen_lvx): Likewise.
8723 (replace_swapped_aligned_load): Likewise.
8724 (replace_swapped_load_constant): Capitalize argument name in
8725 comment describing this function.
8726 (rs6000_analyze_swaps): Add a third pass to search for vector loads
8727 and stores that access quad-word aligned addresses and replace
8728 with stvx or lvx instructions when appropriate.
8729 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
8730 New function prototype.
8731 (rs6000_quadword_masked_address_p): Likewise.
8732 (rs6000_gen_lvx): Likewise.
8733 (rs6000_gen_stvx): Likewise.
8734 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
8735 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
8736 when memory address is aligned.
8737 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
8738 this split to select lvx instruction when memory address is aligned.
8739 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
8740 instruction when memory address is aligned.
8741 (*vsx_le_perm_load_v16qi): Likewise.
8742 (four unnamed splitters): Modify to select the stvx instruction
8743 when memory is aligned.
8744
8745 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
8746
8747 * predict.c (determine_unlikely_bbs): Handle correctly BBs
8748 which appears in the queue multiple times.
8749
8750 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
8751 Alan Hayward <alan.hayward@arm.com>
8752 David Sherwood <david.sherwood@arm.com>
8753
8754 * tree-vectorizer.h (vec_lower_bound): New structure.
8755 (_loop_vec_info): Add check_nonzero and lower_bounds.
8756 (LOOP_VINFO_CHECK_NONZERO): New macro.
8757 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
8758 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
8759 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
8760 fields. Make seg_len the distance travelled, not including the
8761 access size.
8762 (dr_direction_indicator): Declare.
8763 (dr_zero_step_indicator): Likewise.
8764 (dr_known_forward_stride_p): Likewise.
8765 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
8766 tree-ssanames.h.
8767 (runtime_alias_check_p): Allow runtime alias checks with
8768 variable strides.
8769 (operator ==): Compare access_size and align.
8770 (prune_runtime_alias_test_list): Rework for new distinction between
8771 the access_size and seg_len.
8772 (create_intersect_range_checks_index): Likewise. Cope with polynomial
8773 segment lengths.
8774 (get_segment_min_max): New function.
8775 (create_intersect_range_checks): Use it.
8776 (dr_step_indicator): New function.
8777 (dr_direction_indicator): Likewise.
8778 (dr_zero_step_indicator): Likewise.
8779 (dr_known_forward_stride_p): Likewise.
8780 * tree-loop-distribution.c (data_ref_segment_size): Return
8781 DR_STEP * (niters - 1).
8782 (compute_alias_check_pairs): Update call to the dr_with_seg_len
8783 constructor.
8784 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
8785 (vect_preserves_scalar_order_p): New function, split out from...
8786 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
8787 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
8788 (vect_vfa_access_size): New function.
8789 (vect_vfa_align): Likewise.
8790 (vect_compile_time_alias): Take access_size_a and access_b arguments.
8791 (dump_lower_bound): New function.
8792 (vect_check_lower_bound): Likewise.
8793 (vect_small_gap_p): Likewise.
8794 (vectorizable_with_step_bound_p): Likewise.
8795 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
8796 depencies if the vectorization factor is 1. Convert the checks
8797 for nonzero steps into checks on the bounds of DR_STEP. Try using
8798 a bunds check for variable steps if the minimum required step is
8799 relatively small. Update calls to the dr_with_seg_len
8800 constructor and to vect_compile_time_alias.
8801 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
8802 function.
8803 (vect_loop_versioning): Call it.
8804 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
8805 when retrying.
8806 (vect_estimate_min_profitable_iters): Account for any bounds checks.
8807
8808 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
8809 Alan Hayward <alan.hayward@arm.com>
8810 David Sherwood <david.sherwood@arm.com>
8811
8812 * doc/sourcebuild.texi (vect_scatter_store): Document.
8813 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
8814 optabs.
8815 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
8816 Document.
8817 * genopinit.c (main): Add supports_vec_scatter_store and
8818 supports_vec_scatter_store_cached to target_optabs.
8819 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
8820 IFN_MASK_SCATTER_STORE.
8821 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
8822 functions.
8823 * internal-fn.h (internal_store_fn_p): Declare.
8824 (internal_fn_stored_value_index): Likewise.
8825 * internal-fn.c (scatter_store_direct): New macro.
8826 (expand_scatter_store_optab_fn): New function.
8827 (direct_scatter_store_optab_supported_p): New macro.
8828 (internal_store_fn_p): New function.
8829 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
8830 IFN_MASK_SCATTER_STORE.
8831 (internal_fn_mask_index): Likewise.
8832 (internal_fn_stored_value_index): New function.
8833 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
8834 for scatter stores.
8835 * optabs-query.h (supports_vec_scatter_store_p): Declare.
8836 * optabs-query.c (supports_vec_scatter_store_p): New function.
8837 * tree-vectorizer.h (vect_get_store_rhs): Declare.
8838 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
8839 true for scatter stores.
8840 (vect_gather_scatter_fn_p): Handle scatter stores too.
8841 (vect_check_gather_scatter): Consider using scatter stores if
8842 supports_vec_scatter_store_p.
8843 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
8844 scatter stores too.
8845 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
8846 internal_fn_stored_value_index.
8847 (check_load_store_masking): Handle scatter stores too.
8848 (vect_get_store_rhs): Make public.
8849 (vectorizable_call): Use internal_store_fn_p.
8850 (vectorizable_store): Handle scatter store internal functions.
8851 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
8852 when deciding whether the end of the group has been reached.
8853 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
8854 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
8855 (mask_scatter_store<mode>): New insns.
8856
8857 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
8858 Alan Hayward <alan.hayward@arm.com>
8859 David Sherwood <david.sherwood@arm.com>
8860
8861 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
8862 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
8863 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
8864 function.
8865 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
8866 Use vect_truncate_gather_scatter_offset if we can't treat the
8867 operation as a normal gather load or scatter store.
8868 (get_group_load_store_type): Take the gather_scatter_info
8869 as argument. Try using a gather load or scatter store for
8870 single-element groups.
8871 (get_load_store_type): Update calls to get_group_load_store_type
8872 and vect_use_strided_gather_scatters_p.
8873
8874 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
8875 Alan Hayward <alan.hayward@arm.com>
8876 David Sherwood <david.sherwood@arm.com>
8877
8878 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
8879 optional tree argument.
8880 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
8881 null target hooks.
8882 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
8883 but continue to use the current value as a fallback.
8884 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
8885 to compare the updates.
8886 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
8887 (get_load_store_type): Use it when handling a strided access.
8888 (vect_get_strided_load_store_ops): New function.
8889 (vect_get_data_ptr_increment): Likewise.
8890 (vectorizable_load): Handle strided gather loads. Always pass
8891 a step to vect_create_data_ref_ptr and bump_vector_ptr.
8892
8893 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
8894 Alan Hayward <alan.hayward@arm.com>
8895 David Sherwood <david.sherwood@arm.com>
8896
8897 * doc/md.texi (gather_load@var{m}): Document.
8898 (mask_gather_load@var{m}): Likewise.
8899 * genopinit.c (main): Add supports_vec_gather_load and
8900 supports_vec_gather_load_cached to target_optabs.
8901 * optabs-tree.c (init_tree_optimization_optabs): Use
8902 ggc_cleared_alloc to allocate target_optabs.
8903 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
8904 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
8905 functions.
8906 * internal-fn.h (internal_load_fn_p): Declare.
8907 (internal_gather_scatter_fn_p): Likewise.
8908 (internal_fn_mask_index): Likewise.
8909 (internal_gather_scatter_fn_supported_p): Likewise.
8910 * internal-fn.c (gather_load_direct): New macro.
8911 (expand_gather_load_optab_fn): New function.
8912 (direct_gather_load_optab_supported_p): New macro.
8913 (direct_internal_fn_optab): New function.
8914 (internal_load_fn_p): Likewise.
8915 (internal_gather_scatter_fn_p): Likewise.
8916 (internal_fn_mask_index): Likewise.
8917 (internal_gather_scatter_fn_supported_p): Likewise.
8918 * optabs-query.c (supports_at_least_one_mode_p): New function.
8919 (supports_vec_gather_load_p): Likewise.
8920 * optabs-query.h (supports_vec_gather_load_p): Declare.
8921 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
8922 and memory_type field.
8923 (NUM_PATTERNS): Bump to 15.
8924 * tree-vect-data-refs.c: Include internal-fn.h.
8925 (vect_gather_scatter_fn_p): New function.
8926 (vect_describe_gather_scatter_call): Likewise.
8927 (vect_check_gather_scatter): Try using internal functions for
8928 gather loads. Recognize existing calls to a gather load function.
8929 (vect_analyze_data_refs): Consider using gather loads if
8930 supports_vec_gather_load_p.
8931 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
8932 (vect_get_gather_scatter_offset_type): Likewise.
8933 (vect_convert_mask_for_vectype): Likewise.
8934 (vect_add_conversion_to_patterm): Likewise.
8935 (vect_try_gather_scatter_pattern): Likewise.
8936 (vect_recog_gather_scatter_pattern): New pattern recognizer.
8937 (vect_vect_recog_func_ptrs): Add it.
8938 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
8939 internal_fn_mask_index and internal_gather_scatter_fn_p.
8940 (check_load_store_masking): Take the gather_scatter_info as an
8941 argument and handle gather loads.
8942 (vect_get_gather_scatter_ops): New function.
8943 (vectorizable_call): Check internal_load_fn_p.
8944 (vectorizable_load): Likewise. Handle gather load internal
8945 functions.
8946 (vectorizable_store): Update call to check_load_store_masking.
8947 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
8948 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
8949 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
8950 (aarch64_gather_scale_operand_d): New predicates.
8951 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
8952 (mask_gather_load<mode>): New insns.
8953
8954 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
8955 Alan Hayward <alan.hayward@arm.com>
8956 David Sherwood <david.sherwood@arm.com>
8957
8958 * optabs.def (fold_left_plus_optab): New optab.
8959 * doc/md.texi (fold_left_plus_@var{m}): Document.
8960 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
8961 * internal-fn.c (fold_left_direct): Define.
8962 (expand_fold_left_optab_fn): Likewise.
8963 (direct_fold_left_optab_supported_p): Likewise.
8964 * fold-const-call.c (fold_const_fold_left): New function.
8965 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
8966 * tree-parloops.c (valid_reduction_p): New function.
8967 (gather_scalar_reductions): Use it.
8968 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
8969 (vect_finish_replace_stmt): Declare.
8970 * tree-vect-loop.c (fold_left_reduction_fn): New function.
8971 (needs_fold_left_reduction_p): New function, split out from...
8972 (vect_is_simple_reduction): ...here. Accept reductions that
8973 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
8974 (vect_force_simple_reduction): Also store the reduction type in
8975 the assignment's STMT_VINFO_REDUC_TYPE.
8976 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
8977 (merge_with_identity): New function.
8978 (vect_expand_fold_left): Likewise.
8979 (vectorize_fold_left_reduction): Likewise.
8980 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
8981 scalar phi in place for it. Check for target support and reject
8982 cases that would reassociate the operation. Defer the transform
8983 phase to vectorize_fold_left_reduction.
8984 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
8985 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
8986 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
8987
8988 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
8989
8990 * tree-if-conv.c (predicate_mem_writes): Remove redundant
8991 call to ifc_temp_var.
8992
8993 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
8994 Alan Hayward <alan.hayward@arm.com>
8995 David Sherwood <david.sherwood@arm.com>
8996
8997 * target.def (legitimize_address_displacement): Take the original
8998 offset as a poly_int.
8999 * targhooks.h (default_legitimize_address_displacement): Update
9000 accordingly.
9001 * targhooks.c (default_legitimize_address_displacement): Likewise.
9002 * doc/tm.texi: Regenerate.
9003 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
9004 as an argument, moving assert of ad->disp == ad->disp_term to...
9005 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
9006 Try calling targetm.legitimize_address_displacement before expanding
9007 the address rather than afterwards, and adjust for the new interface.
9008 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
9009 Match the new hook interface. Handle SVE addresses.
9010 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
9011 new hook interface.
9012
9013 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9014
9015 * Makefile.in (OBJS): Add early-remat.o.
9016 * target.def (select_early_remat_modes): New hook.
9017 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
9018 * doc/tm.texi: Regenerate.
9019 * targhooks.h (default_select_early_remat_modes): Declare.
9020 * targhooks.c (default_select_early_remat_modes): New function.
9021 * timevar.def (TV_EARLY_REMAT): New timevar.
9022 * passes.def (pass_early_remat): New pass.
9023 * tree-pass.h (make_pass_early_remat): Declare.
9024 * early-remat.c: New file.
9025 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
9026 function.
9027 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
9028
9029 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9030 Alan Hayward <alan.hayward@arm.com>
9031 David Sherwood <david.sherwood@arm.com>
9032
9033 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
9034 vfm1 with a bound_epilog parameter.
9035 (vect_do_peeling): Update calls accordingly, and move the prologue
9036 call earlier in the function. Treat the base bound_epilog as 0 for
9037 fully-masked loops and retain vf - 1 for other loops. Add 1 to
9038 this base when peeling for gaps.
9039 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
9040 with fully-masked loops.
9041 (vect_estimate_min_profitable_iters): Handle the single peeled
9042 iteration in that case.
9043
9044 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9045 Alan Hayward <alan.hayward@arm.com>
9046 David Sherwood <david.sherwood@arm.com>
9047
9048 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
9049 single-element interleaving even if the size is not a power of 2.
9050 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
9051 accesses for single-element interleaving if the group size is
9052 not a power of 2.
9053
9054 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9055 Alan Hayward <alan.hayward@arm.com>
9056 David Sherwood <david.sherwood@arm.com>
9057
9058 * doc/md.texi (fold_extract_last_@var{m}): Document.
9059 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
9060 * optabs.def (fold_extract_last_optab): New optab.
9061 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
9062 * internal-fn.c (fold_extract_direct): New macro.
9063 (expand_fold_extract_optab_fn): Likewise.
9064 (direct_fold_extract_optab_supported_p): Likewise.
9065 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
9066 * tree-vect-loop.c (vect_model_reduction_cost): Handle
9067 EXTRACT_LAST_REDUCTION.
9068 (get_initial_def_for_reduction): Do not create an initial vector
9069 for EXTRACT_LAST_REDUCTION reductions.
9070 (vectorizable_reduction): Leave the scalar phi in place for
9071 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
9072 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
9073 epilogue code for EXTRACT_LAST_REDUCTION and defer the
9074 transform phase to vectorizable_condition.
9075 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
9076 split out from...
9077 (vect_finish_stmt_generation): ...here.
9078 (vect_finish_replace_stmt): New function.
9079 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
9080 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
9081 pattern.
9082 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
9083
9084 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9085 Alan Hayward <alan.hayward@arm.com>
9086 David Sherwood <david.sherwood@arm.com>
9087
9088 * doc/md.texi (extract_last_@var{m}): Document.
9089 * optabs.def (extract_last_optab): New optab.
9090 * internal-fn.def (EXTRACT_LAST): New internal function.
9091 * internal-fn.c (cond_unary_direct): New macro.
9092 (expand_cond_unary_optab_fn): Likewise.
9093 (direct_cond_unary_optab_supported_p): Likewise.
9094 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
9095 loops using EXTRACT_LAST.
9096 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
9097 (extract_last_<mode>): ...this optab.
9098 (vec_extract<mode><Vel>): Update accordingly.
9099
9100 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9101 Alan Hayward <alan.hayward@arm.com>
9102 David Sherwood <david.sherwood@arm.com>
9103
9104 * target.def (empty_mask_is_expensive): New hook.
9105 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
9106 * doc/tm.texi: Regenerate.
9107 * targhooks.h (default_empty_mask_is_expensive): Declare.
9108 * targhooks.c (default_empty_mask_is_expensive): New function.
9109 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
9110 if the target says that empty masks are expensive.
9111 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
9112 New function.
9113 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
9114
9115 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9116 Alan Hayward <alan.hayward@arm.com>
9117 David Sherwood <david.sherwood@arm.com>
9118
9119 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
9120 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
9121 (vect_use_loop_mask_for_alignment_p): New function.
9122 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
9123 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
9124 niters_skip argument. Make sure that the first niters_skip elements
9125 of the first iteration are inactive.
9126 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
9127 Update call to vect_set_loop_masks_directly.
9128 (get_misalign_in_elems): New function, split out from...
9129 (vect_gen_prolog_loop_niters): ...here.
9130 (vect_update_init_of_dr): Take a code argument that specifies whether
9131 the adjustment should be added or subtracted.
9132 (vect_update_init_of_drs): Likewise.
9133 (vect_prepare_for_masked_peels): New function.
9134 (vect_do_peeling): Skip prologue peeling if we're using a mask
9135 instead. Update call to vect_update_inits_of_drs.
9136 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
9137 mask_skip_niters.
9138 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
9139 alignment. Do not include the number of peeled iterations in
9140 the minimum threshold in that case.
9141 (vectorizable_induction): Adjust the start value down by
9142 LOOP_VINFO_MASK_SKIP_NITERS iterations.
9143 (vect_transform_loop): Call vect_prepare_for_masked_peels.
9144 Take the number of skipped iterations into account when calculating
9145 the loop bounds.
9146 * tree-vect-stmts.c (vect_gen_while_not): New function.
9147
9148 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9149 Alan Hayward <alan.hayward@arm.com>
9150 David Sherwood <david.sherwood@arm.com>
9151
9152 * doc/sourcebuild.texi (vect_fully_masked): Document.
9153 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
9154 default value to 0.
9155 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
9156 split out from...
9157 (vect_analyze_loop_2): ...here. Don't check the vectorization
9158 factor against the number of loop iterations if the loop is
9159 fully-masked.
9160
9161 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9162 Alan Hayward <alan.hayward@arm.com>
9163 David Sherwood <david.sherwood@arm.com>
9164
9165 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
9166 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
9167 (dump_groups): Update accordingly.
9168 (iv_use::mem_type): New member variable.
9169 (address_p): New function.
9170 (record_use): Add a mem_type argument and initialize the new
9171 mem_type field.
9172 (record_group_use): Add a mem_type argument. Use address_p.
9173 Remove obsolete null checks of base_object. Update call to record_use.
9174 (find_interesting_uses_op): Update call to record_group_use.
9175 (find_interesting_uses_cond): Likewise.
9176 (find_interesting_uses_address): Likewise.
9177 (get_mem_type_for_internal_fn): New function.
9178 (find_address_like_use): Likewise.
9179 (find_interesting_uses_stmt): Try find_address_like_use before
9180 calling find_interesting_uses_op.
9181 (addr_offset_valid_p): Use the iv mem_type field as the type
9182 of the addressed memory.
9183 (add_autoinc_candidates): Likewise.
9184 (get_address_cost): Likewise.
9185 (split_small_address_groups_p): Use address_p.
9186 (split_address_groups): Likewise.
9187 (add_iv_candidate_for_use): Likewise.
9188 (autoinc_possible_for_pair): Likewise.
9189 (rewrite_groups): Likewise.
9190 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
9191 (determine_group_iv_cost): Update after split of USE_ADDRESS.
9192 (get_alias_ptr_type_for_ptr_address): New function.
9193 (rewrite_use_address): Rewrite address uses in calls that were
9194 identified by find_address_like_use.
9195
9196 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9197 Alan Hayward <alan.hayward@arm.com>
9198 David Sherwood <david.sherwood@arm.com>
9199
9200 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
9201 TARGET_MEM_REFs.
9202 * gimple-expr.h (is_gimple_addressable: Likewise.
9203 * gimple-expr.c (is_gimple_address): Likewise.
9204 * internal-fn.c (expand_call_mem_ref): New function.
9205 (expand_mask_load_optab_fn): Use it.
9206 (expand_mask_store_optab_fn): Likewise.
9207
9208 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9209 Alan Hayward <alan.hayward@arm.com>
9210 David Sherwood <david.sherwood@arm.com>
9211
9212 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
9213 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
9214 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
9215 (cond_umax@var{mode}): Document.
9216 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
9217 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
9218 (cond_umin_optab, cond_umax_optab): New optabs.
9219 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
9220 (COND_IOR, COND_XOR): New internal functions.
9221 * internal-fn.h (get_conditional_internal_fn): Declare.
9222 * internal-fn.c (cond_binary_direct): New macro.
9223 (expand_cond_binary_optab_fn): Likewise.
9224 (direct_cond_binary_optab_supported_p): Likewise.
9225 (get_conditional_internal_fn): New function.
9226 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
9227 Cope with reduction statements that are vectorized as calls rather
9228 than assignments.
9229 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
9230 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
9231 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
9232 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
9233 (UNSPEC_COND_EOR): New unspecs.
9234 (optab): Add mappings for them.
9235 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
9236 (sve_int_op, sve_fp_op): New int attributes.
9237
9238 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9239 Alan Hayward <alan.hayward@arm.com>
9240 David Sherwood <david.sherwood@arm.com>
9241
9242 * optabs.def (while_ult_optab): New optab.
9243 * doc/md.texi (while_ult@var{m}@var{n}): Document.
9244 * internal-fn.def (WHILE_ULT): New internal function.
9245 * internal-fn.h (direct_internal_fn_supported_p): New override
9246 that takes two types as argument.
9247 * internal-fn.c (while_direct): New macro.
9248 (expand_while_optab_fn): New function.
9249 (convert_optab_supported_p): Likewise.
9250 (direct_while_optab_supported_p): New macro.
9251 * wide-int.h (wi::udiv_ceil): New function.
9252 * tree-vectorizer.h (rgroup_masks): New structure.
9253 (vec_loop_masks): New typedef.
9254 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
9255 and fully_masked_p.
9256 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
9257 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
9258 (vect_max_vf): New function.
9259 (slpeel_make_loop_iterate_ntimes): Delete.
9260 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
9261 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
9262 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
9263 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
9264 internal-fn.h, stor-layout.h and optabs-query.h.
9265 (vect_set_loop_mask): New function.
9266 (add_preheader_seq): Likewise.
9267 (add_header_seq): Likewise.
9268 (interleave_supported_p): Likewise.
9269 (vect_maybe_permute_loop_masks): Likewise.
9270 (vect_set_loop_masks_directly): Likewise.
9271 (vect_set_loop_condition_masked): Likewise.
9272 (vect_set_loop_condition_unmasked): New function, split out from
9273 slpeel_make_loop_iterate_ntimes.
9274 (slpeel_make_loop_iterate_ntimes): Rename to..
9275 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
9276 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
9277 (vect_do_peeling): Update call accordingly.
9278 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
9279 loops.
9280 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
9281 mask_compare_type, can_fully_mask_p and fully_masked_p.
9282 (release_vec_loop_masks): New function.
9283 (_loop_vec_info): Use it to free the loop masks.
9284 (can_produce_all_loop_masks_p): New function.
9285 (vect_get_max_nscalars_per_iter): Likewise.
9286 (vect_verify_full_masking): Likewise.
9287 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
9288 retries, and free the mask rgroups before retrying. Check loop-wide
9289 reasons for disallowing fully-masked loops. Make the final decision
9290 about whether use a fully-masked loop or not.
9291 (vect_estimate_min_profitable_iters): Do not assume that peeling
9292 for the number of iterations will be needed for fully-masked loops.
9293 (vectorizable_reduction): Disable fully-masked loops.
9294 (vectorizable_live_operation): Likewise.
9295 (vect_halve_mask_nunits): New function.
9296 (vect_double_mask_nunits): Likewise.
9297 (vect_record_loop_mask): Likewise.
9298 (vect_get_loop_mask): Likewise.
9299 (vect_transform_loop): Handle the case in which the final loop
9300 iteration might handle a partial vector. Call vect_set_loop_condition
9301 instead of slpeel_make_loop_iterate_ntimes.
9302 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
9303 (check_load_store_masking): New function.
9304 (prepare_load_store_mask): Likewise.
9305 (vectorizable_store): Handle fully-masked loops.
9306 (vectorizable_load): Likewise.
9307 (supportable_widening_operation): Use vect_halve_mask_nunits for
9308 booleans.
9309 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
9310 (vect_gen_while): New function.
9311 * config/aarch64/aarch64.md (umax<mode>3): New expander.
9312 (aarch64_uqdec<mode>): New insn.
9313
9314 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9315 Alan Hayward <alan.hayward@arm.com>
9316 David Sherwood <david.sherwood@arm.com>
9317
9318 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
9319 (reduc_xor_scal_optab): New optabs.
9320 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
9321 (reduc_xor_scal_@var{m}): Document.
9322 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
9323 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
9324 internal functions.
9325 * fold-const-call.c (fold_const_call): Handle them.
9326 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
9327 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
9328 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
9329 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
9330 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
9331 (UNSPEC_XORV): New unspecs.
9332 (optab): Add entries for them.
9333 (BITWISEV): New int iterator.
9334 (bit_reduc_op): New int attributes.
9335
9336 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9337 Alan Hayward <alan.hayward@arm.com>
9338 David Sherwood <david.sherwood@arm.com>
9339
9340 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
9341 * internal-fn.def (VEC_SHL_INSERT): New internal function.
9342 * optabs.def (vec_shl_insert_optab): New optab.
9343 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
9344 (duplicate_and_interleave): Likewise.
9345 * tree-vect-loop.c: Include internal-fn.h.
9346 (neutral_op_for_slp_reduction): New function, split out from
9347 get_initial_defs_for_reduction.
9348 (get_initial_def_for_reduction): Handle option 2 for variable-length
9349 vectors by loading the neutral value into a vector and then shifting
9350 the initial value into element 0.
9351 (get_initial_defs_for_reduction): Replace the code argument with
9352 the neutral value calculated by neutral_op_for_slp_reduction.
9353 Use gimple_build_vector for constant-length vectors.
9354 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
9355 but the first group_size elements have a neutral value.
9356 Use duplicate_and_interleave otherwise.
9357 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
9358 Update call to get_initial_defs_for_reduction. Handle SLP
9359 reductions for variable-length vectors by creating one vector
9360 result for each scalar result, with the elements associated
9361 with other scalar results stubbed out with the neutral value.
9362 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
9363 Require IFN_VEC_SHL_INSERT for double reductions on
9364 variable-length vectors, or SLP reductions that have
9365 a neutral value. Require can_duplicate_and_interleave_p
9366 support for variable-length unchained SLP reductions if there
9367 is no neutral value, such as for MIN/MAX reductions. Also require
9368 the number of vector elements to be a multiple of the number of
9369 SLP statements when doing variable-length unchained SLP reductions.
9370 Update call to vect_create_epilog_for_reduction.
9371 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
9372 and remove initial values.
9373 (duplicate_and_interleave): Make public.
9374 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
9375 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
9376
9377 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9378 Alan Hayward <alan.hayward@arm.com>
9379 David Sherwood <david.sherwood@arm.com>
9380
9381 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
9382 (can_duplicate_and_interleave_p): New function.
9383 (vect_get_and_check_slp_defs): Take the vector of statements
9384 rather than just the current one. Remove excess parentheses.
9385 Restriction rejectinon of vect_constant_def and vect_external_def
9386 for variable-length vectors to boolean types, or types for which
9387 can_duplicate_and_interleave_p is false.
9388 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
9389 (duplicate_and_interleave): New function.
9390 (vect_get_constant_vectors): Use gimple_build_vector for
9391 constant-length vectors and suitable variable-length constant
9392 vectors. Use duplicate_and_interleave for other variable-length
9393 vectors. Don't defer the update when inserting new statements.
9394
9395 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9396 Alan Hayward <alan.hayward@arm.com>
9397 David Sherwood <david.sherwood@arm.com>
9398
9399 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
9400 min_profitable_iters doesn't go negative.
9401
9402 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9403 Alan Hayward <alan.hayward@arm.com>
9404 David Sherwood <david.sherwood@arm.com>
9405
9406 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
9407 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
9408 * optabs.def (vec_mask_load_lanes_optab): New optab.
9409 (vec_mask_store_lanes_optab): Likewise.
9410 * internal-fn.def (MASK_LOAD_LANES): New internal function.
9411 (MASK_STORE_LANES): Likewise.
9412 * internal-fn.c (mask_load_lanes_direct): New macro.
9413 (mask_store_lanes_direct): Likewise.
9414 (expand_mask_load_optab_fn): Handle masked operations.
9415 (expand_mask_load_lanes_optab_fn): New macro.
9416 (expand_mask_store_optab_fn): Handle masked operations.
9417 (expand_mask_store_lanes_optab_fn): New macro.
9418 (direct_mask_load_lanes_optab_supported_p): Likewise.
9419 (direct_mask_store_lanes_optab_supported_p): Likewise.
9420 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
9421 parameter.
9422 (vect_load_lanes_supported): Likewise.
9423 * tree-vect-data-refs.c (strip_conversion): New function.
9424 (can_group_stmts_p): Likewise.
9425 (vect_analyze_data_ref_accesses): Use it instead of checking
9426 for a pair of assignments.
9427 (vect_store_lanes_supported): Take a masked_p parameter.
9428 (vect_load_lanes_supported): Likewise.
9429 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
9430 vect_store_lanes_supported and vect_load_lanes_supported.
9431 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
9432 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
9433 parameter. Don't allow gaps for masked accesses.
9434 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
9435 and vect_load_lanes_supported.
9436 (get_load_store_type): Take a masked_p parameter and update
9437 call to get_group_load_store_type.
9438 (vectorizable_store): Update call to get_load_store_type.
9439 Handle IFN_MASK_STORE_LANES.
9440 (vectorizable_load): Update call to get_load_store_type.
9441 Handle IFN_MASK_LOAD_LANES.
9442
9443 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9444 Alan Hayward <alan.hayward@arm.com>
9445 David Sherwood <david.sherwood@arm.com>
9446
9447 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
9448 modes for SVE.
9449 * config/aarch64/aarch64-protos.h
9450 (aarch64_sve_struct_memory_operand_p): Declare.
9451 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
9452 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
9453 (VPRED, vpred): Handle SVE structure modes.
9454 * config/aarch64/constraints.md (Utx): New constraint.
9455 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
9456 (aarch64_sve_struct_nonimmediate_operand): New predicates.
9457 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
9458 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
9459 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
9460 structure modes. Split into pieces after RA.
9461 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
9462 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
9463 New patterns.
9464 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
9465 SVE structure modes.
9466 (aarch64_classify_address): Likewise.
9467 (sizetochar): Move earlier in file.
9468 (aarch64_print_operand): Handle SVE register lists.
9469 (aarch64_array_mode): New function.
9470 (aarch64_sve_struct_memory_operand_p): Likewise.
9471 (TARGET_ARRAY_MODE): Redefine.
9472
9473 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9474 Alan Hayward <alan.hayward@arm.com>
9475 David Sherwood <david.sherwood@arm.com>
9476
9477 * target.def (array_mode): New target hook.
9478 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
9479 * doc/tm.texi: Regenerate.
9480 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
9481 * hooks.c (hook_optmode_mode_uhwi_none): New function.
9482 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
9483 targetm.array_mode.
9484 * stor-layout.c (mode_for_array): Likewise. Support polynomial
9485 type sizes.
9486
9487 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9488 Alan Hayward <alan.hayward@arm.com>
9489 David Sherwood <david.sherwood@arm.com>
9490
9491 * fold-const.c (fold_binary_loc): Check the argument types
9492 rather than the result type when testing for a vector operation.
9493
9494 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9495
9496 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
9497 * doc/tm.texi: Regenerate.
9498
9499 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9500 Alan Hayward <alan.hayward@arm.com>
9501 David Sherwood <david.sherwood@arm.com>
9502
9503 * doc/invoke.texi (-msve-vector-bits=): Document new option.
9504 (sve): Document new AArch64 extension.
9505 * doc/md.texi (w): Extend the description of the AArch64
9506 constraint to include SVE vectors.
9507 (Upl, Upa): Document new AArch64 predicate constraints.
9508 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
9509 enum.
9510 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
9511 (msve-vector-bits=): New option.
9512 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
9513 SVE when these are disabled.
9514 (sve): New extension.
9515 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
9516 modes. Adjust their number of units based on aarch64_sve_vg.
9517 (MAX_BITSIZE_MODE_ANY_MODE): Define.
9518 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
9519 aarch64_addr_query_type.
9520 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
9521 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
9522 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
9523 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
9524 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
9525 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
9526 (aarch64_simd_imm_zero_p): Delete.
9527 (aarch64_check_zero_based_sve_index_immediate): Declare.
9528 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
9529 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
9530 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
9531 (aarch64_sve_float_mul_immediate_p): Likewise.
9532 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
9533 rather than an rtx.
9534 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
9535 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
9536 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
9537 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
9538 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
9539 (aarch64_regmode_natural_size): Likewise.
9540 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
9541 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
9542 left one place.
9543 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
9544 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
9545 for VG and the SVE predicate registers.
9546 (V_ALIASES): Add a "z"-prefixed alias.
9547 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
9548 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
9549 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
9550 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
9551 (REG_CLASS_NAMES): Add entries for them.
9552 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
9553 and the predicate registers.
9554 (aarch64_sve_vg): Declare.
9555 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
9556 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
9557 (REGMODE_NATURAL_SIZE): Define.
9558 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
9559 SVE macros.
9560 * config/aarch64/aarch64.c: Include cfgrtl.h.
9561 (simd_immediate_info): Add a constructor for series vectors,
9562 and an associated step field.
9563 (aarch64_sve_vg): New variable.
9564 (aarch64_dbx_register_number): Handle VG and the predicate registers.
9565 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
9566 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
9567 (VEC_ANY_DATA, VEC_STRUCT): New constants.
9568 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
9569 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
9570 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
9571 (aarch64_get_mask_mode): New functions.
9572 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
9573 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
9574 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
9575 predicate modes and predicate registers. Explicitly restrict
9576 GPRs to modes of 16 bytes or smaller. Only allow FP registers
9577 to store a vector mode if it is recognized by
9578 aarch64_classify_vector_mode.
9579 (aarch64_regmode_natural_size): New function.
9580 (aarch64_hard_regno_caller_save_mode): Return the original mode
9581 for predicates.
9582 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
9583 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
9584 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
9585 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
9586 functions.
9587 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
9588 does not overlap dest if the function is frame-related. Handle
9589 SVE constants.
9590 (aarch64_split_add_offset): New function.
9591 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
9592 them aarch64_add_offset.
9593 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
9594 and update call to aarch64_sub_sp.
9595 (aarch64_add_cfa_expression): New function.
9596 (aarch64_expand_prologue): Pass extra temporary registers to the
9597 functions above. Handle the case in which we need to emit new
9598 DW_CFA_expressions for registers that were originally saved
9599 relative to the stack pointer, but now have to be expressed
9600 relative to the frame pointer.
9601 (aarch64_output_mi_thunk): Pass extra temporary registers to the
9602 functions above.
9603 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
9604 IP0 and IP1 values for SVE frames.
9605 (aarch64_expand_vec_series): New function.
9606 (aarch64_expand_sve_widened_duplicate): Likewise.
9607 (aarch64_expand_sve_const_vector): Likewise.
9608 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
9609 Handle SVE constants. Use emit_move_insn to move a force_const_mem
9610 into the register, rather than emitting a SET directly.
9611 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
9612 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
9613 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
9614 (offset_9bit_signed_scaled_p): New functions.
9615 (aarch64_replicate_bitmask_imm): New function.
9616 (aarch64_bitmask_imm): Use it.
9617 (aarch64_cannot_force_const_mem): Reject expressions involving
9618 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
9619 (aarch64_classify_index): Handle SVE indices, by requiring
9620 a plain register index with a scale that matches the element size.
9621 (aarch64_classify_address): Handle SVE addresses. Assert that
9622 the mode of the address is VOIDmode or an integer mode.
9623 Update call to aarch64_classify_symbol.
9624 (aarch64_classify_symbolic_expression): Update call to
9625 aarch64_classify_symbol.
9626 (aarch64_const_vec_all_in_range_p): New function.
9627 (aarch64_print_vector_float_operand): Likewise.
9628 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
9629 "vN" for FP registers with SVE modes. Handle (const ...) vectors
9630 and the FP immediates 1.0 and 0.5.
9631 (aarch64_print_address_internal): Handle SVE addresses.
9632 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
9633 (aarch64_regno_regclass): Handle predicate registers.
9634 (aarch64_secondary_reload): Handle big-endian reloads of SVE
9635 data modes.
9636 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
9637 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
9638 (aarch64_convert_sve_vector_bits): New function.
9639 (aarch64_override_options): Use it to handle -msve-vector-bits=.
9640 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
9641 rather than an rtx.
9642 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
9643 Handle SVE vector and predicate modes. Accept VL-based constants
9644 that need only one temporary register, and VL offsets that require
9645 no temporary registers.
9646 (aarch64_conditional_register_usage): Mark the predicate registers
9647 as fixed if SVE isn't available.
9648 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
9649 Return true for SVE vector and predicate modes.
9650 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
9651 rather than an unsigned int. Handle SVE modes.
9652 (aarch64_preferred_simd_mode): Update call accordingly. Handle
9653 SVE modes.
9654 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
9655 if SVE is enabled.
9656 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
9657 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
9658 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
9659 (aarch64_sve_float_mul_immediate_p): New functions.
9660 (aarch64_sve_valid_immediate): New function.
9661 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
9662 Explicitly reject structure modes. Check for INDEX constants.
9663 Handle PTRUE and PFALSE constants.
9664 (aarch64_check_zero_based_sve_index_immediate): New function.
9665 (aarch64_simd_imm_zero_p): Delete.
9666 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
9667 vector modes. Accept constants in the range of CNT[BHWD].
9668 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
9669 ask for an Advanced SIMD mode.
9670 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
9671 (aarch64_simd_vector_alignment): Handle SVE predicates.
9672 (aarch64_vectorize_preferred_vector_alignment): New function.
9673 (aarch64_simd_vector_alignment_reachable): Use it instead of
9674 the vector size.
9675 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
9676 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
9677 functions.
9678 (MAX_VECT_LEN): Delete.
9679 (expand_vec_perm_d): Add a vec_flags field.
9680 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
9681 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
9682 (aarch64_evpc_ext): Don't apply a big-endian lane correction
9683 for SVE modes.
9684 (aarch64_evpc_rev): Rename to...
9685 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
9686 (aarch64_evpc_rev_global): New function.
9687 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
9688 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
9689 MAX_VECT_LEN.
9690 (aarch64_evpc_sve_tbl): New function.
9691 (aarch64_expand_vec_perm_const_1): Update after rename of
9692 aarch64_evpc_rev. Handle SVE permutes too, trying
9693 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
9694 than aarch64_evpc_tbl.
9695 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
9696 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
9697 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
9698 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
9699 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
9700 (aarch64_expand_sve_vcond): New functions.
9701 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
9702 of aarch64_vector_mode_p.
9703 (aarch64_dwarf_poly_indeterminate_value): New function.
9704 (aarch64_compute_pressure_classes): Likewise.
9705 (aarch64_can_change_mode_class): Likewise.
9706 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
9707 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
9708 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
9709 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
9710 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
9711 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
9712 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
9713 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
9714 constraints.
9715 (Dn, Dl, Dr): Accept const as well as const_vector.
9716 (Dz): Likewise. Compare against CONST0_RTX.
9717 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
9718 of "vector" where appropriate.
9719 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
9720 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
9721 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
9722 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
9723 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
9724 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
9725 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
9726 (v_int_equiv): Extend to SVE modes.
9727 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
9728 mode attributes.
9729 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
9730 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
9731 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
9732 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
9733 (SVE_COND_FP_CMP): New int iterators.
9734 (perm_hilo): Handle the new unpack unspecs.
9735 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
9736 attributes.
9737 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
9738 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
9739 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
9740 (aarch64_equality_operator, aarch64_constant_vector_operand)
9741 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
9742 (aarch64_sve_nonimmediate_operand): Likewise.
9743 (aarch64_sve_general_operand): Likewise.
9744 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
9745 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
9746 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
9747 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
9748 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
9749 (aarch64_sve_float_arith_immediate): Likewise.
9750 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
9751 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
9752 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
9753 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
9754 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
9755 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
9756 (aarch64_sve_float_arith_operand): Likewise.
9757 (aarch64_sve_float_arith_with_sub_operand): Likewise.
9758 (aarch64_sve_float_mul_operand): Likewise.
9759 (aarch64_sve_vec_perm_operand): Likewise.
9760 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
9761 (aarch64_mov_operand): Accept const_poly_int and const_vector.
9762 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
9763 as well as const_vector.
9764 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
9765 in file. Use CONST0_RTX and CONSTM1_RTX.
9766 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
9767 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
9768 Use aarch64_simd_imm_zero.
9769 * config/aarch64/aarch64-sve.md: New file.
9770 * config/aarch64/aarch64.md: Include it.
9771 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
9772 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
9773 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
9774 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
9775 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
9776 (sve): New attribute.
9777 (enabled): Disable instructions with the sve attribute unless
9778 TARGET_SVE.
9779 (movqi, movhi): Pass CONST_POLY_INT operaneds through
9780 aarch64_expand_mov_immediate.
9781 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
9782 CNT[BHSD] immediates.
9783 (movti): Split CONST_POLY_INT moves into two halves.
9784 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
9785 Split additions that need a temporary here if the destination
9786 is the stack pointer.
9787 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
9788 (*add<mode>3_poly_1): New instruction.
9789 (set_clobber_cc): New expander.
9790
9791 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9792
9793 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
9794 parameter and use it instead of GET_MODE_SIZE (innermode). Use
9795 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
9796 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
9797 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
9798 Change innermode from fixed_mode_size to machine_mode.
9799 (simplify_subreg): Update call accordingly. Handle a constant-sized
9800 subreg of a variable-length CONST_VECTOR.
9801
9802 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
9803 Alan Hayward <alan.hayward@arm.com>
9804 David Sherwood <david.sherwood@arm.com>
9805
9806 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
9807 (add_offset_to_base): New function, split out from...
9808 (create_mem_ref): ...here. When handling a scale other than 1,
9809 check first whether the address is valid without the offset.
9810 Add it into the base if so, leaving the index and scale as-is.
9811
9812 2018-01-12 Jakub Jelinek <jakub@redhat.com>
9813
9814 PR c++/83778
9815 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
9816 fold_for_warn before checking if arg2 is INTEGER_CST.
9817
9818 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
9819
9820 * config/rs6000/predicates.md (load_multiple_operation): Delete.
9821 (store_multiple_operation): Delete.
9822 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
9823 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
9824 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
9825 guarded by TARGET_STRING.
9826 (rs6000_output_load_multiple): Delete.
9827 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
9828 OPTION_MASK_STRING / TARGET_STRING handling.
9829 (print_operand) <'N', 'O'>: Add comment that these are unused now.
9830 (const rs6000_opt_masks) <"string">: Change mask to 0.
9831 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
9832 (MASK_STRING): Delete.
9833 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
9834 parts. Simplify.
9835 (load_multiple): Delete.
9836 (*ldmsi8): Delete.
9837 (*ldmsi7): Delete.
9838 (*ldmsi6): Delete.
9839 (*ldmsi5): Delete.
9840 (*ldmsi4): Delete.
9841 (*ldmsi3): Delete.
9842 (store_multiple): Delete.
9843 (*stmsi8): Delete.
9844 (*stmsi7): Delete.
9845 (*stmsi6): Delete.
9846 (*stmsi5): Delete.
9847 (*stmsi4): Delete.
9848 (*stmsi3): Delete.
9849 (movmemsi_8reg): Delete.
9850 (corresponding unnamed define_insn): Delete.
9851 (movmemsi_6reg): Delete.
9852 (corresponding unnamed define_insn): Delete.
9853 (movmemsi_4reg): Delete.
9854 (corresponding unnamed define_insn): Delete.
9855 (movmemsi_2reg): Delete.
9856 (corresponding unnamed define_insn): Delete.
9857 (movmemsi_1reg): Delete.
9858 (corresponding unnamed define_insn): Delete.
9859 * config/rs6000/rs6000.opt (mno-string): New.
9860 (mstring): Replace by deprecation warning stub.
9861 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
9862
9863 2018-01-12 Jakub Jelinek <jakub@redhat.com>
9864
9865 * regrename.c (regrename_do_replace): If replacing the same
9866 reg multiple times, try to reuse last created gen_raw_REG.
9867
9868 PR debug/81155
9869 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
9870 main to workaround a bug in GDB.
9871
9872 2018-01-12 Tom de Vries <tom@codesourcery.com>
9873
9874 PR target/83737
9875 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
9876
9877 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
9878
9879 PR rtl-optimization/80481
9880 * ira-color.c (get_cap_member): New function.
9881 (allocnos_conflict_by_live_ranges_p): Use it.
9882 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
9883 (setup_slot_coalesced_allocno_live_ranges): Ditto.
9884
9885 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
9886
9887 PR target/83628
9888 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
9889 (*saddl_se_1): Ditto.
9890 (*ssubsi_1): Ditto.
9891 (*ssubl_se_1): Ditto.
9892
9893 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
9894
9895 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
9896 rather than wi::to_widest for DR_INITs.
9897 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
9898 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
9899 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
9900 INTEGER_CSTs.
9901 (vect_analyze_group_access_1): Note that here.
9902
9903 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
9904
9905 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
9906 polynomial type sizes.
9907
9908 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
9909
9910 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
9911 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
9912 (gimple_add_tmp_var): Likewise.
9913
9914 2018-01-12 Martin Liska <mliska@suse.cz>
9915
9916 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
9917 (gimple_alloc_sizes): Likewise.
9918 (dump_gimple_statistics): Use PRIu64 in printf format.
9919 * gimple.h: Change uint64_t to int.
9920
9921 2018-01-12 Martin Liska <mliska@suse.cz>
9922
9923 * tree-core.h: Use uint64_t instead of int.
9924 * tree.c (tree_node_counts): Likewise.
9925 (tree_node_sizes): Likewise.
9926 (dump_tree_statistics): Use PRIu64 in printf format.
9927
9928 2018-01-12 Martin Liska <mliska@suse.cz>
9929
9930 * Makefile.in: As qsort_chk is implemented in vec.c, add
9931 vec.o to linkage of gencfn-macros.
9932 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
9933 passing the info to record_node_allocation_statistics.
9934 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
9935 and pass the info.
9936 * ggc-common.c (struct ggc_usage): Add operator== and use
9937 it in operator< and compare function.
9938 * mem-stats.h (struct mem_usage): Likewise.
9939 * vec.c (struct vec_usage): Remove operator< and compare
9940 function. Can be simply inherited.
9941
9942 2018-01-12 Martin Jambor <mjambor@suse.cz>
9943
9944 PR target/81616
9945 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
9946 * tree-ssa-math-opts.c: Include domwalk.h.
9947 (convert_mult_to_fma_1): New function.
9948 (fma_transformation_info): New type.
9949 (fma_deferring_state): Likewise.
9950 (cancel_fma_deferring): New function.
9951 (result_of_phi): Likewise.
9952 (last_fma_candidate_feeds_initial_phi): Likewise.
9953 (convert_mult_to_fma): Added deferring logic, split actual
9954 transformation to convert_mult_to_fma_1.
9955 (math_opts_dom_walker): New type.
9956 (math_opts_dom_walker::after_dom_children): New method, body moved
9957 here from pass_optimize_widening_mul::execute, added deferring logic
9958 bits.
9959 (pass_optimize_widening_mul::execute): Moved most of code to
9960 math_opts_dom_walker::after_dom_children.
9961 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
9962 * config/i386/i386.c (ix86_option_override_internal): Added
9963 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
9964
9965 2018-01-12 Richard Biener <rguenther@suse.de>
9966
9967 PR debug/83157
9968 * dwarf2out.c (gen_variable_die): Do not reset old_die for
9969 inline instance vars.
9970
9971 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
9972
9973 PR target/81819
9974 * config/rx/rx.c (rx_is_restricted_memory_address):
9975 Handle SUBREG case.
9976
9977 2018-01-12 Richard Biener <rguenther@suse.de>
9978
9979 PR tree-optimization/80846
9980 * target.def (split_reduction): New target hook.
9981 * targhooks.c (default_split_reduction): New function.
9982 * targhooks.h (default_split_reduction): Declare.
9983 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
9984 target requests first reduce vectors by combining low and high
9985 parts.
9986 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
9987 (get_vectype_for_scalar_type_and_size): Export.
9988 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
9989 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
9990 * doc/tm.texi: Regenerate.
9991 * config/i386/i386.c (ix86_split_reduction): Implement
9992 TARGET_VECTORIZE_SPLIT_REDUCTION.
9993
9994 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
9995
9996 PR target/83368
9997 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
9998 in PIC mode except for TARGET_VXWORKS_RTP.
9999 * config/sparc/sparc.c: Include cfgrtl.h.
10000 (TARGET_INIT_PIC_REG): Define.
10001 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
10002 (sparc_pic_register_p): New predicate.
10003 (sparc_legitimate_address_p): Use it.
10004 (sparc_legitimize_pic_address): Likewise.
10005 (sparc_delegitimize_address): Likewise.
10006 (sparc_mode_dependent_address_p): Likewise.
10007 (gen_load_pcrel_sym): Remove 4th parameter.
10008 (load_got_register): Adjust call to above. Remove obsolete stuff.
10009 (sparc_expand_prologue): Do not call load_got_register here.
10010 (sparc_flat_expand_prologue): Likewise.
10011 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
10012 (sparc_use_pseudo_pic_reg): New function.
10013 (sparc_init_pic_reg): Likewise.
10014 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
10015 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
10016
10017 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
10018
10019 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
10020 Add item for branch_cost.
10021
10022 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
10023
10024 PR rtl-optimization/83565
10025 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
10026 not extend the result to a larger mode for rotate operations.
10027 (num_sign_bit_copies1): Likewise.
10028
10029 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10030
10031 PR target/40411
10032 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
10033 -symbolic.
10034 Use values-Xc.o for -pedantic.
10035 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
10036
10037 2018-01-12 Martin Liska <mliska@suse.cz>
10038
10039 PR ipa/83054
10040 * ipa-devirt.c (final_warning_record::grow_type_warnings):
10041 New function.
10042 (possible_polymorphic_call_targets): Use it.
10043 (ipa_devirt): Likewise.
10044
10045 2018-01-12 Martin Liska <mliska@suse.cz>
10046
10047 * profile-count.h (enum profile_quality): Use 0 as invalid
10048 enum value of profile_quality.
10049
10050 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
10051
10052 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
10053 -mext-string options.
10054
10055 2018-01-12 Richard Biener <rguenther@suse.de>
10056
10057 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
10058 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
10059 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
10060 Likewise.
10061 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
10062
10063 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
10064
10065 * configure.ac (--with-long-double-format): Add support for the
10066 configuration option to change the default long double format on
10067 PowerPC systems.
10068 * config.gcc (powerpc*-linux*-*): Likewise.
10069 * configure: Regenerate.
10070 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
10071 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
10072 used without modification.
10073
10074 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10075
10076 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
10077 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
10078 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
10079 MISC_BUILTIN_SPEC_BARRIER.
10080 (rs6000_init_builtins): Likewise.
10081 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
10082 enum value.
10083 (speculation_barrier): New define_insn.
10084 * doc/extend.texi: Document __builtin_speculation_barrier.
10085
10086 2018-01-11 Jakub Jelinek <jakub@redhat.com>
10087
10088 PR target/83203
10089 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
10090 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
10091 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
10092 iterators.
10093 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
10094 integral modes instead of "ss" and "sd".
10095 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
10096 vectors with 32-bit and 64-bit elements.
10097 (vecdupssescalarmodesuffix): New mode attribute.
10098 (vec_dup<mode>): Use it.
10099
10100 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
10101
10102 PR target/83330
10103 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
10104 frame if argument is passed on stack.
10105
10106 2018-01-11 Jakub Jelinek <jakub@redhat.com>
10107
10108 PR target/82682
10109 * ree.c (combine_reaching_defs): Optimize also
10110 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
10111 reg2=any_extend(exp); reg1=reg2;, formatting fix.
10112
10113 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
10114
10115 PR middle-end/83189
10116 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
10117
10118 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
10119
10120 PR middle-end/83718
10121 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
10122 after they are computed.
10123
10124 2018-01-11 Bin Cheng <bin.cheng@arm.com>
10125
10126 PR tree-optimization/83695
10127 * gimple-loop-linterchange.cc
10128 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
10129 reset cached scev information after interchange.
10130 (pass_linterchange::execute): Remove call to scev_reset_htab.
10131
10132 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10133
10134 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
10135 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
10136 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
10137 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
10138 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
10139 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
10140 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
10141 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
10142 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
10143 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
10144 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
10145 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
10146 (V_lane_reg): Likewise.
10147 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
10148 New define_expand.
10149 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
10150 (vfmal_lane_low<mode>_intrinsic,
10151 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
10152 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
10153 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
10154 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
10155 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
10156 vfmsl_lane_high<mode>_intrinsic): New define_insns.
10157
10158 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10159
10160 * config/arm/arm-cpus.in (fp16fml): New feature.
10161 (ALL_SIMD): Add fp16fml.
10162 (armv8.2-a): Add fp16fml as an option.
10163 (armv8.3-a): Likewise.
10164 (armv8.4-a): Add fp16fml as part of fp16.
10165 * config/arm/arm.h (TARGET_FP16FML): Define.
10166 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
10167 when appropriate.
10168 * config/arm/arm-modes.def (V2HF): Define.
10169 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
10170 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
10171 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
10172 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
10173 vfmsl_low, vfmsl_high): New set of builtins.
10174 * config/arm/iterators.md (PLUSMINUS): New code iterator.
10175 (vfml_op): New code attribute.
10176 (VFMLHALVES): New int iterator.
10177 (VFML, VFMLSEL): New mode attributes.
10178 (V_reg): Define mapping for V2HF.
10179 (V_hi, V_lo): New mode attributes.
10180 (VF_constraint): Likewise.
10181 (vfml_half, vfml_half_selector): New int attributes.
10182 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
10183 define_expand.
10184 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
10185 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
10186 New define_insn.
10187 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
10188 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
10189 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
10190 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
10191 documentation.
10192 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
10193 Document new effective target and option set.
10194
10195 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10196
10197 * config/arm/arm-cpus.in (armv8_4): New feature.
10198 (ARMv8_4a): New fgroup.
10199 (armv8.4-a): New arch.
10200 * config/arm/arm-tables.opt: Regenerate.
10201 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
10202 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
10203 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
10204 Add matching rules for -march=armv8.4-a and extensions.
10205 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
10206
10207 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
10208
10209 PR target/81821
10210 * config/rx/rx.md (BW): New mode attribute.
10211 (sync_lock_test_and_setsi): Add mode suffix to insn output.
10212
10213 2018-01-11 Richard Biener <rguenther@suse.de>
10214
10215 PR tree-optimization/83435
10216 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
10217 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
10218 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
10219
10220 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10221 Alan Hayward <alan.hayward@arm.com>
10222 David Sherwood <david.sherwood@arm.com>
10223
10224 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
10225 field.
10226 (aarch64_classify_address): Initialize it. Track polynomial offsets.
10227 (aarch64_print_address_internal): Use it to check for a zero offset.
10228
10229 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10230 Alan Hayward <alan.hayward@arm.com>
10231 David Sherwood <david.sherwood@arm.com>
10232
10233 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
10234 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
10235 Return a poly_int64 rather than a HOST_WIDE_INT.
10236 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
10237 rather than a HOST_WIDE_INT.
10238 * config/aarch64/aarch64.h (aarch64_frame): Protect with
10239 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
10240 hard_fp_offset, frame_size, initial_adjust, callee_offset and
10241 final_offset from HOST_WIDE_INT to poly_int64.
10242 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
10243 to_constant when getting the number of units in an Advanced SIMD
10244 mode.
10245 (aarch64_builtin_vectorized_function): Check for a constant number
10246 of units.
10247 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
10248 GET_MODE_SIZE.
10249 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
10250 attribute instead of GET_MODE_NUNITS.
10251 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
10252 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
10253 GET_MODE_SIZE for fixed-size registers.
10254 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
10255 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
10256 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
10257 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
10258 (aarch64_print_operand, aarch64_print_address_internal)
10259 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
10260 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
10261 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
10262 Handle polynomial GET_MODE_SIZE.
10263 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
10264 wider than SImode without modification.
10265 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
10266 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
10267 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
10268 passing and returning SVE modes.
10269 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
10270 rather than GEN_INT.
10271 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
10272 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
10273 (aarch64_allocate_and_probe_stack_space): Likewise.
10274 (aarch64_layout_frame): Cope with polynomial offsets.
10275 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
10276 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
10277 polynomial offsets.
10278 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
10279 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
10280 poly_int64 rather than a HOST_WIDE_INT.
10281 (aarch64_get_separate_components, aarch64_process_components)
10282 (aarch64_expand_prologue, aarch64_expand_epilogue)
10283 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
10284 (aarch64_anchor_offset): New function, split out from...
10285 (aarch64_legitimize_address): ...here.
10286 (aarch64_builtin_vectorization_cost): Handle polynomial
10287 TYPE_VECTOR_SUBPARTS.
10288 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
10289 GET_MODE_NUNITS.
10290 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
10291 number of elements from the PARALLEL rather than the mode.
10292 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
10293 rather than GET_MODE_BITSIZE.
10294 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
10295 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
10296 (aarch64_expand_vec_perm_const_1): Handle polynomial
10297 d->perm.length () and d->perm elements.
10298 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
10299 Apply to_constant to d->perm elements.
10300 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
10301 polynomial CONST_VECTOR_NUNITS.
10302 (aarch64_move_pointer): Take amount as a poly_int64 rather
10303 than an int.
10304 (aarch64_progress_pointer): Avoid temporary variable.
10305 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
10306 the mode attribute instead of GET_MODE.
10307
10308 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10309 Alan Hayward <alan.hayward@arm.com>
10310 David Sherwood <david.sherwood@arm.com>
10311
10312 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
10313 x exists before using it.
10314 (aarch64_add_constant_internal): Rename to...
10315 (aarch64_add_offset_1): ...this. Replace regnum with separate
10316 src and dest rtxes. Handle the case in which they're different,
10317 including when the offset is zero. Replace scratchreg with an rtx.
10318 Use 2 additions if there is no spare register into which we can
10319 move a 16-bit constant.
10320 (aarch64_add_constant): Delete.
10321 (aarch64_add_offset): Replace reg with separate src and dest
10322 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
10323 Use aarch64_add_offset_1.
10324 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
10325 an rtx rather than an int. Take the delta as a poly_int64
10326 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
10327 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
10328 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
10329 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
10330 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
10331 and aarch64_add_sp.
10332 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
10333 aarch64_add_constant.
10334
10335 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10336
10337 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
10338 Use scalar_float_mode.
10339
10340 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10341
10342 * config/aarch64/aarch64-simd.md
10343 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
10344 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
10345 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
10346 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
10347 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
10348 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
10349 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
10350 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
10351 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
10352 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
10353
10354 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10355
10356 PR target/83514
10357 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
10358 targ_options->x_arm_arch_string is non NULL.
10359
10360 2018-01-11 Tamar Christina <tamar.christina@arm.com>
10361
10362 * config/aarch64/aarch64.h
10363 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
10364
10365 2018-01-11 Sudakshina Das <sudi.das@arm.com>
10366
10367 PR target/82096
10368 * expmed.c (emit_store_flag_force): Swap if const op0
10369 and change VOIDmode to mode of op0.
10370
10371 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
10372
10373 PR rtl-optimization/83761
10374 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
10375 than bytes to mode_for_size.
10376
10377 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
10378
10379 PR middle-end/83189
10380 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
10381 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
10382 profile.
10383
10384 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
10385
10386 PR middle-end/83575
10387 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
10388 when in layout mode.
10389 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
10390 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
10391 partition fixup.
10392
10393 2018-01-10 Michael Collison <michael.collison@arm.com>
10394
10395 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
10396 * config/aarch64/aarch64-option-extension.def: Add
10397 AARCH64_OPT_EXTENSION of 'fp16fml'.
10398 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
10399 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
10400 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
10401 * config/aarch64/constraints.md (Ui7): New constraint.
10402 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
10403 (VFMLA_SEL_W): Ditto.
10404 (f16quad): Ditto.
10405 (f16mac1): Ditto.
10406 (VFMLA16_LOW): New int iterator.
10407 (VFMLA16_HIGH): Ditto.
10408 (UNSPEC_FMLAL): New unspec.
10409 (UNSPEC_FMLSL): Ditto.
10410 (UNSPEC_FMLAL2): Ditto.
10411 (UNSPEC_FMLSL2): Ditto.
10412 (f16mac): New code attribute.
10413 * config/aarch64/aarch64-simd-builtins.def
10414 (aarch64_fmlal_lowv2sf): Ditto.
10415 (aarch64_fmlsl_lowv2sf): Ditto.
10416 (aarch64_fmlalq_lowv4sf): Ditto.
10417 (aarch64_fmlslq_lowv4sf): Ditto.
10418 (aarch64_fmlal_highv2sf): Ditto.
10419 (aarch64_fmlsl_highv2sf): Ditto.
10420 (aarch64_fmlalq_highv4sf): Ditto.
10421 (aarch64_fmlslq_highv4sf): Ditto.
10422 (aarch64_fmlal_lane_lowv2sf): Ditto.
10423 (aarch64_fmlsl_lane_lowv2sf): Ditto.
10424 (aarch64_fmlal_laneq_lowv2sf): Ditto.
10425 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
10426 (aarch64_fmlalq_lane_lowv4sf): Ditto.
10427 (aarch64_fmlsl_lane_lowv4sf): Ditto.
10428 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
10429 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
10430 (aarch64_fmlal_lane_highv2sf): Ditto.
10431 (aarch64_fmlsl_lane_highv2sf): Ditto.
10432 (aarch64_fmlal_laneq_highv2sf): Ditto.
10433 (aarch64_fmlsl_laneq_highv2sf): Ditto.
10434 (aarch64_fmlalq_lane_highv4sf): Ditto.
10435 (aarch64_fmlsl_lane_highv4sf): Ditto.
10436 (aarch64_fmlalq_laneq_highv4sf): Ditto.
10437 (aarch64_fmlsl_laneq_highv4sf): Ditto.
10438 * config/aarch64/aarch64-simd.md:
10439 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
10440 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
10441 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
10442 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
10443 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
10444 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
10445 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
10446 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
10447 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
10448 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
10449 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
10450 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
10451 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
10452 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
10453 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
10454 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
10455 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
10456 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
10457 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
10458 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
10459 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
10460 (vfmlsl_low_u32): Ditto.
10461 (vfmlalq_low_u32): Ditto.
10462 (vfmlslq_low_u32): Ditto.
10463 (vfmlal_high_u32): Ditto.
10464 (vfmlsl_high_u32): Ditto.
10465 (vfmlalq_high_u32): Ditto.
10466 (vfmlslq_high_u32): Ditto.
10467 (vfmlal_lane_low_u32): Ditto.
10468 (vfmlsl_lane_low_u32): Ditto.
10469 (vfmlal_laneq_low_u32): Ditto.
10470 (vfmlsl_laneq_low_u32): Ditto.
10471 (vfmlalq_lane_low_u32): Ditto.
10472 (vfmlslq_lane_low_u32): Ditto.
10473 (vfmlalq_laneq_low_u32): Ditto.
10474 (vfmlslq_laneq_low_u32): Ditto.
10475 (vfmlal_lane_high_u32): Ditto.
10476 (vfmlsl_lane_high_u32): Ditto.
10477 (vfmlal_laneq_high_u32): Ditto.
10478 (vfmlsl_laneq_high_u32): Ditto.
10479 (vfmlalq_lane_high_u32): Ditto.
10480 (vfmlslq_lane_high_u32): Ditto.
10481 (vfmlalq_laneq_high_u32): Ditto.
10482 (vfmlslq_laneq_high_u32): Ditto.
10483 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
10484 (AARCH64_FL_FOR_ARCH8_4): New.
10485 (AARCH64_ISA_F16FML): New ISA flag.
10486 (TARGET_F16FML): New feature flag for fp16fml.
10487 (doc/invoke.texi): Document new fp16fml option.
10488
10489 2018-01-10 Michael Collison <michael.collison@arm.com>
10490
10491 * config/aarch64/aarch64-builtins.c:
10492 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
10493 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
10494 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
10495 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
10496 (AARCH64_ISA_SHA3): New ISA flag.
10497 (TARGET_SHA3): New feature flag for sha3.
10498 * config/aarch64/iterators.md (sha512_op): New int attribute.
10499 (CRYPTO_SHA512): New int iterator.
10500 (UNSPEC_SHA512H): New unspec.
10501 (UNSPEC_SHA512H2): Ditto.
10502 (UNSPEC_SHA512SU0): Ditto.
10503 (UNSPEC_SHA512SU1): Ditto.
10504 * config/aarch64/aarch64-simd-builtins.def
10505 (aarch64_crypto_sha512hqv2di): New builtin.
10506 (aarch64_crypto_sha512h2qv2di): Ditto.
10507 (aarch64_crypto_sha512su0qv2di): Ditto.
10508 (aarch64_crypto_sha512su1qv2di): Ditto.
10509 (aarch64_eor3qv8hi): Ditto.
10510 (aarch64_rax1qv2di): Ditto.
10511 (aarch64_xarqv2di): Ditto.
10512 (aarch64_bcaxqv8hi): Ditto.
10513 * config/aarch64/aarch64-simd.md:
10514 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
10515 (aarch64_crypto_sha512su0qv2di): Ditto.
10516 (aarch64_crypto_sha512su1qv2di): Ditto.
10517 (aarch64_eor3qv8hi): Ditto.
10518 (aarch64_rax1qv2di): Ditto.
10519 (aarch64_xarqv2di): Ditto.
10520 (aarch64_bcaxqv8hi): Ditto.
10521 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
10522 (vsha512h2q_u64): Ditto.
10523 (vsha512su0q_u64): Ditto.
10524 (vsha512su1q_u64): Ditto.
10525 (veor3q_u16): Ditto.
10526 (vrax1q_u64): Ditto.
10527 (vxarq_u64): Ditto.
10528 (vbcaxq_u16): Ditto.
10529 * config/arm/types.md (crypto_sha512): New type attribute.
10530 (crypto_sha3): Ditto.
10531 (doc/invoke.texi): Document new sha3 option.
10532
10533 2018-01-10 Michael Collison <michael.collison@arm.com>
10534
10535 * config/aarch64/aarch64-builtins.c:
10536 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
10537 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
10538 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
10539 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
10540 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
10541 (AARCH64_ISA_SM4): New ISA flag.
10542 (TARGET_SM4): New feature flag for sm4.
10543 * config/aarch64/aarch64-simd-builtins.def
10544 (aarch64_sm3ss1qv4si): Ditto.
10545 (aarch64_sm3tt1aq4si): Ditto.
10546 (aarch64_sm3tt1bq4si): Ditto.
10547 (aarch64_sm3tt2aq4si): Ditto.
10548 (aarch64_sm3tt2bq4si): Ditto.
10549 (aarch64_sm3partw1qv4si): Ditto.
10550 (aarch64_sm3partw2qv4si): Ditto.
10551 (aarch64_sm4eqv4si): Ditto.
10552 (aarch64_sm4ekeyqv4si): Ditto.
10553 * config/aarch64/aarch64-simd.md:
10554 (aarch64_sm3ss1qv4si): Ditto.
10555 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
10556 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
10557 (aarch64_sm4eqv4si): Ditto.
10558 (aarch64_sm4ekeyqv4si): Ditto.
10559 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
10560 (sm3part_op): Ditto.
10561 (CRYPTO_SM3TT): Ditto.
10562 (CRYPTO_SM3PART): Ditto.
10563 (UNSPEC_SM3SS1): New unspec.
10564 (UNSPEC_SM3TT1A): Ditto.
10565 (UNSPEC_SM3TT1B): Ditto.
10566 (UNSPEC_SM3TT2A): Ditto.
10567 (UNSPEC_SM3TT2B): Ditto.
10568 (UNSPEC_SM3PARTW1): Ditto.
10569 (UNSPEC_SM3PARTW2): Ditto.
10570 (UNSPEC_SM4E): Ditto.
10571 (UNSPEC_SM4EKEY): Ditto.
10572 * config/aarch64/constraints.md (Ui2): New constraint.
10573 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
10574 * config/arm/types.md (crypto_sm3): New type attribute.
10575 (crypto_sm4): Ditto.
10576 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
10577 (vsm3tt1aq_u32): Ditto.
10578 (vsm3tt1bq_u32): Ditto.
10579 (vsm3tt2aq_u32): Ditto.
10580 (vsm3tt2bq_u32): Ditto.
10581 (vsm3partw1q_u32): Ditto.
10582 (vsm3partw2q_u32): Ditto.
10583 (vsm4eq_u32): Ditto.
10584 (vsm4ekeyq_u32): Ditto.
10585 (doc/invoke.texi): Document new sm4 option.
10586
10587 2018-01-10 Michael Collison <michael.collison@arm.com>
10588
10589 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
10590 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
10591 (AARCH64_FL_FOR_ARCH8_4): New.
10592 (AARCH64_FL_V8_4): New flag.
10593 (doc/invoke.texi): Document new armv8.4-a option.
10594
10595 2018-01-10 Michael Collison <michael.collison@arm.com>
10596
10597 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
10598 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
10599 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
10600 * config/aarch64/aarch64-option-extension.def: Add
10601 AARCH64_OPT_EXTENSION of 'sha2'.
10602 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
10603 (crypto): Disable sha2 and aes if crypto disabled.
10604 (crypto): Enable aes and sha2 if enabled.
10605 (simd): Disable sha2 and aes if simd disabled.
10606 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
10607 New flags.
10608 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
10609 (TARGET_SHA2): New feature flag for sha2.
10610 (TARGET_AES): New feature flag for aes.
10611 * config/aarch64/aarch64-simd.md:
10612 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
10613 conditional on TARGET_AES.
10614 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
10615 (aarch64_crypto_sha1hsi): Make pattern conditional
10616 on TARGET_SHA2.
10617 (aarch64_crypto_sha1hv4si): Ditto.
10618 (aarch64_be_crypto_sha1hv4si): Ditto.
10619 (aarch64_crypto_sha1su1v4si): Ditto.
10620 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
10621 (aarch64_crypto_sha1su0v4si): Ditto.
10622 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
10623 (aarch64_crypto_sha256su0v4si): Ditto.
10624 (aarch64_crypto_sha256su1v4si): Ditto.
10625 (doc/invoke.texi): Document new aes and sha2 options.
10626
10627 2018-01-10 Martin Sebor <msebor@redhat.com>
10628
10629 PR tree-optimization/83781
10630 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
10631 as string arrays.
10632
10633 2018-01-11 Martin Sebor <msebor@gmail.com>
10634 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
10635
10636 PR tree-optimization/83501
10637 PR tree-optimization/81703
10638
10639 * tree-ssa-strlen.c (get_string_cst): Rename...
10640 (get_string_len): ...to this. Handle global constants.
10641 (handle_char_store): Adjust.
10642
10643 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
10644 Jim Wilson <jimw@sifive.com>
10645
10646 * config/riscv/riscv-protos.h (riscv_output_return): New.
10647 * config/riscv/riscv.c (struct machine_function): New naked_p field.
10648 (riscv_attribute_table, riscv_output_return),
10649 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
10650 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
10651 (riscv_compute_frame_info): Only compute frame->mask if not a naked
10652 function.
10653 (riscv_expand_prologue): Add early return for naked function.
10654 (riscv_expand_epilogue): Likewise.
10655 (riscv_function_ok_for_sibcall): Return false for naked function.
10656 (riscv_set_current_function): New.
10657 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
10658 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
10659 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
10660 * doc/extend.texi (RISC-V Function Attributes): New.
10661
10662 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
10663
10664 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
10665 check for 128-bit long double before checking TCmode.
10666 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
10667 128-bit long doubles before checking TFmode or TCmode.
10668 (FLOAT128_IBM_P): Likewise.
10669
10670 2018-01-10 Martin Sebor <msebor@redhat.com>
10671
10672 PR tree-optimization/83671
10673 * builtins.c (c_strlen): Unconditionally return zero for the empty
10674 string.
10675 Use -Warray-bounds for warnings.
10676 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
10677 for non-constant array indices with COMPONENT_REF, arrays of
10678 arrays, and pointers to arrays.
10679 (gimple_fold_builtin_strlen): Determine and set length range for
10680 non-constant character arrays.
10681
10682 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
10683
10684 PR middle-end/81897
10685 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
10686 empty blocks.
10687
10688 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
10689
10690 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
10691
10692 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
10693
10694 PR target/83399
10695 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
10696 VECTOR_MEM_ALTIVEC_OR_VSX_P.
10697 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
10698 indexed_or_indirect_operand predicate.
10699 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
10700 (*vsx_le_perm_load_v8hi): Likewise.
10701 (*vsx_le_perm_load_v16qi): Likewise.
10702 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
10703 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
10704 (*vsx_le_perm_store_v8hi): Likewise.
10705 (*vsx_le_perm_store_v16qi): Likewise.
10706 (eight unnamed splitters): Likewise.
10707
10708 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
10709
10710 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
10711 * config/rs6000/emmintrin.h: Likewise.
10712 * config/rs6000/mmintrin.h: Likewise.
10713 * config/rs6000/xmmintrin.h: Likewise.
10714
10715 2018-01-10 David Malcolm <dmalcolm@redhat.com>
10716
10717 PR c++/43486
10718 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
10719 "public_flag".
10720 * tree.c (tree_nop_conversion): Return true for location wrapper
10721 nodes.
10722 (maybe_wrap_with_location): New function.
10723 (selftest::check_strip_nops): New function.
10724 (selftest::test_location_wrappers): New function.
10725 (selftest::tree_c_tests): Call it.
10726 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
10727 (maybe_wrap_with_location): New decl.
10728 (EXPR_LOCATION_WRAPPER_P): New macro.
10729 (location_wrapper_p): New inline function.
10730 (tree_strip_any_location_wrapper): New inline function.
10731
10732 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
10733
10734 PR target/83735
10735 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
10736 stack_realign_offset for the largest alignment of stack slot
10737 actually used.
10738 (ix86_find_max_used_stack_alignment): New function.
10739 (ix86_finalize_stack_frame_flags): Use it. Set
10740 max_used_stack_alignment if we don't realign stack.
10741 * config/i386/i386.h (machine_function): Add
10742 max_used_stack_alignment.
10743
10744 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
10745
10746 * config/arm/arm.opt (-mbranch-cost): New option.
10747 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
10748 account.
10749
10750 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
10751
10752 PR target/83629
10753 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
10754 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
10755
10756 2018-01-10 Richard Biener <rguenther@suse.de>
10757
10758 PR debug/83765
10759 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
10760 early out so it also covers the case where we have a non-NULL
10761 origin.
10762
10763 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
10764
10765 PR tree-optimization/83753
10766 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
10767 for non-strided grouped accesses if the number of elements is 1.
10768
10769 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
10770
10771 PR target/81616
10772 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
10773 * i386.h (TARGET_USE_GATHER): Define.
10774 * x86-tune.def (X86_TUNE_USE_GATHER): New.
10775
10776 2018-01-10 Martin Liska <mliska@suse.cz>
10777
10778 PR bootstrap/82831
10779 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
10780 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
10781 partitioning.
10782 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
10783 CLEANUP_NO_PARTITIONING is not set.
10784
10785 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
10786
10787 * doc/rtl.texi: Remove documentation of (const ...) wrappers
10788 for vectors, as a partial revert of r254296.
10789 * rtl.h (const_vec_p): Delete.
10790 (const_vec_duplicate_p): Don't test for vector CONSTs.
10791 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
10792 * expmed.c (make_tree): Likewise.
10793
10794 Revert:
10795 * common.md (E, F): Use CONSTANT_P instead of checking for
10796 CONST_VECTOR.
10797 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
10798 checking for CONST_VECTOR.
10799
10800 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
10801
10802 PR middle-end/83575
10803 * predict.c (force_edge_cold): Handle in more sane way edges
10804 with no prediction.
10805
10806 2018-01-09 Carl Love <cel@us.ibm.com>
10807
10808 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
10809 V4SI, V4SF types.
10810 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
10811 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
10812 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
10813 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
10814 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
10815 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
10816 * config/rs6000/rs6000-protos.h: Add extern defition for
10817 rs6000_generate_float2_double_code.
10818 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
10819 function.
10820 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
10821 (float2_v2df): Add define_expand.
10822
10823 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
10824
10825 PR target/83628
10826 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
10827 op_mode in the force_to_mode call.
10828
10829 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
10830
10831 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
10832 instead of checking each element individually.
10833 (aarch64_evpc_uzp): Likewise.
10834 (aarch64_evpc_zip): Likewise.
10835 (aarch64_evpc_ext): Likewise.
10836 (aarch64_evpc_rev): Likewise.
10837 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
10838 instead of checking each element individually. Return true without
10839 generating rtl if
10840 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
10841 whether all selected elements come from the same input, instead of
10842 checking each element individually. Remove calls to gen_rtx_REG,
10843 start_sequence and end_sequence and instead assert that no rtl is
10844 generated.
10845
10846 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
10847
10848 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
10849 order of HIGH and CONST checks.
10850
10851 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
10852
10853 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
10854 if the destination isn't an SSA_NAME.
10855
10856 2018-01-09 Richard Biener <rguenther@suse.de>
10857
10858 PR tree-optimization/83668
10859 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
10860 move prologue...
10861 (canonicalize_loop_form): ... here, renamed from ...
10862 (canonicalize_loop_closed_ssa_form): ... this and amended to
10863 swap successor edges for loop exit blocks to make us use
10864 the RPO order we need for initial schedule generation.
10865
10866 2018-01-09 Joseph Myers <joseph@codesourcery.com>
10867
10868 PR tree-optimization/64811
10869 * match.pd: When optimizing comparisons with Inf, avoid
10870 introducing or losing exceptions from comparisons with NaN.
10871
10872 2018-01-09 Martin Liska <mliska@suse.cz>
10873
10874 PR sanitizer/82517
10875 * asan.c (shadow_mem_size): Add gcc_assert.
10876
10877 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
10878
10879 Don't save registers in main().
10880
10881 PR target/83738
10882 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
10883 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
10884 * config/avr/avr.c (avr_set_current_function): Don't error if
10885 naked, OS_task or OS_main are specified at the same time.
10886 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
10887 OS_main.
10888 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
10889 attribute.
10890 * common/config/avr/avr-common.c (avr_option_optimization_table):
10891 Switch on -mmain-is-OS_task for optimizing compilations.
10892
10893 2018-01-09 Richard Biener <rguenther@suse.de>
10894
10895 PR tree-optimization/83572
10896 * graphite.c: Include cfganal.h.
10897 (graphite_transform_loops): Connect infinite loops to exit
10898 and remove fake edges at the end.
10899
10900 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
10901
10902 * ipa-inline.c (edge_badness): Revert accidental checkin.
10903
10904 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
10905
10906 PR ipa/80763
10907 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
10908 symbols; not inline clones.
10909
10910 2018-01-09 Jakub Jelinek <jakub@redhat.com>
10911
10912 PR target/83507
10913 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
10914 hard registers. Formatting fixes.
10915
10916 PR preprocessor/83722
10917 * gcc.c (try_generate_repro): Pass
10918 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
10919 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
10920 do_report_bug.
10921
10922 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
10923 Kito Cheng <kito.cheng@gmail.com>
10924
10925 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
10926 (riscv_leaf_function_p): Delete.
10927 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
10928
10929 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
10930
10931 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
10932 function.
10933 (do_ifelse): New function.
10934 (do_isel): New function.
10935 (do_sub3): New function.
10936 (do_add3): New function.
10937 (do_load_mask_compare): New function.
10938 (do_overlap_load_compare): New function.
10939 (expand_compare_loop): New function.
10940 (expand_block_compare): Call expand_compare_loop() when appropriate.
10941 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
10942 option description.
10943 (-mblock-compare-inline-loop-limit): New option.
10944
10945 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
10946
10947 PR target/83677
10948 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
10949 Reverse order of second and third operands in first alternative.
10950 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
10951 of first and second elements in UNSPEC_VPERMR vector.
10952 (altivec_expand_vec_perm_le): Likewise.
10953
10954 2018-01-08 Jeff Law <law@redhat.com>
10955
10956 PR rtl-optimizatin/81308
10957 * tree-switch-conversion.c (cfg_altered): New file scoped static.
10958 (process_switch): If group_case_labels makes a change, then set
10959 cfg_altered.
10960 (pass_convert_switch::execute): If a switch is converted, then
10961 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
10962
10963 PR rtl-optimization/81308
10964 * recog.c (split_all_insns): Conditionally cleanup the CFG after
10965 splitting insns.
10966
10967 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
10968
10969 PR target/83663 - Revert r255946
10970 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
10971 generation for cases where splatting a value is not useful.
10972 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
10973 across a vec_duplicate and a paradoxical subreg forming a vector
10974 mode to a vec_concat.
10975
10976 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10977
10978 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
10979 -march=armv8.3-a variants.
10980 * config/arm/t-multilib: Likewise.
10981 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
10982
10983 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
10984
10985 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
10986 to generate rtl.
10987 (cceq_ior_compare_complement): Give it a name so I can use it, and
10988 change boolean_or_operator predicate to boolean_operator so it can
10989 be used to generate a crand.
10990 (eqne): New code iterator.
10991 (bd/bd_neg): New code_attrs.
10992 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
10993 a single define_insn.
10994 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
10995 decrement (bdnzt/bdnzf/bdzt/bdzf).
10996 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
10997 with the new names of the branch decrement patterns, and added the
10998 names of the branch decrement conditional patterns.
10999
11000 2018-01-08 Richard Biener <rguenther@suse.de>
11001
11002 PR tree-optimization/83563
11003 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
11004 cache.
11005
11006 2018-01-08 Richard Biener <rguenther@suse.de>
11007
11008 PR middle-end/83713
11009 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
11010
11011 2018-01-08 Richard Biener <rguenther@suse.de>
11012
11013 PR tree-optimization/83685
11014 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
11015 references to abnormals.
11016
11017 2018-01-08 Richard Biener <rguenther@suse.de>
11018
11019 PR lto/83719
11020 * dwarf2out.c (output_indirect_strings): Handle empty
11021 skeleton_debug_str_hash.
11022 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
11023
11024 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
11025
11026 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
11027 (emit_store_direct): Likewise.
11028 (arc_trampoline_adjust_address): Likewise.
11029 (arc_asm_trampoline_template): New function.
11030 (arc_initialize_trampoline): Use asm_trampoline_template.
11031 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
11032 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
11033 * config/arc/arc.md (flush_icache): Delete pattern.
11034
11035 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
11036
11037 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
11038 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
11039 munaligned-access.
11040
11041 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
11042
11043 PR target/83681
11044 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
11045 by not USED_FOR_TARGET.
11046 (make_pass_resolve_sw_modes): Likewise.
11047
11048 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
11049
11050 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
11051 USED_FOR_TARGET.
11052
11053 2018-01-08 Richard Biener <rguenther@suse.de>
11054
11055 PR middle-end/83580
11056 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
11057
11058 2018-01-08 Richard Biener <rguenther@suse.de>
11059
11060 PR middle-end/83517
11061 * match.pd ((t * 2) / 2) -> t): Add missing :c.
11062
11063 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
11064
11065 PR middle-end/81897
11066 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
11067 basic blocks with a small number of successors.
11068 (convert_control_dep_chain_into_preds): Improve handling of
11069 forwarder blocks.
11070 (dump_predicates): Split apart into...
11071 (dump_pred_chain): ...here...
11072 (dump_pred_info): ...and here.
11073 (can_one_predicate_be_invalidated_p): Add debugging printfs.
11074 (can_chain_union_be_invalidated_p): Improve check for invalidation
11075 of paths.
11076 (uninit_uses_cannot_happen): Avoid unnecessary if
11077 convert_control_dep_chain_into_preds yielded nothing.
11078
11079 2018-01-06 Martin Sebor <msebor@redhat.com>
11080
11081 PR tree-optimization/83640
11082 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
11083 subtracting negative offset from size.
11084 (builtin_access::overlap): Adjust offset bounds of the access to fall
11085 within the size of the object if possible.
11086
11087 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
11088
11089 PR rtl-optimization/83699
11090 * expmed.c (extract_bit_field_1): Restrict the vector usage of
11091 extract_bit_field_as_subreg to cases in which the extracted
11092 value is also a vector.
11093
11094 * lra-constraints.c (process_alt_operands): Test for the equivalence
11095 substitutions when detecting a possible reload cycle.
11096
11097 2018-01-06 Jakub Jelinek <jakub@redhat.com>
11098
11099 PR debug/83480
11100 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
11101 by default if flag_selective_schedling{,2}. Formatting fixes.
11102
11103 PR rtl-optimization/83682
11104 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
11105 if it has non-VECTOR_MODE element mode.
11106 (vec_duplicate_p): Likewise.
11107
11108 PR middle-end/83694
11109 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
11110 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
11111
11112 2018-01-05 Jakub Jelinek <jakub@redhat.com>
11113
11114 PR target/83604
11115 * config/i386/i386-builtin.def
11116 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
11117 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
11118 Require also OPTION_MASK_ISA_AVX512F in addition to
11119 OPTION_MASK_ISA_GFNI.
11120 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
11121 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
11122 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
11123 to OPTION_MASK_ISA_GFNI.
11124 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
11125 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
11126 OPTION_MASK_ISA_AVX512BW.
11127 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
11128 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
11129 addition to OPTION_MASK_ISA_GFNI.
11130 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
11131 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
11132 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
11133 to OPTION_MASK_ISA_GFNI.
11134 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
11135 a requirement for all ISAs rather than any of them with a few
11136 exceptions.
11137 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
11138 processing.
11139 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
11140 bitmasks to be enabled with 3 exceptions, instead of requiring any
11141 enabled ISA with lots of exceptions.
11142 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
11143 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
11144 Change avx512bw in isa attribute to avx512f.
11145 * config/i386/sgxintrin.h: Add license boilerplate.
11146 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
11147 to __AVX512F__ and __AVX512VL to __AVX512VL__.
11148 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
11149 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
11150 defined.
11151 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
11152 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
11153 temporarily sse2 rather than sse if not enabled already.
11154
11155 PR target/83604
11156 * config/i386/sse.md (VI248_VLBW): Rename to ...
11157 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
11158 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
11159 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
11160 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
11161 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
11162 mode iterator instead of VI248_VLBW.
11163
11164 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
11165
11166 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
11167 (record_modified): Skip clobbers; add debug output.
11168 (param_change_prob): Use sreal frequencies.
11169
11170 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
11171
11172 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
11173 punt for user-aligned variables.
11174
11175 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
11176
11177 * tree-chrec.c (chrec_contains_symbols): Return true for
11178 POLY_INT_CST.
11179
11180 2018-01-05 Sudakshina Das <sudi.das@arm.com>
11181
11182 PR target/82439
11183 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
11184 of (x|y) == x for BICS pattern.
11185
11186 2018-01-05 Jakub Jelinek <jakub@redhat.com>
11187
11188 PR tree-optimization/83605
11189 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
11190 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
11191 can throw.
11192
11193 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
11194
11195 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
11196 * config/epiphany/rtems.h: New file.
11197
11198 2018-01-04 Jakub Jelinek <jakub@redhat.com>
11199 Uros Bizjak <ubizjak@gmail.com>
11200
11201 PR target/83554
11202 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
11203 QIreg_operand instead of register_operand predicate.
11204 * config/i386/i386.c (ix86_rop_should_change_byte_p,
11205 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
11206 comments instead of -fmitigate[-_]rop.
11207
11208 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
11209
11210 PR bootstrap/81926
11211 * cgraphunit.c (symbol_table::compile): Switch to text_section
11212 before calling assembly_start debug hook.
11213 * run-rtl-passes.c (run_rtl_passes): Likewise.
11214 Include output.h.
11215
11216 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11217
11218 * tree-vrp.c (extract_range_from_binary_expr_1): Check
11219 range_int_cst_p rather than !symbolic_range_p before calling
11220 extract_range_from_multiplicative_op_1.
11221
11222 2018-01-04 Jeff Law <law@redhat.com>
11223
11224 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
11225 redundant test in assertion.
11226
11227 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11228
11229 * doc/rtl.texi: Document machine_mode wrapper classes.
11230
11231 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11232
11233 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
11234 using tree_to_uhwi.
11235
11236 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11237
11238 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
11239 the VEC_PERM_EXPR fold to fail.
11240
11241 2018-01-04 Jakub Jelinek <jakub@redhat.com>
11242
11243 PR debug/83585
11244 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
11245 to switched_sections.
11246
11247 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11248
11249 PR target/83680
11250 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
11251 test for d.testing.
11252
11253 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
11254
11255 PR target/83387
11256 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
11257 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
11258
11259 2018-01-04 Jakub Jelinek <jakub@redhat.com>
11260
11261 PR debug/83666
11262 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
11263 is BLKmode and bitpos not zero or mode change is needed.
11264
11265 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
11266
11267 PR target/83675
11268 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
11269 TARGET_VIS2.
11270
11271 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
11272
11273 PR target/83628
11274 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
11275 instead of MULT rtx. Update all corresponding splitters.
11276 (*saddl_se): Ditto.
11277 (*ssub<modesuffix>): Ditto.
11278 (*ssubl_se): Ditto.
11279 (*cmp_sadd_di): Update split patterns.
11280 (*cmp_sadd_si): Ditto.
11281 (*cmp_sadd_sidi): Ditto.
11282 (*cmp_ssub_di): Ditto.
11283 (*cmp_ssub_si): Ditto.
11284 (*cmp_ssub_sidi): Ditto.
11285 * config/alpha/predicates.md (const23_operand): New predicate.
11286 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
11287 Look for ASHIFT, not MULT inner operand.
11288 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
11289
11290 2018-01-04 Martin Liska <mliska@suse.cz>
11291
11292 PR gcov-profile/83669
11293 * gcov.c (output_intermediate_file): Add version to intermediate
11294 gcov file.
11295 * doc/gcov.texi: Document new field 'version' in intermediate
11296 file format. Fix location of '-k' option of gcov command.
11297
11298 2018-01-04 Martin Liska <mliska@suse.cz>
11299
11300 PR ipa/82352
11301 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
11302
11303 2018-01-04 Jakub Jelinek <jakub@redhat.com>
11304
11305 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
11306
11307 2018-01-03 Martin Sebor <msebor@redhat.com>
11308
11309 PR tree-optimization/83655
11310 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
11311 checking calls with invalid arguments.
11312
11313 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11314
11315 * tree-vect-stmts.c (vect_get_store_rhs): New function.
11316 (vectorizable_mask_load_store): Delete.
11317 (vectorizable_call): Return false for masked loads and stores.
11318 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
11319 instead of gimple_assign_rhs1.
11320 (vectorizable_load): Handle IFN_MASK_LOAD.
11321 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
11322
11323 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11324
11325 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
11326 split out from..,
11327 (vectorizable_mask_load_store): ...here.
11328 (vectorizable_load): ...and here.
11329
11330 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11331
11332 * tree-vect-stmts.c (vect_build_all_ones_mask)
11333 (vect_build_zero_merge_argument): New functions, split out from...
11334 (vectorizable_load): ...here.
11335
11336 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11337
11338 * tree-vect-stmts.c (vect_check_store_rhs): New function,
11339 split out from...
11340 (vectorizable_mask_load_store): ...here.
11341 (vectorizable_store): ...and here.
11342
11343 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11344
11345 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
11346 split out from...
11347 (vectorizable_mask_load_store): ...here.
11348
11349 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11350
11351 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
11352 (vect_model_store_cost): Take a vec_load_store_type instead of a
11353 vect_def_type.
11354 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
11355 (vect_model_store_cost): Take a vec_load_store_type instead of a
11356 vect_def_type.
11357 (vectorizable_mask_load_store): Update accordingly.
11358 (vectorizable_store): Likewise.
11359 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
11360
11361 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11362
11363 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
11364 IFN_MASK_LOAD calls here rather than...
11365 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
11366
11367 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11368 Alan Hayward <alan.hayward@arm.com>
11369 David Sherwood <david.sherwood@arm.com>
11370
11371 * expmed.c (extract_bit_field_1): For vector extracts,
11372 fall back to extract_bit_field_as_subreg if vec_extract
11373 isn't available.
11374
11375 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11376 Alan Hayward <alan.hayward@arm.com>
11377 David Sherwood <david.sherwood@arm.com>
11378
11379 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
11380 they are variable or constant sized.
11381 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
11382 slots for constant-sized data.
11383
11384 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11385 Alan Hayward <alan.hayward@arm.com>
11386 David Sherwood <david.sherwood@arm.com>
11387
11388 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
11389 handling COND_EXPRs with boolean comparisons, try to find a better
11390 basis for the mask type than the boolean itself.
11391
11392 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11393
11394 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
11395 is calculated and how it can be overridden.
11396 * genmodes.c (max_bitsize_mode_any_mode): New variable.
11397 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
11398 if defined.
11399 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
11400 if nonzero.
11401
11402 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11403 Alan Hayward <alan.hayward@arm.com>
11404 David Sherwood <david.sherwood@arm.com>
11405
11406 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
11407 Remove the mode argument.
11408 (aarch64_simd_valid_immediate): Remove the mode and inverse
11409 arguments.
11410 * config/aarch64/iterators.md (bitsize): New iterator.
11411 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
11412 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
11413 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
11414 aarch64_simd_valid_immediate.
11415 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
11416 (aarch64_reg_or_bic_imm): Likewise.
11417 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
11418 with an insn_type enum and msl with a modifier_type enum.
11419 Replace element_width with a scalar_mode. Change the shift
11420 to unsigned int. Add constructors for scalar_float_mode and
11421 scalar_int_mode elements.
11422 (aarch64_vect_float_const_representable_p): Delete.
11423 (aarch64_can_const_movi_rtx_p)
11424 (aarch64_simd_scalar_immediate_valid_for_move)
11425 (aarch64_simd_make_constant): Update call to
11426 aarch64_simd_valid_immediate.
11427 (aarch64_advsimd_valid_immediate_hs): New function.
11428 (aarch64_advsimd_valid_immediate): Likewise.
11429 (aarch64_simd_valid_immediate): Remove mode and inverse
11430 arguments. Rewrite to use the above. Use const_vec_duplicate_p
11431 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
11432 and aarch64_float_const_representable_p on the result.
11433 (aarch64_output_simd_mov_immediate): Remove mode argument.
11434 Update call to aarch64_simd_valid_immediate and use of
11435 simd_immediate_info.
11436 (aarch64_output_scalar_simd_mov_immediate): Update call
11437 accordingly.
11438
11439 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11440 Alan Hayward <alan.hayward@arm.com>
11441 David Sherwood <david.sherwood@arm.com>
11442
11443 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
11444 (mode_nunits): Likewise CONST_MODE_NUNITS.
11445 * machmode.def (ADJUST_NUNITS): Document.
11446 * genmodes.c (mode_data::need_nunits_adj): New field.
11447 (blank_mode): Update accordingly.
11448 (adj_nunits): New variable.
11449 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
11450 parameter.
11451 (emit_mode_size_inline): Set need_bytesize_adj for all modes
11452 listed in adj_nunits.
11453 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
11454 listed in adj_nunits. Don't emit case statements for such modes.
11455 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
11456 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
11457 nothing if adj_nunits is nonnull.
11458 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
11459 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
11460 (emit_mode_fbit): Update use of print_maybe_const_decl.
11461 (emit_move_size): Likewise. Treat the array as non-const
11462 if adj_nunits.
11463 (emit_mode_adjustments): Handle adj_nunits.
11464
11465 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11466
11467 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
11468 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
11469 (VECTOR_MODES): Use it.
11470 (make_vector_modes): Take the prefix as an argument.
11471
11472 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11473 Alan Hayward <alan.hayward@arm.com>
11474 David Sherwood <david.sherwood@arm.com>
11475
11476 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
11477 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
11478 for MODE_VECTOR_BOOL.
11479 * machmode.def (VECTOR_BOOL_MODE): Document.
11480 * genmodes.c (VECTOR_BOOL_MODE): New macro.
11481 (make_vector_bool_mode): New function.
11482 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
11483 MODE_VECTOR_BOOL.
11484 * lto-streamer-in.c (lto_input_mode_table): Likewise.
11485 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
11486 Likewise.
11487 * stor-layout.c (int_mode_for_mode): Likewise.
11488 * tree.c (build_vector_type_for_mode): Likewise.
11489 * varasm.c (output_constant_pool_2): Likewise.
11490 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
11491 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
11492 for MODE_VECTOR_BOOL.
11493 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
11494 of mode class checks.
11495 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
11496 instead of a list of mode class checks.
11497 (expand_vector_scalar_condition): Likewise.
11498 (type_for_widest_vector_mode): Handle BImode as an inner mode.
11499
11500 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11501 Alan Hayward <alan.hayward@arm.com>
11502 David Sherwood <david.sherwood@arm.com>
11503
11504 * machmode.h (mode_size): Change from unsigned short to
11505 poly_uint16_pod.
11506 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
11507 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
11508 or if measurement_type is not polynomial.
11509 (fixed_size_mode::includes_p): Check for constant-sized modes.
11510 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
11511 return a poly_uint16 rather than an unsigned short.
11512 (emit_mode_size): Change the type of mode_size from unsigned short
11513 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
11514 (emit_mode_adjustments): Cope with polynomial vector sizes.
11515 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
11516 for GET_MODE_SIZE.
11517 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
11518 for GET_MODE_SIZE.
11519 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
11520 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
11521 * caller-save.c (setup_save_areas): Likewise.
11522 (replace_reg_with_saved_mem): Likewise.
11523 * calls.c (emit_library_call_value_1): Likewise.
11524 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
11525 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
11526 (gen_lowpart_for_combine): Likewise.
11527 * convert.c (convert_to_integer_1): Likewise.
11528 * cse.c (equiv_constant, cse_insn): Likewise.
11529 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
11530 (cselib_subst_to_values): Likewise.
11531 * dce.c (word_dce_process_block): Likewise.
11532 * df-problems.c (df_word_lr_mark_ref): Likewise.
11533 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
11534 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
11535 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
11536 (rtl_for_decl_location): Likewise.
11537 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
11538 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
11539 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
11540 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
11541 (expand_expr_real_1): Likewise.
11542 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
11543 (pad_below): Likewise.
11544 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
11545 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
11546 * ira.c (get_subreg_tracking_sizes): Likewise.
11547 * ira-build.c (ira_create_allocno_objects): Likewise.
11548 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
11549 (ira_sort_regnos_for_alter_reg): Likewise.
11550 * ira-costs.c (record_operand_costs): Likewise.
11551 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
11552 (resolve_simple_move): Likewise.
11553 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
11554 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
11555 (lra_constraints): Likewise.
11556 (CONST_POOL_OK_P): Reject variable-sized modes.
11557 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
11558 (add_pseudo_to_slot, lra_spill): Likewise.
11559 * omp-low.c (omp_clause_aligned_alignment): Likewise.
11560 * optabs-query.c (get_best_extraction_insn): Likewise.
11561 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
11562 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
11563 (expand_mult_highpart, valid_multiword_target_p): Likewise.
11564 * recog.c (offsettable_address_addr_space_p): Likewise.
11565 * regcprop.c (maybe_mode_change): Likewise.
11566 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
11567 * regrename.c (build_def_use): Likewise.
11568 * regstat.c (dump_reg_info): Likewise.
11569 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
11570 (find_reloads, find_reloads_subreg_address): Likewise.
11571 * reload1.c (eliminate_regs_1): Likewise.
11572 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
11573 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
11574 (simplify_binary_operation_1, simplify_subreg): Likewise.
11575 * targhooks.c (default_function_arg_padding): Likewise.
11576 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
11577 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
11578 (verify_gimple_assign_ternary): Likewise.
11579 * tree-inline.c (estimate_move_cost): Likewise.
11580 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
11581 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
11582 (get_address_cost_ainc): Likewise.
11583 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
11584 (vect_supportable_dr_alignment): Likewise.
11585 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11586 (vectorizable_reduction): Likewise.
11587 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
11588 (vectorizable_operation, vectorizable_load): Likewise.
11589 * tree.c (build_same_sized_truth_vector_type): Likewise.
11590 * valtrack.c (cleanup_auto_inc_dec): Likewise.
11591 * var-tracking.c (emit_note_insn_var_location): Likewise.
11592 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
11593 (ADDR_VEC_ALIGN): Likewise.
11594
11595 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11596 Alan Hayward <alan.hayward@arm.com>
11597 David Sherwood <david.sherwood@arm.com>
11598
11599 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
11600 unsigned short.
11601 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
11602 or if measurement_type is polynomial.
11603 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
11604 * combine.c (make_extraction): Likewise.
11605 * dse.c (find_shift_sequence): Likewise.
11606 * dwarf2out.c (mem_loc_descriptor): Likewise.
11607 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
11608 (extract_bit_field, extract_low_bits): Likewise.
11609 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
11610 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
11611 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
11612 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
11613 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
11614 * reload.c (find_reloads): Likewise.
11615 * reload1.c (alter_reg): Likewise.
11616 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
11617 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
11618 * tree-if-conv.c (predicate_mem_writes): Likewise.
11619 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
11620 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
11621 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
11622 * valtrack.c (dead_debug_insert_temp): Likewise.
11623 * varasm.c (mergeable_constant_section): Likewise.
11624 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
11625
11626 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11627 Alan Hayward <alan.hayward@arm.com>
11628 David Sherwood <david.sherwood@arm.com>
11629
11630 * expr.c (expand_assignment): Cope with polynomial mode sizes
11631 when assigning to a CONCAT.
11632
11633 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11634 Alan Hayward <alan.hayward@arm.com>
11635 David Sherwood <david.sherwood@arm.com>
11636
11637 * machmode.h (mode_precision): Change from unsigned short to
11638 poly_uint16_pod.
11639 (mode_to_precision): Return a poly_uint16 rather than an unsigned
11640 short.
11641 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
11642 or if measurement_type is not polynomial.
11643 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
11644 in which the mode is already known to be a scalar_int_mode.
11645 * genmodes.c (emit_mode_precision): Change the type of mode_precision
11646 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
11647 initializer.
11648 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
11649 for GET_MODE_PRECISION.
11650 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
11651 for GET_MODE_PRECISION.
11652 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
11653 as polynomial.
11654 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
11655 (expand_field_assignment, make_extraction): Likewise.
11656 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
11657 (get_last_value): Likewise.
11658 * convert.c (convert_to_integer_1): Likewise.
11659 * cse.c (cse_insn): Likewise.
11660 * expr.c (expand_expr_real_1): Likewise.
11661 * lra-constraints.c (simplify_operand_subreg): Likewise.
11662 * optabs-query.c (can_atomic_load_p): Likewise.
11663 * optabs.c (expand_atomic_load): Likewise.
11664 (expand_atomic_store): Likewise.
11665 * ree.c (combine_reaching_defs): Likewise.
11666 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
11667 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
11668 * tree.h (type_has_mode_precision_p): Likewise.
11669 * ubsan.c (instrument_si_overflow): Likewise.
11670
11671 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11672 Alan Hayward <alan.hayward@arm.com>
11673 David Sherwood <david.sherwood@arm.com>
11674
11675 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
11676 polynomial numbers of units.
11677 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
11678 (valid_vector_subparts_p): New function.
11679 (build_vector_type): Remove temporary shim and take the number
11680 of units as a poly_uint64 rather than an int.
11681 (build_opaque_vector_type): Take the number of units as a
11682 poly_uint64 rather than an int.
11683 * tree.c (build_vector_from_ctor): Handle polynomial
11684 TYPE_VECTOR_SUBPARTS.
11685 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
11686 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
11687 (build_vector_from_val): If the number of units is variable,
11688 use build_vec_duplicate_cst for constant operands and
11689 VEC_DUPLICATE_EXPR otherwise.
11690 (make_vector_type): Remove temporary is_constant ().
11691 (build_vector_type, build_opaque_vector_type): Take the number of
11692 units as a poly_uint64 rather than an int.
11693 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
11694 VECTOR_CST_NELTS.
11695 * cfgexpand.c (expand_debug_expr): Likewise.
11696 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
11697 (store_constructor, expand_expr_real_1): Likewise.
11698 (const_scalar_mask_from_tree): Likewise.
11699 * fold-const-call.c (fold_const_reduction): Likewise.
11700 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
11701 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
11702 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
11703 (fold_relational_const): Likewise.
11704 (native_interpret_vector): Likewise. Change the size from an
11705 int to an unsigned int.
11706 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
11707 TYPE_VECTOR_SUBPARTS.
11708 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
11709 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
11710 duplicating a non-constant operand into a variable-length vector.
11711 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
11712 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
11713 * ipa-icf.c (sem_variable::equals): Likewise.
11714 * match.pd: Likewise.
11715 * omp-simd-clone.c (simd_clone_subparts): Likewise.
11716 * print-tree.c (print_node): Likewise.
11717 * stor-layout.c (layout_type): Likewise.
11718 * targhooks.c (default_builtin_vectorization_cost): Likewise.
11719 * tree-cfg.c (verify_gimple_comparison): Likewise.
11720 (verify_gimple_assign_binary): Likewise.
11721 (verify_gimple_assign_ternary): Likewise.
11722 (verify_gimple_assign_single): Likewise.
11723 * tree-pretty-print.c (dump_generic_node): Likewise.
11724 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
11725 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
11726 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
11727 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
11728 (vect_shift_permute_load_chain): Likewise.
11729 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
11730 (expand_vector_condition, optimize_vector_constructor): Likewise.
11731 (lower_vec_perm, get_compute_type): Likewise.
11732 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
11733 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
11734 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
11735 (vect_recog_mask_conversion_pattern): Likewise.
11736 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
11737 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
11738 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
11739 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
11740 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
11741 (vectorizable_shift, vectorizable_operation, vectorizable_store)
11742 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
11743 (supportable_widening_operation): Likewise.
11744 (supportable_narrowing_operation): Likewise.
11745 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
11746 Likewise.
11747 * varasm.c (output_constant): Likewise.
11748
11749 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11750 Alan Hayward <alan.hayward@arm.com>
11751 David Sherwood <david.sherwood@arm.com>
11752
11753 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
11754 so that both the length == 3 and length != 3 cases set up their
11755 own permute vectors. Add comments explaining why we know the
11756 number of elements is constant.
11757 (vect_permute_load_chain): Likewise.
11758
11759 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11760 Alan Hayward <alan.hayward@arm.com>
11761 David Sherwood <david.sherwood@arm.com>
11762
11763 * machmode.h (mode_nunits): Change from unsigned char to
11764 poly_uint16_pod.
11765 (ONLY_FIXED_SIZE_MODES): New macro.
11766 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
11767 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
11768 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
11769 New typedefs.
11770 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
11771 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
11772 or if measurement_type is not polynomial.
11773 * genmodes.c (ZERO_COEFFS): New macro.
11774 (emit_mode_nunits_inline): Make mode_nunits_inline return a
11775 poly_uint16.
11776 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
11777 Use ZERO_COEFFS when emitting initializers.
11778 * data-streamer.h (bp_pack_poly_value): New function.
11779 (bp_unpack_poly_value): Likewise.
11780 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
11781 for GET_MODE_NUNITS.
11782 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
11783 for GET_MODE_NUNITS.
11784 * tree.c (make_vector_type): Remove temporary shim and make
11785 the real function take the number of units as a poly_uint64
11786 rather than an int.
11787 (build_vector_type_for_mode): Handle polynomial nunits.
11788 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
11789 * emit-rtl.c (const_vec_series_p_1): Likewise.
11790 (gen_rtx_CONST_VECTOR): Likewise.
11791 * fold-const.c (test_vec_duplicate_folding): Likewise.
11792 * genrecog.c (validate_pattern): Likewise.
11793 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
11794 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
11795 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
11796 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
11797 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
11798 * rtlanal.c (subreg_get_info): Likewise.
11799 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
11800 (vect_grouped_load_supported): Likewise.
11801 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
11802 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
11803 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
11804 (simplify_const_unary_operation, simplify_binary_operation_1)
11805 (simplify_const_binary_operation, simplify_ternary_operation)
11806 (test_vector_ops_duplicate, test_vector_ops): Likewise.
11807 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
11808 instead of CONST_VECTOR_NUNITS.
11809 * varasm.c (output_constant_pool_2): Likewise.
11810 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
11811 explicit-encoded elements in the XVEC for variable-length vectors.
11812
11813 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11814
11815 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
11816
11817 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11818 Alan Hayward <alan.hayward@arm.com>
11819 David Sherwood <david.sherwood@arm.com>
11820
11821 * coretypes.h (fixed_size_mode): Declare.
11822 (fixed_size_mode_pod): New typedef.
11823 * builtins.h (target_builtins::x_apply_args_mode)
11824 (target_builtins::x_apply_result_mode): Change type to
11825 fixed_size_mode_pod.
11826 * builtins.c (apply_args_size, apply_result_size, result_vector)
11827 (expand_builtin_apply_args_1, expand_builtin_apply)
11828 (expand_builtin_return): Update accordingly.
11829
11830 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11831
11832 * cse.c (hash_rtx_cb): Hash only the encoded elements.
11833 * cselib.c (cselib_hash_rtx): Likewise.
11834 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
11835 CONST_VECTOR encoding.
11836
11837 2018-01-03 Jakub Jelinek <jakub@redhat.com>
11838 Jeff Law <law@redhat.com>
11839
11840 PR target/83641
11841 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
11842 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
11843 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
11844 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
11845
11846 PR target/83641
11847 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
11848 explicitly probe *sp in a noreturn function if there were any callee
11849 register saves or frame pointer is needed.
11850
11851 2018-01-03 Jakub Jelinek <jakub@redhat.com>
11852
11853 PR debug/83621
11854 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
11855 BLKmode for ternary, binary or unary expressions.
11856
11857 PR debug/83645
11858 * var-tracking.c (delete_vta_debug_insn): New inline function.
11859 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
11860 insns from get_insns () to NULL instead of each bb separately.
11861 Use delete_vta_debug_insn. No longer static.
11862 (vt_debug_insns_local, variable_tracking_main_1): Adjust
11863 delete_vta_debug_insns callers.
11864 * rtl.h (delete_vta_debug_insns): Declare.
11865 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
11866 instead of variable_tracking_main.
11867
11868 2018-01-03 Martin Sebor <msebor@redhat.com>
11869
11870 PR tree-optimization/83603
11871 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
11872 arguments past the endof the argument list in functions declared
11873 without a prototype.
11874 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
11875 Avoid checking when arguments are null.
11876
11877 2018-01-03 Martin Sebor <msebor@redhat.com>
11878
11879 PR c/83559
11880 * doc/extend.texi (attribute const): Fix a typo.
11881 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
11882 issuing -Wsuggest-attribute for void functions.
11883
11884 2018-01-03 Martin Sebor <msebor@redhat.com>
11885
11886 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
11887 offset_int::from instead of wide_int::to_shwi.
11888 (maybe_diag_overlap): Remove assertion.
11889 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
11890 * gimple-ssa-sprintf.c (format_directive): Same.
11891 (parse_directive): Same.
11892 (sprintf_dom_walker::compute_format_length): Same.
11893 (try_substitute_return_value): Same.
11894
11895 2018-01-03 Jeff Law <law@redhat.com>
11896
11897 PR middle-end/83654
11898 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
11899 non-constant residual for zero at runtime and avoid probing in
11900 that case. Reorganize code for trailing problem to mirror handling
11901 of the residual.
11902
11903 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
11904
11905 PR tree-optimization/83501
11906 * tree-ssa-strlen.c (get_string_cst): New.
11907 (handle_char_store): Call get_string_cst.
11908
11909 2018-01-03 Martin Liska <mliska@suse.cz>
11910
11911 PR tree-optimization/83593
11912 * tree-ssa-strlen.c: Include tree-cfg.h.
11913 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
11914 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
11915 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
11916 to false.
11917 (strlen_dom_walker::before_dom_children): Call
11918 gimple_purge_dead_eh_edges. Dump tranformation with details
11919 dump flags.
11920 (strlen_dom_walker::before_dom_children): Update call by adding
11921 new argument cleanup_eh.
11922 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
11923
11924 2018-01-03 Martin Liska <mliska@suse.cz>
11925
11926 PR ipa/83549
11927 * cif-code.def (VARIADIC_THUNK): New enum value.
11928 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
11929 thunks.
11930
11931 2018-01-03 Jan Beulich <jbeulich@suse.com>
11932
11933 * sse.md (mov<mode>_internal): Tighten condition for when to use
11934 vmovdqu<ssescalarsize> for TI and OI modes.
11935
11936 2018-01-03 Jakub Jelinek <jakub@redhat.com>
11937
11938 Update copyright years.
11939
11940 2018-01-03 Martin Liska <mliska@suse.cz>
11941
11942 PR ipa/83594
11943 * ipa-visibility.c (function_and_variable_visibility): Skip
11944 functions with noipa attribure.
11945
11946 2018-01-03 Jakub Jelinek <jakub@redhat.com>
11947
11948 * gcc.c (process_command): Update copyright notice dates.
11949 * gcov-dump.c (print_version): Ditto.
11950 * gcov.c (print_version): Ditto.
11951 * gcov-tool.c (print_version): Ditto.
11952 * gengtype.c (create_file): Ditto.
11953 * doc/cpp.texi: Bump @copying's copyright year.
11954 * doc/cppinternals.texi: Ditto.
11955 * doc/gcc.texi: Ditto.
11956 * doc/gccint.texi: Ditto.
11957 * doc/gcov.texi: Ditto.
11958 * doc/install.texi: Ditto.
11959 * doc/invoke.texi: Ditto.
11960
11961 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11962
11963 * vector-builder.h (vector_builder::m_full_nelts): Change from
11964 unsigned int to poly_uint64.
11965 (vector_builder::full_nelts): Update prototype accordingly.
11966 (vector_builder::new_vector): Likewise.
11967 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
11968 (vector_builder::operator ==): Likewise.
11969 (vector_builder::finalize): Likewise.
11970 * int-vector-builder.h (int_vector_builder::int_vector_builder):
11971 Take the number of elements as a poly_uint64 rather than an
11972 unsigned int.
11973 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
11974 from unsigned int to poly_uint64.
11975 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
11976 (vec_perm_indices::new_vector): Likewise.
11977 (vec_perm_indices::length): Likewise.
11978 (vec_perm_indices::nelts_per_input): Likewise.
11979 (vec_perm_indices::input_nelts): Likewise.
11980 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
11981 number of elements per input as a poly_uint64 rather than an
11982 unsigned int. Use the original encoding for variable-length
11983 vectors, rather than clamping each individual element.
11984 For the second and subsequent elements in each pattern,
11985 clamp the step and base before clamping their sum.
11986 (vec_perm_indices::series_p): Handle polynomial element counts.
11987 (vec_perm_indices::all_in_range_p): Likewise.
11988 (vec_perm_indices_to_tree): Likewise.
11989 (vec_perm_indices_to_rtx): Likewise.
11990 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
11991 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
11992 (tree_vector_builder::new_binary_operation): Handle polynomial
11993 element counts. Return false if we need to know the number
11994 of elements at compile time.
11995 * fold-const.c (fold_vec_perm): Punt if the number of elements
11996 isn't known at compile time.
11997
11998 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
11999
12000 * vec-perm-indices.h (vec_perm_builder): Change element type
12001 from HOST_WIDE_INT to poly_int64.
12002 (vec_perm_indices::element_type): Update accordingly.
12003 (vec_perm_indices::clamp): Handle polynomial element_types.
12004 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
12005 (vec_perm_indices::all_in_range_p): Likewise.
12006 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
12007 than shwi trees.
12008 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
12009 polynomial vec_perm_indices element types.
12010 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
12011 * fold-const.c (fold_vec_perm): Likewise.
12012 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
12013 * tree-vect-generic.c (lower_vec_perm): Likewise.
12014 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
12015 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
12016 element type to HOST_WIDE_INT.
12017
12018 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12019 Alan Hayward <alan.hayward@arm.com>
12020 David Sherwood <david.sherwood@arm.com>
12021
12022 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
12023 rather than an int. Use plus_constant.
12024 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
12025 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
12026
12027 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12028 Alan Hayward <alan.hayward@arm.com>
12029 David Sherwood <david.sherwood@arm.com>
12030
12031 * calls.c (emit_call_1, expand_call): Change struct_value_size from
12032 a HOST_WIDE_INT to a poly_int64.
12033
12034 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12035 Alan Hayward <alan.hayward@arm.com>
12036 David Sherwood <david.sherwood@arm.com>
12037
12038 * calls.c (load_register_parameters): Cope with polynomial
12039 mode sizes. Require a constant size for BLKmode parameters
12040 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
12041 forces a parameter to be padded at the lsb end in order to
12042 fill a complete number of words, require the parameter size
12043 to be ordered wrt UNITS_PER_WORD.
12044
12045 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12046 Alan Hayward <alan.hayward@arm.com>
12047 David Sherwood <david.sherwood@arm.com>
12048
12049 * reload1.c (spill_stack_slot_width): Change element type
12050 from unsigned int to poly_uint64_pod.
12051 (alter_reg): Treat mode sizes as polynomial.
12052
12053 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12054 Alan Hayward <alan.hayward@arm.com>
12055 David Sherwood <david.sherwood@arm.com>
12056
12057 * reload.c (complex_word_subreg_p): New function.
12058 (reload_inner_reg_of_subreg, push_reload): Use it.
12059
12060 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12061 Alan Hayward <alan.hayward@arm.com>
12062 David Sherwood <david.sherwood@arm.com>
12063
12064 * lra-constraints.c (process_alt_operands): Reject matched
12065 operands whose sizes aren't ordered.
12066 (match_reload): Refer to this check here.
12067
12068 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12069 Alan Hayward <alan.hayward@arm.com>
12070 David Sherwood <david.sherwood@arm.com>
12071
12072 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
12073 that the mode size is in the set {1, 2, 4, 8, 16}.
12074
12075 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12076 Alan Hayward <alan.hayward@arm.com>
12077 David Sherwood <david.sherwood@arm.com>
12078
12079 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
12080 Use plus_constant instead of gen_rtx_PLUS.
12081
12082 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12083 Alan Hayward <alan.hayward@arm.com>
12084 David Sherwood <david.sherwood@arm.com>
12085
12086 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
12087 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
12088 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
12089 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
12090 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
12091 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
12092 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
12093 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
12094 * config/i386/i386.c (ix86_push_rounding): ...this new function.
12095 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
12096 a poly_int64.
12097 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
12098 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
12099 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
12100 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
12101 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
12102 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
12103 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
12104 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
12105 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
12106 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
12107 function.
12108 * expr.c (emit_move_resolve_push): Treat the input and result
12109 of PUSH_ROUNDING as a poly_int64.
12110 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
12111 (emit_push_insn): Likewise.
12112 * lra-eliminations.c (mark_not_eliminable): Likewise.
12113 * recog.c (push_operand): Likewise.
12114 * reload1.c (elimination_effects): Likewise.
12115 * rtlanal.c (nonzero_bits1): Likewise.
12116 * calls.c (store_one_arg): Likewise. Require the padding to be
12117 known at compile time.
12118
12119 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12120 Alan Hayward <alan.hayward@arm.com>
12121 David Sherwood <david.sherwood@arm.com>
12122
12123 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
12124 Use plus_constant instead of gen_rtx_PLUS.
12125
12126 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12127 Alan Hayward <alan.hayward@arm.com>
12128 David Sherwood <david.sherwood@arm.com>
12129
12130 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
12131 rather than an int.
12132
12133 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12134 Alan Hayward <alan.hayward@arm.com>
12135 David Sherwood <david.sherwood@arm.com>
12136
12137 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
12138 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
12139 via stack temporaries. Treat the mode size as polynomial too.
12140
12141 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12142 Alan Hayward <alan.hayward@arm.com>
12143 David Sherwood <david.sherwood@arm.com>
12144
12145 * expr.c (expand_expr_real_2): When handling conversions involving
12146 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
12147 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
12148 as a poly_uint64 too.
12149
12150 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12151 Alan Hayward <alan.hayward@arm.com>
12152 David Sherwood <david.sherwood@arm.com>
12153
12154 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
12155
12156 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12157 Alan Hayward <alan.hayward@arm.com>
12158 David Sherwood <david.sherwood@arm.com>
12159
12160 * combine.c (can_change_dest_mode): Handle polynomial
12161 REGMODE_NATURAL_SIZE.
12162 * expmed.c (store_bit_field_1): Likewise.
12163 * expr.c (store_constructor): Likewise.
12164 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
12165 and polynomial REGMODE_NATURAL_SIZE.
12166 (gen_lowpart_common): Likewise.
12167 * reginfo.c (record_subregs_of_mode): Likewise.
12168 * rtlanal.c (read_modify_subreg_p): Likewise.
12169
12170 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12171 Alan Hayward <alan.hayward@arm.com>
12172 David Sherwood <david.sherwood@arm.com>
12173
12174 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
12175 numbers of elements.
12176
12177 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12178 Alan Hayward <alan.hayward@arm.com>
12179 David Sherwood <david.sherwood@arm.com>
12180
12181 * match.pd: Cope with polynomial numbers of vector elements.
12182
12183 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12184 Alan Hayward <alan.hayward@arm.com>
12185 David Sherwood <david.sherwood@arm.com>
12186
12187 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
12188 in a POINTER_PLUS_EXPR.
12189
12190 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12191 Alan Hayward <alan.hayward@arm.com>
12192 David Sherwood <david.sherwood@arm.com>
12193
12194 * omp-simd-clone.c (simd_clone_subparts): New function.
12195 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
12196 (ipa_simd_modify_function_body): Likewise.
12197
12198 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12199 Alan Hayward <alan.hayward@arm.com>
12200 David Sherwood <david.sherwood@arm.com>
12201
12202 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
12203 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
12204 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
12205 (expand_vector_condition, vector_element): Likewise.
12206 (subparts_gt): New function.
12207 (get_compute_type): Use subparts_gt.
12208 (count_type_subparts): Delete.
12209 (expand_vector_operations_1): Use subparts_gt instead of
12210 count_type_subparts.
12211
12212 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12213 Alan Hayward <alan.hayward@arm.com>
12214 David Sherwood <david.sherwood@arm.com>
12215
12216 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
12217 (vect_compile_time_alias): ...this new function. Do the calculation
12218 on poly_ints rather than trees.
12219 (vect_prune_runtime_alias_test_list): Update call accordingly.
12220
12221 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12222 Alan Hayward <alan.hayward@arm.com>
12223 David Sherwood <david.sherwood@arm.com>
12224
12225 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
12226 numbers of units.
12227 (vect_schedule_slp_instance): Likewise.
12228
12229 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12230 Alan Hayward <alan.hayward@arm.com>
12231 David Sherwood <david.sherwood@arm.com>
12232
12233 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
12234 constant and extern definitions for variable-length vectors.
12235 (vect_get_constant_vectors): Note that the number of units
12236 is known to be constant.
12237
12238 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12239 Alan Hayward <alan.hayward@arm.com>
12240 David Sherwood <david.sherwood@arm.com>
12241
12242 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
12243 of units as polynomial. Choose between WIDE and NARROW based
12244 on multiple_p.
12245
12246 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12247 Alan Hayward <alan.hayward@arm.com>
12248 David Sherwood <david.sherwood@arm.com>
12249
12250 * tree-vect-stmts.c (simd_clone_subparts): New function.
12251 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
12252
12253 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12254 Alan Hayward <alan.hayward@arm.com>
12255 David Sherwood <david.sherwood@arm.com>
12256
12257 * tree-vect-stmts.c (vectorizable_call): Treat the number of
12258 vectors as polynomial. Use build_index_vector for
12259 IFN_GOMP_SIMD_LANE.
12260
12261 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12262 Alan Hayward <alan.hayward@arm.com>
12263 David Sherwood <david.sherwood@arm.com>
12264
12265 * tree-vect-stmts.c (get_load_store_type): Treat the number of
12266 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
12267 for variable-length vectors.
12268 (vectorizable_mask_load_store): Treat the number of units as
12269 polynomial, asserting that it is constant if the condition has
12270 already been enforced.
12271 (vectorizable_store, vectorizable_load): Likewise.
12272
12273 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12274 Alan Hayward <alan.hayward@arm.com>
12275 David Sherwood <david.sherwood@arm.com>
12276
12277 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
12278 of units as polynomial. Punt if we can't tell at compile time
12279 which vector contains the final result.
12280
12281 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12282 Alan Hayward <alan.hayward@arm.com>
12283 David Sherwood <david.sherwood@arm.com>
12284
12285 * tree-vect-loop.c (vectorizable_induction): Treat the number
12286 of units as polynomial. Punt on SLP inductions. Use an integer
12287 VEC_SERIES_EXPR for variable-length integer reductions. Use a
12288 cast of such a series for variable-length floating-point
12289 reductions.
12290
12291 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12292 Alan Hayward <alan.hayward@arm.com>
12293 David Sherwood <david.sherwood@arm.com>
12294
12295 * tree.h (build_index_vector): Declare.
12296 * tree.c (build_index_vector): New function.
12297 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
12298 of units as polynomial, forcibly converting it to a constant if
12299 vectorizable_reduction has already enforced the condition.
12300 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
12301 to create a {1,2,3,...} vector.
12302 (vectorizable_reduction): Treat the number of units as polynomial.
12303 Choose vectype_in based on the largest scalar element size rather
12304 than the smallest number of units. Enforce the restrictions
12305 relied on above.
12306
12307 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12308 Alan Hayward <alan.hayward@arm.com>
12309 David Sherwood <david.sherwood@arm.com>
12310
12311 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
12312 number of units as polynomial.
12313
12314 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12315 Alan Hayward <alan.hayward@arm.com>
12316 David Sherwood <david.sherwood@arm.com>
12317
12318 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
12319 * target.def (autovectorize_vector_sizes): Return the vector sizes
12320 by pointer, using vector_sizes rather than a bitmask.
12321 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
12322 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
12323 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
12324 Likewise.
12325 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
12326 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
12327 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
12328 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
12329 * omp-general.c (omp_max_vf): Likewise.
12330 * omp-low.c (omp_clause_aligned_alignment): Likewise.
12331 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
12332 * tree-vect-loop.c (vect_analyze_loop): Likewise.
12333 * tree-vect-slp.c (vect_slp_bb): Likewise.
12334 * doc/tm.texi: Regenerate.
12335 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
12336 to a poly_uint64.
12337 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
12338 the vector size as a poly_uint64 rather than an unsigned int.
12339 (current_vector_size): Change from an unsigned int to a poly_uint64.
12340 (get_vectype_for_scalar_type): Update accordingly.
12341 * tree.h (build_truth_vector_type): Take the size and number of
12342 units as a poly_uint64 rather than an unsigned int.
12343 (build_vector_type): Add a temporary overload that takes
12344 the number of units as a poly_uint64 rather than an unsigned int.
12345 * tree.c (make_vector_type): Likewise.
12346 (build_truth_vector_type): Take the number of units as a poly_uint64
12347 rather than an unsigned int.
12348
12349 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12350 Alan Hayward <alan.hayward@arm.com>
12351 David Sherwood <david.sherwood@arm.com>
12352
12353 * target.def (get_mask_mode): Take the number of units and length
12354 as poly_uint64s rather than unsigned ints.
12355 * targhooks.h (default_get_mask_mode): Update accordingly.
12356 * targhooks.c (default_get_mask_mode): Likewise.
12357 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
12358 * doc/tm.texi: Regenerate.
12359
12360 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12361 Alan Hayward <alan.hayward@arm.com>
12362 David Sherwood <david.sherwood@arm.com>
12363
12364 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
12365 * omp-general.c (omp_max_vf): Likewise.
12366 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
12367 (expand_omp_simd): Handle polynomial safelen.
12368 * omp-low.c (omplow_simd_context): Add a default constructor.
12369 (omplow_simd_context::max_vf): Change from int to poly_uint64.
12370 (lower_rec_simd_input_clauses): Update accordingly.
12371 (lower_rec_input_clauses): Likewise.
12372
12373 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12374 Alan Hayward <alan.hayward@arm.com>
12375 David Sherwood <david.sherwood@arm.com>
12376
12377 * tree-vectorizer.h (vect_nunits_for_cost): New function.
12378 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
12379 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
12380 (vect_analyze_slp_cost): Likewise.
12381 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
12382 (vect_model_load_cost): Likewise.
12383
12384 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12385 Alan Hayward <alan.hayward@arm.com>
12386 David Sherwood <david.sherwood@arm.com>
12387
12388 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
12389 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
12390 from an unsigned int * to a poly_uint64_pod *.
12391 (calculate_unrolling_factor): New function.
12392 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
12393
12394 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12395 Alan Hayward <alan.hayward@arm.com>
12396 David Sherwood <david.sherwood@arm.com>
12397
12398 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
12399 from an unsigned int to a poly_uint64.
12400 (_loop_vec_info::slp_unrolling_factor): Likewise.
12401 (_loop_vec_info::vectorization_factor): Change from an int
12402 to a poly_uint64.
12403 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
12404 (vect_get_num_vectors): New function.
12405 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
12406 (vect_get_num_copies): Use vect_get_num_vectors.
12407 (vect_analyze_data_ref_dependences): Change max_vf from an int *
12408 to an unsigned int *.
12409 (vect_analyze_data_refs): Change min_vf from an int * to a
12410 poly_uint64 *.
12411 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
12412 than an unsigned HOST_WIDE_INT.
12413 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
12414 (vect_analyze_data_ref_dependence): Change max_vf from an int *
12415 to an unsigned int *.
12416 (vect_analyze_data_ref_dependences): Likewise.
12417 (vect_compute_data_ref_alignment): Handle polynomial vf.
12418 (vect_enhance_data_refs_alignment): Likewise.
12419 (vect_prune_runtime_alias_test_list): Likewise.
12420 (vect_shift_permute_load_chain): Likewise.
12421 (vect_supportable_dr_alignment): Likewise.
12422 (dependence_distance_ge_vf): Take the vectorization factor as a
12423 poly_uint64 rather than an unsigned HOST_WIDE_INT.
12424 (vect_analyze_data_refs): Change min_vf from an int * to a
12425 poly_uint64 *.
12426 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
12427 vfm1 as a poly_uint64 rather than an int. Make the same change
12428 for the returned bound_scalar.
12429 (vect_gen_vector_loop_niters): Handle polynomial vf.
12430 (vect_do_peeling): Likewise. Update call to
12431 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
12432 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
12433 be constant.
12434 * tree-vect-loop.c (vect_determine_vectorization_factor)
12435 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
12436 (vect_get_known_peeling_cost): Likewise.
12437 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
12438 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
12439 (vect_transform_loop): Likewise. Use the lowest possible VF when
12440 updating the upper bounds of the loop.
12441 (vect_min_worthwhile_factor): Make static. Return an unsigned int
12442 rather than an int.
12443 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
12444 polynomial unroll factors.
12445 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
12446 (vect_make_slp_decision): Likewise.
12447 (vect_supported_load_permutation_p): Likewise, and polynomial
12448 vf too.
12449 (vect_analyze_slp_cost): Handle polynomial vf.
12450 (vect_slp_analyze_node_operations): Likewise.
12451 (vect_slp_analyze_bb_1): Likewise.
12452 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
12453 than an unsigned HOST_WIDE_INT.
12454 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
12455 (vectorizable_load): Handle polynomial vf.
12456 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
12457 a poly_uint64.
12458 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
12459
12460 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12461 Alan Hayward <alan.hayward@arm.com>
12462 David Sherwood <david.sherwood@arm.com>
12463
12464 * match.pd: Handle bit operations involving three constants
12465 and try to fold one pair.
12466
12467 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
12468
12469 * tree-vect-loop-manip.c: Include gimple-fold.h.
12470 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
12471 niters_maybe_zero parameters. Handle other cases besides a step of 1.
12472 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
12473 Add a path that uses a step of VF instead of 1, but disable it
12474 for now.
12475 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
12476 and niters_no_overflow parameters. Update calls to
12477 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
12478 Create a new SSA name if the latter choses to use a ste other
12479 than zero, and return it via niters_vector_mult_vf_var.
12480 * tree-vect-loop.c (vect_transform_loop): Update calls to
12481 vect_do_peeling, vect_gen_vector_loop_niters and
12482 slpeel_make_loop_iterate_ntimes.
12483 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
12484 (vect_gen_vector_loop_niters): Update declarations after above changes.
12485
12486 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
12487
12488 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
12489 128-bit round to integer instructions.
12490 (ceil<mode>2): Likewise.
12491 (btrunc<mode>2): Likewise.
12492 (round<mode>2): Likewise.
12493
12494 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12495
12496 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
12497 unaligned VSX load/store on P8/P9.
12498 (expand_block_clear): Allow the use of unaligned VSX
12499 load/store on P8/P9.
12500
12501 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
12502
12503 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
12504 New function.
12505 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
12506 swap associated with both a load and a store.
12507
12508 2018-01-02 Andrew Waterman <andrew@sifive.com>
12509
12510 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
12511 * config/riscv/riscv.md (clear_cache): Use it.
12512
12513 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
12514
12515 * web.c: Remove out-of-date comment.
12516
12517 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12518
12519 * expr.c (fixup_args_size_notes): Check that any existing
12520 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
12521 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
12522 (emit_single_push_insn): ...here.
12523
12524 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12525
12526 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
12527 (const_vector_encoded_nelts): New function.
12528 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
12529 (const_vector_int_elt, const_vector_elt): Declare.
12530 * emit-rtl.c (const_vector_int_elt_1): New function.
12531 (const_vector_elt): Likewise.
12532 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
12533 of CONST_VECTOR_ELT.
12534
12535 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12536
12537 * expr.c: Include rtx-vector-builder.h.
12538 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
12539 directly on the tree encoding.
12540 (const_vector_from_tree): Likewise.
12541 * optabs.c: Include rtx-vector-builder.h.
12542 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
12543 sequence of "u" values.
12544 * vec-perm-indices.c: Include rtx-vector-builder.h.
12545 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
12546 directly on the vec_perm_indices encoding.
12547
12548 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12549
12550 * doc/rtl.texi (const_vector): Describe new encoding scheme.
12551 * Makefile.in (OBJS): Add rtx-vector-builder.o.
12552 * rtx-vector-builder.h: New file.
12553 * rtx-vector-builder.c: Likewise.
12554 * rtl.h (rtx_def::u2): Add a const_vector field.
12555 (CONST_VECTOR_NPATTERNS): New macro.
12556 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
12557 (CONST_VECTOR_DUPLICATE_P): Likewise.
12558 (CONST_VECTOR_STEPPED_P): Likewise.
12559 (CONST_VECTOR_ENCODED_ELT): Likewise.
12560 (const_vec_duplicate_p): Check for a duplicated vector encoding.
12561 (unwrap_const_vec_duplicate): Likewise.
12562 (const_vec_series_p): Check for a non-duplicated vector encoding.
12563 Say that the function only returns true for integer vectors.
12564 * emit-rtl.c: Include rtx-vector-builder.h.
12565 (gen_const_vec_duplicate_1): Delete.
12566 (gen_const_vector): Call gen_const_vec_duplicate instead of
12567 gen_const_vec_duplicate_1.
12568 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
12569 (gen_const_vec_duplicate): Use rtx_vector_builder.
12570 (gen_const_vec_series): Likewise.
12571 (gen_rtx_CONST_VECTOR): Likewise.
12572 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
12573 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
12574 Build a new vector rather than modifying a CONST_VECTOR in-place.
12575 (handle_special_swappables): Update call accordingly.
12576 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
12577 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
12578 Build a new vector rather than modifying a CONST_VECTOR in-place.
12579 (handle_special_swappables): Update call accordingly.
12580
12581 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12582
12583 * simplify-rtx.c (simplify_const_binary_operation): Use
12584 CONST_VECTOR_ELT instead of XVECEXP.
12585
12586 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12587
12588 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
12589 the selector elements to be different from the data elements
12590 if the selector is a VECTOR_CST.
12591 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
12592 ssizetype for the selector.
12593
12594 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12595
12596 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
12597 before testing each element individually.
12598 * tree-vect-generic.c (lower_vec_perm): Likewise.
12599
12600 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12601
12602 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
12603 * selftest-run-tests.c (selftest::run_tests): Call it.
12604 * vector-builder.h (vector_builder::operator ==): New function.
12605 (vector_builder::operator !=): Likewise.
12606 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
12607 (vec_perm_indices::all_from_input_p): New function.
12608 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
12609 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
12610 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
12611 instead of reading the VECTOR_CST directly. Detect whether both
12612 vector inputs are the same before constructing the vec_perm_indices,
12613 and update the number of inputs argument accordingly. Use the
12614 utility functions added above. Only construct sel2 if we need to.
12615
12616 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12617
12618 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
12619 the broadcast of the low byte.
12620 (expand_mult_highpart): Use an explicit encoding for the permutes.
12621 * optabs-query.c (can_mult_highpart_p): Likewise.
12622 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
12623 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
12624 (vectorizable_bswap): Likewise.
12625 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
12626 explicit encoding for the power-of-2 permutes.
12627 (vect_permute_store_chain): Likewise.
12628 (vect_grouped_load_supported): Likewise.
12629 (vect_permute_load_chain): Likewise.
12630
12631 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12632
12633 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
12634 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
12635 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
12636 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
12637 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
12638 (vect_gen_perm_mask_any): Likewise.
12639
12640 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12641
12642 * int-vector-builder.h: New file.
12643 * vec-perm-indices.h: Include int-vector-builder.h.
12644 (vec_perm_indices): Redefine as an int_vector_builder.
12645 (auto_vec_perm_indices): Delete.
12646 (vec_perm_builder): Redefine as a stand-alone class.
12647 (vec_perm_indices::vec_perm_indices): New function.
12648 (vec_perm_indices::clamp): Likewise.
12649 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
12650 (vec_perm_indices::new_vector): New function.
12651 (vec_perm_indices::new_expanded_vector): Update for new
12652 vec_perm_indices class.
12653 (vec_perm_indices::rotate_inputs): New function.
12654 (vec_perm_indices::all_in_range_p): Operate directly on the
12655 encoded form, without computing elided elements.
12656 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
12657 encoding. Update for new vec_perm_indices class.
12658 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
12659 the given vec_perm_builder.
12660 (expand_vec_perm_var): Update vec_perm_builder constructor.
12661 (expand_mult_highpart): Use vec_perm_builder instead of
12662 auto_vec_perm_indices.
12663 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
12664 vec_perm_indices instead of auto_vec_perm_indices. Use a single
12665 or double series encoding as appropriate.
12666 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
12667 vec_perm_indices instead of auto_vec_perm_indices.
12668 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
12669 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
12670 (vect_permute_store_chain): Likewise.
12671 (vect_grouped_load_supported): Likewise.
12672 (vect_permute_load_chain): Likewise.
12673 (vect_shift_permute_load_chain): Likewise.
12674 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
12675 (vect_transform_slp_perm_load): Likewise.
12676 (vect_schedule_slp_instance): Likewise.
12677 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
12678 (vectorizable_mask_load_store): Likewise.
12679 (vectorizable_bswap): Likewise.
12680 (vectorizable_store): Likewise.
12681 (vectorizable_load): Likewise.
12682 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
12683 vec_perm_indices instead of auto_vec_perm_indices. Use
12684 tree_to_vec_perm_builder to read the vector from a tree.
12685 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
12686 vec_perm_builder instead of a vec_perm_indices.
12687 (have_whole_vector_shift): Use vec_perm_builder and
12688 vec_perm_indices instead of auto_vec_perm_indices. Leave the
12689 truncation to calc_vec_perm_mask_for_shift.
12690 (vect_create_epilog_for_reduction): Likewise.
12691 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
12692 from auto_vec_perm_indices to vec_perm_indices.
12693 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
12694 instead of changing individual elements.
12695 (aarch64_vectorize_vec_perm_const): Use new_vector to install
12696 the vector in d.perm.
12697 * config/arm/arm.c (expand_vec_perm_d::perm): Change
12698 from auto_vec_perm_indices to vec_perm_indices.
12699 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
12700 instead of changing individual elements.
12701 (arm_vectorize_vec_perm_const): Use new_vector to install
12702 the vector in d.perm.
12703 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
12704 Update vec_perm_builder constructor.
12705 (rs6000_expand_interleave): Likewise.
12706 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
12707 (rs6000_expand_interleave): Likewise.
12708
12709 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12710
12711 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
12712 to qimode could truncate the indices.
12713 * optabs.c (expand_vec_perm_var): Likewise.
12714
12715 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12716
12717 * Makefile.in (OBJS): Add vec-perm-indices.o.
12718 * vec-perm-indices.h: New file.
12719 * vec-perm-indices.c: Likewise.
12720 * target.h (vec_perm_indices): Replace with a forward class
12721 declaration.
12722 (auto_vec_perm_indices): Move to vec-perm-indices.h.
12723 * optabs.h: Include vec-perm-indices.h.
12724 (expand_vec_perm): Delete.
12725 (selector_fits_mode_p, expand_vec_perm_var): Declare.
12726 (expand_vec_perm_const): Declare.
12727 * target.def (vec_perm_const_ok): Replace with...
12728 (vec_perm_const): ...this new hook.
12729 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
12730 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
12731 * doc/tm.texi: Regenerate.
12732 * optabs.def (vec_perm_const): Delete.
12733 * doc/md.texi (vec_perm_const): Likewise.
12734 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
12735 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
12736 expand_vec_perm for constant permutation vectors. Assert that
12737 the mode of variable permutation vectors is the integer equivalent
12738 of the mode that is being permuted.
12739 * optabs-query.h (selector_fits_mode_p): Declare.
12740 * optabs-query.c: Include vec-perm-indices.h.
12741 (selector_fits_mode_p): New function.
12742 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
12743 is defined, instead of checking whether the vec_perm_const_optab
12744 exists. Use targetm.vectorize.vec_perm_const instead of
12745 targetm.vectorize.vec_perm_const_ok. Check whether the indices
12746 fit in the vector mode before using a variable permute.
12747 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
12748 vec_perm_indices instead of an rtx.
12749 (expand_vec_perm): Replace with...
12750 (expand_vec_perm_const): ...this new function. Take the selector
12751 as a vec_perm_indices rather than an rtx. Also take the mode of
12752 the selector. Update call to shift_amt_for_vec_perm_mask.
12753 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
12754 Use vec_perm_indices::new_expanded_vector to expand the original
12755 selector into bytes. Check whether the indices fit in the vector
12756 mode before using a variable permute.
12757 (expand_vec_perm_var): Make global.
12758 (expand_mult_highpart): Use expand_vec_perm_const.
12759 * fold-const.c: Includes vec-perm-indices.h.
12760 * tree-ssa-forwprop.c: Likewise.
12761 * tree-vect-data-refs.c: Likewise.
12762 * tree-vect-generic.c: Likewise.
12763 * tree-vect-loop.c: Likewise.
12764 * tree-vect-slp.c: Likewise.
12765 * tree-vect-stmts.c: Likewise.
12766 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
12767 Delete.
12768 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
12769 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
12770 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
12771 (aarch64_vectorize_vec_perm_const): ...this new function.
12772 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
12773 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
12774 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
12775 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
12776 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
12777 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
12778 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
12779 into...
12780 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
12781 check for NEON modes.
12782 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
12783 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
12784 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
12785 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
12786 into...
12787 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
12788 the old VEC_PERM_CONST conditions.
12789 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
12790 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
12791 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
12792 (ia64_vectorize_vec_perm_const_ok): Merge into...
12793 (ia64_vectorize_vec_perm_const): ...this new function.
12794 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
12795 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
12796 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
12797 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
12798 * config/mips/mips.c (mips_expand_vec_perm_const)
12799 (mips_vectorize_vec_perm_const_ok): Merge into...
12800 (mips_vectorize_vec_perm_const): ...this new function.
12801 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
12802 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
12803 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
12804 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
12805 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
12806 (rs6000_expand_vec_perm_const): Delete.
12807 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
12808 Delete.
12809 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
12810 (altivec_expand_vec_perm_const_le): Take each operand individually.
12811 Operate on constant selectors rather than rtxes.
12812 (altivec_expand_vec_perm_const): Likewise. Update call to
12813 altivec_expand_vec_perm_const_le.
12814 (rs6000_expand_vec_perm_const): Delete.
12815 (rs6000_vectorize_vec_perm_const_ok): Delete.
12816 (rs6000_vectorize_vec_perm_const): New function.
12817 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
12818 an element count and rtx array.
12819 (rs6000_expand_extract_even): Update call accordingly.
12820 (rs6000_expand_interleave): Likewise.
12821 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
12822 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
12823 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
12824 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
12825 (rs6000_expand_vec_perm_const): Delete.
12826 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
12827 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
12828 (altivec_expand_vec_perm_const_le): Take each operand individually.
12829 Operate on constant selectors rather than rtxes.
12830 (altivec_expand_vec_perm_const): Likewise. Update call to
12831 altivec_expand_vec_perm_const_le.
12832 (rs6000_expand_vec_perm_const): Delete.
12833 (rs6000_vectorize_vec_perm_const_ok): Delete.
12834 (rs6000_vectorize_vec_perm_const): New function. Remove stray
12835 reference to the SPE evmerge intructions.
12836 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
12837 an element count and rtx array.
12838 (rs6000_expand_extract_even): Update call accordingly.
12839 (rs6000_expand_interleave): Likewise.
12840 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
12841 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
12842 new function.
12843 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
12844
12845 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12846
12847 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
12848 vector mode and that that mode matches the mode of the data
12849 being permuted.
12850 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
12851 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
12852 directly using expand_vec_perm_1 when forcing selectors into
12853 registers.
12854 (expand_vec_perm_var): New function, split out from expand_vec_perm.
12855
12856 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12857
12858 * optabs-query.h (can_vec_perm_p): Delete.
12859 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
12860 * optabs-query.c (can_vec_perm_p): Split into...
12861 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
12862 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
12863 particular selector is valid.
12864 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
12865 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
12866 (vect_grouped_load_supported): Likewise.
12867 (vect_shift_permute_load_chain): Likewise.
12868 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
12869 (vect_transform_slp_perm_load): Likewise.
12870 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
12871 (vectorizable_bswap): Likewise.
12872 (vect_gen_perm_mask_checked): Likewise.
12873 * fold-const.c (fold_ternary_loc): Likewise. Don't take
12874 implementations of variable permutation vectors into account
12875 when deciding which selector to use.
12876 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
12877 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
12878 with a false third argument.
12879 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
12880 to test whether the constant selector is valid and can_vec_perm_var_p
12881 to test whether a variable selector is valid.
12882
12883 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12884
12885 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
12886 * optabs-query.c (can_vec_perm_p): Likewise.
12887 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
12888 instead of vec_perm_indices.
12889 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
12890 (vect_gen_perm_mask_checked): Likewise,
12891 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
12892 (vect_gen_perm_mask_checked): Likewise,
12893
12894 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
12895
12896 * optabs-query.h (qimode_for_vec_perm): Declare.
12897 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
12898 (qimode_for_vec_perm): ...this new function.
12899 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
12900
12901 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
12902
12903 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
12904 does not have a conditional at the top.
12905
12906 2018-01-02 Richard Biener <rguenther@suse.de>
12907
12908 * ipa-inline.c (big_speedup_p): Fix expression.
12909
12910 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
12911
12912 PR target/81616
12913 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
12914 for generic 4->6.
12915
12916 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
12917
12918 PR target/81616
12919 Generic tuning.
12920 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
12921 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
12922 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
12923 cond_taken_branch_cost 3->4.
12924
12925 2018-01-01 Jakub Jelinek <jakub@redhat.com>
12926
12927 PR tree-optimization/83581
12928 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
12929 TODO_cleanup_cfg if any changes have been made.
12930
12931 PR middle-end/83608
12932 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
12933 convert_modes if target mode has the right side, but different mode
12934 class.
12935
12936 PR middle-end/83609
12937 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
12938 last argument when extracting from CONCAT. If either from_real or
12939 from_imag is NULL, use expansion through memory. If result is not
12940 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
12941 the parts directly to inner mode, if even that fails, use expansion
12942 through memory.
12943
12944 PR middle-end/83623
12945 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
12946 check for bswap in mode rather than HImode and use that in expand_unop
12947 too.
12948 \f
12949 Copyright (C) 2018 Free Software Foundation, Inc.
12950
12951 Copying and distribution of this file, with or without modification,
12952 are permitted in any medium without royalty provided the copyright
12953 notice and this notice are preserved.