1 2018-07-10 Richard Biener <rguenther@suse.de>
3 * hash-map.h (hash_map::iterator::operator*): Return
4 references to key and value.
6 2018-07-10 Jakub Jelinek <jakub@redhat.com>
9 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
10 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
11 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
12 (gimplify_omp_for): For composite loops, move outer
13 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
14 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
15 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
16 TREE_LIST for both the original class iterator and the "last" helper
17 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
18 loop, remember has_decl_expr from outer composite loops for the
19 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
21 2018-07-09 Martin Sebor <msebor@redhat.com>
25 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
26 accessing implicitly initialized array elements.
27 * expr.c (string_constant): Handle string initializers of
28 character arrays within aggregates.
29 * gimple-fold.c (fold_array_ctor_reference): Add argument.
30 Store element offset. As a special case, handle zero size.
31 (fold_nonarray_ctor_reference): Same.
32 (fold_ctor_reference): Add argument. Store subobject offset.
33 * gimple-fold.h (fold_ctor_reference): Add argument.
35 2018-07-09 Paul Koning <ni1d@arrl.net>
37 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
38 (pdp11_insn_cost): New function.
39 (pdp11_md_asm_adjust): New function.
40 (TARGET_INVALID_WITHIN_DOLOOP): Define.
41 (pdp11_rtx_costs): Update to match machine better.
42 (output_addr_const_pdp11): Correct format mismatch warnings.
43 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
44 * config/pdp11/pdp11.md: General change to add base_cost and/or
45 length attributes for use by new pdp11_insn_cost function.
46 (MIN_BRANCH): Correct definition.
48 (doloop_end): Use standard pattern name for looping pattern.
49 (doloop_end_nocc): New.
50 (movsf): Add another constraint alternative.
51 (zero_extendqihi2): Add constraint alternatives for not in place
53 (zero_extendhisi2): Remove.
54 (shift patterns): Add CC handling variants.
58 (define_peephole2): New peephole to recognize mov that sets CC for
61 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
63 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
64 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
67 2018-07-09 Jakub Jelinek <jakub@redhat.com>
70 * real.c (real_nextafter): Return true if result is denormal.
72 2018-07-09 Martin Liska <mliska@suse.cz>
74 * common.opt: Add back wrongly removed attribute.
76 2018-07-09 Richard Biener <rguenther@suse.de>
79 * dwarf2out.c (gen_block_die): For an early generated DIE
80 always output high/low PC attributes.
82 2018-07-09 Tom de Vries <tdevries@suse.de>
84 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
85 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
86 onto VAR_DECL with abstract origin.
88 2018-07-07 Jim Wilson <jimw@sifive.com>
90 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
92 2018-07-07 Tom de Vries <tdevries@suse.de>
94 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
96 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
98 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
100 (combine_bound): Use wide-int overflow calculation instead of
102 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
104 * fold-const.c (int_const_binop_2): Same.
105 (extract_muldiv_1): Same.
106 (fold_div_compare): Same.
107 (fold_abs_const): Same.
109 * poly-int.h (add): Same.
113 * predict.c (predict_iv_comparison): Same.
114 * profile-count.c (slow_safe_scale_64bit): Same.
115 * simplify-rtx.c (simplify_const_binary_operation): Same.
116 * tree-chrec.c (tree_fold_binomial): Same.
117 * tree-data-ref.c (split_constant_offset_1): Same.
118 * tree-if-conv.c (idx_within_array_bound): Same.
119 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
120 * tree-ssa-phiopt.c (minmax_replacement): Same.
121 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
122 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
123 * vr-values.c (vr_values::adjust_range_with_scev): Same.
124 * wide-int.cc (wi::add_large): Same.
125 (wi::mul_internal): Same.
126 (wi::sub_large): Same.
127 (wi::divmod_internal): Same.
128 * wide-int.h: Change overflow type to overflow_type for neg, add,
129 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
130 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
131 mul_internal, divmod_internal.
132 (overflow_type): New enum.
133 (accumulate_overflow): New.
135 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
137 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
138 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
140 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
142 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
143 argument is checked for zero before entering loop, avoid checking again.
145 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
147 * gimplify.h (generic_expr_could_trap_p): Set as global function.
148 * gimplify.h (generic_expr_could_trap_p): Likwise.
149 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
151 2018-07-06 Jakub Jelinek <jakub@redhat.com>
153 PR tree-optimization/86401
154 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
155 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
156 (fold_bit_and_mask): ... here. New helper function for match.pd.
157 * fold-const.h (fold_bit_and_mask): Declare.
158 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
160 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
163 * target.def (translate_mode_attribute): New hook.
164 * targhooks.h (default_translate_mode_attribute): Declare.
165 * targhooks.c (default_translate_mode_attribute): New function.
166 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
167 * doc/tm.texi: Regenerate.
168 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
169 (rs6000_translate_mode_attribute): New function.
171 2018-07-06 Paul Koning <ni1d@arrl.net>
173 * doc/md.texi (define_split): Document DONE and FAIL.
174 (define_peephole2): Ditto.
176 2018-07-05 Jeff Law <law@redhat.com>
178 PR tree-optimization/86010
179 * tree-ssa-dse.c (compute_trims): More aggressively trim at
180 both the head and tail of mem* and str* calls.
182 2018-07-05 Jim Wilson <jimw@sifive.com>
184 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
186 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
188 * config/aarch64/aarch64-simd.md: correct flags text for
189 MIN_EXPR replacement.
191 2018-07-05 James Clarke <jrtc27@jrtc27.com>
193 * configure: Regenerated.
195 2018-07-05 Carl Love <cel@us.ibm.com>
197 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
198 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
199 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
200 VSX_BUILTIN_DOUBLEL_V4SF.
202 2018-07-05 Martin Sebor <msebor@redhat.com>
205 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
206 than its domain to compute its the upper bound of a char array.
208 2018-07-05 Nathan Sidwell <nathan@acm.org>
210 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
211 * doc/cpp.texi: Update comment.
212 * doc/tm.texi: Rebuilt.
213 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
214 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
215 * doc/extend.texi (Backwards Compatibility): Clarify it is system
216 headers affected by extern "C".
217 * system.h: Poison NO_IMPLICIT_EXTERN_C.
218 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
219 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
220 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
221 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
222 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
223 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
224 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
225 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
226 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
227 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
228 config/sparc/sp64-elf.h, config/spu/spu.h,
229 config/stormy16/stormy16.h, config/v850/v850.h,
230 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
231 define NO_IMPLICIT_EXTERN_C.
232 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
234 2018-07-05 Tamar Christina <tamar.christina@arm.com>
237 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
238 instead of GET_MODE_SIZE when comparing Units.
240 2018-07-05 Tamar Christina <tamar.christina@arm.com>
243 * rtlanal.c (set_noop_p): Constrain on mode change,
244 include hard-reg-set.h
246 2018-07-05 Tamar Christina <tamar.christina@arm.com>
248 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
250 2018-07-05 Jakub Jelinek <jakub@redhat.com>
253 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
256 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
258 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
260 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
263 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
265 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
267 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
270 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
272 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
274 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
277 2018-07-04 Martin Liska <mliska@suse.cz>
279 * tree-switch-conversion.c: Define
280 max_ratio_for_speed and max_ratio_for_size constants.
282 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
283 Martin Liska <mliska@suse.cz>
288 * common.opt: Rename align options with 'str_' prefix.
289 * common/config/i386/i386-common.c (set_malign_value): New
291 (ix86_handle_option): Use it to set -falign-* options/
292 * config/aarch64/aarch64-protos.h (struct tune_params): Change
293 type from int to string.
294 * config/aarch64/aarch64.c: Update default values from int
296 * config/alpha/alpha.c (alpha_override_options_after_change):
298 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
299 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
300 max skip conditionally.
301 * config/i386/freebsd.h (SUBALIGN_LOG): New.
302 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
303 max skip conditionally.
304 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
305 max skip conditionally.
306 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
307 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
308 max skip conditionally.
309 * config/i386/i386.c (struct ptt): Change type from int to
311 (ix86_default_align): Set default values.
312 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
313 max skip conditionally.
314 * config/i386/iamcu.h (SUBALIGN_LOG): New.
315 (ASM_OUTPUT_MAX_SKIP_ALIGN):
316 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
317 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
318 max skip conditionally.
319 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
320 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
321 * config/i386/x86-64.h (SUBALIGN_LOG): New.
322 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
323 max skip conditionally.
324 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
325 * config/ia64/ia64.c (ia64_option_override): Set default values
326 for alignment options.
327 * config/m68k/m68k.c: Handle new str_align_* options.
328 * config/mips/mips.c (mips_set_compression_mode): Change
330 (mips_option_override): Set default values for options.
331 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
333 * config/rs6000/rs6000.c (rs6000_option_override_internal):
335 * config/rx/rx.c (rx_option_override): Likewise.
336 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
337 (LABEL_ALIGN): Use align_labels_log.
338 (LOOP_ALIGN): Use align_loops_align.
339 * config/s390/s390.c (s390_asm_output_function_label): Use new
341 * config/sh/sh.c (sh_override_options_after_change):
342 Change type of constants.
343 * config/spu/spu.c (spu_sched_init): Likewise.
344 * config/sparc/sparc.c (sparc_option_override): Set default
346 * config/visium/visium.c (visium_option_override): Likewise.
347 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
348 emit p2align format with last argument if it's not needed.
349 * doc/invoke.texi: Document extended format of -falign-*.
350 * final.c: Use align_labels alignment.
351 * flags.h (struct target_flag_state): Change type to use
353 (struct align_flags_tuple): New.
354 (struct align_flags): Likewise.
355 (align_loops_log): Redefine macro to use new types.
356 (align_loops_max_skip): Redefine macro to use new types.
357 (align_jumps_log): Redefine macro to use new types.
358 (align_jumps_max_skip): Redefine macro to use new types.
359 (align_labels_log): Redefine macro to use new types.
360 (align_labels_max_skip): Redefine macro to use new types.
361 (align_functions_log): Redefine macro to use new types.
362 (align_loops): Redefine macro to use new types.
363 (align_jumps): Redefine macro to use new types.
364 (align_labels): Redefine macro to use new types.
365 (align_functions): Redefine macro to use new types.
366 (align_functions_max_skip): Redefine macro to use new types.
367 (align_loops_value): New macro.
368 (align_jumps_value): New macro.
369 (align_labels_value): New macro.
370 (align_functions_value): New macro.
371 * function.c (invoke_set_current_function_hook): Propagate
372 alignment values from flags to global variables default in
374 * ipa-icf.c (sem_function::equals_wpa): Use
375 cl_optimization_option_eq instead of memcmp.
376 * lto-streamer.h (cl_optimization_stream_out): Support streaming
378 (cl_optimization_stream_in): Likewise.
379 * optc-save-gen.awk: Support strings in cl_optimization.
380 * opth-gen.awk: Likewise.
381 * opts.c (finish_options): Remove error checking of invalid
383 (MAX_CODE_ALIGN): Remove.
384 (MAX_CODE_ALIGN_VALUE): Likewise.
385 (parse_and_check_align_values): New function.
386 (check_alignment_argument): Likewise.
387 (common_handle_option): Use check_alignment_argument.
388 * opts.h (parse_and_check_align_values): Declare.
389 * toplev.c (init_alignments): Remove.
390 (read_log_maxskip): New.
391 (parse_N_M): Likewise.
392 (parse_alignment_opts): Likewise.
393 (backend_init_target): Remove usage of init_alignments.
394 * toplev.h (parse_alignment_opts): Declare.
395 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
397 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
398 * tree.c (cl_option_hasher::equal): New.
399 * varasm.c: Use new global macros.
401 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
403 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
404 Use a simpler align directive also if MAXSKIP = ALIGN-1.
405 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
406 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
407 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
408 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
409 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
410 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
411 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
412 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
413 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
414 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
415 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
417 2018-07-04 Martin Liska <mliska@suse.cz>
418 Jonathan Wakely <jwakely@redhat.com>
420 * coverage.c: Use correct type.
421 * doc/invoke.texi: Language correction.
423 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
426 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
427 ENDBRANCH for non-tail call which may return via indirect branch.
428 * doc/extend.texi: Document indirect_return attribute.
430 2018-07-03 Martin Sebor <msebor@redhat.com>
432 PR tree-optimization/86274
433 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
435 (format_floating): Correct handling of infinities and NaNs.
437 2018-07-03 Martin Sebor <msebor@redhat.com>
439 * print-tree.c (print_real_cst): New function.
440 (print_node_brief): Call it.
443 2018-07-03 Jeff Law <law@redhat.com>
445 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
446 into a single pattern.
448 * config/h8300/h8300.md (ors code_iterator): New.
449 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
450 a single pattern and single splitter.
451 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
452 (iorqi3_1, xorqi3_1): Likewise.
453 (iorqi3, xorqi3 expanders): Similarly.
455 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
456 (movmd_internal) into a single pattern using the P mode iterator.
457 (movmd splitters): Similarly.
458 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
459 (movsd splitters): Similarly.
461 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
462 ADDB, ADDW and ADDL into a single ADD attribute which selects the
463 right table based on the size of the operand.
464 * config/h8300/h8300.md (length_table): Corresponding changes. All
465 references to "addb", "addw" and "addl" changed to "add".
466 (btst patterns): Merge two variants into a single pattern.
467 (tstqi, tsthi): Likewise.
468 (addhi3_incdec, addsi3_incdec): Likewise.
469 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
470 (mulhi3, mulsi3): Likewise.
471 (udivhi3, udivsi3): Likewise.
472 (divhi3, divsi3): Likewise.
473 (andorqi3, andorhi3, andorsi3): Likewise.
475 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
478 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
479 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
481 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
483 PR tree-optimization/85694
484 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
485 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
487 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
488 (<u>avg<mode>3_ceil): New patterns.
490 2018-07-03 David Malcolm <dmalcolm@redhat.com>
492 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
493 scan-tree-dump directive.
494 * gcc.dg/vect/slp-perm-2.c: Likewise.
495 * gcc.dg/vect/slp-perm-3.c: Likewise.
496 * gcc.dg/vect/slp-perm-5.c: Likewise.
497 * gcc.dg/vect/slp-perm-6.c: Likewise.
498 * gcc.dg/vect/slp-perm-7.c: Likewise.
499 * gcc.dg/vect/slp-perm-8.c: Likewise.
501 2018-07-03 Marek Polacek <polacek@redhat.com>
504 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
506 2018-07-03 Richard Biener <rguenther@suse.de>
509 * tree-ssa-structalias.c (find_func_clobbers): Properly
510 handle indirect calls.
512 2018-07-03 Jeff Law <law@redhat.com>
514 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
515 (shifts): New code iterator.
516 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
517 expander. Fix HImode handling on H8/SX.
518 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
519 (subqi3, subhi3, subsi3 expanders): Likewise.
520 (andqi3, andhi3, andsi3 expanders): Likewise.
521 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
522 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
523 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
524 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
525 (zero_extendqihi2, zero_extendqisi2): Likewise.
526 (extendqihi2, extendqisi2): Likewise.
527 (rotlqi3, rotlhi3, rotlsi3): Likewise.
528 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
529 (rotlqi3_1, rotlhi3_1): Likewise.
530 (logicalhi3_sn, logicalsi3_sn): Likewise.
531 (logicalhi3, logicalsi3): Likewise.
533 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
535 * tree-vect-patterns.c (vect_recog_rotate_pattern)
536 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
537 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
538 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
539 type to append_pattern_def_seq instead of creating a stmt_vec_info
541 (build_mask_conversion): Likewise. Remove vinfo argument.
542 (vect_add_conversion_to_patterm): Likewise, renaming to...
543 (vect_add_conversion_to_pattern): ...this.
544 (vect_recog_mask_conversion_pattern): Update call to
545 build_mask_conversion. Pass the vector type to
546 append_pattern_def_seq here too.
547 (vect_recog_gather_scatter_pattern): Update call to
548 vect_add_conversion_to_pattern.
550 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
552 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
553 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
554 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
555 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
556 STMT_VINFO_PATTERN_DEF_SEQ to null here.
557 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
558 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
559 append_pattern_def_seq instead of new_pattern_def_seq.
560 (vect_recog_divmod_pattern): Do both of the above.
561 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
564 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
566 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
567 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
568 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
569 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
570 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
571 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
572 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
573 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
574 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
575 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
576 parameter with a single stmt_vec_info.
577 (vect_recog_func_ptr): Likewise.
578 (vect_recog_gather_scatter_pattern): Likewise, folding in...
579 (vect_try_gather_scatter_pattern): ...this.
580 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
581 the stmt_vec_info of the statement to be matched. Don't clear
582 STMT_VINFO_RELATED_STMT.
583 (vect_pattern_recog): Update call accordingly.
585 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
587 PR tree-optimization/85694
588 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
589 (uavgM3_ceil): Document new optabs.
590 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
591 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
593 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
594 (savg_ceil_optab): New optabs.
595 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
596 (vect_vect_recog_func_ptrs): Add it.
597 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
598 constant directly from the associated lhs.
600 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
602 * tree-vect-patterns.c (vect_split_statement): New function.
603 (vect_convert_input): Use it to try to split an existing cast.
605 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
607 * poly-int.h (print_hex): New function.
608 * dumpfile.h (dump_dec, dump_hex): Declare.
609 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
610 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
611 min_input_precision, operation_precision and operation_sign.
612 * tree-vect-patterns.c (vect_get_range_info): New function.
613 (vect_same_loop_or_bb_p, vect_single_imm_use)
614 (vect_operation_fits_smaller_type): Delete.
615 (vect_look_through_possible_promotion): Add an optional
616 single_use_p parameter.
617 (vect_recog_over_widening_pattern): Rewrite to use new
618 stmt_vec_info infomration. Handle one operation at a time.
619 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
620 (vect_truncatable_operation_p, vect_set_operation_type)
621 (vect_set_min_input_precision): New functions.
622 (vect_determine_min_output_precision_1): Likewise.
623 (vect_determine_min_output_precision): Likewise.
624 (vect_determine_precisions_from_range): Likewise.
625 (vect_determine_precisions_from_users): Likewise.
626 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
627 (vect_vect_recog_func_ptrs): Put over_widening first.
629 (vect_pattern_recog): Call vect_determine_precisions.
631 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
633 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
634 statements that have been replaced by further pattern statements.
635 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
637 2018-07-03 Richard Biener <rguenther@suse.de>
639 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
640 always set *dt. Dump vectype in vectype overload.
641 * dumpfile.h (dump_gimple_expr): New function.
642 (dump_gimple_expr_loc): Likewise.
643 * dumpfile.c (dump_gimple_expr): New function.
644 (dump_gimple_expr_loc): Likewise.
646 2018-07-02 Jeff Law <law@redhat.com>
648 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
649 the H8/300, H8/300H and H8/S variants into a single pattern.
650 (movhi_h8300, movqi_h8300hs): Similarly.
651 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
652 (QHI mode iterator): New.
654 * config/h8300/h8300.md: Remove trailing whitespace.
656 2018-07-02 Jim Wilson <jimw@sifive.com>
658 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
659 instead of emit_insn for interrupt returns.
660 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
661 (riscv_sret, riscv_uret): Likewise.
663 2018-07-02 David Malcolm <dmalcolm@redhat.com>
665 * pretty-print.c (selftest::test_pp_format): Move save and restore
666 of quotes to class auto_fix_quotes, and add an instance.
667 * selftest.c: Include "intl.h".
668 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
669 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
670 * selftest.h (selftest::auto_fix_quotes): New class.
672 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
674 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
675 (aarch64_sve_prepare_conditional_op): Remove.
676 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
677 Allow aarch64_simd_reg_or_zero as select operand; remove
678 the aarch64_sve_prepare_conditional_op call.
679 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
680 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
681 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
682 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
683 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
684 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
685 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
686 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
687 and a splitters to match all of the *_any patterns.
688 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
690 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
691 (SVE_COND_FP_BINARY_REV): Remove.
692 (sve_int_op_rev, sve_fp_op_rev): New.
693 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
694 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
695 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
696 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
697 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
698 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
699 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
700 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
701 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
703 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
704 Remove match_dup 1 from the inner unspec.
705 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
707 * config/aarch64/aarch64.md (movprfx): New attr.
708 (length): Default movprfx to 8.
709 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
710 (*madd<SVE_I>, *msub<SVE_I): Likewise.
711 (*<su>mul<SVE_I>3_highpart): Likewise.
712 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
713 (*v<ASHIFT><SVE_I>3): Likewise.
714 (*<su><MAXMIN><SVE_I>3): Likewise.
715 (*<su><MAXMIN><SVE_F>3): Likewise.
716 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
717 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
718 (*div<SVE_F>4): Likewise.
720 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
722 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
725 2018-07-02 Richard Biener <rguenther@suse.de>
727 PR tree-optimization/86363
728 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
729 memset argument refers to a non-variable address.
731 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
733 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
734 {PLUS,MINUS}_EXPR code to...
735 (adjust_symbolic_bound): ...here,
736 (combine_bound): ...here,
737 (set_value_range_with_overflow): ...and here.
739 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
741 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
743 (extract_range_from_abs_expr): ...here.
745 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
747 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
748 -fno-omit-frame-pointer when not optimizing.
750 2018-07-02 Martin Liska <mliska@suse.cz>
753 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
754 (propagate_nothrow): Likewise.
756 2018-07-02 Martin Liska <mliska@suse.cz>
759 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
761 2018-07-02 David Malcolm <dmalcolm@redhat.com>
763 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
764 function in r262149, changing "loc" param from source_location to
765 const dump_location_t &.
766 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
767 declaration, as above.
769 2018-07-01 Paul Koning <ni1d@arrl.net>
771 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
772 -munit-asm, -mgnu-asm, -mdec-asm.
773 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
774 (pdp11_output_labelref): New.
775 (pdp11_output_def): New.
776 (pdp11_output_addr_vec_elt): New.
777 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
778 %# and %@ format codes.
779 (pdp11_option_override): New.
780 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
781 (pdp11_output_ident): New.
782 (pdp11_asm_named_section): New.
783 (pdp11_asm_init_sections): New.
784 (pdp11_file_start): New.
785 (pdp11_file_end): New.
786 (output_ascii): Use .ascii/.asciz for -mdec-asm.
787 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
788 %o, like %c but octal.
789 (pdp11_option_override): New.
790 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
792 (DATA_SECTION_ASM_OP): Ditto.
793 (READONLY_DATA_SECTION_ASM_OP): New.
794 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
795 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
796 (ASM_OUTPUT_LABELREF): Ditto.
797 (ASM_OUTPUT_DEF): Ditto.
798 (ASM_OUTPUT_EXTERNAL): New.
799 (ASM_OUTPUT_SOURCE_FILENAME): New.
800 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
801 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
802 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
803 %# and %@ format codes.
804 * config/pdp11/pdp11.opt (mgnu-asm): New.
805 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
806 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
807 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
809 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
811 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
812 dereferencing path[] beyond its length.
814 (debug_all_paths): New.
815 (rewire_first_differing_edge): New.
816 (adjust_paths_after_duplication): New.
817 (duplicate_thread_path): Call adjust_paths_after_duplication.
819 (thread_through_all_blocks): Add new argument to
820 duplicate_thread_path.
822 2018-06-30 Jim Wilson <jimw@sifive.com>
824 * config/riscv/predicates.md (p2m1_shift_operand): New.
825 (high_mask_shift_operand): New.
826 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
827 pattern using p2m1_shift_operand.
828 (lshsi3_zero_extend_3+2): New combiner pattern using
829 high_mask_shift_operand.
831 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
833 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
835 (vect_recog_rotate_pattern): ...here.
836 (vect_convert_input): Try to insert casts of invariants in the
838 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
839 preheader to be empty.
841 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
843 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
844 vector type. If given, install it in the new statement's
846 (vect_element_precision): New function.
847 (vect_unpromoted_value): New struct.
848 (vect_unpromoted_value::vect_unpromoted_value): New function.
849 (vect_unpromoted_value::set_op): Likewise.
850 (vect_look_through_possible_promotion): Likewise.
851 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
852 (vect_widened_op_tree, vect_convert_input): Likewise.
853 (vect_convert_inputs, vect_convert_output): Likewise.
854 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
855 to handle the optional cast of the multiplication result and
856 vect_widened_op_tree to detect the widened multiplication itself.
857 Do not require the input and output of promotion casts to have
858 the same sign, but base the signedness of the operation on the
859 input rather than the result. If the pattern includes two
860 promotions, check that those promotions have the same sign.
861 Do not restrict the MULT_EXPR handling to a double-width result;
862 handle quadruple-width results and wider. Use vect_convert_inputs
863 to convert the inputs to the common type.
864 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
865 to handle the optional cast of the ABS result. Also allow a sign
866 change or a sign extension between the ABS and MINUS.
867 Use vect_widened_op_tree to detect the widened subtraction and use
868 vect_convert_inputs to convert the inputs to the common type.
869 (vect_handle_widen_op_by_const): Delete.
870 (vect_recog_widen_op_pattern): New function.
871 (vect_recog_widen_mult_pattern): Use it.
872 (vect_recog_widen_shift_pattern): Likewise.
873 (vect_recog_widen_sum_pattern): Use
874 vect_look_through_possible_promotion to handle the promoted
877 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
879 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
880 the containing gimple_seq *.
881 * gimple-iterator.h (gsi_for_stmt): Declare it.
882 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
883 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
884 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
885 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
886 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
888 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
890 (vect_mark_pattern_stmts): ...here. Handle cases in which the
891 statement being replaced is part of an existing pattern
892 definition sequence, inserting the new pattern statements before
894 (vect_pattern_recog_1): Don't return a bool. If the statement
895 is already part of a pattern, instead apply pattern matching
896 to the pattern definition statements. Don't clear the
897 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
898 (vect_pattern_recog): Don't break after the first match;
899 continue processing the pattern definition statements instead.
900 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
902 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
904 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
905 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
906 (vect_recog_widen_sum_pattern): Use it.
908 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
910 * tree-vect-loop.c (vectorizable_reduction): Assert that the
911 phi is not a pattern statement and has not been replaced by
913 * tree-vect-patterns.c (type_conversion_p): Don't check
914 STMT_VINFO_IN_PATTERN_P.
915 (vect_recog_vector_vector_shift_pattern): Likewise.
916 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
917 the pattern statement rather than the original statement; check
918 directly for a WIDEN_MULT_EXPR here.
919 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
920 vect_is_simple_use to return the pattern statement rather
921 than the original statement; use is_pattern_stmt_p to check
922 for such a pattern statement.
923 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
924 to return the pattern statement rather than the original statement;
925 don't do the same transformation here.
926 (vect_is_simple_use): If the defining statement has been replaced
927 by a pattern statement, return the pattern statement instead.
928 Remove the corresponding (local) transformation from the vectype
931 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
933 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
934 end and default to null.
935 * tree-vect-loop.c (vect_create_epilog_for_reduction)
936 (vectorizable_reduction): Update calls accordingly, dropping the
937 gimple ** argument if the passed-back statement isn't needed.
938 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
939 (vect_recog_rotate_pattern): Likewise.
940 (vect_recog_mask_conversion_pattern): Likewise.
941 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
942 (vect_mask_constant_operand_p): Likewise.
943 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
944 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
945 (get_group_load_store_type, get_load_store_type): Likewise.
946 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
947 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
948 (vectorizable_conversion, vectorizable_assignment): Likewise.
949 (vectorizable_shift, vectorizable_operation): Likewise.
950 (vectorizable_store, vect_is_simple_cond): Likewise.
951 (vectorizable_condition, vectorizable_comparison): Likewise.
952 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
953 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
954 and move it to the end. Cope with null def_stmt_outs.
956 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
958 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
960 2018-06-29 Jeff Law <law@redhat.com>
962 * config/v850/v850.c (v850_legitimate_address_p): Handle large
963 displacements for TARGET_V850E2V3 and newer.
964 (TARGET_LRA_P): Remove. Defaults to LRA now.
965 * config/v850/v850.md (sign23byte_load): Remove.
966 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
967 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
969 2018-06-29 Martin Liska <mliska@suse.cz>
972 * coverage.c (coverage_init): Mangle full path name.
973 * doc/invoke.texi: Document the change.
974 * gcov-io.c (mangle_path): New.
975 * gcov-io.h (mangle_path): Likewise.
976 * gcov.c (mangle_name): Use mangle_path for path mangling.
978 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
980 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
981 if starting source register is not even.
983 2018-06-29 Martin Liska <mliska@suse.cz>
985 PR tree-optimization/86263
986 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
987 Make edge redirection.
989 2018-06-29 David Malcolm <dmalcolm@redhat.com>
991 * dumpfile.c (dump_loc): Add indentation based on scope depth.
992 (dump_scope_depth): New variable.
993 (get_dump_scope_depth): New function.
994 (dump_begin_scope): New function.
995 (dump_end_scope): New function.
996 * dumpfile.h (get_dump_scope_depth): New declaration.
997 (dump_begin_scope): New declaration.
998 (dump_end_scope): New declaration.
999 (class auto_dump_scope): New class.
1000 (AUTO_DUMP_SCOPE): New macro.
1001 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
1004 2018-06-29 Richard Biener <rguenther@suse.de>
1006 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
1007 compute_all_dependences succeeds.
1008 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
1009 exceed --param loop-max-datarefs-for-datadeps.
1011 2018-06-29 Jakub Jelinek <jakub@redhat.com>
1013 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
1015 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
1018 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
1019 alternative 0 in preferred_for_speed attribute.
1021 2018-06-28 Paul Koning <ni1d@arrl.net>
1023 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
1024 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
1025 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
1026 * config/pdp11/pdp11.md: Correct "length" attribute calculation
1027 for shift insn patterns.
1029 2018-06-28 David Malcolm <dmalcolm@redhat.com>
1031 * cgraph.c (cgraph_node::get_body): Replace assignments to
1032 "dump_file" with calls to set_dump_file.
1033 * dumpfile.c (alt_dump_file): Make static, and group with...
1034 (alt_flags): ...this definition.
1035 (dumps_are_enabled): New variable.
1036 (refresh_dumps_are_enabled): New function.
1037 (set_dump_file): New function.
1038 (set_alt_dump_file): New function.
1039 (gcc::dump_manager::dump_start): Replace assignments to
1040 "dump_file" and "alt_dump_file" with calls to set_dump_file and
1042 (gcc::dump_manager::dump_finish): Likewise.
1043 * dumpfile.h (alt_dump_file): Delete decl.
1044 (dumps_are_enabled): New variable decl.
1045 (set_dump_file): New function decl.
1046 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
1048 * tree-nested.c (lower_nested_functions): Replace assignments to
1049 "dump_file" with calls to set_dump_file.
1051 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
1053 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
1054 goto_locus of each outgoing edge of each basic block.
1056 2018-06-28 Richard Biener <rguenther@suse.de>
1058 * dwarf2out.c (decl_scope_table): Remove.
1059 (push_decl_scope): Likewise.
1060 (pop_decl_scope): Likewise.
1061 (gen_type_die_for_member): Do not call push/pop_decl_scope.
1062 (gen_struct_or_union_type_die): Likewise.
1063 (gen_tagged_type_die): Likewise.
1064 (dwarf2out_init): Do not initialize decl_scope_table.
1065 (dwarf2out_c_finalize): Do not free it.
1067 2018-06-28 Richard Biener <rguenther@suse.de>
1069 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
1070 deciding whether to not re-use a DIE.
1072 2018-06-28 Richard Biener <rguenther@suse.de>
1074 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
1075 DW_AT_abstract_origin attribute.
1077 2018-06-28 Martin Liska <mliska@suse.cz>
1079 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
1080 Use newly introduced constants.
1081 * tree-switch-conversion.h (struct jump_table_cluster):
1082 Define max_ratio_for_size and max_ratio_for_speed.
1084 2018-06-28 Martin Liska <mliska@suse.cz>
1086 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1087 Add new checking assert to catch invalid state.
1088 (jump_table_cluster::can_be_handled): Handle single case
1090 (jump_table_cluster::is_beneficial): Bail out for such case.
1091 (bit_test_cluster::find_bit_tests):
1092 Add new checking assert to catch invalid state.
1093 (bit_test_cluster::can_be_handled): Handle single case
1095 (bit_test_cluster::is_beneficial): Bail out for such case.
1096 (switch_decision_tree::analyze_switch_statement):
1099 2018-06-28 Martin Liska <mliska@suse.cz>
1101 * common.opt: Introduce -completion option.
1102 * gcc.c (driver_handle_option): Handle it.
1103 (driver::main): Print completions if completion
1105 * opt-suggestions.c (option_proposer::get_completions):
1107 (option_proposer::suggest_completion): Likewise.
1108 (option_proposer::find_param_completions): Likewise.
1109 (verify_autocompletions): Likewise.
1110 (test_completion_valid_options): Likewise.
1111 (test_completion_valid_params): Likewise.
1112 (in_completion_p): Likewise.
1113 (empty_completion_p): Likewise.
1114 (test_completion_partial_match): Likewise.
1115 (test_completion_garbage): Likewise.
1116 (opt_proposer_c_tests): Likewise.
1117 * opt-suggestions.h: Declare new functions.
1118 * opts.c (common_handle_option): Handle OPT__completion_.
1119 * selftest-run-tests.c (selftest::run_tests): Add
1120 opt_proposer_c_tests.
1121 * selftest.c (assert_str_startswith): New.
1122 * selftest.h (assert_str_startswith): Likewise.
1123 (opt_proposer_c_tests): New.
1124 (ASSERT_STR_STARTSWITH): Likewise.
1126 2018-06-28 Martin Liska <mliska@suse.cz>
1128 * Makefile.in: Add opt-suggestions.o.
1129 * gcc-main.c: Include opt-suggestions.h.
1130 * gcc.c (driver::driver): Likewise.
1131 (driver::~driver): Remove m_option_suggestions.
1132 (driver::build_option_suggestions): Moved to option_proposer.
1133 (driver::suggest_option): Likewise.
1134 (driver::handle_unrecognized_options): Use option_proposer.
1135 * gcc.h (class driver): Add new memver m_option_proposer.
1136 * opt-suggestions.c: New file.
1137 * opt-suggestions.h: New file.
1139 2018-06-28 Martin Liska <mliska@suse.cz>
1141 * vec.h (class auto_string_vec): New (moved from auto_argvec).
1142 (auto_string_vec::~auto_string_vec): Likewise.
1144 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
1146 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
1147 prevent_decl_creation_for_types fields up and add reset_location field.
1148 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
1149 statement if id->reset_location is true.
1150 (copy_edges_for_bb): Do not set goto_locus on the new edges if
1151 id->reset_location is true.
1152 (copy_phis_for_bb): Force input_location on the arguments if
1153 id->reset_location is true.
1154 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
1155 is set on the function to be inlined.
1157 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
1159 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
1161 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
1163 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
1164 registers for Pmode.
1165 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
1166 hard registers for the clobbered pseudo.
1168 2018-06-27 Paul Koning <ni1d@arrl.net>
1170 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1171 mutually exclusive options.
1172 * config/pdp11/constraints.md (h): New constraint.
1173 (O): Update definition to match shift code generation.
1174 (D): New constraint.
1175 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
1177 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
1179 (output_jump): Change arguments.
1180 (pdp11_fixed_cc_regs): New function.
1181 (pdp11_cc_mode): Ditto.
1182 (pdp11_expand_shift): Ditto.
1183 (pdp11_assemble_shift): Ditto.
1184 (pdp11_small_shift): Ditto.
1185 (pdp11_branch_cost): Remove.
1186 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
1188 (pdp11_register_move_cost): Update for CC registers.
1189 (pdp11_rtx_costs): Add case for LSHIFTRT.
1190 (pdp11_output_jump): Add CCNZ mode conditional branches.
1191 (notice_update_cc_on_set): Remove.
1192 (pdp11_cc_mode): New function.
1193 (simple_memory_operand): Correct pre/post decrement case.
1194 (no_side_effect_operand): New function.
1195 (pdp11_regno_reg_class): Add CC_REGS class.
1196 (pdp11_fixed_cc_regs): New function.
1197 (pdp11_small_shift): New function.
1198 (pdp11_expand_shift): New function to expand shift insns.
1199 (pdp11_assemble_shift): New function to output shifts.
1200 (pdp11_branch_cost): Remove.
1201 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
1202 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
1203 (WCHAR_TYPE): Ditto.
1204 (PTRDIFF_TYPE): Ditto.
1205 (ADJUST_INSN_LENGTH): New macro.
1206 (FIXED_REGISTERS): Add CC registers.
1207 (CALL_USED_REGISTERS): Ditto.
1209 (REG_CLASS_NAMES): Ditto.
1210 (REG_CLASS_CONTENTS): Ditto.
1211 (SELECT_CC_MODE): Use new function.
1212 (TARGET_FLAGS_REGNUM): New macro.
1213 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
1214 (cc0_reg_rtx): Remove.
1215 (CC_STATUS_MDEP): Remove.
1216 (CC_STATUS_MDEFP_INIT): Remove.
1217 (CC_IN_FPU): Remove.
1218 (NOTICE_UPDATE_CC): Remove.
1219 (REGISTER_NAMES): Add CC registers.
1220 (BRANCH_COST): Change to constant 1.
1221 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
1223 * config/pdp11/pdp11.opt (mbcopy): Remove.
1224 (mbcopy-builtin): Remove.
1225 (mbranch-cheap): Remove.
1226 (mbranch-expensive): Remove.
1227 * config/pdp11/predicates.md (expand_shift_operand): Update to
1228 match shift code generation.
1229 (ccnz_operator): New predicate.
1230 * doc/invoke.texi (PDP-11 Options): Remove deleted options
1231 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
1232 Remove non-existent option -mabshi, -mno-abshi. Document mutually
1234 * doc/md.texi (PDP-11): Document new D and h constraints. Update
1235 description of O constraint.
1237 2018-06-27 Jeff Law <law@redhat.com>
1238 Austin Law <austinklaw@gmail.com>
1240 * config/v850/v850.md (addsi3_set_flags): New pattern.
1241 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
1242 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
1243 (zero_extendhisi2_v850_set_flags): Likewise.
1244 (zero_extendqisi2_v850_set_flags): Likewise.
1245 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
1246 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
1247 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
1249 * config/v850/v850-protos.h (notice_update_cc): Remove.
1250 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
1251 (v850_print_operand): Handle 'D' and "d".
1252 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
1253 Add handling of arithmetic/logical operations compared against zero.
1254 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
1255 Do not look at v850_compare_op, instead get mode from last argument.
1256 (v850_gen_compare): Remove
1257 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
1258 after reload for prologue insns.
1259 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
1261 (construct_save_jarl): Likewise.
1262 (TARGET_FLAGS_REGNUM): Define.
1263 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
1264 (NOTICE_UPDATE_CC): Remove.
1265 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
1266 than cc0. Conditionalize on reload_completed.
1267 (cmpsi_insn, setfcc_insn): Likewise.
1268 (tst1 splitter): Turn into define_and_split which sets the flags
1270 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
1271 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
1272 (cstoresf4, cstoredf4): Clobber the flags.
1273 (cmpsi, cmpsf, cmpdf): Remove expanders.
1274 (setf_insn): Remove pattern.
1275 (addsi3): Turn into define_and_split which clobbers the flags after
1276 reload and a suitable pattern (addsi3_clobber_flags) for use after
1278 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
1279 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
1280 (ashrsi3, ashrsi3_v850e2): Likewise.
1281 (bins): Clobber the flags.
1282 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
1283 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
1284 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
1285 (call_value_internal_short, call_value_internal_long): Likewise.
1286 (callt_save_interrupt, callt_return_interrupt): Likewise.
1287 (save_interrupt, return_interrupt): Likewise.
1288 (callt_save_all_interrupt, save_all_interrupt): Likewise.
1289 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
1290 (restore_all_interrupt, _restore_all_interrupt): Likewise.
1291 (All FP comparisons): Only allow after reload has completed.
1293 (divh, divhu): Tweak output template.
1294 (branch_z_normal, branch_z_invert): Remove
1295 (branch_nz_normal, branch_nz_invert): Likewise.
1296 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
1298 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
1299 * config/v850/v850.c (notice_update_cc): Remove.
1300 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
1301 (CC_NO_CARRY): Likewise.
1302 (NOTICE_UPDATE_CC): Define to nothing.
1303 * config/v850/v850.md: Remove block comment on cc0 handling
1304 Remove "cc" attribute from all patterns. Remove cc_status handling
1305 from all patterns. Minor formatting fixes.
1307 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1309 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
1310 (cortex-a76.cortex-a55): Likewise.
1311 * config/aarch64/aarch64-tune.md: Regenerate.
1312 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
1313 cortex-a76.cortex-a55.
1315 2018-06-27 Jeff Law <law@redhat.com>
1317 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
1318 (MULTILIB_DIRNAMES): Similarly.
1320 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
1322 * gimple.h (gimple_return_retbnd): Delete.
1323 (gimple_return_set_retbnd): Likewise.
1324 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
1325 gimple_return_set_retbnd.
1326 * gimple-pretty-print.c (dump_gimple_return): Remove call to
1327 gimple_return_retbnd and adjust.
1328 * tree-inline.h (struct copy_body_data): Remove retbnd field.
1329 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
1330 Explicitly return NULL in a couple more cases. Move assertion
1331 on debug statements and remove unreachable code.
1332 (reset_debug_binding): Do not test id->retbnd.
1333 (expand_call_inline): Do not set it.
1335 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1337 * configure.ac: Add --disable-gcov option.
1338 * configure: Regenerate.
1339 * Makefile.in: Honour @enable_gcov@.
1340 * doc/install.texi: Document --disable-gcov.
1342 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1344 * config/arm/arm-cpus.in (cortex-a76): New entry.
1345 (cortex-a76.cortex-a55): Likewise.
1346 * config/arm/arm-tables.opt: Regenerate.
1347 * config/arm/arm-tune.md: Likewise.
1348 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
1349 * doc/invoke.texi (ARM Options): Document cortex-a76 and
1350 cortex-a76.cortex-a55.
1352 2018-06-27 Tamar Christina <tamar.christina@arm.com>
1355 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
1357 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
1359 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
1361 (EPILOGUE_USES): Likewise.
1363 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
1365 * tree-inline.c (remap_location): New function extracted from...
1366 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
1367 (copy_phis_for_bb): ...here. Call remap_location.
1368 (copy_cfg_body): Adjust call to copy_edges_for_bb.
1370 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
1372 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
1373 unaligned vsx for 16B memset.
1375 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
1378 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
1379 ieee128_float_type_node to long_double_type_node unless
1380 TARGET_LONG_DOUBLE_128 is set.
1382 2018-06-26 David Malcolm <dmalcolm@redhat.com>
1384 * cfgloop.c (get_loop_location): Convert return type from
1385 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
1386 by implicit construction from rtx_insn *, and using
1387 dump_user_location_t::from_function_decl for the fallback case.
1388 * cfgloop.h (get_loop_location): Convert return type from
1389 location_t to dump_user_location_t.
1390 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
1391 dump_printf_loc to pass in a dump_location_t rather than a
1392 location_t, via the gimple stmt.
1393 * coverage.c (get_coverage_counts): Update calls to
1394 dump_printf_loc to pass in dump_location_t rather than a
1396 * doc/optinfo.texi (Dump types): Convert example of
1397 dump_printf_loc from taking "locus" to taking "insn". Update
1398 description of the "_loc" calls to cover dump_location_t.
1399 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
1401 (dump_user_location_t::dump_user_location_t): New constructors,
1402 from gimple *stmt and rtx_insn *.
1403 (dump_user_location_t::from_function_decl): New function.
1404 (dump_loc): Make static.
1405 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
1406 const dump_location_t &.
1407 (dump_generic_expr_loc): Delete.
1408 (dump_printf_loc): Convert param "loc" from location_t to
1409 const dump_location_t &.
1410 (selftest::test_impl_location): New function.
1411 (selftest::dumpfile_c_tests): New function.
1412 * dumpfile.h: Include "profile-count.h".
1413 (class dump_user_location_t): New class.
1414 (struct dump_impl_location_t): New struct.
1415 (class dump_location_t): New class.
1416 (dump_printf_loc): Convert 2nd param from source_location to
1417 const dump_location_t &.
1418 (dump_generic_expr_loc): Delete.
1419 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
1420 const dump_location_t &.
1421 * gimple-fold.c (fold_gimple_assign): Update call to
1422 dump_printf_loc to pass in a dump_location_t rather than a
1423 location_t, via the gimple stmt.
1424 (gimple_fold_call): Likewise.
1425 * gimple-loop-interchange.cc
1426 (loop_cand::analyze_iloop_reduction_var): Update for change to
1427 check_reduction_path.
1428 (tree_loop_interchange::interchange): Update for change to
1430 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
1431 change in return-type of find_loop_location.
1432 (graphite_regenerate_ast_isl): Likewise.
1433 * graphite-optimize-isl.c (optimize_isl): Likewise.
1434 * graphite.c (graphite_transform_loops): Likewise.
1435 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
1436 pass in a dump_location_t rather than a location_t, via the
1438 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1439 * ipa.c (walk_polymorphic_call_targets): Likewise.
1440 * loop-unroll.c (report_unroll): Convert "locus" param from
1441 location_t to dump_location_t.
1442 (decide_unrolling): Update for change to get_loop_location's
1444 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
1445 location_t to dump_user_location_t.
1446 (grid_find_single_omp_among_assignments_1): Updates calls to
1447 dump_printf_loc to pass in a dump_location_t rather than a
1448 location_t, via the gimple stmt.
1449 (grid_parallel_clauses_gridifiable): Convert "tloc" from
1450 location_t to dump_location_t. Updates calls to dump_printf_loc
1451 to pass in a dump_location_t rather than a location_t, via the
1453 (grid_inner_loop_gridifiable_p): Likewise.
1454 (grid_dist_follows_simple_pattern): Likewise.
1455 (grid_gfor_follows_tiling_pattern): Likewise.
1456 (grid_target_follows_gridifiable_pattern): Likewise.
1457 (grid_attempt_target_gridification): Convert initialization
1458 of local "grid" from memset to zero-initialization; FIXME: does
1459 this require C++11? Update call to dump_printf_loc to pass in a
1460 optinfo_location rather than a location_t, via the gimple stmt.
1461 * profile.c (read_profile_edge_counts): Updates call to
1462 dump_printf_loc to pass in a dump_location_t rather than a
1464 (compute_branch_probabilities): Likewise.
1465 * selftest-run-tests.c (selftest::run_tests): Call
1467 * selftest.h (dumpfile_c_tests): New decl.
1468 * tree-loop-distribution.c (pass_loop_distribution::execute):
1469 Update for change in return type of find_loop_location.
1470 * tree-parloops.c (parallelize_loops): Likewise.
1471 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
1472 "locus" from location_t to dump_user_location_t.
1473 (canonicalize_loop_induction_variables): Likewise.
1474 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
1475 for change in return type of find_loop_location.
1476 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
1477 to dump_printf_loc to pass in a dump_location_t rather than a
1478 location_t, via the stmt.
1479 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
1481 * tree-vect-loop-manip.c (find_loop_location): Convert return
1482 type from source_location to dump_user_location_t.
1483 (vect_do_peeling): Update for above change.
1484 (vect_loop_versioning): Update for change in type of
1486 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
1487 from location_t to dump_user_location_t.
1488 (vect_estimate_min_profitable_iters): Update for change in type
1490 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
1491 location_t to dump_location_t.
1492 (vect_slp_bb): Update for change in type of vect_location.
1493 * tree-vectorizer.c (vect_location): Convert from source_location
1494 to dump_user_location_t.
1495 (try_vectorize_loop_1): Update for change in vect_location's type.
1496 (vectorize_loops): Likewise.
1497 (increase_alignment): Likewise.
1498 * tree-vectorizer.h (vect_location): Convert from source_location
1499 to dump_user_location_t.
1500 (find_loop_location): Convert return type from source_location to
1501 dump_user_location_t.
1502 (check_reduction_path): Convert 1st param from location_t to
1503 dump_user_location_t.
1504 * value-prof.c (check_counter): Update call to dump_printf_loc to
1505 pass in a dump_user_location_t rather than a location_t; update
1506 call to error_at for change in type of "locus".
1507 (check_ic_target): Update call to dump_printf_loc to
1508 pass in a dump_user_location_t rather than a location_t, via the
1511 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
1513 * config/s390/s390.h (enum processor_flags): Do not use
1514 default tune parameter when -march was specified.
1516 2018-06-26 Jakub Jelinek <jakub@redhat.com>
1519 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
1520 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
1523 2018-06-26 Richard Biener <rguenther@suse.de>
1525 PR tree-optimization/86287
1527 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
1528 (vect_analyze_loop): Initialize n_stmts.
1530 2018-06-26 Richard Biener <rguenther@suse.de>
1533 * fold-const.c (fold_convertible_p): Pointer extension
1536 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
1539 * dwarf2out.c (loc_list_has_views): Adjust comments.
1540 (dw_loc_list): Split single cross-partition range with
1543 2018-06-25 Jeff Law <law@redhat.com>
1545 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
1546 on -mbig-switch by default.
1548 * config/v850/predicates.md (const_float_1_operand): Fix match_code
1550 (const_float_0_operand): Remove unused predicate.
1551 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
1552 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
1553 (recipsf2): New expander. Original pattern now called
1555 (recipdf2, recipdf2_insn): Similarly.
1556 (rsqrtsf2, rsqrtsf2_insn): Similarly
1557 (rsqrtdf2, rsqrtdf2_insn): Similarly
1559 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
1561 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
1562 Simplify logic for FreeBSD (twice).
1564 2018-06-25 Martin Sebor <msebor@redhat.com>
1566 PR tree-optimization/86204
1567 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
1568 a strnlen result if it's less than the length of the string.
1570 2018-06-25 Martin Sebor <msebor@redhat.com>
1572 PR tree-optimization/85700
1573 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
1574 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
1575 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
1577 2018-06-25 Martin Sebor <msebor@redhat.com>
1579 * doc/extend.texi (Zero-length arrays): Update and clarify.
1581 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
1583 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
1584 added IEEE/IBM long double multilib support on PowerPC little
1585 endian Linux systems.
1586 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
1587 (MULTILIB_DEFAULTS): Likewise.
1588 * config/rs6000/rs6000.c (rs6000_option_override_internal):
1590 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
1591 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
1592 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
1594 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
1597 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
1598 (REORDER_45): Likewise.
1600 2018-06-25 Jeff Law <law@redhat.com>
1602 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
1603 dividend to 32 bits. Adjust length.
1604 (udivmodhi4): Cleanup output template. Fix length.
1606 2018-06-25 Carl Love <cel@us.ibm.com>
1608 * config/rs6000/vsx.md: Change word selector to prefered location.
1610 2018-06-25 Richard Biener <rguenther@suse.de>
1612 PR tree-optimization/86304
1613 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
1614 epilogue-if-converted loops as well.
1616 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
1618 * lto-section-out.c (lto_begin_section): Do not print section
1619 name for noaddr and unnumbered dumps.
1621 2018-06-25 Richard Biener <rguenther@suse.de>
1623 * tree-vectorizer.h (struct vec_info_shared): New structure
1624 with parts split out from struct vec_info and loop_nest from
1625 struct _loop_vec_info.
1626 (struct vec_info): Adjust accordingly.
1627 (struct _loop_vec_info): Likewise.
1628 (LOOP_VINFO_LOOP_NEST): Adjust.
1629 (LOOP_VINFO_DATAREFS): Likewise.
1630 (LOOP_VINFO_DDRS): Likewise.
1631 (struct _bb_vec_info): Likewise.
1632 (BB_VINFO_DATAREFS): Likewise.
1633 (BB_VINFO_DDRS): Likewise.
1634 (struct _stmt_vec_info): Add dr_aux member.
1635 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
1636 (DR_MISALIGNMENT_UNINITIALIZED): New.
1637 (set_dr_misalignment): Adjust.
1638 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
1639 (vect_analyze_loop): Adjust prototype.
1640 (vect_analyze_loop_form): Likewise.
1641 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
1642 Compute dependences lazily.
1643 (vect_record_base_alignments): Use shared datarefs/ddrs.
1644 (vect_verify_datarefs_alignment): Likewise.
1645 (vect_analyze_data_refs_alignment): Likewise.
1646 (vect_analyze_data_ref_accesses): Likewise.
1647 (vect_analyze_data_refs): Likewise.
1648 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
1649 constructor parameter for shared part.
1650 (vect_analyze_loop_form): Pass in shared part and adjust.
1651 (vect_analyze_loop_2): Pass in storage for the number of
1652 stmts. Move loop nest finding to the caller. Compute
1654 (vect_analyze_loop): Pass in shared part.
1655 (vect_transform_loop): Verify shared datarefs are unchanged.
1656 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
1657 constructor parameter for shared part.
1658 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
1659 (vect_slp_bb): Verify shared datarefs are unchanged before
1661 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
1663 (new_stmt_vec_info): Initialize DR_AUX misalignment to
1664 DR_MISALIGNMENT_UNINITIALIZED.
1665 * tree-vectorizer.c (vec_info::vec_info): Add constructor
1666 parameter for shared part.
1667 (vec_info::~vec_info): Adjust.
1668 (vec_info_shared::vec_info_shared): New.
1669 (vec_info_shared::~vec_info_shared): Likewise.
1670 (vec_info_shared::save_datarefs): Likewise.
1671 (vec_info_shared::check_datarefs): Likewise.
1672 (try_vectorize_loop_1): Construct shared part live for analyses
1673 of a single loop for multiple vector sizes.
1674 * tree-parloops.c (gather_scalar_reductions): Adjust.
1676 2018-06-25 Richard Biener <rguenther@suse.de>
1678 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
1679 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
1680 (vect_analyze_data_refs): Remove similar code from here and
1681 simplify accordingly.
1683 2018-06-25 Richard Biener <rguenther@suse.de>
1685 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
1686 for reverse storage order accesses rather than asserting
1687 they cannot happen here.
1689 2018-06-25 Tom de Vries <tdevries@suse.de>
1692 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
1693 Use data16 instead of .byte for insn prefix.
1695 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
1698 * parser.c (make_char_string_pack): Pass this literal chars
1699 through cpp_interpret_string.
1700 (cp_parser_userdef_numeric_literal): Check the result of
1701 make_char_string_pack.
1703 2018-06-24 Maya Rashish <coypu@sdf.org>
1705 * ginclude/stddef.h: Simplify conditions around avoiding
1706 re-definition of __size_t.
1708 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
1710 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
1711 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
1713 2018-06-22 Maya Rashish <coypu@sdf.org>
1715 * doc/invoke.texi (mno-fancy-math-387): Update for changes
1716 made to OpenBSD and NetBSD through the years.
1718 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
1720 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
1721 behavior of vec_pack (vector double, vector double) to match
1722 behavior of vec_float2 (vector double, vector double).
1724 2018-06-22 Olivier Hainque <hainque@adacore.com>
1726 * gimplify.c (gimplify_function_tree): Prevent creation
1727 of a trampoline for the address of the current function
1728 passed to entry/exit instrumentation hooks.
1730 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
1733 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
1736 2018-06-22 Martin Liska <mliska@suse.cz>
1738 PR tree-optimization/86263
1739 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1740 Bail out if is_enabled is false.
1741 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
1743 (jump_table_cluster::is_enabled): New function.
1745 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
1747 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1748 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
1749 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
1750 (lto_input_ts_binfo_tree_pointers): Likewise.
1751 * tree-streamer-out.c (streamer_write_tree_bitfields,
1752 write_ts_binfo_tree_pointers): Likewise.
1753 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
1755 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
1757 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
1759 2018-06-22 Martin Liska <mliska@suse.cz>
1761 * symbol-summary.h (get): Make it pure and inline move
1762 functionality from ::get function.
1763 (get): Remove and inline into ::get and ::get_create.
1764 (get_create): Move code from ::get function.
1766 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1769 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
1770 -x assembler-with-cpp.
1772 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1774 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
1775 _FILE_OFFSET_BITS=64 for C++.
1777 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
1779 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
1780 conversion insn that shows up when pr85657-3.c is compiled using
1781 IEEE 128-bit long double.
1782 (neg<mode>2_internal): Use the correct mode to check whether the
1783 mode is IBM extended.
1784 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
1785 multiply and divide external functions from being created more
1788 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
1790 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
1792 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
1793 the edge can be forwarded.
1794 (cfg_layout_merge_blocks): Likewise.
1796 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
1798 * except.c (finish_eh_generation): Commit edge insertions only after
1799 the EH edges have been redirected from post-landing to landing pads.
1801 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
1803 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
1804 create_tmp_var_for to create the FRAME decl.
1805 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
1807 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
1809 * tree-inline.c (copy_edges_for_bb): Minor tweak.
1810 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
1811 debug statement when resetting its value.
1812 (expand_call_inline): Copy the locus of the call onto the assignment
1813 of the return value, if any. Use local variable in more cases.
1815 2018-06-21 Martin Liska <mliska@suse.cz>
1817 * ipa-pure-const.c (propagate_nothrow): Use
1818 funct_state_summaries->get.
1819 (dump_malloc_lattice): Likewise.
1820 (propagate_malloc): Likewise.
1822 2018-06-21 Richard Biener <rguenther@suse.de>
1824 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
1825 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
1826 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
1828 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
1829 BLOCK_ABSTRACT_ORIGIN unconditionally.
1831 2018-06-21 David Malcolm <dmalcolm@redhat.com>
1833 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
1835 * ipa-reference.c (ipa_reference_c_finalize): Delete
1836 ipa_ref_opt_sum_summaries and set it to NULL.
1838 2018-06-21 Tom de Vries <tdevries@suse.de>
1840 PR tree-optimization/85859
1841 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
1842 test with comment from bb_no_side_effects_p.
1844 2018-06-21 Richard Biener <rguenther@suse.de>
1846 PR tree-optimization/86232
1847 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
1848 max for constant niter.
1850 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1852 * config/aarch64/aarch64-simd.md
1853 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
1855 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1857 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
1858 Make opernads of the unspec commutative.
1860 2018-06-21 Richard Biener <rguenther@suse.de>
1862 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
1863 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
1864 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
1865 (vect_analyze_data_ref_dependence): Re-order checks to deal with
1867 (vect_record_base_alignments): Do not record base alignment
1868 for gathers or scatters.
1869 (vect_compute_data_ref_alignment): Drop return value that is always
1870 true. Bail out early for gathers or scatters.
1871 (vect_enhance_data_refs_alignment): Bail out early for gathers
1873 (vect_find_same_alignment_drs): Likewise.
1874 (vect_analyze_data_refs_alignment): Remove dead code.
1875 (vect_slp_analyze_and_verify_node_alignment): Likewise.
1876 (vect_analyze_data_refs): For possible gathers or scatters do
1877 not create an alternate DR, just check their possible validity
1878 and mark them. Adjust DECL_NONALIASED handling to not rely
1880 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
1881 update inits of gathers or scatters.
1882 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
1883 Also copy gather/scatter flag to pattern vinfo.
1885 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
1887 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
1888 behavior of vec_packsu (vector unsigned long long, vector unsigned
1889 long long) to match behavior of vec_packs with same signature.
1891 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1892 Thomas Schwinge <thomas@codesourcery.com>
1893 Cesar Philippidis <cesar@codesourcery.com>
1895 * gimplify.c (gimplify_scan_omp_clauses): Add support for
1896 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
1897 (gimplify_adjust_omp_clauses): Likewise.
1898 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
1899 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
1900 (gimplify_omp_target_update): Update handling of acc update and
1902 * omp-low.c (install_var_field): Remove unused parameter
1903 base_pointers_restrict.
1904 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
1905 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
1907 (omp_target_base_pointers_restrict_p): Delete.
1908 (scan_omp_target): Update call to scan_sharing_clauses.
1909 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
1911 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
1912 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
1913 (convert_local_omp_clauses): Likewise.
1914 * tree-pretty-print.c (dump_omp_clause): Likewise.
1915 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
1917 (omp_clause_code_name): Likewise.
1919 2018-06-20 Jakub Jelinek <jakub@redhat.com>
1922 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
1925 PR tree-optimization/86231
1926 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
1927 anti-range don't overwrite *vr0min before using it to compute *vr0max.
1929 2018-06-20 Tom de Vries <tdevries@suse.de>
1931 PR tree-optimization/86097
1932 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
1933 iv type if signedness of iv type is not the same as that of *nit.
1935 2018-06-20 Jakub Jelinek <jakub@redhat.com>
1937 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
1938 EDGE_EH edges, verify they are all EDGE_EH.
1940 2018-06-20 Maya Rashish <coypu@sdf.org>
1942 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
1944 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1946 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
1947 * config/aarch64/aarch64.c (xgene1_tunings): Add
1948 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
1949 (aarch64_mode_valid_for_sched_fusion_p):
1950 Allow 16-byte modes.
1951 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
1952 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
1954 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
1956 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
1957 * config/aarch64/iterators.md (VQ2): New mode iterator.
1959 2018-06-20 Martin Liska <mliska@suse.cz>
1961 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
1962 Change default ratio from 10 to 8.
1964 2018-06-20 Martin Liska <mliska@suse.cz>
1966 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1968 (bit_test_cluster::find_bit_tests): Likewise.
1969 (switch_decision_tree::analyze_switch_statement): Find clusters.
1970 * tree-switch-conversion.h (struct jump_table_cluster): Document
1973 2018-06-20 Martin Liska <mliska@suse.cz>
1975 * tree-switch-conversion.c (switch_conversion::collect):
1976 Record m_uniq property.
1977 (switch_conversion::expand): Bail out for special conditions.
1978 (group_cluster::~group_cluster): New.
1979 (group_cluster::group_cluster): Likewise.
1980 (group_cluster::dump): Likewise.
1981 (jump_table_cluster::emit): New.
1982 (switch_decision_tree::fix_phi_operands_for_edges): New.
1983 (struct case_node): Remove struct.
1984 (jump_table_cluster::can_be_handled): New.
1985 (case_values_threshold): Moved to header.
1986 (reset_out_edges_aux): Likewise.
1987 (jump_table_cluster::is_beneficial): New.
1988 (bit_test_cluster::can_be_handled): Likewise.
1989 (add_case_node): Remove.
1990 (bit_test_cluster::is_beneficial): New.
1991 (case_bit_test::cmp): New.
1992 (bit_test_cluster::emit): New.
1993 (expand_switch_as_decision_tree_p): Remove.
1994 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
1995 (fix_phi_operands_for_edge): Likewise.
1996 (switch_decision_tree::analyze_switch_statement): New.
1997 (compute_cases_per_edge): Move ...
1998 (switch_decision_tree::compute_cases_per_edge): ... here.
1999 (try_switch_expansion): Likewise.
2000 (switch_decision_tree::try_switch_expansion): Likewise.
2001 (record_phi_operand_mapping): Likewise.
2002 (switch_decision_tree::record_phi_operand_mapping): Likewise.
2003 (emit_case_decision_tree): Likewise.
2004 (switch_decision_tree::emit): Likewise.
2005 (balance_case_nodes): Likewise.
2006 (switch_decision_tree::balance_case_nodes): Likewise.
2007 (dump_case_nodes): Likewise.
2008 (switch_decision_tree::dump_case_nodes): Likewise.
2009 (emit_jump): Likewise.
2010 (switch_decision_tree::emit_jump): Likewise.
2011 (emit_cmp_and_jump_insns): Likewise.
2012 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
2013 (emit_case_nodes): Likewise.
2014 (switch_decision_tree::emit_case_nodes): Likewise.
2015 (conditional_probability): Remove.
2016 * tree-switch-conversion.h (enum cluster_type): New.
2018 (struct cluster): Likewise.
2019 (cluster::cluster): Likewise.
2020 (struct simple_cluster): Likewise.
2021 (simple_cluster::simple_cluster): Likewise.
2022 (struct group_cluster): Likewise.
2023 (struct jump_table_cluster): Likewise.
2024 (struct bit_test_cluster): Likewise.
2025 (struct min_cluster_item): Likewise.
2026 (struct case_tree_node): Likewise.
2027 (case_tree_node::case_tree_node): Likewise.
2028 (jump_table_cluster::case_values_threshold): Likewise.
2029 (struct case_bit_test): Likewise.
2030 (struct switch_decision_tree): Likewise.
2031 (struct switch_conversion): Likewise.
2032 (switch_decision_tree::reset_out_edges_aux): Likewise.
2034 2018-06-20 Martin Liska <mliska@suse.cz>
2036 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
2037 (hoist_edge_and_branch_if_true): Likewise.
2038 (expand_switch_using_bit_tests_p): Likewise.
2039 (struct case_bit_test): Likewise.
2040 (case_bit_test_cmp): Likewise.
2041 (emit_case_bit_tests): Likewise.
2042 (switch_conversion::switch_conversion): New class.
2043 (struct switch_conv_info): Remove old struct.
2044 (collect_switch_conv_info): More to ...
2045 (switch_conversion::collect): ... this.
2046 (check_range): Likewise.
2047 (switch_conversion::check_range): Likewise.
2048 (check_all_empty_except_final): Likewise.
2049 (switch_conversion::check_all_empty_except_final): Likewise.
2050 (check_final_bb): Likewise.
2051 (switch_conversion::check_final_bb): Likewise.
2052 (create_temp_arrays): Likewise.
2053 (switch_conversion::create_temp_arrays): Likewise.
2054 (free_temp_arrays): Likewise.
2055 (gather_default_values): Likewise.
2056 (switch_conversion::gather_default_values): Likewise.
2057 (build_constructors): Likewise.
2058 (switch_conversion::build_constructors): Likewise.
2059 (constructor_contains_same_values_p): Likewise.
2060 (switch_conversion::contains_same_values_p): Likewise.
2061 (array_value_type): Likewise.
2062 (switch_conversion::array_value_type): Likewise.
2063 (build_one_array): Likewise.
2064 (switch_conversion::build_one_array): Likewise.
2065 (build_arrays): Likewise.
2066 (switch_conversion::build_arrays): Likewise.
2067 (gen_def_assigns): Likewise.
2068 (switch_conversion::gen_def_assigns): Likewise.
2069 (prune_bbs): Likewise.
2070 (switch_conversion::prune_bbs): Likewise.
2071 (fix_phi_nodes): Likewise.
2072 (switch_conversion::fix_phi_nodes): Likewise.
2073 (gen_inbound_check): Likewise.
2074 (switch_conversion::gen_inbound_check): Likewise.
2075 (process_switch): Use the newly created class.
2076 (switch_conversion::expand): New.
2077 (switch_conversion::~switch_conversion): New.
2078 * tree-switch-conversion.h: New file.
2080 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2082 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
2083 tree-vect-patterns.c.
2084 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
2085 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
2086 (vect_recog_sad_pattern): Likewise.
2087 (vect_recog_widen_sum_pattern): Likewise.
2088 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
2089 (vect_recog_widen_shift_pattern): Remove the type_in argument.
2090 (vect_recog_rotate_pattern): Likewise.
2091 (vect_recog_mult_pattern): Likewise.
2092 (vect_recog_vector_vector_shift_pattern): Likewise.
2093 (vect_recog_divmod_pattern): Likewise.
2094 (vect_recog_mixed_size_cond_pattern): Likewise.
2095 (vect_recog_bool_pattern): Likewise.
2096 (vect_recog_mask_conversion_pattern): Likewise.
2097 (vect_try_gather_scatter_pattern): Likewise.
2098 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
2099 (vect_recog_over_widening_pattern): Likewise.
2100 (vect_recog_gather_scatter_pattern): Likewise.
2101 (vect_recog_func_ptr): Move from tree-vectorizer.h
2102 (vect_vect_recog_func_ptrs): Move further down the file.
2103 (vect_recog_func): Likewise. Remove the third argument.
2104 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
2105 (vect_pattern_recog_1): Expect the pattern function to do any
2106 necessary target tests. Also expect it to provide a vector type.
2107 Remove the type_in handling.
2109 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2111 * tree-vect-patterns.c (vect_pattern_detected): New function.
2112 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
2113 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
2114 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
2115 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
2116 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2117 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2118 (vect_recog_mask_conversion_pattern)
2119 (vect_try_gather_scatter_pattern): Likewise.
2121 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2123 * tree-vect-patterns.c (vect_get_internal_def): New function.
2124 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2125 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
2126 (search_type_for_mask_1): Use it.
2128 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2130 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2131 redundant WIDEN_SUM_EXPR handling.
2132 (vect_recog_sad_pattern): Likewise.
2134 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2136 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2137 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
2138 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
2139 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
2140 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
2142 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2144 * tree-vect-stmts.c (vectorizable_call): Make sure that we
2145 use the stmt_vec_info of the original bb statement for the
2146 new zero assignment, even if the call is part of a pattern.
2148 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2150 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
2151 that the sequence is attached to the original statement rather
2152 than the pattern statement.
2153 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
2154 PATTERN_DEF_SEQ from the original statement rather than
2155 the main pattern statement.
2156 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
2157 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
2158 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
2160 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2162 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
2163 definition statements before the early exit for statements that aren't
2165 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
2167 (vect_transform_loop): ...here. Process pattern definition
2168 statements without first checking whether the main pattern
2169 statement is live or relevant.
2171 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
2173 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
2174 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
2176 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
2178 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
2179 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
2180 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
2181 (expand_block_compare): Change select_block_compare_mode call.
2182 (expand_strncmp_align_check): Use new functions, fix comment.
2183 (emit_final_str_compare_gpr): New function.
2184 (expand_strn_compare): Refactor and clean up code.
2185 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
2187 2018-06-19 Tony Reix <tony.reix@atos.com>
2188 Damien Bergamini <damien.bergamini@atos.com>
2189 David Edelsohn <dje.gcc@gmail.com>
2191 * collect2.c (static_obj): New variable.
2192 (static_libs): New variable.
2193 (is_in_list): Uncomment declaration.
2194 (main): Track AIX libraries linked statically.
2195 (is_in_list): Uncomment definition.
2196 (scan_prog_file): Don't add AIX shared libraries initializer
2197 to constructor list if linking statically.
2199 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
2201 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
2203 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
2205 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
2207 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
2210 2018-06-19 Martin Liska <mliska@suse.cz>
2212 * config/i386/i386.c (ix86_can_inline_p): Do not use
2213 ipa_fn_summaries::get_create.
2214 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
2216 (devirtualization_time_bonus): Likewise.
2217 (ipcp_propagate_stage): Likewise.
2218 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
2219 (edge_set_predicate): Likewise.
2220 (evaluate_conditions_for_known_args): Likewise.
2221 (evaluate_properties_for_edge): Likewise.
2222 (ipa_call_summary::reset): Tranform to ...
2223 (ipa_call_summary::~ipa_call_summary): ... this.
2224 (ipa_fn_summary::reset): Transform to ...
2225 (ipa_fn_summary::~ipa_fn_summary): ... this.
2226 (ipa_fn_summary_t::remove): Rename to ...
2227 (ipa_fn_summary_t::remove_callees): ... this.
2228 (ipa_fn_summary_t::duplicate): Use placement new
2229 instead of memory copy.
2230 (ipa_call_summary_t::duplicate): Likewise.
2231 (ipa_call_summary_t::remove): Remove.
2232 (dump_ipa_call_summary): Change get_create to get.
2233 (ipa_dump_fn_summary): Dump only when summary exists.
2234 (analyze_function_body): Use symbol_summary::get instead
2236 (compute_fn_summary): Likewise.
2237 (estimate_edge_devirt_benefit): Likewise.
2238 (estimate_edge_size_and_time): Likewise.
2239 (inline_update_callee_summaries): Likewise.
2240 (remap_edge_change_prob): Likewise.
2241 (remap_edge_summaries): Likewise.
2242 (ipa_merge_fn_summary_after_inlining): Likewise.
2243 (write_ipa_call_summary): Likewise.
2244 (ipa_fn_summary_write): Likewise.
2245 (ipa_free_fn_summary): Likewise.
2246 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
2247 (struct ipa_call_summary): Likewise.
2248 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
2250 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
2251 (estimate_size_after_inlining): Likewise.
2252 (estimate_growth): Likewise.
2253 (growth_likely_positive): Likewise.
2254 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
2255 (inline_call): Likewise.
2256 * ipa-inline.c (caller_growth_limits): Likewise.
2257 (can_inline_edge_p): Likewise.
2258 (can_inline_edge_by_limits_p): Likewise.
2259 (compute_uninlined_call_time): Likewise.
2260 (compute_inlined_call_time): Likewise.
2261 (want_inline_small_function_p): Likewise.
2262 (edge_badness): Likewise.
2263 (update_caller_keys): Likewise.
2264 (update_callee_keys): Likewise.
2265 (inline_small_functions): Likewise.
2266 (inline_to_all_callers_1): Likewise.
2267 (dump_overall_stats): Likewise.
2268 (early_inline_small_functions): Likewise.
2269 (early_inliner): Likewise.
2270 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
2271 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2272 * ipa-pure-const.c (malloc_candidate_p): Likewise.
2273 * ipa-split.c (execute_split_functions): Likewise.
2274 * symbol-summary.h: Likewise.
2275 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2277 2018-06-19 Richard Biener <rguenther@suse.de>
2279 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
2280 (vectorize_loops): ... here. Fix dbgcnt handling.
2281 (try_vectorize_loop): Wrap try_vectorize_loop_1.
2283 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
2286 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
2287 ieee128 argument takes up only one (vector) register, not two (floating
2290 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
2292 * gimplify.c (gimplify_init_constructor): Really never clear for an
2293 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
2295 2018-06-19 Richard Biener <rguenther@suse.de>
2297 PR tree-optimization/86179
2298 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
2299 after failed recognition.
2301 2018-06-18 Martin Sebor <msebor@redhat.com>
2304 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
2305 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
2306 Handle integer subtraction.
2307 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
2308 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
2310 2018-06-18 David Malcolm <dmalcolm@redhat.com>
2312 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
2313 param from rtx to rtx_insn *.
2314 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
2316 (frv_ifcvt_modify_insn): Likwise.
2317 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
2318 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
2319 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
2320 as_a <rtx_insn *> cast to local "unprotected_region" once
2321 it's been established that it's not NULL or pc_rtx.
2322 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
2323 param "sethi" from rtx to rtx_insn *.
2324 (nds32_group_float_insns): Likewise for param "insn".
2325 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
2327 (vax_output_int_subtract): Likewise.
2328 * config/vax/vax.c (vax_output_int_add): Likewise for param
2330 (vax_output_int_subtract): Likewise.
2331 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
2332 (emit_pattern_after): Likewise for param "after".
2333 (emit_insn_after): Likewise.
2334 (emit_jump_insn_after): Likewise.
2335 (emit_call_insn_after): Likewise.
2336 (emit_debug_insn_after): Likewise.
2337 (emit_pattern_before): Likewise for param "before".
2338 (emit_insn_before): Likewise.
2339 (emit_jump_insn_before): Likewise.
2340 * final.c (get_insn_template): Likewise for param "insn", removing
2342 * output.h (get_insn_template): Likewise for 2nd param.
2343 * rtl.h (emit_insn_before): Likewise.
2344 (emit_jump_insn_before): Likewise.
2345 (emit_debug_insn_before_noloc): Likewise.
2346 (emit_insn_after): Likewise.
2347 (emit_jump_insn_after): Likewise.
2348 (emit_call_insn_after): Likewise.
2349 (emit_debug_insn_after): Likewise.
2350 (set_insn_deleted): Likewise for param.
2352 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
2355 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
2356 floating point modes, so that IFmode is numerically greater than
2357 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
2358 to declare the ordering. This prevents IFmode from being
2359 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
2360 machine. Include rs6000-modes.h to share the fractional values
2361 between genmodes* and the rest of the compiler.
2365 * config/rs6000/rs6000-modes.h: New file.
2366 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
2367 meaning of rs6000_long_double_size so that 126..128 selects an
2368 appropriate 128-bit floating point type.
2369 (rs6000_option_override_internal): Likewise.
2370 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
2371 (TARGET_LONG_DOUBLE_128): Change the meaning of
2372 rs6000_long_double_size so that 126..128 selects an appropriate
2373 128-bit floating point type.
2374 (LONG_DOUBLE_TYPE_SIZE): Update comment.
2375 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
2376 source and destination to match the standard usage.
2377 (truncifkf2): Likewise.
2378 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
2379 ISA 2.07 to use an explicit clobber, instead of passing in a
2381 (copysign<mode>3_soft): Likewise.
2383 2018-06-18 David Malcolm <dmalcolm@redhat.com>
2385 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2386 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
2387 (vect_slp_analyze_instance_dependence): Likewise.
2388 (vect_enhance_data_refs_alignment): Likewise.
2389 (vect_analyze_data_refs_alignment): Likewise.
2390 (vect_slp_analyze_and_verify_instance_alignment
2391 (vect_analyze_data_ref_accesses): Likewise.
2392 (vect_prune_runtime_alias_test_list): Likewise.
2393 (vect_analyze_data_refs): Likewise.
2394 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
2395 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
2396 (vect_analyze_scalar_cycles_1): Likewise.
2397 (vect_get_loop_niters): Likewise.
2398 (vect_analyze_loop_form_1): Likewise.
2399 (vect_update_vf_for_slp): Likewise.
2400 (vect_analyze_loop_operations): Likewise.
2401 (vect_analyze_loop): Likewise.
2402 (vectorizable_induction): Likewise.
2403 (vect_transform_loop): Likewise.
2404 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
2405 * tree-vect-slp.c (vect_analyze_slp): Likewise.
2406 (vect_make_slp_decision): Likewise.
2407 (vect_detect_hybrid_slp): Likewise.
2408 (vect_slp_analyze_operations): Likewise.
2409 (vect_slp_bb): Likewise.
2410 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
2411 (vectorizable_bswap): Likewise.
2412 (vectorizable_call): Likewise.
2413 (vectorizable_simd_clone_call): Likewise.
2414 (vectorizable_conversion): Likewise.
2415 (vectorizable_assignment): Likewise.
2416 (vectorizable_shift): Likewise.
2417 (vectorizable_operation): Likewise.
2418 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
2420 2018-06-18 Martin Sebor <msebor@redhat.com>
2422 PR tree-optimization/81384
2423 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
2424 * builtins.c (expand_builtin_strnlen): New function.
2425 (expand_builtin): Call it.
2426 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
2427 * builtins.def (BUILT_IN_STRNLEN): New.
2428 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
2429 Warn for bounds in excess of maximum object size.
2430 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
2431 single-value ranges. Handle strnlen.
2432 (handle_builtin_strlen): Handle strnlen.
2433 (strlen_check_and_optimize_stmt): Same.
2434 * doc/extend.texi (Other Builtins): Document strnlen.
2436 2018-06-18 Maya Rashish <coypu@sdf.org>
2438 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
2439 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
2440 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
2442 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
2444 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
2446 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2448 * tree.c (escaped_string::escape): Replace cast to char * by
2449 const_cast<char *> (unescaped).
2451 2018-06-18 Nick Clifton <nickc@redhat.com>
2454 * tree.c (escaped_string): New class. Converts an unescaped
2455 string into its escaped equivalent.
2456 (warn_deprecated_use): Use the new class to convert the
2457 deprecation message, if present.
2458 (test_escaped_strings): New self test.
2459 (test_c_tests): Add test_escaped_strings.
2460 * doc/extend.texi (deprecated): Add a note that the
2461 deprecation message is affected by the -fmessage-length
2462 option, and that control characters will be escaped.
2463 (#pragma GCC error): Document this pragma.
2464 (#pragma GCC warning): Likewise.
2465 * doc/invoke.texi (-fmessage-length): Document this option's
2466 effect on the #warning and #error preprocessor directives and
2467 the deprecated attribute.
2469 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
2471 * tree.c (decl_value_expr_lookup): Revert latest change.
2472 (decl_value_expr_insert): Likewise.
2474 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
2476 * gimplify.c (nonlocal_vlas): Delete.
2477 (nonlocal_vla_vars): Likewise.
2478 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
2480 (gimplify_body): Do not create and destroy nonlocal_vlas.
2481 * tree-nested.c: Include diagnostic.h.
2482 (use_pointer_in_frame): Tweak.
2483 (lookup_field_for_decl): Add assertion and declare the transformation.
2484 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
2485 internal error when the reference is in a wrong context. Do not
2486 create a debug decl by default.
2487 (note_nonlocal_block_vlas): Delete.
2488 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
2489 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
2490 create a debug decl by default.
2491 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
2492 call is in a wrong context.
2493 (fixup_vla_decls): New function.
2494 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
2495 debug variables were created.
2496 * tree.c (decl_value_expr_lookup): Add checking assertion.
2497 (decl_value_expr_insert): Likewise.
2499 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2502 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
2503 * tree-scalar-evolution.c (interpret_expr): Likewise.
2504 (expression_expensive_p): Likewise.
2505 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
2506 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
2507 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
2508 (ssa_defined_by_minus_one_stmt_p): New.
2510 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2513 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
2514 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
2515 * dojump.c (do_jump): Likewise.
2516 * expr.c (expand_expr_real_2): Check operand type's sign.
2517 * fold-const.c (const_unop): Handle ABSU_EXPR.
2518 (fold_abs_const): Likewise.
2519 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
2520 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
2521 (strip_sign_op_1): Likesise.
2522 * match.pd: Add new pattern to generate ABSU_EXPR.
2523 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
2524 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
2525 * tree-eh.c (operation_could_trap_helper_p): Likewise.
2526 * tree-inline.c (estimate_operator_cost): Likewise.
2527 * tree-pretty-print.c (dump_generic_node): Likewise.
2528 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
2529 * tree.def (ABSU_EXPR): New.
2531 2018-06-16 Jakub Jelinek <jakub@redhat.com>
2534 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
2535 documented as preserved for backward compatibility only.
2536 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
2538 PR rtl-optimization/86108
2539 * bb-reorder.c (create_forwarder_block): Renamed to ...
2540 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
2541 jump from new landing pad to the second part.
2542 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
2545 2018-06-15 Jakub Jelinek <jakub@redhat.com>
2548 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
2549 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
2550 Only call store_expr for halves if the mode is the same.
2553 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
2554 Fix up comment formatting.
2556 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2558 * typed-splay-tree.h (typed_splay_tree::remove): New function.
2559 (typed_splay_tree::closure,
2560 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
2561 (typed_splay_tree::typed_splay_tree,
2562 typed_splay_tree::operator =): Declared private.
2563 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
2564 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
2565 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
2566 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
2567 typed_splay_tree::splay_tree_splay,
2568 typed_splay_tree::splay_tree_foreach_helper,
2569 typed_splay_tree::splay_tree_insert,
2570 typed_splay_tree::splay_tree_remove,
2571 typed_splay_tree::splay_tree_lookup,
2572 typed_splay_tree::splay_tree_predecessor,
2573 typed_splay_tree::splay_tree_successor,
2574 typed_splay_tree::splay_tree_min,
2575 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
2576 (typed_splay_tree::root, typed_splay_tree::comp,
2577 typed_splay_tree::delete_key,
2578 typed_splay_tree::delete_value): New data members.
2579 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
2580 typed_splay_tree::remove.
2582 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
2584 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
2585 -mginv and -mno-ginv to the assembler.
2586 * config/mips/mips.opt (-mcrc): New option.
2588 * doc/invoke.text (-mcrc): Document.
2591 2018-06-15 Nick Clifton <nickc@redhat.com>
2594 * tree.c (escaped_string): New class. Converts an unescaped
2595 string into its escaped equivalent.
2596 (warn_deprecated_use): Use the new class to convert the
2597 deprecation message, if present.
2598 (test_escaped_strings): New self test.
2599 (test_c_tests): Add test_escaped_strings.
2600 * doc/extend.texi (deprecated): Add a note that the
2601 deprecation message is affected by the -fmessage-length
2602 option, and that control characters will be escaped.
2603 (#pragma GCC error): Document this pragma.
2604 (#pragma GCC warning): Likewise.
2605 * doc/invoke.texi (-fmessage-length): Document this option's
2606 effect on the #warning and #error preprocessor directives and
2607 the deprecated attribute.
2609 2018-06-15 Richard Biener <rguenther@suse.de>
2611 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
2612 here, also noting vector size used.
2613 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
2614 size used in MSG_OPTIMIZED_LOCATIONS dump.
2615 (pass_slp_vectorize::execute): Adjust.
2617 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
2620 * config/arc/arc.c (arc_return_address_register): Fix
2623 2018-06-15 Richard Biener <rguenther@suse.de>
2626 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
2627 leave useless conversion stripping to force_gimple_operand_gsi.
2628 (gimplify_build2): Likewise.
2629 (gimplify_build1): Likewise.
2631 2018-06-15 Richard Biener <rguenther@suse.de>
2634 * tree-cfg.c (move_stmt_op): unshare invariant addresses
2635 before adjusting their block.
2637 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
2639 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
2640 multilibs for *-*-rtems*.
2641 * config/riscv/t-rtems: New file.
2643 2018-06-14 Jakub Jelinek <jakub@redhat.com>
2646 * match.pd ((A +- CST1) +- CST2): Punt if last resort
2647 unsigned_type_for returns NULL.
2650 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
2651 subregs of multi-word pseudos unless the float mode has word size.
2653 2018-06-14 Richard Biener <rguenther@suse.de>
2656 * tree-vect-generic.c (build_word_mode_vector_type): Remove
2657 duplicate and harmful type_hash_canon.
2658 * tree.c (type_hash_canon): Assert we didn't find ourselves.
2660 2018-06-14 Richard Biener <rguenther@suse.de>
2663 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
2666 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2668 * config/rtems.h (STDINT_LONG32): Define.
2670 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
2671 Prachi Godbole <prachi.godbole@imgtec.com>
2673 * config/mips/mips-cpus.def: Define P6600.
2674 * config/mips/mips-tables.opt: Regenerate.
2675 * config/mips/mips.c (mips_ucbranch_type): New enum.
2676 (mips_rtx_cost_data): Add support for P6600.
2677 (mips_issue_rate): Likewise.
2678 (mips_multipass_dfa_lookahead): Likewise.
2679 (mips_avoid_hazard): Likewise.
2680 (mips_reorg_process_insns): Likewise.
2681 (mips_classify_branch_p6600): New function.
2682 * config/mips/mips.h (TUNE_P6600): New define.
2683 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
2684 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
2685 * config/mips/mips.md: Include p6600.md.
2686 (processor): Add p6600.
2687 * config/mips/p6600.md: New file.
2688 * doc/invoke.texi: Add p6600 to supported architectures.
2690 2018-06-13 Martin Sebor <msebor@redhat.com>
2692 PR tree-optimization/86114
2693 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
2695 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
2697 2018-06-13 Richard Biener <rguenther@suse.de>
2699 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
2700 Properly set vector type of the intermediate stmt.
2701 * tree-vect-stmts.c (vectorizable_operation): The destination
2702 var always has vectype_out type.
2704 2018-06-13 Jeff Law <law@redhat.com>
2706 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
2707 integer 0 for argument to print_rtl_with_bb.
2708 (rl78_reorg): Likewise.
2710 2018-06-13 David Malcolm <dmalcolm@redhat.com>
2712 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
2713 from rtx to rtx_insn *.
2714 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
2716 (add_sched_insns_for_speculation): Likewise for local "target",
2717 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
2718 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
2719 from rtx_insn ** to rtx_code_label **.
2720 (reorg_emit_nops): Likewise.
2721 (c6x_reorg): Likewise for local "call_labels".
2722 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
2724 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
2725 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
2726 the loops over LABEL_REFS.
2727 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
2729 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
2730 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
2731 (split_branches): Strengthen local "olabel" from rtx to
2732 rtx_insn *, adding a safe_as_a cast.
2733 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
2735 (add_insn_after): Likewise for first two params.
2736 (add_insn_before): Likewise.
2737 (remove_insn): Likewise for param.
2738 (emit_pattern_before_noloc): Likewise for second and third params.
2739 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
2740 (emit_call_insn_before_noloc): Likewise.
2741 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
2743 (emit_barrier_before): Likewise.
2744 (emit_label_before): Strengthen "label" param from "rtx" to
2745 "rtx_code_label *". Strengthen "before" param from "rtx" to
2747 (emit_insn_after_1): Strengthen "after" param from "rtx" to
2749 (emit_pattern_after_noloc): Likewise.
2750 (emit_insn_after_noloc): Likewise.
2751 (emit_jump_insn_after_noloc): Likewise.
2752 (emit_call_insn_after_noloc): Likewise.
2753 (emit_debug_insn_after_noloc): Likewise.
2754 (emit_barrier_after): Likewise.
2755 (emit_label_after): Likewise for both params.
2756 (emit_pattern_after_setloc): Likewise for "after" param. Convert
2757 "loc" param from "int" to "location_t".
2758 (emit_insn_after_setloc): Likewise.
2759 (emit_jump_insn_after_setloc): Likewise.
2760 (emit_call_insn_after_setloc): Likewise.
2761 (emit_debug_insn_after_setloc): Likewise.
2762 (emit_pattern_before_setloc): Likewise for "before" param. Convert
2763 "loc" param from "int" to "location_t".
2764 (emit_pattern_before): Convert NULL_RTX to NULL.
2765 (emit_insn_before_setloc): Convert "loc" param from "int" to
2767 (emit_jump_insn_before_setloc): Likewise.
2768 (emit_call_insn_before_setloc): Likewise.
2769 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
2770 rtx_insn *. Convert "loc" param from "int" to "location_t".
2771 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
2772 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
2773 Convert 3rd param from "int" to "location_t".
2774 (emit_barrier_before, emit_barrier_after, next_real_insn):
2775 Strengthen param from rtx to rtx_insn *.
2776 (emit_label_before): Strengthen 1st param from "rtx" to
2777 "rtx_code_label *". Strengthen 2nd param from "rtx" to
2779 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
2780 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
2781 Strengthen 2nd param from "rtx" to "rtx_insn *".
2782 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
2783 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
2784 Likewise. Convert 3rd param from "int" to "location_t".
2785 (emit_label_after): Strengthen 1st param from "rtx" to
2787 (next_real_insn, remove_insn): Strengthen param from "rtx" to
2789 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
2790 from "rtx" to "rtx_insn *".
2792 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
2794 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
2795 bodies streamed in with -Q.
2796 * dumpfile.c (dump_files): Add lto-stream-out dump file.
2797 * dumpfile.h (tree_dump_index): Add lto_stream_out.
2798 * gimple-streamer-out.c: Include gimple-pretty-print.h
2799 (output_bb): Dump stmts streamed.
2800 * lto-section-out.c: Include print-tree.h
2801 (lto_begin_section): Dump sections created.
2802 (lto_output_decl_index): Dump decl encoded.
2803 * lto-streamer-out.c: Include print-tree.h
2804 (create_output_block): Dump output block created.
2805 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
2806 (output_function): Dump function output.
2807 (output_constructor): Dump constructor streamed.
2808 (write_global_stream): Output indexes encoded.
2809 (produce_asm_for_decls): Dump streams encoded.
2810 * lto-streamer.c (streamer_dump_file): New global var.
2811 * lto-streamer.h (streamer_dump_file): Declare.
2812 * passes.c (ipa_write_summaries): Initialize streamer dump.
2813 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
2816 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
2819 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
2820 offsets for register save directives. Emit a second batch of save
2821 directives, if need be, when the function accesses prior frames.
2823 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2825 * config/arc/fpu.md (fmasf4): Force operand to register.
2826 (fnmasf4): Likewise.
2828 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2830 * config/arc/arc-protos.h (arc_pad_return): Remove.
2831 * config/arc/arc.c (machine_function): Remove force_short_suffix
2833 (arc_print_operand): Adjust printing of '&'.
2834 (arc_verify_short): Remove conditional printing of short suffix.
2835 (arc_final_prescan_insn): Remove reference to size_reason.
2836 (pad_return): New function.
2837 (arc_reorg): Call pad_return.
2838 (arc_pad_return): Remove.
2839 (arc_init_machine_status): Remove reference to force_short_suffix.
2840 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
2841 (attr length): When attribute iscompact is true force to 2
2842 regardless; in the case of maybe check if we want to force the
2843 instruction to have 4 bytes length.
2844 (nopv): Change it to generate 4 byte long nop as well.
2845 (blockage): New pattern.
2846 (simple_return): Remove call to arc_pad_return.
2847 (p_return_i): Likewise.
2849 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2851 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
2853 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2855 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
2858 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2860 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
2861 for ARC700 and ARCv2.
2863 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
2866 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
2867 operands[2] instead of operands[1].
2870 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
2872 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
2873 case, check whether the outer register overlaps an unallocatable
2874 register, not just whether it fits the required class.
2876 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
2878 * poly-int.h (can_div_trunc_p): Add new overload in which all values
2880 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
2881 (memrefs_conflict_p): Likewise.
2882 (init_alias_analysis): Likewise.
2883 * cfgexpand.c (expand_debug_expr): Likewise.
2884 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
2885 * cse.c (fold_rtx): Likewise.
2886 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
2887 * expr.c (emit_block_move_hints): Likewise.
2888 (clear_storage_hints, push_block, emit_push_insn): Likewise.
2889 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
2890 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
2891 (emit_group_store): Likewise.
2892 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
2893 to read the PRE/POST_MODIFY increment.
2894 * calls.c (store_one_arg): Use strip_offset.
2895 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
2897 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
2899 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
2900 (simplify_binary_operation_1): Extend CONST_INT handling to
2902 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
2903 than a HOST_WIDE_INT.
2904 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
2906 (adjust_mems, add_stores): Update accodingly.
2907 (vt_canonicalize_addr): Track polynomial offsets.
2908 (emit_note_insn_var_location): Likewise.
2909 (vt_add_function_parameter): Likewise.
2910 (vt_initialize): Likewise.
2912 2018-06-12 Jeff Law <law@redhat.com>
2914 * config.gcc (alpha*-*-freebsd*): Remove.
2915 * config/alpha/freebsd.h: Remove.
2917 2018-06-12 David Malcolm <dmalcolm@redhat.com>
2920 * spellcheck-tree.c (levenshtein_distance): Rename to...
2921 (get_edit_distance): ...this, and update for underlying renaming.
2922 * spellcheck-tree.h (levenshtein_distance): Rename to...
2923 (get_edit_distance): ...this.
2924 * spellcheck.c (levenshtein_distance): Rename to...
2925 (get_edit_distance): ...this. Convert from Levenshtein distance
2926 to Damerau-Levenshtein distance by supporting transpositions of
2927 adjacent characters. Rename "v1" to "v_next" and "v0" to
2929 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
2930 (selftest::test_edit_distance_unit_test_oneway): ...this, and
2931 update for underlying renaming.
2932 (selftest::levenshtein_distance_unit_test): Rename to...
2933 (selftest::test_get_edit_distance_unit): ...this, and update for
2934 underlying renaming.
2935 (selftest::test_find_closest_string): Add example from PR 69968
2936 where transposition helps
2937 (selftest::test_metric_conditions): Update for renaming.
2938 (selftest::test_metric_conditions): Likewise.
2939 (selftest::spellcheck_c_tests): Likewise.
2940 * spellcheck.h (levenshtein_distance): Rename both overloads to...
2941 (get_edit_distance): ...this.
2942 (best_match::consider): Update for renaming.
2944 2018-06-12 Martin Sebor <msebor@redhat.com>
2946 PR tree-optimization/85259
2947 * builtins.c (compute_objsize): Handle constant offsets.
2948 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
2949 true iff a warning has been issued.
2950 * gimple.h (gimple_nonartificial_location): New function.
2951 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
2952 gimple_nonartificial_location and handle -Wno-system-headers.
2953 (handle_builtin_stxncpy): Same.
2955 2018-06-12 Martin Sebor <msebor@redhat.com>
2958 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
2960 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
2962 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
2963 BUILTIN_VEC_XST entries for pointer to double and long long.
2965 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
2968 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
2970 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
2973 2018-06-12 Martin Liska <mliska@suse.cz>
2975 * doc/options.texi: Document IntegerRange.
2977 2018-06-12 Martin Liska <mliska@suse.cz>
2979 * config/i386/i386.opt: Make MPX-related options as Deprecated.
2980 * opt-functions.awk: Handle Deprecated flag.
2981 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
2983 (read_cmdline_option): Report warning for a deprecated option.
2984 * opts.h (struct cl_option): Add new field cl_deprecated.
2985 (CL_ERR_DEPRECATED): New.
2987 2018-06-12 Martin Liska <mliska@suse.cz>
2989 * doc/options.texi: Document Deprecated option flag.
2991 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2993 * config/arc/arc-arch.h (arc_extras): New enum.
2994 (arc_cpu_t):Add field extra.
2995 (arc_cpu_types): Consider the extras.
2996 * config/arc/arc-cpus.def: Add extras info.
2997 * config/arc/arc-opts.h (processor_type): Consider extra field.
2998 * config/arc/arc.c (arc_override_options): Handle extra field.
3000 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3002 * config/arc/arc-arch.h: Update ARC_OPTX macro.
3003 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
3005 * config/arc/arc.c (arc_init): Update pic warning.
3006 (irq_range): Update irq range parsing warnings.
3007 (arc_override_options): Update various warning messages.
3008 (arc_handle_aux_attribute): Likewise.
3010 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
3012 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
3014 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3016 * doc/sourcebuild.texi: Document usage of line number 0 in verify
3017 compiler messages directives.
3019 2018-06-12 Matthew Fortune <mfortune@gmail.com>
3021 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
3022 * config/mips/mips-tables.opt: Regenerate.
3023 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
3025 * doc/invoke.texi: Document -march=i6500.
3027 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
3029 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
3030 (i6400_gpmul): Add cpu_unit.
3031 (i6400_gpdiv): Likewise.
3032 (i6400_msa_add_d): Update reservations.
3033 (i6400_msa_int_add) Likewise.
3034 (i6400_msa_short_logic3) Likewise.
3035 (i6400_msa_short_logic2) Likewise.
3036 (i6400_msa_short_logic) Likewise.
3037 (i6400_msa_move) Likewise.
3038 (i6400_msa_cmp) Likewise.
3039 (i6400_msa_short_float2) Likewise.
3040 (i6400_msa_div_d) Likewise.
3041 (i6400_msa_long_logic1) Likewise.
3042 (i6400_msa_long_logic2) Likewise.
3043 (i6400_msa_mult) Likewise.
3044 (i6400_msa_long_float2) Likewise.
3045 (i6400_msa_long_float4) Likewise.
3046 (i6400_msa_long_float5) Likewise.
3047 (i6400_msa_long_float8) Likewise.
3048 (i6400_fpu_fadd): Include frint type.
3049 (i6400_fpu_store): New define_insn_reservation.
3050 (i6400_fpu_load): Likewise.
3051 (i6400_fpu_move): Likewise.
3052 (i6400_fpu_fcmp): Likewise.
3053 (i6400_fpu_fmadd): Likewise.
3054 (i6400_int_mult): Include imul3nc type and update reservation.
3055 (i6400_int_div): Include idiv3 type and update reservation.
3056 (i6400_int_load): Update to check type not move_type.
3057 (i6400_int_store): Likewise.
3058 (i6400_int_prefetch): Set zero latency.
3060 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
3062 * gcc.c: Document new %@{...} sequence.
3063 (LINK_COMMAND_SPEC): Use it for the -L switches.
3064 (cpp_unique_options): Use it for the -I switches.
3065 (at_file_argbuf): New global variable.
3066 (in_at_file): Likewise.
3067 (alloc_args): Create at_file_argbuf.
3068 (clear_args): Truncate at_file_argbuf.
3069 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
3070 (open_at_file): New function.
3071 (close_at_file): Likewise.
3072 (create_at_file): Delete.
3073 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
3076 (validate_switches_from_spec): Deal with %@{...} sequence.
3077 (validate_switches): Likewise.
3078 (driver::finalize): Call clear_args.
3080 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
3082 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
3084 2018-06-11 Martin Sebor <msebor@redhat.com>
3086 * doc/invoke.texi (-Wall): List -Wc++17-compat.
3087 (Wno-class-memaccess): Add @opindex.
3088 (Wno-templates, Wno-multiple-inheritance): Same.
3089 (Wno-virtual-inheritance, Wno-namespaces): Same.
3090 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
3091 (Wno-format-overflow, Wno-format-truncation): Same.
3092 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
3093 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
3094 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
3095 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
3096 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
3097 (Wno-misspelled-isr): Same.
3099 2018-06-11 Martin Sebor <msebor@redhat.com>
3101 * PR tree-optimization/86083
3102 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
3104 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
3106 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
3108 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
3111 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
3112 on the correct operand.
3113 (*movdi_internal64): Ditto.
3115 2018-06-11 Martin Liska <mliska@suse.cz>
3117 PR tree-optimization/86089
3118 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
3120 2018-06-11 Julia Koval <julia.koval@intel.com>
3122 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
3123 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
3124 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
3126 2018-06-11 Olivier Hainque <hainque@adacore.com>
3128 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
3129 for Ada with strict dwarf2.
3131 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
3134 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
3137 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
3139 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
3141 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
3143 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
3146 2018-06-08 Martin Liska <mliska@suse.cz>
3148 * tree-cfg.h (debug_function): Fix argument type to match
3151 2018-06-08 Martin Liska <mliska@suse.cz>
3153 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
3154 Remove usage of MPX-related (and removed) fields.
3155 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
3157 2018-06-08 David Malcolm <dmalcolm@redhat.com>
3159 * cfg.c (debug): Use TDF_NONE rather than 0.
3160 * cfghooks.c (debug): Likewise.
3161 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
3162 (struct dump_option_value_info): Convert to...
3163 (struct kv_pair): ...this template type.
3164 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
3166 (optinfo_verbosity_options): Likewise.
3167 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
3169 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
3170 than int for "optgroup_flags" param.
3171 (dump_generic_expr_loc): Use dump_flags_t rather than int for
3173 (dump_dec): Likewise.
3174 (dump_finish): Use TDF_NONE rather than 0.
3175 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
3176 rather than int for "optgroup_flags" param. Use TDF_NONE rather
3177 than 0. Update for change to option_ptr.
3178 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
3179 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
3180 0. Update for changes to optinfo_verbosity_options and
3182 (opt_info_switch_p): Convert optgroup_flags from int to
3184 (dump_basic_block): Use dump_flags_t rather than int
3185 for "dump_kind" param.
3186 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
3187 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
3188 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
3189 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
3190 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
3191 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
3192 TDF_NONE): Convert from macros to...
3193 (enum dump_flag): ...this new enum.
3194 (dump_flags_t): Update to use enum.
3195 (operator|, operator&, operator~, operator|=, operator&=):
3196 Implement for dump_flags_t.
3197 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
3198 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
3199 Convert from macros to...
3200 (enum optgroup_flag): ...this new enum.
3201 (optgroup_flags_t): New typedef.
3202 (operator|, operator|=): Implement for optgroup_flags_t.
3203 (struct dump_file_info): Convert field "alt_flags" to
3204 dump_flags_t. Convert field "optgroup_flags" to
3206 (dump_basic_block): Use dump_flags_t rather than int for param.
3207 (dump_generic_expr_loc): Likewise.
3208 (dump_dec): Likewise.
3209 (dump_register): Convert param "optgroup_flags" to
3211 (opt_info_enable_passes): Likewise.
3212 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
3214 * gimple-pretty-print.c (debug): Likewise.
3215 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
3216 (merged_store_group::apply_stores): Likewise.
3217 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
3218 * gimple.c (verify_gimple_pp): Likewise.
3219 * graphite-poly.c (print_pbb_body): Likewise.
3220 * passes.c (pass_manager::register_one_dump_file): Convert
3221 local "optgroup_flags" to optgroup_flags_t.
3222 * print-tree.c (print_node): Use TDF_NONE rather than 0.
3224 (debug_body): Likewise.
3225 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
3226 to optgroup_flags_t.
3227 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
3229 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
3230 (convert_mult_to_fma): Likewise.
3231 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
3232 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
3233 * tree-vect-data-refs.c (dump_lower_bound): Convert param
3234 "dump_kind" to dump_flags_t.
3236 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
3238 * config/rs6000/rs6000.c (min, max): Delete.
3240 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
3242 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
3243 -mabi=spe and -mabi=no-spe.
3245 2018-06-08 Martin Liska <mliska@suse.cz>
3247 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
3248 where we expect an existing summary.
3250 2018-06-08 Martin Liska <mliska@suse.cz>
3252 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
3253 * ipa-inline.h (estimate_edge_growth): Likewise.
3255 2018-06-08 Martin Liska <mliska@suse.cz>
3257 * cgraph.c (function_version_hasher::hash): Use
3258 cgraph_node::get_uid ().
3259 (function_version_hasher::equal):
3260 * cgraph.h (cgraph_node::get_uid): New method.
3261 * ipa-inline.c (update_caller_keys): Use
3262 cgraph_node::get_uid ().
3263 (update_callee_keys): Likewise.
3264 * ipa-utils.c (searchc): Likewise.
3265 (ipa_reduced_postorder): Likewise.
3266 * lto-cgraph.c (input_node): Likewise.
3267 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
3268 * symbol-summary.h (symtab_insertion): Likewise.
3269 (symtab_removal): Likewise.
3270 (symtab_duplication): Likewise.
3271 * tree-pretty-print.c (dump_function_header): Likewise.
3272 * tree-sra.c (convert_callers_for_node): Likewise.
3274 2018-06-08 Martin Liska <mliska@suse.cz>
3276 * cgraph.c (symbol_table::create_edge): Always assign a new
3278 (symbol_table::free_edge): Do not recycle numbers.
3279 * cgraph.h (cgraph_edge::get): New method.
3280 * symbol-summary.h (symtab_removal): Use it.
3281 (symtab_duplication): Likewise.
3282 (call_summary::hashable_uid): Remove.
3284 2018-06-08 Martin Liska <mliska@suse.cz>
3286 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
3287 (initialize_growth_caches): Remove.
3288 (free_growth_caches): Likewise.
3289 (do_estimate_edge_time): Use edge_growth_cache.
3290 (do_estimate_edge_size): Likewise.
3291 (do_estimate_edge_hints): Likewise.
3292 * ipa-inline.c (reset_edge_caches): Likewise.
3293 (recursive_inlining): Likewise.
3294 (inline_small_functions): Likewise.
3295 * ipa-inline.h (initialize_growth_caches): Remove.
3296 (estimate_edge_size): Likewise.
3297 (estimate_edge_time): Likewise.
3298 (estimate_edge_hints): Likewise.
3299 (reset_edge_growth_cache): Likewise.
3300 * symbol-summary.h (call_summary::remove): New method.
3302 2018-06-08 Martin Liska <mliska@suse.cz>
3304 * ipa-cp.c (class edge_clone_summary): New summary.
3305 (grow_edge_clone_vectors): Remove.
3306 (ipcp_edge_duplication_hook): Remove.
3307 (class edge_clone_summary_t): New call_summary class.
3308 (ipcp_edge_removal_hook): Remove.
3309 (edge_clone_summary_t::duplicate): New function.
3310 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
3311 (create_specialized_node): Likewise.
3312 (ipcp_driver): Initialize edge_clone_summaries and do not
3315 2018-06-08 Martin Liska <mliska@suse.cz>
3317 * symbol-summary.h (get): New function.
3318 (call_summary::m_initialize_when_cloning): New class member.
3320 2018-06-08 Martin Liska <mliska@suse.cz>
3322 * cgraph.c (cgraph_node::remove): Do not recycle uid.
3323 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
3324 (symbol_table::allocate_cgraph_symbol): Do not set uid.
3325 * passes.c (uid_hash_t): Record removed_nodes by their uids.
3326 (remove_cgraph_node_from_order): Use the removed_nodes set.
3327 (do_per_function_toporder): Likwise.
3328 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
3329 instead of summary_uid.
3330 (symtab_removal): Likewise.
3331 (symtab_duplication): Likewise.
3333 2018-06-08 Martin Liska <mliska@suse.cz>
3335 * ipa-cp.c (ipcp_store_bits_results): Use
3336 ipcp_transformation_sum.
3337 (ipcp_store_vr_results): Likewise.
3338 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
3340 (ipcp_transformation_initialize): ... this.
3341 (ipa_set_node_agg_value_chain):
3342 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
3343 (write_ipcp_transformation_info): Likewise.
3344 (read_ipcp_transformation_info): Likewise.
3345 (ipcp_update_bits): Likewise.
3346 (ipcp_update_vr): Likewise.
3347 (ipcp_transform_function): Likewise.
3348 * ipa-prop.h: Rename ipcp_transformation_summary to
3349 ipcp_transformation.
3350 (class ipcp_transformation_t): New function summary.
3351 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
3352 (ipa_get_agg_replacements_for_node): Likewise.
3354 2018-06-08 Martin Liska <mliska@suse.cz>
3356 * ipa-pure-const.c (struct funct_state_d): Do it class instead
3358 (class funct_state_summary_t): New function_summary class.
3359 (has_function_state): Remove.
3360 (get_function_state): Likewise.
3361 (set_function_state): Likewise.
3362 (add_new_function): Likewise.
3363 (funct_state_summary_t::insert): New function.
3364 (duplicate_node_data): Remove.
3365 (remove_node_data): Remove.
3366 (funct_state_summary_t::duplicate): New function.
3367 (register_hooks): Create new funct_state_summaries.
3368 (pure_const_generate_summary): Use it.
3369 (pure_const_write_summary): Likewise.
3370 (pure_const_read_summary): Likewise.
3371 (propagate_pure_const): Likewise.
3372 (propagate_nothrow): Likewise.
3373 (dump_malloc_lattice): Likewise.
3374 (propagate_malloc): Likewise.
3375 (execute): Do not register hooks, just remove summary
3377 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
3380 2018-06-08 Martin Liska <mliska@suse.cz>
3382 * ipa-reference.c (remove_node_data): Remove.
3383 (duplicate_node_data): Likewise.
3384 (class ipa_ref_var_info_summary_t): New class.
3385 (class ipa_ref_opt_summary_t): Likewise.
3386 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
3387 (get_reference_optimization_summary): Use
3388 ipa_ref_opt_sum_summaries.
3389 (set_reference_vars_info): Remove.
3390 (set_reference_optimization_summary): Likewise.
3391 (ipa_init): Create summaries.
3392 (init_function_info): Use function summary.
3393 (ipa_ref_opt_summary_t::duplicate): New function.
3394 (ipa_ref_opt_summary_t::remove): New function.
3395 (get_read_write_all_from_node): Fix GNU coding style.
3396 (propagate): Use function summary.
3397 (write_node_summary_p): Fix GNU coding style.
3398 (stream_out_bitmap): Likewise.
3399 (ipa_reference_read_optimization_summary): Use function summary.
3400 (ipa_reference_c_finalize): Do not release hooks.
3402 2018-06-08 Martin Liska <mliska@suse.cz>
3404 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
3405 (analyze_function_body): Extract multiple calls of get_create.
3406 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
3407 * ipa-inline.c (recursive_inlining): Use ::get method.
3408 * ipa-inline.h (estimate_edge_growth): Likewise.
3410 2018-06-08 Martin Liska <mliska@suse.cz>
3412 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
3414 (hsa_function_summary::hsa_function_summary): Use the new enum
3416 (hsa_gpu_implementation_p): Use hsa_summaries::get.
3417 * hsa-gen.c (hsa_get_host_function): Likewise.
3418 (get_brig_function_name): Likewise.
3419 * ipa-hsa.c (process_hsa_functions): Likewise.
3420 (ipa_hsa_write_summary): Likewise.
3421 * symbol-summary.h (symtab_duplication): Use ::get function/
3422 (get): New function.
3424 2018-06-08 Martin Liska <mliska@suse.cz>
3426 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
3428 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
3429 (hsa_register_kernel): Likewise.
3430 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
3431 * hsa-gen.c (hsa_get_host_function): Likewise.
3432 (get_brig_function_name): Likewise.
3433 (generate_hsa): Likewise.
3434 (pass_gen_hsail::execute): Likewise.
3435 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
3436 (devirtualization_time_bonus): Likewise.
3437 (ipcp_propagate_stage): Likewise.
3438 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3439 (edge_set_predicate): Likewise.
3440 (evaluate_conditions_for_known_args): Likewise.
3441 (evaluate_properties_for_edge): Likewise.
3442 (ipa_fn_summary::reset): Likewise.
3443 (ipa_fn_summary_t::duplicate): Likewise.
3444 (dump_ipa_call_summary): Likewise.
3445 (ipa_dump_fn_summary): Likewise.
3446 (analyze_function_body): Likewise.
3447 (compute_fn_summary): Likewise.
3448 (estimate_edge_devirt_benefit): Likewise.
3449 (estimate_edge_size_and_time): Likewise.
3450 (estimate_calls_size_and_time): Likewise.
3451 (estimate_node_size_and_time): Likewise.
3452 (inline_update_callee_summaries): Likewise.
3453 (remap_edge_change_prob): Likewise.
3454 (remap_edge_summaries): Likewise.
3455 (ipa_merge_fn_summary_after_inlining): Likewise.
3456 (ipa_update_overall_fn_summary): Likewise.
3457 (read_ipa_call_summary): Likewise.
3458 (inline_read_section): Likewise.
3459 (write_ipa_call_summary): Likewise.
3460 (ipa_fn_summary_write): Likewise.
3461 (ipa_free_fn_summary): Likewise.
3462 * ipa-hsa.c (process_hsa_functions): Likewise.
3463 (ipa_hsa_write_summary): Likewise.
3464 (ipa_hsa_read_section): Likewise.
3465 * ipa-icf.c (sem_function::merge): Likewise.
3466 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
3467 (do_estimate_edge_time): Likewise.
3468 (estimate_size_after_inlining): Likewise.
3469 (estimate_growth): Likewise.
3470 (growth_likely_positive): Likewise.
3471 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3472 (inline_call): Likewise.
3473 * ipa-inline.c (caller_growth_limits): Likewise.
3474 (can_inline_edge_p): Likewise.
3475 (can_inline_edge_by_limits_p): Likewise.
3476 (compute_uninlined_call_time): Likewise.
3477 (compute_inlined_call_time): Likewise.
3478 (want_inline_small_function_p): Likewise.
3479 (edge_badness): Likewise.
3480 (update_caller_keys): Likewise.
3481 (update_callee_keys): Likewise.
3482 (recursive_inlining): Likewise.
3483 (inline_small_functions): Likewise.
3484 (inline_to_all_callers_1): Likewise.
3485 (dump_overall_stats): Likewise.
3486 (early_inline_small_functions): Likewise.
3487 (early_inliner): Likewise.
3488 * ipa-inline.h (estimate_edge_growth): Likewise.
3489 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3490 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3491 * ipa-prop.h (IPA_NODE_REF): Likewise.
3492 (IPA_EDGE_REF): Likewise.
3493 * ipa-pure-const.c (malloc_candidate_p): Likewise.
3494 (propagate_malloc): Likewise.
3495 * ipa-split.c (execute_split_functions): Likewise.
3496 * symbol-summary.h: Rename get to get_create.
3498 (get_create): Likewise.
3499 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3501 2018-06-08 Martin Liska <mliska@suse.cz>
3503 * symbol-summary.h (release): Move definition out of class
3505 (symtab_removal): Likewise.
3506 (symtab_duplication): Likewise.
3508 2018-06-08 Martin Liska <mliska@suse.cz>
3510 * symbol-summary.h (function_summary): Move constructor
3511 implementation out of class declaration.
3512 (release): Likewise.
3513 (symtab_insertion): Likewise.
3514 (symtab_removal): Likewise.
3515 (symtab_duplication): Likewise.
3518 2018-06-08 Martin Liska <mliska@suse.cz>
3520 * Makefile.in: Remove support for MPX (macros, related functions,
3521 fields in cgraph_node, ...).
3522 * builtin-types.def (BT_BND): Likewise.
3523 (BT_FN_BND_CONST_PTR): Likewise.
3524 (BT_FN_CONST_PTR_BND): Likewise.
3525 (BT_FN_VOID_PTR_BND): Likewise.
3526 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
3527 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
3528 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
3529 (expand_builtin_mempcpy_with_bounds): Likewise.
3530 (expand_builtin_memset_with_bounds): Likewise.
3531 (expand_builtin_memset_args): Likewise.
3532 (std_expand_builtin_va_start): Likewise.
3533 (expand_builtin): Likewise.
3534 (expand_builtin_with_bounds): Likewise.
3535 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
3536 (DEF_LIB_BUILTIN_CHKP): Likewise.
3537 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
3538 (DEF_CHKP_BUILTIN): Likewise.
3539 (BUILT_IN_MEMCPY): Likewise.
3540 (BUILT_IN_MEMMOVE): Likewise.
3541 (BUILT_IN_MEMPCPY): Likewise.
3542 (BUILT_IN_MEMSET): Likewise.
3543 (BUILT_IN_STPCPY): Likewise.
3544 (BUILT_IN_STRCAT): Likewise.
3545 (BUILT_IN_STRCHR): Likewise.
3546 (BUILT_IN_STRCPY): Likewise.
3547 (BUILT_IN_STRLEN): Likewise.
3548 (BUILT_IN_MEMCPY_CHK): Likewise.
3549 (BUILT_IN_MEMMOVE_CHK): Likewise.
3550 (BUILT_IN_MEMPCPY_CHK): Likewise.
3551 (BUILT_IN_MEMSET_CHK): Likewise.
3552 (BUILT_IN_STPCPY_CHK): Likewise.
3553 (BUILT_IN_STRCAT_CHK): Likewise.
3554 (BUILT_IN_STRCPY_CHK): Likewise.
3555 * calls.c (store_bounds): Likewise.
3556 (emit_call_1): Likewise.
3557 (special_function_p): Likewise.
3558 (maybe_warn_nonstring_arg): Likewise.
3559 (initialize_argument_information): Likewise.
3560 (finalize_must_preallocate): Likewise.
3561 (compute_argument_addresses): Likewise.
3562 (expand_call): Likewise.
3563 * cfgexpand.c (expand_call_stmt): Likewise.
3564 (expand_return): Likewise.
3565 (expand_gimple_stmt_1): Likewise.
3566 (pass_expand::execute): Likewise.
3567 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
3568 (cgraph_node::remove): Likewise.
3569 (cgraph_node::dump): Likewise.
3570 (cgraph_node::verify_node): Likewise.
3571 * cgraph.h (chkp_function_instrumented_p): Likewise.
3572 (symtab_node::get_alias_target): Likewise.
3573 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
3574 (cgraph_local_p): Likewise.
3575 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
3576 (cgraph_edge::rebuild_references): Likewise.
3577 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
3578 (walk_polymorphic_call_targets): Likewise.
3579 (cgraph_node::expand_thunk): Likewise.
3580 (symbol_table::output_weakrefs): Likewise.
3581 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
3582 (ix86_handle_option): Likewise.
3583 * config/i386/constraints.md: Likewise.
3584 * config/i386/i386-builtin-types.def (BND): Likewise.
3588 * config/i386/i386-builtin.def (BDESC_END): Likewise.
3589 (BDESC_FIRST): Likewise.
3591 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
3592 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
3593 * config/i386/i386.c (enum reg_class): Likewise.
3594 (ix86_target_string): Likewise.
3595 (ix86_option_override_internal): Likewise.
3596 (ix86_conditional_register_usage): Likewise.
3597 (ix86_valid_target_attribute_inner_p): Likewise.
3598 (ix86_set_indirect_branch_type): Likewise.
3599 (ix86_set_current_function): Likewise.
3600 (ix86_function_arg_regno_p): Likewise.
3601 (init_cumulative_args): Likewise.
3602 (ix86_function_arg_advance): Likewise.
3603 (ix86_function_arg): Likewise.
3604 (ix86_pass_by_reference): Likewise.
3605 (ix86_function_value_regno_p): Likewise.
3606 (ix86_function_value_1): Likewise.
3607 (ix86_function_value_bounds): Likewise.
3608 (ix86_return_in_memory): Likewise.
3609 (ix86_setup_incoming_vararg_bounds): Likewise.
3610 (ix86_va_start): Likewise.
3611 (indirect_thunk_need_prefix): Likewise.
3612 (print_reg): Likewise.
3613 (ix86_print_operand): Likewise.
3614 (ix86_expand_call): Likewise.
3615 (ix86_output_function_return): Likewise.
3616 (reg_encoded_number): Likewise.
3617 (BDESC_VERIFYS): Likewise.
3618 (ix86_init_mpx_builtins): Likewise.
3619 (ix86_init_builtins): Likewise.
3620 (ix86_emit_cmove): Likewise.
3621 (ix86_emit_move_max): Likewise.
3622 (ix86_expand_builtin): Likewise.
3623 (ix86_builtin_mpx_function): Likewise.
3624 (ix86_get_arg_address_for_bt): Likewise.
3625 (ix86_load_bounds): Likewise.
3626 (ix86_store_bounds): Likewise.
3627 (ix86_load_returned_bounds): Likewise.
3628 (ix86_store_returned_bounds): Likewise.
3629 (ix86_class_likely_spilled_p): Likewise.
3630 (ix86_hard_regno_mode_ok): Likewise.
3631 (x86_order_regs_for_local_alloc): Likewise.
3632 (ix86_mitigate_rop): Likewise.
3633 (ix86_bnd_prefixed_insn_p): Likewise.
3634 (ix86_mpx_bound_mode): Likewise.
3635 (ix86_make_bounds_constant): Likewise.
3636 (ix86_initialize_bounds): Likewise.
3637 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
3638 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
3639 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
3640 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
3641 (TARGET_CHKP_BOUND_MODE): Likewise.
3642 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
3643 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
3644 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
3645 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
3646 * config/i386/i386.h (TARGET_MPX): Likewise.
3647 (TARGET_MPX_P): Likewise.
3648 (VALID_BND_REG_MODE): Likewise.
3649 (FIRST_BND_REG): Likewise.
3650 (LAST_BND_REG): Likewise.
3651 (enum reg_class): Likewise.
3652 (BND_REG_P): Likewise.
3653 (BND_REGNO_P): Likewise.
3654 (BNDmode): Likewise.
3655 (ADJUST_INSN_LENGTH): Likewise.
3656 * config/i386/i386.md: Likewise.
3657 * config/i386/i386.opt: Likewise.
3658 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
3659 (defined): Likewise.
3660 (LINK_MPX): Likewise.
3661 (MPX_SPEC): Likewise.
3662 (LIBMPX_SPEC): Likewise.
3663 (LIBMPXWRAPPERS_SPEC): Likewise.
3664 (CHKP_SPEC): Likewise.
3665 * config/i386/predicates.md: Likewise.
3666 * dbxout.c (dbxout_type): Likewise.
3667 * doc/extend.texi: Likewise.
3668 * doc/invoke.texi: Likewise.
3669 * doc/md.texi: Likewise.
3670 * doc/tm.texi: Likewise.
3671 * doc/tm.texi.in: Likewise.
3672 * dwarf2out.c (is_base_type): Likewise.
3673 (gen_formal_types_die): Likewise.
3674 (gen_subprogram_die): Likewise.
3675 (gen_type_die_with_usage): Likewise.
3676 (gen_decl_die): Likewise.
3677 (dwarf2out_late_global_decl): Likewise.
3678 * expr.c (expand_assignment): Likewise.
3679 (emit_storent_insn): Likewise.
3680 (store_expr_with_bounds): Likewise.
3681 (store_expr): Likewise.
3682 (expand_expr_real_1): Likewise.
3683 * expr.h (store_expr_with_bounds): Likewise.
3684 * function.c (use_register_for_decl): Likewise.
3685 (struct bounds_parm_data): Likewise.
3686 (assign_parms_augmented_arg_list): Likewise.
3687 (assign_parm_find_entry_rtl): Likewise.
3688 (assign_parm_is_stack_parm): Likewise.
3689 (assign_parm_load_bounds): Likewise.
3690 (assign_bounds): Likewise.
3691 (assign_parms): Likewise.
3692 (expand_function_start): Likewise.
3693 * gcc.c (CHKP_SPEC): Likewise.
3694 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
3695 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
3696 (wrestrict_dom_walker::check_call): Likewise.
3697 * gimple.c (gimple_build_call_from_tree): Likewise.
3698 * gimple.h (enum gf_mask): Likewise.
3699 (gimple_call_with_bounds_p): Likewise.
3700 (gimple_call_set_with_bounds): Likewise.
3701 * gimplify.c (gimplify_init_constructor): Likewise.
3702 * ipa-cp.c (initialize_node_lattices): Likewise.
3703 (propagate_constants_across_call): Likewise.
3704 (find_more_scalar_values_for_callers_subset): Likewise.
3705 * ipa-hsa.c (process_hsa_functions): Likewise.
3706 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
3707 * ipa-icf.c (sem_function::merge): Likewise.
3708 * ipa-inline.c (early_inliner): Likewise.
3709 * ipa-pure-const.c (warn_function_noreturn): Likewise.
3710 (warn_function_cold): Likewise.
3711 (propagate_pure_const): Likewise.
3712 * ipa-ref.h (enum GTY): Likewise.
3713 * ipa-split.c (find_retbnd): Likewise.
3714 (consider_split): Likewise.
3715 (split_function): Likewise.
3716 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
3717 * ipa.c (walk_polymorphic_call_targets): Likewise.
3718 (symbol_table::remove_unreachable_nodes): Likewise.
3719 (process_references): Likewise.
3720 (cgraph_build_static_cdtor_1): Likewise.
3721 * lto-cgraph.c (lto_output_node): Likewise.
3722 (output_refs): Likewise.
3723 (compute_ltrans_boundary): Likewise.
3724 (input_overwrite_node): Likewise.
3725 (input_node): Likewise.
3726 (input_cgraph_1): Likewise.
3727 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
3728 * passes.c (pass_manager::execute_early_local_passes): Likewise.
3729 (class pass_chkp_instrumentation_passes): Likewise.
3730 (make_pass_chkp_instrumentation_passes): Likewise.
3731 * passes.def: Likewise.
3732 * rtl.h (struct GTY): Likewise.
3733 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
3734 * stor-layout.c (layout_type): Likewise.
3735 * symtab.c: Likewise.
3736 * target.def: Likewise.
3737 * targhooks.c (default_chkp_bound_type): Likewise.
3738 (default_chkp_bound_mode): Likewise.
3739 (default_builtin_chkp_function): Likewise.
3740 (default_chkp_function_value_bounds): Likewise.
3741 (default_chkp_make_bounds_constant): Likewise.
3742 (default_chkp_initialize_bounds): Likewise.
3743 * targhooks.h (default_chkp_bound_type): Likewise.
3744 (default_chkp_bound_mode): Likewise.
3745 (default_builtin_chkp_function): Likewise.
3746 (default_chkp_function_value_bounds): Likewise.
3747 (default_chkp_make_bounds_constant): Likewise.
3748 (default_chkp_initialize_bounds): Likewise.
3749 * toplev.c (compile_file): Likewise.
3750 (process_options): Likewise.
3751 * tree-core.h (DEF_BUILTIN): Likewise.
3752 (DEF_BUILTIN_CHKP): Likewise.
3753 * tree-inline.c (declare_return_variable): Likewise.
3754 (remap_gimple_stmt): Likewise.
3755 (copy_bb): Likewise.
3756 (initialize_inlined_parameters): Likewise.
3757 (expand_call_inline): Likewise.
3758 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
3759 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
3760 (make_pass_ipa_chkp_produce_thunks): Likewise.
3761 (make_pass_chkp): Likewise.
3762 (make_pass_chkp_opt): Likewise.
3763 (make_pass_chkp_instrumentation_passes): Likewise.
3764 * tree-pretty-print.c (dump_generic_node): Likewise.
3765 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
3766 * tree-ssa-dce.c (propagate_necessity): Likewise.
3767 (eliminate_unnecessary_stmts): Likewise.
3768 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
3769 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
3770 * tree-ssa-sccvn.h: Likewise.
3771 * tree-ssa-strlen.c (get_string_length): Likewise.
3772 (valid_builtin_call): Likewise.
3773 (adjust_last_stmt): Likewise.
3774 (handle_builtin_strchr): Likewise.
3775 (handle_builtin_strcpy): Likewise.
3776 (handle_builtin_stxncpy): Likewise.
3777 (handle_builtin_memcpy): Likewise.
3778 (handle_builtin_strcat): Likewise.
3779 (strlen_check_and_optimize_stmt): Likewise.
3780 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
3781 * tree-streamer-in.c: Likewise.
3782 * tree-streamer.c (record_common_node): Likewise.
3783 * tree.c (tree_code_size): Likewise.
3784 (wide_int_to_tree_1): Likewise.
3785 (type_contains_placeholder_1): Likewise.
3786 (build_common_tree_nodes): Likewise.
3787 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
3788 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
3789 (POINTER_BOUNDS_P): Likewise.
3790 (BOUNDED_TYPE_P): Likewise.
3791 (BOUNDED_P): Likewise.
3792 (CALL_WITH_BOUNDS_P): Likewise.
3793 (pointer_bounds_type_node): Likewise.
3794 * value-prof.c (gimple_ic): Likewise.
3795 * var-tracking.c (vt_add_function_parameters): Likewise.
3796 * varasm.c (make_decl_rtl): Likewise.
3797 (assemble_start_function): Likewise.
3798 (output_constant): Likewise.
3799 (maybe_assemble_visibility): Likewise.
3800 * varpool.c (ctor_for_folding): Likewise.
3801 * chkp-builtins.def: Remove.
3802 * ipa-chkp.c: Remove.
3803 * ipa-chkp.h: Remove.
3804 * rtl-chkp.c: Remove.
3805 * rtl-chkp.h: Remove.
3806 * tree-chkp-opt.c: Remove.
3807 * tree-chkp.c: Remove.
3808 * tree-chkp.h: Remove.
3810 2018-06-07 Carl Love <cel@us.ibm.com>
3812 * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
3813 vextract_fp_from_shortl): Add BE support.
3815 2018-06-07 Paul Koning <ni1d@arrl.net>
3817 * compare-elim.c (try_merge_compare): Don't merge compare if
3818 address contains a side effect.
3819 (try_eliminate_compare): Likewise.
3821 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
3823 * config.gcc: Support "tremont".
3824 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
3825 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3827 * config/i386/i386.c (m_TREMONT): Define.
3828 (processor_target_table): Add "tremont".
3829 (PTA_TREMONT): Define.
3830 (ix86_lea_outperforms): Add TARGET_TREMONT.
3831 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
3832 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
3833 and M_INTEL_GOLDMONT_PLUS.
3834 (fold_builtin_cpu): Add "tremont".
3835 (ix86_add_stmt_cost): Add TARGET_TREMONT.
3836 (ix86_option_override_internal): Add "tremont".
3837 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
3838 (processor_type): Add PROCESSOR_TREMONT.
3839 * config/i386/x86-tune.def: Add m_TREMONT.
3840 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
3842 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3844 * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
3845 symbol defined for msp430i* devices to be lower case.
3847 gcc/testsuite/gcc.target/msp430/
3848 * msp430i-device-symbol.c: New test.
3849 * msp430f-device-symbol.c: New test.
3850 * msp430.h: New test header file.
3852 2018-06-07 Richard Biener <rguenther@suse.de>
3854 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
3855 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
3856 Properly wrap signed arithmetic if overflow wraps.
3858 2018-06-07 Jakub Jelinek <jakub@redhat.com>
3860 PR tree-optimization/69615
3861 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
3862 of a cast from a same precision integral SSA_NAME in a bb dominated
3863 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
3864 cast to utype if rhs2 has already a compatible type.
3866 2018-06-07 Richard Biener <rguenther@suse.de>
3868 PR tree-optimization/85935
3869 * graphite-scop-detection.c (find_params_in_bb): Analyze
3870 condition operands with respect to the correct loop. Assert
3871 the analysis doesn't fail.
3873 2018-06-04 Carl Love <cel@us.ibm.com>
3875 * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
3876 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
3877 as it is slightly cheaper.
3878 (first_match_or_eos_index_<mode>):
3879 Calculate index using natural element order.
3880 (first_match_index_<mode>):
3881 Calculate index using natural element order.
3882 (first_match_or_eos_index_<mode>):
3883 Calculate index using natural order.
3884 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
3885 for BE and LE modes.
3886 * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
3887 P9V_BUILTIN_VCLZLSBB_V16QI.
3888 * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
3891 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
3893 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
3894 indentation and line wrap for many prototypes. Add missing
3895 @smallexample directives around block of prototypes for vec_xl and
3898 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
3900 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
3901 track if we pass or return IEEE 128-bit floating point.
3902 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
3903 C++ mangling that is compatible with GCC 8.1.
3904 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
3905 (init_cumulative_args): Note if we pass or return IEEE 128-bit
3906 floating point types.
3907 (rs6000_function_arg_advance_1): Likewise.
3908 (rs6000_mangle_type): Optionally generate mangled names that match
3909 what GCC 8.1 generated for IEEE 128-bit floating point types.
3910 (rs6000_globalize_decl_name): If we have an external function that
3911 passes or returns IEEE 128-bit types, generate a weak reference
3912 from the mangled name used in GCC 8.1 to the current mangled
3914 (rs6000_init_builtins): Make __ibm128 use the long double type if
3915 long double is IBM extended double. Make __float128 use the long
3916 double type if long double is IEEE 128-bit.
3919 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
3920 macro for __ibm128 built-in functions.
3921 (PACK_IF): Add __ibm128 pack/unpack functions.
3922 (UNPACK_IF): Likewise.
3923 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
3924 enable long double built-in functions if long double is IEEE
3925 128-bit floating point.
3926 (rs6000_invalid_builtin): Update long double built-in function
3928 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
3929 functions, adjust the built-in function to use the long double
3930 built-in function if __ibm128 and long double are the same type.
3931 * doc/extend.texi (PowerPC builtins): Update documention for
3932 __builtin_{,un}pack_longdouble. Add documentation for
3933 __builtin_{,un}pack_ibm128.
3935 2018-06-06 Jim Wilson <jimw@sifive.com>
3937 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
3938 (struct machine_function): New field interrupt_mode.
3939 (riscv_handle_type_attribute): New function. Add forward declaration.
3940 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
3941 (riscv_expand_epilogue): Check interrupt_mode field.
3942 (riscv_set_current_function): Check interrupt attribute args and
3943 set interrupt_mode field.
3944 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
3945 (riscv_sret, riscv_uret): New.
3946 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
3947 new arguments to interrupt attribute.
3949 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
3952 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
3953 Don't handle -mcpu=power8 if -mpower9-vector is also used.
3955 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
3957 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
3958 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
3959 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
3960 several redundant entries.
3962 2018-06-06 David Malcolm <dmalcolm@redhat.com>
3964 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
3965 type from "rtx" to "rtx_insn *".
3966 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
3967 for local "call_insn", removing cast.
3968 (ix86_expand_call): Likewise, introducing a "call_insn" local.
3970 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
3972 PR tree-optimization/86066
3973 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
3974 for BIT_INSERT_EXPR stores.
3976 2018-06-06 Richard Biener <rguenther@suse.de>
3978 PR tree-optimization/86062
3979 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
3980 component refs ontop
3981 of to be offsetted base.
3983 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3985 * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
3986 to be static and remove check on interrupt attribute name.
3988 gcc/testsuite/gcc.target/msp430/
3989 * function-attributes-4.c: New test.
3990 * static-interrupts.c: New test.
3992 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
3994 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
3995 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
3997 2018-06-05 Steve Ellcey <sellcey@cavium.com>
4000 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
4002 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
4003 Remove second argument, change how error is called.
4004 (aarch64_layout_arg): Remove second argument from
4005 aarch64_err_no_fpadvsimd call.
4006 (aarch64_init_cumulative_args): Ditto.
4007 (aarch64_gimplify_va_arg_expr): Ditto.
4008 * config/aarch64/aarch64.md (mov<mode>): Ditto.
4010 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
4012 * config/i386/i386.md (simple_return_indirect_internal): New expander.
4013 (*simple_return_indirect_internal<mode>): Rename from
4014 simple_return_indirect_internal. Use W mode iterator.
4015 (rstorssp): New expander.
4016 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
4017 (clrssbsy): New expander.
4018 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
4020 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
4022 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
4024 (cmse_check_pointed_object): Likewise.
4026 2018-06-05 Martin Liska <mliska@suse.cz>
4028 PR gcov-profile/47618
4029 * doc/invoke.texi: Document how -fprofile-dir format
4032 2018-06-05 Richard Biener <rguenther@suse.de>
4034 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
4035 removal pretend DOM info isn't available so we do not update
4036 it and only remove edges, not dominated blocks. Actually free
4037 DOM info in case we removed something. Remove unreachable blocks.
4038 (mfb_keep_latches): Work with either DOM info or marked backedges.
4039 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
4040 first. Mark backedges if DOM info isn't available.
4041 (Re-)compute DOM info after cleanup_control_flow_pre.
4043 2018-06-05 Richard Biener <rguenther@suse.de>
4045 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
4046 (locus_discrim_hasher::hash): Adjust.
4047 (locus_discrim_hasher::equal): Likewise.
4048 (next_discriminator_for_locus): Work on line directly.
4049 (same_line_p): Pass in expanded locus1 as well.
4050 (assign_discriminators): Avoid redundant location expansions.
4052 2018-06-05 Richard Biener <rguenther@suse.de>
4054 PR tree-optimization/86046
4055 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
4056 if required after clearing TREE_ADDRESSABLE.
4058 2018-06-05 Richard Biener <rguenther@suse.de>
4060 PR tree-optimization/86047
4061 * tree-ssa-loop.c (for_each_index): Glob handling of all
4062 decls and constants and really handle all of them.
4064 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4067 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
4068 qualifier_void_pointer and qualifier_const_void_pointer.
4069 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
4070 (arm_init_builtins): Handle the above.
4071 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
4072 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
4073 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
4076 2018-06-05 Martin Liska <mliska@suse.cz>
4078 * auto-profile.c (read_autofdo_file): Do not use
4079 gcov_ctr_summary struct.
4080 (afdo_callsite_hot_enough_for_early_inline): Likewise.
4081 * coverage.c (struct counts_entry): Likewise.
4082 (read_counts_file): Read just single summary entry.
4083 (get_coverage_counts): Use gcov_summary struct.
4084 * coverage.h (get_coverage_counts): Likewise.
4085 * gcov-dump.c (dump_working_sets): Likewise.
4086 (tag_summary): Dump just single summary.
4087 * gcov-io.c (gcov_write_summary): Write just histogram
4089 (gcov_read_summary): Read just single summary.
4090 (compute_working_sets): Use gcov_summary struct.
4091 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
4092 of GCOV_COUNTERS_SUMMABLE.
4093 (GCOV_COUNTERS_SUMMABLE): Remove.
4094 (GCOV_FIRST_VALUE_COUNTER): Replace with
4095 GCOV_COUNTER_V_INTERVAL.
4096 (struct gcov_ctr_summary): Remove.
4097 (struct gcov_summary): Directly use fields of former
4099 (compute_working_sets): Use gcov_summary struct.
4100 * gcov.c (read_count_file): Do not use ctrs fields.
4101 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
4103 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
4105 * profile.c: Likewise.
4106 * profile.h: Likewise.
4108 2018-06-05 Martin Liska <mliska@suse.cz>
4110 PR gcov-profile/84846
4111 * gcov.c (output_lines): Print working directory only
4112 in intermediate format.
4114 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
4116 * config/s390/s390-builtin-types.def: Add void function type.
4117 * config/s390/s390-builtins.def: Use the function type for the
4120 2018-06-04 Jim Wilson <jimw@sifive.com>
4122 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
4124 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
4125 and maybe_eh_return. Change regno to unsigned int. Use new args to
4126 handle EH_RETURN_DATA_REGNO registers properly.
4127 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
4128 (riscv_expand_epilogue): Update comment. Change argument name and
4129 type. Update code to use new name and type. Pass new args to
4130 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
4132 * config/riscv/riscv.md (NORMAL_RETURN): New.
4133 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
4134 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
4135 (eh_return): Call gen_eh_return_internal and emit barrier.
4136 (eh_return_internal): Call riscv_expand_epilogue.
4138 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
4140 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
4141 bit_insertion field and declare can_be_merged_into method.
4142 (merged_store_group::can_be_merged_into): New method.
4143 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
4144 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
4145 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
4147 2018-06-04 Richard Biener <rguenther@suse.de>
4149 PR tree-optimization/85955
4150 * builtins.c (fold_builtin_sincos): Convert pointers to
4151 destination to appropriate type before dereferencing.
4153 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
4155 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
4157 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
4159 * expr.c (expand_expr_real_1): Force the operand into memory if
4160 its TYPE_MODE is BLKmode and if there is no integer mode for
4161 the number of bits being extracted.
4163 2018-06-04 Jakub Jelinek <jakub@redhat.com>
4167 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
4168 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
4170 2018-06-04 Richard Biener <rguenther@suse.de>
4172 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
4173 (cleanup_tree_cfg_noloop): ... single caller. Do
4174 start_recording_case_labels later.
4176 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
4178 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
4179 to _IMMINTRIN_H_INCLUDED.
4180 * config/i386/pconfigintrin.h: Ditto.
4181 * config/i386/waitpkgintrin.h: Ditto.
4182 * config/i386/immintrin.h: Add includes for sgxintrin.h,
4183 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
4184 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
4185 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
4186 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
4187 waitpkgintrin.h and cldemoteintrin.h.
4189 2018-06-04 Richard Biener <rguenther@suse.de>
4191 PR tree-optimization/86038
4192 * tracer.c (find_best_successor): Check probability for
4193 being initialized, bail out if not.
4195 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
4198 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
4199 of bits to ignore when comparing architectures.
4201 2018-06-04 Jakub Jelinek <jakub@redhat.com>
4203 PR tree-optimization/69615
4204 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
4205 maximum or minimum of the type, try to merge it also as if
4206 range1 is + [-, x - 1] or + [x + 1, -].
4209 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
4211 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
4213 PR tree-optimization/86034
4214 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
4215 the unsigned bitfield type in a bit insertion sequence if it does not
4216 have a larger precision than the bitfield size.
4217 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
4219 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
4221 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
4223 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
4225 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
4226 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
4227 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
4228 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
4230 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
4232 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
4233 Disable -fdelete-null-pointer-checks for ELF toolchain.
4235 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
4236 Kito Cheng <kito.cheng@gmail.com>
4238 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
4239 (nds32le-*-*, nds32be-*-*): Integrate checking process.
4240 (nds32*-*-*): Add glibc and uclibc conditions.
4241 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
4242 (TARGET_EXCEPT_UNWIND_INFO): Define.
4243 * config/nds32/elf.h: New file.
4244 * config/nds32/linux.h: New file.
4245 * config/nds32/nds32-elf.opt: New file.
4246 * config/nds32/nds32-linux.opt: New file.
4247 * config/nds32/nds32-fp-as-gp.c
4248 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
4249 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
4251 (nds32_asm_file_end): Ditto.
4252 (nds32_print_operand): Ditto.
4253 (nds32_insert_attributes): Ditto.
4254 (nds32_init_libfuncs): New function.
4255 (TARGET_HAVE_TLS): Define.
4256 (TARGET_INIT_LIBFUNCS): Define.
4257 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
4259 (TARGET_ELF): Apply different mcmodel setting.
4260 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
4261 been migrated into elf.h and linux.h files.
4262 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
4263 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
4264 (mcmodel): The content has been migrated into nds32-elf.opt and
4265 nds32-linux.opt files.
4266 * config/nds32/t-elf: New file.
4267 * config/nds32/t-linux: New file.
4269 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
4270 Shiva Chen <shiva0217@gmail.com>
4272 * config/nds32/constants.md (unspec_volatile_element): Add
4273 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
4274 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
4276 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
4277 (make_pass_nds32_fp_as_gp): Declare.
4278 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
4280 (nds32_asm_function_end_prologue): Remove unused asm output.
4281 (nds32_asm_function_begin_epilogue): Remove unused asm output.
4282 (nds32_asm_file_start): Output necessary fp_as_gp information.
4283 (nds32_option_override): Adjust register usage.
4284 (nds32_expand_prologue): Consider fp_as_gp situation.
4285 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
4286 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
4289 (simple_return): Ditto.
4290 (omit_fp_begin): Output special directive for fp_as_gp.
4291 (omit_fp_end): Output special directive for fp_as_gp.
4292 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
4293 mforbid-fp-as-gp): New options.
4295 2018-06-01 Mark Wielaard <mark@klomp.org>
4297 * dwarf2out.c (dwarf2out_finish): Remove generation of
4298 DW_AT_loclists_base.
4300 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4302 * gimple-ssa-store-merging.c: Include gimple-fold.h.
4303 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
4304 (struct merged_store_group): Add bit_insertion field.
4305 (dump_char_array): Use standard hexadecimal format.
4306 (merged_store_group::merged_store_group): Set bit_insertion to false.
4307 (merged_store_group::apply_stores): Use optimal buffer size. Deal
4308 with BIT_INSERT_EXPR stores. Move up code updating the mask and
4309 also print the mask in the dump file.
4310 (pass_store_merging::gate): Minor tweak.
4311 (imm_store_chain_info::coalesce_immediate): Fix wrong association
4312 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
4313 stores with INTEGER_CST stores.
4314 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
4315 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
4316 and use it throughout. Generate bit insertion sequences if need be.
4317 (pass_store_merging::process_store): Remove redundant condition.
4318 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
4320 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
4322 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
4323 the 128-bit floating point types. Fix function comment.
4325 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4327 * config/aarch64/aarch64-simd.md
4328 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
4330 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
4333 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
4335 PR tree-optimization/85989
4336 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
4338 (backprop::intersect_uses): Check it when deciding whether this
4339 is a backedge reference.
4340 (backprop::process_block): Add each phi to m_visited_phis
4341 after visiting it, then clear it at the end.
4343 2018-06-01 Richard Biener <rguenther@suse.de>
4345 * tree-vectorizer.h (vect_dr_stmt): New function.
4346 (vect_get_load_cost): Adjust.
4347 (vect_get_store_cost): Likewise.
4348 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
4349 Use vect_dr_stmt instead of DR_SMTT.
4350 (vect_record_base_alignments): Likewise.
4351 (vect_calculate_target_alignment): Likewise.
4352 (vect_compute_data_ref_alignment): Likewise and make static.
4353 (vect_update_misalignment_for_peel): Likewise.
4354 (vect_verify_datarefs_alignment): Likewise.
4355 (vector_alignment_reachable_p): Likewise.
4356 (vect_get_data_access_cost): Likewise. Pass down
4357 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
4358 (vect_get_peeling_costs_all_drs): Likewise.
4359 (vect_peeling_hash_get_lowest_cost): Likewise.
4360 (vect_enhance_data_refs_alignment): Likewise.
4361 (vect_find_same_alignment_drs): Likewise.
4362 (vect_analyze_data_refs_alignment): Likewise.
4363 (vect_analyze_group_access_1): Likewise.
4364 (vect_analyze_group_access): Likewise.
4365 (vect_analyze_data_ref_access): Likewise.
4366 (vect_analyze_data_ref_accesses): Likewise.
4367 (vect_vfa_segment_size): Likewise.
4368 (vect_small_gap_p): Likewise.
4369 (vectorizable_with_step_bound_p): Likewise.
4370 (vect_prune_runtime_alias_test_list): Likewise.
4371 (vect_analyze_data_refs): Likewise.
4372 (vect_supportable_dr_alignment): Likewise.
4373 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4374 (vect_gen_prolog_loop_niters): Likewise.
4375 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4376 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
4378 (vect_recog_mask_conversion_pattern): Likewise.
4379 (vect_try_gather_scatter_pattern): Likewise.
4380 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
4381 to vect_get_store_cost.
4382 (vect_get_store_cost): Get stmt_info instead of DR.
4383 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
4384 (vect_get_load_cost): Get stmt_info instead of DR.
4386 2018-06-01 Richard Biener <rguenther@suse.de>
4389 * gimple-fold.c (var_decl_component_p): Also allow offsetted
4390 vars wrapped in MEM_REFs.
4392 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
4394 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
4395 Fix subreg tests so that we only return a choice between
4396 GENERAL_REGS and FP_REGS if the original classes included both.
4398 2018-06-01 Richard Biener <rguenther@suse.de>
4401 * tree-ssa-structalias.c (get_function_part_constraint):
4402 Handle NULL fi->decl.
4403 (find_func_aliases_for_call): Properly handle indirect
4404 fi from direct call.
4405 (find_func_clobbers): Likewise.
4406 (ipa_pta_execute): Likewise.
4407 (create_variable_info_for): For functions that are ifunc_resolver
4408 resolve to a varinfo that contains the result of the resolver call.
4409 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
4412 2018-05-31 Michael Collison <michael.collison@arm.com>
4414 * config/aarch64/aarch64.md:
4415 (*fix_to_zero_extenddfdi2): New pattern.
4416 * gcc.target/aarch64/fix_extend1.c: New testcase.
4418 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
4422 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
4423 and BUILT_IN_STRNCMP_EQ.
4424 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
4425 BUILT_IN_STRNCMP_EQ.
4426 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
4427 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
4428 (gimple_fold_builtin): Likewise.
4429 * tree-ssa-strlen.c (compute_string_length): New function.
4430 (determine_min_obsize): New function.
4431 (handle_builtin_string_cmp): New function to handle calls to
4432 string compare functions.
4433 (strlen_optimize_stmt): Add handling to builtin string compare
4435 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
4436 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
4437 * tree.c (build_common_builtin_nodes): Add new defines of
4438 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
4440 2018-05-31 Jakub Jelinek <jakub@redhat.com>
4443 * bb-reorder.c (pass_partition_blocks::gate): Return false for
4444 functions with naked attribute.
4446 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4448 * config/i386/sse.md (avx_vec_concat<mode>):
4449 Substitute concat_tg_mode mode attribute with xtg_mode.
4450 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
4451 (concat_tg_mode): Remove mode attribute.
4453 2018-05-31 Martin Sebor <msebor@redhat.com>
4456 * calls.c (alloc_max_size): Correct a logic error/typo.
4457 Treat excessive arguments as infinite. Warn for invalid arguments.
4458 * doc/invoke.texi (-Walloc-size-larger-than): Update.
4460 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
4463 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
4464 and movx for Haswell.
4466 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
4467 Cesar Philippidis <cesar@codesourcery.com>
4470 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
4471 when emitting error on private/firstprivate reductions.
4472 * omp-low.c (lower_omp_target): Avoid reference-type processing
4473 on pointers for firstprivate clause.
4475 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4477 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
4480 * config/aarch64/aarch64-simd.md
4481 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
4482 (aarch64_ld1_x3_<mode>): Likewise
4483 (aarch64_st1x2<VALLDIF:mode>): Likewise
4484 (aarch64_st1_x2_<mode>): Likewise
4485 (aarch64_st1x3<VALLDIF:mode>): Likewise
4486 (aarch64_st1_x3_<mode>): Likewise
4487 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
4488 (vld1_s8_x3): Likewise.
4489 (vld1_u16_x3): Likewise.
4490 (vld1_s16_x3): Likewise.
4491 (vld1_u32_x3): Likewise.
4492 (vld1_s32_x3): Likewise.
4493 (vld1_u64_x3): Likewise.
4494 (vld1_s64_x3): Likewise.
4495 (vld1_f16_x3): Likewise.
4496 (vld1_f32_x3): Likewise.
4497 (vld1_f64_x3): Likewise.
4498 (vld1_p8_x3): Likewise.
4499 (vld1_p16_x3): Likewise.
4500 (vld1_p64_x3): Likewise.
4501 (vld1q_u8_x3): Likewise.
4502 (vld1q_s8_x3): Likewise.
4503 (vld1q_u16_x3): Likewise.
4504 (vld1q_s16_x3): Likewise.
4505 (vld1q_u32_x3): Likewise.
4506 (vld1q_s32_x3): Likewise.
4507 (vld1q_u64_x3): Likewise.
4508 (vld1q_s64_x3): Likewise.
4509 (vld1q_f16_x3): Likewise.
4510 (vld1q_f32_x3): Likewise.
4511 (vld1q_f64_x3): Likewise.
4512 (vld1q_p8_x3): Likewise.
4513 (vld1q_p16_x3): Likewise.
4514 (vld1q_p64_x3): Likewise.
4515 (vst1_s64_x2): Likewise.
4516 (vst1_u64_x2): Likewise.
4517 (vst1_f64_x2): Likewise.
4518 (vst1_s8_x2): Likewise.
4519 (vst1_p8_x2): Likewise.
4520 (vst1_s16_x2): Likewise.
4521 (vst1_p16_x2): Likewise.
4522 (vst1_s32_x2): Likewise.
4523 (vst1_u8_x2): Likewise.
4524 (vst1_u16_x2): Likewise.
4525 (vst1_u32_x2): Likewise.
4526 (vst1_f16_x2): Likewise.
4527 (vst1_f32_x2): Likewise.
4528 (vst1_p64_x2): Likewise.
4529 (vst1q_s8_x2): Likewise.
4530 (vst1q_p8_x2): Likewise.
4531 (vst1q_s16_x2): Likewise.
4532 (vst1q_p16_x2): Likewise.
4533 (vst1q_s32_x2): Likewise.
4534 (vst1q_s64_x2): Likewise.
4535 (vst1q_u8_x2): Likewise.
4536 (vst1q_u16_x2): Likewise.
4537 (vst1q_u32_x2): Likewise.
4538 (vst1q_u64_x2): Likewise.
4539 (vst1q_f16_x2): Likewise.
4540 (vst1q_f32_x2): Likewise.
4541 (vst1q_f64_x2): Likewise.
4542 (vst1q_p64_x2): Likewise.
4543 (vst1_s64_x3): Likewise.
4544 (vst1_u64_x3): Likewise.
4545 (vst1_f64_x3): Likewise.
4546 (vst1_s8_x3): Likewise.
4547 (vst1_p8_x3): Likewise.
4548 (vst1_s16_x3): Likewise.
4549 (vst1_p16_x3): Likewise.
4550 (vst1_s32_x3): Likewise.
4551 (vst1_u8_x3): Likewise.
4552 (vst1_u16_x3): Likewise.
4553 (vst1_u32_x3): Likewise.
4554 (vst1_f16_x3): Likewise.
4555 (vst1_f32_x3): Likewise.
4556 (vst1_p64_x3): Likewise.
4557 (vst1q_s8_x3): Likewise.
4558 (vst1q_p8_x3): Likewise.
4559 (vst1q_s16_x3): Likewise.
4560 (vst1q_p16_x3): Likewise.
4561 (vst1q_s32_x3): Likewise.
4562 (vst1q_s64_x3): Likewise.
4563 (vst1q_u8_x3): Likewise.
4564 (vst1q_u16_x3): Likewise.
4565 (vst1q_u32_x3): Likewise.
4566 (vst1q_u64_x3): Likewise.
4567 (vst1q_f16_x3): Likewise.
4568 (vst1q_f32_x3): Likewise.
4569 (vst1q_f64_x3): Likewise.
4570 (vst1q_p64_x3): Likewise.
4572 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4574 * config/msp430/msp430.c (msp430_output_labelref): Prepend
4575 user_label_prefix to name.
4577 * tree-core.h: Update comment about the format of NAME string
4578 passed to handler in attribute_spec.
4580 * config/msp430/msp430.md: Remove erroneous subreg expression from
4581 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
4582 zero_extend{q,h}isi2.
4584 2018-05-30 Borislav Petkov <bp@suse.de>
4586 * doc/extend.texi: Document some architecture specific
4587 constraints and sort entries.
4589 2018-05-30 Martin Sebor <msebor@redhat.com>
4592 * builtins.c (expand_builtin_stpcpy_1): New function.
4593 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
4594 only if the former succeeds.
4596 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4598 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
4601 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
4603 * doc/invoke.texi (-flinker-output): Document
4605 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
4607 * passes.c (ipa_write_summaries): Only modify statements if body
4609 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
4610 incrementally linking.
4611 (ipa_passes): Likewise.
4612 * lto-cgraph.c (lto_output_node): When incrementally linking do not
4613 pass down resolution info.
4614 * common.opt (flag_incremental_link): Update info.
4615 * gcc.c (plugin specs): Turn flinker-output=* to
4616 -plugin-opt=-linker-output-known
4617 * toplev.c (compile_file): Also cut compilation when doing incremental
4619 * flag-types. (enum lto_partition_model): Add
4620 LTO_LINKER_OUTPUT_NOLTOREL.
4621 (invoke.texi): Add -flinker-output docs.
4622 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
4623 link same way as WPA; do not stream in dead initializers.
4625 * dwarf2out.c (dwarf2out_die_ref_for_decl,
4626 darf2out_register_external_decl): Support incremental link.
4628 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
4630 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
4632 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
4634 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
4635 it down to simple_object_copy_lto_debug_sections.
4636 (run_gcc): Determine incremental LTO link time and configure
4637 lto1 into non-wpa mode, disable renaming of debug sections.
4639 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
4641 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
4642 descriptions of various incorrectly documented functions.
4644 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
4647 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4648 address check not strict.
4650 2018-05-30 Richard Biener <rguenther@suse.de>
4652 PR tree-optimization/85964
4653 * tracer.c (better_p): Drop initialized count check, we only
4654 call the function with initialized counts now.
4655 (find_best_successor): Do find a best edge if one
4656 has uninitialized count.
4657 (find_best_predecessor): Likewise. Do BB frequency check only
4658 if count is initialized.
4660 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
4662 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
4663 (aarch64_ldrstr_offset_compare): New.
4664 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
4665 load/store orderings.
4666 (aarch64_gen_adjusted_ldpstp): Likewise.
4668 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
4670 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
4671 Check for subset of GENERAL_REGS and FP_REGS.
4672 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
4675 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
4677 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
4678 and wi::to_poly_offset. Add the current offset and then check
4679 whether the sum fits, rather than using an unchecked addition of
4680 a checked term. Check for a shwi rather than a uhwi.
4681 * expr.c (get_bit_range): Use tree_to_poly_uint64.
4682 (store_constructor): Use poly_int_tree_p.
4683 (expand_expr_real_1): Likewise.
4684 * function.c (assign_temp): Likewise.
4685 * fold-const.c (const_binop): Use poly_int_tree_p and
4687 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
4689 * ipa-icf-gimple.c (func_checker::compare_operand): Use
4690 to_poly_offset for MEM offsets.
4691 * ipa-icf.c (sem_variable::equals): Likewise.
4692 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
4693 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
4694 wi::to_poly_offset for BIT_FIELD_REF offsets.
4695 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
4697 * var-tracking.c (emit_note_insn_var_location): Use
4698 tree_to_poly_uint64.
4700 2018-05-29 Jim Wilson <jimw@sifive.com>
4702 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
4704 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
4707 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
4708 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
4710 (sse4_1_round<mode>2): Use nonimmediate_operand
4711 for operand 1 predicate.
4713 2018-05-29 Martin Sebor <msebor@redhat.com>
4714 Richard Biener <rguenther@suse.de>
4717 * calls.c (get_size_range): Call determine_value_range instead
4718 of get_value_range..
4719 * tree-vrp.h (determine_value_range): Declared new function.
4720 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
4722 2018-05-29 Richard Biener <rguenther@suse.de>
4724 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
4725 sure to use non-pattern stmts for get_earlier_stmt arguments.
4726 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
4727 called on pattern stmts.
4728 (get_later_stmt): Likewise.
4730 2018-05-29 Martin Liska <mliska@suse.cz>
4732 PR gcov-profile/85759
4733 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
4736 2018-05-29 Jakub Jelinek <jakub@redhat.com>
4738 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
4740 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
4744 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
4745 VEC_PACK_FLOAT_EXPR): New tree codes.
4746 * tree-pretty-print.c (op_code_prio): Handle
4747 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
4748 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
4749 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
4750 * tree-inline.c (estimate_operator_cost): Likewise.
4751 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
4752 * fold-const.c (const_binop): Likewise.
4753 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
4754 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
4755 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4756 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
4757 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
4758 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
4759 * expr.c (expand_expr_real_2): Likewise.
4760 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
4761 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
4762 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
4764 * optabs.c (expand_widen_pattern_expr): For
4765 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
4766 sign from result type rather than operand's type.
4767 (expand_binop_directly): For vec_packu_float_optab and
4768 vec_packs_float_optab allow result type to be different from operand's
4770 * optabs-tree.c (optab_for_tree_code): Handle
4771 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
4772 VEC_PACK_FLOAT_EXPR. Formatting fixes.
4773 * tree-vect-generic.c (expand_vector_operations_1): Handle
4774 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
4775 VEC_PACK_FLOAT_EXPR.
4776 * tree-vect-stmts.c (supportable_widening_operation): Handle
4778 (supportable_narrowing_operation): Handle FLOAT_EXPR.
4779 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
4780 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
4781 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
4782 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
4784 (vec_pack<floatprefix>_float_<mode>): New expander.
4785 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
4787 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
4788 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
4789 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
4790 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
4791 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
4793 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
4794 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
4795 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
4796 VEC_PACK_FLOAT_EXPR): Document.
4798 2018-05-29 Richard Biener <rguenther@suse.de>
4800 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
4802 (stmt_vec_info_vec): Make pointer.
4803 (init_stmt_vec_info_vec): Remove.
4804 (free_stmt_vec_info_vec): Likewise.
4805 (set_stmt_vec_info_vec): New function.
4806 (free_stmt_vec_infos): Likewise.
4807 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
4808 (set_vinfo_for_stmt): Likewise.
4809 (get_earlier_stmt): Likewise.
4810 (get_later_stmt): Likewise.
4811 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
4812 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
4813 (vec_info::~vec_info): Free stmt_vec_infos.
4814 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
4815 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
4816 (pass_slp_vectorize::execute): Likewise.
4817 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
4818 (free_stmt_vec_info_vec): Likewise.
4819 (set_stmt_vec_info_vec): New function.
4820 (free_stmt_vec_infos): Likewise.
4821 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
4822 the global stmt_vec_info_vec.
4823 * tree-parloops.c (gather_scalar_reductions): Use
4824 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
4827 2018-05-29 Richard Biener <rguenther@suse.de>
4829 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
4831 2018-05-29 Martin Liska <mliska@suse.cz>
4832 David Malcolm <dmalcolm@redhat.com>
4834 * vec.c (test_reverse): New.
4835 (vec_c_tests): Add new test.
4836 * vec.h (vl_ptr>::reverse): New function.
4838 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
4840 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
4842 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
4845 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4847 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
4849 2018-05-28 Richard Biener <rguenther@suse.de>
4851 PR tree-optimization/85933
4852 * tree-vect-data-refs.c (vect_record_base_alignments): Only
4853 look at stmts marked as vectorizable.
4855 2018-05-28 Richard Biener <rguenther@suse.de>
4857 PR tree-optimization/85934
4858 * tree-vect-generic.c (expand_vector_operations_1): Hoist
4859 vector boolean check before scalar optimization.
4861 2018-05-28 Jakub Jelinek <jakub@redhat.com>
4863 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
4866 2018-05-28 Mark Wielaard <mark@klomp.org>
4868 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
4869 if it is an expression containing a minus sign.
4871 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
4873 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
4875 2018-05-27 Paul Koning <ni1d@arrl.net>
4877 * config/pdp11/pdp11.md (truncsihi2): Remove.
4879 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
4880 Chung-Ju Wu <jasonwucj@gmail.com>
4882 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
4884 (unaligned_store_dw): Ditto.
4885 * config/nds32/nds32-memory-manipulation.c
4886 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
4887 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
4888 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
4889 (emit_setmem_word_loop): Rename to ...
4890 (emit_setmem_doubleword_loop): ... this.
4891 (nds32_gen_dup_4_byte_to_word_value): New function.
4892 (nds32_gen_dup_8_byte_to_double_word_value): New function.
4893 (nds32_expand_setmem_loop): Refine implementation.
4894 (nds32_expand_setmem_loop_v3m): Ditto.
4895 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
4898 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
4900 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
4902 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
4904 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
4905 (nds32_init_machine_status): Initialize machine->attr_naked_p and
4906 machine->attr_no_prologue_p.
4907 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
4908 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
4909 (nds32_expand_epilogue): Consider attr_naked_p.
4910 (nds32_expand_epilogue_v3pop): Likewise.
4911 (nds32_can_use_return_insn): Likewise.
4912 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
4913 attr_no_prologue_p fields.
4914 * config/nds32/nds32.opt (mret-in-naked-func): New option.
4916 2018-05-27 Jakub Jelinek <jakub@redhat.com>
4919 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
4921 * config/i386/sse.md
4922 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
4924 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
4926 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
4928 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
4930 (*<floatsuffix>floatv2div2sf2): Rename to ...
4931 (*float<floatunssuffix>v2div2sf2): ... this.
4932 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
4933 (float<floatunssuffix>v2div2sf2_mask): ... this.
4934 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
4935 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
4936 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
4938 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
4940 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
4942 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
4944 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
4946 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
4948 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
4949 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
4950 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
4951 gen_ufix_truncv8dfv8si2.
4952 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
4953 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
4954 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
4955 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
4956 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
4957 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
4958 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
4959 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
4961 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
4965 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
4967 2018-05-25 Jim Wilson <jimw@sifive.com>
4969 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
4970 * config/riscv/riscv.c (struct machine_function): Add
4971 interrupt_handler_p and attribute_checked_p fields.
4972 (riscv_attribute_table): Add interrupt.
4973 (riscv_interrupt_type_p): New.
4974 (riscv_save_reg_p): Save extra regs for interrupt handler.
4975 (riscv_use_save_libcall): Return false for interrupt handler.
4976 (riscv_first_stack_step): Add forward declaration.
4977 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
4978 for interrupt handler with large frame. Use it for saved reg list.
4979 (riscv_expand_prologue): Move flag_stack_usage_info support to
4980 eliminate duplication.
4981 (riscv_expand_epilogue): Generate mret for interrupt handler.
4982 (riscv_epilogue_uses): New.
4983 (riscv_can_use_return_insn): Return false for interrupt handler.
4984 (riscv_function_ok_for_sibcall): Likewise.
4985 (riscv_set_current_function): Add interrupt handler support.
4986 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
4987 * config/riscv/riscv.md (UNSPECV_MRET): New.
4989 (riscv_frflags, riscv_fsflags): Use tab after opcode.
4991 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
4993 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
4995 PR tree-optimization/85712
4996 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
4997 this candidate has already been replaced in-situ by a copy.
4999 2018-05-25 Jason Merrill <jason@redhat.com>
5001 PR c++/80485 - inline function non-zero address.
5002 * symtab.c (nonzero_address): Check DECL_COMDAT.
5004 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
5007 * config/alpha/alpha.md (ashlsi3): New insn pattern.
5008 (*ashlsi_se): Rename from *ashldi_se. Define as sign
5009 extension of SImode operation. Use const123_operand predicate.
5010 (*saddsi_1): Remove.
5011 (*saddl_se_1): Ditto.
5013 (*ssubl_se_1): Ditto.
5014 * config/alpha/predicates.md (const123_operand): New predicate.
5015 * config/alpha/constraints.md (P): Use IN_RANGE.
5017 2018-05-25 Richard Biener <rguenther@suse.de>
5019 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
5021 (ref_maybe_used_by_stmt_p): Likewise.
5022 (stmt_may_clobber_ref_p): Likewise.
5023 (stmt_may_clobber_ref_p_1): Likewise.
5024 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
5026 (ref_maybe_used_by_stmt_p): Likewise.
5027 (stmt_may_clobber_ref_p): Likewise.
5028 (stmt_may_clobber_ref_p_1): Likewise.
5029 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
5030 the alias oracle to disambiguate DRs with stmts DR analysis
5032 (vect_analyze_data_refs): Do not give up on not analyzable
5033 DRs for BB vectorization. Remove code truncating the dataref
5036 2018-05-25 Jakub Jelinek <jakub@redhat.com>
5039 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5040 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
5041 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
5043 2018-05-25 Richard Biener <rguenther@suse.de>
5045 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
5046 function, combining stmt data ref gathering and fatal analysis
5048 (vect_analyze_data_refs): Remove now redudnant code and simplify.
5049 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
5050 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
5051 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
5052 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
5054 2018-05-25 Bin Cheng <bin.cheng@arm.com>
5056 PR tree-optimization/85720
5057 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
5058 SCC if all partitions are builtins.
5059 (version_loop_by_alias_check): New parameter. Generate cancelable
5060 runtime alias check if all partitions are builtins.
5061 (distribute_loop): Update call to above function.
5063 2018-05-25 Bin Cheng <bin.cheng@arm.com>
5065 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
5066 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
5067 (parm_default_def_partition_arg): Ditto.
5068 (set_parm_default_def_partition): Ditto.
5069 (get_parm_default_def_partitions): Ditto and make it static.
5070 (get_undefined_value_partitions): Ditto and make it static.
5071 (remove_ssa_form): Refactor call to init_var_map here.
5072 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
5073 computation for loop region.
5074 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
5075 (register_default_def): Delete.
5076 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
5077 (parm_default_def_partition_arg): Ditto.
5078 (set_parm_default_def_partition): Ditto.
5079 (get_parm_default_def_partitions): Ditto and make it static.
5080 (get_undefined_value_partitions): Ditto and make it static.
5081 (coalesce_with_default, coalesce_with_default): Update comment.
5082 (create_coalesce_list_for_region): New func factored out from
5083 create_outofssa_var_map.
5084 (populate_coalesce_list_for_outofssa): New func factored out from
5085 create_outofssa_var_map and coalesce_ssa_name.
5086 (create_outofssa_var_map): Delete.
5087 (coalesce_ssa_name): Refactor to support live range computation.
5088 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
5089 (get_parm_default_def_partitions): Delete.
5090 (get_undefined_value_partitions): Ditto.
5091 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
5092 computation for loop region.
5093 (new_tree_live_info, loe_visit_block): Ditto.
5094 (live_worklist, set_var_live_on_entry): Ditto.
5095 (calculate_live_on_exit, verify_live_on_entry): Ditto.
5096 * tree-ssa-live.h (struct _var_map): New fields.
5097 (init_var_map): Change decl.
5098 (region_contains_p): New.
5100 2018-05-25 Bin Cheng <bin.cheng@arm.com>
5102 * tree-ssa-live.h (live_merge_and_clear): Delete.
5104 2018-05-25 Richard Biener <rguenther@suse.de>
5107 * tree-dump.c (dequeue_and_dump): Remove access to removed
5108 operand 2 of a SWITCH_EXPR.
5110 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5112 * doc/sourcebuild.texi (vect_double_cond_arith): Include
5113 multiplication and division.
5114 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
5115 (cond_udiv@var{m}, cond_umod@var{m}): Document.
5116 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
5117 (cond_udiv_optab, cond_umod_optab): New optabs.
5118 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
5119 (IFN_COND_RDIV): New internal functions.
5120 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
5121 TRUNC_MOD_EXPR and RDIV_EXPR.
5122 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
5123 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
5125 (SVE_INT_BINARY): Include mult.
5126 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
5127 (optab, sve_int_op): Handle mult.
5128 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
5130 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
5131 for SVE_INT_BINARY_SD.
5133 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5135 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
5136 (optab, sve_int_op): Handle div and udiv.
5137 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
5138 for SVE_INT_BINARY_SD.
5139 (*<optab><mode>3): New insn for the same.
5141 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5143 * tree-vect-patterns.c: Include predict.h.
5144 (vect_recog_divmod_pattern): Restrict check for division support
5145 to when optimizing for size.
5147 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5149 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
5150 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
5151 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
5152 (gimple_match_op::set_op): Likewise.
5153 (gimple_resimplify4): Declare.
5154 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
5155 (expr::gen_transform): Likewise.
5156 (decision_tree::gen): Generate a simplification routine for 4 operands.
5157 * gimple-match-head.c (gimple_simplify): Add an overload for
5158 4 operands. In the top-level function, handle up to 4 call
5159 arguments and call gimple_resimplify4.
5160 (gimple_resimplify4): New function.
5161 (build_call_internal): Pass a fourth operand.
5162 (maybe_push_to_seq): Likewise.
5163 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
5164 Fold VEC_COND_EXPRs of an operation and a default value into
5165 an IFN_COND_* function if possible.
5166 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
5168 (SVE_COND_FP_BINARY): Include them.
5169 (optab, sve_fp_op): Handle them.
5170 (SVE_INT_BINARY_REV): New code iterator.
5171 (SVE_COND_FP_BINARY_REV): New int iterator.
5172 (commutative): New int attribute.
5173 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
5175 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
5177 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
5178 (*cond_<optab><mode>): New patterns for reversed operands.
5180 2018-05-25 Richard Biener <rguenther@suse.de>
5182 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
5183 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
5184 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
5185 (STMT_VINFO_GROUPED_ACCESS): Adjust.
5186 * tree-vect-data-refs.c (everywhere): Adjust users.
5187 * tree-vect-loop.c (everywhere): Likewise.
5188 * tree-vect-slp.c (everywhere): Likewise.
5189 * tree-vect-stmts.c (everywhere): Likewise.
5190 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
5192 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5194 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
5196 (gcc_cv_as_section_exclude): ... this.
5197 Try Solaris as #exclude syntax.
5198 * configure: Regenerate.
5199 * config.in: Regenerate.
5200 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
5202 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
5203 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
5205 * varasm.c (default_elf_asm_named_section): Don't check if
5206 HAVE_GAS_SECTION_EXCLUDE is defined.
5208 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5210 * doc/md.texi: Update the documentation of the cond_* optabs
5211 to mention the new final operand. Fix GET_MODE_NUNITS call.
5212 Describe the scalar case too.
5213 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
5214 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
5216 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
5217 (get_conditional_internal_fn): Update comment.
5218 * tree-vect-loop.c (vectorizable_reduction): Pass the original
5219 accumulator value as a final argument to conditional functions.
5220 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
5221 a define_expand and add an "else" operand. Assert for now that
5222 the else operand is equal to operand 2. Use SVE_INT_BINARY and
5223 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
5224 (*cond_<optab><mode>): New patterns.
5225 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
5226 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
5227 (UNSPEC_COND_EOR): Delete.
5228 (optab): Remove associated mappings.
5229 (SVE_INT_BINARY): New code iterator.
5230 (sve_int_op): Remove int attribute and add "minus" to the code
5232 (SVE_COND_INT_OP): Delete.
5233 (SVE_COND_FP_OP): Rename to...
5234 (SVE_COND_FP_BINARY): ...this.
5236 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5238 * optabs.c (can_reuse_operands_p): New function.
5239 (maybe_legitimize_operands): Try to reuse the results for
5242 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
5244 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
5245 Add {q} suffix to insn mnemonic.
5247 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5249 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
5250 (msp430_warn_func_return): New.
5252 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
5254 * fold-const.c (tree_nonzero_bits): New function.
5255 * fold-const.h (tree_nonzero_bits): Likewise.
5256 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
5257 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
5259 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
5263 * varasm.c (assemble_alias): Check ifunc_resolver only on
5266 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
5269 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
5270 when memory input operand is handled.
5272 2018-05-24 Luis Machado <luis.machado@linaro.org>
5274 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
5276 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
5278 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
5280 * match.pd: Delay FMA folds until after vectorization.
5282 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
5285 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5286 address check not strict.
5288 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
5290 * gimple-match.h (gimple_match_op): New class.
5291 (mprts_hook): Replace parameters with a gimple_match_op *.
5292 (maybe_build_generic_op): Likewise.
5293 (gimple_simplified_result_is_gimple_val): Replace parameters with
5294 a const gimple_match_op *.
5295 (gimple_simplify): Replace code_helper * and tree * parameters with
5296 a gimple_match_op * parameter.
5297 (gimple_resimplify1): Replace code_helper *, tree and tree *
5298 parameters with a gimple_match_op * parameter.
5299 (gimple_resimplify2): Likewise.
5300 (gimple_resimplify3): Likewise.
5301 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
5302 parameters with a gimple_match_op * parameter.
5303 * gimple-match-head.c (gimple_simplify): Change prototypes of
5304 auto-generated functions to take a gimple_match_op * instead of
5305 separate code_helper * and tree * parameters. Make the same
5306 change in the top-level overload and update calls to the
5307 gimple_resimplify routines. Update calls to the auto-generated
5308 functions and to maybe_push_res_to_seq in the publicly-facing
5309 operation-specific gimple_simplify overloads.
5310 (gimple_match_op::MAX_NUM_OPS): Define.
5311 (gimple_resimplify1): Replace rcode and ops with a single res_op
5312 parameter. Update call to gimple_simplify.
5313 (gimple_resimplify2): Likewise.
5314 (gimple_resimplify3): Likewise.
5315 (mprts_hook): Replace parameters with a gimple_match_op *.
5316 (maybe_build_generic_op): Likewise.
5317 (build_call_internal): Replace type, nargs and ops with
5318 a gimple_match_op *.
5319 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
5320 with a single gimple_match_op *. Update calls to mprts_hook,
5321 build_call_internal and gimple_simplified_result_is_gimple_val.
5322 Factor out code that is common to the tree_code and combined_fn cases.
5323 * genmatch.c (expr::gen_transform): Replace tem_code and
5324 tem_ops with a gimple_match_op called tem_op. Update calls
5325 to the gimple_resimplify functions and maybe_push_res_to_seq.
5326 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
5327 res_ops. Update call to the gimple_resimplify functions.
5328 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
5329 (decision_tree::gen): Make the functions take a gimple_match_op *
5330 called res_op instead of separate res_code and res_ops parameters.
5331 Update call accordingly.
5332 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
5333 and ops with a single res_op parameter. Update calls to
5334 maybe_build_generic_op and maybe_push_res_to_seq.
5335 (fold_stmt_1): Update calls to gimple_simplify and
5336 replace_stmt_with_simplification.
5337 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
5338 and gimple_simplified_result_is_gimple_val.
5339 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
5341 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
5342 with a gimple_match_op *.
5343 (vn_nary_build_or_lookup): Likewise. Update call to
5344 vn_nary_build_or_lookup_1.
5345 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
5346 gimple_match_op *. Update calls to the gimple_resimplify routines
5347 and to gimple_simplified_result_is_gimple_val.
5348 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
5349 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
5350 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
5351 (visit_nary_op): Likewise.
5352 (visit_reference_op_load): Likewise.
5354 2018-05-23 Luis Machado <luis.machado@linaro.org>
5356 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
5357 modifier for printing the step amount.
5359 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
5362 * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
5365 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
5367 * doc/sourcebuild.texi (Endianness): New subsubsection.
5369 2018-05-23 Luis Machado <luis.machado@linaro.org>
5371 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5372 <prefetch_dynamic_strides>: New const bool field.
5373 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5374 prefetch_dynamic_strides.
5375 (exynosm1_prefetch_tune): Likewise.
5376 (thunderxt88_prefetch_tune): Likewise.
5377 (thunderx_prefetch_tune): Likewise.
5378 (thunderx2t99_prefetch_tune): Likewise.
5379 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
5381 (aarch64_override_options_internal): Update to set
5382 PARAM_PREFETCH_DYNAMIC_STRIDES.
5383 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5384 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5385 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5386 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5387 prefetch-dynamic-strides setting.
5389 2018-05-23 Luis Machado <luis.machado@linaro.org>
5391 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5392 <minimum_stride>: New const int field.
5393 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5394 minimum_stride field defaulting to -1.
5395 (exynosm1_prefetch_tune): Likewise.
5396 (thunderxt88_prefetch_tune): Likewise.
5397 (thunderx_prefetch_tune): Likewise.
5398 (thunderx2t99_prefetch_tune): Likewise.
5399 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
5400 <default_opt_level>: Set to 3.
5401 (aarch64_override_options_internal): Update to set
5402 PARAM_PREFETCH_MINIMUM_STRIDE.
5403 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5404 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5405 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5406 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5407 stride is constant and is below the minimum stride threshold.
5409 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5411 * config/arm/arm-cpus.in (mode26): Delete.
5412 (armv4): Delete mode26 reference.
5413 * config/arm/arm.c (arm_configure_build_target): Delete use of
5416 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
5418 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
5420 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
5421 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
5423 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
5424 (floatunsdidf2): Ditto.
5426 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
5428 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
5429 (fixuns_trunc<mode>si2_avx512f): Ditto.
5430 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
5431 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
5432 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
5434 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
5436 PR rtl-optimization/79985
5437 * df-scan.c (df_insn_refs_collect): Remove special case for
5438 global registers and asm statements.
5440 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
5442 * extend.texi (Global Register Variables): Rewrite the bullet list.
5443 Note that the register is available for allocation. Note that access
5444 via inline asm must use constraints. Add note about async-signal
5445 handlers. Remove paragraph about automagic register selection.
5447 2018-05-23 Richard Biener <rguenther@suse.de>
5449 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
5450 of fixed offset from memset VN.
5452 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
5454 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
5456 (alloc_cand_and_find_basis): Initialize first_interp field.
5457 (slsr_process_mul): Modify first_interp field.
5458 (slsr_process_add): Likewise.
5459 (slsr_process_cast): Modify first_interp field for each new
5461 (slsr_process_copy): Likewise.
5462 (dump_candidate): Dump first_interp field.
5463 (replace_mult_candidate): Process all interpretations, not just
5465 (replace_rhs_if_not_dup): Likewise.
5466 (replace_one_candidate): Likewise.
5468 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
5470 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
5472 (aarch64_needs_frame_chain): New function.
5473 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
5475 2018-05-23 Sudakshina Das <sudi.das@arm.com>
5478 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
5479 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
5480 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
5481 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
5482 as true for strict-align.
5483 (aarch64_can_inline_p): Perform checks even when callee has no
5484 attributes to check for strict alignment.
5485 * doc/extend.texi (AArch64 Function Attributes): Document
5487 * doc/invoke.texi: (AArch64 Options): Likewise.
5489 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
5491 PR tree-optimization/85853
5492 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
5493 the handling of the root of the node to...
5494 (vect_slp_analyze_node_operations_1): ...this new function,
5495 and run the whole thing with the child nodes' def types
5496 set according to their SLP node's def type.
5498 2018-05-23 Richard Biener <rguenther@suse.de>
5501 * tree-data-ref.c (create_runtime_alias_checks): Defer
5502 and ignore overflow warnings.
5504 2018-05-23 Yury Gribov <tetra2005@gmail.com>
5506 PR tree-optimization/85822
5507 * tree-vrp.c (is_masked_range_test): Fix handling of negative
5510 2018-05-23 Richard Biener <rguenther@suse.de>
5512 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5513 memset constants via native_interpret_expr.
5515 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
5518 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
5520 (cgraph_node::create_alias): Likewise.
5521 (cgraph_node::get_availability): Check ifunc_resolver instead
5522 of looking up ifunc attribute.
5523 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
5524 * varasm.c (do_assemble_alias): Likewise.
5525 (assemble_alias): Likewise.
5526 (default_binds_local_p_3): Likewise.
5527 * cgraph.h (cgraph_node): Add ifunc_resolver.
5528 (cgraph_node::only_called_directly_or_aliased_p): Return false
5530 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
5532 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
5533 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
5534 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
5535 instead of looking up ifunc attribute.
5537 2018-05-22 Luis Machado <luis.machado@linaro.org>
5539 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
5541 2018-05-22 Martin Sebor <msebor@redhat.com>
5544 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
5545 only when expasion succeeds.
5546 (expand_builtin_strcmp): Same.
5547 (expand_builtin_strncmp): Same.
5549 2018-05-22 Martin Sebor <msebor@redhat.com>
5551 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
5553 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
5554 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5556 * config/aarch64/aarch64-ldpstp.md: Replace uses of
5557 aarch64_mem_pair_operand with memory_operand and delete operand swapping
5559 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
5560 Add check for legitimate_address.
5561 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
5562 (aarch64_swap_ldrstr_operands): New.
5563 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
5566 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
5567 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5569 * config/aarch64/aarch64.md: New patterns to generate stp
5571 (store_pair_sw, store_pair_dw): New patterns to generate stp for
5572 single words and double words.
5573 (load_pair_sw, load_pair_dw): Likewise.
5574 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
5576 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
5578 * config/aarch64/aarch64-ldpstp.md: Modify peephole
5579 for different mode ldpstp and add peephole for merged zero stores.
5581 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
5583 (aarch64_gen_store_pair): Rename calls to match new patterns.
5584 (aarch64_gen_load_pair): Rename calls to match new patterns.
5585 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
5586 (load_pair<DREG:mode><DREG2:mode>): ... This.
5587 (store_pair<mode>): Rename to...
5588 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
5589 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
5591 (V_INT_EQUIV): Handle SImode.
5592 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
5595 2018-05-22 Martin Sebor <msebor@redhat.com>
5598 * calls.c (maybe_warn_nonstring_arg): Use string length to set
5599 or ajust the presumed bound on an operation to avoid unnecessary
5602 2018-05-22 Martin Sebor <msebor@redhat.com>
5604 PR tree-optimization/85826
5605 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
5606 assuming that a DECL necesarily has a constant size.
5608 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
5611 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
5613 2018-05-22 Richard Biener <rguenther@suse.de>
5615 PR tree-optimization/85834
5616 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
5617 non-constant and non-zero memset arguments.
5619 2018-05-22 Martin Liska <mliska@suse.cz>
5622 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
5624 2018-05-22 Richard Biener <rguenther@suse.de>
5626 PR tree-optimization/85863
5627 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
5628 comparisons when vectype is specified.
5629 (vectorizable_condition): Do not specify vectype for
5630 vect_is_simple_cond when SLP vectorizing.
5632 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
5635 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
5636 define __ibm128 as long double.
5637 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
5638 as a distinct type when IEEE 128-bit support is enabled.
5639 (init_float128_ieee): Fix up conversions between IFmode and IEEE
5640 128-bit types to use the correct functions.
5641 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
5642 convert between 128-bit floating point types that have different
5643 modes but the same representation, instead of using gen_lowpart to
5645 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
5647 (IFKF_reg): New attributes to give the register constraints for
5649 (extend<mode>tf2_internal): New insns to mark an explicit
5650 conversion between 128-bit floating point types that have a
5651 different mode but share the same representation.
5653 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
5655 PR tree-optimization/85814
5656 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
5657 a null return from get_strinfo when unsharing the next
5658 strinfo in the chain.
5660 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
5663 * varasm.c (weak_finish): Clean up weak_decls.
5665 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5667 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
5668 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
5669 UNSPEC_UADALP values.
5670 * config/aarch64/iterators.md (ABAL): New int iterator.
5673 (sur): Add mappings for the above.
5674 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
5676 (aarch64_<sur>abal<mode>_4): Likewise.
5677 (aarch64_<sur>adalp<mode>_3): Likewise.
5678 (<sur>sadv16qi): New define_expand.
5680 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
5682 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
5683 (*movdf_internal): Ditto.
5684 (*rcpsf2_sse): Ditto.
5685 (*rsqrtsf2_sse): Ditto.
5686 (*sqrt<mode>2_sse): Ditto.
5688 2018-05-21 Tamar Christina <tamar.christina@arm.com>
5690 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
5692 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
5693 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
5694 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
5695 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
5697 * config/aarch64/arm_neon.h: Likewise.
5698 * config/aarch64/iterators.md (VQ_I): New.
5700 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
5702 * config.gcc: Add arc/t-multilib-linux to tmake_file for
5704 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
5707 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
5709 * config/nds32/constraints.md (S): New constraint.
5710 * config/nds32/nds32.md (call_internal): Use constraint S.
5711 (call_value_internal): Likewise.
5712 (sibcall_internal): Likewise.
5713 (sibcall_value_internal): Likewise.
5715 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
5716 Chung-Ju Wu <jasonwucj@gmail.com>
5718 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
5721 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
5722 Chung-Ju Wu <jasonwucj@gmail.com>
5724 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
5725 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
5726 (nds32_rtx_costs_impl): Simplify.
5727 (nds32_address_cost_impl): Simplify.
5728 (nds32_init_rtx_costs): New function.
5729 (nds32_rtx_costs_speed_prefer): Likewise.
5730 (nds32_rtx_costs_size_prefer): Likewise.
5731 (nds32_address_cost_speed_prefer): Likewise.
5732 (nds32_address_cost_speed_fwprop): Likewise.
5733 (nds32_address_cost_size_prefer): Likewise.
5734 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
5735 * config/nds32/nds32.c (nds32_option_override): Use
5736 nds32_init_rtx_costs function.
5738 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
5740 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
5741 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
5742 (TARGET_PIPELINE_N8): Likewise.
5743 (TARGET_PIPELINE_N10): Likewise.
5744 (TARGET_PIPELINE_N13): Likewise.
5745 (TARGET_PIPELINE_GRAYWOLF): Likewise.
5747 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
5749 * config/nds32/nds32-fpu.md: Update copyright year.
5751 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
5753 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
5755 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
5757 * config/nds32/nds32.c
5758 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
5759 * config/nds32/nds32.opt (minline-asm-r15): New option.
5761 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
5763 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
5765 * config/nds32/nds32.md (abssi2): New pattern.
5767 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
5769 * config/i386/i386.md (rex64namesuffix): New mode attribute.
5770 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
5771 Merge insn pattern from sse_cvtsi2ss<round_name> and
5772 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
5773 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
5774 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
5775 using SWI48 mode iterator.
5776 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
5777 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
5778 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
5779 pattern from sse_cvttss2si<round_saeonly_name>
5780 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
5781 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
5782 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
5783 using SWI48 mode iterator.
5784 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
5785 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
5786 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
5787 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
5788 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
5789 using SWI48 mode iterator.
5790 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
5791 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
5792 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
5793 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
5794 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
5795 SWI48 mode iterator.
5796 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
5797 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
5798 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
5799 pattern from sse_cvttsd2si<round_saeonly_name>
5800 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
5802 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
5804 * config/nds32/nds32-md-auxiliary.c
5805 (nds32_valid_smw_lwm_base_p): Refine.
5806 (nds32_output_smw_single_word): Refine.
5807 (nds32_output_smw_double_word): New.
5808 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
5810 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
5812 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
5813 (nds32_output_stack_pop): Refine.
5814 (nds32_expand_unaligned_load): Refine.
5815 (nds32_expand_unaligned_store): Refine.
5817 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5818 Chung-Ju Wu <jasonwucj@gmail.com>
5820 * config/nds32/constants.md: Add TP_REGNUM constant.
5821 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
5822 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
5824 * config/nds32/nds32-doubleword.md: Consider flag_pic.
5825 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
5826 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
5827 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
5828 and PIC code generation.
5829 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
5831 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
5833 * config/nds32/nds32.md: Support TLS and PIC.
5834 * config/nds32/nds32.c: Support TLS and PIC.
5835 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
5836 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
5839 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
5841 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
5842 mode with E_ prefix.
5844 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5845 Chung-Ju Wu <jasonwucj@gmail.com>
5847 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
5848 * config/nds32/nds32-md-auxiliary.c
5849 (symbolic_reference_mentioned_p): New.
5850 (nds32_legitimize_ict_address): New.
5851 (nds32_expand_ict_move): New.
5852 (nds32_indirect_call_referenced_p): New.
5853 (nds32_symbol_binds_local_p): Delete.
5854 (nds32_long_call_p): Modify.
5855 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
5856 * config/nds32/nds32-protos.h
5857 (symbolic_reference_mentioned_p): Declare.
5858 (nds32_legitimize_ict_address): Declare.
5859 (nds32_expand_ict_move): Declare.
5860 (nds32_indirect_call_referenced_p): Declare.
5861 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
5862 (nds32_relax_group): Use nds32_ict_const_p as condition.
5863 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
5864 (nds32_asm_file_start): Output ict_model directive in asm code.
5865 (nds32_legitimate_address_p): Consider indirect call.
5866 (nds32_print_operand): Consider indirect call.
5867 (nds32_print_operand_address): Consider indirect call.
5868 (nds32_insert_attributes): Handle "indirect_call" attribute.
5869 (TARGET_LEGITIMATE_ADDRESS_P): Define.
5870 (TARGET_LEGITIMATE_CONSTANT_P): Define.
5871 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
5872 (TARGET_DELEGITIMIZE_ADDRESS): Define.
5873 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
5874 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
5875 (TARGET_ICT_MODEL_SMALL): Define.
5876 (TARGET_ICT_MODEL_LARGE): Define.
5877 * config/nds32/nds32.md (movsi): Consider ict model.
5878 (call, call_value): Consider ict model.
5879 (sibcall, sibcall_value): Consider ict model.
5880 * config/nds32/nds32.opt (mict-model): New option.
5881 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
5884 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
5885 Monk Chiang <sh.chiang04@gmail.com>
5886 Jim Wilson <jimw@sifive.com>
5888 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
5889 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
5890 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
5891 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
5892 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
5893 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
5894 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
5895 compute save_libcall_adjustment properly.
5896 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
5897 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
5898 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
5899 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
5900 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
5901 (ABI_SPEC): Handle mabi=ilp32e.
5902 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
5903 (RVE): Add RVE mask.
5904 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
5905 <-march>: Add rv32e as an example.
5907 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
5910 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
5911 (intra_create_variable_infos): Handle C++ constructors.
5913 2018-05-18 Martin Liska <mliska@suse.cz>
5915 * passes.def: Remove a redundant pass.
5917 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
5920 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
5922 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5924 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
5926 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
5928 (armv2, armv2a, armv3, armv3m): Delete architectures.
5929 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
5930 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
5931 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
5933 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
5934 (*mulsidi3adddi): Likewise.
5935 (mulsidi3): Likewise.
5936 (*mulsidi3_nov6): Likewise.
5937 (umulsidi3): Likewise.
5938 (umulsidi3_nov6): Likewise.
5939 (umaddsidi4): Likewise.
5940 (*umulsidi3adddi): Likewise.
5941 (smulsi3_highpart): Likewise.
5942 (*smulsi3_highpart_nov6): Likewise.
5943 (umulsi3_highpart): Likewise.
5944 (*umulsi3_highpart_nov6): Likewise.
5945 * config/arm/arm.h (arm_arch3m): Delete.
5946 * config/arm/arm.c (arm_arch3m): Delete.
5947 (arm_option_override_internal): Update armv3-related comment.
5948 (arm_configure_build_target): Delete use of isa_bit_mode32.
5949 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
5950 (arm_rtx_costs_internal): Delete check of arm_arch3m.
5951 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
5953 (mulusa3): Likewise.
5954 * config/arm/arm-protos.h (arm_arch3m): Delete.
5955 * config/arm/arm-tables.opt: Regenerate.
5956 * config/arm/arm-tune.md: Likewise.
5957 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
5958 deleted architectures.
5960 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5962 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
5963 (armv5t, armv5te): New features.
5964 (ARMv5, ARMv5e): Delete fgroups.
5965 (ARMv5t, ARMv5te): Adjust for above changes.
5967 (armv5, armv5e): Delete arches.
5968 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
5970 (*call_reg_arm): Likewise.
5971 (*call_value_reg_armv5): Likewise.
5972 (*call_value_reg_arm): Likewise.
5973 (*call_symbol): Likewise.
5974 (*call_value_symbol): Likewise.
5975 (*sibcall_insn): Likewise.
5976 (*sibcall_value_insn): Likewise.
5978 (prefetch): Likewise.
5979 (define_split and define_peephole2 dependent on arm_arch5):
5981 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
5983 (TARGET_ARM_QBIT): Likewise.
5984 (TARGET_DSP_MULTIPLY): Likewise.
5985 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
5986 (arm_arch5, arm_arch5e): Delete.
5987 (arm_arch5t, arm_arch5te): Declare.
5988 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
5989 (arm_arch5t): Declare.
5990 (arm_option_reconfigure_globals): Update for the above.
5991 (arm_options_perform_arch_sanity_checks): Update comment, replace
5992 use of arm_arch5 with arm_arch5t.
5993 (use_return_insn): Likewise.
5994 (arm_emit_call_insn): Likewise.
5995 (output_return_instruction): Likewise.
5996 (arm_final_prescan_insn): Likewise.
5997 (arm_coproc_builtin_available): Likewise.
5998 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
5999 arm_arch5e with arm_arch5t and arm_arch5te.
6000 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
6001 (arm_arch5t, arm_arch5te): Declare.
6002 * config/arm/arm-tables.opt: Regenerate.
6003 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
6004 * config/arm/t-multilib: Likewise.
6005 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
6006 instead of arm_arch5.
6007 (*call_reg_thumb1): Likewise.
6008 (*call_value_reg_thumb1_v5): Likewise.
6009 (*call_value_reg_thumb1): Likewise.
6010 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
6012 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
6014 2018-05-18 Martin Liska <mliska@suse.cz>
6016 PR gcov-profile/84846
6017 * doc/gcov.texi: Document -t option of gcov tool.
6019 2018-05-18 Martin Liska <mliska@suse.cz>
6021 PR gcov-profile/84846
6022 * gcov.c (print_usage): Add new -t option.
6023 (process_args): Handle the option.
6024 (generate_results): Use stdout as output when requested by
6027 2018-05-18 Martin Liska <mliska@suse.cz>
6029 PR gcov-profile/84846
6030 * coverage.c (coverage_init): Write PWD to .gcno file.
6031 * doc/gcov.texi: Document how working directory is printed.
6032 * gcov-dump.c (dump_gcov_file): Print PWD.
6033 * gcov.c (output_intermediate_file): Likewise.
6034 (read_graph_file): Read PWD string.
6035 (output_lines): Print PWD.
6037 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6040 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
6041 for retval and return false if all args to phi are zero.
6043 2018-05-18 Richard Biener <rguenther@suse.de>
6045 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
6047 (evrp_dom_walker::before_dom_children): Call it.
6049 2018-05-18 Richard Biener <rguenther@suse.de>
6051 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
6052 results when processing array refs with variable index.
6054 2018-05-18 Toon Moene <toon@moene.org>
6056 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
6057 directly after that of -floop-interchange. Indicate that both
6058 options are enabled by default when specifying -O3.
6060 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6062 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
6063 iterator. Delete separate integer-mode vec_set<mode> expander.
6064 (aarch64_simd_vec_setv2di): Delete.
6065 (vec_setv2di): Delete.
6066 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
6067 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
6068 the "w, r" alternative.
6070 2018-05-18 Martin Liska <mliska@suse.cz>
6072 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
6073 * tree-pass.h (make_pass_lower_switch_O0): New function.
6074 * tree-switch-conversion.c (node_has_low_bound): Remove.
6075 (node_has_high_bound): Likewise.
6076 (node_is_bounded): Likewise.
6077 (class pass_lower_switch): Make it a template type and create
6079 (pass_lower_switch::execute): Add template argument.
6080 (make_pass_lower_switch): New function.
6081 (make_pass_lower_switch_O0): New function.
6082 (do_jump_if_equal): Remove.
6083 (emit_case_nodes): Simplify to just handle all 3 cases and leave
6084 all the hard work to tree optimization passes.
6086 2018-05-18 Martin Liska <mliska@suse.cz>
6088 * dbgcnt.c (limit_low): Renamed from limit.
6089 (limit_high): New variable.
6090 (dbg_cnt_is_enabled): Check for upper limit.
6091 (dbg_cnt): Adjust dumping.
6092 (dbg_cnt_set_limit_by_index): Add new argument for high
6094 (dbg_cnt_set_limit_by_name): Likewise.
6095 (dbg_cnt_process_single_pair): Parse new format.
6096 (dbg_cnt_process_opt): Use strtok.
6097 (dbg_cnt_list_all_counters): Remove 'value' and add
6099 * doc/invoke.texi: Document changes.
6101 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
6103 * doc/sourcebuild.texi (scalar_all_fma): Document.
6104 * tree.def (FMA_EXPR): Delete.
6105 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
6106 * internal-fn.c (ternary_direct): New macro.
6107 (expand_ternary_optab_fn): Likewise.
6108 (direct_ternary_optab_supported_p): Likewise.
6109 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
6110 * builtins.c (fold_builtin_fma): Delete.
6111 (fold_builtin_3): Don't call it.
6112 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
6113 * expr.c (expand_expr_real_2): Likewise.
6114 * fold-const.c (operand_equal_p): Likewise.
6115 (fold_ternary_loc): Likewise.
6116 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
6117 * gimple.c (DEFTREECODE): Likewise.
6118 * gimplify.c (gimplify_expr): Likewise.
6119 * optabs-tree.c (optab_for_tree_code): Likewise.
6120 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
6121 * tree-eh.c (operation_could_trap_p): Likewise.
6122 (stmt_could_throw_1_p): Likewise.
6123 * tree-inline.c (estimate_operator_cost): Likewise.
6124 * tree-pretty-print.c (dump_generic_node): Likewise.
6125 (op_code_prio): Likewise.
6126 * tree-ssa-loop-im.c (stmt_cost): Likewise.
6127 * tree-ssa-operands.c (get_expr_operands): Likewise.
6128 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
6129 * fold-const-call.h (fold_fma): Delete.
6130 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
6131 CFN_FNMA and CFN_FNMS.
6133 * genmatch.c (combined_fn): New enum.
6134 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
6135 (commutative_op): New function.
6136 (commutate): Use it. Handle more than 2 operands.
6137 (dt_operand::gen_gimple_expr): Use commutative_op.
6138 (parser::parse_expr): Allow :c to be used with non-binary
6139 operators if the commutative operand is known.
6140 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
6141 CFN_FMS, CFN_FNMA and CFN_FNMS.
6142 (backprop::process_assign_use): Remove FMA_EXPR handling.
6143 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
6144 (gen_hsa_fma): New function.
6145 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
6146 IFN_FNMA and IFN_FNMS.
6147 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
6148 * gimple-fold.h (follow_all_ssa_edges): Declare.
6149 * gimple-fold.c (follow_all_ssa_edges): New function.
6150 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
6151 gimple_build interface and use follow_all_ssa_edges to fold the result.
6152 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
6153 instead of checking for optabs directly.
6154 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
6155 rather than FMA_EXPRs.
6156 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
6157 call to IFN_FMA instead of an FMA_EXPR.
6159 2018-05-17 Jim Wilson <jimw@sifive.com>
6161 * expr.c (do_tablejump): When converting index to Pmode, if we have a
6162 sign extended promoted subreg, and the range does not have the sign bit
6163 set, then do a sign extend.
6165 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
6166 test, check for sign extended subreg and/or constant operands, and
6167 do a sign extend in that case.
6169 2018-05-17 Steve Ellcey <sellcey@cavium.com>
6171 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
6172 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
6174 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
6175 Change logics_shift_reg to logics_shift_imm.
6176 (thunderx2t99_fp_loadpair_basic): Delete.
6177 (thunderx2t99_fp_storepair_basic): Delete.
6178 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
6179 (thunderx2t99_asimd_polynomial): Delete.
6180 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
6181 and neon_fp_mul_d_scalar_q.
6182 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
6183 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
6184 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
6185 (thunderx2t99_asimd_lut): Add missing tbl types.
6186 (thunderx2t99_asimd_ext): Delete.
6187 (thunderx2t99_asimd_load1_1_mult): Delete.
6188 (thunderx2t99_asimd_load1_2_mult): Delete.
6189 (thunderx2t99_asimd_load1_ldp): New.
6190 (thunderx2t99_asimd_load1): New.
6191 (thunderx2t99_asimd_load2): Add missing *load2* types.
6192 (thunderx2t99_asimd_load3): New.
6193 (thunderx2t99_asimd_load4): New.
6194 (thunderx2t99_asimd_store1_1_mult): Delete.
6195 (thunderx2t99_asimd_store1_2_mult): Delete.
6196 (thunderx2t99_asimd_store2_mult): Delete.
6197 (thunderx2t99_asimd_store2_onelane): Delete.
6198 (thunderx2t99_asimd_store_stp): New.
6199 (thunderx2t99_asimd_store1): New.
6200 (thunderx2t99_asimd_store2): New.
6201 (thunderx2t99_asimd_store3): New.
6202 (thunderx2t99_asimd_store4): New.
6204 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
6206 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
6207 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
6209 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
6210 Segher Boessenkool <segher@kernel.crashing.org>
6213 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
6216 2018-05-17 Richard Biener <rguenther@suse.de>
6218 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
6219 for pruning loop and prune defs feeding only already visited PHIs.
6221 2018-05-17 Richard Biener <rguenther@suse.de>
6223 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
6225 2018-05-17 Bin Cheng <bin.cheng@arm.com>
6226 Richard Biener <rguenther@suse.de>
6228 PR tree-optimization/85793
6229 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
6230 for VMAT_ELEMENTWISE.
6232 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
6234 * internal-fn.h (lookup_internal_fn): Declare
6235 * internal-fn.c (lookup_internal_fn): New function.
6236 * gimple.c (gimple_build_call_from_tree): Handle calls to
6238 * gimple-pretty-print.c (dump_gimple_call): Print "." before
6239 internal function names.
6240 * tree-pretty-print.c (dump_generic_node): Likewise.
6241 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
6243 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
6245 * gimple-fold.h (gimple_build): Make the function forms take
6246 combined_fn rather than built_in_function.
6247 (gimple_simplify): Likewise.
6248 * gimple-match-head.c (gimple_simplify): Likewise.
6249 * gimple-fold.c (gimple_build): Likewise.
6250 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
6251 rather than gimple_build_call_internal.
6252 (get_initial_defs_for_reduction): Likewise.
6253 (vect_create_epilog_for_reduction): Likewise.
6254 (vectorizable_live_operation): Likewise.
6256 2018-05-17 Martin Liska <mliska@suse.cz>
6258 * gimple-ssa-sprintf.c (format_directive): Do not use
6259 space in between 'G_' and '('.
6261 2018-05-17 Jakub Jelinek <jakub@redhat.com>
6264 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
6265 even if the mask is not all ones.
6268 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
6270 (ix86_gimple_fold_builtin): Likewise.
6273 * config/i386/i386.c: Include tree-vector-builder.h.
6274 (ix86_vector_shift_count): New function.
6275 (ix86_fold_builtin): Fold shift builtins by scalar count.
6276 (ix86_gimple_fold_builtin): Likewise.
6278 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
6279 _mm512_setzero): New intrinsics.
6281 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
6282 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6284 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
6285 code generation for cases where splatting a value is not useful.
6286 * simplify-rtx.c (simplify_ternary_operation): Simplify
6287 vec_merge across a vec_duplicate and a paradoxical subreg forming
6288 a vector mode to a vec_concat.
6290 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
6292 * config.gcc: Support "goldmont-plus".
6293 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
6295 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6296 PROCESSOR_GOLDMONT_PLUS.
6297 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
6298 (processor_target_table): Add "goldmont-plus".
6299 (PTA_GOLDMONT_PLUS): Define.
6300 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
6301 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
6302 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
6303 (fold_builtin_cpu): Add "goldmont-plus".
6304 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
6305 (ix86_option_override_internal): Add "goldmont-plus".
6306 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
6307 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
6308 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
6309 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
6311 2018-05-17 Richard Biener <rguenther@suse.de>
6313 PR tree-optimization/85757
6314 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
6315 remove defs that only feed that PHI from further processing.
6317 2018-05-16 Jim Wilson <jimw@sifive.com>
6319 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
6321 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
6323 2018-05-16 Mark Wielaard <mark@klomp.org>
6325 * dwarf2out.c (count_index_strings): New function.
6326 (output_indirect_strings): Call count_index_strings and generate
6327 header for dwarf_version >= 5.
6329 2018-05-16 Mark Wielaard <mark@klomp.org>
6331 * dwarf2out.c (dwarf_FORM): New function.
6332 (set_indirect_string): Use dwarf_FORM.
6333 (reset_indirect_string): Likewise.
6334 (size_of_die): Likewise.
6335 (value_format): Likewise.
6336 (output_die): Likewise.
6337 (add_skeleton_AT_string): Likewise.
6338 (output_macinfo_op): Likewise.
6339 (index_string): Likewise.
6340 (output_index_string_offset): Likewise.
6341 (output_index_string): Likewise.
6342 (count_index_strings): Likewise.
6344 2018-05-16 Carl Love <cel@us.ibm.com>
6346 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
6347 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
6349 2018-05-16 Martin Jambor <mjambor@suse.cz>
6351 * ipa-prop.c (ipa_free_all_edge_args): Remove.
6352 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
6354 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
6356 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
6357 (fnma<mode>4): Likewise.
6358 (fms<mode>4): Likewise.
6359 (fnms<mode>4): Likewise.
6360 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
6361 (aarch64_fnma<mode>4): Likewise.
6362 (aarch64_fms<mode>4): Likewise.
6363 (aarch64_fnms<mode>4): Likewise.
6364 (aarch64_fnmadd<mode>4): Likewise.
6366 2018-05-16 Jason Merrill <jason@redhat.com>
6368 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
6370 2018-05-16 Richard Biener <rguenther@suse.de>
6372 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
6373 (dump_stmt_cost): Declare.
6374 (add_stmt_cost): Dump cost we add.
6375 (add_stmt_costs): New function.
6376 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
6378 (vect_analyze_stmt): Adjust prototype.
6379 (vectorizable_condition): Likewise.
6380 (vectorizable_live_operation): Likewise.
6381 (vectorizable_reduction): Likewise.
6382 (vectorizable_induction): Likewise.
6383 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
6384 cost vector to pass to vectorizable_ and record afterwards.
6385 (vect_model_reduction_cost): Take cost vector argument and adjust.
6386 (vect_model_induction_cost): Likewise.
6387 (vectorizable_reduction): Likewise.
6388 (vectorizable_induction): Likewise.
6389 (vectorizable_live_operation): Likewise.
6390 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
6391 SLP_TREE_NUMBER_OF_VEC_STMTS.
6392 (vect_analyze_slp_cost_1): Remove.
6393 (vect_analyze_slp_cost): Likewise.
6394 (vect_slp_analyze_node_operations): Take visited args and
6395 a target cost vector. Avoid processing already visited stmt sets.
6396 (vect_slp_analyze_operations): Use a local cost vector to gather
6397 costs and register those of non-discarded instances.
6398 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
6399 (vect_schedule_slp_instance): Remove copying of
6400 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
6402 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
6403 adding cost. Record cost entry location.
6404 (vect_prologue_cost_for_slp_op): Function to compute cost of
6405 a constant or invariant generated for SLP vect in the prologue,
6406 split out from vect_analyze_slp_cost_1.
6407 (vect_model_simple_cost): Make static. Adjust for SLP costing.
6408 (vect_model_promotion_demotion_cost): Likewise.
6409 (vect_model_store_cost): Likewise, make static.
6410 (vect_model_load_cost): Likewise.
6411 (vectorizable_bswap): Add cost vector arg and adjust.
6412 (vectorizable_call): Likewise.
6413 (vectorizable_simd_clone_call): Likewise.
6414 (vectorizable_conversion): Likewise.
6415 (vectorizable_assignment): Likewise.
6416 (vectorizable_shift): Likewise.
6417 (vectorizable_operation): Likewise.
6418 (vectorizable_store): Likewise.
6419 (vectorizable_load): Likewise.
6420 (vectorizable_condition): Likewise.
6421 (vectorizable_comparison): Likewise.
6422 (can_vectorize_live_stmts): Likewise.
6423 (vect_analyze_stmt): Likewise.
6424 (vect_transform_stmt): Adjust calls to vectorizable_*.
6425 * tree-vectorizer.c: Include gimple-pretty-print.h.
6426 (dump_stmt_cost): New function.
6428 2018-05-16 Richard Biener <rguenther@suse.de>
6430 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
6431 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
6432 * tree-ssa-dse.c: Include tree-ssa-loop.h.
6433 (check_name): New callback.
6434 (dse_classify_store): Track cycles via a visited bitmap of PHI
6435 defs and simplify handling of in-loop and across loop dead stores
6436 and properly fail for loop-variant refs. Handle byte-tracking with
6437 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
6440 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
6442 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
6443 (vect_get_mask_type_for_stmt): Likewise.
6444 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
6446 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
6447 to determine the statement's vector type and the vector type that
6448 should be used for calculating nunits. Deal with cases in which
6449 the type has to be deferred.
6450 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
6451 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
6452 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
6453 (vect_determine_vf_for_stmt): New functions, split out from...
6454 (vect_determine_vectorization_factor): ...here.
6455 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
6456 (vect_get_mask_type_for_stmt): New functions, split out from
6457 vect_determine_vectorization_factor.
6459 2018-05-16 Richard Biener <rguenther@suse.de>
6461 * tree-cfg.c (verify_gimple_assign_ternary): Properly
6462 verify the [VEC_]COND_EXPR embedded comparison.
6464 2018-05-15 Martin Sebor <msebor@redhat.com>
6466 PR tree-optimization/85753
6467 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
6468 RECORD_TYPE in addition to ARRAY_TYPE.
6470 2018-05-15 Martin Sebor <msebor@redhat.com>
6473 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
6475 2018-05-15 Richard Biener <rguenther@suse.de>
6477 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
6478 add by_clobber_p one. Change algorithm to collect all defs
6479 representing uses we need to walk and try reducing them to
6480 a single one before failing.
6481 (dse_dom_walker::dse_optimize_stmt): Adjust.
6483 2018-05-13 Mark Wielaard <mark@klomp.org>
6485 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
6486 (size_of_loc_descr): Likewise.
6487 (output_loc_operands): Likewise.
6488 (output_loc_operands_raw): Likewise.
6489 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
6490 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
6491 (hash_loc_operands): Likewise.
6492 (compare_loc_operands): Likewise.
6494 2018-05-14 Mark Wielaard <mark@klomp.org>
6496 * dwarf2out.c (count_index_addrs): New function.
6497 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
6499 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6501 PR tree-optimization/83648
6502 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
6503 return value as malloc candidate.
6505 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6508 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
6509 param as true in call to suggest_attribute.
6511 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
6513 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
6514 -mreadonly-in-sdata.
6516 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6518 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
6520 (aarch64_crypto_aesd_fused): Likewise.
6522 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
6524 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
6525 (movsi_aarch64): Likewise.
6526 (load_pairsi): Likewise.
6527 (load_pairdi): Likewise.
6528 (store_pairsi): Likewise.
6529 (store_pairdi): Likewise.
6530 (load_pairsf): Likewise.
6531 (load_pairdf): Likewise.
6532 (store_pairsf): Likewise.
6533 (store_pairdf): Likewise.
6534 (zero_extend): Likewise.
6535 (trunc): Swap alternatives.
6536 (fcvt_target): Add '?' to prefer w over r.
6538 2018-05-14 Jakub Jelinek <jakub@redhat.com>
6541 * config/i386/i386.md: Disallow non-commutative arithmetics in
6542 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
6543 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
6544 in the peephole2 before it.
6546 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
6548 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
6549 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
6550 (ix86_handle_option): Handle -mcldemote.
6551 * config.gcc: New header.
6552 * config/i386/cldemoteintrin.h: New file.
6553 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
6554 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
6556 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6557 OPTION_MASK_ISA_CLDEMOTE.
6558 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
6559 (ix86_valid_target_attribute_inner_p): Ditto.
6560 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
6561 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
6562 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
6563 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
6564 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
6566 * config/i386/i386.opt: Add -mcldemote.
6567 * config/i386/x86intrin.h: New header.
6568 * doc/invoke.texi: Add -mcldemote.
6570 2018-05-14 Richard Biener <rguenther@suse.de>
6572 * doc/match-and-simplify.texi: Adjust :s documentation.
6574 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
6576 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
6577 intended memcpy size.
6578 (REORDER_45): Likewise.
6580 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
6582 * sort.cc: New file.
6583 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
6584 * vec.c (qsort_chk): Use gcc_qsort.
6585 * Makefile.in (OBJS-libcommon): Add sort.o.
6586 (build/sort.o): New target. Use it...
6587 (BUILD_RTL): ... here, and...
6588 (build/gencfn-macros): ... here, and...
6589 (build/genmatch): ... here.
6591 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
6592 Chung-Ju Wu <jasonwucj@gmail.com>
6594 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
6595 * config/nds32/nds32-graywolf.md: New file.
6596 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
6597 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
6599 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
6600 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
6601 * config/nds32/nds32.md (pipeline_model): Add graywolf.
6602 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
6603 * config/nds32/pipelines.md: Include n15 settings.
6605 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
6606 Chung-Ju Wu <jasonwucj@gmail.com>
6608 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
6609 * config/nds32/nds32-n13.md: New file.
6610 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
6611 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
6613 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
6614 * config/nds32/nds32.md (pipeline_model): Add n13.
6615 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
6616 * config/nds32/pipelines.md: Include n13 settings.
6618 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
6619 Chung-Ju Wu <jasonwucj@gmail.com>
6621 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
6622 * config/nds32/nds32-n10.md: New file.
6623 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
6624 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
6626 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
6627 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
6628 * config/nds32/nds32.md (pipeline_model): Add n10.
6629 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
6630 * config/nds32/pipelines.md: Include n10 settings.
6632 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
6633 Kito Cheng <kito.cheng@gmail.com>
6634 Chung-Ju Wu <jasonwucj@gmail.com>
6636 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
6637 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
6638 Add enum values for DSP extension instructions.
6639 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
6641 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
6642 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
6644 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
6645 * config/nds32/nds32-dspext.md: New file for DSP implementation.
6646 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
6647 * config/nds32/nds32-intrinsic.md: Likewise.
6648 * config/nds32/nds32_intrinsic.h: Likewise.
6649 * config/nds32/nds32-md-auxiliary.c: Likewise.
6650 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
6651 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
6652 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
6653 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
6654 * config/nds32/nds32-protos.h: New declarations for DSP extension.
6655 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
6656 TYPE_DMAC in switch statement.
6657 * config/nds32/nds32.c: New checking and implementation for DSP
6658 extension instructions.
6659 * config/nds32/nds32.h: Likewise.
6660 * config/nds32/nds32.md: Likewise.
6661 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
6662 * config/nds32/predicates.md: Implement new predicates for DSP
6665 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
6667 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
6668 Reformat alternatives and attributes so it is easier to identify
6669 which constraints/attributes go with which instruction.
6670 (mov<mode>_hardfloat32, FMOVE64): Likewise.
6671 (mov<mode>_softfloat32, FMOVE64): Likewise.
6672 (mov<mode>_hardfloat64, FMOVE64): Likewise.
6673 (mov<mode>_softfloat64, FMOVE64): Likewise.
6675 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
6677 * doc/extend.texi (PowerPC Built-in Functions): Rename this
6679 (Basic PowerPC Built-in Functions): The new name of the
6680 subsection previously known as "PowerPC Built-in Functions".
6681 (Basic PowerPC Built-in Functions Available on all Configurations):
6683 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
6684 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
6685 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
6686 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
6688 2018-05-11 Martin Jambor <mjambor@suse.cz>
6691 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
6694 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
6697 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
6699 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
6701 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
6702 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
6703 (ix86_handle_option): Handle -mwaitpkg.
6704 * config.gcc: New header.
6705 * config/i386/cpuid.h (bit_WAITPKG): New bit.
6706 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
6707 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
6709 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6710 OPTION_MASK_ISA_WAITPKG.
6711 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
6712 (ix86_option_override_internal): Add PTA_WAITPKG.
6713 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
6714 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
6715 IX86_BUILTIN_TPAUSE.
6716 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
6717 __builtin_ia32_umwait and __builtin_ia32_tpause.
6718 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
6719 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
6720 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
6721 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
6722 UNSPECV_TPAUSE): New.
6723 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
6724 * config/i386/i386.opt: Add -mwaitpkg.
6725 * config/i386/waitpkgintrin.h: New file.
6726 * config/i386/x86intrin.h: New header.
6727 * doc/invoke.texi: Add -mwaitpkg.
6729 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
6732 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
6734 (cortex-m0): Use armv6s-m isa.
6735 (cortex-m0plus): Likewise.
6736 (cortex-m1): Likewise.
6737 (cortex-m0.small-multiply): Likewise.
6738 (cortex-m0plus.small-multiply): Likewise.
6739 (cortex-m1.small-multiply): Likewise.
6741 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
6742 Jakub Jelinek <jakub@redhat.com>
6744 PR tree-optimization/85692
6745 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
6746 source permute as well.
6748 2018-05-11 Martin Liska <mliska@suse.cz>
6751 * doc/extend.texi: Document LLVM style format for no_sanitize
6754 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
6756 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
6757 mode_supports_vsx_dform_quad to mode_supports_dq_form.
6758 (mode_supports_vsx_dform_quad): Likewise.
6759 (mode_supports_vmx_dform): Move these functions to be next to the
6760 other mode_supports functions.
6761 (mode_supports_dq_form): Likewise.
6762 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
6763 mode_supports_dq_form.
6764 (reg_offset_addressing_ok_p): Likewise.
6765 (offsettable_ok_by_alignment): Likewise.
6766 (rs6000_legitimate_offset_address_p): Likewise.
6767 (legitimate_lo_sum_address_p): Likewise.
6768 (rs6000_legitimize_address): Likewise.
6769 (rs6000_legitimize_reload_address): Likewise.
6770 (rs6000_secondary_reload_inner): Likewise.
6771 (rs6000_preferred_reload_class): Likewise.
6772 (rs6000_output_move_128bit): Likewise.
6774 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
6776 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
6777 Generate SImode target register for null target.
6778 <case IX86_BUILTIN_XGETBV>: Ditto.
6779 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
6780 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
6782 2018-05-10 Carl Love <cel@us.ibm.com>
6784 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
6785 dcbtt and dcbtstt if operands[2] is 0.
6787 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
6790 * config/i386/sse.md (usadv64qi): New expander.
6792 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
6794 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
6795 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
6796 -maltivec=be support.
6797 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
6798 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
6799 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
6800 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
6801 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
6802 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
6803 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
6804 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
6805 altivec_vsumsws): Adjust.
6806 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
6807 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
6808 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
6810 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
6811 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
6812 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
6813 (altivec_lve<VI_char>x): Delete expand.
6814 (*altivec_lve<VI_char>x_internal): Rename to...
6815 (altivec_lve<VI_char>x): ... this.
6816 (altivec_lvxl_<mode>): Delete expand.
6817 (*altivec_lvxl_<mode>_internal): Rename to ...
6818 (altivec_lvxl_<mode>): ... this.
6819 (altivec_stvxl_<mode>): Delete expand.
6820 (*altivec_stvxl_<mode>_internal): Rename to ...
6821 (altivec_stvxl_<mode>): ... this.
6822 (altivec_stve<VI_char>x): Delete expand.
6823 (*altivec_stve<VI_char>x_internal): Rename to ...
6824 (altivec_stve<VI_char>x): ... this.
6825 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
6826 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
6827 reduc_plus_scal_<mode>): Adjust.
6828 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
6830 (rs6000_cpu_cpp_builtins): Adjust.
6831 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
6832 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
6833 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
6834 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
6835 -maltivec=be support.
6836 (rs6000_split_vec_extract_var): Adjust.
6837 (rs6000_split_v4si_init): Adjust.
6838 (swap_selector_for_mode): Delete.
6839 (altivec_expand_lvx_be, altivec_expand_stvx_be,
6840 altivec_expand_stvex_be): Delete.
6841 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
6842 -maltivec=be support.
6843 (rs6000_gimple_fold_builtin): Ditto.
6844 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
6846 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
6847 (TARGET_DIRECT_MOVE_64BIT): Adjust.
6848 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
6849 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
6850 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
6851 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
6852 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
6853 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
6854 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
6855 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
6856 anonymous split): Adjust.
6857 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
6858 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
6860 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
6862 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
6863 when --with-gxx-include-dir is also specified.
6864 * configure: Regenerate.
6866 2018-05-09 Jim Wilson <jimw@sifive.com>
6869 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
6870 * config/riscv/t-withmultilib: New.
6871 * config/riscv/withmultilib.h: New.
6872 * doc/install.texi: Document RISC-V --with-multilib-list support.
6874 2018-05-09 Richard Biener <rguenther@suse.de>
6876 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
6878 (vect_bb_vectorization_profitable_p): Adjust. Compute
6879 actual scalar cost using the cost vector and the add_stmt_cost
6882 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
6884 PR rtl-optimization/85645
6885 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
6886 in the REG_CFA_REGISTER note for LR, don't leave it empty.
6888 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
6890 PR rtl-optimization/85645
6891 * shrink-wrap.c (spread_components): Return a boolean saying if
6892 anything was changed.
6893 (try_shrink_wrapping_separate): Iterate spread_components until
6894 nothing changes anymore.
6896 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
6898 PR rtl-optimization/85645
6899 * regrename.c (build_def_use): Also kill the chains that include the
6900 destination of a REG_CFA_REGISTER note.
6902 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
6904 PR rtl-optimization/85645
6905 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
6906 insn that has a REG_CFA_REGISTER note.
6908 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
6910 * cfgexpand.c (expand_clobber): New function.
6911 (expand_gimple_stmt_1): Use it.
6912 * tree-vect-stmts.c (vect_clobber_variable): New function,
6914 (vectorizable_simd_clone_call): ...here.
6915 (vectorizable_store): Emit a clobber either side of an
6916 IFN_STORE_LANES sequence.
6917 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
6919 2018-05-09 Tom de Vries <tom@codesourcery.com>
6922 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
6923 (define_insn "trap_if_false"): Add exit after trap.
6925 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
6927 PR rtl-optimization/85638
6928 * bb-reorder.c: Include common/common-target.h.
6929 (create_forwarder_block): New function extracted from...
6930 (fix_up_crossing_landing_pad): ...here. Rename into...
6931 (dw2_fix_up_crossing_landing_pad): ...this.
6932 (sjlj_fix_up_crossing_landing_pad): New function.
6933 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
6934 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
6935 from both partitions and exit the loop after one iteration.
6937 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
6940 * doc/extend.texi (PowerPC Built-in Functions): Rename this
6942 (Basic PowerPC Built-in Functions): The new name of the
6943 subsection previously known as "PowerPC Built-in Functions".
6944 (Basic PowerPC Built-in Functions Available on all Configurations):
6946 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
6948 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
6950 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
6952 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
6955 2018-05-08 Jim Wilson <jimw@sifive.com>
6957 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
6958 (LD_EMUL_SUFFIX): New.
6959 (LINK_SPEC): Use it.
6961 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
6963 * doc/extend.texi (PowerPC Built-in Functions): Rename this
6965 (Basic PowerPC Built-in Functions): The new name of the
6966 subsection previously known as "PowerPC Built-in Functions".
6967 (Basic PowerPC Built-in Functions Available on all Configurations):
6969 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
6971 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
6973 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
6975 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
6978 2018-05-08 Jakub Jelinek <jakub@redhat.com>
6981 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
6982 after cmpelim optimization.
6984 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
6986 * config.gcc: Support "goldmont".
6987 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
6988 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6990 * config/i386/i386.c (m_GOLDMONT): Define.
6991 (processor_target_table): Add "goldmont".
6992 (PTA_GOLDMONT): Define.
6993 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
6994 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
6995 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
6996 (fold_builtin_cpu): Add "goldmont".
6997 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
6998 (ix86_option_override_internal): Add "goldmont".
6999 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
7000 (processor_type): Add PROCESSOR_GOLDMONT.
7001 * config/i386/i386.md: Add CPU "glm".
7002 * config/i386/glm.md: New file.
7003 * config/i386/x86-tune.def: Add m_GOLDMONT.
7004 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
7006 2018-05-08 Jakub Jelinek <jakub@redhat.com>
7009 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
7011 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
7012 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
7013 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
7016 * config/i386/i386.c (ix86_fold_builtin): Handle
7017 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
7020 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
7021 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
7023 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
7026 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
7027 (check_arch): Likewise.
7028 (check_fpu): Return the result rather than printing it.
7029 (end arch): Fix operator precedence.
7030 (end cpu): Likewise.
7031 (END): Print the result from check_fpu.
7033 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
7034 Alan Hayward <alan.hayward@arm.com>
7035 David Sherwood <david.sherwood@arm.com>
7037 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
7038 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
7039 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
7040 (*fcmuo<mode>_and): New patterns.
7042 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
7044 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
7045 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
7046 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
7047 (cmp_op, sve_imm_con): New code attributes.
7048 (SVE_COND_INT_CMP, imm_con): Delete.
7049 (cmp_op): Remove above unspecs from int attribute.
7050 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
7052 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
7053 comparison-specific unspecs.
7054 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
7055 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
7056 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
7057 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
7058 (*vec_fcm<cmp_op><mode>): Rename to...
7059 (*fcm<cmp_op><mode>): ...this and adjust likewise.
7060 (*vec_fcmuo<mode>): Rename to...
7061 (*fcmuo<mode>): ...this and adjust likewise.
7062 (*pred_fcm<cmp_op><mode>): New pattern.
7063 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
7064 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
7066 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
7068 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
7069 (aarch64_emit_sve_predicated_cond): New function.
7070 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
7071 (aarch64_emit_unspec_cond_or): Replace with...
7072 (aarch64_emit_sve_or_conds): ...this new function. Use
7073 aarch64_emit_sve_ptrue_op for the individual comparisons and
7074 aarch64_emit_binop to OR them together.
7075 (aarch64_emit_inverted_unspec_cond): Replace with...
7076 (aarch64_emit_sve_inverted_cond): ...this new function. Use
7077 aarch64_emit_sve_ptrue_op for the comparison and
7078 aarch64_emit_unop to invert the result.
7079 (aarch64_expand_sve_vec_cmp_float): Update after the above
7080 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
7082 2018-05-07 Nathan Sidwell <nathan@acm.org>
7084 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
7085 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
7086 (Backwards Compatibility): Likewise.
7088 2018-05-07 Luis Machado <luis.machado@linaro.org>
7092 2018-05-07 Luis Machado <luis.machado@linaro.org>
7094 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7095 <prefetch_dynamic_strides>: New const bool field.
7096 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7097 prefetch_dynamic_strides.
7098 (exynosm1_prefetch_tune): Likewise.
7099 (thunderxt88_prefetch_tune): Likewise.
7100 (thunderx_prefetch_tune): Likewise.
7101 (thunderx2t99_prefetch_tune): Likewise.
7102 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7104 (aarch64_override_options_internal): Update to set
7105 PARAM_PREFETCH_DYNAMIC_STRIDES.
7106 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7107 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7108 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7109 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7110 prefetch-dynamic-strides setting.
7112 2018-05-07 Luis Machado <luis.machado@linaro.org>
7114 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7115 <minimum_stride>: New const int field.
7116 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7117 minimum_stride field.
7118 (exynosm1_prefetch_tune): Likewise.
7119 (thunderxt88_prefetch_tune): Likewise.
7120 (thunderx_prefetch_tune): Likewise.
7121 (thunderx2t99_prefetch_tune): Likewise.
7122 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7123 (aarch64_override_options_internal): Update to set
7124 PARAM_PREFETCH_MINIMUM_STRIDE.
7125 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7126 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7127 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7128 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7129 stride is constant and is below the minimum stride threshold.
7131 2018-05-07 Luis Machado <luis.machado@linaro.org>
7133 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
7136 2018-05-07 Luis Machado <luis.machado@linaro.org>
7138 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7139 <prefetch_dynamic_strides>: New const bool field.
7140 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7141 prefetch_dynamic_strides.
7142 (exynosm1_prefetch_tune): Likewise.
7143 (thunderxt88_prefetch_tune): Likewise.
7144 (thunderx_prefetch_tune): Likewise.
7145 (thunderx2t99_prefetch_tune): Likewise.
7146 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7148 (aarch64_override_options_internal): Update to set
7149 PARAM_PREFETCH_DYNAMIC_STRIDES.
7150 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7151 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7152 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7153 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7154 prefetch-dynamic-strides setting.
7156 2018-05-07 Luis Machado <luis.machado@linaro.org>
7158 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7159 <minimum_stride>: New const int field.
7160 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7161 minimum_stride field.
7162 (exynosm1_prefetch_tune): Likewise.
7163 (thunderxt88_prefetch_tune): Likewise.
7164 (thunderx_prefetch_tune): Likewise.
7165 (thunderx2t99_prefetch_tune): Likewise.
7166 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7167 (aarch64_override_options_internal): Update to set
7168 PARAM_PREFETCH_MINIMUM_STRIDE.
7169 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7170 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7171 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7172 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7173 stride is constant and is below the minimum stride threshold.
7175 2018-05-06 Jakub Jelinek <jakub@redhat.com>
7178 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
7179 the type is addressable. Don't force op into register if it has
7182 2018-05-05 Roland McGrath <mcgrathr@google.com>
7185 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
7186 any section for which we don't know a specific type it should have,
7187 regardless of name. Previously this was done only for the exact
7188 names ".init_array", ".fini_array", and ".preinit_array".
7189 (default_elf_asm_named_section): Add comment about
7190 relationship with default_section_type_flags and SECTION_NOTYPE.
7191 (get_section): Don't consider it a type conflict if one side has
7192 SECTION_NOTYPE and the other doesn't, as long as neither has the
7193 SECTION_BSS et al used in the default_section_type_flags logic.
7195 2018-05-05 Tom de Vries <tom@codesourcery.com>
7198 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
7199 (workaround_barsyncs): New function.
7200 (nvptx_reorg): Use workaround_barsyncs.
7201 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7202 (define_expand "nvptx_membar_cta"): New define_expand.
7203 (define_insn "*nvptx_membar_cta"): New insn.
7205 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
7207 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
7208 To improve optimization opportunities.
7209 * builtin-types.def: The new needed builtin types for the above.
7211 2018-05-04 Richard Biener <rguenther@suse.de>
7213 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
7214 * gimple-ssa-store-merging.c
7215 (imm_store_chain_info::output_merged_store): Remove redundant create,
7216 release split_store vector contents on failure.
7217 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
7218 scalar stmt vector on cache hit.
7220 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
7222 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
7224 * config.gcc (powerpc-xilinx-eabi*): Remove.
7225 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
7227 (fusion_addis_mem_combo_load): Ditto.
7228 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
7230 (rs6000_cpu_cpp_builtins): Ditto.
7231 * config/rs6000/rs6000-linux.c
7232 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
7233 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
7234 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
7236 (rs6000_setup_reg_addr_masks): Ditto.
7237 (rs6000_init_hard_regno_mode_ok): Ditto.
7238 (rs6000_option_override_internal): Ditto.
7239 (legitimate_lo_sum_address_p): Ditto.
7240 (rs6000_legitimize_address): Ditto.
7241 (rs6000_legitimize_reload_address): Ditto.
7242 (rs6000_legitimate_address_p): Ditto.
7243 (abi_v4_pass_in_fpr): Ditto.
7244 (setup_incoming_varargs): Ditto.
7245 (rs6000_gimplify_va_arg): Ditto.
7246 (rs6000_split_multireg_move): Ditto.
7247 (rs6000_savres_strategy): Ditto.
7248 (rs6000_emit_prologue_components): Ditto.
7249 (rs6000_emit_epilogue_components): Ditto.
7250 (rs6000_emit_prologue): Ditto.
7251 (rs6000_emit_epilogue): Ditto.
7252 (rs6000_elf_file_end): Ditto.
7253 (rs6000_function_value): Ditto.
7254 (rs6000_libcall_value): Ditto.
7255 * config/rs6000/rs6000.h: Ditto.
7256 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
7257 (TARGET_MINMAX): ... this. New.
7258 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
7259 * config/rs6000/rs6000.md: Remove Xilinx FP support.
7260 (*movsi_internal1_single): Delete.
7261 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
7262 mfpu=, mxilinx-fpu): Delete.
7263 * config/rs6000/singlefp.h: Delete.
7264 * config/rs6000/sysv4.h: Remove Xilinx FP support.
7265 * config/rs6000/t-rs6000: Ditto.
7266 * config/rs6000/t-xilinx: Delete.
7267 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
7268 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
7269 (VStype_simple): Delete.
7270 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
7271 * config/rs6000/xfpu.h: Delete.
7272 * config/rs6000/xfpu.md: Delete.
7273 * config/rs6000/xilinx.h: Delete.
7274 * config/rs6000/xilinx.opt: Delete.
7275 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
7276 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
7278 2018-05-04 Tom de Vries <tom@codesourcery.com>
7281 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
7284 2018-05-04 Richard Biener <rguenther@suse.de>
7287 * tree-complex.c (update_complex_assignment): We are always in SSA form.
7288 (expand_complex_div_wide): Likewise.
7289 (expand_complex_operations_1): Likewise.
7290 (expand_complex_libcall): Preserve EH info of the original stmt.
7291 (tree_lower_complex): Handle removed blocks.
7292 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
7293 on complex multiplication and division libcall builtins.
7295 2018-05-04 Richard Biener <rguenther@suse.de>
7298 * fold-const.c (negate_expr_p): Restrict negation of operand
7299 zero of a division to when we know that can happen without
7301 (fold_negate_expr_1): Likewise.
7303 2018-05-04 Jakub Jelinek <jakub@redhat.com>
7306 * real.h (real_nextafter): Declare.
7307 * real.c (real_nextafter): New function.
7308 * fold-const-call.c (fold_const_nextafter): New function.
7309 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
7310 CASE_CFN_NEXTTOWARD.
7311 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
7312 even when arg1_mode is different from arg0_mode.
7314 2018-05-03 Nathan Sidwell <nathan@acm.org>
7316 * doc/extend.texi (Deprecated Features): Remove
7318 (Backwards Compatibility): Likewise.
7319 * doc/invoke.texi (C++ Language Options): Likewise.
7320 (C++ Dialect Options): Likewise.
7322 2018-05-03 Jakub Jelinek <jakub@redhat.com>
7325 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
7326 _mm512_mask_mullox_epi64): New intrinsics.
7328 2018-05-03 Tom de Vries <tom@codesourcery.com>
7331 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7332 dump files): Add offload-tree.
7334 2018-05-03 Richard Biener <rguenther@suse.de>
7336 PR tree-optimization/85615
7337 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
7338 to loops not nested in BBs loop father to avoid creating multi-entry
7341 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7343 PR tree-optimization/70291
7344 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
7345 arguments. Change return type to tree. Emit libcall as a new
7346 statement rather than replacing existing one when inplace_p is true.
7347 (expand_complex_multiplication_components): New function.
7348 (expand_complex_multiplication): Expand floating-point complex
7349 multiplication using the above.
7350 (expand_complex_division): Rename inner_type parameter to type.
7351 Update expand_complex_libcall call-site.
7352 (expand_complex_operations_1): Update expand_complex_multiplication
7353 and expand_complex_division call-sites.
7355 2018-05-02 Jakub Jelinek <jakub@redhat.com>
7358 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
7359 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
7360 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
7361 the highest significant bit of the shift count mask is clear. In
7362 check whether and[sq]i3 is needed verify that all significant bits
7363 of the shift count other than the highest are set.
7365 2018-05-02 Tom de Vries <tom@codesourcery.com>
7368 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
7369 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
7370 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
7371 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
7372 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
7373 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
7374 __builtin_goacc_parlevel_size.
7376 2018-05-02 Richard Biener <rguenther@suse.de>
7378 PR tree-optimization/85597
7379 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
7380 do not use split vect_get_vec_defs call but call vect_get_slp_defs
7383 2018-05-02 Tom de Vries <tom@codesourcery.com>
7386 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7387 dump files): Add ltrans-tree.
7389 2018-05-02 Tom de Vries <tom@codesourcery.com>
7392 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7393 dump files): Add wpa-ipa.
7395 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
7397 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
7398 powerpc*-*-linux*paired* target.
7399 * config/rs6000/750cl.h: Delete.
7400 * config/rs6000/paired.h: Delete.
7401 * config/rs6000/paired.md: Delete.
7402 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
7404 * config/rs6000/rs6000-builtin.def: Remove paired float support.
7405 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
7406 comment. Remove paired float support.
7407 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
7408 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
7410 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
7411 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
7413 * config/rs6000/rs6000.c: Remove paired float support.
7414 (paired_expand_vector_init, paired_expand_vector_move,
7415 paired_emit_vector_compare, paired_emit_vector_cond_expr,
7416 (paired_expand_lv_builtin, paired_expand_stv_builtin,
7417 paired_expand_builtin, paired_expand_predicate_builtin,
7418 paired_init_builtins): Delete.
7419 * config/rs6000/rs6000.h: Remove paired float support.
7420 * config/rs6000/rs6000.md: Remove paired float support.
7421 (move_from_CR_ov_bit): Delete.
7422 * config/rs6000/rs6000.opt (mpaired): Delete.
7423 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
7424 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
7426 2018-05-02 Richard Biener <rguenther@suse.de>
7429 * gimplify.c (gimplify_save_expr): When in SSA form allow
7430 SAVE_EXPRs to compute to SSA vars.
7432 2018-05-02 Jakub Jelinek <jakub@redhat.com>
7435 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
7436 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
7437 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
7438 clobber operands[2], instead use a new pseudo. Formatting fixes.
7440 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
7442 PR tree-optimization/85586
7443 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
7444 exit early for statements in the same group if the accesses are
7447 2018-05-02 Tom de Vries <tom@codesourcery.com>
7450 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
7453 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
7455 PR tree-optimization/85143
7456 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
7458 2018-05-01 Tom de Vries <tom@codesourcery.com>
7461 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
7462 not found" error message.
7464 2018-05-01 Tom de Vries <tom@codesourcery.com>
7467 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
7468 * vec.c (test_ordered_remove_if): New function.
7469 (vec_c_tests): Call test_ordered_remove_if.
7470 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
7471 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
7472 * tree-vect-patterns.c (vect_pattern_recog_1): Use
7473 VEC_ORDERED_REMOVE_IF.
7475 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7477 PR tree-optimization/82665
7478 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
7479 pointer subtraction where arguments come from a memchr call.
7481 2018-05-01 Jakub Jelinek <jakub@redhat.com>
7483 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
7484 --push-state --as-needed and --pop-state instead of --as-needed and
7485 --no-as-needed if ld supports it.
7486 * configure: Regenerated.
7489 * doc/install.texi2html: Replace _002d with - and _002a with * in
7490 generated html files using sed.
7492 2018-04-30 David Malcolm <dmalcolm@redhat.com>
7495 * gcc-rich-location.c (blank_line_before_p): New function.
7496 (use_new_line): New function.
7497 (gcc_rich_location::add_fixit_insert_formatted): New function.
7498 * gcc-rich-location.h
7499 (gcc_rich_location::add_fixit_insert_formatted): New function.
7501 2018-04-30 David Malcolm <dmalcolm@redhat.com>
7503 * selftest.c (assert_streq): Rename "expected" and "actual" to
7504 "val1" and "val2". Extend NULL-handling to cover both inputs
7505 symmetrically, while still requiring both to be non-NULL for a pass.
7506 * selftest.h (assert_streq): Rename "expected" and "actual" to
7508 (ASSERT_EQ): Likewise.
7509 (ASSERT_EQ_AT): Likewise.
7510 (ASSERT_KNOWN_EQ): Likewise.
7511 (ASSERT_KNOWN_EQ_AT): Likewise.
7512 (ASSERT_NE): Likewise.
7513 (ASSERT_MAYBE_NE): Likewise.
7514 (ASSERT_MAYBE_NE_AT): Likewise.
7515 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
7516 the assertion to pass.
7517 (ASSERT_STREQ_AT): Likewise.
7519 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
7521 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
7522 interaction with -pie.
7524 2018-04-30 David Malcolm <dmalcolm@redhat.com>
7526 * selftest.h: Fix alphabetization of per-source-file selftest
7529 2018-04-30 Jason Merrill <jason@redhat.com>
7531 PR c++/61982 - dead stores to destroyed objects.
7532 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
7535 2018-04-30 Jason Merrill <jason@redhat.com>
7537 * tree.c (build_clobber): New.
7538 * tree.h: Declare it.
7539 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
7541 2018-04-30 David Malcolm <dmalcolm@redhat.com>
7543 * diagnostic-show-locus.c (layout::layout): Update for
7544 location_get_source_line returning a char_span.
7545 (struct char_span): Move to input.h.
7546 (struct correction): Update for fields in char_span becoming
7548 (struct source_line): Update for location_get_source_line
7549 returning a char_span.
7550 (layout::print_line): Likewise.
7551 * edit-context.c (edited_file::print_content): Likewise.
7552 (edited_file::print_diff_hunk): Likewise.
7553 (edited_file::print_run_of_changed_lines): Likewise.
7554 (edited_file::get_num_lines): Likewise.
7555 (edited_line::edited_line): Likewise.
7556 * final.c (asm_show_source): Likewise.
7557 * input.c (location_get_source_line): Convert return type
7558 from const char * to char_span, losing the final "line_len"
7560 (dump_location_info): Update for the above.
7561 (get_substring_ranges_for_loc): Likewise. Use a char_span
7562 when handling the literal within the line.
7563 (test_reading_source_line): Update for location_get_source_line
7564 returning a char_span.
7565 * input.h (class char_span): Move here from
7566 diagnostic-show-locus.c, converting from a struct to a class.
7567 Make data members private.
7568 (char_span::operator bool): New.
7569 (char_span::length): New.
7570 (char_span::get_buffer): New.
7571 (char_span::operator[]): New.
7572 (char_span::subspan): Make const.
7573 (char_span::xstrdup): New.
7574 (location_get_source_line): Convert return type from const char *
7575 to char_span, losing the final "line_size" param.
7577 2018-04-30 Jan Hubicka <jh@suse.cz>
7579 * lto-wrapper.c (ltrans_priorities): New static var.
7580 (cmp_priority): New.
7581 (run_gcc): Read priorities and if doing parallel build order
7582 the Makefile by them.
7584 2018-04-30 David Malcolm <dmalcolm@redhat.com>
7586 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
7588 2018-04-30 Richard Biener <rguenther@suse.de>
7590 * tree-cfg.c (verify_address): Remove base argument, add
7591 flag whether to check TREE_ADDRESSABLE and do that.
7592 (verify_expr): Remove.
7593 (verify_types_in_gimple_reference): Add pieces from verify_expr.
7594 (verify_gimple_assign_single): Likewise.
7595 (verify_gimple_switch): Likewise.
7596 (verify_expr_location_1): Dereference tp once. Add (disabled)
7597 piece from verify_expr.
7598 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
7600 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
7602 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
7604 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
7606 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
7607 (small_data_pattern): Likewise.
7608 (arc_rewrite_small_data): Likewise.
7609 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
7610 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
7611 (get_symbol_alignment): New function.
7612 (legitimate_small_data_address_p): Likewise.
7613 (legitimate_scaled_address): Update, call
7614 legitimate_small_data_address_p.
7615 (output_sdata): New static variable.
7616 (arc_print_operand): Update how we handle small data operands.
7617 (arc_print_operand_address): Likewise.
7618 (arc_legitimate_address_p): Update, use
7619 legitimate_small_data_address_p.
7620 (arc_rewrite_small_data_p): Remove.
7621 (arc_rewrite_small_data_1): Likewise.
7622 (arc_rewrite_small_data): Likewise.
7623 (small_data_pattern): Likewise.
7624 (compact_sda_memory_operand): Update to use
7625 legitimate_small_data_address_p and get_symbol_alignment.
7626 (prepare_move_operands): Don't rewite sdata pattern.
7627 (prepare_extend_operands): Remove.
7628 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
7630 (zero_extendqisi2): Likewise.
7631 (zero_extendhisi2): Likewise.
7632 (extendqihi2): Likewise.
7633 (extendqisi2): Likewise.
7634 (extendhisi2): Likewise.
7638 * config/arc/constraints.md (Usd): Change it to memory constraint.
7640 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
7642 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
7643 as source of std instructions.
7644 * config/arc/arc.md (movsi_insn): Update pattern predicate to
7645 allow 6-bit constants as source for store instructions.
7646 (movdi_insn): Update instruction pattern to allow 6-bit constants
7647 as source for store instructions.
7649 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
7651 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
7653 2018-04-30 Nathan Sidwell <nathan@acm.org>
7654 Sandra Loosemore <sandra@codesourcery.com>
7656 * dumpfile.c (dump_open): Allow '-' for stdout.
7657 * doc/invoke.texi (Developer Options): Document dump filename
7658 determination early. Document stdin/stdout selection.
7660 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
7662 Microblaze Target: PIC data text relative
7664 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
7665 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
7667 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
7668 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
7669 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
7670 New addressing mode for data-text relative position indepenedent code.
7671 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
7672 'ADDRESS_SYMBOLIC_TXT_REL'.
7673 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
7674 (microblaze_legitimate_pic_operand): Exclude function calls from
7675 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
7676 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
7678 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
7679 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
7680 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
7681 for 'address + offset'.
7682 (microblaze_expand_prologue): Add new function prologue call for
7684 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
7685 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
7686 table in case of TARGET_PIC_DATA_TEXT_REL.
7687 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
7688 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
7689 Add new macros 'UNSPEC_TEXT',
7690 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
7691 + exclude function calls from 'UNSPEC_PLT' in case of data text
7693 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
7694 new target hook for generating address diff vector tables in case of
7696 * doc/tm.texi : Regenerate.
7697 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
7698 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
7699 of addr diff vector generation.
7700 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
7701 target hook definition.
7702 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
7703 Add default function for generate_pic_addr_diff_vec -> flag_pic.
7704 * doc/invoke.texi (Add new pic option): Add new microblaze pic
7705 option for data text relative.
7707 2018-04-30 Richard Biener <rguenther@suse.de>
7709 * tree-chrec.h (evolution_function_is_constant_p): Remove
7711 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
7713 2018-04-30 Richard Biener <rguenther@suse.de>
7716 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
7718 2018-04-30 Richard Biener <rguenther@suse.de>
7720 PR tree-optimization/28364
7721 PR tree-optimization/85275
7722 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
7723 copying first exit test.
7725 2018-04-28 Mark Wielaard <mark@klomp.org>
7727 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
7729 (dwarf_AT): Handle DW_AT_addr_base.
7730 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
7732 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
7735 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
7736 (*ashl<dwi>3_doubleword_mask_1): Ditto.
7737 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
7738 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
7740 2018-04-28 Richard Biener <rguenther@suse.de>
7742 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
7743 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
7744 to reflect use. Only add interesting stmts.
7746 2018-04-27 Martin Jambor <mjambor@suse.cz>
7749 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
7750 the jump function allows for passing through aggregate values.
7752 2018-04-27 David Malcolm <dmalcolm@redhat.com>
7754 * input.h (in_system_header_at): Convert from macro to inline
7756 (from_macro_expansion_at): Likewise.
7757 (from_macro_definition_at): Likewise.
7759 2018-04-27 Jeff Law <law@redhat.com>
7761 * config.gcc: Mark tile* targets as deprecated/obsolete.
7763 2018-04-27 Richard Biener <rguenther@suse.de>
7765 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
7768 2018-04-27 Richard Biener <rguenther@suse.de>
7770 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
7772 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
7774 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
7775 with Yd constraint. Set "preferred_for_speed" attribute from
7776 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
7778 (*movdi_internal): Ditto.
7779 (movti_interunit splitters): Remove
7780 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
7781 (movdi_interunit splitters): Ditto.
7782 * config/i386/constraints.md (Ye): Remove.
7783 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
7785 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7788 * config/aarch64/constraints.md (Usg): Limit to 31.
7791 2018-04-27 Jakub Jelinek <jakub@redhat.com>
7793 PR tree-optimization/85529
7794 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
7795 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
7796 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
7797 zero extension or masking of the MSB bit.
7798 (optimize_range_tests): Add FIRST_BB argument, pass it through
7799 to optimize_range_tests_var_bound.
7800 (maybe_optimize_range_tests, reassociate_bb): Adjust
7801 optimize_range_tests callers.
7803 2018-04-26 Richard Biener <rguenther@suse.de>
7804 Jakub Jelinek <jakub@redhat.com>
7806 * cgraph.h (symbol_table): Just declare debug method here.
7807 * symtab.c (symbol_table::debug): Define.
7809 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
7811 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
7813 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
7815 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
7816 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
7817 (*movdi_internal): Substitute Yi and Yj constraint with x
7818 and Ym and Yn constraint with y constraint. Update "isa"
7819 attribute and set "preferred_for_speed" attribute from
7820 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
7821 (*movsi_internal): Ditto.
7822 (*movdf_internal): Ditto.
7823 (*movsf_internal): Ditto.
7824 (*zero_extendsidi2): Ditto.
7825 * config/i386/sse.md (vec_set<mode>_0): Ditto.
7826 (sse2_loadld): Ditto.
7827 (*vec_extract<ssevecmodelower>_0): Ditto.
7828 (*vec_extractv4si_0_zext_sse4): Ditto.
7829 (vec_concatv2di): Ditto.
7830 (*vec_dup<mode>): Ditto.
7831 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
7832 * config/i386/constraints.md (Yi): Remove.
7837 2018-04-26 Nathan Sidwell <nathan@acm.org>
7839 * dumpfile.c (dump_open): New.
7840 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
7841 (dump_finish): Detect stdio/stderr by value not name.
7843 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
7845 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
7847 2018-04-26 Tom de Vries <tom@codesourcery.com>
7850 * config/nvptx/nvptx.c (verify_neutering_jumps)
7851 (verify_neutering_labels): New function
7852 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
7854 2018-04-26 Tom de Vries <tom@codesourcery.com>
7857 * config/nvptx/nvptx.c (needs_neutering_p): New function.
7858 (nvptx_single): Use needs_neutering_p to skip over insns that do not
7861 2018-04-26 Richard Biener <rguenther@suse.de>
7862 Tom de Vries <tom@codesourcery.com>
7865 * lto-streamer-out.c (output_function): Fixup loops if required to match
7866 discovery done in the reader.
7868 2018-04-26 Richard Biener <rguenther@suse.de>
7870 PR tree-optimization/85116
7871 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
7872 have a loop exit from the single latch predecessor. Remove
7873 case of header with just condition.
7874 (ch_base::copy_headers): Exclude infinite loops from any
7876 (pass_ch::execute): Record exits.
7878 2018-04-26 Richard Biener <rguenther@suse.de>
7880 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
7881 prologue cost vector and pass it to vect_get_load_cost.
7882 (vect_get_peeling_costs_all_drs): Likewise.
7883 (vect_peeling_hash_get_lowest_cost): Likewise.
7884 (vect_enhance_data_refs_alignment): Likewise.
7886 2018-04-26 Richard Biener <rguenther@suse.de>
7889 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
7890 checking of integer<->pointer conversions.
7891 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
7892 sign-/zero-extending pointer types.
7893 (expand_omp_for_static_chunk): Likewise.
7895 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
7896 Jean Lee <xiaoyur347@gmail.com>
7898 * config/mips/mips.c (mips_asan_shadow_offset): New function.
7899 (TARGET_ASAN_SHADOW_OFFSET): Define.
7900 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
7901 true for -fsanitize=address.
7903 2018-04-25 Mark Wielaard <mark@klomp.org>
7905 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
7908 2018-04-25 Jakub Jelinek <jakub@redhat.com>
7910 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
7911 than "alu", remove explicit "memory" and "imm_disp" attributes.
7912 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
7915 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
7916 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
7917 gen_lowpart_no_emit.
7919 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
7922 * config/i386/i386.c (ix86_expand_builtin): Change memory
7923 operand to XI, extend p0 to Pmode.
7924 * config/i386/i386.md: Change unspec volatile and operand
7925 1 mode to XI, change operand 0 mode to P.
7927 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
7929 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
7930 GET_MODE_MASK before any checking.
7931 (nds32_can_use_bset_p): Likewise.
7932 (nds32_can_use_btgl_p): Likewise.
7934 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
7936 * config/nds32/nds32-doubleword.md: New define_split pattern for
7937 illegal register number.
7939 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
7941 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
7943 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
7945 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
7947 2018-04-25 Richard Biener <rguenther@suse.de>
7949 * lto-streamer.h (LTO_major_version): Bump to 8.
7951 2018-04-25 Jakub Jelinek <jakub@redhat.com>
7953 * BASE-VER: Set to 9.0.0.
7955 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
7957 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
7958 in __abskf2 and __powikf2.
7960 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7963 * config/aarch64/constraints.md (Usg, Usj): New constraints.
7964 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
7965 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
7966 Use the above on operand 2. Reindent.
7967 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
7969 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
7972 * common/config/i386/i386-common.c (ix86_handle_option): Don't
7974 * config/i386/i386.opt (mcet): Removed.
7975 * doc/install.texi: Remove -mcet documentation.
7976 * doc/invoke.texi: Likewise.
7978 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
7981 * doc/install.texi: Remove -mcet from bootstrap-cet.
7983 2018-04-24 Jakub Jelinek <jakub@redhat.com>
7986 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
7987 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
7991 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
7992 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
7993 containing a CONST_VECTOR.
7995 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
7997 * doc/install.texi: Update newlib dependency for nvptx.
7999 2018-04-24 Jakub Jelinek <jakub@redhat.com>
8002 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
8003 instead of INTVAL when shifting x left.
8005 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
8007 PR tree-optimization/85478
8008 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
8009 vect_grouped_store_supported for single element vectors.
8011 2018-04-24 Richard Biener <rguenther@suse.de>
8014 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
8015 load cost increase to the case of non-constant step.
8017 2018-04-24 Jakub Jelinek <jakub@redhat.com>
8020 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
8021 destination if any_malformed_asm.
8023 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
8026 * expr.c (store_field): In the bitfield case, if the value comes from
8027 a function call and is returned in registers by means of a PARALLEL,
8028 do not change the mode of the temporary unless BLKmode and VOIDmode.
8030 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
8032 PR rtl-optimization/85423
8033 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
8034 dependencies to debug insns when the previous insn is non-debug.
8036 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
8038 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
8039 enums into a single definition.
8040 (fls): Fix predicates and printing.
8043 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
8045 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
8046 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
8047 and short u6 immediate.
8048 (check_if_valid_sleep_operand): Remove.
8049 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
8051 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8053 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
8054 flag_always_save_lp condition.
8055 * config/nds32/nds32.opt (malways-save-lp): New option.
8057 2018-04-22 Shiva Chen <shiva0217@gmail.com>
8059 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
8060 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
8061 * config/nds32/nds32.h
8062 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
8063 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
8065 2018-04-22 Shiva Chen <shiva0217@gmail.com>
8067 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
8068 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
8070 2018-04-22 Shiva Chen <shiva0217@gmail.com>
8071 Chung-Ju Wu <jasonwucj@gmail.com>
8073 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
8075 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
8076 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
8078 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8080 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
8082 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8084 * config/nds32/nds32-protos.h (nds32_data_alignment,
8085 nds32_local_alignment): Declare.
8086 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
8087 nds32_local_alignment): New functions.
8088 (TARGET_CONSTANT_ALIGNMENT): Define.
8089 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
8091 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8093 * config/nds32/nds32.c
8094 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
8095 (TARGET_MODES_TIEABLE_P): Likewise.
8097 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8099 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
8102 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
8103 Chung-Ju Wu <jasonwucj@gmail.com>
8105 * config/nds32/constants.md (unspec_volatile_element): Add enum values
8106 for unaligned access.
8107 * config/nds32/nds32-intrinsic.c: Implementation of expanding
8109 * config/nds32/nds32-intrinsic.md: Likewise.
8110 * config/nds32/nds32_intrinsic.h: Likewise.
8111 * config/nds32/nds32.h (nds32_builtins): Likewise.
8112 * config/nds32/nds32.opt (munaligned-access): New option.
8113 * config/nds32/nds32.c (nds32_asm_file_start): Display
8114 flag_unaligned_access status.
8116 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
8118 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
8119 -mno-relax is present.
8120 * config/riscv/linux.h (LINK_SPEC): Ditto.
8122 2018-04-20 Martin Sebor <msebor@redhat.com>
8125 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
8127 (gimple_fold_builtin_stxcpy_chk): Same.
8128 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
8130 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
8133 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
8134 __powikf2 when long double is IEEE 128-bit.
8136 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
8138 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
8139 step to make sure stack always aligned.
8141 2018-04-20 Carl Love <cel@us.ibm.com>
8144 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
8145 size check for arg0.
8147 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
8148 Tom de Vries <tom@codesourcery.com>
8151 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
8152 Emit insns for calls too.
8153 (nvptx_find_par): Always look for worker-level predecessor insn.
8154 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
8156 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
8157 (nvptx_process_pars): Propagate frames for calls.
8159 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
8162 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
8164 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
8165 (ix86_handle_option): Don't handle OPT_mibt.
8166 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
8168 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
8170 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
8171 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
8172 (ix86_target_macros): Define __CET__ with flag_cf_protection
8173 for -fcf-protection.
8174 * config/i386/i386.c (isa2_opts): Remove -mibt.
8175 * config/i386/i386.h (TARGET_IBT): Removed.
8176 (TARGET_IBT_P): Likewise.
8177 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
8178 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
8179 * config/i386/i386.opt (mcet): Update help message.
8182 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
8183 -mcet as an alias for -mshstk.
8185 2018-04-20 Richard Biener <rguenther@suse.de>
8188 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
8189 complexity by forcing a single use of the multiply operand.
8191 2018-04-20 Martin Jambor <mjambor@suse.cz>
8194 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
8195 recursion dependency to only apply to non-clones.
8197 2018-04-20 Martin Jambor <mjambor@suse.cz>
8200 * ipa-cp.c (create_specialized_node): Check that clones of
8201 self-recursive edges exist during IPA-CP.
8203 2018-04-19 Toon Moene <toon@moene.org>
8205 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
8208 2018-04-19 Jakub Jelinek <jakub@redhat.com>
8210 PR tree-optimization/85467
8211 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
8212 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
8213 VECTOR_CST element to type.
8215 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
8218 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
8219 * config/i386/i386.md (builtin_setjmp_setup): Removed.
8220 (builtin_longjmp): Likewise.
8221 (save_stack_nonlocal): New pattern.
8222 (restore_stack_nonlocal): Likewise.
8224 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
8227 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8228 Replace ASM_OUTPUT_LABEL with fprintf.
8230 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
8233 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8234 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
8235 * config/i386/i386-c.c (ix86_target_macros_internal): Also
8236 define __IBT__ and __SHSTK__ for -fcf-protection.
8237 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
8239 (ix86_trampoline_init): Likewise.
8240 (x86_output_mi_thunk): Likewise.
8241 (ix86_notrack_prefixed_insn_p): Likewise.
8242 (ix86_option_override_internal): Don't disallow -fcf-protection.
8243 * config/i386/i386.md (rdssp<mode>): Also enable for
8245 (incssp<mode>): Likewise.
8246 (nop_endbr): Likewise.
8247 * config/i386/i386.opt (mcet): Change help message to built-in
8251 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
8252 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
8253 enable CET built-in functions.
8255 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
8257 * common/config/i386/i386-common.c
8258 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
8259 OPTION_MASK_ISA_MOVDIRI_UNSET,
8260 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
8261 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
8262 * config.gcc (movdirintrin.h): New header.
8263 * config/i386/cpuid.h (bit_MOVDIRI,
8264 bit_MOVDIR64B): New bits.
8265 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
8267 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
8268 (VOID, PVOID, PCVOID)): New function types.
8269 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
8270 __builtin_ia32_directstoreu_u64,
8271 __builtin_ia32_movdir64b): New builtins.
8272 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
8273 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
8275 (ix86_valid_target_attribute_inner_p): Ditto.
8276 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
8277 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
8278 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
8279 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
8280 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
8281 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
8282 (movdiri<mode>, movdir64b_<mode>): New.
8283 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
8284 * config/i386/immintrin.h: Include movdirintrin.h.
8285 * config/i386/movdirintrin.h: New file.
8286 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
8288 2018-04-19 Richard Biener <rguenther@suse.de>
8291 * cfg.c (clear_bb_flags): When loop state says we have
8292 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
8294 2018-04-19 Richard Biener <rguenther@suse.de>
8296 PR tree-optimization/84737
8297 * tree-vect-data-refs.c (vect_copy_ref_info): New function
8298 copying restrict info.
8299 (vect_setup_realignment): Use it.
8300 * tree-vectorizer.h (vect_copy_ref_info): Declare.
8301 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
8302 the first DR to all generated stores.
8303 (vectorizable_load): Likewise for loads.
8305 2018-04-19 Jakub Jelinek <jakub@redhat.com>
8307 PR tree-optimization/85446
8308 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
8309 the integral and pointer types to have the same precision.
8311 * doc/install.texi: Document --disable-cet being the default and
8314 2018-04-18 Martin Liska <mliska@suse.cz>
8316 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
8319 2018-04-18 Martin Liska <mliska@suse.cz>
8322 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
8325 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
8326 arguments if they are comparable.
8328 2018-04-18 Martin Liska <mliska@suse.cz>
8331 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
8334 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
8337 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
8340 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
8341 ENDBR after calling __morestack.
8343 2018-04-18 David Malcolm <dmalcolm@redhat.com>
8346 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
8347 by using gcc_base_ver to generate a gcc_driver_version, and use
8348 it when generating GCC_DRIVER_NAME.
8349 * configure: Regenerate.
8351 2018-04-18 Jakub Jelinek <jakub@redhat.com>
8354 * config.gcc: Obsolete powerpc*-*-*spe*.
8356 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8359 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
8360 (stabstr_D): Change type of unum from unsigned int to
8361 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
8364 2018-04-17 Jim Wilson <jimw@sifive.com>
8367 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
8368 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
8369 Set arg_pointer_offset after using pretend_args_size.
8371 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8373 PR rtl-optimization/85431
8374 * dse.c (record_store): Ignore zero width stores.
8377 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
8378 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
8379 __builtin_stack_restore rather than after it.
8380 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
8381 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
8382 argument instead of virtual_dynamic_stack_rtx.
8384 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
8386 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
8388 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
8389 Add note to error message to explain internal mapping of overloaded
8390 built-in function name to non-overloaded built-in function name.
8391 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
8394 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
8397 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
8398 where the inputs overlap with the output.
8400 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8402 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
8403 (=v, v) alternative and explicit "memory" attribute.
8404 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
8405 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8407 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
8408 "sselog1" type instead of "sselog".
8409 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
8410 "sselog". Remove explicit "memory" attribute.
8411 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
8412 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8414 (vec_extract_hi_v32hi): Merge all alternatives into one, use
8415 "sselog1" type instead of "sselog". Remove explicit "memory"
8417 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
8418 use "sselog1" type instead of "sselog". Remove explicit "memory"
8420 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
8421 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8423 (vec_extract_hi_v64qi): Merge all alternatives into one, use
8424 "sselog1" type instead of "sselog". Remove explicit "memory"
8426 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
8427 use "sselog1" type instead of "sselog". Remove explicit "memory"
8431 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
8434 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
8437 2018-04-17 Martin Jambor <mjambor@suse.cz>
8440 * ipa-cp.c (create_specialized_node): Call
8441 expand_all_artificial_thunks if necessary.
8443 2018-04-17 Martin Liska <mliska@suse.cz>
8446 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
8447 in message, remote space in between '_G' and '('.
8449 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8452 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
8453 avx512f_vmcmp<mode>3<round_saeonly_name>,
8454 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
8455 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
8456 avx512f_rndscale<mode><round_saeonly_name>,
8457 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
8458 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
8459 Use %<iptr>2 instead of %2 for -masm=intel.
8460 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
8461 avx512f_vcvttss2usi<round_saeonly_name>,
8462 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
8464 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
8465 avx512f_vcvttsd2usi<round_saeonly_name>,
8466 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
8467 Use %q1 instead of %1 for -masm=intel.
8468 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
8469 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
8470 of %3 for -masm=intel.
8471 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
8473 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
8475 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
8477 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
8478 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
8480 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
8482 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
8483 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
8484 %g1 and one with %0 and %1.
8485 (avx512er_vmrcp28<mode><round_saeonly_name>,
8486 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
8488 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
8489 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
8490 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
8491 of %0 and %{%4%} for -masm=intel.
8492 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
8493 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
8494 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
8495 order of %0 and %{%5%}%{z%} for -masm=intel.
8497 2018-04-17 Jan Hubicka <jh@suse.cz>
8500 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
8502 2018-04-17 Martin Liska <mliska@suse.cz>
8505 * multiple_target.c (create_dispatcher_calls): Set apostrophes
8506 for target_clone error message. Make default implementation
8507 clone to be a local declaration.
8508 (separate_attrs): Add new argument and check for an empty
8510 (expand_target_clones): Handle it.
8511 (ipa_target_clone): Make redirection just for target_clones
8514 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
8515 Tom de Vries <tom@codesourcery.com>
8518 * omp-expand.c (expand_oacc_for): Add dummy false branch for
8519 tiled basic blocks without omp continue statements.
8521 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
8524 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
8525 vec_extract expression as having side effects to make sure it gets
8528 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
8531 * config/i386/i386.c (get_builtin_code_for_version): Check
8534 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
8537 * gcc/config.gcc: Support "skylake".
8538 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
8540 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
8541 (processor_target_table): Add "skylake".
8542 (ix86_option_override_internal): Add "skylake".
8543 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
8544 PROCESSOR_CANNONLAKE.
8545 (get_builtin_code_for_version): Fix priority for
8546 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
8547 PROCESSOR_SKYLAKE-AVX512.
8548 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
8549 (processor_type): Add PROCESSOR_SKYLAKE.
8551 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
8552 Jason Merrill <jason@redhat.com>
8555 * convert.c (convert_to_integer_1): Use direct recursion for
8556 enumeral types and types with a precision less than the number
8557 of bits in their mode.
8559 2018-04-16 Julia Koval <julia.koval@intel.com>
8562 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
8563 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
8565 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
8568 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
8569 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
8570 and -mno-direct-move.
8572 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
8575 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
8576 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
8577 Ensure negative shifts result in {0}.
8579 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
8581 PR rtl-optimization/79916
8582 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
8583 regs (if any) to define how to gnerate SD moves when LRA is in
8586 2018-04-13 Jakub Jelinek <jakub@redhat.com>
8588 PR rtl-optimization/85393
8589 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
8590 * except.c (expand_dw2_landing_pad_for_region): Make static.
8591 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
8592 a label and unconditional jump to old_bb, rather than
8593 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
8596 PR rtl-optimization/85376
8597 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
8598 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
8599 instead of a specific value.
8601 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
8602 Bin Cheng <bin.cheng@arm.com>
8604 PR tree-optimization/82965
8605 PR tree-optimization/83991
8606 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
8607 by_profile_only parameter.
8608 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
8609 information if the loop was predicted to iterate too many times.
8610 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
8612 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
8615 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
8618 2018-04-13 Martin Liska <mliska@suse.cz>
8619 Jakub Jelinek <jakub@redhat.com>
8622 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
8623 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
8624 * builtins.c (expand_builtin_memory_copy_args): Use
8625 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
8626 handle dest_addr == pc_rtx.
8628 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
8631 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
8632 asked to not generate direct moves.
8633 (fix_trunc<mode>si2_stfiwx): Similar.
8634 (fix_trunc<mode>si2_internal): Similar.
8636 2018-04-12 Jakub Jelinek <jakub@redhat.com>
8639 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
8640 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
8641 lookup if dest in some wider mode is known to be const0_rtx and
8642 if so, record permanent equivalence for it to be ZERO_EXTEND of
8643 the narrower mode destination.
8645 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
8647 * lto-streamer-out.c (output_function): Revert 259346.
8648 * omp-expand.c (expand_oacc_for): Likewise.
8650 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
8652 PR rtl-optimization/85354
8653 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
8654 * sel-sched.c (sel_global_init): ... here.
8656 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
8659 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
8660 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
8661 mode for PE-COFF targets.
8662 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
8663 (i386_pe_asm_lto_end): Likewise.
8664 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
8665 (TARGET_ASM_LTO_END): Likewise.
8666 * config/i386/winnt.c (saved_debug_info_level): New static variable.
8667 (i386_pe_asm_lto_start): New function.
8668 (i386_pe_asm_lto_end): Likewise.
8670 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
8671 Richard Biener <rguenther@suse.de>
8674 * lto-streamer-out.c (output_function): Fix CFG loop state before
8676 * omp-expand.c (expand_oacc_for): Handle calls to internal
8677 functions like regular functions.
8679 2018-04-12 Richard Biener <rguenther@suse.de>
8682 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
8683 for the early LTO debug to properly generate references to it
8684 during DIE emission. Do not re-use that for the skeleton for
8686 (dwarf2out_early_finish): Likewise.
8688 2018-04-12 Jakub Jelinek <jakub@redhat.com>
8691 * config/i386/sse.md
8692 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
8693 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
8694 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
8695 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
8696 and output is a reg, avoid creating invalid lowpart subreg, but
8697 instead split into a 512-bit move. Don't split if not AVX512VL,
8698 input is xmm16+ reg and output is a mem.
8699 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
8700 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
8701 xmm16+ reg and output is a mem.
8703 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8705 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
8706 also for flag_dwarf2_cfi_asm.
8708 2018-04-12 Jakub Jelinek <jakub@redhat.com>
8710 PR rtl-optimization/85342
8711 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
8712 a bool scalar var inside of the loop instead. Don't try to update
8713 recog_data.operand after failed apply_change_group.
8715 2018-04-12 Tom de Vries <tom@codesourcery.com>
8718 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
8719 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
8720 array with flexible array member as array without given dimension.
8721 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
8722 argument for undefined param to true.
8724 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
8727 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
8728 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
8729 from PowerPC section.
8730 * config/rs6000/sysv4.opt (mcall-): Improve help text.
8731 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
8732 help text that is too long.
8733 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
8734 help text that is too long.
8735 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
8736 help text that is too long.
8738 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
8740 * config/alpha/alpha.md (stack_probe_internal): Rename
8741 from "probe_stack". Update all callers.
8743 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
8745 PR rtl-optimization/84566
8746 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
8747 sched_macro_fuse_insns.
8749 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
8752 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
8753 (compute_block_dependences): ... from here.
8755 2018-04-11 Jakub Jelinek <jakub@redhat.com>
8757 PR tree-optimization/85331
8758 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
8759 from int to HOST_WIDE_INT.
8761 2018-04-11 Martin Jambor <mjambor@suse.cz>
8764 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
8765 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
8766 not the same as the source val.
8767 (cgraph_edge_brings_value_p): New parameter.
8768 (gather_edges_for_value): Pass destination value to
8769 cgraph_edge_brings_value_p.
8770 (perhaps_add_new_callers): Likewise.
8771 (get_info_about_necessary_edges): Likewise and exclude values brought
8772 only by self-recursive edges.
8773 (create_specialized_node): Redirect only clones of self-calling edges.
8774 (+self_recursive_pass_through_p): New function.
8775 (find_more_scalar_values_for_callers_subset): Use it.
8776 (find_aggregate_values_for_callers_subset): Likewise.
8777 (known_aggs_to_agg_replacement_list): Removed.
8778 (decide_whether_version_node): Re-calculate known constants for all
8779 remaining context clones.
8781 2018-04-11 Richard Biener <rguenther@suse.de>
8784 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
8785 from early DWARF output.
8786 (dwarf2out_early_finish): Output line info unconditionally into
8787 early DWARF and add reference to it.
8789 2018-04-11 Jakub Jelinek <jakub@redhat.com>
8792 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
8793 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
8794 other than V2DFmode using iptr mode attribute.
8795 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
8797 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
8799 PR rtl-optimization/84659
8800 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
8802 2018-04-11 Jakub Jelinek <jakub@redhat.com>
8805 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
8807 (output_loc_list): Pass address of a dummy size variable even in the
8808 locview handling loop.
8809 (index_location_lists): Add comment on why skip_loc_list_entry can't
8812 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
8815 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
8818 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
8821 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
8822 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
8823 and -mstring-compare-inline-limit.
8825 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
8828 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
8829 for stack clash protection in a register whenever we need it to be in
8832 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
8834 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
8835 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
8837 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
8840 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
8842 (mlong-double-): Ditto.
8843 * config/rs6000/sysv4.opt (msdata=): Ditto.
8844 (mtls-size=): Ditto.
8846 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
8848 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
8849 erroneous entries for
8850 "vector int vec_ldl (int, long int *)", and
8851 "vector unsigned int vec_ldl (int, unsigned long int *)".
8852 Add comments and entries for
8853 "vector bool char vec_ldl (int, bool char *)",
8854 "vector bool short vec_ldl (int, bool short *)",
8855 "vector bool int vec_ldl (int, bool int *)",
8856 "vector bool long long vec_ldl (int, bool long long *)",
8857 "vector pixel vec_ldl (int, pixel *)",
8858 "vector long long vec_ldl (int, long long *)",
8859 "vector unsigned long long vec_ldl (int, unsigned long long *)".
8860 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
8861 type tree bool_long_long_type_node and correct definition of
8862 bool_V2DI_type_node to make reference to this new type tree.
8863 (rs6000_mangle_type): Replace erroneous reference to
8864 bool_long_type_node with bool_long_long_type_node.
8865 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
8866 comments to emphasize sign distinctions for char and int types and
8867 replace RS6000_BTI_bool_long constant with
8868 RS6000_BTI_bool_long_long constant. Also add comment to restrict
8869 use of RS6000_BTI_pixel.
8870 (bool_long_type_node): Remove this macro definition.
8871 (bool_long_long_type_node): New macro definition
8873 2018-04-10 Jakub Jelinek <jakub@redhat.com>
8875 PR rtl-optimization/85300
8876 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
8877 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
8878 simplify_unary_operation fails.
8880 2018-04-10 Martin Liska <mliska@suse.cz>
8882 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
8883 cgraph_edge and ipa_ref.
8885 2018-04-10 Jakub Jelinek <jakub@redhat.com>
8889 * config/i386/sse.md
8890 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
8891 computation of the VEC_MERGE selector from mask.
8892 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
8893 Fix decoding of the VEC_MERGE selector into mask.
8895 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
8897 PR tree-optimization/85286
8898 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
8900 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
8902 * final.c (final_1): Set insn_last_address as well as
8903 insn_current_address.
8905 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8908 * explow.c (emit_stack_probe): Call validize_mem on memory location
8909 before passing it to gen_probe_stack. Create address operand and
8910 legitimize it for the probe_stack_address case.
8912 2018-04-09 Jan Hubicka <jh@suse.cz>
8915 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
8916 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
8917 * tree.c (free_lang_data_in_type): Fix handling of binfos;
8919 (free_lang_data): Rebuild type inheritance graph.
8921 2018-04-09 Martin Sebor <msebor@redhat.com>
8923 * invoke.texi (-finline-small-functions): Mention other optimization
8925 (-findirect-inlining, -fpartial-inlining): Same.
8926 (-finline-functions-called-once): Same.
8927 (-freorder-blocks-and-partition): Same.
8929 2018-04-09 Jan Hubicka <jh@suse.cz>
8932 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
8933 jumps; choose last target that matches the criteria (i.e.
8934 no partition changes for non-crossing jumps).
8935 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
8936 support for redirecting crossing jumps to non-crossing.
8938 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
8940 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
8941 also for naked functions.
8943 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
8945 * config/arc/arc.md (add_shift): New pattern.
8946 (add_shift2): Likewise.
8947 (sub_shift): Likewise.
8948 (sub_shift_cmp0_noout): Likewise.
8949 (compare_si_ashiftsi): Likewise.
8950 (xbfu_cmp0_noout): New combine pattern.
8951 (xbfu_cmp0"): Likewise.
8952 (movsi_set_cc_insn): Place the predicable variant first.
8953 (commutative_binary_cmp0_noout): Remove clobber.
8954 (commutative_binary_cmp0): New pattern.
8955 (noncommutative_binary_cmp0): Likewise.
8956 (noncommutative_binary_cmp0_noout): Likewise.
8957 (noncommutative_binary_comparison_result_used): Removed.
8958 (rsub_cmp0): New pattern.
8959 (rsub_cmp0_noout): Likewise.
8960 (extzvsi): Changed, keep only meaningful variants.
8961 (SQH, SEZ): New iterators.
8962 (SQH_postfix): New mode attribute.
8963 (SEZ_prefix): New code attribute.
8964 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
8965 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
8966 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
8968 (noncommutative_operator): Check the availability of barrel
8971 2018-04-09 Richard Biener <rguenther@suse.de>
8973 PR tree-optimization/85284
8974 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
8975 Only use the niter constraining form of simple_iv when the exit
8978 2018-04-09 Tom de Vries <tom@codesourcery.com>
8981 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
8982 (define_expand "*memory_barrier"): New define_expand.
8983 (define_insn "memory_barrier"): New insn.
8985 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
8987 PR rtl-optimization/80463
8988 PR rtl-optimization/83972
8989 PR rtl-optimization/83480
8991 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
8992 correct producer for the insn.
8993 (tidy_control_flow): Fixup seqnos in case of debug insns.
8995 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
8997 PR rtl-optimization/83913
8999 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
9000 different sched-times when merging exprs.
9002 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
9004 PR rtl-optimization/83962
9006 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
9007 tidy_fallthru_edge and tidy_control_flow.
9009 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
9011 PR rtl-optimization/83530
9013 * sel-sched.c (force_next_insn): New global variable.
9014 (remove_insn_for_debug): When force_next_insn is true, also leave only
9015 next insn in the ready list.
9016 (sel_sched_region): When the region wasn't scheduled, make another pass
9017 over it with force_next_insn set to 1.
9019 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
9021 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
9023 * config/nds32/constants.md (unspec_volatile_element): Add enum values
9024 for interrupt control.
9025 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9026 functions for interrupt control.
9027 * config/nds32/nds32-intrinsic.md: Likewise.
9028 * config/nds32/nds32_intrinsic.h: Likewise.
9029 * config/nds32/nds32.h (nds32_builtins): Likewise.
9031 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
9033 * config/nds32/nds32.c (nds32_init_machine_status,
9034 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
9035 strict_aligned_p field.
9036 (nds32_expand_to_rtl_hook): New function.
9037 (TARGET_EXPAND_TO_RTL_HOOK): Define.
9038 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
9040 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9041 Chung-Ju Wu <jasonwucj@gmail.com>
9043 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
9044 * config/nds32/nds32-n7.md: New file.
9045 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
9046 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
9048 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
9049 * config/nds32/nds32.md (pipeline_model): Add n7.
9050 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
9051 * config/nds32/pipelines.md: Include n7 settings.
9053 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9054 Chung-Ju Wu <jasonwucj@gmail.com>
9056 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
9057 * config/nds32/nds32-e8.md: New file.
9058 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
9059 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
9061 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
9062 * config/nds32/nds32.md (pipeline_model): Add e8.
9063 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
9064 * config/nds32/pipelines.md: Include e8 settings.
9066 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9067 Chung-Ju Wu <jasonwucj@gmail.com>
9069 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
9070 * config/nds32/nds32-n8.md: New file.
9071 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
9072 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
9074 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
9075 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
9076 * config/nds32/nds32.md (pipeline_model): Add n8.
9077 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
9078 * config/nds32/pipelines.md: Include n8 settings.
9080 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9081 Chung-Ju Wu <jasonwucj@gmail.com>
9083 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
9084 * config/nds32/nds32-n9-2r1w.md: New file.
9085 * config/nds32/nds32-n9-3r2w.md: New file.
9086 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
9087 nds32_register_ports): New or modify for cpu n9.
9088 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
9090 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
9091 * config/nds32/nds32-utils.c: New file.
9092 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
9093 TARGET_MUL_SLOW): Define.
9094 * config/nds32/nds32.md (pipeline_model): New attribute.
9095 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
9096 New options that support cpu n9.
9097 * config/nds32/pipelines.md: Include n9 settings.
9098 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
9100 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
9102 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
9103 information if necessary.
9104 (output_cond_branch_compare_zero): Likewise.
9105 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
9106 (nds32_target_alignment): Refine for alignment.
9107 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
9108 (FUNCTION_BOUNDARY): Modify.
9109 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
9111 * config/nds32/nds32.opt (malways-align, malign-functions): New.
9113 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
9115 * config/nds32/constants.md (unspec_volatile_element): Add values for
9116 TLB operation and data prefetch.
9117 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9118 functions for TLB operation and data prefetch.
9119 * config/nds32/nds32-intrinsic.md: Likewise.
9120 * config/nds32/nds32_intrinsic.h: Likewise.
9121 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
9122 (nds32_print_operand): Likewise.
9123 * config/nds32/nds32.h (nds32_builtins): Likewise.
9125 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
9126 Andrew Pinski <pinsika@gcc.gnu.org>
9129 * match.pd: Use constant_boolean_node of correct type instead of
9130 boolean_true_node or boolean_false_node for simplifying
9131 pointer comparisons to zero.
9133 2018-04-07 Jakub Jelinek <jakub@redhat.com>
9135 PR tree-optimization/80021
9136 * tree.c (verify_type_variant): Make error call in verify_variant_match
9137 translatable and remove final full stop.
9139 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9141 * config/nds32/constants.md (unspec_volatile_element): Add
9142 UNSPEC_VOLATILE_EH_RETURN.
9143 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
9144 nds32_output_stack_pop): Support dwarf exception handling process.
9145 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
9146 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
9147 exception handling process.
9148 (nds32_compute_stack_frame): Likewise.
9149 (nds32_return_addr_rtx): Likewise.
9150 (nds32_initial_elimination_offset): Likewise.
9151 (nds32_expand_prologue): Likewise.
9152 (nds32_expand_epilogue): Likewise.
9153 (nds32_dynamic_chain_address): New function.
9154 * config/nds32/nds32.h (machine_function): Add fields for dwarf
9156 (DYNAMIC_CHAIN_ADDRESS): Define.
9157 (EH_RETURN_DATA_REGNO): Define.
9158 (EH_RETURN_STACKADJ_RTX): Define.
9159 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
9160 patterns for dwarf exception handling.
9162 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9164 * config/nds32/nds32.h: Clean up obsolete macros.
9166 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9168 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9169 Add enum values for particular instructions.
9170 * config/nds32/nds32-intrinsic.c: Implementation of expanding
9171 particular intrinsic functions.
9172 * config/nds32/nds32-intrinsic.md: Likewise.
9173 * config/nds32/nds32_intrinsic.h: Likewise.
9174 * config/nds32/nds32.h (nds32_builtins): Likewise.
9175 * config/nds32/nds32.md (type): Add pbsad and pbsada.
9176 (btst, ave): New patterns for particular instructions.
9178 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9180 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9181 Add enum values for atomic load/store and memory sync.
9182 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
9184 * config/nds32/nds32-intrinsic.md: Likewise.
9185 * config/nds32/nds32_intrinsic.h: Likewise.
9186 * config/nds32/nds32.h (nds32_builtins): Likewise.
9188 2018-04-07 Jakub Jelinek <jakub@redhat.com>
9190 PR tree-optimization/85257
9191 * fold-const.c (native_encode_vector): If not all elts could fit
9192 and off is -1, return 0 rather than offset.
9193 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
9194 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
9195 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
9196 adjust buffer in native_interpret_expr call.
9198 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9200 * config/nds32/constants.md (unspec_volatile_element): Add cache
9201 control enum values.
9202 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
9203 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
9204 * config/nds32/nds32.c (nds32_cctl_names): New.
9205 (nds32_print_operand): Handle cache control register names.
9206 * config/nds32/nds32.h (nds32_builtins): New enum values.
9207 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
9209 * config/nds32/nds32.md (type): Add mmu.
9210 * config/nds32/pipelines.md (simple_insn): Add mmu.
9212 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9214 * config/nds32/nds32.md (type): Remove call.
9215 * config/nds32/pipelines.md (simple_insn): Likewise.
9217 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9219 * config/nds32/constants.md (unspec_volatile_element): Add
9220 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
9221 UNSPEC_VOLATILE_FMFCFG.
9222 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
9223 description for fmfcfg and fmfcsr.
9224 (bdesc_1arg): Add fmtcsr.
9225 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
9226 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
9227 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
9228 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
9229 unspec_fmfcfg): New patterns.
9230 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
9231 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
9232 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
9233 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
9234 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
9235 __nds32__fmfcfg): Define.
9237 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9239 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
9240 intrinsic register names.
9241 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
9242 intrinsic register enum values and macros.
9244 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9246 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
9247 for load/store addressing form.
9248 (nds32_print_operand_address): Likewise.
9250 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
9253 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
9254 based on LABEL_REF. Remove useless assertion.
9255 (pic_address_needs_scratch): Fix formatting.
9256 (sparc_legitimize_pic_address): Minor tweaks.
9257 (sparc_delegitimize_address): Adjust assertion accordingly.
9258 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
9259 into symbolic_operand.
9260 (movsi_high_pic_label_ref): Likewise.
9261 (movsi_lo_sum_pic_label_ref): Likewise.
9262 (movdi_pic_label_ref): Likewise.
9263 (movdi_high_pic_label_ref): Likewise.
9264 (movdi_lo_sum_pic_label_ref): Likewise.
9266 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
9268 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
9269 custom LIB_SPEC setup.
9271 2018-04-06 Ruslan Bukin <br@bsdpad.com>
9272 Kito Cheng <kito.cheng@gmail.com>
9274 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
9275 * config/riscv/freebsd.h: New.
9277 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
9279 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
9280 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
9283 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
9284 Kito Cheng <kito.cheng@gmail.com>
9286 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
9287 nds32_output_call, nds32_symbol_binds_local_p): New functions.
9288 * config/nds32/nds32-protos.h (nds32_output_call,
9289 nds32_output_return): Declare.
9290 * config/nds32/nds32.md: Refine all the call and return patterns.
9292 2018-04-06 Jakub Jelinek <jakub@redhat.com>
9295 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
9296 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
9298 PR rtl-optimization/84872
9299 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
9300 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
9303 2018-04-06 Tamar Christina <tamar.christina@arm.com>
9305 * expr.c (copy_blkmode_to_reg): Revert 254862.
9306 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
9308 2018-04-06 Richard Biener <rguenther@suse.de>
9311 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
9312 after seeing a component reference with an adjacent field. Treat
9313 refs to arrays at struct end of external decls similar to
9314 refs to unconstrained commons.
9316 2018-04-06 Jakub Jelinek <jakub@redhat.com>
9319 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
9320 look through SAVE_EXPRs with non-side-effects argument. Adjust
9322 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
9325 2018-04-06 Richard Biener <rguenther@suse.de>
9328 * alias.c (find_base_term): New wrapper around find_base_term
9329 unwinding CSELIB_VAL_PTR changes.
9330 (find_base_term): Do not restore CSELIB_VAL_PTR during the
9333 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9335 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
9337 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
9338 constant definitions.
9339 ("nop"): lr 0,0 -> nopr r0
9340 ("nop_lr0", "nop_lr1"): New insn definitions.
9342 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
9344 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
9345 NDS32_V3PUSH_AVAILABLE_P macro.
9347 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
9348 Chung-Ju Wu <jasonwucj@gmail.com>
9350 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
9351 (nds32*-*-*): Add float and fpu_config into supported_defaults.
9352 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
9353 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
9354 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
9355 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
9356 * config/nds32/constraints.md: New constraints and checking for hard
9357 float configuration.
9358 * config/nds32/iterators.md: New mode iterator and attribute for hard
9359 float configuration.
9360 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
9362 * config/nds32/nds32-fpu.md: New file.
9363 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
9364 deal with hard float code generation.
9365 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
9367 (abi_type, float_reg_number): New enum type.
9368 * config/nds32/nds32-predicates.c: New predicates for hard float.
9369 * config/nds32/nds32-protos.h: Declare functions for hard float.
9370 * config/nds32/nds32.c: Implementation for hard float configuration.
9371 * config/nds32/nds32.h: Definitions for hard float configuration.
9372 * config/nds32/nds32.md: Include hard float machine description and
9373 modify patterns for hard float configuration.
9374 * config/nds32/nds32.opt: New options for hard float configuration.
9375 * config/nds32/predicates.md: New predicates for hard float
9378 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
9380 * common/config/nds32/nds32-common.c
9381 (nds32_option_optimization_table): Enable -mreleax-hint by default.
9383 2018-04-05 Jakub Jelinek <jakub@redhat.com>
9386 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
9387 CONSTRUCTOR_ELT (ctor, ...)->value.
9389 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
9392 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
9394 2018-04-05 Tom de Vries <tom@codesourcery.com>
9397 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
9400 2018-04-05 Shiva Chen <shiva0217@gmail.com>
9401 Kito Cheng <kito.cheng@gmail.com>
9403 * config/nds32/constraints.md (U33): Fine-tune checking condition.
9404 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
9405 * config/nds32/nds32.h (nds32_16bit_address_type): Add
9406 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
9408 2018-04-05 Shiva Chen <shiva0217@gmail.com>
9409 Kito Cheng <kito.cheng@gmail.com>
9411 * config/nds32/constraints.md (Ufe): New memory constraint.
9412 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
9413 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
9414 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
9416 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
9417 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
9419 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9421 * config/nds32/nds32.md: Use optimize_size in the condition for
9422 alu-shift instructions.
9424 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9426 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
9428 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9430 * config/nds32/nds32.md (negsi2): Refine pattern.
9432 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
9433 Chung-Ju Wu <jasonwucj@gmail.com>
9435 * config/nds32/iterators.md (shift_rotate): New code iterator.
9436 (shift): New code attribute.
9437 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
9438 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
9439 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
9440 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
9441 bit-wise operations.
9442 (andsi3, *andsi3): Ditto.
9443 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
9444 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
9445 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
9446 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
9447 nds32_ior_operand, nds32_xor_operand): New predicates.
9449 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9451 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
9452 (addsi3, subsi3): ... this.
9454 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9456 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
9458 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9460 * config/nds32/nds32.md: Adjust indention.
9462 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
9464 * config/nds32/nds32.md (feature): New attribute.
9466 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9468 * config/nds32/nds32.md (subtype): New attribute.
9470 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
9473 * config/arm/arm-builtins.c (arm_expand_builtin): Change
9474 expansion to perform a bitwise AND of the argument followed by a
9475 boolean negation of the result.
9477 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
9479 PR rtl-optimization/84878
9480 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
9481 the basic block. Assert the use reference is not artificial and that
9482 it has an associated insn.
9484 2018-04-04 Michael Matz <matz@suse.de>
9486 * builtins.c (compute_objsize): Pass correct operand
9487 to array_at_struct_end_p.
9489 2018-04-04 Richard Biener <rguenther@suse.de>
9492 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
9493 from contexts for DINFO_LEVEL_TERSE and below.
9495 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
9497 * config/nds32/nds32-doubleword.md (move_<mode>): Require
9498 resiter_operand condition.
9499 * config/nds32/nds32.md (*move<mode>): Ditto.
9501 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
9502 Monk Chiang <sh.chiang04@gmail.com>
9504 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
9506 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
9508 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
9510 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
9511 Kito Cheng <kito.cheng@gmail.com>
9513 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
9514 nds32_cond_code_str, output_cond_branch,
9515 output_cond_branch_compare_zero, nds32_expand_cbranch,
9516 nds32_expand_cstore, nds32_expand_movcc,
9517 nds32_output_cbranchsi4_equality_zero,
9518 nds32_output_cbranchsi4_equality_reg,
9519 nds32_output_cbranchsi4_equality_reg_or_const_int,
9520 nds32_output_cbranchsi4_greater_less_zero: New functions.
9521 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
9522 nds32_expand_cstore, nds32_expand_movcc,
9523 nds32_output_cbranchsi4_equality_zero,
9524 nds32_output_cbranchsi4_equality_reg,
9525 nds32_output_cbranchsi4_equality_reg_or_const_int,
9526 nds32_output_cbranchsi4_greater_less_zero): Declare.
9527 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
9528 nds32_rimm11s_operand): New predicates.
9529 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
9530 * config/nds32/nds32.md: Rewrite all the branch and conditional move
9533 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
9535 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
9536 * config/nds32/nds32.md: Ditto.
9537 * config/nds32/pipelines.md: Ditto.
9539 2018-04-04 Richard Biener <rguenther@suse.de>
9541 PR tree-optimization/85168
9542 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
9543 propagating abnormals.
9545 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
9547 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
9549 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
9550 Kito Cheng <kito.cheng@gmail.com>
9552 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
9553 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
9554 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
9555 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
9556 * config/nds32/nds32.md (sibcall_internal): New.
9557 (sibcall_register): Remove.
9558 (sibcall_immediate): Remove.
9559 (sibcall_value_internal): New.
9560 (sibcall_value_register): Remove.
9561 (sibcall_value_immediate): Remove.
9562 * config/nds32/predicates.md (nds32_general_register_operand): New.
9563 (nds32_call_address_operand): New.
9565 2018-04-03 Jakub Jelinek <jakub@redhat.com>
9567 PR rtl-optimization/85167
9568 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
9569 bb_defs if *split_p, instead preinitialize it to NULL.
9571 PR tree-optimization/85156
9572 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
9573 evaluating the argument multiple times.
9575 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
9577 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
9579 (_mm_cvtpd_ps): Likewise.
9580 (_mm_cvttpd_epi32): Likewise.
9581 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
9582 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
9583 vector, pixel, and bool following altivec.h include.
9585 2018-04-03 Martin Sebor <msebor@redhat.com>
9587 * doc/extend.texi (Common Function Attributes): Clarify.
9588 (const attribute): Likewise.
9589 (pure attribute): Likewise.
9591 2018-04-03 Jakub Jelinek <jakub@redhat.com>
9594 * config/i386/i386.c (ix86_expand_vector_set): Use
9595 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
9597 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
9599 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
9600 instructions when changing rounding bits to preserve precision bits
9601 in the x87 control word.
9603 2018-04-03 Martin Liska <mliska@suse.cz>
9605 PR tree-optimization/82491
9606 * rtl.h (strip_offset_and_add): Replace += suboffset with
9607 poly_uint64 () + suboffset.
9609 2018-03-29 Martin Liska <mliska@suse.cz>
9610 Martin Jambor <mjambor@suse.cz>
9613 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
9614 param_type is not an integral or pointer type.
9616 2018-04-03 Richard Biener <rguenther@suse.de>
9618 * sese.h (recompute_all_dominators): Remove.
9620 2018-04-02 Martin Sebor <msebor@redhat.com>
9622 * doc/invoke.texi (-Wrestrict): Fix typos.
9624 2018-04-02 Jim Wilson <jimw@sifive.com>
9626 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
9627 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
9628 (<optab>di3, <optab>si3_extend): Likewise.
9629 (<optab>si3_mask, <optab>si3_mask_1): New.
9630 (<optab>di3_mask, <optab>di3_mask_1): New.
9631 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
9632 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
9633 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
9635 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
9637 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
9640 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
9642 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
9643 (nds32_canonicalize_comparison): New function.
9645 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
9646 Kito Cheng <kito.cheng@gmail.com>
9647 Kuan-Lin Chen <kuanlinchentw@gmail.com>
9649 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
9650 * config/nds32/constants.md (unspec_volatile_element): Add
9651 UNSPEC_VOLATILE_RELAX_GROUP.
9652 * config/nds32/nds32-relax-opt.c: New file.
9653 * config/nds32/nds32-predicates.c
9654 (nds32_symbol_load_store_p): New function.
9655 * config/nds32/nds32-protos.h
9656 (nds32_symbol_load_store_p): Declare function.
9657 (make_pass_nds32_relax_opt): Declare new rtl pass function.
9658 * config/nds32/nds32.c
9659 (nds32_register_pass): New function to register pass.
9660 (nds32_register_passes): New function to register passes.
9661 * config/nds32/nds32.md (relax_group): New pattern.
9662 * config/nds32/nds32.opt (mrelax-hint): New option.
9663 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
9665 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
9667 * config/nds32/t-nds32: Modify files dependency.
9669 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
9671 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
9672 (PROFILE_HOOK): Define its implementation.
9674 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
9676 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
9677 type and 32-bit size.
9679 2018-04-01 Jakub Jelinek <jakub@redhat.com>
9682 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
9683 (V_128_256): New mode iterator.
9684 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
9685 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
9686 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
9688 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
9689 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
9691 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
9694 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
9695 NaN inputs correctly.
9697 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
9700 * config/rs6000/vsx.md (??r): New mode attribute.
9701 (*vsx_mov<mode>_64bit): Use it.
9702 (*vsx_mov<mode>_32bit): Likewise.
9704 2018-03-30 Martin Sebor <msebor@redhat.com>
9706 PR tree-optimization/84818
9707 * builtins.c (check_access): Use warning_n.
9709 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
9712 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
9714 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
9717 2018-03-30 Julia Koval <julia.koval@intel.com>
9720 * x86-tune.def (movx, partial_reg_dependency): Enable for
9723 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
9726 * lra-constraints.c (process_alt_operands): Move setting
9727 this_alternative_matches below.
9729 2018-03-29 Martin Liska <mliska@suse.cz>
9732 * doc/invoke.texi: Document how LTO works with debug info.
9733 Describe auto-load support of binutils. Mention 'x86-64'
9734 as valid option value of -march option.
9736 2018-03-29 Jakub Jelinek <jakub@redhat.com>
9738 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
9741 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
9742 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
9743 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
9746 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
9749 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
9750 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
9751 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
9752 for RS6000_BTM_POWERPC64.
9753 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
9754 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
9755 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
9760 2018-03-28 Carl Love <cel@us.ibm.com>
9763 2017-09-27 Carl Love <cel@us.ibm.com>
9765 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
9766 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
9767 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
9770 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
9772 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
9773 instead of __vector bool.
9774 (_mm_max_pu8): Likewise.
9775 (_mm_min_pi16): Likewise.
9777 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
9780 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
9781 (DIVWEUO): Likewise.
9783 (DIVDEUO): Likewise.
9784 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
9785 DIVWEUO and DIVDEUO.
9786 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
9787 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
9788 (div_extend): Likewise.
9789 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
9791 (__builtin_divweuo): Likewise.
9792 (__builtin_divdeo): Likewise.
9793 (__builtin_divdeuo): Likewise.
9795 2018-03-28 Jakub Jelinek <jakub@redhat.com>
9798 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
9799 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
9801 PR tree-optimization/82004
9802 * gimple-match-head.c (optimize_pow_to_exp): New function.
9803 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
9804 Don't fold to exp if optimize_pow_to_exp is false.
9806 2018-03-28 Martin Liska <mliska@suse.cz>
9809 * calls.c (initialize_argument_information): Fix trailing space.
9810 * common.opt: Fix typo and provide better explanation for
9811 -fsanitize-coverage option.
9812 * config/i386/i386.opt: Fix typo.
9814 2018-03-28 Jakub Jelinek <jakub@redhat.com>
9815 Martin Liska <mliska@suse.cz>
9818 * gimplify.c (asan_poison_variable): Don't do the check for
9819 gimplify_omp_ctxp here.
9820 (gimplify_decl_expr): Do it here.
9821 (gimplify_target_expr): Likewise.
9823 2018-03-28 Martin Liska <mliska@suse.cz>
9826 * config/i386/i386.c (ix86_function_arg_advance): Do not call
9827 chkp_type_bounds_count if MPX is not enabled.
9829 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
9831 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
9833 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
9836 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
9837 function to create the function decl for complex long double
9838 multiply and divide for -mabi=ieeelongdouble.
9839 (init_float128_ieee): Call it.
9841 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
9844 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
9845 -fcf-protection=branch -mibt.
9846 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
9848 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9851 * config/arm/arm.c (arm_valid_symbolic_address): Handle
9852 arm_word_relocations.
9854 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
9857 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
9858 extern array declarations.
9860 2018-03-27 Richard Biener <rguenther@suse.de>
9863 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
9864 explicit single_use checks.
9866 2018-03-27 Richard Biener <rguenther@suse.de>
9868 PR tree-optimization/85082
9869 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
9872 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9874 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
9875 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
9876 Turn on fasynchronous-unwind-tables and funwind-tables.
9878 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
9881 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
9882 (*bmi_blsr_<mode>_ccz): Ditto.
9884 2018-03-26 Tom de Vries <tom@codesourcery.com>
9886 PR tree-optimization/85063
9887 * omp-general.c (offloading_function_p): New function. Factor out
9889 * omp-offload.c (pass_omp_target_link::gate): ... here.
9890 * omp-general.h (offloading_function_p): Declare.
9891 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
9892 with attribute omp declare target for offloading functions.
9894 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
9896 PR tree-optimization/84005
9897 * tree-data-ref.h (get_base_for_alignment): Declare.
9898 * tree-data-ref.c (get_base_for_alignment_1): New function.
9899 (get_base_for_alignment): Likewise.
9900 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
9901 get_base_for_alignment to find a suitable base object, instead
9902 of always using drb->base_address.
9904 2018-03-23 Jakub Jelinek <jakub@redhat.com>
9907 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
9908 known size by default.
9910 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
9913 * lra-constraints.c (process_alt_operands): Don't match BLKmode
9914 and non BLKmode operands.
9916 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9919 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
9920 Clean up attributes.
9922 2018-03-23 Richard Biener <rguenther@suse.de>
9925 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
9926 we are going to emit early debug for LTO.
9928 2018-03-23 Jakub Jelinek <jakub@redhat.com>
9931 * function.c (match_asm_constraints_1): Don't optimize if input
9932 doesn't satisfy general_operand predicate for output's mode.
9935 * alias.c (write_dependence_p): Don't require for x_canonicalized
9936 non-VOIDmode if x has VOIDmode.
9939 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
9940 just don't try to optimize it rather than assert it never happens.
9942 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
9944 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
9945 macro expansions for definition of ST_INTERNAL_<mode> and
9946 LD_INTERNAL_<mode> builtins.
9947 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
9949 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
9951 (altivec_expand_st_builtin): Likewise.
9952 (altivec_expand_builtin): Remove calls to deleted functions.
9953 (rs6000_address_for_altivec): Delete this function.
9954 * config/rs6000/vector.md: Remove expands for
9955 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
9957 2018-03-22 Sudakshina Das <sudi.das@arm.com>
9960 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
9961 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
9962 re-computing once computed.
9963 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
9964 (arm_init_machine_status): Initialize
9965 machine->static_chain_stack_bytes.
9967 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
9970 * doc/extend.texi: Add four new prototypes for vec_ld.
9971 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
9972 definitions for more logical presentation.
9973 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
9974 entries for V1TI variants of __builtin_altivec_ld builtin.
9975 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
9976 handling of V1TI variant of LVX icode pattern.
9977 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
9978 (rs6000_gimple_fold_builtin): Likewise.
9979 (altivec_init_builtins): Add code to define
9980 __builtin_altivec_lvx_v1ti function.
9982 2018-03-22 Jakub Jelinek <jakub@redhat.com>
9985 * function.c (match_asm_constraints_1): Don't do the optimization
9986 if input isn't a REG, SUBREG, MEM or constant.
9988 2018-03-22 Tom de Vries <tom@codesourcery.com>
9990 PR tree-optimization/84956
9991 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
9992 bb_has_abnormal_pred.
9994 2018-03-22 Jakub Jelinek <jakub@redhat.com>
9997 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
9998 DECL_INITIAL (decl) to decl at the end.
9999 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
10000 adjust the comment.
10002 2018-03-21 Joseph Myers <joseph@codesourcery.com>
10004 * doc/extend.texi (__builtin_tgmath): Document when complex
10005 integer types are treated as _Complex _Float64.
10007 2018-03-21 Tom de Vries <tom@codesourcery.com>
10009 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
10011 2018-03-21 Jakub Jelinek <jakub@redhat.com>
10013 PR tree-optimization/84960
10014 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
10015 if it is ENTRY block, move them into single succ of ENTRY in that case.
10017 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
10019 PR tree-optimization/84811
10020 * poly-int.h (poly_span_traits): Remove the T3 parameter and
10021 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
10022 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
10023 (known_subrange_p): Update accordingly. Cast each value involved
10024 in the size comparison, rather than casting the result of the
10027 2018-03-21 Jakub Jelinek <jakub@redhat.com>
10029 PR tree-optimization/84982
10030 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
10031 by flipping the least significant bit rather than all bits from
10032 bitpos to bitpos + bitsize - 1.
10034 2018-03-21 Nathan Sidwell <nathan@acm.org>
10036 * doc/extend.texi (Deprecated Features): Remove mention of
10037 long-deleted deprecations.
10039 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10042 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
10043 * configure: Regenerate.
10045 2018-03-21 Tom de Vries <tom@codesourcery.com>
10047 PR tree-optimization/83126
10048 * tree-parloops.c (num_phis): New function.
10049 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
10051 2018-03-21 Nathan Sidwell <nathan@acm.org>
10053 * doc/extend.texi (Deprecated Features): Update deprecated flags,
10054 mention anon-struct/union members and trailing attributes.
10056 2018-03-21 Bin Cheng <bin.cheng@arm.com>
10058 PR tree-optimization/84969
10059 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
10060 builtin memset partitions if they set different rhs values.
10062 2018-03-21 Jakub Jelinek <jakub@redhat.com>
10064 PR rtl-optimization/84989
10065 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
10066 VEC_DUPLICATE with scalar result mode.
10068 2018-03-21 Martin Liska <mliska@suse.cz>
10071 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
10072 not intended return statement.
10074 2018-03-21 Martin Liska <mliska@suse.cz>
10077 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
10078 (chkp_find_bound_slots_1): Limit number of iterations.
10080 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
10083 * Minor grammar fixes for x86 options.
10085 2018-03-20 Jakub Jelinek <jakub@redhat.com>
10088 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
10089 holding REG_CFA_RESTORE notes, instead turn them into a USE.
10091 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
10094 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
10095 (altivec_lvx_<mode>_1op): Likewise.
10096 (altivec_stvx_<mode>_2op): Likewise.
10097 (altivec_stvx_<mode>_1op): Likewise.
10098 (altivec_lvx_<VM2:mode>): New define_expand.
10099 (altivec_stvx_<VM2:mode>): Likewise.
10100 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
10101 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10102 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
10103 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10104 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
10105 (rs6000_gen_lvx): Likewise.
10106 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
10107 (altivec_expand_stv_builtin): Likewise.
10108 (altivec_expand_builtin): Likewise.
10109 * config/rs6000/vector.md: Likewise.
10111 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10114 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
10117 2018-03-20 Richard Biener <rguenther@suse.de>
10120 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
10121 sign-conversions as zero, fall back to standard scalar_stmt
10124 2018-03-20 Martin Liska <mliska@suse.cz>
10127 * predict.c (rebuild_frequencies): Handle case when we have
10128 PROFILE_ABSENT, but flag_guess_branch_prob is false.
10130 2018-03-20 Jakub Jelinek <jakub@redhat.com>
10133 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
10134 flag_section_anchors.
10135 * varasm.c (use_blocks_for_decl_p): Remove hack for
10136 dw2_force_const_mem.
10139 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
10141 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
10142 be created, use lowpart_subreg of operands[0] rather than operands[0]
10144 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
10145 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
10146 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
10147 and n constraint instead of aarch64_shift_imm_di and Usd.
10148 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
10149 (*aarch64_<optab>_reg_minus<mode>3): ... this.
10151 2018-03-20 Sudakshina Das <sudi.das@arm.com>
10154 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
10155 to favor GPR over NEON registers.
10156 (<shift>di3_neon): Likewise.
10158 2018-03-20 Tom de Vries <tom@codesourcery.com>
10161 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
10162 (nvptx_process_pars): Emit bar.sync asap and alap.
10164 2018-03-20 Tom de Vries <tom@codesourcery.com>
10167 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
10168 seen_label if seen_label is already set.
10170 2018-03-20 Jakub Jelinek <jakub@redhat.com>
10173 * config/i386/i386.c (fold_builtin_cpu): For features above 31
10174 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
10175 Use 1U instead of 1. Formatting fixes.
10178 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
10179 instead of TREE_TYPE (s1) for the return value.
10181 2018-03-19 Jakub Jelinek <jakub@redhat.com>
10183 PR tree-optimization/84946
10184 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
10185 bitsize + bitsize in poly_uint64 rather than poly_int64.
10188 * dwarf2asm.c: Include fold-const.c.
10189 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
10190 of decl rather than decl itself.
10192 PR rtl-optimization/84643
10193 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
10195 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
10198 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
10199 calling assemble_variable.
10201 2018-03-19 Sudakshina Das <sudi.das@arm.com>
10204 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
10205 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
10207 2018-03-19 Jim Wilson <jimw@sifive.com>
10210 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
10211 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
10212 (riscv_first_stack_step): Likewise.
10213 (riscv_option_override): Use STACK_BOUNDARY instead of
10214 MIN_STACK_BOUNDARY.
10215 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
10216 MIN_STACK_BOUNDARY.
10217 (BIGGEST_ALIGNMENT): Set to 128.
10218 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
10219 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
10222 2018-03-19 Richard Biener <rguenther@suse.de>
10224 PR tree-optimization/84933
10225 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
10226 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
10228 2018-03-19 Richard Biener <rguenther@suse.de>
10230 PR tree-optimization/84859
10231 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
10232 (cond_if_else_store_replacement): Perform sinking operation on
10233 single-store BBs regardless of MAX_STORES_TO_SINK setting.
10234 Generalize what a BB with a single eligible store is.
10236 2018-03-19 Richard Biener <rguenther@suse.de>
10238 PR tree-optimization/84929
10239 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
10240 chrec_is_positive against non-chrec arg.
10242 2018-03-19 Tamar Christina <tamar.christina@arm.com>
10245 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
10247 2018-03-18 Martin Liska <mliska@suse.cz>
10249 PR rtl-optimization/84635
10250 * regrename.c (build_def_use): Use matches_mode only when
10253 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
10255 PR tree-optimization/84913
10256 * tree-vect-loop.c (vectorizable_reduction): Don't try to
10257 vectorize chains of COND_EXPRs.
10259 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
10261 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
10263 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
10265 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
10267 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
10269 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
10271 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
10272 Kito Cheng <kito.cheng@gmail.com>
10274 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
10275 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
10276 (nds32_adjust_reg_alloc_order): New function.
10277 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
10279 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
10281 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
10282 nds32_print_operand, nds32_print_operand_address): Use
10283 HOST_WIDE_INT_PRINT_DEC instead.
10285 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
10287 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
10289 2018-03-17 Jakub Jelinek <jakub@redhat.com>
10292 * config/i386/i386.c (initial_ix86_tune_features,
10293 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
10294 unsigned long long.
10295 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
10296 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
10297 rather than 1u << ix86_tune. Formatting fix.
10298 (ix86_option_override_internal): Change ix86_arch_mask from
10299 unsigned int to unsigned HOST_WIDE_INT, initialize to
10300 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
10301 (ix86_function_specific_restore): Likewise.
10303 2018-03-16 Jakub Jelinek <jakub@redhat.com>
10306 * postreload.c (reload_combine_recognize_pattern): Perform
10307 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
10308 truncate_int_for_mode the result for the destination's mode.
10311 * hsa-gen.c (mem_type_for_type): Fix comment typo.
10312 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
10314 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
10317 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
10320 * lra-assigns.c (lra_split_hard_reg_for): Don't use
10321 regno_allocno_class_array and sorted_pseudos.
10322 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
10323 insns where regno is used.
10325 2018-03-16 Martin Liska <mliska@suse.cz>
10328 * multiple_target.c (create_dispatcher_calls): Redirect
10329 reference in the symbol table.
10331 2018-03-16 Martin Liska <mliska@suse.cz>
10334 * multiple_target.c (create_dispatcher_calls): Redirect also
10337 2018-03-16 Jakub Jelinek <jakub@redhat.com>
10341 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
10342 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
10343 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
10345 2018-03-16 Julia Koval <julia.koval@intel.com>
10347 * doc/invoke.texi (Skylake Server): Add CLWB.
10348 Cannonlake): Remove CLWB.
10350 2018-03-16 Jakub Jelinek <jakub@redhat.com>
10352 PR tree-optimization/84841
10353 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
10355 (FLOAT_ONE_CONST_TYPE): Define.
10356 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
10357 (sort_by_operand_rank): Put entries with higher constant_type last
10358 rather than first to match comments.
10360 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
10362 * config/nios2/nios2.md (movsi_internal): Fix thinko in
10365 2018-03-15 Jakub Jelinek <jakub@redhat.com>
10368 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
10369 check and use address of target always.
10371 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
10374 * config/i386/i386.c (indirect_thunk_needed): Update comments.
10375 (indirect_thunk_bnd_needed): Likewise.
10376 (indirect_thunks_used): Likewise.
10377 (indirect_thunks_bnd_used): Likewise.
10378 (indirect_return_needed): New.
10379 (indirect_return_bnd_needed): Likewise.
10380 (output_indirect_thunk_function): Add a bool argument for
10382 (output_indirect_thunk_function): Don't generate alias for
10383 function return thunk.
10384 (ix86_code_end): Call output_indirect_thunk_function to generate
10385 function return thunks.
10386 (ix86_output_function_return): Set indirect_return_bnd_needed
10387 and indirect_return_needed instead of indirect_thunk_bnd_needed
10388 and indirect_thunk_needed.
10390 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
10392 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
10393 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
10394 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
10396 2018-03-15 David Malcolm <dmalcolm@redhat.com>
10397 Paul Hua <paul.hua.gm@gmail.com>
10400 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
10402 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
10404 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
10405 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
10406 resp. SFmode cases.
10408 2018-03-15 Tamar Christina <tamar.christina@arm.com>
10411 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10412 instead of GET_MODE_SIZE when comparing Units.
10414 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10417 * varasm.c (hash_section): Return an unchangeble hash value
10418 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
10419 Return !aarch64_can_use_per_function_literal_pools_p ().
10421 2018-03-15 Jakub Jelinek <jakub@redhat.com>
10424 * optabs.c (emit_conditional_move): Pass address of cmode's copy
10425 rather than address of cmode as last argument to prepare_cmp_insn.
10427 2018-03-15 Julia Koval <julia.koval@intel.com>
10429 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
10430 F_AVX512VNNI, F_AVX512BITALG): New.
10432 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
10435 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
10436 insn for floating-point loads and stores.
10438 2018-03-14 Carl Love <cel@us.ibm.com>
10440 * config/rs6000/rs6000-c.c: Add macro definitions for
10441 ALTIVEC_BUILTIN_VEC_PERMXOR.
10442 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
10443 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
10444 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
10445 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
10447 * config/doc/extend.texi: Add prototypes for vec_permxor.
10449 2018-03-14 David Malcolm <dmalcolm@redhat.com>
10452 * diagnostic-show-locus.c (class layout_point): Convert m_line
10453 from int to linenum_type.
10454 (line_span::comparator): Use linenum "compare" function when
10455 comparing line numbers.
10456 (test_line_span): New function.
10457 (layout_range::contains_point): Convert param "row" from int to
10459 (layout_range::intersects_line_p): Likewise.
10460 (layout::will_show_line_p): Likewise.
10461 (layout::print_source_line): Likewise.
10462 (layout::should_print_annotation_line_p): Likewise.
10463 (layout::print_annotation_line): Likewise.
10464 (layout::print_leading_fixits): Likewise.
10465 (layout::annotation_line_showed_range_p): Likewise.
10466 (struct line_corrections): Likewise for field m_row.
10467 (line_corrections::line_corrections): Likewise for param "row".
10468 (layout::print_trailing_fixits): Likewise.
10469 (layout::get_state_at_point): Likewise.
10470 (layout::get_x_bound_for_row): Likewise.
10471 (layout::print_line): Likewise.
10472 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
10473 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
10474 * input.c (selftest::test_linenum_comparisons): New function.
10475 (selftest::input_c_tests): Call it.
10476 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
10477 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
10478 * selftest.h (ASSERT_GT): New macro.
10479 (ASSERT_GT_AT): New macro.
10480 (ASSERT_LT): New macro.
10481 (ASSERT_LT_AT): New macro.
10483 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
10485 PR rtl-optimization/84780
10486 * combine.c (distribute_links): Don't make a link based on pc_rtx.
10488 2018-03-14 Martin Liska <mliska@suse.cz>
10490 * tree.c (record_node_allocation_statistics): Use
10491 get_stats_node_kind.
10492 (get_stats_node_kind): New function extracted from
10493 record_node_allocation_statistics.
10494 (free_node): Use get_stats_node_kind.
10496 2018-03-14 Richard Biener <rguenther@suse.de>
10498 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
10499 that the value-set of ANTIC_IN doesn't grow.
10502 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
10504 (BB_VISITED_WITH_VISITED_SUCCS): New define.
10505 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
10507 2018-03-14 Julia Koval <julia.koval@intel.com>
10509 * config.gcc (icelake-client, icelake-server): New.
10511 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
10512 (initial_ix86_arch_features): Ditto.
10513 (PTA_SKYLAKE): Add SGX.
10514 (PTA_ICELAKE): Remove.
10515 (PTA_ICELAKE_CLIENT): New.
10516 (PTA_ICELAKE_SERVER): New.
10517 (ix86_option_override_internal): Split up icelake on icelake client and
10519 (get_builtin_code_for_version): Ditto.
10520 (fold_builtin_cpu): Ditto.
10521 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
10522 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
10523 * config/i386/i386.h (processor_type): Ditto.
10524 * doc/invoke.texi: Ditto.
10526 2018-03-14 Jakub Jelinek <jakub@redhat.com>
10529 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
10530 INTEGER_CST offset, add it together with bitpos / 8 and
10531 sign extend based on POINTER_SIZE.
10535 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
10538 * config/i386/constraints.md (Yc): New register constraint.
10539 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
10540 Use Yc constraint for alternative 2 of operand 0. Remove
10541 preferred_for_speed attribute.
10543 2018-03-14 Richard Biener <rguenther@suse.de>
10545 PR tree-optimization/84830
10546 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
10547 with the old one to avoid oscillations.
10549 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
10552 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
10554 (assign_by_spills): Return a flag of reload assignment failure.
10555 Do not process the reload assignment failures. Do not spill other
10556 reload pseudos if they has the same reg class. Update n if
10558 (lra_assign): Add a return arg. Set up from the result of
10559 assign_by_spills call.
10560 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
10561 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
10562 usage_insns if it is not NULL.
10563 (spill_hard_reg_in_range): New function.
10564 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
10565 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
10566 function prototypes.
10567 (lra_assign): Change prototype.
10568 * lra.c (lra): Add code to deal with fails by splitting hard reg
10571 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
10573 * config/riscv/riscv.opt (mrelax): New option.
10574 * config/riscv/riscv.c (riscv_file_start): Emit ".option
10575 "norelax" when riscv_mrelax is disabled.
10576 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
10578 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
10581 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
10582 reassociation for int modes.
10584 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
10586 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
10587 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
10589 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
10590 * config/aarch64/aarch64-sve.md
10591 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
10592 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
10593 (*extend<mode><Vwide>2): Rename to...
10594 (aarch64_sve_extend<mode><Vwide>2): ...this.
10595 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
10596 renaming the old pattern to...
10597 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
10599 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
10600 define_expand, renaming the old pattern to...
10601 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
10602 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
10603 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
10604 account when deciding which SVE instruction the optab should use.
10605 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
10607 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
10609 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
10610 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
10611 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
10612 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
10613 (tlsdesc_small_<mode>): Turn a define_expand and use
10614 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
10615 (tlsdesc_small_advsimd_<mode>): ...this.
10616 (tlsdesc_small_sve_<mode>): New pattern.
10618 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
10620 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
10621 (UNSPEC_UMUL_HIGHPART): New constants.
10622 (MUL_HIGHPART): New int iteraor.
10623 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
10624 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
10626 (*<su>mul<mode>3_highpart): New define_insn.
10628 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
10631 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10634 2018-03-13 Martin Liska <mliska@suse.cz>
10637 * (sem_item_optimizer::sem_item_optimizer): Initialize new
10639 (sem_item_optimizer::~sem_item_optimizer): Release it.
10640 (sem_item_optimizer::merge_classes): Register variable aliases.
10641 (sem_item_optimizer::fixup_pt_set): New function.
10642 (sem_item_optimizer::fixup_points_to_sets): Likewise.
10643 * ipa-icf.h: Declare new variables and functions.
10645 2018-03-13 Jakub Jelinek <jakub@redhat.com>
10647 PR middle-end/84834
10648 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
10649 integer_pow2p@2 and test integer_pow2p in condition.
10650 (A < 0 ? C : 0): Similarly for @1.
10652 PR middle-end/84831
10653 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
10654 characters starting at p contain '\0' character, don't look beyond
10658 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
10659 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
10662 * reg-stack.c (change_stack): Change update_end var from int to
10663 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
10664 also call set_block_for_insn on the newly added insns and rescan.
10667 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
10668 on the last operand.
10671 * tree.c (stabilize_reference_1): Return save_expr (e) for
10672 STATEMENT_LIST even if it doesn't have side-effects.
10674 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
10676 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
10678 2018-03-12 Renlin Li <renlin.li@arm.com>
10680 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
10681 aarch64_output_scalar_simd_mov_immediate.
10683 2018-03-12 Martin Sebor <msebor@redhat.com>
10685 PR tree-optimization/83456
10686 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
10687 for perfectly overlapping calls to memcpy.
10688 (gimple_fold_builtin_memory_chk): Same.
10689 (gimple_fold_builtin_strcpy): Handle no-warning.
10690 (gimple_fold_builtin_stxcpy_chk): Same.
10691 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
10693 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
10695 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
10696 parameter. Use it for SFmode.
10697 (rs6000_function_arg_advance_1): Adjust.
10698 (rs6000_function_arg): Adjust.
10699 (rs6000_gimplify_va_arg): Pass false for that new parameter.
10701 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
10703 PR rtl-optimization/84169
10704 PR rtl-optimization/84780
10705 * combine.c (can_combine_p): Check for a 2-insn combination whether
10706 the destination register is used between the two insns, too.
10708 2018-03-12 Richard Biener <rguenther@suse.de>
10710 PR tree-optimization/84803
10711 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
10712 for refs DR analysis didn't process.
10714 2018-03-12 Richard Biener <rguenther@suse.de>
10716 PR tree-optimization/84777
10717 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
10718 force-vectorize loops ignore whether we are optimizing for size.
10720 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
10722 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
10723 (TARGET_MD_ASM_ADJUST): Define.
10725 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
10726 Kito Cheng <kito.cheng@gmail.com>
10727 Chung-Ju Wu <jasonwucj@gmail.com>
10729 * config/nds32/nds32.c (nds32_compute_stack_frame,
10730 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
10731 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
10732 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
10733 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
10734 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
10735 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
10736 * config/nds32/nds32.md (prologue, epilogue): Use macro
10737 NDS32_V3PUSH_AVAILABLE_P to do checking.
10739 2018-03-11 Jakub Jelinek <jakub@redhat.com>
10742 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
10743 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
10744 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
10745 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
10746 addition of most attributes on !orig_type_die or the attribute not
10747 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
10749 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
10750 Chung-Ju Wu <jasonwucj@gmail.com>
10752 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
10753 __NDS32_VH__ macro.
10754 * config/nds32/nds32.opt (mvh): New option.
10756 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
10757 Chung-Ju Wu <jasonwucj@gmail.com>
10759 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
10761 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
10762 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
10765 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
10766 Chung-Ju Wu <jasonwucj@gmail.com>
10768 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
10770 * config/nds32/nds32-multiple.md (strlensi): New pattern.
10771 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
10773 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
10774 Kito Cheng <kito.cheng@gmail.com>
10775 Chung-Ju Wu <jasonwucj@gmail.com>
10777 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
10778 UNSPEC_FFMISM and UNSPEC_FLMISM.
10779 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
10780 for ffb, ffmism and flmism.
10781 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
10782 (unspec_ffmism): Ditto.
10783 (unspec_flmism): Ditto.
10784 (nds32_expand_builtin_impl): Check if string extension is available.
10785 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
10786 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
10788 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
10791 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
10794 * lra-assigns.c (assign_by_spills): Return a flag of reload
10795 assignment failure. Do not process the reload assignment
10796 failures. Do not spill other reload pseudos if they has the same
10798 (lra_assign): Add a return arg. Set up from the result of
10799 assign_by_spills call.
10800 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
10801 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
10802 usage_insns if it is not NULL.
10803 (spill_hard_reg_in_range): New function.
10804 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
10805 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
10806 function prototypes.
10807 (lra_assign): Change prototype.
10808 * lra.c (lra): Add code to deal with fails by splitting hard reg
10811 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
10814 * config/i386/i386.opt: Replace Enforcment with Enforcement.
10816 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
10819 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
10820 (dw_val_node): Add val_symbolic_view.
10821 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
10822 (symview_upper_bound): New.
10823 (new_line_info_table): Initialize symviews_since_reset.
10824 (dwarf2out_source_line): Count symviews_since_reset and set
10825 symview_upper_bound.
10826 (dw_val_equal_p): Handle symview.
10827 (add_AT_symview): New.
10828 (print_dw_val): Handle symview.
10829 (attr_checksum, attr_checksum_ordered): Likewise.
10830 (same_dw_val_p, size_of_die): Likewise.
10831 (value_format, output_die): Likewise.
10832 (add_high_low_attributes): Use add_AT_symview for entry_view.
10833 (dwarf2out_finish): Reset symview_upper_bound, clear
10836 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
10839 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
10840 Add strict argument and use it.
10841 (rs6000_split_multireg_move): Update for new strict argument.
10842 (mem_operand_gpr): Disallow all non-offsettable addresses.
10843 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
10845 2018-03-09 Jakub Jelinek <jakub@redhat.com>
10848 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
10849 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
10850 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
10853 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
10854 decl, use remap_type if we want to use the type.
10856 2018-03-09 Martin Sebor <msebor@redhat.com>
10858 PR tree-optimization/84526
10859 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
10861 (builtin_access::generic_overlap): Be prepared to handle non-array
10864 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
10866 PR rtl-optimization/84682
10867 * lra-constraints.c (process_address_1): Check is_address flag
10868 for address constraints.
10869 (process_alt_operands): Likewise.
10870 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
10871 preprocess_constraints.
10872 * recog.h (preprocess_constraints): Add oploc parameter.
10874 * recog.c (preprocess_constraints): Test address_operand for
10875 CT_ADDRESS constraints.
10877 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
10880 * lra-assigns.c (assign_by_spills): Return a flag of reload
10881 assignment failure. Do not process the reload assignment
10882 failures. Do not spill other reload pseudos if they has the same
10884 (lra_assign): Add a return arg. Set up from the result of
10885 assign_by_spills call.
10886 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
10887 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
10888 usage_insns if it is not NULL.
10889 (spill_hard_reg_in_range): New function.
10890 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
10891 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
10892 function prototypes.
10893 (lra_assign): Change prototype.
10894 * lra.c (lra): Add code to deal with fails by splitting hard reg
10897 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10900 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
10901 Accept complain bool parameter. Only emit errors if it is true.
10902 (arm_parse_cpu_option_name): Likewise.
10903 (arm_target_thumb_only): Adjust callers of the above.
10904 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
10905 prototype to take a default true bool parameter.
10906 (arm_parse_arch_option_name): Likewise.
10908 2018-03-09 David Malcolm <dmalcolm@redhat.com>
10909 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10913 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
10914 * configure: Regenerate.
10915 * configure.ac ("linker --version-script option"): New.
10916 ("linker soname option"): New.
10918 2018-03-09 Richard Biener <rguenther@suse.de>
10920 PR tree-optimization/84775
10921 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
10922 immediate uses of predicate stmts and mark them modified.
10925 PR tree-optimization/84178
10926 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
10928 (version_loop_for_if_conversion): Delay update_ssa call.
10929 (tree_if_conversion): Delay update_ssa until after predicate
10932 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
10935 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
10936 when the function accesses prior frames.
10938 2018-03-08 Jakub Jelinek <jakub@redhat.com>
10941 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
10942 gen_llsym, otherwise call maybe_gen_llsym.
10944 PR inline-asm/84742
10945 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
10946 has ',' character inside of it.
10948 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10951 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
10952 as clobbering CC_REGNUM.
10954 2018-03-08 Richard Biener <rguenther@suse.de>
10956 PR middle-end/84552
10957 * tree-scalar-evolution.c: Include tree-into-ssa.h.
10958 (follow_copies_to_constant): Do not follow SSA names registered
10961 2018-03-08 Richard Biener <rguenther@suse.de>
10963 PR tree-optimization/84178
10964 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
10966 (version_loop_for_if_conversion): Delay update_ssa call.
10967 (tree_if_conversion): Delay update_ssa until after predicate
10970 2018-03-08 David Malcolm <dmalcolm@redhat.com>
10972 PR tree-optimization/84178
10973 * tree-if-conv.c (release_bb_predicate): Remove the
10974 the assertion that the stmts have NULL use_ops.
10975 Discard the statements, asserting that they haven't
10976 yet been added to a BB.
10978 2018-03-08 Richard Biener <rguenther@suse.de>
10980 PR tree-optimization/84746
10981 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
10982 (phi_translate): Pass in destination ANTIC_OUT set.
10983 (phi_translate_1): Likewise. For a simplified result lookup
10984 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
10985 (phi_translate_set): Adjust.
10986 (do_pre_regular_insertion): Likewise.
10987 (do_pre_partial_partial_insertion): Likewise.
10989 2018-03-08 Martin Liska <mliska@suse.cz>
10991 PR gcov-profile/84735
10992 * doc/gcov.texi: Document usage of profile files.
10993 * gcov-io.h: Document changes in the format.
10995 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
10999 * dwarf2out.c (struct dw_line_info_table): Update comments for
11001 (FORCE_RESET_NEXT_VIEW): New.
11002 (FORCE_RESETTING_VIEW_P): New.
11003 (RESETTING_VIEW_P): Check for -1 too.
11004 (ZERO_VIEW_P): Likewise.
11005 (new_line_info_table): Force-reset next view.
11006 (dwarf2out_begin_function): Likewise.
11007 (dwarf2out_source_line): Simplify zero_view_p initialization.
11008 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
11009 view directly. Omit view when omitting .loc at line 0.
11011 2018-03-08 Jakub Jelinek <jakub@redhat.com>
11013 PR tree-optimization/84740
11014 * tree-switch-conversion.c (process_switch): Call build_constructors
11015 only if info.phi_count is non-zero.
11017 PR tree-optimization/84739
11018 * tree-tailcall.c (find_tail_calls): Check call arguments against
11019 DECL_ARGUMENTS (current_function_decl) rather than
11020 DECL_ARGUMENTS (func) when checking for tail recursion.
11022 2018-03-07 Jakub Jelinek <jakub@redhat.com>
11024 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
11025 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
11026 Volker Reichelt's entry and add entries for people that perform
11027 GCC fuzzy testing and report numerous bugs.
11029 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
11032 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
11033 readonly data in sdata, if that is disabled.
11034 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
11035 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
11036 -mreadonly-in-sdata option.
11038 2018-03-07 Martin Sebor <msebor@redhat.com>
11040 PR tree-optimization/84468
11041 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
11042 basic block when looking for nul assignment.
11044 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
11047 * except.h (output_function_exception_table): Adjust prototype.
11048 * except.c (output_function_exception_table): Remove FNNAME parameter
11049 and add SECTION parameter. Ouput one part of the table at a time.
11050 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
11051 the first part of the exception table and emit unwind directives.
11052 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
11053 (i386_pe_seh_cold_init): Likewise.
11054 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
11055 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
11056 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
11057 (ix86_output_call_insn): Emit a nop in one more case for SEH.
11058 * config/i386/winnt.c: Include except.h.
11059 (struct seh_frame_state): Add reg_offset, after_prologue and
11060 in_cold_section fields.
11061 (i386_pe_seh_end_prologue): Set seh->after_prologue.
11062 (i386_pe_seh_cold_init): New function.
11063 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
11064 to seh->in_cold_section.
11065 (seh_emit_push): Record the offset of the push.
11066 (seh_emit_save): Record the offet of the save.
11067 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
11068 Test seh->after_prologue to disregard the epilogue.
11069 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
11070 (i386_pe_end_cold_function): New function.
11072 2018-03-07 Jakub Jelinek <jakub@redhat.com>
11075 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
11076 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
11079 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
11081 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
11082 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
11084 PR middle-end/84723
11085 * multiple_target.c: Include tree-inline.h and intl.h.
11086 (expand_target_clones): Diagnose and fail if node->definition and
11087 !tree_versionable_function_p (node->decl).
11089 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
11091 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
11093 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
11094 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
11095 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
11097 2018-03-06 Jakub Jelinek <jakub@redhat.com>
11100 * combine.c (try_combine): Use reg_or_subregno instead of handling
11101 just paradoxical SUBREGs and REGs.
11103 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
11105 * config/arc/arc.c (arc_finalize_pic): Remove function.
11106 (arc_must_save_register): We use single base PIC register, remove
11107 checks to save/restore the PIC register.
11108 (arc_expand_prologue): Likewise.
11109 * config/arc/arc-protos.h (arc_set_default_type_attributes):
11111 (arc_verify_short): Likewise.
11112 (arc_attr_type): Likewise.
11113 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
11114 (walk_stores): Likewise.
11115 (arc_address_cost): Make it static.
11116 (arc_verify_short): Likewise.
11117 (branch_dest): Likewise.
11118 (arc_attr_type): Likewise.
11119 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
11120 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
11121 (arc_final_prescan_insn): Remove inserting the nops due to
11122 hardware hazards. It is done in reorg step.
11123 (insn_length_variant_t): Remove.
11124 (insn_length_parameters_t): Likewise.
11125 (arc_insn_length_parameters): Likewise.
11126 (arc_get_insn_variants): Likewise.
11127 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
11129 2018-03-06 Jakub Jelinek <jakub@redhat.com>
11131 PR inline-asm/84683
11132 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
11135 PR tree-optimization/84687
11136 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
11138 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
11140 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11142 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
11143 Rename to ppc_speculation_barrier.
11144 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
11145 __builtin_ppc_speculation_barrier.
11147 2018-03-05 Jakub Jelinek <jakub@redhat.com>
11150 * combine.c (combine_simplify_rtx): Don't try to simplify if
11151 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
11154 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
11156 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
11157 to 32 bytes when compiling for POWER9.
11159 2018-03-05 Jakub Jelinek <jakub@redhat.com>
11162 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
11163 regparm >= 3 with no arg reg available also for calls with
11164 flag_force_indirect_call. Pass decl to ix86_function_regparm.
11167 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
11169 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
11171 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
11174 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
11176 2018-03-05 Richard Biener <rguenther@suse.de>
11178 PR tree-optimization/84486
11179 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
11180 When inserting a __builtin_assume_aligned call set the LHS
11181 SSA name alignment info accordingly.
11183 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
11185 PR tree-optimization/84114
11186 * config/aarch64/aarch64.c (aarch64_reassociation_width)
11187 Avoid reassociation of FLOAT_MODE addition.
11189 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
11191 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
11192 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
11193 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
11194 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
11195 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
11196 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
11197 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
11199 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
11200 __builtin_ia32_wbinvd): New builtins.
11201 (SPECIAL_ARGS2): New.
11202 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
11203 (SPECIAL_ARGS2): New.
11204 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
11205 (ix86_valid_target_attribute_inner_p): Ditto.
11206 (ix86_init_mmx_sse_builtins): Add special_args2.
11207 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
11208 TARGET_WBNOINVD_P): New.
11209 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
11210 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
11211 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
11212 * config/i386/immintrin.h (_wbinvd): New intrinsic.
11213 * config/i386/pconfigintrin.h: New file.
11214 * config/i386/wbnoinvdintrin.h: Ditto.
11215 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
11217 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
11219 2018-03-05 Richard Biener <rguenther@suse.de>
11221 PR tree-optimization/84670
11222 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11224 (BB_VISITED_WITH_VISITED_SUCCS): New define.
11225 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11226 (compute_antic_aux): Only assert the number of values in ANTIC_IN
11227 doesn't grow if all successors (recursively) were visited at least
11230 2018-03-05 Richard Biener <rguenther@suse.de>
11232 PR tree-optimization/84650
11233 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
11234 if executed in the loop pipeline.
11236 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
11238 * doc/configfiles.texi (Configuration Files): Move info about
11239 conditionalizing $target-protos.h to...
11240 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
11241 differs from $target-protos.h.
11243 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
11244 Chung-Ju Wu <jasonwucj@gmail.com>
11246 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
11247 * config/nds32/nds32-multiple.md (setmemsi): Define.
11248 * config/nds32/nds32-memory-manipulation.c
11249 (nds32_gen_dup_4_byte_to_word_value): New.
11250 (emit_setmem_word_loop): New.
11251 (emit_setmem_byte_loop): New.
11252 (nds32_expand_setmem_loop): New.
11253 (nds32_expand_setmem_loop_v3m): New.
11254 (nds32_expand_setmem_unroll): New.
11255 (nds32_expand_setmem): New.
11257 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
11258 Chung-Ju Wu <jasonwucj@gmail.com>
11260 * config/nds32/nds32-memory-manipulation.c
11261 (nds32_emit_load_store): New.
11262 (nds32_emit_post_inc_load_store): New.
11263 (nds32_emit_mem_move): New.
11264 (nds32_emit_mem_move_block): New.
11265 (nds32_expand_movmemsi_loop_unknown_size): New.
11266 (nds32_expand_movmemsi_loop_known_size): New.
11267 (nds32_expand_movmemsi_loop): New.
11268 (nds32_expand_movmemsi_unroll): New.
11269 (nds32_expand_movmemqi): Rename ...
11270 (nds32_expand_movmemsi): ... to this.
11271 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
11272 (movmemsi): ... to this.
11273 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
11274 (nds32_expand_movmemsi): ... to this.
11276 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
11277 Monk Chiang <sh.chiang04@gmail.com>
11278 Chung-Ju Wu <jasonwucj@gmail.com>
11280 * config/nds32/nds32-protos.h
11281 (nds32_expand_load_multiple): New arguments.
11282 (nds32_expand_store_multiple): Ditto.
11283 (nds32_valid_multiple_load_store): Rename ...
11284 (nds32_valid_multiple_load_store_p): ... to this.
11285 * config/nds32/nds32-memory-manipulation.c
11286 (nds32_expand_load_multiple): Refine implementation.
11287 (nds32_expand_store_multiple): Ditto.
11288 * config/nds32/nds32-multiple.md
11289 (load_multiple): Update nds32_expand_load_multiple interface.
11290 (store_multiple): Update nds32_expand_store_multiple interface.
11291 * config/nds32/nds32-predicates.c
11292 (nds32_valid_multiple_load_store): Rename ...
11293 (nds32_valid_multiple_load_store_p): ... to this and refine
11295 * config/nds32/predicates.md
11296 (nds32_load_multiple_and_update_address_operation): New predicate.
11297 (nds32_store_multiple_and_update_address_operation): New predicate.
11299 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
11300 Chung-Ju Wu <jasonwucj@gmail.com>
11302 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
11303 (combo): New attribute.
11304 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
11306 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
11308 * config/nds32/nds32.opt: Change -mcmodel= default value.
11310 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
11311 Monk Chiang <sh.chiang04@gmail.com>
11312 Chung-Ju Wu <jasonwucj@gmail.com>
11314 * config/nds32/constants.md (unspec_element): New enum.
11315 * config/nds32/constraints.md (Umw): New constraint.
11316 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
11317 * config/nds32/nds32-intrinsic.md: Likewise.
11318 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
11319 (nds32_valid_smw_lwm_base_p): New.
11320 (nds32_output_smw_single_word): New.
11321 (nds32_output_lmw_single_word): New.
11322 (nds32_expand_unaligned_load): New.
11323 (nds32_expand_unaligned_store): New.
11324 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
11325 (nds32_output_smw_single_word): Declare.
11326 (nds32_output_lmw_single_word): Declare.
11327 (nds32_expand_unaligned_load): Declare.
11328 (nds32_expand_unaligned_store): Declare.
11329 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
11330 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
11331 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
11332 NDS32_BUILTIN_UASTORE_DW.
11333 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
11336 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
11337 Kito Cheng <kito.cheng@gmail.com>
11338 Chung-Ju Wu <jasonwucj@gmail.com>
11340 * config/nds32/nds32-intrinsic.c
11341 (nds32_expand_builtin_null_ftype_reg): Delete.
11342 (nds32_expand_builtin_reg_ftype_imm): Ditto.
11343 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
11344 (nds32_read_argument): New.
11345 (nds32_legitimize_target): Ditto.
11346 (nds32_legitimize_argument): Ditto.
11347 (nds32_check_constant_argument): Ditto.
11348 (nds32_expand_unop_builtin): Ditto.
11349 (nds32_expand_unopimm_builtin): Ditto.
11350 (nds32_expand_binop_builtin): Ditto.
11351 (nds32_builtin_decl_impl): Ditto.
11352 (builtin_description): Ditto.
11353 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
11354 (nds32_init_builtins_impl): Ditto.
11355 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
11356 (nds32_builtin_decl): New.
11357 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
11358 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
11360 2018-03-02 Jeff Law <law@redhat.com>
11362 * reorg.c (stop_search_p): Handle DEBUG_INSN.
11363 (redundant_insn, fill_simple_delay_slots): Likewise.
11364 (fill_slots_from_thread): Likewise.
11365 * resource.c (mark_referenced_resources): Likewise.
11366 (mark_set_resources, find_dead_or_set_registers): Likewise.
11368 2018-03-02 Jakub Jelinek <jakub@redhat.com>
11370 * substring-locations.h (format_warning_va): Formatting fix for
11371 ATTRIBUTE_GCC_DIAG.
11372 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
11374 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
11375 * substring-locations.c: Include intl.h.
11376 (format_warning_va): Turned into small wrapper around
11377 format_warning_n_va, renamed to ...
11378 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
11379 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
11381 (format_warning_at_substring_n): New function.
11382 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
11383 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
11384 format_warning_at_substring with just a shorter name instead of
11385 const function pointer.
11386 (fmtwarn_n): New function.
11387 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
11388 appropriate, get rid of all the fmtstr temporaries, move conditionals
11389 with G_() wrapped string literals directly into fmtwarn arguments,
11390 cast dir.len to (int), formatting fixes.
11392 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
11394 * doc/invoke.texi: Remove "Cilk Plus" references.
11396 2018-03-02 Jakub Jelinek <jakub@redhat.com>
11397 Richard Biener <rguenther@suse.de>
11400 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
11401 for error or warning attributes if CALL_FROM_THUNK_P is set.
11404 2018-03-02 Jakub Jelinek <jakub@redhat.com>
11407 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
11408 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
11411 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
11412 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
11414 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
11415 instead of -1U in last predictors element's probability member.
11417 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
11420 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11421 arguments if they are comparable.
11423 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
11425 PR tree-optimization/84634
11426 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
11427 masks and masked_loop_p with a single loop_masks, making sure it's
11428 null for bb vectorization.
11430 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
11432 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11433 (vect_analyze_data_ref_access): Use loop->safe_len rather than
11434 loop->force_vectorize to check whether there is no alias.
11436 2018-03-02 Jakub Jelinek <jakub@redhat.com>
11439 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
11441 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
11443 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
11444 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
11445 instead of a loop around prev_real_insn.
11446 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
11449 PR inline-asm/84625
11450 * config/i386/i386.c (ix86_print_operand): Use conditional
11451 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
11454 2018-03-02 Richard Biener <rguenther@suse.de>
11456 PR tree-optimization/84427
11457 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
11458 (bitmap_set_subtract_values): Rewrite to handle multiple
11461 (prune_clobbered_mems): Likewise.
11462 (phi_translate): Take edge instead of pred/phiblock.
11463 (phi_translate_1): Likewise.
11464 (phi_translate_set): Likewise. Insert all translated
11465 exprs for a value into the set, keeping possibly multiple
11466 expressions per value.
11467 (compute_antic_aux): Adjust for phi_translate changes.
11468 When intersecting union the expressions and prune those
11469 not in the final value set, keeping possibly multiple
11470 expressions per value. Do not use value-insertion
11471 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
11472 all expressions. Add verification that the value-sets
11473 only shrink during iteration.
11474 (compute_partial_antic_aux): Adjust for the phi_translate changes.
11475 (do_pre_regular_insertion): Likewise.
11476 (do_pre_partial_partial_insertion): Likewise.
11478 2018-03-02 Richard Biener <rguenther@suse.de>
11481 * config/darwin.c (saved_debug_info_level): New static global.
11482 (darwin_asm_lto_start): Disable debug info generation for LTO out.
11483 (darwin_asm_lto_end): Restore debug info generation settings.
11485 2018-03-01 Martin Liska <mliska@suse.cz>
11488 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
11489 volatile arguments.
11491 2018-03-01 Richard Biener <rguenther@suse.de>
11494 * dwarf2out.c (gen_variable_die): Properly handle late VLA
11495 type annotation with LTO when debug was disabled at compile-time.
11497 2018-03-01 Matthew Fortune <mfortune@gmail.com>
11499 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
11501 (mips_final_postscan_insn): Likewise.
11503 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
11505 PR rtl-optimization/84528
11506 * alias.c (init_alias_target): Add commentary.
11507 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
11508 a unique base value if the frame pointer is not eliminated
11509 to the stack pointer.
11511 2018-03-01 Tom de Vries <tom@codesourcery.com>
11513 PR rtl-optimization/83327
11514 * lra-int.h (hard_regs_spilled_into): Declare.
11515 * lra.c (hard_regs_spilled_into): Define.
11516 (init_reg_info): Init hard_regs_spilled_into.
11517 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
11518 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
11519 (process_bb_lives): Handle hard_regs_spilled_into.
11520 (lra_create_live_ranges_1): Before doing liveness propagation, clear
11521 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
11523 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
11525 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
11526 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
11527 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
11528 * config/rs6000/aix72.h: New file.
11530 2018-02-28 Jakub Jelinek <jakub@redhat.com>
11532 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
11533 instead of warning_at with conditional singular and plural messages
11537 * stor-layout.c (update_alignment_for_field): For
11538 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
11539 && !DECL_PACKED (field), do the alignment update, just use
11540 only desired_align instead of MAX (type_align, desired_align)
11542 (place_field): Don't do known_align < desired_align handling
11543 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
11544 is non-NULL, instead do it after rli->prev_field handling and
11545 only if not within a bitfield word. For DECL_PACKED (field)
11546 use type_align of BITS_PER_UNIT.
11548 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
11550 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
11551 superfluous parentheses and trailing spaces.
11553 2018-02-28 Richard Biener <rguenther@suse.de>
11555 PR tree-optimization/84584
11556 * graphite-scop-detection.c (scop_detection::add_scop): Discard
11557 SCoPs with fake exit edge.
11559 2018-02-28 Martin Liska <mliska@suse.cz>
11562 * timevar.c (timer::print): Fix format to properly print 100%
11565 2018-02-28 Richard Biener <rguenther@suse.de>
11567 PR middle-end/84607
11568 * genmatch.c (capture_info::walk_match): Do not mark
11569 captured expressions without operands as expr_p given
11570 they act more like predicates and should be subject to
11571 "lost tail" side-effect preserving.
11573 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
11575 PR rtl-optimization/81611
11576 * auto-inc-dec.c (attempt_change): Move dead note from
11577 mem_insn if it's the next use of regno
11578 (find_address): Take address use of reg holding
11579 non-incremented value. Add parm to limit search to the named
11581 (merge_in_block): Attempt to use a mem insn that is the next
11582 use of the original regno.
11584 2018-02-27 Martin Sebor <msebor@redhat.com>
11587 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
11588 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
11590 2018-02-27 Martin Sebor <msebor@redhat.com>
11592 PR translation/84207
11593 * diagnostic-core.h (warning_n, error_n, inform_n): Change
11594 n argument to unsigned HOST_WIDE_INT.
11595 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
11596 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
11597 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
11598 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
11600 2018-02-27 Richard Biener <rguenther@suse.de>
11602 PR tree-optimization/84512
11603 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
11604 Do not use the estimate returned from record_stmt_cost for
11605 the scalar iteration cost but sum properly using add_stmt_cost.
11607 2018-02-27 Richard Biener <rguenther@suse.de>
11609 PR tree-optimization/84466
11610 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
11611 Adjust last change to less strictly validate use operands.
11613 2018-02-27 Martin Liska <mliska@suse.cz>
11615 PR gcov-profile/84548
11616 * gcov.c (process_file): Allow partial overlap and consider it
11617 also as group functions.
11618 (output_lines): Properly calculate range of lines for a group.
11620 2018-02-27 Martin Liska <mliska@suse.cz>
11622 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
11623 'ggc' suffixes. Change first column width.
11624 (timer::print): Fix formatting of the column.
11626 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
11628 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
11629 preserve inline entry blocks for the sake of debug inline
11630 entry point markers alone.
11631 (remove_unused_locals): Suggest in comments a better place to
11632 force the preservation of inline entry blocks that are
11633 otherwise unused, but do not preserve them.
11635 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
11637 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
11639 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
11642 * config/i386/constraints.md (Bs): Replace
11643 ix86_indirect_branch_register with
11644 TARGET_INDIRECT_BRANCH_REGISTER.
11646 * config/i386/i386.md (indirect_jump): Likewise.
11647 (tablejump): Likewise.
11648 (*sibcall_memory): Likewise.
11649 (*sibcall_value_memory): Likewise.
11650 Peepholes of indirect call and jump via memory: Likewise.
11651 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
11652 (*sibcall_value_GOT_32): Likewise.
11653 * config/i386/predicates.md (indirect_branch_operand): Likewise.
11654 (GOT_memory_operand): Likewise.
11655 (call_insn_operand): Likewise.
11656 (sibcall_insn_operand): Likewise.
11657 (GOT32_symbol_operand): Likewise.
11658 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
11660 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
11662 PR rtl-optimization/83496
11663 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
11664 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
11665 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
11666 redundant insn, if any.
11667 (relax_delay_slots): Likewise.
11668 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
11670 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
11672 PR tree-optimization/83965
11673 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
11674 that grouped statements are part of a reduction chain. Return
11675 true if the statement is not marked as a reduction itself but
11676 is part of a group.
11677 (vect_recog_dot_prod_pattern): Don't check whether the statement
11678 is part of a group here.
11679 (vect_recog_sad_pattern): Likewise.
11680 (vect_recog_widen_sum_pattern): Likewise.
11682 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
11685 * final.c (rest_of_clean_state): Also look for calls inside sequences.
11687 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
11690 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
11692 (ix86_output_indirect_function_return): New prototype.
11693 (ix86_split_simple_return_pop_internal): Likewise.
11694 * config/i386/i386.c (indirect_return_via_cx): New.
11695 (indirect_return_via_cx_bnd): Likewise.
11696 (indirect_thunk_name): Handle return va CX_REG.
11697 (output_indirect_thunk_function): Create alias for
11698 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
11699 (ix86_output_indirect_jmp): Remove the bool argument.
11700 (ix86_output_indirect_function_return): New function.
11701 (ix86_split_simple_return_pop_internal): Likewise.
11702 * config/i386/i386.md (*indirect_jump): Don't pass false
11703 to ix86_output_indirect_jmp.
11704 (*tablejump_1): Likewise.
11705 (simple_return_pop_internal): Change it to define_insn_and_split.
11706 Call ix86_split_simple_return_pop_internal to split it for
11707 -mfunction-return=.
11708 (simple_return_indirect_internal): Call
11709 ix86_output_indirect_function_return instead of
11710 ix86_output_indirect_jmp.
11712 2018-02-26 Jakub Jelinek <jakub@redhat.com>
11715 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
11716 memset and value initialization afterwards.
11718 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
11720 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
11722 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11725 * common/config/aarch64/aarch64-common.c
11726 (aarch_option_optimization_table[]): Switch
11727 off fomit-frame-pointer
11729 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
11730 Chung-Ju Wu <jasonwucj@gmail.com>
11732 * config/nds32/nds32-multiple.md (load_multiple): Disallow
11734 (store_multiple): Ditto.
11736 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
11738 * config.gcc: Add --with-cpu support for nds32 target.
11739 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
11740 * config/nds32/nds32.opt: Add -mcpu= option.
11742 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
11744 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
11745 isel=yes): Warn for these deprecated options.
11747 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
11749 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
11750 ISA_2_5_MASKS_EMBEDDED.
11752 2018-02-23 Jakub Jelinek <jakub@redhat.com>
11754 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
11755 p->max as pointers rather than using iterative_hash_expr.
11757 2018-02-23 Carl Love <cel@us.ibm.com>
11759 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
11760 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
11762 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
11763 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
11764 P8V_BUILTIN_VEC_VUNSIGNED2.
11766 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
11769 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
11770 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
11772 * lra-constraints.c (curr_insn_transform): Set up
11773 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
11775 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
11776 * lra-eliminations.c (spill_pseudos): Ditto.
11777 (process_insn_for_elimination): Ditto.
11778 * lra-lives.c (reg_early_clobber_p): Use the new macros.
11779 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
11780 LRA_NON_CLOBBERED_ALT.
11782 2018-02-22 Martin Sebor <msebor@redhat.com>
11784 PR tree-optimization/84480
11785 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
11786 to maybe_diag_stxncpy_trunc. Call it.
11787 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
11788 from gimple_fold_builtin_strcpy. Print inlining stack.
11789 (handle_builtin_stxncpy): Print inlining stack.
11790 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
11792 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
11795 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
11796 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
11797 and -fcheck-pointer-bounds are used together.
11798 (indirect_thunk_prefix): New enum.
11799 (indirect_thunk_need_prefix): New function.
11800 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
11801 "_nt" instead of "_bnd" for NOTRACK prefix.
11802 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
11803 (output_indirect_thunk_function): Likewise.
11805 (ix86_code_end): Update output_indirect_thunk_function calls.
11806 (ix86_output_indirect_branch_via_reg): Replace
11807 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
11808 (ix86_output_indirect_branch_via_push): Likewise.
11809 (ix86_output_function_return): Likewise.
11810 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
11811 incompatible with -fcf-protection=branch and
11812 -fcheck-pointer-bounds.
11814 2018-02-22 Steve Ellcey <sellcey@cavium.com>
11817 * config/aarch64/aarch64.c (aarch64_print_address_internal):
11818 Change gcc_assert call to output_operand_lossage.
11820 2018-02-22 Steve Ellcey <sellcey@cavium.com>
11822 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
11824 2018-02-22 DJ Delorie <dj@redhat.com>
11825 Sebastian Perta <sebastian.perta@renesas.com>
11826 Oleg Endo <olegendo@gcc.gnu.org>
11828 * config/rx/rx.c (rx_rtx_costs): New function.
11829 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
11831 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
11833 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
11835 2018-02-22 Martin Liska <mliska@suse.cz>
11838 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
11839 Add "native" as a possible value.
11841 2018-02-22 Martin Liska <mliska@suse.cz>
11844 * config/i386/i386.c (ix86_option_override_internal):
11845 Add "native" as a possible value for -march and -mtune.
11847 2018-02-22 Jakub Jelinek <jakub@redhat.com>
11850 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
11851 to all type variants.
11853 PR tree-optimization/84503
11854 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
11855 width as info->bitpos + info->bitsize - start.
11856 (merged_store_group::merge_overlapping): Simplify width computation.
11857 (check_no_overlap): New function.
11858 (imm_store_chain_info::try_coalesce_bswap): Compute expected
11859 start + width and last_order of the group, fail if check_no_overlap
11861 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
11862 to group if check_no_overlap fails.
11864 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
11866 * config/rs6000/altivec.md: Delete contraint arguments to
11867 define_expand, define_split, and define_peephole2, and in
11868 define_insn_and_split if always unused.
11869 * config/rs6000/darwin.md: Ditto.
11870 * config/rs6000/dfp.md: Ditto.
11871 * config/rs6000/rs6000.md: Ditto.
11872 * config/rs6000/sync.md: Ditto.
11873 * config/rs6000/vector.md: Ditto.
11874 * config/rs6000/vsx.md: Ditto.
11876 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
11878 * config/rs6000/altivec.md: Write output control strings as braced
11879 blocks instead of double-quoted strings.
11880 * config/rs6000/darwin.md: Ditto.
11881 * config/rs6000/rs6000.md: Ditto.
11882 * config/rs6000/vector.md: Ditto.
11883 * config/rs6000/vsx.md: Ditto.
11885 2018-02-21 Jason Merrill <jason@redhat.com>
11887 PR c++/84314 - ICE with templates and fastcall attribute.
11888 * attribs.c (build_type_attribute_qual_variant): Remove assert.
11890 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
11892 * ipa-cp.c (determine_versionability): Fix comment typos.
11894 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
11897 * ipa-cp.c (determine_versionability): Do not version functions caling
11900 2018-02-21 Martin Liska <mliska@suse.cz>
11903 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
11904 Add "native" as a possible value.
11905 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
11906 the macro when native cpu detection is available.
11908 2018-02-21 Martin Liska <mliska@suse.cz>
11911 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
11912 Add "native" as a possible value.
11913 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
11914 when native cpu detection is available.
11916 2018-02-21 Jakub Jelinek <jakub@redhat.com>
11917 Martin Sebor <msebor@redhat.com>
11919 PR tree-optimization/84478
11920 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
11922 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
11923 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
11924 support which is conservatively correct, for 2 only stay conservative
11925 for maxlen. Formatting and comment capitalization fixes. Add STRICT
11926 argument to the 2 argument get_range_strlen, adjust 6 arg
11927 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
11929 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
11930 (gimple_fold_builtin_strlen): Pass true as last argument to
11933 2018-02-20 Martin Sebor <msebor@redhat.com>
11935 PR middle-end/84095
11936 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
11937 (builtin_memref::set_base_and_offset): Same. Handle inner references.
11938 (builtin_memref::builtin_memref): Factor out parts into
11939 set_base_and_offset and call it.
11941 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
11943 PR middle-end/84406
11944 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
11945 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
11946 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
11947 search at the associated MODE_INT.
11949 2018-02-20 Jeff Law <law@redhat.com>
11951 PR middle-end/82123
11952 PR tree-optimization/81592
11953 PR middle-end/79257
11954 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
11955 for range data rather than using global data.
11956 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
11957 range data rather than using global data.
11958 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
11959 pass it to children as needed.
11960 (struct directive::fmtresult): Similarly.
11961 (struct directive::set_width): Similarly.
11962 (struct directive::set_precision): Similarly.
11963 (format_integer, format_directive, parse_directive): Similarly.
11964 (format_none): Accept unnamed vr_values parameter.
11965 (format_percent, format_floating, format_character): Similarly.
11966 (format_string, format_plain): Similarly.
11967 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
11968 the EVRP range analyzer for range data rather than using global data.
11969 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
11970 gimple-ssa-evrp-analyze.h
11971 (class sprintf_dom_walker): Add after_dom_children member function.
11972 Add evrp_range_analyzer member.
11973 (sprintf_dom_walker::before_dom_children): Call into the EVRP
11974 range analyzer as needed.
11975 (sprintf_dom_walker::after_dom_children): New member function.
11976 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
11978 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
11979 (evrp_range_analyzer::pop_to_marker): Likewise.
11981 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
11983 PR tree-optimization/84419
11984 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
11985 with the required type if its current type is compatible but
11988 2018-02-20 Jakub Jelinek <jakub@redhat.com>
11990 PR middle-end/82004
11991 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
11992 after vectorization.
11994 2018-02-20 Martin Liska <mliska@suse.cz>
11997 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
11998 possible values if we don't have a hint.
12000 2018-02-20 Martin Liska <mliska@suse.cz>
12004 * final.c (shorten_branches): Build align_tab array with one
12006 * opts.c (finish_options): Add alignment option limit check.
12007 (MAX_CODE_ALIGN): Likewise.
12008 (MAX_CODE_ALIGN_VALUE): Likewise.
12009 * doc/invoke.texi: Document maximum allowed option value for
12010 all -falign-* options.
12012 2018-02-19 Jakub Jelinek <jakub@redhat.com>
12015 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
12016 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
12017 * var-tracking.c (emit_note_insn_var_location): Remove all references
12018 to NOTE_INSN_CALL_ARG_LOCATION.
12019 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
12020 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
12021 Use copy_rtx_if_shared.
12022 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
12023 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
12024 (dwarf2out_var_location): Remove handling of
12025 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
12027 * final.c (final_scan_insn): Remove all references to
12028 NOTE_INSN_CALL_ARG_LOCATION.
12029 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
12030 before dumping final insns.
12031 * except.c (emit_note_eh_region_end): Remove all references to
12032 NOTE_INSN_CALL_ARG_LOCATION.
12033 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
12034 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
12035 * config/arc/arc.c (hwloop_optimize): Likewise.
12036 * config/arm/arm.c (create_fix_barrier): Likewise.
12037 * config/s390/s390.c (s390_chunkify_start): Likewise.
12038 * config/sh/sh.c (find_barrier): Likewise.
12039 * config/i386/i386.c (rest_of_insert_endbranch,
12040 ix86_seh_fixup_eh_fallthru): Likewise.
12041 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
12042 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
12043 * config/frv/frv.c (frv_function_prologue): Likewise.
12044 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
12046 (note_outside_basic_block_p): Remove all references to
12047 NOTE_INSN_CALL_ARG_LOCATION.
12048 * gengtype.c (adjust_field_rtx_def): Likewise.
12049 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
12051 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
12052 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
12055 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
12058 PR tree-optimization/84452
12059 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
12060 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
12063 2018-02-19 Martin Liska <mliska@suse.cz>
12066 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
12068 2018-02-19 Martin Liska <mliska@suse.cz>
12069 Richard Sandiford <richard.sandiford@linaro.org>
12071 PR tree-optimization/82491
12072 * gimple-fold.c (get_base_constructor): Make earlier bail out
12075 2018-02-19 Carl Love <cel@us.ibm.com>
12077 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
12078 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
12080 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
12081 P8V_BUILTIN_VEC_NEG.
12083 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
12085 * config/rl78/rl78.md (movdf): New define expand.
12087 2018-02-19 Martin Liska <mliska@suse.cz>
12090 * doc/invoke.texi: Fix typo.
12091 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
12093 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
12095 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
12096 handle rs6000_single_float and rs6000_double_float specially for
12099 2018-02-16 Jeff Law <law@redhat.com>
12101 * config/rx/rx.c (add_pop_cfi_notes): New function.;
12102 (pop_regs): Use it.
12104 2018-02-16 Jakub Jelinek <jakub@redhat.com>
12107 * ipa-inline.c (inline_small_functions): Fix a typo.
12109 2018-02-16 Nathan Sidwell <nathan@acm.org>
12111 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
12113 2018-02-16 Carl Love <cel@us.ibm.com>
12115 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
12116 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
12117 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
12118 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
12119 expansion to P8V_BUILTIN_VEC_FLOAT2.
12121 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
12123 PR rtl-optimization/70023
12124 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
12125 src_regno into account.
12127 2018-02-16 Carl Love <cel@us.ibm.com>
12129 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
12130 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
12131 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
12132 * config/rs6000/rs6000.c: Remove case statements for
12133 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
12134 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
12135 and P9V_BUILTIN_VEC_VINSERT4B.
12136 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
12137 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
12138 * config/rs6000/vsx.md:
12139 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
12142 2018-02-16 Carl Love <cel@us.ibm.com>
12144 * config/rs6000/altivec.h: Add builtin names vec_extract4b
12146 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
12148 * config/rs6000/rs6000-c.c: Add the definitions for
12149 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
12150 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
12151 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
12152 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
12153 definition for insert4b and define insn *insert3b_internal.
12154 * doc/extend.texi: Add documentation for vec_extract4b.
12156 2018-02-16 Nathan Sidwell <nathan@acm.org>
12158 * doc/extend.texi (Backwards Compatibility): Mention friend
12159 injection. Note for-scope is deprecated.
12160 * doc/invoke.texi (-ffriend-injection): Deprecate.
12162 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
12164 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
12165 that moved to I2, also allow destinations that are a paradoxical
12166 subreg (instead of a normal reg).
12168 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
12171 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
12174 2018-02-16 Richard Biener <rguenther@suse.de>
12176 PR tree-optimization/84037
12177 PR tree-optimization/84016
12179 * config/i386/i386.c (ix86_builtin_vectorization_cost):
12180 Adjust vec_construct for the fact we need additional higher latency
12181 128bit inserts for AVX256 and AVX512 vector builds.
12182 (ix86_add_stmt_cost): Scale vector construction cost for
12185 2018-02-16 Richard Biener <rguenther@suse.de>
12187 PR tree-optimization/84417
12188 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
12189 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
12190 (non_rewritable_lvalue_p): Likewise, use poly-ints.
12192 2018-02-16 Martin Liska <mliska@suse.cz>
12195 * internal-fn.def (ASAN_CHECK): Set proper flags.
12196 (ASAN_MARK): Likewise.
12198 2018-02-16 Julia Koval <julia.koval@intel.com>
12200 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
12201 from PTA_CANNONLAKE.
12203 2018-02-16 Jakub Jelinek <jakub@redhat.com>
12206 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
12207 Use ++iter rather than iter++ for std::list iterators.
12208 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
12209 defer deleting them until all nodes in the forest are processed. Do
12210 free even leaf nodes. Change to_process into auto_vec.
12213 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
12214 * vec.h (vec_default_construct): Use memset instead of placement new
12215 if BROKEN_VALUE_INITIALIZATION is defined.
12216 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
12217 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
12220 PR rtl-optimization/83723
12221 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
12222 * lra.c (lra_substitute_pseudo): Likewise. If true, use
12223 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
12225 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
12227 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
12229 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
12231 PR rtl-optimization/81443
12232 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
12233 from inner REGs to paradoxical SUBREGs.
12235 2018-02-16 Richard Biener <rguenther@suse.de>
12237 PR tree-optimization/84399
12238 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12239 For operands we can analyze at their definition make sure we can
12240 analyze them at each use as well.
12242 2018-02-16 Richard Biener <rguenther@suse.de>
12244 PR tree-optimization/84190
12245 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
12246 volatile accesses if the decl isn't volatile.
12248 2018-02-15 Jason Merrill <jason@redhat.com>
12250 PR c++/84314 - ICE with templates and fastcall attribute.
12251 * attribs.c (build_type_attribute_qual_variant): Don't clobber
12252 TYPE_CANONICAL on an existing type.
12254 2018-02-15 Jakub Jelinek <jakub@redhat.com>
12256 PR tree-optimization/84383
12257 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
12258 dstoff nor call operand_equal_p if dstbase is NULL.
12260 PR tree-optimization/84334
12261 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
12262 also a CONSTANT_CLASS_P, punt.
12264 2018-02-14 Jim Wilson <jimw@sifive.com>
12266 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
12267 first SMALL_OPERAND check. New local min_second_step. Move assert
12268 to where locals are set. Add TARGET_RVC support.
12269 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
12271 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
12273 * doc/invoke.texi: Correct -Wformat-overflow code sample.
12275 2018-02-14 Martin Sebor <msebor@redhat.com>
12277 PR tree-optimization/83698
12278 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
12279 arrays constrain the offset range to their bounds.
12280 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
12281 (builtin_access::overlap): Avoid setting the size of overlap if it's
12283 (maybe_diag_overlap): Also consider arrays when deciding what values
12284 of offsets to include in diagnostics.
12286 2018-02-14 Martin Sebor <msebor@redhat.com>
12289 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
12290 that correspond to the kind of a declaration.
12292 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
12295 * config/pa/pa.md: Load address of PIC label using the linkage table
12296 if the label is nonlocal.
12298 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
12300 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
12301 warning message if user requests -maltivec=be.
12302 * doc/invoke.texi: Document deprecation of -maltivec=be.
12304 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
12307 * config/rs6000/rs6000-c.c: Update definitions for
12308 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
12309 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
12311 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
12314 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
12315 add _get_ssp intrinsics. Remove argument from
12316 __builtin_ia32_rdssp[d|q].
12317 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
12318 * config/i386/i386-builtin.def: Remove argument from
12319 __builtin_ia32_rdssp[d|q].
12320 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
12321 ix86_expand_special_args_builtin for _rdssp[d|q].
12322 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
12323 Clear register before usage.
12324 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
12325 Add documentation for new _get_ssp and _inc_ssp intrinsics.
12327 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
12329 PR tree-optimization/84357
12330 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
12331 operand 1 of an ARRAY_REF too.
12333 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
12336 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
12337 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
12339 (set_of_reg): New struct.
12340 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
12341 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
12342 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
12344 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
12345 Split into bitclr, bitset, bitinvert patterns if appropriate.
12346 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
12347 use rx_fuse_in_memory_bitop.
12348 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
12349 to named insn, correct maximum insn length.
12351 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
12354 * machmode.def: Define a complex mode for PARTIAL_INT.
12355 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
12357 * doc/rtl.texi: Document CSPImode.
12358 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
12360 (msp430_hard_regno_nregs_with_padding): Likewise.
12362 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
12365 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
12367 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
12369 PR rtl-optimization/84169
12370 * combine.c (try_combine): New variable split_i2i3. Set it to true if
12371 we generated a parallel as new i3 and we split that to new i2 and i3
12372 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
12373 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
12374 those to i2, not i1. Partially rewrite this scan code.
12376 2018-02-13 Jakub Jelinek <jakub@redhat.com>
12379 * stor-layout.c (place_field): For variable length fields, adjust
12380 offset_align afterwards not just based on the field's alignment,
12381 but also on the size.
12383 PR middle-end/84309
12384 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
12385 of exps and logs in the use_exp2 case.
12387 2018-02-13 Jeff Law <law@redhat.com>
12389 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
12390 entry for "vector".
12392 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
12395 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
12399 * common.opt (gas-loc-support, gas-locview-support): New.
12400 (ginline-points, ginternal-reset-location-views): New.
12401 * doc/invoke.texi: Document them. Use @itemx where intended.
12402 (gvariable-location-views): Adjust.
12403 * target.def (reset_location_view): New.
12404 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
12405 (TARGET_RESET_LOCATION_VIEW): New.
12406 * doc/tm.texi: Rebuilt.
12407 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
12408 (dwarf2out_default_as_locview_support): New.
12409 (output_asm_line_debug_info): Use option variables.
12410 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
12411 (output_loc_list): Likewise.
12412 (add_high_low_attributes): Check option variables.
12413 Don't output entry view attribute in strict mode.
12414 (gen_inlined_subroutine_die): Check option variables.
12415 (dwarf2out_inline_entry): Likewise.
12416 (init_sections_and_labels): Likewise.
12417 (dwarf2out_early_finish): Likewise.
12418 (maybe_reset_location_view): New, from...
12419 (dwarf2out_var_location): ... here. Call it.
12420 * debug.h (dwarf2out_default_as_loc_support): Declare.
12421 (dwarf2out_default_as_locview_support): Declare.
12422 * hooks.c (hook_int_rtx_insn_0): New.
12423 * hooks.h (hook_int_rtx_insn_0): Declare.
12424 * toplev.c (process_options): Take -gas-loc-support and
12425 -gas-locview-support from dwarf2out. Enable
12426 -gvariable-location-views by default only with locview
12427 assembler support. Enable -ginternal-reset-location-views by
12428 default only if the target defines the corresponding hook.
12429 Enable -ginline-points by default if location views are
12430 enabled; force it disabled if statement frontiers are
12432 * tree-inline.c (expand_call_inline): Check option variables.
12433 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
12435 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
12437 PR tree-optimization/84321
12438 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
12439 handling. Also check whether the anti-range contains any values
12440 that satisfy the mask; switch to a VR_RANGE if not.
12442 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
12445 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
12447 2018-02-13 Martin Jambor <mjambor@suse.cz>
12450 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
12451 of call statements, also set location of a load to a temporary.
12453 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
12455 * config/rl78/rl78.c (add_vector_labels): New function.
12456 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
12457 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
12458 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
12459 which checks that no arguments are passed.
12460 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
12461 * doc/extend.texi: Documentation for the new attribute.
12463 2018-02-13 Andreas Schwab <schwab@suse.de>
12465 * config/riscv/linux.h (CPP_SPEC): Define.
12467 2018-02-13 Jakub Jelinek <jakub@redhat.com>
12470 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
12471 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
12472 OPTION_MASK_ISA_AES as first argument to def_builtin_const
12473 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
12474 instead of OPTION_MASK_ISA_PCLMUL as first argument to
12475 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
12476 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
12477 temporarily for AES and PCLMUL builtins.
12479 PR tree-optimization/84339
12480 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
12481 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
12484 PR middle-end/84309
12485 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
12486 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
12487 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
12489 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
12491 * omp-simd-clone.h: New file.
12492 * omp-simd-clone.c: Include omp-simd-clone.h.
12493 (expand_simd_clones): No longer static.
12494 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
12495 cgraph.h and omp-simd-clone.h.
12496 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
12497 (vect_recog_widen_shift_pattern): Formatting fix.
12498 (vect_pattern_recog_1): Don't check optab for calls.
12501 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
12502 operands[2] into a REG before using gen_lowpart on it.
12504 2018-02-12 Jeff Law <law@redhat.com>
12507 * config/sh/sh.c (find_barrier): Consider a sibling call
12510 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
12511 successfully back substituting a reg.
12513 2018-02-12 Richard Biener <rguenther@suse.de>
12515 PR tree-optimization/84037
12516 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
12517 parameter, move visited init to caller.
12518 (vect_slp_analyze_operations): Separate cost from validity
12519 check, initialize visited once for all instances.
12520 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
12522 * tree-vect-stmts.c (vect_model_simple_cost): Make early
12524 (vect_model_promotion_demotion_cost): Likewise.
12525 (vectorizable_bswap): Guard cost modeling with !slp_node
12526 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
12528 (vectorizable_call): Likewise.
12529 (vectorizable_conversion): Likewise.
12530 (vectorizable_assignment): Likewise.
12531 (vectorizable_shift): Likewise.
12532 (vectorizable_operation): Likewise.
12533 (vectorizable_store): Likewise.
12534 (vectorizable_load): Likewise.
12535 (vectorizable_condition): Likewise.
12536 (vectorizable_comparison): Likewise.
12538 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
12541 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
12542 (ASAN_MARK): Fix fnspec to account for return value, change pointer
12543 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
12545 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
12547 PR middle-end/83665
12548 * params.def (inline-min-speedup): Increase from 8 to 15.
12549 (max-inline-insns-auto): Decrease from 40 to 30.
12550 * ipa-split.c (consider_split): Add some buffer for function to
12551 be considered inlining candidate.
12552 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
12555 2018-02-12 Richard Biener <rguenther@suse.de>
12557 PR tree-optimization/84037
12558 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
12559 matched stmts if we cannot swap the non-matched ones.
12561 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
12563 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
12564 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
12565 _mm_maskz_scalef_round_ss): New intrinsics.
12566 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
12567 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
12568 __builtin_ia32_scalefss_round): Remove.
12569 (__builtin_ia32_scalefsd_mask_round,
12570 __builtin_ia32_scalefss_mask_round): New intrinsics.
12571 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
12572 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
12573 ((match_operand:VF_128 2 "<round_nimm_predicate>"
12574 "<round_constraint>")): Changed to ...
12575 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
12576 "<round_scalar_constraint>")): ... this.
12577 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
12578 %0, %1, %2<round_op3>}"): Changed to ...
12579 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
12580 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
12581 %2<round_scalar_mask_op3>}"): ... this.
12582 * config/i386/subst.md (round_scalar_nimm_predicate): New.
12584 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
12586 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
12587 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
12588 (_mm_maskz_sqrt_round_ss): New intrinsics.
12589 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
12590 (__builtin_ia32_sqrtsd_mask_round)
12591 (__builtin_ia32_sqrtss_mask_round): New builtins.
12592 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
12593 (__builtin_ia32_sqrtss_round): Remove.
12594 (__builtin_ia32_sqrtsd_mask_round)
12595 (__builtin_ia32_sqrtss_mask_round): New builtins.
12596 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
12597 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
12598 ((match_operand:VF_128 1 "vector_operand"
12599 "xBm,<round_constraint>")): Changed to ...
12600 ((match_operand:VF_128 1 "vector_operand"
12601 "xBm,<round_scalar_constraint>")): ... this.
12602 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
12603 %0, %2, %<iptr>1<round_op3>}): Changed to ...
12604 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
12605 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
12606 %<iptr>1<round_scalar_mask_op3>}): ... this.
12607 ((set_attr "prefix" "<round_prefix>")): Changed to ...
12608 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
12610 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
12613 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
12614 Cast vec_cmpeq result to correct type.
12615 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
12616 Cast vec_cmpgt result to correct type.
12618 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
12620 * final.c (final_scan_insn_1): Renamed from...
12621 (final_scan_insn): ... this. New wrapper, to recover
12622 seen from the outermost call in recursive ones.
12623 * config/sparc/sparc.c (output_return): Drop seen from call.
12624 (output_sibcall): Likewise.
12625 * config/visium/visium.c (output_branch): Likewise.
12627 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
12629 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
12632 2018-02-10 Alan Modra <amodra@gmail.com>
12635 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
12636 Specify LR as an input.
12638 2018-02-10 Jakub Jelinek <jakub@redhat.com>
12641 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
12642 remove_member_access_dummy_vars): New functions.
12643 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
12644 lower_omp_1, execute_lower_omp): Use them.
12646 PR rtl-optimization/84308
12647 * shrink-wrap.c (spread_components): Release todo vector.
12649 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
12651 PR rtl-optimization/57193
12652 * ira-color.c (struct allocno_color_data): Add member
12653 conflict_allocno_hard_prefs.
12654 (update_conflict_allocno_hard_prefs): New.
12655 (bucket_allocno_compare_func): Add a preference based on
12656 conflict_allocno_hard_prefs.
12657 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
12658 (color_allocnos): Remove a dead code. Initiate
12659 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
12661 2018-02-09 Jakub Jelinek <jakub@redhat.com>
12664 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
12665 constraint from =wa to wa. Avoid a subreg on the output operand,
12666 instead use a pseudo and subreg it in a move.
12667 (p9_xxbrd_<mode>): Changed to ...
12668 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
12669 (p9_xxbrd_v2df): New expander.
12670 (p9_xxbrw_<mode>): Changed to ...
12671 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
12672 (p9_xxbrw_v4sf): New expander.
12674 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
12676 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
12678 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
12681 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
12682 multiply in 32-bit mode.
12683 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
12684 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
12687 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
12689 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
12690 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
12691 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
12692 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
12694 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
12697 * dwarf2out.c (is_trivial_indirect_ref): New function.
12698 (dwarf2out_late_global_decl): Do not generate a location
12699 attribute for variables that have a non-trivial DECL_VALUE_EXPR
12700 and that are not defined in the current unit.
12702 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
12704 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
12705 instead of a libcall for UNORDERED.
12707 2018-02-09 Tamar Christina <tamar.christina@arm.com>
12710 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
12711 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
12713 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12716 * config/s390/s390.c (s390_set_current_function): Invoke
12717 s390_indirect_branch_settings also if fndecl didn't change.
12719 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
12721 * config/rs6000/rs6000.md (blockage): Set length to zero.
12723 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
12725 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
12727 2018-02-09 Jakub Jelinek <jakub@redhat.com>
12730 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
12731 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
12735 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
12736 PARALLEL incoming that failed vt_get_decl_and_offset check.
12738 PR middle-end/84237
12739 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
12740 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
12742 (get_variable_section): For decls in named .bss* sections pass true as
12743 second argument to bss_initializer_p.
12745 2018-02-09 Marek Polacek <polacek@redhat.com>
12746 Jakub Jelinek <jakub@redhat.com>
12749 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
12750 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
12751 Sync some changes from cxx_fold_indirect_ref.
12753 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
12755 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
12757 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
12758 (BLOCK_INLINE_ENTRY_LABEL): New.
12759 (dwarf2out_var_location): Disregard inline entry markers.
12760 (inline_entry_data): New struct.
12761 (inline_entry_data_hasher): New hashtable type.
12762 (inline_entry_data_hasher::hash): New.
12763 (inline_entry_data_hasher::equal): New.
12764 (inline_entry_data_table): New variable.
12765 (add_high_low_attributes): Add DW_AT_entry_pc and
12766 DW_AT_GNU_entry_view attributes if a pending entry is found
12767 in inline_entry_data_table. Add old entry_pc attribute only
12768 if debug nonbinding markers are disabled.
12769 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
12770 markers are enabled.
12771 (block_within_block_p, dwarf2out_inline_entry): New.
12772 (dwarf2out_finish): Check that no entries remained in
12773 inline_entry_data_table.
12774 * final.c (reemit_insn_block_notes): Handle inline entry notes.
12775 (final_scan_insn, notice_source_line): Likewise.
12776 (rest_of_clean_state): Skip inline entry markers.
12777 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
12779 * gimple.c (gimple_build_debug_inline_entry): New.
12780 * gimple.h (enum gimple_debug_subcode): Add
12781 GIMPLE_DEBUG_INLINE_ENTRY.
12782 (gimple_build_debug_inline_entry): Declare.
12783 (gimple_debug_inline_entry_p): New.
12784 (gimple_debug_nonbind_marker_p): Adjust.
12785 * insn-notes.def (INLINE_ENTRY): New.
12786 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
12787 inline entry marker notes.
12788 (print_insn): Likewise.
12789 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
12790 (INSN_DEBUG_MARKER_KIND): Likewise.
12791 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
12792 * tree-inline.c (expand_call_inline): Build and insert
12793 debug_inline_entry stmt.
12794 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
12795 inline entry blocks early, if nonbind markers are enabled.
12796 (dump_scope_block): Dump fragment info.
12797 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
12798 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
12799 (gimple_build_debug_inline_entry): New.
12800 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
12801 Enable/disable inline entry points too.
12802 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
12803 (DEBUG_INSN): Describe inline entry markers.
12805 * common.opt (gvariable-location-views): New.
12806 (gvariable-location-views=incompat5): New.
12807 * config.in: Rebuilt.
12808 * configure: Rebuilt.
12809 * configure.ac: Test assembler for view support.
12810 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
12811 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
12812 * dwarf2out.c (var_loc_view): New typedef.
12813 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
12814 (dwarf2out_locviews_in_attribute): New.
12815 (dwarf2out_locviews_in_loclist): New.
12816 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
12817 (enum dw_line_info_opcode): Add LI_adv_address.
12818 (struct dw_line_info_table): Add view.
12819 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
12820 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
12821 (zero_view_p): New variable.
12822 (ZERO_VIEW_P): New macro.
12823 (output_asm_line_debug_info): New.
12824 (struct var_loc_node): Add view.
12825 (add_AT_view_list, AT_loc_list): New.
12826 (add_var_loc_to_decl): Add view param. Test it against last.
12827 (new_loc_list): Add view params. Record them.
12828 (AT_loc_list_ptr): Handle loc and view lists.
12829 (view_list_to_loc_list_val_node): New.
12830 (print_dw_val): Handle dw_val_class_view_list.
12831 (size_of_die): Likewise.
12832 (value_format): Likewise.
12833 (loc_list_has_views): New.
12834 (gen_llsym): Set vl_symbol too.
12835 (maybe_gen_llsym, skip_loc_list_entry): New.
12836 (dwarf2out_maybe_output_loclist_view_pair): New.
12837 (output_loc_list): Output view list or entries too.
12838 (output_view_list_offset): New.
12839 (output_die): Handle dw_val_class_view_list.
12840 (output_dwarf_version): New.
12841 (output_compilation_unit_header): Use it.
12842 (output_skeleton_debug_sections): Likewise.
12843 (output_rnglists, output_line_info): Likewise.
12844 (output_pubnames, output_aranges): Update version comments.
12845 (output_one_line_info_table): Output view numbers in asm comments.
12846 (dw_loc_list): Determine current endview, pass it to new_loc_list.
12847 Call maybe_gen_llsym.
12848 (loc_list_from_tree_1): Adjust.
12849 (add_AT_location_description): Create view list attribute if
12850 needed, check it's absent otherwise.
12851 (convert_cfa_to_fb_loc_list): Adjust.
12852 (maybe_emit_file): Call output_asm_line_debug_info for test.
12853 (dwarf2out_var_location): Reset views as needed. Precompute
12854 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
12855 attribute. Set view.
12856 (new_line_info_table): Reset next view.
12857 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
12858 (dwarf2out_source_line): Likewise. Output view resets and labels to
12859 the assembler, or select appropriate line info opcodes.
12860 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
12861 (optimize_string_length): Catch it. Adjust.
12862 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
12863 dw_val_class_view_list, and remove it if no longer needed.
12864 (hash_loc_list): Hash view numbers.
12865 (loc_list_hasher::equal): Compare them.
12866 (optimize_location_lists): Check whether a view list symbol is
12867 needed, and whether the locview attribute is present, and
12868 whether they match. Remove the locview attribute if no longer
12870 (index_location_lists): Call skip_loc_list_entry for test.
12871 (dwarf2out_finish): Call output_asm_line_debug_info for test.
12872 Use output_dwarf_version.
12873 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
12874 (struct dw_val_node): Add val_view_list.
12875 * final.c (SEEN_NEXT_VIEW): New.
12876 (set_next_view_needed): New.
12877 (clear_next_view_needed): New.
12878 (maybe_output_next_view): New.
12879 (final_start_function): Rename to...
12880 (final_start_function_1): ... this. Take pointer to FIRST,
12881 add SEEN parameter. Emit param bindings in the initial view.
12882 (final_start_function): Reintroduce SEEN-less interface.
12883 (final): Rename to...
12884 (final_1): ... this. Take SEEN parameter. Output final pending
12885 next view at the end.
12886 (final): Reintroduce seen-less interface.
12887 (final_scan_insn): Output pending next view before switching
12888 sections or ending a block. Mark the next view as needed when
12889 outputting variable locations. Notify debug backend of section
12890 changes, and of location view changes.
12891 (rest_of_handle_final): Adjust.
12892 * toplev.c (process_options): Autodetect value for debug variable
12893 location views option. Warn on incompat5 without -gdwarf-5.
12894 * doc/invoke.texi (gvariable-location-views): New.
12895 (gvariable-location-views=incompat5): New.
12896 (gno-variable-location-views): New.
12898 2018-02-08 David Malcolm <dmalcolm@redhat.com>
12900 PR tree-optimization/84136
12901 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
12902 that the result of find_edge is non-NULL.
12904 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
12907 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
12908 storing integer register in SImode. Fix cost of 256 and 512
12909 byte aligned SSE register store.
12911 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
12913 * config/i386/i386.c (ix86_multiplication_cost): Fix
12914 multiplication cost for TARGET_AVX512DQ.
12916 2018-02-08 Marek Polacek <polacek@redhat.com>
12918 PR tree-optimization/84238
12919 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
12922 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
12924 PR tree-optimization/84265
12925 * tree-vect-stmts.c (vectorizable_store): Don't treat
12926 VMAT_CONTIGUOUS accesses as grouped.
12927 (vectorizable_load): Likewise.
12929 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
12931 PR tree-optimization/81635
12932 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
12933 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
12934 (test_round_for_mask): New functions.
12935 (wide_int_cc_tests): Call test_round_for_mask.
12936 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
12937 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
12938 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
12939 range returned by get_range_info.
12941 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
12944 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
12945 * symtab.c: Include builtins.h
12946 (symtab_node::output_to_lto_symbol_table_p): Move here
12947 from lto-streamer-out.c:output_symbol_p.
12948 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
12949 (output_symbol_p): Move all logic to symtab.c
12950 (produce_symtab): Update.
12952 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12954 * config/s390/s390-opts.h (enum indirect_branch): Define.
12955 * config/s390/s390-protos.h (s390_return_addr_from_memory)
12956 (s390_indirect_branch_via_thunk)
12957 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
12958 (enum s390_indirect_branch_type): Define.
12959 * config/s390/s390.c (struct s390_frame_layout, struct
12960 machine_function): Remove.
12961 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
12962 (indirect_branch_table_label_no, indirect_branch_table_name):
12964 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
12965 (enum s390_indirect_branch_option): Define.
12966 (s390_return_addr_from_memory): New function.
12967 (s390_handle_string_attribute): New function.
12968 (s390_attribute_table): Add new attribute handler.
12969 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
12970 (s390_indirect_branch_via_thunk): New function.
12971 (s390_indirect_branch_via_inline_thunk): New function.
12972 (s390_function_ok_for_sibcall): When jumping via thunk disallow
12973 sibling call optimization for non z10 compiles.
12974 (s390_emit_call): Force indirect branch target to be a single
12975 register. Add r1 clobber for non-z10 compiles.
12976 (s390_emit_epilogue): Emit return jump via return_use expander.
12977 (s390_reorg): Handle JUMP_INSNs as execute targets.
12978 (s390_option_override_internal): Perform validity checks for the
12979 new command line options.
12980 (s390_indirect_branch_attrvalue): New function.
12981 (s390_indirect_branch_settings): New function.
12982 (s390_set_current_function): Invoke s390_indirect_branch_settings.
12983 (s390_output_indirect_thunk_function): New function.
12984 (s390_code_end): Implement target hook.
12985 (s390_case_values_threshold): Implement target hook.
12986 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
12988 * config/s390/s390.h (struct s390_frame_layout)
12989 (struct machine_function): Move here from s390.c.
12990 (TARGET_INDIRECT_BRANCH_NOBP_RET)
12991 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
12992 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
12993 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
12994 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
12995 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
12996 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
12997 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
12998 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
12999 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
13000 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
13001 (mnemonic attribute): Add values which aren't recognized
13003 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
13004 pattern for branch conversion. Fix mnemonic attribute.
13005 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
13006 indirect branch via thunk if requested.
13007 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
13008 ("*indirect_jump"): Disable for branch conversion using out of
13010 ("indirect_jump_via_thunk<mode>_z10")
13011 ("indirect_jump_via_thunk<mode>")
13012 ("indirect_jump_via_inlinethunk<mode>_z10")
13013 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
13014 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
13015 ("casesi_jump_via_inlinethunk<mode>_z10")
13016 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
13017 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
13018 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
13019 ("*indirect2_jump"): Disable for branch conversion.
13020 ("casesi_jump"): Turn into expander and expand patterns for branch
13022 ("return_use"): New expander.
13023 ("*return"): Emit return via thunk and rename it to ...
13024 ("*return<mode>"): ... this one.
13025 * config/s390/s390.opt: Add new options and and enum for the
13028 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
13030 * lra-constraints.c (match_reload): Unconditionally use
13031 gen_lowpart_SUBREG, rather than selecting between that
13032 and equivalent gen_rtx_SUBREG code.
13034 2018-02-08 Richard Biener <rguenther@suse.de>
13036 PR tree-optimization/84233
13037 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
13038 changed flag instead of boguously re-using phi_inserted.
13040 2018-02-08 Martin Jambor <mjambor@suse.cz>
13042 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
13043 static local variables.
13045 2018-02-08 Richard Biener <rguenther@suse.de>
13047 PR tree-optimization/84278
13048 * tree-vect-stmts.c (vectorizable_store): When looking for
13049 smaller vector types to perform grouped strided loads/stores
13050 make sure the mode is supported by the target.
13051 (vectorizable_load): Likewise.
13053 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
13055 * config/aarch64/aarch64.c (aarch64_components_for_bb):
13056 Increase LDP/STP opportunities by adding adjacent callee-saves.
13058 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
13060 PR rtl-optimization/84068
13061 PR rtl-optimization/83459
13062 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
13064 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
13066 PR tree-optimization/84224
13067 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
13068 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
13069 non-zero arguments.
13071 2018-02-07 Iain Sandoe <iain@codesourcery.com>
13074 * config/rs6000/altivec.md (*restore_world): Remove LR use.
13075 * config/rs6000/predicates.md (restore_world_operation): Adjust op
13076 count, remove one USE.
13078 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
13080 * doc/install.texi (Configuration): Document the
13081 --with-long-double-format={ibm,ieee} PowerPC configuration
13085 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
13086 Convert from define_expand to be define_insn_and_split. Rework
13087 float/double/_Float128 conversions to QI/HI/SImode to work with
13088 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
13089 conversions to QI/HImode types did a store and then a load to
13090 truncate the value. For conversions to VSX registers, don't split
13091 the insn, instead emit the code directly. Use the code iterator
13092 any_fix to combine signed and unsigned conversions.
13093 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
13094 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
13095 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13096 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
13097 (fix_<mode>di2_hw): Likewise.
13098 (fixuns_<mode>di2_hw): Likewise.
13099 (fix_<mode>si2_hw): Likewise.
13100 (fixuns_<mode>si2_hw): Likewise.
13101 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
13102 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13103 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
13104 fix<uns>_trunc<SFDF:mode>si2_p8.
13105 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
13106 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
13107 (fix<uns>_<mode>_mem): Likewise.
13108 (fctiw<u>z_<mode>_mem): Likewise.
13109 (fix<uns>_<mode>_mem): Likewise.
13110 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
13111 the register allocator from doing a direct move to the GPRs to do
13112 a store, and instead use the ISA 3.0 store byte/half-word from
13113 vector register instruction. For IEEE 128-bit floating point,
13114 also optimize stores of 32-bit ints.
13115 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
13117 2018-02-07 Alan Hayward <alan.hayward@arm.com>
13119 * genextract.c (push_pathstr_operand): New function to support
13121 (walk_rtx): Call push_pathstr_operand.
13122 (print_path): Support [a-zA-Z].
13124 2018-02-07 Richard Biener <rguenther@suse.de>
13126 PR tree-optimization/84037
13127 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
13128 (cse_and_gimplify_to_preheader): Declare.
13129 (vect_get_place_in_interleaving_chain): Likewise.
13130 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13132 (_loop_vec_info::~_loop_vec_info): Delete it.
13133 (cse_and_gimplify_to_preheader): New function.
13134 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
13135 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
13136 (vectorizable_load): Likewise. For grouped stores always base
13137 the IV on the first element.
13138 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
13139 condition before gimplifying.
13141 2018-02-07 Jakub Jelinek <jakub@redhat.com>
13143 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
13144 *DIV_EXPR and *MOD_EXPR.
13146 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
13149 * config/i386/i386.c (ix86_option_override_internal): Mask out
13150 the CF_SET bit when checking -fcf-protection.
13152 2018-02-07 Tom de Vries <tom@codesourcery.com>
13155 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
13158 2018-02-07 Richard Biener <rguenther@suse.de>
13160 PR tree-optimization/84204
13161 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
13164 PR tree-optimization/84205
13165 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
13166 special-case isl_ast_op_zdiv_r.
13168 PR tree-optimization/84223
13169 * graphite-scop-detection.c (gather_bbs::before_dom_children):
13170 Only add conditions from within the region.
13171 (gather_bbs::after_dom_children): Adjust.
13173 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
13176 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
13177 * config/avr/avr.md: Only post-reload split REG-REG moves if
13178 either register is GENERAL_REG_P.
13180 2018-02-07 Jakub Jelinek <jakub@redhat.com>
13182 PR tree-optimization/84235
13183 * tree-ssa-scopedtables.c
13184 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
13185 if the subtraction is performed in floating point type where NaNs are
13186 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
13187 build 1. Formatting fix.
13189 2018-02-06 Jakub Jelinek <jakub@redhat.com>
13192 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
13193 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
13194 and skip it regardless of bb boundaries. Use CALL_P macro,
13195 don't test INSN_P (insn) together with CALL_P or JUMP_P check
13196 unnecessarily, formatting fix.
13198 2018-02-06 Michael Collison <michael.collison@arm.com>
13200 * config/arm/thumb2.md:
13201 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
13202 (*thumb_mov_notscc): Ditto.
13204 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
13207 * config/rs6000/rs6000.md (su code attribute): Use "u" for
13208 unsigned_fix, not "s".
13210 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13212 * configure.ac (gcc_fn_eh_frame_ro): New function.
13213 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
13214 correct .eh_frame permissions.
13215 * configure: Regenerate.
13217 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
13219 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
13220 irrelevant options.
13222 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13224 * config/rs6000/rs6000.c (rs6000_option_override_internal):
13225 Display warning message for -mno-speculate-indirect-jumps.
13227 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
13229 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
13231 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
13233 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
13235 PR tree-optimization/84225
13236 * tree-eh.c (find_trapping_overflow): Only call
13237 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
13239 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
13242 * config/i386/i386.c: Reimplement the check of possible options
13243 -mibt/-mshstk conbination. Change error messages.
13244 * doc/invoke.texi: Fix a typo: remove extra '='.
13246 2018-02-06 Marek Polacek <polacek@redhat.com>
13248 PR tree-optimization/84228
13249 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
13251 2018-02-06 Tamar Christina <tamar.christina@arm.com>
13254 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
13255 emitted arch directives.
13256 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
13257 __ARM_FEATURE_COPROC before changing architectures.
13259 2018-02-06 Richard Biener <rguenther@suse.de>
13261 * config/i386/i386.c (print_reg): Fix typo.
13262 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
13264 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
13266 * configure: Regenerate.
13268 2018-02-05 Martin Sebor <msebor@redhat.com>
13270 PR tree-optimization/83369
13271 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
13274 2018-02-05 Martin Liska <mliska@suse.cz>
13276 * doc/invoke.texi: Cherry-pick upstream r323995.
13278 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
13280 * ira.c (ira_init_register_move_cost): Adjust comment.
13282 2018-02-05 Martin Liska <mliska@suse.cz>
13284 PR gcov-profile/84137
13285 * doc/gcov.texi: Fix typo in documentation.
13287 2018-02-05 Martin Liska <mliska@suse.cz>
13289 PR gcov-profile/83879
13290 * doc/gcov.texi: Document necessity of --dynamic-list-data when
13291 using dlopen functionality.
13293 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
13295 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
13296 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
13297 _mm_maskz_range_ss, _mm_mask_range_round_ss,
13298 _mm_maskz_range_round_ss): New intrinsics.
13299 (__builtin_ia32_rangesd128_round)
13300 (__builtin_ia32_rangess128_round): Remove.
13301 (__builtin_ia32_rangesd128_mask_round,
13302 __builtin_ia32_rangess128_mask_round): New builtins.
13303 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
13304 __builtin_ia32_rangess128_round): Remove.
13305 (__builtin_ia32_rangesd128_mask_round,
13306 __builtin_ia32_rangess128_mask_round): New builtins.
13307 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
13308 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
13309 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
13310 "<round_saeonly_constraint>")): Changed to ...
13311 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
13312 "<round_saeonly_scalar_constraint>")): ... this.
13313 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
13314 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
13315 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
13316 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
13317 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
13319 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
13321 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
13323 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
13324 Remove all values except native, 8540 and 8548.
13326 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
13328 * config/i386/i386.c (ix86_output_function_return): Pass
13329 INVALID_REGNUM, instead of -1, as invalid register number to
13330 indirect_thunk_name and output_indirect_thunk.
13332 2018-02-02 Julia Koval <julia.koval@intel.com>
13334 * config.gcc: Add -march=icelake.
13335 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
13336 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
13337 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
13338 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
13339 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
13340 (processor_target_table): Add icelake.
13341 (ix86_option_override_internal): Handle new PTAs.
13342 (get_builtin_code_for_version): Handle icelake.
13343 (M_INTEL_COREI7_ICELAKE): New.
13344 (fold_builtin_cpu): Handle icelake.
13345 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
13346 * doc/invoke.texi: Add -march=icelake.
13348 2018-02-02 Julia Koval <julia.koval@intel.com>
13350 * config/i386/i386.c (ix86_option_override_internal): Change flags type
13351 to wide_int_bitmask.
13352 * wide-int-bitmask.h: New.
13354 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
13357 * config/i386/i386.md: Replace Pmode with word_mode in
13358 builtin_setjmp_setup and builtin_longjmp to support x32.
13360 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
13364 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
13366 (rs6000_supported_cpu_names): New static variable.
13367 (linux_cpu_translation_table): Likewise.
13368 (elf_platform) <cpu>: Define new static variable and use it.
13369 Translate kernel AT_PLATFORM name to canonical name if needed.
13370 Error if platform name is unknown.
13372 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
13375 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
13377 2018-02-01 Jeff Law <law@redhat.com>
13380 * config/i386/i386.c (release_scratch_register_on_entry): Add new
13381 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
13382 the scratch if RELEASE_VIA_POP is false.
13383 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
13384 If we have to save a temporary register, decrement SIZE appropriately.
13385 Pass new arguments to release_scratch_register_on_entry.
13386 (ix86_adjust_stack_and_probe): Likewise.
13387 (ix86_emit_probe_stack_range): Pass new arguments to
13388 release_scratch_register_on_entry.
13390 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
13392 PR rtl-optimization/84157
13393 * combine.c (change_zero_ext): Use REG_P predicate in
13394 front of HARD_REGISTER_P predicate.
13396 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
13398 * config/avr/avr.c (avr_option_override): Move disabling of
13399 -fdelete-null-pointer-checks to...
13400 * common/config/avr/avr-common.c (avr_option_optimization_table):
13403 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13405 PR tree-optimization/81635
13406 * tree-data-ref.c (split_constant_offset_1): For types that
13407 wrap on overflow, try to use range info to prove that wrapping
13410 2018-02-01 Renlin Li <renlin.li@arm.com>
13413 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
13414 TAILCALL_ADDR_REGS.
13415 (aarch64_register_move_cost): Likewise.
13416 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
13417 TAILCALL_ADDR_REGS.
13418 (REG_CLASS_NAMES): Likewise.
13419 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
13420 TAILCALL_ADDR_REGS. Remove IP registers.
13421 * config/aarch64/aarch64.md (Ucs): Update register constraint.
13423 2018-02-01 Richard Biener <rguenther@suse.de>
13425 * domwalk.h (dom_walker::dom_walker): Add additional constructor
13426 for specifying RPO order and allow NULL for that.
13427 * domwalk.c (dom_walker::dom_walker): Likewise.
13428 (dom_walker::walk): Handle NULL RPO order.
13429 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
13431 (rewrite_update_dom_walker): Likewise.
13432 (mark_def_dom_walker): Likewise.
13434 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13436 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
13437 (aarch64_maybe_expand_sve_subreg_move): Declare.
13438 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
13439 * config/aarch64/predicates.md (aarch64_any_register_operand): New
13441 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
13442 that are semantically a reverse operation.
13443 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
13444 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
13445 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
13447 (aarch64_can_change_mode_class): For big-endian, forbid changes
13448 between two SVE modes if they have different element sizes.
13450 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13452 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
13453 the TImode handling for big-endian targets.
13455 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13457 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
13458 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
13460 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
13461 Remove BSWAP handing for big-endian targets and use the form of
13462 LD1RQ appropariate for the mode.
13464 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13466 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
13467 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
13468 duplicated element.
13470 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13473 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
13474 check for operands that need to go through aarch64_sve_reload_be.
13476 2018-02-01 Jakub Jelinek <jakub@redhat.com>
13478 PR tree-optimization/81661
13479 PR tree-optimization/84117
13480 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
13481 * tree-eh.c: Include gimplify.h.
13482 (find_trapping_overflow, replace_trapping_overflow,
13483 rewrite_to_non_trapping_overflow): New functions.
13484 * tree-vect-loop.c: Include tree-eh.h.
13485 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
13486 * tree-data-ref.c: Include tree-eh.h.
13487 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
13489 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
13491 PR rtl-optimization/84123
13492 * combine.c (change_zero_ext): Check if hard register satisfies
13493 can_change_dest_mode before calling gen_lowpart_SUBREG.
13495 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
13498 * ira.c (ira_init_register_move_cost): Remove assert.
13500 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
13502 PR rtl-optimization/84071
13503 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
13504 * doc/tm.texi: Regenerate.
13506 2018-01-31 Richard Biener <rguenther@suse.de>
13508 PR tree-optimization/84132
13509 * tree-data-ref.c (analyze_miv_subscript): Properly
13510 check whether evolution_function_is_affine_multivariate_p
13511 before calling gcd_of_steps_may_divide_p.
13513 2018-01-31 Julia Koval <julia.koval@intel.com>
13516 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
13517 * config/i386/i386.md (rdpid_rex64) New.
13518 (rdpid): Make 32bit only.
13520 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
13523 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
13524 an IDENTIFIER_NODE for FUNCTION_TYPE's.
13526 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
13529 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
13531 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
13533 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
13535 PR rtl-optimization/84071
13536 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
13537 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
13539 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
13541 * config/arc/arc.c (arc_handle_aux_attribute): New function.
13542 (arc_attribute_table): Add 'aux' attribute.
13543 (arc_in_small_data_p): Consider aux like variables.
13544 (arc_is_aux_reg_p): New function.
13545 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
13546 (arc_get_aux_arg): New function.
13547 (prepare_move_operands): Handle aux-register access.
13548 (arc_handle_aux_attribute): New function.
13549 * doc/extend.texi (ARC Variable attributes): Add subsection.
13551 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
13553 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
13554 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
13555 (arc_attribute_table): Add 'uncached' attribute.
13556 (arc_print_operand): Print '.di' flag for uncached memory
13558 (arc_in_small_data_p): Do not consider for small data the uncached
13560 (arc_is_uncached_mem_p): New function.
13561 * config/arc/predicates.md (compact_store_memory_operand): Check
13562 for uncached memory accesses.
13563 (nonvol_nonimm_operand): Likewise.
13564 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
13566 2018-01-31 Jakub Jelinek <jakub@redhat.com>
13569 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
13570 falign-loops=): Add Optimization flag.
13572 2018-01-30 Jeff Law <law@redhat.com>
13575 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
13576 INT_REGISTERS_SAVED. Check it prior to calling
13577 get_scratch_register_on_entry.
13578 (ix86_adjust_stack_and_probe): Similarly.
13579 (ix86_emit_probe_stack_range): Similarly.
13580 (ix86_expand_prologue): Corresponding changes.
13582 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13585 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
13586 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
13588 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
13591 * lra-constraints.c (curr_insn_transform): Process AND in the
13594 2018-01-30 Jakub Jelinek <jakub@redhat.com>
13596 PR rtl-optimization/83986
13597 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
13598 dependence against last_pending_memory_flush in addition to
13599 pending_jump_insns.
13601 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
13603 PR tree-optimization/81611
13604 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
13607 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13610 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
13613 2018-01-30 Richard Biener <rguenther@suse.de>
13614 Jakub Jelinek <jakub@redhat.com>
13616 PR tree-optimization/84111
13617 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
13618 inner loops added during recursion, as they don't have up-to-date
13621 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
13624 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
13625 (can_inline_edge_by_limits_p): ... here.
13626 (can_early_inline_edge_p, check_callers,
13627 update_caller_keys, update_callee_keys, recursive_inlining,
13628 add_new_edges_to_heap, speculation_useful_p,
13629 inline_small_functions,
13630 inline_small_functions, flatten_function,
13631 inline_to_all_callers_1): Update.
13633 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
13635 * profile-count.c (profile_count::combine_with_ipa_count): Handle
13638 2018-01-30 Richard Biener <rguenther@suse.de>
13640 PR tree-optimization/83008
13641 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
13642 invariant and constant vector uses in stmts when they need
13643 more than one stmt.
13645 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13648 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
13649 * configure: Regenerate.
13651 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
13653 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
13655 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
13656 Use gen_rtx_REG rather than gen_lowpart.
13658 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
13660 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
13661 rather than 0 when creating partial subregs.
13663 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
13665 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
13668 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
13671 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
13672 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
13673 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
13674 flags. This restores the settings used before the 2017-07-24.
13675 Turning off pre increment/decrement/modify allows IVOPTS to
13676 optimize DF/SF loops where the index is an int.
13678 2018-01-29 Richard Biener <rguenther@suse.de>
13679 Kelvin Nilsen <kelvin@gcc.gnu.org>
13682 * tree-vect-stmts.c (vectorizable_call): Don't call
13683 targetm.vectorize_builtin_md_vectorized_function if callee is
13686 2018-01-22 Carl Love <cel@us.ibm.com>
13688 * doc/extend.tex: Fix typo in second arg in
13689 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
13691 2018-01-29 Richard Biener <rguenther@suse.de>
13693 PR tree-optimization/84086
13694 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
13695 (flush_ssaname_freelist): When SSA names were released reset
13696 the SCEV hash table.
13698 2018-01-29 Richard Biener <rguenther@suse.de>
13700 PR tree-optimization/84057
13701 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
13702 removed paths when removing edges.
13704 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
13706 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
13707 -mfunction-return=@var{choice}.
13709 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
13711 PR diagnostic/84034
13712 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
13713 Handle CR like TAB.
13714 (layout::print_source_line): Likewise.
13715 (test_get_line_width_without_trailing_whitespace): Add test cases.
13717 2018-01-27 Jakub Jelinek <jakub@redhat.com>
13719 PR middle-end/84040
13720 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
13723 2018-01-26 Jim Wilson <jimw@sifive.com>
13725 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
13727 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
13730 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13732 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
13733 and CMP + SUB-immediate -> SUBS.
13735 2018-01-26 Martin Sebor <msebor@redhat.com>
13737 PR tree-optimization/83896
13738 * tree-ssa-strlen.c (get_string_len): Rename...
13739 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
13740 Avoid assuming length is constant.
13741 (handle_char_store): Use HOST_WIDE_INT for string length.
13743 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
13746 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
13747 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
13749 2018-01-26 Richard Biener <rguenther@suse.de>
13751 PR rtl-optimization/84003
13752 * dse.c (record_store): Only record redundant stores when
13753 the earlier store aliases at least all accesses the later one does.
13755 2018-01-26 Jakub Jelinek <jakub@redhat.com>
13757 PR rtl-optimization/83985
13758 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
13759 REG_CFA_RESTORE insns.
13760 (delete_unmarked_insns): Don't ignore separate shrink wrapping
13761 REG_CFA_RESTORE insns here.
13764 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
13765 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
13767 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
13769 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
13770 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
13771 (arc_init): Likewise.
13772 (arc_override_options): Likewise.
13773 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
13775 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
13777 * config/arc/arc.h (TARGET_DBNZ): Define.
13778 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
13779 properly set the tune attribute.
13780 (dbnz): Use TARGET_DBNZ guard.
13781 * config/arc/arc.opt (mtune): Add core3 option.
13783 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
13785 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
13786 recognize new pic like addresses.
13787 (arc_delegitimize_address): Clean up.
13789 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
13791 * config/arc/arc-arches.def: Option mrf16 valid for all
13793 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
13794 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
13795 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
13796 * config/arc/arc-tables.opt: Regenerate.
13797 * config/arc/arc.c (arc_conditional_register_usage): Handle
13798 reduced register file case.
13799 (arc_file_start): Set must have build attributes.
13800 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
13801 mrf16 option value.
13802 * config/arc/arc.opt (mrf16): Add new option.
13803 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
13804 * config/arc/genmultilib.awk: Handle new mrf16 option.
13805 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
13806 * config/arc/t-multilib: Regenerate.
13807 * doc/invoke.texi (ARC Options): Document mrf16 option.
13809 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
13811 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
13812 * config/arc/arc.c (arc_handle_secure_attribute): New function.
13813 (arc_attribute_table): Add 'secure_call' attribute.
13814 (arc_print_operand): Print secure call operand.
13815 (arc_function_ok_for_sibcall): Don't optimize tail calls when
13817 (arc_is_secure_call_p): New function. * config/arc/arc.md
13818 (call_i): Add support for sjli instruction.
13819 (call_value_i): Likewise.
13820 * config/arc/constraints.md (Csc): New constraint.
13822 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
13823 John Eric Martin <John.Martin@emmicro-us.com>
13825 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
13826 * config/arc/arc.c (_arc_jli_section): New struct.
13827 (arc_jli_section): New type.
13828 (rc_jli_sections): New static variable.
13829 (arc_handle_jli_attribute): New function.
13830 (arc_attribute_table): Add jli_always and jli_fixed attribute.
13831 (arc_file_end): New function.
13832 (TARGET_ASM_FILE_END): Define.
13833 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
13834 (arc_add_jli_section): New function.
13835 (jli_call_scan): Likewise.
13836 (arc_reorg): Call jli_call_scan.
13837 (arc_output_addsi): Remove 'S' from printing asm operand.
13838 (arc_is_jli_call_p): New function.
13839 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
13841 (movhi_insn): Likewise.
13842 (movsi_insn): Likewise.
13843 (movsi_set_cc_insn): Likewise.
13844 (loadqi_update): Likewise.
13845 (load_zeroextendqisi_update): Likewise.
13846 (load_signextendqisi_update): Likewise.
13847 (loadhi_update): Likewise.
13848 (load_zeroextendhisi_update): Likewise.
13849 (load_signextendhisi_update): Likewise.
13850 (loadsi_update): Likewise.
13851 (loadsf_update): Likewise.
13852 (movsicc_insn): Likewise.
13853 (bset_insn): Likewise.
13854 (bxor_insn): Likewise.
13855 (bclr_insn): Likewise.
13856 (bmsk_insn): Likewise.
13857 (bicsi3_insn): Likewise.
13858 (cmpsi_cc_c_insn): Likewise.
13859 (movsi_ne): Likewise.
13860 (movsi_cond_exec): Likewise.
13861 (clrsbsi2): Likewise.
13862 (norm_f): Likewise.
13872 (call_i): Remove 'S' asm letter, add jli instruction.
13873 (call_value_i): Likewise.
13874 * config/arc/arc.op (mjli-always): New option.
13875 * config/arc/constraints.md (Cji): New constraint.
13876 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
13878 (subsf3_fpx): Likewise.
13879 (mulsf3_fpx): Likewise.
13880 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
13882 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
13883 function attrbutes.
13884 * doc/invoke.texi (ARC): Document mjli-always option.
13886 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
13888 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
13889 avoid addition with 0 and use incw and decw where possible.
13891 2018-01-26 Richard Biener <rguenther@suse.de>
13893 PR tree-optimization/81082
13894 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
13895 association if it requires casting to unsigned.
13896 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
13897 from fold_plusminus_mult_expr to catch important cases late when
13898 range info is available.
13900 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13902 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
13903 * configure.ac (hidden_linkonce): New test.
13904 * configure: Regenerate.
13905 * config.in: Regenerate.
13907 2018-01-26 Julia Koval <julia.koval@intel.com>
13909 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
13910 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
13911 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
13912 _mm_mask_bitshuffle_epi64_mask): Fix type.
13913 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
13914 USI_FTYPE_V4DI_V4DI_USI): Remove.
13915 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
13916 __builtin_ia32_vpshufbitqmb256_mask,
13917 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
13918 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
13919 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
13921 2018-01-26 Alan Modra <amodra@gmail.com>
13924 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
13925 UNSPEC_VBPERMQ. Sort other unspecs.
13927 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
13929 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
13931 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
13933 PR middle-end/83055
13934 * predict.c (drop_profile): Do not push/pop cfun; update also
13936 (handle_missing_profiles): Fix logic looking for zero profiles.
13938 2018-01-25 Jakub Jelinek <jakub@redhat.com>
13940 PR middle-end/83977
13941 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
13942 on functions with #pragma omp declare simd or functions with simd
13944 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
13945 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
13946 Remove trailing \n from warning_at calls.
13948 2018-01-25 Tom de Vries <tom@codesourcery.com>
13951 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
13952 for neutered workers.
13954 2018-01-24 Joseph Myers <joseph@codesourcery.com>
13957 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
13958 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
13960 2018-01-24 Jeff Law <law@redhat.com>
13963 * i386.c (get_probe_interval): Move to earlier point.
13964 (ix86_compute_frame_layout): If -fstack-clash-protection and
13965 the frame is larger than the probe interval, then use pushes
13966 to save registers rather than reg->mem moves.
13967 (ix86_expand_prologue): Remove conditional for int_registers_saved
13970 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
13973 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
13974 min/max for never referenced object.
13976 2018-01-24 Jakub Jelinek <jakub@redhat.com>
13978 PR middle-end/83977
13979 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
13981 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
13982 attributes from DECL_ATTRIBUTES (decl) without affecting
13983 DECL_ATTRIBUTES (current_function_decl).
13984 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
13985 functions with non-NULL DECL_ABSTRACT_ORIGIN.
13987 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
13989 PR tree-optimization/83979
13990 * fold-const.c (fold_comparison): Use constant_boolean_node
13991 instead of boolean_{true,false}_node.
13993 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
13995 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
13998 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14000 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14001 Simplify the clause that sets the length attribute.
14002 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14003 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
14004 clause that sets the length attribute.
14005 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14007 2018-01-24 Tom de Vries <tom@codesourcery.com>
14010 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
14011 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
14012 Add strict parameter.
14013 (prevent_branch_around_nothing): Insert dummy insn between branch to
14014 label and label with no ptx insn inbetween.
14015 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
14017 2018-01-24 Tom de Vries <tom@codesourcery.com>
14020 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
14021 for neutered threads in warp.
14022 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
14024 2018-01-24 Richard Biener <rguenther@suse.de>
14026 PR tree-optimization/83176
14027 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
14030 2018-01-24 Richard Biener <rguenther@suse.de>
14032 PR tree-optimization/82819
14033 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
14034 code generating pluses that are no-ops in the target precision.
14036 2018-01-24 Richard Biener <rguenther@suse.de>
14038 PR middle-end/84000
14039 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
14041 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
14043 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
14044 to merge probabilities.
14045 * predict.c (probably_never_executed): Also mark as cold functions
14046 with global 0 profile and guessed local profile.
14047 * profile-count.c (profile_probability::combine_with_count): New
14049 * profile-count.h (profile_probability::operator*,
14050 profile_probability::operator*=, profile_probability::operator/,
14051 profile_probability::operator/=): Reduce precision to adjusted
14052 and set value to guessed on contradictory divisions.
14053 (profile_probability::combine_with_freq): Remove.
14054 (profile_probability::combine_wiht_count): Declare.
14055 (profile_count::force_nonzero):: Set to adjusted.
14056 (profile_count::probability_in):: Set quality to adjusted.
14057 * tree-ssa-tail-merge.c (replace_block_by): Use
14058 combine_with_count.
14060 2018-01-23 Andrew Waterman <andrew@sifive.com>
14061 Jim Wilson <jimw@sifive.com>
14063 * config/riscv/riscv.c (riscv_stack_boundary): New.
14064 (riscv_option_override): Set riscv_stack_boundary. Handle
14065 riscv_preferred_stack_boundary_arg.
14066 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
14067 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
14068 (STACK_BOUNDARY): Set to riscv_stack_boundary.
14069 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
14070 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
14071 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
14073 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
14076 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
14077 of struct ix86_frame.
14078 (ix86_expand_epilogue): Likewise. Add a local variable for
14079 the reg_save_offset field in struct ix86_frame.
14081 2018-01-23 Bin Cheng <bin.cheng@arm.com>
14083 PR tree-optimization/82604
14084 * tree-loop-distribution.c (enum partition_kind): New enum item
14085 PKIND_PARTIAL_MEMSET.
14086 (partition_builtin_p): Support above new enum item.
14087 (generate_code_for_partition): Ditto.
14088 (compute_access_range): Differentiate cases that equality can be
14089 proven at all loops, the innermost loops or no loops.
14090 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
14091 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
14092 (finalize_partitions, distribute_loop): Don't fuse partition of
14093 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
14094 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
14095 parloop is enabled.
14097 2018-01-23 Martin Liska <mliska@suse.cz>
14099 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
14100 order to ignore the predictor.
14101 (PRED_POLYMORPHIC_CALL): Likewise.
14102 (PRED_RECURSIVE_CALL): Likewise.
14104 2018-01-23 Martin Liska <mliska@suse.cz>
14106 * tree-profile.c (tree_profiling): Print function header to
14107 aware reader which function we are working on.
14108 * value-prof.c (gimple_find_values_to_profile): Do not print
14109 not interesting value histograms.
14111 2018-01-23 Martin Liska <mliska@suse.cz>
14113 * profile-count.h (enum profile_quality): Add
14114 profile_uninitialized as the first value. Do not number values
14115 as they are zero based.
14116 (profile_count::verify): Update sanity check.
14117 (profile_probability::verify): Likewise.
14119 2018-01-23 Nathan Sidwell <nathan@acm.org>
14121 * doc/invoke.texi (ffor-scope): Deprecate.
14123 2018-01-23 David Malcolm <dmalcolm@redhat.com>
14125 PR tree-optimization/83510
14126 * domwalk.c (set_all_edges_as_executable): New function.
14127 (dom_walker::dom_walker): Convert bool param
14128 "skip_unreachable_blocks" to enum reachability. Move setup of
14129 edge flags to set_all_edges_as_executable and only do it when
14130 reachability is REACHABLE_BLOCKS.
14131 * domwalk.h (enum dom_walker::reachability): New enum.
14132 (dom_walker::dom_walker): Convert bool param
14133 "skip_unreachable_blocks" to enum reachability.
14134 (set_all_edges_as_executable): New decl.
14135 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
14136 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
14138 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
14139 but converting true to REACHABLE_BLOCKS.
14140 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
14142 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
14143 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
14144 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
14146 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
14147 if check_all_array_refs will be called.
14149 2018-01-23 David Malcolm <dmalcolm@redhat.com>
14151 * tree.c (selftest::test_location_wrappers): Add more test
14154 2018-01-23 David Malcolm <dmalcolm@redhat.com>
14156 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
14157 (selftest::test_bit_in_range): Likewise.
14159 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
14162 * doc/sourcebuild.texi (vect_float): Say that the selector
14163 only describes the situation when -funsafe-math-optimizations is on.
14164 (vect_float_strict): Document.
14166 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
14168 PR tree-optimization/83965
14169 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
14170 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
14171 instead of checking only for a reduction.
14172 (vect_recog_widen_sum_pattern): Likewise.
14174 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
14176 * predict.c (probably_never_executed): Only use precise profile info.
14177 (compute_function_frequency): Skip after inlining hack since we now
14178 have quality checking.
14180 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
14182 * profile-count.h (profile_probability::very_unlikely,
14183 profile_probability::unlikely, profile_probability::even): Set
14184 precision to guessed.
14186 2018-01-23 Richard Biener <rguenther@suse.de>
14188 PR tree-optimization/83963
14189 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
14190 Properly terminate dominator walk when crossing the exit edge not
14191 when visiting its source block.
14193 2018-01-23 Jakub Jelinek <jakub@redhat.com>
14196 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
14197 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
14199 2018-01-22 Jakub Jelinek <jakub@redhat.com>
14201 PR tree-optimization/83957
14202 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
14203 semicolon after for body surrounded by braces.
14205 PR tree-optimization/83081
14206 * profile-count.h (profile_probability::split): New method.
14207 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
14208 Use profile_probability::split.
14209 (do_compare_rtx_and_jump): Fix adjustment of probabilities
14210 when splitting a single conditional jump into 2.
14212 2018-01-22 David Malcolm <dmalcolm@redhat.com>
14214 PR tree-optimization/69452
14215 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
14218 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14220 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
14221 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
14222 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
14224 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14226 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
14228 * config/rl78/rl78.md (movdi): New define_expand.
14229 * config/rl78/rl78.c (rl78_split_movdi): New function.
14231 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
14234 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
14236 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
14237 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
14238 128-bit to produce an UNSPEC move to get the double word with the
14239 signbit and then a shift directly to do signbit.
14240 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
14241 implementation with a new version that just does either a direct
14242 move or a regular move. Move memory interface to separate insns.
14243 Move insns so they are next to the expander.
14244 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
14245 with signbit move. Split big and little endian case.
14246 (signbit<mode>2_dm_mem_le): Likewise.
14247 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
14248 (signbit<mode>2_dm2): Likewise.
14250 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14252 * config/rl78/rl78.md (anddi3): New define_expand.
14254 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14256 * config/rl78/rl78.md (umindi3): New define_expand.
14258 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14260 * config/rl78/rl78.md (smindi3): New define_expand.
14262 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14264 * config/rl78/rl78.md (smaxdi3): New define_expand.
14266 2018-01-22 Carl Love <cel@us.ibm.com>
14268 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
14269 LVX_V1TI): Add macro expansion.
14270 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
14271 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
14272 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
14273 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
14274 Change check to determine if the instruction is a byte reversing
14275 entry. Fix typo in comment.
14276 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
14277 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
14278 Add def_builtin calls for new builtins.
14279 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
14280 Add define_insn expansion.
14282 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14284 * config/rl78/rl78.md (umaxdi3): New define_expand.
14286 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14288 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
14289 for non-QImode registers.
14291 2018-01-22 Richard Biener <rguenther@suse.de>
14293 PR tree-optimization/83963
14294 * graphite-scop-detection.c (scop_detection::get_sese): Delay
14295 including the loop exit block.
14296 (scop_detection::merge_sese): Likewise.
14297 (scop_detection::add_scop): Do it here instead.
14299 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14301 * doc/sourcebuild.texi (arm_softfloat): Document.
14303 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
14306 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
14307 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
14308 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
14310 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14311 David Edelsohn <dje.gcc@gmail.com>
14314 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14315 Change "crset eq" to "crset 2".
14316 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14317 (*call_indirect_aix<mode>_nospec): Likewise.
14318 (*call_value_indirect_aix<mode>_nospec): Likewise.
14319 (*call_indirect_elfv2<mode>_nospec): Likewise.
14320 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
14321 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
14322 change assembly output from . to $.
14323 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14324 (indirect_jump<mode>_nospec): Change assembly output from . to $.
14325 (*tablejump<mode>_internal1_nospec): Likewise.
14327 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
14330 * config/sh/sh_optimize_sett_clrt.cc:
14331 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
14333 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
14335 PR tree-optimization/83940
14336 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
14337 offset_dt to vect_constant_def rather than vect_unknown_def_type.
14338 (vect_check_load_store_mask): Add a mask_dt_out parameter and
14339 use it to pass back the definition type.
14340 (vect_check_store_rhs): Likewise rhs_dt_out.
14341 (vect_build_gather_load_calls): Add a mask_dt argument and use
14342 it instead of a call to vect_is_simple_use.
14343 (vectorizable_store): Update calls to vect_check_load_store_mask
14344 and vect_check_store_rhs. Use the dt returned by the latter instead
14345 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
14346 instead of calls to vect_is_simple_use. Pass the scalar rather
14347 than the vector operand to vect_is_simple_use when handling
14348 second and subsequent copies of an rhs value.
14349 (vectorizable_load): Update calls to vect_check_load_store_mask
14350 and vect_build_gather_load_calls. Use the cached mask_dt and
14351 gs_info.offset_dt instead of calls to vect_is_simple_use.
14353 2018-01-20 Jakub Jelinek <jakub@redhat.com>
14355 PR middle-end/83945
14356 * tree-emutls.c: Include gimplify.h.
14357 (lower_emutls_2): New function.
14358 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
14359 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
14360 it before further processing.
14363 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
14364 UINTVAL (trueop1) instead of INTVAL (op1).
14366 2018-01-19 Jakub Jelinek <jakub@redhat.com>
14370 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
14371 INCOMING_FRAME_SP_OFFSET if not defined.
14372 (scan_trace): Add ENTRY argument. If true and
14373 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
14374 emit a note to adjust the CFA offset.
14375 (create_cfi_notes): Adjust scan_trace callers.
14376 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
14377 INCOMING_FRAME_SP_OFFSET in the CIE.
14378 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
14379 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
14381 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
14382 * doc/tm.texi: Regenerated.
14384 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14386 PR rtl-optimization/83147
14387 * lra-constraints.c (remove_inheritance_pseudos): Use
14388 lra_substitute_pseudo_within_insn.
14390 2018-01-19 Tom de Vries <tom@codesourcery.com>
14391 Cesar Philippidis <cesar@codesourcery.com>
14394 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
14396 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
14399 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
14400 spaces for function labels.
14402 2018-01-19 Martin Liska <mliska@suse.cz>
14404 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
14405 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
14406 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
14407 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
14408 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
14409 (PRED_CONST_RETURN): Change from 69 to 65.
14410 (PRED_NULL_RETURN): Change from 91 to 71.
14411 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
14412 (PRED_LOOP_GUARD): Change from 66 to 73.
14414 2018-01-19 Martin Liska <mliska@suse.cz>
14416 * predict.c (predict_insn_def): Add new assert.
14417 (struct branch_predictor): Change type to signed integer.
14418 (test_prediction_value_range): Amend test to cover
14419 PROB_UNINITIALIZED.
14420 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
14421 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
14422 (PRED_LOOP_ITERATIONS_MAX): Likewise.
14423 (PRED_LOOP_IV_COMPARE): Likewise.
14424 * predict.h (PROB_UNINITIALIZED): Define new constant.
14426 2018-01-19 Martin Liska <mliska@suse.cz>
14428 * predict.c (dump_prediction): Add new format for
14429 analyze_brprob.py script which is enabled with -details
14431 * profile-count.h (precise_p): New function.
14433 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
14435 PR tree-optimization/83922
14436 * tree-vect-loop.c (vect_verify_full_masking): Return false if
14437 there are no statements that need masking.
14438 (vect_active_double_reduction_p): New function.
14439 (vect_analyze_loop_operations): Use it when handling phis that
14440 are not in the loop header.
14442 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
14444 PR tree-optimization/83914
14445 * tree-vect-loop.c (vectorizable_induction): Don't convert
14446 init_expr or apply the peeling adjustment for inductions
14447 that are nested within the vectorized loop.
14449 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14451 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
14454 2018-01-18 Jakub Jelinek <jakub@redhat.com>
14458 * function.h (gimplify_parameters): Add gimple_seq * argument.
14459 * function.c: Include gimple.h and options.h.
14460 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
14461 for the added local temporaries if needed.
14462 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
14463 if there are any parameter cleanups, wrap whole body into a
14464 try/finally with the cleanups.
14466 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
14469 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
14470 Use GET_MODE_CLASS for scalar floating point.
14472 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
14476 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
14477 Fix call of call_cgraph_insertion_hooks.
14479 2018-01-18 Martin Sebor <msebor@redhat.com>
14481 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
14483 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
14486 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
14489 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
14492 * common.opt: (-ffile-prefix-map): New option.
14493 * opts.c (common_handle_option): Defer it.
14494 * opts-global.c (handle_common_deferred_options): Handle it.
14495 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
14496 * file-prefix-map.h: New file.
14497 (remap_debug_filename, add_debug_prefix_map): ...here.
14498 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
14499 * final.c (debug_prefix_map, add_debug_prefix_map
14500 remap_debug_filename): Move to...
14501 * file-prefix-map.c: New file.
14502 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
14503 generalize, get rid of alloca(), use strrchr() instead of strchr().
14504 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
14505 Implement in terms of add_prefix_map().
14506 (remap_macro_filename, remap_debug_filename): Implement in term of
14508 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
14509 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
14510 * dbxout.c: Include file-prefix-map.h.
14511 * varasm.c: Likewise.
14512 * vmsdbgout.c: Likewise.
14513 * xcoffout.c: Likewise.
14514 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
14515 * doc/cppopts.texi (-fmacro-prefix-map): Document.
14516 * doc/invoke.texi (-ffile-prefix-map): Document.
14517 (-fdebug-prefix-map): Update description.
14519 2018-01-18 Martin Liska <mliska@suse.cz>
14521 * config/i386/i386.c (indirect_thunk_name): Document that also
14523 (output_indirect_thunk): Document why both instructions
14524 (pause and lfence) are generated.
14526 2018-01-18 Richard Biener <rguenther@suse.de>
14528 PR tree-optimization/83887
14529 * graphite-scop-detection.c
14530 (scop_detection::get_nearest_dom_with_single_entry): Remove.
14531 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
14532 (scop_detection::merge_sese): Re-implement with a flood-fill
14533 algorithm that properly finds a SESE region if it exists.
14535 2018-01-18 Jakub Jelinek <jakub@redhat.com>
14538 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
14539 pointer_diff optimizations use view_convert instead of convert.
14541 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14543 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14544 Generate different code for -mno-speculate-indirect-jumps.
14545 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14546 (*call_indirect_aix<mode>): Disable for
14547 -mno-speculate-indirect-jumps.
14548 (*call_indirect_aix<mode>_nospec): New define_insn.
14549 (*call_value_indirect_aix<mode>): Disable for
14550 -mno-speculate-indirect-jumps.
14551 (*call_value_indirect_aix<mode>_nospec): New define_insn.
14552 (*sibcall_nonlocal_sysv<mode>): Generate different code for
14553 -mno-speculate-indirect-jumps.
14554 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14556 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14558 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
14559 long double type, set the flags for noting the default long double
14560 type, even if we don't pass or return a long double type.
14562 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
14565 * ipa-inline.c (flatten_function): Do not overwrite final inlining
14568 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
14570 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
14571 support for merge[hl].
14572 (fold_mergehl_helper): New helper function.
14573 (tree-vector-builder.h): New #include for tree_vector_builder usage.
14574 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
14575 (altivec_vmrglw_direct): Add xxmrglw insn.
14577 2018-01-17 Andrew Waterman <andrew@sifive.com>
14579 * config/riscv/riscv.c (riscv_conditional_register_usage): If
14580 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
14582 2018-01-17 David Malcolm <dmalcolm@redhat.com>
14585 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
14586 call the lto_location_cache before reading the
14587 DECL_SOURCE_LOCATION of the types.
14589 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
14590 Richard Sandiford <richard.sandiford@linaro.org>
14592 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
14593 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
14594 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
14595 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
14596 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
14598 * config/aarch64/constraints.md (aarch64_movti_operand):
14600 * config/aarch64/predicates.md (Uti): Add new constraint.
14602 2018-01-17 Carl Love <cel@us.ibm.com>
14604 * config/rs6000/vsx.md (define_expand xl_len_r,
14605 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
14606 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
14608 (define_expand, define_insn): Move the shift left from the
14609 define_insn to the define_expand for lxvl and stxvl instructions.
14610 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
14611 and XL_LEN_R definitions to PURE.
14613 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
14615 * config/i386/i386.c (indirect_thunk_name): Declare regno
14616 as unsigned int. Compare regno with INVALID_REGNUM.
14617 (output_indirect_thunk): Ditto.
14618 (output_indirect_thunk_function): Ditto.
14619 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
14620 in the call to output_indirect_thunk_function.
14622 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
14624 PR middle-end/83884
14625 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
14626 rather than the size of inner_type to determine the stack slot size
14627 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
14629 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
14632 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
14635 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
14637 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
14638 endian Linux systems to optionally enable multilibs for selecting
14639 the long double type if the user configured an explicit type.
14640 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
14641 have no long double multilibs if not defined.
14642 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
14643 warn if the user used -mabi={ieee,ibm}longdouble and we built
14644 multilibs for long double.
14645 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
14646 appropriate multilib option.
14647 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
14649 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
14650 for building long double multilibs.
14651 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
14653 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
14655 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
14658 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
14660 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
14663 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
14666 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
14669 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
14671 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
14672 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
14674 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
14676 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
14677 different rtl trees depending on TARGET_64BIT.
14678 (rs6000_gen_lvx): Likewise.
14680 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
14682 * config/visium/visium.md (nop): Tweak comment.
14683 (hazard_nop): Likewise.
14685 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14687 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
14688 -mspeculate-indirect-jumps.
14689 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
14690 for -mno-speculate-indirect-jumps.
14691 (*call_indirect_elfv2<mode>_nospec): New define_insn.
14692 (*call_value_indirect_elfv2<mode>): Disable for
14693 -mno-speculate-indirect-jumps.
14694 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
14695 (indirect_jump): Emit different RTL for
14696 -mno-speculate-indirect-jumps.
14697 (*indirect_jump<mode>): Disable for
14698 -mno-speculate-indirect-jumps.
14699 (*indirect_jump<mode>_nospec): New define_insn.
14700 (tablejump): Emit different RTL for
14701 -mno-speculate-indirect-jumps.
14702 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
14703 (tablejumpsi_nospec): New define_expand.
14704 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
14705 (tablejumpdi_nospec): New define_expand.
14706 (*tablejump<mode>_internal1): Disable for
14707 -mno-speculate-indirect-jumps.
14708 (*tablejump<mode>_internal1_nospec): New define_insn.
14709 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
14712 2018-01-16 Artyom Skrobov tyomitch@gmail.com
14714 * caller-save.c (insert_save): Drop unnecessary parameter. All
14717 2018-01-16 Jakub Jelinek <jakub@redhat.com>
14718 Richard Biener <rguenth@suse.de>
14721 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
14722 return early, inline manually is_gimple_sizepos. Make sure if we
14723 call gimplify_expr we don't end up with a gimple constant.
14724 * tree.c (variably_modified_type_p): Don't return true for
14725 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
14726 * gimplify.h (is_gimple_sizepos): Remove.
14728 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
14730 PR tree-optimization/83857
14731 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
14732 vectorizable_live_operation for pure SLP statements.
14733 (vectorizable_live_operation): Handle PHIs.
14735 2018-01-16 Richard Biener <rguenther@suse.de>
14737 PR tree-optimization/83867
14738 * tree-vect-stmts.c (vect_transform_stmt): Precompute
14739 nested_in_vect_loop_p since the scalar stmt may get invalidated.
14741 2018-01-16 Jakub Jelinek <jakub@redhat.com>
14744 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
14745 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
14746 If off is not INTEGER_CST, issue a may not be aligned warning
14747 rather than isn't aligned. Use isn%'t rather than isn't.
14748 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
14750 <case MULT_EXPR>: Improve the case when bottom and one of the
14751 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
14752 operand, in that case check if the other operand is multiple of
14753 bottom divided by the INTEGER_CST operand.
14755 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
14758 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
14759 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
14760 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
14761 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
14762 * config/pa/pa.c (pa_function_arg_advance): Likewise.
14763 (pa_function_arg, pa_arg_partial_bytes): Likewise.
14764 (pa_function_arg_size): New function.
14766 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
14768 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
14769 in a separate statement.
14771 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
14773 PR tree-optimization/83847
14774 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
14775 group gathers and scatters.
14777 2018-01-16 Jakub Jelinek <jakub@redhat.com>
14779 PR rtl-optimization/86620
14780 * params.def (max-sched-ready-insns): Bump minimum value to 1.
14782 PR rtl-optimization/83213
14783 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
14784 to last if both are JUMP_INSNs.
14786 PR tree-optimization/83843
14787 * gimple-ssa-store-merging.c
14788 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
14789 store_immediate_info for bswap/nop orig_stores.
14791 2018-01-15 Andrew Waterman <andrew@sifive.com>
14793 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
14795 <UDIV>: Increase cost if !TARGET_DIV.
14797 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
14799 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
14800 (define_attr "cr_logical_3op"): New.
14801 (cceq_ior_compare): Adjust.
14802 (cceq_ior_compare_complement): Adjust.
14803 (*cceq_rev_compare): Adjust.
14804 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
14805 (is_cracked_insn): Adjust.
14806 (insn_must_be_first_in_group): Adjust.
14807 * config/rs6000/40x.md: Adjust.
14808 * config/rs6000/440.md: Adjust.
14809 * config/rs6000/476.md: Adjust.
14810 * config/rs6000/601.md: Adjust.
14811 * config/rs6000/603.md: Adjust.
14812 * config/rs6000/6xx.md: Adjust.
14813 * config/rs6000/7450.md: Adjust.
14814 * config/rs6000/7xx.md: Adjust.
14815 * config/rs6000/8540.md: Adjust.
14816 * config/rs6000/cell.md: Adjust.
14817 * config/rs6000/e300c2c3.md: Adjust.
14818 * config/rs6000/e500mc.md: Adjust.
14819 * config/rs6000/e500mc64.md: Adjust.
14820 * config/rs6000/e5500.md: Adjust.
14821 * config/rs6000/e6500.md: Adjust.
14822 * config/rs6000/mpc.md: Adjust.
14823 * config/rs6000/power4.md: Adjust.
14824 * config/rs6000/power5.md: Adjust.
14825 * config/rs6000/power6.md: Adjust.
14826 * config/rs6000/power7.md: Adjust.
14827 * config/rs6000/power8.md: Adjust.
14828 * config/rs6000/power9.md: Adjust.
14829 * config/rs6000/rs64.md: Adjust.
14830 * config/rs6000/titan.md: Adjust.
14832 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
14834 * config/i386/predicates.md (indirect_branch_operand): Rewrite
14835 ix86_indirect_branch_register logic.
14837 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
14839 * config/i386/constraints.md (Bs): Update
14840 ix86_indirect_branch_register check. Don't check
14841 ix86_indirect_branch_register with GOT_memory_operand.
14843 * config/i386/predicates.md (GOT_memory_operand): Don't check
14844 ix86_indirect_branch_register here.
14845 (GOT32_symbol_operand): Likewise.
14847 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
14849 * config/i386/predicates.md (constant_call_address_operand):
14850 Rewrite ix86_indirect_branch_register logic.
14851 (sibcall_insn_operand): Likewise.
14853 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
14855 * config/i386/constraints.md (Bs): Replace
14856 ix86_indirect_branch_thunk_register with
14857 ix86_indirect_branch_register.
14859 * config/i386/i386.md (indirect_jump): Likewise.
14860 (tablejump): Likewise.
14861 (*sibcall_memory): Likewise.
14862 (*sibcall_value_memory): Likewise.
14863 Peepholes of indirect call and jump via memory: Likewise.
14864 * config/i386/i386.opt: Likewise.
14865 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14866 (GOT_memory_operand): Likewise.
14867 (call_insn_operand): Likewise.
14868 (sibcall_insn_operand): Likewise.
14869 (GOT32_symbol_operand): Likewise.
14871 2018-01-15 Jakub Jelinek <jakub@redhat.com>
14873 PR middle-end/83837
14874 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
14875 type rather than type addr's type points to.
14876 (expand_omp_atomic_mutex): Likewise.
14877 (expand_omp_atomic): Likewise.
14879 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
14882 * config/i386/i386.c (output_indirect_thunk_function): Use
14883 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
14884 for __x86_return_thunk.
14886 2018-01-15 Richard Biener <rguenther@suse.de>
14888 PR middle-end/83850
14889 * expmed.c (extract_bit_field_1): Fix typo.
14891 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14894 * config/arm/iterators.md (VF): New mode iterator.
14895 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
14896 Remove integer-related logic from pattern.
14897 (neon_vabd<mode>_3): Likewise.
14899 2018-01-15 Jakub Jelinek <jakub@redhat.com>
14901 PR middle-end/82694
14902 * common.opt (fstrict-overflow): No longer an alias.
14903 (fwrapv-pointer): New option.
14904 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
14905 also for pointer types based on flag_wrapv_pointer.
14906 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
14907 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
14908 opts->x_flag_wrapv got set.
14909 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
14910 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
14911 POINTER_TYPE_OVERFLOW_UNDEFINED.
14912 * match.pd: Likewise in address comparison pattern.
14913 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
14915 2018-01-15 Richard Biener <rguenther@suse.de>
14918 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
14919 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
14920 Reset type names to their identifier if their TYPE_DECL doesn't
14921 have linkage (and thus is used for ODR and devirt).
14922 (save_debug_info_for_decl): Remove.
14923 (save_debug_info_for_type): Likewise.
14924 (add_tree_to_fld_list): Adjust.
14925 * tree-pretty-print.c (dump_generic_node): Make dumping of
14926 type names more robust.
14928 2018-01-15 Richard Biener <rguenther@suse.de>
14930 * BASE-VER: Bump to 8.0.1.
14932 2018-01-14 Martin Sebor <msebor@redhat.com>
14935 * builtins.c (check_access): Avoid warning when the no-warning bit
14938 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
14940 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
14941 * ira-color (allocno_hard_regs_compare): Likewise.
14943 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
14946 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
14947 Use .pushsection/.popsection.
14949 2018-01-14 Martin Sebor <msebor@redhat.com>
14952 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
14954 2018-01-14 Jakub Jelinek <jakub@redhat.com>
14956 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
14957 entry from extra_headers.
14958 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
14959 extra_headers, make the list bitwise identical to the i?86-*-* one.
14961 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
14963 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
14964 -mcmodel=large with -mindirect-branch=thunk,
14965 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
14966 -mfunction-return=thunk-extern.
14967 * doc/invoke.texi: Document -mcmodel=large is incompatible with
14968 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
14969 -mfunction-return=thunk and -mfunction-return=thunk-extern.
14971 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
14973 * config/i386/i386.c (print_reg): Print the name of the full
14974 integer register without '%'.
14975 (ix86_print_operand): Handle 'V'.
14976 * doc/extend.texi: Document 'V' modifier.
14978 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
14980 * config/i386/constraints.md (Bs): Disallow memory operand for
14981 -mindirect-branch-register.
14983 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14984 (GOT_memory_operand): Likewise.
14985 (call_insn_operand): Likewise.
14986 (sibcall_insn_operand): Likewise.
14987 (GOT32_symbol_operand): Likewise.
14988 * config/i386/i386.md (indirect_jump): Call convert_memory_address
14989 for -mindirect-branch-register.
14990 (tablejump): Likewise.
14991 (*sibcall_memory): Likewise.
14992 (*sibcall_value_memory): Likewise.
14993 Disallow peepholes of indirect call and jump via memory for
14994 -mindirect-branch-register.
14995 (*call_pop): Replace m with Bw.
14996 (*call_value_pop): Likewise.
14997 (*sibcall_pop_memory): Replace m with Bs.
14998 * config/i386/i386.opt (mindirect-branch-register): New option.
14999 * doc/invoke.texi: Document -mindirect-branch-register option.
15001 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15003 * config/i386/i386-protos.h (ix86_output_function_return): New.
15004 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
15005 set function_return_type.
15006 (indirect_thunk_name): Add ret_p to indicate thunk for function
15008 (output_indirect_thunk_function): Pass false to
15009 indirect_thunk_name.
15010 (ix86_output_indirect_branch_via_reg): Likewise.
15011 (ix86_output_indirect_branch_via_push): Likewise.
15012 (output_indirect_thunk_function): Create alias for function
15013 return thunk if regno < 0.
15014 (ix86_output_function_return): New function.
15015 (ix86_handle_fndecl_attribute): Handle function_return.
15016 (ix86_attribute_table): Add function_return.
15017 * config/i386/i386.h (machine_function): Add
15018 function_return_type.
15019 * config/i386/i386.md (simple_return_internal): Use
15020 ix86_output_function_return.
15021 (simple_return_internal_long): Likewise.
15022 * config/i386/i386.opt (mfunction-return=): New option.
15023 (indirect_branch): Mention -mfunction-return=.
15024 * doc/extend.texi: Document function_return function attribute.
15025 * doc/invoke.texi: Document -mfunction-return= option.
15027 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15029 * config/i386/i386-opts.h (indirect_branch): New.
15030 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
15031 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
15032 with local indirect jump when converting indirect call and jump.
15033 (ix86_set_indirect_branch_type): New.
15034 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
15035 (indirectlabelno): New.
15036 (indirect_thunk_needed): Likewise.
15037 (indirect_thunk_bnd_needed): Likewise.
15038 (indirect_thunks_used): Likewise.
15039 (indirect_thunks_bnd_used): Likewise.
15040 (INDIRECT_LABEL): Likewise.
15041 (indirect_thunk_name): Likewise.
15042 (output_indirect_thunk): Likewise.
15043 (output_indirect_thunk_function): Likewise.
15044 (ix86_output_indirect_branch_via_reg): Likewise.
15045 (ix86_output_indirect_branch_via_push): Likewise.
15046 (ix86_output_indirect_branch): Likewise.
15047 (ix86_output_indirect_jmp): Likewise.
15048 (ix86_code_end): Call output_indirect_thunk_function if needed.
15049 (ix86_output_call_insn): Call ix86_output_indirect_branch if
15051 (ix86_handle_fndecl_attribute): Handle indirect_branch.
15052 (ix86_attribute_table): Add indirect_branch.
15053 * config/i386/i386.h (machine_function): Add indirect_branch_type
15054 and has_local_indirect_jump.
15055 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
15057 (tablejump): Likewise.
15058 (*indirect_jump): Use ix86_output_indirect_jmp.
15059 (*tablejump_1): Likewise.
15060 (simple_return_indirect_internal): Likewise.
15061 * config/i386/i386.opt (mindirect-branch=): New option.
15062 (indirect_branch): New.
15065 (thunk-inline): Likewise.
15066 (thunk-extern): Likewise.
15067 * doc/extend.texi: Document indirect_branch function attribute.
15068 * doc/invoke.texi: Document -mindirect-branch= option.
15070 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
15073 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
15075 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
15077 * ipa-inline.c (want_inline_small_function_p): Return false if
15078 inlining has already failed with CIF_FINAL_ERROR.
15079 (update_caller_keys): Call want_inline_small_function_p before
15081 (update_callee_keys): Likewise.
15083 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
15085 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
15087 (rs6000_quadword_masked_address_p): Likewise.
15088 (quad_aligned_load_p): Likewise.
15089 (quad_aligned_store_p): Likewise.
15090 (const_load_sequence_p): Add comment to describe the outer-most loop.
15091 (mimic_memory_attributes_and_flags): New function.
15092 (rs6000_gen_stvx): Likewise.
15093 (replace_swapped_aligned_store): Likewise.
15094 (rs6000_gen_lvx): Likewise.
15095 (replace_swapped_aligned_load): Likewise.
15096 (replace_swapped_load_constant): Capitalize argument name in
15097 comment describing this function.
15098 (rs6000_analyze_swaps): Add a third pass to search for vector loads
15099 and stores that access quad-word aligned addresses and replace
15100 with stvx or lvx instructions when appropriate.
15101 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
15102 New function prototype.
15103 (rs6000_quadword_masked_address_p): Likewise.
15104 (rs6000_gen_lvx): Likewise.
15105 (rs6000_gen_stvx): Likewise.
15106 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
15107 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
15108 when memory address is aligned.
15109 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
15110 this split to select lvx instruction when memory address is aligned.
15111 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
15112 instruction when memory address is aligned.
15113 (*vsx_le_perm_load_v16qi): Likewise.
15114 (four unnamed splitters): Modify to select the stvx instruction
15115 when memory is aligned.
15117 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
15119 * predict.c (determine_unlikely_bbs): Handle correctly BBs
15120 which appears in the queue multiple times.
15122 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15123 Alan Hayward <alan.hayward@arm.com>
15124 David Sherwood <david.sherwood@arm.com>
15126 * tree-vectorizer.h (vec_lower_bound): New structure.
15127 (_loop_vec_info): Add check_nonzero and lower_bounds.
15128 (LOOP_VINFO_CHECK_NONZERO): New macro.
15129 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
15130 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
15131 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
15132 fields. Make seg_len the distance travelled, not including the
15134 (dr_direction_indicator): Declare.
15135 (dr_zero_step_indicator): Likewise.
15136 (dr_known_forward_stride_p): Likewise.
15137 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
15139 (runtime_alias_check_p): Allow runtime alias checks with
15141 (operator ==): Compare access_size and align.
15142 (prune_runtime_alias_test_list): Rework for new distinction between
15143 the access_size and seg_len.
15144 (create_intersect_range_checks_index): Likewise. Cope with polynomial
15146 (get_segment_min_max): New function.
15147 (create_intersect_range_checks): Use it.
15148 (dr_step_indicator): New function.
15149 (dr_direction_indicator): Likewise.
15150 (dr_zero_step_indicator): Likewise.
15151 (dr_known_forward_stride_p): Likewise.
15152 * tree-loop-distribution.c (data_ref_segment_size): Return
15153 DR_STEP * (niters - 1).
15154 (compute_alias_check_pairs): Update call to the dr_with_seg_len
15156 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
15157 (vect_preserves_scalar_order_p): New function, split out from...
15158 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
15159 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
15160 (vect_vfa_access_size): New function.
15161 (vect_vfa_align): Likewise.
15162 (vect_compile_time_alias): Take access_size_a and access_b arguments.
15163 (dump_lower_bound): New function.
15164 (vect_check_lower_bound): Likewise.
15165 (vect_small_gap_p): Likewise.
15166 (vectorizable_with_step_bound_p): Likewise.
15167 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
15168 depencies if the vectorization factor is 1. Convert the checks
15169 for nonzero steps into checks on the bounds of DR_STEP. Try using
15170 a bunds check for variable steps if the minimum required step is
15171 relatively small. Update calls to the dr_with_seg_len
15172 constructor and to vect_compile_time_alias.
15173 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
15175 (vect_loop_versioning): Call it.
15176 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
15178 (vect_estimate_min_profitable_iters): Account for any bounds checks.
15180 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15181 Alan Hayward <alan.hayward@arm.com>
15182 David Sherwood <david.sherwood@arm.com>
15184 * doc/sourcebuild.texi (vect_scatter_store): Document.
15185 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
15187 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
15189 * genopinit.c (main): Add supports_vec_scatter_store and
15190 supports_vec_scatter_store_cached to target_optabs.
15191 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
15192 IFN_MASK_SCATTER_STORE.
15193 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
15195 * internal-fn.h (internal_store_fn_p): Declare.
15196 (internal_fn_stored_value_index): Likewise.
15197 * internal-fn.c (scatter_store_direct): New macro.
15198 (expand_scatter_store_optab_fn): New function.
15199 (direct_scatter_store_optab_supported_p): New macro.
15200 (internal_store_fn_p): New function.
15201 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
15202 IFN_MASK_SCATTER_STORE.
15203 (internal_fn_mask_index): Likewise.
15204 (internal_fn_stored_value_index): New function.
15205 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
15206 for scatter stores.
15207 * optabs-query.h (supports_vec_scatter_store_p): Declare.
15208 * optabs-query.c (supports_vec_scatter_store_p): New function.
15209 * tree-vectorizer.h (vect_get_store_rhs): Declare.
15210 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
15211 true for scatter stores.
15212 (vect_gather_scatter_fn_p): Handle scatter stores too.
15213 (vect_check_gather_scatter): Consider using scatter stores if
15214 supports_vec_scatter_store_p.
15215 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
15216 scatter stores too.
15217 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15218 internal_fn_stored_value_index.
15219 (check_load_store_masking): Handle scatter stores too.
15220 (vect_get_store_rhs): Make public.
15221 (vectorizable_call): Use internal_store_fn_p.
15222 (vectorizable_store): Handle scatter store internal functions.
15223 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
15224 when deciding whether the end of the group has been reached.
15225 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
15226 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
15227 (mask_scatter_store<mode>): New insns.
15229 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15230 Alan Hayward <alan.hayward@arm.com>
15231 David Sherwood <david.sherwood@arm.com>
15233 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
15234 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
15235 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
15237 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
15238 Use vect_truncate_gather_scatter_offset if we can't treat the
15239 operation as a normal gather load or scatter store.
15240 (get_group_load_store_type): Take the gather_scatter_info
15241 as argument. Try using a gather load or scatter store for
15242 single-element groups.
15243 (get_load_store_type): Update calls to get_group_load_store_type
15244 and vect_use_strided_gather_scatters_p.
15246 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15247 Alan Hayward <alan.hayward@arm.com>
15248 David Sherwood <david.sherwood@arm.com>
15250 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
15251 optional tree argument.
15252 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
15254 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
15255 but continue to use the current value as a fallback.
15256 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
15257 to compare the updates.
15258 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
15259 (get_load_store_type): Use it when handling a strided access.
15260 (vect_get_strided_load_store_ops): New function.
15261 (vect_get_data_ptr_increment): Likewise.
15262 (vectorizable_load): Handle strided gather loads. Always pass
15263 a step to vect_create_data_ref_ptr and bump_vector_ptr.
15265 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15266 Alan Hayward <alan.hayward@arm.com>
15267 David Sherwood <david.sherwood@arm.com>
15269 * doc/md.texi (gather_load@var{m}): Document.
15270 (mask_gather_load@var{m}): Likewise.
15271 * genopinit.c (main): Add supports_vec_gather_load and
15272 supports_vec_gather_load_cached to target_optabs.
15273 * optabs-tree.c (init_tree_optimization_optabs): Use
15274 ggc_cleared_alloc to allocate target_optabs.
15275 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
15276 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
15278 * internal-fn.h (internal_load_fn_p): Declare.
15279 (internal_gather_scatter_fn_p): Likewise.
15280 (internal_fn_mask_index): Likewise.
15281 (internal_gather_scatter_fn_supported_p): Likewise.
15282 * internal-fn.c (gather_load_direct): New macro.
15283 (expand_gather_load_optab_fn): New function.
15284 (direct_gather_load_optab_supported_p): New macro.
15285 (direct_internal_fn_optab): New function.
15286 (internal_load_fn_p): Likewise.
15287 (internal_gather_scatter_fn_p): Likewise.
15288 (internal_fn_mask_index): Likewise.
15289 (internal_gather_scatter_fn_supported_p): Likewise.
15290 * optabs-query.c (supports_at_least_one_mode_p): New function.
15291 (supports_vec_gather_load_p): Likewise.
15292 * optabs-query.h (supports_vec_gather_load_p): Declare.
15293 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
15294 and memory_type field.
15295 (NUM_PATTERNS): Bump to 15.
15296 * tree-vect-data-refs.c: Include internal-fn.h.
15297 (vect_gather_scatter_fn_p): New function.
15298 (vect_describe_gather_scatter_call): Likewise.
15299 (vect_check_gather_scatter): Try using internal functions for
15300 gather loads. Recognize existing calls to a gather load function.
15301 (vect_analyze_data_refs): Consider using gather loads if
15302 supports_vec_gather_load_p.
15303 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
15304 (vect_get_gather_scatter_offset_type): Likewise.
15305 (vect_convert_mask_for_vectype): Likewise.
15306 (vect_add_conversion_to_patterm): Likewise.
15307 (vect_try_gather_scatter_pattern): Likewise.
15308 (vect_recog_gather_scatter_pattern): New pattern recognizer.
15309 (vect_vect_recog_func_ptrs): Add it.
15310 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15311 internal_fn_mask_index and internal_gather_scatter_fn_p.
15312 (check_load_store_masking): Take the gather_scatter_info as an
15313 argument and handle gather loads.
15314 (vect_get_gather_scatter_ops): New function.
15315 (vectorizable_call): Check internal_load_fn_p.
15316 (vectorizable_load): Likewise. Handle gather load internal
15318 (vectorizable_store): Update call to check_load_store_masking.
15319 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
15320 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
15321 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
15322 (aarch64_gather_scale_operand_d): New predicates.
15323 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
15324 (mask_gather_load<mode>): New insns.
15326 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15327 Alan Hayward <alan.hayward@arm.com>
15328 David Sherwood <david.sherwood@arm.com>
15330 * optabs.def (fold_left_plus_optab): New optab.
15331 * doc/md.texi (fold_left_plus_@var{m}): Document.
15332 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
15333 * internal-fn.c (fold_left_direct): Define.
15334 (expand_fold_left_optab_fn): Likewise.
15335 (direct_fold_left_optab_supported_p): Likewise.
15336 * fold-const-call.c (fold_const_fold_left): New function.
15337 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
15338 * tree-parloops.c (valid_reduction_p): New function.
15339 (gather_scalar_reductions): Use it.
15340 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
15341 (vect_finish_replace_stmt): Declare.
15342 * tree-vect-loop.c (fold_left_reduction_fn): New function.
15343 (needs_fold_left_reduction_p): New function, split out from...
15344 (vect_is_simple_reduction): ...here. Accept reductions that
15345 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
15346 (vect_force_simple_reduction): Also store the reduction type in
15347 the assignment's STMT_VINFO_REDUC_TYPE.
15348 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
15349 (merge_with_identity): New function.
15350 (vect_expand_fold_left): Likewise.
15351 (vectorize_fold_left_reduction): Likewise.
15352 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
15353 scalar phi in place for it. Check for target support and reject
15354 cases that would reassociate the operation. Defer the transform
15355 phase to vectorize_fold_left_reduction.
15356 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
15357 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
15358 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
15360 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15362 * tree-if-conv.c (predicate_mem_writes): Remove redundant
15363 call to ifc_temp_var.
15365 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15366 Alan Hayward <alan.hayward@arm.com>
15367 David Sherwood <david.sherwood@arm.com>
15369 * target.def (legitimize_address_displacement): Take the original
15370 offset as a poly_int.
15371 * targhooks.h (default_legitimize_address_displacement): Update
15373 * targhooks.c (default_legitimize_address_displacement): Likewise.
15374 * doc/tm.texi: Regenerate.
15375 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
15376 as an argument, moving assert of ad->disp == ad->disp_term to...
15377 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
15378 Try calling targetm.legitimize_address_displacement before expanding
15379 the address rather than afterwards, and adjust for the new interface.
15380 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
15381 Match the new hook interface. Handle SVE addresses.
15382 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
15383 new hook interface.
15385 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15387 * Makefile.in (OBJS): Add early-remat.o.
15388 * target.def (select_early_remat_modes): New hook.
15389 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
15390 * doc/tm.texi: Regenerate.
15391 * targhooks.h (default_select_early_remat_modes): Declare.
15392 * targhooks.c (default_select_early_remat_modes): New function.
15393 * timevar.def (TV_EARLY_REMAT): New timevar.
15394 * passes.def (pass_early_remat): New pass.
15395 * tree-pass.h (make_pass_early_remat): Declare.
15396 * early-remat.c: New file.
15397 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
15399 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
15401 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15402 Alan Hayward <alan.hayward@arm.com>
15403 David Sherwood <david.sherwood@arm.com>
15405 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
15406 vfm1 with a bound_epilog parameter.
15407 (vect_do_peeling): Update calls accordingly, and move the prologue
15408 call earlier in the function. Treat the base bound_epilog as 0 for
15409 fully-masked loops and retain vf - 1 for other loops. Add 1 to
15410 this base when peeling for gaps.
15411 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
15412 with fully-masked loops.
15413 (vect_estimate_min_profitable_iters): Handle the single peeled
15414 iteration in that case.
15416 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15417 Alan Hayward <alan.hayward@arm.com>
15418 David Sherwood <david.sherwood@arm.com>
15420 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
15421 single-element interleaving even if the size is not a power of 2.
15422 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
15423 accesses for single-element interleaving if the group size is
15426 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15427 Alan Hayward <alan.hayward@arm.com>
15428 David Sherwood <david.sherwood@arm.com>
15430 * doc/md.texi (fold_extract_last_@var{m}): Document.
15431 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
15432 * optabs.def (fold_extract_last_optab): New optab.
15433 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
15434 * internal-fn.c (fold_extract_direct): New macro.
15435 (expand_fold_extract_optab_fn): Likewise.
15436 (direct_fold_extract_optab_supported_p): Likewise.
15437 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
15438 * tree-vect-loop.c (vect_model_reduction_cost): Handle
15439 EXTRACT_LAST_REDUCTION.
15440 (get_initial_def_for_reduction): Do not create an initial vector
15441 for EXTRACT_LAST_REDUCTION reductions.
15442 (vectorizable_reduction): Leave the scalar phi in place for
15443 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
15444 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
15445 epilogue code for EXTRACT_LAST_REDUCTION and defer the
15446 transform phase to vectorizable_condition.
15447 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
15449 (vect_finish_stmt_generation): ...here.
15450 (vect_finish_replace_stmt): New function.
15451 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
15452 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
15454 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
15456 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15457 Alan Hayward <alan.hayward@arm.com>
15458 David Sherwood <david.sherwood@arm.com>
15460 * doc/md.texi (extract_last_@var{m}): Document.
15461 * optabs.def (extract_last_optab): New optab.
15462 * internal-fn.def (EXTRACT_LAST): New internal function.
15463 * internal-fn.c (cond_unary_direct): New macro.
15464 (expand_cond_unary_optab_fn): Likewise.
15465 (direct_cond_unary_optab_supported_p): Likewise.
15466 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
15467 loops using EXTRACT_LAST.
15468 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
15469 (extract_last_<mode>): ...this optab.
15470 (vec_extract<mode><Vel>): Update accordingly.
15472 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15473 Alan Hayward <alan.hayward@arm.com>
15474 David Sherwood <david.sherwood@arm.com>
15476 * target.def (empty_mask_is_expensive): New hook.
15477 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
15478 * doc/tm.texi: Regenerate.
15479 * targhooks.h (default_empty_mask_is_expensive): Declare.
15480 * targhooks.c (default_empty_mask_is_expensive): New function.
15481 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
15482 if the target says that empty masks are expensive.
15483 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
15485 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
15487 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15488 Alan Hayward <alan.hayward@arm.com>
15489 David Sherwood <david.sherwood@arm.com>
15491 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
15492 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
15493 (vect_use_loop_mask_for_alignment_p): New function.
15494 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
15495 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
15496 niters_skip argument. Make sure that the first niters_skip elements
15497 of the first iteration are inactive.
15498 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
15499 Update call to vect_set_loop_masks_directly.
15500 (get_misalign_in_elems): New function, split out from...
15501 (vect_gen_prolog_loop_niters): ...here.
15502 (vect_update_init_of_dr): Take a code argument that specifies whether
15503 the adjustment should be added or subtracted.
15504 (vect_update_init_of_drs): Likewise.
15505 (vect_prepare_for_masked_peels): New function.
15506 (vect_do_peeling): Skip prologue peeling if we're using a mask
15507 instead. Update call to vect_update_inits_of_drs.
15508 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15510 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
15511 alignment. Do not include the number of peeled iterations in
15512 the minimum threshold in that case.
15513 (vectorizable_induction): Adjust the start value down by
15514 LOOP_VINFO_MASK_SKIP_NITERS iterations.
15515 (vect_transform_loop): Call vect_prepare_for_masked_peels.
15516 Take the number of skipped iterations into account when calculating
15518 * tree-vect-stmts.c (vect_gen_while_not): New function.
15520 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15521 Alan Hayward <alan.hayward@arm.com>
15522 David Sherwood <david.sherwood@arm.com>
15524 * doc/sourcebuild.texi (vect_fully_masked): Document.
15525 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
15526 default value to 0.
15527 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
15529 (vect_analyze_loop_2): ...here. Don't check the vectorization
15530 factor against the number of loop iterations if the loop is
15533 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15534 Alan Hayward <alan.hayward@arm.com>
15535 David Sherwood <david.sherwood@arm.com>
15537 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
15538 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
15539 (dump_groups): Update accordingly.
15540 (iv_use::mem_type): New member variable.
15541 (address_p): New function.
15542 (record_use): Add a mem_type argument and initialize the new
15544 (record_group_use): Add a mem_type argument. Use address_p.
15545 Remove obsolete null checks of base_object. Update call to record_use.
15546 (find_interesting_uses_op): Update call to record_group_use.
15547 (find_interesting_uses_cond): Likewise.
15548 (find_interesting_uses_address): Likewise.
15549 (get_mem_type_for_internal_fn): New function.
15550 (find_address_like_use): Likewise.
15551 (find_interesting_uses_stmt): Try find_address_like_use before
15552 calling find_interesting_uses_op.
15553 (addr_offset_valid_p): Use the iv mem_type field as the type
15554 of the addressed memory.
15555 (add_autoinc_candidates): Likewise.
15556 (get_address_cost): Likewise.
15557 (split_small_address_groups_p): Use address_p.
15558 (split_address_groups): Likewise.
15559 (add_iv_candidate_for_use): Likewise.
15560 (autoinc_possible_for_pair): Likewise.
15561 (rewrite_groups): Likewise.
15562 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
15563 (determine_group_iv_cost): Update after split of USE_ADDRESS.
15564 (get_alias_ptr_type_for_ptr_address): New function.
15565 (rewrite_use_address): Rewrite address uses in calls that were
15566 identified by find_address_like_use.
15568 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15569 Alan Hayward <alan.hayward@arm.com>
15570 David Sherwood <david.sherwood@arm.com>
15572 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
15574 * gimple-expr.h (is_gimple_addressable: Likewise.
15575 * gimple-expr.c (is_gimple_address): Likewise.
15576 * internal-fn.c (expand_call_mem_ref): New function.
15577 (expand_mask_load_optab_fn): Use it.
15578 (expand_mask_store_optab_fn): Likewise.
15580 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15581 Alan Hayward <alan.hayward@arm.com>
15582 David Sherwood <david.sherwood@arm.com>
15584 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
15585 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
15586 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
15587 (cond_umax@var{mode}): Document.
15588 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
15589 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
15590 (cond_umin_optab, cond_umax_optab): New optabs.
15591 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
15592 (COND_IOR, COND_XOR): New internal functions.
15593 * internal-fn.h (get_conditional_internal_fn): Declare.
15594 * internal-fn.c (cond_binary_direct): New macro.
15595 (expand_cond_binary_optab_fn): Likewise.
15596 (direct_cond_binary_optab_supported_p): Likewise.
15597 (get_conditional_internal_fn): New function.
15598 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
15599 Cope with reduction statements that are vectorized as calls rather
15601 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
15602 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
15603 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
15604 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
15605 (UNSPEC_COND_EOR): New unspecs.
15606 (optab): Add mappings for them.
15607 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
15608 (sve_int_op, sve_fp_op): New int attributes.
15610 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15611 Alan Hayward <alan.hayward@arm.com>
15612 David Sherwood <david.sherwood@arm.com>
15614 * optabs.def (while_ult_optab): New optab.
15615 * doc/md.texi (while_ult@var{m}@var{n}): Document.
15616 * internal-fn.def (WHILE_ULT): New internal function.
15617 * internal-fn.h (direct_internal_fn_supported_p): New override
15618 that takes two types as argument.
15619 * internal-fn.c (while_direct): New macro.
15620 (expand_while_optab_fn): New function.
15621 (convert_optab_supported_p): Likewise.
15622 (direct_while_optab_supported_p): New macro.
15623 * wide-int.h (wi::udiv_ceil): New function.
15624 * tree-vectorizer.h (rgroup_masks): New structure.
15625 (vec_loop_masks): New typedef.
15626 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
15627 and fully_masked_p.
15628 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
15629 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
15630 (vect_max_vf): New function.
15631 (slpeel_make_loop_iterate_ntimes): Delete.
15632 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
15633 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
15634 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
15635 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
15636 internal-fn.h, stor-layout.h and optabs-query.h.
15637 (vect_set_loop_mask): New function.
15638 (add_preheader_seq): Likewise.
15639 (add_header_seq): Likewise.
15640 (interleave_supported_p): Likewise.
15641 (vect_maybe_permute_loop_masks): Likewise.
15642 (vect_set_loop_masks_directly): Likewise.
15643 (vect_set_loop_condition_masked): Likewise.
15644 (vect_set_loop_condition_unmasked): New function, split out from
15645 slpeel_make_loop_iterate_ntimes.
15646 (slpeel_make_loop_iterate_ntimes): Rename to..
15647 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
15648 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
15649 (vect_do_peeling): Update call accordingly.
15650 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
15652 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15653 mask_compare_type, can_fully_mask_p and fully_masked_p.
15654 (release_vec_loop_masks): New function.
15655 (_loop_vec_info): Use it to free the loop masks.
15656 (can_produce_all_loop_masks_p): New function.
15657 (vect_get_max_nscalars_per_iter): Likewise.
15658 (vect_verify_full_masking): Likewise.
15659 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
15660 retries, and free the mask rgroups before retrying. Check loop-wide
15661 reasons for disallowing fully-masked loops. Make the final decision
15662 about whether use a fully-masked loop or not.
15663 (vect_estimate_min_profitable_iters): Do not assume that peeling
15664 for the number of iterations will be needed for fully-masked loops.
15665 (vectorizable_reduction): Disable fully-masked loops.
15666 (vectorizable_live_operation): Likewise.
15667 (vect_halve_mask_nunits): New function.
15668 (vect_double_mask_nunits): Likewise.
15669 (vect_record_loop_mask): Likewise.
15670 (vect_get_loop_mask): Likewise.
15671 (vect_transform_loop): Handle the case in which the final loop
15672 iteration might handle a partial vector. Call vect_set_loop_condition
15673 instead of slpeel_make_loop_iterate_ntimes.
15674 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
15675 (check_load_store_masking): New function.
15676 (prepare_load_store_mask): Likewise.
15677 (vectorizable_store): Handle fully-masked loops.
15678 (vectorizable_load): Likewise.
15679 (supportable_widening_operation): Use vect_halve_mask_nunits for
15681 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
15682 (vect_gen_while): New function.
15683 * config/aarch64/aarch64.md (umax<mode>3): New expander.
15684 (aarch64_uqdec<mode>): New insn.
15686 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15687 Alan Hayward <alan.hayward@arm.com>
15688 David Sherwood <david.sherwood@arm.com>
15690 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
15691 (reduc_xor_scal_optab): New optabs.
15692 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
15693 (reduc_xor_scal_@var{m}): Document.
15694 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
15695 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
15696 internal functions.
15697 * fold-const-call.c (fold_const_call): Handle them.
15698 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
15699 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
15700 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
15701 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
15702 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
15703 (UNSPEC_XORV): New unspecs.
15704 (optab): Add entries for them.
15705 (BITWISEV): New int iterator.
15706 (bit_reduc_op): New int attributes.
15708 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15709 Alan Hayward <alan.hayward@arm.com>
15710 David Sherwood <david.sherwood@arm.com>
15712 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
15713 * internal-fn.def (VEC_SHL_INSERT): New internal function.
15714 * optabs.def (vec_shl_insert_optab): New optab.
15715 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
15716 (duplicate_and_interleave): Likewise.
15717 * tree-vect-loop.c: Include internal-fn.h.
15718 (neutral_op_for_slp_reduction): New function, split out from
15719 get_initial_defs_for_reduction.
15720 (get_initial_def_for_reduction): Handle option 2 for variable-length
15721 vectors by loading the neutral value into a vector and then shifting
15722 the initial value into element 0.
15723 (get_initial_defs_for_reduction): Replace the code argument with
15724 the neutral value calculated by neutral_op_for_slp_reduction.
15725 Use gimple_build_vector for constant-length vectors.
15726 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
15727 but the first group_size elements have a neutral value.
15728 Use duplicate_and_interleave otherwise.
15729 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
15730 Update call to get_initial_defs_for_reduction. Handle SLP
15731 reductions for variable-length vectors by creating one vector
15732 result for each scalar result, with the elements associated
15733 with other scalar results stubbed out with the neutral value.
15734 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
15735 Require IFN_VEC_SHL_INSERT for double reductions on
15736 variable-length vectors, or SLP reductions that have
15737 a neutral value. Require can_duplicate_and_interleave_p
15738 support for variable-length unchained SLP reductions if there
15739 is no neutral value, such as for MIN/MAX reductions. Also require
15740 the number of vector elements to be a multiple of the number of
15741 SLP statements when doing variable-length unchained SLP reductions.
15742 Update call to vect_create_epilog_for_reduction.
15743 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
15744 and remove initial values.
15745 (duplicate_and_interleave): Make public.
15746 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
15747 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
15749 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15750 Alan Hayward <alan.hayward@arm.com>
15751 David Sherwood <david.sherwood@arm.com>
15753 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
15754 (can_duplicate_and_interleave_p): New function.
15755 (vect_get_and_check_slp_defs): Take the vector of statements
15756 rather than just the current one. Remove excess parentheses.
15757 Restriction rejectinon of vect_constant_def and vect_external_def
15758 for variable-length vectors to boolean types, or types for which
15759 can_duplicate_and_interleave_p is false.
15760 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
15761 (duplicate_and_interleave): New function.
15762 (vect_get_constant_vectors): Use gimple_build_vector for
15763 constant-length vectors and suitable variable-length constant
15764 vectors. Use duplicate_and_interleave for other variable-length
15765 vectors. Don't defer the update when inserting new statements.
15767 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15768 Alan Hayward <alan.hayward@arm.com>
15769 David Sherwood <david.sherwood@arm.com>
15771 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
15772 min_profitable_iters doesn't go negative.
15774 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15775 Alan Hayward <alan.hayward@arm.com>
15776 David Sherwood <david.sherwood@arm.com>
15778 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
15779 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
15780 * optabs.def (vec_mask_load_lanes_optab): New optab.
15781 (vec_mask_store_lanes_optab): Likewise.
15782 * internal-fn.def (MASK_LOAD_LANES): New internal function.
15783 (MASK_STORE_LANES): Likewise.
15784 * internal-fn.c (mask_load_lanes_direct): New macro.
15785 (mask_store_lanes_direct): Likewise.
15786 (expand_mask_load_optab_fn): Handle masked operations.
15787 (expand_mask_load_lanes_optab_fn): New macro.
15788 (expand_mask_store_optab_fn): Handle masked operations.
15789 (expand_mask_store_lanes_optab_fn): New macro.
15790 (direct_mask_load_lanes_optab_supported_p): Likewise.
15791 (direct_mask_store_lanes_optab_supported_p): Likewise.
15792 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
15794 (vect_load_lanes_supported): Likewise.
15795 * tree-vect-data-refs.c (strip_conversion): New function.
15796 (can_group_stmts_p): Likewise.
15797 (vect_analyze_data_ref_accesses): Use it instead of checking
15798 for a pair of assignments.
15799 (vect_store_lanes_supported): Take a masked_p parameter.
15800 (vect_load_lanes_supported): Likewise.
15801 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
15802 vect_store_lanes_supported and vect_load_lanes_supported.
15803 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
15804 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
15805 parameter. Don't allow gaps for masked accesses.
15806 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
15807 and vect_load_lanes_supported.
15808 (get_load_store_type): Take a masked_p parameter and update
15809 call to get_group_load_store_type.
15810 (vectorizable_store): Update call to get_load_store_type.
15811 Handle IFN_MASK_STORE_LANES.
15812 (vectorizable_load): Update call to get_load_store_type.
15813 Handle IFN_MASK_LOAD_LANES.
15815 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15816 Alan Hayward <alan.hayward@arm.com>
15817 David Sherwood <david.sherwood@arm.com>
15819 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
15821 * config/aarch64/aarch64-protos.h
15822 (aarch64_sve_struct_memory_operand_p): Declare.
15823 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
15824 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
15825 (VPRED, vpred): Handle SVE structure modes.
15826 * config/aarch64/constraints.md (Utx): New constraint.
15827 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
15828 (aarch64_sve_struct_nonimmediate_operand): New predicates.
15829 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
15830 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
15831 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
15832 structure modes. Split into pieces after RA.
15833 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
15834 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
15836 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
15837 SVE structure modes.
15838 (aarch64_classify_address): Likewise.
15839 (sizetochar): Move earlier in file.
15840 (aarch64_print_operand): Handle SVE register lists.
15841 (aarch64_array_mode): New function.
15842 (aarch64_sve_struct_memory_operand_p): Likewise.
15843 (TARGET_ARRAY_MODE): Redefine.
15845 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15846 Alan Hayward <alan.hayward@arm.com>
15847 David Sherwood <david.sherwood@arm.com>
15849 * target.def (array_mode): New target hook.
15850 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
15851 * doc/tm.texi: Regenerate.
15852 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
15853 * hooks.c (hook_optmode_mode_uhwi_none): New function.
15854 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
15855 targetm.array_mode.
15856 * stor-layout.c (mode_for_array): Likewise. Support polynomial
15859 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15860 Alan Hayward <alan.hayward@arm.com>
15861 David Sherwood <david.sherwood@arm.com>
15863 * fold-const.c (fold_binary_loc): Check the argument types
15864 rather than the result type when testing for a vector operation.
15866 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15868 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
15869 * doc/tm.texi: Regenerate.
15871 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15872 Alan Hayward <alan.hayward@arm.com>
15873 David Sherwood <david.sherwood@arm.com>
15875 * doc/invoke.texi (-msve-vector-bits=): Document new option.
15876 (sve): Document new AArch64 extension.
15877 * doc/md.texi (w): Extend the description of the AArch64
15878 constraint to include SVE vectors.
15879 (Upl, Upa): Document new AArch64 predicate constraints.
15880 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
15882 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
15883 (msve-vector-bits=): New option.
15884 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
15885 SVE when these are disabled.
15886 (sve): New extension.
15887 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
15888 modes. Adjust their number of units based on aarch64_sve_vg.
15889 (MAX_BITSIZE_MODE_ANY_MODE): Define.
15890 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
15891 aarch64_addr_query_type.
15892 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
15893 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
15894 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
15895 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
15896 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
15897 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
15898 (aarch64_simd_imm_zero_p): Delete.
15899 (aarch64_check_zero_based_sve_index_immediate): Declare.
15900 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
15901 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
15902 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
15903 (aarch64_sve_float_mul_immediate_p): Likewise.
15904 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
15905 rather than an rtx.
15906 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
15907 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
15908 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
15909 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
15910 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
15911 (aarch64_regmode_natural_size): Likewise.
15912 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
15913 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
15915 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
15916 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
15917 for VG and the SVE predicate registers.
15918 (V_ALIASES): Add a "z"-prefixed alias.
15919 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
15920 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
15921 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
15922 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
15923 (REG_CLASS_NAMES): Add entries for them.
15924 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
15925 and the predicate registers.
15926 (aarch64_sve_vg): Declare.
15927 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
15928 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
15929 (REGMODE_NATURAL_SIZE): Define.
15930 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
15932 * config/aarch64/aarch64.c: Include cfgrtl.h.
15933 (simd_immediate_info): Add a constructor for series vectors,
15934 and an associated step field.
15935 (aarch64_sve_vg): New variable.
15936 (aarch64_dbx_register_number): Handle VG and the predicate registers.
15937 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
15938 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
15939 (VEC_ANY_DATA, VEC_STRUCT): New constants.
15940 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
15941 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
15942 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
15943 (aarch64_get_mask_mode): New functions.
15944 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
15945 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
15946 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
15947 predicate modes and predicate registers. Explicitly restrict
15948 GPRs to modes of 16 bytes or smaller. Only allow FP registers
15949 to store a vector mode if it is recognized by
15950 aarch64_classify_vector_mode.
15951 (aarch64_regmode_natural_size): New function.
15952 (aarch64_hard_regno_caller_save_mode): Return the original mode
15954 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
15955 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
15956 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
15957 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
15959 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
15960 does not overlap dest if the function is frame-related. Handle
15962 (aarch64_split_add_offset): New function.
15963 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
15964 them aarch64_add_offset.
15965 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
15966 and update call to aarch64_sub_sp.
15967 (aarch64_add_cfa_expression): New function.
15968 (aarch64_expand_prologue): Pass extra temporary registers to the
15969 functions above. Handle the case in which we need to emit new
15970 DW_CFA_expressions for registers that were originally saved
15971 relative to the stack pointer, but now have to be expressed
15972 relative to the frame pointer.
15973 (aarch64_output_mi_thunk): Pass extra temporary registers to the
15975 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
15976 IP0 and IP1 values for SVE frames.
15977 (aarch64_expand_vec_series): New function.
15978 (aarch64_expand_sve_widened_duplicate): Likewise.
15979 (aarch64_expand_sve_const_vector): Likewise.
15980 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
15981 Handle SVE constants. Use emit_move_insn to move a force_const_mem
15982 into the register, rather than emitting a SET directly.
15983 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
15984 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
15985 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
15986 (offset_9bit_signed_scaled_p): New functions.
15987 (aarch64_replicate_bitmask_imm): New function.
15988 (aarch64_bitmask_imm): Use it.
15989 (aarch64_cannot_force_const_mem): Reject expressions involving
15990 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
15991 (aarch64_classify_index): Handle SVE indices, by requiring
15992 a plain register index with a scale that matches the element size.
15993 (aarch64_classify_address): Handle SVE addresses. Assert that
15994 the mode of the address is VOIDmode or an integer mode.
15995 Update call to aarch64_classify_symbol.
15996 (aarch64_classify_symbolic_expression): Update call to
15997 aarch64_classify_symbol.
15998 (aarch64_const_vec_all_in_range_p): New function.
15999 (aarch64_print_vector_float_operand): Likewise.
16000 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
16001 "vN" for FP registers with SVE modes. Handle (const ...) vectors
16002 and the FP immediates 1.0 and 0.5.
16003 (aarch64_print_address_internal): Handle SVE addresses.
16004 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
16005 (aarch64_regno_regclass): Handle predicate registers.
16006 (aarch64_secondary_reload): Handle big-endian reloads of SVE
16008 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
16009 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
16010 (aarch64_convert_sve_vector_bits): New function.
16011 (aarch64_override_options): Use it to handle -msve-vector-bits=.
16012 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
16013 rather than an rtx.
16014 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
16015 Handle SVE vector and predicate modes. Accept VL-based constants
16016 that need only one temporary register, and VL offsets that require
16017 no temporary registers.
16018 (aarch64_conditional_register_usage): Mark the predicate registers
16019 as fixed if SVE isn't available.
16020 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
16021 Return true for SVE vector and predicate modes.
16022 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
16023 rather than an unsigned int. Handle SVE modes.
16024 (aarch64_preferred_simd_mode): Update call accordingly. Handle
16026 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
16028 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
16029 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
16030 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
16031 (aarch64_sve_float_mul_immediate_p): New functions.
16032 (aarch64_sve_valid_immediate): New function.
16033 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
16034 Explicitly reject structure modes. Check for INDEX constants.
16035 Handle PTRUE and PFALSE constants.
16036 (aarch64_check_zero_based_sve_index_immediate): New function.
16037 (aarch64_simd_imm_zero_p): Delete.
16038 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
16039 vector modes. Accept constants in the range of CNT[BHWD].
16040 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
16041 ask for an Advanced SIMD mode.
16042 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
16043 (aarch64_simd_vector_alignment): Handle SVE predicates.
16044 (aarch64_vectorize_preferred_vector_alignment): New function.
16045 (aarch64_simd_vector_alignment_reachable): Use it instead of
16047 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
16048 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
16050 (MAX_VECT_LEN): Delete.
16051 (expand_vec_perm_d): Add a vec_flags field.
16052 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
16053 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
16054 (aarch64_evpc_ext): Don't apply a big-endian lane correction
16056 (aarch64_evpc_rev): Rename to...
16057 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
16058 (aarch64_evpc_rev_global): New function.
16059 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
16060 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
16062 (aarch64_evpc_sve_tbl): New function.
16063 (aarch64_expand_vec_perm_const_1): Update after rename of
16064 aarch64_evpc_rev. Handle SVE permutes too, trying
16065 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
16066 than aarch64_evpc_tbl.
16067 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
16068 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
16069 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
16070 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
16071 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
16072 (aarch64_expand_sve_vcond): New functions.
16073 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
16074 of aarch64_vector_mode_p.
16075 (aarch64_dwarf_poly_indeterminate_value): New function.
16076 (aarch64_compute_pressure_classes): Likewise.
16077 (aarch64_can_change_mode_class): Likewise.
16078 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
16079 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
16080 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
16081 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
16082 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
16083 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
16084 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
16085 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
16087 (Dn, Dl, Dr): Accept const as well as const_vector.
16088 (Dz): Likewise. Compare against CONST0_RTX.
16089 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
16090 of "vector" where appropriate.
16091 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
16092 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
16093 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
16094 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
16095 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
16096 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
16097 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
16098 (v_int_equiv): Extend to SVE modes.
16099 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
16101 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
16102 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
16103 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
16104 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
16105 (SVE_COND_FP_CMP): New int iterators.
16106 (perm_hilo): Handle the new unpack unspecs.
16107 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
16109 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
16110 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
16111 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
16112 (aarch64_equality_operator, aarch64_constant_vector_operand)
16113 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
16114 (aarch64_sve_nonimmediate_operand): Likewise.
16115 (aarch64_sve_general_operand): Likewise.
16116 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
16117 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
16118 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
16119 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
16120 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
16121 (aarch64_sve_float_arith_immediate): Likewise.
16122 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
16123 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
16124 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
16125 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
16126 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
16127 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
16128 (aarch64_sve_float_arith_operand): Likewise.
16129 (aarch64_sve_float_arith_with_sub_operand): Likewise.
16130 (aarch64_sve_float_mul_operand): Likewise.
16131 (aarch64_sve_vec_perm_operand): Likewise.
16132 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
16133 (aarch64_mov_operand): Accept const_poly_int and const_vector.
16134 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
16135 as well as const_vector.
16136 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
16137 in file. Use CONST0_RTX and CONSTM1_RTX.
16138 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
16139 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
16140 Use aarch64_simd_imm_zero.
16141 * config/aarch64/aarch64-sve.md: New file.
16142 * config/aarch64/aarch64.md: Include it.
16143 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
16144 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
16145 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
16146 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
16147 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
16148 (sve): New attribute.
16149 (enabled): Disable instructions with the sve attribute unless
16151 (movqi, movhi): Pass CONST_POLY_INT operaneds through
16152 aarch64_expand_mov_immediate.
16153 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
16154 CNT[BHSD] immediates.
16155 (movti): Split CONST_POLY_INT moves into two halves.
16156 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
16157 Split additions that need a temporary here if the destination
16158 is the stack pointer.
16159 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
16160 (*add<mode>3_poly_1): New instruction.
16161 (set_clobber_cc): New expander.
16163 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16165 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
16166 parameter and use it instead of GET_MODE_SIZE (innermode). Use
16167 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
16168 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
16169 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
16170 Change innermode from fixed_mode_size to machine_mode.
16171 (simplify_subreg): Update call accordingly. Handle a constant-sized
16172 subreg of a variable-length CONST_VECTOR.
16174 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16175 Alan Hayward <alan.hayward@arm.com>
16176 David Sherwood <david.sherwood@arm.com>
16178 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
16179 (add_offset_to_base): New function, split out from...
16180 (create_mem_ref): ...here. When handling a scale other than 1,
16181 check first whether the address is valid without the offset.
16182 Add it into the base if so, leaving the index and scale as-is.
16184 2018-01-12 Jakub Jelinek <jakub@redhat.com>
16187 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
16188 fold_for_warn before checking if arg2 is INTEGER_CST.
16190 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
16192 * config/rs6000/predicates.md (load_multiple_operation): Delete.
16193 (store_multiple_operation): Delete.
16194 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
16195 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
16196 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
16197 guarded by TARGET_STRING.
16198 (rs6000_output_load_multiple): Delete.
16199 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
16200 OPTION_MASK_STRING / TARGET_STRING handling.
16201 (print_operand) <'N', 'O'>: Add comment that these are unused now.
16202 (const rs6000_opt_masks) <"string">: Change mask to 0.
16203 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
16204 (MASK_STRING): Delete.
16205 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
16207 (load_multiple): Delete.
16214 (store_multiple): Delete.
16221 (movmemsi_8reg): Delete.
16222 (corresponding unnamed define_insn): Delete.
16223 (movmemsi_6reg): Delete.
16224 (corresponding unnamed define_insn): Delete.
16225 (movmemsi_4reg): Delete.
16226 (corresponding unnamed define_insn): Delete.
16227 (movmemsi_2reg): Delete.
16228 (corresponding unnamed define_insn): Delete.
16229 (movmemsi_1reg): Delete.
16230 (corresponding unnamed define_insn): Delete.
16231 * config/rs6000/rs6000.opt (mno-string): New.
16232 (mstring): Replace by deprecation warning stub.
16233 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
16235 2018-01-12 Jakub Jelinek <jakub@redhat.com>
16237 * regrename.c (regrename_do_replace): If replacing the same
16238 reg multiple times, try to reuse last created gen_raw_REG.
16241 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
16242 main to workaround a bug in GDB.
16244 2018-01-12 Tom de Vries <tom@codesourcery.com>
16247 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
16249 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
16251 PR rtl-optimization/80481
16252 * ira-color.c (get_cap_member): New function.
16253 (allocnos_conflict_by_live_ranges_p): Use it.
16254 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
16255 (setup_slot_coalesced_allocno_live_ranges): Ditto.
16257 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
16260 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
16261 (*saddl_se_1): Ditto.
16262 (*ssubsi_1): Ditto.
16263 (*ssubl_se_1): Ditto.
16265 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
16267 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
16268 rather than wi::to_widest for DR_INITs.
16269 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
16270 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
16271 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
16273 (vect_analyze_group_access_1): Note that here.
16275 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
16277 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
16278 polynomial type sizes.
16280 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
16282 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
16283 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
16284 (gimple_add_tmp_var): Likewise.
16286 2018-01-12 Martin Liska <mliska@suse.cz>
16288 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
16289 (gimple_alloc_sizes): Likewise.
16290 (dump_gimple_statistics): Use PRIu64 in printf format.
16291 * gimple.h: Change uint64_t to int.
16293 2018-01-12 Martin Liska <mliska@suse.cz>
16295 * tree-core.h: Use uint64_t instead of int.
16296 * tree.c (tree_node_counts): Likewise.
16297 (tree_node_sizes): Likewise.
16298 (dump_tree_statistics): Use PRIu64 in printf format.
16300 2018-01-12 Martin Liska <mliska@suse.cz>
16302 * Makefile.in: As qsort_chk is implemented in vec.c, add
16303 vec.o to linkage of gencfn-macros.
16304 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
16305 passing the info to record_node_allocation_statistics.
16306 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
16308 * ggc-common.c (struct ggc_usage): Add operator== and use
16309 it in operator< and compare function.
16310 * mem-stats.h (struct mem_usage): Likewise.
16311 * vec.c (struct vec_usage): Remove operator< and compare
16312 function. Can be simply inherited.
16314 2018-01-12 Martin Jambor <mjambor@suse.cz>
16317 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
16318 * tree-ssa-math-opts.c: Include domwalk.h.
16319 (convert_mult_to_fma_1): New function.
16320 (fma_transformation_info): New type.
16321 (fma_deferring_state): Likewise.
16322 (cancel_fma_deferring): New function.
16323 (result_of_phi): Likewise.
16324 (last_fma_candidate_feeds_initial_phi): Likewise.
16325 (convert_mult_to_fma): Added deferring logic, split actual
16326 transformation to convert_mult_to_fma_1.
16327 (math_opts_dom_walker): New type.
16328 (math_opts_dom_walker::after_dom_children): New method, body moved
16329 here from pass_optimize_widening_mul::execute, added deferring logic
16331 (pass_optimize_widening_mul::execute): Moved most of code to
16332 math_opts_dom_walker::after_dom_children.
16333 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
16334 * config/i386/i386.c (ix86_option_override_internal): Added
16335 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
16337 2018-01-12 Richard Biener <rguenther@suse.de>
16340 * dwarf2out.c (gen_variable_die): Do not reset old_die for
16341 inline instance vars.
16343 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
16346 * config/rx/rx.c (rx_is_restricted_memory_address):
16347 Handle SUBREG case.
16349 2018-01-12 Richard Biener <rguenther@suse.de>
16351 PR tree-optimization/80846
16352 * target.def (split_reduction): New target hook.
16353 * targhooks.c (default_split_reduction): New function.
16354 * targhooks.h (default_split_reduction): Declare.
16355 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
16356 target requests first reduce vectors by combining low and high
16358 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
16359 (get_vectype_for_scalar_type_and_size): Export.
16360 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
16361 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
16362 * doc/tm.texi: Regenerate.
16363 * config/i386/i386.c (ix86_split_reduction): Implement
16364 TARGET_VECTORIZE_SPLIT_REDUCTION.
16366 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16369 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
16370 in PIC mode except for TARGET_VXWORKS_RTP.
16371 * config/sparc/sparc.c: Include cfgrtl.h.
16372 (TARGET_INIT_PIC_REG): Define.
16373 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
16374 (sparc_pic_register_p): New predicate.
16375 (sparc_legitimate_address_p): Use it.
16376 (sparc_legitimize_pic_address): Likewise.
16377 (sparc_delegitimize_address): Likewise.
16378 (sparc_mode_dependent_address_p): Likewise.
16379 (gen_load_pcrel_sym): Remove 4th parameter.
16380 (load_got_register): Adjust call to above. Remove obsolete stuff.
16381 (sparc_expand_prologue): Do not call load_got_register here.
16382 (sparc_flat_expand_prologue): Likewise.
16383 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
16384 (sparc_use_pseudo_pic_reg): New function.
16385 (sparc_init_pic_reg): Likewise.
16386 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16387 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
16389 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
16391 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
16392 Add item for branch_cost.
16394 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16396 PR rtl-optimization/83565
16397 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
16398 not extend the result to a larger mode for rotate operations.
16399 (num_sign_bit_copies1): Likewise.
16401 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16404 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
16406 Use values-Xc.o for -pedantic.
16407 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
16409 2018-01-12 Martin Liska <mliska@suse.cz>
16412 * ipa-devirt.c (final_warning_record::grow_type_warnings):
16414 (possible_polymorphic_call_targets): Use it.
16415 (ipa_devirt): Likewise.
16417 2018-01-12 Martin Liska <mliska@suse.cz>
16419 * profile-count.h (enum profile_quality): Use 0 as invalid
16420 enum value of profile_quality.
16422 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
16424 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
16425 -mext-string options.
16427 2018-01-12 Richard Biener <rguenther@suse.de>
16429 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
16430 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
16431 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
16433 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
16435 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
16437 * configure.ac (--with-long-double-format): Add support for the
16438 configuration option to change the default long double format on
16440 * config.gcc (powerpc*-linux*-*): Likewise.
16441 * configure: Regenerate.
16442 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
16443 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
16444 used without modification.
16446 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16448 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
16449 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
16450 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
16451 MISC_BUILTIN_SPEC_BARRIER.
16452 (rs6000_init_builtins): Likewise.
16453 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
16455 (speculation_barrier): New define_insn.
16456 * doc/extend.texi: Document __builtin_speculation_barrier.
16458 2018-01-11 Jakub Jelinek <jakub@redhat.com>
16461 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
16462 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
16463 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
16465 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
16466 integral modes instead of "ss" and "sd".
16467 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
16468 vectors with 32-bit and 64-bit elements.
16469 (vecdupssescalarmodesuffix): New mode attribute.
16470 (vec_dup<mode>): Use it.
16472 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
16475 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
16476 frame if argument is passed on stack.
16478 2018-01-11 Jakub Jelinek <jakub@redhat.com>
16481 * ree.c (combine_reaching_defs): Optimize also
16482 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
16483 reg2=any_extend(exp); reg1=reg2;, formatting fix.
16485 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
16487 PR middle-end/83189
16488 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
16490 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
16492 PR middle-end/83718
16493 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
16494 after they are computed.
16496 2018-01-11 Bin Cheng <bin.cheng@arm.com>
16498 PR tree-optimization/83695
16499 * gimple-loop-linterchange.cc
16500 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
16501 reset cached scev information after interchange.
16502 (pass_linterchange::execute): Remove call to scev_reset_htab.
16504 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16506 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
16507 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
16508 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
16509 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
16510 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
16511 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
16512 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
16513 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
16514 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
16515 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
16516 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
16517 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
16518 (V_lane_reg): Likewise.
16519 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
16521 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
16522 (vfmal_lane_low<mode>_intrinsic,
16523 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
16524 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
16525 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
16526 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
16527 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
16528 vfmsl_lane_high<mode>_intrinsic): New define_insns.
16530 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16532 * config/arm/arm-cpus.in (fp16fml): New feature.
16533 (ALL_SIMD): Add fp16fml.
16534 (armv8.2-a): Add fp16fml as an option.
16535 (armv8.3-a): Likewise.
16536 (armv8.4-a): Add fp16fml as part of fp16.
16537 * config/arm/arm.h (TARGET_FP16FML): Define.
16538 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
16540 * config/arm/arm-modes.def (V2HF): Define.
16541 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
16542 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
16543 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
16544 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
16545 vfmsl_low, vfmsl_high): New set of builtins.
16546 * config/arm/iterators.md (PLUSMINUS): New code iterator.
16547 (vfml_op): New code attribute.
16548 (VFMLHALVES): New int iterator.
16549 (VFML, VFMLSEL): New mode attributes.
16550 (V_reg): Define mapping for V2HF.
16551 (V_hi, V_lo): New mode attributes.
16552 (VF_constraint): Likewise.
16553 (vfml_half, vfml_half_selector): New int attributes.
16554 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
16556 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
16557 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
16559 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
16560 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
16561 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
16562 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
16564 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
16565 Document new effective target and option set.
16567 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16569 * config/arm/arm-cpus.in (armv8_4): New feature.
16570 (ARMv8_4a): New fgroup.
16571 (armv8.4-a): New arch.
16572 * config/arm/arm-tables.opt: Regenerate.
16573 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
16574 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
16575 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
16576 Add matching rules for -march=armv8.4-a and extensions.
16577 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
16579 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
16582 * config/rx/rx.md (BW): New mode attribute.
16583 (sync_lock_test_and_setsi): Add mode suffix to insn output.
16585 2018-01-11 Richard Biener <rguenther@suse.de>
16587 PR tree-optimization/83435
16588 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
16589 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
16590 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
16592 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
16593 Alan Hayward <alan.hayward@arm.com>
16594 David Sherwood <david.sherwood@arm.com>
16596 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
16598 (aarch64_classify_address): Initialize it. Track polynomial offsets.
16599 (aarch64_print_address_internal): Use it to check for a zero offset.
16601 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
16602 Alan Hayward <alan.hayward@arm.com>
16603 David Sherwood <david.sherwood@arm.com>
16605 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
16606 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
16607 Return a poly_int64 rather than a HOST_WIDE_INT.
16608 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
16609 rather than a HOST_WIDE_INT.
16610 * config/aarch64/aarch64.h (aarch64_frame): Protect with
16611 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
16612 hard_fp_offset, frame_size, initial_adjust, callee_offset and
16613 final_offset from HOST_WIDE_INT to poly_int64.
16614 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
16615 to_constant when getting the number of units in an Advanced SIMD
16617 (aarch64_builtin_vectorized_function): Check for a constant number
16619 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
16621 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
16622 attribute instead of GET_MODE_NUNITS.
16623 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
16624 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
16625 GET_MODE_SIZE for fixed-size registers.
16626 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
16627 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
16628 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
16629 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
16630 (aarch64_print_operand, aarch64_print_address_internal)
16631 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
16632 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
16633 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
16634 Handle polynomial GET_MODE_SIZE.
16635 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
16636 wider than SImode without modification.
16637 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
16638 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
16639 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
16640 passing and returning SVE modes.
16641 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
16642 rather than GEN_INT.
16643 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
16644 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
16645 (aarch64_allocate_and_probe_stack_space): Likewise.
16646 (aarch64_layout_frame): Cope with polynomial offsets.
16647 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
16648 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
16649 polynomial offsets.
16650 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
16651 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
16652 poly_int64 rather than a HOST_WIDE_INT.
16653 (aarch64_get_separate_components, aarch64_process_components)
16654 (aarch64_expand_prologue, aarch64_expand_epilogue)
16655 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
16656 (aarch64_anchor_offset): New function, split out from...
16657 (aarch64_legitimize_address): ...here.
16658 (aarch64_builtin_vectorization_cost): Handle polynomial
16659 TYPE_VECTOR_SUBPARTS.
16660 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
16662 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
16663 number of elements from the PARALLEL rather than the mode.
16664 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
16665 rather than GET_MODE_BITSIZE.
16666 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
16667 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
16668 (aarch64_expand_vec_perm_const_1): Handle polynomial
16669 d->perm.length () and d->perm elements.
16670 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
16671 Apply to_constant to d->perm elements.
16672 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
16673 polynomial CONST_VECTOR_NUNITS.
16674 (aarch64_move_pointer): Take amount as a poly_int64 rather
16676 (aarch64_progress_pointer): Avoid temporary variable.
16677 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
16678 the mode attribute instead of GET_MODE.
16680 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
16681 Alan Hayward <alan.hayward@arm.com>
16682 David Sherwood <david.sherwood@arm.com>
16684 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
16685 x exists before using it.
16686 (aarch64_add_constant_internal): Rename to...
16687 (aarch64_add_offset_1): ...this. Replace regnum with separate
16688 src and dest rtxes. Handle the case in which they're different,
16689 including when the offset is zero. Replace scratchreg with an rtx.
16690 Use 2 additions if there is no spare register into which we can
16691 move a 16-bit constant.
16692 (aarch64_add_constant): Delete.
16693 (aarch64_add_offset): Replace reg with separate src and dest
16694 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
16695 Use aarch64_add_offset_1.
16696 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
16697 an rtx rather than an int. Take the delta as a poly_int64
16698 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
16699 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
16700 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
16701 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
16702 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
16703 and aarch64_add_sp.
16704 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
16705 aarch64_add_constant.
16707 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
16709 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
16710 Use scalar_float_mode.
16712 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
16714 * config/aarch64/aarch64-simd.md
16715 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
16716 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
16717 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
16718 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
16719 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
16720 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
16721 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
16722 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
16723 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
16724 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
16726 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16729 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
16730 targ_options->x_arm_arch_string is non NULL.
16732 2018-01-11 Tamar Christina <tamar.christina@arm.com>
16734 * config/aarch64/aarch64.h
16735 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
16737 2018-01-11 Sudakshina Das <sudi.das@arm.com>
16740 * expmed.c (emit_store_flag_force): Swap if const op0
16741 and change VOIDmode to mode of op0.
16743 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
16745 PR rtl-optimization/83761
16746 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
16747 than bytes to mode_for_size.
16749 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
16751 PR middle-end/83189
16752 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
16753 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
16756 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
16758 PR middle-end/83575
16759 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
16760 when in layout mode.
16761 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
16762 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
16765 2018-01-10 Michael Collison <michael.collison@arm.com>
16767 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
16768 * config/aarch64/aarch64-option-extension.def: Add
16769 AARCH64_OPT_EXTENSION of 'fp16fml'.
16770 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16771 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
16772 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
16773 * config/aarch64/constraints.md (Ui7): New constraint.
16774 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
16775 (VFMLA_SEL_W): Ditto.
16778 (VFMLA16_LOW): New int iterator.
16779 (VFMLA16_HIGH): Ditto.
16780 (UNSPEC_FMLAL): New unspec.
16781 (UNSPEC_FMLSL): Ditto.
16782 (UNSPEC_FMLAL2): Ditto.
16783 (UNSPEC_FMLSL2): Ditto.
16784 (f16mac): New code attribute.
16785 * config/aarch64/aarch64-simd-builtins.def
16786 (aarch64_fmlal_lowv2sf): Ditto.
16787 (aarch64_fmlsl_lowv2sf): Ditto.
16788 (aarch64_fmlalq_lowv4sf): Ditto.
16789 (aarch64_fmlslq_lowv4sf): Ditto.
16790 (aarch64_fmlal_highv2sf): Ditto.
16791 (aarch64_fmlsl_highv2sf): Ditto.
16792 (aarch64_fmlalq_highv4sf): Ditto.
16793 (aarch64_fmlslq_highv4sf): Ditto.
16794 (aarch64_fmlal_lane_lowv2sf): Ditto.
16795 (aarch64_fmlsl_lane_lowv2sf): Ditto.
16796 (aarch64_fmlal_laneq_lowv2sf): Ditto.
16797 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
16798 (aarch64_fmlalq_lane_lowv4sf): Ditto.
16799 (aarch64_fmlsl_lane_lowv4sf): Ditto.
16800 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
16801 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
16802 (aarch64_fmlal_lane_highv2sf): Ditto.
16803 (aarch64_fmlsl_lane_highv2sf): Ditto.
16804 (aarch64_fmlal_laneq_highv2sf): Ditto.
16805 (aarch64_fmlsl_laneq_highv2sf): Ditto.
16806 (aarch64_fmlalq_lane_highv4sf): Ditto.
16807 (aarch64_fmlsl_lane_highv4sf): Ditto.
16808 (aarch64_fmlalq_laneq_highv4sf): Ditto.
16809 (aarch64_fmlsl_laneq_highv4sf): Ditto.
16810 * config/aarch64/aarch64-simd.md:
16811 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
16812 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
16813 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
16814 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
16815 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
16816 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
16817 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
16818 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
16819 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
16820 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
16821 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
16822 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
16823 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
16824 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
16825 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
16826 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
16827 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
16828 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
16829 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
16830 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
16831 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
16832 (vfmlsl_low_u32): Ditto.
16833 (vfmlalq_low_u32): Ditto.
16834 (vfmlslq_low_u32): Ditto.
16835 (vfmlal_high_u32): Ditto.
16836 (vfmlsl_high_u32): Ditto.
16837 (vfmlalq_high_u32): Ditto.
16838 (vfmlslq_high_u32): Ditto.
16839 (vfmlal_lane_low_u32): Ditto.
16840 (vfmlsl_lane_low_u32): Ditto.
16841 (vfmlal_laneq_low_u32): Ditto.
16842 (vfmlsl_laneq_low_u32): Ditto.
16843 (vfmlalq_lane_low_u32): Ditto.
16844 (vfmlslq_lane_low_u32): Ditto.
16845 (vfmlalq_laneq_low_u32): Ditto.
16846 (vfmlslq_laneq_low_u32): Ditto.
16847 (vfmlal_lane_high_u32): Ditto.
16848 (vfmlsl_lane_high_u32): Ditto.
16849 (vfmlal_laneq_high_u32): Ditto.
16850 (vfmlsl_laneq_high_u32): Ditto.
16851 (vfmlalq_lane_high_u32): Ditto.
16852 (vfmlslq_lane_high_u32): Ditto.
16853 (vfmlalq_laneq_high_u32): Ditto.
16854 (vfmlslq_laneq_high_u32): Ditto.
16855 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
16856 (AARCH64_FL_FOR_ARCH8_4): New.
16857 (AARCH64_ISA_F16FML): New ISA flag.
16858 (TARGET_F16FML): New feature flag for fp16fml.
16859 (doc/invoke.texi): Document new fp16fml option.
16861 2018-01-10 Michael Collison <michael.collison@arm.com>
16863 * config/aarch64/aarch64-builtins.c:
16864 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
16865 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16866 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
16867 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
16868 (AARCH64_ISA_SHA3): New ISA flag.
16869 (TARGET_SHA3): New feature flag for sha3.
16870 * config/aarch64/iterators.md (sha512_op): New int attribute.
16871 (CRYPTO_SHA512): New int iterator.
16872 (UNSPEC_SHA512H): New unspec.
16873 (UNSPEC_SHA512H2): Ditto.
16874 (UNSPEC_SHA512SU0): Ditto.
16875 (UNSPEC_SHA512SU1): Ditto.
16876 * config/aarch64/aarch64-simd-builtins.def
16877 (aarch64_crypto_sha512hqv2di): New builtin.
16878 (aarch64_crypto_sha512h2qv2di): Ditto.
16879 (aarch64_crypto_sha512su0qv2di): Ditto.
16880 (aarch64_crypto_sha512su1qv2di): Ditto.
16881 (aarch64_eor3qv8hi): Ditto.
16882 (aarch64_rax1qv2di): Ditto.
16883 (aarch64_xarqv2di): Ditto.
16884 (aarch64_bcaxqv8hi): Ditto.
16885 * config/aarch64/aarch64-simd.md:
16886 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
16887 (aarch64_crypto_sha512su0qv2di): Ditto.
16888 (aarch64_crypto_sha512su1qv2di): Ditto.
16889 (aarch64_eor3qv8hi): Ditto.
16890 (aarch64_rax1qv2di): Ditto.
16891 (aarch64_xarqv2di): Ditto.
16892 (aarch64_bcaxqv8hi): Ditto.
16893 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
16894 (vsha512h2q_u64): Ditto.
16895 (vsha512su0q_u64): Ditto.
16896 (vsha512su1q_u64): Ditto.
16897 (veor3q_u16): Ditto.
16898 (vrax1q_u64): Ditto.
16899 (vxarq_u64): Ditto.
16900 (vbcaxq_u16): Ditto.
16901 * config/arm/types.md (crypto_sha512): New type attribute.
16902 (crypto_sha3): Ditto.
16903 (doc/invoke.texi): Document new sha3 option.
16905 2018-01-10 Michael Collison <michael.collison@arm.com>
16907 * config/aarch64/aarch64-builtins.c:
16908 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
16909 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16910 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
16911 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
16912 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
16913 (AARCH64_ISA_SM4): New ISA flag.
16914 (TARGET_SM4): New feature flag for sm4.
16915 * config/aarch64/aarch64-simd-builtins.def
16916 (aarch64_sm3ss1qv4si): Ditto.
16917 (aarch64_sm3tt1aq4si): Ditto.
16918 (aarch64_sm3tt1bq4si): Ditto.
16919 (aarch64_sm3tt2aq4si): Ditto.
16920 (aarch64_sm3tt2bq4si): Ditto.
16921 (aarch64_sm3partw1qv4si): Ditto.
16922 (aarch64_sm3partw2qv4si): Ditto.
16923 (aarch64_sm4eqv4si): Ditto.
16924 (aarch64_sm4ekeyqv4si): Ditto.
16925 * config/aarch64/aarch64-simd.md:
16926 (aarch64_sm3ss1qv4si): Ditto.
16927 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
16928 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
16929 (aarch64_sm4eqv4si): Ditto.
16930 (aarch64_sm4ekeyqv4si): Ditto.
16931 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
16932 (sm3part_op): Ditto.
16933 (CRYPTO_SM3TT): Ditto.
16934 (CRYPTO_SM3PART): Ditto.
16935 (UNSPEC_SM3SS1): New unspec.
16936 (UNSPEC_SM3TT1A): Ditto.
16937 (UNSPEC_SM3TT1B): Ditto.
16938 (UNSPEC_SM3TT2A): Ditto.
16939 (UNSPEC_SM3TT2B): Ditto.
16940 (UNSPEC_SM3PARTW1): Ditto.
16941 (UNSPEC_SM3PARTW2): Ditto.
16942 (UNSPEC_SM4E): Ditto.
16943 (UNSPEC_SM4EKEY): Ditto.
16944 * config/aarch64/constraints.md (Ui2): New constraint.
16945 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
16946 * config/arm/types.md (crypto_sm3): New type attribute.
16947 (crypto_sm4): Ditto.
16948 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
16949 (vsm3tt1aq_u32): Ditto.
16950 (vsm3tt1bq_u32): Ditto.
16951 (vsm3tt2aq_u32): Ditto.
16952 (vsm3tt2bq_u32): Ditto.
16953 (vsm3partw1q_u32): Ditto.
16954 (vsm3partw2q_u32): Ditto.
16955 (vsm4eq_u32): Ditto.
16956 (vsm4ekeyq_u32): Ditto.
16957 (doc/invoke.texi): Document new sm4 option.
16959 2018-01-10 Michael Collison <michael.collison@arm.com>
16961 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
16962 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
16963 (AARCH64_FL_FOR_ARCH8_4): New.
16964 (AARCH64_FL_V8_4): New flag.
16965 (doc/invoke.texi): Document new armv8.4-a option.
16967 2018-01-10 Michael Collison <michael.collison@arm.com>
16969 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16970 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
16971 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
16972 * config/aarch64/aarch64-option-extension.def: Add
16973 AARCH64_OPT_EXTENSION of 'sha2'.
16974 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
16975 (crypto): Disable sha2 and aes if crypto disabled.
16976 (crypto): Enable aes and sha2 if enabled.
16977 (simd): Disable sha2 and aes if simd disabled.
16978 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
16980 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
16981 (TARGET_SHA2): New feature flag for sha2.
16982 (TARGET_AES): New feature flag for aes.
16983 * config/aarch64/aarch64-simd.md:
16984 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
16985 conditional on TARGET_AES.
16986 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
16987 (aarch64_crypto_sha1hsi): Make pattern conditional
16989 (aarch64_crypto_sha1hv4si): Ditto.
16990 (aarch64_be_crypto_sha1hv4si): Ditto.
16991 (aarch64_crypto_sha1su1v4si): Ditto.
16992 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
16993 (aarch64_crypto_sha1su0v4si): Ditto.
16994 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
16995 (aarch64_crypto_sha256su0v4si): Ditto.
16996 (aarch64_crypto_sha256su1v4si): Ditto.
16997 (doc/invoke.texi): Document new aes and sha2 options.
16999 2018-01-10 Martin Sebor <msebor@redhat.com>
17001 PR tree-optimization/83781
17002 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
17005 2018-01-11 Martin Sebor <msebor@gmail.com>
17006 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17008 PR tree-optimization/83501
17009 PR tree-optimization/81703
17011 * tree-ssa-strlen.c (get_string_cst): Rename...
17012 (get_string_len): ...to this. Handle global constants.
17013 (handle_char_store): Adjust.
17015 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
17016 Jim Wilson <jimw@sifive.com>
17018 * config/riscv/riscv-protos.h (riscv_output_return): New.
17019 * config/riscv/riscv.c (struct machine_function): New naked_p field.
17020 (riscv_attribute_table, riscv_output_return),
17021 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
17022 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
17023 (riscv_compute_frame_info): Only compute frame->mask if not a naked
17025 (riscv_expand_prologue): Add early return for naked function.
17026 (riscv_expand_epilogue): Likewise.
17027 (riscv_function_ok_for_sibcall): Return false for naked function.
17028 (riscv_set_current_function): New.
17029 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
17030 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
17031 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
17032 * doc/extend.texi (RISC-V Function Attributes): New.
17034 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17036 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
17037 check for 128-bit long double before checking TCmode.
17038 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
17039 128-bit long doubles before checking TFmode or TCmode.
17040 (FLOAT128_IBM_P): Likewise.
17042 2018-01-10 Martin Sebor <msebor@redhat.com>
17044 PR tree-optimization/83671
17045 * builtins.c (c_strlen): Unconditionally return zero for the empty
17047 Use -Warray-bounds for warnings.
17048 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
17049 for non-constant array indices with COMPONENT_REF, arrays of
17050 arrays, and pointers to arrays.
17051 (gimple_fold_builtin_strlen): Determine and set length range for
17052 non-constant character arrays.
17054 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
17056 PR middle-end/81897
17057 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
17060 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
17062 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
17064 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
17067 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
17068 VECTOR_MEM_ALTIVEC_OR_VSX_P.
17069 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
17070 indexed_or_indirect_operand predicate.
17071 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
17072 (*vsx_le_perm_load_v8hi): Likewise.
17073 (*vsx_le_perm_load_v16qi): Likewise.
17074 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
17075 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
17076 (*vsx_le_perm_store_v8hi): Likewise.
17077 (*vsx_le_perm_store_v16qi): Likewise.
17078 (eight unnamed splitters): Likewise.
17080 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
17082 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
17083 * config/rs6000/emmintrin.h: Likewise.
17084 * config/rs6000/mmintrin.h: Likewise.
17085 * config/rs6000/xmmintrin.h: Likewise.
17087 2018-01-10 David Malcolm <dmalcolm@redhat.com>
17090 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
17092 * tree.c (tree_nop_conversion): Return true for location wrapper
17094 (maybe_wrap_with_location): New function.
17095 (selftest::check_strip_nops): New function.
17096 (selftest::test_location_wrappers): New function.
17097 (selftest::tree_c_tests): Call it.
17098 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
17099 (maybe_wrap_with_location): New decl.
17100 (EXPR_LOCATION_WRAPPER_P): New macro.
17101 (location_wrapper_p): New inline function.
17102 (tree_strip_any_location_wrapper): New inline function.
17104 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
17107 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
17108 stack_realign_offset for the largest alignment of stack slot
17110 (ix86_find_max_used_stack_alignment): New function.
17111 (ix86_finalize_stack_frame_flags): Use it. Set
17112 max_used_stack_alignment if we don't realign stack.
17113 * config/i386/i386.h (machine_function): Add
17114 max_used_stack_alignment.
17116 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
17118 * config/arm/arm.opt (-mbranch-cost): New option.
17119 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
17122 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
17125 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
17126 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
17128 2018-01-10 Richard Biener <rguenther@suse.de>
17131 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
17132 early out so it also covers the case where we have a non-NULL
17135 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
17137 PR tree-optimization/83753
17138 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
17139 for non-strided grouped accesses if the number of elements is 1.
17141 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17144 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
17145 * i386.h (TARGET_USE_GATHER): Define.
17146 * x86-tune.def (X86_TUNE_USE_GATHER): New.
17148 2018-01-10 Martin Liska <mliska@suse.cz>
17151 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
17152 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
17154 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
17155 CLEANUP_NO_PARTITIONING is not set.
17157 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
17159 * doc/rtl.texi: Remove documentation of (const ...) wrappers
17160 for vectors, as a partial revert of r254296.
17161 * rtl.h (const_vec_p): Delete.
17162 (const_vec_duplicate_p): Don't test for vector CONSTs.
17163 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
17164 * expmed.c (make_tree): Likewise.
17167 * common.md (E, F): Use CONSTANT_P instead of checking for
17169 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
17170 checking for CONST_VECTOR.
17172 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
17174 PR middle-end/83575
17175 * predict.c (force_edge_cold): Handle in more sane way edges
17176 with no prediction.
17178 2018-01-09 Carl Love <cel@us.ibm.com>
17180 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
17182 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
17183 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
17184 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
17185 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
17186 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
17187 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
17188 * config/rs6000/rs6000-protos.h: Add extern defition for
17189 rs6000_generate_float2_double_code.
17190 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
17192 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
17193 (float2_v2df): Add define_expand.
17195 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
17198 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
17199 op_mode in the force_to_mode call.
17201 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
17203 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
17204 instead of checking each element individually.
17205 (aarch64_evpc_uzp): Likewise.
17206 (aarch64_evpc_zip): Likewise.
17207 (aarch64_evpc_ext): Likewise.
17208 (aarch64_evpc_rev): Likewise.
17209 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
17210 instead of checking each element individually. Return true without
17212 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
17213 whether all selected elements come from the same input, instead of
17214 checking each element individually. Remove calls to gen_rtx_REG,
17215 start_sequence and end_sequence and instead assert that no rtl is
17218 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
17220 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
17221 order of HIGH and CONST checks.
17223 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
17225 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
17226 if the destination isn't an SSA_NAME.
17228 2018-01-09 Richard Biener <rguenther@suse.de>
17230 PR tree-optimization/83668
17231 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
17233 (canonicalize_loop_form): ... here, renamed from ...
17234 (canonicalize_loop_closed_ssa_form): ... this and amended to
17235 swap successor edges for loop exit blocks to make us use
17236 the RPO order we need for initial schedule generation.
17238 2018-01-09 Joseph Myers <joseph@codesourcery.com>
17240 PR tree-optimization/64811
17241 * match.pd: When optimizing comparisons with Inf, avoid
17242 introducing or losing exceptions from comparisons with NaN.
17244 2018-01-09 Martin Liska <mliska@suse.cz>
17247 * asan.c (shadow_mem_size): Add gcc_assert.
17249 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
17251 Don't save registers in main().
17254 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
17255 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
17256 * config/avr/avr.c (avr_set_current_function): Don't error if
17257 naked, OS_task or OS_main are specified at the same time.
17258 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
17260 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
17262 * common/config/avr/avr-common.c (avr_option_optimization_table):
17263 Switch on -mmain-is-OS_task for optimizing compilations.
17265 2018-01-09 Richard Biener <rguenther@suse.de>
17267 PR tree-optimization/83572
17268 * graphite.c: Include cfganal.h.
17269 (graphite_transform_loops): Connect infinite loops to exit
17270 and remove fake edges at the end.
17272 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
17274 * ipa-inline.c (edge_badness): Revert accidental checkin.
17276 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
17279 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
17280 symbols; not inline clones.
17282 2018-01-09 Jakub Jelinek <jakub@redhat.com>
17285 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
17286 hard registers. Formatting fixes.
17288 PR preprocessor/83722
17289 * gcc.c (try_generate_repro): Pass
17290 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
17291 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
17294 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
17295 Kito Cheng <kito.cheng@gmail.com>
17297 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
17298 (riscv_leaf_function_p): Delete.
17299 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
17301 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17303 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
17305 (do_ifelse): New function.
17306 (do_isel): New function.
17307 (do_sub3): New function.
17308 (do_add3): New function.
17309 (do_load_mask_compare): New function.
17310 (do_overlap_load_compare): New function.
17311 (expand_compare_loop): New function.
17312 (expand_block_compare): Call expand_compare_loop() when appropriate.
17313 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
17314 option description.
17315 (-mblock-compare-inline-loop-limit): New option.
17317 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17320 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
17321 Reverse order of second and third operands in first alternative.
17322 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
17323 of first and second elements in UNSPEC_VPERMR vector.
17324 (altivec_expand_vec_perm_le): Likewise.
17326 2018-01-08 Jeff Law <law@redhat.com>
17328 PR rtl-optimizatin/81308
17329 * tree-switch-conversion.c (cfg_altered): New file scoped static.
17330 (process_switch): If group_case_labels makes a change, then set
17332 (pass_convert_switch::execute): If a switch is converted, then
17333 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
17335 PR rtl-optimization/81308
17336 * recog.c (split_all_insns): Conditionally cleanup the CFG after
17339 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
17341 PR target/83663 - Revert r255946
17342 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
17343 generation for cases where splatting a value is not useful.
17344 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
17345 across a vec_duplicate and a paradoxical subreg forming a vector
17346 mode to a vec_concat.
17348 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17350 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
17351 -march=armv8.3-a variants.
17352 * config/arm/t-multilib: Likewise.
17353 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
17355 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17357 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
17359 (cceq_ior_compare_complement): Give it a name so I can use it, and
17360 change boolean_or_operator predicate to boolean_operator so it can
17361 be used to generate a crand.
17362 (eqne): New code iterator.
17363 (bd/bd_neg): New code_attrs.
17364 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
17365 a single define_insn.
17366 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
17367 decrement (bdnzt/bdnzf/bdzt/bdzf).
17368 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
17369 with the new names of the branch decrement patterns, and added the
17370 names of the branch decrement conditional patterns.
17372 2018-01-08 Richard Biener <rguenther@suse.de>
17374 PR tree-optimization/83563
17375 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
17378 2018-01-08 Richard Biener <rguenther@suse.de>
17380 PR middle-end/83713
17381 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
17383 2018-01-08 Richard Biener <rguenther@suse.de>
17385 PR tree-optimization/83685
17386 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
17387 references to abnormals.
17389 2018-01-08 Richard Biener <rguenther@suse.de>
17392 * dwarf2out.c (output_indirect_strings): Handle empty
17393 skeleton_debug_str_hash.
17394 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
17396 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
17398 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
17399 (emit_store_direct): Likewise.
17400 (arc_trampoline_adjust_address): Likewise.
17401 (arc_asm_trampoline_template): New function.
17402 (arc_initialize_trampoline): Use asm_trampoline_template.
17403 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
17404 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
17405 * config/arc/arc.md (flush_icache): Delete pattern.
17407 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
17409 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
17410 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
17413 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
17416 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
17417 by not USED_FOR_TARGET.
17418 (make_pass_resolve_sw_modes): Likewise.
17420 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
17422 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
17425 2018-01-08 Richard Biener <rguenther@suse.de>
17427 PR middle-end/83580
17428 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
17430 2018-01-08 Richard Biener <rguenther@suse.de>
17432 PR middle-end/83517
17433 * match.pd ((t * 2) / 2) -> t): Add missing :c.
17435 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
17437 PR middle-end/81897
17438 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
17439 basic blocks with a small number of successors.
17440 (convert_control_dep_chain_into_preds): Improve handling of
17442 (dump_predicates): Split apart into...
17443 (dump_pred_chain): ...here...
17444 (dump_pred_info): ...and here.
17445 (can_one_predicate_be_invalidated_p): Add debugging printfs.
17446 (can_chain_union_be_invalidated_p): Improve check for invalidation
17448 (uninit_uses_cannot_happen): Avoid unnecessary if
17449 convert_control_dep_chain_into_preds yielded nothing.
17451 2018-01-06 Martin Sebor <msebor@redhat.com>
17453 PR tree-optimization/83640
17454 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
17455 subtracting negative offset from size.
17456 (builtin_access::overlap): Adjust offset bounds of the access to fall
17457 within the size of the object if possible.
17459 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
17461 PR rtl-optimization/83699
17462 * expmed.c (extract_bit_field_1): Restrict the vector usage of
17463 extract_bit_field_as_subreg to cases in which the extracted
17464 value is also a vector.
17466 * lra-constraints.c (process_alt_operands): Test for the equivalence
17467 substitutions when detecting a possible reload cycle.
17469 2018-01-06 Jakub Jelinek <jakub@redhat.com>
17472 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
17473 by default if flag_selective_schedling{,2}. Formatting fixes.
17475 PR rtl-optimization/83682
17476 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
17477 if it has non-VECTOR_MODE element mode.
17478 (vec_duplicate_p): Likewise.
17480 PR middle-end/83694
17481 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
17482 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
17484 2018-01-05 Jakub Jelinek <jakub@redhat.com>
17487 * config/i386/i386-builtin.def
17488 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
17489 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
17490 Require also OPTION_MASK_ISA_AVX512F in addition to
17491 OPTION_MASK_ISA_GFNI.
17492 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
17493 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
17494 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
17495 to OPTION_MASK_ISA_GFNI.
17496 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
17497 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
17498 OPTION_MASK_ISA_AVX512BW.
17499 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
17500 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
17501 addition to OPTION_MASK_ISA_GFNI.
17502 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
17503 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
17504 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
17505 to OPTION_MASK_ISA_GFNI.
17506 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
17507 a requirement for all ISAs rather than any of them with a few
17509 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
17511 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
17512 bitmasks to be enabled with 3 exceptions, instead of requiring any
17513 enabled ISA with lots of exceptions.
17514 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
17515 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
17516 Change avx512bw in isa attribute to avx512f.
17517 * config/i386/sgxintrin.h: Add license boilerplate.
17518 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
17519 to __AVX512F__ and __AVX512VL to __AVX512VL__.
17520 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
17521 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
17523 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
17524 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
17525 temporarily sse2 rather than sse if not enabled already.
17528 * config/i386/sse.md (VI248_VLBW): Rename to ...
17529 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
17530 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
17531 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
17532 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
17533 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
17534 mode iterator instead of VI248_VLBW.
17536 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
17538 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
17539 (record_modified): Skip clobbers; add debug output.
17540 (param_change_prob): Use sreal frequencies.
17542 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
17544 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
17545 punt for user-aligned variables.
17547 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
17549 * tree-chrec.c (chrec_contains_symbols): Return true for
17552 2018-01-05 Sudakshina Das <sudi.das@arm.com>
17555 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
17556 of (x|y) == x for BICS pattern.
17558 2018-01-05 Jakub Jelinek <jakub@redhat.com>
17560 PR tree-optimization/83605
17561 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
17562 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
17565 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
17567 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
17568 * config/epiphany/rtems.h: New file.
17570 2018-01-04 Jakub Jelinek <jakub@redhat.com>
17571 Uros Bizjak <ubizjak@gmail.com>
17574 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
17575 QIreg_operand instead of register_operand predicate.
17576 * config/i386/i386.c (ix86_rop_should_change_byte_p,
17577 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
17578 comments instead of -fmitigate[-_]rop.
17580 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17583 * cgraphunit.c (symbol_table::compile): Switch to text_section
17584 before calling assembly_start debug hook.
17585 * run-rtl-passes.c (run_rtl_passes): Likewise.
17588 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
17590 * tree-vrp.c (extract_range_from_binary_expr_1): Check
17591 range_int_cst_p rather than !symbolic_range_p before calling
17592 extract_range_from_multiplicative_op_1.
17594 2018-01-04 Jeff Law <law@redhat.com>
17596 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
17597 redundant test in assertion.
17599 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
17601 * doc/rtl.texi: Document machine_mode wrapper classes.
17603 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
17605 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
17606 using tree_to_uhwi.
17608 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
17610 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
17611 the VEC_PERM_EXPR fold to fail.
17613 2018-01-04 Jakub Jelinek <jakub@redhat.com>
17616 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
17617 to switched_sections.
17619 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
17622 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
17623 test for d.testing.
17625 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
17628 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
17629 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
17631 2018-01-04 Jakub Jelinek <jakub@redhat.com>
17634 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
17635 is BLKmode and bitpos not zero or mode change is needed.
17637 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
17640 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
17643 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
17646 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
17647 instead of MULT rtx. Update all corresponding splitters.
17648 (*saddl_se): Ditto.
17649 (*ssub<modesuffix>): Ditto.
17650 (*ssubl_se): Ditto.
17651 (*cmp_sadd_di): Update split patterns.
17652 (*cmp_sadd_si): Ditto.
17653 (*cmp_sadd_sidi): Ditto.
17654 (*cmp_ssub_di): Ditto.
17655 (*cmp_ssub_si): Ditto.
17656 (*cmp_ssub_sidi): Ditto.
17657 * config/alpha/predicates.md (const23_operand): New predicate.
17658 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
17659 Look for ASHIFT, not MULT inner operand.
17660 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
17662 2018-01-04 Martin Liska <mliska@suse.cz>
17664 PR gcov-profile/83669
17665 * gcov.c (output_intermediate_file): Add version to intermediate
17667 * doc/gcov.texi: Document new field 'version' in intermediate
17668 file format. Fix location of '-k' option of gcov command.
17670 2018-01-04 Martin Liska <mliska@suse.cz>
17673 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
17675 2018-01-04 Jakub Jelinek <jakub@redhat.com>
17677 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
17679 2018-01-03 Martin Sebor <msebor@redhat.com>
17681 PR tree-optimization/83655
17682 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
17683 checking calls with invalid arguments.
17685 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17687 * tree-vect-stmts.c (vect_get_store_rhs): New function.
17688 (vectorizable_mask_load_store): Delete.
17689 (vectorizable_call): Return false for masked loads and stores.
17690 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
17691 instead of gimple_assign_rhs1.
17692 (vectorizable_load): Handle IFN_MASK_LOAD.
17693 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
17695 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17697 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
17699 (vectorizable_mask_load_store): ...here.
17700 (vectorizable_load): ...and here.
17702 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17704 * tree-vect-stmts.c (vect_build_all_ones_mask)
17705 (vect_build_zero_merge_argument): New functions, split out from...
17706 (vectorizable_load): ...here.
17708 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17710 * tree-vect-stmts.c (vect_check_store_rhs): New function,
17712 (vectorizable_mask_load_store): ...here.
17713 (vectorizable_store): ...and here.
17715 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17717 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
17719 (vectorizable_mask_load_store): ...here.
17721 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17723 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
17724 (vect_model_store_cost): Take a vec_load_store_type instead of a
17726 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
17727 (vect_model_store_cost): Take a vec_load_store_type instead of a
17729 (vectorizable_mask_load_store): Update accordingly.
17730 (vectorizable_store): Likewise.
17731 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
17733 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17735 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
17736 IFN_MASK_LOAD calls here rather than...
17737 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
17739 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17740 Alan Hayward <alan.hayward@arm.com>
17741 David Sherwood <david.sherwood@arm.com>
17743 * expmed.c (extract_bit_field_1): For vector extracts,
17744 fall back to extract_bit_field_as_subreg if vec_extract
17747 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17748 Alan Hayward <alan.hayward@arm.com>
17749 David Sherwood <david.sherwood@arm.com>
17751 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
17752 they are variable or constant sized.
17753 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
17754 slots for constant-sized data.
17756 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17757 Alan Hayward <alan.hayward@arm.com>
17758 David Sherwood <david.sherwood@arm.com>
17760 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
17761 handling COND_EXPRs with boolean comparisons, try to find a better
17762 basis for the mask type than the boolean itself.
17764 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17766 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
17767 is calculated and how it can be overridden.
17768 * genmodes.c (max_bitsize_mode_any_mode): New variable.
17769 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
17771 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
17774 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17775 Alan Hayward <alan.hayward@arm.com>
17776 David Sherwood <david.sherwood@arm.com>
17778 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
17779 Remove the mode argument.
17780 (aarch64_simd_valid_immediate): Remove the mode and inverse
17782 * config/aarch64/iterators.md (bitsize): New iterator.
17783 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
17784 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
17785 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
17786 aarch64_simd_valid_immediate.
17787 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
17788 (aarch64_reg_or_bic_imm): Likewise.
17789 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
17790 with an insn_type enum and msl with a modifier_type enum.
17791 Replace element_width with a scalar_mode. Change the shift
17792 to unsigned int. Add constructors for scalar_float_mode and
17793 scalar_int_mode elements.
17794 (aarch64_vect_float_const_representable_p): Delete.
17795 (aarch64_can_const_movi_rtx_p)
17796 (aarch64_simd_scalar_immediate_valid_for_move)
17797 (aarch64_simd_make_constant): Update call to
17798 aarch64_simd_valid_immediate.
17799 (aarch64_advsimd_valid_immediate_hs): New function.
17800 (aarch64_advsimd_valid_immediate): Likewise.
17801 (aarch64_simd_valid_immediate): Remove mode and inverse
17802 arguments. Rewrite to use the above. Use const_vec_duplicate_p
17803 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
17804 and aarch64_float_const_representable_p on the result.
17805 (aarch64_output_simd_mov_immediate): Remove mode argument.
17806 Update call to aarch64_simd_valid_immediate and use of
17807 simd_immediate_info.
17808 (aarch64_output_scalar_simd_mov_immediate): Update call
17811 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17812 Alan Hayward <alan.hayward@arm.com>
17813 David Sherwood <david.sherwood@arm.com>
17815 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
17816 (mode_nunits): Likewise CONST_MODE_NUNITS.
17817 * machmode.def (ADJUST_NUNITS): Document.
17818 * genmodes.c (mode_data::need_nunits_adj): New field.
17819 (blank_mode): Update accordingly.
17820 (adj_nunits): New variable.
17821 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
17823 (emit_mode_size_inline): Set need_bytesize_adj for all modes
17824 listed in adj_nunits.
17825 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
17826 listed in adj_nunits. Don't emit case statements for such modes.
17827 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
17828 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
17829 nothing if adj_nunits is nonnull.
17830 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
17831 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
17832 (emit_mode_fbit): Update use of print_maybe_const_decl.
17833 (emit_move_size): Likewise. Treat the array as non-const
17835 (emit_mode_adjustments): Handle adj_nunits.
17837 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17839 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
17840 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
17841 (VECTOR_MODES): Use it.
17842 (make_vector_modes): Take the prefix as an argument.
17844 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17845 Alan Hayward <alan.hayward@arm.com>
17846 David Sherwood <david.sherwood@arm.com>
17848 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
17849 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
17850 for MODE_VECTOR_BOOL.
17851 * machmode.def (VECTOR_BOOL_MODE): Document.
17852 * genmodes.c (VECTOR_BOOL_MODE): New macro.
17853 (make_vector_bool_mode): New function.
17854 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
17856 * lto-streamer-in.c (lto_input_mode_table): Likewise.
17857 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
17859 * stor-layout.c (int_mode_for_mode): Likewise.
17860 * tree.c (build_vector_type_for_mode): Likewise.
17861 * varasm.c (output_constant_pool_2): Likewise.
17862 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
17863 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
17864 for MODE_VECTOR_BOOL.
17865 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
17866 of mode class checks.
17867 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
17868 instead of a list of mode class checks.
17869 (expand_vector_scalar_condition): Likewise.
17870 (type_for_widest_vector_mode): Handle BImode as an inner mode.
17872 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17873 Alan Hayward <alan.hayward@arm.com>
17874 David Sherwood <david.sherwood@arm.com>
17876 * machmode.h (mode_size): Change from unsigned short to
17878 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
17879 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
17880 or if measurement_type is not polynomial.
17881 (fixed_size_mode::includes_p): Check for constant-sized modes.
17882 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
17883 return a poly_uint16 rather than an unsigned short.
17884 (emit_mode_size): Change the type of mode_size from unsigned short
17885 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
17886 (emit_mode_adjustments): Cope with polynomial vector sizes.
17887 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
17889 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
17891 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
17892 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
17893 * caller-save.c (setup_save_areas): Likewise.
17894 (replace_reg_with_saved_mem): Likewise.
17895 * calls.c (emit_library_call_value_1): Likewise.
17896 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
17897 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
17898 (gen_lowpart_for_combine): Likewise.
17899 * convert.c (convert_to_integer_1): Likewise.
17900 * cse.c (equiv_constant, cse_insn): Likewise.
17901 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
17902 (cselib_subst_to_values): Likewise.
17903 * dce.c (word_dce_process_block): Likewise.
17904 * df-problems.c (df_word_lr_mark_ref): Likewise.
17905 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
17906 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
17907 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
17908 (rtl_for_decl_location): Likewise.
17909 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
17910 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
17911 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
17912 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
17913 (expand_expr_real_1): Likewise.
17914 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
17915 (pad_below): Likewise.
17916 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
17917 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
17918 * ira.c (get_subreg_tracking_sizes): Likewise.
17919 * ira-build.c (ira_create_allocno_objects): Likewise.
17920 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
17921 (ira_sort_regnos_for_alter_reg): Likewise.
17922 * ira-costs.c (record_operand_costs): Likewise.
17923 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
17924 (resolve_simple_move): Likewise.
17925 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
17926 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
17927 (lra_constraints): Likewise.
17928 (CONST_POOL_OK_P): Reject variable-sized modes.
17929 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
17930 (add_pseudo_to_slot, lra_spill): Likewise.
17931 * omp-low.c (omp_clause_aligned_alignment): Likewise.
17932 * optabs-query.c (get_best_extraction_insn): Likewise.
17933 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
17934 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
17935 (expand_mult_highpart, valid_multiword_target_p): Likewise.
17936 * recog.c (offsettable_address_addr_space_p): Likewise.
17937 * regcprop.c (maybe_mode_change): Likewise.
17938 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
17939 * regrename.c (build_def_use): Likewise.
17940 * regstat.c (dump_reg_info): Likewise.
17941 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
17942 (find_reloads, find_reloads_subreg_address): Likewise.
17943 * reload1.c (eliminate_regs_1): Likewise.
17944 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
17945 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
17946 (simplify_binary_operation_1, simplify_subreg): Likewise.
17947 * targhooks.c (default_function_arg_padding): Likewise.
17948 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
17949 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
17950 (verify_gimple_assign_ternary): Likewise.
17951 * tree-inline.c (estimate_move_cost): Likewise.
17952 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17953 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
17954 (get_address_cost_ainc): Likewise.
17955 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
17956 (vect_supportable_dr_alignment): Likewise.
17957 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17958 (vectorizable_reduction): Likewise.
17959 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
17960 (vectorizable_operation, vectorizable_load): Likewise.
17961 * tree.c (build_same_sized_truth_vector_type): Likewise.
17962 * valtrack.c (cleanup_auto_inc_dec): Likewise.
17963 * var-tracking.c (emit_note_insn_var_location): Likewise.
17964 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
17965 (ADDR_VEC_ALIGN): Likewise.
17967 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17968 Alan Hayward <alan.hayward@arm.com>
17969 David Sherwood <david.sherwood@arm.com>
17971 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
17973 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
17974 or if measurement_type is polynomial.
17975 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
17976 * combine.c (make_extraction): Likewise.
17977 * dse.c (find_shift_sequence): Likewise.
17978 * dwarf2out.c (mem_loc_descriptor): Likewise.
17979 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
17980 (extract_bit_field, extract_low_bits): Likewise.
17981 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
17982 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
17983 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
17984 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
17985 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
17986 * reload.c (find_reloads): Likewise.
17987 * reload1.c (alter_reg): Likewise.
17988 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
17989 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
17990 * tree-if-conv.c (predicate_mem_writes): Likewise.
17991 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
17992 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
17993 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
17994 * valtrack.c (dead_debug_insert_temp): Likewise.
17995 * varasm.c (mergeable_constant_section): Likewise.
17996 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
17998 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17999 Alan Hayward <alan.hayward@arm.com>
18000 David Sherwood <david.sherwood@arm.com>
18002 * expr.c (expand_assignment): Cope with polynomial mode sizes
18003 when assigning to a CONCAT.
18005 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18006 Alan Hayward <alan.hayward@arm.com>
18007 David Sherwood <david.sherwood@arm.com>
18009 * machmode.h (mode_precision): Change from unsigned short to
18011 (mode_to_precision): Return a poly_uint16 rather than an unsigned
18013 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
18014 or if measurement_type is not polynomial.
18015 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
18016 in which the mode is already known to be a scalar_int_mode.
18017 * genmodes.c (emit_mode_precision): Change the type of mode_precision
18018 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
18020 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18021 for GET_MODE_PRECISION.
18022 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18023 for GET_MODE_PRECISION.
18024 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
18026 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
18027 (expand_field_assignment, make_extraction): Likewise.
18028 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
18029 (get_last_value): Likewise.
18030 * convert.c (convert_to_integer_1): Likewise.
18031 * cse.c (cse_insn): Likewise.
18032 * expr.c (expand_expr_real_1): Likewise.
18033 * lra-constraints.c (simplify_operand_subreg): Likewise.
18034 * optabs-query.c (can_atomic_load_p): Likewise.
18035 * optabs.c (expand_atomic_load): Likewise.
18036 (expand_atomic_store): Likewise.
18037 * ree.c (combine_reaching_defs): Likewise.
18038 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
18039 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
18040 * tree.h (type_has_mode_precision_p): Likewise.
18041 * ubsan.c (instrument_si_overflow): Likewise.
18043 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18044 Alan Hayward <alan.hayward@arm.com>
18045 David Sherwood <david.sherwood@arm.com>
18047 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
18048 polynomial numbers of units.
18049 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
18050 (valid_vector_subparts_p): New function.
18051 (build_vector_type): Remove temporary shim and take the number
18052 of units as a poly_uint64 rather than an int.
18053 (build_opaque_vector_type): Take the number of units as a
18054 poly_uint64 rather than an int.
18055 * tree.c (build_vector_from_ctor): Handle polynomial
18056 TYPE_VECTOR_SUBPARTS.
18057 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
18058 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
18059 (build_vector_from_val): If the number of units is variable,
18060 use build_vec_duplicate_cst for constant operands and
18061 VEC_DUPLICATE_EXPR otherwise.
18062 (make_vector_type): Remove temporary is_constant ().
18063 (build_vector_type, build_opaque_vector_type): Take the number of
18064 units as a poly_uint64 rather than an int.
18065 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
18067 * cfgexpand.c (expand_debug_expr): Likewise.
18068 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
18069 (store_constructor, expand_expr_real_1): Likewise.
18070 (const_scalar_mask_from_tree): Likewise.
18071 * fold-const-call.c (fold_const_reduction): Likewise.
18072 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
18073 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
18074 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
18075 (fold_relational_const): Likewise.
18076 (native_interpret_vector): Likewise. Change the size from an
18077 int to an unsigned int.
18078 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
18079 TYPE_VECTOR_SUBPARTS.
18080 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
18081 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
18082 duplicating a non-constant operand into a variable-length vector.
18083 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
18084 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
18085 * ipa-icf.c (sem_variable::equals): Likewise.
18086 * match.pd: Likewise.
18087 * omp-simd-clone.c (simd_clone_subparts): Likewise.
18088 * print-tree.c (print_node): Likewise.
18089 * stor-layout.c (layout_type): Likewise.
18090 * targhooks.c (default_builtin_vectorization_cost): Likewise.
18091 * tree-cfg.c (verify_gimple_comparison): Likewise.
18092 (verify_gimple_assign_binary): Likewise.
18093 (verify_gimple_assign_ternary): Likewise.
18094 (verify_gimple_assign_single): Likewise.
18095 * tree-pretty-print.c (dump_generic_node): Likewise.
18096 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18097 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
18098 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
18099 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
18100 (vect_shift_permute_load_chain): Likewise.
18101 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
18102 (expand_vector_condition, optimize_vector_constructor): Likewise.
18103 (lower_vec_perm, get_compute_type): Likewise.
18104 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
18105 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
18106 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
18107 (vect_recog_mask_conversion_pattern): Likewise.
18108 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
18109 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
18110 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18111 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
18112 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
18113 (vectorizable_shift, vectorizable_operation, vectorizable_store)
18114 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
18115 (supportable_widening_operation): Likewise.
18116 (supportable_narrowing_operation): Likewise.
18117 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
18119 * varasm.c (output_constant): Likewise.
18121 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18122 Alan Hayward <alan.hayward@arm.com>
18123 David Sherwood <david.sherwood@arm.com>
18125 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
18126 so that both the length == 3 and length != 3 cases set up their
18127 own permute vectors. Add comments explaining why we know the
18128 number of elements is constant.
18129 (vect_permute_load_chain): Likewise.
18131 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18132 Alan Hayward <alan.hayward@arm.com>
18133 David Sherwood <david.sherwood@arm.com>
18135 * machmode.h (mode_nunits): Change from unsigned char to
18137 (ONLY_FIXED_SIZE_MODES): New macro.
18138 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
18139 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
18140 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
18142 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
18143 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
18144 or if measurement_type is not polynomial.
18145 * genmodes.c (ZERO_COEFFS): New macro.
18146 (emit_mode_nunits_inline): Make mode_nunits_inline return a
18148 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
18149 Use ZERO_COEFFS when emitting initializers.
18150 * data-streamer.h (bp_pack_poly_value): New function.
18151 (bp_unpack_poly_value): Likewise.
18152 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18153 for GET_MODE_NUNITS.
18154 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18155 for GET_MODE_NUNITS.
18156 * tree.c (make_vector_type): Remove temporary shim and make
18157 the real function take the number of units as a poly_uint64
18158 rather than an int.
18159 (build_vector_type_for_mode): Handle polynomial nunits.
18160 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
18161 * emit-rtl.c (const_vec_series_p_1): Likewise.
18162 (gen_rtx_CONST_VECTOR): Likewise.
18163 * fold-const.c (test_vec_duplicate_folding): Likewise.
18164 * genrecog.c (validate_pattern): Likewise.
18165 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
18166 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
18167 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
18168 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
18169 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
18170 * rtlanal.c (subreg_get_info): Likewise.
18171 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18172 (vect_grouped_load_supported): Likewise.
18173 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
18174 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
18175 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18176 (simplify_const_unary_operation, simplify_binary_operation_1)
18177 (simplify_const_binary_operation, simplify_ternary_operation)
18178 (test_vector_ops_duplicate, test_vector_ops): Likewise.
18179 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
18180 instead of CONST_VECTOR_NUNITS.
18181 * varasm.c (output_constant_pool_2): Likewise.
18182 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
18183 explicit-encoded elements in the XVEC for variable-length vectors.
18185 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18187 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
18189 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18190 Alan Hayward <alan.hayward@arm.com>
18191 David Sherwood <david.sherwood@arm.com>
18193 * coretypes.h (fixed_size_mode): Declare.
18194 (fixed_size_mode_pod): New typedef.
18195 * builtins.h (target_builtins::x_apply_args_mode)
18196 (target_builtins::x_apply_result_mode): Change type to
18197 fixed_size_mode_pod.
18198 * builtins.c (apply_args_size, apply_result_size, result_vector)
18199 (expand_builtin_apply_args_1, expand_builtin_apply)
18200 (expand_builtin_return): Update accordingly.
18202 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18204 * cse.c (hash_rtx_cb): Hash only the encoded elements.
18205 * cselib.c (cselib_hash_rtx): Likewise.
18206 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
18207 CONST_VECTOR encoding.
18209 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18210 Jeff Law <law@redhat.com>
18213 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
18214 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
18215 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
18216 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
18219 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
18220 explicitly probe *sp in a noreturn function if there were any callee
18221 register saves or frame pointer is needed.
18223 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18226 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
18227 BLKmode for ternary, binary or unary expressions.
18230 * var-tracking.c (delete_vta_debug_insn): New inline function.
18231 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
18232 insns from get_insns () to NULL instead of each bb separately.
18233 Use delete_vta_debug_insn. No longer static.
18234 (vt_debug_insns_local, variable_tracking_main_1): Adjust
18235 delete_vta_debug_insns callers.
18236 * rtl.h (delete_vta_debug_insns): Declare.
18237 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
18238 instead of variable_tracking_main.
18240 2018-01-03 Martin Sebor <msebor@redhat.com>
18242 PR tree-optimization/83603
18243 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
18244 arguments past the endof the argument list in functions declared
18245 without a prototype.
18246 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
18247 Avoid checking when arguments are null.
18249 2018-01-03 Martin Sebor <msebor@redhat.com>
18252 * doc/extend.texi (attribute const): Fix a typo.
18253 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
18254 issuing -Wsuggest-attribute for void functions.
18256 2018-01-03 Martin Sebor <msebor@redhat.com>
18258 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
18259 offset_int::from instead of wide_int::to_shwi.
18260 (maybe_diag_overlap): Remove assertion.
18261 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
18262 * gimple-ssa-sprintf.c (format_directive): Same.
18263 (parse_directive): Same.
18264 (sprintf_dom_walker::compute_format_length): Same.
18265 (try_substitute_return_value): Same.
18267 2018-01-03 Jeff Law <law@redhat.com>
18269 PR middle-end/83654
18270 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
18271 non-constant residual for zero at runtime and avoid probing in
18272 that case. Reorganize code for trailing problem to mirror handling
18275 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18277 PR tree-optimization/83501
18278 * tree-ssa-strlen.c (get_string_cst): New.
18279 (handle_char_store): Call get_string_cst.
18281 2018-01-03 Martin Liska <mliska@suse.cz>
18283 PR tree-optimization/83593
18284 * tree-ssa-strlen.c: Include tree-cfg.h.
18285 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
18286 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
18287 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
18289 (strlen_dom_walker::before_dom_children): Call
18290 gimple_purge_dead_eh_edges. Dump tranformation with details
18292 (strlen_dom_walker::before_dom_children): Update call by adding
18293 new argument cleanup_eh.
18294 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
18296 2018-01-03 Martin Liska <mliska@suse.cz>
18299 * cif-code.def (VARIADIC_THUNK): New enum value.
18300 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
18303 2018-01-03 Jan Beulich <jbeulich@suse.com>
18305 * sse.md (mov<mode>_internal): Tighten condition for when to use
18306 vmovdqu<ssescalarsize> for TI and OI modes.
18308 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18310 Update copyright years.
18312 2018-01-03 Martin Liska <mliska@suse.cz>
18315 * ipa-visibility.c (function_and_variable_visibility): Skip
18316 functions with noipa attribure.
18318 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18320 * gcc.c (process_command): Update copyright notice dates.
18321 * gcov-dump.c (print_version): Ditto.
18322 * gcov.c (print_version): Ditto.
18323 * gcov-tool.c (print_version): Ditto.
18324 * gengtype.c (create_file): Ditto.
18325 * doc/cpp.texi: Bump @copying's copyright year.
18326 * doc/cppinternals.texi: Ditto.
18327 * doc/gcc.texi: Ditto.
18328 * doc/gccint.texi: Ditto.
18329 * doc/gcov.texi: Ditto.
18330 * doc/install.texi: Ditto.
18331 * doc/invoke.texi: Ditto.
18333 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18335 * vector-builder.h (vector_builder::m_full_nelts): Change from
18336 unsigned int to poly_uint64.
18337 (vector_builder::full_nelts): Update prototype accordingly.
18338 (vector_builder::new_vector): Likewise.
18339 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
18340 (vector_builder::operator ==): Likewise.
18341 (vector_builder::finalize): Likewise.
18342 * int-vector-builder.h (int_vector_builder::int_vector_builder):
18343 Take the number of elements as a poly_uint64 rather than an
18345 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
18346 from unsigned int to poly_uint64.
18347 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
18348 (vec_perm_indices::new_vector): Likewise.
18349 (vec_perm_indices::length): Likewise.
18350 (vec_perm_indices::nelts_per_input): Likewise.
18351 (vec_perm_indices::input_nelts): Likewise.
18352 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
18353 number of elements per input as a poly_uint64 rather than an
18354 unsigned int. Use the original encoding for variable-length
18355 vectors, rather than clamping each individual element.
18356 For the second and subsequent elements in each pattern,
18357 clamp the step and base before clamping their sum.
18358 (vec_perm_indices::series_p): Handle polynomial element counts.
18359 (vec_perm_indices::all_in_range_p): Likewise.
18360 (vec_perm_indices_to_tree): Likewise.
18361 (vec_perm_indices_to_rtx): Likewise.
18362 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
18363 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
18364 (tree_vector_builder::new_binary_operation): Handle polynomial
18365 element counts. Return false if we need to know the number
18366 of elements at compile time.
18367 * fold-const.c (fold_vec_perm): Punt if the number of elements
18368 isn't known at compile time.
18370 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18372 * vec-perm-indices.h (vec_perm_builder): Change element type
18373 from HOST_WIDE_INT to poly_int64.
18374 (vec_perm_indices::element_type): Update accordingly.
18375 (vec_perm_indices::clamp): Handle polynomial element_types.
18376 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
18377 (vec_perm_indices::all_in_range_p): Likewise.
18378 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
18380 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
18381 polynomial vec_perm_indices element types.
18382 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
18383 * fold-const.c (fold_vec_perm): Likewise.
18384 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
18385 * tree-vect-generic.c (lower_vec_perm): Likewise.
18386 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
18387 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
18388 element type to HOST_WIDE_INT.
18390 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18391 Alan Hayward <alan.hayward@arm.com>
18392 David Sherwood <david.sherwood@arm.com>
18394 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
18395 rather than an int. Use plus_constant.
18396 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
18397 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
18399 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18400 Alan Hayward <alan.hayward@arm.com>
18401 David Sherwood <david.sherwood@arm.com>
18403 * calls.c (emit_call_1, expand_call): Change struct_value_size from
18404 a HOST_WIDE_INT to a poly_int64.
18406 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18407 Alan Hayward <alan.hayward@arm.com>
18408 David Sherwood <david.sherwood@arm.com>
18410 * calls.c (load_register_parameters): Cope with polynomial
18411 mode sizes. Require a constant size for BLKmode parameters
18412 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
18413 forces a parameter to be padded at the lsb end in order to
18414 fill a complete number of words, require the parameter size
18415 to be ordered wrt UNITS_PER_WORD.
18417 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18418 Alan Hayward <alan.hayward@arm.com>
18419 David Sherwood <david.sherwood@arm.com>
18421 * reload1.c (spill_stack_slot_width): Change element type
18422 from unsigned int to poly_uint64_pod.
18423 (alter_reg): Treat mode sizes as polynomial.
18425 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18426 Alan Hayward <alan.hayward@arm.com>
18427 David Sherwood <david.sherwood@arm.com>
18429 * reload.c (complex_word_subreg_p): New function.
18430 (reload_inner_reg_of_subreg, push_reload): Use it.
18432 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18433 Alan Hayward <alan.hayward@arm.com>
18434 David Sherwood <david.sherwood@arm.com>
18436 * lra-constraints.c (process_alt_operands): Reject matched
18437 operands whose sizes aren't ordered.
18438 (match_reload): Refer to this check here.
18440 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18441 Alan Hayward <alan.hayward@arm.com>
18442 David Sherwood <david.sherwood@arm.com>
18444 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
18445 that the mode size is in the set {1, 2, 4, 8, 16}.
18447 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18448 Alan Hayward <alan.hayward@arm.com>
18449 David Sherwood <david.sherwood@arm.com>
18451 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
18452 Use plus_constant instead of gen_rtx_PLUS.
18454 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18455 Alan Hayward <alan.hayward@arm.com>
18456 David Sherwood <david.sherwood@arm.com>
18458 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
18459 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
18460 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
18461 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
18462 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
18463 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
18464 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
18465 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
18466 * config/i386/i386.c (ix86_push_rounding): ...this new function.
18467 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
18469 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
18470 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
18471 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
18472 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
18473 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
18474 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
18475 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
18476 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
18477 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
18478 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
18480 * expr.c (emit_move_resolve_push): Treat the input and result
18481 of PUSH_ROUNDING as a poly_int64.
18482 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
18483 (emit_push_insn): Likewise.
18484 * lra-eliminations.c (mark_not_eliminable): Likewise.
18485 * recog.c (push_operand): Likewise.
18486 * reload1.c (elimination_effects): Likewise.
18487 * rtlanal.c (nonzero_bits1): Likewise.
18488 * calls.c (store_one_arg): Likewise. Require the padding to be
18489 known at compile time.
18491 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18492 Alan Hayward <alan.hayward@arm.com>
18493 David Sherwood <david.sherwood@arm.com>
18495 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
18496 Use plus_constant instead of gen_rtx_PLUS.
18498 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18499 Alan Hayward <alan.hayward@arm.com>
18500 David Sherwood <david.sherwood@arm.com>
18502 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
18503 rather than an int.
18505 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18506 Alan Hayward <alan.hayward@arm.com>
18507 David Sherwood <david.sherwood@arm.com>
18509 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
18510 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
18511 via stack temporaries. Treat the mode size as polynomial too.
18513 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18514 Alan Hayward <alan.hayward@arm.com>
18515 David Sherwood <david.sherwood@arm.com>
18517 * expr.c (expand_expr_real_2): When handling conversions involving
18518 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
18519 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
18520 as a poly_uint64 too.
18522 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18523 Alan Hayward <alan.hayward@arm.com>
18524 David Sherwood <david.sherwood@arm.com>
18526 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
18528 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18529 Alan Hayward <alan.hayward@arm.com>
18530 David Sherwood <david.sherwood@arm.com>
18532 * combine.c (can_change_dest_mode): Handle polynomial
18533 REGMODE_NATURAL_SIZE.
18534 * expmed.c (store_bit_field_1): Likewise.
18535 * expr.c (store_constructor): Likewise.
18536 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
18537 and polynomial REGMODE_NATURAL_SIZE.
18538 (gen_lowpart_common): Likewise.
18539 * reginfo.c (record_subregs_of_mode): Likewise.
18540 * rtlanal.c (read_modify_subreg_p): Likewise.
18542 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18543 Alan Hayward <alan.hayward@arm.com>
18544 David Sherwood <david.sherwood@arm.com>
18546 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
18547 numbers of elements.
18549 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18550 Alan Hayward <alan.hayward@arm.com>
18551 David Sherwood <david.sherwood@arm.com>
18553 * match.pd: Cope with polynomial numbers of vector elements.
18555 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18556 Alan Hayward <alan.hayward@arm.com>
18557 David Sherwood <david.sherwood@arm.com>
18559 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
18560 in a POINTER_PLUS_EXPR.
18562 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18563 Alan Hayward <alan.hayward@arm.com>
18564 David Sherwood <david.sherwood@arm.com>
18566 * omp-simd-clone.c (simd_clone_subparts): New function.
18567 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
18568 (ipa_simd_modify_function_body): Likewise.
18570 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18571 Alan Hayward <alan.hayward@arm.com>
18572 David Sherwood <david.sherwood@arm.com>
18574 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
18575 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
18576 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
18577 (expand_vector_condition, vector_element): Likewise.
18578 (subparts_gt): New function.
18579 (get_compute_type): Use subparts_gt.
18580 (count_type_subparts): Delete.
18581 (expand_vector_operations_1): Use subparts_gt instead of
18582 count_type_subparts.
18584 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18585 Alan Hayward <alan.hayward@arm.com>
18586 David Sherwood <david.sherwood@arm.com>
18588 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
18589 (vect_compile_time_alias): ...this new function. Do the calculation
18590 on poly_ints rather than trees.
18591 (vect_prune_runtime_alias_test_list): Update call accordingly.
18593 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18594 Alan Hayward <alan.hayward@arm.com>
18595 David Sherwood <david.sherwood@arm.com>
18597 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
18599 (vect_schedule_slp_instance): Likewise.
18601 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18602 Alan Hayward <alan.hayward@arm.com>
18603 David Sherwood <david.sherwood@arm.com>
18605 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
18606 constant and extern definitions for variable-length vectors.
18607 (vect_get_constant_vectors): Note that the number of units
18608 is known to be constant.
18610 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18611 Alan Hayward <alan.hayward@arm.com>
18612 David Sherwood <david.sherwood@arm.com>
18614 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
18615 of units as polynomial. Choose between WIDE and NARROW based
18618 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18619 Alan Hayward <alan.hayward@arm.com>
18620 David Sherwood <david.sherwood@arm.com>
18622 * tree-vect-stmts.c (simd_clone_subparts): New function.
18623 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
18625 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18626 Alan Hayward <alan.hayward@arm.com>
18627 David Sherwood <david.sherwood@arm.com>
18629 * tree-vect-stmts.c (vectorizable_call): Treat the number of
18630 vectors as polynomial. Use build_index_vector for
18631 IFN_GOMP_SIMD_LANE.
18633 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18634 Alan Hayward <alan.hayward@arm.com>
18635 David Sherwood <david.sherwood@arm.com>
18637 * tree-vect-stmts.c (get_load_store_type): Treat the number of
18638 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
18639 for variable-length vectors.
18640 (vectorizable_mask_load_store): Treat the number of units as
18641 polynomial, asserting that it is constant if the condition has
18642 already been enforced.
18643 (vectorizable_store, vectorizable_load): Likewise.
18645 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18646 Alan Hayward <alan.hayward@arm.com>
18647 David Sherwood <david.sherwood@arm.com>
18649 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
18650 of units as polynomial. Punt if we can't tell at compile time
18651 which vector contains the final result.
18653 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18654 Alan Hayward <alan.hayward@arm.com>
18655 David Sherwood <david.sherwood@arm.com>
18657 * tree-vect-loop.c (vectorizable_induction): Treat the number
18658 of units as polynomial. Punt on SLP inductions. Use an integer
18659 VEC_SERIES_EXPR for variable-length integer reductions. Use a
18660 cast of such a series for variable-length floating-point
18663 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18664 Alan Hayward <alan.hayward@arm.com>
18665 David Sherwood <david.sherwood@arm.com>
18667 * tree.h (build_index_vector): Declare.
18668 * tree.c (build_index_vector): New function.
18669 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
18670 of units as polynomial, forcibly converting it to a constant if
18671 vectorizable_reduction has already enforced the condition.
18672 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
18673 to create a {1,2,3,...} vector.
18674 (vectorizable_reduction): Treat the number of units as polynomial.
18675 Choose vectype_in based on the largest scalar element size rather
18676 than the smallest number of units. Enforce the restrictions
18679 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18680 Alan Hayward <alan.hayward@arm.com>
18681 David Sherwood <david.sherwood@arm.com>
18683 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
18684 number of units as polynomial.
18686 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18687 Alan Hayward <alan.hayward@arm.com>
18688 David Sherwood <david.sherwood@arm.com>
18690 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
18691 * target.def (autovectorize_vector_sizes): Return the vector sizes
18692 by pointer, using vector_sizes rather than a bitmask.
18693 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
18694 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
18695 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
18697 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
18698 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
18699 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
18700 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
18701 * omp-general.c (omp_max_vf): Likewise.
18702 * omp-low.c (omp_clause_aligned_alignment): Likewise.
18703 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
18704 * tree-vect-loop.c (vect_analyze_loop): Likewise.
18705 * tree-vect-slp.c (vect_slp_bb): Likewise.
18706 * doc/tm.texi: Regenerate.
18707 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
18709 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
18710 the vector size as a poly_uint64 rather than an unsigned int.
18711 (current_vector_size): Change from an unsigned int to a poly_uint64.
18712 (get_vectype_for_scalar_type): Update accordingly.
18713 * tree.h (build_truth_vector_type): Take the size and number of
18714 units as a poly_uint64 rather than an unsigned int.
18715 (build_vector_type): Add a temporary overload that takes
18716 the number of units as a poly_uint64 rather than an unsigned int.
18717 * tree.c (make_vector_type): Likewise.
18718 (build_truth_vector_type): Take the number of units as a poly_uint64
18719 rather than an unsigned int.
18721 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18722 Alan Hayward <alan.hayward@arm.com>
18723 David Sherwood <david.sherwood@arm.com>
18725 * target.def (get_mask_mode): Take the number of units and length
18726 as poly_uint64s rather than unsigned ints.
18727 * targhooks.h (default_get_mask_mode): Update accordingly.
18728 * targhooks.c (default_get_mask_mode): Likewise.
18729 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
18730 * doc/tm.texi: Regenerate.
18732 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18733 Alan Hayward <alan.hayward@arm.com>
18734 David Sherwood <david.sherwood@arm.com>
18736 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
18737 * omp-general.c (omp_max_vf): Likewise.
18738 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
18739 (expand_omp_simd): Handle polynomial safelen.
18740 * omp-low.c (omplow_simd_context): Add a default constructor.
18741 (omplow_simd_context::max_vf): Change from int to poly_uint64.
18742 (lower_rec_simd_input_clauses): Update accordingly.
18743 (lower_rec_input_clauses): Likewise.
18745 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18746 Alan Hayward <alan.hayward@arm.com>
18747 David Sherwood <david.sherwood@arm.com>
18749 * tree-vectorizer.h (vect_nunits_for_cost): New function.
18750 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
18751 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
18752 (vect_analyze_slp_cost): Likewise.
18753 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
18754 (vect_model_load_cost): Likewise.
18756 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18757 Alan Hayward <alan.hayward@arm.com>
18758 David Sherwood <david.sherwood@arm.com>
18760 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
18761 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
18762 from an unsigned int * to a poly_uint64_pod *.
18763 (calculate_unrolling_factor): New function.
18764 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
18766 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18767 Alan Hayward <alan.hayward@arm.com>
18768 David Sherwood <david.sherwood@arm.com>
18770 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
18771 from an unsigned int to a poly_uint64.
18772 (_loop_vec_info::slp_unrolling_factor): Likewise.
18773 (_loop_vec_info::vectorization_factor): Change from an int
18775 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
18776 (vect_get_num_vectors): New function.
18777 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
18778 (vect_get_num_copies): Use vect_get_num_vectors.
18779 (vect_analyze_data_ref_dependences): Change max_vf from an int *
18780 to an unsigned int *.
18781 (vect_analyze_data_refs): Change min_vf from an int * to a
18783 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
18784 than an unsigned HOST_WIDE_INT.
18785 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
18786 (vect_analyze_data_ref_dependence): Change max_vf from an int *
18787 to an unsigned int *.
18788 (vect_analyze_data_ref_dependences): Likewise.
18789 (vect_compute_data_ref_alignment): Handle polynomial vf.
18790 (vect_enhance_data_refs_alignment): Likewise.
18791 (vect_prune_runtime_alias_test_list): Likewise.
18792 (vect_shift_permute_load_chain): Likewise.
18793 (vect_supportable_dr_alignment): Likewise.
18794 (dependence_distance_ge_vf): Take the vectorization factor as a
18795 poly_uint64 rather than an unsigned HOST_WIDE_INT.
18796 (vect_analyze_data_refs): Change min_vf from an int * to a
18798 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
18799 vfm1 as a poly_uint64 rather than an int. Make the same change
18800 for the returned bound_scalar.
18801 (vect_gen_vector_loop_niters): Handle polynomial vf.
18802 (vect_do_peeling): Likewise. Update call to
18803 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
18804 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
18806 * tree-vect-loop.c (vect_determine_vectorization_factor)
18807 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
18808 (vect_get_known_peeling_cost): Likewise.
18809 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
18810 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
18811 (vect_transform_loop): Likewise. Use the lowest possible VF when
18812 updating the upper bounds of the loop.
18813 (vect_min_worthwhile_factor): Make static. Return an unsigned int
18814 rather than an int.
18815 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
18816 polynomial unroll factors.
18817 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
18818 (vect_make_slp_decision): Likewise.
18819 (vect_supported_load_permutation_p): Likewise, and polynomial
18821 (vect_analyze_slp_cost): Handle polynomial vf.
18822 (vect_slp_analyze_node_operations): Likewise.
18823 (vect_slp_analyze_bb_1): Likewise.
18824 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
18825 than an unsigned HOST_WIDE_INT.
18826 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
18827 (vectorizable_load): Handle polynomial vf.
18828 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
18830 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
18832 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18833 Alan Hayward <alan.hayward@arm.com>
18834 David Sherwood <david.sherwood@arm.com>
18836 * match.pd: Handle bit operations involving three constants
18837 and try to fold one pair.
18839 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18841 * tree-vect-loop-manip.c: Include gimple-fold.h.
18842 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
18843 niters_maybe_zero parameters. Handle other cases besides a step of 1.
18844 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
18845 Add a path that uses a step of VF instead of 1, but disable it
18847 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
18848 and niters_no_overflow parameters. Update calls to
18849 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
18850 Create a new SSA name if the latter choses to use a ste other
18851 than zero, and return it via niters_vector_mult_vf_var.
18852 * tree-vect-loop.c (vect_transform_loop): Update calls to
18853 vect_do_peeling, vect_gen_vector_loop_niters and
18854 slpeel_make_loop_iterate_ntimes.
18855 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
18856 (vect_gen_vector_loop_niters): Update declarations after above changes.
18858 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
18860 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
18861 128-bit round to integer instructions.
18862 (ceil<mode>2): Likewise.
18863 (btrunc<mode>2): Likewise.
18864 (round<mode>2): Likewise.
18866 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18868 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
18869 unaligned VSX load/store on P8/P9.
18870 (expand_block_clear): Allow the use of unaligned VSX
18871 load/store on P8/P9.
18873 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18875 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
18877 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
18878 swap associated with both a load and a store.
18880 2018-01-02 Andrew Waterman <andrew@sifive.com>
18882 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
18883 * config/riscv/riscv.md (clear_cache): Use it.
18885 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
18887 * web.c: Remove out-of-date comment.
18889 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18891 * expr.c (fixup_args_size_notes): Check that any existing
18892 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
18893 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
18894 (emit_single_push_insn): ...here.
18896 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18898 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
18899 (const_vector_encoded_nelts): New function.
18900 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
18901 (const_vector_int_elt, const_vector_elt): Declare.
18902 * emit-rtl.c (const_vector_int_elt_1): New function.
18903 (const_vector_elt): Likewise.
18904 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
18905 of CONST_VECTOR_ELT.
18907 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18909 * expr.c: Include rtx-vector-builder.h.
18910 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
18911 directly on the tree encoding.
18912 (const_vector_from_tree): Likewise.
18913 * optabs.c: Include rtx-vector-builder.h.
18914 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
18915 sequence of "u" values.
18916 * vec-perm-indices.c: Include rtx-vector-builder.h.
18917 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
18918 directly on the vec_perm_indices encoding.
18920 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18922 * doc/rtl.texi (const_vector): Describe new encoding scheme.
18923 * Makefile.in (OBJS): Add rtx-vector-builder.o.
18924 * rtx-vector-builder.h: New file.
18925 * rtx-vector-builder.c: Likewise.
18926 * rtl.h (rtx_def::u2): Add a const_vector field.
18927 (CONST_VECTOR_NPATTERNS): New macro.
18928 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
18929 (CONST_VECTOR_DUPLICATE_P): Likewise.
18930 (CONST_VECTOR_STEPPED_P): Likewise.
18931 (CONST_VECTOR_ENCODED_ELT): Likewise.
18932 (const_vec_duplicate_p): Check for a duplicated vector encoding.
18933 (unwrap_const_vec_duplicate): Likewise.
18934 (const_vec_series_p): Check for a non-duplicated vector encoding.
18935 Say that the function only returns true for integer vectors.
18936 * emit-rtl.c: Include rtx-vector-builder.h.
18937 (gen_const_vec_duplicate_1): Delete.
18938 (gen_const_vector): Call gen_const_vec_duplicate instead of
18939 gen_const_vec_duplicate_1.
18940 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
18941 (gen_const_vec_duplicate): Use rtx_vector_builder.
18942 (gen_const_vec_series): Likewise.
18943 (gen_rtx_CONST_VECTOR): Likewise.
18944 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
18945 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
18946 Build a new vector rather than modifying a CONST_VECTOR in-place.
18947 (handle_special_swappables): Update call accordingly.
18948 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
18949 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
18950 Build a new vector rather than modifying a CONST_VECTOR in-place.
18951 (handle_special_swappables): Update call accordingly.
18953 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18955 * simplify-rtx.c (simplify_const_binary_operation): Use
18956 CONST_VECTOR_ELT instead of XVECEXP.
18958 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18960 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
18961 the selector elements to be different from the data elements
18962 if the selector is a VECTOR_CST.
18963 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
18964 ssizetype for the selector.
18966 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18968 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
18969 before testing each element individually.
18970 * tree-vect-generic.c (lower_vec_perm): Likewise.
18972 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18974 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
18975 * selftest-run-tests.c (selftest::run_tests): Call it.
18976 * vector-builder.h (vector_builder::operator ==): New function.
18977 (vector_builder::operator !=): Likewise.
18978 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
18979 (vec_perm_indices::all_from_input_p): New function.
18980 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
18981 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
18982 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
18983 instead of reading the VECTOR_CST directly. Detect whether both
18984 vector inputs are the same before constructing the vec_perm_indices,
18985 and update the number of inputs argument accordingly. Use the
18986 utility functions added above. Only construct sel2 if we need to.
18988 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18990 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
18991 the broadcast of the low byte.
18992 (expand_mult_highpart): Use an explicit encoding for the permutes.
18993 * optabs-query.c (can_mult_highpart_p): Likewise.
18994 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
18995 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18996 (vectorizable_bswap): Likewise.
18997 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
18998 explicit encoding for the power-of-2 permutes.
18999 (vect_permute_store_chain): Likewise.
19000 (vect_grouped_load_supported): Likewise.
19001 (vect_permute_load_chain): Likewise.
19003 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19005 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
19006 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
19007 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
19008 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19009 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
19010 (vect_gen_perm_mask_any): Likewise.
19012 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19014 * int-vector-builder.h: New file.
19015 * vec-perm-indices.h: Include int-vector-builder.h.
19016 (vec_perm_indices): Redefine as an int_vector_builder.
19017 (auto_vec_perm_indices): Delete.
19018 (vec_perm_builder): Redefine as a stand-alone class.
19019 (vec_perm_indices::vec_perm_indices): New function.
19020 (vec_perm_indices::clamp): Likewise.
19021 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
19022 (vec_perm_indices::new_vector): New function.
19023 (vec_perm_indices::new_expanded_vector): Update for new
19024 vec_perm_indices class.
19025 (vec_perm_indices::rotate_inputs): New function.
19026 (vec_perm_indices::all_in_range_p): Operate directly on the
19027 encoded form, without computing elided elements.
19028 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
19029 encoding. Update for new vec_perm_indices class.
19030 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
19031 the given vec_perm_builder.
19032 (expand_vec_perm_var): Update vec_perm_builder constructor.
19033 (expand_mult_highpart): Use vec_perm_builder instead of
19034 auto_vec_perm_indices.
19035 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
19036 vec_perm_indices instead of auto_vec_perm_indices. Use a single
19037 or double series encoding as appropriate.
19038 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
19039 vec_perm_indices instead of auto_vec_perm_indices.
19040 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19041 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19042 (vect_permute_store_chain): Likewise.
19043 (vect_grouped_load_supported): Likewise.
19044 (vect_permute_load_chain): Likewise.
19045 (vect_shift_permute_load_chain): Likewise.
19046 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19047 (vect_transform_slp_perm_load): Likewise.
19048 (vect_schedule_slp_instance): Likewise.
19049 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19050 (vectorizable_mask_load_store): Likewise.
19051 (vectorizable_bswap): Likewise.
19052 (vectorizable_store): Likewise.
19053 (vectorizable_load): Likewise.
19054 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
19055 vec_perm_indices instead of auto_vec_perm_indices. Use
19056 tree_to_vec_perm_builder to read the vector from a tree.
19057 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
19058 vec_perm_builder instead of a vec_perm_indices.
19059 (have_whole_vector_shift): Use vec_perm_builder and
19060 vec_perm_indices instead of auto_vec_perm_indices. Leave the
19061 truncation to calc_vec_perm_mask_for_shift.
19062 (vect_create_epilog_for_reduction): Likewise.
19063 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
19064 from auto_vec_perm_indices to vec_perm_indices.
19065 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19066 instead of changing individual elements.
19067 (aarch64_vectorize_vec_perm_const): Use new_vector to install
19068 the vector in d.perm.
19069 * config/arm/arm.c (expand_vec_perm_d::perm): Change
19070 from auto_vec_perm_indices to vec_perm_indices.
19071 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19072 instead of changing individual elements.
19073 (arm_vectorize_vec_perm_const): Use new_vector to install
19074 the vector in d.perm.
19075 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
19076 Update vec_perm_builder constructor.
19077 (rs6000_expand_interleave): Likewise.
19078 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
19079 (rs6000_expand_interleave): Likewise.
19081 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19083 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
19084 to qimode could truncate the indices.
19085 * optabs.c (expand_vec_perm_var): Likewise.
19087 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19089 * Makefile.in (OBJS): Add vec-perm-indices.o.
19090 * vec-perm-indices.h: New file.
19091 * vec-perm-indices.c: Likewise.
19092 * target.h (vec_perm_indices): Replace with a forward class
19094 (auto_vec_perm_indices): Move to vec-perm-indices.h.
19095 * optabs.h: Include vec-perm-indices.h.
19096 (expand_vec_perm): Delete.
19097 (selector_fits_mode_p, expand_vec_perm_var): Declare.
19098 (expand_vec_perm_const): Declare.
19099 * target.def (vec_perm_const_ok): Replace with...
19100 (vec_perm_const): ...this new hook.
19101 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
19102 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
19103 * doc/tm.texi: Regenerate.
19104 * optabs.def (vec_perm_const): Delete.
19105 * doc/md.texi (vec_perm_const): Likewise.
19106 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
19107 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
19108 expand_vec_perm for constant permutation vectors. Assert that
19109 the mode of variable permutation vectors is the integer equivalent
19110 of the mode that is being permuted.
19111 * optabs-query.h (selector_fits_mode_p): Declare.
19112 * optabs-query.c: Include vec-perm-indices.h.
19113 (selector_fits_mode_p): New function.
19114 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
19115 is defined, instead of checking whether the vec_perm_const_optab
19116 exists. Use targetm.vectorize.vec_perm_const instead of
19117 targetm.vectorize.vec_perm_const_ok. Check whether the indices
19118 fit in the vector mode before using a variable permute.
19119 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
19120 vec_perm_indices instead of an rtx.
19121 (expand_vec_perm): Replace with...
19122 (expand_vec_perm_const): ...this new function. Take the selector
19123 as a vec_perm_indices rather than an rtx. Also take the mode of
19124 the selector. Update call to shift_amt_for_vec_perm_mask.
19125 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
19126 Use vec_perm_indices::new_expanded_vector to expand the original
19127 selector into bytes. Check whether the indices fit in the vector
19128 mode before using a variable permute.
19129 (expand_vec_perm_var): Make global.
19130 (expand_mult_highpart): Use expand_vec_perm_const.
19131 * fold-const.c: Includes vec-perm-indices.h.
19132 * tree-ssa-forwprop.c: Likewise.
19133 * tree-vect-data-refs.c: Likewise.
19134 * tree-vect-generic.c: Likewise.
19135 * tree-vect-loop.c: Likewise.
19136 * tree-vect-slp.c: Likewise.
19137 * tree-vect-stmts.c: Likewise.
19138 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
19140 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
19141 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
19142 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
19143 (aarch64_vectorize_vec_perm_const): ...this new function.
19144 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19145 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19146 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
19147 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
19148 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19149 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19150 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
19152 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
19153 check for NEON modes.
19154 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
19155 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
19156 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
19157 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
19159 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
19160 the old VEC_PERM_CONST conditions.
19161 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
19162 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
19163 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
19164 (ia64_vectorize_vec_perm_const_ok): Merge into...
19165 (ia64_vectorize_vec_perm_const): ...this new function.
19166 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
19167 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
19168 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
19169 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
19170 * config/mips/mips.c (mips_expand_vec_perm_const)
19171 (mips_vectorize_vec_perm_const_ok): Merge into...
19172 (mips_vectorize_vec_perm_const): ...this new function.
19173 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
19174 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
19175 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
19176 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
19177 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
19178 (rs6000_expand_vec_perm_const): Delete.
19179 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
19181 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19182 (altivec_expand_vec_perm_const_le): Take each operand individually.
19183 Operate on constant selectors rather than rtxes.
19184 (altivec_expand_vec_perm_const): Likewise. Update call to
19185 altivec_expand_vec_perm_const_le.
19186 (rs6000_expand_vec_perm_const): Delete.
19187 (rs6000_vectorize_vec_perm_const_ok): Delete.
19188 (rs6000_vectorize_vec_perm_const): New function.
19189 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19190 an element count and rtx array.
19191 (rs6000_expand_extract_even): Update call accordingly.
19192 (rs6000_expand_interleave): Likewise.
19193 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
19194 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
19195 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
19196 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
19197 (rs6000_expand_vec_perm_const): Delete.
19198 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19199 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19200 (altivec_expand_vec_perm_const_le): Take each operand individually.
19201 Operate on constant selectors rather than rtxes.
19202 (altivec_expand_vec_perm_const): Likewise. Update call to
19203 altivec_expand_vec_perm_const_le.
19204 (rs6000_expand_vec_perm_const): Delete.
19205 (rs6000_vectorize_vec_perm_const_ok): Delete.
19206 (rs6000_vectorize_vec_perm_const): New function. Remove stray
19207 reference to the SPE evmerge intructions.
19208 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19209 an element count and rtx array.
19210 (rs6000_expand_extract_even): Update call accordingly.
19211 (rs6000_expand_interleave): Likewise.
19212 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
19213 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
19215 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19217 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19219 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
19220 vector mode and that that mode matches the mode of the data
19222 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
19223 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
19224 directly using expand_vec_perm_1 when forcing selectors into
19226 (expand_vec_perm_var): New function, split out from expand_vec_perm.
19228 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19230 * optabs-query.h (can_vec_perm_p): Delete.
19231 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
19232 * optabs-query.c (can_vec_perm_p): Split into...
19233 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
19234 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
19235 particular selector is valid.
19236 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19237 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19238 (vect_grouped_load_supported): Likewise.
19239 (vect_shift_permute_load_chain): Likewise.
19240 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19241 (vect_transform_slp_perm_load): Likewise.
19242 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19243 (vectorizable_bswap): Likewise.
19244 (vect_gen_perm_mask_checked): Likewise.
19245 * fold-const.c (fold_ternary_loc): Likewise. Don't take
19246 implementations of variable permutation vectors into account
19247 when deciding which selector to use.
19248 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
19249 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
19250 with a false third argument.
19251 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
19252 to test whether the constant selector is valid and can_vec_perm_var_p
19253 to test whether a variable selector is valid.
19255 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19257 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
19258 * optabs-query.c (can_vec_perm_p): Likewise.
19259 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
19260 instead of vec_perm_indices.
19261 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
19262 (vect_gen_perm_mask_checked): Likewise,
19263 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
19264 (vect_gen_perm_mask_checked): Likewise,
19266 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19268 * optabs-query.h (qimode_for_vec_perm): Declare.
19269 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
19270 (qimode_for_vec_perm): ...this new function.
19271 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
19273 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19275 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
19276 does not have a conditional at the top.
19278 2018-01-02 Richard Biener <rguenther@suse.de>
19280 * ipa-inline.c (big_speedup_p): Fix expression.
19282 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
19285 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
19288 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
19292 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
19293 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
19294 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
19295 cond_taken_branch_cost 3->4.
19297 2018-01-01 Jakub Jelinek <jakub@redhat.com>
19299 PR tree-optimization/83581
19300 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
19301 TODO_cleanup_cfg if any changes have been made.
19303 PR middle-end/83608
19304 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
19305 convert_modes if target mode has the right side, but different mode
19308 PR middle-end/83609
19309 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
19310 last argument when extracting from CONCAT. If either from_real or
19311 from_imag is NULL, use expansion through memory. If result is not
19312 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
19313 the parts directly to inner mode, if even that fails, use expansion
19316 PR middle-end/83623
19317 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
19318 check for bswap in mode rather than HImode and use that in expand_unop
19321 Copyright (C) 2018 Free Software Foundation, Inc.
19323 Copying and distribution of this file, with or without modification,
19324 are permitted in any medium without royalty provided the copyright
19325 notice and this notice are preserved.