1 2018-07-10 Richard Biener <rguenther@suse.de>
3 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1):
4 Rework father_bb setting in a way to avoid propagating constants
5 multiple times on a loop body.
7 2018-07-10 Mark Wielaard <mark@klomp.org>
10 * dwarf2out.c (output_macinfo_op): Fix dwarf_FORM typo in gcc_assert.
12 2018-07-10 Richard Biener <rguenther@suse.de>
14 * hash-map.h (hash_map::iterator::operator*): Return
15 references to key and value.
17 2018-07-10 Jakub Jelinek <jakub@redhat.com>
20 * gimplify.c (find_combined_omp_for): Add DATA argument, in addition
21 to finding the inner OMP_FOR/OMP_SIMD stmt find non-trivial wrappers,
22 BLOCKs with BLOCK_VARs, OMP_PARALLEL in between, OMP_FOR in between.
23 (gimplify_omp_for): For composite loops, move outer
24 OMP_{DISTRIBUTE,TASKLOOP,FOR,PARALLEL} right around innermost
25 OMP_FOR/OMP_SIMD if there are any non-trivial wrappers. For class
26 iterators add any needed clauses. Allow OMP_FOR_ORIG_DECLS to contain
27 TREE_LIST for both the original class iterator and the "last" helper
28 var. Gimplify OMP_FOR_PRE_BODY before the outermost composite
29 loop, remember has_decl_expr from outer composite loops for the
30 innermost OMP_SIMD in TREE_PRIVATE bit on OMP_FOR_INIT.
32 2018-07-09 Martin Sebor <msebor@redhat.com>
36 * builtins.c (c_strlen): Avoid out-of-bounds warnings when
37 accessing implicitly initialized array elements.
38 * expr.c (string_constant): Handle string initializers of
39 character arrays within aggregates.
40 * gimple-fold.c (fold_array_ctor_reference): Add argument.
41 Store element offset. As a special case, handle zero size.
42 (fold_nonarray_ctor_reference): Same.
43 (fold_ctor_reference): Add argument. Store subobject offset.
44 * gimple-fold.h (fold_ctor_reference): Add argument.
46 2018-07-09 Paul Koning <ni1d@arrl.net>
48 * config/pdp11/pdp11.c (pdp11_addr_cost): New function.
49 (pdp11_insn_cost): New function.
50 (pdp11_md_asm_adjust): New function.
51 (TARGET_INVALID_WITHIN_DOLOOP): Define.
52 (pdp11_rtx_costs): Update to match machine better.
53 (output_addr_const_pdp11): Correct format mismatch warnings.
54 * config/pdp11/pdp11.h (SLOW_BYTE_ACCESS): Correct definition.
55 * config/pdp11/pdp11.md: General change to add base_cost and/or
56 length attributes for use by new pdp11_insn_cost function.
57 (MIN_BRANCH): Correct definition.
59 (doloop_end): Use standard pattern name for looping pattern.
60 (doloop_end_nocc): New.
61 (movsf): Add another constraint alternative.
62 (zero_extendqihi2): Add constraint alternatives for not in place
64 (zero_extendhisi2): Remove.
65 (shift patterns): Add CC handling variants.
69 (define_peephole2): New peephole to recognize mov that sets CC for
72 2018-07-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
74 * config/sparc/sparc.c (sparc_fold_builtin) <SPARC_BUILTIN_PDIST,
75 SPARC_BUILTIN_PDISTN>: Adapt for signature change of wi::neg,
78 2018-07-09 Jakub Jelinek <jakub@redhat.com>
81 * real.c (real_nextafter): Return true if result is denormal.
83 2018-07-09 Martin Liska <mliska@suse.cz>
85 * common.opt: Add back wrongly removed attribute.
87 2018-07-09 Richard Biener <rguenther@suse.de>
90 * dwarf2out.c (gen_block_die): For an early generated DIE
91 always output high/low PC attributes.
93 2018-07-09 Tom de Vries <tdevries@suse.de>
95 * cfgexpand.c (expand_debug_source_expr): Handle VAR_DECL.
96 * tree-inline.c (remap_ssa_name): Handle default def ssa_name mapping
97 onto VAR_DECL with abstract origin.
99 2018-07-07 Jim Wilson <jimw@sifive.com>
101 * config/riscv/riscv.c (TARGET_CUSTOM_FUNCTION_DESCRIPTORS): New.
103 2018-07-07 Tom de Vries <tdevries@suse.de>
105 * tree-dfa.c (dump_enumerated_decls): Handle cfun->cfg == NULL.
107 2018-07-07 Aldy Hernandez <aldyh@redhat.com>
109 * tree-vrp.c (vrp_int_const_binop): Change overflow type to
111 (combine_bound): Use wide-int overflow calculation instead of
113 * calls.c (maybe_warn_alloc_args_overflow): Change overflow type to
115 * fold-const.c (int_const_binop_2): Same.
116 (extract_muldiv_1): Same.
117 (fold_div_compare): Same.
118 (fold_abs_const): Same.
120 * poly-int.h (add): Same.
124 * predict.c (predict_iv_comparison): Same.
125 * profile-count.c (slow_safe_scale_64bit): Same.
126 * simplify-rtx.c (simplify_const_binary_operation): Same.
127 * tree-chrec.c (tree_fold_binomial): Same.
128 * tree-data-ref.c (split_constant_offset_1): Same.
129 * tree-if-conv.c (idx_within_array_bound): Same.
130 * tree-scalar-evolution.c (iv_can_overflow_p): Same.
131 * tree-ssa-phiopt.c (minmax_replacement): Same.
132 * tree-vect-loop.c (is_nonwrapping_integer_induction): Same.
133 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Same.
134 * vr-values.c (vr_values::adjust_range_with_scev): Same.
135 * wide-int.cc (wi::add_large): Same.
136 (wi::mul_internal): Same.
137 (wi::sub_large): Same.
138 (wi::divmod_internal): Same.
139 * wide-int.h: Change overflow type to overflow_type for neg, add,
140 mul, smul, umul, div_trunc, div_floor, div_ceil, div_round,
141 mod_trunc, mod_ceil, mod_round, add_large, sub_large,
142 mul_internal, divmod_internal.
143 (overflow_type): New enum.
144 (accumulate_overflow): New.
146 2018-07-06 Kugan Vivekanandarajah <kugan.vivekanandarajah@linaro.org>
148 * tree-ssa-phiopt.c (cond_removal_in_popcount_pattern): New.
149 (tree_ssa_phiopt_worker): Call cond_removal_in_popcount_pattern.
151 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
153 * tree-ssa-loop-niter.c (number_of_iterations_popcount): If popcount
154 argument is checked for zero before entering loop, avoid checking again.
156 2018-07-06 Kugan Vivekanandarajah <kuganv@linaro.org>
158 * gimplify.h (generic_expr_could_trap_p): Set as global function.
159 * gimplify.h (generic_expr_could_trap_p): Likwise.
160 * tree-scalar-evolution.c (expression_expensive_p): Handle COND_EXPR.
162 2018-07-06 Jakub Jelinek <jakub@redhat.com>
164 PR tree-optimization/86401
165 * fold-const.c (fold_binary_loc) <case BIT_AND_EXPR>: Move the
166 ((A & N) + B) & M -> (A + B) & M etc. optimization into ...
167 (fold_bit_and_mask): ... here. New helper function for match.pd.
168 * fold-const.h (fold_bit_and_mask): Declare.
169 * match.pd (((A & N) + B) & M -> (A + B) & M): New optimization.
171 2018-07-06 Peter Bergner <bergner@linux.ibm.com>
174 * target.def (translate_mode_attribute): New hook.
175 * targhooks.h (default_translate_mode_attribute): Declare.
176 * targhooks.c (default_translate_mode_attribute): New function.
177 * doc/tm.texi.in (TARGET_TRANSLATE_MODE_ATTRIBUTE): New hook.
178 * doc/tm.texi: Regenerate.
179 * config/rs6000/rs6000.c (TARGET_TRANSLATE_MODE_ATTRIBUTE): Define.
180 (rs6000_translate_mode_attribute): New function.
182 2018-07-06 Paul Koning <ni1d@arrl.net>
184 * doc/md.texi (define_split): Document DONE and FAIL.
185 (define_peephole2): Ditto.
187 2018-07-05 Jeff Law <law@redhat.com>
189 PR tree-optimization/86010
190 * tree-ssa-dse.c (compute_trims): More aggressively trim at
191 both the head and tail of mem* and str* calls.
193 2018-07-05 Jim Wilson <jimw@sifive.com>
195 * config.gcc (riscv*-*-*): When setting xlen, handle riscv-*.
197 2018-07-05 Indu Bhagat <indu.bhagat@oracle.com>
199 * config/aarch64/aarch64-simd.md: correct flags text for
200 MIN_EXPR replacement.
202 2018-07-05 James Clarke <jrtc27@jrtc27.com>
204 * configure: Regenerated.
206 2018-07-05 Carl Love <cel@us.ibm.com>
208 * config/rs6000/rs6000-c.c: Map ALTIVEC_BUILTIN_VEC_UNPACKH for
209 float argument to VSX_BUILTIN_DOUBLEH_V4SF.
210 Map ALTIVEC_BUILTIN_VEC_UNPACKL for float argument to
211 VSX_BUILTIN_DOUBLEL_V4SF.
213 2018-07-05 Martin Sebor <msebor@redhat.com>
216 * tree-ssa-strlen.c (maybe_set_strlen_range): Use type size rather
217 than its domain to compute its the upper bound of a char array.
219 2018-07-05 Nathan Sidwell <nathan@acm.org>
221 Replace NO_IMPLICIT_EXTERN_C with SYSTEM_IMPLICIT_EXTERN_C.
222 * doc/cpp.texi: Update comment.
223 * doc/tm.texi: Rebuilt.
224 * doc/tm.texi.in (NO_IMPLICIT_EXTERN_C): Replace with ...
225 (SYSTEM_IMPLICIT_EXTERN_C): ... this, opposite sense.
226 * doc/extend.texi (Backwards Compatibility): Clarify it is system
227 headers affected by extern "C".
228 * system.h: Poison NO_IMPLICIT_EXTERN_C.
229 * config/alpha/alpha.h, config/arm/uclinux-elf.h,
230 config/bfin/elf.h, config/cris/cris.h, config/darwin.h,
231 config/dragonfly.h, config/freebsd.h, config/gnu-user.h,
232 config/i386/cygming.h, config/i386/djgpp.h, config/i386/nto.h,
233 config/ia64/hpux.h, config/lm32/lm32.h, config/lm32/uclinux-elf.h,
234 config/lynx.h, config/mips/elf.h, config/mmix/mmix.h,
235 config/netbsd.h, config/pa/pa-hpux.h, config/powerpcspe/sysv4.h,
236 config/riscv/elf.h, config/rs6000/sysv4.h, config/rtems.h,
237 config/s390/tpf.h, config/sh/newlib.h, config/sol2.h,
238 config/sparc/openbsd64.h, config/sparc/sp-elf.h,
239 config/sparc/sp64-elf.h, config/spu/spu.h,
240 config/stormy16/stormy16.h, config/v850/v850.h,
241 config/visium/visium.h, config/vx-common.h, config/xtensa/elf.h: Don't
242 define NO_IMPLICIT_EXTERN_C.
243 * config/rs6000/aix.h: Set SYSTEM_IMPLICIT_EXTERN_C.
245 2018-07-05 Tamar Christina <tamar.christina@arm.com>
248 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
249 instead of GET_MODE_SIZE when comparing Units.
251 2018-07-05 Tamar Christina <tamar.christina@arm.com>
254 * rtlanal.c (set_noop_p): Constrain on mode change,
255 include hard-reg-set.h
257 2018-07-05 Tamar Christina <tamar.christina@arm.com>
259 * config/aarch64/aarch64.c (aarch64_expand_movmem): Fix mode size.
261 2018-07-05 Jakub Jelinek <jakub@redhat.com>
264 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
267 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
269 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
271 2018-07-04 Maxim Ostapenko <m.ostapenko@samsung.com>
274 * config/gnu-user.h (LIBASAN_EARLY_SPEC): Pass -lstdc++ for static
276 * gcc.c: Do not pass LIBUBSAN_SPEC if ASan is enabled with UBSan.
278 2018-07-04 Eric Botcazou <ebotcazou@adacore.com>
281 * expmed.c (choose_multiplier): Fix incorrect comparison with mask.
283 2018-07-04 Aldy Hernandez <aldyh@redhat.com>
285 * tree-vrp.c (extract_range_from_binary_expr_1): Initialize
288 2018-07-04 Martin Liska <mliska@suse.cz>
290 * tree-switch-conversion.c: Define
291 max_ratio_for_speed and max_ratio_for_size constants.
293 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
294 Martin Liska <mliska@suse.cz>
299 * common.opt: Rename align options with 'str_' prefix.
300 * common/config/i386/i386-common.c (set_malign_value): New
302 (ix86_handle_option): Use it to set -falign-* options/
303 * config/aarch64/aarch64-protos.h (struct tune_params): Change
304 type from int to string.
305 * config/aarch64/aarch64.c: Update default values from int
307 * config/alpha/alpha.c (alpha_override_options_after_change):
309 * config/arm/arm.c (arm_override_options_after_change_1): Likewise.
310 * config/i386/dragonfly.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
311 max skip conditionally.
312 * config/i386/freebsd.h (SUBALIGN_LOG): New.
313 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
314 max skip conditionally.
315 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
316 max skip conditionally.
317 * config/i386/gnu-user.h (SUBALIGN_LOG): New.
318 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
319 max skip conditionally.
320 * config/i386/i386.c (struct ptt): Change type from int to
322 (ix86_default_align): Set default values.
323 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Print
324 max skip conditionally.
325 * config/i386/iamcu.h (SUBALIGN_LOG): New.
326 (ASM_OUTPUT_MAX_SKIP_ALIGN):
327 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN):
328 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
329 max skip conditionally.
330 * config/i386/openbsdelf.h (SUBALIGN_LOG): New.
331 (ASM_OUTPUT_MAX_SKIP_ALIGN) Print max skip conditionally.:
332 * config/i386/x86-64.h (SUBALIGN_LOG): New.
333 (ASM_OUTPUT_MAX_SKIP_ALIGN): Print
334 max skip conditionally.
335 (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
336 * config/ia64/ia64.c (ia64_option_override): Set default values
337 for alignment options.
338 * config/m68k/m68k.c: Handle new str_align_* options.
339 * config/mips/mips.c (mips_set_compression_mode): Change
341 (mips_option_override): Set default values for options.
342 * config/powerpcspe/powerpcspe.c (rs6000_option_override_internal):
344 * config/rs6000/rs6000.c (rs6000_option_override_internal):
346 * config/rx/rx.c (rx_option_override): Likewise.
347 * config/rx/rx.h (JUMP_ALIGN): Use align_jumps_log.
348 (LABEL_ALIGN): Use align_labels_log.
349 (LOOP_ALIGN): Use align_loops_align.
350 * config/s390/s390.c (s390_asm_output_function_label): Use new
352 * config/sh/sh.c (sh_override_options_after_change):
353 Change type of constants.
354 * config/spu/spu.c (spu_sched_init): Likewise.
355 * config/sparc/sparc.c (sparc_option_override): Set default
357 * config/visium/visium.c (visium_option_override): Likewise.
358 * config/visium/visium.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Do not
359 emit p2align format with last argument if it's not needed.
360 * doc/invoke.texi: Document extended format of -falign-*.
361 * final.c: Use align_labels alignment.
362 * flags.h (struct target_flag_state): Change type to use
364 (struct align_flags_tuple): New.
365 (struct align_flags): Likewise.
366 (align_loops_log): Redefine macro to use new types.
367 (align_loops_max_skip): Redefine macro to use new types.
368 (align_jumps_log): Redefine macro to use new types.
369 (align_jumps_max_skip): Redefine macro to use new types.
370 (align_labels_log): Redefine macro to use new types.
371 (align_labels_max_skip): Redefine macro to use new types.
372 (align_functions_log): Redefine macro to use new types.
373 (align_loops): Redefine macro to use new types.
374 (align_jumps): Redefine macro to use new types.
375 (align_labels): Redefine macro to use new types.
376 (align_functions): Redefine macro to use new types.
377 (align_functions_max_skip): Redefine macro to use new types.
378 (align_loops_value): New macro.
379 (align_jumps_value): New macro.
380 (align_labels_value): New macro.
381 (align_functions_value): New macro.
382 * function.c (invoke_set_current_function_hook): Propagate
383 alignment values from flags to global variables default in
385 * ipa-icf.c (sem_function::equals_wpa): Use
386 cl_optimization_option_eq instead of memcmp.
387 * lto-streamer.h (cl_optimization_stream_out): Support streaming
389 (cl_optimization_stream_in): Likewise.
390 * optc-save-gen.awk: Support strings in cl_optimization.
391 * opth-gen.awk: Likewise.
392 * opts.c (finish_options): Remove error checking of invalid
394 (MAX_CODE_ALIGN): Remove.
395 (MAX_CODE_ALIGN_VALUE): Likewise.
396 (parse_and_check_align_values): New function.
397 (check_alignment_argument): Likewise.
398 (common_handle_option): Use check_alignment_argument.
399 * opts.h (parse_and_check_align_values): Declare.
400 * toplev.c (init_alignments): Remove.
401 (read_log_maxskip): New.
402 (parse_N_M): Likewise.
403 (parse_alignment_opts): Likewise.
404 (backend_init_target): Remove usage of init_alignments.
405 * toplev.h (parse_alignment_opts): Declare.
406 * tree-streamer-in.c (streamer_read_tree_bitfields): Add new
408 * tree-streamer-out.c (streamer_write_tree_bitfields): Likewise.
409 * tree.c (cl_option_hasher::equal): New.
410 * varasm.c: Use new global macros.
412 2018-07-04 Denys Vlasenko <dvlasenk@redhat.com>
414 * config/i386/dragonfly.h: (ASM_OUTPUT_MAX_SKIP_ALIGN):
415 Use a simpler align directive also if MAXSKIP = ALIGN-1.
416 * config/i386/gas.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
417 * config/i386/lynx.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
418 * config/i386/netbsd-elf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
419 * config/i386/i386.h (ASM_OUTPUT_MAX_SKIP_PAD): Likewise.
420 * config/i386/freebsd.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Remove "If N
421 is large, do at least 8 byte alignment" code. Add SUBALIGN_LOG
422 define. Use a simpler align directive also if MAXSKIP = ALIGN-1.
423 * config/i386/gnu-user.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
424 * config/i386/iamcu.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
425 * config/i386/openbsdelf.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
426 * config/i386/x86-64.h (ASM_OUTPUT_MAX_SKIP_ALIGN): Likewise.
428 2018-07-04 Martin Liska <mliska@suse.cz>
429 Jonathan Wakely <jwakely@redhat.com>
431 * coverage.c: Use correct type.
432 * doc/invoke.texi: Language correction.
434 2018-07-03 H.J. Lu <hongjiu.lu@intel.com>
437 * config/i386/i386.c (rest_of_insert_endbranch): Also generate
438 ENDBRANCH for non-tail call which may return via indirect branch.
439 * doc/extend.texi: Document indirect_return attribute.
441 2018-07-03 Martin Sebor <msebor@redhat.com>
443 PR tree-optimization/86274
444 * gimple-ssa-sprintf.c (fmtresult::type_max_digits): Verify
446 (format_floating): Correct handling of infinities and NaNs.
448 2018-07-03 Martin Sebor <msebor@redhat.com>
450 * print-tree.c (print_real_cst): New function.
451 (print_node_brief): Call it.
454 2018-07-03 Jeff Law <law@redhat.com>
456 * config/h8300/h8300.md (logical<mode>3_sn, logical<mode>3): Merge
457 into a single pattern.
459 * config/h8300/h8300.md (ors code_iterator): New.
460 (bsetqi_msx, bnotqi_msx patterns and splitters): Consolidate into
461 a single pattern and single splitter.
462 (bsethi_msx, bnothi_msx patterns): Consolidate into a single pattern.
463 (iorqi3_1, xorqi3_1): Likewise.
464 (iorqi3, xorqi3 expanders): Similarly.
466 * config/h8300/h8300.md (movmd_internal_normal): Consolidated with
467 (movmd_internal) into a single pattern using the P mode iterator.
468 (movmd splitters): Similarly.
469 (stpcpy_internal_normal, stpcpy_internal): Similarly for thes patterns.
470 (movsd splitters): Similarly.
472 * config/h8300/h8300.c (h8300_insn_length_from_table): Consolidate
473 ADDB, ADDW and ADDL into a single ADD attribute which selects the
474 right table based on the size of the operand.
475 * config/h8300/h8300.md (length_table): Corresponding changes. All
476 references to "addb", "addw" and "addl" changed to "add".
477 (btst patterns): Merge two variants into a single pattern.
478 (tstqi, tsthi): Likewise.
479 (addhi3_incdec, addsi3_incdec): Likewise.
480 (subhi3_h8300hs, subsi3_h8300hs): Likewise.
481 (mulhi3, mulsi3): Likewise.
482 (udivhi3, udivsi3): Likewise.
483 (divhi3, divsi3): Likewise.
484 (andorqi3, andorhi3, andorsi3): Likewise.
486 2018-07-03 Uros Bizjak <ubizjak@gmail.com>
489 * config/i386/sse.md (uavg<mode>3_ceil): New expander.
490 (<sse2_avx2>_uavg<mode>3<mask_name>): Simplify expander.
492 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
494 PR tree-optimization/85694
495 * config/aarch64/iterators.md (HADD, RHADD): New int iterators.
496 (u): Handle UNSPEC_SHADD, UNSPEC_UHADD, UNSPEC_SRHADD and
498 * config/aarch64/aarch64-simd.md (<u>avg<mode>3_floor)
499 (<u>avg<mode>3_ceil): New patterns.
501 2018-07-03 David Malcolm <dmalcolm@redhat.com>
503 * gcc.dg/vect/slp-perm-1.c: Remove "note: " prefix from
504 scan-tree-dump directive.
505 * gcc.dg/vect/slp-perm-2.c: Likewise.
506 * gcc.dg/vect/slp-perm-3.c: Likewise.
507 * gcc.dg/vect/slp-perm-5.c: Likewise.
508 * gcc.dg/vect/slp-perm-6.c: Likewise.
509 * gcc.dg/vect/slp-perm-7.c: Likewise.
510 * gcc.dg/vect/slp-perm-8.c: Likewise.
512 2018-07-03 Marek Polacek <polacek@redhat.com>
515 * gimple-fold.c (size_must_be_zero_p): Check the type of the size.
517 2018-07-03 Richard Biener <rguenther@suse.de>
520 * tree-ssa-structalias.c (find_func_clobbers): Properly
521 handle indirect calls.
523 2018-07-03 Jeff Law <law@redhat.com>
525 * config/h8300/h8300.md (HSI, QHSI, QHSIF): New mode iterators.
526 (shifts): New code iterator.
527 (movqi, movhi, movsi, movsf expanders): Consolidate into a single
528 expander. Fix HImode handling on H8/SX.
529 (addqi3, addhi3, addsi3 expanders): Consolidate into a single expander.
530 (subqi3, subhi3, subsi3 expanders): Likewise.
531 (andqi3, andhi3, andsi3 expanders): Likewise.
532 (iorqi3, iorhi3, iorsi3 expanders): Likewise.
533 (xorqi3, xorhi3, xorsi3 expanders): Likewise.
534 (negqi2, neghi2, negsi2, negsf2 expanders): Likewise.
535 (one_cmplqi2, one_cmplhi2, one_cmplsi2): Likewise.
536 (zero_extendqihi2, zero_extendqisi2): Likewise.
537 (extendqihi2, extendqisi2): Likewise.
538 (rotlqi3, rotlhi3, rotlsi3): Likewise.
539 (neghi2_h8300, negsi2_h8300): Likewise for these patterns.
540 (rotlqi3_1, rotlhi3_1): Likewise.
541 (logicalhi3_sn, logicalsi3_sn): Likewise.
542 (logicalhi3, logicalsi3): Likewise.
544 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
546 * tree-vect-patterns.c (vect_recog_rotate_pattern)
547 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
548 (vect_recog_mixed_size_cond_pattern, adjust_bool_pattern_cast)
549 (adjust_bool_pattern, vect_recog_bool_pattern): Pass the vector
550 type to append_pattern_def_seq instead of creating a stmt_vec_info
552 (build_mask_conversion): Likewise. Remove vinfo argument.
553 (vect_add_conversion_to_patterm): Likewise, renaming to...
554 (vect_add_conversion_to_pattern): ...this.
555 (vect_recog_mask_conversion_pattern): Update call to
556 build_mask_conversion. Pass the vector type to
557 append_pattern_def_seq here too.
558 (vect_recog_gather_scatter_pattern): Update call to
559 vect_add_conversion_to_pattern.
561 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
563 * tree-vect-patterns.c (new_pattern_def_seq): Delete.
564 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
565 (vect_recog_widen_op_pattern, vect_recog_over_widening_pattern)
566 (vect_recog_rotate_pattern, vect_synth_mult_by_constant): Don't set
567 STMT_VINFO_PATTERN_DEF_SEQ to null here.
568 (vect_recog_pow_pattern, vect_recog_vector_vector_shift_pattern)
569 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern): Use
570 append_pattern_def_seq instead of new_pattern_def_seq.
571 (vect_recog_divmod_pattern): Do both of the above.
572 (vect_pattern_recog_1): Assert that STMT_VINO_PATTERN_DEF_SEQ
575 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
577 * tree-vect-patterns.c (vect_recog_dot_prod_pattern):
578 (vect_recog_sad_pattern, vect_recog_widen_op_pattern)
579 (vect_recog_widen_mult_pattern, vect_recog_pow_pattern):
580 (vect_recog_widen_sum_pattern, vect_recog_over_widening_pattern)
581 (vect_recog_average_pattern, vect_recog_cast_forwprop_pattern)
582 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
583 (vect_recog_vector_vector_shift_pattern, vect_synth_mult_by_constant)
584 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
585 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
586 (vect_recog_mask_conversion_pattern): Replace vec<gimple *>
587 parameter with a single stmt_vec_info.
588 (vect_recog_func_ptr): Likewise.
589 (vect_recog_gather_scatter_pattern): Likewise, folding in...
590 (vect_try_gather_scatter_pattern): ...this.
591 (vect_pattern_recog_1): Remove stmts_to_replace and just pass
592 the stmt_vec_info of the statement to be matched. Don't clear
593 STMT_VINFO_RELATED_STMT.
594 (vect_pattern_recog): Update call accordingly.
596 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
598 PR tree-optimization/85694
599 * doc/md.texi (avgM3_floor, uavgM3_floor, avgM3_ceil)
600 (uavgM3_ceil): Document new optabs.
601 * doc/sourcebuild.texi (vect_avg_qi): Document new target selector.
602 * internal-fn.def (IFN_AVG_FLOOR, IFN_AVG_CEIL): New internal
604 * optabs.def (savg_floor_optab, uavg_floor_optab, savg_ceil_optab)
605 (savg_ceil_optab): New optabs.
606 * tree-vect-patterns.c (vect_recog_average_pattern): New function.
607 (vect_vect_recog_func_ptrs): Add it.
608 * tree-vect-stmts.c (vectorizable_call): Get the type of the zero
609 constant directly from the associated lhs.
611 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
613 * tree-vect-patterns.c (vect_split_statement): New function.
614 (vect_convert_input): Use it to try to split an existing cast.
616 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
618 * poly-int.h (print_hex): New function.
619 * dumpfile.h (dump_dec, dump_hex): Declare.
620 * dumpfile.c (dump_dec, dump_hex): New poly_wide_int functions.
621 * tree-vectorizer.h (_stmt_vec_info): Add min_output_precision,
622 min_input_precision, operation_precision and operation_sign.
623 * tree-vect-patterns.c (vect_get_range_info): New function.
624 (vect_same_loop_or_bb_p, vect_single_imm_use)
625 (vect_operation_fits_smaller_type): Delete.
626 (vect_look_through_possible_promotion): Add an optional
627 single_use_p parameter.
628 (vect_recog_over_widening_pattern): Rewrite to use new
629 stmt_vec_info infomration. Handle one operation at a time.
630 (vect_recog_cast_forwprop_pattern, vect_narrowable_type_p)
631 (vect_truncatable_operation_p, vect_set_operation_type)
632 (vect_set_min_input_precision): New functions.
633 (vect_determine_min_output_precision_1): Likewise.
634 (vect_determine_min_output_precision): Likewise.
635 (vect_determine_precisions_from_range): Likewise.
636 (vect_determine_precisions_from_users): Likewise.
637 (vect_determine_stmt_precisions, vect_determine_precisions): Likewise.
638 (vect_vect_recog_func_ptrs): Put over_widening first.
640 (vect_pattern_recog): Call vect_determine_precisions.
642 2018-07-03 Richard Sandiford <richard.sandiford@arm.com>
644 * tree-vect-patterns.c (vect_mark_pattern_stmts): Remove pattern
645 statements that have been replaced by further pattern statements.
646 (vect_pattern_recog_1): Clear STMT_VINFO_PATTERN_DEF_SEQ on failure.
648 2018-07-03 Richard Biener <rguenther@suse.de>
650 * tree-vect-stmts.c (vect_is_simple_use): Consolidate dumping,
651 always set *dt. Dump vectype in vectype overload.
652 * dumpfile.h (dump_gimple_expr): New function.
653 (dump_gimple_expr_loc): Likewise.
654 * dumpfile.c (dump_gimple_expr): New function.
655 (dump_gimple_expr_loc): Likewise.
657 2018-07-02 Jeff Law <law@redhat.com>
659 * config/h8300/h8300.md (movqi_h8300, movqi_h8300hs): Consolidate
660 the H8/300, H8/300H and H8/S variants into a single pattern.
661 (movhi_h8300, movqi_h8300hs): Similarly.
662 (pushqi_h8300hs, pushhi_h8300hs): Consolidate into a single pattern.
663 (QHI mode iterator): New.
665 * config/h8300/h8300.md: Remove trailing whitespace.
667 2018-07-02 Jim Wilson <jimw@sifive.com>
669 * config/riscv/riscv.c (riscv_expand_epilogue): Use emit_jump_insn
670 instead of emit_insn for interrupt returns.
671 * config/riscv/riscv.md (riscv_met): Add (return) to rtl.
672 (riscv_sret, riscv_uret): Likewise.
674 2018-07-02 David Malcolm <dmalcolm@redhat.com>
676 * pretty-print.c (selftest::test_pp_format): Move save and restore
677 of quotes to class auto_fix_quotes, and add an instance.
678 * selftest.c: Include "intl.h".
679 (selftest::auto_fix_quotes::auto_fix_quotes): New ctor.
680 (selftest::auto_fix_quotes::~auto_fix_quotes): New dtor.
681 * selftest.h (selftest::auto_fix_quotes): New class.
683 2018-07-02 Richard Henderson <richard.henderson@linaro.org>
685 * config/aarch64/aarch64-protos.h, config/aarch64/aarch64.c
686 (aarch64_sve_prepare_conditional_op): Remove.
687 * config/aarch64/aarch64-sve.md (cond_<SVE_INT_BINARY><SVE_I>):
688 Allow aarch64_simd_reg_or_zero as select operand; remove
689 the aarch64_sve_prepare_conditional_op call.
690 (cond_<SVE_INT_BINARY_SD><SVE_SDI>): Likewise.
691 (cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
692 (*cond_<SVE_INT_BINARY><SVE_I>_z): New pattern.
693 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_z): New pattern.
694 (*cond_<SVE_COND_FP_BINARY><SVE_F>_z): New pattern.
695 (*cond_<SVE_INT_BINARY><SVE_I>_any): New pattern.
696 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_any): New pattern.
697 (*cond_<SVE_COND_FP_BINARY><SVE_F>_any): New pattern
698 and a splitters to match all of the *_any patterns.
699 * config/aarch64/predicates.md (aarch64_sve_any_binary_operator): New.
701 * config/aarch64/iterators.md (SVE_INT_BINARY_REV): Remove.
702 (SVE_COND_FP_BINARY_REV): Remove.
703 (sve_int_op_rev, sve_fp_op_rev): New.
704 * config/aarch64/aarch64-sve.md (*cond_<SVE_INT_BINARY><SVE_I>_0): New.
705 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_0): New.
706 (*cond_<SVE_COND_FP_BINARY><SVE_F>_0): New.
707 (*cond_<SVE_INT_BINARY><SVE_I>_2): Rename, add movprfx alternative.
708 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_2): Similarly.
709 (*cond_<SVE_COND_FP_BINARY><SVE_F>_2): Similarly.
710 (*cond_<SVE_INT_BINARY><SVE_I>_3): Similarly; use sve_int_op_rev.
711 (*cond_<SVE_INT_BINARY_SD><SVE_SDI>_3): Similarly.
712 (*cond_<SVE_COND_FP_BINARY><SVE_F>_3): Similarly; use sve_fp_op_rev.
714 * config/aarch64/aarch64-sve.md (cond_<SVE_COND_FP_BINARY><SVE_F>):
715 Remove match_dup 1 from the inner unspec.
716 (*cond_<SVE_COND_FP_BINARY><SVE_F>): Likewise.
718 * config/aarch64/aarch64.md (movprfx): New attr.
719 (length): Default movprfx to 8.
720 * config/aarch64/aarch64-sve.md (*mul<SVE_I>3): Add movprfx alt.
721 (*madd<SVE_I>, *msub<SVE_I): Likewise.
722 (*<su>mul<SVE_I>3_highpart): Likewise.
723 (*<SVE_INT_BINARY_SD><SVE_SDI>3): Likewise.
724 (*v<ASHIFT><SVE_I>3): Likewise.
725 (*<su><MAXMIN><SVE_I>3): Likewise.
726 (*<su><MAXMIN><SVE_F>3): Likewise.
727 (*fma<SVE_F>4, *fnma<SVE_F>4): Likewise.
728 (*fms<SVE_F>4, *fnms<SVE_F>4): Likewise.
729 (*div<SVE_F>4): Likewise.
731 2018-07-02 Richard Sandiford <richard.sandiford@arm.com>
733 * tree-vect-patterns.c (vect_recog_widen_shift_pattern): Fix typo
736 2018-07-02 Richard Biener <rguenther@suse.de>
738 PR tree-optimization/86363
739 * tree-ssa-sccvn.c (vn_reference_lookup_3): Check the
740 memset argument refers to a non-variable address.
742 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
744 * tree-vrp.c (extract_range_from_binary_expr_1): Abstract a lot of the
745 {PLUS,MINUS}_EXPR code to...
746 (adjust_symbolic_bound): ...here,
747 (combine_bound): ...here,
748 (set_value_range_with_overflow): ...and here.
750 2018-07-02 Aldy Hernandez <aldyh@redhat.com>
752 * tree-vrp.c (extract_range_from_unary_expr): Abstract ABS_EXPR
754 (extract_range_from_abs_expr): ...here.
756 2018-07-02 Eric Botcazou <ebotcazou@adacore.com>
758 * config/i386/i386.c (ix86_finalize_stack_frame_flags): Do not overrule
759 -fno-omit-frame-pointer when not optimizing.
761 2018-07-02 Martin Liska <mliska@suse.cz>
764 * ipa-pure-const.c (malloc_candidate_p): Revert usage of ::get.
765 (propagate_nothrow): Likewise.
767 2018-07-02 Martin Liska <mliska@suse.cz>
770 * ipa-inline.c (early_inliner): Revert wrongly added ::get call.
772 2018-07-02 David Malcolm <dmalcolm@redhat.com>
774 * dumpfile.c (dump_generic_expr_loc): Undo removal of this
775 function in r262149, changing "loc" param from source_location to
776 const dump_location_t &.
777 * dumpfile.h (dump_generic_expr_loc): Undo removal of this
778 declaration, as above.
780 2018-07-01 Paul Koning <ni1d@arrl.net>
782 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
783 -munit-asm, -mgnu-asm, -mdec-asm.
784 * config/pdp11/pdp11-protos.h (pdp11_gen_int_label): New.
785 (pdp11_output_labelref): New.
786 (pdp11_output_def): New.
787 (pdp11_output_addr_vec_elt): New.
788 * config/pdp11/pdp11.c: Use tab between opcode and operands. Use
789 %# and %@ format codes.
790 (pdp11_option_override): New.
791 (TARGET_ASM_FILE_START_FILE_DIRECTIVE): Define.
792 (pdp11_output_ident): New.
793 (pdp11_asm_named_section): New.
794 (pdp11_asm_init_sections): New.
795 (pdp11_file_start): New.
796 (pdp11_file_end): New.
797 (output_ascii): Use .ascii/.asciz for -mdec-asm.
798 (pdp11_asm_print_operand): Update %# and %$ for -mdec-asm. Add
799 %o, like %c but octal.
800 (pdp11_option_override): New.
801 * config/pdp11/pdp11.h (TEXT_SECTION_ASM_OP): Update for
803 (DATA_SECTION_ASM_OP): Ditto.
804 (READONLY_DATA_SECTION_ASM_OP): New.
805 (IS_ASM_LOGICAL_LINE_SEPARATOR): New.
806 (ASM_GENERATE_INTERNAL_LABEL): Use new function.
807 (ASM_OUTPUT_LABELREF): Ditto.
808 (ASM_OUTPUT_DEF): Ditto.
809 (ASM_OUTPUT_EXTERNAL): New.
810 (ASM_OUTPUT_SOURCE_FILENAME): New.
811 (ASM_OUTPUT_ADDR_VEC_ELT): Use new function.
812 (ASM_OUTPUT_SKIP): Update for -mdec-asm.
813 * config/pdp11/pdp11.md: Use tab between opcode and operands. Use
814 %# and %@ format codes.
815 * config/pdp11/pdp11.opt (mgnu-asm): New.
816 (mdec-asm): Conflicts with -mgnu-asm and -munix-asm.
817 (munix-asm): Conflicts with -mdec-asm and -mgnu-asm.
818 * doc/invoke.txt (PDP-11 Options): Add -mgnu-asm.
820 2018-07-01 Aldy Hernandez <aldyh@redhat.com>
822 * tree-ssa-threadupdate.c (mark_threaded_blocks): Avoid
823 dereferencing path[] beyond its length.
825 (debug_all_paths): New.
826 (rewire_first_differing_edge): New.
827 (adjust_paths_after_duplication): New.
828 (duplicate_thread_path): Call adjust_paths_after_duplication.
830 (thread_through_all_blocks): Add new argument to
831 duplicate_thread_path.
833 2018-06-30 Jim Wilson <jimw@sifive.com>
835 * config/riscv/predicates.md (p2m1_shift_operand): New.
836 (high_mask_shift_operand): New.
837 * config/riscv/riscv.md (lshrsi3_zero_extend_3+1): New combiner
838 pattern using p2m1_shift_operand.
839 (lshsi3_zero_extend_3+2): New combiner pattern using
840 high_mask_shift_operand.
842 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
844 * tree-vect-patterns.c (vect_get_external_def_edge): New function,
846 (vect_recog_rotate_pattern): ...here.
847 (vect_convert_input): Try to insert casts of invariants in the
849 * tree-vect-loop-manip.c (vect_loop_versioning): Don't require the
850 preheader to be empty.
852 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
854 * tree-vect-patterns.c (append_pattern_def_seq): Take an optional
855 vector type. If given, install it in the new statement's
857 (vect_element_precision): New function.
858 (vect_unpromoted_value): New struct.
859 (vect_unpromoted_value::vect_unpromoted_value): New function.
860 (vect_unpromoted_value::set_op): Likewise.
861 (vect_look_through_possible_promotion): Likewise.
862 (vect_joust_widened_integer, vect_joust_widened_type): Likewise.
863 (vect_widened_op_tree, vect_convert_input): Likewise.
864 (vect_convert_inputs, vect_convert_output): Likewise.
865 (vect_recog_dot_prod_pattern): Use vect_look_through_possible_promotion
866 to handle the optional cast of the multiplication result and
867 vect_widened_op_tree to detect the widened multiplication itself.
868 Do not require the input and output of promotion casts to have
869 the same sign, but base the signedness of the operation on the
870 input rather than the result. If the pattern includes two
871 promotions, check that those promotions have the same sign.
872 Do not restrict the MULT_EXPR handling to a double-width result;
873 handle quadruple-width results and wider. Use vect_convert_inputs
874 to convert the inputs to the common type.
875 (vect_recog_sad_pattern): Use vect_look_through_possible_promotion
876 to handle the optional cast of the ABS result. Also allow a sign
877 change or a sign extension between the ABS and MINUS.
878 Use vect_widened_op_tree to detect the widened subtraction and use
879 vect_convert_inputs to convert the inputs to the common type.
880 (vect_handle_widen_op_by_const): Delete.
881 (vect_recog_widen_op_pattern): New function.
882 (vect_recog_widen_mult_pattern): Use it.
883 (vect_recog_widen_shift_pattern): Likewise.
884 (vect_recog_widen_sum_pattern): Use
885 vect_look_through_possible_promotion to handle the promoted
888 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
890 * gimple-iterator.c (gsi_for_stmt): Add a new overload that takes
891 the containing gimple_seq *.
892 * gimple-iterator.h (gsi_for_stmt): Declare it.
893 * tree-vect-patterns.c (vect_recog_dot_prod_pattern)
894 (vect_recog_sad_pattern, vect_recog_widen_sum_pattern)
895 (vect_recog_widen_shift_pattern, vect_recog_rotate_pattern)
896 (vect_recog_vector_vector_shift_pattern, vect_recog_divmod_pattern)
897 (vect_recog_mask_conversion_pattern): Remove STMT_VINFO_IN_PATTERN_P
899 (vect_init_pattern_stmt, vect_set_pattern_stmt): New functions,
901 (vect_mark_pattern_stmts): ...here. Handle cases in which the
902 statement being replaced is part of an existing pattern
903 definition sequence, inserting the new pattern statements before
905 (vect_pattern_recog_1): Don't return a bool. If the statement
906 is already part of a pattern, instead apply pattern matching
907 to the pattern definition statements. Don't clear the
908 STMT_VINFO_RELATED_STMT if is_pattern_stmt_p.
909 (vect_pattern_recog): Don't break after the first match;
910 continue processing the pattern definition statements instead.
911 Don't bail out for STMT_VINFO_IN_PATTERN_P here.
913 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
915 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
916 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
917 (vect_recog_widen_sum_pattern): Use it.
919 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
921 * tree-vect-loop.c (vectorizable_reduction): Assert that the
922 phi is not a pattern statement and has not been replaced by
924 * tree-vect-patterns.c (type_conversion_p): Don't check
925 STMT_VINFO_IN_PATTERN_P.
926 (vect_recog_vector_vector_shift_pattern): Likewise.
927 (vect_recog_dot_prod_pattern): Expect vect_is_simple_use to return
928 the pattern statement rather than the original statement; check
929 directly for a WIDEN_MULT_EXPR here.
930 * tree-vect-slp.c (vect_get_and_check_slp_defs): Expect
931 vect_is_simple_use to return the pattern statement rather
932 than the original statement; use is_pattern_stmt_p to check
933 for such a pattern statement.
934 * tree-vect-stmts.c (process_use): Expect vect_is_simple_use
935 to return the pattern statement rather than the original statement;
936 don't do the same transformation here.
937 (vect_is_simple_use): If the defining statement has been replaced
938 by a pattern statement, return the pattern statement instead.
939 Remove the corresponding (local) transformation from the vectype
942 2018-06-30 Richard Sandiford <richard.sandiford@arm.com>
944 * tree-vectorizer.h (vect_is_simple_use): Move the gimple ** to the
945 end and default to null.
946 * tree-vect-loop.c (vect_create_epilog_for_reduction)
947 (vectorizable_reduction): Update calls accordingly, dropping the
948 gimple ** argument if the passed-back statement isn't needed.
949 * tree-vect-patterns.c (vect_get_internal_def, type_conversion_p)
950 (vect_recog_rotate_pattern): Likewise.
951 (vect_recog_mask_conversion_pattern): Likewise.
952 * tree-vect-slp.c (vect_get_and_check_slp_defs): Likewise.
953 (vect_mask_constant_operand_p): Likewise.
954 * tree-vect-stmts.c (is_simple_and_all_uses_invariant, process_use):
955 (vect_model_simple_cost, vect_get_vec_def_for_operand): Likewise.
956 (get_group_load_store_type, get_load_store_type): Likewise.
957 (vect_check_load_store_mask, vect_check_store_rhs): Likewise.
958 (vectorizable_call, vectorizable_simd_clone_call): Likewise.
959 (vectorizable_conversion, vectorizable_assignment): Likewise.
960 (vectorizable_shift, vectorizable_operation): Likewise.
961 (vectorizable_store, vect_is_simple_cond): Likewise.
962 (vectorizable_condition, vectorizable_comparison): Likewise.
963 (get_same_sized_vectype, vect_get_mask_type_for_stmt): Likewise.
964 (vect_is_simple_use): Rename the def_stmt argument to def_stmt_out
965 and move it to the end. Cope with null def_stmt_outs.
967 2018-06-30 Bernd Edlinger <bernd.edlinger@hotmail.de>
969 * Makefile.in (FLAGS_TO_PASS): Add RANLIB_FOR_TARGET.
971 2018-06-29 Jeff Law <law@redhat.com>
973 * config/v850/v850.c (v850_legitimate_address_p): Handle large
974 displacements for TARGET_V850E2V3 and newer.
975 (TARGET_LRA_P): Remove. Defaults to LRA now.
976 * config/v850/v850.md (sign23byte_load): Remove.
977 (unsign23byte_load, sign23hword_load, unsign23hword_load): Likewise.
978 (23word_load, 23byte_store, 23hword_store, 23word_store): Likewise.
980 2018-06-29 Martin Liska <mliska@suse.cz>
983 * coverage.c (coverage_init): Mangle full path name.
984 * doc/invoke.texi: Document the change.
985 * gcov-io.c (mangle_path): New.
986 * gcov-io.h (mangle_path): Likewise.
987 * gcov.c (mangle_name): Use mangle_path for path mangling.
989 2018-06-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
991 * config/arm/arm.c (output_move_double): Don't allow STRD instructions
992 if starting source register is not even.
994 2018-06-29 Martin Liska <mliska@suse.cz>
996 PR tree-optimization/86263
997 * tree-switch-conversion.c (switch_decision_tree::try_switch_expansion):
998 Make edge redirection.
1000 2018-06-29 David Malcolm <dmalcolm@redhat.com>
1002 * dumpfile.c (dump_loc): Add indentation based on scope depth.
1003 (dump_scope_depth): New variable.
1004 (get_dump_scope_depth): New function.
1005 (dump_begin_scope): New function.
1006 (dump_end_scope): New function.
1007 * dumpfile.h (get_dump_scope_depth): New declaration.
1008 (dump_begin_scope): New declaration.
1009 (dump_end_scope): New declaration.
1010 (class auto_dump_scope): New class.
1011 (AUTO_DUMP_SCOPE): New macro.
1012 * tree-vectorizer.h (DUMP_VECT_SCOPE): Reimplement in terms of
1015 2018-06-29 Richard Biener <rguenther@suse.de>
1017 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences): Assert
1018 compute_all_dependences succeeds.
1019 * tree-vect-loop.c (vect_get_datarefs_in_loop): Fail early if we
1020 exceed --param loop-max-datarefs-for-datadeps.
1022 2018-06-29 Jakub Jelinek <jakub@redhat.com>
1024 * config/rs6000/t-rs6000: Append rs6000-modes.h to TM_H.
1026 2018-06-28 Uros Bizjak <ubizjak@gmail.com>
1029 * config/i386/sse.md (*vec_extractv4si_0_zext_sse4): Use
1030 alternative 0 in preferred_for_speed attribute.
1032 2018-06-28 Paul Koning <ni1d@arrl.net>
1034 * config/pdp11/pdp11-protos.h (pdp11_shift_length): New function.
1035 * config/pdp11/pdp11.c (pdp11_shift_length): New function.
1036 * config/pdp11/pdp11.h (ADJUST_INSN_LENGTH): Remove.
1037 * config/pdp11/pdp11.md: Correct "length" attribute calculation
1038 for shift insn patterns.
1040 2018-06-28 David Malcolm <dmalcolm@redhat.com>
1042 * cgraph.c (cgraph_node::get_body): Replace assignments to
1043 "dump_file" with calls to set_dump_file.
1044 * dumpfile.c (alt_dump_file): Make static, and group with...
1045 (alt_flags): ...this definition.
1046 (dumps_are_enabled): New variable.
1047 (refresh_dumps_are_enabled): New function.
1048 (set_dump_file): New function.
1049 (set_alt_dump_file): New function.
1050 (gcc::dump_manager::dump_start): Replace assignments to
1051 "dump_file" and "alt_dump_file" with calls to set_dump_file and
1053 (gcc::dump_manager::dump_finish): Likewise.
1054 * dumpfile.h (alt_dump_file): Delete decl.
1055 (dumps_are_enabled): New variable decl.
1056 (set_dump_file): New function decl.
1057 (dump_enabled_p): Rewrite in terms of new "dumps_are_enabled"
1059 * tree-nested.c (lower_nested_functions): Replace assignments to
1060 "dump_file" with calls to set_dump_file.
1062 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
1064 * tree-cfg.c (verify_gimple_in_cfg): Call verify_location on the
1065 goto_locus of each outgoing edge of each basic block.
1067 2018-06-28 Richard Biener <rguenther@suse.de>
1069 * dwarf2out.c (decl_scope_table): Remove.
1070 (push_decl_scope): Likewise.
1071 (pop_decl_scope): Likewise.
1072 (gen_type_die_for_member): Do not call push/pop_decl_scope.
1073 (gen_struct_or_union_type_die): Likewise.
1074 (gen_tagged_type_die): Likewise.
1075 (dwarf2out_init): Do not initialize decl_scope_table.
1076 (dwarf2out_c_finalize): Do not free it.
1078 2018-06-28 Richard Biener <rguenther@suse.de>
1080 * dwarf2out.c (gen_subprogram_die): Use is_unit_die when
1081 deciding whether to not re-use a DIE.
1083 2018-06-28 Richard Biener <rguenther@suse.de>
1085 * dwarf2out.c (gen_subprogram_die): Always re-use DIEs with an
1086 DW_AT_abstract_origin attribute.
1088 2018-06-28 Martin Liska <mliska@suse.cz>
1090 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
1091 Use newly introduced constants.
1092 * tree-switch-conversion.h (struct jump_table_cluster):
1093 Define max_ratio_for_size and max_ratio_for_speed.
1095 2018-06-28 Martin Liska <mliska@suse.cz>
1097 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1098 Add new checking assert to catch invalid state.
1099 (jump_table_cluster::can_be_handled): Handle single case
1101 (jump_table_cluster::is_beneficial): Bail out for such case.
1102 (bit_test_cluster::find_bit_tests):
1103 Add new checking assert to catch invalid state.
1104 (bit_test_cluster::can_be_handled): Handle single case
1106 (bit_test_cluster::is_beneficial): Bail out for such case.
1107 (switch_decision_tree::analyze_switch_statement):
1110 2018-06-28 Martin Liska <mliska@suse.cz>
1112 * common.opt: Introduce -completion option.
1113 * gcc.c (driver_handle_option): Handle it.
1114 (driver::main): Print completions if completion
1116 * opt-suggestions.c (option_proposer::get_completions):
1118 (option_proposer::suggest_completion): Likewise.
1119 (option_proposer::find_param_completions): Likewise.
1120 (verify_autocompletions): Likewise.
1121 (test_completion_valid_options): Likewise.
1122 (test_completion_valid_params): Likewise.
1123 (in_completion_p): Likewise.
1124 (empty_completion_p): Likewise.
1125 (test_completion_partial_match): Likewise.
1126 (test_completion_garbage): Likewise.
1127 (opt_proposer_c_tests): Likewise.
1128 * opt-suggestions.h: Declare new functions.
1129 * opts.c (common_handle_option): Handle OPT__completion_.
1130 * selftest-run-tests.c (selftest::run_tests): Add
1131 opt_proposer_c_tests.
1132 * selftest.c (assert_str_startswith): New.
1133 * selftest.h (assert_str_startswith): Likewise.
1134 (opt_proposer_c_tests): New.
1135 (ASSERT_STR_STARTSWITH): Likewise.
1137 2018-06-28 Martin Liska <mliska@suse.cz>
1139 * Makefile.in: Add opt-suggestions.o.
1140 * gcc-main.c: Include opt-suggestions.h.
1141 * gcc.c (driver::driver): Likewise.
1142 (driver::~driver): Remove m_option_suggestions.
1143 (driver::build_option_suggestions): Moved to option_proposer.
1144 (driver::suggest_option): Likewise.
1145 (driver::handle_unrecognized_options): Use option_proposer.
1146 * gcc.h (class driver): Add new memver m_option_proposer.
1147 * opt-suggestions.c: New file.
1148 * opt-suggestions.h: New file.
1150 2018-06-28 Martin Liska <mliska@suse.cz>
1152 * vec.h (class auto_string_vec): New (moved from auto_argvec).
1153 (auto_string_vec::~auto_string_vec): Likewise.
1155 2018-06-28 Eric Botcazou <ebotcazou@adacore.com>
1157 * tree-inline.h (struct copy_body_data): Move remapping_type_depth and
1158 prevent_decl_creation_for_types fields up and add reset_location field.
1159 * tree-inline.c (remap_gimple_stmt): Force input_location on the new
1160 statement if id->reset_location is true.
1161 (copy_edges_for_bb): Do not set goto_locus on the new edges if
1162 id->reset_location is true.
1163 (copy_phis_for_bb): Force input_location on the arguments if
1164 id->reset_location is true.
1165 (expand_call_inline): Set id->reset_location if DECL_IGNORED_P
1166 is set on the function to be inlined.
1168 2018-06-27 Stephan Bergmann <sbergman@redhat.com>
1170 * doc/invoke.texi (Debugging Options): Add -gsplit-dwarf.
1172 2018-06-27 Dimitar Dimitrov <dimitar@dinux.eu>
1174 * lra-eliminations.c (update_reg_eliminate): Mark all spanning hard
1175 registers for Pmode.
1176 * lra-lives.c (check_pseudos_live_through_calls): Mark all spanning
1177 hard registers for the clobbered pseudo.
1179 2018-06-27 Paul Koning <ni1d@arrl.net>
1181 * common/config/pdp11/pdp11-common.c (pdp11_handle_option): Handle
1182 mutually exclusive options.
1183 * config/pdp11/constraints.md (h): New constraint.
1184 (O): Update definition to match shift code generation.
1185 (D): New constraint.
1186 * config/pdp11/pdp11-modes.def (CCNZ): Define mode.
1188 * config/pdp11/pdp11-protos.h (int_no_side_effect_operand): New
1190 (output_jump): Change arguments.
1191 (pdp11_fixed_cc_regs): New function.
1192 (pdp11_cc_mode): Ditto.
1193 (pdp11_expand_shift): Ditto.
1194 (pdp11_assemble_shift): Ditto.
1195 (pdp11_small_shift): Ditto.
1196 (pdp11_branch_cost): Remove.
1197 * config/pdp11/pdp11.c (pdp11_assemble_integer): Remove comments
1199 (pdp11_register_move_cost): Update for CC registers.
1200 (pdp11_rtx_costs): Add case for LSHIFTRT.
1201 (pdp11_output_jump): Add CCNZ mode conditional branches.
1202 (notice_update_cc_on_set): Remove.
1203 (pdp11_cc_mode): New function.
1204 (simple_memory_operand): Correct pre/post decrement case.
1205 (no_side_effect_operand): New function.
1206 (pdp11_regno_reg_class): Add CC_REGS class.
1207 (pdp11_fixed_cc_regs): New function.
1208 (pdp11_small_shift): New function.
1209 (pdp11_expand_shift): New function to expand shift insns.
1210 (pdp11_assemble_shift): New function to output shifts.
1211 (pdp11_branch_cost): Remove.
1212 (pdp11_modes_tieable_p): Make QI/HI modes tieable.
1213 * config/pdp11/pdp11.h (SIZE_TYPE): Ensure 16-bit type.
1214 (WCHAR_TYPE): Ditto.
1215 (PTRDIFF_TYPE): Ditto.
1216 (ADJUST_INSN_LENGTH): New macro.
1217 (FIXED_REGISTERS): Add CC registers.
1218 (CALL_USED_REGISTERS): Ditto.
1220 (REG_CLASS_NAMES): Ditto.
1221 (REG_CLASS_CONTENTS): Ditto.
1222 (SELECT_CC_MODE): Use new function.
1223 (TARGET_FLAGS_REGNUM): New macro.
1224 (TARGET_FIXED_CONDITION_CODE_REGS): Ditto.
1225 (cc0_reg_rtx): Remove.
1226 (CC_STATUS_MDEP): Remove.
1227 (CC_STATUS_MDEFP_INIT): Remove.
1228 (CC_IN_FPU): Remove.
1229 (NOTICE_UPDATE_CC): Remove.
1230 (REGISTER_NAMES): Add CC registers.
1231 (BRANCH_COST): Change to constant 1.
1232 * config/pdp11/pdp11.md: Rewrite for CCmode condition code
1234 * config/pdp11/pdp11.opt (mbcopy): Remove.
1235 (mbcopy-builtin): Remove.
1236 (mbranch-cheap): Remove.
1237 (mbranch-expensive): Remove.
1238 * config/pdp11/predicates.md (expand_shift_operand): Update to
1239 match shift code generation.
1240 (ccnz_operator): New predicate.
1241 * doc/invoke.texi (PDP-11 Options): Remove deleted options
1242 -mbcopy, -mbcopy-builtin, -mbranch-cheap, -mbranch-expensive.
1243 Remove non-existent option -mabshi, -mno-abshi. Document mutually
1245 * doc/md.texi (PDP-11): Document new D and h constraints. Update
1246 description of O constraint.
1248 2018-06-27 Jeff Law <law@redhat.com>
1249 Austin Law <austinklaw@gmail.com>
1251 * config/v850/v850.md (addsi3_set_flags): New pattern.
1252 (subsi3_set_flags, negsi2_set_flags, andsi3_set_flags): Likewise.
1253 (iorsi3_set_flags, xorsi3_set_flags, one_cmplsi2_set_flags): Likewise.
1254 (zero_extendhisi2_v850_set_flags): Likewise.
1255 (zero_extendqisi2_v850_set_flags): Likewise.
1256 (ashlsi3_set_flags, ashlsi3_v850e2_set_flags): Likewise.
1257 (lshrsi3_set_flags, lshrsi3_v850e2_set_flags): Likewise.
1258 (ashrsi3_set_flags, ashrsi3_v850e2_set_flags): Likewise.
1260 * config/v850/v850-protos.h (notice_update_cc): Remove.
1261 * config/v850/v850.c (v850_compare_op0, v850_compare_op1): Remove.
1262 (v850_print_operand): Handle 'D' and "d".
1263 (v850_select_cc_mode): Remove ATTRIBUTE_UNUSED for last argument.
1264 Add handling of arithmetic/logical operations compared against zero.
1265 (v850_gen_float_compare): Remove ATTRIBUTE_UNUSED for last argument.
1266 Do not look at v850_compare_op, instead get mode from last argument.
1267 (v850_gen_compare): Remove
1268 (increment_stack): Use addsi3_clobber_flags to avoid splitting failure
1269 after reload for prologue insns.
1270 (expand_prologue): Account for CLOBBER of CC_REGNUM in various
1272 (construct_save_jarl): Likewise.
1273 (TARGET_FLAGS_REGNUM): Define.
1274 * config/v850/v850.h (v850_compare_op0, v850_compare_op1): Remove.
1275 (NOTICE_UPDATE_CC): Remove.
1276 * config/v850/v850.md (v850_tst1): Use (reg:CCZ CC_REGNUM) rather
1277 than cc0. Conditionalize on reload_completed.
1278 (cmpsi_insn, setfcc_insn): Likewise.
1279 (tst1 splitter): Turn into define_and_split which sets the flags
1281 (cstoresi4, cbranchsf4, cbranchdf4, cbranchsi4_insn): Likewise.
1282 (cbranchsi4, branch_normal, branch_invert): Do not expose cc0 here.
1283 (cstoresf4, cstoredf4): Clobber the flags.
1284 (cmpsi, cmpsf, cmpdf): Remove expanders.
1285 (setf_insn): Remove pattern.
1286 (addsi3): Turn into define_and_split which clobbers the flags after
1287 reload and a suitable pattern (addsi3_clobber_flags) for use after
1289 (subsi3, negsi2, andsi3, iorsi3, xorsi3, one_cmplsi2) Likewise.
1290 (ashlsi3, ashlsi3_v850e2, lshrsi3, lsh4si3_v850e2): Likewise.
1291 (ashrsi3, ashrsi3_v850e2): Likewise.
1292 (bins): Clobber the flags.
1293 (movsicc_normal_cc, movsicc_normal, movsicc_tst1): Likewise.
1294 (movsicc_tst1_revesed, sasf, swap and rotate patterns): Likewise.
1295 (fix_loop_counter, call_internal_short, call_internal_long): Likewise.
1296 (call_value_internal_short, call_value_internal_long): Likewise.
1297 (callt_save_interrupt, callt_return_interrupt): Likewise.
1298 (save_interrupt, return_interrupt): Likewise.
1299 (callt_save_all_interrupt, save_all_interrupt): Likewise.
1300 (_save_all_interrupt, callt_restore_all_interrupt): Likewise.
1301 (restore_all_interrupt, _restore_all_interrupt): Likewise.
1302 (All FP comparisons): Only allow after reload has completed.
1304 (divh, divhu): Tweak output template.
1305 (branch_z_normal, branch_z_invert): Remove
1306 (branch_nz_normal, branch_nz_invert): Likewise.
1307 (extendhisi_insn, extendqisi_insn): Do not clobber flags.
1309 * config/v850/v850-modes.def (CCZ, CCNZ): Add new modes.
1310 * config/v850/v850.c (notice_update_cc): Remove.
1311 * config/v850/v850.h (CC_OVERFLOW_UNUSABLE): Remove
1312 (CC_NO_CARRY): Likewise.
1313 (NOTICE_UPDATE_CC): Define to nothing.
1314 * config/v850/v850.md: Remove block comment on cc0 handling
1315 Remove "cc" attribute from all patterns. Remove cc_status handling
1316 from all patterns. Minor formatting fixes.
1318 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1320 * config/aarch64/aarch64-cores.def (cortex-a76): New entry.
1321 (cortex-a76.cortex-a55): Likewise.
1322 * config/aarch64/aarch64-tune.md: Regenerate.
1323 * doc/invoke.texi (AArch64 Options): Document cortex-a76 and
1324 cortex-a76.cortex-a55.
1326 2018-06-27 Jeff Law <law@redhat.com>
1328 * config/v850/t-v850 (MULTILIB_OPTIONS): Remove 8byte-align.
1329 (MULTILIB_DIRNAMES): Similarly.
1331 2018-06-27 Eric Botcazou <ebotcazou@adacore.com>
1333 * gimple.h (gimple_return_retbnd): Delete.
1334 (gimple_return_set_retbnd): Likewise.
1335 * cgraphunit.c (cgraph_node::expand_thunk): Remove call to
1336 gimple_return_set_retbnd.
1337 * gimple-pretty-print.c (dump_gimple_return): Remove call to
1338 gimple_return_retbnd and adjust.
1339 * tree-inline.h (struct copy_body_data): Remove retbnd field.
1340 * tree-inline.c (remap_gimple_stmt): Remove handling of retbnd.
1341 Explicitly return NULL in a couple more cases. Move assertion
1342 on debug statements and remove unreachable code.
1343 (reset_debug_binding): Do not test id->retbnd.
1344 (expand_call_inline): Do not set it.
1346 2018-06-27 Rasmus Villemoes <rv@rasmusvillemoes.dk>
1348 * configure.ac: Add --disable-gcov option.
1349 * configure: Regenerate.
1350 * Makefile.in: Honour @enable_gcov@.
1351 * doc/install.texi: Document --disable-gcov.
1353 2018-06-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1355 * config/arm/arm-cpus.in (cortex-a76): New entry.
1356 (cortex-a76.cortex-a55): Likewise.
1357 * config/arm/arm-tables.opt: Regenerate.
1358 * config/arm/arm-tune.md: Likewise.
1359 * config/arm/driver-arm.c (arm_cpu_table): Add Cortex-A76 entry.
1360 * doc/invoke.texi (ARM Options): Document cortex-a76 and
1361 cortex-a76.cortex-a55.
1363 2018-06-27 Tamar Christina <tamar.christina@arm.com>
1366 * config/aarch64/aarch64.md (*movhf_aarch64): Add dup v0.4h pattern.
1368 2018-06-27 Siddhesh Poyarekar <siddhesh@sourceware.org>
1370 * config/aarch64/aarch64.h (CALL_USE_REGISTERS): Fix obsolete
1372 (EPILOGUE_USES): Likewise.
1374 2018-06-26 Eric Botcazou <ebotcazou@adacore.com>
1376 * tree-inline.c (remap_location): New function extracted from...
1377 (copy_edges_for_bb): Add ID parameter. Remap goto_locus.
1378 (copy_phis_for_bb): ...here. Call remap_location.
1379 (copy_cfg_body): Adjust call to copy_edges_for_bb.
1381 2018-06-26 Aaron Sawdey <acsawdey@linux.ibm.com>
1383 * config/rs6000/rs6000-string.c (expand_block_clear): Don't use
1384 unaligned vsx for 16B memset.
1386 2018-06-26 Segher Boessenkool <segher@kernel.crashing.org>
1389 * config/rs6000/rs6000.c (rs6000_init_builtins): Do not set
1390 ieee128_float_type_node to long_double_type_node unless
1391 TARGET_LONG_DOUBLE_128 is set.
1393 2018-06-26 David Malcolm <dmalcolm@redhat.com>
1395 * cfgloop.c (get_loop_location): Convert return type from
1396 location_t to dump_user_location_t, replacing INSN_LOCATION lookups
1397 by implicit construction from rtx_insn *, and using
1398 dump_user_location_t::from_function_decl for the fallback case.
1399 * cfgloop.h (get_loop_location): Convert return type from
1400 location_t to dump_user_location_t.
1401 * cgraphunit.c (walk_polymorphic_call_targets): Update call to
1402 dump_printf_loc to pass in a dump_location_t rather than a
1403 location_t, via the gimple stmt.
1404 * coverage.c (get_coverage_counts): Update calls to
1405 dump_printf_loc to pass in dump_location_t rather than a
1407 * doc/optinfo.texi (Dump types): Convert example of
1408 dump_printf_loc from taking "locus" to taking "insn". Update
1409 description of the "_loc" calls to cover dump_location_t.
1410 * dumpfile.c: Include "backend.h", "gimple.h", "rtl.h", and
1412 (dump_user_location_t::dump_user_location_t): New constructors,
1413 from gimple *stmt and rtx_insn *.
1414 (dump_user_location_t::from_function_decl): New function.
1415 (dump_loc): Make static.
1416 (dump_gimple_stmt_loc): Convert param "loc" from location_t to
1417 const dump_location_t &.
1418 (dump_generic_expr_loc): Delete.
1419 (dump_printf_loc): Convert param "loc" from location_t to
1420 const dump_location_t &.
1421 (selftest::test_impl_location): New function.
1422 (selftest::dumpfile_c_tests): New function.
1423 * dumpfile.h: Include "profile-count.h".
1424 (class dump_user_location_t): New class.
1425 (struct dump_impl_location_t): New struct.
1426 (class dump_location_t): New class.
1427 (dump_printf_loc): Convert 2nd param from source_location to
1428 const dump_location_t &.
1429 (dump_generic_expr_loc): Delete.
1430 (dump_gimple_stmt_loc): Convert 2nd param from source_location to
1431 const dump_location_t &.
1432 * gimple-fold.c (fold_gimple_assign): Update call to
1433 dump_printf_loc to pass in a dump_location_t rather than a
1434 location_t, via the gimple stmt.
1435 (gimple_fold_call): Likewise.
1436 * gimple-loop-interchange.cc
1437 (loop_cand::analyze_iloop_reduction_var): Update for change to
1438 check_reduction_path.
1439 (tree_loop_interchange::interchange): Update for change to
1441 * graphite-isl-ast-to-gimple.c (scop_to_isl_ast): Update for
1442 change in return-type of find_loop_location.
1443 (graphite_regenerate_ast_isl): Likewise.
1444 * graphite-optimize-isl.c (optimize_isl): Likewise.
1445 * graphite.c (graphite_transform_loops): Likewise.
1446 * ipa-devirt.c (ipa_devirt): Update call to dump_printf_loc to
1447 pass in a dump_location_t rather than a location_t, via the
1449 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
1450 * ipa.c (walk_polymorphic_call_targets): Likewise.
1451 * loop-unroll.c (report_unroll): Convert "locus" param from
1452 location_t to dump_location_t.
1453 (decide_unrolling): Update for change to get_loop_location's
1455 * omp-grid.c (struct grid_prop): Convert field "target_loc" from
1456 location_t to dump_user_location_t.
1457 (grid_find_single_omp_among_assignments_1): Updates calls to
1458 dump_printf_loc to pass in a dump_location_t rather than a
1459 location_t, via the gimple stmt.
1460 (grid_parallel_clauses_gridifiable): Convert "tloc" from
1461 location_t to dump_location_t. Updates calls to dump_printf_loc
1462 to pass in a dump_location_t rather than a location_t, via the
1464 (grid_inner_loop_gridifiable_p): Likewise.
1465 (grid_dist_follows_simple_pattern): Likewise.
1466 (grid_gfor_follows_tiling_pattern): Likewise.
1467 (grid_target_follows_gridifiable_pattern): Likewise.
1468 (grid_attempt_target_gridification): Convert initialization
1469 of local "grid" from memset to zero-initialization; FIXME: does
1470 this require C++11? Update call to dump_printf_loc to pass in a
1471 optinfo_location rather than a location_t, via the gimple stmt.
1472 * profile.c (read_profile_edge_counts): Updates call to
1473 dump_printf_loc to pass in a dump_location_t rather than a
1475 (compute_branch_probabilities): Likewise.
1476 * selftest-run-tests.c (selftest::run_tests): Call
1478 * selftest.h (dumpfile_c_tests): New decl.
1479 * tree-loop-distribution.c (pass_loop_distribution::execute):
1480 Update for change in return type of find_loop_location.
1481 * tree-parloops.c (parallelize_loops): Likewise.
1482 * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Convert
1483 "locus" from location_t to dump_user_location_t.
1484 (canonicalize_loop_induction_variables): Likewise.
1485 * tree-ssa-loop-ivopts.c (tree_ssa_iv_optimize_loop): Update
1486 for change in return type of find_loop_location.
1487 * tree-ssa-loop-niter.c (number_of_iterations_exit): Update call
1488 to dump_printf_loc to pass in a dump_location_t rather than a
1489 location_t, via the stmt.
1490 * tree-ssa-sccvn.c (eliminate_dom_walker::before_dom_children):
1492 * tree-vect-loop-manip.c (find_loop_location): Convert return
1493 type from source_location to dump_user_location_t.
1494 (vect_do_peeling): Update for above change.
1495 (vect_loop_versioning): Update for change in type of
1497 * tree-vect-loop.c (check_reduction_path): Convert "loc" param
1498 from location_t to dump_user_location_t.
1499 (vect_estimate_min_profitable_iters): Update for change in type
1501 * tree-vect-slp.c (vect_print_slp_tree): Convert param "loc" from
1502 location_t to dump_location_t.
1503 (vect_slp_bb): Update for change in type of vect_location.
1504 * tree-vectorizer.c (vect_location): Convert from source_location
1505 to dump_user_location_t.
1506 (try_vectorize_loop_1): Update for change in vect_location's type.
1507 (vectorize_loops): Likewise.
1508 (increase_alignment): Likewise.
1509 * tree-vectorizer.h (vect_location): Convert from source_location
1510 to dump_user_location_t.
1511 (find_loop_location): Convert return type from source_location to
1512 dump_user_location_t.
1513 (check_reduction_path): Convert 1st param from location_t to
1514 dump_user_location_t.
1515 * value-prof.c (check_counter): Update call to dump_printf_loc to
1516 pass in a dump_user_location_t rather than a location_t; update
1517 call to error_at for change in type of "locus".
1518 (check_ic_target): Update call to dump_printf_loc to
1519 pass in a dump_user_location_t rather than a location_t, via the
1522 2018-06-26 Robin Dapp <rdapp@linux.vnet.ibm.com>
1524 * config/s390/s390.h (enum processor_flags): Do not use
1525 default tune parameter when -march was specified.
1527 2018-06-26 Jakub Jelinek <jakub@redhat.com>
1530 * config/i386/i386.md (setcc + movzbl to xor + setcc peephole2s):
1531 Check reg_overlap_mentioned_p in addition to reg_set_p with the same
1534 2018-06-26 Richard Biener <rguenther@suse.de>
1536 PR tree-optimization/86287
1538 * tree-vect-loop.c (vect_transform_loop_stmt): Fix read-after-free.
1539 (vect_analyze_loop): Initialize n_stmts.
1541 2018-06-26 Richard Biener <rguenther@suse.de>
1544 * fold-const.c (fold_convertible_p): Pointer extension
1547 2018-06-26 Alexandre Oliva <aoliva@redhat.com>
1550 * dwarf2out.c (loc_list_has_views): Adjust comments.
1551 (dw_loc_list): Split single cross-partition range with
1554 2018-06-25 Jeff Law <law@redhat.com>
1556 * common/config/v850/v850-common.c (TARGET_DEFAULT_TARGET_FLAGS): Turn
1557 on -mbig-switch by default.
1559 * config/v850/predicates.md (const_float_1_operand): Fix match_code
1561 (const_float_0_operand): Remove unused predicate.
1562 * config/v850/v850.md (define_constants): Remove UNSPEC_LOOP.
1563 (define_c_enum unspec): Add LOOP, RCP and RSQRT constants.
1564 (recipsf2): New expander. Original pattern now called
1566 (recipdf2, recipdf2_insn): Similarly.
1567 (rsqrtsf2, rsqrtsf2_insn): Similarly
1568 (rsqrtdf2, rsqrtdf2_insn): Similarly
1570 2018-06-26 Gerald Pfeifer <gerald@pfeifer.com>
1572 * ginclude/stddef.h: Remove an obsolete comment on FreeBSD 5.
1573 Simplify logic for FreeBSD (twice).
1575 2018-06-25 Martin Sebor <msebor@redhat.com>
1577 PR tree-optimization/86204
1578 * tree-ssa-strlen.c (handle_builtin_strlen): Avoid storing
1579 a strnlen result if it's less than the length of the string.
1581 2018-06-25 Martin Sebor <msebor@redhat.com>
1583 PR tree-optimization/85700
1584 * gimple-fold.c (gimple_fold_builtin_strncat): Adjust comment.
1585 * tree-ssa-strlen.c (is_strlen_related_p): Handle integer subtraction.
1586 (maybe_diag_stxncpy_trunc): Distinguish strncat from strncpy.
1588 2018-06-25 Martin Sebor <msebor@redhat.com>
1590 * doc/extend.texi (Zero-length arrays): Update and clarify.
1592 2018-06-25 Michael Meissner <meissner@linux.ibm.com>
1594 * config.gcc (powerpc64le*): Revert January 16th, 2018 patch that
1595 added IEEE/IBM long double multilib support on PowerPC little
1596 endian Linux systems.
1597 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Likewise.
1598 (MULTILIB_DEFAULTS): Likewise.
1599 * config/rs6000/rs6000.c (rs6000_option_override_internal):
1601 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Likewise.
1602 * config/rs6000/t-ldouble-linux64le-ibm: Delete, no longer used.
1603 * config/rs6000/t-ldouble-linux64le-ieee: Delete, no longer used.
1605 2018-06-25 Alexander Monakov <amonakov@ispras.ru>
1608 * sort.cc (REORDER_23): Avoid memcpy with same destination and source.
1609 (REORDER_45): Likewise.
1611 2018-06-25 Jeff Law <law@redhat.com>
1613 * config/v850/v850.md (divmodhi4): Make sure to sign extend the
1614 dividend to 32 bits. Adjust length.
1615 (udivmodhi4): Cleanup output template. Fix length.
1617 2018-06-25 Carl Love <cel@us.ibm.com>
1619 * config/rs6000/vsx.md: Change word selector to prefered location.
1621 2018-06-25 Richard Biener <rguenther@suse.de>
1623 PR tree-optimization/86304
1624 * tree-vectorizer.c (vectorize_loops): Walk over new possibly
1625 epilogue-if-converted loops as well.
1627 2018-06-25 Jan Hubicka <hubicka@ucw.cz>
1629 * lto-section-out.c (lto_begin_section): Do not print section
1630 name for noaddr and unnumbered dumps.
1632 2018-06-25 Richard Biener <rguenther@suse.de>
1634 * tree-vectorizer.h (struct vec_info_shared): New structure
1635 with parts split out from struct vec_info and loop_nest from
1636 struct _loop_vec_info.
1637 (struct vec_info): Adjust accordingly.
1638 (struct _loop_vec_info): Likewise.
1639 (LOOP_VINFO_LOOP_NEST): Adjust.
1640 (LOOP_VINFO_DATAREFS): Likewise.
1641 (LOOP_VINFO_DDRS): Likewise.
1642 (struct _bb_vec_info): Likewise.
1643 (BB_VINFO_DATAREFS): Likewise.
1644 (BB_VINFO_DDRS): Likewise.
1645 (struct _stmt_vec_info): Add dr_aux member.
1646 (DR_VECT_AUX): Adjust to refer to member of DR_STMTs vinfo.
1647 (DR_MISALIGNMENT_UNINITIALIZED): New.
1648 (set_dr_misalignment): Adjust.
1649 (dr_misalignment): Assert misalign isn't DR_MISALIGNMENT_UNINITIALIZED.
1650 (vect_analyze_loop): Adjust prototype.
1651 (vect_analyze_loop_form): Likewise.
1652 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
1653 Compute dependences lazily.
1654 (vect_record_base_alignments): Use shared datarefs/ddrs.
1655 (vect_verify_datarefs_alignment): Likewise.
1656 (vect_analyze_data_refs_alignment): Likewise.
1657 (vect_analyze_data_ref_accesses): Likewise.
1658 (vect_analyze_data_refs): Likewise.
1659 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Add
1660 constructor parameter for shared part.
1661 (vect_analyze_loop_form): Pass in shared part and adjust.
1662 (vect_analyze_loop_2): Pass in storage for the number of
1663 stmts. Move loop nest finding to the caller. Compute
1665 (vect_analyze_loop): Pass in shared part.
1666 (vect_transform_loop): Verify shared datarefs are unchanged.
1667 * tree-vect-slp.c (_bb_vec_info::_bb_vec_info): Add
1668 constructor parameter for shared part.
1669 (vect_slp_analyze_bb_1): Pass in shared part and adjust.
1670 (vect_slp_bb): Verify shared datarefs are unchanged before
1672 * tree-vect-stmts.c (ensure_base_align): Adjust for DR_AUX
1674 (new_stmt_vec_info): Initialize DR_AUX misalignment to
1675 DR_MISALIGNMENT_UNINITIALIZED.
1676 * tree-vectorizer.c (vec_info::vec_info): Add constructor
1677 parameter for shared part.
1678 (vec_info::~vec_info): Adjust.
1679 (vec_info_shared::vec_info_shared): New.
1680 (vec_info_shared::~vec_info_shared): Likewise.
1681 (vec_info_shared::save_datarefs): Likewise.
1682 (vec_info_shared::check_datarefs): Likewise.
1683 (try_vectorize_loop_1): Construct shared part live for analyses
1684 of a single loop for multiple vector sizes.
1685 * tree-parloops.c (gather_scalar_reductions): Adjust.
1687 2018-06-25 Richard Biener <rguenther@suse.de>
1689 * tree-vect-data-refs.c (vect_find_stmt_data_reference): Modify
1690 DR for SIMD lane accesses here and mark DR with (void *)-1 aux.
1691 (vect_analyze_data_refs): Remove similar code from here and
1692 simplify accordingly.
1694 2018-06-25 Richard Biener <rguenther@suse.de>
1696 * tree-vect-data-refs.c (vect_check_gather_scatter): Fail
1697 for reverse storage order accesses rather than asserting
1698 they cannot happen here.
1700 2018-06-25 Tom de Vries <tdevries@suse.de>
1703 * config/i386/i386.md (define_insn "*tls_global_dynamic_64_<mode>"):
1704 Use data16 instead of .byte for insn prefix.
1706 2018-06-25 Andreas Krebbel <krebbel@linux.ibm.com>
1709 * parser.c (make_char_string_pack): Pass this literal chars
1710 through cpp_interpret_string.
1711 (cp_parser_userdef_numeric_literal): Check the result of
1712 make_char_string_pack.
1714 2018-06-24 Maya Rashish <coypu@sdf.org>
1716 * ginclude/stddef.h: Simplify conditions around avoiding
1717 re-definition of __size_t.
1719 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
1721 * lto-streamer-out.c (tree_is_indexable): Make LABEL_DECL nonindexable
1722 unless it is forced or nonlocal; assert that we stream no IMPORTED_DECL.
1724 2018-06-22 Maya Rashish <coypu@sdf.org>
1726 * doc/invoke.texi (mno-fancy-math-387): Update for changes
1727 made to OpenBSD and NetBSD through the years.
1729 2018-06-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
1731 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
1732 behavior of vec_pack (vector double, vector double) to match
1733 behavior of vec_float2 (vector double, vector double).
1735 2018-06-22 Olivier Hainque <hainque@adacore.com>
1737 * gimplify.c (gimplify_function_tree): Prevent creation
1738 of a trampoline for the address of the current function
1739 passed to entry/exit instrumentation hooks.
1741 2018-06-22 Aaron Sawdey <acsawdey@linux.ibm.com>
1744 * config/rs6000/rs6000-string.c (expand_strn_compare): Handle -m32
1747 2018-06-22 Martin Liska <mliska@suse.cz>
1749 PR tree-optimization/86263
1750 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1751 Bail out if is_enabled is false.
1752 * tree-switch-conversion.h (jump_table_cluster::is_enabled):
1754 (jump_table_cluster::is_enabled): New function.
1756 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
1758 * lto-streamer-out.c (DFS::DFS_write_tree_body): Do not stream
1759 BINFO_BASE_ACCESSES and BINFO_VPTR_FIELD.
1760 * tree-streamer-in.c (streamer_read_tree_bitfields): Likewise.
1761 (lto_input_ts_binfo_tree_pointers): Likewise.
1762 * tree-streamer-out.c (streamer_write_tree_bitfields,
1763 write_ts_binfo_tree_pointers): Likewise.
1764 * tree.c (free_lang_data_in_binfo): Clear BINFO_VPTR_FIELD.
1766 2018-06-22 Jan Hubicka <hubicka@ucw.cz>
1768 * tree.c (free_lang_data_in_type): Free all TYPE_VFIELDs.
1770 2018-06-22 Martin Liska <mliska@suse.cz>
1772 * symbol-summary.h (get): Make it pure and inline move
1773 functionality from ::get function.
1774 (get): Remove and inline into ::get and ::get_create.
1775 (get_create): Move code from ::get function.
1777 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1780 * config/i386/sol2.h (CPP_SPEC): Don't pass -P for
1781 -x assembler-with-cpp.
1783 2018-06-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1785 * config/sol2.h (TARGET_OS_CPP_BUILTINS): Define
1786 _FILE_OFFSET_BITS=64 for C++.
1788 2018-06-21 Michael Meissner <meissner@linux.ibm.com>
1790 * config/rs6000/rs6000.md (extendtfif2): Add missing 128-bit
1791 conversion insn that shows up when pr85657-3.c is compiled using
1792 IEEE 128-bit long double.
1793 (neg<mode>2_internal): Use the correct mode to check whether the
1794 mode is IBM extended.
1795 * config/rs6000/rs6000.c (init_float128_ieee): Prevent complex
1796 multiply and divide external functions from being created more
1799 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
1801 * cfgrtl.c (fixup_reorder_chain): Do not emit NOPs in DECL_IGNORED_P
1803 (rtl_merge_blocks): Likewise. Do not emit a NOP if the location of
1804 the edge can be forwarded.
1805 (cfg_layout_merge_blocks): Likewise.
1807 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
1809 * except.c (finish_eh_generation): Commit edge insertions only after
1810 the EH edges have been redirected from post-landing to landing pads.
1812 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
1814 * tree-nested.c (get_frame_type): Use create_tmp_var_raw instead of
1815 create_tmp_var_for to create the FRAME decl.
1816 (finalize_nesting_tree_1): Do not unchain the FRAME decl.
1818 2018-06-21 Eric Botcazou <ebotcazou@adacore.com>
1820 * tree-inline.c (copy_edges_for_bb): Minor tweak.
1821 (maybe_move_debug_stmts_to_successors): Also reset the locus of the
1822 debug statement when resetting its value.
1823 (expand_call_inline): Copy the locus of the call onto the assignment
1824 of the return value, if any. Use local variable in more cases.
1826 2018-06-21 Martin Liska <mliska@suse.cz>
1828 * ipa-pure-const.c (propagate_nothrow): Use
1829 funct_state_summaries->get.
1830 (dump_malloc_lattice): Likewise.
1831 (propagate_malloc): Likewise.
1833 2018-06-21 Richard Biener <rguenther@suse.de>
1835 * lto-streamer-out.c (DFS::DFS_write_tree_body): Update outdated
1836 comment. Follow BLOCK_ABSTRACT_ORIGIN unconditionally.
1837 * tree-streamer-in.c (lto_input_ts_block_tree_pointers): Update
1839 * tree-streamer-out.c (write_ts_block_tree_pointers): Stream
1840 BLOCK_ABSTRACT_ORIGIN unconditionally.
1842 2018-06-21 David Malcolm <dmalcolm@redhat.com>
1844 * ipa-cp.c (ipcp_driver): Set edge_clone_summaries to NULL after
1846 * ipa-reference.c (ipa_reference_c_finalize): Delete
1847 ipa_ref_opt_sum_summaries and set it to NULL.
1849 2018-06-21 Tom de Vries <tdevries@suse.de>
1851 PR tree-optimization/85859
1852 * tree-ssa-tail-merge.c (stmt_local_def): Copy gimple_is_call
1853 test with comment from bb_no_side_effects_p.
1855 2018-06-21 Richard Biener <rguenther@suse.de>
1857 PR tree-optimization/86232
1858 * tree-ssa-loop-niter.c (number_of_iterations_popcount): Adjust
1859 max for constant niter.
1861 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1863 * config/aarch64/aarch64-simd.md
1864 (*aarch64_crypto_aes<aes_op>v16qi_xor_combine): New.
1866 2018-06-21 Andre Vieira <andre.simoesdiasvieira@arm.com>
1868 * config/aarch64/aarch64-simd.md (aarch64_crypto_aes<aes_op>v16qi):
1869 Make opernads of the unspec commutative.
1871 2018-06-21 Richard Biener <rguenther@suse.de>
1873 * tree-data-ref.c (dr_step_indicator): Handle NULL DR_STEP.
1874 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr):
1875 Avoid calling vect_mark_for_runtime_alias_test with gathers or scatters.
1876 (vect_analyze_data_ref_dependence): Re-order checks to deal with
1878 (vect_record_base_alignments): Do not record base alignment
1879 for gathers or scatters.
1880 (vect_compute_data_ref_alignment): Drop return value that is always
1881 true. Bail out early for gathers or scatters.
1882 (vect_enhance_data_refs_alignment): Bail out early for gathers
1884 (vect_find_same_alignment_drs): Likewise.
1885 (vect_analyze_data_refs_alignment): Remove dead code.
1886 (vect_slp_analyze_and_verify_node_alignment): Likewise.
1887 (vect_analyze_data_refs): For possible gathers or scatters do
1888 not create an alternate DR, just check their possible validity
1889 and mark them. Adjust DECL_NONALIASED handling to not rely
1891 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Do not
1892 update inits of gathers or scatters.
1893 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern):
1894 Also copy gather/scatter flag to pattern vinfo.
1896 2018-06-20 Kelvin Nilsen <kelvin@gcc.gnu.org>
1898 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Change
1899 behavior of vec_packsu (vector unsigned long long, vector unsigned
1900 long long) to match behavior of vec_packs with same signature.
1902 2018-06-20 Chung-Lin Tang <cltang@codesourcery.com>
1903 Thomas Schwinge <thomas@codesourcery.com>
1904 Cesar Philippidis <cesar@codesourcery.com>
1906 * gimplify.c (gimplify_scan_omp_clauses): Add support for
1907 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
1908 (gimplify_adjust_omp_clauses): Likewise.
1909 (gimplify_oacc_declare_1): Add support for GOMP_MAP_RELEASE, remove
1910 support for GOMP_MAP_FORCE_{ALLOC,TO,FROM,TOFROM}.
1911 (gimplify_omp_target_update): Update handling of acc update and
1913 * omp-low.c (install_var_field): Remove unused parameter
1914 base_pointers_restrict.
1915 (scan_sharing_clauses): Remove base_pointers_restrict parameter.
1916 Update call to install_var_field. Handle OMP_CLAUSE_{IF_PRESENT,
1918 (omp_target_base_pointers_restrict_p): Delete.
1919 (scan_omp_target): Update call to scan_sharing_clauses.
1920 * tree-core.h (enum omp_clause_code): Add OMP_CLAUSE_{IF_PRESENT,
1922 * tree-nested.c (convert_nonlocal_omp_clauses): Handle
1923 OMP_CLAUSE_{IF_PRESENT,FINALIZE}.
1924 (convert_local_omp_clauses): Likewise.
1925 * tree-pretty-print.c (dump_omp_clause): Likewise.
1926 * tree.c (omp_clause_num_ops): Add entries for OMP_CLAUSE_{IF_PRESENT,
1928 (omp_clause_code_name): Likewise.
1930 2018-06-20 Jakub Jelinek <jakub@redhat.com>
1933 * var-tracking.c (use_narrower_mode_test): Check if shift amount can
1936 PR tree-optimization/86231
1937 * tree-vrp.c (union_ranges): For ( [ ) ] or ( )[ ] range and
1938 anti-range don't overwrite *vr0min before using it to compute *vr0max.
1940 2018-06-20 Tom de Vries <tdevries@suse.de>
1942 PR tree-optimization/86097
1943 * tree-ssa-loop-manip.c (canonicalize_loop_ivs): Also convert *nit to
1944 iv type if signedness of iv type is not the same as that of *nit.
1946 2018-06-20 Jakub Jelinek <jakub@redhat.com>
1948 * cfgrtl.c (rtl_verify_edges): Formatting fix. If bb->preds has any
1949 EDGE_EH edges, verify they are all EDGE_EH.
1951 2018-06-20 Maya Rashish <coypu@sdf.org>
1953 * ginclude/stddef.h: Limit #include <machine/ansi.h> to NetBSD.
1955 2018-06-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
1957 * config/aarch64/aarch64-tuning-flags.def (no_ldp_stp_qregs): New.
1958 * config/aarch64/aarch64.c (xgene1_tunings): Add
1959 AARCH64_EXTRA_TUNE_NO_LDP_STP_QREGS to tune_flags.
1960 (aarch64_mode_valid_for_sched_fusion_p):
1961 Allow 16-byte modes.
1962 (aarch64_classify_address): Allow 16-byte modes for load_store_pair_p.
1963 * config/aarch64/aarch64-ldpstp.md: Add peepholes for LDP STP of
1965 * config/aarch64/aarch64-simd.md (load_pair<VQ:mode><VQ2:mode>):
1967 (vec_store_pair<VQ:mode><VQ2:mode>): Likewise.
1968 * config/aarch64/iterators.md (VQ2): New mode iterator.
1970 2018-06-20 Martin Liska <mliska@suse.cz>
1972 * tree-switch-conversion.c (jump_table_cluster::can_be_handled):
1973 Change default ratio from 10 to 8.
1975 2018-06-20 Martin Liska <mliska@suse.cz>
1977 * tree-switch-conversion.c (jump_table_cluster::find_jump_tables):
1979 (bit_test_cluster::find_bit_tests): Likewise.
1980 (switch_decision_tree::analyze_switch_statement): Find clusters.
1981 * tree-switch-conversion.h (struct jump_table_cluster): Document
1984 2018-06-20 Martin Liska <mliska@suse.cz>
1986 * tree-switch-conversion.c (switch_conversion::collect):
1987 Record m_uniq property.
1988 (switch_conversion::expand): Bail out for special conditions.
1989 (group_cluster::~group_cluster): New.
1990 (group_cluster::group_cluster): Likewise.
1991 (group_cluster::dump): Likewise.
1992 (jump_table_cluster::emit): New.
1993 (switch_decision_tree::fix_phi_operands_for_edges): New.
1994 (struct case_node): Remove struct.
1995 (jump_table_cluster::can_be_handled): New.
1996 (case_values_threshold): Moved to header.
1997 (reset_out_edges_aux): Likewise.
1998 (jump_table_cluster::is_beneficial): New.
1999 (bit_test_cluster::can_be_handled): Likewise.
2000 (add_case_node): Remove.
2001 (bit_test_cluster::is_beneficial): New.
2002 (case_bit_test::cmp): New.
2003 (bit_test_cluster::emit): New.
2004 (expand_switch_as_decision_tree_p): Remove.
2005 (bit_test_cluster::hoist_edge_and_branch_if_true): New.
2006 (fix_phi_operands_for_edge): Likewise.
2007 (switch_decision_tree::analyze_switch_statement): New.
2008 (compute_cases_per_edge): Move ...
2009 (switch_decision_tree::compute_cases_per_edge): ... here.
2010 (try_switch_expansion): Likewise.
2011 (switch_decision_tree::try_switch_expansion): Likewise.
2012 (record_phi_operand_mapping): Likewise.
2013 (switch_decision_tree::record_phi_operand_mapping): Likewise.
2014 (emit_case_decision_tree): Likewise.
2015 (switch_decision_tree::emit): Likewise.
2016 (balance_case_nodes): Likewise.
2017 (switch_decision_tree::balance_case_nodes): Likewise.
2018 (dump_case_nodes): Likewise.
2019 (switch_decision_tree::dump_case_nodes): Likewise.
2020 (emit_jump): Likewise.
2021 (switch_decision_tree::emit_jump): Likewise.
2022 (emit_cmp_and_jump_insns): Likewise.
2023 (switch_decision_tree::emit_cmp_and_jump_insns): Likewise.
2024 (emit_case_nodes): Likewise.
2025 (switch_decision_tree::emit_case_nodes): Likewise.
2026 (conditional_probability): Remove.
2027 * tree-switch-conversion.h (enum cluster_type): New.
2029 (struct cluster): Likewise.
2030 (cluster::cluster): Likewise.
2031 (struct simple_cluster): Likewise.
2032 (simple_cluster::simple_cluster): Likewise.
2033 (struct group_cluster): Likewise.
2034 (struct jump_table_cluster): Likewise.
2035 (struct bit_test_cluster): Likewise.
2036 (struct min_cluster_item): Likewise.
2037 (struct case_tree_node): Likewise.
2038 (case_tree_node::case_tree_node): Likewise.
2039 (jump_table_cluster::case_values_threshold): Likewise.
2040 (struct case_bit_test): Likewise.
2041 (struct switch_decision_tree): Likewise.
2042 (struct switch_conversion): Likewise.
2043 (switch_decision_tree::reset_out_edges_aux): Likewise.
2045 2018-06-20 Martin Liska <mliska@suse.cz>
2047 * tree-switch-conversion.c (MAX_CASE_BIT_TESTS): Remove.
2048 (hoist_edge_and_branch_if_true): Likewise.
2049 (expand_switch_using_bit_tests_p): Likewise.
2050 (struct case_bit_test): Likewise.
2051 (case_bit_test_cmp): Likewise.
2052 (emit_case_bit_tests): Likewise.
2053 (switch_conversion::switch_conversion): New class.
2054 (struct switch_conv_info): Remove old struct.
2055 (collect_switch_conv_info): More to ...
2056 (switch_conversion::collect): ... this.
2057 (check_range): Likewise.
2058 (switch_conversion::check_range): Likewise.
2059 (check_all_empty_except_final): Likewise.
2060 (switch_conversion::check_all_empty_except_final): Likewise.
2061 (check_final_bb): Likewise.
2062 (switch_conversion::check_final_bb): Likewise.
2063 (create_temp_arrays): Likewise.
2064 (switch_conversion::create_temp_arrays): Likewise.
2065 (free_temp_arrays): Likewise.
2066 (gather_default_values): Likewise.
2067 (switch_conversion::gather_default_values): Likewise.
2068 (build_constructors): Likewise.
2069 (switch_conversion::build_constructors): Likewise.
2070 (constructor_contains_same_values_p): Likewise.
2071 (switch_conversion::contains_same_values_p): Likewise.
2072 (array_value_type): Likewise.
2073 (switch_conversion::array_value_type): Likewise.
2074 (build_one_array): Likewise.
2075 (switch_conversion::build_one_array): Likewise.
2076 (build_arrays): Likewise.
2077 (switch_conversion::build_arrays): Likewise.
2078 (gen_def_assigns): Likewise.
2079 (switch_conversion::gen_def_assigns): Likewise.
2080 (prune_bbs): Likewise.
2081 (switch_conversion::prune_bbs): Likewise.
2082 (fix_phi_nodes): Likewise.
2083 (switch_conversion::fix_phi_nodes): Likewise.
2084 (gen_inbound_check): Likewise.
2085 (switch_conversion::gen_inbound_check): Likewise.
2086 (process_switch): Use the newly created class.
2087 (switch_conversion::expand): New.
2088 (switch_conversion::~switch_conversion): New.
2089 * tree-switch-conversion.h: New file.
2091 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2093 * tree-vectorizer.h (NUM_PATTERNS, vect_recog_func_ptr): Move to
2094 tree-vect-patterns.c.
2095 * tree-vect-patterns.c (vect_supportable_direct_optab_p): New function.
2096 (vect_recog_dot_prod_pattern): Use it. Remove the type_in argument.
2097 (vect_recog_sad_pattern): Likewise.
2098 (vect_recog_widen_sum_pattern): Likewise.
2099 (vect_recog_pow_pattern): Likewise. Check for a null vectype.
2100 (vect_recog_widen_shift_pattern): Remove the type_in argument.
2101 (vect_recog_rotate_pattern): Likewise.
2102 (vect_recog_mult_pattern): Likewise.
2103 (vect_recog_vector_vector_shift_pattern): Likewise.
2104 (vect_recog_divmod_pattern): Likewise.
2105 (vect_recog_mixed_size_cond_pattern): Likewise.
2106 (vect_recog_bool_pattern): Likewise.
2107 (vect_recog_mask_conversion_pattern): Likewise.
2108 (vect_try_gather_scatter_pattern): Likewise.
2109 (vect_recog_widen_mult_pattern): Likewise. Check for a null vectype.
2110 (vect_recog_over_widening_pattern): Likewise.
2111 (vect_recog_gather_scatter_pattern): Likewise.
2112 (vect_recog_func_ptr): Move from tree-vectorizer.h
2113 (vect_vect_recog_func_ptrs): Move further down the file.
2114 (vect_recog_func): Likewise. Remove the third argument.
2115 (NUM_PATTERNS): Define based on vect_vect_recog_func_ptrs.
2116 (vect_pattern_recog_1): Expect the pattern function to do any
2117 necessary target tests. Also expect it to provide a vector type.
2118 Remove the type_in handling.
2120 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2122 * tree-vect-patterns.c (vect_pattern_detected): New function.
2123 (vect_recog_dot_prod_patternm, vect_recog_sad_pattern)
2124 (vect_recog_widen_mult_pattern, vect_recog_widen_sum_pattern)
2125 (vect_recog_over_widening_pattern, vect_recog_widen_shift_pattern
2126 (vect_recog_rotate_pattern, vect_recog_vector_vector_shift_pattern)
2127 (vect_recog_mult_pattern, vect_recog_divmod_pattern)
2128 (vect_recog_mixed_size_cond_pattern, vect_recog_bool_pattern)
2129 (vect_recog_mask_conversion_pattern)
2130 (vect_try_gather_scatter_pattern): Likewise.
2132 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2134 * tree-vect-patterns.c (vect_get_internal_def): New function.
2135 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern)
2136 (vect_recog_vector_vector_shift_pattern, check_bool_pattern)
2137 (search_type_for_mask_1): Use it.
2139 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2141 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2142 redundant WIDEN_SUM_EXPR handling.
2143 (vect_recog_sad_pattern): Likewise.
2145 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2147 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Remove
2148 redundant check that the types of a PLUS_EXPR or MULT_EXPR agree.
2149 (vect_recog_sad_pattern): Likewise PLUS_EXPR, ABS_EXPR and MINUS_EXPR.
2150 (vect_recog_widen_mult_pattern): Likewise MULT_EXPR.
2151 (vect_recog_widen_sum_pattern): Likewise PLUS_EXPR.
2153 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2155 * tree-vect-stmts.c (vectorizable_call): Make sure that we
2156 use the stmt_vec_info of the original bb statement for the
2157 new zero assignment, even if the call is part of a pattern.
2159 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2161 * tree-vectorizer.h (_stmt_vec_info): Note above pattern_def_seq
2162 that the sequence is attached to the original statement rather
2163 than the pattern statement.
2164 * tree-vect-loop.c (vect_determine_vf_for_stmt): Take the
2165 PATTERN_DEF_SEQ from the original statement rather than
2166 the main pattern statement.
2167 * tree-vect-stmts.c (free_stmt_vec_info): Likewise.
2168 * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Likewise.
2169 (vect_mark_pattern_stmts): Don't copy the PATTERN_DEF_SEQ.
2171 2018-06-20 Richard Sandiford <richard.sandiford@arm.com>
2173 * tree-vect-stmts.c (vect_analyze_stmt): Move the handling of pattern
2174 definition statements before the early exit for statements that aren't
2176 * tree-vect-loop.c (vect_transform_loop_stmt): New function,
2178 (vect_transform_loop): ...here. Process pattern definition
2179 statements without first checking whether the main pattern
2180 statement is live or relevant.
2182 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
2184 * tree-cfgcleanup.c (tree_forwarder_block_p): Do not return false at
2185 -O0 if the locus represent UNKNOWN_LOCATION but have different values.
2187 2018-06-19 Aaron Sawdey <acsawdey@linux.ibm.com>
2189 * config/rs6000/rs6000-string.c (select_block_compare_mode): Check
2190 TARGET_EFFICIENT_OVERLAPPING_UNALIGNED here instead of in caller.
2191 (do_and3, do_and3_mask, do_compb3, do_rotl3): New functions.
2192 (expand_block_compare): Change select_block_compare_mode call.
2193 (expand_strncmp_align_check): Use new functions, fix comment.
2194 (emit_final_str_compare_gpr): New function.
2195 (expand_strn_compare): Refactor and clean up code.
2196 * config/rs6000/vsx.md (vsx_mov<mode>_64bit): Remove *.
2198 2018-06-19 Tony Reix <tony.reix@atos.com>
2199 Damien Bergamini <damien.bergamini@atos.com>
2200 David Edelsohn <dje.gcc@gmail.com>
2202 * collect2.c (static_obj): New variable.
2203 (static_libs): New variable.
2204 (is_in_list): Uncomment declaration.
2205 (main): Track AIX libraries linked statically.
2206 (is_in_list): Uncomment definition.
2207 (scan_prog_file): Don't add AIX shared libraries initializer
2208 to constructor list if linking statically.
2210 2018-06-19 Max Filippov <jcmvbkbc@gmail.com>
2212 * config/xtensa/xtensa.md (UNSPEC_FRAME_BLOCKAGE): New unspec
2214 (allocate_stack, frame_blockage, *frame_blockage): New patterns.
2216 2018-06-19 Jan Hubicka <hubicka@ucw.cz>
2218 * tree.c (find_decls_types_r): Remove all non-VAR_DECLs from
2221 2018-06-19 Martin Liska <mliska@suse.cz>
2223 * config/i386/i386.c (ix86_can_inline_p): Do not use
2224 ipa_fn_summaries::get_create.
2225 * ipa-cp.c (ipcp_cloning_candidate_p): Replace get_create with
2227 (devirtualization_time_bonus): Likewise.
2228 (ipcp_propagate_stage): Likewise.
2229 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
2230 (edge_set_predicate): Likewise.
2231 (evaluate_conditions_for_known_args): Likewise.
2232 (evaluate_properties_for_edge): Likewise.
2233 (ipa_call_summary::reset): Tranform to ...
2234 (ipa_call_summary::~ipa_call_summary): ... this.
2235 (ipa_fn_summary::reset): Transform to ...
2236 (ipa_fn_summary::~ipa_fn_summary): ... this.
2237 (ipa_fn_summary_t::remove): Rename to ...
2238 (ipa_fn_summary_t::remove_callees): ... this.
2239 (ipa_fn_summary_t::duplicate): Use placement new
2240 instead of memory copy.
2241 (ipa_call_summary_t::duplicate): Likewise.
2242 (ipa_call_summary_t::remove): Remove.
2243 (dump_ipa_call_summary): Change get_create to get.
2244 (ipa_dump_fn_summary): Dump only when summary exists.
2245 (analyze_function_body): Use symbol_summary::get instead
2247 (compute_fn_summary): Likewise.
2248 (estimate_edge_devirt_benefit): Likewise.
2249 (estimate_edge_size_and_time): Likewise.
2250 (inline_update_callee_summaries): Likewise.
2251 (remap_edge_change_prob): Likewise.
2252 (remap_edge_summaries): Likewise.
2253 (ipa_merge_fn_summary_after_inlining): Likewise.
2254 (write_ipa_call_summary): Likewise.
2255 (ipa_fn_summary_write): Likewise.
2256 (ipa_free_fn_summary): Likewise.
2257 * ipa-fnsummary.h (struct GTY): Add new ctor and copy ctor.
2258 (struct ipa_call_summary): Likewise.
2259 * ipa-icf.c (sem_function::merge): Use symbol_summary::get instead
2261 * ipa-inline-analysis.c (do_estimate_edge_time): Likewise.
2262 (estimate_size_after_inlining): Likewise.
2263 (estimate_growth): Likewise.
2264 (growth_likely_positive): Likewise.
2265 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
2266 (inline_call): Likewise.
2267 * ipa-inline.c (caller_growth_limits): Likewise.
2268 (can_inline_edge_p): Likewise.
2269 (can_inline_edge_by_limits_p): Likewise.
2270 (compute_uninlined_call_time): Likewise.
2271 (compute_inlined_call_time): Likewise.
2272 (want_inline_small_function_p): Likewise.
2273 (edge_badness): Likewise.
2274 (update_caller_keys): Likewise.
2275 (update_callee_keys): Likewise.
2276 (inline_small_functions): Likewise.
2277 (inline_to_all_callers_1): Likewise.
2278 (dump_overall_stats): Likewise.
2279 (early_inline_small_functions): Likewise.
2280 (early_inliner): Likewise.
2281 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
2282 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
2283 * ipa-pure-const.c (malloc_candidate_p): Likewise.
2284 * ipa-split.c (execute_split_functions): Likewise.
2285 * symbol-summary.h: Likewise.
2286 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
2288 2018-06-19 Richard Biener <rguenther@suse.de>
2290 * tree-vectorizer.c (try_vectorize_loop_1): Split out of ...
2291 (vectorize_loops): ... here. Fix dbgcnt handling.
2292 (try_vectorize_loop): Wrap try_vectorize_loop_1.
2294 2018-06-19 Segher Boessenkool <segher@kernel.crashing.org>
2297 * config/rs6000/rs6000.md (rs6000_discover_homogeneous_aggregate): An
2298 ieee128 argument takes up only one (vector) register, not two (floating
2301 2018-06-19 Eric Botcazou <ebotcazou@adacore.com>
2303 * gimplify.c (gimplify_init_constructor): Really never clear for an
2304 incomplete constructor if CONSTRUCTOR_NO_CLEARING is set.
2306 2018-06-19 Richard Biener <rguenther@suse.de>
2308 PR tree-optimization/86179
2309 * tree-vect-patterns.c (vect_pattern_recog_1): Clean up
2310 after failed recognition.
2312 2018-06-18 Martin Sebor <msebor@redhat.com>
2315 * calls.c (maybe_warn_nonstring_arg): Handle strncat.
2316 * tree-ssa-strlen.c (is_strlen_related_p): Make extern.
2317 Handle integer subtraction.
2318 (maybe_diag_stxncpy_trunc): Handle nonstring source arguments.
2319 * tree-ssa-strlen.h (is_strlen_related_p): Declare.
2321 2018-06-18 David Malcolm <dmalcolm@redhat.com>
2323 * config/frv/frv-protos.h (frv_ifcvt_modify_insn): Strengthen 3rd
2324 param from rtx to rtx_insn *.
2325 * config/frv/frv.c (frv_ifcvt_add_insn): Likewise for "insn"
2327 (frv_ifcvt_modify_insn): Likwise.
2328 (frv_ifcvt_modify_final): Likwise for local "existing_insn",
2329 adding an as_a <rtx_insn *> cast. Likewise for local "insn".
2330 * config/mips/mips.c (r10k_insert_cache_barriers): Add an
2331 as_a <rtx_insn *> cast to local "unprotected_region" once
2332 it's been established that it's not NULL or pc_rtx.
2333 * config/nds32/nds32-relax-opt.c (nds32_group_insns): Strengthen
2334 param "sethi" from rtx to rtx_insn *.
2335 (nds32_group_float_insns): Likewise for param "insn".
2336 * config/vax/vax-protos.h (vax_output_int_add): Likewise for 1st
2338 (vax_output_int_subtract): Likewise.
2339 * config/vax/vax.c (vax_output_int_add): Likewise for param
2341 (vax_output_int_subtract): Likewise.
2342 * emit-rtl.c (set_insn_deleted): Likewise, removing cast.
2343 (emit_pattern_after): Likewise for param "after".
2344 (emit_insn_after): Likewise.
2345 (emit_jump_insn_after): Likewise.
2346 (emit_call_insn_after): Likewise.
2347 (emit_debug_insn_after): Likewise.
2348 (emit_pattern_before): Likewise for param "before".
2349 (emit_insn_before): Likewise.
2350 (emit_jump_insn_before): Likewise.
2351 * final.c (get_insn_template): Likewise for param "insn", removing
2353 * output.h (get_insn_template): Likewise for 2nd param.
2354 * rtl.h (emit_insn_before): Likewise.
2355 (emit_jump_insn_before): Likewise.
2356 (emit_debug_insn_before_noloc): Likewise.
2357 (emit_insn_after): Likewise.
2358 (emit_jump_insn_after): Likewise.
2359 (emit_call_insn_after): Likewise.
2360 (emit_debug_insn_after): Likewise.
2361 (set_insn_deleted): Likewise for param.
2363 2018-06-18 Michael Meissner <meissner@linux.ibm.com>
2366 * config/rs6000/rs6000-modes.def (toplevel): Rework the 128-bit
2367 floating point modes, so that IFmode is numerically greater than
2368 TFmode, which is greater than KFmode using FRACTIONAL_FLOAT_MODE
2369 to declare the ordering. This prevents IFmode from being
2370 converted to TFmode when long double is IEEE 128-bit on an ISA 3.0
2371 machine. Include rs6000-modes.h to share the fractional values
2372 between genmodes* and the rest of the compiler.
2376 * config/rs6000/rs6000-modes.h: New file.
2377 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Change the
2378 meaning of rs6000_long_double_size so that 126..128 selects an
2379 appropriate 128-bit floating point type.
2380 (rs6000_option_override_internal): Likewise.
2381 * config/rs6000/rs6000.h (toplevel): Include rs6000-modes.h.
2382 (TARGET_LONG_DOUBLE_128): Change the meaning of
2383 rs6000_long_double_size so that 126..128 selects an appropriate
2384 128-bit floating point type.
2385 (LONG_DOUBLE_TYPE_SIZE): Update comment.
2386 * config/rs6000/rs6000.md (trunciftf2): Correct the modes of the
2387 source and destination to match the standard usage.
2388 (truncifkf2): Likewise.
2389 (copysign<mode>3, IEEE iterator): Rework copysign of float128 on
2390 ISA 2.07 to use an explicit clobber, instead of passing in a
2392 (copysign<mode>3_soft): Likewise.
2394 2018-06-18 David Malcolm <dmalcolm@redhat.com>
2396 * tree-vect-data-refs.c (vect_analyze_data_ref_dependences):
2397 Replace dump_printf_loc call with DUMP_VECT_SCOPE.
2398 (vect_slp_analyze_instance_dependence): Likewise.
2399 (vect_enhance_data_refs_alignment): Likewise.
2400 (vect_analyze_data_refs_alignment): Likewise.
2401 (vect_slp_analyze_and_verify_instance_alignment
2402 (vect_analyze_data_ref_accesses): Likewise.
2403 (vect_prune_runtime_alias_test_list): Likewise.
2404 (vect_analyze_data_refs): Likewise.
2405 * tree-vect-loop-manip.c (vect_update_inits_of_drs): Likewise.
2406 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
2407 (vect_analyze_scalar_cycles_1): Likewise.
2408 (vect_get_loop_niters): Likewise.
2409 (vect_analyze_loop_form_1): Likewise.
2410 (vect_update_vf_for_slp): Likewise.
2411 (vect_analyze_loop_operations): Likewise.
2412 (vect_analyze_loop): Likewise.
2413 (vectorizable_induction): Likewise.
2414 (vect_transform_loop): Likewise.
2415 * tree-vect-patterns.c (vect_pattern_recog): Likewise.
2416 * tree-vect-slp.c (vect_analyze_slp): Likewise.
2417 (vect_make_slp_decision): Likewise.
2418 (vect_detect_hybrid_slp): Likewise.
2419 (vect_slp_analyze_operations): Likewise.
2420 (vect_slp_bb): Likewise.
2421 * tree-vect-stmts.c (vect_mark_stmts_to_be_vectorized): Likewise.
2422 (vectorizable_bswap): Likewise.
2423 (vectorizable_call): Likewise.
2424 (vectorizable_simd_clone_call): Likewise.
2425 (vectorizable_conversion): Likewise.
2426 (vectorizable_assignment): Likewise.
2427 (vectorizable_shift): Likewise.
2428 (vectorizable_operation): Likewise.
2429 * tree-vectorizer.h (DUMP_VECT_SCOPE): New macro.
2431 2018-06-18 Martin Sebor <msebor@redhat.com>
2433 PR tree-optimization/81384
2434 * builtin-types.def (BT_FN_SIZE_CONST_STRING_SIZE): New.
2435 * builtins.c (expand_builtin_strnlen): New function.
2436 (expand_builtin): Call it.
2437 (fold_builtin_n): Avoid setting TREE_NO_WARNING.
2438 * builtins.def (BUILT_IN_STRNLEN): New.
2439 * calls.c (maybe_warn_nonstring_arg): Handle BUILT_IN_STRNLEN.
2440 Warn for bounds in excess of maximum object size.
2441 * tree-ssa-strlen.c (maybe_set_strlen_range): Return tree representing
2442 single-value ranges. Handle strnlen.
2443 (handle_builtin_strlen): Handle strnlen.
2444 (strlen_check_and_optimize_stmt): Same.
2445 * doc/extend.texi (Other Builtins): Document strnlen.
2447 2018-06-18 Maya Rashish <coypu@sdf.org>
2449 * config/alpha/openbsd.h (TARGET_DEFAULT): Define.
2450 (LINK_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): Likewise.
2451 (INTMAX_TYPE, UINTMAX_TYPE, WINT_TYPE): Likewise.
2453 * config/alpha/elf.h (STARTFILE_SPEC, ENDFILE_SPEC): Move from
2455 * config/alpha/linux.h (STARTFILE_SPEC, ENDFILE_SPEC): Here.
2457 2018-06-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
2459 * tree.c (escaped_string::escape): Replace cast to char * by
2460 const_cast<char *> (unescaped).
2462 2018-06-18 Nick Clifton <nickc@redhat.com>
2465 * tree.c (escaped_string): New class. Converts an unescaped
2466 string into its escaped equivalent.
2467 (warn_deprecated_use): Use the new class to convert the
2468 deprecation message, if present.
2469 (test_escaped_strings): New self test.
2470 (test_c_tests): Add test_escaped_strings.
2471 * doc/extend.texi (deprecated): Add a note that the
2472 deprecation message is affected by the -fmessage-length
2473 option, and that control characters will be escaped.
2474 (#pragma GCC error): Document this pragma.
2475 (#pragma GCC warning): Likewise.
2476 * doc/invoke.texi (-fmessage-length): Document this option's
2477 effect on the #warning and #error preprocessor directives and
2478 the deprecated attribute.
2480 2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
2482 * tree.c (decl_value_expr_lookup): Revert latest change.
2483 (decl_value_expr_insert): Likewise.
2485 2018-06-17 Eric Botcazou <ebotcazou@adacore.com>
2487 * gimplify.c (nonlocal_vlas): Delete.
2488 (nonlocal_vla_vars): Likewise.
2489 (gimplify_var_or_parm_decl): Do not add debug VAR_DECLs for non-local
2491 (gimplify_body): Do not create and destroy nonlocal_vlas.
2492 * tree-nested.c: Include diagnostic.h.
2493 (use_pointer_in_frame): Tweak.
2494 (lookup_field_for_decl): Add assertion and declare the transformation.
2495 (convert_nonlocal_reference_op) <PARM_DECL>: Rework and issue an
2496 internal error when the reference is in a wrong context. Do not
2497 create a debug decl by default.
2498 (note_nonlocal_block_vlas): Delete.
2499 (convert_nonlocal_reference_stmt) <GIMPLE_BIND>: Do not call it.
2500 (convert_local_reference_op) <PARM_DECL>: Skip the frame decl. Do not
2501 create a debug decl by default.
2502 (convert_gimple_call) <GIMPLE_CALL>: Issue an internal error when the
2503 call is in a wrong context.
2504 (fixup_vla_decls): New function.
2505 (finalize_nesting_tree_1): Adjust comment. Call fixup_vla_decls if no
2506 debug variables were created.
2507 * tree.c (decl_value_expr_lookup): Add checking assertion.
2508 (decl_value_expr_insert): Likewise.
2510 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2513 * ipa-fnsummary.c (will_be_nonconstant_expr_predicate): Handle CALL_EXPR.
2514 * tree-scalar-evolution.c (interpret_expr): Likewise.
2515 (expression_expensive_p): Likewise.
2516 * tree-ssa-loop-ivopts.c (contains_abnormal_ssa_name_p): Likewise.
2517 * tree-ssa-loop-niter.c (number_of_iterations_popcount): New.
2518 (number_of_iterations_exit_assumptions): Use number_of_iterations_popcount.
2519 (ssa_defined_by_minus_one_stmt_p): New.
2521 2018-06-16 Kugan Vivekanandarajah <kuganv@linaro.org>
2524 * cfgexpand.c (expand_debug_expr): Hande ABSU_EXPR.
2525 * config/i386/i386.c (ix86_add_stmt_cost): Likewise.
2526 * dojump.c (do_jump): Likewise.
2527 * expr.c (expand_expr_real_2): Check operand type's sign.
2528 * fold-const.c (const_unop): Handle ABSU_EXPR.
2529 (fold_abs_const): Likewise.
2530 * gimple-pretty-print.c (dump_unary_rhs): Likewise.
2531 * gimple-ssa-backprop.c (backprop::process_assign_use): Likesie.
2532 (strip_sign_op_1): Likesise.
2533 * match.pd: Add new pattern to generate ABSU_EXPR.
2534 * optabs-tree.c (optab_for_tree_code): Handle ABSU_EXPR.
2535 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
2536 * tree-eh.c (operation_could_trap_helper_p): Likewise.
2537 * tree-inline.c (estimate_operator_cost): Likewise.
2538 * tree-pretty-print.c (dump_generic_node): Likewise.
2539 * tree-vect-patterns.c (vect_recog_sad_pattern): Likewise.
2540 * tree.def (ABSU_EXPR): New.
2542 2018-06-16 Jakub Jelinek <jakub@redhat.com>
2545 * common.opt (Wunsafe-loop-optimizations): Add Ignore, remove Var,
2546 documented as preserved for backward compatibility only.
2547 * doc/invoke.texi: Remove -Wunsafe-loop-optimizations documentation.
2549 PR rtl-optimization/86108
2550 * bb-reorder.c (create_forwarder_block): Renamed to ...
2551 (create_eh_forwarder_block): ... this. Split OLD_BB after labels and
2552 jump from new landing pad to the second part.
2553 (sjlj_fix_up_crossing_landing_pad, dw2_fix_up_crossing_landing_pad):
2556 2018-06-15 Jakub Jelinek <jakub@redhat.com>
2559 * expr.c (expand_assignment): Remove now redundant COMPLEX_MODE_P
2560 check from first store_expr, use to_mode instead of GET_MODE (to_rtx).
2561 Only call store_expr for halves if the mode is the same.
2564 * match.pd ((X / Y) == 0 -> X < Y): Don't transform complex divisions.
2565 Fix up comment formatting.
2567 2018-06-15 Bernd Edlinger <bernd.edlinger@hotmail.de>
2569 * typed-splay-tree.h (typed_splay_tree::remove): New function.
2570 (typed_splay_tree::closure,
2571 typed_splay_tree::inner_foreach_fn, typed_splay_tree::m_inner): Deleted.
2572 (typed_splay_tree::typed_splay_tree,
2573 typed_splay_tree::operator =): Declared private.
2574 (typed_splay_tree::splay_tree_key, typed_splay_tree::splay_tree_value,
2575 typed_splay_tree::splay_tree_node_s, typed_splay_tree::KDEL,
2576 typed_splay_tree::VDEL, typed_splay_tree::splay_tree_delete_helper,
2577 typed_splay_tree::rotate_left, typed_splay_tree::rotate_right,
2578 typed_splay_tree::splay_tree_splay,
2579 typed_splay_tree::splay_tree_foreach_helper,
2580 typed_splay_tree::splay_tree_insert,
2581 typed_splay_tree::splay_tree_remove,
2582 typed_splay_tree::splay_tree_lookup,
2583 typed_splay_tree::splay_tree_predecessor,
2584 typed_splay_tree::splay_tree_successor,
2585 typed_splay_tree::splay_tree_min,
2586 typed_splay_tree::splay_tree_max): Took over from splay-tree.c/.h.
2587 (typed_splay_tree::root, typed_splay_tree::comp,
2588 typed_splay_tree::delete_key,
2589 typed_splay_tree::delete_value): New data members.
2590 * typed-splay-tree.c (selftest::test_str_to_int): Add a test for
2591 typed_splay_tree::remove.
2593 2018-06-15 Matthew Fortune <matthew.fortune@mips.com>
2595 * config/mips/mips.h (ASM_SPEC): Pass through -mcrc, -mno-crc,
2596 -mginv and -mno-ginv to the assembler.
2597 * config/mips/mips.opt (-mcrc): New option.
2599 * doc/invoke.text (-mcrc): Document.
2602 2018-06-15 Nick Clifton <nickc@redhat.com>
2605 * tree.c (escaped_string): New class. Converts an unescaped
2606 string into its escaped equivalent.
2607 (warn_deprecated_use): Use the new class to convert the
2608 deprecation message, if present.
2609 (test_escaped_strings): New self test.
2610 (test_c_tests): Add test_escaped_strings.
2611 * doc/extend.texi (deprecated): Add a note that the
2612 deprecation message is affected by the -fmessage-length
2613 option, and that control characters will be escaped.
2614 (#pragma GCC error): Document this pragma.
2615 (#pragma GCC warning): Likewise.
2616 * doc/invoke.texi (-fmessage-length): Document this option's
2617 effect on the #warning and #error preprocessor directives and
2618 the deprecated attribute.
2620 2018-06-15 Richard Biener <rguenther@suse.de>
2622 * tree-vect-slp.c (vect_slp_bb): Dump MSG_OPTIMIZED_LOCATIONS
2623 here, also noting vector size used.
2624 * tree-vectorizer.c (vectorize_loops): Adjust. Note vector
2625 size used in MSG_OPTIMIZED_LOCATIONS dump.
2626 (pass_slp_vectorize::execute): Adjust.
2628 2018-06-15 Claudiu Zissulescu <claziss@synopsys.com>
2631 * config/arc/arc.c (arc_return_address_register): Fix
2634 2018-06-15 Richard Biener <rguenther@suse.de>
2637 * tree-cfg.c (gimplify_build3): Do not strip sign conversions,
2638 leave useless conversion stripping to force_gimple_operand_gsi.
2639 (gimplify_build2): Likewise.
2640 (gimplify_build1): Likewise.
2642 2018-06-15 Richard Biener <rguenther@suse.de>
2645 * tree-cfg.c (move_stmt_op): unshare invariant addresses
2646 before adjusting their block.
2648 2018-06-15 Sebastian Huber <sebastian.huber@embedded-brains.de>
2650 * config.gcc (riscv*-*-elf* | riscv*-*-rtems*): Use custom
2651 multilibs for *-*-rtems*.
2652 * config/riscv/t-rtems: New file.
2654 2018-06-14 Jakub Jelinek <jakub@redhat.com>
2657 * match.pd ((A +- CST1) +- CST2): Punt if last resort
2658 unsigned_type_for returns NULL.
2661 * lower-subreg.c (find_decomposable_subregs): Don't decompose float
2662 subregs of multi-word pseudos unless the float mode has word size.
2664 2018-06-14 Richard Biener <rguenther@suse.de>
2667 * tree-vect-generic.c (build_word_mode_vector_type): Remove
2668 duplicate and harmful type_hash_canon.
2669 * tree.c (type_hash_canon): Assert we didn't find ourselves.
2671 2018-06-14 Richard Biener <rguenther@suse.de>
2674 * tree-ssa-struct-alias.c (create_variable_info_for): Handle
2677 2018-06-14 Sebastian Huber <sebastian.huber@embedded-brains.de>
2679 * config/rtems.h (STDINT_LONG32): Define.
2681 2018-06-13 Matthew Fortune <matthew.fortune@mips.com>
2682 Prachi Godbole <prachi.godbole@imgtec.com>
2684 * config/mips/mips-cpus.def: Define P6600.
2685 * config/mips/mips-tables.opt: Regenerate.
2686 * config/mips/mips.c (mips_ucbranch_type): New enum.
2687 (mips_rtx_cost_data): Add support for P6600.
2688 (mips_issue_rate): Likewise.
2689 (mips_multipass_dfa_lookahead): Likewise.
2690 (mips_avoid_hazard): Likewise.
2691 (mips_reorg_process_insns): Likewise.
2692 (mips_classify_branch_p6600): New function.
2693 * config/mips/mips.h (TUNE_P6600): New define.
2694 (MIPS_ISA_LEVEL_SPEC): Infer mips64r6 from p6600.
2695 (ENABLE_LD_ST_PAIRS): Enable load/store bonding for p6600.
2696 * config/mips/mips.md: Include p6600.md.
2697 (processor): Add p6600.
2698 * config/mips/p6600.md: New file.
2699 * doc/invoke.texi: Add p6600 to supported architectures.
2701 2018-06-13 Martin Sebor <msebor@redhat.com>
2703 PR tree-optimization/86114
2704 * gimple-fold.c (gimple_fold_builtin_strlen): Only handle LHS
2706 * tree-ssa-strlen.c (maybe_set_strlen_range): Same.
2708 2018-06-13 Richard Biener <rguenther@suse.de>
2710 * tree-vect-patterns.c (vect_recog_vector_vector_shift_pattern):
2711 Properly set vector type of the intermediate stmt.
2712 * tree-vect-stmts.c (vectorizable_operation): The destination
2713 var always has vectype_out type.
2715 2018-06-13 Jeff Law <law@redhat.com>
2717 * config/rl78/rl78.c (move_elim_pass): Use TDF_NONE rather than
2718 integer 0 for argument to print_rtl_with_bb.
2719 (rl78_reorg): Likewise.
2721 2018-06-13 David Malcolm <dmalcolm@redhat.com>
2723 * config/arc/arc.c (hwloop_optimize): Strengthen local "end_label"
2724 from rtx to rtx_insn *.
2725 * config/bfin/bfin.c (hwloop_optimize): Likewise for local
2727 (add_sched_insns_for_speculation): Likewise for local "target",
2728 converting usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
2729 * config/c6x/c6x.c (reorg_split_calls): Strengthen param "call_labels"
2730 from rtx_insn ** to rtx_code_label **.
2731 (reorg_emit_nops): Likewise.
2732 (c6x_reorg): Likewise for local "call_labels".
2733 * config/sh/sh-protos.h (get_dest_uid): Strengthen 1st param from
2735 * config/sh/sh.c (dump_table): Strengthen local "lab" from rtx to
2736 rtx_code_label *, adding safe_as_a <rtx_code_label *> casts to
2737 the loops over LABEL_REFS.
2738 (fixup_addr_diff_vecs): Add as_a <rtx_insn *> to usage of
2740 (barrier_align): Convert usage of JUMP_LABEL to JUMP_LABEL_AS_INSN.
2741 (get_dest_uid): Strengthen param "label" from rtx to rtx_insn *.
2742 (split_branches): Strengthen local "olabel" from rtx to
2743 rtx_insn *, adding a safe_as_a cast.
2744 * emit-rtl.c (next_real_insn): Strengthen param from "rtx"
2746 (add_insn_after): Likewise for first two params.
2747 (add_insn_before): Likewise.
2748 (remove_insn): Likewise for param.
2749 (emit_pattern_before_noloc): Likewise for second and third params.
2750 (emit_jump_insn_before_noloc): Convert NULL_RTX to NULL.
2751 (emit_call_insn_before_noloc): Likewise.
2752 (emit_debug_insn_before_noloc): Strengthen "before" param from "rtx"
2754 (emit_barrier_before): Likewise.
2755 (emit_label_before): Strengthen "label" param from "rtx" to
2756 "rtx_code_label *". Strengthen "before" param from "rtx" to
2758 (emit_insn_after_1): Strengthen "after" param from "rtx" to
2760 (emit_pattern_after_noloc): Likewise.
2761 (emit_insn_after_noloc): Likewise.
2762 (emit_jump_insn_after_noloc): Likewise.
2763 (emit_call_insn_after_noloc): Likewise.
2764 (emit_debug_insn_after_noloc): Likewise.
2765 (emit_barrier_after): Likewise.
2766 (emit_label_after): Likewise for both params.
2767 (emit_pattern_after_setloc): Likewise for "after" param. Convert
2768 "loc" param from "int" to "location_t".
2769 (emit_insn_after_setloc): Likewise.
2770 (emit_jump_insn_after_setloc): Likewise.
2771 (emit_call_insn_after_setloc): Likewise.
2772 (emit_debug_insn_after_setloc): Likewise.
2773 (emit_pattern_before_setloc): Likewise for "before" param. Convert
2774 "loc" param from "int" to "location_t".
2775 (emit_pattern_before): Convert NULL_RTX to NULL.
2776 (emit_insn_before_setloc): Convert "loc" param from "int" to
2778 (emit_jump_insn_before_setloc): Likewise.
2779 (emit_call_insn_before_setloc): Likewise.
2780 (emit_debug_insn_before_setloc): Strengthen "before" param from rtx to
2781 rtx_insn *. Convert "loc" param from "int" to "location_t".
2782 * rtl.h (emit_insn_before_setloc, emit_jump_insn_before_setloc,
2783 emit_call_insn_before_setloc, emit_debug_insn_before_setloc):
2784 Convert 3rd param from "int" to "location_t".
2785 (emit_barrier_before, emit_barrier_after, next_real_insn):
2786 Strengthen param from rtx to rtx_insn *.
2787 (emit_label_before): Strengthen 1st param from "rtx" to
2788 "rtx_code_label *". Strengthen 2nd param from "rtx" to
2790 (emit_insn_after_noloc, emit_jump_insn_after_noloc,
2791 emit_call_insn_after_noloc, emit_debug_insn_after_noloc):
2792 Strengthen 2nd param from "rtx" to "rtx_insn *".
2793 (emit_insn_after_setloc, emit_jump_insn_after_setloc)
2794 emit_call_insn_after_setloc, emit_debug_insn_after_setloc):
2795 Likewise. Convert 3rd param from "int" to "location_t".
2796 (emit_label_after): Strengthen 1st param from "rtx" to
2798 (next_real_insn, remove_insn): Strengthen param from "rtx" to
2800 (add_insn_before, add_insn_after): Strengthen 1st and 2nd params
2801 from "rtx" to "rtx_insn *".
2803 2018-06-13 Jan Hubicka <hubicka@gcc.gnu.org>
2805 * cgraph.c (cgraph_node::get_untransformed_body): Dump function
2806 bodies streamed in with -Q.
2807 * dumpfile.c (dump_files): Add lto-stream-out dump file.
2808 * dumpfile.h (tree_dump_index): Add lto_stream_out.
2809 * gimple-streamer-out.c: Include gimple-pretty-print.h
2810 (output_bb): Dump stmts streamed.
2811 * lto-section-out.c: Include print-tree.h
2812 (lto_begin_section): Dump sections created.
2813 (lto_output_decl_index): Dump decl encoded.
2814 * lto-streamer-out.c: Include print-tree.h
2815 (create_output_block): Dump output block created.
2816 (DFS::DFS_write_tree_body): Dump DFS SCCs streamed.
2817 (output_function): Dump function output.
2818 (output_constructor): Dump constructor streamed.
2819 (write_global_stream): Output indexes encoded.
2820 (produce_asm_for_decls): Dump streams encoded.
2821 * lto-streamer.c (streamer_dump_file): New global var.
2822 * lto-streamer.h (streamer_dump_file): Declare.
2823 * passes.c (ipa_write_summaries): Initialize streamer dump.
2824 * varpool.c (varpool_node::get_constructor): Dump constructors streamed
2827 2018-06-13 Eric Botcazou <ebotcazou@adacore.com>
2830 * config/i386/winnt.c (i386_pe_seh_cold_init): Do not emit negative
2831 offsets for register save directives. Emit a second batch of save
2832 directives, if need be, when the function accesses prior frames.
2834 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2836 * config/arc/fpu.md (fmasf4): Force operand to register.
2837 (fnmasf4): Likewise.
2839 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2841 * config/arc/arc-protos.h (arc_pad_return): Remove.
2842 * config/arc/arc.c (machine_function): Remove force_short_suffix
2844 (arc_print_operand): Adjust printing of '&'.
2845 (arc_verify_short): Remove conditional printing of short suffix.
2846 (arc_final_prescan_insn): Remove reference to size_reason.
2847 (pad_return): New function.
2848 (arc_reorg): Call pad_return.
2849 (arc_pad_return): Remove.
2850 (arc_init_machine_status): Remove reference to force_short_suffix.
2851 * config/arc/arc.md (vunspec): Add VUNSPEC_ARC_BLOCKAGE.
2852 (attr length): When attribute iscompact is true force to 2
2853 regardless; in the case of maybe check if we want to force the
2854 instruction to have 4 bytes length.
2855 (nopv): Change it to generate 4 byte long nop as well.
2856 (blockage): New pattern.
2857 (simple_return): Remove call to arc_pad_return.
2858 (p_return_i): Likewise.
2860 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2862 * config/arc/elf.h (LINK_GCC_C_SEQUENCE_SPEC): Define.
2864 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2866 * config/arc/builtins.def (SYNC): SYNC instruction is valid on all
2869 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
2871 * config/arc/arc.c (atomic_exchangesi): EX instruction is default
2872 for ARC700 and ARCv2.
2874 2018-06-13 Chenghua Xu <paul.hua.gm@gmail.com>
2877 * config/mips/loongson.md (vec_setv4hi): Gen_lowpart for
2878 operands[2] instead of operands[1].
2881 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
2883 * lra-constraints.c (simplify_operand_subreg): In the paradoxical
2884 case, check whether the outer register overlaps an unallocatable
2885 register, not just whether it fits the required class.
2887 2018-06-12 Richard Sandiford <richard.sandiford@linaro.org>
2889 * poly-int.h (can_div_trunc_p): Add new overload in which all values
2891 * alias.c (get_addr): Extend CONST_INT handling to poly_int_rtx_p.
2892 (memrefs_conflict_p): Likewise.
2893 (init_alias_analysis): Likewise.
2894 * cfgexpand.c (expand_debug_expr): Likewise.
2895 * combine.c (combine_simplify_rtx, force_int_to_mode): Likewise.
2896 * cse.c (fold_rtx): Likewise.
2897 * explow.c (adjust_stack, anti_adjust_stack): Likewise.
2898 * expr.c (emit_block_move_hints): Likewise.
2899 (clear_storage_hints, push_block, emit_push_insn): Likewise.
2900 (store_expr_with_bounds, reduce_to_bit_field_precision): Likewise.
2901 (emit_group_load_1): Use rtx_to_poly_int64 for group offsets.
2902 (emit_group_store): Likewise.
2903 (find_args_size_adjust): Use strip_offset. Use rtx_to_poly_int64
2904 to read the PRE/POST_MODIFY increment.
2905 * calls.c (store_one_arg): Use strip_offset.
2906 * rtlanal.c (rtx_addr_can_trap_p_1): Extend CONST_INT handling to
2908 (set_noop_p): Use rtx_to_poly_int64 for the elements selected
2910 * simplify-rtx.c (avoid_constant_pool_reference): Use strip_offset.
2911 (simplify_binary_operation_1): Extend CONST_INT handling to
2913 * var-tracking.c (compute_cfa_pointer): Take a poly_int64 rather
2914 than a HOST_WIDE_INT.
2915 (hard_frame_pointer_adjustment): Change from HOST_WIDE_INT to
2917 (adjust_mems, add_stores): Update accodingly.
2918 (vt_canonicalize_addr): Track polynomial offsets.
2919 (emit_note_insn_var_location): Likewise.
2920 (vt_add_function_parameter): Likewise.
2921 (vt_initialize): Likewise.
2923 2018-06-12 Jeff Law <law@redhat.com>
2925 * config.gcc (alpha*-*-freebsd*): Remove.
2926 * config/alpha/freebsd.h: Remove.
2928 2018-06-12 David Malcolm <dmalcolm@redhat.com>
2931 * spellcheck-tree.c (levenshtein_distance): Rename to...
2932 (get_edit_distance): ...this, and update for underlying renaming.
2933 * spellcheck-tree.h (levenshtein_distance): Rename to...
2934 (get_edit_distance): ...this.
2935 * spellcheck.c (levenshtein_distance): Rename to...
2936 (get_edit_distance): ...this. Convert from Levenshtein distance
2937 to Damerau-Levenshtein distance by supporting transpositions of
2938 adjacent characters. Rename "v1" to "v_next" and "v0" to
2940 (selftest::levenshtein_distance_unit_test_oneway): Rename to...
2941 (selftest::test_edit_distance_unit_test_oneway): ...this, and
2942 update for underlying renaming.
2943 (selftest::levenshtein_distance_unit_test): Rename to...
2944 (selftest::test_get_edit_distance_unit): ...this, and update for
2945 underlying renaming.
2946 (selftest::test_find_closest_string): Add example from PR 69968
2947 where transposition helps
2948 (selftest::test_metric_conditions): Update for renaming.
2949 (selftest::test_metric_conditions): Likewise.
2950 (selftest::spellcheck_c_tests): Likewise.
2951 * spellcheck.h (levenshtein_distance): Rename both overloads to...
2952 (get_edit_distance): ...this.
2953 (best_match::consider): Update for renaming.
2955 2018-06-12 Martin Sebor <msebor@redhat.com>
2957 PR tree-optimization/85259
2958 * builtins.c (compute_objsize): Handle constant offsets.
2959 * gimple-ssa-warn-restrict.c (maybe_diag_offset_bounds): Return
2960 true iff a warning has been issued.
2961 * gimple.h (gimple_nonartificial_location): New function.
2962 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Call
2963 gimple_nonartificial_location and handle -Wno-system-headers.
2964 (handle_builtin_stxncpy): Same.
2966 2018-06-12 Martin Sebor <msebor@redhat.com>
2969 * fold-const.c (operand_equal_p): Handle SAVE_EXPR.
2971 2018-06-12 Will Schmidt <will_schmidt@vnet.ibm.com>
2973 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Add
2974 BUILTIN_VEC_XST entries for pointer to double and long long.
2976 2018-06-12 H.J. Lu <hongjiu.lu@intel.com>
2979 * config/i386/gnu-user.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
2981 * config/i386/gnu-user64.h (TARGET_THREAD_SPLIT_STACK_OFFSET):
2984 2018-06-12 Martin Liska <mliska@suse.cz>
2986 * doc/options.texi: Document IntegerRange.
2988 2018-06-12 Martin Liska <mliska@suse.cz>
2990 * config/i386/i386.opt: Make MPX-related options as Deprecated.
2991 * opt-functions.awk: Handle Deprecated flag.
2992 * opts-common.c (decode_cmdline_option): Handle cl_deprecated
2994 (read_cmdline_option): Report warning for a deprecated option.
2995 * opts.h (struct cl_option): Add new field cl_deprecated.
2996 (CL_ERR_DEPRECATED): New.
2998 2018-06-12 Martin Liska <mliska@suse.cz>
3000 * doc/options.texi: Document Deprecated option flag.
3002 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3004 * config/arc/arc-arch.h (arc_extras): New enum.
3005 (arc_cpu_t):Add field extra.
3006 (arc_cpu_types): Consider the extras.
3007 * config/arc/arc-cpus.def: Add extras info.
3008 * config/arc/arc-opts.h (processor_type): Consider extra field.
3009 * config/arc/arc.c (arc_override_options): Handle extra field.
3011 2018-06-12 Claudiu Zissulescu <claziss@synopsys.com>
3013 * config/arc/arc-arch.h: Update ARC_OPTX macro.
3014 * config/arc/arc-options.def (ARC_OPTX): Introduce a new doc
3016 * config/arc/arc.c (arc_init): Update pic warning.
3017 (irq_range): Update irq range parsing warnings.
3018 (arc_override_options): Update various warning messages.
3019 (arc_handle_aux_attribute): Likewise.
3021 2018-06-12 Robert Suchanek <robert.suchanek@mips.com>
3023 * config/mips/i6400.md (i6400_fpu_fadd): Remove frint.
3025 2018-06-12 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3027 * doc/sourcebuild.texi: Document usage of line number 0 in verify
3028 compiler messages directives.
3030 2018-06-12 Matthew Fortune <mfortune@gmail.com>
3032 * config/mips/mips-cpus.def: New MIPS_CPU for i6500.
3033 * config/mips/mips-tables.opt: Regenerate.
3034 * config/mips/mips.h (MIPS_ISA_LEVEL_SPEC): Mark i6500 as
3036 * doc/invoke.texi: Document -march=i6500.
3038 2018-06-12 Prachi Godbole <prachi.godbole@imgtec.com>
3040 * config/mips/i6400.md (i6400_gpmuldiv): Remove cpu_unit.
3041 (i6400_gpmul): Add cpu_unit.
3042 (i6400_gpdiv): Likewise.
3043 (i6400_msa_add_d): Update reservations.
3044 (i6400_msa_int_add) Likewise.
3045 (i6400_msa_short_logic3) Likewise.
3046 (i6400_msa_short_logic2) Likewise.
3047 (i6400_msa_short_logic) Likewise.
3048 (i6400_msa_move) Likewise.
3049 (i6400_msa_cmp) Likewise.
3050 (i6400_msa_short_float2) Likewise.
3051 (i6400_msa_div_d) Likewise.
3052 (i6400_msa_long_logic1) Likewise.
3053 (i6400_msa_long_logic2) Likewise.
3054 (i6400_msa_mult) Likewise.
3055 (i6400_msa_long_float2) Likewise.
3056 (i6400_msa_long_float4) Likewise.
3057 (i6400_msa_long_float5) Likewise.
3058 (i6400_msa_long_float8) Likewise.
3059 (i6400_fpu_fadd): Include frint type.
3060 (i6400_fpu_store): New define_insn_reservation.
3061 (i6400_fpu_load): Likewise.
3062 (i6400_fpu_move): Likewise.
3063 (i6400_fpu_fcmp): Likewise.
3064 (i6400_fpu_fmadd): Likewise.
3065 (i6400_int_mult): Include imul3nc type and update reservation.
3066 (i6400_int_div): Include idiv3 type and update reservation.
3067 (i6400_int_load): Update to check type not move_type.
3068 (i6400_int_store): Likewise.
3069 (i6400_int_prefetch): Set zero latency.
3071 2018-06-12 Eric Botcazou <ebotcazou@adacore.com>
3073 * gcc.c: Document new %@{...} sequence.
3074 (LINK_COMMAND_SPEC): Use it for the -L switches.
3075 (cpp_unique_options): Use it for the -I switches.
3076 (at_file_argbuf): New global variable.
3077 (in_at_file): Likewise.
3078 (alloc_args): Create at_file_argbuf.
3079 (clear_args): Truncate at_file_argbuf.
3080 (store_arg): If in_at_file, push the argument onto at_file_argbuf.
3081 (open_at_file): New function.
3082 (close_at_file): Likewise.
3083 (create_at_file): Delete.
3084 (do_spec_1) <'i'>: Use open_at_file/close_at_file.
3087 (validate_switches_from_spec): Deal with %@{...} sequence.
3088 (validate_switches): Likewise.
3089 (driver::finalize): Call clear_args.
3091 2018-06-11 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
3093 * config/vx-common.h (USE_TM_CLONE_REGISTRY): #define to 0.
3095 2018-06-11 Martin Sebor <msebor@redhat.com>
3097 * doc/invoke.texi (-Wall): List -Wc++17-compat.
3098 (Wno-class-memaccess): Add @opindex.
3099 (Wno-templates, Wno-multiple-inheritance): Same.
3100 (Wno-virtual-inheritance, Wno-namespaces): Same.
3101 (Wno-pedantic, Wno-chkp, Wcoverage-mismatch): Same.
3102 (Wno-format-overflow, Wno-format-truncation): Same.
3103 (Wno-unused-local-typedefs, Walloc-size-larger-than): Same.
3104 (Wno-alloc-size-larger-than, Wframe-larger-than): Same
3105 (Wno-stack-usage, Wno-c++-compat, Wno-c++11-compat): Same.
3106 (Wno-c++14-compat, Wno-c++17-compat, Wno-openmp-simd): Same.
3107 (Wno-unsuffixed-float-constants, Wno-addr-space-convert): Same.
3108 (Wno-misspelled-isr): Same.
3110 2018-06-11 Martin Sebor <msebor@redhat.com>
3112 * PR tree-optimization/86083
3113 * tree-ssa-strlen.c (handle_char_store): Use tree_expr_nonzero_p.
3115 2018-06-11 Zhouyi Zhou <zhouzhouyi@gmail.com>
3117 * tree-eh.c (lower_eh_constructs_2): Add a comma to comment.
3119 2018-06-11 Segher Boessenkool <segher@kernel.crashing.org>
3122 * config/rs6000/rs6000.md (*movdi_internal32): Put constraint modifiers
3123 on the correct operand.
3124 (*movdi_internal64): Ditto.
3126 2018-06-11 Martin Liska <mliska@suse.cz>
3128 PR tree-optimization/86089
3129 * tree-ssa-strlen.c (get_string_length): Move back removed hunk.
3131 2018-06-11 Julia Koval <julia.koval@intel.com>
3133 * config/i386/vaesintrin.h (_mm_aesdec_epi128, _mm_aesdeclast_epi128)
3134 _mm_aesenc_epi128, _mm_aesenclast_epi128: Remove.
3135 * config/i386/vpclmulqdqintrin.h (_mm_clmulepi64_epi128): Remove.
3137 2018-06-11 Olivier Hainque <hainque@adacore.com>
3139 * dwarf2out.c (gen_compile_unit_die): Fallout to DW_LANG_Ada83
3140 for Ada with strict dwarf2.
3142 2018-06-08 Peter Bergner <bergner@vnet.ibm.com>
3145 * config/rs6000/rs6000.c (mem_operand_gpr): Enable PRE_INC and PRE_DEC
3148 2018-06-08 Jan Hubicka <hubicka@ucw.cz>
3150 * dumpfile.c (FIRST_ME_AUTO_NUMBERED_DUMP): Bump to 4.
3152 2018-06-08 David Edelsohn <dje.gcc@gmail.com>
3154 * config/rs6000/rs6000.c (rs6000_passes_ieee128): Protect with #if
3157 2018-06-08 Martin Liska <mliska@suse.cz>
3159 * tree-cfg.h (debug_function): Fix argument type to match
3162 2018-06-08 Martin Liska <mliska@suse.cz>
3164 * config/powerpcspe/powerpcspe.c (rs6000_xcoff_visibility):
3165 Remove usage of MPX-related (and removed) fields.
3166 * config/rs6000/rs6000.c (rs6000_xcoff_visibility): Likewise.
3168 2018-06-08 David Malcolm <dmalcolm@redhat.com>
3170 * cfg.c (debug): Use TDF_NONE rather than 0.
3171 * cfghooks.c (debug): Likewise.
3172 * dumpfile.c (DUMP_FILE_INFO): Likewise; also for OPTGROUP.
3173 (struct dump_option_value_info): Convert to...
3174 (struct kv_pair): ...this template type.
3175 (dump_options): Convert to kv_pair<dump_flags_t>; use TDF_NONE
3177 (optinfo_verbosity_options): Likewise.
3178 (optgroup_options): Convert to kv_pair<optgroup_flags_t>; use
3180 (gcc::dump_manager::dump_register): Use optgroup_flags_t rather
3181 than int for "optgroup_flags" param.
3182 (dump_generic_expr_loc): Use dump_flags_t rather than int for
3184 (dump_dec): Likewise.
3185 (dump_finish): Use TDF_NONE rather than 0.
3186 (gcc::dump_manager::opt_info_enable_passes): Use optgroup_flags_t
3187 rather than int for "optgroup_flags" param. Use TDF_NONE rather
3188 than 0. Update for change to option_ptr.
3189 (opt_info_switch_p_1): Convert "optgroup_flags" param from int *
3190 to optgroup_flags_t *. Use TDF_NONE and OPTGROUP_NONE rather than
3191 0. Update for changes to optinfo_verbosity_options and
3193 (opt_info_switch_p): Convert optgroup_flags from int to
3195 (dump_basic_block): Use dump_flags_t rather than int
3196 for "dump_kind" param.
3197 * dumpfile.h (TDF_ADDRESS, TDF_SLIM, TDF_RAW, TDF_DETAILS,
3198 TDF_STATS, TDF_BLOCKS, TDF_VOPS, TDF_LINENO, TDF_UID)
3199 TDF_STMTADDR, TDF_GRAPH, TDF_MEMSYMS, TDF_RHS_ONLY, TDF_ASMNAME,
3200 TDF_EH, TDF_NOUID, TDF_ALIAS, TDF_ENUMERATE_LOCALS, TDF_CSELIB,
3201 TDF_SCEV, TDF_GIMPLE, TDF_FOLDING, MSG_OPTIMIZED_LOCATIONS,
3202 MSG_MISSED_OPTIMIZATION, MSG_NOTE, MSG_ALL, TDF_COMPARE_DEBUG,
3203 TDF_NONE): Convert from macros to...
3204 (enum dump_flag): ...this new enum.
3205 (dump_flags_t): Update to use enum.
3206 (operator|, operator&, operator~, operator|=, operator&=):
3207 Implement for dump_flags_t.
3208 (OPTGROUP_NONE, OPTGROUP_IPA, OPTGROUP_LOOP, OPTGROUP_INLINE,
3209 OPTGROUP_OMP, OPTGROUP_VEC, OPTGROUP_OTHER, OPTGROUP_ALL):
3210 Convert from macros to...
3211 (enum optgroup_flag): ...this new enum.
3212 (optgroup_flags_t): New typedef.
3213 (operator|, operator|=): Implement for optgroup_flags_t.
3214 (struct dump_file_info): Convert field "alt_flags" to
3215 dump_flags_t. Convert field "optgroup_flags" to
3217 (dump_basic_block): Use dump_flags_t rather than int for param.
3218 (dump_generic_expr_loc): Likewise.
3219 (dump_dec): Likewise.
3220 (dump_register): Convert param "optgroup_flags" to
3222 (opt_info_enable_passes): Likewise.
3223 * early-remat.c (early_remat::dump_edge_list): Use TDF_NONE rather
3225 * gimple-pretty-print.c (debug): Likewise.
3226 * gimple-ssa-store-merging.c (bswap_replace): Likewise.
3227 (merged_store_group::apply_stores): Likewise.
3228 * gimple-ssa-strength-reduction.c (insert_initializers): Likewise.
3229 * gimple.c (verify_gimple_pp): Likewise.
3230 * graphite-poly.c (print_pbb_body): Likewise.
3231 * passes.c (pass_manager::register_one_dump_file): Convert
3232 local "optgroup_flags" to optgroup_flags_t.
3233 * print-tree.c (print_node): Use TDF_NONE rather than 0.
3235 (debug_body): Likewise.
3236 * tree-pass.h (struct pass_data): Convert field "optgroup_flags"
3237 to optgroup_flags_t.
3238 * tree-pretty-print.c (print_struct_decl): Use TDF_NONE rather
3240 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Likewise.
3241 (convert_mult_to_fma): Likewise.
3242 * tree-ssa-reassoc.c (undistribute_ops_list): Likewise.
3243 * tree-ssa-sccvn.c (vn_eliminate): Likewise.
3244 * tree-vect-data-refs.c (dump_lower_bound): Convert param
3245 "dump_kind" to dump_flags_t.
3247 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
3249 * config/rs6000/rs6000.c (min, max): Delete.
3251 2018-06-08 Segher Boessenkool <segher@kernel.crashing.org>
3253 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete mention of
3254 -mabi=spe and -mabi=no-spe.
3256 2018-06-08 Martin Liska <mliska@suse.cz>
3258 * ipa-pure-const.c (propagate_pure_const): Use ::get at places
3259 where we expect an existing summary.
3261 2018-06-08 Martin Liska <mliska@suse.cz>
3263 * ipa-inline-analysis.c (simple_edge_hints): Use ::get method.
3264 * ipa-inline.h (estimate_edge_growth): Likewise.
3266 2018-06-08 Martin Liska <mliska@suse.cz>
3268 * cgraph.c (function_version_hasher::hash): Use
3269 cgraph_node::get_uid ().
3270 (function_version_hasher::equal):
3271 * cgraph.h (cgraph_node::get_uid): New method.
3272 * ipa-inline.c (update_caller_keys): Use
3273 cgraph_node::get_uid ().
3274 (update_callee_keys): Likewise.
3275 * ipa-utils.c (searchc): Likewise.
3276 (ipa_reduced_postorder): Likewise.
3277 * lto-cgraph.c (input_node): Likewise.
3278 * passes.c (is_pass_explicitly_enabled_or_disabled): Likewise.
3279 * symbol-summary.h (symtab_insertion): Likewise.
3280 (symtab_removal): Likewise.
3281 (symtab_duplication): Likewise.
3282 * tree-pretty-print.c (dump_function_header): Likewise.
3283 * tree-sra.c (convert_callers_for_node): Likewise.
3285 2018-06-08 Martin Liska <mliska@suse.cz>
3287 * cgraph.c (symbol_table::create_edge): Always assign a new
3289 (symbol_table::free_edge): Do not recycle numbers.
3290 * cgraph.h (cgraph_edge::get): New method.
3291 * symbol-summary.h (symtab_removal): Use it.
3292 (symtab_duplication): Likewise.
3293 (call_summary::hashable_uid): Remove.
3295 2018-06-08 Martin Liska <mliska@suse.cz>
3297 * ipa-inline-analysis.c (inline_edge_removal_hook): Remove.
3298 (initialize_growth_caches): Remove.
3299 (free_growth_caches): Likewise.
3300 (do_estimate_edge_time): Use edge_growth_cache.
3301 (do_estimate_edge_size): Likewise.
3302 (do_estimate_edge_hints): Likewise.
3303 * ipa-inline.c (reset_edge_caches): Likewise.
3304 (recursive_inlining): Likewise.
3305 (inline_small_functions): Likewise.
3306 * ipa-inline.h (initialize_growth_caches): Remove.
3307 (estimate_edge_size): Likewise.
3308 (estimate_edge_time): Likewise.
3309 (estimate_edge_hints): Likewise.
3310 (reset_edge_growth_cache): Likewise.
3311 * symbol-summary.h (call_summary::remove): New method.
3313 2018-06-08 Martin Liska <mliska@suse.cz>
3315 * ipa-cp.c (class edge_clone_summary): New summary.
3316 (grow_edge_clone_vectors): Remove.
3317 (ipcp_edge_duplication_hook): Remove.
3318 (class edge_clone_summary_t): New call_summary class.
3319 (ipcp_edge_removal_hook): Remove.
3320 (edge_clone_summary_t::duplicate): New function.
3321 (get_next_cgraph_edge_clone): Use edge_clone_summaries.
3322 (create_specialized_node): Likewise.
3323 (ipcp_driver): Initialize edge_clone_summaries and do not
3326 2018-06-08 Martin Liska <mliska@suse.cz>
3328 * symbol-summary.h (get): New function.
3329 (call_summary::m_initialize_when_cloning): New class member.
3331 2018-06-08 Martin Liska <mliska@suse.cz>
3333 * cgraph.c (cgraph_node::remove): Do not recycle uid.
3334 * cgraph.h (symbol_table::release_symbol): Do not pass uid.
3335 (symbol_table::allocate_cgraph_symbol): Do not set uid.
3336 * passes.c (uid_hash_t): Record removed_nodes by their uids.
3337 (remove_cgraph_node_from_order): Use the removed_nodes set.
3338 (do_per_function_toporder): Likwise.
3339 * symbol-summary.h (symtab_insertion): Use cgraph_node::uid
3340 instead of summary_uid.
3341 (symtab_removal): Likewise.
3342 (symtab_duplication): Likewise.
3344 2018-06-08 Martin Liska <mliska@suse.cz>
3346 * ipa-cp.c (ipcp_store_bits_results): Use
3347 ipcp_transformation_sum.
3348 (ipcp_store_vr_results): Likewise.
3349 * ipa-prop.c (ipcp_grow_transformations_if_necessary): Renamed
3351 (ipcp_transformation_initialize): ... this.
3352 (ipa_set_node_agg_value_chain):
3353 (ipa_node_params_t::duplicate): Use ipcp_transformation_sum.
3354 (write_ipcp_transformation_info): Likewise.
3355 (read_ipcp_transformation_info): Likewise.
3356 (ipcp_update_bits): Likewise.
3357 (ipcp_update_vr): Likewise.
3358 (ipcp_transform_function): Likewise.
3359 * ipa-prop.h: Rename ipcp_transformation_summary to
3360 ipcp_transformation.
3361 (class ipcp_transformation_t): New function summary.
3362 (ipcp_get_transformation_summary): Use ipcp_transformation_sum.
3363 (ipa_get_agg_replacements_for_node): Likewise.
3365 2018-06-08 Martin Liska <mliska@suse.cz>
3367 * ipa-pure-const.c (struct funct_state_d): Do it class instead
3369 (class funct_state_summary_t): New function_summary class.
3370 (has_function_state): Remove.
3371 (get_function_state): Likewise.
3372 (set_function_state): Likewise.
3373 (add_new_function): Likewise.
3374 (funct_state_summary_t::insert): New function.
3375 (duplicate_node_data): Remove.
3376 (remove_node_data): Remove.
3377 (funct_state_summary_t::duplicate): New function.
3378 (register_hooks): Create new funct_state_summaries.
3379 (pure_const_generate_summary): Use it.
3380 (pure_const_write_summary): Likewise.
3381 (pure_const_read_summary): Likewise.
3382 (propagate_pure_const): Likewise.
3383 (propagate_nothrow): Likewise.
3384 (dump_malloc_lattice): Likewise.
3385 (propagate_malloc): Likewise.
3386 (execute): Do not register hooks, just remove summary
3388 (pass_ipa_pure_const::pass_ipa_pure_const): Simplify
3391 2018-06-08 Martin Liska <mliska@suse.cz>
3393 * ipa-reference.c (remove_node_data): Remove.
3394 (duplicate_node_data): Likewise.
3395 (class ipa_ref_var_info_summary_t): New class.
3396 (class ipa_ref_opt_summary_t): Likewise.
3397 (get_reference_vars_info): Use ipa_ref_var_info_summaries.
3398 (get_reference_optimization_summary): Use
3399 ipa_ref_opt_sum_summaries.
3400 (set_reference_vars_info): Remove.
3401 (set_reference_optimization_summary): Likewise.
3402 (ipa_init): Create summaries.
3403 (init_function_info): Use function summary.
3404 (ipa_ref_opt_summary_t::duplicate): New function.
3405 (ipa_ref_opt_summary_t::remove): New function.
3406 (get_read_write_all_from_node): Fix GNU coding style.
3407 (propagate): Use function summary.
3408 (write_node_summary_p): Fix GNU coding style.
3409 (stream_out_bitmap): Likewise.
3410 (ipa_reference_read_optimization_summary): Use function summary.
3411 (ipa_reference_c_finalize): Do not release hooks.
3413 2018-06-08 Martin Liska <mliska@suse.cz>
3415 * ipa-fnsummary.c (dump_ipa_call_summary): Use ::get method.
3416 (analyze_function_body): Extract multiple calls of get_create.
3417 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
3418 * ipa-inline.c (recursive_inlining): Use ::get method.
3419 * ipa-inline.h (estimate_edge_growth): Likewise.
3421 2018-06-08 Martin Liska <mliska@suse.cz>
3423 * hsa-common.h (enum hsa_function_kind): Rename HSA_NONE to
3425 (hsa_function_summary::hsa_function_summary): Use the new enum
3427 (hsa_gpu_implementation_p): Use hsa_summaries::get.
3428 * hsa-gen.c (hsa_get_host_function): Likewise.
3429 (get_brig_function_name): Likewise.
3430 * ipa-hsa.c (process_hsa_functions): Likewise.
3431 (ipa_hsa_write_summary): Likewise.
3432 * symbol-summary.h (symtab_duplication): Use ::get function/
3433 (get): New function.
3435 2018-06-08 Martin Liska <mliska@suse.cz>
3437 * config/i386/i386.c (ix86_can_inline_p): Use get_create instead
3439 * hsa-common.c (hsa_summary_t::link_functions): Likewise.
3440 (hsa_register_kernel): Likewise.
3441 * hsa-common.h (hsa_gpu_implementation_p): Likewise.
3442 * hsa-gen.c (hsa_get_host_function): Likewise.
3443 (get_brig_function_name): Likewise.
3444 (generate_hsa): Likewise.
3445 (pass_gen_hsail::execute): Likewise.
3446 * ipa-cp.c (ipcp_cloning_candidate_p): Likewise.
3447 (devirtualization_time_bonus): Likewise.
3448 (ipcp_propagate_stage): Likewise.
3449 * ipa-fnsummary.c (redirect_to_unreachable): Likewise.
3450 (edge_set_predicate): Likewise.
3451 (evaluate_conditions_for_known_args): Likewise.
3452 (evaluate_properties_for_edge): Likewise.
3453 (ipa_fn_summary::reset): Likewise.
3454 (ipa_fn_summary_t::duplicate): Likewise.
3455 (dump_ipa_call_summary): Likewise.
3456 (ipa_dump_fn_summary): Likewise.
3457 (analyze_function_body): Likewise.
3458 (compute_fn_summary): Likewise.
3459 (estimate_edge_devirt_benefit): Likewise.
3460 (estimate_edge_size_and_time): Likewise.
3461 (estimate_calls_size_and_time): Likewise.
3462 (estimate_node_size_and_time): Likewise.
3463 (inline_update_callee_summaries): Likewise.
3464 (remap_edge_change_prob): Likewise.
3465 (remap_edge_summaries): Likewise.
3466 (ipa_merge_fn_summary_after_inlining): Likewise.
3467 (ipa_update_overall_fn_summary): Likewise.
3468 (read_ipa_call_summary): Likewise.
3469 (inline_read_section): Likewise.
3470 (write_ipa_call_summary): Likewise.
3471 (ipa_fn_summary_write): Likewise.
3472 (ipa_free_fn_summary): Likewise.
3473 * ipa-hsa.c (process_hsa_functions): Likewise.
3474 (ipa_hsa_write_summary): Likewise.
3475 (ipa_hsa_read_section): Likewise.
3476 * ipa-icf.c (sem_function::merge): Likewise.
3477 * ipa-inline-analysis.c (simple_edge_hints): Likewise.
3478 (do_estimate_edge_time): Likewise.
3479 (estimate_size_after_inlining): Likewise.
3480 (estimate_growth): Likewise.
3481 (growth_likely_positive): Likewise.
3482 * ipa-inline-transform.c (clone_inlined_nodes): Likewise.
3483 (inline_call): Likewise.
3484 * ipa-inline.c (caller_growth_limits): Likewise.
3485 (can_inline_edge_p): Likewise.
3486 (can_inline_edge_by_limits_p): Likewise.
3487 (compute_uninlined_call_time): Likewise.
3488 (compute_inlined_call_time): Likewise.
3489 (want_inline_small_function_p): Likewise.
3490 (edge_badness): Likewise.
3491 (update_caller_keys): Likewise.
3492 (update_callee_keys): Likewise.
3493 (recursive_inlining): Likewise.
3494 (inline_small_functions): Likewise.
3495 (inline_to_all_callers_1): Likewise.
3496 (dump_overall_stats): Likewise.
3497 (early_inline_small_functions): Likewise.
3498 (early_inliner): Likewise.
3499 * ipa-inline.h (estimate_edge_growth): Likewise.
3500 * ipa-profile.c (ipa_propagate_frequency_1): Likewise.
3501 * ipa-prop.c (ipa_make_edge_direct_to_target): Likewise.
3502 * ipa-prop.h (IPA_NODE_REF): Likewise.
3503 (IPA_EDGE_REF): Likewise.
3504 * ipa-pure-const.c (malloc_candidate_p): Likewise.
3505 (propagate_malloc): Likewise.
3506 * ipa-split.c (execute_split_functions): Likewise.
3507 * symbol-summary.h: Rename get to get_create.
3509 (get_create): Likewise.
3510 * tree-sra.c (ipa_sra_preliminary_function_checks): Likewise.
3512 2018-06-08 Martin Liska <mliska@suse.cz>
3514 * symbol-summary.h (release): Move definition out of class
3516 (symtab_removal): Likewise.
3517 (symtab_duplication): Likewise.
3519 2018-06-08 Martin Liska <mliska@suse.cz>
3521 * symbol-summary.h (function_summary): Move constructor
3522 implementation out of class declaration.
3523 (release): Likewise.
3524 (symtab_insertion): Likewise.
3525 (symtab_removal): Likewise.
3526 (symtab_duplication): Likewise.
3529 2018-06-08 Martin Liska <mliska@suse.cz>
3531 * Makefile.in: Remove support for MPX (macros, related functions,
3532 fields in cgraph_node, ...).
3533 * builtin-types.def (BT_BND): Likewise.
3534 (BT_FN_BND_CONST_PTR): Likewise.
3535 (BT_FN_CONST_PTR_BND): Likewise.
3536 (BT_FN_VOID_PTR_BND): Likewise.
3537 (BT_FN_BND_CONST_PTR_SIZE): Likewise.
3538 (BT_FN_VOID_CONST_PTR_BND_CONST_PTR): Likewise.
3539 * builtins.c (expand_builtin_memcpy_with_bounds): Likewise.
3540 (expand_builtin_mempcpy_with_bounds): Likewise.
3541 (expand_builtin_memset_with_bounds): Likewise.
3542 (expand_builtin_memset_args): Likewise.
3543 (std_expand_builtin_va_start): Likewise.
3544 (expand_builtin): Likewise.
3545 (expand_builtin_with_bounds): Likewise.
3546 * builtins.def (DEF_BUILTIN_CHKP): Likewise.
3547 (DEF_LIB_BUILTIN_CHKP): Likewise.
3548 (DEF_EXT_LIB_BUILTIN_CHKP): Likewise.
3549 (DEF_CHKP_BUILTIN): Likewise.
3550 (BUILT_IN_MEMCPY): Likewise.
3551 (BUILT_IN_MEMMOVE): Likewise.
3552 (BUILT_IN_MEMPCPY): Likewise.
3553 (BUILT_IN_MEMSET): Likewise.
3554 (BUILT_IN_STPCPY): Likewise.
3555 (BUILT_IN_STRCAT): Likewise.
3556 (BUILT_IN_STRCHR): Likewise.
3557 (BUILT_IN_STRCPY): Likewise.
3558 (BUILT_IN_STRLEN): Likewise.
3559 (BUILT_IN_MEMCPY_CHK): Likewise.
3560 (BUILT_IN_MEMMOVE_CHK): Likewise.
3561 (BUILT_IN_MEMPCPY_CHK): Likewise.
3562 (BUILT_IN_MEMSET_CHK): Likewise.
3563 (BUILT_IN_STPCPY_CHK): Likewise.
3564 (BUILT_IN_STRCAT_CHK): Likewise.
3565 (BUILT_IN_STRCPY_CHK): Likewise.
3566 * calls.c (store_bounds): Likewise.
3567 (emit_call_1): Likewise.
3568 (special_function_p): Likewise.
3569 (maybe_warn_nonstring_arg): Likewise.
3570 (initialize_argument_information): Likewise.
3571 (finalize_must_preallocate): Likewise.
3572 (compute_argument_addresses): Likewise.
3573 (expand_call): Likewise.
3574 * cfgexpand.c (expand_call_stmt): Likewise.
3575 (expand_return): Likewise.
3576 (expand_gimple_stmt_1): Likewise.
3577 (pass_expand::execute): Likewise.
3578 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Likewise.
3579 (cgraph_node::remove): Likewise.
3580 (cgraph_node::dump): Likewise.
3581 (cgraph_node::verify_node): Likewise.
3582 * cgraph.h (chkp_function_instrumented_p): Likewise.
3583 (symtab_node::get_alias_target): Likewise.
3584 (cgraph_node::can_remove_if_no_direct_calls_and_refs_p): Likewise.
3585 (cgraph_local_p): Likewise.
3586 * cgraphbuild.c (cgraph_edge::rebuild_edges): Likewise.
3587 (cgraph_edge::rebuild_references): Likewise.
3588 * cgraphunit.c (varpool_node::finalize_decl): Likewise.
3589 (walk_polymorphic_call_targets): Likewise.
3590 (cgraph_node::expand_thunk): Likewise.
3591 (symbol_table::output_weakrefs): Likewise.
3592 * common/config/i386/i386-common.c (OPTION_MASK_ISA2_GENERAL_REGS_ONLY_UNSET): Likewise.
3593 (ix86_handle_option): Likewise.
3594 * config/i386/constraints.md: Likewise.
3595 * config/i386/i386-builtin-types.def (BND): Likewise.
3599 * config/i386/i386-builtin.def (BDESC_END): Likewise.
3600 (BDESC_FIRST): Likewise.
3602 * config/i386/i386-c.c (ix86_target_macros_internal): Likewise.
3603 * config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): Likewise.
3604 * config/i386/i386.c (enum reg_class): Likewise.
3605 (ix86_target_string): Likewise.
3606 (ix86_option_override_internal): Likewise.
3607 (ix86_conditional_register_usage): Likewise.
3608 (ix86_valid_target_attribute_inner_p): Likewise.
3609 (ix86_set_indirect_branch_type): Likewise.
3610 (ix86_set_current_function): Likewise.
3611 (ix86_function_arg_regno_p): Likewise.
3612 (init_cumulative_args): Likewise.
3613 (ix86_function_arg_advance): Likewise.
3614 (ix86_function_arg): Likewise.
3615 (ix86_pass_by_reference): Likewise.
3616 (ix86_function_value_regno_p): Likewise.
3617 (ix86_function_value_1): Likewise.
3618 (ix86_function_value_bounds): Likewise.
3619 (ix86_return_in_memory): Likewise.
3620 (ix86_setup_incoming_vararg_bounds): Likewise.
3621 (ix86_va_start): Likewise.
3622 (indirect_thunk_need_prefix): Likewise.
3623 (print_reg): Likewise.
3624 (ix86_print_operand): Likewise.
3625 (ix86_expand_call): Likewise.
3626 (ix86_output_function_return): Likewise.
3627 (reg_encoded_number): Likewise.
3628 (BDESC_VERIFYS): Likewise.
3629 (ix86_init_mpx_builtins): Likewise.
3630 (ix86_init_builtins): Likewise.
3631 (ix86_emit_cmove): Likewise.
3632 (ix86_emit_move_max): Likewise.
3633 (ix86_expand_builtin): Likewise.
3634 (ix86_builtin_mpx_function): Likewise.
3635 (ix86_get_arg_address_for_bt): Likewise.
3636 (ix86_load_bounds): Likewise.
3637 (ix86_store_bounds): Likewise.
3638 (ix86_load_returned_bounds): Likewise.
3639 (ix86_store_returned_bounds): Likewise.
3640 (ix86_class_likely_spilled_p): Likewise.
3641 (ix86_hard_regno_mode_ok): Likewise.
3642 (x86_order_regs_for_local_alloc): Likewise.
3643 (ix86_mitigate_rop): Likewise.
3644 (ix86_bnd_prefixed_insn_p): Likewise.
3645 (ix86_mpx_bound_mode): Likewise.
3646 (ix86_make_bounds_constant): Likewise.
3647 (ix86_initialize_bounds): Likewise.
3648 (TARGET_LOAD_BOUNDS_FOR_ARG): Likewise.
3649 (TARGET_STORE_BOUNDS_FOR_ARG): Likewise.
3650 (TARGET_LOAD_RETURNED_BOUNDS): Likewise.
3651 (TARGET_STORE_RETURNED_BOUNDS): Likewise.
3652 (TARGET_CHKP_BOUND_MODE): Likewise.
3653 (TARGET_BUILTIN_CHKP_FUNCTION): Likewise.
3654 (TARGET_CHKP_FUNCTION_VALUE_BOUNDS): Likewise.
3655 (TARGET_CHKP_MAKE_BOUNDS_CONSTANT): Likewise.
3656 (TARGET_CHKP_INITIALIZE_BOUNDS): Likewise.
3657 * config/i386/i386.h (TARGET_MPX): Likewise.
3658 (TARGET_MPX_P): Likewise.
3659 (VALID_BND_REG_MODE): Likewise.
3660 (FIRST_BND_REG): Likewise.
3661 (LAST_BND_REG): Likewise.
3662 (enum reg_class): Likewise.
3663 (BND_REG_P): Likewise.
3664 (BND_REGNO_P): Likewise.
3665 (BNDmode): Likewise.
3666 (ADJUST_INSN_LENGTH): Likewise.
3667 * config/i386/i386.md: Likewise.
3668 * config/i386/i386.opt: Likewise.
3669 * config/i386/linux-common.h (LIBMPX_LIBS): Likewise.
3670 (defined): Likewise.
3671 (LINK_MPX): Likewise.
3672 (MPX_SPEC): Likewise.
3673 (LIBMPX_SPEC): Likewise.
3674 (LIBMPXWRAPPERS_SPEC): Likewise.
3675 (CHKP_SPEC): Likewise.
3676 * config/i386/predicates.md: Likewise.
3677 * dbxout.c (dbxout_type): Likewise.
3678 * doc/extend.texi: Likewise.
3679 * doc/invoke.texi: Likewise.
3680 * doc/md.texi: Likewise.
3681 * doc/tm.texi: Likewise.
3682 * doc/tm.texi.in: Likewise.
3683 * dwarf2out.c (is_base_type): Likewise.
3684 (gen_formal_types_die): Likewise.
3685 (gen_subprogram_die): Likewise.
3686 (gen_type_die_with_usage): Likewise.
3687 (gen_decl_die): Likewise.
3688 (dwarf2out_late_global_decl): Likewise.
3689 * expr.c (expand_assignment): Likewise.
3690 (emit_storent_insn): Likewise.
3691 (store_expr_with_bounds): Likewise.
3692 (store_expr): Likewise.
3693 (expand_expr_real_1): Likewise.
3694 * expr.h (store_expr_with_bounds): Likewise.
3695 * function.c (use_register_for_decl): Likewise.
3696 (struct bounds_parm_data): Likewise.
3697 (assign_parms_augmented_arg_list): Likewise.
3698 (assign_parm_find_entry_rtl): Likewise.
3699 (assign_parm_is_stack_parm): Likewise.
3700 (assign_parm_load_bounds): Likewise.
3701 (assign_bounds): Likewise.
3702 (assign_parms): Likewise.
3703 (expand_function_start): Likewise.
3704 * gcc.c (CHKP_SPEC): Likewise.
3705 * gimple-fold.c (gimple_fold_builtin_memory_op): Likewise.
3706 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Likewise.
3707 (wrestrict_dom_walker::check_call): Likewise.
3708 * gimple.c (gimple_build_call_from_tree): Likewise.
3709 * gimple.h (enum gf_mask): Likewise.
3710 (gimple_call_with_bounds_p): Likewise.
3711 (gimple_call_set_with_bounds): Likewise.
3712 * gimplify.c (gimplify_init_constructor): Likewise.
3713 * ipa-cp.c (initialize_node_lattices): Likewise.
3714 (propagate_constants_across_call): Likewise.
3715 (find_more_scalar_values_for_callers_subset): Likewise.
3716 * ipa-hsa.c (process_hsa_functions): Likewise.
3717 * ipa-icf-gimple.c (func_checker::compare_gimple_call): Likewise.
3718 * ipa-icf.c (sem_function::merge): Likewise.
3719 * ipa-inline.c (early_inliner): Likewise.
3720 * ipa-pure-const.c (warn_function_noreturn): Likewise.
3721 (warn_function_cold): Likewise.
3722 (propagate_pure_const): Likewise.
3723 * ipa-ref.h (enum GTY): Likewise.
3724 * ipa-split.c (find_retbnd): Likewise.
3725 (consider_split): Likewise.
3726 (split_function): Likewise.
3727 * ipa-visibility.c (cgraph_externally_visible_p): Likewise.
3728 * ipa.c (walk_polymorphic_call_targets): Likewise.
3729 (symbol_table::remove_unreachable_nodes): Likewise.
3730 (process_references): Likewise.
3731 (cgraph_build_static_cdtor_1): Likewise.
3732 * lto-cgraph.c (lto_output_node): Likewise.
3733 (output_refs): Likewise.
3734 (compute_ltrans_boundary): Likewise.
3735 (input_overwrite_node): Likewise.
3736 (input_node): Likewise.
3737 (input_cgraph_1): Likewise.
3738 * params.def (PARAM_CHKP_MAX_CTOR_SIZE): Likewise.
3739 * passes.c (pass_manager::execute_early_local_passes): Likewise.
3740 (class pass_chkp_instrumentation_passes): Likewise.
3741 (make_pass_chkp_instrumentation_passes): Likewise.
3742 * passes.def: Likewise.
3743 * rtl.h (struct GTY): Likewise.
3744 (CALL_EXPR_WITH_BOUNDS_P): Likewise.
3745 * stor-layout.c (layout_type): Likewise.
3746 * symtab.c: Likewise.
3747 * target.def: Likewise.
3748 * targhooks.c (default_chkp_bound_type): Likewise.
3749 (default_chkp_bound_mode): Likewise.
3750 (default_builtin_chkp_function): Likewise.
3751 (default_chkp_function_value_bounds): Likewise.
3752 (default_chkp_make_bounds_constant): Likewise.
3753 (default_chkp_initialize_bounds): Likewise.
3754 * targhooks.h (default_chkp_bound_type): Likewise.
3755 (default_chkp_bound_mode): Likewise.
3756 (default_builtin_chkp_function): Likewise.
3757 (default_chkp_function_value_bounds): Likewise.
3758 (default_chkp_make_bounds_constant): Likewise.
3759 (default_chkp_initialize_bounds): Likewise.
3760 * toplev.c (compile_file): Likewise.
3761 (process_options): Likewise.
3762 * tree-core.h (DEF_BUILTIN): Likewise.
3763 (DEF_BUILTIN_CHKP): Likewise.
3764 * tree-inline.c (declare_return_variable): Likewise.
3765 (remap_gimple_stmt): Likewise.
3766 (copy_bb): Likewise.
3767 (initialize_inlined_parameters): Likewise.
3768 (expand_call_inline): Likewise.
3769 * tree-pass.h (make_pass_ipa_chkp_versioning): Likewise.
3770 (make_pass_ipa_chkp_early_produce_thunks): Likewise.
3771 (make_pass_ipa_chkp_produce_thunks): Likewise.
3772 (make_pass_chkp): Likewise.
3773 (make_pass_chkp_opt): Likewise.
3774 (make_pass_chkp_instrumentation_passes): Likewise.
3775 * tree-pretty-print.c (dump_generic_node): Likewise.
3776 * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
3777 * tree-ssa-dce.c (propagate_necessity): Likewise.
3778 (eliminate_unnecessary_stmts): Likewise.
3779 * tree-ssa-pre.c (create_expression_by_pieces): Likewise.
3780 * tree-ssa-sccvn.c (copy_reference_ops_from_call): Likewise.
3781 * tree-ssa-sccvn.h: Likewise.
3782 * tree-ssa-strlen.c (get_string_length): Likewise.
3783 (valid_builtin_call): Likewise.
3784 (adjust_last_stmt): Likewise.
3785 (handle_builtin_strchr): Likewise.
3786 (handle_builtin_strcpy): Likewise.
3787 (handle_builtin_stxncpy): Likewise.
3788 (handle_builtin_memcpy): Likewise.
3789 (handle_builtin_strcat): Likewise.
3790 (strlen_check_and_optimize_stmt): Likewise.
3791 * tree-stdarg.c (expand_ifn_va_arg_1): Likewise.
3792 * tree-streamer-in.c: Likewise.
3793 * tree-streamer.c (record_common_node): Likewise.
3794 * tree.c (tree_code_size): Likewise.
3795 (wide_int_to_tree_1): Likewise.
3796 (type_contains_placeholder_1): Likewise.
3797 (build_common_tree_nodes): Likewise.
3798 * tree.def (POINTER_BOUNDS_TYPE): Likewise.
3799 * tree.h (POINTER_BOUNDS_TYPE_P): Likewise.
3800 (POINTER_BOUNDS_P): Likewise.
3801 (BOUNDED_TYPE_P): Likewise.
3802 (BOUNDED_P): Likewise.
3803 (CALL_WITH_BOUNDS_P): Likewise.
3804 (pointer_bounds_type_node): Likewise.
3805 * value-prof.c (gimple_ic): Likewise.
3806 * var-tracking.c (vt_add_function_parameters): Likewise.
3807 * varasm.c (make_decl_rtl): Likewise.
3808 (assemble_start_function): Likewise.
3809 (output_constant): Likewise.
3810 (maybe_assemble_visibility): Likewise.
3811 * varpool.c (ctor_for_folding): Likewise.
3812 * chkp-builtins.def: Remove.
3813 * ipa-chkp.c: Remove.
3814 * ipa-chkp.h: Remove.
3815 * rtl-chkp.c: Remove.
3816 * rtl-chkp.h: Remove.
3817 * tree-chkp-opt.c: Remove.
3818 * tree-chkp.c: Remove.
3819 * tree-chkp.h: Remove.
3821 2018-06-07 Carl Love <cel@us.ibm.com>
3823 * gcc/config/rs6000/vsx.md (vextract_fp_from_shorth,
3824 vextract_fp_from_shortl): Add BE support.
3826 2018-06-07 Paul Koning <ni1d@arrl.net>
3828 * compare-elim.c (try_merge_compare): Don't merge compare if
3829 address contains a side effect.
3830 (try_eliminate_compare): Likewise.
3832 2018-06-07 Olga Makhotina <olga.makhotina@intel.com>
3834 * config.gcc: Support "tremont".
3835 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "tremont".
3836 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
3838 * config/i386/i386.c (m_TREMONT): Define.
3839 (processor_target_table): Add "tremont".
3840 (PTA_TREMONT): Define.
3841 (ix86_lea_outperforms): Add TARGET_TREMONT.
3842 (get_builtin_code_for_version): Handle PROCESSOR_TREMONT.
3843 (fold_builtin_cpu): Add M_INTEL_TREMONT, replace M_INTEL_GOLDMONT
3844 and M_INTEL_GOLDMONT_PLUS.
3845 (fold_builtin_cpu): Add "tremont".
3846 (ix86_add_stmt_cost): Add TARGET_TREMONT.
3847 (ix86_option_override_internal): Add "tremont".
3848 * config/i386/i386.h (processor_costs): Define TARGET_TREMONT.
3849 (processor_type): Add PROCESSOR_TREMONT.
3850 * config/i386/x86-tune.def: Add m_TREMONT.
3851 * doc/invoke.texi: Add tremont as x86 -march=/-mtune= CPU type.
3853 2018-06-07 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3855 * gcc/config/msp430/msp430.c (msp430_mcu_name): Set the "i" in the
3856 symbol defined for msp430i* devices to be lower case.
3858 gcc/testsuite/gcc.target/msp430/
3859 * msp430i-device-symbol.c: New test.
3860 * msp430f-device-symbol.c: New test.
3861 * msp430.h: New test header file.
3863 2018-06-07 Richard Biener <rguenther@suse.de>
3865 * graphite-sese-to-poly.c (extract_affine): Avoid unneded
3866 wrapping. Properly wrap the result of a BIT_NOT_EXPR.
3867 Properly wrap signed arithmetic if overflow wraps.
3869 2018-06-07 Jakub Jelinek <jakub@redhat.com>
3871 PR tree-optimization/69615
3872 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): If rhs2 is lhs
3873 of a cast from a same precision integral SSA_NAME in a bb dominated
3874 by first_bb, retry with rhs2 set to the rhs1 of the cast. Don't emit
3875 cast to utype if rhs2 has already a compatible type.
3877 2018-06-07 Richard Biener <rguenther@suse.de>
3879 PR tree-optimization/85935
3880 * graphite-scop-detection.c (find_params_in_bb): Analyze
3881 condition operands with respect to the correct loop. Assert
3882 the analysis doesn't fail.
3884 2018-06-04 Carl Love <cel@us.ibm.com>
3886 * gcc/config/rs6000/vsx.md (first_match_index_<mode>): Calculate index
3887 using natural element order. Use gen_lshrsi3 instead of gen_ashrsi3
3888 as it is slightly cheaper.
3889 (first_match_or_eos_index_<mode>):
3890 Calculate index using natural element order.
3891 (first_match_index_<mode>):
3892 Calculate index using natural element order.
3893 (first_match_or_eos_index_<mode>):
3894 Calculate index using natural order.
3895 (define_insn vclzlsbb): Change to define_insn vclzlsbb_<mode>.
3896 for BE and LE modes.
3897 * gcc/config/rs6000/rs6000-c.c: Rename P9V_BUILTIN_VCLZLSBB,
3898 P9V_BUILTIN_VCLZLSBB_V16QI.
3899 * gcc/config/rs6000/rs6000-builtin.def: Make VCLZLSBB mode
3902 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
3904 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Adjust
3905 indentation and line wrap for many prototypes. Add missing
3906 @smallexample directives around block of prototypes for vec_xl and
3909 2018-06-05 Michael Meissner <meissner@linux.ibm.com>
3911 * config/rs6000/rs6000.c (rs6000_passes_ieee128): New boolean to
3912 track if we pass or return IEEE 128-bit floating point.
3913 (ieee128_mangling_gcc_8_1): New boolean to say whether to generate
3914 C++ mangling that is compatible with GCC 8.1.
3915 (TARGET_ASM_GLOBALIZE_DECL_NAME): Override target hook.
3916 (init_cumulative_args): Note if we pass or return IEEE 128-bit
3917 floating point types.
3918 (rs6000_function_arg_advance_1): Likewise.
3919 (rs6000_mangle_type): Optionally generate mangled names that match
3920 what GCC 8.1 generated for IEEE 128-bit floating point types.
3921 (rs6000_globalize_decl_name): If we have an external function that
3922 passes or returns IEEE 128-bit types, generate a weak reference
3923 from the mangled name used in GCC 8.1 to the current mangled
3925 (rs6000_init_builtins): Make __ibm128 use the long double type if
3926 long double is IBM extended double. Make __float128 use the long
3927 double type if long double is IEEE 128-bit.
3930 * config/rs6000/rs6000-builtin.def (BU_IBM128_2): New helper
3931 macro for __ibm128 built-in functions.
3932 (PACK_IF): Add __ibm128 pack/unpack functions.
3933 (UNPACK_IF): Likewise.
3934 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Do not
3935 enable long double built-in functions if long double is IEEE
3936 128-bit floating point.
3937 (rs6000_invalid_builtin): Update long double built-in function
3939 (rs6000_expand_builtin): For PACK_IF and UNPACK_IF built-in
3940 functions, adjust the built-in function to use the long double
3941 built-in function if __ibm128 and long double are the same type.
3942 * doc/extend.texi (PowerPC builtins): Update documention for
3943 __builtin_{,un}pack_longdouble. Add documentation for
3944 __builtin_{,un}pack_ibm128.
3946 2018-06-06 Jim Wilson <jimw@sifive.com>
3948 * config/riscv/riscv.c (enum riscv_privilege_levels): New.
3949 (struct machine_function): New field interrupt_mode.
3950 (riscv_handle_type_attribute): New function. Add forward declaration.
3951 (riscv_attribute_table) <interrupt>: Use riscv_handle_type_attribute.
3952 (riscv_expand_epilogue): Check interrupt_mode field.
3953 (riscv_set_current_function): Check interrupt attribute args and
3954 set interrupt_mode field.
3955 * config/riscv/riscv.md (UNSPECV_SRET, UNSPECV_URET): New.
3956 (riscv_sret, riscv_uret): New.
3957 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: Document
3958 new arguments to interrupt attribute.
3960 2018-06-06 Peter Bergner <bergner@vnet.ibm.com>
3963 * /config/rs6000/rs6000.h (ASM_CPU_SPEC): Add support for -mpower9.
3964 Don't handle -mcpu=power8 if -mpower9-vector is also used.
3966 2018-06-06 Kelvin Nilsen <kelvin@gcc.gnu.org>
3968 * config/rs6000/rs6000-builtin.def (VSX_BUILTIN_VEC_LD,
3969 VSX_BUILTIN_VEC_ST): Add comment to explain non-traditional uses.
3970 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
3971 several redundant entries.
3973 2018-06-06 David Malcolm <dmalcolm@redhat.com>
3975 * config/i386/i386-protos.h (ix86_expand_call): Strengthen return
3976 type from "rtx" to "rtx_insn *".
3977 * config/i386/i386.c (ix86_expand_split_stack_prologue): Likewise
3978 for local "call_insn", removing cast.
3979 (ix86_expand_call): Likewise, introducing a "call_insn" local.
3981 2018-06-06 Eric Botcazou <ebotcazou@adacore.com>
3983 PR tree-optimization/86066
3984 * gimple-ssa-store-merging.c (process_store): Do not bypass BIT_NOT_EXPR
3985 for BIT_INSERT_EXPR stores.
3987 2018-06-06 Richard Biener <rguenther@suse.de>
3989 PR tree-optimization/86062
3990 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
3991 component refs ontop
3992 of to be offsetted base.
3994 2018-06-06 Jozef Lawrynowicz <jozef.l@mittosystems.com>
3996 * gcc/config/msp430/msp430.c (msp430_attr): Allow interrupt handlers
3997 to be static and remove check on interrupt attribute name.
3999 gcc/testsuite/gcc.target/msp430/
4000 * function-attributes-4.c: New test.
4001 * static-interrupts.c: New test.
4003 2018-06-05 Kelvin Nilsen <kelvin@gcc.gnu.org>
4005 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
4006 volatile qualifier from vec_lvsl and vec_lvsr argument prototypes.
4008 2018-06-05 Steve Ellcey <sellcey@cavium.com>
4011 * config/aarch64/aarch64-protos.h (aarch64_err_no_fpadvsimd): Remove
4013 * config/aarch64/aarch64-protos..c (aarch64_err_no_fpadvsimd):
4014 Remove second argument, change how error is called.
4015 (aarch64_layout_arg): Remove second argument from
4016 aarch64_err_no_fpadvsimd call.
4017 (aarch64_init_cumulative_args): Ditto.
4018 (aarch64_gimplify_va_arg_expr): Ditto.
4019 * config/aarch64/aarch64.md (mov<mode>): Ditto.
4021 2018-06-05 Uros Bizjak <ubizjak@gmail.com>
4023 * config/i386/i386.md (simple_return_indirect_internal): New expander.
4024 (*simple_return_indirect_internal<mode>): Rename from
4025 simple_return_indirect_internal. Use W mode iterator.
4026 (rstorssp): New expander.
4027 (*rstorssp<mode>): Rename from rstorssp. Use P mode iterator.
4028 (clrssbsy): New expander.
4029 (*clrssbsy<mode>): Rename from clrssbsy. Use P mode iterator.
4031 2018-06-05 Andre Vieira <andre.simoesdiasvieira@arm.com>
4033 * config/arm/arm_cmse.h (cmse_nsfptr_create): Change typeof to
4035 (cmse_check_pointed_object): Likewise.
4037 2018-06-05 Martin Liska <mliska@suse.cz>
4039 PR gcov-profile/47618
4040 * doc/invoke.texi: Document how -fprofile-dir format
4043 2018-06-05 Richard Biener <rguenther@suse.de>
4045 * tree-cfgcleanup.c (cleanup_control_flow_pre): For edge
4046 removal pretend DOM info isn't available so we do not update
4047 it and only remove edges, not dominated blocks. Actually free
4048 DOM info in case we removed something. Remove unreachable blocks.
4049 (mfb_keep_latches): Work with either DOM info or marked backedges.
4050 (cleanup_tree_cfg_noloop): Do not remove unreachable blocks
4051 first. Mark backedges if DOM info isn't available.
4052 (Re-)compute DOM info after cleanup_control_flow_pre.
4054 2018-06-05 Richard Biener <rguenther@suse.de>
4056 * tree-cfg.c (struct locus_discrim_map): Store line, not location.
4057 (locus_discrim_hasher::hash): Adjust.
4058 (locus_discrim_hasher::equal): Likewise.
4059 (next_discriminator_for_locus): Work on line directly.
4060 (same_line_p): Pass in expanded locus1 as well.
4061 (assign_discriminators): Avoid redundant location expansions.
4063 2018-06-05 Richard Biener <rguenther@suse.de>
4065 PR tree-optimization/86046
4066 * tree-ssa.c (maybe_optimize_var): Clear DECL_GIMPLE_REG_P
4067 if required after clearing TREE_ADDRESSABLE.
4069 2018-06-05 Richard Biener <rguenther@suse.de>
4071 PR tree-optimization/86047
4072 * tree-ssa-loop.c (for_each_index): Glob handling of all
4073 decls and constants and really handle all of them.
4075 2018-06-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4078 * config/arm/arm-builtins.c (arm_type_qualifiers): Add
4079 qualifier_void_pointer and qualifier_const_void_pointer.
4080 (arm_ldc_qualifiers, arm_stc_qualifiers): Use the above.
4081 (arm_init_builtins): Handle the above.
4082 * config/arm/arm_acle.h (__arm_cdp, __arm_ldc, __arm_ldcl, __arm_stc,
4083 __arm_stcl, __arm_mcr, __arm_cdp2, __arm_ldc2, __arm_ldcl2, __arm_stc2,
4084 __arm_stcl2,__arm_mcr2, __arm_mcrr, __arm_mcrr2): Remove return for
4087 2018-06-05 Martin Liska <mliska@suse.cz>
4089 * auto-profile.c (read_autofdo_file): Do not use
4090 gcov_ctr_summary struct.
4091 (afdo_callsite_hot_enough_for_early_inline): Likewise.
4092 * coverage.c (struct counts_entry): Likewise.
4093 (read_counts_file): Read just single summary entry.
4094 (get_coverage_counts): Use gcov_summary struct.
4095 * coverage.h (get_coverage_counts): Likewise.
4096 * gcov-dump.c (dump_working_sets): Likewise.
4097 (tag_summary): Dump just single summary.
4098 * gcov-io.c (gcov_write_summary): Write just histogram
4100 (gcov_read_summary): Read just single summary.
4101 (compute_working_sets): Use gcov_summary struct.
4102 * gcov-io.h (GCOV_TAG_SUMMARY_LENGTH): Remove usage
4103 of GCOV_COUNTERS_SUMMABLE.
4104 (GCOV_COUNTERS_SUMMABLE): Remove.
4105 (GCOV_FIRST_VALUE_COUNTER): Replace with
4106 GCOV_COUNTER_V_INTERVAL.
4107 (struct gcov_ctr_summary): Remove.
4108 (struct gcov_summary): Directly use fields of former
4110 (compute_working_sets): Use gcov_summary struct.
4111 * gcov.c (read_count_file): Do not use ctrs fields.
4112 * lto-cgraph.c (merge_profile_summaries): Use gcov_summary
4114 * lto-streamer.h (struct GTY): Make profile_info gcov_summary
4116 * profile.c: Likewise.
4117 * profile.h: Likewise.
4119 2018-06-05 Martin Liska <mliska@suse.cz>
4121 PR gcov-profile/84846
4122 * gcov.c (output_lines): Print working directory only
4123 in intermediate format.
4125 2018-06-05 Andreas Krebbel <krebbel@linux.ibm.com>
4127 * config/s390/s390-builtin-types.def: Add void function type.
4128 * config/s390/s390-builtins.def: Use the function type for the
4131 2018-06-04 Jim Wilson <jimw@sifive.com>
4133 * config/riscv/riscv-protos.h (riscv_expand_epilogue): Change bool arg
4135 * config/riscv/riscv.c (riscv_for_each_saved_reg): New args epilogue
4136 and maybe_eh_return. Change regno to unsigned int. Use new args to
4137 handle EH_RETURN_DATA_REGNO registers properly.
4138 (riscv_expand_prologue): Pass new args to riscv_for_each_saved_reg.
4139 (riscv_expand_epilogue): Update comment. Change argument name and
4140 type. Update code to use new name and type. Pass new args to
4141 riscv_for_each_saved_reg. Only use EH_RETURN_STACKADJ_RTX when
4143 * config/riscv/riscv.md (NORMAL_RETURN): New.
4144 (SIBCALL_RETURN, EXCEPTION_RETURN): New.
4145 (epilogue, sibcall_epilogue): Update riscv_expand_epilogue arg.
4146 (eh_return): Call gen_eh_return_internal and emit barrier.
4147 (eh_return_internal): Call riscv_expand_epilogue.
4149 2018-06-04 Eric Botcazou <ebotcazou@adacore.com>
4151 * gimple-ssa-store-merging.c (struct merged_store_group): Move up
4152 bit_insertion field and declare can_be_merged_into method.
4153 (merged_store_group::can_be_merged_into): New method.
4154 (imm_store_chain_info::coalesce_immediate): Call it to decide whether
4155 consecutive non-overlapping stores can be merged. Turn MEM_REF stores
4156 into BIT_INSERT_EXPR stores if the group contains a non-MEM_REF store.
4158 2018-06-04 Richard Biener <rguenther@suse.de>
4160 PR tree-optimization/85955
4161 * builtins.c (fold_builtin_sincos): Convert pointers to
4162 destination to appropriate type before dereferencing.
4164 2018-06-04 Segher Boessenkool <segher@kernel.crashing.org>
4166 * config/rs6000/rs6000.md (abs<mode>2 for FLOAT128): Handle IFmode.
4168 2018-06-04 Richard Sandiford <richard.sandiford@linaro.org>
4170 * expr.c (expand_expr_real_1): Force the operand into memory if
4171 its TYPE_MODE is BLKmode and if there is no integer mode for
4172 the number of bits being extracted.
4174 2018-06-04 Jakub Jelinek <jakub@redhat.com>
4178 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
4179 Use vptestnm rather than vptestm in (=Yc,v,C) variant.
4181 2018-06-04 Richard Biener <rguenther@suse.de>
4183 * tree-cfgcleanup.c (cleanup_tree_cfg_1): Fold into...
4184 (cleanup_tree_cfg_noloop): ... single caller. Do
4185 start_recording_case_labels later.
4187 2018-06-04 Sebastian Peryt <sebastian.peryt@intel.com>
4189 * config/i386/cldemoteintrin.h: Change define from _X86INTRIN_H_INCLUDED
4190 to _IMMINTRIN_H_INCLUDED.
4191 * config/i386/pconfigintrin.h: Ditto.
4192 * config/i386/waitpkgintrin.h: Ditto.
4193 * config/i386/immintrin.h: Add includes for sgxintrin.h,
4194 pconfigintrin.h, waitpkgintrin.h and cldemoteintrin.h.
4195 * config/i386/x86intrin.h: Remove includes for mintrin.h, xmmintrin.h,
4196 emmintrin.h, pmmintrin.h, tmmintrin.h, smmintrin.h, wmmintrin.h,
4197 bmiintrin.h, bmi2intrin.h, lzcntintrin.h, sgxintrin.h, pconfigintrin.h,
4198 waitpkgintrin.h and cldemoteintrin.h.
4200 2018-06-04 Richard Biener <rguenther@suse.de>
4202 PR tree-optimization/86038
4203 * tracer.c (find_best_successor): Check probability for
4204 being initialized, bail out if not.
4206 2018-06-04 Richard Earnshaw <rearnsha@arm.com>
4209 * config/arm/arm-cpus.in (ALL_QUIRKS): Add xscale feature to the list
4210 of bits to ignore when comparing architectures.
4212 2018-06-04 Jakub Jelinek <jakub@redhat.com>
4214 PR tree-optimization/69615
4215 * fold-const.c (merge_ranges): If range1 is - [x, x] and x is the
4216 maximum or minimum of the type, try to merge it also as if
4217 range1 is + [-, x - 1] or + [x + 1, -].
4220 * tree.c (inchash::add_expr): Handle IDENTIFIER_NODE.
4222 2018-06-03 Eric Botcazou <ebotcazou@adacore.com>
4224 PR tree-optimization/86034
4225 * gimple-ssa-store-merging.c (output_merged_store): Convert the RHS to
4226 the unsigned bitfield type in a bit insertion sequence if it does not
4227 have a larger precision than the bitfield size.
4228 (process_store): Also bypass widening conversions for BIT_INSERT_EXPR.
4230 2018-06-03 Kito Cheng <kito.cheng@gmail.com>
4232 * config/nds32/nds32-peephole2.md: Add new patterns for code size.
4234 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
4236 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3J.
4237 * config/nds32/nds32.c (nds32_option_override): Consider ARCH_V3J.
4238 * config/nds32/nds32.h (TARGET_ISA_V3): Add ARCH_V3J checking.
4239 * config/nds32/nds32.opt (march): Add enum value Value(ARCH_V3J).
4241 2018-06-03 Chung-Ju Wu <jasonwucj@gmail.com>
4243 * common/config/nds32/nds32-common.c (nds32_option_optimization_table):
4244 Disable -fdelete-null-pointer-checks for ELF toolchain.
4246 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
4247 Kito Cheng <kito.cheng@gmail.com>
4249 * config.gcc (nds32*): Use nds32-linux.opt and nds32-elf.opt.
4250 (nds32le-*-*, nds32be-*-*): Integrate checking process.
4251 (nds32*-*-*): Add glibc and uclibc conditions.
4252 * common/config/nds32/nds32-common.c (nds32_except_unwind_info): New.
4253 (TARGET_EXCEPT_UNWIND_INFO): Define.
4254 * config/nds32/elf.h: New file.
4255 * config/nds32/linux.h: New file.
4256 * config/nds32/nds32-elf.opt: New file.
4257 * config/nds32/nds32-linux.opt: New file.
4258 * config/nds32/nds32-fp-as-gp.c
4259 (pass_nds32_fp_as_gp::gate): Consider TARGET_LINUX_ABI.
4260 * config/nds32/nds32.c (nds32_conditional_register_usage): Consider
4262 (nds32_asm_file_end): Ditto.
4263 (nds32_print_operand): Ditto.
4264 (nds32_insert_attributes): Ditto.
4265 (nds32_init_libfuncs): New function.
4266 (TARGET_HAVE_TLS): Define.
4267 (TARGET_INIT_LIBFUNCS): Define.
4268 * config/nds32/nds32.h (TARGET_DEFAULT_RELAX): Apply different relax
4270 (TARGET_ELF): Apply different mcmodel setting.
4271 (LINK_SPEC, LIB_SPEC, STARTFILE_SPEC, ENDFILE_SPEC): The content has
4272 been migrated into elf.h and linux.h files.
4273 * config/nds32/nds32.md (add_pc): Consider TARGET_LINUX_ABI.
4274 * config/nds32/nds32.opt (mvh): Consider TARGET_LINUX_ABI.
4275 (mcmodel): The content has been migrated into nds32-elf.opt and
4276 nds32-linux.opt files.
4277 * config/nds32/t-elf: New file.
4278 * config/nds32/t-linux: New file.
4280 2018-06-02 Chung-Ju Wu <jasonwucj@gmail.com>
4281 Shiva Chen <shiva0217@gmail.com>
4283 * config/nds32/constants.md (unspec_volatile_element): Add
4284 UNSPEC_VOLATILE_OMIT_FP_BEGIN and UNSPEC_VOLATILE_OMIT_FP_END.
4285 * config/nds32/nds32-fp-as-gp.c: New implementation of fp_as_gp
4287 * config/nds32/nds32-protos.h (nds32_naked_function_p): Declare.
4288 (make_pass_nds32_fp_as_gp): Declare.
4289 * config/nds32/nds32.c (nds32_register_passes): Add fp_as_gp as one
4291 (nds32_asm_function_end_prologue): Remove unused asm output.
4292 (nds32_asm_function_begin_epilogue): Remove unused asm output.
4293 (nds32_asm_file_start): Output necessary fp_as_gp information.
4294 (nds32_option_override): Adjust register usage.
4295 (nds32_expand_prologue): Consider fp_as_gp situation.
4296 (nds32_expand_prologue_v3push): Consider fp_as_gp situation.
4297 * config/nds32/nds32.md (prologue): Check fp_as_gp_p and naked_p.
4300 (simple_return): Ditto.
4301 (omit_fp_begin): Output special directive for fp_as_gp.
4302 (omit_fp_end): Output special directive for fp_as_gp.
4303 * config/nds32/nds32.opt (mfp-as-gp, mno-fp-as-gp, mforce-fp-as-gp,
4304 mforbid-fp-as-gp): New options.
4306 2018-06-01 Mark Wielaard <mark@klomp.org>
4308 * dwarf2out.c (dwarf2out_finish): Remove generation of
4309 DW_AT_loclists_base.
4311 2018-06-01 Eric Botcazou <ebotcazou@adacore.com>
4313 * gimple-ssa-store-merging.c: Include gimple-fold.h.
4314 (struct store_immediate_info): Document BIT_INSERT_EXPR stores.
4315 (struct merged_store_group): Add bit_insertion field.
4316 (dump_char_array): Use standard hexadecimal format.
4317 (merged_store_group::merged_store_group): Set bit_insertion to false.
4318 (merged_store_group::apply_stores): Use optimal buffer size. Deal
4319 with BIT_INSERT_EXPR stores. Move up code updating the mask and
4320 also print the mask in the dump file.
4321 (pass_store_merging::gate): Minor tweak.
4322 (imm_store_chain_info::coalesce_immediate): Fix wrong association
4323 of stores with groups in dump. Allow coalescing of BIT_INSERT_EXPR
4324 stores with INTEGER_CST stores.
4325 (count_multiple_uses) <BIT_INSERT_EXPR>: New case.
4326 (imm_store_chain_info::output_merged_store): Add try_bitpos variable
4327 and use it throughout. Generate bit insertion sequences if need be.
4328 (pass_store_merging::process_store): Remove redundant condition.
4329 Record stores from a SSA name to a bit-field with BIT_INSERT_EXPR.
4331 2018-06-01 Segher Boessenkool <segher@kernel.crashing.org>
4333 * config/rs6000/rs6000.c (rs6000_mangle_type): Change the mangling of
4334 the 128-bit floating point types. Fix function comment.
4336 2018-06-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
4338 * config/aarch64/aarch64-simd.md
4339 (aarch64_simd_vec_unpack<su>_lo_<mode>): Use UXTL and SXTL assembler
4341 (aarch64_simd_vec_unpack<su>_hi_<mode>): Use UXTL2 and SXTL2 assembler
4344 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
4346 PR tree-optimization/85989
4347 * gimple-ssa-backprop.c (backprop::m_visited_phis): New member
4349 (backprop::intersect_uses): Check it when deciding whether this
4350 is a backedge reference.
4351 (backprop::process_block): Add each phi to m_visited_phis
4352 after visiting it, then clear it at the end.
4354 2018-06-01 Richard Biener <rguenther@suse.de>
4356 * tree-vectorizer.h (vect_dr_stmt): New function.
4357 (vect_get_load_cost): Adjust.
4358 (vect_get_store_cost): Likewise.
4359 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence):
4360 Use vect_dr_stmt instead of DR_SMTT.
4361 (vect_record_base_alignments): Likewise.
4362 (vect_calculate_target_alignment): Likewise.
4363 (vect_compute_data_ref_alignment): Likewise and make static.
4364 (vect_update_misalignment_for_peel): Likewise.
4365 (vect_verify_datarefs_alignment): Likewise.
4366 (vector_alignment_reachable_p): Likewise.
4367 (vect_get_data_access_cost): Likewise. Pass down
4368 vinfo to vect_get_load_cost/vect_get_store_cost instead of DR.
4369 (vect_get_peeling_costs_all_drs): Likewise.
4370 (vect_peeling_hash_get_lowest_cost): Likewise.
4371 (vect_enhance_data_refs_alignment): Likewise.
4372 (vect_find_same_alignment_drs): Likewise.
4373 (vect_analyze_data_refs_alignment): Likewise.
4374 (vect_analyze_group_access_1): Likewise.
4375 (vect_analyze_group_access): Likewise.
4376 (vect_analyze_data_ref_access): Likewise.
4377 (vect_analyze_data_ref_accesses): Likewise.
4378 (vect_vfa_segment_size): Likewise.
4379 (vect_small_gap_p): Likewise.
4380 (vectorizable_with_step_bound_p): Likewise.
4381 (vect_prune_runtime_alias_test_list): Likewise.
4382 (vect_analyze_data_refs): Likewise.
4383 (vect_supportable_dr_alignment): Likewise.
4384 * tree-vect-loop-manip.c (get_misalign_in_elems): Likewise.
4385 (vect_gen_prolog_loop_niters): Likewise.
4386 * tree-vect-loop.c (vect_analyze_loop_2): Likewise.
4387 * tree-vect-patterns.c (vect_recog_bool_pattern): Do not
4389 (vect_recog_mask_conversion_pattern): Likewise.
4390 (vect_try_gather_scatter_pattern): Likewise.
4391 * tree-vect-stmts.c (vect_model_store_cost): Pass stmt_info
4392 to vect_get_store_cost.
4393 (vect_get_store_cost): Get stmt_info instead of DR.
4394 (vect_model_load_cost): Pass stmt_info to vect_get_load_cost.
4395 (vect_get_load_cost): Get stmt_info instead of DR.
4397 2018-06-01 Richard Biener <rguenther@suse.de>
4400 * gimple-fold.c (var_decl_component_p): Also allow offsetted
4401 vars wrapped in MEM_REFs.
4403 2018-06-01 Richard Sandiford <richard.sandiford@linaro.org>
4405 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
4406 Fix subreg tests so that we only return a choice between
4407 GENERAL_REGS and FP_REGS if the original classes included both.
4409 2018-06-01 Richard Biener <rguenther@suse.de>
4412 * tree-ssa-structalias.c (get_function_part_constraint):
4413 Handle NULL fi->decl.
4414 (find_func_aliases_for_call): Properly handle indirect
4415 fi from direct call.
4416 (find_func_clobbers): Likewise.
4417 (ipa_pta_execute): Likewise.
4418 (create_variable_info_for): For functions that are ifunc_resolver
4419 resolve to a varinfo that contains the result of the resolver call.
4420 (associate_varinfo_to_alias): Do not treat ifunc resolvers as
4423 2018-05-31 Michael Collison <michael.collison@arm.com>
4425 * config/aarch64/aarch64.md:
4426 (*fix_to_zero_extenddfdi2): New pattern.
4427 * gcc.target/aarch64/fix_extend1.c: New testcase.
4429 2018-05-31 Qing Zhao <qing.zhao@oracle.com>
4433 * builtins.c (expand_builtin): Add the handling of BUILT_IN_STRCMP_EQ
4434 and BUILT_IN_STRNCMP_EQ.
4435 * builtins.def: Add new builtins BUILT_IN_STRCMP_EQ and
4436 BUILT_IN_STRNCMP_EQ.
4437 * gimple-fold.c (gimple_fold_builtin_string_compare): Add the
4438 handling of BUILTIN_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
4439 (gimple_fold_builtin): Likewise.
4440 * tree-ssa-strlen.c (compute_string_length): New function.
4441 (determine_min_obsize): New function.
4442 (handle_builtin_string_cmp): New function to handle calls to
4443 string compare functions.
4444 (strlen_optimize_stmt): Add handling to builtin string compare
4446 * tree-ssa-structalias.c (find_func_aliases_for_builtin_call):
4447 Add the handling of BUILT_IN_STRCMP_EQ and BUILT_IN_STRNCMP_EQ.
4448 * tree.c (build_common_builtin_nodes): Add new defines of
4449 BUILT_IN_STRNCMP_EQ and BUILT_IN_STRCMP_EQ.
4451 2018-05-31 Jakub Jelinek <jakub@redhat.com>
4454 * bb-reorder.c (pass_partition_blocks::gate): Return false for
4455 functions with naked attribute.
4457 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4459 * config/i386/sse.md (avx_vec_concat<mode>):
4460 Substitute concat_tg_mode mode attribute with xtg_mode.
4461 (<mask_codefor>avx512dq_broadcast<mode><mask_name>_1): Ditto.
4462 (concat_tg_mode): Remove mode attribute.
4464 2018-05-31 Martin Sebor <msebor@redhat.com>
4467 * calls.c (alloc_max_size): Correct a logic error/typo.
4468 Treat excessive arguments as infinite. Warn for invalid arguments.
4469 * doc/invoke.texi (-Walloc-size-larger-than): Update.
4471 2018-05-31 H.J. Lu <hongjiu.lu@intel.com>
4474 * config/i386/x86-tune.def: Re-enable partial_reg_dependency
4475 and movx for Haswell.
4477 2018-05-31 Chung-Lin Tang <cltang@codesourcery.com>
4478 Cesar Philippidis <cesar@codesourcery.com>
4481 * gimplify.c (gimplify_adjust_omp_clauses): Add 'remove = true'
4482 when emitting error on private/firstprivate reductions.
4483 * omp-low.c (lower_omp_target): Avoid reference-type processing
4484 on pointers for firstprivate clause.
4486 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4488 * config/aarch64/aarch64-simd-builtins.def (ld1x3): New.
4491 * config/aarch64/aarch64-simd.md
4492 (aarch64_ld1x3<VALLDIF:mode>): New pattern.
4493 (aarch64_ld1_x3_<mode>): Likewise
4494 (aarch64_st1x2<VALLDIF:mode>): Likewise
4495 (aarch64_st1_x2_<mode>): Likewise
4496 (aarch64_st1x3<VALLDIF:mode>): Likewise
4497 (aarch64_st1_x3_<mode>): Likewise
4498 * config/aarch64/arm_neon.h (vld1_u8_x3): New function.
4499 (vld1_s8_x3): Likewise.
4500 (vld1_u16_x3): Likewise.
4501 (vld1_s16_x3): Likewise.
4502 (vld1_u32_x3): Likewise.
4503 (vld1_s32_x3): Likewise.
4504 (vld1_u64_x3): Likewise.
4505 (vld1_s64_x3): Likewise.
4506 (vld1_f16_x3): Likewise.
4507 (vld1_f32_x3): Likewise.
4508 (vld1_f64_x3): Likewise.
4509 (vld1_p8_x3): Likewise.
4510 (vld1_p16_x3): Likewise.
4511 (vld1_p64_x3): Likewise.
4512 (vld1q_u8_x3): Likewise.
4513 (vld1q_s8_x3): Likewise.
4514 (vld1q_u16_x3): Likewise.
4515 (vld1q_s16_x3): Likewise.
4516 (vld1q_u32_x3): Likewise.
4517 (vld1q_s32_x3): Likewise.
4518 (vld1q_u64_x3): Likewise.
4519 (vld1q_s64_x3): Likewise.
4520 (vld1q_f16_x3): Likewise.
4521 (vld1q_f32_x3): Likewise.
4522 (vld1q_f64_x3): Likewise.
4523 (vld1q_p8_x3): Likewise.
4524 (vld1q_p16_x3): Likewise.
4525 (vld1q_p64_x3): Likewise.
4526 (vst1_s64_x2): Likewise.
4527 (vst1_u64_x2): Likewise.
4528 (vst1_f64_x2): Likewise.
4529 (vst1_s8_x2): Likewise.
4530 (vst1_p8_x2): Likewise.
4531 (vst1_s16_x2): Likewise.
4532 (vst1_p16_x2): Likewise.
4533 (vst1_s32_x2): Likewise.
4534 (vst1_u8_x2): Likewise.
4535 (vst1_u16_x2): Likewise.
4536 (vst1_u32_x2): Likewise.
4537 (vst1_f16_x2): Likewise.
4538 (vst1_f32_x2): Likewise.
4539 (vst1_p64_x2): Likewise.
4540 (vst1q_s8_x2): Likewise.
4541 (vst1q_p8_x2): Likewise.
4542 (vst1q_s16_x2): Likewise.
4543 (vst1q_p16_x2): Likewise.
4544 (vst1q_s32_x2): Likewise.
4545 (vst1q_s64_x2): Likewise.
4546 (vst1q_u8_x2): Likewise.
4547 (vst1q_u16_x2): Likewise.
4548 (vst1q_u32_x2): Likewise.
4549 (vst1q_u64_x2): Likewise.
4550 (vst1q_f16_x2): Likewise.
4551 (vst1q_f32_x2): Likewise.
4552 (vst1q_f64_x2): Likewise.
4553 (vst1q_p64_x2): Likewise.
4554 (vst1_s64_x3): Likewise.
4555 (vst1_u64_x3): Likewise.
4556 (vst1_f64_x3): Likewise.
4557 (vst1_s8_x3): Likewise.
4558 (vst1_p8_x3): Likewise.
4559 (vst1_s16_x3): Likewise.
4560 (vst1_p16_x3): Likewise.
4561 (vst1_s32_x3): Likewise.
4562 (vst1_u8_x3): Likewise.
4563 (vst1_u16_x3): Likewise.
4564 (vst1_u32_x3): Likewise.
4565 (vst1_f16_x3): Likewise.
4566 (vst1_f32_x3): Likewise.
4567 (vst1_p64_x3): Likewise.
4568 (vst1q_s8_x3): Likewise.
4569 (vst1q_p8_x3): Likewise.
4570 (vst1q_s16_x3): Likewise.
4571 (vst1q_p16_x3): Likewise.
4572 (vst1q_s32_x3): Likewise.
4573 (vst1q_s64_x3): Likewise.
4574 (vst1q_u8_x3): Likewise.
4575 (vst1q_u16_x3): Likewise.
4576 (vst1q_u32_x3): Likewise.
4577 (vst1q_u64_x3): Likewise.
4578 (vst1q_f16_x3): Likewise.
4579 (vst1q_f32_x3): Likewise.
4580 (vst1q_f64_x3): Likewise.
4581 (vst1q_p64_x3): Likewise.
4583 2018-05-30 Jozef Lawrynowicz <jozef.l@mittosystems.com>
4585 * config/msp430/msp430.c (msp430_output_labelref): Prepend
4586 user_label_prefix to name.
4588 * tree-core.h: Update comment about the format of NAME string
4589 passed to handler in attribute_spec.
4591 * config/msp430/msp430.md: Remove erroneous subreg expression from
4592 zero_extendqisi2 insn pattern. Remove msp430x ISA restriction on
4593 zero_extend{q,h}isi2.
4595 2018-05-30 Borislav Petkov <bp@suse.de>
4597 * doc/extend.texi: Document some architecture specific
4598 constraints and sort entries.
4600 2018-05-30 Martin Sebor <msebor@redhat.com>
4603 * builtins.c (expand_builtin_stpcpy_1): New function.
4604 (expand_builtin_stpcpy): Call it, and call maybe_warn_nonstring_arg
4605 only if the former succeeds.
4607 2018-05-31 Sameera Deshpande <sameera.deshpande@linaro.org>
4609 * config/aarch64/aarch64-cores.def (saphira) : Add support for ARMv8.4
4612 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
4614 * doc/invoke.texi (-flinker-output): Document
4616 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
4618 * passes.c (ipa_write_summaries): Only modify statements if body
4620 * cgraphunit.c (ipa_passes): Also produce intermeidate code when
4621 incrementally linking.
4622 (ipa_passes): Likewise.
4623 * lto-cgraph.c (lto_output_node): When incrementally linking do not
4624 pass down resolution info.
4625 * common.opt (flag_incremental_link): Update info.
4626 * gcc.c (plugin specs): Turn flinker-output=* to
4627 -plugin-opt=-linker-output-known
4628 * toplev.c (compile_file): Also cut compilation when doing incremental
4630 * flag-types. (enum lto_partition_model): Add
4631 LTO_LINKER_OUTPUT_NOLTOREL.
4632 (invoke.texi): Add -flinker-output docs.
4633 * ipa.c (symbol_table::remove_unreachable_nodes): Handle LTO incremental
4634 link same way as WPA; do not stream in dead initializers.
4636 * dwarf2out.c (dwarf2out_die_ref_for_decl,
4637 darf2out_register_external_decl): Support incremental link.
4639 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
4641 * lto-opts.c (lto_write_options): Skip OPT_dumpdir, OPT_fresolution_.
4643 2018-05-30 Jan Hubicka <hubicka@ucw.cz>
4645 * lto-wrapper.c (debug_objcopy): Add rename parameter; pass
4646 it down to simple_object_copy_lto_debug_sections.
4647 (run_gcc): Determine incremental LTO link time and configure
4648 lto1 into non-wpa mode, disable renaming of debug sections.
4650 2018-05-30 Kelvin Nilsen <kelvin@gcc.gnu.org>
4652 * doc/extend.texi (PowerPC AltiVec Built-in Functions): Remove
4653 descriptions of various incorrectly documented functions.
4655 2018-05-30 Andre Vieira <andre.simoesdiasvieira@arm.com>
4658 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
4659 address check not strict.
4661 2018-05-30 Richard Biener <rguenther@suse.de>
4663 PR tree-optimization/85964
4664 * tracer.c (better_p): Drop initialized count check, we only
4665 call the function with initialized counts now.
4666 (find_best_successor): Do find a best edge if one
4667 has uninitialized count.
4668 (find_best_predecessor): Likewise. Do BB frequency check only
4669 if count is initialized.
4671 2017-05-30 Jackson Woodruff <jackson.woodruff@arm.com>
4673 * config/aarch64/aarch64.c (aarch64_host_wide_int_compare): New.
4674 (aarch64_ldrstr_offset_compare): New.
4675 (aarch64_operands_adjust_ok_for_ldpstp): Update to consider all
4676 load/store orderings.
4677 (aarch64_gen_adjusted_ldpstp): Likewise.
4679 2018-05-30 Wilco Dijkstra <wdijkstr@arm.com>
4681 * config/aarch64/aarch64.c (aarch64_ira_change_pseudo_allocno_class):
4682 Check for subset of GENERAL_REGS and FP_REGS.
4683 * config/aarch64/aarch64-simd.md (aarch64_get_lane): Increase cost of
4686 2018-05-30 Richard Sandiford <richard.sandiford@linaro.org>
4688 * alias.c (adjust_offset_for_component_ref): Use poly_int_tree_p
4689 and wi::to_poly_offset. Add the current offset and then check
4690 whether the sum fits, rather than using an unchecked addition of
4691 a checked term. Check for a shwi rather than a uhwi.
4692 * expr.c (get_bit_range): Use tree_to_poly_uint64.
4693 (store_constructor): Use poly_int_tree_p.
4694 (expand_expr_real_1): Likewise.
4695 * function.c (assign_temp): Likewise.
4696 * fold-const.c (const_binop): Use poly_int_tree_p and
4698 (fold_indirect_ref_1): Likewise. Use multiple_p to attempt an exact
4700 * ipa-icf-gimple.c (func_checker::compare_operand): Use
4701 to_poly_offset for MEM offsets.
4702 * ipa-icf.c (sem_variable::equals): Likewise.
4703 * stor-layout.c (compute_record_mode): Use poly_int_tree_p.
4704 * tree-ssa-sccvn.c (ao_ref_init_from_vn_reference): Use
4705 wi::to_poly_offset for BIT_FIELD_REF offsets.
4706 (vn_reference_maybe_forwprop_address): Use poly_int_tree_p and
4708 * var-tracking.c (emit_note_insn_var_location): Use
4709 tree_to_poly_uint64.
4711 2018-05-29 Jim Wilson <jimw@sifive.com>
4713 * config/riscv/riscv.c (riscv_interrupt_type): Fix comment typo.
4715 2018-05-29 Uros Bizjak <ubizjak@gmail.com>
4718 * config/i386/i386.md (l<rounding_insn><MODEF:mode><SWI48:mode>2):
4719 Enable for TARGET_SSE4_1 and generate rounds{s,d} and cvtts{s,d}2si{,q}
4721 (sse4_1_round<mode>2): Use nonimmediate_operand
4722 for operand 1 predicate.
4724 2018-05-29 Martin Sebor <msebor@redhat.com>
4725 Richard Biener <rguenther@suse.de>
4728 * calls.c (get_size_range): Call determine_value_range instead
4729 of get_value_range..
4730 * tree-vrp.h (determine_value_range): Declared new function.
4731 * tree-vrp.c (determine_value_range_1, determine_value_range): New.
4733 2018-05-29 Richard Biener <rguenther@suse.de>
4735 * tree-vect-data-refs.c (vect_preserves_scalar_order_p): Make
4736 sure to use non-pattern stmts for get_earlier_stmt arguments.
4737 * tree-vectorizer.h (get_earlier_stmt): Assert we do not get
4738 called on pattern stmts.
4739 (get_later_stmt): Likewise.
4741 2018-05-29 Martin Liska <mliska@suse.cz>
4743 PR gcov-profile/85759
4744 * doc/gcov.texi: Document GCOV_ERROR_FILE and GCOV_EXIT_AT_ERROR
4747 2018-05-29 Jakub Jelinek <jakub@redhat.com>
4749 * tree-cfg.c (verify_gimple_assign_unary): Add checking for
4751 (verify_gimple_assign_binary): Check TYPE_VECTOR_SUBPARTS for
4755 * tree.def (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
4756 VEC_PACK_FLOAT_EXPR): New tree codes.
4757 * tree-pretty-print.c (op_code_prio): Handle
4758 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR.
4759 (dump_generic_node): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
4760 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
4761 * tree-inline.c (estimate_operator_cost): Likewise.
4762 * gimple-pretty-print.c (dump_binary_rhs): Handle VEC_PACK_FLOAT_EXPR.
4763 * fold-const.c (const_binop): Likewise.
4764 (const_unop): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR and
4765 VEC_UNPACK_FIX_TRUNC_LO_EXPR.
4766 * tree-cfg.c (verify_gimple_assign_unary): Likewise.
4767 (verify_gimple_assign_binary): Handle VEC_PACK_FLOAT_EXPR.
4768 * cfgexpand.c (expand_debug_expr): Handle VEC_UNPACK_FIX_TRUNC_HI_EXPR,
4769 VEC_UNPACK_FIX_TRUNC_LO_EXPR and VEC_PACK_FLOAT_EXPR.
4770 * expr.c (expand_expr_real_2): Likewise.
4771 * optabs.def (vec_packs_float_optab, vec_packu_float_optab,
4772 vec_unpack_sfix_trunc_hi_optab, vec_unpack_sfix_trunc_lo_optab,
4773 vec_unpack_ufix_trunc_hi_optab, vec_unpack_ufix_trunc_lo_optab): New
4775 * optabs.c (expand_widen_pattern_expr): For
4776 VEC_UNPACK_FIX_TRUNC_HI_EXPR and VEC_UNPACK_FIX_TRUNC_LO_EXPR use
4777 sign from result type rather than operand's type.
4778 (expand_binop_directly): For vec_packu_float_optab and
4779 vec_packs_float_optab allow result type to be different from operand's
4781 * optabs-tree.c (optab_for_tree_code): Handle
4782 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
4783 VEC_PACK_FLOAT_EXPR. Formatting fixes.
4784 * tree-vect-generic.c (expand_vector_operations_1): Handle
4785 VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR and
4786 VEC_PACK_FLOAT_EXPR.
4787 * tree-vect-stmts.c (supportable_widening_operation): Handle
4789 (supportable_narrowing_operation): Handle FLOAT_EXPR.
4790 * config/i386/i386.md (fixprefix, floatprefix): New code attributes.
4791 * config/i386/sse.md (*float<floatunssuffix>v2div2sf2): Rename to ...
4792 (float<floatunssuffix>v2div2sf2): ... this. Formatting fix.
4793 (vpckfloat_concat_mode, vpckfloat_temp_mode, vpckfloat_op_mode): New
4795 (vec_pack<floatprefix>_float_<mode>): New expander.
4796 (vunpckfixt_mode, vunpckfixt_model, vunpckfixt_extract_mode): New mode
4798 (vec_unpack_<fixprefix>fix_trunc_lo_<mode>,
4799 vec_unpack_<fixprefix>fix_trunc_hi_<mode>): New expanders.
4800 * doc/md.texi (vec_packs_float_@var{m}, vec_packu_float_@var{m},
4801 vec_unpack_sfix_trunc_hi_@var{m}, vec_unpack_sfix_trunc_lo_@var{m},
4802 vec_unpack_ufix_trunc_hi_@var{m}, vec_unpack_ufix_trunc_lo_@var{m}):
4804 * doc/generic.texi (VEC_UNPACK_FLOAT_HI_EXPR,
4805 VEC_UNPACK_FLOAT_LO_EXPR): Fix pasto in description.
4806 (VEC_UNPACK_FIX_TRUNC_HI_EXPR, VEC_UNPACK_FIX_TRUNC_LO_EXPR,
4807 VEC_PACK_FLOAT_EXPR): Document.
4809 2018-05-29 Richard Biener <rguenther@suse.de>
4811 * tree-vectorizer.h (struct vec_info): Add stmt_vec_infos
4813 (stmt_vec_info_vec): Make pointer.
4814 (init_stmt_vec_info_vec): Remove.
4815 (free_stmt_vec_info_vec): Likewise.
4816 (set_stmt_vec_info_vec): New function.
4817 (free_stmt_vec_infos): Likewise.
4818 (vinfo_for_stmt): Adjust for stmt_vec_info_vec indirection.
4819 (set_vinfo_for_stmt): Likewise.
4820 (get_earlier_stmt): Likewise.
4821 (get_later_stmt): Likewise.
4822 * tree-vectorizer.c (stmt_vec_info_vec): Make pointer.
4823 (vec_info::vec_info): Allocate stmt_vec_infos and set the global.
4824 (vec_info::~vec_info): Free stmt_vec_infos.
4825 (vectorize_loops): Set the global stmt_vec_info_vec to NULL.
4826 Remove old init_stmt_vec_info_vec/free_stmt_vec_info_vec calls.
4827 (pass_slp_vectorize::execute): Likewise.
4828 * tree-vect-stmts.c (init_stmt_vec_info_vec): Remove.
4829 (free_stmt_vec_info_vec): Likewise.
4830 (set_stmt_vec_info_vec): New function.
4831 (free_stmt_vec_infos): Likewise.
4832 * tree-vect-loop.c (_loop_vec_info::~_loop_vec_info): Set
4833 the global stmt_vec_info_vec.
4834 * tree-parloops.c (gather_scalar_reductions): Use
4835 set_stmt_vec_info_vec/free_stmt_vec_infos and maintain a local
4838 2018-05-29 Richard Biener <rguenther@suse.de>
4840 * dominance.c (iterate_fix_dominators): Push/pop TV_DOMINANCE.
4842 2018-05-29 Martin Liska <mliska@suse.cz>
4843 David Malcolm <dmalcolm@redhat.com>
4845 * vec.c (test_reverse): New.
4846 (vec_c_tests): Add new test.
4847 * vec.h (vl_ptr>::reverse): New function.
4849 2018-05-29 Gerald Pfeifer <gerald@pfeifer.com>
4851 * config.gcc: Identify FreeBSD 3.x and 4.x as unsupported.
4853 * config/freebsd-spec.h (FBSD_LIB_SPEC): Only consider FreeBSD 5
4856 2018-05-28 Bernd Edlinger <bernd.edlinger@hotmail.de>
4858 * tree-dump.c (dump_node): Use splay_tree_delete_pointers.
4860 2018-05-28 Richard Biener <rguenther@suse.de>
4862 PR tree-optimization/85933
4863 * tree-vect-data-refs.c (vect_record_base_alignments): Only
4864 look at stmts marked as vectorizable.
4866 2018-05-28 Richard Biener <rguenther@suse.de>
4868 PR tree-optimization/85934
4869 * tree-vect-generic.c (expand_vector_operations_1): Hoist
4870 vector boolean check before scalar optimization.
4872 2018-05-28 Jakub Jelinek <jakub@redhat.com>
4874 * doc/invoke.texi (ARM Options): Use @item instead of @itemx
4877 2018-05-28 Mark Wielaard <mark@klomp.org>
4879 * dwarf2asm.c (dw2_asm_output_delta_uleb128): Add brackets around lab2
4880 if it is an expression containing a minus sign.
4882 2018-05-27 John David Anglin <danglin@gcc.gnu.org>
4884 * config/pa/pa-linux.h (NEED_INDICATE_EXEC_STACK): Define to 0.
4886 2018-05-27 Paul Koning <ni1d@arrl.net>
4888 * config/pdp11/pdp11.md (truncsihi2): Remove.
4890 2018-05-27 Monk Chiang <sh.chiang04@gmail.com>
4891 Chung-Ju Wu <jasonwucj@gmail.com>
4893 * config/nds32/nds32-intrinsic.md (unaligned_storedi): Modify patterns
4895 (unaligned_store_dw): Ditto.
4896 * config/nds32/nds32-memory-manipulation.c
4897 (nds32_expand_movmemsi_loop_known_size): Refactoring implementation.
4898 (nds32_gen_dup_4_byte_to_word_value): Rename to ...
4899 (nds32_gen_dup_4_byte_to_word_value_aux): ... this.
4900 (emit_setmem_word_loop): Rename to ...
4901 (emit_setmem_doubleword_loop): ... this.
4902 (nds32_gen_dup_4_byte_to_word_value): New function.
4903 (nds32_gen_dup_8_byte_to_double_word_value): New function.
4904 (nds32_expand_setmem_loop): Refine implementation.
4905 (nds32_expand_setmem_loop_v3m): Ditto.
4906 * config/nds32/nds32-multiple.md (unaligned_store_update_base_dw): New
4909 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
4911 * config/nds32/nds32.md (bswapsi2, bswaphi2): New patterns.
4913 2018-05-27 Chung-Ju Wu <jasonwucj@gmail.com>
4915 * config/nds32/nds32.c (nds32_attribute_table): Add "no_prologue".
4916 (nds32_init_machine_status): Initialize machine->attr_naked_p and
4917 machine->attr_no_prologue_p.
4918 (nds32_compute_stack_frame): Check "naked" and "no_prologue" attributes.
4919 (nds32_naked_function_p): Handle "naked" and "no_prologue" attributes.
4920 (nds32_expand_epilogue): Consider attr_naked_p.
4921 (nds32_expand_epilogue_v3pop): Likewise.
4922 (nds32_can_use_return_insn): Likewise.
4923 * config/nds32/nds32.h (machine_function): Add attr_naked_p and
4924 attr_no_prologue_p fields.
4925 * config/nds32/nds32.opt (mret-in-naked-func): New option.
4927 2018-05-27 Jakub Jelinek <jakub@redhat.com>
4930 * config/i386/i386.md (fixunssuffix, floatunssuffix): New code
4932 * config/i386/sse.md
4933 (<floatsuffix>float<sseintvecmodelower><mode>2<mask_name><round_name>):
4935 (float<floatunssuffix><sseintvecmodelower><mode>2<mask_name><round_name>):
4937 (<floatsuffix>float<sselongvecmodelower><mode>2<mask_name><round_name>):
4939 (float<floatunssuffix><sselongvecmodelower><mode>2<mask_name><round_name>):
4941 (*<floatsuffix>floatv2div2sf2): Rename to ...
4942 (*float<floatunssuffix>v2div2sf2): ... this.
4943 (<floatsuffix>floatv2div2sf2_mask): Rename to ...
4944 (float<floatunssuffix>v2div2sf2_mask): ... this.
4945 (*<floatsuffix>floatv2div2sf2_mask_1): Rename to ...
4946 (*float<floatunssuffix>v2div2sf2_mask_1): ... this.
4947 (<fixsuffix>fix_truncv8dfv8si2<mask_name><round_saeonly_name>): Rename
4949 (fix<fixunssuffix>_truncv8dfv8si2<mask_name><round_saeonly_name>):
4951 (<fixsuffix>fix_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
4953 (fix<fixunssuffix>_trunc<mode><sseintvecmodelower>2<mask_name><round_saeonly_name>):
4955 (<fixsuffix>fix_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
4957 (fix<fixunssuffix>_trunc<mode><sselongvecmodelower>2<mask_name><round_saeonly_name>):
4959 (<fixsuffix>fix_truncv2sfv2di2<mask_name>): Rename to ...
4960 (fix<fixunssuffix>_truncv2sfv2di2<mask_name>): ... this.
4961 (vec_pack_ufix_trunc_<mode>): Use gen_fixuns_truncv8dfv8si2 instead of
4962 gen_ufix_truncv8dfv8si2.
4963 * config/i386/i386-builtin.def (__builtin_ia32_cvttpd2uqq256_mask,
4964 __builtin_ia32_cvttpd2uqq128_mask, __builtin_ia32_cvttps2uqq256_mask,
4965 __builtin_ia32_cvttps2uqq128_mask, __builtin_ia32_cvtuqq2ps256_mask,
4966 __builtin_ia32_cvtuqq2ps128_mask, __builtin_ia32_cvtuqq2pd256_mask,
4967 __builtin_ia32_cvtuqq2pd128_mask, __builtin_ia32_cvttpd2udq512_mask,
4968 __builtin_ia32_cvtuqq2ps512_mask, __builtin_ia32_cvtuqq2pd512_mask,
4969 __builtin_ia32_cvttps2uqq512_mask, __builtin_ia32_cvttpd2uqq512_mask):
4970 Use fixuns instead ufix or floatuns instead ufloat in CODE_FOR_ names.
4972 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
4976 * varasm.c (assemble_alias): Lookup ifunc attribute on error.
4978 2018-05-25 Jim Wilson <jimw@sifive.com>
4980 * config/riscv/riscv-protos.h (riscv_epilogue_uses): New.
4981 * config/riscv/riscv.c (struct machine_function): Add
4982 interrupt_handler_p and attribute_checked_p fields.
4983 (riscv_attribute_table): Add interrupt.
4984 (riscv_interrupt_type_p): New.
4985 (riscv_save_reg_p): Save extra regs for interrupt handler.
4986 (riscv_use_save_libcall): Return false for interrupt handler.
4987 (riscv_first_stack_step): Add forward declaration.
4988 (riscv_compute_frame_info): New local interrupt_save_t1. Set it
4989 for interrupt handler with large frame. Use it for saved reg list.
4990 (riscv_expand_prologue): Move flag_stack_usage_info support to
4991 eliminate duplication.
4992 (riscv_expand_epilogue): Generate mret for interrupt handler.
4993 (riscv_epilogue_uses): New.
4994 (riscv_can_use_return_insn): Return false for interrupt handler.
4995 (riscv_function_ok_for_sibcall): Likewise.
4996 (riscv_set_current_function): Add interrupt handler support.
4997 * config/riscv/riscv.h (EPILOGUE_USES): Call riscv_epilogue_uses.
4998 * config/riscv/riscv.md (UNSPECV_MRET): New.
5000 (riscv_frflags, riscv_fsflags): Use tab after opcode.
5002 * doc/extend.texi (RISC-V Function Attributes) <interrupt>: New.
5004 2018-05-25 Bill Schmidt <wschmidt@linux.ibm.com>
5006 PR tree-optimization/85712
5007 * gimple-ssa-strength-reduction.c (replace_one_candidate): Skip if
5008 this candidate has already been replaced in-situ by a copy.
5010 2018-05-25 Jason Merrill <jason@redhat.com>
5012 PR c++/80485 - inline function non-zero address.
5013 * symtab.c (nonzero_address): Check DECL_COMDAT.
5015 2018-05-25 Uros Bizjak <ubizjak@gmail.com>
5018 * config/alpha/alpha.md (ashlsi3): New insn pattern.
5019 (*ashlsi_se): Rename from *ashldi_se. Define as sign
5020 extension of SImode operation. Use const123_operand predicate.
5021 (*saddsi_1): Remove.
5022 (*saddl_se_1): Ditto.
5024 (*ssubl_se_1): Ditto.
5025 * config/alpha/predicates.md (const123_operand): New predicate.
5026 * config/alpha/constraints.md (P): Use IN_RANGE.
5028 2018-05-25 Richard Biener <rguenther@suse.de>
5030 * tree-ssa-alias.h (refs_may_alias_p): Add tbaa_p bool parameter,
5032 (ref_maybe_used_by_stmt_p): Likewise.
5033 (stmt_may_clobber_ref_p): Likewise.
5034 (stmt_may_clobber_ref_p_1): Likewise.
5035 * tree-ssa-alias.c (refs_may_alias_p): Add tbaa_p bool parameter
5037 (ref_maybe_used_by_stmt_p): Likewise.
5038 (stmt_may_clobber_ref_p): Likewise.
5039 (stmt_may_clobber_ref_p_1): Likewise.
5040 * tree-vect-data-refs.c (vect_slp_analyze_node_dependences): Use
5041 the alias oracle to disambiguate DRs with stmts DR analysis
5043 (vect_analyze_data_refs): Do not give up on not analyzable
5044 DRs for BB vectorization. Remove code truncating the dataref
5047 2018-05-25 Jakub Jelinek <jakub@redhat.com>
5050 * config/i386/sse.md (<avx512>_eq<mode>3<mask_scalar_merge_name>_1):
5051 Add (=Yk,v,C) variant using vptestm insn. Use TARGET_AVX512BW
5052 in test instead of TARGET_AVX512F for VI12_AVX512VL iterator.
5054 2018-05-25 Richard Biener <rguenther@suse.de>
5056 * tree-vect-data-refs.c (vect_find_stmt_data_reference): New
5057 function, combining stmt data ref gathering and fatal analysis
5059 (vect_analyze_data_refs): Remove now redudnant code and simplify.
5060 * tree-vect-loop.c (vect_get_datarefs_in_loop): Factor out from
5061 vect_analyze_loop_2 and use vect_find_stmt_data_reference.
5062 * tree-vect-slp.c (vect_slp_bb): Use vect_find_stmt_data_reference.
5063 * tree-vectorizer.h (vect_find_stmt_data_reference): Declare.
5065 2018-05-25 Bin Cheng <bin.cheng@arm.com>
5067 PR tree-optimization/85720
5068 * tree-loop-distribution.c (break_alias_scc_partitions): Don't merge
5069 SCC if all partitions are builtins.
5070 (version_loop_by_alias_check): New parameter. Generate cancelable
5071 runtime alias check if all partitions are builtins.
5072 (distribute_loop): Update call to above function.
5074 2018-05-25 Bin Cheng <bin.cheng@arm.com>
5076 * tree-outof-ssa.c (tree-ssa.h, tree-dfa.h): Include header files.
5077 (create_default_def, for_all_parms): Moved from tree-ssa-coalesce.c.
5078 (parm_default_def_partition_arg): Ditto.
5079 (set_parm_default_def_partition): Ditto.
5080 (get_parm_default_def_partitions): Ditto and make it static.
5081 (get_undefined_value_partitions): Ditto and make it static.
5082 (remove_ssa_form): Refactor call to init_var_map here.
5083 * tree-ssa-coalesce.c (build_ssa_conflict_graph): Support live range
5084 computation for loop region.
5085 (coalesce_partitions, compute_optimized_partition_bases): Ditto.
5086 (register_default_def): Delete.
5087 (for_all_parms, create_default_def): Move to tree-outof-ssa.c.
5088 (parm_default_def_partition_arg): Ditto.
5089 (set_parm_default_def_partition): Ditto.
5090 (get_parm_default_def_partitions): Ditto and make it static.
5091 (get_undefined_value_partitions): Ditto and make it static.
5092 (coalesce_with_default, coalesce_with_default): Update comment.
5093 (create_coalesce_list_for_region): New func factored out from
5094 create_outofssa_var_map.
5095 (populate_coalesce_list_for_outofssa): New func factored out from
5096 create_outofssa_var_map and coalesce_ssa_name.
5097 (create_outofssa_var_map): Delete.
5098 (coalesce_ssa_name): Refactor to support live range computation.
5099 * tree-ssa-coalesce.h (coalesce_ssa_name): Change decl.
5100 (get_parm_default_def_partitions): Delete.
5101 (get_undefined_value_partitions): Ditto.
5102 * tree-ssa-live.c (init_var_map, delete_var_map): Support live range
5103 computation for loop region.
5104 (new_tree_live_info, loe_visit_block): Ditto.
5105 (live_worklist, set_var_live_on_entry): Ditto.
5106 (calculate_live_on_exit, verify_live_on_entry): Ditto.
5107 * tree-ssa-live.h (struct _var_map): New fields.
5108 (init_var_map): Change decl.
5109 (region_contains_p): New.
5111 2018-05-25 Bin Cheng <bin.cheng@arm.com>
5113 * tree-ssa-live.h (live_merge_and_clear): Delete.
5115 2018-05-25 Richard Biener <rguenther@suse.de>
5118 * tree-dump.c (dequeue_and_dump): Remove access to removed
5119 operand 2 of a SWITCH_EXPR.
5121 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5123 * doc/sourcebuild.texi (vect_double_cond_arith): Include
5124 multiplication and division.
5125 * doc/md.texi (cond_mul@var{m}, cond_div@var{m}, cond_mod@var{m})
5126 (cond_udiv@var{m}, cond_umod@var{m}): Document.
5127 * optabs.def (cond_smul_optab, cond_sdiv_optab, cond_smod_optab)
5128 (cond_udiv_optab, cond_umod_optab): New optabs.
5129 * internal-fn.def (IFN_COND_MUL, IFN_COND_DIV, IFN_COND_MOD)
5130 (IFN_COND_RDIV): New internal functions.
5131 * internal-fn.c (get_conditional_internal_fn): Handle TRUNC_DIV_EXPR,
5132 TRUNC_MOD_EXPR and RDIV_EXPR.
5133 * match.pd (UNCOND_BINARY, COND_BINARY): Handle them.
5134 * config/aarch64/iterators.md (UNSPEC_COND_MUL, UNSPEC_COND_DIV):
5136 (SVE_INT_BINARY): Include mult.
5137 (SVE_COND_FP_BINARY): Include UNSPEC_MUL and UNSPEC_DIV.
5138 (optab, sve_int_op): Handle mult.
5139 (optab, sve_fp_op, commutative): Handle UNSPEC_COND_MUL and
5141 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New pattern
5142 for SVE_INT_BINARY_SD.
5144 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5146 * config/aarch64/iterators.md (SVE_INT_BINARY_SD): New code iterator.
5147 (optab, sve_int_op): Handle div and udiv.
5148 * config/aarch64/aarch64-sve.md (<optab><mode>3): New expander
5149 for SVE_INT_BINARY_SD.
5150 (*<optab><mode>3): New insn for the same.
5152 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5154 * tree-vect-patterns.c: Include predict.h.
5155 (vect_recog_divmod_pattern): Restrict check for division support
5156 to when optimizing for size.
5158 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5160 * doc/sourcebuild.texi (vect_double_cond_arith: Document.
5161 * gimple-match.h (gimple_match_op::MAX_NUM_OPS): Bump to 4.
5162 (gimple_match_op::gimple_match_op): Add an overload for 4 operands.
5163 (gimple_match_op::set_op): Likewise.
5164 (gimple_resimplify4): Declare.
5165 * genmatch.c (get_operand_type): Handle CFN_COND_* functions.
5166 (expr::gen_transform): Likewise.
5167 (decision_tree::gen): Generate a simplification routine for 4 operands.
5168 * gimple-match-head.c (gimple_simplify): Add an overload for
5169 4 operands. In the top-level function, handle up to 4 call
5170 arguments and call gimple_resimplify4.
5171 (gimple_resimplify4): New function.
5172 (build_call_internal): Pass a fourth operand.
5173 (maybe_push_to_seq): Likewise.
5174 * match.pd (UNCOND_BINARY, COND_BINARY): New operator lists.
5175 Fold VEC_COND_EXPRs of an operation and a default value into
5176 an IFN_COND_* function if possible.
5177 * config/aarch64/iterators.md (UNSPEC_COND_MAX, UNSPEC_COND_MIN):
5179 (SVE_COND_FP_BINARY): Include them.
5180 (optab, sve_fp_op): Handle them.
5181 (SVE_INT_BINARY_REV): New code iterator.
5182 (SVE_COND_FP_BINARY_REV): New int iterator.
5183 (commutative): New int attribute.
5184 * config/aarch64/aarch64-protos.h (aarch64_sve_prepare_conditional_op):
5186 * config/aarch64/aarch64.c (aarch64_sve_prepare_conditional_op): New
5188 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Use it.
5189 (*cond_<optab><mode>): New patterns for reversed operands.
5191 2018-05-25 Richard Biener <rguenther@suse.de>
5193 * tree-vectorizer.h (STMT_VINFO_GROUP_*, GROUP_*): Remove.
5194 (DR_GROUP_*): New, assert we have non-NULL ->data_ref_info.
5195 (REDUC_GROUP_*): New, assert we have NULL ->data_ref_info.
5196 (STMT_VINFO_GROUPED_ACCESS): Adjust.
5197 * tree-vect-data-refs.c (everywhere): Adjust users.
5198 * tree-vect-loop.c (everywhere): Likewise.
5199 * tree-vect-slp.c (everywhere): Likewise.
5200 * tree-vect-stmts.c (everywhere): Likewise.
5201 * tree-vect-patterns.c (vect_reassociating_reduction_p): Likewise.
5203 2018-05-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5205 * configure.ac (gcc_cv_as_section_has_e): Move to common section.
5207 (gcc_cv_as_section_exclude): ... this.
5208 Try Solaris as #exclude syntax.
5209 * configure: Regenerate.
5210 * config.in: Regenerate.
5211 * config/i386/i386.c (i386_solaris_elf_named_section): Handle
5213 * config/sparc/sparc.c (sparc_solaris_elf_asm_named_section)
5214 [HAVE_GAS_SECTION_EXCLUDE]: Handle SECTION_EXCLUDE.
5216 * varasm.c (default_elf_asm_named_section): Don't check if
5217 HAVE_GAS_SECTION_EXCLUDE is defined.
5219 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5221 * doc/md.texi: Update the documentation of the cond_* optabs
5222 to mention the new final operand. Fix GET_MODE_NUNITS call.
5223 Describe the scalar case too.
5224 * internal-fn.def (IFN_EXTRACT_LAST): Change type to fold_left.
5225 * internal-fn.c (expand_cond_unary_optab_fn): Expect 3 operands
5227 (expand_cond_binary_optab_fn): Expect 4 operands instead of 3.
5228 (get_conditional_internal_fn): Update comment.
5229 * tree-vect-loop.c (vectorizable_reduction): Pass the original
5230 accumulator value as a final argument to conditional functions.
5231 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): Turn into
5232 a define_expand and add an "else" operand. Assert for now that
5233 the else operand is equal to operand 2. Use SVE_INT_BINARY and
5234 SVE_COND_FP_BINARY instead of SVE_COND_INT_OP and SVE_COND_FP_OP.
5235 (*cond_<optab><mode>): New patterns.
5236 * config/aarch64/iterators.md (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX)
5237 (UNSPEC_COND_SMIN, UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
5238 (UNSPEC_COND_EOR): Delete.
5239 (optab): Remove associated mappings.
5240 (SVE_INT_BINARY): New code iterator.
5241 (sve_int_op): Remove int attribute and add "minus" to the code
5243 (SVE_COND_INT_OP): Delete.
5244 (SVE_COND_FP_OP): Rename to...
5245 (SVE_COND_FP_BINARY): ...this.
5247 2018-05-25 Richard Sandiford <richard.sandiford@linaro.org>
5249 * optabs.c (can_reuse_operands_p): New function.
5250 (maybe_legitimize_operands): Try to reuse the results for
5253 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
5255 * config/i386/sse.md (cvtusi2<ssescalarmodesuffix>64<round_name>):
5256 Add {q} suffix to insn mnemonic.
5258 2018-05-23 Jozef Lawrynowicz <jozef.l@mittosystems.com>
5260 * config/msp430/msp430.c (TARGET_WARN_FUNC_RETURN): Define.
5261 (msp430_warn_func_return): New.
5263 2018-05-24 Roger Sayle <roger@nextmovesoftware.com>
5265 * fold-const.c (tree_nonzero_bits): New function.
5266 * fold-const.h (tree_nonzero_bits): Likewise.
5267 * match.pd (POPCOUNT): New patterns to fold BUILTIN_POPCOUNT and
5268 friends. POPCOUNT(x&1) => x&1, POPCOUNT(x)==0 => x==0, etc.
5270 2018-05-24 H.J. Lu <hongjiu.lu@intel.com>
5274 * varasm.c (assemble_alias): Check ifunc_resolver only on
5277 2018-05-24 Uros Bizjak <ubizjak@gmail.com>
5280 * config/i386/sse.md (movdi_to_sse): Do not generate pseudo
5281 when memory input operand is handled.
5283 2018-05-24 Luis Machado <luis.machado@linaro.org>
5285 * config/aarch64/aarch64.c (qdf24xx_addrcost_table): New static
5287 (qdf24xx_tunings) <addr_costs>: Set to qdf24xx_addrcost_table.
5289 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
5291 * match.pd: Delay FMA folds until after vectorization.
5293 2018-05-24 Andre Vieira <andre.simoesdiasvieira@arm.com>
5296 * config/aarch64/predicates.md (aarch64_mem_pair_lanes_operand): Make
5297 address check not strict.
5299 2018-05-24 Richard Sandiford <richard.sandiford@linaro.org>
5301 * gimple-match.h (gimple_match_op): New class.
5302 (mprts_hook): Replace parameters with a gimple_match_op *.
5303 (maybe_build_generic_op): Likewise.
5304 (gimple_simplified_result_is_gimple_val): Replace parameters with
5305 a const gimple_match_op *.
5306 (gimple_simplify): Replace code_helper * and tree * parameters with
5307 a gimple_match_op * parameter.
5308 (gimple_resimplify1): Replace code_helper *, tree and tree *
5309 parameters with a gimple_match_op * parameter.
5310 (gimple_resimplify2): Likewise.
5311 (gimple_resimplify3): Likewise.
5312 (maybe_push_res_to_seq): Replace code_helper, tree and tree *
5313 parameters with a gimple_match_op * parameter.
5314 * gimple-match-head.c (gimple_simplify): Change prototypes of
5315 auto-generated functions to take a gimple_match_op * instead of
5316 separate code_helper * and tree * parameters. Make the same
5317 change in the top-level overload and update calls to the
5318 gimple_resimplify routines. Update calls to the auto-generated
5319 functions and to maybe_push_res_to_seq in the publicly-facing
5320 operation-specific gimple_simplify overloads.
5321 (gimple_match_op::MAX_NUM_OPS): Define.
5322 (gimple_resimplify1): Replace rcode and ops with a single res_op
5323 parameter. Update call to gimple_simplify.
5324 (gimple_resimplify2): Likewise.
5325 (gimple_resimplify3): Likewise.
5326 (mprts_hook): Replace parameters with a gimple_match_op *.
5327 (maybe_build_generic_op): Likewise.
5328 (build_call_internal): Replace type, nargs and ops with
5329 a gimple_match_op *.
5330 (maybe_push_res_to_seq): Replace res_code, type and ops parameters
5331 with a single gimple_match_op *. Update calls to mprts_hook,
5332 build_call_internal and gimple_simplified_result_is_gimple_val.
5333 Factor out code that is common to the tree_code and combined_fn cases.
5334 * genmatch.c (expr::gen_transform): Replace tem_code and
5335 tem_ops with a gimple_match_op called tem_op. Update calls
5336 to the gimple_resimplify functions and maybe_push_res_to_seq.
5337 (dt_simplify::gen_1): Manipulate res_op instead of res_code and
5338 res_ops. Update call to the gimple_resimplify functions.
5339 (dt_simplify::gen): Pass res_op instead of res_code and res_ops.
5340 (decision_tree::gen): Make the functions take a gimple_match_op *
5341 called res_op instead of separate res_code and res_ops parameters.
5342 Update call accordingly.
5343 * gimple-fold.c (replace_stmt_with_simplification): Replace rcode
5344 and ops with a single res_op parameter. Update calls to
5345 maybe_build_generic_op and maybe_push_res_to_seq.
5346 (fold_stmt_1): Update calls to gimple_simplify and
5347 replace_stmt_with_simplification.
5348 (gimple_fold_stmt_to_constant_1): Update calls to gimple_simplify
5349 and gimple_simplified_result_is_gimple_val.
5350 * tree-cfgcleanup.c (cleanup_control_expr_graph): Update call to
5352 * tree-ssa-sccvn.c (vn_lookup_simplify_result): Replace parameters
5353 with a gimple_match_op *.
5354 (vn_nary_build_or_lookup): Likewise. Update call to
5355 vn_nary_build_or_lookup_1.
5356 (vn_nary_build_or_lookup_1): Replace rcode, type and ops with a
5357 gimple_match_op *. Update calls to the gimple_resimplify routines
5358 and to gimple_simplified_result_is_gimple_val.
5359 (vn_nary_simplify): Update call to vn_nary_build_or_lookup_1.
5360 Use gimple_match_op::MAX_NUM_OPS instead of a hard-coded 3.
5361 (vn_reference_lookup_3): Update call to vn_nary_build_or_lookup.
5362 (visit_nary_op): Likewise.
5363 (visit_reference_op_load): Likewise.
5365 2018-05-23 Luis Machado <luis.machado@linaro.org>
5367 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Use correct type
5368 modifier for printing the step amount.
5370 2018-05-23 Jozef Lawrynowicz <jozef.l@somniumtech.com>
5373 * gcc/tree.c (build_common_tree_nodes): Dont set TYPE_SIZE for __intN
5376 2018-05-23 Segher Boessenkool <segher@kernel.crashing.org>
5378 * doc/sourcebuild.texi (Endianness): New subsubsection.
5380 2018-05-23 Luis Machado <luis.machado@linaro.org>
5382 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5383 <prefetch_dynamic_strides>: New const bool field.
5384 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5385 prefetch_dynamic_strides.
5386 (exynosm1_prefetch_tune): Likewise.
5387 (thunderxt88_prefetch_tune): Likewise.
5388 (thunderx_prefetch_tune): Likewise.
5389 (thunderx2t99_prefetch_tune): Likewise.
5390 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides to
5392 (aarch64_override_options_internal): Update to set
5393 PARAM_PREFETCH_DYNAMIC_STRIDES.
5394 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
5395 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
5396 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
5397 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
5398 prefetch-dynamic-strides setting.
5400 2018-05-23 Luis Machado <luis.machado@linaro.org>
5402 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
5403 <minimum_stride>: New const int field.
5404 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
5405 minimum_stride field defaulting to -1.
5406 (exynosm1_prefetch_tune): Likewise.
5407 (thunderxt88_prefetch_tune): Likewise.
5408 (thunderx_prefetch_tune): Likewise.
5409 (thunderx2t99_prefetch_tune): Likewise.
5410 (qdf24xx_prefetch_tune) <minimum_stride>: Set to 2048.
5411 <default_opt_level>: Set to 3.
5412 (aarch64_override_options_internal): Update to set
5413 PARAM_PREFETCH_MINIMUM_STRIDE.
5414 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
5415 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
5416 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
5417 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
5418 stride is constant and is below the minimum stride threshold.
5420 2018-05-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5422 * config/arm/arm-cpus.in (mode26): Delete.
5423 (armv4): Delete mode26 reference.
5424 * config/arm/arm.c (arm_configure_build_target): Delete use of
5427 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
5429 * config/i386/i386.md (*floatuns<SWI48:mode><MODEF:mode>2_avx512):
5431 (floatunssi<mode>2): Also enable for AVX512F and TARGET_SSE_MATH.
5432 Rewrite expander pattern. Emit gen_floatunssi<mode>2_i387_with_xmm
5434 (floatunsdisf2): Rewrite expander pattern. Hanlde TARGET_AVX512F.
5435 (floatunsdidf2): Ditto.
5437 2018-05-23 Uros Bizjak <ubizjak@gmail.com>
5439 * config/i386/i386.md (fixuns_trunc<mode>di2): New insn pattern.
5440 (fixuns_trunc<mode>si2_avx512f): Ditto.
5441 (*fixuns_trunc<mode>si2_avx512f_zext): Ditto.
5442 (fixuns_trunc<mode>si2): Also enable for AVX512F and TARGET_SSE_MATH.
5443 Emit fixuns_trunc<mode>si2_avx512f for AVX512F targets.
5445 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
5447 PR rtl-optimization/79985
5448 * df-scan.c (df_insn_refs_collect): Remove special case for
5449 global registers and asm statements.
5451 2018-05-23 Alexander Monakov <amonakov@ispras.ru>
5453 * extend.texi (Global Register Variables): Rewrite the bullet list.
5454 Note that the register is available for allocation. Note that access
5455 via inline asm must use constraints. Add note about async-signal
5456 handlers. Remove paragraph about automagic register selection.
5458 2018-05-23 Richard Biener <rguenther@suse.de>
5460 * tree-ssa-sccvn.c (vn_reference_lookup_3): Remove restriction
5461 of fixed offset from memset VN.
5463 2018-05-23 Bill Schmidt <wschmidt@linux.ibm.com>
5465 * gimple-ssa-strength-reduction.c (struct slsr_cand_d): Add
5467 (alloc_cand_and_find_basis): Initialize first_interp field.
5468 (slsr_process_mul): Modify first_interp field.
5469 (slsr_process_add): Likewise.
5470 (slsr_process_cast): Modify first_interp field for each new
5472 (slsr_process_copy): Likewise.
5473 (dump_candidate): Dump first_interp field.
5474 (replace_mult_candidate): Process all interpretations, not just
5476 (replace_rhs_if_not_dup): Likewise.
5477 (replace_one_candidate): Likewise.
5479 2018-05-23 Wilco Dijkstra <wdijkstr@arm.com>
5481 * config/aarch64/aarch64.c (aarch64_use_frame_pointer):
5483 (aarch64_needs_frame_chain): New function.
5484 (aarch64_parse_override_string): Set aarch64_use_frame_pointer.
5486 2018-05-23 Sudakshina Das <sudi.das@arm.com>
5489 * common/config/aarch64/aarch64-common.c (aarch64_handle_option):
5490 Check val before adding MASK_STRICT_ALIGN to opts->x_target_flags.
5491 * config/aarch64/aarch64.opt (mstrict-align): Remove RejectNegative.
5492 * config/aarch64/aarch64.c (aarch64_attributes): Mark allow_neg
5493 as true for strict-align.
5494 (aarch64_can_inline_p): Perform checks even when callee has no
5495 attributes to check for strict alignment.
5496 * doc/extend.texi (AArch64 Function Attributes): Document
5498 * doc/invoke.texi: (AArch64 Options): Likewise.
5500 2018-05-23 Richard Sandiford <richard.sandiford@linaro.org>
5502 PR tree-optimization/85853
5503 * tree-vect-slp.c (vect_slp_analyze_node_operations): Split out
5504 the handling of the root of the node to...
5505 (vect_slp_analyze_node_operations_1): ...this new function,
5506 and run the whole thing with the child nodes' def types
5507 set according to their SLP node's def type.
5509 2018-05-23 Richard Biener <rguenther@suse.de>
5512 * tree-data-ref.c (create_runtime_alias_checks): Defer
5513 and ignore overflow warnings.
5515 2018-05-23 Yury Gribov <tetra2005@gmail.com>
5517 PR tree-optimization/85822
5518 * tree-vrp.c (is_masked_range_test): Fix handling of negative
5521 2018-05-23 Richard Biener <rguenther@suse.de>
5523 * tree-ssa-sccvn.c (vn_reference_lookup_3): Handle arbitrary
5524 memset constants via native_interpret_expr.
5526 2018-05-22 H.J. Lu <hongjiu.lu@intel.com>
5529 * cgraph.h (cgraph_node::create): Set ifunc_resolver for ifunc
5531 (cgraph_node::create_alias): Likewise.
5532 (cgraph_node::get_availability): Check ifunc_resolver instead
5533 of looking up ifunc attribute.
5534 * cgraphunit.c (maybe_diag_incompatible_alias): Likewise.
5535 * varasm.c (do_assemble_alias): Likewise.
5536 (assemble_alias): Likewise.
5537 (default_binds_local_p_3): Likewise.
5538 * cgraph.h (cgraph_node): Add ifunc_resolver.
5539 (cgraph_node::only_called_directly_or_aliased_p): Return false
5541 * lto-cgraph.c (input_node): Set ifunc_resolver for ifunc
5543 * symtab.c (symtab_node::verify_base): Verify that ifunc_resolver
5544 is equivalent to lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)).
5545 (symtab_node::binds_to_current_def_p): Check ifunc_resolver
5546 instead of looking up ifunc attribute.
5548 2018-05-22 Luis Machado <luis.machado@linaro.org>
5550 * config/aarch64/aarch64.md (*ashift<mode>_extv_bfiz): New pattern.
5552 2018-05-22 Martin Sebor <msebor@redhat.com>
5555 * builtins.c (expand_builtin_strcpy): Call maybe_warn_nonstring_arg
5556 only when expasion succeeds.
5557 (expand_builtin_strcmp): Same.
5558 (expand_builtin_strncmp): Same.
5560 2018-05-22 Martin Sebor <msebor@redhat.com>
5562 * calls.c (maybe_warn_nonstring_arg): Fix a typo in a comment.
5564 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
5565 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5567 * config/aarch64/aarch64-ldpstp.md: Replace uses of
5568 aarch64_mem_pair_operand with memory_operand and delete operand swapping
5570 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
5571 Add check for legitimate_address.
5572 (aarch64_gen_adjusted_ldpstp): Swap operands where appropriate.
5573 (aarch64_swap_ldrstr_operands): New.
5574 * config/aarch64/aarch64-protos.h (aarch64_swap_ldrstr_operands):
5577 2018-05-22 Jackson Woodruff <jackson.woodruff@arm.com>
5578 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5580 * config/aarch64/aarch64.md: New patterns to generate stp
5582 (store_pair_sw, store_pair_dw): New patterns to generate stp for
5583 single words and double words.
5584 (load_pair_sw, load_pair_dw): Likewise.
5585 (store_pair_sf, store_pair_df, store_pair_si, store_pair_di):
5587 (load_pair_sf, load_pair_df, load_pair_si, load_pair_di):
5589 * config/aarch64/aarch64-ldpstp.md: Modify peephole
5590 for different mode ldpstp and add peephole for merged zero stores.
5592 * config/aarch64/aarch64.c (aarch64_operands_ok_for_ldpstp):
5594 (aarch64_gen_store_pair): Rename calls to match new patterns.
5595 (aarch64_gen_load_pair): Rename calls to match new patterns.
5596 * config/aarch64/aarch64-simd.md (load_pair<mode>): Rename to...
5597 (load_pair<DREG:mode><DREG2:mode>): ... This.
5598 (store_pair<mode>): Rename to...
5599 (vec_store_pair<DREG:mode><DREG2:mode>): ... This.
5600 * config/aarch64/iterators.md (DREG, DREG2, DX2, SX, SX2, DSX):
5602 (V_INT_EQUIV): Handle SImode.
5603 * config/aarch64/predicates.md (aarch64_reg_zero_or_fp_zero):
5606 2018-05-22 Martin Sebor <msebor@redhat.com>
5609 * calls.c (maybe_warn_nonstring_arg): Use string length to set
5610 or ajust the presumed bound on an operation to avoid unnecessary
5613 2018-05-22 Martin Sebor <msebor@redhat.com>
5615 PR tree-optimization/85826
5616 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Avoid
5617 assuming that a DECL necesarily has a constant size.
5619 2018-05-22 Richard Sandiford <richard.sandiford@linaro.org>
5622 * internal-fn.c (expand_direct_optab_fn): Cope with a null lhs.
5624 2018-05-22 Richard Biener <rguenther@suse.de>
5626 PR tree-optimization/85834
5627 * tree-ssa-sccvn.c (vn_reference_lookup_3): Properly handle
5628 non-constant and non-zero memset arguments.
5630 2018-05-22 Martin Liska <mliska@suse.cz>
5633 * ipa-icf.c (sem_item::add_type): Do not ICE for incomplete types.
5635 2018-05-22 Richard Biener <rguenther@suse.de>
5637 PR tree-optimization/85863
5638 * tree-vect-stmts.c (vect_is_simple_cond): Only widen invariant
5639 comparisons when vectype is specified.
5640 (vectorizable_condition): Do not specify vectype for
5641 vect_is_simple_cond when SLP vectorizing.
5643 2018-05-21 Michael Meissner <meissner@linux.ibm.com>
5646 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Do not
5647 define __ibm128 as long double.
5648 * config/rs6000/rs6000.c (rs6000_init_builtins): Create __ibm128
5649 as a distinct type when IEEE 128-bit support is enabled.
5650 (init_float128_ieee): Fix up conversions between IFmode and IEEE
5651 128-bit types to use the correct functions.
5652 (rs6000_expand_float128_convert): Use explicit FLOAT_EXTEND to
5653 convert between 128-bit floating point types that have different
5654 modes but the same representation, instead of using gen_lowpart to
5656 * config/rs6000/rs6000.md (IFKF): New iterator for IFmode and
5658 (IFKF_reg): New attributes to give the register constraints for
5660 (extend<mode>tf2_internal): New insns to mark an explicit
5661 conversion between 128-bit floating point types that have a
5662 different mode but share the same representation.
5664 2018-05-21 Richard Sandiford <richard.sandiford@linaro.org>
5666 PR tree-optimization/85814
5667 * tree-ssa-strlen.c (get_stridx_plus_constant): Cope with
5668 a null return from get_strinfo when unsharing the next
5669 strinfo in the chain.
5671 2018-05-21 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
5674 * varasm.c (weak_finish): Clean up weak_decls.
5676 2018-05-21 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5678 * config/aarch64/aarch64.md ("unspec"): Define UNSPEC_SABAL,
5679 UNSPEC_SABDL2, UNSPEC_SADALP, UNSPEC_UABAL, UNSPEC_UABDL2,
5680 UNSPEC_UADALP values.
5681 * config/aarch64/iterators.md (ABAL): New int iterator.
5684 (sur): Add mappings for the above.
5685 * config/aarch64/aarch64-simd.md (aarch64_<sur>abdl2<mode>_3):
5687 (aarch64_<sur>abal<mode>_4): Likewise.
5688 (aarch64_<sur>adalp<mode>_3): Likewise.
5689 (<sur>sadv16qi): New define_expand.
5691 2018-05-21 Alexander Nesterovskiy <alexander.nesterovskiy@intel.com>
5693 * config/i386/i386.md (*movsf_internal): AVX falsedep fix.
5694 (*movdf_internal): Ditto.
5695 (*rcpsf2_sse): Ditto.
5696 (*rsqrtsf2_sse): Ditto.
5697 (*sqrt<mode>2_sse): Ditto.
5699 2018-05-21 Tamar Christina <tamar.christina@arm.com>
5701 * config/aarch64/aarch64-simd.md (aarch64_eor3qv8hi): Change to
5703 (aarch64_bcaxqv8hi): Change to bcaxq<mode>4.
5704 * config/aarch64/aarch64-simd-builtins.def (veor3q_u8, veor3q_u32,
5705 veor3q_u64, veor3q_s8, veor3q_s16, veor3q_s32, veor3q_s64, vbcaxq_u8,
5706 vbcaxq_u32, vbcaxq_u64, vbcaxq_s8, vbcaxq_s16, vbcaxq_s32,
5708 * config/aarch64/arm_neon.h: Likewise.
5709 * config/aarch64/iterators.md (VQ_I): New.
5711 2018-05-21 Alexey Brodkin <abrodkin@synopsys.com>
5713 * config.gcc: Add arc/t-multilib-linux to tmake_file for
5715 * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and
5718 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
5720 * config/nds32/constraints.md (S): New constraint.
5721 * config/nds32/nds32.md (call_internal): Use constraint S.
5722 (call_value_internal): Likewise.
5723 (sibcall_internal): Likewise.
5724 (sibcall_value_internal): Likewise.
5726 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
5727 Chung-Ju Wu <jasonwucj@gmail.com>
5729 * config/nds32/nds32.c (nds32_register_move_cost): Take garywolf cpu
5732 2018-05-20 Kito Cheng <kito.cheng@gmail.com>
5733 Chung-Ju Wu <jasonwucj@gmail.com>
5735 * config/nds32/nds32-cost.c (rtx_cost_model_t): New structure.
5736 (insn_size_16bit, insn_size_32bit): New variables for cost evaluation.
5737 (nds32_rtx_costs_impl): Simplify.
5738 (nds32_address_cost_impl): Simplify.
5739 (nds32_init_rtx_costs): New function.
5740 (nds32_rtx_costs_speed_prefer): Likewise.
5741 (nds32_rtx_costs_size_prefer): Likewise.
5742 (nds32_address_cost_speed_prefer): Likewise.
5743 (nds32_address_cost_speed_fwprop): Likewise.
5744 (nds32_address_cost_size_prefer): Likewise.
5745 * config/nds32/nds32-protos.h (nds32_init_rtx_costs): Declare.
5746 * config/nds32/nds32.c (nds32_option_override): Use
5747 nds32_init_rtx_costs function.
5749 2018-05-20 Chung-Ju Wu <jasonwucj@gmail.com>
5751 * config/nds32/nds32.c (nds32_asm_file_start): Output pipeline model.
5752 * config/nds32/nds32.h (TARGET_PIPELINE_N7): Define.
5753 (TARGET_PIPELINE_N8): Likewise.
5754 (TARGET_PIPELINE_N10): Likewise.
5755 (TARGET_PIPELINE_N13): Likewise.
5756 (TARGET_PIPELINE_GRAYWOLF): Likewise.
5758 2018-05-19 Monk Chiang <sh.chiang04@gmail.com>
5760 * config/nds32/nds32-fpu.md: Update copyright year.
5762 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
5764 * config/nds32/nds32.h (ASM_SPEC): Adjust spec rule.
5766 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
5768 * config/nds32/nds32.c
5769 (nds32_md_asm_adjust): Consider flag_inline_asm_r15 variable.
5770 * config/nds32/nds32.opt (minline-asm-r15): New option.
5772 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
5774 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS): Add
5776 * config/nds32/nds32.md (abssi2): New pattern.
5778 2018-05-19 Uros Bizjak <ubizjak@gmail.com>
5780 * config/i386/i386.md (rex64namesuffix): New mode attribute.
5781 * config/i386/sse.md (sse_cvtsi2ss<rex64namesuffix><round_name>):
5782 Merge insn pattern from sse_cvtsi2ss<round_name> and
5783 sse_cvtsi2ssq<round_name> using SWI48 mode iterator.
5784 (sse_cvtss2si<rex64namesuffix><round_name>): Merge insn pattern
5785 from sse_cvtss2si<round_name> and sse_cvtss2siq<round_name>
5786 using SWI48 mode iterator.
5787 (sse_cvtss2si<rex64namesuffix>_2): Merge insn pattern from
5788 sse_cvtss2si_2 and sse_cvtss2siq_2 using SWI48 mode iterator.
5789 (sse_cvttss2si<rex64namesuffix><round_saeonly_name>): Merge insn
5790 pattern from sse_cvttss2si<round_saeonly_name>
5791 and sse_cvttss2siq<round_saeonly_name> using SWI48 mode iterator.
5792 (avx512f_vcvtss2usi<rex64namesuffix><round_name>): Merge insn pattern
5793 from avx512f_vcvtss2usi<round_name> and avx512f_vcvtss2usiq<round_name>
5794 using SWI48 mode iterator.
5795 (avx512f_vcvttss2usi<rex64namesuffix><round_saeonly_name>): Merge
5796 insn pattern from avx512f_vcvttss2usi<round_saeonly_name> and
5797 avx512f_vcvttss2usiq<round_saeonly_name> using SWI48 mode iterator.
5798 (avx512f_vcvtsd2usi<rex64namesuffix><round_name>): Merge insn pattern
5799 from avx512f_vcvtsd2usi<round_name> and avx512f_vcvtsd2usiq<round_name>
5800 using SWI48 mode iterator.
5801 (avx512f_vcvttsd2usi<rex64namesuffix><round_saeonly_name>): Merge
5802 insn pattern from avx512f_vcvttsd2usi<round_saeonly_name> and
5803 avx512f_vcvttsd2usiq<round_saeonly_name> using SWI48 mode iterator.
5804 (sse2_cvtsd2si<rex64namesuffix><round_name>): Merge insn pattern from
5805 sse2_cvtsd2si<round_name> and sse2_cvtsd2siq<round_name> using
5806 SWI48 mode iterator.
5807 (sse2_cvtsd2si<rex64namesuffix>_2): Merge insn pattern from
5808 sse2_cvtsd2si_2 and sse2_cvtsd2siq_2 using SWI48 mode iterator.
5809 (sse_cvttsd2si<rex64namesuffix><round_saeonly_name>): Merge insn
5810 pattern from sse_cvttsd2si<round_saeonly_name>
5811 and sse_cvttsd2siq<round_saeonly_name> using SWI48 mode iterator.
5813 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
5815 * config/nds32/nds32-md-auxiliary.c
5816 (nds32_valid_smw_lwm_base_p): Refine.
5817 (nds32_output_smw_single_word): Refine.
5818 (nds32_output_smw_double_word): New.
5819 * config/nds32/nds32-protos.h (nds32_output_smw_double_word): New.
5821 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
5823 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push): Refine.
5824 (nds32_output_stack_pop): Refine.
5825 (nds32_expand_unaligned_load): Refine.
5826 (nds32_expand_unaligned_store): Refine.
5828 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5829 Chung-Ju Wu <jasonwucj@gmail.com>
5831 * config/nds32/constants.md: Add TP_REGNUM constant.
5832 (unspec_element): Add UNSPEC_GOTINIT, UNSPEC_GOT, UNSPEC_GOTOFF,
5833 UNSPEC_PLT, UNSPEC_TLSGD, UNSPEC_TLSLD, UNSPEC_TLSIE, UNSPEC_TLSLE and
5835 * config/nds32/nds32-doubleword.md: Consider flag_pic.
5836 * config/nds32/nds32-dspext.md (mov<mode>): Expand TLS and PIC cases.
5837 * config/nds32/nds32-predicates.c (nds32_const_unspec_p): New.
5838 * config/nds32/nds32-md-auxiliary.c: Implementation that support TLS
5839 and PIC code generation.
5840 * config/nds32/nds32-protos.h: Declarations that support TLS and PIC
5842 * config/nds32/nds32-relax-opt.c: Consider TLS and PIC for relax
5844 * config/nds32/nds32.md: Support TLS and PIC.
5845 * config/nds32/nds32.c: Support TLS and PIC.
5846 * config/nds32/nds32.h (nds32_relax_insn_type): New enum type.
5847 * config/nds32/predicates.md (nds32_nonunspec_symbolic_operand): New
5850 2018-05-19 Chung-Ju Wu <jasonwucj@gmail.com>
5852 * config/nds32/nds32-predicates.c (const_vector_to_hwint): Use machine
5853 mode with E_ prefix.
5855 2018-05-19 Kuan-Lin Chen <kuanlinchentw@gmail.com>
5856 Chung-Ju Wu <jasonwucj@gmail.com>
5858 * config/nds32/constants.md (unspec_element): Add UNSPEC_ICT.
5859 * config/nds32/nds32-md-auxiliary.c
5860 (symbolic_reference_mentioned_p): New.
5861 (nds32_legitimize_ict_address): New.
5862 (nds32_expand_ict_move): New.
5863 (nds32_indirect_call_referenced_p): New.
5864 (nds32_symbol_binds_local_p): Delete.
5865 (nds32_long_call_p): Modify.
5866 * config/nds32/nds32-opts.h (nds32_ict_model_type): New enum type.
5867 * config/nds32/nds32-protos.h
5868 (symbolic_reference_mentioned_p): Declare.
5869 (nds32_legitimize_ict_address): Declare.
5870 (nds32_expand_ict_move): Declare.
5871 (nds32_indirect_call_referenced_p): Declare.
5872 * config/nds32/nds32-relax-opt.c (nds32_ict_const_p): New.
5873 (nds32_relax_group): Use nds32_ict_const_p as condition.
5874 * config/nds32/nds32.c (nds32_attribute_table): Add "indirect_call".
5875 (nds32_asm_file_start): Output ict_model directive in asm code.
5876 (nds32_legitimate_address_p): Consider indirect call.
5877 (nds32_print_operand): Consider indirect call.
5878 (nds32_print_operand_address): Consider indirect call.
5879 (nds32_insert_attributes): Handle "indirect_call" attribute.
5880 (TARGET_LEGITIMATE_ADDRESS_P): Define.
5881 (TARGET_LEGITIMATE_CONSTANT_P): Define.
5882 (TARGET_CANNOT_FORCE_CONST_MEM): Define.
5883 (TARGET_DELEGITIMIZE_ADDRESS): Define.
5884 (TARGET_ASM_OUTPUT_ADDR_CONST_EXTRA): Define.
5885 * config/nds32/nds32.h (SYMBOLIC_CONST_P): Define.
5886 (TARGET_ICT_MODEL_SMALL): Define.
5887 (TARGET_ICT_MODEL_LARGE): Define.
5888 * config/nds32/nds32.md (movsi): Consider ict model.
5889 (call, call_value): Consider ict model.
5890 (sibcall, sibcall_value): Consider ict model.
5891 * config/nds32/nds32.opt (mict-model): New option.
5892 * config/nds32/predicates.md (nds32_symbolic_operand): Consider ict
5895 2018-05-18 Kito Cheng <kito.cheng@gmail.com>
5896 Monk Chiang <sh.chiang04@gmail.com>
5897 Jim Wilson <jimw@sifive.com>
5899 * common/config/riscv/riscv-common.c (riscv_parse_arch_string):
5900 Add support to parse rv32e*. Clear MASK_RVE for rv32i and rv64i.
5901 * config.gcc (riscv*-*-*): Add support for rv32e* and ilp32e.
5902 * config/riscv/riscv-c.c (riscv_cpu_cpp_builtins): Define
5903 __riscv_32e when TARGET_RVE. Handle ABI_ILP32E as soft-float ABI.
5904 * config/riscv/riscv-opts.h (riscv_abi_type): Add ABI_ILP32E.
5905 * config/riscv/riscv.c (riscv_compute_frame_info): When TARGET_RVE,
5906 compute save_libcall_adjustment properly.
5907 (riscv_option_override): Call error if TARGET_RVE and not ABI_ILP32E.
5908 (riscv_conditional_register_usage): Handle TARGET_RVE and ABI_ILP32E.
5909 * config/riscv/riscv.h (UNITS_PER_FP_ARG): Handle ABI_ILP32E.
5910 (STACK_BOUNDARY, ABI_STACK_BOUNDARY): Handle TARGET_RVE.
5911 (GP_REG_LAST, MAX_ARGS_IN_REGISTERS): Likewise.
5912 (ABI_SPEC): Handle mabi=ilp32e.
5913 * config/riscv/riscv.opt (abi_type): Add ABI_ILP32E.
5914 (RVE): Add RVE mask.
5915 * doc/invoke.texi (RISC-V options) <-mabi>: Add ilp32e info.
5916 <-march>: Add rv32e as an example.
5918 2018-05-18 Marc Glisse <marc.glisse@inria.fr>
5921 * tree-ssa-structalias.c (create_variable_info_for_1): Extra argument.
5922 (intra_create_variable_infos): Handle C++ constructors.
5924 2018-05-18 Martin Liska <mliska@suse.cz>
5926 * passes.def: Remove a redundant pass.
5928 2018-05-18 Eric Botcazou <ebotcazou@adacore.com>
5931 * config/sparc/sparc.c (sparc_expand_builtin): Always initialize op[0].
5933 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5935 * config/arm/arm-cpus.in (armv3m, mode32): Delete features.
5937 (ARMv2, ARMv3, ARMv3m): Delete fgroups.
5939 (armv2, armv2a, armv3, armv3m): Delete architectures.
5940 (arm2, arm250, arm3, arm6, arm60, arm600, arm610, arm620,
5941 arm7, arm7d, arm7di, arm70, arm700, arm700i, arm710, arm720,
5942 arm710c, arm7100, arm7500, arm7500fe, arm7m, arm7dm, arm7dmi):
5944 * config/arm/arm.md (maddsidi4): Remove check for arm_arch3m.
5945 (*mulsidi3adddi): Likewise.
5946 (mulsidi3): Likewise.
5947 (*mulsidi3_nov6): Likewise.
5948 (umulsidi3): Likewise.
5949 (umulsidi3_nov6): Likewise.
5950 (umaddsidi4): Likewise.
5951 (*umulsidi3adddi): Likewise.
5952 (smulsi3_highpart): Likewise.
5953 (*smulsi3_highpart_nov6): Likewise.
5954 (umulsi3_highpart): Likewise.
5955 (*umulsi3_highpart_nov6): Likewise.
5956 * config/arm/arm.h (arm_arch3m): Delete.
5957 * config/arm/arm.c (arm_arch3m): Delete.
5958 (arm_option_override_internal): Update armv3-related comment.
5959 (arm_configure_build_target): Delete use of isa_bit_mode32.
5960 (arm_option_reconfigure_globals): Delete set of arm_ach3m.
5961 (arm_rtx_costs_internal): Delete check of arm_arch3m.
5962 * config/arm/arm-fixed.md (mulsq3): Delete check for arm_arch3m.
5964 (mulusa3): Likewise.
5965 * config/arm/arm-protos.h (arm_arch3m): Delete.
5966 * config/arm/arm-tables.opt: Regenerate.
5967 * config/arm/arm-tune.md: Likewise.
5968 * config/arm/t-arm-elf (all_early_nofp): Delete mentions of
5969 deleted architectures.
5971 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
5973 * config/arm/arm-cpus.in (armv5, armv5e): Delete features.
5974 (armv5t, armv5te): New features.
5975 (ARMv5, ARMv5e): Delete fgroups.
5976 (ARMv5t, ARMv5te): Adjust for above changes.
5978 (armv5, armv5e): Delete arches.
5979 * config/arm/arm.md (*call_reg_armv5): Use arm_arch5t instead of
5981 (*call_reg_arm): Likewise.
5982 (*call_value_reg_armv5): Likewise.
5983 (*call_value_reg_arm): Likewise.
5984 (*call_symbol): Likewise.
5985 (*call_value_symbol): Likewise.
5986 (*sibcall_insn): Likewise.
5987 (*sibcall_value_insn): Likewise.
5989 (prefetch): Likewise.
5990 (define_split and define_peephole2 dependent on arm_arch5):
5992 * config/arm/arm.h (TARGET_LDRD): Use arm_arch5te instead of
5994 (TARGET_ARM_QBIT): Likewise.
5995 (TARGET_DSP_MULTIPLY): Likewise.
5996 (enum base_architecture): Delete BASE_ARCH_5, BASE_ARCH_5E.
5997 (arm_arch5, arm_arch5e): Delete.
5998 (arm_arch5t, arm_arch5te): Declare.
5999 * config/arm/arm.c (arm_arch5, arm_arch5e): Delete.
6000 (arm_arch5t): Declare.
6001 (arm_option_reconfigure_globals): Update for the above.
6002 (arm_options_perform_arch_sanity_checks): Update comment, replace
6003 use of arm_arch5 with arm_arch5t.
6004 (use_return_insn): Likewise.
6005 (arm_emit_call_insn): Likewise.
6006 (output_return_instruction): Likewise.
6007 (arm_final_prescan_insn): Likewise.
6008 (arm_coproc_builtin_available): Likewise.
6009 * config/arm/arm-c.c (arm_cpu_builtins): Replace arm_arch5 and
6010 arm_arch5e with arm_arch5t and arm_arch5te.
6011 * config/arm/arm-protos.h (arm_arch5, arm_arch5e): Delete.
6012 (arm_arch5t, arm_arch5te): Declare.
6013 * config/arm/arm-tables.opt: Regenerate.
6014 * config/arm/t-arm-elf: Remove references to armv5, armv5e.
6015 * config/arm/t-multilib: Likewise.
6016 * config/arm/thumb1.md (*call_reg_thumb1_v5): Check arm_arch5t
6017 instead of arm_arch5.
6018 (*call_reg_thumb1): Likewise.
6019 (*call_value_reg_thumb1_v5): Likewise.
6020 (*call_value_reg_thumb1): Likewise.
6021 * config/arm/vxworks.h (TARGET_OS_CPP_BUILTINS): Remove now
6023 * doc/invoke.texi (ARM Options): Remove references to armv5, armv5e.
6025 2018-05-18 Martin Liska <mliska@suse.cz>
6027 PR gcov-profile/84846
6028 * doc/gcov.texi: Document -t option of gcov tool.
6030 2018-05-18 Martin Liska <mliska@suse.cz>
6032 PR gcov-profile/84846
6033 * gcov.c (print_usage): Add new -t option.
6034 (process_args): Handle the option.
6035 (generate_results): Use stdout as output when requested by
6038 2018-05-18 Martin Liska <mliska@suse.cz>
6040 PR gcov-profile/84846
6041 * coverage.c (coverage_init): Write PWD to .gcno file.
6042 * doc/gcov.texi: Document how working directory is printed.
6043 * gcov-dump.c (dump_gcov_file): Print PWD.
6044 * gcov.c (output_intermediate_file): Likewise.
6045 (read_graph_file): Read PWD string.
6046 (output_lines): Print PWD.
6048 2018-05-18 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6051 * ipa-pure-const.c (malloc_candidate_p): Remove the check integer_zerop
6052 for retval and return false if all args to phi are zero.
6054 2018-05-18 Richard Biener <rguenther@suse.de>
6056 * gimple-ssa-evrp.c (class evrp_folder): Add simplify_stmt_using_ranges
6058 (evrp_dom_walker::before_dom_children): Call it.
6060 2018-05-18 Richard Biener <rguenther@suse.de>
6062 * tree-dfa.c (get_ref_base_and_extent): Use range-info to refine
6063 results when processing array refs with variable index.
6065 2018-05-18 Toon Moene <toon@moene.org>
6067 * doc/invoke.texi: Move -floop-unroll-and-jam documentation
6068 directly after that of -floop-interchange. Indicate that both
6069 options are enabled by default when specifying -O3.
6071 2018-05-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6073 * config/aarch64/aarch64-simd.md (vec_set<mode>): Use VALL_F16 mode
6074 iterator. Delete separate integer-mode vec_set<mode> expander.
6075 (aarch64_simd_vec_setv2di): Delete.
6076 (vec_setv2di): Delete.
6077 (aarch64_simd_vec_set<mode>): Delete all other patterns with that name.
6078 Use VALL_F16 mode iterator. Add LD1 alternative and use vwcore for
6079 the "w, r" alternative.
6081 2018-05-18 Martin Liska <mliska@suse.cz>
6083 * passes.def: Add pass_lower_switch and pass_lower_switch_O0.
6084 * tree-pass.h (make_pass_lower_switch_O0): New function.
6085 * tree-switch-conversion.c (node_has_low_bound): Remove.
6086 (node_has_high_bound): Likewise.
6087 (node_is_bounded): Likewise.
6088 (class pass_lower_switch): Make it a template type and create
6090 (pass_lower_switch::execute): Add template argument.
6091 (make_pass_lower_switch): New function.
6092 (make_pass_lower_switch_O0): New function.
6093 (do_jump_if_equal): Remove.
6094 (emit_case_nodes): Simplify to just handle all 3 cases and leave
6095 all the hard work to tree optimization passes.
6097 2018-05-18 Martin Liska <mliska@suse.cz>
6099 * dbgcnt.c (limit_low): Renamed from limit.
6100 (limit_high): New variable.
6101 (dbg_cnt_is_enabled): Check for upper limit.
6102 (dbg_cnt): Adjust dumping.
6103 (dbg_cnt_set_limit_by_index): Add new argument for high
6105 (dbg_cnt_set_limit_by_name): Likewise.
6106 (dbg_cnt_process_single_pair): Parse new format.
6107 (dbg_cnt_process_opt): Use strtok.
6108 (dbg_cnt_list_all_counters): Remove 'value' and add
6110 * doc/invoke.texi: Document changes.
6112 2018-05-18 Richard Sandiford <richard.sandiford@linaro.org>
6114 * doc/sourcebuild.texi (scalar_all_fma): Document.
6115 * tree.def (FMA_EXPR): Delete.
6116 * internal-fn.def (FMA, FMS, FNMA, FNMS): New internal functions.
6117 * internal-fn.c (ternary_direct): New macro.
6118 (expand_ternary_optab_fn): Likewise.
6119 (direct_ternary_optab_supported_p): Likewise.
6120 * Makefile.in (build/genmatch.o): Depend on case-fn-macros.h.
6121 * builtins.c (fold_builtin_fma): Delete.
6122 (fold_builtin_3): Don't call it.
6123 * cfgexpand.c (expand_debug_expr): Remove FMA_EXPR handling.
6124 * expr.c (expand_expr_real_2): Likewise.
6125 * fold-const.c (operand_equal_p): Likewise.
6126 (fold_ternary_loc): Likewise.
6127 * gimple-pretty-print.c (dump_ternary_rhs): Likewise.
6128 * gimple.c (DEFTREECODE): Likewise.
6129 * gimplify.c (gimplify_expr): Likewise.
6130 * optabs-tree.c (optab_for_tree_code): Likewise.
6131 * tree-cfg.c (verify_gimple_assign_ternary): Likewise.
6132 * tree-eh.c (operation_could_trap_p): Likewise.
6133 (stmt_could_throw_1_p): Likewise.
6134 * tree-inline.c (estimate_operator_cost): Likewise.
6135 * tree-pretty-print.c (dump_generic_node): Likewise.
6136 (op_code_prio): Likewise.
6137 * tree-ssa-loop-im.c (stmt_cost): Likewise.
6138 * tree-ssa-operands.c (get_expr_operands): Likewise.
6139 * tree.c (commutative_ternary_tree_code, add_expr): Likewise.
6140 * fold-const-call.h (fold_fma): Delete.
6141 * fold-const-call.c (fold_const_call_ssss): Handle CFN_FMS,
6142 CFN_FNMA and CFN_FNMS.
6144 * genmatch.c (combined_fn): New enum.
6145 (commutative_ternary_tree_code): Remove FMA_EXPR handling.
6146 (commutative_op): New function.
6147 (commutate): Use it. Handle more than 2 operands.
6148 (dt_operand::gen_gimple_expr): Use commutative_op.
6149 (parser::parse_expr): Allow :c to be used with non-binary
6150 operators if the commutative operand is known.
6151 * gimple-ssa-backprop.c (backprop::process_builtin_call_use): Handle
6152 CFN_FMS, CFN_FNMA and CFN_FNMS.
6153 (backprop::process_assign_use): Remove FMA_EXPR handling.
6154 * hsa-gen.c (gen_hsa_insns_for_operation_assignment): Likewise.
6155 (gen_hsa_fma): New function.
6156 (gen_hsa_insn_for_internal_fn_call): Use it for IFN_FMA, IFN_FMS,
6157 IFN_FNMA and IFN_FNMS.
6158 * match.pd: Add folds for IFN_FMS, IFN_FNMA and IFN_FNMS.
6159 * gimple-fold.h (follow_all_ssa_edges): Declare.
6160 * gimple-fold.c (follow_all_ssa_edges): New function.
6161 * tree-ssa-math-opts.c (convert_mult_to_fma_1): Use the
6162 gimple_build interface and use follow_all_ssa_edges to fold the result.
6163 (convert_mult_to_fma): Use direct_internal_fn_suppoerted_p
6164 instead of checking for optabs directly.
6165 * config/i386/i386.c (ix86_add_stmt_cost): Recognize FMAs as calls
6166 rather than FMA_EXPRs.
6167 * config/rs6000/rs6000.c (rs6000_gimple_fold_builtin): Create a
6168 call to IFN_FMA instead of an FMA_EXPR.
6170 2018-05-17 Jim Wilson <jimw@sifive.com>
6172 * expr.c (do_tablejump): When converting index to Pmode, if we have a
6173 sign extended promoted subreg, and the range does not have the sign bit
6174 set, then do a sign extend.
6176 * config/riscv/riscv.c (riscv_extend_comparands): In unsigned QImode
6177 test, check for sign extended subreg and/or constant operands, and
6178 do a sign extend in that case.
6180 2018-05-17 Steve Ellcey <sellcey@cavium.com>
6182 * config/aarch64/thunderx2t99.md (thunderx2t99_ls_both): Delete.
6183 (thunderx2t99_multiple): Delete psuedo-units from used cpus.
6185 (thunderx2t99_alu_shift): Remove alu_shift_reg, alus_shift_reg.
6186 Change logics_shift_reg to logics_shift_imm.
6187 (thunderx2t99_fp_loadpair_basic): Delete.
6188 (thunderx2t99_fp_storepair_basic): Delete.
6189 (thunderx2t99_asimd_int): Add neon_sub and neon_sub_q types.
6190 (thunderx2t99_asimd_polynomial): Delete.
6191 (thunderx2t99_asimd_fp_simple): Add neon_fp_mul_s_scalar_q
6192 and neon_fp_mul_d_scalar_q.
6193 (thunderx2t99_asimd_fp_conv): Add *int_to_fp* types.
6194 (thunderx2t99_asimd_misc): Delete neon_dup and neon_dup_q.
6195 (thunderx2t99_asimd_recip_step): Add missing *sqrt* types.
6196 (thunderx2t99_asimd_lut): Add missing tbl types.
6197 (thunderx2t99_asimd_ext): Delete.
6198 (thunderx2t99_asimd_load1_1_mult): Delete.
6199 (thunderx2t99_asimd_load1_2_mult): Delete.
6200 (thunderx2t99_asimd_load1_ldp): New.
6201 (thunderx2t99_asimd_load1): New.
6202 (thunderx2t99_asimd_load2): Add missing *load2* types.
6203 (thunderx2t99_asimd_load3): New.
6204 (thunderx2t99_asimd_load4): New.
6205 (thunderx2t99_asimd_store1_1_mult): Delete.
6206 (thunderx2t99_asimd_store1_2_mult): Delete.
6207 (thunderx2t99_asimd_store2_mult): Delete.
6208 (thunderx2t99_asimd_store2_onelane): Delete.
6209 (thunderx2t99_asimd_store_stp): New.
6210 (thunderx2t99_asimd_store1): New.
6211 (thunderx2t99_asimd_store2): New.
6212 (thunderx2t99_asimd_store3): New.
6213 (thunderx2t99_asimd_store4): New.
6215 2018-05-17 Jerome Lambourg <lambourg@adacore.com>
6217 * config/arm/arm_cmse.h (cmse_nsfptr_create, cmse_is_nsfptr): Remove
6218 #include <stdint.h>. Replace intptr_t with __INTPTR_TYPE__.
6220 2018-05-17 Pat Haugen <pthaugen@us.ibm.com>
6221 Segher Boessenkool <segher@kernel.crashing.org>
6224 * config/rs6000/rs6000.c (rs6000_output_move_128bit): Check dest
6227 2018-05-17 Richard Biener <rguenther@suse.de>
6229 * tree-ssa-dse.c (dse_classify_store): Fix iterator increment
6230 for pruning loop and prune defs feeding only already visited PHIs.
6232 2018-05-17 Richard Biener <rguenther@suse.de>
6234 * tree-ssa-sccvn.c (vn_reference_lookup_3): Improve memset handling.
6236 2018-05-17 Bin Cheng <bin.cheng@arm.com>
6237 Richard Biener <rguenther@suse.de>
6239 PR tree-optimization/85793
6240 * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
6241 for VMAT_ELEMENTWISE.
6243 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
6245 * internal-fn.h (lookup_internal_fn): Declare
6246 * internal-fn.c (lookup_internal_fn): New function.
6247 * gimple.c (gimple_build_call_from_tree): Handle calls to
6249 * gimple-pretty-print.c (dump_gimple_call): Print "." before
6250 internal function names.
6251 * tree-pretty-print.c (dump_generic_node): Likewise.
6252 * tree-ssa-scopedtables.c (expr_hash_elt::print): Likewise.
6254 2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
6256 * gimple-fold.h (gimple_build): Make the function forms take
6257 combined_fn rather than built_in_function.
6258 (gimple_simplify): Likewise.
6259 * gimple-match-head.c (gimple_simplify): Likewise.
6260 * gimple-fold.c (gimple_build): Likewise.
6261 * tree-vect-loop.c (get_initial_def_for_reduction): Use gimple_build
6262 rather than gimple_build_call_internal.
6263 (get_initial_defs_for_reduction): Likewise.
6264 (vect_create_epilog_for_reduction): Likewise.
6265 (vectorizable_live_operation): Likewise.
6267 2018-05-17 Martin Liska <mliska@suse.cz>
6269 * gimple-ssa-sprintf.c (format_directive): Do not use
6270 space in between 'G_' and '('.
6272 2018-05-17 Jakub Jelinek <jakub@redhat.com>
6275 * config/i386/i386.c (ix86_fold_builtin): Handle masked shifts
6276 even if the mask is not all ones.
6279 * config/i386/i386.c (ix86_fold_builtin): Fold shift builtins by
6281 (ix86_gimple_fold_builtin): Likewise.
6284 * config/i386/i386.c: Include tree-vector-builder.h.
6285 (ix86_vector_shift_count): New function.
6286 (ix86_fold_builtin): Fold shift builtins by scalar count.
6287 (ix86_gimple_fold_builtin): Likewise.
6289 * config/i386/avx512fintrin.h (_mm512_set_epi16, _mm512_set_epi8,
6290 _mm512_setzero): New intrinsics.
6292 2018-05-17 James Greenhalgh <james.greenhalgh@arm.com>
6293 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6295 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify
6296 code generation for cases where splatting a value is not useful.
6297 * simplify-rtx.c (simplify_ternary_operation): Simplify
6298 vec_merge across a vec_duplicate and a paradoxical subreg forming
6299 a vector mode to a vec_concat.
6301 2018-05-17 Olga Makhotina <olga.makhotina@intel.com>
6303 * config.gcc: Support "goldmont-plus".
6304 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
6306 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6307 PROCESSOR_GOLDMONT_PLUS.
6308 * config/i386/i386.c (m_GOLDMONT_PLUS): Define.
6309 (processor_target_table): Add "goldmont-plus".
6310 (PTA_GOLDMONT_PLUS): Define.
6311 (ix86_lea_outperforms): Add TARGET_GOLDMONT_PLUS.
6312 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT_PLUS.
6313 (fold_builtin_cpu): Add M_INTEL_GOLDMONT_PLUS.
6314 (fold_builtin_cpu): Add "goldmont-plus".
6315 (ix86_add_stmt_cost): Add TARGET_GOLDMONT_PLUS.
6316 (ix86_option_override_internal): Add "goldmont-plus".
6317 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT_PLUS.
6318 (processor_type): Add PROCESSOR_GOLDMONT_PLUS.
6319 * config/i386/x86-tune.def: Add m_GOLDMONT_PLUS.
6320 * doc/invoke.texi: Add goldmont-plus as x86 -march=/-mtune= CPU type.
6322 2018-05-17 Richard Biener <rguenther@suse.de>
6324 PR tree-optimization/85757
6325 * tree-ssa-dse.c (dse_classify_store): Record a PHI def and
6326 remove defs that only feed that PHI from further processing.
6328 2018-05-16 Jim Wilson <jimw@sifive.com>
6330 * config/riscv/riscv.md (<optab>si3_mask, <optab>si3_mask_1): Prepend
6332 (<optab>di3_mask, <optab>di3_mask_1): Likewise.
6334 2018-05-16 Mark Wielaard <mark@klomp.org>
6336 * dwarf2out.c (count_index_strings): New function.
6337 (output_indirect_strings): Call count_index_strings and generate
6338 header for dwarf_version >= 5.
6340 2018-05-16 Mark Wielaard <mark@klomp.org>
6342 * dwarf2out.c (dwarf_FORM): New function.
6343 (set_indirect_string): Use dwarf_FORM.
6344 (reset_indirect_string): Likewise.
6345 (size_of_die): Likewise.
6346 (value_format): Likewise.
6347 (output_die): Likewise.
6348 (add_skeleton_AT_string): Likewise.
6349 (output_macinfo_op): Likewise.
6350 (index_string): Likewise.
6351 (output_index_string_offset): Likewise.
6352 (output_index_string): Likewise.
6353 (count_index_strings): Likewise.
6355 2018-05-16 Carl Love <cel@us.ibm.com>
6357 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
6358 dcbt and dcbtstt with TH=16 if operands[2] is 0 and Power 8 or newer.
6360 2018-05-16 Martin Jambor <mjambor@suse.cz>
6362 * ipa-prop.c (ipa_free_all_edge_args): Remove.
6363 * ipa-prop.h (ipa_free_all_edge_args): Likewise.
6365 2018-05-16 Wilco Dijkstra <wdijkstr@arm.com>
6367 * config/aarch64/aarch64.md (fma<mode>4): Change into expand pattern.
6368 (fnma<mode>4): Likewise.
6369 (fms<mode>4): Likewise.
6370 (fnms<mode>4): Likewise.
6371 (aarch64_fma<mode>4): Rename insn, reorder accumulator operand.
6372 (aarch64_fnma<mode>4): Likewise.
6373 (aarch64_fms<mode>4): Likewise.
6374 (aarch64_fnms<mode>4): Likewise.
6375 (aarch64_fnmadd<mode>4): Likewise.
6377 2018-05-16 Jason Merrill <jason@redhat.com>
6379 * tree.c (warn_deprecated_use): Return bool. Simplify logic.
6381 2018-05-16 Richard Biener <rguenther@suse.de>
6383 * tree-vectorizer.h (struct stmt_info_for_cost): Add where member.
6384 (dump_stmt_cost): Declare.
6385 (add_stmt_cost): Dump cost we add.
6386 (add_stmt_costs): New function.
6387 (vect_model_simple_cost, vect_model_store_cost, vect_model_load_cost):
6389 (vect_analyze_stmt): Adjust prototype.
6390 (vectorizable_condition): Likewise.
6391 (vectorizable_live_operation): Likewise.
6392 (vectorizable_reduction): Likewise.
6393 (vectorizable_induction): Likewise.
6394 * tree-vect-loop.c (vect_analyze_loop_operations): Create local
6395 cost vector to pass to vectorizable_ and record afterwards.
6396 (vect_model_reduction_cost): Take cost vector argument and adjust.
6397 (vect_model_induction_cost): Likewise.
6398 (vectorizable_reduction): Likewise.
6399 (vectorizable_induction): Likewise.
6400 (vectorizable_live_operation): Likewise.
6401 * tree-vect-slp.c (vect_create_new_slp_node): Initialize
6402 SLP_TREE_NUMBER_OF_VEC_STMTS.
6403 (vect_analyze_slp_cost_1): Remove.
6404 (vect_analyze_slp_cost): Likewise.
6405 (vect_slp_analyze_node_operations): Take visited args and
6406 a target cost vector. Avoid processing already visited stmt sets.
6407 (vect_slp_analyze_operations): Use a local cost vector to gather
6408 costs and register those of non-discarded instances.
6409 (vect_bb_vectorization_profitable_p): Use add_stmt_costs.
6410 (vect_schedule_slp_instance): Remove copying of
6411 SLP_TREE_NUMBER_OF_VEC_STMTS. Instead assert that it is not
6413 * tree-vect-stmts.c (record_stmt_cost): Remove path directly
6414 adding cost. Record cost entry location.
6415 (vect_prologue_cost_for_slp_op): Function to compute cost of
6416 a constant or invariant generated for SLP vect in the prologue,
6417 split out from vect_analyze_slp_cost_1.
6418 (vect_model_simple_cost): Make static. Adjust for SLP costing.
6419 (vect_model_promotion_demotion_cost): Likewise.
6420 (vect_model_store_cost): Likewise, make static.
6421 (vect_model_load_cost): Likewise.
6422 (vectorizable_bswap): Add cost vector arg and adjust.
6423 (vectorizable_call): Likewise.
6424 (vectorizable_simd_clone_call): Likewise.
6425 (vectorizable_conversion): Likewise.
6426 (vectorizable_assignment): Likewise.
6427 (vectorizable_shift): Likewise.
6428 (vectorizable_operation): Likewise.
6429 (vectorizable_store): Likewise.
6430 (vectorizable_load): Likewise.
6431 (vectorizable_condition): Likewise.
6432 (vectorizable_comparison): Likewise.
6433 (can_vectorize_live_stmts): Likewise.
6434 (vect_analyze_stmt): Likewise.
6435 (vect_transform_stmt): Adjust calls to vectorizable_*.
6436 * tree-vectorizer.c: Include gimple-pretty-print.h.
6437 (dump_stmt_cost): New function.
6439 2018-05-16 Richard Biener <rguenther@suse.de>
6441 * params.def (PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE): New param.
6442 * doc/invoke.texi (dse-max-alias-queries-per-store): Document.
6443 * tree-ssa-dse.c: Include tree-ssa-loop.h.
6444 (check_name): New callback.
6445 (dse_classify_store): Track cycles via a visited bitmap of PHI
6446 defs and simplify handling of in-loop and across loop dead stores
6447 and properly fail for loop-variant refs. Handle byte-tracking with
6448 multiple defs. Use PARAM_DSE_MAX_ALIAS_QUERIES_PER_STORE for
6451 2018-05-16 Richard Sandiford <richard.sandiford@linaro.org>
6453 * tree-vectorizer.h (vect_get_vector_types_for_stmt): Declare.
6454 (vect_get_mask_type_for_stmt): Likewise.
6455 * tree-vect-slp.c (vect_two_operations_perm_ok_p): New function,
6457 (vect_build_slp_tree_1): ...here. Use vect_get_vector_types_for_stmt
6458 to determine the statement's vector type and the vector type that
6459 should be used for calculating nunits. Deal with cases in which
6460 the type has to be deferred.
6461 (vect_slp_analyze_node_operations): Use vect_get_vector_types_for_stmt
6462 and vect_get_mask_type_for_stmt to calculate STMT_VINFO_VECTYPE.
6463 * tree-vect-loop.c (vect_determine_vf_for_stmt_1)
6464 (vect_determine_vf_for_stmt): New functions, split out from...
6465 (vect_determine_vectorization_factor): ...here.
6466 * tree-vect-stmts.c (vect_get_vector_types_for_stmt)
6467 (vect_get_mask_type_for_stmt): New functions, split out from
6468 vect_determine_vectorization_factor.
6470 2018-05-16 Richard Biener <rguenther@suse.de>
6472 * tree-cfg.c (verify_gimple_assign_ternary): Properly
6473 verify the [VEC_]COND_EXPR embedded comparison.
6475 2018-05-15 Martin Sebor <msebor@redhat.com>
6477 PR tree-optimization/85753
6478 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Handle
6479 RECORD_TYPE in addition to ARRAY_TYPE.
6481 2018-05-15 Martin Sebor <msebor@redhat.com>
6484 * calls.c (get_attr_nonstring_decl): Handle MEM_REF.
6486 2018-05-15 Richard Biener <rguenther@suse.de>
6488 * tree-ssa-dse.c (dse_classify_store): Remove use_stmt parameter,
6489 add by_clobber_p one. Change algorithm to collect all defs
6490 representing uses we need to walk and try reducing them to
6491 a single one before failing.
6492 (dse_dom_walker::dse_optimize_stmt): Adjust.
6494 2018-05-13 Mark Wielaard <mark@klomp.org>
6496 * dwarf2out.c (dwarf_OP): Handle DW_OP_addrx and DW_OP_constx.
6497 (size_of_loc_descr): Likewise.
6498 (output_loc_operands): Likewise.
6499 (output_loc_operands_raw): Likewise.
6500 (dw_addr_op): Use dwarf_OP () for DW_OP_constx and DW_OP_addrx.
6501 (resolve_addr_in_expr): Handle DW_OP_addrx and DW_OP_constx.
6502 (hash_loc_operands): Likewise.
6503 (compare_loc_operands): Likewise.
6505 2018-05-14 Mark Wielaard <mark@klomp.org>
6507 * dwarf2out.c (count_index_addrs): New function.
6508 (dwarf2out_finish): Use count_index_addrs to calculate addrs_length.
6510 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6512 PR tree-optimization/83648
6513 * ipa-pure-const.c (malloc_candidate_p): Allow function with NULL
6514 return value as malloc candidate.
6516 2018-05-15 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
6519 * ipa-pure-const.c (warn_function_malloc): Pass value of known_finite
6520 param as true in call to suggest_attribute.
6522 2018-05-14 Segher Boessenkool <segher@kernel.crashing.org>
6524 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete @itemx for
6525 -mreadonly-in-sdata.
6527 2018-05-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
6529 * config/aarch64/aarch64-simd.md (*aarch64_crypto_aese_fused):
6531 (aarch64_crypto_aesd_fused): Likewise.
6533 2018-05-14 Wilco Dijkstra <wdijkstr@arm.com>
6535 * config/aarch64/aarch64.md (mov<mode>): Remove '*' in alternatives.
6536 (movsi_aarch64): Likewise.
6537 (load_pairsi): Likewise.
6538 (load_pairdi): Likewise.
6539 (store_pairsi): Likewise.
6540 (store_pairdi): Likewise.
6541 (load_pairsf): Likewise.
6542 (load_pairdf): Likewise.
6543 (store_pairsf): Likewise.
6544 (store_pairdf): Likewise.
6545 (zero_extend): Likewise.
6546 (trunc): Swap alternatives.
6547 (fcvt_target): Add '?' to prefer w over r.
6549 2018-05-14 Jakub Jelinek <jakub@redhat.com>
6552 * config/i386/i386.md: Disallow non-commutative arithmetics in
6553 last twpeephole for mem {+,-,&,|,^}= x; mem != 0 after cmpelim
6554 optimization. Use COMMUTATIVE_ARITH_P test rather than != MINUS
6555 in the peephole2 before it.
6557 2018-05-14 Sebastian Peryt <sebastian.peryt@intel.com>
6559 * common/config/i386/i386-common.c (OPTION_MASK_ISA_CLDEMOTE_SET,
6560 OPTION_MASK_ISA_CLDEMOTE_UNSET): New defines.
6561 (ix86_handle_option): Handle -mcldemote.
6562 * config.gcc: New header.
6563 * config/i386/cldemoteintrin.h: New file.
6564 * config/i386/cpuid.h (bit_CLDEMOTE): New bit.
6565 * config/i386/driver-i386.c (host_detect_local_cpu): Detect
6567 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6568 OPTION_MASK_ISA_CLDEMOTE.
6569 * config/i386/i386.c (ix86_target_string): Add -mcldemote.
6570 (ix86_valid_target_attribute_inner_p): Ditto.
6571 (enum ix86_builtins): Add IX86_BUILTIN_CLDEMOTE.
6572 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_cldemote.
6573 (ix86_expand_builtin): Expand IX86_BUILTIN_CLDEMOTE.
6574 * config/i386/i386.h (TARGET_CLDEMOTE, TARGET_CLDEMOTE_P): New.
6575 * config/i386/i386.md (UNSPECV_CLDEMOTE): New.
6577 * config/i386/i386.opt: Add -mcldemote.
6578 * config/i386/x86intrin.h: New header.
6579 * doc/invoke.texi: Add -mcldemote.
6581 2018-05-14 Richard Biener <rguenther@suse.de>
6583 * doc/match-and-simplify.texi: Adjust :s documentation.
6585 2018-05-14 Alexander Monakov <amonakov@ispras.ru>
6587 * sort.cc (REORDER_23): Pass the type for the temporaries instead of
6588 intended memcpy size.
6589 (REORDER_45): Likewise.
6591 2018-05-13 Alexander Monakov <amonakov@ispras.ru>
6593 * sort.cc: New file.
6594 * system.h [!CHECKING_P] (qsort): Redirect to gcc_qsort.
6595 * vec.c (qsort_chk): Use gcc_qsort.
6596 * Makefile.in (OBJS-libcommon): Add sort.o.
6597 (build/sort.o): New target. Use it...
6598 (BUILD_RTL): ... here, and...
6599 (build/gencfn-macros): ... here, and...
6600 (build/genmatch): ... here.
6602 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
6603 Chung-Ju Wu <jasonwucj@gmail.com>
6605 * config.gcc (nds32*-*-*): Check that n15 is valid to --with-cpu.
6606 * config/nds32/nds32-graywolf.md: New file.
6607 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_GRAYWOLF.
6608 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n15
6610 * config/nds32/nds32-protos.h: More declarations for n15 pipeline.
6611 * config/nds32/nds32-utils.c: More implementations for n15 pipeline.
6612 * config/nds32/nds32.md (pipeline_model): Add graywolf.
6613 * config/nds32/nds32.opt (mcpu): Support n15 pipeline cpus.
6614 * config/nds32/pipelines.md: Include n15 settings.
6616 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
6617 Chung-Ju Wu <jasonwucj@gmail.com>
6619 * config.gcc (nds32*-*-*): Check that n12/n13 are valid to --with-cpu.
6620 * config/nds32/nds32-n13.md: New file.
6621 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N12 and CPU_N13.
6622 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n12/n13
6624 * config/nds32/nds32-protos.h: More declarations for n12/n13 pipeline.
6625 * config/nds32/nds32.md (pipeline_model): Add n13.
6626 * config/nds32/nds32.opt (mcpu): Support n12/n13 pipeline cpus.
6627 * config/nds32/pipelines.md: Include n13 settings.
6629 2018-05-13 Kito Cheng <kito.cheng@gmail.com>
6630 Chung-Ju Wu <jasonwucj@gmail.com>
6632 * config.gcc (nds32*-*-*): Check that n10/d10 are valid to --with-cpu.
6633 * config/nds32/nds32-n10.md: New file.
6634 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N10.
6635 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n10
6637 * config/nds32/nds32-protos.h: More declarations for n10 pipeline.
6638 * config/nds32/nds32-utils.c: More implementations for n10 pipeline.
6639 * config/nds32/nds32.md (pipeline_model): Add n10.
6640 * config/nds32/nds32.opt (mcpu): Support n10 pipeline cpus.
6641 * config/nds32/pipelines.md: Include n10 settings.
6643 2018-05-13 Monk Chiang <sh.chiang04@gmail.com>
6644 Kito Cheng <kito.cheng@gmail.com>
6645 Chung-Ju Wu <jasonwucj@gmail.com>
6647 * config.gcc (nds32be-*-*): Handle --with-ext-dsp.
6648 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
6649 Add enum values for DSP extension instructions.
6650 * config/nds32/constraints.md (Iu06, IU06, CVp5, CVs5, CVs2, CVhi):
6652 * config/nds32/iterators.md (shifts, shiftrt, sat_plus, all_plus,
6653 sat_minus, all_minus, plus_minus, extend, sumax, sumin, sumin_max):
6655 (su, zs, uk, opcode, add_rsub, add_sub): New code attributes.
6656 * config/nds32/nds32-dspext.md: New file for DSP implementation.
6657 * config/nds32/nds32-intrinsic.c: Implementation of DSP extension.
6658 * config/nds32/nds32-intrinsic.md: Likewise.
6659 * config/nds32/nds32_intrinsic.h: Likewise.
6660 * config/nds32/nds32-md-auxiliary.c: Likewise.
6661 * config/nds32/nds32-memory-manipulation.c: Consider DSP extension.
6662 * config/nds32/nds32-predicates.c (const_vector_to_hwint): New.
6663 (nds32_valid_CVp5_p, nds32_valid_CVs5_p): New.
6664 (nds32_valid_CVs2_p, nds32_valid_CVhi_p): New.
6665 * config/nds32/nds32-protos.h: New declarations for DSP extension.
6666 * config/nds32/nds32-utils.c (extract_mac_non_acc_rtx): New case
6667 TYPE_DMAC in switch statement.
6668 * config/nds32/nds32.c: New checking and implementation for DSP
6669 extension instructions.
6670 * config/nds32/nds32.h: Likewise.
6671 * config/nds32/nds32.md: Likewise.
6672 * config/nds32/nds32.opt (mhw-abs, mext-dsp): New options.
6673 * config/nds32/predicates.md: Implement new predicates for DSP
6676 2018-05-11 Michael Meissner <meissner@linux.vnet.ibm.com>
6678 * config/rs6000/rs6000.md (mov<mode>_softfloat, FMOVE32):
6679 Reformat alternatives and attributes so it is easier to identify
6680 which constraints/attributes go with which instruction.
6681 (mov<mode>_hardfloat32, FMOVE64): Likewise.
6682 (mov<mode>_softfloat32, FMOVE64): Likewise.
6683 (mov<mode>_hardfloat64, FMOVE64): Likewise.
6684 (mov<mode>_softfloat64, FMOVE64): Likewise.
6686 2018-05-11 Kelvin Nilsen <kelvin@gcc.gnu.org>
6688 * doc/extend.texi (PowerPC Built-in Functions): Rename this
6690 (Basic PowerPC Built-in Functions): The new name of the
6691 subsection previously known as "PowerPC Built-in Functions".
6692 (Basic PowerPC Built-in Functions Available on all Configurations):
6694 (Basic PowerPC Built-in Functions Available on ISA 2.05): Likewise.
6695 (Basic PowerPC Built-in Functions Available on ISA 2.06): Likewise.
6696 (Basic PowerPC Built-in Functions Available on ISA 2.07): Likewise.
6697 (Basic PowerPC Built-in Functions Available on ISA 3.0): Likewise.
6699 2018-05-11 Martin Jambor <mjambor@suse.cz>
6702 * ipa-cp.c (intersect_with_plats): Check that the lattice contains
6705 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
6708 * config/arm/arm-cpus.in (fgroup ARMv6m): Add be8 feature.
6710 2018-05-11 Sebastian Peryt <sebastian.peryt@intel.com>
6712 * common/config/i386/i386-common.c (OPTION_MASK_ISA_WAITPKG_SET,
6713 OPTION_MASK_ISA_WAITPKG_UNSET): New defines.
6714 (ix86_handle_option): Handle -mwaitpkg.
6715 * config.gcc: New header.
6716 * config/i386/cpuid.h (bit_WAITPKG): New bit.
6717 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mwaitpkg.
6718 * config/i386/i386-builtin-types.def ((UINT8, UNSIGNED, UINT64)): New
6720 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
6721 OPTION_MASK_ISA_WAITPKG.
6722 * config/i386/i386.c (ix86_target_string): Add -mwaitpkg.
6723 (ix86_option_override_internal): Add PTA_WAITPKG.
6724 (ix86_valid_target_attribute_inner_p): Add -mwaitpkg.
6725 (enum ix86_builtins): Add IX86_BUILTIN_UMONITOR, IX86_BUILTIN_UMWAIT,
6726 IX86_BUILTIN_TPAUSE.
6727 (ix86_init_mmx_sse_builtins): Define __builtin_ia32_umonitor,
6728 __builtin_ia32_umwait and __builtin_ia32_tpause.
6729 (ix86_expand_builtin): Expand IX86_BUILTIN_UMONITOR,
6730 IX86_BUILTIN_UMWAIT, IX86_BUILTIN_TPAUSE.
6731 * config/i386/i386.h (TARGET_WAITPKG, TARGET_WAITPKG_P): New.
6732 * config/i386/i386.md (UNSPECV_UMWAIT, UNSPECV_UMONITOR,
6733 UNSPECV_TPAUSE): New.
6734 (umwait, umwait_rex64, umonitor_<mode>, tpause, tpause_rex64): New.
6735 * config/i386/i386.opt: Add -mwaitpkg.
6736 * config/i386/waitpkgintrin.h: New file.
6737 * config/i386/x86intrin.h: New header.
6738 * doc/invoke.texi: Add -mwaitpkg.
6740 2018-05-11 Richard Earnshaw <rearnsha@arm.com>
6743 * config/arm/arm-cpus.in: Add comment that ARMv6-m and ARMv6S-m are now
6745 (cortex-m0): Use armv6s-m isa.
6746 (cortex-m0plus): Likewise.
6747 (cortex-m1): Likewise.
6748 (cortex-m0.small-multiply): Likewise.
6749 (cortex-m0plus.small-multiply): Likewise.
6750 (cortex-m1.small-multiply): Likewise.
6752 2018-05-11 Allan Sandfeld Jensen <allan.jensen@qt.io>
6753 Jakub Jelinek <jakub@redhat.com>
6755 PR tree-optimization/85692
6756 * tree-ssa-forwprop.c (simplify_vector_constructor): Try two
6757 source permute as well.
6759 2018-05-11 Martin Liska <mliska@suse.cz>
6762 * doc/extend.texi: Document LLVM style format for no_sanitize
6765 2018-05-10 Michael Meissner <meissner@linux.vnet.ibm.com>
6767 * config/rs6000/rs6000.c (mode_supports_dq_form): Rename
6768 mode_supports_vsx_dform_quad to mode_supports_dq_form.
6769 (mode_supports_vsx_dform_quad): Likewise.
6770 (mode_supports_vmx_dform): Move these functions to be next to the
6771 other mode_supports functions.
6772 (mode_supports_dq_form): Likewise.
6773 (quad_address_p): Change calls of mode_supports_vsx_dform_quad to
6774 mode_supports_dq_form.
6775 (reg_offset_addressing_ok_p): Likewise.
6776 (offsettable_ok_by_alignment): Likewise.
6777 (rs6000_legitimate_offset_address_p): Likewise.
6778 (legitimate_lo_sum_address_p): Likewise.
6779 (rs6000_legitimize_address): Likewise.
6780 (rs6000_legitimize_reload_address): Likewise.
6781 (rs6000_secondary_reload_inner): Likewise.
6782 (rs6000_preferred_reload_class): Likewise.
6783 (rs6000_output_move_128bit): Likewise.
6785 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
6787 * config/i386/i386.c (ix86_expand_builtin) <case IX86_BUILTIN_RDPID>:
6788 Generate SImode target register for null target.
6789 <case IX86_BUILTIN_XGETBV>: Ditto.
6790 <case IX86_BUILTIN_XSETBV>: Optimize LSHIFTRT generation.
6791 * config/i386/xsaveintrin.h (_xgetbv): Add missing return.
6793 2018-05-10 Carl Love <cel@us.ibm.com>
6795 * config/rs6000/rs6000.md (prefetch): Generate ISA 2.06 instructions
6796 dcbtt and dcbtstt if operands[2] is 0.
6798 2018-05-10 Uros Bizjak <ubizjak@gmail.com>
6801 * config/i386/sse.md (usadv64qi): New expander.
6803 2018-05-10 Segher Boessenkool <segher@kernel.crashing.org>
6805 * config/rs6000/altivec.md (altivec_vmrghb, altivec_vmrghh,
6806 altivec_vmrghw, altivec_vmrglb, altivec_vmrglh, altivec_vmrglw): Remove
6807 -maltivec=be support.
6808 (vec_widen_umult_even_v16qi, vec_widen_smult_even_v16qi,
6809 vec_widen_umult_even_v8hi, vec_widen_smult_even_v8hi,
6810 vec_widen_umult_even_v4si, vec_widen_smult_even_v4si,
6811 vec_widen_umult_odd_v16qi, vec_widen_smult_odd_v16qi,
6812 vec_widen_umult_odd_v8hi, vec_widen_smult_odd_v8hi,
6813 vec_widen_umult_odd_v4si, vec_widen_smult_odd_v4si, altivec_vpkpx,
6814 altivec_vpks<VI_char>ss, altivec_vpks<VI_char>us,
6815 altivec_vpku<VI_char>us, altivec_vpku<VI_char>um, altivec_vsum2sws,
6816 altivec_vsumsws): Adjust.
6817 (altivec_vspltb *altivec_vspltb_internal, altivec_vsplth,
6818 *altivec_vsplth_internal, altivec_vspltw, *altivec_vspltw_internal,
6819 altivec_vspltsf, *altivec_vspltsf_internal): Remove -maltivec=be
6821 (altivec_vperm_<mode>, altivec_vperm_<mode>_uns,
6822 altivec_vupkhs<VU_char>, altivec_vupkls<VU_char>, altivec_vupkhpx,
6823 altivec_vupklpx, altivec_lvsl, altivec_lvsr): Adjust.
6824 (altivec_lve<VI_char>x): Delete expand.
6825 (*altivec_lve<VI_char>x_internal): Rename to...
6826 (altivec_lve<VI_char>x): ... this.
6827 (altivec_lvxl_<mode>): Delete expand.
6828 (*altivec_lvxl_<mode>_internal): Rename to ...
6829 (altivec_lvxl_<mode>): ... this.
6830 (altivec_stvxl_<mode>): Delete expand.
6831 (*altivec_stvxl_<mode>_internal): Rename to ...
6832 (altivec_stvxl_<mode>): ... this.
6833 (altivec_stve<VI_char>x): Delete expand.
6834 (*altivec_stve<VI_char>x_internal): Rename to ...
6835 (altivec_stve<VI_char>x): ... this.
6836 (doublee<mode>2, unsdoubleev4si2, doubleo<mode>2, unsdoubleov4si2,
6837 doubleh<mode>2, unsdoublehv4si2, doublel<mode>2, unsdoublelv4si2,
6838 reduc_plus_scal_<mode>): Adjust.
6839 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Adjust
6841 (rs6000_cpu_cpp_builtins): Adjust.
6842 (altivec_resolve_overloaded_builtin): Remove -maltivec=be support.
6843 * config/rs6000/rs6000-protos.h (altivec_expand_lvx_be,
6844 altivec_expand_stvx_be, altivec_expand_stvex_be): Delete.
6845 * config/rs6000/rs6000.c (rs6000_option_override_internal): Remove
6846 -maltivec=be support.
6847 (rs6000_split_vec_extract_var): Adjust.
6848 (rs6000_split_v4si_init): Adjust.
6849 (swap_selector_for_mode): Delete.
6850 (altivec_expand_lvx_be, altivec_expand_stvx_be,
6851 altivec_expand_stvex_be): Delete.
6852 (altivec_expand_lv_builtin, altivec_expand_stv_builtin): Remove
6853 -maltivec=be support.
6854 (rs6000_gimple_fold_builtin): Ditto.
6855 (rs6000_generate_float2_double_code, rs6000_generate_float2_code):
6857 * config/rs6000/rs6000.h (VECTOR_ELT_ORDER_BIG): Delete.
6858 (TARGET_DIRECT_MOVE_64BIT): Adjust.
6859 * config/rs6000/rs6000.md (split for extendsidi2 for vectors): Adjust.
6860 * config/rs6000/rs6000.opt (maltivec=le, maltivec=be): Delete.
6861 * config/rs6000/vsx.md (floate<mode>, unsfloatev2di, floato<mode>,
6862 unsfloatov2di, vsignedo_v2df, vsignede_v2df, vunsignedo_v2df,
6863 vunsignede_v2df, vsx_extract_<mode>_p9, *vsx_extract_si,
6864 *vsx_extract_<mode>_p8, *vsx_extract_si_<uns>float_df,
6865 *vsx_extract_si_<uns>float_<mode>, vsx_set_<mode>_p9, vsx_set_v4sf_p9,
6866 *vsx_insert_extract_v4sf_p9, *vsx_insert_extract_v4sf_p9_2, and an
6867 anonymous split): Adjust.
6868 (vsx_mergel_<mode>, vsx_mergeh_<mode>): Remove -maltivec=be support.
6869 (vsx_xxspltd_<mode>, extract4b, insert4b): Adjust.
6871 2018-05-10 Eric Botcazou <ebotcazou@adacore.com>
6873 * configure.ac (gcc_gxx_include_dir_add_sysroot): Set it to 1 only
6874 when --with-gxx-include-dir is also specified.
6875 * configure: Regenerate.
6877 2018-05-09 Jim Wilson <jimw@sifive.com>
6880 * config.gcc (riscv*-*-*): Handle --with-multilib-list.
6881 * config/riscv/t-withmultilib: New.
6882 * config/riscv/withmultilib.h: New.
6883 * doc/install.texi: Document RISC-V --with-multilib-list support.
6885 2018-05-09 Richard Biener <rguenther@suse.de>
6887 * tree-vect-slp.c (vect_bb_slp_scalar_cost): Fill a cost
6889 (vect_bb_vectorization_profitable_p): Adjust. Compute
6890 actual scalar cost using the cost vector and the add_stmt_cost
6893 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
6895 PR rtl-optimization/85645
6896 * config/rs6000/rs6000.c (rs6000_emit_prologue_components): Put a SET
6897 in the REG_CFA_REGISTER note for LR, don't leave it empty.
6899 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
6901 PR rtl-optimization/85645
6902 * shrink-wrap.c (spread_components): Return a boolean saying if
6903 anything was changed.
6904 (try_shrink_wrapping_separate): Iterate spread_components until
6905 nothing changes anymore.
6907 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
6909 PR rtl-optimization/85645
6910 * regrename.c (build_def_use): Also kill the chains that include the
6911 destination of a REG_CFA_REGISTER note.
6913 2018-05-09 Segher Boessenkool <segher@kernel.crashing.org>
6915 PR rtl-optimization/85645
6916 * regcprop.c (copyprop_hardreg_forward_1): Don't propagate into an
6917 insn that has a REG_CFA_REGISTER note.
6919 2018-05-09 Richard Sandiford <richard.sandiford@linaro.org>
6921 * cfgexpand.c (expand_clobber): New function.
6922 (expand_gimple_stmt_1): Use it.
6923 * tree-vect-stmts.c (vect_clobber_variable): New function,
6925 (vectorizable_simd_clone_call): ...here.
6926 (vectorizable_store): Emit a clobber either side of an
6927 IFN_STORE_LANES sequence.
6928 (vectorizable_load): Emit a clobber after an IFN_LOAD_LANES sequence.
6930 2018-05-09 Tom de Vries <tom@codesourcery.com>
6933 * config/nvptx/nvptx.md (define_insn "trap", define_insn "trap_if_true")
6934 (define_insn "trap_if_false"): Add exit after trap.
6936 2018-05-09 Eric Botcazou <ebotcazou@adacore.com>
6938 PR rtl-optimization/85638
6939 * bb-reorder.c: Include common/common-target.h.
6940 (create_forwarder_block): New function extracted from...
6941 (fix_up_crossing_landing_pad): ...here. Rename into...
6942 (dw2_fix_up_crossing_landing_pad): ...this.
6943 (sjlj_fix_up_crossing_landing_pad): New function.
6944 (find_rarely_executed_basic_blocks_and_crossing_edges): In SJLJ mode,
6945 call sjlj_fix_up_crossing_landing_pad if there are incoming EH edges
6946 from both partitions and exit the loop after one iteration.
6948 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
6951 * doc/extend.texi (PowerPC Built-in Functions): Rename this
6953 (Basic PowerPC Built-in Functions): The new name of the
6954 subsection previously known as "PowerPC Built-in Functions".
6955 (Basic PowerPC Built-in Functions Available on all Configurations):
6957 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
6959 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
6961 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
6963 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
6966 2018-05-08 Jim Wilson <jimw@sifive.com>
6968 * config/riscv/linux.h (MUSL_ABI_SUFFIX): Delete unnecessary backslash.
6969 (LD_EMUL_SUFFIX): New.
6970 (LINK_SPEC): Use it.
6972 2018-05-08 Kelvin Nilsen <kelvin@gcc.gnu.org>
6974 * doc/extend.texi (PowerPC Built-in Functions): Rename this
6976 (Basic PowerPC Built-in Functions): The new name of the
6977 subsection previously known as "PowerPC Built-in Functions".
6978 (Basic PowerPC Built-in Functions Available on all Configurations):
6980 (Basic PowerPC Built-in Functions Available on ISA 2.05): New
6982 (Basic PowerPC Built-in Functions Available on ISA 2.06): New
6984 (Basic PowerPC Built-in Functions Available on ISA 2.07): New
6986 (Basic PowerPC Built-in Functions Available on ISA 3.0): New
6989 2018-05-08 Jakub Jelinek <jakub@redhat.com>
6992 * config/i386/i386.md: Add peepholes for mem {+,-,&,|,^}= x; mem != 0
6993 after cmpelim optimization.
6995 2018-05-08 Olga Makhotina <olga.makhotina@intel.com>
6997 * config.gcc: Support "goldmont".
6998 * config/i386/driver-i386.c (host_detect_local_cpu): Detect "goldmont".
6999 * config/i386/i386-c.c (ix86_target_macros_internal): Handle
7001 * config/i386/i386.c (m_GOLDMONT): Define.
7002 (processor_target_table): Add "goldmont".
7003 (PTA_GOLDMONT): Define.
7004 (ix86_lea_outperforms): Add TARGET_GOLDMONT.
7005 (get_builtin_code_for_version): Handle PROCESSOR_GOLDMONT.
7006 (fold_builtin_cpu): Add M_INTEL_GOLDMONT.
7007 (fold_builtin_cpu): Add "goldmont".
7008 (ix86_add_stmt_cost): Add TARGET_GOLDMONT.
7009 (ix86_option_override_internal): Add "goldmont".
7010 * config/i386/i386.h (processor_costs): Define TARGET_GOLDMONT.
7011 (processor_type): Add PROCESSOR_GOLDMONT.
7012 * config/i386/i386.md: Add CPU "glm".
7013 * config/i386/glm.md: New file.
7014 * config/i386/x86-tune.def: Add m_GOLDMONT.
7015 * doc/invoke.texi: Add goldmont as x86 -march=/-mtune= CPU type.
7017 2018-05-08 Jakub Jelinek <jakub@redhat.com>
7020 * config/i386/i386.c (ix86_expand_sse2_abs): Handle E_V2DImode and
7022 * config/i386/sse.md (abs<mode>2): Use VI_AVX2 iterator instead of
7023 VI1248_AVX512VL_AVX512BW. Handle V2DImode and V4DImode if not
7024 TARGET_AVX512VL using ix86_expand_sse2_abs. Formatting fixes.
7027 * config/i386/i386.c (ix86_fold_builtin): Handle
7028 IX86_BUILTIN_{,P}MOVMSK{PS,PD,B}{,128,256}.
7031 * config/i386/sse.md (ssequaterinsnmode): New mode attribute.
7032 (*<extract_type>_vinsert<shuffletype><extract_suf>_0): New pattern.
7034 2018-05-08 Richard Earnshaw <rearnsha@arm.com>
7037 * config/arm/parsecpu.awk (check_cpu): Fix operator precedence.
7038 (check_arch): Likewise.
7039 (check_fpu): Return the result rather than printing it.
7040 (end arch): Fix operator precedence.
7041 (end cpu): Likewise.
7042 (END): Print the result from check_fpu.
7044 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
7045 Alan Hayward <alan.hayward@arm.com>
7046 David Sherwood <david.sherwood@arm.com>
7048 * config/aarch64/aarch64-sve.md (*pred_cmp<cmp_op><mode>_combine)
7049 (*pred_cmp<cmp_op><mode>, *fcm<cmp_op><mode>_and_combine)
7050 (*fcmuo<mode>_and_combine, *fcm<cmp_op><mode>_and)
7051 (*fcmuo<mode>_and): New patterns.
7053 2018-05-08 Richard Sandiford <richard.sandiford@linaro.org>
7055 * config/aarch64/iterators.md (UNSPEC_COND_LO, UNSPEC_COND_LS)
7056 (UNSPEC_COND_HI, UNSPEC_COND_HS, UNSPEC_COND_UO): Delete.
7057 (SVE_INT_CMP, SVE_FP_CMP): New code iterators.
7058 (cmp_op, sve_imm_con): New code attributes.
7059 (SVE_COND_INT_CMP, imm_con): Delete.
7060 (cmp_op): Remove above unspecs from int attribute.
7061 * config/aarch64/aarch64-sve.md (*vec_cmp<cmp_op>_<mode>): Rename
7063 (*cmp<cmp_op><mode>): ...this. Use UNSPEC_MERGE_PTRUE instead of
7064 comparison-specific unspecs.
7065 (*vec_cmp<cmp_op>_<mode>_ptest): Rename to...
7066 (*cmp<cmp_op><mode>_ptest): ...this and adjust likewise.
7067 (*vec_cmp<cmp_op>_<mode>_cc): Rename to...
7068 (*cmp<cmp_op><mode>_cc): ...this and adjust likewise.
7069 (*vec_fcm<cmp_op><mode>): Rename to...
7070 (*fcm<cmp_op><mode>): ...this and adjust likewise.
7071 (*vec_fcmuo<mode>): Rename to...
7072 (*fcmuo<mode>): ...this and adjust likewise.
7073 (*pred_fcm<cmp_op><mode>): New pattern.
7074 * config/aarch64/aarch64.c (aarch64_emit_unop, aarch64_emit_binop)
7075 (aarch64_emit_sve_ptrue_op, aarch64_emit_sve_ptrue_op_cc): New
7077 (aarch64_unspec_cond_code): Remove handling of LTU, GTU, LEU, GEU
7079 (aarch64_gen_unspec_cond, aarch64_emit_unspec_cond): Delete.
7080 (aarch64_emit_sve_predicated_cond): New function.
7081 (aarch64_expand_sve_vec_cmp_int): Use aarch64_emit_sve_ptrue_op_cc.
7082 (aarch64_emit_unspec_cond_or): Replace with...
7083 (aarch64_emit_sve_or_conds): ...this new function. Use
7084 aarch64_emit_sve_ptrue_op for the individual comparisons and
7085 aarch64_emit_binop to OR them together.
7086 (aarch64_emit_inverted_unspec_cond): Replace with...
7087 (aarch64_emit_sve_inverted_cond): ...this new function. Use
7088 aarch64_emit_sve_ptrue_op for the comparison and
7089 aarch64_emit_unop to invert the result.
7090 (aarch64_expand_sve_vec_cmp_float): Update after the above
7091 changes. Use aarch64_emit_sve_ptrue_op for native comparisons.
7093 2018-05-07 Nathan Sidwell <nathan@acm.org>
7095 * doc/invoke.texi (C++ Dialect Options): Remove -ffor-scope.
7096 * doc/extend.texi (Deprecated Features): Remove -fno-for-scope
7097 (Backwards Compatibility): Likewise.
7099 2018-05-07 Luis Machado <luis.machado@linaro.org>
7103 2018-05-07 Luis Machado <luis.machado@linaro.org>
7105 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7106 <prefetch_dynamic_strides>: New const bool field.
7107 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7108 prefetch_dynamic_strides.
7109 (exynosm1_prefetch_tune): Likewise.
7110 (thunderxt88_prefetch_tune): Likewise.
7111 (thunderx_prefetch_tune): Likewise.
7112 (thunderx2t99_prefetch_tune): Likewise.
7113 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7115 (aarch64_override_options_internal): Update to set
7116 PARAM_PREFETCH_DYNAMIC_STRIDES.
7117 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7118 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7119 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7120 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7121 prefetch-dynamic-strides setting.
7123 2018-05-07 Luis Machado <luis.machado@linaro.org>
7125 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7126 <minimum_stride>: New const int field.
7127 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7128 minimum_stride field.
7129 (exynosm1_prefetch_tune): Likewise.
7130 (thunderxt88_prefetch_tune): Likewise.
7131 (thunderx_prefetch_tune): Likewise.
7132 (thunderx2t99_prefetch_tune): Likewise.
7133 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7134 (aarch64_override_options_internal): Update to set
7135 PARAM_PREFETCH_MINIMUM_STRIDE.
7136 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7137 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7138 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7139 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7140 stride is constant and is below the minimum stride threshold.
7142 2018-05-07 Luis Machado <luis.machado@linaro.org>
7144 * config/aarch64/aarch64.c (qdf24xx_prefetch_tune) <l2_cache_size>: Set
7147 2018-05-07 Luis Machado <luis.machado@linaro.org>
7149 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7150 <prefetch_dynamic_strides>: New const bool field.
7151 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7152 prefetch_dynamic_strides.
7153 (exynosm1_prefetch_tune): Likewise.
7154 (thunderxt88_prefetch_tune): Likewise.
7155 (thunderx_prefetch_tune): Likewise.
7156 (thunderx2t99_prefetch_tune): Likewise.
7157 (qdf24xx_prefetch_tune): Likewise. Set prefetch_dynamic_strides
7159 (aarch64_override_options_internal): Update to set
7160 PARAM_PREFETCH_DYNAMIC_STRIDES.
7161 * doc/invoke.texi (prefetch-dynamic-strides): Document new option.
7162 * params.def (PARAM_PREFETCH_DYNAMIC_STRIDES): New.
7163 * params.h (PARAM_PREFETCH_DYNAMIC_STRIDES): Define.
7164 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Account for
7165 prefetch-dynamic-strides setting.
7167 2018-05-07 Luis Machado <luis.machado@linaro.org>
7169 * config/aarch64/aarch64-protos.h (cpu_prefetch_tune)
7170 <minimum_stride>: New const int field.
7171 * config/aarch64/aarch64.c (generic_prefetch_tune): Update to include
7172 minimum_stride field.
7173 (exynosm1_prefetch_tune): Likewise.
7174 (thunderxt88_prefetch_tune): Likewise.
7175 (thunderx_prefetch_tune): Likewise.
7176 (thunderx2t99_prefetch_tune): Likewise.
7177 (qdf24xx_prefetch_tune): Likewise. Set minimum_stride to 2048.
7178 (aarch64_override_options_internal): Update to set
7179 PARAM_PREFETCH_MINIMUM_STRIDE.
7180 * doc/invoke.texi (prefetch-minimum-stride): Document new option.
7181 * params.def (PARAM_PREFETCH_MINIMUM_STRIDE): New.
7182 * params.h (PARAM_PREFETCH_MINIMUM_STRIDE): Define.
7183 * tree-ssa-loop-prefetch.c (should_issue_prefetch_p): Return false if
7184 stride is constant and is below the minimum stride threshold.
7186 2018-05-06 Jakub Jelinek <jakub@redhat.com>
7189 * cfgexpand.c (expand_asm_stmt): Don't create a temporary if
7190 the type is addressable. Don't force op into register if it has
7193 2018-05-05 Roland McGrath <mcgrathr@google.com>
7196 * varasm.c (default_section_type_flags): Set SECTION_NOTYPE for
7197 any section for which we don't know a specific type it should have,
7198 regardless of name. Previously this was done only for the exact
7199 names ".init_array", ".fini_array", and ".preinit_array".
7200 (default_elf_asm_named_section): Add comment about
7201 relationship with default_section_type_flags and SECTION_NOTYPE.
7202 (get_section): Don't consider it a type conflict if one side has
7203 SECTION_NOTYPE and the other doesn't, as long as neither has the
7204 SECTION_BSS et al used in the default_section_type_flags logic.
7206 2018-05-05 Tom de Vries <tom@codesourcery.com>
7209 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_3): Define.
7210 (workaround_barsyncs): New function.
7211 (nvptx_reorg): Use workaround_barsyncs.
7212 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
7213 (define_expand "nvptx_membar_cta"): New define_expand.
7214 (define_insn "*nvptx_membar_cta"): New insn.
7216 2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
7218 * brig-builtins.def: Add consts to ptrs etc. in BRIG builtin defs.
7219 To improve optimization opportunities.
7220 * builtin-types.def: The new needed builtin types for the above.
7222 2018-05-04 Richard Biener <rguenther@suse.de>
7224 * bb-reorder.c (sanitize_hot_paths): Release hot_bbs_to_check.
7225 * gimple-ssa-store-merging.c
7226 (imm_store_chain_info::output_merged_store): Remove redundant create,
7227 release split_store vector contents on failure.
7228 * tree-vect-slp.c (vect_schedule_slp_instance): Avoid leaking
7229 scalar stmt vector on cache hit.
7231 2018-05-04 Segher Boessenkool <segher@kernel.crashing.org>
7233 * common/config/rs6000/rs6000-common.c (rs6000_handle_option): Remove
7235 * config.gcc (powerpc-xilinx-eabi*): Remove.
7236 * config/rs6000/predicates.md (easy_fp_constant): Remove Xilinx FP
7238 (fusion_addis_mem_combo_load): Ditto.
7239 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Remove Xilinx
7241 (rs6000_cpu_cpp_builtins): Ditto.
7242 * config/rs6000/rs6000-linux.c
7243 (rs6000_linux_float_exceptions_rounding_supported_p): Ditto.
7244 * config/rs6000/rs6000-opts.h (enum fpu_type_t): Delete.
7245 * config/rs6000/rs6000.c (rs6000_debug_reg_global): Remove Xilinx FP
7247 (rs6000_setup_reg_addr_masks): Ditto.
7248 (rs6000_init_hard_regno_mode_ok): Ditto.
7249 (rs6000_option_override_internal): Ditto.
7250 (legitimate_lo_sum_address_p): Ditto.
7251 (rs6000_legitimize_address): Ditto.
7252 (rs6000_legitimize_reload_address): Ditto.
7253 (rs6000_legitimate_address_p): Ditto.
7254 (abi_v4_pass_in_fpr): Ditto.
7255 (setup_incoming_varargs): Ditto.
7256 (rs6000_gimplify_va_arg): Ditto.
7257 (rs6000_split_multireg_move): Ditto.
7258 (rs6000_savres_strategy): Ditto.
7259 (rs6000_emit_prologue_components): Ditto.
7260 (rs6000_emit_epilogue_components): Ditto.
7261 (rs6000_emit_prologue): Ditto.
7262 (rs6000_emit_epilogue): Ditto.
7263 (rs6000_elf_file_end): Ditto.
7264 (rs6000_function_value): Ditto.
7265 (rs6000_libcall_value): Ditto.
7266 * config/rs6000/rs6000.h: Ditto.
7267 (TARGET_MINMAX_SF, TARGET_MINMAX_DF): Delete, merge to ...
7268 (TARGET_MINMAX): ... this. New.
7269 (TARGET_SF_FPR, TARGET_DF_FPR, TARGET_SF_INSN, TARGET_DF_INSN): Delete.
7270 * config/rs6000/rs6000.md: Remove Xilinx FP support.
7271 (*movsi_internal1_single): Delete.
7272 * config/rs6000/rs6000.opt (msingle-float, mdouble-float, msimple-fpu,
7273 mfpu=, mxilinx-fpu): Delete.
7274 * config/rs6000/singlefp.h: Delete.
7275 * config/rs6000/sysv4.h: Remove Xilinx FP support.
7276 * config/rs6000/t-rs6000: Ditto.
7277 * config/rs6000/t-xilinx: Delete.
7278 * gcc/config/rs6000/titan.md: Adjust for fp_type removal.
7279 * gcc/config/rs6000/vsx.md: Remove Xilinx FP support.
7280 (VStype_simple): Delete.
7281 (VSfptype_simple, VSfptype_mul, VSfptype_div, VSfptype_sqrt): Delete.
7282 * config/rs6000/xfpu.h: Delete.
7283 * config/rs6000/xfpu.md: Delete.
7284 * config/rs6000/xilinx.h: Delete.
7285 * config/rs6000/xilinx.opt: Delete.
7286 * gcc/doc/invoke.texi (RS/6000 and PowerPC Options): Remove
7287 -msingle-float, -mdouble-float, -msimple-fpu, -mfpu=, and -mxilinx-fpu.
7289 2018-05-04 Tom de Vries <tom@codesourcery.com>
7292 * builtins.c (expand_builtin_goacc_parlevel_id_size): Handle null target
7295 2018-05-04 Richard Biener <rguenther@suse.de>
7298 * tree-complex.c (update_complex_assignment): We are always in SSA form.
7299 (expand_complex_div_wide): Likewise.
7300 (expand_complex_operations_1): Likewise.
7301 (expand_complex_libcall): Preserve EH info of the original stmt.
7302 (tree_lower_complex): Handle removed blocks.
7303 * tree.c (build_common_builtin_nodes): Do not set ECF_NOTRHOW
7304 on complex multiplication and division libcall builtins.
7306 2018-05-04 Richard Biener <rguenther@suse.de>
7309 * fold-const.c (negate_expr_p): Restrict negation of operand
7310 zero of a division to when we know that can happen without
7312 (fold_negate_expr_1): Likewise.
7314 2018-05-04 Jakub Jelinek <jakub@redhat.com>
7317 * real.h (real_nextafter): Declare.
7318 * real.c (real_nextafter): New function.
7319 * fold-const-call.c (fold_const_nextafter): New function.
7320 (fold_const_call_sss): Call it for CASE_CFN_NEXTAFTER and
7321 CASE_CFN_NEXTTOWARD.
7322 (fold_const_call_1): For CASE_CFN_NEXTTOWARD call fold_const_call_sss
7323 even when arg1_mode is different from arg0_mode.
7325 2018-05-03 Nathan Sidwell <nathan@acm.org>
7327 * doc/extend.texi (Deprecated Features): Remove
7329 (Backwards Compatibility): Likewise.
7330 * doc/invoke.texi (C++ Language Options): Likewise.
7331 (C++ Dialect Options): Likewise.
7333 2018-05-03 Jakub Jelinek <jakub@redhat.com>
7336 * config/i386/avx512fintrin.h (_mm512_mullox_epi64,
7337 _mm512_mask_mullox_epi64): New intrinsics.
7339 2018-05-03 Tom de Vries <tom@codesourcery.com>
7342 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7343 dump files): Add offload-tree.
7345 2018-05-03 Richard Biener <rguenther@suse.de>
7347 PR tree-optimization/85615
7348 * tree-ssa-threadupdate.c (thread_block_1): Only allow exits
7349 to loops not nested in BBs loop father to avoid creating multi-entry
7352 2018-05-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7354 PR tree-optimization/70291
7355 * tree-complex.c (expand_complex_libcall): Add type, inplace_p
7356 arguments. Change return type to tree. Emit libcall as a new
7357 statement rather than replacing existing one when inplace_p is true.
7358 (expand_complex_multiplication_components): New function.
7359 (expand_complex_multiplication): Expand floating-point complex
7360 multiplication using the above.
7361 (expand_complex_division): Rename inner_type parameter to type.
7362 Update expand_complex_libcall call-site.
7363 (expand_complex_operations_1): Update expand_complex_multiplication
7364 and expand_complex_division call-sites.
7366 2018-05-02 Jakub Jelinek <jakub@redhat.com>
7369 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
7370 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
7371 *<shift_insn><dwi>3_doubleword_mask_1): In condition require that
7372 the highest significant bit of the shift count mask is clear. In
7373 check whether and[sq]i3 is needed verify that all significant bits
7374 of the shift count other than the highest are set.
7376 2018-05-02 Tom de Vries <tom@codesourcery.com>
7379 * builtins.def (DEF_GOACC_BUILTIN_ONLY): Define.
7380 * omp-builtins.def (BUILT_IN_GOACC_PARLEVEL_ID)
7381 (BUILT_IN_GOACC_PARLEVEL_SIZE): New builtin.
7382 * builtins.c (expand_builtin_goacc_parlevel_id_size): New function.
7383 (expand_builtin): Call expand_builtin_goacc_parlevel_id_size.
7384 * doc/extend.texi (Other Builtins): Add __builtin_goacc_parlevel_id and
7385 __builtin_goacc_parlevel_size.
7387 2018-05-02 Richard Biener <rguenther@suse.de>
7389 PR tree-optimization/85597
7390 * tree-vect-stmts.c (vectorizable_operation): For ternary SLP
7391 do not use split vect_get_vec_defs call but call vect_get_slp_defs
7394 2018-05-02 Tom de Vries <tom@codesourcery.com>
7397 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7398 dump files): Add ltrans-tree.
7400 2018-05-02 Tom de Vries <tom@codesourcery.com>
7403 * doc/sourcebuild.texi (Commands for use in dg-final, Scan optimization
7404 dump files): Add wpa-ipa.
7406 2018-05-02 Segher Boessenkool <segher@kernel.crashing.org>
7408 * config.gcc (powerpc*-*-*): Remove paired.h. Unsupport the
7409 powerpc*-*-linux*paired* target.
7410 * config/rs6000/750cl.h: Delete.
7411 * config/rs6000/paired.h: Delete.
7412 * config/rs6000/paired.md: Delete.
7413 * config/rs6000/predicates.md (easy_vector_constant): Remove paired
7415 * config/rs6000/rs6000-builtin.def: Remove paired float support.
7416 * config/rs6000/rs6000-c.c (rs6000_target_modify_macros): Update
7417 comment. Remove paired float support.
7418 * config/rs6000/rs6000-modes.def: Remove V2SF and V2SI.
7419 * config/rs6000/rs6000-opts.h (enum rs6000_vector): Delete
7421 * config/rs6000/rs6000-protos.h (paired_expand_vector_init,
7422 paired_emit_vector_cond_expr, paired_expand_vector_move): Delete
7424 * config/rs6000/rs6000.c: Remove paired float support.
7425 (paired_expand_vector_init, paired_expand_vector_move,
7426 paired_emit_vector_compare, paired_emit_vector_cond_expr,
7427 (paired_expand_lv_builtin, paired_expand_stv_builtin,
7428 paired_expand_builtin, paired_expand_predicate_builtin,
7429 paired_init_builtins): Delete.
7430 * config/rs6000/rs6000.h: Remove paired float support.
7431 * config/rs6000/rs6000.md: Remove paired float support.
7432 (move_from_CR_ov_bit): Delete.
7433 * config/rs6000/rs6000.opt (mpaired): Delete.
7434 * config/rs6000/t-rs6000: Remove paired.md from MD_INCLUDES.
7435 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mpaired.
7437 2018-05-02 Richard Biener <rguenther@suse.de>
7440 * gimplify.c (gimplify_save_expr): When in SSA form allow
7441 SAVE_EXPRs to compute to SSA vars.
7443 2018-05-02 Jakub Jelinek <jakub@redhat.com>
7446 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask,
7447 *ashl<dwi>3_doubleword_mask_1, *<shift_insn><dwi>3_doubleword_mask,
7448 *<shift_insn><dwi>3_doubleword_mask_1): If and[sq]i3 is needed, don't
7449 clobber operands[2], instead use a new pseudo. Formatting fixes.
7451 2018-05-02 Richard Sandiford <richard.sandiford@linaro.org>
7453 PR tree-optimization/85586
7454 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence): Only
7455 exit early for statements in the same group if the accesses are
7458 2018-05-02 Tom de Vries <tom@codesourcery.com>
7461 * lto-wrapper.c (compile_offload_image): Add "could not find mkoffload"
7464 2018-05-01 Marc Glisse <marc.glisse@inria.fr>
7466 PR tree-optimization/85143
7467 * match.pd (A<B&A<C): Extend to BIT_IOR_EXPR.
7469 2018-05-01 Tom de Vries <tom@codesourcery.com>
7472 * config/nvptx/mkoffload.c (main): Suggest using -B in "offload compiler
7473 not found" error message.
7475 2018-05-01 Tom de Vries <tom@codesourcery.com>
7478 * vec.h (VEC_ORDERED_REMOVE_IF, VEC_ORDERED_REMOVE_IF_FROM_TO): Define.
7479 * vec.c (test_ordered_remove_if): New function.
7480 (vec_c_tests): Call test_ordered_remove_if.
7481 * dwarf2cfi.c (connect_traces): Use VEC_ORDERED_REMOVE_IF_FROM_TO.
7482 * lto-streamer-out.c (prune_offload_funcs): Use VEC_ORDERED_REMOVE_IF.
7483 * tree-vect-patterns.c (vect_pattern_recog_1): Use
7484 VEC_ORDERED_REMOVE_IF.
7486 2018-05-01 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
7488 PR tree-optimization/82665
7489 * vr-values.c (vr_values::extract_range_from_binary_expr): Handle
7490 pointer subtraction where arguments come from a memchr call.
7492 2018-05-01 Jakub Jelinek <jakub@redhat.com>
7494 * configure.ac (LD_AS_NEEDED_OPTION, LD_NO_AS_NEEDED_OPTION): Use
7495 --push-state --as-needed and --pop-state instead of --as-needed and
7496 --no-as-needed if ld supports it.
7497 * configure: Regenerated.
7500 * doc/install.texi2html: Replace _002d with - and _002a with * in
7501 generated html files using sed.
7503 2018-04-30 David Malcolm <dmalcolm@redhat.com>
7506 * gcc-rich-location.c (blank_line_before_p): New function.
7507 (use_new_line): New function.
7508 (gcc_rich_location::add_fixit_insert_formatted): New function.
7509 * gcc-rich-location.h
7510 (gcc_rich_location::add_fixit_insert_formatted): New function.
7512 2018-04-30 David Malcolm <dmalcolm@redhat.com>
7514 * selftest.c (assert_streq): Rename "expected" and "actual" to
7515 "val1" and "val2". Extend NULL-handling to cover both inputs
7516 symmetrically, while still requiring both to be non-NULL for a pass.
7517 * selftest.h (assert_streq): Rename "expected" and "actual" to
7519 (ASSERT_EQ): Likewise.
7520 (ASSERT_EQ_AT): Likewise.
7521 (ASSERT_KNOWN_EQ): Likewise.
7522 (ASSERT_KNOWN_EQ_AT): Likewise.
7523 (ASSERT_NE): Likewise.
7524 (ASSERT_MAYBE_NE): Likewise.
7525 (ASSERT_MAYBE_NE_AT): Likewise.
7526 (ASSERT_STREQ): Likewise. Clarify that both must be non-NULL for
7527 the assertion to pass.
7528 (ASSERT_STREQ_AT): Likewise.
7530 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
7532 * doc/invoke.texi (-fpie, -fPIE): Fix grammar and clarify
7533 interaction with -pie.
7535 2018-04-30 David Malcolm <dmalcolm@redhat.com>
7537 * selftest.h: Fix alphabetization of per-source-file selftest
7540 2018-04-30 Jason Merrill <jason@redhat.com>
7542 PR c++/61982 - dead stores to destroyed objects.
7543 * gimplify.c (gimplify_modify_expr): Simplify complex lvalue on LHS
7546 2018-04-30 Jason Merrill <jason@redhat.com>
7548 * tree.c (build_clobber): New.
7549 * tree.h: Declare it.
7550 * gimplify.c (gimplify_bind_expr, gimplify_target_expr): Use it.
7552 2018-04-30 David Malcolm <dmalcolm@redhat.com>
7554 * diagnostic-show-locus.c (layout::layout): Update for
7555 location_get_source_line returning a char_span.
7556 (struct char_span): Move to input.h.
7557 (struct correction): Update for fields in char_span becoming
7559 (struct source_line): Update for location_get_source_line
7560 returning a char_span.
7561 (layout::print_line): Likewise.
7562 * edit-context.c (edited_file::print_content): Likewise.
7563 (edited_file::print_diff_hunk): Likewise.
7564 (edited_file::print_run_of_changed_lines): Likewise.
7565 (edited_file::get_num_lines): Likewise.
7566 (edited_line::edited_line): Likewise.
7567 * final.c (asm_show_source): Likewise.
7568 * input.c (location_get_source_line): Convert return type
7569 from const char * to char_span, losing the final "line_len"
7571 (dump_location_info): Update for the above.
7572 (get_substring_ranges_for_loc): Likewise. Use a char_span
7573 when handling the literal within the line.
7574 (test_reading_source_line): Update for location_get_source_line
7575 returning a char_span.
7576 * input.h (class char_span): Move here from
7577 diagnostic-show-locus.c, converting from a struct to a class.
7578 Make data members private.
7579 (char_span::operator bool): New.
7580 (char_span::length): New.
7581 (char_span::get_buffer): New.
7582 (char_span::operator[]): New.
7583 (char_span::subspan): Make const.
7584 (char_span::xstrdup): New.
7585 (location_get_source_line): Convert return type from const char *
7586 to char_span, losing the final "line_size" param.
7588 2018-04-30 Jan Hubicka <jh@suse.cz>
7590 * lto-wrapper.c (ltrans_priorities): New static var.
7591 (cmp_priority): New.
7592 (run_gcc): Read priorities and if doing parallel build order
7593 the Makefile by them.
7595 2018-04-30 David Malcolm <dmalcolm@redhat.com>
7597 * input.h (builtins_location_check): Convert to a STATIC_ASSERT.
7599 2018-04-30 Richard Biener <rguenther@suse.de>
7601 * tree-cfg.c (verify_address): Remove base argument, add
7602 flag whether to check TREE_ADDRESSABLE and do that.
7603 (verify_expr): Remove.
7604 (verify_types_in_gimple_reference): Add pieces from verify_expr.
7605 (verify_gimple_assign_single): Likewise.
7606 (verify_gimple_switch): Likewise.
7607 (verify_expr_location_1): Dereference tp once. Add (disabled)
7608 piece from verify_expr.
7609 (verify_gimple_in_cfg): Do not call verify_expr on all ops.
7611 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
7613 * config/arc/linux.h (CLEAR_INSN_CACHE): Define.
7615 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
7617 * config/arc/arc-protos.h (prepare_extend_operands): Remove.
7618 (small_data_pattern): Likewise.
7619 (arc_rewrite_small_data): Likewise.
7620 * config/arc/arc.c (LEGITIMATE_SMALL_DATA_OFFSET_P): Remove.
7621 (LEGITIMATE_SMALL_DATA_ADDRESS_P): Likewise.
7622 (get_symbol_alignment): New function.
7623 (legitimate_small_data_address_p): Likewise.
7624 (legitimate_scaled_address): Update, call
7625 legitimate_small_data_address_p.
7626 (output_sdata): New static variable.
7627 (arc_print_operand): Update how we handle small data operands.
7628 (arc_print_operand_address): Likewise.
7629 (arc_legitimate_address_p): Update, use
7630 legitimate_small_data_address_p.
7631 (arc_rewrite_small_data_p): Remove.
7632 (arc_rewrite_small_data_1): Likewise.
7633 (arc_rewrite_small_data): Likewise.
7634 (small_data_pattern): Likewise.
7635 (compact_sda_memory_operand): Update to use
7636 legitimate_small_data_address_p and get_symbol_alignment.
7637 (prepare_move_operands): Don't rewite sdata pattern.
7638 (prepare_extend_operands): Remove.
7639 * config/arc/arc.md (zero_extendqihi2): Don't rewrite sdata
7641 (zero_extendqisi2): Likewise.
7642 (zero_extendhisi2): Likewise.
7643 (extendqihi2): Likewise.
7644 (extendqisi2): Likewise.
7645 (extendhisi2): Likewise.
7649 * config/arc/constraints.md (Usd): Change it to memory constraint.
7651 2018-04-30 Claudiu Zissulescu <claziss@synopsys.com>
7653 * config/arc/arc.c (arc_split_move): Allow signed 6-bit constants
7654 as source of std instructions.
7655 * config/arc/arc.md (movsi_insn): Update pattern predicate to
7656 allow 6-bit constants as source for store instructions.
7657 (movdi_insn): Update instruction pattern to allow 6-bit constants
7658 as source for store instructions.
7660 2018-04-30 Jonathan Wakely <jwakely@redhat.com>
7662 * doc/invoke.texi (-fdebug-types-section): Fix grammar.
7664 2018-04-30 Nathan Sidwell <nathan@acm.org>
7665 Sandra Loosemore <sandra@codesourcery.com>
7667 * dumpfile.c (dump_open): Allow '-' for stdout.
7668 * doc/invoke.texi (Developer Options): Document dump filename
7669 determination early. Document stdin/stdout selection.
7671 2018-04-30 Andrew Sadek <andrew.sadek.se@gmail.com>
7673 Microblaze Target: PIC data text relative
7675 * config/microblaze/microblaze.opt: add new option -mpic-data-text-rel.
7676 * config/microblaze/microblaze-protos.h (microblaze_constant_address_p):
7678 * gcc/config/microblaze/microblaze.h (microblaze_constant_address_p):
7679 CONSTANT_ADDRESS_P definition to microblaze_constant_address_p.
7680 * config/microblaze/microblaze.c (TARGET_PIC_DATA_TEXT_REL):
7681 New addressing mode for data-text relative position indepenedent code.
7682 (microblaze_classify_unspec): add 'UNSPEC_TEXT' case ->
7683 'ADDRESS_SYMBOLIC_TXT_REL'.
7684 (microblaze_classify_address): Add handling for UNSPEC + CONST_INT.
7685 (microblaze_legitimate_pic_operand): Exclude function calls from
7686 pic operands in case of TARGET_PIC_DATA_TEXT_REL option.
7687 (microblaze_legitimize_address): Generate 'UNSPEC_TEXT' for all possible
7689 (microblaze_address_insns): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
7690 (print_operand): Add 'ADDRESS_SYMBOLIC_TXT_REL' case.
7691 (print_operand_address): Add 'ADDRESS_SYMBOLIC_TXT_REL' case + handling
7692 for 'address + offset'.
7693 (microblaze_expand_prologue): Add new function prologue call for
7695 (microblaze_asm_generate_pic_addr_dif_vec): Override new target hook
7696 'TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC' to disable address diff vector
7697 table in case of TARGET_PIC_DATA_TEXT_REL.
7698 (expand_pic_symbol_ref): Add handling for 'UNSPEC_TEXT'.
7699 * gcc/config/microblaze/microblaze.md (TARGET_PIC_DATA_TEXT_REL):
7700 Add new macros 'UNSPEC_TEXT',
7701 'UNSPEC_SET_TEXT' + add rule for setting r20 in function prologue
7702 + exclude function calls from 'UNSPEC_PLT' in case of data text
7704 * doc/tm.texi.in (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
7705 new target hook for generating address diff vector tables in case of
7707 * doc/tm.texi : Regenerate.
7708 * stmt.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Append new condition
7709 'targetm.asm_out.generate_pic_addr_diff_vec' to flag_pic in case
7710 of addr diff vector generation.
7711 * target.def (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC): Add
7712 target hook definition.
7713 * targhooks.h, gcc/targhooks.c (TARGET_ASM_GENERATE_PIC_ADDR_DIFF_VEC):
7714 Add default function for generate_pic_addr_diff_vec -> flag_pic.
7715 * doc/invoke.texi (Add new pic option): Add new microblaze pic
7716 option for data text relative.
7718 2018-04-30 Richard Biener <rguenther@suse.de>
7720 * tree-chrec.h (evolution_function_is_constant_p): Remove
7722 * tree-cfg.c (tree_node_can_be_shared): Re-order checks.
7724 2018-04-30 Richard Biener <rguenther@suse.de>
7727 * dwarf2out.c (gen_producer_string): Ignore -fchecking[=].
7729 2018-04-30 Richard Biener <rguenther@suse.de>
7731 PR tree-optimization/28364
7732 PR tree-optimization/85275
7733 * tree-ssa-loop-ch.c (ch_base::copy_headers): Stop after
7734 copying first exit test.
7736 2018-04-28 Mark Wielaard <mark@klomp.org>
7738 * dwarf2out.c (dwarf2out_finish): Add .debug_addr table header for
7740 (dwarf_AT): Handle DW_AT_addr_base.
7741 (add_top_level_skeleton_die_attrs): Use dwarf_AT for DW_AT_addr_base.
7743 2018-04-28 Uros Bizjak <ubizjak@gmail.com>
7746 * config/i386/i386.md (*ashl<dwi>3_doubleword_mask): New pattern.
7747 (*ashl<dwi>3_doubleword_mask_1): Ditto.
7748 (*<shift_insn><dwi>3_doubleword_mask): Ditto.
7749 (*<shift_insn><dwi>3_doubleword_mask_1): Ditto.
7751 2018-04-28 Richard Biener <rguenther@suse.de>
7753 * tree-cfg.c (verify_gimple_phi): Take a gphi * argument.
7754 (verify_gimple_in_cfg): Rename visited_stmts to visited_throwing_stmts
7755 to reflect use. Only add interesting stmts.
7757 2018-04-27 Martin Jambor <mjambor@suse.cz>
7760 * ipa-cp.c (find_aggregate_values_for_callers_subset): Make sure
7761 the jump function allows for passing through aggregate values.
7763 2018-04-27 David Malcolm <dmalcolm@redhat.com>
7765 * input.h (in_system_header_at): Convert from macro to inline
7767 (from_macro_expansion_at): Likewise.
7768 (from_macro_definition_at): Likewise.
7770 2018-04-27 Jeff Law <law@redhat.com>
7772 * config.gcc: Mark tile* targets as deprecated/obsolete.
7774 2018-04-27 Richard Biener <rguenther@suse.de>
7776 * config/aarch64/aarch64.c: Simplify ap.__stack advance and
7779 2018-04-27 Richard Biener <rguenther@suse.de>
7781 * tree-cfg.c (verify_expr): Make dead code hit gcc_unreachable.
7783 2018-04-27 Uros Bizjak <ubizjak@gmail.com>
7785 * config/i386/i386.md (*movti_internal): Substitute Ye constraint
7786 with Yd constraint. Set "preferred_for_speed" attribute from
7787 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for alternatives
7789 (*movdi_internal): Ditto.
7790 (movti_interunit splitters): Remove
7791 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC from insn condition.
7792 (movdi_interunit splitters): Ditto.
7793 * config/i386/constraints.md (Ye): Remove.
7794 (Yd): Do not depend on TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC.
7796 2018-04-27 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7799 * config/aarch64/constraints.md (Usg): Limit to 31.
7802 2018-04-27 Jakub Jelinek <jakub@redhat.com>
7804 PR tree-optimization/85529
7805 * tree-ssa-reassoc.c (optimize_range_tests_var_bound): Add FIRST_BB
7806 argument. Don't call get_nonzero_bits if opcode is ERROR_MARK_NODE,
7807 rhs2 def stmt's bb is dominated by first_bb and it isn't an obvious
7808 zero extension or masking of the MSB bit.
7809 (optimize_range_tests): Add FIRST_BB argument, pass it through
7810 to optimize_range_tests_var_bound.
7811 (maybe_optimize_range_tests, reassociate_bb): Adjust
7812 optimize_range_tests callers.
7814 2018-04-26 Richard Biener <rguenther@suse.de>
7815 Jakub Jelinek <jakub@redhat.com>
7817 * cgraph.h (symbol_table): Just declare debug method here.
7818 * symtab.c (symbol_table::debug): Define.
7820 2018-04-26 Eric Botcazou <ebotcazou@adacore.com>
7822 * loop-invariant.c (may_assign_reg_p): Return false for frame pointer.
7824 2018-04-26 Uros Bizjak <ubizjak@gmail.com>
7826 * config/i386/i386.md ("isa" attribute): Add x64_sse2.
7827 ("enabled" attribute): Handle x64_sse2 "isa" attribute.
7828 (*movdi_internal): Substitute Yi and Yj constraint with x
7829 and Ym and Yn constraint with y constraint. Update "isa"
7830 attribute and set "preferred_for_speed" attribute from
7831 TARGET_INTER_UNIT_MOVES_{FROM,TO}_VEC for updated alternatives.
7832 (*movsi_internal): Ditto.
7833 (*movdf_internal): Ditto.
7834 (*movsf_internal): Ditto.
7835 (*zero_extendsidi2): Ditto.
7836 * config/i386/sse.md (vec_set<mode>_0): Ditto.
7837 (sse2_loadld): Ditto.
7838 (*vec_extract<ssevecmodelower>_0): Ditto.
7839 (*vec_extractv4si_0_zext_sse4): Ditto.
7840 (vec_concatv2di): Ditto.
7841 (*vec_dup<mode>): Ditto.
7842 * config/i386/mmx.md (*mov<mode>_internal): Ditto.
7843 * config/i386/constraints.md (Yi): Remove.
7848 2018-04-26 Nathan Sidwell <nathan@acm.org>
7850 * dumpfile.c (dump_open): New.
7851 (dump_open_alternate_stream, dump_start, dump_begin): Call it.
7852 (dump_finish): Detect stdio/stderr by value not name.
7854 2018-04-26 Jonathan Wakely <jwakely@redhat.com>
7856 * doc/invoke.texi (-Wreturn-type): Document default status for C++.
7858 2018-04-26 Tom de Vries <tom@codesourcery.com>
7861 * config/nvptx/nvptx.c (verify_neutering_jumps)
7862 (verify_neutering_labels): New function
7863 (nvptx_single): Use verify_neutering_jumps and verify_neutering_labels.
7865 2018-04-26 Tom de Vries <tom@codesourcery.com>
7868 * config/nvptx/nvptx.c (needs_neutering_p): New function.
7869 (nvptx_single): Use needs_neutering_p to skip over insns that do not
7872 2018-04-26 Richard Biener <rguenther@suse.de>
7873 Tom de Vries <tom@codesourcery.com>
7876 * lto-streamer-out.c (output_function): Fixup loops if required to match
7877 discovery done in the reader.
7879 2018-04-26 Richard Biener <rguenther@suse.de>
7881 PR tree-optimization/85116
7882 * tree-ssa-loop-ch.c (do_while_loop_p): A do-while loop should
7883 have a loop exit from the single latch predecessor. Remove
7884 case of header with just condition.
7885 (ch_base::copy_headers): Exclude infinite loops from any
7887 (pass_ch::execute): Record exits.
7889 2018-04-26 Richard Biener <rguenther@suse.de>
7891 * tree-vect-data-refs.c (vect_get_data_access_cost): Get
7892 prologue cost vector and pass it to vect_get_load_cost.
7893 (vect_get_peeling_costs_all_drs): Likewise.
7894 (vect_peeling_hash_get_lowest_cost): Likewise.
7895 (vect_enhance_data_refs_alignment): Likewise.
7897 2018-04-26 Richard Biener <rguenther@suse.de>
7900 * tree-cfg.c (verify_gimple_assign_unary): Restore proper
7901 checking of integer<->pointer conversions.
7902 * omp-expand.c (expand_omp_for_static_nochunk): Avoid
7903 sign-/zero-extending pointer types.
7904 (expand_omp_for_static_chunk): Likewise.
7906 2018-03-22 Hans-Peter Nilsson <hp@axis.com>
7907 Jean Lee <xiaoyur347@gmail.com>
7909 * config/mips/mips.c (mips_asan_shadow_offset): New function.
7910 (TARGET_ASAN_SHADOW_OFFSET): Define.
7911 * config/mips/mips.h (FRAME_GROWS_DOWNWARD): Augment to also be
7912 true for -fsanitize=address.
7914 2018-04-25 Mark Wielaard <mark@klomp.org>
7916 * dwarf2out.c (file_info_cmp): Sort longer dir prefixes before
7919 2018-04-25 Jakub Jelinek <jakub@redhat.com>
7921 * config/i386/i386.md (*x86_mov<mode>cc_0_m1): Use type "alu1" rather
7922 than "alu", remove explicit "memory" and "imm_disp" attributes.
7923 (*x86_mov<mode>cc_0_m1_se, *x86_mov<mode>cc_0_m1_neg): Likewise.
7926 * simplify-rtx.c (simplify_unary_operation_1) <case SIGN_EXTEND,
7927 case ZERO_EXTEND>: Pass SUBREG_REG (op) rather than op to
7928 gen_lowpart_no_emit.
7930 2018-04-25 Sebastian Peryt <sebastian.peryt@intel.com>
7933 * config/i386/i386.c (ix86_expand_builtin): Change memory
7934 operand to XI, extend p0 to Pmode.
7935 * config/i386/i386.md: Change unspec volatile and operand
7936 1 mode to XI, change operand 0 mode to P.
7938 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
7940 * config/nds32/nds32-predicates.c (nds32_can_use_bclr_p): Mask with
7941 GET_MODE_MASK before any checking.
7942 (nds32_can_use_bset_p): Likewise.
7943 (nds32_can_use_btgl_p): Likewise.
7945 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
7947 * config/nds32/nds32-doubleword.md: New define_split pattern for
7948 illegal register number.
7950 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
7952 * config/nds32/nds32.c (nds32_print_operand): Set op_value ealier.
7954 2018-04-25 Chung-Ju Wu <jasonwucj@gmail.com>
7956 * config/nds32/nds32.h (ASM_APP_ON): Add missing newline character.
7958 2018-04-25 Richard Biener <rguenther@suse.de>
7960 * lto-streamer.h (LTO_major_version): Bump to 8.
7962 2018-04-25 Jakub Jelinek <jakub@redhat.com>
7964 * BASE-VER: Set to 9.0.0.
7966 2018-04-24 Segher Boessenkool <segher@kernel.crashing.org>
7968 * config/rs6000/rs6000.c (init_float128_ieee): Fix spelling mistakes
7969 in __abskf2 and __powikf2.
7971 2018-04-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
7974 * config/aarch64/constraints.md (Usg, Usj): New constraints.
7975 * config/aarch64/iterators.md (cmode_simd): New mode attribute.
7976 * config/aarch64/aarch64.md (*aarch64_ashr_sisd_or_int_<mode>3):
7977 Use the above on operand 2. Reindent.
7978 (*aarch64_lshr_sisd_or_int_<mode>3): Likewise.
7980 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
7983 * common/config/i386/i386-common.c (ix86_handle_option): Don't
7985 * config/i386/i386.opt (mcet): Removed.
7986 * doc/install.texi: Remove -mcet documentation.
7987 * doc/invoke.texi: Likewise.
7989 2018-04-24 H.J. Lu <hongjiu.lu@intel.com>
7992 * doc/install.texi: Remove -mcet from bootstrap-cet.
7994 2018-04-24 Jakub Jelinek <jakub@redhat.com>
7997 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Don't define
7998 __builtin_ia32_readeflags_u32 and __builtin_ia32_writeeflags_u32
8002 * config/rs6000/rs6000-p8swap.c (const_load_sequence_p): Punt if
8003 const_vector is not CONST_VECTOR or SYMBOL_REF for a constant pool
8004 containing a CONST_VECTOR.
8006 2018-04-24 Cesar Philippidis <cesar@codesourcery.com>
8008 * doc/install.texi: Update newlib dependency for nvptx.
8010 2018-04-24 Jakub Jelinek <jakub@redhat.com>
8013 * config/i386/i386.c (ix86_expand_vector_init_one_var): Use UINTVAL
8014 instead of INTVAL when shifting x left.
8016 2018-04-24 Andreas Krebbel <krebbel@linux.ibm.com>
8018 PR tree-optimization/85478
8019 * tree-vect-loop.c (vect_analyze_loop_2): Do not call
8020 vect_grouped_store_supported for single element vectors.
8022 2018-04-24 Richard Biener <rguenther@suse.de>
8025 * config/i386/i386.c (ix86_add_stmt_cost): Restrict strided
8026 load cost increase to the case of non-constant step.
8028 2018-04-24 Jakub Jelinek <jakub@redhat.com>
8031 * reg-stack.c (move_for_stack_reg): Don't fail assertion about dead
8032 destination if any_malformed_asm.
8034 2018-04-23 Eric Botcazou <ebotcazou@adacore.com>
8037 * expr.c (store_field): In the bitfield case, if the value comes from
8038 a function call and is returned in registers by means of a PARALLEL,
8039 do not change the mode of the temporary unless BLKmode and VOIDmode.
8041 2018-04-23 Andrey Belevantsev <abel@ispras.ru>
8043 PR rtl-optimization/85423
8044 * sel-sched-ir.c (has_dependence_note_mem_dep): Only discard
8045 dependencies to debug insns when the previous insn is non-debug.
8047 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
8049 * config/arc/arc.md ("vunspec"): Delete it, unify all the unspec
8050 enums into a single definition.
8051 (fls): Fix predicates and printing.
8054 2018-04-23 Claudiu Zissulescu <claziss@synopsys.com>
8056 * config/arc/arc-protos.h (check_if_valid_sleep_operand): Remove.
8057 * config/arc/arc.c (arc_expand_builtin): Sleep accepts registers
8058 and short u6 immediate.
8059 (check_if_valid_sleep_operand): Remove.
8060 * config/arc/arc.md (Sleep): Accepts registers and u6 immediates.
8062 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8064 * config/nds32/nds32.c (nds32_compute_stack_frame): Consider
8065 flag_always_save_lp condition.
8066 * config/nds32/nds32.opt (malways-save-lp): New option.
8068 2018-04-22 Shiva Chen <shiva0217@gmail.com>
8070 * config/nds32/nds32-protos.h (nds32_use_load_post_increment): Declare.
8071 * config/nds32/nds32.c (nds32_use_load_post_increment): New.
8072 * config/nds32/nds32.h
8073 (USE_LOAD_POST_INCREMENT, USE_LOAD_POST_DECREMENT): Define.
8074 (USE_STORE_POST_INCREMENT, USE_STORE_POST_DECREMENT): Define.
8076 2018-04-22 Shiva Chen <shiva0217@gmail.com>
8078 * config/nds32/nds32-protos.h (nds32_ls_333_p): Remove.
8079 * config/nds32/nds32.c (nds32_ls_333_p): Remove.
8081 2018-04-22 Shiva Chen <shiva0217@gmail.com>
8082 Chung-Ju Wu <jasonwucj@gmail.com>
8084 * config/nds32/nds32-protos.h (nds32_case_vector_shorten_mode):
8086 * config/nds32/nds32.c (nds32_case_vector_shorten_mode): New function.
8087 * config/nds32/nds32.h (CASE_VECTOR_SHORTEN_MODE): Modify.
8089 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8091 * config/nds32/nds32.c (nds32_compute_stack_frame): Fix wrong value.
8093 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8095 * config/nds32/nds32-protos.h (nds32_data_alignment,
8096 nds32_local_alignment): Declare.
8097 * config/nds32/nds32.c (nds32_data_alignment, nds32_constant_alignment,
8098 nds32_local_alignment): New functions.
8099 (TARGET_CONSTANT_ALIGNMENT): Define.
8100 * config/nds32/nds32.h (DATA_ALIGNMENT, LOCAL_ALIGNMENT): Define.
8102 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8104 * config/nds32/nds32.c
8105 (TARGET_HARD_REGNO_MODE_OK): Move to the bottom of file.
8106 (TARGET_MODES_TIEABLE_P): Likewise.
8108 2018-04-22 Chung-Ju Wu <jasonwucj@gmail.com>
8110 * config/nds32/nds32.c (nds32_asm_file_start): Display optimization
8113 2018-04-22 Monk Chiang <sh.chiang04@gmail.com>
8114 Chung-Ju Wu <jasonwucj@gmail.com>
8116 * config/nds32/constants.md (unspec_volatile_element): Add enum values
8117 for unaligned access.
8118 * config/nds32/nds32-intrinsic.c: Implementation of expanding
8120 * config/nds32/nds32-intrinsic.md: Likewise.
8121 * config/nds32/nds32_intrinsic.h: Likewise.
8122 * config/nds32/nds32.h (nds32_builtins): Likewise.
8123 * config/nds32/nds32.opt (munaligned-access): New option.
8124 * config/nds32/nds32.c (nds32_asm_file_start): Display
8125 flag_unaligned_access status.
8127 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
8129 * config/riscv/elf.h (LINK_SPEC): Pass --no-relax if
8130 -mno-relax is present.
8131 * config/riscv/linux.h (LINK_SPEC): Ditto.
8133 2018-04-20 Martin Sebor <msebor@redhat.com>
8136 * gimple-fold.c (gimple_fold_builtin_strcpy): Suppress -Wrestrict
8138 (gimple_fold_builtin_stxcpy_chk): Same.
8139 * gimple-ssa-warn-restrict.c (check_bounds_or_overlap): Same.
8141 2018-04-20 Michael Meissner <meissner@linux.ibm.com>
8144 * config/rs6000/rs6000.c (init_float128_ieee): Add support to call
8145 __powikf2 when long double is IEEE 128-bit.
8147 2018-04-20 Kito Cheng <kito.cheng@gmail.com>
8149 * config/riscv/riscv.c (riscv_first_stack_step): Round up min
8150 step to make sure stack always aligned.
8152 2018-04-20 Carl Love <cel@us.ibm.com>
8155 * config/rs6000/rs6000-c.c (rs6000_gimple_fold_builtin): Add
8156 size check for arg0.
8158 2018-04-20 Nathan Sidwell <nathan@codesourcery.com>
8159 Tom de Vries <tom@codesourcery.com>
8162 * config/nvptx/nvptx.c (nvptx_emit_forking, nvptx_emit_joining):
8163 Emit insns for calls too.
8164 (nvptx_find_par): Always look for worker-level predecessor insn.
8165 (nvptx_propagate): Add is_call parm, return bool. Copy frame for
8167 (nvptx_vpropagate, nvptx_wpropagate): Adjust.
8168 (nvptx_process_pars): Propagate frames for calls.
8170 2018-04-20 H.J. Lu <hongjiu.lu@intel.com>
8173 * common/config/i386/i386-common.c (OPTION_MASK_ISA_IBT_SET):
8175 (OPTION_MASK_ISA_IBT_UNSET): Likewise.
8176 (ix86_handle_option): Don't handle OPT_mibt.
8177 * config/i386/cet.h: Check __CET__ instead of __IBT__ and
8179 * config/i386/driver-i386.c (host_detect_local_cpu): Remove
8181 * config/i386/i386-c.c (ix86_target_macros_internal): Don't
8182 check OPTION_MASK_ISA_IBT nor flag_cf_protection.
8183 (ix86_target_macros): Define __CET__ with flag_cf_protection
8184 for -fcf-protection.
8185 * config/i386/i386.c (isa2_opts): Remove -mibt.
8186 * config/i386/i386.h (TARGET_IBT): Removed.
8187 (TARGET_IBT_P): Likewise.
8188 (ix86_valid_target_attribute_inner_p): Don't check OPT_mibt.
8189 * config/i386/i386.md (nop_endbr): Don't check TARGET_IBT.
8190 * config/i386/i386.opt (mcet): Update help message.
8193 * doc/invoke.texi: Remove -mibt. Document __CET__. Document
8194 -mcet as an alias for -mshstk.
8196 2018-04-20 Richard Biener <rguenther@suse.de>
8199 * match.pd ((X * CST) * Y -> (X * Y) * CST): Avoid exponential
8200 complexity by forcing a single use of the multiply operand.
8202 2018-04-20 Martin Jambor <mjambor@suse.cz>
8205 * ipa-cp.c (cgraph_edge_brings_value_p): Move check for self-feeding
8206 recursion dependency to only apply to non-clones.
8208 2018-04-20 Martin Jambor <mjambor@suse.cz>
8211 * ipa-cp.c (create_specialized_node): Check that clones of
8212 self-recursive edges exist during IPA-CP.
8214 2018-04-19 Toon Moene <toon@moene.org>
8216 * doc/invoke.texi: Add -floop-unroll-and-jam to options enabled
8219 2018-04-19 Jakub Jelinek <jakub@redhat.com>
8221 PR tree-optimization/85467
8222 * fold-const.c (fold_ternary_loc) <case BIT_FIELD_REF>: Use
8223 VECTOR_TYPE_P macro. If type is vector type, VIEW_CONVERT_EXPR the
8224 VECTOR_CST element to type.
8226 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
8229 * config/i386/i386.h (STACK_SAVEAREA_MODE): New.
8230 * config/i386/i386.md (builtin_setjmp_setup): Removed.
8231 (builtin_longjmp): Likewise.
8232 (save_stack_nonlocal): New pattern.
8233 (restore_stack_nonlocal): Likewise.
8235 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
8238 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8239 Replace ASM_OUTPUT_LABEL with fprintf.
8241 2018-04-19 H.J. Lu <hongjiu.lu@intel.com>
8244 * config/i386/cet.c (file_end_indicate_exec_stack_and_cet):
8245 Check flag_cf_protection instead of TARGET_IBT and TARGET_SHSTK.
8246 * config/i386/i386-c.c (ix86_target_macros_internal): Also
8247 define __IBT__ and __SHSTK__ for -fcf-protection.
8248 * config/i386/i386.c (pass_insert_endbranch::gate): Don't check
8250 (ix86_trampoline_init): Likewise.
8251 (x86_output_mi_thunk): Likewise.
8252 (ix86_notrack_prefixed_insn_p): Likewise.
8253 (ix86_option_override_internal): Don't disallow -fcf-protection.
8254 * config/i386/i386.md (rdssp<mode>): Also enable for
8256 (incssp<mode>): Likewise.
8257 (nop_endbr): Likewise.
8258 * config/i386/i386.opt (mcet): Change help message to built-in
8262 * doc/invoke.texi: Remove -mcet, -mibt and -mshstk condition
8263 on -fcf-protection. Change -mcet, -mibt and -mshstk to only
8264 enable CET built-in functions.
8266 2018-04-19 Sebastian Peryt <sebastian.peryt@intel.com>
8268 * common/config/i386/i386-common.c
8269 (OPTION_MASK_ISA_MOVDIRI_SET, OPTION_MASK_ISA_MOVDIR64B_SET,
8270 OPTION_MASK_ISA_MOVDIRI_UNSET,
8271 OPTION_MASK_ISA_MOVDIR64B_UNSET): New defines.
8272 (ix86_handle_option): Handle -mmovdiri and -mmovdir64b.
8273 * config.gcc (movdirintrin.h): New header.
8274 * config/i386/cpuid.h (bit_MOVDIRI,
8275 bit_MOVDIR64B): New bits.
8276 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mmovdiri
8278 * config/i386/i386-builtin-types.def ((VOID, PUNSIGNED, UNSIGNED),
8279 (VOID, PVOID, PCVOID)): New function types.
8280 * config/i386/i386-builtin.def (__builtin_ia32_directstoreu_u32,
8281 __builtin_ia32_directstoreu_u64,
8282 __builtin_ia32_movdir64b): New builtins.
8283 * config/i386/i386-c.c (__MOVDIRI__, __MOVDIR64B__): New.
8284 * config/i386/i386.c (ix86_target_string): Added -mmovdir64b
8286 (ix86_valid_target_attribute_inner_p): Ditto.
8287 (ix86_expand_special_args_builtin): Added VOID_FTYPE_PUNSIGNED_UNSIGNED
8288 and VOID_FTYPE_PUNSIGNED_UNSIGNED.
8289 (ix86_expand_builtin): Expand IX86_BUILTIN_MOVDIR64B.
8290 * config/i386/i386.h (TARGET_MOVDIRI, TARGET_MOVDIRI_P,
8291 TARGET_MOVDIR64B, TARGET_MOVDIR64B_P): New.
8292 * config/i386/i386.md (UNSPECV_MOVDIRI, UNSPECV_MOVDIR64B): New.
8293 (movdiri<mode>, movdir64b_<mode>): New.
8294 * config/i386/i386.opt: Add -mmovdiri and -mmovdir64b.
8295 * config/i386/immintrin.h: Include movdirintrin.h.
8296 * config/i386/movdirintrin.h: New file.
8297 * doc/invoke.texi: Added -mmovdiri and -mmovdir64b.
8299 2018-04-19 Richard Biener <rguenther@suse.de>
8302 * cfg.c (clear_bb_flags): When loop state says we have
8303 marked irreducible regions also preserve BB_IRREDUCIBLE_LOOP.
8305 2018-04-19 Richard Biener <rguenther@suse.de>
8307 PR tree-optimization/84737
8308 * tree-vect-data-refs.c (vect_copy_ref_info): New function
8309 copying restrict info.
8310 (vect_setup_realignment): Use it.
8311 * tree-vectorizer.h (vect_copy_ref_info): Declare.
8312 * tree-vect-stmts.c (vectorizable_store): Copy ref info from
8313 the first DR to all generated stores.
8314 (vectorizable_load): Likewise for loads.
8316 2018-04-19 Jakub Jelinek <jakub@redhat.com>
8318 PR tree-optimization/85446
8319 * match.pd ((intptr_t) x eq/ne CST to x eq/ne (typeof x) cst): Require
8320 the integral and pointer types to have the same precision.
8322 * doc/install.texi: Document --disable-cet being the default and
8325 2018-04-18 Martin Liska <mliska@suse.cz>
8327 * ipa-devirt.c (odr_subtypes_equivalent_p): Fix GNU coding
8330 2018-04-18 Martin Liska <mliska@suse.cz>
8333 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
8336 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
8337 arguments if they are comparable.
8339 2018-04-18 Martin Liska <mliska@suse.cz>
8342 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
8345 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
8348 2018-04-18 H.J. Lu <hongjiu.lu@intel.com>
8351 * config/i386/i386.c (ix86_expand_split_stack_prologue): Insert
8352 ENDBR after calling __morestack.
8354 2018-04-18 David Malcolm <dmalcolm@redhat.com>
8357 * configure.ac (gcc-driver-name.h): Honor --with-gcc-major-version
8358 by using gcc_base_ver to generate a gcc_driver_version, and use
8359 it when generating GCC_DRIVER_NAME.
8360 * configure: Regenerate.
8362 2018-04-18 Jakub Jelinek <jakub@redhat.com>
8365 * config.gcc: Obsolete powerpc*-*-*spe*.
8367 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8370 * dbxout.c (dbxout_int): Perform negation in unsigned int type.
8371 (stabstr_D): Change type of unum from unsigned int to
8372 unsigned HOST_WIDE_INT. Perform negation in unsigned HOST_WIDE_INT
8375 2018-04-17 Jim Wilson <jimw@sifive.com>
8378 * config/riscv/riscv.c (riscv_compute_frame_info): Add calls to
8379 RISCV_STACK_ALIGN when using outgoing_args_size and pretend_args_size.
8380 Set arg_pointer_offset after using pretend_args_size.
8382 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8384 PR rtl-optimization/85431
8385 * dse.c (record_store): Ignore zero width stores.
8388 * asan.c (handle_builtin_stack_restore): Adjust comment. Emit
8389 __asan_allocas_unpoison call and last_alloca_addr = new_sp before
8390 __builtin_stack_restore rather than after it.
8391 * builtins.c (expand_asan_emit_allocas_unpoison): Pass
8392 arg1 + (virtual_dynamic_stack_rtx - stack_pointer_rtx) as second
8393 argument instead of virtual_dynamic_stack_rtx.
8395 2018-04-17 Kelvin Nilsen <kelvin@gcc.gnu.org>
8397 * config/rs6000/rs6000-protos.h (rs6000_builtin_is_supported_p):
8399 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin):
8400 Add note to error message to explain internal mapping of overloaded
8401 built-in function name to non-overloaded built-in function name.
8402 * config/rs6000/rs6000.c (rs6000_builtin_is_supported_p): New
8405 2018-04-17 Michael Meissner <meissner@linux.vnet.ibm.com>
8408 * config/rs6000/rs6000.md (pack<mode>): Do not try handle a pack
8409 where the inputs overlap with the output.
8411 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8413 * config/i386/sse.md (vec_extract_lo_<mode><mask_name>): Add
8414 (=v, v) alternative and explicit "memory" attribute.
8415 (vec_extract_lo_<mode><mask_name>): Likewise. Also add
8416 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8418 (vec_extract_lo_<mode><mask_name>): Add (=v, v) alternative and use
8419 "sselog1" type instead of "sselog".
8420 (vec_extract_hi_<mode><mask_name>): Use "sselog1" type instead of
8421 "sselog". Remove explicit "memory" attribute.
8422 (vec_extract_lo_v32hi): Add (=v, v) alternative and explicit "memory",
8423 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8425 (vec_extract_hi_v32hi): Merge all alternatives into one, use
8426 "sselog1" type instead of "sselog". Remove explicit "memory"
8428 (vec_extract_hi_v16hi): Merge each pair of alternatives into one,
8429 use "sselog1" type instead of "sselog". Remove explicit "memory"
8431 (vec_extract_lo_v64qi): Add (=v, v) alternative and explicit "memory",
8432 "type", "prefix", "prefix_extra", "length_immediate" and "mode"
8434 (vec_extract_hi_v64qi): Merge all alternatives into one, use
8435 "sselog1" type instead of "sselog". Remove explicit "memory"
8437 (vec_extract_hi_v32qi): Merge each pair of alternatives into one,
8438 use "sselog1" type instead of "sselog". Remove explicit "memory"
8442 * config/i386/i386.md (*ashlqi3_1_slp): Use alu1 type instead of alu.
8445 * rtlhooks.c (gen_lowpart_if_possible): Don't call gen_lowpart_SUBREG
8448 2018-04-17 Martin Jambor <mjambor@suse.cz>
8451 * ipa-cp.c (create_specialized_node): Call
8452 expand_all_artificial_thunks if necessary.
8454 2018-04-17 Martin Liska <mliska@suse.cz>
8457 * ipa-devirt.c (odr_types_equivalent_p): Remove trailing
8458 in message, remote space in between '_G' and '('.
8460 2018-04-17 Jakub Jelinek <jakub@redhat.com>
8463 * config/i386/sse.md (reduces<mode><mask_scalar_name>,
8464 avx512f_vmcmp<mode>3<round_saeonly_name>,
8465 avx512f_vmcmp<mode>3_mask<round_saeonly_name>,
8466 avx512f_sgetexp<mode><mask_scalar_name><round_saeonly_scalar_name>,
8467 avx512f_rndscale<mode><round_saeonly_name>,
8468 avx512dq_ranges<mode><mask_scalar_name><round_saeonly_scalar_name>,
8469 avx512f_vgetmant<mode><mask_scalar_name><round_saeonly_scalar_name>):
8470 Use %<iptr>2 instead of %2 for -masm=intel.
8471 (avx512f_vcvtss2usi<round_name>, avx512f_vcvtss2usiq<round_name>,
8472 avx512f_vcvttss2usi<round_saeonly_name>,
8473 avx512f_vcvttss2usiq<round_saeonly_name>): Use %k1 instead of %1 for
8475 (avx512f_vcvtsd2usi<round_name>, avx512f_vcvtsd2usiq<round_name>,
8476 avx512f_vcvttsd2usi<round_saeonly_name>,
8477 avx512f_vcvttsd2usiq<round_saeonly_name>, ufloatv2siv2df2<mask_name>):
8478 Use %q1 instead of %1 for -masm=intel.
8479 (avx512f_sfixupimm<mode><sd_maskz_name><round_saeonly_name>,
8480 avx512f_sfixupimm<mode>_mask<round_saeonly_name>): Use %<iptr>3 instead
8481 of %3 for -masm=intel.
8482 (sse2_shufpd_v2df_mask): Fix a typo, change %{6%} to %{%6%} for
8484 (*avx512vl_<code>v2div2qi2_store): Use %w0 instead of %0 for
8486 (*avx512vl_<code><mode>v4qi2_store): Use %k0 instead of %0 for
8488 (avx512vl_<code><mode>v4qi2_mask_store): Use a single pattern with
8489 %k0 and %1 for -masm=intel rather than two patterns, one with %0 and
8491 (*avx512vl_<code><mode>v8qi2_store): Use %q0 instead of %0 for
8493 (avx512vl_<code><mode>v8qi2_mask_store): Use a single pattern with
8494 %q0 and %1 for -masm=intel rather than two patterns, one with %0 and
8495 %g1 and one with %0 and %1.
8496 (avx512er_vmrcp28<mode><round_saeonly_name>,
8497 avx512er_vmrsqrt28<mode><round_saeonly_name>): Use %<iptr>1 instead of
8499 (avx5124fmaddps_4fmaddps_mask, avx5124fmaddps_4fmaddss_mask,
8500 avx5124fmaddps_4fnmaddps_mask, avx5124fmaddps_4fnmaddss_mask,
8501 avx5124vnniw_vp4dpwssd_mask, avx5124vnniw_vp4dpwssds_mask): Swap order
8502 of %0 and %{%4%} for -masm=intel.
8503 (avx5124fmaddps_4fmaddps_maskz, avx5124fmaddps_4fmaddss_maskz,
8504 avx5124fmaddps_4fnmaddps_maskz, avx5124fmaddps_4fnmaddss_maskz,
8505 avx5124vnniw_vp4dpwssd_maskz, avx5124vnniw_vp4dpwssds_maskz): Swap
8506 order of %0 and %{%5%}%{z%} for -masm=intel.
8508 2018-04-17 Jan Hubicka <jh@suse.cz>
8511 * ipa-devirt.c (odr_types_equivalent_p): Handle bit fields.
8513 2018-04-17 Martin Liska <mliska@suse.cz>
8516 * multiple_target.c (create_dispatcher_calls): Set apostrophes
8517 for target_clone error message. Make default implementation
8518 clone to be a local declaration.
8519 (separate_attrs): Add new argument and check for an empty
8521 (expand_target_clones): Handle it.
8522 (ipa_target_clone): Make redirection just for target_clones
8525 2018-04-16 Cesar Philippidis <cesar@codesourcery.com>
8526 Tom de Vries <tom@codesourcery.com>
8529 * omp-expand.c (expand_oacc_for): Add dummy false branch for
8530 tiled basic blocks without omp continue statements.
8532 2018-04-16 Aaron Sawdey <acsawdey@linux.ibm.com>
8535 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Mark
8536 vec_extract expression as having side effects to make sure it gets
8539 2018-04-16 H.J. Lu <hongjiu.lu@intel.com>
8542 * config/i386/i386.c (get_builtin_code_for_version): Check
8545 2018-04-16 Olga Makhotina <olga.makhotina@intel.com>
8548 * gcc/config.gcc: Support "skylake".
8549 * gcc/config/i386/i386-c.c (ix86_target_macros_internal): Handle
8551 * gcc/config/i386/i386.c (m_SKYLAKE): Define.
8552 (processor_target_table): Add "skylake".
8553 (ix86_option_override_internal): Add "skylake".
8554 (get_builtin_code_for_version): Handle PROCESSOR_SKYLAKE,
8555 PROCESSOR_CANNONLAKE.
8556 (get_builtin_code_for_version): Fix priority for
8557 PROCESSOR_ICELAKE_CLIENT, PROCESSOR_ICELAKE_SERVER,
8558 PROCESSOR_SKYLAKE-AVX512.
8559 * gcc/config/i386/i386.h (processor_costs): Define TARGET_SKYLAKE.
8560 (processor_type): Add PROCESSOR_SKYLAKE.
8562 2018-04-16 Paolo Carlini <paolo.carlini@oracle.com>
8563 Jason Merrill <jason@redhat.com>
8566 * convert.c (convert_to_integer_1): Use direct recursion for
8567 enumeral types and types with a precision less than the number
8568 of bits in their mode.
8570 2018-04-16 Julia Koval <julia.koval@intel.com>
8573 * config/i386/x86-tune.def (X86_TUNE_SSE_UNALIGNED_LOAD_OPTIMAL,
8574 X86_TUNE_SSE_UNALIGNED_STORE_OPTIMAL): Add m_SKYLAKE_AVX512
8576 2018-04-14 Segher Boessenkool <segher@kernel.crashing.org>
8579 * config/rs6000/rs6000.opt (mdirect-move): Make deprecated.
8580 * doc/invoke.texi (RS/6000 and PowerPC Options): Remove -mdirect-move
8581 and -mno-direct-move.
8583 2018-04-13 Paul A. Clarke <pc@us.ibm.com>
8586 * config/rs6000/emmintrin.h (_mm_slli_epi{16,32,64}):
8587 Ensure that vec_splat_s32 is only called with 0 <= shift < 16.
8588 Ensure negative shifts result in {0}.
8590 2018-04-13 Vladimir Makarov <vmakarov@redhat.com>
8592 PR rtl-optimization/79916
8593 * config/rs6000/rs6000.c (rs6000_emit_move): Use assigned hard
8594 regs (if any) to define how to gnerate SD moves when LRA is in
8597 2018-04-13 Jakub Jelinek <jakub@redhat.com>
8599 PR rtl-optimization/85393
8600 * except.h (expand_dw2_landing_pad_for_region): Remove declaration.
8601 * except.c (expand_dw2_landing_pad_for_region): Make static.
8602 * bb-reorder.c (fix_up_crossing_landing_pad): In new_bb emit just
8603 a label and unconditional jump to old_bb, rather than
8604 expand_dw2_landing_pad_for_region insn(s) and jump to single_succ
8607 PR rtl-optimization/85376
8608 * simplify-rtx.c (simplify_const_unary_operation): For CLZ and CTZ and
8609 zero op0, if C?Z_DEFINED_VALUE_AT_ZERO is false, return NULL_RTX
8610 instead of a specific value.
8612 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
8613 Bin Cheng <bin.cheng@arm.com>
8615 PR tree-optimization/82965
8616 PR tree-optimization/83991
8617 * cfgloopanal.c (expected_loop_iterations_unbounded): Add
8618 by_profile_only parameter.
8619 * cfgloopmanip.c (scale_loop_profile): Further scale loop's profile
8620 information if the loop was predicted to iterate too many times.
8621 * cfgloop.h (expected_loop_iterations_unbounded): Update prototype
8623 2018-04-13 Jan Hubicka <hubicka@ucw.cz>
8626 * config/i386/i386.c (ix86_can_inline_p): Allow safe transitions for
8629 2018-04-13 Martin Liska <mliska@suse.cz>
8630 Jakub Jelinek <jakub@redhat.com>
8633 * expr.h (enum block_op_methods): Add BLOCK_OP_NO_LIBCALL_RET.
8634 * expr.c (emit_block_move_hints): Handle BLOCK_OP_NO_LIBCALL_RET.
8635 * builtins.c (expand_builtin_memory_copy_args): Use
8636 BLOCK_OP_NO_LIBCALL_RET method for mempcpy with non-ignored target,
8637 handle dest_addr == pc_rtx.
8639 2018-04-12 Segher Boessenkool <segher@kernel.crashing.org>
8642 * config/rs6000/rs6000.md (fix_trunc<mode>si2): Use legacy code if
8643 asked to not generate direct moves.
8644 (fix_trunc<mode>si2_stfiwx): Similar.
8645 (fix_trunc<mode>si2_internal): Similar.
8647 2018-04-12 Jakub Jelinek <jakub@redhat.com>
8650 * var-tracking.c (add_stores): Handle STRICT_LOW_PART SET_DEST.
8651 * cselib.c (cselib_record_sets): For STRICT_LOW_PART dest,
8652 lookup if dest in some wider mode is known to be const0_rtx and
8653 if so, record permanent equivalence for it to be ZERO_EXTEND of
8654 the narrower mode destination.
8656 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
8658 * lto-streamer-out.c (output_function): Revert 259346.
8659 * omp-expand.c (expand_oacc_for): Likewise.
8661 2018-04-12 Alexander Monakov <amonakov@ispras.ru>
8663 PR rtl-optimization/85354
8664 * sel-sched-ir.c (sel_init_pipelining): Move cfg_cleanup call...
8665 * sel-sched.c (sel_global_init): ... here.
8667 2018-04-12 Eric Botcazou <ebotcazou@adacore.com>
8670 * lto-wrapper.c (debug_objcopy): Open the files in binary mode.
8671 * dwarf2out.c (dwarf2out_early_finish): Do not generate assembly in LTO
8672 mode for PE-COFF targets.
8673 * config/i386/i386-protos.h (i386_pe_asm_lto_start): Declare.
8674 (i386_pe_asm_lto_end): Likewise.
8675 * config/i386/cygming.h (TARGET_ASM_LTO_START): Define.
8676 (TARGET_ASM_LTO_END): Likewise.
8677 * config/i386/winnt.c (saved_debug_info_level): New static variable.
8678 (i386_pe_asm_lto_start): New function.
8679 (i386_pe_asm_lto_end): Likewise.
8681 2018-04-12 Cesar Philippidis <cesar@codesourcery.com>
8682 Richard Biener <rguenther@suse.de>
8685 * lto-streamer-out.c (output_function): Fix CFG loop state before
8687 * omp-expand.c (expand_oacc_for): Handle calls to internal
8688 functions like regular functions.
8690 2018-04-12 Richard Biener <rguenther@suse.de>
8693 * dwarf2out.c (init_sections_and_labels): Use debug_line_section[_label]
8694 for the early LTO debug to properly generate references to it
8695 during DIE emission. Do not re-use that for the skeleton for
8697 (dwarf2out_early_finish): Likewise.
8699 2018-04-12 Jakub Jelinek <jakub@redhat.com>
8702 * config/i386/sse.md
8703 (<mask_codefor>avx512dq_vextract<shuffletype>64x2_1<mask_name> split,
8704 <mask_codefor>avx512f_vextract<shuffletype>32x4_1<mask_name> split,
8705 vec_extract_lo_<mode><mask_name> split, vec_extract_lo_v32hi,
8706 vec_extract_lo_v64qi): For non-AVX512VL if input is xmm16+ reg
8707 and output is a reg, avoid creating invalid lowpart subreg, but
8708 instead split into a 512-bit move. Don't split if not AVX512VL,
8709 input is xmm16+ reg and output is a mem.
8710 (vec_extract_lo_<mode><mask_name>, vec_extract_lo_v32hi,
8711 vec_extract_lo_v64qi): Don't require split if not AVX512VL, input is
8712 xmm16+ reg and output is a mem.
8714 2018-04-12 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
8716 * config/s390/s390.c (s390_output_indirect_thunk_function): Check
8717 also for flag_dwarf2_cfi_asm.
8719 2018-04-12 Jakub Jelinek <jakub@redhat.com>
8721 PR rtl-optimization/85342
8722 * regcprop.c (copyprop_hardreg_forward_1): Remove replaced array, use
8723 a bool scalar var inside of the loop instead. Don't try to update
8724 recog_data.operand after failed apply_change_group.
8726 2018-04-12 Tom de Vries <tom@codesourcery.com>
8729 * config/nvptx/nvptx.c (flexible_array_member_type_p): New function.
8730 (nvptx_assemble_decl_begin): Add undefined param. Declare undefined
8731 array with flexible array member as array without given dimension.
8732 (nvptx_assemble_undefined_decl): Set nvptx_assemble_decl_begin call
8733 argument for undefined param to true.
8735 2018-04-11 Aaron Sawdey <acsawdey@linux.ibm.com>
8738 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
8739 -mcall- and -mtraceback=. Remove options -mabi=spe and -mabi=no-spe
8740 from PowerPC section.
8741 * config/rs6000/sysv4.opt (mcall-): Improve help text.
8742 * config/rs6000/rs6000.opt (mblock-compare-inline-limit=): Trim
8743 help text that is too long.
8744 * config/rs6000/rs6000.opt (mblock-compare-inline-loop-limit=): Trim
8745 help text that is too long.
8746 * config/rs6000/rs6000.opt (mstring-compare-inline-limit=): Trim
8747 help text that is too long.
8749 2018-04-11 Uros Bizjak <ubizjak@gmail.com>
8751 * config/alpha/alpha.md (stack_probe_internal): Rename
8752 from "probe_stack". Update all callers.
8754 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
8756 PR rtl-optimization/84566
8757 * sched-deps.c (sched_analyze_insn): Check deps->readonly when invoking
8758 sched_macro_fuse_insns.
8760 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
8763 * sched-rgn.c (add_branch_dependences): Move sel_sched_p check here...
8764 (compute_block_dependences): ... from here.
8766 2018-04-11 Jakub Jelinek <jakub@redhat.com>
8768 PR tree-optimization/85331
8769 * vec-perm-indices.h (vec_perm_indices::clamp): Change input type
8770 from int to HOST_WIDE_INT.
8772 2018-04-11 Martin Jambor <mjambor@suse.cz>
8775 * ipa-cp.c (propagate_vals_across_pass_through): Expand comment.
8776 (cgraph_edge_brings_value_p): New parameter dest_val, check if it is
8777 not the same as the source val.
8778 (cgraph_edge_brings_value_p): New parameter.
8779 (gather_edges_for_value): Pass destination value to
8780 cgraph_edge_brings_value_p.
8781 (perhaps_add_new_callers): Likewise.
8782 (get_info_about_necessary_edges): Likewise and exclude values brought
8783 only by self-recursive edges.
8784 (create_specialized_node): Redirect only clones of self-calling edges.
8785 (+self_recursive_pass_through_p): New function.
8786 (find_more_scalar_values_for_callers_subset): Use it.
8787 (find_aggregate_values_for_callers_subset): Likewise.
8788 (known_aggs_to_agg_replacement_list): Removed.
8789 (decide_whether_version_node): Re-calculate known constants for all
8790 remaining context clones.
8792 2018-04-11 Richard Biener <rguenther@suse.de>
8795 * dwarf2out.c (dwarf2out_finish): Remove DW_AT_stmt_list attribute
8796 from early DWARF output.
8797 (dwarf2out_early_finish): Output line info unconditionally into
8798 early DWARF and add reference to it.
8800 2018-04-11 Jakub Jelinek <jakub@redhat.com>
8803 * config/i386/sse.md (iptr): Add V16SFmode and V8DFmode cases.
8804 (<avx512>_vec_dup<mode><mask_name>): Use a single pattern for modes
8805 other than V2DFmode using iptr mode attribute.
8806 (<avx512>_vec_dup<mode><mask_name>): Use iptr mode attribute.
8808 2018-04-11 Alexander Monakov <amonakov@ispras.ru>
8810 PR rtl-optimization/84659
8811 * sel-sched-ir.c (sel_init_pipelining): Invoke cleanup_cfg.
8813 2018-04-11 Jakub Jelinek <jakub@redhat.com>
8816 * dwarf2out.c (skip_loc_list_entry): Don't call size_of_locs if
8818 (output_loc_list): Pass address of a dummy size variable even in the
8819 locview handling loop.
8820 (index_location_lists): Add comment on why skip_loc_list_entry can't
8823 2018-04-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
8826 * config/arm/arm-builtins.c (arm_expand_builtin): Force input operand
8829 2018-04-10 Aaron Sawdey <acsawdey@linux.ibm.com>
8832 * doc/invoke.texi (RS/6000 and PowerPC Options): Document options
8833 -mblock-compare-inline-limit, -mblock-compare-inline-loop-limit,
8834 and -mstring-compare-inline-limit.
8836 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
8839 * gcc/config/rs6000/rs6000.md (allocate_stack): Put the residual size
8840 for stack clash protection in a register whenever we need it to be in
8843 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
8845 * common/config/rs6000/rs6000-common.c (rs6000_option_init_struct):
8846 Enable -fasynchronous-unwind-tables by default if OBJECT_FORMAT_ELF.
8848 2018-04-10 Segher Boessenkool <segher@kernel.crashing.org>
8851 * config/rs6000/rs6000.opt (mtraceback=): Show the allowed values in
8853 (mlong-double-): Ditto.
8854 * config/rs6000/sysv4.opt (msdata=): Ditto.
8855 (mtls-size=): Ditto.
8857 2018-04-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
8859 * config/rs6000/rs6000-c.c (altivec_overloaded_builtins): Remove
8860 erroneous entries for
8861 "vector int vec_ldl (int, long int *)", and
8862 "vector unsigned int vec_ldl (int, unsigned long int *)".
8863 Add comments and entries for
8864 "vector bool char vec_ldl (int, bool char *)",
8865 "vector bool short vec_ldl (int, bool short *)",
8866 "vector bool int vec_ldl (int, bool int *)",
8867 "vector bool long long vec_ldl (int, bool long long *)",
8868 "vector pixel vec_ldl (int, pixel *)",
8869 "vector long long vec_ldl (int, long long *)",
8870 "vector unsigned long long vec_ldl (int, unsigned long long *)".
8871 * config/rs6000/rs6000.c (rs6000_init_builtins): Initialize new
8872 type tree bool_long_long_type_node and correct definition of
8873 bool_V2DI_type_node to make reference to this new type tree.
8874 (rs6000_mangle_type): Replace erroneous reference to
8875 bool_long_type_node with bool_long_long_type_node.
8876 * config/rs6000/rs6000.h (enum rs6000_builtin_type_index): Add
8877 comments to emphasize sign distinctions for char and int types and
8878 replace RS6000_BTI_bool_long constant with
8879 RS6000_BTI_bool_long_long constant. Also add comment to restrict
8880 use of RS6000_BTI_pixel.
8881 (bool_long_type_node): Remove this macro definition.
8882 (bool_long_long_type_node): New macro definition
8884 2018-04-10 Jakub Jelinek <jakub@redhat.com>
8886 PR rtl-optimization/85300
8887 * combine.c (subst): Handle subst of CONST_SCALAR_INT_P new_rtx also
8888 into FLOAT and UNSIGNED_FLOAT like ZERO_EXTEND, return a CLOBBER if
8889 simplify_unary_operation fails.
8891 2018-04-10 Martin Liska <mliska@suse.cz>
8893 * gdbhooks.py: Add pretty-printers for varpool_node, symtab_node,
8894 cgraph_edge and ipa_ref.
8896 2018-04-10 Jakub Jelinek <jakub@redhat.com>
8900 * config/i386/sse.md
8901 (<extract_type>_vinsert<shuffletype><extract_suf>_mask): Fix
8902 computation of the VEC_MERGE selector from mask.
8903 (<extract_type>_vinsert<shuffletype><extract_suf>_1<mask_name>):
8904 Fix decoding of the VEC_MERGE selector into mask.
8906 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
8908 PR tree-optimization/85286
8909 * tree-vect-data-refs.c (vect_get_smallest_scalar_type):
8911 2018-04-10 Richard Sandiford <richard.sandiford@linaro.org>
8913 * final.c (final_1): Set insn_last_address as well as
8914 insn_current_address.
8916 2018-04-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
8919 * explow.c (emit_stack_probe): Call validize_mem on memory location
8920 before passing it to gen_probe_stack. Create address operand and
8921 legitimize it for the probe_stack_address case.
8923 2018-04-09 Jan Hubicka <jh@suse.cz>
8926 * ipa-devirt.c (rebuild_type_inheritance-hash): New.
8927 * ipa-utils.h (rebuild_type_inheritance-hash): Declare.
8928 * tree.c (free_lang_data_in_type): Fix handling of binfos;
8930 (free_lang_data): Rebuild type inheritance graph.
8932 2018-04-09 Martin Sebor <msebor@redhat.com>
8934 * invoke.texi (-finline-small-functions): Mention other optimization
8936 (-findirect-inlining, -fpartial-inlining): Same.
8937 (-finline-functions-called-once): Same.
8938 (-freorder-blocks-and-partition): Same.
8940 2018-04-09 Jan Hubicka <jh@suse.cz>
8943 * cfgcleanup.c (try_forward_edges): Do not give up on crossing
8944 jumps; choose last target that matches the criteria (i.e.
8945 no partition changes for non-crossing jumps).
8946 * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Add basic
8947 support for redirecting crossing jumps to non-crossing.
8949 2018-04-09 Alexey Brodkin <abrodkin@synopsys.com>
8951 * config/arc/arc.c (arc_expand_prologue): Set stack usage info
8952 also for naked functions.
8954 2018-04-09 Claudiu Zissulescu <claziss@synopsys.com>
8956 * config/arc/arc.md (add_shift): New pattern.
8957 (add_shift2): Likewise.
8958 (sub_shift): Likewise.
8959 (sub_shift_cmp0_noout): Likewise.
8960 (compare_si_ashiftsi): Likewise.
8961 (xbfu_cmp0_noout): New combine pattern.
8962 (xbfu_cmp0"): Likewise.
8963 (movsi_set_cc_insn): Place the predicable variant first.
8964 (commutative_binary_cmp0_noout): Remove clobber.
8965 (commutative_binary_cmp0): New pattern.
8966 (noncommutative_binary_cmp0): Likewise.
8967 (noncommutative_binary_cmp0_noout): Likewise.
8968 (noncommutative_binary_comparison_result_used): Removed.
8969 (rsub_cmp0): New pattern.
8970 (rsub_cmp0_noout): Likewise.
8971 (extzvsi): Changed, keep only meaningful variants.
8972 (SQH, SEZ): New iterators.
8973 (SQH_postfix): New mode attribute.
8974 (SEZ_prefix): New code attribute.
8975 (<SEZ_prefix>xt<SQH_postfix>_cmp0_noout): New instruction pattern.
8976 (<SEZ_prefix>xt<SQH_postfix>_cmp0): Likewise.
8977 * config/arc/predicates.md (cc_set_register): Use CC_REG instead
8979 (noncommutative_operator): Check the availability of barrel
8982 2018-04-09 Richard Biener <rguenther@suse.de>
8984 PR tree-optimization/85284
8985 * tree-ssa-loop-niter.c (number_of_iterations_exit_assumptions):
8986 Only use the niter constraining form of simple_iv when the exit
8989 2018-04-09 Tom de Vries <tom@codesourcery.com>
8992 * config/nvptx/nvptx.md (define_c_enum "unspecv"): Add UNSPECV_MEMBAR.
8993 (define_expand "*memory_barrier"): New define_expand.
8994 (define_insn "memory_barrier"): New insn.
8996 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
8998 PR rtl-optimization/80463
8999 PR rtl-optimization/83972
9000 PR rtl-optimization/83480
9002 * sel-sched-ir.c (has_dependence_note_mem_dep): Take into account the
9003 correct producer for the insn.
9004 (tidy_control_flow): Fixup seqnos in case of debug insns.
9006 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
9008 PR rtl-optimization/83913
9010 * sel-sched-ir.c (merge_expr_data): Choose the middle between two
9011 different sched-times when merging exprs.
9013 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
9015 PR rtl-optimization/83962
9017 * sel-sched-ir.c (tidy_control_flow): Correct the order in which we call
9018 tidy_fallthru_edge and tidy_control_flow.
9020 2018-04-09 Andrey Belevantsev <abel@ispras.ru>
9022 PR rtl-optimization/83530
9024 * sel-sched.c (force_next_insn): New global variable.
9025 (remove_insn_for_debug): When force_next_insn is true, also leave only
9026 next insn in the ready list.
9027 (sel_sched_region): When the region wasn't scheduled, make another pass
9028 over it with force_next_insn set to 1.
9030 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
9032 * config.gcc (nds32le-*-*, nds32be-*-*): Add nds32/nds32_intrinsic.h
9034 * config/nds32/constants.md (unspec_volatile_element): Add enum values
9035 for interrupt control.
9036 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9037 functions for interrupt control.
9038 * config/nds32/nds32-intrinsic.md: Likewise.
9039 * config/nds32/nds32_intrinsic.h: Likewise.
9040 * config/nds32/nds32.h (nds32_builtins): Likewise.
9042 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
9044 * config/nds32/nds32.c (nds32_init_machine_status,
9045 nds32_legitimate_index_p, nds32_legitimate_address_p): Consider
9046 strict_aligned_p field.
9047 (nds32_expand_to_rtl_hook): New function.
9048 (TARGET_EXPAND_TO_RTL_HOOK): Define.
9049 * config/nds32/nds32.h (machine_function): Add strict_aligned_p field.
9051 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9052 Chung-Ju Wu <jasonwucj@gmail.com>
9054 * config.gcc (nds32*-*-*): Check that n7 is valid to --with-cpu.
9055 * config/nds32/nds32-n7.md: New file.
9056 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N7.
9057 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n7
9059 * config/nds32/nds32-protos.h: More declarations for n7 pipeline.
9060 * config/nds32/nds32.md (pipeline_model): Add n7.
9061 * config/nds32/nds32.opt (mcpu): Support n7 pipeline cpus.
9062 * config/nds32/pipelines.md: Include n7 settings.
9064 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9065 Chung-Ju Wu <jasonwucj@gmail.com>
9067 * config.gcc (nds32*-*-*): Check that e8 is valid to --with-cpu.
9068 * config/nds32/nds32-e8.md: New file.
9069 * config/nds32/nds32-opts.h (nds32-cpu_type): Add CPU_E8.
9070 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for e8
9072 * config/nds32/nds32-protos.h: More declarations for e8 pipeline.
9073 * config/nds32/nds32.md (pipeline_model): Add e8.
9074 * config/nds32/nds32.opt (mcpu): Support e8 pipeline cpus.
9075 * config/nds32/pipelines.md: Include e8 settings.
9077 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9078 Chung-Ju Wu <jasonwucj@gmail.com>
9080 * config.gcc (nds32*-*-*): Check that n6/n8/s8 are valid to --with-cpu.
9081 * config/nds32/nds32-n8.md: New file.
9082 * config/nds32/nds32-opts.h (nds32_cpu_type): Add CPU_N6 and CPU_N8.
9083 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n8
9085 * config/nds32/nds32-protos.h: More declarations for n8 pipeline.
9086 * config/nds32/nds32-utils.c: More implementations for n8 pipeline.
9087 * config/nds32/nds32.md (pipeline_model): Add n8.
9088 * config/nds32/nds32.opt (mcpu): Support n8 pipeline cpus.
9089 * config/nds32/pipelines.md: Include n8 settings.
9091 2018-04-08 Kito Cheng <kito.cheng@gmail.com>
9092 Chung-Ju Wu <jasonwucj@gmail.com>
9094 * config.gcc (nds32*): Add nds32-utils.o into extra_objs.
9095 * config/nds32/nds32-n9-2r1w.md: New file.
9096 * config/nds32/nds32-n9-3r2w.md: New file.
9097 * config/nds32/nds32-opts.h (nds32_cpu_type, nds32_mul_type,
9098 nds32_register_ports): New or modify for cpu n9.
9099 * config/nds32/nds32-pipelines-auxiliary.c: Implementation for n9
9101 * config/nds32/nds32-protos.h: More declarations for n9 pipeline.
9102 * config/nds32/nds32-utils.c: New file.
9103 * config/nds32/nds32.h (TARGET_PIPELINE_N9, TARGET_PIPELINE_SIMPLE,
9104 TARGET_MUL_SLOW): Define.
9105 * config/nds32/nds32.md (pipeline_model): New attribute.
9106 * config/nds32/nds32.opt (mcpu, mconfig-mul, mconfig-register-ports):
9107 New options that support cpu n9.
9108 * config/nds32/pipelines.md: Include n9 settings.
9109 * config/nds32/t-nds32 (nds32-utils.o): Add dependency.
9111 2018-04-08 Chung-Ju Wu <jasonwucj@gmail.com>
9113 * config/nds32/nds32-md-auxiliary.c (output_cond_branch): Output align
9114 information if necessary.
9115 (output_cond_branch_compare_zero): Likewise.
9116 * config/nds32/nds32.c (nds32_adjust_insn_length): Consider align case.
9117 (nds32_target_alignment): Refine for alignment.
9118 * config/nds32/nds32.h (NDS32_ALIGN_P): Define.
9119 (FUNCTION_BOUNDARY): Modify.
9120 * config/nds32/nds32.md (call_internal, call_value_internal): Consider
9122 * config/nds32/nds32.opt (malways-align, malign-functions): New.
9124 2018-04-08 Monk Chiang <sh.chiang04@gmail.com>
9126 * config/nds32/constants.md (unspec_volatile_element): Add values for
9127 TLB operation and data prefetch.
9128 * config/nds32/nds32-intrinsic.c: Implementation of intrinsic
9129 functions for TLB operation and data prefetch.
9130 * config/nds32/nds32-intrinsic.md: Likewise.
9131 * config/nds32/nds32_intrinsic.h: Likewise.
9132 * config/nds32/nds32.c (nds32_dpref_names): Likewise.
9133 (nds32_print_operand): Likewise.
9134 * config/nds32/nds32.h (nds32_builtins): Likewise.
9136 2018-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
9137 Andrew Pinski <pinsika@gcc.gnu.org>
9140 * match.pd: Use constant_boolean_node of correct type instead of
9141 boolean_true_node or boolean_false_node for simplifying
9142 pointer comparisons to zero.
9144 2018-04-07 Jakub Jelinek <jakub@redhat.com>
9146 PR tree-optimization/80021
9147 * tree.c (verify_type_variant): Make error call in verify_variant_match
9148 translatable and remove final full stop.
9150 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9152 * config/nds32/constants.md (unspec_volatile_element): Add
9153 UNSPEC_VOLATILE_EH_RETURN.
9154 * config/nds32/nds32-md-auxiliary.c (nds32_output_stack_push,
9155 nds32_output_stack_pop): Support dwarf exception handling process.
9156 * config/nds32/nds32-protos.h (nds32_dynamic_chain_address): Declare.
9157 * config/nds32/nds32.c (nds32_init_machine_status): Support dwarf
9158 exception handling process.
9159 (nds32_compute_stack_frame): Likewise.
9160 (nds32_return_addr_rtx): Likewise.
9161 (nds32_initial_elimination_offset): Likewise.
9162 (nds32_expand_prologue): Likewise.
9163 (nds32_expand_epilogue): Likewise.
9164 (nds32_dynamic_chain_address): New function.
9165 * config/nds32/nds32.h (machine_function): Add fields for dwarf
9167 (DYNAMIC_CHAIN_ADDRESS): Define.
9168 (EH_RETURN_DATA_REGNO): Define.
9169 (EH_RETURN_STACKADJ_RTX): Define.
9170 * config/nds32/nds32.md (eh_return, nds32_eh_return): Implement
9171 patterns for dwarf exception handling.
9173 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9175 * config/nds32/nds32.h: Clean up obsolete macros.
9177 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9179 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9180 Add enum values for particular instructions.
9181 * config/nds32/nds32-intrinsic.c: Implementation of expanding
9182 particular intrinsic functions.
9183 * config/nds32/nds32-intrinsic.md: Likewise.
9184 * config/nds32/nds32_intrinsic.h: Likewise.
9185 * config/nds32/nds32.h (nds32_builtins): Likewise.
9186 * config/nds32/nds32.md (type): Add pbsad and pbsada.
9187 (btst, ave): New patterns for particular instructions.
9189 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9191 * config/nds32/constants.md (unspec_element, unspec_volatile_element):
9192 Add enum values for atomic load/store and memory sync.
9193 * config/nds32/nds32-intrinsic.c: Implementation for atomic load/store
9195 * config/nds32/nds32-intrinsic.md: Likewise.
9196 * config/nds32/nds32_intrinsic.h: Likewise.
9197 * config/nds32/nds32.h (nds32_builtins): Likewise.
9199 2018-04-07 Jakub Jelinek <jakub@redhat.com>
9201 PR tree-optimization/85257
9202 * fold-const.c (native_encode_vector): If not all elts could fit
9203 and off is -1, return 0 rather than offset.
9204 * tree-ssa-sccvn.c (vn_reference_lookup_3): Pass
9205 (offseti - offset2) / BITS_PER_UNIT as 4th argument to
9206 native_encode_expr. Verify len * BITS_PER_UNIT >= maxsizei. Don't
9207 adjust buffer in native_interpret_expr call.
9209 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9211 * config/nds32/constants.md (unspec_volatile_element): Add cache
9212 control enum values.
9213 * config/nds32/nds32-intrinsic.c: Add cache control expand functions.
9214 * config/nds32/nds32-intrinsic.md: Add cache control patterns.
9215 * config/nds32/nds32.c (nds32_cctl_names): New.
9216 (nds32_print_operand): Handle cache control register names.
9217 * config/nds32/nds32.h (nds32_builtins): New enum values.
9218 * config/nds32/nds32_intrinsic.h: Add cache control enum types and
9220 * config/nds32/nds32.md (type): Add mmu.
9221 * config/nds32/pipelines.md (simple_insn): Add mmu.
9223 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9225 * config/nds32/nds32.md (type): Remove call.
9226 * config/nds32/pipelines.md (simple_insn): Likewise.
9228 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9230 * config/nds32/constants.md (unspec_volatile_element): Add
9231 UNSPEC_VOLATILE_FMFCSR, UNSPEC_VOLATILE_FMTCSR and
9232 UNSPEC_VOLATILE_FMFCFG.
9233 * config/nds32/nds32-intrinsic.c (bdesc_noarg): New builtin
9234 description for fmfcfg and fmfcsr.
9235 (bdesc_1arg): Add fmtcsr.
9236 (bdesc_2arg): Add fcpynss, fcpyss, fcpynsd and fcpysd.
9237 (nds32_expand_builtin_impl): Deal with FPU intrinsic functions.
9238 * config/nds32/nds32-intrinsic.md (unspec_fcpynsd, unspec_fcpysd,
9239 unspec_fcpynss, unspec_fcpysd, unspec_fcpyss, unspec_fmfcsr,
9240 unspec_fmfcfg): New patterns.
9241 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FMFCFG,
9242 NDS32_BUILTIN_FMFCSR, NDS32_BUILTIN_FMTCSR, NDS32_BUILTIN_FCPYNSS,
9243 NDS32_BUILTIN_FCPYSS,NDS32_BUILTIN_FCPYNSD and NDS32_BUILTIN_FCPYSD.
9244 * config/nds32/nds32_intrinsic.h (__nds32__fcpynsd, __nds32__fcpynss,
9245 __nds32__fcpysd, __nds32__fcpyss, __nds32__fmfcsr, __nds32__fmtcsr,
9246 __nds32__fmfcfg): Define.
9248 2018-04-07 Monk Chiang <sh.chiang04@gmail.com>
9250 * config/nds32/nds32.c (nds32_intrinsic_register_names): Add more
9251 intrinsic register names.
9252 * config/nds32/nds32_intrinsic.h (nds32_intrinsic_registers): Add more
9253 intrinsic register enum values and macros.
9255 2018-04-07 Chung-Ju Wu <jasonwucj@gmail.com>
9257 * config/nds32/nds32.c (nds32_legitimate_index_p): Modify condition
9258 for load/store addressing form.
9259 (nds32_print_operand_address): Likewise.
9261 2018-04-06 Eric Botcazou <ebotcazou@adacore.com>
9264 * config/sparc/sparc.c (sparc_expand_move): Deal with symbolic operands
9265 based on LABEL_REF. Remove useless assertion.
9266 (pic_address_needs_scratch): Fix formatting.
9267 (sparc_legitimize_pic_address): Minor tweaks.
9268 (sparc_delegitimize_address): Adjust assertion accordingly.
9269 * config/sparc/sparc.md (movsi_pic_label_ref): Change label_ref_operand
9270 into symbolic_operand.
9271 (movsi_high_pic_label_ref): Likewise.
9272 (movsi_lo_sum_pic_label_ref): Likewise.
9273 (movdi_pic_label_ref): Likewise.
9274 (movdi_high_pic_label_ref): Likewise.
9275 (movdi_lo_sum_pic_label_ref): Likewise.
9277 2018-04-06 Amaan Cheval <amaan.cheval@gmail.com>
9279 * config.gcc (x86_64-*-rtems*): Add rtems.h to tm_file for
9280 custom LIB_SPEC setup.
9282 2018-04-06 Ruslan Bukin <br@bsdpad.com>
9283 Kito Cheng <kito.cheng@gmail.com>
9285 * config.gcc (riscv*-*-freebsd*): Add RISC-V FreeBSD support.
9286 * config/riscv/freebsd.h: New.
9288 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
9290 * config/nds32/nds32.c (nds32_adjust_insn_length): Refine.
9291 * config/nds32/nds32.h (ADJUST_INSN_LENGTH): Change the location in
9294 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
9295 Kito Cheng <kito.cheng@gmail.com>
9297 * config/nds32/nds32-md-auxiliary.c (nds32_output_return,
9298 nds32_output_call, nds32_symbol_binds_local_p): New functions.
9299 * config/nds32/nds32-protos.h (nds32_output_call,
9300 nds32_output_return): Declare.
9301 * config/nds32/nds32.md: Refine all the call and return patterns.
9303 2018-04-06 Jakub Jelinek <jakub@redhat.com>
9306 * dwarf2out.c (rtl_for_decl_init): For STRING_CST initializer only
9307 build CONST_STRING if TYPE_MAX_VALUE is non-NULL and is INTEGER_CST.
9309 PR rtl-optimization/84872
9310 * cfgloopmanip.c (create_preheader): Use make_forwarder_block even if
9311 nentry == 1 when CP_FALLTHRU_PREHEADERS and single_entry is
9314 2018-04-06 Tamar Christina <tamar.christina@arm.com>
9316 * expr.c (copy_blkmode_to_reg): Revert 254862.
9317 * doc/sourcebuild.texi (word_mode_no_slow_unalign): Likewise.
9319 2018-04-06 Richard Biener <rguenther@suse.de>
9322 * tree-dfa.c (get_ref_base_and_extent): Reset seen_variable_array_ref
9323 after seeing a component reference with an adjacent field. Treat
9324 refs to arrays at struct end of external decls similar to
9325 refs to unconstrained commons.
9327 2018-04-06 Jakub Jelinek <jakub@redhat.com>
9330 * fold-const.c (twoval_comparison_p): Remove SAVE_P argument and don't
9331 look through SAVE_EXPRs with non-side-effects argument. Adjust
9333 (fold_comparison): Adjust twoval_comparison_p caller, don't handle
9336 2018-04-06 Richard Biener <rguenther@suse.de>
9339 * alias.c (find_base_term): New wrapper around find_base_term
9340 unwinding CSELIB_VAL_PTR changes.
9341 (find_base_term): Do not restore CSELIB_VAL_PTR during the
9344 2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
9346 * config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
9348 * config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
9349 constant definitions.
9350 ("nop"): lr 0,0 -> nopr r0
9351 ("nop_lr0", "nop_lr1"): New insn definitions.
9353 2018-04-06 Chung-Ju Wu <jasonwucj@gmail.com>
9355 * config/nds32/nds32.md (*stack_push, *stack_pop): Use
9356 NDS32_V3PUSH_AVAILABLE_P macro.
9358 2018-04-06 Monk Chiang <sh.chiang04@gmail.com>
9359 Chung-Ju Wu <jasonwucj@gmail.com>
9361 * config.gcc (nds32*-*-*): Add v2j v3f v3s checking.
9362 (nds32*-*-*): Add float and fpu_config into supported_defaults.
9363 * common/config/nds32/nds32-common.c (TARGET_DEFAULT_TARGET_FLAGS):
9364 Include TARGET_DEFAULT_FPU_ISA and TARGET_DEFAULT_FPU_FMA.
9365 * config/nds32/constants.md (unspec_element): Add UNSPEC_COPYSIGN,
9366 UNSPEC_FCPYNSD, UNSPEC_FCPYNSS, UNSPEC_FCPYSD and UNSPEC_FCPYSS.
9367 * config/nds32/constraints.md: New constraints and checking for hard
9368 float configuration.
9369 * config/nds32/iterators.md: New mode iterator and attribute for hard
9370 float configuration.
9371 * config/nds32/nds32-doubleword.md: Use hard float alternatives and
9373 * config/nds32/nds32-fpu.md: New file.
9374 * config/nds32/nds32-md-auxiliary.c: New functions and checkings to
9375 deal with hard float code generation.
9376 * config/nds32/nds32-opts.h (nds32_arch_type): Add ARCH_V3F and
9378 (abi_type, float_reg_number): New enum type.
9379 * config/nds32/nds32-predicates.c: New predicates for hard float.
9380 * config/nds32/nds32-protos.h: Declare functions for hard float.
9381 * config/nds32/nds32.c: Implementation for hard float configuration.
9382 * config/nds32/nds32.h: Definitions for hard float configuration.
9383 * config/nds32/nds32.md: Include hard float machine description and
9384 modify patterns for hard float configuration.
9385 * config/nds32/nds32.opt: New options for hard float configuration.
9386 * config/nds32/predicates.md: New predicates for hard float
9389 2018-04-06 Kuan-Lin Chen <kuanlinchentw@gmail.com>
9391 * common/config/nds32/nds32-common.c
9392 (nds32_option_optimization_table): Enable -mreleax-hint by default.
9394 2018-04-05 Jakub Jelinek <jakub@redhat.com>
9397 * match.pd (BIT_FIELD_REF CONSTRUCTOR@0 @1 @2): Use view_convert around
9398 CONSTRUCTOR_ELT (ctor, ...)->value.
9400 2018-04-05 Uros Bizjak <ubizjak@gmail.com>
9403 * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
9405 2018-04-05 Tom de Vries <tom@codesourcery.com>
9408 * config/nvptx/nvptx.c (nvptx_single): Fix neutering of bb with only
9411 2018-04-05 Shiva Chen <shiva0217@gmail.com>
9412 Kito Cheng <kito.cheng@gmail.com>
9414 * config/nds32/constraints.md (U33): Fine-tune checking condition.
9415 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format): Ditto.
9416 * config/nds32/nds32.h (nds32_16bit_address_type): Add
9417 ADDRESS_POST_MODIFY_LO_REG_IMM3U.
9419 2018-04-05 Shiva Chen <shiva0217@gmail.com>
9420 Kito Cheng <kito.cheng@gmail.com>
9422 * config/nds32/constraints.md (Ufe): New memory constraint.
9423 * config/nds32/nds32-md-auxiliary.c (nds32_mem_format,
9424 nds32_output_16bit_load): Consider r8 register for lwi45.fe format.
9425 * config/nds32/nds32.c (nds32_print_operand): Output lwi45.fe
9427 * config/nds32/nds32.h (nds32_16bit_address_type): Add ADDRESS_R8_IMM7U.
9428 * config/nds32/nds32.md (*mov<mode>): Adjust pattern.
9430 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9432 * config/nds32/nds32.md: Use optimize_size in the condition for
9433 alu-shift instructions.
9435 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9437 * config/nds32/nds32.md (divsi4, udivsi4): New patterns.
9439 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9441 * config/nds32/nds32.md (negsi2): Refine pattern.
9443 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
9444 Chung-Ju Wu <jasonwucj@gmail.com>
9446 * config/nds32/iterators.md (shift_rotate): New code iterator.
9447 (shift): New code attribute.
9448 * config/nds32/nds32-md-auxiliary.c (nds32_expand_constant): New.
9449 * config/nds32/nds32-protos.h (nds32_expand_constant): Declare.
9450 * config/nds32/nds32.c (nds32_print_operand): Deal with more cases.
9451 * config/nds32/nds32.md (addsi3, *add_srli): Refine implementation for
9452 bit-wise operations.
9453 (andsi3, *andsi3): Ditto.
9454 (iorsi3, *iorsi3, *or_slli, *or_srli): Ditto.
9455 (xorsi3, *xorsi3, *xor_slli, *xor_srli): Ditto.
9456 (<shift>si3, *ashlsi3, *ashrsi3, *lshrsi3, *rotrsi3): Ditto.
9457 * config/nds32/predicates.md (nds32_rimm5u_operand, nds32_and_operand,
9458 nds32_ior_operand, nds32_xor_operand): New predicates.
9460 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9462 * config/nds32/nds32.md (add<mode>3, sub<mode>3): Rename to ...
9463 (addsi3, subsi3): ... this.
9465 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9467 * config/nds32/nds32.md (*sub_srli, *and_slli): Fine-tune predicator.
9469 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9471 * config/nds32/nds32.md: Adjust indention.
9473 2018-04-05 Kito Cheng <kito.cheng@gmail.com>
9475 * config/nds32/nds32.md (feature): New attribute.
9477 2018-04-05 Chung-Ju Wu <jasonwucj@gmail.com>
9479 * config/nds32/nds32.md (subtype): New attribute.
9481 2018-04-04 Thomas Preud'homme <thomas.preudhomme@arm.com>
9484 * config/arm/arm-builtins.c (arm_expand_builtin): Change
9485 expansion to perform a bitwise AND of the argument followed by a
9486 boolean negation of the result.
9488 2018-04-04 Peter Bergner <bergner@vnet.ibm.com>
9490 PR rtl-optimization/84878
9491 * ddg.c (add_cross_iteration_register_deps): Use DF_REF_BB to determine
9492 the basic block. Assert the use reference is not artificial and that
9493 it has an associated insn.
9495 2018-04-04 Michael Matz <matz@suse.de>
9497 * builtins.c (compute_objsize): Pass correct operand
9498 to array_at_struct_end_p.
9500 2018-04-04 Richard Biener <rguenther@suse.de>
9503 * dwarf2out.c (dwarf2out_register_external_die): Peel namespaces
9504 from contexts for DINFO_LEVEL_TERSE and below.
9506 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
9508 * config/nds32/nds32-doubleword.md (move_<mode>): Require
9509 resiter_operand condition.
9510 * config/nds32/nds32.md (*move<mode>): Ditto.
9512 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
9513 Monk Chiang <sh.chiang04@gmail.com>
9515 * config/nds32/nds32.md (movmisalign<mode>): New pattern.
9517 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
9519 * config/nds32/nds32.md (movqi, movhi): Merge into mov<mode>.
9521 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
9522 Kito Cheng <kito.cheng@gmail.com>
9524 * config/nds32/nds32-md-auxiliary.c (nds32_inverse_cond_code,
9525 nds32_cond_code_str, output_cond_branch,
9526 output_cond_branch_compare_zero, nds32_expand_cbranch,
9527 nds32_expand_cstore, nds32_expand_movcc,
9528 nds32_output_cbranchsi4_equality_zero,
9529 nds32_output_cbranchsi4_equality_reg,
9530 nds32_output_cbranchsi4_equality_reg_or_const_int,
9531 nds32_output_cbranchsi4_greater_less_zero: New functions.
9532 * config/nds32/nds32-protos.h (nds32_expand_cbranch,
9533 nds32_expand_cstore, nds32_expand_movcc,
9534 nds32_output_cbranchsi4_equality_zero,
9535 nds32_output_cbranchsi4_equality_reg,
9536 nds32_output_cbranchsi4_equality_reg_or_const_int,
9537 nds32_output_cbranchsi4_greater_less_zero): Declare.
9538 * config/nds32/predicates.md (nds32_movecc_comparison_operator,
9539 nds32_rimm11s_operand): New predicates.
9540 * config/nds32/nds32.h (nds32_expand_result_type): New enum type.
9541 * config/nds32/nds32.md: Rewrite all the branch and conditional move
9544 2018-04-04 Kito Cheng <kito.cheng@gmail.com>
9546 * config/nds32/nds32-doubleword.md: Refine all the instruction type.
9547 * config/nds32/nds32.md: Ditto.
9548 * config/nds32/pipelines.md: Ditto.
9550 2018-04-04 Richard Biener <rguenther@suse.de>
9552 PR tree-optimization/85168
9553 * tree-ssa-sccvn.c (vn_reference_maybe_forwprop_address): Avoid
9554 propagating abnormals.
9556 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
9558 * config/nds32/nds32.md (enabled): Use yes/no for this attribute.
9560 2018-04-04 Chung-Ju Wu <jasonwucj@gmail.com>
9561 Kito Cheng <kito.cheng@gmail.com>
9563 * config/nds32/nds32-md-auxiliary.c (nds32_long_call_p): New function.
9564 * config/nds32/nds32-protos.h (nds32_long_call_p): Declare.
9565 * config/nds32/nds32.c (nds32_function_ok_for_sibcall): New function.
9566 (TARGET_FUNCTION_OK_FOR_SIBCALL): Define.
9567 * config/nds32/nds32.md (sibcall_internal): New.
9568 (sibcall_register): Remove.
9569 (sibcall_immediate): Remove.
9570 (sibcall_value_internal): New.
9571 (sibcall_value_register): Remove.
9572 (sibcall_value_immediate): Remove.
9573 * config/nds32/predicates.md (nds32_general_register_operand): New.
9574 (nds32_call_address_operand): New.
9576 2018-04-03 Jakub Jelinek <jakub@redhat.com>
9578 PR rtl-optimization/85167
9579 * shrink-wrap.c (move_insn_for_shrink_wrap): Don't set bb_uses and
9580 bb_defs if *split_p, instead preinitialize it to NULL.
9582 PR tree-optimization/85156
9583 * builtins.c (fold_builtin_expect): Use save_expr on arg1 to avoid
9584 evaluating the argument multiple times.
9586 2018-04-03 Bill Schmidt <wschmidt@linux.ibm.com>
9588 * config/rs6000/emmintrin.h (_mm_cvtpd_epi32): Use __vector rather
9590 (_mm_cvtpd_ps): Likewise.
9591 (_mm_cvttpd_epi32): Likewise.
9592 * config/rs6000/mmintrin.h (_mm_unpacklo_pi8): Likewise.
9593 * config/rs6000/xmmintrin.h: For strict-ANSI C++ or C11, undefine
9594 vector, pixel, and bool following altivec.h include.
9596 2018-04-03 Martin Sebor <msebor@redhat.com>
9598 * doc/extend.texi (Common Function Attributes): Clarify.
9599 (const attribute): Likewise.
9600 (pure attribute): Likewise.
9602 2018-04-03 Jakub Jelinek <jakub@redhat.com>
9605 * config/i386/i386.c (ix86_expand_vector_set): Use
9606 HOST_WIDE_INT_1U << elt instead of 1 << elt. Formatting fix.
9608 2018-04-03 Uros Bizjak <ubizjak@gmail.com>
9610 * config/i386/i386.c (emit_i387_cw_initialization): Always use logic
9611 instructions when changing rounding bits to preserve precision bits
9612 in the x87 control word.
9614 2018-04-03 Martin Liska <mliska@suse.cz>
9616 PR tree-optimization/82491
9617 * rtl.h (strip_offset_and_add): Replace += suboffset with
9618 poly_uint64 () + suboffset.
9620 2018-03-29 Martin Liska <mliska@suse.cz>
9621 Martin Jambor <mjambor@suse.cz>
9624 * ipa-cp.c (propagate_bits_across_jump_function): Bail out if
9625 param_type is not an integral or pointer type.
9627 2018-04-03 Richard Biener <rguenther@suse.de>
9629 * sese.h (recompute_all_dominators): Remove.
9631 2018-04-02 Martin Sebor <msebor@redhat.com>
9633 * doc/invoke.texi (-Wrestrict): Fix typos.
9635 2018-04-02 Jim Wilson <jimw@sifive.com>
9637 * config/riscv/riscv.h (SHIFT_COUNT_TRUNCATED): Set to zero.
9638 * config/riscv/riscv.md (<optab>si3): Use QImode shift count.
9639 (<optab>di3, <optab>si3_extend): Likewise.
9640 (<optab>si3_mask, <optab>si3_mask_1): New.
9641 (<optab>di3_mask, <optab>di3_mask_1): New.
9642 (<optab>si3_extend_mask, <optab>si3_extend_mask_1): New.
9643 (lshrsi3_zero_extend_1): Use VOIDmode shift count.
9644 * config/riscv/sync.md (atomic_test_and_set): Emit QImode shift count.
9646 2018-04-02 Gerald Pfeifer <gerald@pfeifer.com>
9648 * doc/cpp.texi (Variadic Macros): Fix line continuation in an
9651 2018-04-02 Chung-Ju Wu <jasonwucj@gmail.com>
9653 * config/nds32/nds32.c (TARGET_CANONICALIZE_COMPARISON): Define.
9654 (nds32_canonicalize_comparison): New function.
9656 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
9657 Kito Cheng <kito.cheng@gmail.com>
9658 Kuan-Lin Chen <kuanlinchentw@gmail.com>
9660 * config.gcc (nds32): Add nds32-relax-opt.o into extra_objs.
9661 * config/nds32/constants.md (unspec_volatile_element): Add
9662 UNSPEC_VOLATILE_RELAX_GROUP.
9663 * config/nds32/nds32-relax-opt.c: New file.
9664 * config/nds32/nds32-predicates.c
9665 (nds32_symbol_load_store_p): New function.
9666 * config/nds32/nds32-protos.h
9667 (nds32_symbol_load_store_p): Declare function.
9668 (make_pass_nds32_relax_opt): Declare new rtl pass function.
9669 * config/nds32/nds32.c
9670 (nds32_register_pass): New function to register pass.
9671 (nds32_register_passes): New function to register passes.
9672 * config/nds32/nds32.md (relax_group): New pattern.
9673 * config/nds32/nds32.opt (mrelax-hint): New option.
9674 * config/nds32/t-nds32 (nds32-relax-opt.o): New dependency.
9676 2018-04-01 Kito Cheng <kito.cheng@gmail.com>
9678 * config/nds32/t-nds32: Modify files dependency.
9680 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
9682 * config/nds32/nds32.h (FUNCTION_PROFILER): Output newline character.
9683 (PROFILE_HOOK): Define its implementation.
9685 2018-04-01 Chung-Ju Wu <jasonwucj@gmail.com>
9687 * config/nds32/nds32.h (WCHAR_TYPE, WCHAR_TYPE_SIZE): Use unsigned int
9688 type and 32-bit size.
9690 2018-04-01 Jakub Jelinek <jakub@redhat.com>
9693 * config/i386/sse.md (V): Add V64QI and V32HI for TARGET_AVX512F.
9694 (V_128_256): New mode iterator.
9695 (*avx512dq_vextract<shuffletype>64x2_1 splitter): New define_split.
9696 (*avx512f_vextract<shuffletype>32x4_1 splitter): Likewise.
9697 (xop_pcmov_<mode><avxsizesuffix>): Use V_128_256 mode iterator instead
9699 * config/i386/i386.c (ix86_expand_vector_set): Improve V32HImode and
9700 V64QImode expansion for !TARGET_AVX512BW && TARGET_AVX512F.
9702 2018-03-31 Segher Boessenkool <segher@kernel.crashing.org>
9705 * config/rs6000/xmmintrin.h (_mm_set_ps, _mm_max_ps): Handle (quiet)
9706 NaN inputs correctly.
9708 2018-03-30 Peter Bergner <bergner@vnet.ibm.com>
9711 * config/rs6000/vsx.md (??r): New mode attribute.
9712 (*vsx_mov<mode>_64bit): Use it.
9713 (*vsx_mov<mode>_32bit): Likewise.
9715 2018-03-30 Martin Sebor <msebor@redhat.com>
9717 PR tree-optimization/84818
9718 * builtins.c (check_access): Use warning_n.
9720 2018-03-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
9723 * config/rs6000/rs6000-string.c (expand_compare_loop): Fix redundant
9725 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Fix redundant
9728 2018-03-30 Julia Koval <julia.koval@intel.com>
9731 * x86-tune.def (movx, partial_reg_dependency): Enable for
9734 2018-03-29 Vladimir Makarov <vmakarov@redhat.com>
9737 * lra-constraints.c (process_alt_operands): Move setting
9738 this_alternative_matches below.
9740 2018-03-29 Martin Liska <mliska@suse.cz>
9743 * doc/invoke.texi: Document how LTO works with debug info.
9744 Describe auto-load support of binutils. Mention 'x86-64'
9745 as valid option value of -march option.
9747 2018-03-29 Jakub Jelinek <jakub@redhat.com>
9749 * config/i386/sse.md (<avx512>_blendm<mode>): Use <sseintprefix>.
9752 * fold-const.c (operand_equal_p): Handle DEBUG_BEGIN_STMT.
9753 For STATEMENT_LIST, pass down OEP_LEXICOGRAPHIC and maybe
9754 OEP_NO_HASH_CHECK for recursive call, to avoid exponential
9757 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
9760 * config/rs6000/rs6000.h (RS6000_BTM_POWERPC64): New define.
9761 (RS6000_BTM_COMMON): Add RS6000_BTM_POWERPC64.
9762 * config/rs6000/rs6000.c (rs6000_builtin_mask_calculate): Add support
9763 for RS6000_BTM_POWERPC64.
9764 (rs6000_invalid_builtin): Add handling for RS6000_BTM_POWERPC64
9765 (rs6000_builtin_mask_names): Add RS6000_BTM_POWERPC64.
9766 * config/rs6000/rs6000-builtin.def (BU_P7_POWERPC64_MISC_2): New macro
9771 2018-03-28 Carl Love <cel@us.ibm.com>
9774 2017-09-27 Carl Love <cel@us.ibm.com>
9776 * config/rs6000/rs6000-builtin.def (BU_FP_1MISC_1): Add define macro.
9777 (FCTID, FCTIW): Add BU_FP_MISC_1 macro expansion for builtins.
9778 * config/rs6000/rs6000.md (lrintsfsi2): Add define_insn for the
9781 2018-03-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
9783 * config/rs6000/xmmintrin.h (_mm_max_pi16): Use __vector __bool
9784 instead of __vector bool.
9785 (_mm_max_pu8): Likewise.
9786 (_mm_min_pi16): Likewise.
9788 2018-03-28 Peter Bergner <bergner@vnet.ibm.com>
9791 * config/rs6000/rs6000-builtin.def (DIVWEO): Delete macro expansion.
9792 (DIVWEUO): Likewise.
9794 (DIVDEUO): Likewise.
9795 * config/rs6000/rs6000.c (builtin_function_type): Remove support for
9796 DIVWEUO and DIVDEUO.
9797 * config/rs6000/rs6000.md (UNSPEC_DIVEO, UNSPEC_DIVEUO): Delete unspecs.
9798 (UNSPEC_DIV_EXTEND): Remove deleted unspecs.
9799 (div_extend): Likewise.
9800 * doc/extend.texi (__builtin_divweo): Remove documentation for deleted
9802 (__builtin_divweuo): Likewise.
9803 (__builtin_divdeo): Likewise.
9804 (__builtin_divdeuo): Likewise.
9806 2018-03-28 Jakub Jelinek <jakub@redhat.com>
9809 * config/i386/i386.md (*add<mode>3_carry_0, *addsi3_carry_zext_0,
9810 *sub<mode>3_carry_0, *subsi3_carry_zext_0): New patterns.
9812 PR tree-optimization/82004
9813 * gimple-match-head.c (optimize_pow_to_exp): New function.
9814 * match.pd (pow(C,x) -> exp(log(C)*x)): Wrap with #if GIMPLE.
9815 Don't fold to exp if optimize_pow_to_exp is false.
9817 2018-03-28 Martin Liska <mliska@suse.cz>
9820 * calls.c (initialize_argument_information): Fix trailing space.
9821 * common.opt: Fix typo and provide better explanation for
9822 -fsanitize-coverage option.
9823 * config/i386/i386.opt: Fix typo.
9825 2018-03-28 Jakub Jelinek <jakub@redhat.com>
9826 Martin Liska <mliska@suse.cz>
9829 * gimplify.c (asan_poison_variable): Don't do the check for
9830 gimplify_omp_ctxp here.
9831 (gimplify_decl_expr): Do it here.
9832 (gimplify_target_expr): Likewise.
9834 2018-03-28 Martin Liska <mliska@suse.cz>
9837 * config/i386/i386.c (ix86_function_arg_advance): Do not call
9838 chkp_type_bounds_count if MPX is not enabled.
9840 2018-03-27 Chung-Ju Wu <jasonwucj@gmail.com>
9842 * config/nds32/nds32.h (BRANCH_COST): Adjust cost.
9844 2018-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
9847 * config/rs6000/rs6000.c (create_complex_muldiv): New helper
9848 function to create the function decl for complex long double
9849 multiply and divide for -mabi=ieeelongdouble.
9850 (init_float128_ieee): Call it.
9852 2018-03-27 H.J. Lu <hongjiu.lu@intel.com>
9855 * config/i386/i386.c (ix86_trampoline_init): Insert ENDBR for
9856 -fcf-protection=branch -mibt.
9857 * config/i386/i386.h (TRAMPOLINE_SIZE): Increased by 4 bytes.
9859 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9862 * config/arm/arm.c (arm_valid_symbolic_address): Handle
9863 arm_word_relocations.
9865 2018-03-27 Cesar Philippidis <cesar@codesourcery.com>
9868 * config/nvptx/nvptx.c (nvptx_assemble_decl_begin): Add '[]' to
9869 extern array declarations.
9871 2018-03-27 Richard Biener <rguenther@suse.de>
9874 * match.pd ((A * C) +- (B * C) -> (A+-B) * C): Guard with
9875 explicit single_use checks.
9877 2018-03-27 Richard Biener <rguenther@suse.de>
9879 PR tree-optimization/85082
9880 * tree-ssa-sccvn.c (vn_reference_lookup_or_insert_for_pieces):
9883 2018-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
9885 * config.gcc (aarch64*-*-linux*): New TARGET_DEFAULT_ASYNC_UNWIND_TABLES
9886 * common/config/aarch64/aarch64-common.c (aarch64_optimization_table[]):
9887 Turn on fasynchronous-unwind-tables and funwind-tables.
9889 2018-03-26 Uros Bizjak <ubizjak@gmail.com>
9892 * config/i386/i386.md (*bmi_blsr_<mode>_cmp): New insn pattern.
9893 (*bmi_blsr_<mode>_ccz): Ditto.
9895 2018-03-26 Tom de Vries <tom@codesourcery.com>
9897 PR tree-optimization/85063
9898 * omp-general.c (offloading_function_p): New function. Factor out
9900 * omp-offload.c (pass_omp_target_link::gate): ... here.
9901 * omp-general.h (offloading_function_p): Declare.
9902 * tree-switch-conversion.c (build_one_array): Mark CSWTCH.x variable
9903 with attribute omp declare target for offloading functions.
9905 2018-03-24 Richard Sandiford <richard.sandiford@linaro.org>
9907 PR tree-optimization/84005
9908 * tree-data-ref.h (get_base_for_alignment): Declare.
9909 * tree-data-ref.c (get_base_for_alignment_1): New function.
9910 (get_base_for_alignment): Likewise.
9911 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Use
9912 get_base_for_alignment to find a suitable base object, instead
9913 of always using drb->base_address.
9915 2018-03-23 Jakub Jelinek <jakub@redhat.com>
9918 * emit-rtl.c (init_emit_regs): Indicate that VOIDmode MEMs don't have
9919 known size by default.
9921 2018-03-23 Vladimir Makarov <vmakarov@redhat.com>
9924 * lra-constraints.c (process_alt_operands): Don't match BLKmode
9925 and non BLKmode operands.
9927 2018-03-23 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
9930 * config/arm/arm.md (unaligned_loadhis): Remove first alternative.
9931 Clean up attributes.
9933 2018-03-23 Richard Biener <rguenther@suse.de>
9936 * dwarf2out.c (rtl_for_decl_location): Do not generate RTL early when
9937 we are going to emit early debug for LTO.
9939 2018-03-23 Jakub Jelinek <jakub@redhat.com>
9942 * function.c (match_asm_constraints_1): Don't optimize if input
9943 doesn't satisfy general_operand predicate for output's mode.
9946 * alias.c (write_dependence_p): Don't require for x_canonicalized
9947 non-VOIDmode if x has VOIDmode.
9950 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): If DECL_REGISTER (base),
9951 just don't try to optimize it rather than assert it never happens.
9953 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
9955 * config/rs6000/rs6000-builtin.def: Remove various BU_ALTIVEC_X
9956 macro expansions for definition of ST_INTERNAL_<mode> and
9957 LD_INTERNAL_<mode> builtins.
9958 * config/rs6000/rs6000-protos.h (rs6000_address_for_altivec):
9960 * config/rs6000/rs6000.c (altivec_expand_ld_builtin): Delete this
9962 (altivec_expand_st_builtin): Likewise.
9963 (altivec_expand_builtin): Remove calls to deleted functions.
9964 (rs6000_address_for_altivec): Delete this function.
9965 * config/rs6000/vector.md: Remove expands for
9966 vector_altivec_load_<mode> and vector_altivec_store_<mode>.
9968 2018-03-22 Sudakshina Das <sudi.das@arm.com>
9971 * config/arm/arm.h (machine_function): Add static_chain_stack_bytes.
9972 * config/arm/arm.c (arm_compute_static_chain_stack_bytes): Avoid
9973 re-computing once computed.
9974 (arm_expand_prologue): Compute machine->static_chain_stack_bytes.
9975 (arm_init_machine_status): Initialize
9976 machine->static_chain_stack_bytes.
9978 2018-03-22 Kelvin Nilsen <kelvin@gcc.gnu.org>
9981 * doc/extend.texi: Add four new prototypes for vec_ld.
9982 * config/rs6000/rs6000-builtin.def (LVX_V1TI): Reorder symbol
9983 definitions for more logical presentation.
9984 * config/rs6000/rs6000-c.c: (altivec_overloaded_builtins): Add
9985 entries for V1TI variants of __builtin_altivec_ld builtin.
9986 * config/rs6000/rs6000.c: (altivec_expand_lv_builtin): Add test and
9987 handling of V1TI variant of LVX icode pattern.
9988 (altivec_expand_builtin): Add case for ALTIVEC_BUILTIN_LVX_V1TI.
9989 (rs6000_gimple_fold_builtin): Likewise.
9990 (altivec_init_builtins): Add code to define
9991 __builtin_altivec_lvx_v1ti function.
9993 2018-03-22 Jakub Jelinek <jakub@redhat.com>
9996 * function.c (match_asm_constraints_1): Don't do the optimization
9997 if input isn't a REG, SUBREG, MEM or constant.
9999 2018-03-22 Tom de Vries <tom@codesourcery.com>
10001 PR tree-optimization/84956
10002 * tree-ssa-tail-merge.c (find_clusters_1): Skip bbs with
10003 bb_has_abnormal_pred.
10005 2018-03-22 Jakub Jelinek <jakub@redhat.com>
10008 * dwarf2asm.c (dw2_output_indirect_constant_1): Set
10009 DECL_INITIAL (decl) to decl at the end.
10010 * varasm.c (use_blocks_for_decl_p): Revert the 2018-03-20 change,
10011 adjust the comment.
10013 2018-03-21 Joseph Myers <joseph@codesourcery.com>
10015 * doc/extend.texi (__builtin_tgmath): Document when complex
10016 integer types are treated as _Complex _Float64.
10018 2018-03-21 Tom de Vries <tom@codesourcery.com>
10020 * doc/extend.texi (__builtin_extend_pointer): Remove pasto.
10022 2018-03-21 Jakub Jelinek <jakub@redhat.com>
10024 PR tree-optimization/84960
10025 * tree-cfg.c (remove_bb): Don't move forced labels into bb->prev_bb
10026 if it is ENTRY block, move them into single succ of ENTRY in that case.
10028 2018-03-21 Richard Sandiford <richard.sandiford@linaro.org>
10030 PR tree-optimization/84811
10031 * poly-int.h (poly_span_traits): Remove the T3 parameter and
10032 promote HOST_WIDE_INT T2 - T1 results to unsigned HOST_WIDE_INT.
10033 (maybe_in_range_p, known_in_range_p, ranges_known_overlap_p):
10034 (known_subrange_p): Update accordingly. Cast each value involved
10035 in the size comparison, rather than casting the result of the
10038 2018-03-21 Jakub Jelinek <jakub@redhat.com>
10040 PR tree-optimization/84982
10041 * gimple-ssa-store-merging.c (invert_op): Handle boolean inversion
10042 by flipping the least significant bit rather than all bits from
10043 bitpos to bitpos + bitsize - 1.
10045 2018-03-21 Nathan Sidwell <nathan@acm.org>
10047 * doc/extend.texi (Deprecated Features): Remove mention of
10048 long-deleted deprecations.
10050 2018-03-21 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
10053 * configure.ac (gcc_cv_ld_soname) <*-*-solaris2*>: Set.
10054 * configure: Regenerate.
10056 2018-03-21 Tom de Vries <tom@codesourcery.com>
10058 PR tree-optimization/83126
10059 * tree-parloops.c (num_phis): New function.
10060 (gen_parallel_loop): Detect and handle canonicalize_loop_ivs failure.
10062 2018-03-21 Nathan Sidwell <nathan@acm.org>
10064 * doc/extend.texi (Deprecated Features): Update deprecated flags,
10065 mention anon-struct/union members and trailing attributes.
10067 2018-03-21 Bin Cheng <bin.cheng@arm.com>
10069 PR tree-optimization/84969
10070 * tree-loop-distribution.c (fuse_memset_builtins): Don't reorder
10071 builtin memset partitions if they set different rhs values.
10073 2018-03-21 Jakub Jelinek <jakub@redhat.com>
10075 PR rtl-optimization/84989
10076 * simplify-rtx.c (simplify_unary_operation_1): Don't try to simplify
10077 VEC_DUPLICATE with scalar result mode.
10079 2018-03-21 Martin Liska <mliska@suse.cz>
10082 * ipa-icf.c (sem_item_optimizer::fixup_points_to_sets): Remove
10083 not intended return statement.
10085 2018-03-21 Martin Liska <mliska@suse.cz>
10088 * tree-chkp.c (CHKP_ARRAY_MAX_CHECK_STEPS): Define a new macro.
10089 (chkp_find_bound_slots_1): Limit number of iterations.
10091 2018-03-20 David H. Gutteridge <dhgutteridge@sympatico.ca>
10094 * Minor grammar fixes for x86 options.
10096 2018-03-20 Jakub Jelinek <jakub@redhat.com>
10099 * dce.c (delete_unmarked_insns): Don't remove frame related noop moves
10100 holding REG_CFA_RESTORE notes, instead turn them into a USE.
10102 2018-03-20 Peter Bergner <bergner@vnet.ibm.com>
10105 * config/rs6000/altivec.md (altivec_lvx_<mode>_2op): Delete define_insn.
10106 (altivec_lvx_<mode>_1op): Likewise.
10107 (altivec_stvx_<mode>_2op): Likewise.
10108 (altivec_stvx_<mode>_1op): Likewise.
10109 (altivec_lvx_<VM2:mode>): New define_expand.
10110 (altivec_stvx_<VM2:mode>): Likewise.
10111 (altivec_lvx_<VM2:mode>_2op_<P:mptrsize>): New define_insn.
10112 (altivec_lvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10113 (altivec_stvx_<VM2:mode>_2op_<P:mptrsize>): Likewise.
10114 (altivec_stvx_<VM2:mode>_1op_<P:mptrsize>): Likewise.
10115 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Use new expanders.
10116 (rs6000_gen_lvx): Likewise.
10117 * config/rs6000/rs6000.c (altivec_expand_lv_builtin): Likewise.
10118 (altivec_expand_stv_builtin): Likewise.
10119 (altivec_expand_builtin): Likewise.
10120 * config/rs6000/vector.md: Likewise.
10122 2018-03-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10125 * config/arm/arm.c (arm_array_mode_supported_p): Return false for
10128 2018-03-20 Richard Biener <rguenther@suse.de>
10131 * config/i386/i386.c (ix86_add_stmt_cost): Only cost
10132 sign-conversions as zero, fall back to standard scalar_stmt
10135 2018-03-20 Martin Liska <mliska@suse.cz>
10138 * predict.c (rebuild_frequencies): Handle case when we have
10139 PROFILE_ABSENT, but flag_guess_branch_prob is false.
10141 2018-03-20 Jakub Jelinek <jakub@redhat.com>
10144 * dwarf2asm.c (dw2_output_indirect_constant_1): Temporarily turn off
10145 flag_section_anchors.
10146 * varasm.c (use_blocks_for_decl_p): Remove hack for
10147 dw2_force_const_mem.
10150 * config/aarch64/aarch64.md (*aarch64_reg_<mode>3_neg_mask2): Rename
10152 (*aarch64_<optab>_reg_<mode>3_neg_mask2): ... this. If pseudos can't
10153 be created, use lowpart_subreg of operands[0] rather than operands[0]
10155 (*aarch64_reg_<mode>3_minus_mask): Rename to ...
10156 (*aarch64_ashl_reg_<mode>3_minus_mask): ... this.
10157 (*aarch64_<optab>_reg_di3_mask2): Use const_int_operand predicate
10158 and n constraint instead of aarch64_shift_imm_di and Usd.
10159 (*aarch64_reg_<optab>_minus<mode>3): Rename to ...
10160 (*aarch64_<optab>_reg_minus<mode>3): ... this.
10162 2018-03-20 Sudakshina Das <sudi.das@arm.com>
10165 * config/arm/neon.md (ashldi3_neon): Update ?s for constraints
10166 to favor GPR over NEON registers.
10167 (<shift>di3_neon): Likewise.
10169 2018-03-20 Tom de Vries <tom@codesourcery.com>
10172 * config/nvptx/nvptx.c (nvptx_single): Don't neuter bar.sync.
10173 (nvptx_process_pars): Emit bar.sync asap and alap.
10175 2018-03-20 Tom de Vries <tom@codesourcery.com>
10178 * config/nvptx/nvptx.c (prevent_branch_around_nothing): Also update
10179 seen_label if seen_label is already set.
10181 2018-03-20 Jakub Jelinek <jakub@redhat.com>
10184 * config/i386/i386.c (fold_builtin_cpu): For features above 31
10185 use __cpu_features2 variable instead of __cpu_model.__cpu_features[0].
10186 Use 1U instead of 1. Formatting fixes.
10189 * builtins.c (fold_builtin_strpbrk): For strpbrk(x, "") use type
10190 instead of TREE_TYPE (s1) for the return value.
10192 2018-03-19 Jakub Jelinek <jakub@redhat.com>
10194 PR tree-optimization/84946
10195 * gimple-ssa-store-merging.c (mem_valid_for_store_merging): Compute
10196 bitsize + bitsize in poly_uint64 rather than poly_int64.
10199 * dwarf2asm.c: Include fold-const.c.
10200 (dw2_output_indirect_constant_1): Set DECL_INITIAL (decl) to ADDR_EXPR
10201 of decl rather than decl itself.
10203 PR rtl-optimization/84643
10204 * memmodel.h (enum memmodel): Add MEMMODEL_MAX enumerator.
10206 2018-03-19 Maxim Ostapenko <m.ostapenko@samsung.com>
10209 * dwarf2asm.c (dw2_output_indirect_constant_1): Disable ASan before
10210 calling assemble_variable.
10212 2018-03-19 Sudakshina Das <sudi.das@arm.com>
10215 * config/aarch64/aarch64-simd.md (vec_cmp<mode><v_int_equiv>): Modify
10216 instructions for UNLT, UNLE, UNGT, UNGE, UNEQ, UNORDERED and ORDERED.
10218 2018-03-19 Jim Wilson <jimw@sifive.com>
10221 * config/riscv/riscv.c (riscv_function_arg_boundary): Use
10222 PREFERRED_STACK_BOUNDARY instead of STACK_BOUNDARY.
10223 (riscv_first_stack_step): Likewise.
10224 (riscv_option_override): Use STACK_BOUNDARY instead of
10225 MIN_STACK_BOUNDARY.
10226 * config/riscv/riscv.h (STACK_BOUNDARY): Renamed from
10227 MIN_STACK_BOUNDARY.
10228 (BIGGEST_ALIGNMENT): Set to 128.
10229 (PREFERRED_STACK_BOUNDARY): Renamed from STACK_BOUNDARY.
10230 (RISCV_STACK_ALIGN): Use PREFERRED_STACK_BOUNDARY instead of
10233 2018-03-19 Richard Biener <rguenther@suse.de>
10235 PR tree-optimization/84933
10236 * tree-vrp.c (set_and_canonicalize_value_range): Treat out-of-bound
10237 values as -INF/INF when canonicalizing an ANTI_RANGE to a RANGE.
10239 2018-03-19 Richard Biener <rguenther@suse.de>
10241 PR tree-optimization/84859
10242 * tree-ssa-phiopt.c (single_trailing_store_in_bb): New function.
10243 (cond_if_else_store_replacement): Perform sinking operation on
10244 single-store BBs regardless of MAX_STORES_TO_SINK setting.
10245 Generalize what a BB with a single eligible store is.
10247 2018-03-19 Richard Biener <rguenther@suse.de>
10249 PR tree-optimization/84929
10250 * tree-data-ref.c (analyze_siv_subscript_cst_affine): Guard
10251 chrec_is_positive against non-chrec arg.
10253 2018-03-19 Tamar Christina <tamar.christina@arm.com>
10256 * config/arm/arm.c (arm_can_change_mode_class): revert r258554.
10258 2018-03-18 Martin Liska <mliska@suse.cz>
10260 PR rtl-optimization/84635
10261 * regrename.c (build_def_use): Use matches_mode only when
10264 2018-03-18 Richard Sandiford <richard.sandiford@linaro.org>
10266 PR tree-optimization/84913
10267 * tree-vect-loop.c (vectorizable_reduction): Don't try to
10268 vectorize chains of COND_EXPRs.
10270 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
10272 * config/nds32/nds32.h (MAX_REGS_PER_ADDRESS): Fix the value.
10274 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
10276 * config/nds32/nds32.h (LOGICAL_OP_NON_SHORT_CIRCUIT): Define.
10278 2018-03-18 Chung-Ju Wu <jasonwucj@gmail.com>
10280 * config/nds32/nds32.h (CLZ_DEFINED_VALUE_AT_ZERO): Define.
10282 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
10283 Kito Cheng <kito.cheng@gmail.com>
10285 * config/nds32/nds32-protos.h (nds32_adjust_reg_alloc_order): Declare.
10286 * config/nds32/nds32.c (nds32_reg_alloc_order_for_speed): New array.
10287 (nds32_adjust_reg_alloc_order): New function.
10288 * config/nds32/nds32.h (ADJUST_REG_ALLOC_ORDER): Define.
10290 2018-03-17 Kito Cheng <kito.cheng@gmail.com>
10292 * config/nds32/nds32.c (nds32_asm_output_mi_thunk,
10293 nds32_print_operand, nds32_print_operand_address): Use
10294 HOST_WIDE_INT_PRINT_DEC instead.
10296 2018-03-17 Chung-Ju Wu <jasonwucj@gmail.com>
10298 * config/nds32/nds32.c (nds32_register_priority): Modify cost.
10300 2018-03-17 Jakub Jelinek <jakub@redhat.com>
10303 * config/i386/i386.c (initial_ix86_tune_features,
10304 initial_ix86_arch_features): Use unsigned HOST_WIDE_INT rather than
10305 unsigned long long.
10306 (set_ix86_tune_features): Change ix86_tune_mask from unsigned int
10307 to unsigned HOST_WIDE_INT, initialize to HOST_WIDE_INT_1U << ix86_tune
10308 rather than 1u << ix86_tune. Formatting fix.
10309 (ix86_option_override_internal): Change ix86_arch_mask from
10310 unsigned int to unsigned HOST_WIDE_INT, initialize to
10311 HOST_WIDE_INT_1U << ix86_arch rather than 1u << ix86_arch.
10312 (ix86_function_specific_restore): Likewise.
10314 2018-03-16 Jakub Jelinek <jakub@redhat.com>
10317 * postreload.c (reload_combine_recognize_pattern): Perform
10318 INTVAL addition in unsigned HOST_WIDE_INT type to avoid UB and
10319 truncate_int_for_mode the result for the destination's mode.
10322 * hsa-gen.c (mem_type_for_type): Fix comment typo.
10323 * tree-vect-loop-manip.c (vect_create_cond_for_niters_checks):
10325 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
10328 2018-03-16 Vladimir Makarov <vmakarov@redhat.com>
10331 * lra-assigns.c (lra_split_hard_reg_for): Don't use
10332 regno_allocno_class_array and sorted_pseudos.
10333 * lra-constraints.c (spill_hard_reg_in_range): Ignore hard regs in
10334 insns where regno is used.
10336 2018-03-16 Martin Liska <mliska@suse.cz>
10339 * multiple_target.c (create_dispatcher_calls): Redirect
10340 reference in the symbol table.
10342 2018-03-16 Martin Liska <mliska@suse.cz>
10345 * multiple_target.c (create_dispatcher_calls): Redirect also
10348 2018-03-16 Jakub Jelinek <jakub@redhat.com>
10352 * tree.h (TARGET_EXPR_NO_ELIDE): Define.
10353 * gimplify.c (gimplify_modify_expr_rhs): Don't elide TARGET_EXPRs with
10354 TARGET_EXPR_NO_ELIDE flag set unless *expr_p is INIT_EXPR.
10356 2018-03-16 Julia Koval <julia.koval@intel.com>
10358 * doc/invoke.texi (Skylake Server): Add CLWB.
10359 Cannonlake): Remove CLWB.
10361 2018-03-16 Jakub Jelinek <jakub@redhat.com>
10363 PR tree-optimization/84841
10364 * tree-ssa-reassoc.c (INTEGER_CONST_TYPE): Change to 1 << 4 from
10366 (FLOAT_ONE_CONST_TYPE): Define.
10367 (constant_type): Return FLOAT_ONE_CONST_TYPE for -1.0 and 1.0.
10368 (sort_by_operand_rank): Put entries with higher constant_type last
10369 rather than first to match comments.
10371 2018-03-15 Sandra Loosemore <sandra@codesourcery.com>
10373 * config/nios2/nios2.md (movsi_internal): Fix thinko in
10376 2018-03-15 Jakub Jelinek <jakub@redhat.com>
10379 * calls.c (expand_call): For TREE_ADDRESSABLE rettype ignore alignment
10380 check and use address of target always.
10382 2018-03-15 H.J. Lu <hongjiu.lu@intel.com>
10385 * config/i386/i386.c (indirect_thunk_needed): Update comments.
10386 (indirect_thunk_bnd_needed): Likewise.
10387 (indirect_thunks_used): Likewise.
10388 (indirect_thunks_bnd_used): Likewise.
10389 (indirect_return_needed): New.
10390 (indirect_return_bnd_needed): Likewise.
10391 (output_indirect_thunk_function): Add a bool argument for
10393 (output_indirect_thunk_function): Don't generate alias for
10394 function return thunk.
10395 (ix86_code_end): Call output_indirect_thunk_function to generate
10396 function return thunks.
10397 (ix86_output_function_return): Set indirect_return_bnd_needed
10398 and indirect_return_needed instead of indirect_thunk_bnd_needed
10399 and indirect_thunk_needed.
10401 2018-03-15 Olga Makhotina <olga.makhotina@intel.com>
10403 * config/i386/sgxintrin.h (_enclv_u32): New intrinsic.
10404 (__enclv_bc, __enclv_cd, __enclv_generic): New definitions.
10405 (ERDINFO, ETRACKC, ELDBC, ELDUC): New leaves.
10407 2018-03-15 David Malcolm <dmalcolm@redhat.com>
10408 Paul Hua <paul.hua.gm@gmail.com>
10411 * gcc.dg/fixits-pr84852-1.c: Fix filename in dg-regexp.
10413 2018-03-15 Segher Boessenkool <segher@kernel.crashing.org>
10415 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add back the
10416 TARGET_DOUBLE_FLOAT and TARGET_SINGLE_FLOAT conditions on the DFmode
10417 resp. SFmode cases.
10419 2018-03-15 Tamar Christina <tamar.christina@arm.com>
10422 * config/arm/arm.c (arm_can_change_mode_class): Use GET_MODE_UNIT_SIZE
10423 instead of GET_MODE_SIZE when comparing Units.
10425 2018-03-15 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
10428 * varasm.c (hash_section): Return an unchangeble hash value
10429 * config/aarch64/aarch64.c (aarch64_use_blocks_for_constant_p):
10430 Return !aarch64_can_use_per_function_literal_pools_p ().
10432 2018-03-15 Jakub Jelinek <jakub@redhat.com>
10435 * optabs.c (emit_conditional_move): Pass address of cmode's copy
10436 rather than address of cmode as last argument to prepare_cmp_insn.
10438 2018-03-15 Julia Koval <julia.koval@intel.com>
10440 * config/i386/i386.c (F_AVX512VBMI2, F_GFNI, F_VPCLMULQDQ,
10441 F_AVX512VNNI, F_AVX512BITALG): New.
10443 2018-03-14 John David Anglin <danglin@gcc.gnu.org>
10446 * config/pa/pa.c (pa_emit_move_sequence): Always emit secondary reload
10447 insn for floating-point loads and stores.
10449 2018-03-14 Carl Love <cel@us.ibm.com>
10451 * config/rs6000/rs6000-c.c: Add macro definitions for
10452 ALTIVEC_BUILTIN_VEC_PERMXOR.
10453 * config/rs6000/rs6000.h: Add #define for vec_permxor builtin.
10454 * config/rs6000/rs6000-builtin.def: Add macro expansions for VPERMXOR.
10455 * config/rs6000/altivec.md (altivec_vpermxor): New define expand.
10456 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Add case
10458 * config/doc/extend.texi: Add prototypes for vec_permxor.
10460 2018-03-14 David Malcolm <dmalcolm@redhat.com>
10463 * diagnostic-show-locus.c (class layout_point): Convert m_line
10464 from int to linenum_type.
10465 (line_span::comparator): Use linenum "compare" function when
10466 comparing line numbers.
10467 (test_line_span): New function.
10468 (layout_range::contains_point): Convert param "row" from int to
10470 (layout_range::intersects_line_p): Likewise.
10471 (layout::will_show_line_p): Likewise.
10472 (layout::print_source_line): Likewise.
10473 (layout::should_print_annotation_line_p): Likewise.
10474 (layout::print_annotation_line): Likewise.
10475 (layout::print_leading_fixits): Likewise.
10476 (layout::annotation_line_showed_range_p): Likewise.
10477 (struct line_corrections): Likewise for field m_row.
10478 (line_corrections::line_corrections): Likewise for param "row".
10479 (layout::print_trailing_fixits): Likewise.
10480 (layout::get_state_at_point): Likewise.
10481 (layout::get_x_bound_for_row): Likewise.
10482 (layout::print_line): Likewise.
10483 (diagnostic_show_locus): Likewise for locals "last_line" and "row".
10484 (selftest::diagnostic_show_locus_c_tests): Call test_line_span.
10485 * input.c (selftest::test_linenum_comparisons): New function.
10486 (selftest::input_c_tests): Call it.
10487 * selftest.c (selftest::test_assertions): Test ASSERT_GT,
10488 ASSERT_GT_AT, ASSERT_LT, and ASSERT_LT_AT.
10489 * selftest.h (ASSERT_GT): New macro.
10490 (ASSERT_GT_AT): New macro.
10491 (ASSERT_LT): New macro.
10492 (ASSERT_LT_AT): New macro.
10494 2018-03-14 Segher Boessenkool <segher@kernel.crashing.org>
10496 PR rtl-optimization/84780
10497 * combine.c (distribute_links): Don't make a link based on pc_rtx.
10499 2018-03-14 Martin Liska <mliska@suse.cz>
10501 * tree.c (record_node_allocation_statistics): Use
10502 get_stats_node_kind.
10503 (get_stats_node_kind): New function extracted from
10504 record_node_allocation_statistics.
10505 (free_node): Use get_stats_node_kind.
10507 2018-03-14 Richard Biener <rguenther@suse.de>
10509 * tree-ssa-pre.c (compute_antic_aux): Remove code that asserts
10510 that the value-set of ANTIC_IN doesn't grow.
10513 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
10515 (BB_VISITED_WITH_VISITED_SUCCS): New define.
10516 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
10518 2018-03-14 Julia Koval <julia.koval@intel.com>
10520 * config.gcc (icelake-client, icelake-server): New.
10522 * config/i386/i386.c (initial_ix86_tune_features): Extend to 64 bit.
10523 (initial_ix86_arch_features): Ditto.
10524 (PTA_SKYLAKE): Add SGX.
10525 (PTA_ICELAKE): Remove.
10526 (PTA_ICELAKE_CLIENT): New.
10527 (PTA_ICELAKE_SERVER): New.
10528 (ix86_option_override_internal): Split up icelake on icelake client and
10530 (get_builtin_code_for_version): Ditto.
10531 (fold_builtin_cpu): Ditto.
10532 * config/i386/driver-i386.c (config/i386/driver-i386.c): Ditto.
10533 * config/i386/i386-c.c (ix86_target_macros_internal): Ditto
10534 * config/i386/i386.h (processor_type): Ditto.
10535 * doc/invoke.texi: Ditto.
10537 2018-03-14 Jakub Jelinek <jakub@redhat.com>
10540 * sanopt.c (maybe_optimize_ubsan_ptr_ifn): Handle also
10541 INTEGER_CST offset, add it together with bitpos / 8 and
10542 sign extend based on POINTER_SIZE.
10546 2017-04-20 Uros Bizjak <ubizjak@gmail.com>
10549 * config/i386/constraints.md (Yc): New register constraint.
10550 * config/i386/i386.md (*float<SWI48:mode><MODEF:mode>2_mixed):
10551 Use Yc constraint for alternative 2 of operand 0. Remove
10552 preferred_for_speed attribute.
10554 2018-03-14 Richard Biener <rguenther@suse.de>
10556 PR tree-optimization/84830
10557 * tree-ssa-pre.c (compute_antic_aux): Intersect the new ANTIC_IN
10558 with the old one to avoid oscillations.
10560 2018-03-13 Vladimir Makarov <vmakarov@redhat.com>
10563 * lra-assigns.c (find_all_spills_for): Ignore uninteresting
10565 (assign_by_spills): Return a flag of reload assignment failure.
10566 Do not process the reload assignment failures. Do not spill other
10567 reload pseudos if they has the same reg class. Update n if
10569 (lra_assign): Add a return arg. Set up from the result of
10570 assign_by_spills call.
10571 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
10572 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
10573 usage_insns if it is not NULL.
10574 (spill_hard_reg_in_range): New function.
10575 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
10576 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
10577 function prototypes.
10578 (lra_assign): Change prototype.
10579 * lra.c (lra): Add code to deal with fails by splitting hard reg
10582 2018-03-01 Palmer Dabbelt <palmer@sifive.com>
10584 * config/riscv/riscv.opt (mrelax): New option.
10585 * config/riscv/riscv.c (riscv_file_start): Emit ".option
10586 "norelax" when riscv_mrelax is disabled.
10587 * doc/invoke.texi (RISC-V): Document "-mrelax" and "-mno-relax".
10589 2018-03-13 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
10592 * config/rs6000/rs6000.c (rs6000_reassociation_width): Disable parallel
10593 reassociation for int modes.
10595 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
10597 * tree-vect-loop-manip.c (vect_maybe_permute_loop_masks):
10598 Reverse the choice between VEC_UNPACK_LO_EXPR and VEC_UNPACK_HI_EXPR
10600 * config/aarch64/iterators.md (hi_lanes_optab): New int attribute.
10601 * config/aarch64/aarch64-sve.md
10602 (*aarch64_sve_<perm_insn><perm_hilo><mode>): Rename to...
10603 (aarch64_sve_<perm_insn><perm_hilo><mode>): ...this.
10604 (*extend<mode><Vwide>2): Rename to...
10605 (aarch64_sve_extend<mode><Vwide>2): ...this.
10606 (vec_unpack<su>_<perm_hilo>_<mode>): Turn into a define_expand,
10607 renaming the old pattern to...
10608 (aarch64_sve_punpk<perm_hilo>_<mode>): ...this. Only define
10610 (vec_unpack<su>_<perm_hilo>_<SVE_BHSI:mode>): Turn into a
10611 define_expand, renaming the old pattern to...
10612 (aarch64_sve_<su>unpk<perm_hilo>_<SVE_BHSI:mode>): ...this.
10613 (*vec_unpacku_<perm_hilo>_<mode>_no_convert): Delete.
10614 (vec_unpacks_<perm_hilo>_<mode>): Take BYTES_BIG_ENDIAN into
10615 account when deciding which SVE instruction the optab should use.
10616 (vec_unpack<su_optab>_float_<perm_hilo>_vnx4si): Likewise.
10618 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
10620 * config/aarch64/aarch64.md (V4_REGNUM, V8_REGNUM, V12_REGNUM)
10621 (V20_REGNUM, V24_REGNUM, V28_REGNUM, P1_REGNUM, P2_REGNUM, P3_REGNUM)
10622 (P4_REGNUM, P5_REGNUM, P6_REGNUM, P8_REGNUM, P9_REGNUM, P10_REGNUM)
10623 (P11_REGNUM, P12_REGNUM, P13_REGNUM, P14_REGNUM): New define_constants.
10624 (tlsdesc_small_<mode>): Turn a define_expand and use
10625 tlsdesc_small_sve_<mode> for SVE. Rename original define_insn to...
10626 (tlsdesc_small_advsimd_<mode>): ...this.
10627 (tlsdesc_small_sve_<mode>): New pattern.
10629 2018-03-13 Richard Sandiford <richard.sandiford@linaro.org>
10631 * config/aarch64/iterators.md (UNSPEC_SMUL_HIGHPART)
10632 (UNSPEC_UMUL_HIGHPART): New constants.
10633 (MUL_HIGHPART): New int iteraor.
10634 (su): Handle UNSPEC_SMUL_HIGHPART and UNSPEC_UMUL_HIGHPART.
10635 * config/aarch64/aarch64-sve.md (<su>mul<mode>3_highpart): New
10637 (*<su>mul<mode>3_highpart): New define_insn.
10639 2018-03-13 Eric Botcazou <ebotcazou@adacore.com>
10642 * ipa-devirt.c (odr_subtypes_equivalent_p): Do not get the ODR type of
10645 2018-03-13 Martin Liska <mliska@suse.cz>
10648 * (sem_item_optimizer::sem_item_optimizer): Initialize new
10650 (sem_item_optimizer::~sem_item_optimizer): Release it.
10651 (sem_item_optimizer::merge_classes): Register variable aliases.
10652 (sem_item_optimizer::fixup_pt_set): New function.
10653 (sem_item_optimizer::fixup_points_to_sets): Likewise.
10654 * ipa-icf.h: Declare new variables and functions.
10656 2018-03-13 Jakub Jelinek <jakub@redhat.com>
10658 PR middle-end/84834
10659 * match.pd ((A & C) != 0 ? D : 0): Use INTEGER_CST@2 instead of
10660 integer_pow2p@2 and test integer_pow2p in condition.
10661 (A < 0 ? C : 0): Similarly for @1.
10663 PR middle-end/84831
10664 * stmt.c (parse_output_constraint): If the CONSTRAINT_LEN (*p, p)
10665 characters starting at p contain '\0' character, don't look beyond
10669 * config/i386/i386.md (round<mode>2): For 387 fancy math, disable
10670 pattern if -ftrapping-math -fno-fp-int-builtin-inexact.
10673 * reg-stack.c (change_stack): Change update_end var from int to
10674 rtx_insn *, if non-NULL don't update just BB_END (current_block), but
10675 also call set_block_for_insn on the newly added insns and rescan.
10678 * config/i386/sse.md (sse2_loadhpd): Use Yv constraint rather than v
10679 on the last operand.
10682 * tree.c (stabilize_reference_1): Return save_expr (e) for
10683 STATEMENT_LIST even if it doesn't have side-effects.
10685 2018-03-12 Jonathan Wakely <jwakely@redhat.com>
10687 * doc/invoke.texi (-mclflushopt): Fix spelling of option.
10689 2018-03-12 Renlin Li <renlin.li@arm.com>
10691 * config/aarch64/aarch64.md (movhf_aarch64): Fix mode argument to
10692 aarch64_output_scalar_simd_mov_immediate.
10694 2018-03-12 Martin Sebor <msebor@redhat.com>
10696 PR tree-optimization/83456
10697 * gimple-fold.c (gimple_fold_builtin_memory_op): Avoid warning
10698 for perfectly overlapping calls to memcpy.
10699 (gimple_fold_builtin_memory_chk): Same.
10700 (gimple_fold_builtin_strcpy): Handle no-warning.
10701 (gimple_fold_builtin_stxcpy_chk): Same.
10702 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Handle no-warning.
10704 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
10706 * config/rs6000/rs6000.c (abi_v4_pass_in_fpr): Add bool "named"
10707 parameter. Use it for SFmode.
10708 (rs6000_function_arg_advance_1): Adjust.
10709 (rs6000_function_arg): Adjust.
10710 (rs6000_gimplify_va_arg): Pass false for that new parameter.
10712 2018-03-12 Segher Boessenkool <segher@kernel.crashing.org>
10714 PR rtl-optimization/84169
10715 PR rtl-optimization/84780
10716 * combine.c (can_combine_p): Check for a 2-insn combination whether
10717 the destination register is used between the two insns, too.
10719 2018-03-12 Richard Biener <rguenther@suse.de>
10721 PR tree-optimization/84803
10722 * tree-if-conv.c (ifcvt_memrefs_wont_trap): Don't do anything
10723 for refs DR analysis didn't process.
10725 2018-03-12 Richard Biener <rguenther@suse.de>
10727 PR tree-optimization/84777
10728 * tree-ssa-loop-ch.c (should_duplicate_loop_header_p): For
10729 force-vectorize loops ignore whether we are optimizing for size.
10731 2018-03-12 Chung-Ju Wu <jasonwucj@gmail.com>
10733 * config/nds32/nds32.c (nds32_md_asm_adjust): New function.
10734 (TARGET_MD_ASM_ADJUST): Define.
10736 2018-03-12 Monk Chiang <sh.chiang04@gmail.com>
10737 Kito Cheng <kito.cheng@gmail.com>
10738 Chung-Ju Wu <jasonwucj@gmail.com>
10740 * config/nds32/nds32.c (nds32_compute_stack_frame,
10741 nds32_emit_stack_push_multiple, nds32_emit_stack_pop_multiple,
10742 nds32_emit_stack_v3push, nds32_emit_stack_v3pop,
10743 nds32_emit_adjust_frame, nds32_expand_prologue, nds32_expand_epilogue,
10744 nds32_expand_prologue_v3push, nds32_expand_epilogue_v3pop): Refine.
10745 * config/nds32/nds32.h (NDS32_FIRST_CALLEE_SAVE_GPR_REGNUM,
10746 NDS32_LAST_CALLEE_SAVE_GPR_REGNUM, NDS32_V3PUSH_AVAILABLE_P): New.
10747 * config/nds32/nds32.md (prologue, epilogue): Use macro
10748 NDS32_V3PUSH_AVAILABLE_P to do checking.
10750 2018-03-11 Jakub Jelinek <jakub@redhat.com>
10753 * dwarf2out.c (gen_enumeration_type_die): Don't guard adding
10754 DW_AT_declaration for ENUM_IS_OPAQUE on -gdwarf-4 or -gno-strict-dwarf,
10755 but on TYPE_SIZE. Don't do anything for ENUM_IS_OPAQUE if not creating
10756 a new die. Don't set TREE_ASM_WRITTEN if ENUM_IS_OPAQUE. Guard
10757 addition of most attributes on !orig_type_die or the attribute not
10758 being present already. Assert TYPE_VALUES is NULL for ENUM_IS_OPAQUE.
10760 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
10761 Chung-Ju Wu <jasonwucj@gmail.com>
10763 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): Modify to define
10764 __NDS32_VH__ macro.
10765 * config/nds32/nds32.opt (mvh): New option.
10767 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
10768 Chung-Ju Wu <jasonwucj@gmail.com>
10770 * config/nds32/nds32-protos.h (nds32_cpu_cpp_builtins): Declare
10772 * config/nds32/nds32.c (nds32_cpu_cpp_builtins): New function.
10773 * config/nds32/nds32.h (TARGET_CPU_CPP_BUILTINS): Modify its
10776 2018-03-11 Kito Cheng <kito.cheng@gmail.com>
10777 Chung-Ju Wu <jasonwucj@gmail.com>
10779 * config/nds32/nds32-memory-manipulation.c (nds32_expand_strlen): New
10781 * config/nds32/nds32-multiple.md (strlensi): New pattern.
10782 * config/nds32/nds32-protos.h (nds32_expand_strlen): Declare function.
10784 2018-03-11 Monk Chiang <sh.chiang04@gmail.com>
10785 Kito Cheng <kito.cheng@gmail.com>
10786 Chung-Ju Wu <jasonwucj@gmail.com>
10788 * config/nds32/constants.md (unspec_element): Add UNSPEC_FFB,
10789 UNSPEC_FFMISM and UNSPEC_FLMISM.
10790 * config/nds32/nds32-intrinsic.c (bdesc_2arg): Add builtin description
10791 for ffb, ffmism and flmism.
10792 * config/nds32/nds32-intrinsic.md (unspec_ffb): Define new pattern.
10793 (unspec_ffmism): Ditto.
10794 (unspec_flmism): Ditto.
10795 (nds32_expand_builtin_impl): Check if string extension is available.
10796 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_FFB,
10797 NDS32_BUILTIN_FFMISM and NDS32_BUILTIN_FLMISM.
10799 2018-03-10 Vladimir Makarov <vmakarov@redhat.com>
10802 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
10805 * lra-assigns.c (assign_by_spills): Return a flag of reload
10806 assignment failure. Do not process the reload assignment
10807 failures. Do not spill other reload pseudos if they has the same
10809 (lra_assign): Add a return arg. Set up from the result of
10810 assign_by_spills call.
10811 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
10812 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
10813 usage_insns if it is not NULL.
10814 (spill_hard_reg_in_range): New function.
10815 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
10816 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
10817 function prototypes.
10818 (lra_assign): Change prototype.
10819 * lra.c (lra): Add code to deal with fails by splitting hard reg
10822 2018-03-10 H.J. Lu <hongjiu.lu@intel.com>
10825 * config/i386/i386.opt: Replace Enforcment with Enforcement.
10827 2018-03-10 Alexandre Oliva <aoliva@redhat.com>
10830 * dwarf2out.h (dw_val_class): Add dw_val_class_symview.
10831 (dw_val_node): Add val_symbolic_view.
10832 * dwarf2out.c (dw_line_info_table): Add symviews_since_reset.
10833 (symview_upper_bound): New.
10834 (new_line_info_table): Initialize symviews_since_reset.
10835 (dwarf2out_source_line): Count symviews_since_reset and set
10836 symview_upper_bound.
10837 (dw_val_equal_p): Handle symview.
10838 (add_AT_symview): New.
10839 (print_dw_val): Handle symview.
10840 (attr_checksum, attr_checksum_ordered): Likewise.
10841 (same_dw_val_p, size_of_die): Likewise.
10842 (value_format, output_die): Likewise.
10843 (add_high_low_attributes): Use add_AT_symview for entry_view.
10844 (dwarf2out_finish): Reset symview_upper_bound, clear
10847 2018-03-09 Peter Bergner <bergner@vnet.ibm.com>
10850 * config/rs6000/rs6000.c (rs6000_offsettable_memref_p): New prototype.
10851 Add strict argument and use it.
10852 (rs6000_split_multireg_move): Update for new strict argument.
10853 (mem_operand_gpr): Disallow all non-offsettable addresses.
10854 * config/rs6000/rs6000.md (*movdi_internal64): Use YZ constraint.
10856 2018-03-09 Jakub Jelinek <jakub@redhat.com>
10859 * config/rs6000/rs6000.c (rs6000_gimplify_va_arg): Mark va_arg_tmp
10860 temporary TREE_ADDRESSABLE before gimplification of BUILT_IN_MEMCPY.
10861 * config/powerpcspe/powerpcspe.c (rs6000_gimplify_va_arg): Likewise.
10864 * tree-inline.c (copy_tree_body_r): For INDIRECT_REF of a remapped
10865 decl, use remap_type if we want to use the type.
10867 2018-03-09 Martin Sebor <msebor@redhat.com>
10869 PR tree-optimization/84526
10870 * gimple-ssa-warn-restrict.c (builtin_memref::set_base_and_offset):
10872 (builtin_access::generic_overlap): Be prepared to handle non-array
10875 2018-03-09 Alexandre Oliva <aoliva@redhat.com>
10877 PR rtl-optimization/84682
10878 * lra-constraints.c (process_address_1): Check is_address flag
10879 for address constraints.
10880 (process_alt_operands): Likewise.
10881 * lra.c (lra_set_insn_recog_data): Pass asm operand locs to
10882 preprocess_constraints.
10883 * recog.h (preprocess_constraints): Add oploc parameter.
10885 * recog.c (preprocess_constraints): Test address_operand for
10886 CT_ADDRESS constraints.
10888 2018-03-09 Vladimir Makarov <vmakarov@redhat.com>
10891 * lra-assigns.c (assign_by_spills): Return a flag of reload
10892 assignment failure. Do not process the reload assignment
10893 failures. Do not spill other reload pseudos if they has the same
10895 (lra_assign): Add a return arg. Set up from the result of
10896 assign_by_spills call.
10897 (find_reload_regno_insns, lra_split_hard_reg_for): New functions.
10898 * lra-constraints.c (split_reg): Add a new arg. Use it instead of
10899 usage_insns if it is not NULL.
10900 (spill_hard_reg_in_range): New function.
10901 (split_if_necessary, inherit_in_ebb): Pass a new arg to split_reg.
10902 * lra-int.h (spill_hard_reg_in_range, lra_split_hard_reg_for): New
10903 function prototypes.
10904 (lra_assign): Change prototype.
10905 * lra.c (lra): Add code to deal with fails by splitting hard reg
10908 2018-03-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10911 * common/config/arm/arm-common.c (arm_parse_arch_option_name):
10912 Accept complain bool parameter. Only emit errors if it is true.
10913 (arm_parse_cpu_option_name): Likewise.
10914 (arm_target_thumb_only): Adjust callers of the above.
10915 * config/arm/arm-protos.h (arm_parse_cpu_option_name): Adjust
10916 prototype to take a default true bool parameter.
10917 (arm_parse_arch_option_name): Likewise.
10919 2018-03-09 David Malcolm <dmalcolm@redhat.com>
10920 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
10924 * Makefile.in (LD_VERSION_SCRIPT_OPTION, LD_SONAME_OPTION): New.
10925 * configure: Regenerate.
10926 * configure.ac ("linker --version-script option"): New.
10927 ("linker soname option"): New.
10929 2018-03-09 Richard Biener <rguenther@suse.de>
10931 PR tree-optimization/84775
10932 * tree-if-conv.c (add_bb_predicate_gimplified_stmts): Delink
10933 immediate uses of predicate stmts and mark them modified.
10936 PR tree-optimization/84178
10937 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
10939 (version_loop_for_if_conversion): Delay update_ssa call.
10940 (tree_if_conversion): Delay update_ssa until after predicate
10943 2018-03-09 Eric Botcazou <ebotcazou@adacore.com>
10946 * config/i386/winnt.c (i386_pe_seh_cold_init): Use small pre-allocation
10947 when the function accesses prior frames.
10949 2018-03-08 Jakub Jelinek <jakub@redhat.com>
10952 * dwarf2out.c (dw_loc_list): If list && loc_list->first->next, call
10953 gen_llsym, otherwise call maybe_gen_llsym.
10955 PR inline-asm/84742
10956 * recog.c (asm_operand_ok): Return 0 if multi-character constraint
10957 has ',' character inside of it.
10959 2018-03-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
10962 * config/aarch64/aarch64.md (*compare_cstore<mode>_insn): Mark pattern
10963 as clobbering CC_REGNUM.
10965 2018-03-08 Richard Biener <rguenther@suse.de>
10967 PR middle-end/84552
10968 * tree-scalar-evolution.c: Include tree-into-ssa.h.
10969 (follow_copies_to_constant): Do not follow SSA names registered
10972 2018-03-08 Richard Biener <rguenther@suse.de>
10974 PR tree-optimization/84178
10975 * tree-if-conv.c (combine_blocks): Move insert_gimplified_predicates
10977 (version_loop_for_if_conversion): Delay update_ssa call.
10978 (tree_if_conversion): Delay update_ssa until after predicate
10981 2018-03-08 David Malcolm <dmalcolm@redhat.com>
10983 PR tree-optimization/84178
10984 * tree-if-conv.c (release_bb_predicate): Remove the
10985 the assertion that the stmts have NULL use_ops.
10986 Discard the statements, asserting that they haven't
10987 yet been added to a BB.
10989 2018-03-08 Richard Biener <rguenther@suse.de>
10991 PR tree-optimization/84746
10992 * tree-ssa-pre.c (find_leader_in_sets): Deal with SET1 being NULL.
10993 (phi_translate): Pass in destination ANTIC_OUT set.
10994 (phi_translate_1): Likewise. For a simplified result lookup
10995 a leader in ANTIC_OUT and AVAIL_OUT, not the ANTIC_IN sets.
10996 (phi_translate_set): Adjust.
10997 (do_pre_regular_insertion): Likewise.
10998 (do_pre_partial_partial_insertion): Likewise.
11000 2018-03-08 Martin Liska <mliska@suse.cz>
11002 PR gcov-profile/84735
11003 * doc/gcov.texi: Document usage of profile files.
11004 * gcov-io.h: Document changes in the format.
11006 2018-03-08 Alexandre Oliva <aoliva@redhat.com>
11010 * dwarf2out.c (struct dw_line_info_table): Update comments for
11012 (FORCE_RESET_NEXT_VIEW): New.
11013 (FORCE_RESETTING_VIEW_P): New.
11014 (RESETTING_VIEW_P): Check for -1 too.
11015 (ZERO_VIEW_P): Likewise.
11016 (new_line_info_table): Force-reset next view.
11017 (dwarf2out_begin_function): Likewise.
11018 (dwarf2out_source_line): Simplify zero_view_p initialization.
11019 Test FORCE_RESETTING_VIEW_P and RESETTING_VIEW_P instead of
11020 view directly. Omit view when omitting .loc at line 0.
11022 2018-03-08 Jakub Jelinek <jakub@redhat.com>
11024 PR tree-optimization/84740
11025 * tree-switch-conversion.c (process_switch): Call build_constructors
11026 only if info.phi_count is non-zero.
11028 PR tree-optimization/84739
11029 * tree-tailcall.c (find_tail_calls): Check call arguments against
11030 DECL_ARGUMENTS (current_function_decl) rather than
11031 DECL_ARGUMENTS (func) when checking for tail recursion.
11033 2018-03-07 Jakub Jelinek <jakub@redhat.com>
11035 * doc/contrib.texi: Add entries for Martin Liska, David Malcolm,
11036 Marek Polacek, extend Vladimir Makarov's, Jonathan Wakely's and
11037 Volker Reichelt's entry and add entries for people that perform
11038 GCC fuzzy testing and report numerous bugs.
11040 2018-03-07 Segher Boessenkool <segher@kernel.crashing.org>
11043 * config/rs6000/rs6000.c (rs6000_elf_in_small_data_p): Don't put
11044 readonly data in sdata, if that is disabled.
11045 * config/rs6000/sysv4.opt (mreadonly-in-sdata): New option.
11046 * doc/invoke.texi (RS/6000 and PowerPC Options): Document
11047 -mreadonly-in-sdata option.
11049 2018-03-07 Martin Sebor <msebor@redhat.com>
11051 PR tree-optimization/84468
11052 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Consider successor
11053 basic block when looking for nul assignment.
11055 2018-03-07 Eric Botcazou <ebotcazou@adacore.com>
11058 * except.h (output_function_exception_table): Adjust prototype.
11059 * except.c (output_function_exception_table): Remove FNNAME parameter
11060 and add SECTION parameter. Ouput one part of the table at a time.
11061 * final.c (final_scan_insn_1) <NOTE_INSN_SWITCH_TEXT_SECTIONS>: Output
11062 the first part of the exception table and emit unwind directives.
11063 * config/i386/i386-protos.h (i386_pe_end_cold_function): Declare.
11064 (i386_pe_seh_cold_init): Likewise.
11065 * config/i386/cygming.h (ASM_DECLARE_COLD_FUNCTION_NAME): New macro.
11066 (ASM_DECLARE_COLD_FUNCTION_SIZE): Likewise.
11067 * config/i386/i386.c (x86_expand_epilogue): Fix wording in comment.
11068 (ix86_output_call_insn): Emit a nop in one more case for SEH.
11069 * config/i386/winnt.c: Include except.h.
11070 (struct seh_frame_state): Add reg_offset, after_prologue and
11071 in_cold_section fields.
11072 (i386_pe_seh_end_prologue): Set seh->after_prologue.
11073 (i386_pe_seh_cold_init): New function.
11074 (i386_pe_seh_fini): Add COLD parameter and bail out if it is not equal
11075 to seh->in_cold_section.
11076 (seh_emit_push): Record the offset of the push.
11077 (seh_emit_save): Record the offet of the save.
11078 (i386_pe_seh_unwind_emit): Deal with NOTE_INSN_SWITCH_TEXT_SECTIONS.
11079 Test seh->after_prologue to disregard the epilogue.
11080 (i386_pe_end_function): Pass FALSE to i386_pe_seh_fini.
11081 (i386_pe_end_cold_function): New function.
11083 2018-03-07 Jakub Jelinek <jakub@redhat.com>
11086 * config/aarch64/predicates.md (aarch64_simd_reg_or_zero): Use
11087 aarch64_simd_or_scalar_imm_zero rather than aarch64_simd_imm_zero.
11090 * gimple-expr.c (create_tmp_var_raw): Set DECL_NAMELESS flag
11092 * tree-pretty-print.c (dump_decl_name): For TDF_COMPARE_DEBUG,
11093 don't print names of DECL_NAMELESS DECL_IGNORED_P decls.
11095 PR middle-end/84723
11096 * multiple_target.c: Include tree-inline.h and intl.h.
11097 (expand_target_clones): Diagnose and fail if node->definition and
11098 !tree_versionable_function_p (node->decl).
11100 2018-03-06 John David Anglin <danglin@gcc.gnu.org>
11102 * config/pa/pa.h (ASM_GENERATE_INTERNAL_LABEL): Revise to use
11104 (ASM_OUTPUT_ADDR_VEC_ELT): Revise for above change.
11105 (ASM_OUTPUT_ADDR_DIFF_ELT): Likewise.
11106 * config/pa/pa64-hpux.h (ASM_GENERATE_INTERNAL_LABEL): Revise as above.
11108 2018-03-06 Jakub Jelinek <jakub@redhat.com>
11111 * combine.c (try_combine): Use reg_or_subregno instead of handling
11112 just paradoxical SUBREGs and REGs.
11114 2018-03-06 Claudiu Zissulescu <claziss@synopsys.com>
11116 * config/arc/arc.c (arc_finalize_pic): Remove function.
11117 (arc_must_save_register): We use single base PIC register, remove
11118 checks to save/restore the PIC register.
11119 (arc_expand_prologue): Likewise.
11120 * config/arc/arc-protos.h (arc_set_default_type_attributes):
11122 (arc_verify_short): Likewise.
11123 (arc_attr_type): Likewise.
11124 * config/arc/arc.c (arc_set_default_type_attributes): Remove.
11125 (walk_stores): Likewise.
11126 (arc_address_cost): Make it static.
11127 (arc_verify_short): Likewise.
11128 (branch_dest): Likewise.
11129 (arc_attr_type): Likewise.
11130 * config/arc/arc.c (TARGET_ADJUST_INSN_LENGTH): Remove.
11131 (TARGET_INSN_LENGTH_PARAMETERS): Likewise.
11132 (arc_final_prescan_insn): Remove inserting the nops due to
11133 hardware hazards. It is done in reorg step.
11134 (insn_length_variant_t): Remove.
11135 (insn_length_parameters_t): Likewise.
11136 (arc_insn_length_parameters): Likewise.
11137 (arc_get_insn_variants): Likewise.
11138 * config/arc/arc.h (TARGET_UPSIZE_DBR): Remove.
11140 2018-03-06 Jakub Jelinek <jakub@redhat.com>
11142 PR inline-asm/84683
11143 * reg-stack.c (move_for_stack_reg): If any_malformed_asm, avoid
11146 PR tree-optimization/84687
11147 * omp-simd-clone.c (simd_clone_create): Clear DECL_BUILT_IN_CLASS
11149 * match.pd (pow(C,x)*expN(y) -> expN(logN(C)*x+y)): New optimization.
11151 2018-03-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
11153 * config/rs6000/rs6000-builtin.def (rs6000_speculation_barrier):
11154 Rename to ppc_speculation_barrier.
11155 * config/rs6000/rs6000.c (rs6000_init_builtins): Rename builtin to
11156 __builtin_ppc_speculation_barrier.
11158 2018-03-05 Jakub Jelinek <jakub@redhat.com>
11161 * combine.c (combine_simplify_rtx): Don't try to simplify if
11162 if_then_else_cond returned non-NULL, but either true_rtx or false_rtx
11165 2018-03-05 Segher Boessenkool <segher@kernel.crashing.org>
11167 * config/rs6000/rs6000.c (rs6000_loop_align): Don't align tiny loops
11168 to 32 bytes when compiling for POWER9.
11170 2018-03-05 Jakub Jelinek <jakub@redhat.com>
11173 * config/i386/i386.c (ix86_function_ok_for_sibcall): Check for
11174 regparm >= 3 with no arg reg available also for calls with
11175 flag_force_indirect_call. Pass decl to ix86_function_regparm.
11178 * config/i386/sse.md (*<code><mode>3): Replace <mask_prefix3> with
11180 (*<plusminus_insn><mode>3): Likewise. Remove <mask_operand3> uses.
11182 2018-03-05 Peter Bergner <bergner@vnet.ibm.com>
11185 * config/rs6000/vector.md (mov<mode>): Disallow altivec memory operands.
11187 2018-03-05 Richard Biener <rguenther@suse.de>
11189 PR tree-optimization/84486
11190 * tree-ssa-pre.c (create_expression_by_pieces): Remove dead code.
11191 When inserting a __builtin_assume_aligned call set the LHS
11192 SSA name alignment info accordingly.
11194 2018-03-05 Wilco Dijkstra <wdijkstr@arm.com>
11196 PR tree-optimization/84114
11197 * config/aarch64/aarch64.c (aarch64_reassociation_width)
11198 Avoid reassociation of FLOAT_MODE addition.
11200 2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
11202 * common/config/i386/i386-common.c (OPTION_MASK_ISA_PCONFIG_SET,
11203 OPTION_MASK_ISA_PCONFIG_UNSET, OPTION_MASK_ISA_WBNOINVD_SET,
11204 OPTION_MASK_ISA_WBNOINVD_UNSET): New definitions.
11205 (ix86_handle_option): Handle -mpconfig and -mwbnoinvd.
11206 * config.gcc (pconfigintrin.h, wbnoinvdintrin.h) : Add headers.
11207 * config/i386/cpuid.h (bit_PCONFIG, bit_WBNOINVD): New.
11208 * config/i386/driver-i386.c (host_detect_local_cpu): Detect -mpconfig
11210 * config/i386/i386-builtin.def (__builtin_ia32_wbnoinvd,
11211 __builtin_ia32_wbinvd): New builtins.
11212 (SPECIAL_ARGS2): New.
11213 * config/i386/i386-c.c (__WBNOINVD__, __PCONFIG__): New.
11214 (SPECIAL_ARGS2): New.
11215 * config/i386/i386.c (ix86_target_string): Add -mpconfig and -mwbnoinvd.
11216 (ix86_valid_target_attribute_inner_p): Ditto.
11217 (ix86_init_mmx_sse_builtins): Add special_args2.
11218 * config/i386/i386.h (TARGET_PCONFIG, TARGET_PCONFIG_P, TARGET_WBNOINVD,
11219 TARGET_WBNOINVD_P): New.
11220 * config/i386/i386.md (UNSPECV_WBINVD, UNSPECV_WBNOINVD): New.
11221 (define_insn "wbinvd", define_insn "wbnoinvd"): New.
11222 * config/i386/i386.opt: Add -mpconfig and -mwbnoinvd.
11223 * config/i386/immintrin.h (_wbinvd): New intrinsic.
11224 * config/i386/pconfigintrin.h: New file.
11225 * config/i386/wbnoinvdintrin.h: Ditto.
11226 * config/i386/x86intrin.h: Add headers pconfigintrin.h and
11228 * doc/invoke.texi (-mpconfig, -mwbnoinvd): New.
11230 2018-03-05 Richard Biener <rguenther@suse.de>
11232 PR tree-optimization/84670
11233 * tree-ssa-pre.c (struct bb_bitmap_sets): Add visited_with_visited_succs
11235 (BB_VISITED_WITH_VISITED_SUCCS): New define.
11236 (compute_antic): Initialize BB_VISITED_WITH_VISITED_SUCCS.
11237 (compute_antic_aux): Only assert the number of values in ANTIC_IN
11238 doesn't grow if all successors (recursively) were visited at least
11241 2018-03-05 Richard Biener <rguenther@suse.de>
11243 PR tree-optimization/84650
11244 * tree-ssa-loop-im.c (pass_lim::execute): Reset the SCEV cache
11245 if executed in the loop pipeline.
11247 2018-03-05 Sandra Loosemore <sandra@codesourcery.com>
11249 * doc/configfiles.texi (Configuration Files): Move info about
11250 conditionalizing $target-protos.h to...
11251 * doc/sourcebuild.texi (Back End): Here. Explain how $target.h
11252 differs from $target-protos.h.
11254 2018-03-05 Kito Cheng <kito.cheng@gmail.com>
11255 Chung-Ju Wu <jasonwucj@gmail.com>
11257 * config/nds32/nds32-protos.h (nds32_expand_setmem): Declare.
11258 * config/nds32/nds32-multiple.md (setmemsi): Define.
11259 * config/nds32/nds32-memory-manipulation.c
11260 (nds32_gen_dup_4_byte_to_word_value): New.
11261 (emit_setmem_word_loop): New.
11262 (emit_setmem_byte_loop): New.
11263 (nds32_expand_setmem_loop): New.
11264 (nds32_expand_setmem_loop_v3m): New.
11265 (nds32_expand_setmem_unroll): New.
11266 (nds32_expand_setmem): New.
11268 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
11269 Chung-Ju Wu <jasonwucj@gmail.com>
11271 * config/nds32/nds32-memory-manipulation.c
11272 (nds32_emit_load_store): New.
11273 (nds32_emit_post_inc_load_store): New.
11274 (nds32_emit_mem_move): New.
11275 (nds32_emit_mem_move_block): New.
11276 (nds32_expand_movmemsi_loop_unknown_size): New.
11277 (nds32_expand_movmemsi_loop_known_size): New.
11278 (nds32_expand_movmemsi_loop): New.
11279 (nds32_expand_movmemsi_unroll): New.
11280 (nds32_expand_movmemqi): Rename ...
11281 (nds32_expand_movmemsi): ... to this.
11282 * config/nds32/nds32-multiple.md (movmemqi): Rename ...
11283 (movmemsi): ... to this.
11284 * config/nds32/nds32-protos.h (nds32_expand_movmemqi): Rename ...
11285 (nds32_expand_movmemsi): ... to this.
11287 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
11288 Monk Chiang <sh.chiang04@gmail.com>
11289 Chung-Ju Wu <jasonwucj@gmail.com>
11291 * config/nds32/nds32-protos.h
11292 (nds32_expand_load_multiple): New arguments.
11293 (nds32_expand_store_multiple): Ditto.
11294 (nds32_valid_multiple_load_store): Rename ...
11295 (nds32_valid_multiple_load_store_p): ... to this.
11296 * config/nds32/nds32-memory-manipulation.c
11297 (nds32_expand_load_multiple): Refine implementation.
11298 (nds32_expand_store_multiple): Ditto.
11299 * config/nds32/nds32-multiple.md
11300 (load_multiple): Update nds32_expand_load_multiple interface.
11301 (store_multiple): Update nds32_expand_store_multiple interface.
11302 * config/nds32/nds32-predicates.c
11303 (nds32_valid_multiple_load_store): Rename ...
11304 (nds32_valid_multiple_load_store_p): ... to this and refine
11306 * config/nds32/predicates.md
11307 (nds32_load_multiple_and_update_address_operation): New predicate.
11308 (nds32_store_multiple_and_update_address_operation): New predicate.
11310 2018-03-04 Kito Cheng <kito.cheng@gmail.com>
11311 Chung-Ju Wu <jasonwucj@gmail.com>
11313 * config/nds32/nds32.md (type): Add load_multiple and store_multiple.
11314 (combo): New attribute.
11315 * config/nds32/nds32-multiple.md: Refine patterns with new attributes.
11317 2018-03-03 Chung-Ju Wu <jasonwucj@gmail.com>
11319 * config/nds32/nds32.opt: Change -mcmodel= default value.
11321 2018-03-03 Kito Cheng <kito.cheng@gmail.com>
11322 Monk Chiang <sh.chiang04@gmail.com>
11323 Chung-Ju Wu <jasonwucj@gmail.com>
11325 * config/nds32/constants.md (unspec_element): New enum.
11326 * config/nds32/constraints.md (Umw): New constraint.
11327 * config/nds32/nds32-intrinsic.c: Add more builtin functions.
11328 * config/nds32/nds32-intrinsic.md: Likewise.
11329 * config/nds32/nds32-md-auxiliary.c (nds32_regno_to_enable4): New.
11330 (nds32_valid_smw_lwm_base_p): New.
11331 (nds32_output_smw_single_word): New.
11332 (nds32_output_lmw_single_word): New.
11333 (nds32_expand_unaligned_load): New.
11334 (nds32_expand_unaligned_store): New.
11335 * config/nds32/nds32-protos.h (nds32_valid_smw_lwm_base_p): Declare.
11336 (nds32_output_smw_single_word): Declare.
11337 (nds32_output_lmw_single_word): Declare.
11338 (nds32_expand_unaligned_load): Declare.
11339 (nds32_expand_unaligned_store): Declare.
11340 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_UALOAD_HW,
11341 NDS32_BUILTIN_UALOAD_W, NDS32_BUILTIN_UALOAD_DW,
11342 NDS32_BUILTIN_UASTORE_HW, NDS32_BUILTIN_UASTORE_W,
11343 NDS32_BUILTIN_UASTORE_DW.
11344 * config/nds32/predicates.md (nds32_lmw_smw_base_operand): New
11347 2018-03-03 Monk Chiang <sh.chiang04@gmail.com>
11348 Kito Cheng <kito.cheng@gmail.com>
11349 Chung-Ju Wu <jasonwucj@gmail.com>
11351 * config/nds32/nds32-intrinsic.c
11352 (nds32_expand_builtin_null_ftype_reg): Delete.
11353 (nds32_expand_builtin_reg_ftype_imm): Ditto.
11354 (nds32_expand_builtin_null_ftype_reg_imm): Ditto.
11355 (nds32_read_argument): New.
11356 (nds32_legitimize_target): Ditto.
11357 (nds32_legitimize_argument): Ditto.
11358 (nds32_check_constant_argument): Ditto.
11359 (nds32_expand_unop_builtin): Ditto.
11360 (nds32_expand_unopimm_builtin): Ditto.
11361 (nds32_expand_binop_builtin): Ditto.
11362 (nds32_builtin_decl_impl): Ditto.
11363 (builtin_description): Ditto.
11364 (nds32_expand_builtin_impl): Rewrite with new infrastructure.
11365 (nds32_init_builtins_impl): Ditto.
11366 * config/nds32/nds32.c (TARGET_BUILTIN_DECL): Define.
11367 (nds32_builtin_decl): New.
11368 * config/nds32/nds32.h (nds32_builtins): Add NDS32_BUILTIN_COUNT.
11369 * config/nds32/nds32-protos.h (nds32_builtin_decl_impl): Declare.
11371 2018-03-02 Jeff Law <law@redhat.com>
11373 * reorg.c (stop_search_p): Handle DEBUG_INSN.
11374 (redundant_insn, fill_simple_delay_slots): Likewise.
11375 (fill_slots_from_thread): Likewise.
11376 * resource.c (mark_referenced_resources): Likewise.
11377 (mark_set_resources, find_dead_or_set_registers): Likewise.
11379 2018-03-02 Jakub Jelinek <jakub@redhat.com>
11381 * substring-locations.h (format_warning_va): Formatting fix for
11382 ATTRIBUTE_GCC_DIAG.
11383 (format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
11385 (format_warning_n_va, format_warning_at_substring_n): New prototypes.
11386 * substring-locations.c: Include intl.h.
11387 (format_warning_va): Turned into small wrapper around
11388 format_warning_n_va, renamed to ...
11389 (format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
11390 rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
11392 (format_warning_at_substring_n): New function.
11393 * gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
11394 (fmtwarn): Add ATTRIBUTE_GCC_DIAG. Turn into a copy of
11395 format_warning_at_substring with just a shorter name instead of
11396 const function pointer.
11397 (fmtwarn_n): New function.
11398 (maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
11399 appropriate, get rid of all the fmtstr temporaries, move conditionals
11400 with G_() wrapped string literals directly into fmtwarn arguments,
11401 cast dir.len to (int), formatting fixes.
11403 2018-03-02 Thomas Schwinge <thomas@codesourcery.com>
11405 * doc/invoke.texi: Remove "Cilk Plus" references.
11407 2018-03-02 Jakub Jelinek <jakub@redhat.com>
11408 Richard Biener <rguenther@suse.de>
11411 * expr.c (expand_expr_real_1) <case CALL_EXPR>: Don't emit diagnostics
11412 for error or warning attributes if CALL_FROM_THUNK_P is set.
11415 2018-03-02 Jakub Jelinek <jakub@redhat.com>
11418 * config/pa/pa.h (TARGET_CPU_CPP_BUILTINS): Predefine
11419 __SIZEOF_128__ macro if HPUX_LONG_DOUBLE_LIBRARY.
11422 * config/ia64/ia64.h (TARGET_CPU_CPP_BUILTINS): Predefine
11423 __SIZEOF_{FPREG,FLOAT{80,128}}__ macros.
11425 * predict.c (test_prediction_value_range): Use PROB_UNINITIALIZED
11426 instead of -1U in last predictors element's probability member.
11428 2018-03-02 Eric Botcazou <ebotcazou@adacore.com>
11431 * ipa-devirt.c (odr_subtypes_equivalent_p): Get the ODR type of both
11432 arguments if they are comparable.
11434 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
11436 PR tree-optimization/84634
11437 * tree-vect-stmts.c (vectorizable_store, vectorizable_load): Replace
11438 masks and masked_loop_p with a single loop_masks, making sure it's
11439 null for bb vectorization.
11441 2018-03-02 Richard Sandiford <richard.sandiford@linaro.org>
11443 * tree-vect-data-refs.c (vect_analyze_data_ref_dependence)
11444 (vect_analyze_data_ref_access): Use loop->safe_len rather than
11445 loop->force_vectorize to check whether there is no alias.
11447 2018-03-02 Jakub Jelinek <jakub@redhat.com>
11450 * rtl.h (prev_real_nondebug_insn, next_real_nondebug_insn): New
11452 * emit-rtl.c (next_real_insn, prev_real_insn): Fix up function
11454 (next_real_nondebug_insn, prev_real_nondebug_insn): New functions.
11455 * cfgcleanup.c (try_head_merge_bb): Use prev_real_nondebug_insn
11456 instead of a loop around prev_real_insn.
11457 * combine.c (move_deaths): Use prev_real_nondebug_insn instead of
11460 PR inline-asm/84625
11461 * config/i386/i386.c (ix86_print_operand): Use conditional
11462 output_operand_lossage instead of gcc_assert if CONST_VECTOR is not
11465 2018-03-02 Richard Biener <rguenther@suse.de>
11467 PR tree-optimization/84427
11468 * tree-ssa-pre.c (bitmap_remove_expr_from_set): Remove.
11469 (bitmap_set_subtract_values): Rewrite to handle multiple
11472 (prune_clobbered_mems): Likewise.
11473 (phi_translate): Take edge instead of pred/phiblock.
11474 (phi_translate_1): Likewise.
11475 (phi_translate_set): Likewise. Insert all translated
11476 exprs for a value into the set, keeping possibly multiple
11477 expressions per value.
11478 (compute_antic_aux): Adjust for phi_translate changes.
11479 When intersecting union the expressions and prune those
11480 not in the final value set, keeping possibly multiple
11481 expressions per value. Do not use value-insertion
11482 for unioning ANTIC_OUT U EXP_GEN - TMP_GEN but merge
11483 all expressions. Add verification that the value-sets
11484 only shrink during iteration.
11485 (compute_partial_antic_aux): Adjust for the phi_translate changes.
11486 (do_pre_regular_insertion): Likewise.
11487 (do_pre_partial_partial_insertion): Likewise.
11489 2018-03-02 Richard Biener <rguenther@suse.de>
11492 * config/darwin.c (saved_debug_info_level): New static global.
11493 (darwin_asm_lto_start): Disable debug info generation for LTO out.
11494 (darwin_asm_lto_end): Restore debug info generation settings.
11496 2018-03-01 Martin Liska <mliska@suse.cz>
11499 * sanopt.c (sanitize_rewrite_addressable_params): Do not handle
11500 volatile arguments.
11502 2018-03-01 Richard Biener <rguenther@suse.de>
11505 * dwarf2out.c (gen_variable_die): Properly handle late VLA
11506 type annotation with LTO when debug was disabled at compile-time.
11508 2018-03-01 Matthew Fortune <mfortune@gmail.com>
11510 * config/mips/mips.c (mips_final_prescan_insn): Fix incorrect
11512 (mips_final_postscan_insn): Likewise.
11514 2018-03-01 Richard Sandiford <richard.sandiford@linaro.org>
11516 PR rtl-optimization/84528
11517 * alias.c (init_alias_target): Add commentary.
11518 (init_alias_analysis): Only give HARD_FRAME_POINTER_REGNUM
11519 a unique base value if the frame pointer is not eliminated
11520 to the stack pointer.
11522 2018-03-01 Tom de Vries <tom@codesourcery.com>
11524 PR rtl-optimization/83327
11525 * lra-int.h (hard_regs_spilled_into): Declare.
11526 * lra.c (hard_regs_spilled_into): Define.
11527 (init_reg_info): Init hard_regs_spilled_into.
11528 * lra-spills.c (assign_spill_hard_regs): Update hard_regs_spilled_into.
11529 * lra-lives.c (make_hard_regno_born, make_hard_regno_dead)
11530 (process_bb_lives): Handle hard_regs_spilled_into.
11531 (lra_create_live_ranges_1): Before doing liveness propagation, clear
11532 regs in all_hard_regs_bitmap if set in hard_regs_spilled_into.
11534 2018-02-28 David Edelsohn <dje.gcc@gmail.com>
11536 * config.gcc (powerpc-ibm-aix7.1.*): New stanza.
11537 (powerpc-ibm-aix[789]*): Default to AIX 7.2.
11538 * config/rs6000/aix71.h (TARGET_DEFAULT): Revert to Power4 ISA.
11539 * config/rs6000/aix72.h: New file.
11541 2018-02-28 Jakub Jelinek <jakub@redhat.com>
11543 * gimple-ssa-warn-restrict.c (maybe_diag_overlap): Use warning_n
11544 instead of warning_at with conditional singular and plural messages
11548 * stor-layout.c (update_alignment_for_field): For
11549 targetm.ms_bitfield_layout_p (rli->t), if !is_bitfield
11550 && !DECL_PACKED (field), do the alignment update, just use
11551 only desired_align instead of MAX (type_align, desired_align)
11553 (place_field): Don't do known_align < desired_align handling
11554 early if targetm.ms_bitfield_layout_p (rli->t) and rli->prev_field
11555 is non-NULL, instead do it after rli->prev_field handling and
11556 only if not within a bitfield word. For DECL_PACKED (field)
11557 use type_align of BITS_PER_UNIT.
11559 2018-02-28 Eric Botcazou <ebotcazou@adacore.com>
11561 * config/aarch64/aarch64.c (aarch64_emit_probe_stack_range): Remove
11562 superfluous parentheses and trailing spaces.
11564 2018-02-28 Richard Biener <rguenther@suse.de>
11566 PR tree-optimization/84584
11567 * graphite-scop-detection.c (scop_detection::add_scop): Discard
11568 SCoPs with fake exit edge.
11570 2018-02-28 Martin Liska <mliska@suse.cz>
11573 * timevar.c (timer::print): Fix format to properly print 100%
11576 2018-02-28 Richard Biener <rguenther@suse.de>
11578 PR middle-end/84607
11579 * genmatch.c (capture_info::walk_match): Do not mark
11580 captured expressions without operands as expr_p given
11581 they act more like predicates and should be subject to
11582 "lost tail" side-effect preserving.
11584 2018-02-28 Alexandre Oliva <aoliva@redhat.com>
11586 PR rtl-optimization/81611
11587 * auto-inc-dec.c (attempt_change): Move dead note from
11588 mem_insn if it's the next use of regno
11589 (find_address): Take address use of reg holding
11590 non-incremented value. Add parm to limit search to the named
11592 (merge_in_block): Attempt to use a mem insn that is the next
11593 use of the original regno.
11595 2018-02-27 Martin Sebor <msebor@redhat.com>
11598 * gcc/doc/invoke.texi (-Wmissing-attributes): New option.
11599 * gcc/print-tree.c (print_node): Handle DECL_UNINLINABLE.
11601 2018-02-27 Martin Sebor <msebor@redhat.com>
11603 PR translation/84207
11604 * diagnostic-core.h (warning_n, error_n, inform_n): Change
11605 n argument to unsigned HOST_WIDE_INT.
11606 * diagnostic.c (warning_n, error_n, inform_n): Ditto.
11607 (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX.
11608 * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call.
11609 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n.
11611 2018-02-27 Richard Biener <rguenther@suse.de>
11613 PR tree-optimization/84512
11614 * tree-vect-loop.c (vect_compute_single_scalar_iteration_cost):
11615 Do not use the estimate returned from record_stmt_cost for
11616 the scalar iteration cost but sum properly using add_stmt_cost.
11618 2018-02-27 Richard Biener <rguenther@suse.de>
11620 PR tree-optimization/84466
11621 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
11622 Adjust last change to less strictly validate use operands.
11624 2018-02-27 Martin Liska <mliska@suse.cz>
11626 PR gcov-profile/84548
11627 * gcov.c (process_file): Allow partial overlap and consider it
11628 also as group functions.
11629 (output_lines): Properly calculate range of lines for a group.
11631 2018-02-27 Martin Liska <mliska@suse.cz>
11633 * timevar.c (timer::print_row): Remove 'usr', 'sys', 'wall' and
11634 'ggc' suffixes. Change first column width.
11635 (timer::print): Fix formatting of the column.
11637 2018-02-27 Alexandre Oliva <aoliva@redhat.com>
11639 * tree-ssa-live.c (remove_unused_scope_block_p): Do not
11640 preserve inline entry blocks for the sake of debug inline
11641 entry point markers alone.
11642 (remove_unused_locals): Suggest in comments a better place to
11643 force the preservation of inline entry blocks that are
11644 otherwise unused, but do not preserve them.
11646 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
11648 * config/i386/i386.c (ix86_output_indirect_jmp): Update comments.
11650 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
11653 * config/i386/constraints.md (Bs): Replace
11654 ix86_indirect_branch_register with
11655 TARGET_INDIRECT_BRANCH_REGISTER.
11657 * config/i386/i386.md (indirect_jump): Likewise.
11658 (tablejump): Likewise.
11659 (*sibcall_memory): Likewise.
11660 (*sibcall_value_memory): Likewise.
11661 Peepholes of indirect call and jump via memory: Likewise.
11662 (*sibcall_GOT_32): Disallowed for TARGET_INDIRECT_BRANCH_REGISTER.
11663 (*sibcall_value_GOT_32): Likewise.
11664 * config/i386/predicates.md (indirect_branch_operand): Likewise.
11665 (GOT_memory_operand): Likewise.
11666 (call_insn_operand): Likewise.
11667 (sibcall_insn_operand): Likewise.
11668 (GOT32_symbol_operand): Likewise.
11669 * config/i386/i386.h (TARGET_INDIRECT_BRANCH_REGISTER): New.
11671 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
11673 PR rtl-optimization/83496
11674 * reorg.c (steal_delay_list_from_target): Change REDUNDANT array from
11675 booleans to RTXes. Call fix_reg_dead_note on every non-null element.
11676 (steal_delay_list_from_fallthrough): Call fix_reg_dead_note on a
11677 redundant insn, if any.
11678 (relax_delay_slots): Likewise.
11679 (update_reg_unused_notes): Rename REDUNDANT_INSN to OTHER_INSN.
11681 2018-02-26 Richard Sandiford <richard.sandiford@linaro.org>
11683 PR tree-optimization/83965
11684 * tree-vect-patterns.c (vect_reassociating_reduction_p): Assume
11685 that grouped statements are part of a reduction chain. Return
11686 true if the statement is not marked as a reduction itself but
11687 is part of a group.
11688 (vect_recog_dot_prod_pattern): Don't check whether the statement
11689 is part of a group here.
11690 (vect_recog_sad_pattern): Likewise.
11691 (vect_recog_widen_sum_pattern): Likewise.
11693 2018-02-26 Eric Botcazou <ebotcazou@adacore.com>
11696 * final.c (rest_of_clean_state): Also look for calls inside sequences.
11698 2018-02-26 H.J. Lu <hongjiu.lu@intel.com>
11701 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Remove
11703 (ix86_output_indirect_function_return): New prototype.
11704 (ix86_split_simple_return_pop_internal): Likewise.
11705 * config/i386/i386.c (indirect_return_via_cx): New.
11706 (indirect_return_via_cx_bnd): Likewise.
11707 (indirect_thunk_name): Handle return va CX_REG.
11708 (output_indirect_thunk_function): Create alias for
11709 __x86_return_thunk_[re]cx and __x86_return_thunk_[re]cx_bnd.
11710 (ix86_output_indirect_jmp): Remove the bool argument.
11711 (ix86_output_indirect_function_return): New function.
11712 (ix86_split_simple_return_pop_internal): Likewise.
11713 * config/i386/i386.md (*indirect_jump): Don't pass false
11714 to ix86_output_indirect_jmp.
11715 (*tablejump_1): Likewise.
11716 (simple_return_pop_internal): Change it to define_insn_and_split.
11717 Call ix86_split_simple_return_pop_internal to split it for
11718 -mfunction-return=.
11719 (simple_return_indirect_internal): Call
11720 ix86_output_indirect_function_return instead of
11721 ix86_output_indirect_jmp.
11723 2018-02-26 Jakub Jelinek <jakub@redhat.com>
11726 * vec.h (vec_default_construct): For BROKEN_VALUE_INITIALIZATION use
11727 memset and value initialization afterwards.
11729 2018-02-26 Christophe Lyon <christophe.lyon@linaro.org>
11731 * Makefile.in (lto-wrapper): Use ALL_LINKERFLAGS.
11733 2018-02-26 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
11736 * common/config/aarch64/aarch64-common.c
11737 (aarch_option_optimization_table[]): Switch
11738 off fomit-frame-pointer
11740 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
11741 Chung-Ju Wu <jasonwucj@gmail.com>
11743 * config/nds32/nds32-multiple.md (load_multiple): Disallow
11745 (store_multiple): Ditto.
11747 2018-02-26 Kito Cheng <kito.cheng@gmail.com>
11749 * config.gcc: Add --with-cpu support for nds32 target.
11750 * config/nds32/nds32-opts.h (nds32_cpu_type): New.
11751 * config/nds32/nds32.opt: Add -mcpu= option.
11753 2018-02-25 Segher Boessenkool <segher@kernel.crashing.org>
11755 * config/rs6000/rs6000.opt (mvrsave=no, mvrsave=yes, isel=no,
11756 isel=yes): Warn for these deprecated options.
11758 2018-02-23 David Edelsohn <dje.gcc@gmail.com>
11760 * config/rs6000/aix71.h (TARGET_DEFAULT): Change to
11761 ISA_2_5_MASKS_EMBEDDED.
11763 2018-02-23 Jakub Jelinek <jakub@redhat.com>
11765 * ipa-prop.c (ipa_vr_ggc_hash_traits::hash): Hash p->min and
11766 p->max as pointers rather than using iterative_hash_expr.
11768 2018-02-23 Carl Love <cel@us.ibm.com>
11770 * config/rs6000/rs6000-builtin.def: Change VSIGNED2 and VUNSIGNED2
11771 macro expansions from BU_VSX_2 to BU_P8V_VSX_2 and BU_VSX_OVERLOAD_2 to
11773 * config/rs6000/rs6000-c.c: Change VSX_BUILTIN_VEC_VSIGNED2 to
11774 P8V_BUILTIN_VEC_VSIGNED2. Change VSX_BUILTIN_VEC_VUNSIGNED2 to
11775 P8V_BUILTIN_VEC_VUNSIGNED2.
11777 2018-02-22 Vladimir Makarov <vmakarov@redhat.com>
11780 * lra-int.h (LRA_UNKNOWN_ALT, LRA_NON_CLOBBERED_ALT): New macros.
11781 * lra.c (lra_set_insn_recog_data, lra_update_insn_recog_data): Use
11783 * lra-constraints.c (curr_insn_transform): Set up
11784 LRA_NON_CLOBBERED_ALT for moves processed on the fast path. Use
11786 (remove_inheritance_pseudos): Use LRA_UNKNOWN_ALT.
11787 * lra-eliminations.c (spill_pseudos): Ditto.
11788 (process_insn_for_elimination): Ditto.
11789 * lra-lives.c (reg_early_clobber_p): Use the new macros.
11790 * lra-spills.c (spill_pseudos): Use LRA_UNKNOWN_ALT and
11791 LRA_NON_CLOBBERED_ALT.
11793 2018-02-22 Martin Sebor <msebor@redhat.com>
11795 PR tree-optimization/84480
11796 * gimple-fold.c (gimple_fold_builtin_strcpy): Move warnings
11797 to maybe_diag_stxncpy_trunc. Call it.
11798 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Integrate warnings
11799 from gimple_fold_builtin_strcpy. Print inlining stack.
11800 (handle_builtin_stxncpy): Print inlining stack.
11801 * tree-ssa-strlen.h (maybe_diag_stxncpy_trunc): Declare.
11803 2018-02-22 H.J. Lu <hongjiu.lu@intel.com>
11806 * config/i386/i386.c (ix86_set_indirect_branch_type): Issue an
11807 error when -mindirect-branch=thunk-extern, -fcf-protection=branch
11808 and -fcheck-pointer-bounds are used together.
11809 (indirect_thunk_prefix): New enum.
11810 (indirect_thunk_need_prefix): New function.
11811 (indirect_thunk_name): Replace need_bnd_p with need_prefix. Use
11812 "_nt" instead of "_bnd" for NOTRACK prefix.
11813 (output_indirect_thunk): Replace need_bnd_p with need_prefix.
11814 (output_indirect_thunk_function): Likewise.
11816 (ix86_code_end): Update output_indirect_thunk_function calls.
11817 (ix86_output_indirect_branch_via_reg): Replace
11818 ix86_bnd_prefixed_insn_p with indirect_thunk_need_prefix.
11819 (ix86_output_indirect_branch_via_push): Likewise.
11820 (ix86_output_function_return): Likewise.
11821 * doc/invoke.texi: Document -mindirect-branch=thunk-extern is
11822 incompatible with -fcf-protection=branch and
11823 -fcheck-pointer-bounds.
11825 2018-02-22 Steve Ellcey <sellcey@cavium.com>
11828 * config/aarch64/aarch64.c (aarch64_print_address_internal):
11829 Change gcc_assert call to output_operand_lossage.
11831 2018-02-22 Steve Ellcey <sellcey@cavium.com>
11833 * doc/extend.texi (__builtin_extend_pointer): Document builtin.
11835 2018-02-22 DJ Delorie <dj@redhat.com>
11836 Sebastian Perta <sebastian.perta@renesas.com>
11837 Oleg Endo <olegendo@gcc.gnu.org>
11839 * config/rx/rx.c (rx_rtx_costs): New function.
11840 (TARGET_RTX_COSTS): Override to use rx_rtx_costs.
11842 2018-02-22 Thomas Preud'homme <thomas.preudhomme@arm.com>
11844 * config/arm/t-multilib: Map Armv8-R to Armv7 multilibs.
11846 2018-02-22 Martin Liska <mliska@suse.cz>
11849 * common/config/arm/arm-common.c (arm_print_hint_for_cpu_option):
11850 Add "native" as a possible value.
11852 2018-02-22 Martin Liska <mliska@suse.cz>
11855 * config/i386/i386.c (ix86_option_override_internal):
11856 Add "native" as a possible value for -march and -mtune.
11858 2018-02-22 Jakub Jelinek <jakub@redhat.com>
11861 * stor-layout.c (finalize_type_size): Propagate TYPE_EMPTY_P flag
11862 to all type variants.
11864 PR tree-optimization/84503
11865 * gimple-ssa-store-merging.c (merged_store_group::merge_into): Compute
11866 width as info->bitpos + info->bitsize - start.
11867 (merged_store_group::merge_overlapping): Simplify width computation.
11868 (check_no_overlap): New function.
11869 (imm_store_chain_info::try_coalesce_bswap): Compute expected
11870 start + width and last_order of the group, fail if check_no_overlap
11872 (imm_store_chain_info::coalesce_immediate_stores): Don't merge info
11873 to group if check_no_overlap fails.
11875 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
11877 * config/rs6000/altivec.md: Delete contraint arguments to
11878 define_expand, define_split, and define_peephole2, and in
11879 define_insn_and_split if always unused.
11880 * config/rs6000/darwin.md: Ditto.
11881 * config/rs6000/dfp.md: Ditto.
11882 * config/rs6000/rs6000.md: Ditto.
11883 * config/rs6000/sync.md: Ditto.
11884 * config/rs6000/vector.md: Ditto.
11885 * config/rs6000/vsx.md: Ditto.
11887 2018-02-21 Segher Boessenkool <segher@kernel.crashing.org>
11889 * config/rs6000/altivec.md: Write output control strings as braced
11890 blocks instead of double-quoted strings.
11891 * config/rs6000/darwin.md: Ditto.
11892 * config/rs6000/rs6000.md: Ditto.
11893 * config/rs6000/vector.md: Ditto.
11894 * config/rs6000/vsx.md: Ditto.
11896 2018-02-21 Jason Merrill <jason@redhat.com>
11898 PR c++/84314 - ICE with templates and fastcall attribute.
11899 * attribs.c (build_type_attribute_qual_variant): Remove assert.
11901 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
11903 * ipa-cp.c (determine_versionability): Fix comment typos.
11905 2018-02-21 Jan Hubicka <hubicka@ucw.cz>
11908 * ipa-cp.c (determine_versionability): Do not version functions caling
11911 2018-02-21 Martin Liska <mliska@suse.cz>
11914 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch):
11915 Add "native" as a possible value.
11916 * config/aarch64/aarch64.h (HAVE_LOCAL_CPU_DETECT): Define
11917 the macro when native cpu detection is available.
11919 2018-02-21 Martin Liska <mliska@suse.cz>
11922 * common/config/arm/arm-common.c (arm_print_hint_for_arch_option):
11923 Add "native" as a possible value.
11924 * config/arm/arm.h (HAVE_LOCAL_CPU_DETECT): Define the macro
11925 when native cpu detection is available.
11927 2018-02-21 Jakub Jelinek <jakub@redhat.com>
11928 Martin Sebor <msebor@redhat.com>
11930 PR tree-optimization/84478
11931 * gimple-fold.h (get_range_strlen): Add a bool argument defaulted to
11933 * gimple-fold.c (get_range_strlen): Make minlen const and assume it
11934 can't be NULL. Change FUZZY from bool to int, for 1 add PHI/COND_EXPR
11935 support which is conservatively correct, for 2 only stay conservative
11936 for maxlen. Formatting and comment capitalization fixes. Add STRICT
11937 argument to the 2 argument get_range_strlen, adjust 6 arg
11938 get_range_strlen caller and clear minmaxlen[0] and [1] if it returned
11940 (get_maxval_strlen): Adjust 6 arg get_range_strlen caller.
11941 (gimple_fold_builtin_strlen): Pass true as last argument to
11944 2018-02-20 Martin Sebor <msebor@redhat.com>
11946 PR middle-end/84095
11947 * gimple-ssa-warn-restrict.c (builtin_memref::extend_offset_range): New.
11948 (builtin_memref::set_base_and_offset): Same. Handle inner references.
11949 (builtin_memref::builtin_memref): Factor out parts into
11950 set_base_and_offset and call it.
11952 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
11954 PR middle-end/84406
11955 * optabs-query.c (find_widening_optab_handler_and_mode): If from_mode
11956 is a scalar_int_mode, assert that to_mode is a scalar_int_mode with
11957 greater precision. If to_mode is a MODE_PARTIAL_INT, stop the
11958 search at the associated MODE_INT.
11960 2018-02-20 Jeff Law <law@redhat.com>
11962 PR middle-end/82123
11963 PR tree-optimization/81592
11964 PR middle-end/79257
11965 * gimple-ssa-sprintf.c (format_integer): Query EVRP range analyzer
11966 for range data rather than using global data.
11967 * gimple-ssa-sprintf.c (get_int_range): Query EVRP range analyzer for
11968 range data rather than using global data.
11969 * gimple-ssa-sprintf.c (get_int_range): Accept vr_values parameter
11970 pass it to children as needed.
11971 (struct directive::fmtresult): Similarly.
11972 (struct directive::set_width): Similarly.
11973 (struct directive::set_precision): Similarly.
11974 (format_integer, format_directive, parse_directive): Similarly.
11975 (format_none): Accept unnamed vr_values parameter.
11976 (format_percent, format_floating, format_character): Similarly.
11977 (format_string, format_plain): Similarly.
11978 * gimple-ssa-sprintf.c (sprintf_dom_walker::handle_gimple_call): Query
11979 the EVRP range analyzer for range data rather than using global data.
11980 * gimple-ssa-sprintf.c: Include alloc-pool.h, vr-values.h and
11981 gimple-ssa-evrp-analyze.h
11982 (class sprintf_dom_walker): Add after_dom_children member function.
11983 Add evrp_range_analyzer member.
11984 (sprintf_dom_walker::before_dom_children): Call into the EVRP
11985 range analyzer as needed.
11986 (sprintf_dom_walker::after_dom_children): New member function.
11987 * gimple-ssa-evrp-analyze.c (evrp_range_analyzer::enter): Do nothing
11989 (evrp_range_analyzer::record_ranges_from_stmt): Likewise.
11990 (evrp_range_analyzer::pop_to_marker): Likewise.
11992 2018-02-20 Richard Sandiford <richard.sandiford@linaro.org>
11994 PR tree-optimization/84419
11995 * internal-fn.c (expand_call_mem_ref): Create a TARGET_MEM_REF
11996 with the required type if its current type is compatible but
11999 2018-02-20 Jakub Jelinek <jakub@redhat.com>
12001 PR middle-end/82004
12002 * match.pd (pow(C,x) -> exp(log(C)*x)): Delay all folding until
12003 after vectorization.
12005 2018-02-20 Martin Liska <mliska@suse.cz>
12008 * config/aarch64/aarch64.c (aarch64_print_hint_for_core_or_arch): Print
12009 possible values if we don't have a hint.
12011 2018-02-20 Martin Liska <mliska@suse.cz>
12015 * final.c (shorten_branches): Build align_tab array with one
12017 * opts.c (finish_options): Add alignment option limit check.
12018 (MAX_CODE_ALIGN): Likewise.
12019 (MAX_CODE_ALIGN_VALUE): Likewise.
12020 * doc/invoke.texi: Document maximum allowed option value for
12021 all -falign-* options.
12023 2018-02-19 Jakub Jelinek <jakub@redhat.com>
12026 * reg-notes.def (REG_CALL_ARG_LOCATION): New reg note.
12027 * insn-notes.def (NOTE_INSN_CALL_ARG_LOCATION): Remove.
12028 * var-tracking.c (emit_note_insn_var_location): Remove all references
12029 to NOTE_INSN_CALL_ARG_LOCATION.
12030 (emit_notes_in_bb): Emit arguments as REG_CALL_ARG_LOCATION note on
12031 the CALL_INSN rather than separate NOTE_INSN_CALL_ARG_LOCATION note.
12032 Use copy_rtx_if_shared.
12033 * dwarf2out.c (gen_subprogram_die): Use XEXP with 0 instead of
12034 NOTE_VAR_LOCATION on ca_loc->call_arg_loc_note.
12035 (dwarf2out_var_location): Remove handling of
12036 NOTE_INSN_CALL_ARG_LOCATION, instead handle REG_CALL_ARG_LOCATION note
12038 * final.c (final_scan_insn): Remove all references to
12039 NOTE_INSN_CALL_ARG_LOCATION.
12040 (rest_of_clean_state): Likewise. Remove REG_CALL_ARG_LOCATION notes
12041 before dumping final insns.
12042 * except.c (emit_note_eh_region_end): Remove all references to
12043 NOTE_INSN_CALL_ARG_LOCATION.
12044 * config/alpha/alpha.c (alpha_pad_function_end): Likewise.
12045 * config/c6x/c6x.c (c6x_gen_bundles): Likewise.
12046 * config/arc/arc.c (hwloop_optimize): Likewise.
12047 * config/arm/arm.c (create_fix_barrier): Likewise.
12048 * config/s390/s390.c (s390_chunkify_start): Likewise.
12049 * config/sh/sh.c (find_barrier): Likewise.
12050 * config/i386/i386.c (rest_of_insert_endbranch,
12051 ix86_seh_fixup_eh_fallthru): Likewise.
12052 * config/xtensa/xtensa.c (hwloop_optimize): Likewise.
12053 * config/iq2000/iq2000.c (final_prescan_insn): Likewise.
12054 * config/frv/frv.c (frv_function_prologue): Likewise.
12055 * emit-rtl.c (try_split): Likewise. Copy over REG_CALL_ARG_LOCATION
12057 (note_outside_basic_block_p): Remove all references to
12058 NOTE_INSN_CALL_ARG_LOCATION.
12059 * gengtype.c (adjust_field_rtx_def): Likewise.
12060 * print-rtl.c (rtx_writer::print_rtx_operand_code_0, print_insn):
12062 * jump.c (cleanup_barriers, delete_related_insns): Likewise.
12063 * cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
12066 * builtins.c (builtin_mathfn_code): Don't check if CALL_EXPR_FN (t)
12069 PR tree-optimization/84452
12070 * tree-vect-patterns.c (vect_recog_pow_pattern): Don't call
12071 expand_simd_clones if targetm.simd_clone.compute_vecsize_and_simdlen
12074 2018-02-19 Martin Liska <mliska@suse.cz>
12077 * passes.def: Put pass_sancov_O0 before pass_lower_switch with -O0.
12079 2018-02-19 Martin Liska <mliska@suse.cz>
12080 Richard Sandiford <richard.sandiford@linaro.org>
12082 PR tree-optimization/82491
12083 * gimple-fold.c (get_base_constructor): Make earlier bail out
12086 2018-02-19 Carl Love <cel@us.ibm.com>
12088 * config/rs6000/rs6000-builtin.def: Change NEG macro expansions from
12089 BU_ALTIVEC_A to BU_P8V_AV_1 and BU_ALTIVEC_OVERLOAD_1 to
12091 * config/rs6000/rs6000-c.c: Change ALTIVEC_BUILTIN_VEC_NEG to
12092 P8V_BUILTIN_VEC_NEG.
12094 2018-02-19 Sebastian Perta <sebastian.perta@renesas.com>
12096 * config/rl78/rl78.md (movdf): New define expand.
12098 2018-02-19 Martin Liska <mliska@suse.cz>
12101 * doc/invoke.texi: Fix typo.
12102 * params.def (PARAM_MAX_LOOP_HEADER_INSNS): Likewise.
12104 2018-02-18 Segher Boessenkool <segher@kernel.crashing.org>
12106 * config/rs6000/rs6000.c (rs6000_option_override_internal): Don't
12107 handle rs6000_single_float and rs6000_double_float specially for
12110 2018-02-16 Jeff Law <law@redhat.com>
12112 * config/rx/rx.c (add_pop_cfi_notes): New function.;
12113 (pop_regs): Use it.
12115 2018-02-16 Jakub Jelinek <jakub@redhat.com>
12118 * ipa-inline.c (inline_small_functions): Fix a typo.
12120 2018-02-16 Nathan Sidwell <nathan@acm.org>
12122 * doc/extend.texi (Backwards Compatibility): Americanize 'behaviour'.
12124 2018-02-16 Carl Love <cel@us.ibm.com>
12126 * config/rs6000/rs6000-builtin.def: Add BU_P8V_VSX_2 macro definition.
12127 Change FLOAT2 expansions from BU_VSX_2 to BU_P8V_VSX_2 and
12128 from BU_VSX_OVERLOAD_2 to BU_P8V_OVERLOAD_2.
12129 * config/rs6000/rs6000-c.c: Changed macro VSX_BUILTIN_VEC_FLOAT2
12130 expansion to P8V_BUILTIN_VEC_FLOAT2.
12132 2018-02-16 Vladimir Makarov <vmakarov@redhat.com>
12134 PR rtl-optimization/70023
12135 * lra-constraints.c (inherit_in_ebb): Take hard reg mode of
12136 src_regno into account.
12138 2018-02-16 Carl Love <cel@us.ibm.com>
12140 * config/rs6000/altivec.h: Remove vec_vextract4b and vec_vinsert4b.
12141 * config/rs6000/rs6000-builtin.def: Remove macro expansion for
12142 VEXTRACT4B, VINSERT4B, VINSERT4B_DI and VEXTRACT4B.
12143 * config/rs6000/rs6000.c: Remove case statements for
12144 P9V_BUILTIN_VEXTRACT4B, P9V_BUILTIN_VEC_VEXTRACT4B,
12145 P9V_BUILTIN_VINSERT4B, P9V_BUILTIN_VINSERT4B_DI,
12146 and P9V_BUILTIN_VEC_VINSERT4B.
12147 * config/rs6000/rs6000-c.c (altivec_expand_builtin): Remove entries for
12148 P9V_BUILTIN_VEC_VEXTRACT4B and P9V_BUILTIN_VEC_VINSERT4B.
12149 * config/rs6000/vsx.md:
12150 * doc/extend.texi: Remove vec_vextract4b, non ABI definitions for
12153 2018-02-16 Carl Love <cel@us.ibm.com>
12155 * config/rs6000/altivec.h: Add builtin names vec_extract4b
12157 * config/rs6000/rs6000-builtin.def: Add INSERT4B and EXTRACT4B
12159 * config/rs6000/rs6000-c.c: Add the definitions for
12160 P9V_BUILTIN_VEC_EXTRACT4B and P9V_BUILTIN_VEC_INSERT4B.
12161 * config/rs6000/rs6000.c (altivec_expand_builtin): Add
12162 P9V_BUILTIN_EXTRACT4B and P9V_BUILTIN_INSERT4B case statements.
12163 * config/rs6000/vsx.md: Add define_insn extract4b. Add define_expand
12164 definition for insert4b and define insn *insert3b_internal.
12165 * doc/extend.texi: Add documentation for vec_extract4b.
12167 2018-02-16 Nathan Sidwell <nathan@acm.org>
12169 * doc/extend.texi (Backwards Compatibility): Mention friend
12170 injection. Note for-scope is deprecated.
12171 * doc/invoke.texi (-ffriend-injection): Deprecate.
12173 2018-02-16 Segher Boessenkool <segher@kernel.crashing.org>
12175 * combine.c (try_combine): When adjusting LOG_LINKS for the destination
12176 that moved to I2, also allow destinations that are a paradoxical
12177 subreg (instead of a normal reg).
12179 2018-02-16 Oleg Endo <olegendo@gcc.gnu.org>
12182 * config/rx/rx.c (rx_fuse_in_memory_bitop): Convert shift operand
12185 2018-02-16 Richard Biener <rguenther@suse.de>
12187 PR tree-optimization/84037
12188 PR tree-optimization/84016
12190 * config/i386/i386.c (ix86_builtin_vectorization_cost):
12191 Adjust vec_construct for the fact we need additional higher latency
12192 128bit inserts for AVX256 and AVX512 vector builds.
12193 (ix86_add_stmt_cost): Scale vector construction cost for
12196 2018-02-16 Richard Biener <rguenther@suse.de>
12198 PR tree-optimization/84417
12199 * tree-ssa.c (non_rewritable_mem_ref_base): Properly constrain
12200 the MEM_REF offset when conversion to BIT_FIELD_REF is desired.
12201 (non_rewritable_lvalue_p): Likewise, use poly-ints.
12203 2018-02-16 Martin Liska <mliska@suse.cz>
12206 * internal-fn.def (ASAN_CHECK): Set proper flags.
12207 (ASAN_MARK): Likewise.
12209 2018-02-16 Julia Koval <julia.koval@intel.com>
12211 * config/i386/i386.c (ix86_option_override_internal): Remove PTA_CLWB
12212 from PTA_CANNONLAKE.
12214 2018-02-16 Jakub Jelinek <jakub@redhat.com>
12217 * config/aarch64/cortex-a57-fma-steering.c (fma_forest::merge_forest):
12218 Use ++iter rather than iter++ for std::list iterators.
12219 (func_fma_steering::dfs): Likewise. Don't delete nodes right away,
12220 defer deleting them until all nodes in the forest are processed. Do
12221 free even leaf nodes. Change to_process into auto_vec.
12224 * system.h (BROKEN_VALUE_INITIALIZATION): Define for GCC < 4.3.
12225 * vec.h (vec_default_construct): Use memset instead of placement new
12226 if BROKEN_VALUE_INITIALIZATION is defined.
12227 * hash-table.h (hash_table<Descriptor, Allocator>::empty_slow): Use
12228 memset instead of value initialization if BROKEN_VALUE_INITIALIZATION
12231 PR rtl-optimization/83723
12232 * lra-int.h (lra_substitute_pseudo): Add DEBUG_P argument.
12233 * lra.c (lra_substitute_pseudo): Likewise. If true, use
12234 gen_rtx_raw_SUBREG instead of gen_rtx_SUBREG. Pass DEBUG_P to
12236 (lra_substitute_pseudo_within_insn): Adjust lra_substitute_pseudo
12238 * lra-constraints.c (inherit_reload_reg, split_reg): Likewise.
12240 2018-02-16 Eric Botcazou <ebotcazou@adacore.com>
12242 PR rtl-optimization/81443
12243 * rtlanal.c (num_sign_bit_copies1) <SUBREG>: Do not propagate results
12244 from inner REGs to paradoxical SUBREGs.
12246 2018-02-16 Richard Biener <rguenther@suse.de>
12248 PR tree-optimization/84399
12249 * graphite-scop-detection.c (scop_detection::stmt_simple_for_scop_p):
12250 For operands we can analyze at their definition make sure we can
12251 analyze them at each use as well.
12253 2018-02-16 Richard Biener <rguenther@suse.de>
12255 PR tree-optimization/84190
12256 * tree-ssa.c (non_rewritable_mem_ref_base): Do not touch
12257 volatile accesses if the decl isn't volatile.
12259 2018-02-15 Jason Merrill <jason@redhat.com>
12261 PR c++/84314 - ICE with templates and fastcall attribute.
12262 * attribs.c (build_type_attribute_qual_variant): Don't clobber
12263 TYPE_CANONICAL on an existing type.
12265 2018-02-15 Jakub Jelinek <jakub@redhat.com>
12267 PR tree-optimization/84383
12268 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Don't look at
12269 dstoff nor call operand_equal_p if dstbase is NULL.
12271 PR tree-optimization/84334
12272 * match.pd ((A +- CST1) +- CST2 -> A + CST3): If A is
12273 also a CONSTANT_CLASS_P, punt.
12275 2018-02-14 Jim Wilson <jimw@sifive.com>
12277 * config/riscv/riscv.c (riscv_first_stack_step): Move locals after
12278 first SMALL_OPERAND check. New local min_second_step. Move assert
12279 to where locals are set. Add TARGET_RVC support.
12280 * config/riscv/riscv.h (C_SxSP_BITS, SWSP_REACH, SDSP_REACH): New.
12282 2018-02-14 Indu Bhagat <indu.bhagat@oracle.com>
12284 * doc/invoke.texi: Correct -Wformat-overflow code sample.
12286 2018-02-14 Martin Sebor <msebor@redhat.com>
12288 PR tree-optimization/83698
12289 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For
12290 arrays constrain the offset range to their bounds.
12291 (builtin_access::strcat_overlap): Adjust the bounds of overlap offset.
12292 (builtin_access::overlap): Avoid setting the size of overlap if it's
12294 (maybe_diag_overlap): Also consider arrays when deciding what values
12295 of offsets to include in diagnostics.
12297 2018-02-14 Martin Sebor <msebor@redhat.com>
12300 * attribs.c (diag_attr_exclusions): Consider the exclusion(s)
12301 that correspond to the kind of a declaration.
12303 2018-02-14 John David Anglin <danglin@gcc.gnu.org>
12306 * config/pa/pa.md: Load address of PIC label using the linkage table
12307 if the label is nonlocal.
12309 2018-02-14 Kelvin Nilsen <kelvin@gcc.gnu.org>
12311 * config/rs6000/rs6000.c (rs6000_option_override_internal): Issue
12312 warning message if user requests -maltivec=be.
12313 * doc/invoke.texi: Document deprecation of -maltivec=be.
12315 2018-02-14 Will Schmidt <will_schmidt@vnet.ibm.com>
12318 * config/rs6000/rs6000-c.c: Update definitions for
12319 ALTIVEC_BUILTIN_VEC_SLD, ALTIVEC_BUILTIN_VEC_SLDW,
12320 VEC_XXSLDWI and ALTIVEC_BUILTIN_VEC_XXPERMDI builtins.
12322 2018-02-14 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
12325 * config/i386/cetintrin.h: Remove _rdssp[d|q] and
12326 add _get_ssp intrinsics. Remove argument from
12327 __builtin_ia32_rdssp[d|q].
12328 * config/i386/i386-builtin-types.def: Add UINT_FTYPE_VOID.
12329 * config/i386/i386-builtin.def: Remove argument from
12330 __builtin_ia32_rdssp[d|q].
12331 * config/i386/i386.c: Use UINT_FTYPE_VOID. Use
12332 ix86_expand_special_args_builtin for _rdssp[d|q].
12333 * config/i386/i386.md: Remove argument from rdssp[si|di] insn.
12334 Clear register before usage.
12335 * doc/extend.texi: Remove argument from __builtin_ia32_rdssp[d|q].
12336 Add documentation for new _get_ssp and _inc_ssp intrinsics.
12338 2018-02-14 Richard Sandiford <richard.sandiford@linaro.org>
12340 PR tree-optimization/84357
12341 * tree-data-ref.c (object_address_invariant_in_loop_p): Check
12342 operand 1 of an ARRAY_REF too.
12344 2018-02-14 Oleg Endo <olegendo@gcc.gnu.org>
12347 * config/rx/rx-protos.h (rx_reg_dead_or_unused_after_insn,
12348 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
12350 (set_of_reg): New struct.
12351 (rx_find_set_of_reg, rx_find_use_of_reg): New functions.
12352 * config/rx/rx.c (rx_reg_dead_or_unused_after_insn,
12353 rx_copy_reg_dead_or_unused_notes, rx_fuse_in_memory_bitop): New
12355 * config/rx/rx.md (andsi3, iorsi3, xorsi3): Convert to insn_and_split.
12356 Split into bitclr, bitset, bitinvert patterns if appropriate.
12357 (*bitset, *bitinvert, *bitclr): Convert to named insn_and_split and
12358 use rx_fuse_in_memory_bitop.
12359 (*bitset_in_memory, *bitinvert_in_memory, *bitclr_in_memory): Convert
12360 to named insn, correct maximum insn length.
12362 2018-02-14 Jozef Lawrynowicz <jozefl.gcc@gmail.com>
12365 * machmode.def: Define a complex mode for PARTIAL_INT.
12366 * genmodes.c (complex_class): Return MODE_COMPLEX_INT for
12368 * doc/rtl.texi: Document CSPImode.
12369 * config/msp430/msp430.c (msp430_hard_regno_nregs): Add CPSImode
12371 (msp430_hard_regno_nregs_with_padding): Likewise.
12373 2018-02-13 Peter Bergner <bergner@vnet.ibm.com>
12376 * config/rs6000/rs6000.c (mem_operand_gpr): Disallow altivec addresses.
12378 2018-02-13 Segher Boessenkool <segher@kernel.crashing.org>
12380 PR rtl-optimization/84169
12381 * combine.c (try_combine): New variable split_i2i3. Set it to true if
12382 we generated a parallel as new i3 and we split that to new i2 and i3
12383 instructions. Handle split_i2i3 similar to swap_i2i3: scan the
12384 LOG_LINKs of i3 to see which of those need to link to i2 now. Link
12385 those to i2, not i1. Partially rewrite this scan code.
12387 2018-02-13 Jakub Jelinek <jakub@redhat.com>
12390 * stor-layout.c (place_field): For variable length fields, adjust
12391 offset_align afterwards not just based on the field's alignment,
12392 but also on the size.
12394 PR middle-end/84309
12395 * match.pd (pow(C,x) -> exp(log(C)*x)): Use exp2s and log2s instead
12396 of exps and logs in the use_exp2 case.
12398 2018-02-13 Jeff Law <law@redhat.com>
12400 * config/rl/rl78.c (rl78_attribute_table): Fix terminator and
12401 entry for "vector".
12403 * config/rl78/rl78.c (rl78_handle_func_attribute): Mark
12406 2018-02-13 Alexandre Oliva <aoliva@redhat.com>
12410 * common.opt (gas-loc-support, gas-locview-support): New.
12411 (ginline-points, ginternal-reset-location-views): New.
12412 * doc/invoke.texi: Document them. Use @itemx where intended.
12413 (gvariable-location-views): Adjust.
12414 * target.def (reset_location_view): New.
12415 * doc/tm.texi.in (DWARF2_ASM_VIEW_DEBUG_INFO): New.
12416 (TARGET_RESET_LOCATION_VIEW): New.
12417 * doc/tm.texi: Rebuilt.
12418 * dwarf2out.c (dwarf2out_default_as_loc_support): New.
12419 (dwarf2out_default_as_locview_support): New.
12420 (output_asm_line_debug_info): Use option variables.
12421 (dwarf2out_maybe_output_loclist_view_pair): Likewise.
12422 (output_loc_list): Likewise.
12423 (add_high_low_attributes): Check option variables.
12424 Don't output entry view attribute in strict mode.
12425 (gen_inlined_subroutine_die): Check option variables.
12426 (dwarf2out_inline_entry): Likewise.
12427 (init_sections_and_labels): Likewise.
12428 (dwarf2out_early_finish): Likewise.
12429 (maybe_reset_location_view): New, from...
12430 (dwarf2out_var_location): ... here. Call it.
12431 * debug.h (dwarf2out_default_as_loc_support): Declare.
12432 (dwarf2out_default_as_locview_support): Declare.
12433 * hooks.c (hook_int_rtx_insn_0): New.
12434 * hooks.h (hook_int_rtx_insn_0): Declare.
12435 * toplev.c (process_options): Take -gas-loc-support and
12436 -gas-locview-support from dwarf2out. Enable
12437 -gvariable-location-views by default only with locview
12438 assembler support. Enable -ginternal-reset-location-views by
12439 default only if the target defines the corresponding hook.
12440 Enable -ginline-points by default if location views are
12441 enabled; force it disabled if statement frontiers are
12443 * tree-inline.c (expand_call_inline): Check option variables.
12444 * tree-ssa-live.c (remove_unused_scope_block_p): Likewise.
12446 2018-02-13 Richard Sandiford <richard.sandiford@linaro.org>
12448 PR tree-optimization/84321
12449 * tree-vrp.c (intersect_range_with_nonzero_bits): Fix VR_ANTI_RANGE
12450 handling. Also check whether the anti-range contains any values
12451 that satisfy the mask; switch to a VR_RANGE if not.
12453 2018-02-13 Paolo Bonzini <bonzini@gnu.org>
12456 * internal-fn.def (ASAN_CHECK, ASAN_MARK): Revert changes to fnspec.
12458 2018-02-13 Martin Jambor <mjambor@suse.cz>
12461 * ipa-param-manipulation.c (ipa_modify_call_arguments): Use location
12462 of call statements, also set location of a load to a temporary.
12464 2018-02-13 Sebastian Perta <sebastian.perta@renesas.com>
12466 * config/rl78/rl78.c (add_vector_labels): New function.
12467 * config/rl78/rl78.c (rl78_handle_vector_attribute): New function.
12468 * config/rl78/rl78.c (rl78_start_function): Call add_vector_labels.
12469 * config/rl78/rl78.c (rl78_handle_func_attribute): Removed the assert
12470 which checks that no arguments are passed.
12471 * config/rl78/rl78.c (rl78_attribute_table): Add "vector" attribute.
12472 * doc/extend.texi: Documentation for the new attribute.
12474 2018-02-13 Andreas Schwab <schwab@suse.de>
12476 * config/riscv/linux.h (CPP_SPEC): Define.
12478 2018-02-13 Jakub Jelinek <jakub@redhat.com>
12481 * config/i386/i386.c (ix86_init_mmx_sse_builtins): Pass
12482 OPTION_MASK_ISA_AES | OPTION_MASK_ISA_SSE2 instead of
12483 OPTION_MASK_ISA_AES as first argument to def_builtin_const
12484 for AES builtins. Pass OPTION_MASK_ISA_PCLMUL | OPTION_MASK_ISA_SSE2
12485 instead of OPTION_MASK_ISA_PCLMUL as first argument to
12486 def_builtin_const for __builtin_ia32_pclmulqdq128 builtin.
12487 * config/i386/wmmintrin.h: If __SSE2__ is not defined, enable it
12488 temporarily for AES and PCLMUL builtins.
12490 PR tree-optimization/84339
12491 * gimple-fold.c (get_range_strlen): Set *FLEXP to true when handling
12492 ARRAY_REF where first operand is array_at_struct_end_p COMPONENT_REF.
12495 PR middle-end/84309
12496 * match.pd (pow(C,x) -> exp(log(C)*x)): Optimize instead into
12497 exp2(log2(C)*x) if C is a power of 2 and c99 runtime is available.
12498 * generic-match-head.c (canonicalize_math_after_vectorization_p): New
12500 * gimple-match-head.c (canonicalize_math_after_vectorization_p): New
12502 * omp-simd-clone.h: New file.
12503 * omp-simd-clone.c: Include omp-simd-clone.h.
12504 (expand_simd_clones): No longer static.
12505 * tree-vect-patterns.c: Include fold-const-call.h, attribs.h,
12506 cgraph.h and omp-simd-clone.h.
12507 (vect_recog_pow_pattern): Optimize pow(C,x) to exp(log(C)*x).
12508 (vect_recog_widen_shift_pattern): Formatting fix.
12509 (vect_pattern_recog_1): Don't check optab for calls.
12512 * config/i386/sse.md (<avx512>_vpermi2var<mode>3_mask): Force
12513 operands[2] into a REG before using gen_lowpart on it.
12515 2018-02-12 Jeff Law <law@redhat.com>
12518 * config/sh/sh.c (find_barrier): Consider a sibling call
12521 * cse.c (try_back_substitute_reg): Move any REG_ARGS_SIZE note when
12522 successfully back substituting a reg.
12524 2018-02-12 Richard Biener <rguenther@suse.de>
12526 PR tree-optimization/84037
12527 * tree-vect-slp.c (vect_analyze_slp_cost): Add visited
12528 parameter, move visited init to caller.
12529 (vect_slp_analyze_operations): Separate cost from validity
12530 check, initialize visited once for all instances.
12531 (vect_schedule_slp): Analyze map to CSE vectorized nodes once
12533 * tree-vect-stmts.c (vect_model_simple_cost): Make early
12535 (vect_model_promotion_demotion_cost): Likewise.
12536 (vectorizable_bswap): Guard cost modeling with !slp_node
12537 instead of !PURE_SLP_STMT to avoid double-counting on hybrid
12539 (vectorizable_call): Likewise.
12540 (vectorizable_conversion): Likewise.
12541 (vectorizable_assignment): Likewise.
12542 (vectorizable_shift): Likewise.
12543 (vectorizable_operation): Likewise.
12544 (vectorizable_store): Likewise.
12545 (vectorizable_load): Likewise.
12546 (vectorizable_condition): Likewise.
12547 (vectorizable_comparison): Likewise.
12549 2018-02-12 Paolo Bonzini <bonzini@gnu.org>
12552 * internal-fn.def (ASAN_CHECK): Fix fnspec to account for return value.
12553 (ASAN_MARK): Fix fnspec to account for return value, change pointer
12554 argument from 'R' to 'W' so that the pointed-to datum is clobbered.
12556 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
12558 PR middle-end/83665
12559 * params.def (inline-min-speedup): Increase from 8 to 15.
12560 (max-inline-insns-auto): Decrease from 40 to 30.
12561 * ipa-split.c (consider_split): Add some buffer for function to
12562 be considered inlining candidate.
12563 * invoke.texi (max-inline-insns-auto, inline-min-speedup): UPdate
12566 2018-02-12 Richard Biener <rguenther@suse.de>
12568 PR tree-optimization/84037
12569 * tree-vect-slp.c (vect_build_slp_tree_2): Try swapping the
12570 matched stmts if we cannot swap the non-matched ones.
12572 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
12574 * config/i386/avx512fintrin.h (_mm_mask_scalef_round_sd,
12575 _mm_maskz_scalef_round_sd, _mm_mask_scalef_round_ss,
12576 _mm_maskz_scalef_round_ss): New intrinsics.
12577 (__builtin_ia32_scalefsd_round, __builtin_ia32_scalefss_round): Fix.
12578 * config/i386/i386-builtin.def (__builtin_ia32_scalefsd_round,
12579 __builtin_ia32_scalefss_round): Remove.
12580 (__builtin_ia32_scalefsd_mask_round,
12581 __builtin_ia32_scalefss_mask_round): New intrinsics.
12582 * config/i386/sse.md (vmscalef<mode><round_name>): Renamed to ...
12583 (vmscalef<mode><mask_scalar_name><round_scalar_name>): ... this.
12584 ((match_operand:VF_128 2 "<round_nimm_predicate>"
12585 "<round_constraint>")): Changed to ...
12586 ((match_operand:VF_128 2 "<round_scalar_nimm_predicate>"
12587 "<round_scalar_constraint>")): ... this.
12588 ("vscalef<ssescalarmodesuffix>\t{<round_op3>%2, %1, %0|
12589 %0, %1, %2<round_op3>}"): Changed to ...
12590 ("vscalef<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%2, %1,
12591 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %1,
12592 %2<round_scalar_mask_op3>}"): ... this.
12593 * config/i386/subst.md (round_scalar_nimm_predicate): New.
12595 2018-02-12 Olga Makhotina <olga.makhotina@intel.com>
12597 * config/i386/avx512fintrin.h (_mm_mask_sqrt_round_sd)
12598 (_mm_maskz_sqrt_round_sd, _mm_mask_sqrt_round_ss)
12599 (_mm_maskz_sqrt_round_ss): New intrinsics.
12600 (__builtin_ia32_sqrtsd_round, __builtin_ia32_sqrtss_round): Remove.
12601 (__builtin_ia32_sqrtsd_mask_round)
12602 (__builtin_ia32_sqrtss_mask_round): New builtins.
12603 * config/i386/i386-builtin.def (__builtin_ia32_sqrtsd_round)
12604 (__builtin_ia32_sqrtss_round): Remove.
12605 (__builtin_ia32_sqrtsd_mask_round)
12606 (__builtin_ia32_sqrtss_mask_round): New builtins.
12607 * config/i386/sse.md (vmsqrt<mode>2<round_name>): Renamed to ...
12608 (vmsqrt<mode>2<mask_scalar_name><round_scalar_name>): ... this.
12609 ((match_operand:VF_128 1 "vector_operand"
12610 "xBm,<round_constraint>")): Changed to ...
12611 ((match_operand:VF_128 1 "vector_operand"
12612 "xBm,<round_scalar_constraint>")): ... this.
12613 (vsqrt<ssescalarmodesuffix>\t{<round_op3>%1, %2, %0|
12614 %0, %2, %<iptr>1<round_op3>}): Changed to ...
12615 (vsqrt<ssescalarmodesuffix>\t{<round_scalar_mask_op3>%1, %2,
12616 %0<mask_scalar_operand3>|%0<mask_scalar_operand3>, %2,
12617 %<iptr>1<round_scalar_mask_op3>}): ... this.
12618 ((set_attr "prefix" "<round_prefix>")): Changed to ...
12619 ((set_attr "prefix" "<round_scalar_prefix>")): ... this.
12621 2018-02-11 Steven Munroe <munroesj@gcc.gnu.org>
12624 * config/rs6000/mmintrin.h (_mm_cmpeq_pi32 [_ARCH_PWR9]):
12625 Cast vec_cmpeq result to correct type.
12626 * config/rs6000/mmintrin.h (_mm_cmpgt_pi32 [_ARCH_PWR9]):
12627 Cast vec_cmpgt result to correct type.
12629 2018-02-11 Alexandre Oliva <aoliva@redhat.com>
12631 * final.c (final_scan_insn_1): Renamed from...
12632 (final_scan_insn): ... this. New wrapper, to recover
12633 seen from the outermost call in recursive ones.
12634 * config/sparc/sparc.c (output_return): Drop seen from call.
12635 (output_sibcall): Likewise.
12636 * config/visium/visium.c (output_branch): Likewise.
12638 2018-02-10 John David Anglin <danglin@gcc.gnu.org>
12640 * config/pa/pa.c (hppa_profile_hook): Mark SYMBOL_REF for _mcount as
12643 2018-02-10 Alan Modra <amodra@gmail.com>
12646 * config/rs6000/rs6000.md (split_stack_return): Remove (use ..).
12647 Specify LR as an input.
12649 2018-02-10 Jakub Jelinek <jakub@redhat.com>
12652 * omp-low.c (maybe_remove_omp_member_access_dummy_vars,
12653 remove_member_access_dummy_vars): New functions.
12654 (lower_omp_for, lower_omp_taskreg, lower_omp_target,
12655 lower_omp_1, execute_lower_omp): Use them.
12657 PR rtl-optimization/84308
12658 * shrink-wrap.c (spread_components): Release todo vector.
12660 2018-02-09 Vladimir Makarov <vmakarov@redhat.com>
12662 PR rtl-optimization/57193
12663 * ira-color.c (struct allocno_color_data): Add member
12664 conflict_allocno_hard_prefs.
12665 (update_conflict_allocno_hard_prefs): New.
12666 (bucket_allocno_compare_func): Add a preference based on
12667 conflict_allocno_hard_prefs.
12668 (push_allocno_to_stack): Update conflict_allocno_hard_prefs.
12669 (color_allocnos): Remove a dead code. Initiate
12670 conflict_allocno_hard_prefs. Call update_costs_from_prefs.
12672 2018-02-09 Jakub Jelinek <jakub@redhat.com>
12675 * config/rs6000/vsx.md (p9_xxbrq_v16qi): Change input operand
12676 constraint from =wa to wa. Avoid a subreg on the output operand,
12677 instead use a pseudo and subreg it in a move.
12678 (p9_xxbrd_<mode>): Changed to ...
12679 (p9_xxbrd_v2di): ... this insn, without VSX_D iterator.
12680 (p9_xxbrd_v2df): New expander.
12681 (p9_xxbrw_<mode>): Changed to ...
12682 (p9_xxbrw_v4si): ... this insn, without VSX_W iterator.
12683 (p9_xxbrw_v4sf): New expander.
12685 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
12687 * config/rx/rx.md (movsicc): Update expander to be matched by GCC.
12689 2018-02-09 Peter Bergner <bergner@vnet.ibm.com>
12692 * config/rs6000/vsx.md (vsx_mul_v2di): Handle generating a 64-bit
12693 multiply in 32-bit mode.
12694 (vsx_div_v2di): Handle generating a 64-bit signed divide in 32-bit mode.
12695 (vsx_udiv_v2di): Handle generating a 64-bit unsigned divide in 32-bit
12698 2018-02-09 Sebastian Perta <sebastian.perta@renesas.com>
12700 * config/rx/constraints.md (CALL_OP_SYMBOL_REF): Added new constraint
12701 to allow or block "symbol_ref" depending on the value of TARGET_JSR.
12702 * config/rx/rx.md (call_internal): Use CALL_OP_SYMBOL_REF.
12703 * config/rx/rx.md (call_value_internal): Use CALL_OP_SYMBOL_REF.
12705 2018-02-09 Pierre-Marie de Rodat <derodat@adacore.com>
12708 * dwarf2out.c (is_trivial_indirect_ref): New function.
12709 (dwarf2out_late_global_decl): Do not generate a location
12710 attribute for variables that have a non-trivial DECL_VALUE_EXPR
12711 and that are not defined in the current unit.
12713 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
12715 * optabs.c (prepare_cmp_insn): Try harder to emit a direct comparison
12716 instead of a libcall for UNORDERED.
12718 2018-02-09 Tamar Christina <tamar.christina@arm.com>
12721 * config/arm/arm-c.c (arm_cpu_builtins): Un-define __ARM_FEATURE_LDREX,
12722 __ARM_ARCH_PROFILE, __ARM_ARCH_ISA_THUMB, __ARM_FP and __ARM_NEON_FP.
12724 2018-02-09 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12727 * config/s390/s390.c (s390_set_current_function): Invoke
12728 s390_indirect_branch_settings also if fndecl didn't change.
12730 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
12732 * config/rs6000/rs6000.md (blockage): Set length to zero.
12734 2018-02-09 Eric Botcazou <ebotcazou@adacore.com>
12736 * expr.c (optimize_bitfield_assignment_op): Remove obsolete assertion.
12738 2018-02-09 Jakub Jelinek <jakub@redhat.com>
12741 * gcc.c (STATIC_LIBASAN_LIBS, STATIC_LIBTSAN_LIBS,
12742 STATIC_LIBLSAN_LIBS, STATIC_LIBUBSAN_LIBS): Handle -static like
12746 * var-tracking.c (vt_add_function_parameter): Punt for non-onepart
12747 PARALLEL incoming that failed vt_get_decl_and_offset check.
12749 PR middle-end/84237
12750 * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
12751 * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
12753 (get_variable_section): For decls in named .bss* sections pass true as
12754 second argument to bss_initializer_p.
12756 2018-02-09 Marek Polacek <polacek@redhat.com>
12757 Jakub Jelinek <jakub@redhat.com>
12760 * fold-const.c (fold_indirect_ref_1): Use VECTOR_TYPE_P macro.
12761 Formatting fixes. Verify first that tree_fits_poly_int64_p (op01).
12762 Sync some changes from cxx_fold_indirect_ref.
12764 2018-02-09 Alexandre Oliva <aoliva@redhat.com>
12766 * cfgexpand.c (expand_gimple_basic_block): Handle inline entry
12768 * dwarf2out.c (dwarf2_debug_hooks): Enable inline_entry hook.
12769 (BLOCK_INLINE_ENTRY_LABEL): New.
12770 (dwarf2out_var_location): Disregard inline entry markers.
12771 (inline_entry_data): New struct.
12772 (inline_entry_data_hasher): New hashtable type.
12773 (inline_entry_data_hasher::hash): New.
12774 (inline_entry_data_hasher::equal): New.
12775 (inline_entry_data_table): New variable.
12776 (add_high_low_attributes): Add DW_AT_entry_pc and
12777 DW_AT_GNU_entry_view attributes if a pending entry is found
12778 in inline_entry_data_table. Add old entry_pc attribute only
12779 if debug nonbinding markers are disabled.
12780 (gen_inlined_subroutine_die): Set BLOCK_DIE if nonbinding
12781 markers are enabled.
12782 (block_within_block_p, dwarf2out_inline_entry): New.
12783 (dwarf2out_finish): Check that no entries remained in
12784 inline_entry_data_table.
12785 * final.c (reemit_insn_block_notes): Handle inline entry notes.
12786 (final_scan_insn, notice_source_line): Likewise.
12787 (rest_of_clean_state): Skip inline entry markers.
12788 * gimple-pretty-print.c (dump_gimple_debug): Handle inline entry
12790 * gimple.c (gimple_build_debug_inline_entry): New.
12791 * gimple.h (enum gimple_debug_subcode): Add
12792 GIMPLE_DEBUG_INLINE_ENTRY.
12793 (gimple_build_debug_inline_entry): Declare.
12794 (gimple_debug_inline_entry_p): New.
12795 (gimple_debug_nonbind_marker_p): Adjust.
12796 * insn-notes.def (INLINE_ENTRY): New.
12797 * print-rtl.c (rtx_writer::print_rtx_operand_code_0): Handle
12798 inline entry marker notes.
12799 (print_insn): Likewise.
12800 * rtl.h (NOTE_MARKER_P): Add INLINE_ENTRY support.
12801 (INSN_DEBUG_MARKER_KIND): Likewise.
12802 (GEN_RTX_DEBUG_MARKER_INLINE_ENTRY_PAT): New.
12803 * tree-inline.c (expand_call_inline): Build and insert
12804 debug_inline_entry stmt.
12805 * tree-ssa-live.c (remove_unused_scope_block_p): Preserve
12806 inline entry blocks early, if nonbind markers are enabled.
12807 (dump_scope_block): Dump fragment info.
12808 * var-tracking.c (reemit_marker_as_note): Handle inline entry note.
12809 * doc/gimple.texi (gimple_debug_inline_entry_p): New.
12810 (gimple_build_debug_inline_entry): New.
12811 * doc/invoke.texi (gstatement-frontiers, gno-statement-frontiers):
12812 Enable/disable inline entry points too.
12813 * doc/rtl.texi (NOTE_INSN_INLINE_ENTRY): New.
12814 (DEBUG_INSN): Describe inline entry markers.
12816 * common.opt (gvariable-location-views): New.
12817 (gvariable-location-views=incompat5): New.
12818 * config.in: Rebuilt.
12819 * configure: Rebuilt.
12820 * configure.ac: Test assembler for view support.
12821 * dwarf2asm.c (dw2_asm_output_symname_uleb128): New.
12822 * dwarf2asm.h (dw2_asm_output_symname_uleb128): Declare.
12823 * dwarf2out.c (var_loc_view): New typedef.
12824 (struct dw_loc_list_struct): Add vl_symbol, vbegin, vend.
12825 (dwarf2out_locviews_in_attribute): New.
12826 (dwarf2out_locviews_in_loclist): New.
12827 (dw_val_equal_p): Compare val_view_list of dw_val_class_view_lists.
12828 (enum dw_line_info_opcode): Add LI_adv_address.
12829 (struct dw_line_info_table): Add view.
12830 (RESET_NEXT_VIEW, RESETTING_VIEW_P): New macros.
12831 (DWARF2_ASM_VIEW_DEBUG_INFO): Define default.
12832 (zero_view_p): New variable.
12833 (ZERO_VIEW_P): New macro.
12834 (output_asm_line_debug_info): New.
12835 (struct var_loc_node): Add view.
12836 (add_AT_view_list, AT_loc_list): New.
12837 (add_var_loc_to_decl): Add view param. Test it against last.
12838 (new_loc_list): Add view params. Record them.
12839 (AT_loc_list_ptr): Handle loc and view lists.
12840 (view_list_to_loc_list_val_node): New.
12841 (print_dw_val): Handle dw_val_class_view_list.
12842 (size_of_die): Likewise.
12843 (value_format): Likewise.
12844 (loc_list_has_views): New.
12845 (gen_llsym): Set vl_symbol too.
12846 (maybe_gen_llsym, skip_loc_list_entry): New.
12847 (dwarf2out_maybe_output_loclist_view_pair): New.
12848 (output_loc_list): Output view list or entries too.
12849 (output_view_list_offset): New.
12850 (output_die): Handle dw_val_class_view_list.
12851 (output_dwarf_version): New.
12852 (output_compilation_unit_header): Use it.
12853 (output_skeleton_debug_sections): Likewise.
12854 (output_rnglists, output_line_info): Likewise.
12855 (output_pubnames, output_aranges): Update version comments.
12856 (output_one_line_info_table): Output view numbers in asm comments.
12857 (dw_loc_list): Determine current endview, pass it to new_loc_list.
12858 Call maybe_gen_llsym.
12859 (loc_list_from_tree_1): Adjust.
12860 (add_AT_location_description): Create view list attribute if
12861 needed, check it's absent otherwise.
12862 (convert_cfa_to_fb_loc_list): Adjust.
12863 (maybe_emit_file): Call output_asm_line_debug_info for test.
12864 (dwarf2out_var_location): Reset views as needed. Precompute
12865 add_var_loc_to_decl args. Call get_attr_min_length only if we have the
12866 attribute. Set view.
12867 (new_line_info_table): Reset next view.
12868 (set_cur_line_info_table): Call output_asm_line_debug_info for test.
12869 (dwarf2out_source_line): Likewise. Output view resets and labels to
12870 the assembler, or select appropriate line info opcodes.
12871 (prune_unused_types_walk_attribs): Handle dw_val_class_view_list.
12872 (optimize_string_length): Catch it. Adjust.
12873 (resolve_addr): Copy vl_symbol along with ll_symbol. Handle
12874 dw_val_class_view_list, and remove it if no longer needed.
12875 (hash_loc_list): Hash view numbers.
12876 (loc_list_hasher::equal): Compare them.
12877 (optimize_location_lists): Check whether a view list symbol is
12878 needed, and whether the locview attribute is present, and
12879 whether they match. Remove the locview attribute if no longer
12881 (index_location_lists): Call skip_loc_list_entry for test.
12882 (dwarf2out_finish): Call output_asm_line_debug_info for test.
12883 Use output_dwarf_version.
12884 * dwarf2out.h (enum dw_val_class): Add dw_val_class_view_list.
12885 (struct dw_val_node): Add val_view_list.
12886 * final.c (SEEN_NEXT_VIEW): New.
12887 (set_next_view_needed): New.
12888 (clear_next_view_needed): New.
12889 (maybe_output_next_view): New.
12890 (final_start_function): Rename to...
12891 (final_start_function_1): ... this. Take pointer to FIRST,
12892 add SEEN parameter. Emit param bindings in the initial view.
12893 (final_start_function): Reintroduce SEEN-less interface.
12894 (final): Rename to...
12895 (final_1): ... this. Take SEEN parameter. Output final pending
12896 next view at the end.
12897 (final): Reintroduce seen-less interface.
12898 (final_scan_insn): Output pending next view before switching
12899 sections or ending a block. Mark the next view as needed when
12900 outputting variable locations. Notify debug backend of section
12901 changes, and of location view changes.
12902 (rest_of_handle_final): Adjust.
12903 * toplev.c (process_options): Autodetect value for debug variable
12904 location views option. Warn on incompat5 without -gdwarf-5.
12905 * doc/invoke.texi (gvariable-location-views): New.
12906 (gvariable-location-views=incompat5): New.
12907 (gno-variable-location-views): New.
12909 2018-02-08 David Malcolm <dmalcolm@redhat.com>
12911 PR tree-optimization/84136
12912 * tree-cfg.c (find_taken_edge_computed_goto): Remove assertion
12913 that the result of find_edge is non-NULL.
12915 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
12918 * config/i386/x86-tune-costs.h (skylake_cost): Fix cost of
12919 storing integer register in SImode. Fix cost of 256 and 512
12920 byte aligned SSE register store.
12922 2018-02-08 Sergey Shalnov <sergey.shalnov@intel.com>
12924 * config/i386/i386.c (ix86_multiplication_cost): Fix
12925 multiplication cost for TARGET_AVX512DQ.
12927 2018-02-08 Marek Polacek <polacek@redhat.com>
12929 PR tree-optimization/84238
12930 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Verify the result of
12933 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
12935 PR tree-optimization/84265
12936 * tree-vect-stmts.c (vectorizable_store): Don't treat
12937 VMAT_CONTIGUOUS accesses as grouped.
12938 (vectorizable_load): Likewise.
12940 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
12942 PR tree-optimization/81635
12943 * wide-int.h (wi::round_down_for_mask, wi::round_up_for_mask): Declare.
12944 * wide-int.cc (wi::round_down_for_mask, wi::round_up_for_mask)
12945 (test_round_for_mask): New functions.
12946 (wide_int_cc_tests): Call test_round_for_mask.
12947 * tree-vrp.h (intersect_range_with_nonzero_bits): Declare.
12948 * tree-vrp.c (intersect_range_with_nonzero_bits): New function.
12949 * tree-data-ref.c (split_constant_offset_1): Use it to refine the
12950 range returned by get_range_info.
12952 2018-02-08 Jan Hubicka <hubicka@ucw.cz>
12955 * cgraph.h (symtab_node::output_to_lto_symbol_table_p): Declare
12956 * symtab.c: Include builtins.h
12957 (symtab_node::output_to_lto_symbol_table_p): Move here
12958 from lto-streamer-out.c:output_symbol_p.
12959 * lto-streamer-out.c (write_symbol): Turn early exit to assert.
12960 (output_symbol_p): Move all logic to symtab.c
12961 (produce_symtab): Update.
12963 2018-02-08 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
12965 * config/s390/s390-opts.h (enum indirect_branch): Define.
12966 * config/s390/s390-protos.h (s390_return_addr_from_memory)
12967 (s390_indirect_branch_via_thunk)
12968 (s390_indirect_branch_via_inline_thunk): Add function prototypes.
12969 (enum s390_indirect_branch_type): Define.
12970 * config/s390/s390.c (struct s390_frame_layout, struct
12971 machine_function): Remove.
12972 (indirect_branch_prez10thunk_mask, indirect_branch_z10thunk_mask)
12973 (indirect_branch_table_label_no, indirect_branch_table_name):
12975 (INDIRECT_BRANCH_NUM_OPTIONS): Define macro.
12976 (enum s390_indirect_branch_option): Define.
12977 (s390_return_addr_from_memory): New function.
12978 (s390_handle_string_attribute): New function.
12979 (s390_attribute_table): Add new attribute handler.
12980 (s390_execute_label): Handle UNSPEC_EXECUTE_JUMP patterns.
12981 (s390_indirect_branch_via_thunk): New function.
12982 (s390_indirect_branch_via_inline_thunk): New function.
12983 (s390_function_ok_for_sibcall): When jumping via thunk disallow
12984 sibling call optimization for non z10 compiles.
12985 (s390_emit_call): Force indirect branch target to be a single
12986 register. Add r1 clobber for non-z10 compiles.
12987 (s390_emit_epilogue): Emit return jump via return_use expander.
12988 (s390_reorg): Handle JUMP_INSNs as execute targets.
12989 (s390_option_override_internal): Perform validity checks for the
12990 new command line options.
12991 (s390_indirect_branch_attrvalue): New function.
12992 (s390_indirect_branch_settings): New function.
12993 (s390_set_current_function): Invoke s390_indirect_branch_settings.
12994 (s390_output_indirect_thunk_function): New function.
12995 (s390_code_end): Implement target hook.
12996 (s390_case_values_threshold): Implement target hook.
12997 (TARGET_ASM_CODE_END, TARGET_CASE_VALUES_THRESHOLD): Define target
12999 * config/s390/s390.h (struct s390_frame_layout)
13000 (struct machine_function): Move here from s390.c.
13001 (TARGET_INDIRECT_BRANCH_NOBP_RET)
13002 (TARGET_INDIRECT_BRANCH_NOBP_JUMP)
13003 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_THUNK)
13004 (TARGET_INDIRECT_BRANCH_NOBP_JUMP_INLINE_THUNK)
13005 (TARGET_INDIRECT_BRANCH_NOBP_CALL)
13006 (TARGET_DEFAULT_INDIRECT_BRANCH_TABLE)
13007 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EXRL)
13008 (TARGET_INDIRECT_BRANCH_THUNK_NAME_EX)
13009 (TARGET_INDIRECT_BRANCH_TABLE): Define macros.
13010 * config/s390/s390.md (UNSPEC_EXECUTE_JUMP)
13011 (INDIRECT_BRANCH_THUNK_REGNUM): Define constants.
13012 (mnemonic attribute): Add values which aren't recognized
13014 ("*cjump_long", "*icjump_long", "*basr", "*basr_r"): Disable
13015 pattern for branch conversion. Fix mnemonic attribute.
13016 ("*c<code>", "*sibcall_br", "*sibcall_value_br", "*return"): Emit
13017 indirect branch via thunk if requested.
13018 ("indirect_jump", "<code>"): Expand patterns for branch conversion.
13019 ("*indirect_jump"): Disable for branch conversion using out of
13021 ("indirect_jump_via_thunk<mode>_z10")
13022 ("indirect_jump_via_thunk<mode>")
13023 ("indirect_jump_via_inlinethunk<mode>_z10")
13024 ("indirect_jump_via_inlinethunk<mode>", "*casesi_jump")
13025 ("casesi_jump_via_thunk<mode>_z10", "casesi_jump_via_thunk<mode>")
13026 ("casesi_jump_via_inlinethunk<mode>_z10")
13027 ("casesi_jump_via_inlinethunk<mode>", "*basr_via_thunk<mode>_z10")
13028 ("*basr_via_thunk<mode>", "*basr_r_via_thunk_z10")
13029 ("*basr_r_via_thunk", "return<mode>_prez10"): New pattern.
13030 ("*indirect2_jump"): Disable for branch conversion.
13031 ("casesi_jump"): Turn into expander and expand patterns for branch
13033 ("return_use"): New expander.
13034 ("*return"): Emit return via thunk and rename it to ...
13035 ("*return<mode>"): ... this one.
13036 * config/s390/s390.opt: Add new options and and enum for the
13039 2018-02-08 Richard Sandiford <richard.sandiford@linaro.org>
13041 * lra-constraints.c (match_reload): Unconditionally use
13042 gen_lowpart_SUBREG, rather than selecting between that
13043 and equivalent gen_rtx_SUBREG code.
13045 2018-02-08 Richard Biener <rguenther@suse.de>
13047 PR tree-optimization/84233
13048 * tree-ssa-phiprop.c (propagate_with_phi): Use separate
13049 changed flag instead of boguously re-using phi_inserted.
13051 2018-02-08 Martin Jambor <mjambor@suse.cz>
13053 * hsa-gen.c (get_symbol_for_decl): Set program allocation for
13054 static local variables.
13056 2018-02-08 Richard Biener <rguenther@suse.de>
13058 PR tree-optimization/84278
13059 * tree-vect-stmts.c (vectorizable_store): When looking for
13060 smaller vector types to perform grouped strided loads/stores
13061 make sure the mode is supported by the target.
13062 (vectorizable_load): Likewise.
13064 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
13066 * config/aarch64/aarch64.c (aarch64_components_for_bb):
13067 Increase LDP/STP opportunities by adding adjacent callee-saves.
13069 2018-02-08 Wilco Dijkstra <wdijkstr@arm.com>
13071 PR rtl-optimization/84068
13072 PR rtl-optimization/83459
13073 * haifa-sched.c (rank_for_schedule): Fix SCHED_PRESSURE_MODEL sorting.
13075 2018-02-08 Aldy Hernandez <aldyh@redhat.com>
13077 PR tree-optimization/84224
13078 * gimple-ssa-warn-alloca.c (pass_walloca::execute): Remove assert.
13079 * calls.c (gimple_alloca_call_p): Only return TRUE when we have
13080 non-zero arguments.
13082 2018-02-07 Iain Sandoe <iain@codesourcery.com>
13085 * config/rs6000/altivec.md (*restore_world): Remove LR use.
13086 * config/rs6000/predicates.md (restore_world_operation): Adjust op
13087 count, remove one USE.
13089 2018-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
13091 * doc/install.texi (Configuration): Document the
13092 --with-long-double-format={ibm,ieee} PowerPC configuration
13096 * config/rs6000/rs6000.md (fix_trunc<SFDF:mode><QHI:mode>2):
13097 Convert from define_expand to be define_insn_and_split. Rework
13098 float/double/_Float128 conversions to QI/HI/SImode to work with
13099 both ISA 2.07 (power8) or ISA 3.0 (power9). Fix regression where
13100 conversions to QI/HImode types did a store and then a load to
13101 truncate the value. For conversions to VSX registers, don't split
13102 the insn, instead emit the code directly. Use the code iterator
13103 any_fix to combine signed and unsigned conversions.
13104 (fix<uns>_trunc<SFDF:mode>si2_p8): Likewise.
13105 (fixuns_trunc<SFDF:mode><QHI:mode>2): Likewise.
13106 (fix_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13107 (fix<uns>_trunc<SFDF:mode><QHI:mode>2): Likewise.
13108 (fix_<mode>di2_hw): Likewise.
13109 (fixuns_<mode>di2_hw): Likewise.
13110 (fix_<mode>si2_hw): Likewise.
13111 (fixuns_<mode>si2_hw): Likewise.
13112 (fix<uns>_<IEEE128:mode><SDI:mode>2_hw): Likewise.
13113 (fix<uns>_trunc<IEEE128:mode><QHI:mode>2): Likewise.
13114 (fctiw<u>z_<mode>_smallint): Rename fctiw<u>z_<mode>_smallint to
13115 fix<uns>_trunc<SFDF:mode>si2_p8.
13116 (fix_trunc<SFDF:mode><QHI:mode>2_internal): Delete, no longer used.
13117 (fixuns_trunc<SFDF:mode><QHI:mode>2_internal): Likewise.
13118 (fix<uns>_<mode>_mem): Likewise.
13119 (fctiw<u>z_<mode>_mem): Likewise.
13120 (fix<uns>_<mode>_mem): Likewise.
13121 (fix<uns>_trunc<SFDF:mode><QHSI:mode>2_mem): On ISA 3.0, prevent
13122 the register allocator from doing a direct move to the GPRs to do
13123 a store, and instead use the ISA 3.0 store byte/half-word from
13124 vector register instruction. For IEEE 128-bit floating point,
13125 also optimize stores of 32-bit ints.
13126 (fix<uns>_trunc<IEEE128:mode><QHSI:mode>2_mem): Likewise.
13128 2018-02-07 Alan Hayward <alan.hayward@arm.com>
13130 * genextract.c (push_pathstr_operand): New function to support
13132 (walk_rtx): Call push_pathstr_operand.
13133 (print_path): Support [a-zA-Z].
13135 2018-02-07 Richard Biener <rguenther@suse.de>
13137 PR tree-optimization/84037
13138 * tree-vectorizer.h (struct _loop_vec_info): Add ivexpr_map member.
13139 (cse_and_gimplify_to_preheader): Declare.
13140 (vect_get_place_in_interleaving_chain): Likewise.
13141 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
13143 (_loop_vec_info::~_loop_vec_info): Delete it.
13144 (cse_and_gimplify_to_preheader): New function.
13145 * tree-vect-slp.c (vect_get_place_in_interleaving_chain): Export.
13146 * tree-vect-stmts.c (vectorizable_store): CSE base and steps.
13147 (vectorizable_load): Likewise. For grouped stores always base
13148 the IV on the first element.
13149 * tree-vect-loop-manip.c (vect_loop_versioning): Unshare versioning
13150 condition before gimplifying.
13152 2018-02-07 Jakub Jelinek <jakub@redhat.com>
13154 * tree-eh.c (operation_could_trap_helper_p): Ignore honor_trapv for
13155 *DIV_EXPR and *MOD_EXPR.
13157 2018-02-07 H.J. Lu <hongjiu.lu@intel.com>
13160 * config/i386/i386.c (ix86_option_override_internal): Mask out
13161 the CF_SET bit when checking -fcf-protection.
13163 2018-02-07 Tom de Vries <tom@codesourcery.com>
13166 * omp-expand.c (expand_oacc_collapse_init): Ensure diff_type is large
13169 2018-02-07 Richard Biener <rguenther@suse.de>
13171 PR tree-optimization/84204
13172 * tree-chrec.c (chrec_fold_plus_1): Remove size limiting in
13175 PR tree-optimization/84205
13176 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Also
13177 special-case isl_ast_op_zdiv_r.
13179 PR tree-optimization/84223
13180 * graphite-scop-detection.c (gather_bbs::before_dom_children):
13181 Only add conditions from within the region.
13182 (gather_bbs::after_dom_children): Adjust.
13184 2018-02-07 Georg-Johann Lay <avr@gjlay.de>
13187 * config/avr/avr.h (GENERAL_REGNO_P, GENERAL_REG_P): New macros.
13188 * config/avr/avr.md: Only post-reload split REG-REG moves if
13189 either register is GENERAL_REG_P.
13191 2018-02-07 Jakub Jelinek <jakub@redhat.com>
13193 PR tree-optimization/84235
13194 * tree-ssa-scopedtables.c
13195 (avail_exprs_stack::simplify_binary_operation): Fir MINUS_EXPR, punt
13196 if the subtraction is performed in floating point type where NaNs are
13197 honored. For *DIV_EXPR, punt for ALL_FRACT_MODE_Ps where we can't
13198 build 1. Formatting fix.
13200 2018-02-06 Jakub Jelinek <jakub@redhat.com>
13203 * config/i386/i386.c (rest_of_insert_endbranch): Only skip
13204 NOTE_INSN_CALL_ARG_LOCATION after a call, not anything else,
13205 and skip it regardless of bb boundaries. Use CALL_P macro,
13206 don't test INSN_P (insn) together with CALL_P or JUMP_P check
13207 unnecessarily, formatting fix.
13209 2018-02-06 Michael Collison <michael.collison@arm.com>
13211 * config/arm/thumb2.md:
13212 (*thumb2_mov_negscc): Split only if TARGET_THUMB2 && !arm_restrict_it.
13213 (*thumb_mov_notscc): Ditto.
13215 2018-02-06 Michael Meissner <meissner@linux.vnet.ibm.com>
13218 * config/rs6000/rs6000.md (su code attribute): Use "u" for
13219 unsigned_fix, not "s".
13221 2018-02-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13223 * configure.ac (gcc_fn_eh_frame_ro): New function.
13224 (gcc_cv_as_cfi_directive): Check both 32 and 64-bit assembler for
13225 correct .eh_frame permissions.
13226 * configure: Regenerate.
13228 2018-02-06 Andrew Jenner <andrew@codeourcery.com>
13230 * doc/invoke.texi: Add section for the PowerPC SPE backend. Remove
13231 irrelevant options.
13233 2018-02-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
13235 * config/rs6000/rs6000.c (rs6000_option_override_internal):
13236 Display warning message for -mno-speculate-indirect-jumps.
13238 2018-02-06 Andrew Jenner <andrew@codesourcery.com>
13240 * config/powerpcspe/powerpcspe.opt: (msimple-fpu, mfpu) Add
13242 * config/powerpcspe/sysv4.opt (mbit-align): Likewise.
13244 2018-02-06 Aldy Hernandez <aldyh@redhat.com>
13246 PR tree-optimization/84225
13247 * tree-eh.c (find_trapping_overflow): Only call
13248 operation_no_trapping_overflow when ANY_INTEGRAL_TYPE_P.
13250 2018-02-06 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
13253 * config/i386/i386.c: Reimplement the check of possible options
13254 -mibt/-mshstk conbination. Change error messages.
13255 * doc/invoke.texi: Fix a typo: remove extra '='.
13257 2018-02-06 Marek Polacek <polacek@redhat.com>
13259 PR tree-optimization/84228
13260 * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Skip debug statements.
13262 2018-02-06 Tamar Christina <tamar.christina@arm.com>
13265 * config/arm/arm.c (arm_print_asm_arch_directives): Record already
13266 emitted arch directives.
13267 * config/arm/arm-c.c (arm_cpu_builtins): Undefine __ARM_ARCH and
13268 __ARM_FEATURE_COPROC before changing architectures.
13270 2018-02-06 Richard Biener <rguenther@suse.de>
13272 * config/i386/i386.c (print_reg): Fix typo.
13273 (ix86_loop_unroll_adjust): Do not unroll beyond the original nunroll.
13275 2018-02-06 Eric Botcazou <ebotcazou@adacore.com>
13277 * configure: Regenerate.
13279 2018-02-05 Martin Sebor <msebor@redhat.com>
13281 PR tree-optimization/83369
13282 * tree-ssa-ccp.c (pass_post_ipa_warn::execute): Use %G to print
13285 2018-02-05 Martin Liska <mliska@suse.cz>
13287 * doc/invoke.texi: Cherry-pick upstream r323995.
13289 2018-02-05 Richard Sandiford <richard.sandiford@linaro.org>
13291 * ira.c (ira_init_register_move_cost): Adjust comment.
13293 2018-02-05 Martin Liska <mliska@suse.cz>
13295 PR gcov-profile/84137
13296 * doc/gcov.texi: Fix typo in documentation.
13298 2018-02-05 Martin Liska <mliska@suse.cz>
13300 PR gcov-profile/83879
13301 * doc/gcov.texi: Document necessity of --dynamic-list-data when
13302 using dlopen functionality.
13304 2018-02-05 Olga Makhotina <olga.makhotina@intel.com>
13306 * config/i386/avx512dqintrin.h (_mm_mask_range_sd, _mm_maskz_range_sd,
13307 _mm_mask_range_round_sd, _mm_maskz_range_round_sd, _mm_mask_range_ss,
13308 _mm_maskz_range_ss, _mm_mask_range_round_ss,
13309 _mm_maskz_range_round_ss): New intrinsics.
13310 (__builtin_ia32_rangesd128_round)
13311 (__builtin_ia32_rangess128_round): Remove.
13312 (__builtin_ia32_rangesd128_mask_round,
13313 __builtin_ia32_rangess128_mask_round): New builtins.
13314 * config/i386/i386-builtin.def (__builtin_ia32_rangesd128_round,
13315 __builtin_ia32_rangess128_round): Remove.
13316 (__builtin_ia32_rangesd128_mask_round,
13317 __builtin_ia32_rangess128_mask_round): New builtins.
13318 * config/i386/sse.md (ranges<mode><round_saeonly_name>): Renamed to ...
13319 (ranges<mode><mask_scalar_name><round_saeonly_scalar_name>): ... this.
13320 ((match_operand:VF_128 2 "<round_saeonly_nimm_predicate>"
13321 "<round_saeonly_constraint>")): Changed to ...
13322 ((match_operand:VF_128 2 "<round_saeonly_scalar_nimm_predicate>"
13323 "<round_saeonly_scalar_constraint>")): ... this.
13324 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_op4>%2, %1, %0|
13325 %0, %1, %2<round_saeonly_op4>, %3}"): Changed to ...
13326 ("vrange<ssescalarmodesuffix>\t{%3, <round_saeonly_scalar_mask_op4>%2,
13327 %1, %0<mask_scalar_operand4>|%0<mask_scalar_operand4>, %1,
13328 %2<round_saeonly_scalar_mask_op4>, %3}"): ... this.
13330 2018-02-02 Andrew Jenner <andrew@codesourcery.com>
13332 * config/powerpcspe/powerpcspe.opt: Add Undocumented to irrelevant
13334 * config/powerpcspe/powerpcspe-tables.opt (rs6000_cpu_opt_value):
13335 Remove all values except native, 8540 and 8548.
13337 2018-02-02 H.J. Lu <hongjiu.lu@intel.com>
13339 * config/i386/i386.c (ix86_output_function_return): Pass
13340 INVALID_REGNUM, instead of -1, as invalid register number to
13341 indirect_thunk_name and output_indirect_thunk.
13343 2018-02-02 Julia Koval <julia.koval@intel.com>
13345 * config.gcc: Add -march=icelake.
13346 * config/i386/driver-i386.c (host_detect_local_cpu): Detect icelake.
13347 * config/i386/i386-c.c (ix86_target_macros_internal): Handle icelake.
13348 * config/i386/i386.c (processor_costs): Add m_ICELAKE.
13349 (PTA_ICELAKE, PTA_AVX512VNNI, PTA_GFNI, PTA_VAES, PTA_AVX512VBMI2,
13350 PTA_VPCLMULQDQ, PTA_RDPID, PTA_AVX512BITALG): New.
13351 (processor_target_table): Add icelake.
13352 (ix86_option_override_internal): Handle new PTAs.
13353 (get_builtin_code_for_version): Handle icelake.
13354 (M_INTEL_COREI7_ICELAKE): New.
13355 (fold_builtin_cpu): Handle icelake.
13356 * config/i386/i386.h (TARGET_ICELAKE, PROCESSOR_ICELAKE): New.
13357 * doc/invoke.texi: Add -march=icelake.
13359 2018-02-02 Julia Koval <julia.koval@intel.com>
13361 * config/i386/i386.c (ix86_option_override_internal): Change flags type
13362 to wide_int_bitmask.
13363 * wide-int-bitmask.h: New.
13365 2018-02-02 Igor Tsimbalist <igor.v.tsimbalist@intel.com>
13368 * config/i386/i386.md: Replace Pmode with word_mode in
13369 builtin_setjmp_setup and builtin_longjmp to support x32.
13371 2018-02-01 Peter Bergner <bergner@vnet.ibm.com>
13375 * config/rs6000/driver-rs6000.c: #include "diagnostic.h".
13377 (rs6000_supported_cpu_names): New static variable.
13378 (linux_cpu_translation_table): Likewise.
13379 (elf_platform) <cpu>: Define new static variable and use it.
13380 Translate kernel AT_PLATFORM name to canonical name if needed.
13381 Error if platform name is unknown.
13383 2018-02-01 Aldy Hernandez <aldyh@redhat.com>
13386 * config/pa/predicates.md (base14_operand): Handle E_VOIDmode.
13388 2018-02-01 Jeff Law <law@redhat.com>
13391 * config/i386/i386.c (release_scratch_register_on_entry): Add new
13392 OFFSET and RELEASE_VIA_POP arguments. Use SP+OFFSET to restore
13393 the scratch if RELEASE_VIA_POP is false.
13394 (ix86_adjust_stack_and_probe_stack_clash): Un-constify SIZE.
13395 If we have to save a temporary register, decrement SIZE appropriately.
13396 Pass new arguments to release_scratch_register_on_entry.
13397 (ix86_adjust_stack_and_probe): Likewise.
13398 (ix86_emit_probe_stack_range): Pass new arguments to
13399 release_scratch_register_on_entry.
13401 2018-02-01 Uros Bizjak <ubizjak@gmail.com>
13403 PR rtl-optimization/84157
13404 * combine.c (change_zero_ext): Use REG_P predicate in
13405 front of HARD_REGISTER_P predicate.
13407 2018-02-01 Georg-Johann Lay <avr@gjlay.de>
13409 * config/avr/avr.c (avr_option_override): Move disabling of
13410 -fdelete-null-pointer-checks to...
13411 * common/config/avr/avr-common.c (avr_option_optimization_table):
13414 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13416 PR tree-optimization/81635
13417 * tree-data-ref.c (split_constant_offset_1): For types that
13418 wrap on overflow, try to use range info to prove that wrapping
13421 2018-02-01 Renlin Li <renlin.li@arm.com>
13424 * config/aarch64/aarch64.c (aarch64_class_max_nregs): Handle
13425 TAILCALL_ADDR_REGS.
13426 (aarch64_register_move_cost): Likewise.
13427 * config/aarch64/aarch64.h (reg_class): Rename CALLER_SAVE_REGS to
13428 TAILCALL_ADDR_REGS.
13429 (REG_CLASS_NAMES): Likewise.
13430 (REG_CLASS_CONTENTS): Rename CALLER_SAVE_REGS to
13431 TAILCALL_ADDR_REGS. Remove IP registers.
13432 * config/aarch64/aarch64.md (Ucs): Update register constraint.
13434 2018-02-01 Richard Biener <rguenther@suse.de>
13436 * domwalk.h (dom_walker::dom_walker): Add additional constructor
13437 for specifying RPO order and allow NULL for that.
13438 * domwalk.c (dom_walker::dom_walker): Likewise.
13439 (dom_walker::walk): Handle NULL RPO order.
13440 * tree-into-ssa.c (rewrite_dom_walker): Do not walk dom children
13442 (rewrite_update_dom_walker): Likewise.
13443 (mark_def_dom_walker): Likewise.
13445 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13447 * config/aarch64/aarch64-protos.h (aarch64_split_sve_subreg_move)
13448 (aarch64_maybe_expand_sve_subreg_move): Declare.
13449 * config/aarch64/aarch64.md (UNSPEC_REV_SUBREG): New unspec.
13450 * config/aarch64/predicates.md (aarch64_any_register_operand): New
13452 * config/aarch64/aarch64-sve.md (mov<mode>): Optimize subreg moves
13453 that are semantically a reverse operation.
13454 (*aarch64_sve_mov<mode>_subreg_be): New pattern.
13455 * config/aarch64/aarch64.c (aarch64_maybe_expand_sve_subreg_move):
13456 (aarch64_replace_reg_mode, aarch64_split_sve_subreg_move): New
13458 (aarch64_can_change_mode_class): For big-endian, forbid changes
13459 between two SVE modes if they have different element sizes.
13461 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13463 * config/aarch64/aarch64.c (aarch64_expand_sve_const_vector): Prefer
13464 the TImode handling for big-endian targets.
13466 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13468 * config/aarch64/aarch64-sve.md (sve_ld1rq): Replace with...
13469 (*sve_ld1rq<Vesize>): ... this new pattern. Handle all element sizes,
13471 * config/aarch64/aarch64.c (aarch64_expand_sve_widened_duplicate):
13472 Remove BSWAP handing for big-endian targets and use the form of
13473 LD1RQ appropariate for the mode.
13475 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13477 * config/aarch64/aarch64.c (aarch64_simd_valid_immediate): Handle
13478 all CONST_VECTOR_DUPLICATE_P vectors, not just those with a single
13479 duplicated element.
13481 2018-02-01 Richard Sandiford <richard.sandiford@linaro.org>
13484 * config/aarch64/aarch64.c (aarch64_secondary_reload): Tighten
13485 check for operands that need to go through aarch64_sve_reload_be.
13487 2018-02-01 Jakub Jelinek <jakub@redhat.com>
13489 PR tree-optimization/81661
13490 PR tree-optimization/84117
13491 * tree-eh.h (rewrite_to_non_trapping_overflow): Declare.
13492 * tree-eh.c: Include gimplify.h.
13493 (find_trapping_overflow, replace_trapping_overflow,
13494 rewrite_to_non_trapping_overflow): New functions.
13495 * tree-vect-loop.c: Include tree-eh.h.
13496 (vect_get_loop_niters): Use rewrite_to_non_trapping_overflow.
13497 * tree-data-ref.c: Include tree-eh.h.
13498 (get_segment_min_max): Use rewrite_to_non_trapping_overflow.
13500 2018-01-31 Uros Bizjak <ubizjak@gmail.com>
13502 PR rtl-optimization/84123
13503 * combine.c (change_zero_ext): Check if hard register satisfies
13504 can_change_dest_mode before calling gen_lowpart_SUBREG.
13506 2018-01-31 Vladimir Makarov <vmakarov@redhat.com>
13509 * ira.c (ira_init_register_move_cost): Remove assert.
13511 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
13513 PR rtl-optimization/84071
13514 * doc/tm.texi.in (WORD_REGISTER_OPERATIONS): Add explicit case.
13515 * doc/tm.texi: Regenerate.
13517 2018-01-31 Richard Biener <rguenther@suse.de>
13519 PR tree-optimization/84132
13520 * tree-data-ref.c (analyze_miv_subscript): Properly
13521 check whether evolution_function_is_affine_multivariate_p
13522 before calling gcd_of_steps_may_divide_p.
13524 2018-01-31 Julia Koval <julia.koval@intel.com>
13527 * config/i386/i386.c (ix86_expand_builtin): Handle IX86_BUILTIN_RDPID.
13528 * config/i386/i386.md (rdpid_rex64) New.
13529 (rdpid): Make 32bit only.
13531 2018-01-29 Aldy Hernandez <aldyh@redhat.com>
13534 * tree-pretty-print.c (dump_generic_node): Handle a TYPE_NAME with
13535 an IDENTIFIER_NODE for FUNCTION_TYPE's.
13537 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
13540 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
13542 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
13544 2018-01-31 Eric Botcazou <ebotcazou@adacore.com>
13546 PR rtl-optimization/84071
13547 * combine.c (record_dead_and_set_regs_1): Record the source unmodified
13548 for a paradoxical SUBREG on a WORD_REGISTER_OPERATIONS target.
13550 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
13552 * config/arc/arc.c (arc_handle_aux_attribute): New function.
13553 (arc_attribute_table): Add 'aux' attribute.
13554 (arc_in_small_data_p): Consider aux like variables.
13555 (arc_is_aux_reg_p): New function.
13556 (arc_asm_output_aligned_decl_local): Ignore 'aux' like variables.
13557 (arc_get_aux_arg): New function.
13558 (prepare_move_operands): Handle aux-register access.
13559 (arc_handle_aux_attribute): New function.
13560 * doc/extend.texi (ARC Variable attributes): Add subsection.
13562 2018-01-31 Claudiu Zissulescu <claziss@synopsys.com>
13564 * config/arc/arc-protos.h (arc_is_uncached_mem_p): Function proto.
13565 * config/arc/arc.c (arc_handle_uncached_attribute): New function.
13566 (arc_attribute_table): Add 'uncached' attribute.
13567 (arc_print_operand): Print '.di' flag for uncached memory
13569 (arc_in_small_data_p): Do not consider for small data the uncached
13571 (arc_is_uncached_mem_p): New function.
13572 * config/arc/predicates.md (compact_store_memory_operand): Check
13573 for uncached memory accesses.
13574 (nonvol_nonimm_operand): Likewise.
13575 * gcc/doc/extend.texi (ARC Type Attribute): New subsection.
13577 2018-01-31 Jakub Jelinek <jakub@redhat.com>
13580 * common.opt (falign-functions=, falign-jumps=, falign-labels=,
13581 falign-loops=): Add Optimization flag.
13583 2018-01-30 Jeff Law <law@redhat.com>
13586 * i386.c (ix86_adjust_stack_and_probe_stack_clash): New argument
13587 INT_REGISTERS_SAVED. Check it prior to calling
13588 get_scratch_register_on_entry.
13589 (ix86_adjust_stack_and_probe): Similarly.
13590 (ix86_emit_probe_stack_range): Similarly.
13591 (ix86_expand_prologue): Corresponding changes.
13593 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13596 * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
13597 -std=iso9899:199409 instead of -pedantic to select values-Xc.o.
13599 2018-01-30 Vladimir Makarov <vmakarov@redhat.com>
13602 * lra-constraints.c (curr_insn_transform): Process AND in the
13605 2018-01-30 Jakub Jelinek <jakub@redhat.com>
13607 PR rtl-optimization/83986
13608 * sched-deps.c (sched_analyze_insn): For frame related insns, add anti
13609 dependence against last_pending_memory_flush in addition to
13610 pending_jump_insns.
13612 2018-01-30 Alexandre Oliva <aoliva@redhat.com>
13614 PR tree-optimization/81611
13615 * tree-ssa-dom.c (simple_iv_increment_p): Skip intervening
13618 2018-01-30 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
13621 * config/rs6000/rs6000.c (rs6000_internal_arg_pointer): Only return
13624 2018-01-30 Richard Biener <rguenther@suse.de>
13625 Jakub Jelinek <jakub@redhat.com>
13627 PR tree-optimization/84111
13628 * tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely_1): Skip
13629 inner loops added during recursion, as they don't have up-to-date
13632 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
13635 * ipa-inline.c (can_inline_edge_p): Break out late tests to...
13636 (can_inline_edge_by_limits_p): ... here.
13637 (can_early_inline_edge_p, check_callers,
13638 update_caller_keys, update_callee_keys, recursive_inlining,
13639 add_new_edges_to_heap, speculation_useful_p,
13640 inline_small_functions,
13641 inline_small_functions, flatten_function,
13642 inline_to_all_callers_1): Update.
13644 2018-01-30 Jan Hubicka <hubicka@ucw.cz>
13646 * profile-count.c (profile_count::combine_with_ipa_count): Handle
13649 2018-01-30 Richard Biener <rguenther@suse.de>
13651 PR tree-optimization/83008
13652 * tree-vect-slp.c (vect_analyze_slp_cost_1): Properly cost
13653 invariant and constant vector uses in stmts when they need
13654 more than one stmt.
13656 2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13659 * configure.ac (gcc_cv_as_shf_merge): Disable on Solaris 10/x86.
13660 * configure: Regenerate.
13662 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
13664 * config/aarch64/aarch64-sve.md (*vec_extract<mode><Vel>_0): New
13666 (*vec_extract<mode><Vel>_v128): Require a nonzero lane number.
13667 Use gen_rtx_REG rather than gen_lowpart.
13669 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
13671 * lra-constraints.c (match_reload): Use subreg_lowpart_offset
13672 rather than 0 when creating partial subregs.
13674 2018-01-30 Richard Sandiford <richard.sandiford@linaro.org>
13676 * vec-perm-indices.c (vec_perm_indices::series_p): Give examples
13679 2018-01-29 Michael Meissner <meissner@linux.vnet.ibm.com>
13682 * config/rs6000/rs6000.c (rs6000_setup_reg_addr_masks): If DFmode
13683 and SFmode can go in Altivec registers (-mcpu=power7 for DFmode,
13684 -mcpu=power8 for SFmode) don't set the PRE_INCDEC or PRE_MODIFY
13685 flags. This restores the settings used before the 2017-07-24.
13686 Turning off pre increment/decrement/modify allows IVOPTS to
13687 optimize DF/SF loops where the index is an int.
13689 2018-01-29 Richard Biener <rguenther@suse.de>
13690 Kelvin Nilsen <kelvin@gcc.gnu.org>
13693 * tree-vect-stmts.c (vectorizable_call): Don't call
13694 targetm.vectorize_builtin_md_vectorized_function if callee is
13697 2018-01-22 Carl Love <cel@us.ibm.com>
13699 * doc/extend.tex: Fix typo in second arg in
13700 __builtin_bcdadd_{lt|eq|gt|ov} and __builtin_bcdsub_{lt|eq|gt|ov}.
13702 2018-01-29 Richard Biener <rguenther@suse.de>
13704 PR tree-optimization/84086
13705 * tree-ssanames.c: Include cfgloop.h and tree-scalar-evolution.h.
13706 (flush_ssaname_freelist): When SSA names were released reset
13707 the SCEV hash table.
13709 2018-01-29 Richard Biener <rguenther@suse.de>
13711 PR tree-optimization/84057
13712 * tree-ssa-loop-ivcanon.c (unloop_loops): Deal with already
13713 removed paths when removing edges.
13715 2018-01-27 H.J. Lu <hongjiu.lu@intel.com>
13717 * doc/invoke.texi: Replace -mfunction-return==@var{choice} with
13718 -mfunction-return=@var{choice}.
13720 2018-01-27 Bernd Edlinger <bernd.edlinger@hotmail.de>
13722 PR diagnostic/84034
13723 * diagnostic-show-locus.c (get_line_width_without_trailing_whitespace):
13724 Handle CR like TAB.
13725 (layout::print_source_line): Likewise.
13726 (test_get_line_width_without_trailing_whitespace): Add test cases.
13728 2018-01-27 Jakub Jelinek <jakub@redhat.com>
13730 PR middle-end/84040
13731 * sched-deps.c (sched_macro_fuse_insns): Return immediately for
13734 2018-01-26 Jim Wilson <jimw@sifive.com>
13736 * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New.
13738 * config/riscv/elf.h (LIB_SPEC): Don't include -lgloss when nosys.specs
13741 2018-01-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
13743 * config/aarch64/aarch64.md: Add peepholes for CMP + SUB -> SUBS
13744 and CMP + SUB-immediate -> SUBS.
13746 2018-01-26 Martin Sebor <msebor@redhat.com>
13748 PR tree-optimization/83896
13749 * tree-ssa-strlen.c (get_string_len): Rename...
13750 (get_string_cst_length): ...to this. Return HOST_WIDE_INT.
13751 Avoid assuming length is constant.
13752 (handle_char_store): Use HOST_WIDE_INT for string length.
13754 2018-01-26 Uros Bizjak <ubizjak@gmail.com>
13757 * config/i386/i386.md (*andndi3_doubleword): Add earlyclobber
13758 to (=&r,r,rm) alternative. Add (=r,0,rm) and (=r,r,0) alternatives.
13760 2018-01-26 Richard Biener <rguenther@suse.de>
13762 PR rtl-optimization/84003
13763 * dse.c (record_store): Only record redundant stores when
13764 the earlier store aliases at least all accesses the later one does.
13766 2018-01-26 Jakub Jelinek <jakub@redhat.com>
13768 PR rtl-optimization/83985
13769 * dce.c (deletable_insn_p): Return false for separate shrink wrapping
13770 REG_CFA_RESTORE insns.
13771 (delete_unmarked_insns): Don't ignore separate shrink wrapping
13772 REG_CFA_RESTORE insns here.
13775 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Don't
13776 use SSA_NAME_VAR as base for SSA_NAMEs with non-NULL SSA_NAME_VAR.
13778 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
13780 * config/arc/arc-arch.h (arc_tune_attr): Add ARC_TUNE_CORE_3.
13781 * config/arc/arc.c (arc_sched_issue_rate): Use ARC_TUNE_... .
13782 (arc_init): Likewise.
13783 (arc_override_options): Likewise.
13784 (arc_file_start): Choose Tag_ARC_CPU_variation based on arc_tune
13786 (hwloop_fail): Use TARGET_DBNZ when we want to check for dbnz insn
13788 * config/arc/arc.h (TARGET_DBNZ): Define.
13789 * config/arc/arc.md (attr tune): Add core_3, use ARC_TUNE_... to
13790 properly set the tune attribute.
13791 (dbnz): Use TARGET_DBNZ guard.
13792 * config/arc/arc.opt (mtune): Add core3 option.
13794 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
13796 * config/arc/arc.c (arc_delegitimize_address_0): Refactored to
13797 recognize new pic like addresses.
13798 (arc_delegitimize_address): Clean up.
13800 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
13802 * config/arc/arc-arches.def: Option mrf16 valid for all
13804 * config/arc/arc-c.def (__ARC_RF16__): New predefined macro.
13805 * config/arc/arc-cpus.def (em_mini): New cpu with rf16 on.
13806 * config/arc/arc-options.def (FL_RF16): Add mrf16 option.
13807 * config/arc/arc-tables.opt: Regenerate.
13808 * config/arc/arc.c (arc_conditional_register_usage): Handle
13809 reduced register file case.
13810 (arc_file_start): Set must have build attributes.
13811 * config/arc/arc.h (MAX_ARC_PARM_REGS): Conditional define using
13812 mrf16 option value.
13813 * config/arc/arc.opt (mrf16): Add new option.
13814 * config/arc/elf.h (ATTRIBUTE_PCS): Define.
13815 * config/arc/genmultilib.awk: Handle new mrf16 option.
13816 * config/arc/linux.h (ATTRIBUTE_PCS): Define.
13817 * config/arc/t-multilib: Regenerate.
13818 * doc/invoke.texi (ARC Options): Document mrf16 option.
13820 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
13822 * config/arc/arc-protos.h: Add arc_is_secure_call_p proto.
13823 * config/arc/arc.c (arc_handle_secure_attribute): New function.
13824 (arc_attribute_table): Add 'secure_call' attribute.
13825 (arc_print_operand): Print secure call operand.
13826 (arc_function_ok_for_sibcall): Don't optimize tail calls when
13828 (arc_is_secure_call_p): New function. * config/arc/arc.md
13829 (call_i): Add support for sjli instruction.
13830 (call_value_i): Likewise.
13831 * config/arc/constraints.md (Csc): New constraint.
13833 2018-01-26 Claudiu Zissulescu <claziss@synopsys.com>
13834 John Eric Martin <John.Martin@emmicro-us.com>
13836 * config/arc/arc-protos.h: Add arc_is_jli_call_p proto.
13837 * config/arc/arc.c (_arc_jli_section): New struct.
13838 (arc_jli_section): New type.
13839 (rc_jli_sections): New static variable.
13840 (arc_handle_jli_attribute): New function.
13841 (arc_attribute_table): Add jli_always and jli_fixed attribute.
13842 (arc_file_end): New function.
13843 (TARGET_ASM_FILE_END): Define.
13844 (arc_print_operand): Reuse 'S' letter for JLI output instruction.
13845 (arc_add_jli_section): New function.
13846 (jli_call_scan): Likewise.
13847 (arc_reorg): Call jli_call_scan.
13848 (arc_output_addsi): Remove 'S' from printing asm operand.
13849 (arc_is_jli_call_p): New function.
13850 * config/arc/arc.md (movqi_insn): Remove 'S' from printing asm
13852 (movhi_insn): Likewise.
13853 (movsi_insn): Likewise.
13854 (movsi_set_cc_insn): Likewise.
13855 (loadqi_update): Likewise.
13856 (load_zeroextendqisi_update): Likewise.
13857 (load_signextendqisi_update): Likewise.
13858 (loadhi_update): Likewise.
13859 (load_zeroextendhisi_update): Likewise.
13860 (load_signextendhisi_update): Likewise.
13861 (loadsi_update): Likewise.
13862 (loadsf_update): Likewise.
13863 (movsicc_insn): Likewise.
13864 (bset_insn): Likewise.
13865 (bxor_insn): Likewise.
13866 (bclr_insn): Likewise.
13867 (bmsk_insn): Likewise.
13868 (bicsi3_insn): Likewise.
13869 (cmpsi_cc_c_insn): Likewise.
13870 (movsi_ne): Likewise.
13871 (movsi_cond_exec): Likewise.
13872 (clrsbsi2): Likewise.
13873 (norm_f): Likewise.
13883 (call_i): Remove 'S' asm letter, add jli instruction.
13884 (call_value_i): Likewise.
13885 * config/arc/arc.op (mjli-always): New option.
13886 * config/arc/constraints.md (Cji): New constraint.
13887 * config/arc/fpx.md (addsf3_fpx): Remove 'S' from printing asm
13889 (subsf3_fpx): Likewise.
13890 (mulsf3_fpx): Likewise.
13891 * config/arc/simdext.md (vendrec_insn): Remove 'S' from printing
13893 * doc/extend.texi (ARC): Document 'jli-always' and 'jli-fixed'
13894 function attrbutes.
13895 * doc/invoke.texi (ARC): Document mjli-always option.
13897 2018-01-26 Sebastian Perta <sebastian.perta@renesas.com>
13899 * config/rl78/rl78.c (rl78_addsi3_internal): If operand 2 is const
13900 avoid addition with 0 and use incw and decw where possible.
13902 2018-01-26 Richard Biener <rguenther@suse.de>
13904 PR tree-optimization/81082
13905 * fold-const.c (fold_plusminus_mult_expr): Do not perform the
13906 association if it requires casting to unsigned.
13907 * match.pd ((A * C) +- (B * C) -> (A+-B)): New patterns derived
13908 from fold_plusminus_mult_expr to catch important cases late when
13909 range info is available.
13911 2018-01-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
13913 * config/i386/sol2.h (USE_HIDDEN_LINKONCE): Remove.
13914 * configure.ac (hidden_linkonce): New test.
13915 * configure: Regenerate.
13916 * config.in: Regenerate.
13918 2018-01-26 Julia Koval <julia.koval@intel.com>
13920 * config/i386/avx512bitalgintrin.h (_mm512_bitshuffle_epi64_mask,
13921 _mm512_mask_bitshuffle_epi64_mask, _mm256_bitshuffle_epi64_mask,
13922 _mm256_mask_bitshuffle_epi64_mask, _mm_bitshuffle_epi64_mask,
13923 _mm_mask_bitshuffle_epi64_mask): Fix type.
13924 * config/i386/i386-builtin-types.def (UHI_FTYPE_V2DI_V2DI_UHI,
13925 USI_FTYPE_V4DI_V4DI_USI): Remove.
13926 * config/i386/i386-builtin.def (__builtin_ia32_vpshufbitqmb512_mask,
13927 __builtin_ia32_vpshufbitqmb256_mask,
13928 __builtin_ia32_vpshufbitqmb128_mask): Fix types.
13929 * config/i386/i386.c (ix86_expand_args_builtin): Remove old types.
13930 * config/i386/sse.md (VI1_AVX512VLBW): Change types.
13932 2018-01-26 Alan Modra <amodra@gmail.com>
13935 * config/rs6000/rs6000-p8swap.c (rtx_is_swappable_p): Exclude
13936 UNSPEC_VBPERMQ. Sort other unspecs.
13938 2018-01-25 David Edelsohn <dje.gcc@gmail.com>
13940 * doc/invoke.texi (PowerPC Options): Document 'native' cpu type.
13942 2018-01-25 Jan Hubicka <hubicka@ucw.cz>
13944 PR middle-end/83055
13945 * predict.c (drop_profile): Do not push/pop cfun; update also
13947 (handle_missing_profiles): Fix logic looking for zero profiles.
13949 2018-01-25 Jakub Jelinek <jakub@redhat.com>
13951 PR middle-end/83977
13952 * ipa-fnsummary.c (compute_fn_summary): Clear can_change_signature
13953 on functions with #pragma omp declare simd or functions with simd
13955 * omp-simd-clone.c (expand_simd_clones): Revert 2018-01-24 change.
13956 * config/i386/i386.c (ix86_simd_clone_compute_vecsize_and_simdlen):
13957 Remove trailing \n from warning_at calls.
13959 2018-01-25 Tom de Vries <tom@codesourcery.com>
13962 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
13963 for neutered workers.
13965 2018-01-24 Joseph Myers <joseph@codesourcery.com>
13968 * config/m68k/m68k.c (m68k_promote_function_mode): New function.
13969 (TARGET_PROMOTE_FUNCTION_MODE): New macro.
13971 2018-01-24 Jeff Law <law@redhat.com>
13974 * i386.c (get_probe_interval): Move to earlier point.
13975 (ix86_compute_frame_layout): If -fstack-clash-protection and
13976 the frame is larger than the probe interval, then use pushes
13977 to save registers rather than reg->mem moves.
13978 (ix86_expand_prologue): Remove conditional for int_registers_saved
13981 2018-01-24 Vladimir Makarov <vmakarov@redhat.com>
13984 * ira-build.c (setup_min_max_allocno_live_range_point): Set up
13985 min/max for never referenced object.
13987 2018-01-24 Jakub Jelinek <jakub@redhat.com>
13989 PR middle-end/83977
13990 * tree.c (free_lang_data_in_decl): Don't clear DECL_ABSTRACT_ORIGIN
13992 * omp-low.c (create_omp_child_function): Remove "omp declare simd"
13993 attributes from DECL_ATTRIBUTES (decl) without affecting
13994 DECL_ATTRIBUTES (current_function_decl).
13995 * omp-simd-clone.c (expand_simd_clones): Ignore DECL_ARTIFICIAL
13996 functions with non-NULL DECL_ABSTRACT_ORIGIN.
13998 2018-01-24 Richard Sandiford <richard.sandiford@linaro.org>
14000 PR tree-optimization/83979
14001 * fold-const.c (fold_comparison): Use constant_boolean_node
14002 instead of boolean_{true,false}_node.
14004 2018-01-24 Jan Hubicka <hubicka@ucw.cz>
14006 * ipa-profile.c (ipa_propagate_frequency_1): Fix logic skipping calls
14009 2018-01-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14011 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14012 Simplify the clause that sets the length attribute.
14013 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14014 (*sibcall_nonlocal_sysv<mode>): Clean up code block; simplify the
14015 clause that sets the length attribute.
14016 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14018 2018-01-24 Tom de Vries <tom@codesourcery.com>
14021 * config/nvptx/nvptx.c (WORKAROUND_PTXJIT_BUG_2): Define to 1.
14022 (nvptx_pc_set, nvptx_condjump_label): New function. Copy from jump.c.
14023 Add strict parameter.
14024 (prevent_branch_around_nothing): Insert dummy insn between branch to
14025 label and label with no ptx insn inbetween.
14026 * config/nvptx/nvptx.md (define_insn "fake_nop"): New insn.
14028 2018-01-24 Tom de Vries <tom@codesourcery.com>
14031 * config/nvptx/nvptx.c (nvptx_single): Add exit insn after noreturn call
14032 for neutered threads in warp.
14033 * config/nvptx/nvptx.md (define_insn "exit"): New insn.
14035 2018-01-24 Richard Biener <rguenther@suse.de>
14037 PR tree-optimization/83176
14038 * tree-chrec.c (chrec_fold_plus_1): Handle (signed T){(T) .. }
14041 2018-01-24 Richard Biener <rguenther@suse.de>
14043 PR tree-optimization/82819
14044 * graphite-isl-ast-to-gimple.c (binary_op_to_tree): Avoid
14045 code generating pluses that are no-ops in the target precision.
14047 2018-01-24 Richard Biener <rguenther@suse.de>
14049 PR middle-end/84000
14050 * tree-cfg.c (replace_loop_annotate): Handle annot_expr_parallel_kind.
14052 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
14054 * cfgcleanup.c (try_crossjump_to_edge): Use combine_with_count
14055 to merge probabilities.
14056 * predict.c (probably_never_executed): Also mark as cold functions
14057 with global 0 profile and guessed local profile.
14058 * profile-count.c (profile_probability::combine_with_count): New
14060 * profile-count.h (profile_probability::operator*,
14061 profile_probability::operator*=, profile_probability::operator/,
14062 profile_probability::operator/=): Reduce precision to adjusted
14063 and set value to guessed on contradictory divisions.
14064 (profile_probability::combine_with_freq): Remove.
14065 (profile_probability::combine_wiht_count): Declare.
14066 (profile_count::force_nonzero):: Set to adjusted.
14067 (profile_count::probability_in):: Set quality to adjusted.
14068 * tree-ssa-tail-merge.c (replace_block_by): Use
14069 combine_with_count.
14071 2018-01-23 Andrew Waterman <andrew@sifive.com>
14072 Jim Wilson <jimw@sifive.com>
14074 * config/riscv/riscv.c (riscv_stack_boundary): New.
14075 (riscv_option_override): Set riscv_stack_boundary. Handle
14076 riscv_preferred_stack_boundary_arg.
14077 * config/riscv/riscv.h (MIN_STACK_BOUNDARY, ABI_STACK_BOUNDARY): New.
14078 (BIGGEST_ALIGNMENT): Set to STACK_BOUNDARY.
14079 (STACK_BOUNDARY): Set to riscv_stack_boundary.
14080 (RISCV_STACK_ALIGN): Use STACK_BOUNDARY.
14081 * config/riscv/riscv.opt (mpreferred-stack-boundary): New.
14082 * doc/invoke.tex (RISC-V Options): Add -mpreferred-stack-boundary.
14084 2018-01-23 H.J. Lu <hongjiu.lu@intel.com>
14087 * config/i386/i386.c (ix86_expand_prologue): Use cost reference
14088 of struct ix86_frame.
14089 (ix86_expand_epilogue): Likewise. Add a local variable for
14090 the reg_save_offset field in struct ix86_frame.
14092 2018-01-23 Bin Cheng <bin.cheng@arm.com>
14094 PR tree-optimization/82604
14095 * tree-loop-distribution.c (enum partition_kind): New enum item
14096 PKIND_PARTIAL_MEMSET.
14097 (partition_builtin_p): Support above new enum item.
14098 (generate_code_for_partition): Ditto.
14099 (compute_access_range): Differentiate cases that equality can be
14100 proven at all loops, the innermost loops or no loops.
14101 (classify_builtin_st, classify_builtin_ldst): Adjust call to above
14102 function. Set PKIND_PARTIAL_MEMSET for partition appropriately.
14103 (finalize_partitions, distribute_loop): Don't fuse partition of
14104 PKIND_PARTIAL_MEMSET kind when distributing 3-level loop nest.
14105 (prepare_perfect_loop_nest): Distribute 3-level loop nest only if
14106 parloop is enabled.
14108 2018-01-23 Martin Liska <mliska@suse.cz>
14110 * predict.def (PRED_INDIR_CALL): Set probability to PROB_EVEN in
14111 order to ignore the predictor.
14112 (PRED_POLYMORPHIC_CALL): Likewise.
14113 (PRED_RECURSIVE_CALL): Likewise.
14115 2018-01-23 Martin Liska <mliska@suse.cz>
14117 * tree-profile.c (tree_profiling): Print function header to
14118 aware reader which function we are working on.
14119 * value-prof.c (gimple_find_values_to_profile): Do not print
14120 not interesting value histograms.
14122 2018-01-23 Martin Liska <mliska@suse.cz>
14124 * profile-count.h (enum profile_quality): Add
14125 profile_uninitialized as the first value. Do not number values
14126 as they are zero based.
14127 (profile_count::verify): Update sanity check.
14128 (profile_probability::verify): Likewise.
14130 2018-01-23 Nathan Sidwell <nathan@acm.org>
14132 * doc/invoke.texi (ffor-scope): Deprecate.
14134 2018-01-23 David Malcolm <dmalcolm@redhat.com>
14136 PR tree-optimization/83510
14137 * domwalk.c (set_all_edges_as_executable): New function.
14138 (dom_walker::dom_walker): Convert bool param
14139 "skip_unreachable_blocks" to enum reachability. Move setup of
14140 edge flags to set_all_edges_as_executable and only do it when
14141 reachability is REACHABLE_BLOCKS.
14142 * domwalk.h (enum dom_walker::reachability): New enum.
14143 (dom_walker::dom_walker): Convert bool param
14144 "skip_unreachable_blocks" to enum reachability.
14145 (set_all_edges_as_executable): New decl.
14146 * graphite-scop-detection.c (gather_bbs::gather_bbs): Convert
14147 from false for "skip_unreachable_blocks" to ALL_BLOCKS for
14149 * tree-ssa-dom.c (dom_opt_dom_walker::dom_opt_dom_walker): Likewise,
14150 but converting true to REACHABLE_BLOCKS.
14151 * tree-ssa-sccvn.c (sccvn_dom_walker::sccvn_dom_walker): Likewise.
14153 (check_array_bounds_dom_walker::check_array_bounds_dom_walker):
14154 Likewise, but converting it to REACHABLE_BLOCKS_PRESERVING_FLAGS.
14155 (vrp_dom_walker::vrp_dom_walker): Likewise, but converting it to
14157 (vrp_prop::vrp_finalize): Call set_all_edges_as_executable
14158 if check_all_array_refs will be called.
14160 2018-01-23 David Malcolm <dmalcolm@redhat.com>
14162 * tree.c (selftest::test_location_wrappers): Add more test
14165 2018-01-23 David Malcolm <dmalcolm@redhat.com>
14167 * sbitmap.c (selftest::test_set_range): Fix memory leaks.
14168 (selftest::test_bit_in_range): Likewise.
14170 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
14173 * doc/sourcebuild.texi (vect_float): Say that the selector
14174 only describes the situation when -funsafe-math-optimizations is on.
14175 (vect_float_strict): Document.
14177 2018-01-23 Richard Sandiford <richard.sandiford@linaro.org>
14179 PR tree-optimization/83965
14180 * tree-vect-patterns.c (vect_reassociating_reduction_p): New function.
14181 (vect_recog_dot_prod_pattern, vect_recog_sad_pattern): Use it
14182 instead of checking only for a reduction.
14183 (vect_recog_widen_sum_pattern): Likewise.
14185 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
14187 * predict.c (probably_never_executed): Only use precise profile info.
14188 (compute_function_frequency): Skip after inlining hack since we now
14189 have quality checking.
14191 2018-01-23 Jan Hubicka <hubicka@ucw.cz>
14193 * profile-count.h (profile_probability::very_unlikely,
14194 profile_probability::unlikely, profile_probability::even): Set
14195 precision to guessed.
14197 2018-01-23 Richard Biener <rguenther@suse.de>
14199 PR tree-optimization/83963
14200 * graphite-scop-detection.c (scop_detection::harmful_loop_in_region):
14201 Properly terminate dominator walk when crossing the exit edge not
14202 when visiting its source block.
14204 2018-01-23 Jakub Jelinek <jakub@redhat.com>
14207 * tree.c (maybe_wrap_with_location): Use NON_LVALUE_EXPR rather than
14208 VIEW_CONVERT_EXPR to wrap CONST_DECLs.
14210 2018-01-22 Jakub Jelinek <jakub@redhat.com>
14212 PR tree-optimization/83957
14213 * omp-expand.c (expand_omp_for_generic): Ignore virtual PHIs. Remove
14214 semicolon after for body surrounded by braces.
14216 PR tree-optimization/83081
14217 * profile-count.h (profile_probability::split): New method.
14218 * dojump.c (do_jump_1) <case TRUTH_ANDIF_EXPR, case TRUTH_ORIF_EXPR>:
14219 Use profile_probability::split.
14220 (do_compare_rtx_and_jump): Fix adjustment of probabilities
14221 when splitting a single conditional jump into 2.
14223 2018-01-22 David Malcolm <dmalcolm@redhat.com>
14225 PR tree-optimization/69452
14226 * tree-ssa-loop-im.c (class move_computations_dom_walker): Remove
14229 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14231 * config/rl78/rl78-expand.md (bswaphi2): New define_expand.
14232 * config/rl78/rl78-virt.md (*bswaphi2_virt): New define_insn.
14233 * config/rl78/rl78-real.md (*bswaphi2_real): New define_insn.
14235 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14237 * config/rl78/rl78-protos.h (rl78_split_movdi): New function
14239 * config/rl78/rl78.md (movdi): New define_expand.
14240 * config/rl78/rl78.c (rl78_split_movdi): New function.
14242 2018-01-22 Michael Meissner <meissner@linux.vnet.ibm.com>
14245 * config/rs6000/rs6000-protos.h (rs6000_split_signbit): Delete,
14247 * config/rs6000/rs6000.c (rs6000_split_signbit): Likewise.
14248 * config/rs6000/rs6000.md (signbit<mode>2): Change code for IEEE
14249 128-bit to produce an UNSPEC move to get the double word with the
14250 signbit and then a shift directly to do signbit.
14251 (signbit<mode>2_dm): Replace old IEEE 128-bit signbit
14252 implementation with a new version that just does either a direct
14253 move or a regular move. Move memory interface to separate insns.
14254 Move insns so they are next to the expander.
14255 (signbit<mode>2_dm_mem_be): New combiner insns to combine load
14256 with signbit move. Split big and little endian case.
14257 (signbit<mode>2_dm_mem_le): Likewise.
14258 (signbit<mode>2_dm_<su>ext): Delete, no longer used.
14259 (signbit<mode>2_dm2): Likewise.
14261 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14263 * config/rl78/rl78.md (anddi3): New define_expand.
14265 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14267 * config/rl78/rl78.md (umindi3): New define_expand.
14269 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14271 * config/rl78/rl78.md (smindi3): New define_expand.
14273 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14275 * config/rl78/rl78.md (smaxdi3): New define_expand.
14277 2018-01-22 Carl Love <cel@us.ibm.com>
14279 * config/rs6000/rs6000-builtin.def (ST_ELEMREV_V1TI, LD_ELEMREV_V1TI,
14280 LVX_V1TI): Add macro expansion.
14281 * config/rs6000/rs6000-c.c (altivec_builtin_types): Add argument
14282 definitions for VSX_BUILTIN_VEC_XST_BE, VSX_BUILTIN_VEC_ST,
14283 VSX_BUILTIN_VEC_XL, LD_ELEMREV_V1TI builtins.
14284 * config/rs6000/rs6000-p8swap.c (insn_is_swappable_p);
14285 Change check to determine if the instruction is a byte reversing
14286 entry. Fix typo in comment.
14287 * config/rs6000/rs6000.c (altivec_expand_builtin): Add case entry
14288 for VSX_BUILTIN_ST_ELEMREV_V1TI and VSX_BUILTIN_LD_ELEMREV_V1TI.
14289 Add def_builtin calls for new builtins.
14290 * config/rs6000/vsx.md (vsx_st_elemrev_v1ti, vsx_ld_elemrev_v1ti):
14291 Add define_insn expansion.
14293 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14295 * config/rl78/rl78.md (umaxdi3): New define_expand.
14297 2018-01-22 Sebastian Perta <sebastian.perta@renesas.com>
14299 * config/rl78/rl78.c (rl78_note_reg_set): Fixed dead reg check
14300 for non-QImode registers.
14302 2018-01-22 Richard Biener <rguenther@suse.de>
14304 PR tree-optimization/83963
14305 * graphite-scop-detection.c (scop_detection::get_sese): Delay
14306 including the loop exit block.
14307 (scop_detection::merge_sese): Likewise.
14308 (scop_detection::add_scop): Do it here instead.
14310 2018-01-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14312 * doc/sourcebuild.texi (arm_softfloat): Document.
14314 2018-01-21 John David Anglin <danglin@gcc.gnu.org>
14317 * config/pa/pa.c (pa_function_ok_for_sibcall): Use
14318 targetm.binds_local_p instead of TREE_PUBLIC to check local binding.
14319 Move TARGET_PORTABLE_RUNTIME check after TARGET_64BIT check.
14321 2018-01-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14322 David Edelsohn <dje.gcc@gmail.com>
14325 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14326 Change "crset eq" to "crset 2".
14327 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14328 (*call_indirect_aix<mode>_nospec): Likewise.
14329 (*call_value_indirect_aix<mode>_nospec): Likewise.
14330 (*call_indirect_elfv2<mode>_nospec): Likewise.
14331 (*call_value_indirect_elfv2<mode>_nospec): Likewise.
14332 (*sibcall_nonlocal_sysv<mode>): Change "crset eq" to "crset 2";
14333 change assembly output from . to $.
14334 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14335 (indirect_jump<mode>_nospec): Change assembly output from . to $.
14336 (*tablejump<mode>_internal1_nospec): Likewise.
14338 2018-01-21 Oleg Endo <olegendo@gcc.gnu.org>
14341 * config/sh/sh_optimize_sett_clrt.cc:
14342 Use INCLUDE_ALGORITHM and INCLUDE_VECTOR instead of direct includes.
14344 2018-01-20 Richard Sandiford <richard.sandiford@linaro.org>
14346 PR tree-optimization/83940
14347 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): Set
14348 offset_dt to vect_constant_def rather than vect_unknown_def_type.
14349 (vect_check_load_store_mask): Add a mask_dt_out parameter and
14350 use it to pass back the definition type.
14351 (vect_check_store_rhs): Likewise rhs_dt_out.
14352 (vect_build_gather_load_calls): Add a mask_dt argument and use
14353 it instead of a call to vect_is_simple_use.
14354 (vectorizable_store): Update calls to vect_check_load_store_mask
14355 and vect_check_store_rhs. Use the dt returned by the latter instead
14356 of scatter_src_dt. Use the cached mask_dt and gs_info.offset_dt
14357 instead of calls to vect_is_simple_use. Pass the scalar rather
14358 than the vector operand to vect_is_simple_use when handling
14359 second and subsequent copies of an rhs value.
14360 (vectorizable_load): Update calls to vect_check_load_store_mask
14361 and vect_build_gather_load_calls. Use the cached mask_dt and
14362 gs_info.offset_dt instead of calls to vect_is_simple_use.
14364 2018-01-20 Jakub Jelinek <jakub@redhat.com>
14366 PR middle-end/83945
14367 * tree-emutls.c: Include gimplify.h.
14368 (lower_emutls_2): New function.
14369 (lower_emutls_1): If ADDR_EXPR is a gimple invariant and walk_tree
14370 with lower_emutls_2 callback finds some TLS decl in it, unshare_expr
14371 it before further processing.
14374 * simplify-rtx.c (simplify_binary_operation_1) <case UMOD>: Use
14375 UINTVAL (trueop1) instead of INTVAL (op1).
14377 2018-01-19 Jakub Jelinek <jakub@redhat.com>
14381 * dwarf2cfi.c (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define to
14382 INCOMING_FRAME_SP_OFFSET if not defined.
14383 (scan_trace): Add ENTRY argument. If true and
14384 DEFAULT_INCOMING_FRAME_SP_OFFSET != INCOMING_FRAME_SP_OFFSET,
14385 emit a note to adjust the CFA offset.
14386 (create_cfi_notes): Adjust scan_trace callers.
14387 (create_cie_data): Use DEFAULT_INCOMING_FRAME_SP_OFFSET rather than
14388 INCOMING_FRAME_SP_OFFSET in the CIE.
14389 * config/i386/i386.h (DEFAULT_INCOMING_FRAME_SP_OFFSET): Define.
14390 * config/stormy16/stormy16.h (DEFAULT_INCOMING_FRAME_SP_OFFSET):
14392 * doc/tm.texi.in (DEFAULT_INCOMING_FRAME_SP_OFFSET): Document.
14393 * doc/tm.texi: Regenerated.
14395 2018-01-19 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
14397 PR rtl-optimization/83147
14398 * lra-constraints.c (remove_inheritance_pseudos): Use
14399 lra_substitute_pseudo_within_insn.
14401 2018-01-19 Tom de Vries <tom@codesourcery.com>
14402 Cesar Philippidis <cesar@codesourcery.com>
14405 * config/nvptx/nvptx.c (nvptx_single): Fix jit workaround.
14407 2018-01-19 Cesar Philippidis <cesar@codesourcery.com>
14410 * config/nvptx/nvptx.c (output_init_frag): Don't use generic address
14411 spaces for function labels.
14413 2018-01-19 Martin Liska <mliska@suse.cz>
14415 * predict.def (PRED_LOOP_EXIT): Change from 85 to 89.
14416 (PRED_LOOP_EXIT_WITH_RECURSION): Change from 72 to 78.
14417 (PRED_LOOP_EXTRA_EXIT): Change from 83 to 67.
14418 (PRED_OPCODE_POSITIVE): Change from 64 to 59.
14419 (PRED_TREE_OPCODE_POSITIVE): Change from 64 to 59.
14420 (PRED_CONST_RETURN): Change from 69 to 65.
14421 (PRED_NULL_RETURN): Change from 91 to 71.
14422 (PRED_LOOP_IV_COMPARE_GUESS): Change from 98 to 64.
14423 (PRED_LOOP_GUARD): Change from 66 to 73.
14425 2018-01-19 Martin Liska <mliska@suse.cz>
14427 * predict.c (predict_insn_def): Add new assert.
14428 (struct branch_predictor): Change type to signed integer.
14429 (test_prediction_value_range): Amend test to cover
14430 PROB_UNINITIALIZED.
14431 * predict.def (PRED_LOOP_ITERATIONS): Use the new constant.
14432 (PRED_LOOP_ITERATIONS_GUESSED): Likewise.
14433 (PRED_LOOP_ITERATIONS_MAX): Likewise.
14434 (PRED_LOOP_IV_COMPARE): Likewise.
14435 * predict.h (PROB_UNINITIALIZED): Define new constant.
14437 2018-01-19 Martin Liska <mliska@suse.cz>
14439 * predict.c (dump_prediction): Add new format for
14440 analyze_brprob.py script which is enabled with -details
14442 * profile-count.h (precise_p): New function.
14444 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
14446 PR tree-optimization/83922
14447 * tree-vect-loop.c (vect_verify_full_masking): Return false if
14448 there are no statements that need masking.
14449 (vect_active_double_reduction_p): New function.
14450 (vect_analyze_loop_operations): Use it when handling phis that
14451 are not in the loop header.
14453 2018-01-19 Richard Sandiford <richard.sandiford@linaro.org>
14455 PR tree-optimization/83914
14456 * tree-vect-loop.c (vectorizable_induction): Don't convert
14457 init_expr or apply the peeling adjustment for inductions
14458 that are nested within the vectorized loop.
14460 2018-01-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14462 * config/arm/thumb2.md (*thumb2_negsi2_short): Use RSB mnemonic
14465 2018-01-18 Jakub Jelinek <jakub@redhat.com>
14469 * function.h (gimplify_parameters): Add gimple_seq * argument.
14470 * function.c: Include gimple.h and options.h.
14471 (gimplify_parameters): Add cleanup argument, add CLOBBER stmts
14472 for the added local temporaries if needed.
14473 * gimplify.c (gimplify_body): Adjust gimplify_parameters caller,
14474 if there are any parameter cleanups, wrap whole body into a
14475 try/finally with the cleanups.
14477 2018-01-18 Wilco Dijkstra <wdijkstr@arm.com>
14480 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p):
14481 Use GET_MODE_CLASS for scalar floating point.
14483 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
14487 * cgraphclones.c (cgraph_node::create_version_clone_with_body):
14488 Fix call of call_cgraph_insertion_hooks.
14490 2018-01-18 Martin Sebor <msebor@redhat.com>
14492 * doc/invoke.texi (-Wclass-memaccess): Tweak text.
14494 2018-01-18 Jan Hubicka <hubicka@ucw.cz>
14497 * cgraph.c (cgraph_edge::redirect_call_stmt_to_callee): Update edge
14500 2018-01-18 Boris Kolpackov <boris@codesynthesis.com>
14503 * common.opt: (-ffile-prefix-map): New option.
14504 * opts.c (common_handle_option): Defer it.
14505 * opts-global.c (handle_common_deferred_options): Handle it.
14506 * debug.h (remap_debug_filename, add_debug_prefix_map): Move to...
14507 * file-prefix-map.h: New file.
14508 (remap_debug_filename, add_debug_prefix_map): ...here.
14509 (add_macro_prefix_map, add_file_prefix_map, remap_macro_filename): New.
14510 * final.c (debug_prefix_map, add_debug_prefix_map
14511 remap_debug_filename): Move to...
14512 * file-prefix-map.c: New file.
14513 (file_prefix_map, add_prefix_map, remap_filename) ...here and rename,
14514 generalize, get rid of alloca(), use strrchr() instead of strchr().
14515 (add_macro_prefix_map, add_debug_prefix_map, add_file_prefix_map):
14516 Implement in terms of add_prefix_map().
14517 (remap_macro_filename, remap_debug_filename): Implement in term of
14519 * Makefile.in (OBJS, PLUGIN_HEADERS): Add new files.
14520 * builtins.c (fold_builtin_FILE): Call remap_macro_filename().
14521 * dbxout.c: Include file-prefix-map.h.
14522 * varasm.c: Likewise.
14523 * vmsdbgout.c: Likewise.
14524 * xcoffout.c: Likewise.
14525 * dwarf2out.c: Likewise plus omit new options from DW_AT_producer.
14526 * doc/cppopts.texi (-fmacro-prefix-map): Document.
14527 * doc/invoke.texi (-ffile-prefix-map): Document.
14528 (-fdebug-prefix-map): Update description.
14530 2018-01-18 Martin Liska <mliska@suse.cz>
14532 * config/i386/i386.c (indirect_thunk_name): Document that also
14534 (output_indirect_thunk): Document why both instructions
14535 (pause and lfence) are generated.
14537 2018-01-18 Richard Biener <rguenther@suse.de>
14539 PR tree-optimization/83887
14540 * graphite-scop-detection.c
14541 (scop_detection::get_nearest_dom_with_single_entry): Remove.
14542 (scop_detection::get_nearest_pdom_with_single_exit): Likewise.
14543 (scop_detection::merge_sese): Re-implement with a flood-fill
14544 algorithm that properly finds a SESE region if it exists.
14546 2018-01-18 Jakub Jelinek <jakub@redhat.com>
14549 * match.pd ((P + A) - P, P - (P + A), (P + A) - (P + B)): For
14550 pointer_diff optimizations use view_convert instead of convert.
14552 2018-01-17 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14554 * config/rs6000/rs6000.md (*call_indirect_nonlocal_sysv<mode>):
14555 Generate different code for -mno-speculate-indirect-jumps.
14556 (*call_value_indirect_nonlocal_sysv<mode>): Likewise.
14557 (*call_indirect_aix<mode>): Disable for
14558 -mno-speculate-indirect-jumps.
14559 (*call_indirect_aix<mode>_nospec): New define_insn.
14560 (*call_value_indirect_aix<mode>): Disable for
14561 -mno-speculate-indirect-jumps.
14562 (*call_value_indirect_aix<mode>_nospec): New define_insn.
14563 (*sibcall_nonlocal_sysv<mode>): Generate different code for
14564 -mno-speculate-indirect-jumps.
14565 (*sibcall_value_nonlocal_sysv<mode>): Likewise.
14567 2018-01-17 Michael Meissner <meissner@linux.vnet.ibm.com>
14569 * config/rs6000/rs6000.c (rs6000_emit_move): If we load or store a
14570 long double type, set the flags for noting the default long double
14571 type, even if we don't pass or return a long double type.
14573 2018-01-17 Jan Hubicka <hubicka@ucw.cz>
14576 * ipa-inline.c (flatten_function): Do not overwrite final inlining
14579 2018-01-17 Will Schmidt <will_schmidt@vnet.ibm.com>
14581 * config/rs6000/rs6000.c (rs6000_gimple_builtin): Add gimple folding
14582 support for merge[hl].
14583 (fold_mergehl_helper): New helper function.
14584 (tree-vector-builder.h): New #include for tree_vector_builder usage.
14585 * config/rs6000/altivec.md (altivec_vmrghw_direct): Add xxmrghw insn.
14586 (altivec_vmrglw_direct): Add xxmrglw insn.
14588 2018-01-17 Andrew Waterman <andrew@sifive.com>
14590 * config/riscv/riscv.c (riscv_conditional_register_usage): If
14591 UNITS_PER_FP_ARG is 0, set call_used_regs to 1 for all FP regs.
14593 2018-01-17 David Malcolm <dmalcolm@redhat.com>
14596 * ipa-devirt.c (add_type_duplicate): When comparing memory layout,
14597 call the lto_location_cache before reading the
14598 DECL_SOURCE_LOCATION of the types.
14600 2018-01-17 Wilco Dijkstra <wdijkstr@arm.com>
14601 Richard Sandiford <richard.sandiford@linaro.org>
14603 * config/aarch64/aarch64.md (movti_aarch64): Use Uti constraint.
14604 * config/aarch64/aarch64.c (aarch64_mov128_immediate): New function.
14605 (aarch64_legitimate_constant_p): Just support CONST_DOUBLE
14606 SF/DF/TF mode to avoid creating illegal CONST_WIDE_INT immediates.
14607 * config/aarch64/aarch64-protos.h (aarch64_mov128_immediate):
14609 * config/aarch64/constraints.md (aarch64_movti_operand):
14611 * config/aarch64/predicates.md (Uti): Add new constraint.
14613 2018-01-17 Carl Love <cel@us.ibm.com>
14615 * config/rs6000/vsx.md (define_expand xl_len_r,
14616 define_expand stxvl, define_expand *stxvl): Add match_dup argument.
14617 (define_insn): Add, match_dup 1 argument to define_insn stxvll and
14619 (define_expand, define_insn): Move the shift left from the
14620 define_insn to the define_expand for lxvl and stxvl instructions.
14621 * config/rs6000/rs6000-builtin.def (BU_P9V_64BIT_VSX_2): Change LXVL
14622 and XL_LEN_R definitions to PURE.
14624 2018-01-17 Uros Bizjak <ubizjak@gmail.com>
14626 * config/i386/i386.c (indirect_thunk_name): Declare regno
14627 as unsigned int. Compare regno with INVALID_REGNUM.
14628 (output_indirect_thunk): Ditto.
14629 (output_indirect_thunk_function): Ditto.
14630 (ix86_code_end): Declare regno as unsigned int. Use INVALID_REGNUM
14631 in the call to output_indirect_thunk_function.
14633 2018-01-17 Richard Sandiford <richard.sandiford@linaro.org>
14635 PR middle-end/83884
14636 * expr.c (expand_expr_real_1): Use the size of GET_MODE (op0)
14637 rather than the size of inner_type to determine the stack slot size
14638 when handling VIEW_CONVERT_EXPRs on strict-alignment targets.
14640 2018-01-16 Sebastian Peryt <sebastian.peryt@intel.com>
14643 * config/i386/i386.c (ix86_option_override_internal): Add PTA_RDRND
14646 2018-01-16 Michael Meissner <meissner@linux.vnet.ibm.com>
14648 * config.gcc (powerpc*-linux*-*): Add support for 64-bit little
14649 endian Linux systems to optionally enable multilibs for selecting
14650 the long double type if the user configured an explicit type.
14651 * config/rs6000/rs6000.h (TARGET_IEEEQUAD_MULTILIB): Indicate we
14652 have no long double multilibs if not defined.
14653 * config/rs6000/rs6000.c (rs6000_option_override_internal): Do not
14654 warn if the user used -mabi={ieee,ibm}longdouble and we built
14655 multilibs for long double.
14656 * config/rs6000/linux64.h (MULTILIB_DEFAULTS_IEEE): Define as the
14657 appropriate multilib option.
14658 (MULTILIB_DEFAULTS): Add MULTILIB_DEFAULTS_IEEE to the default
14660 * config/rs6000/t-ldouble-linux64le-ibm: New configuration files
14661 for building long double multilibs.
14662 * config/rs6000/t-ldouble-linux64le-ieee: Likewise.
14664 2018-01-16 John David Anglin <danglin@gcc.gnu.org>
14666 * config.gcc (hppa*-*-linux*): Change callee copies ABI to caller
14669 * config/pa.h (MALLOC_ABI_ALIGNMENT): Set 32-bit alignment default to
14671 * config/pa/pa32-linux.h (MALLOC_ABI_ALIGNMENT): Set alignment to
14674 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Cleanup type and mode
14677 * config/pa/pa.c (pa_function_arg_size): Apply CEIL to GET_MODE_SIZE
14680 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
14682 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): For an
14683 ADDR_EXPR, do not count the offset of a COMPONENT_REF twice.
14685 2018-01-16 Kelvin Nilsen <kelvin@gcc.gnu.org>
14687 * config/rs6000/rs6000-p8swap.c (rs6000_gen_stvx): Generate
14688 different rtl trees depending on TARGET_64BIT.
14689 (rs6000_gen_lvx): Likewise.
14691 2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
14693 * config/visium/visium.md (nop): Tweak comment.
14694 (hazard_nop): Likewise.
14696 2018-01-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
14698 * config/rs6000/rs6000.c (rs6000_opt_vars): Add entry for
14699 -mspeculate-indirect-jumps.
14700 * config/rs6000/rs6000.md (*call_indirect_elfv2<mode>): Disable
14701 for -mno-speculate-indirect-jumps.
14702 (*call_indirect_elfv2<mode>_nospec): New define_insn.
14703 (*call_value_indirect_elfv2<mode>): Disable for
14704 -mno-speculate-indirect-jumps.
14705 (*call_value_indirect_elfv2<mode>_nospec): New define_insn.
14706 (indirect_jump): Emit different RTL for
14707 -mno-speculate-indirect-jumps.
14708 (*indirect_jump<mode>): Disable for
14709 -mno-speculate-indirect-jumps.
14710 (*indirect_jump<mode>_nospec): New define_insn.
14711 (tablejump): Emit different RTL for
14712 -mno-speculate-indirect-jumps.
14713 (tablejumpsi): Disable for -mno-speculate-indirect-jumps.
14714 (tablejumpsi_nospec): New define_expand.
14715 (tablejumpdi): Disable for -mno-speculate-indirect-jumps.
14716 (tablejumpdi_nospec): New define_expand.
14717 (*tablejump<mode>_internal1): Disable for
14718 -mno-speculate-indirect-jumps.
14719 (*tablejump<mode>_internal1_nospec): New define_insn.
14720 * config/rs6000/rs6000.opt (mspeculate-indirect-jumps): New
14723 2018-01-16 Artyom Skrobov tyomitch@gmail.com
14725 * caller-save.c (insert_save): Drop unnecessary parameter. All
14728 2018-01-16 Jakub Jelinek <jakub@redhat.com>
14729 Richard Biener <rguenth@suse.de>
14732 * gimplify.c (gimplify_one_sizepos): For is_gimple_constant (expr)
14733 return early, inline manually is_gimple_sizepos. Make sure if we
14734 call gimplify_expr we don't end up with a gimple constant.
14735 * tree.c (variably_modified_type_p): Don't return true for
14736 is_gimple_constant (_t). Inline manually is_gimple_sizepos.
14737 * gimplify.h (is_gimple_sizepos): Remove.
14739 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
14741 PR tree-optimization/83857
14742 * tree-vect-loop.c (vect_analyze_loop_operations): Don't call
14743 vectorizable_live_operation for pure SLP statements.
14744 (vectorizable_live_operation): Handle PHIs.
14746 2018-01-16 Richard Biener <rguenther@suse.de>
14748 PR tree-optimization/83867
14749 * tree-vect-stmts.c (vect_transform_stmt): Precompute
14750 nested_in_vect_loop_p since the scalar stmt may get invalidated.
14752 2018-01-16 Jakub Jelinek <jakub@redhat.com>
14755 * stor-layout.c (handle_warn_if_not_align): Use byte_position and
14756 multiple_of_p instead of unchecked tree_to_uhwi and UHWI check.
14757 If off is not INTEGER_CST, issue a may not be aligned warning
14758 rather than isn't aligned. Use isn%'t rather than isn't.
14759 * fold-const.c (multiple_of_p) <case BIT_AND_EXPR>: Don't fall through
14761 <case MULT_EXPR>: Improve the case when bottom and one of the
14762 MULT_EXPR operands are INTEGER_CSTs and bottom is multiple of that
14763 operand, in that case check if the other operand is multiple of
14764 bottom divided by the INTEGER_CST operand.
14766 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
14769 * config/pa/pa.h (FUNCTION_ARG_SIZE): Delete.
14770 * config/pa/pa-protos.h (pa_function_arg_size): Declare.
14771 * config/pa/som.h (ASM_DECLARE_FUNCTION_NAME): Use
14772 pa_function_arg_size instead of FUNCTION_ARG_SIZE.
14773 * config/pa/pa.c (pa_function_arg_advance): Likewise.
14774 (pa_function_arg, pa_arg_partial_bytes): Likewise.
14775 (pa_function_arg_size): New function.
14777 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
14779 * fold-const.c (fold_ternary_loc): Construct the vec_perm_indices
14780 in a separate statement.
14782 2018-01-16 Richard Sandiford <richard.sandiford@linaro.org>
14784 PR tree-optimization/83847
14785 * tree-vect-data-refs.c (vect_analyze_data_ref_accesses): Don't
14786 group gathers and scatters.
14788 2018-01-16 Jakub Jelinek <jakub@redhat.com>
14790 PR rtl-optimization/86620
14791 * params.def (max-sched-ready-insns): Bump minimum value to 1.
14793 PR rtl-optimization/83213
14794 * recog.c (peep2_attempt): Copy over CROSSING_JUMP_P from peepinsn
14795 to last if both are JUMP_INSNs.
14797 PR tree-optimization/83843
14798 * gimple-ssa-store-merging.c
14799 (imm_store_chain_info::output_merged_store): Handle bit_not_p on
14800 store_immediate_info for bswap/nop orig_stores.
14802 2018-01-15 Andrew Waterman <andrew@sifive.com>
14804 * config/riscv/riscv.c (riscv_rtx_costs) <MULT>: Increase cost if
14806 <UDIV>: Increase cost if !TARGET_DIV.
14808 2018-01-15 Segher Boessenkool <segher@kernel.crashing.org>
14810 * config/rs6000/rs6000.md (define_attr "type"): Remove delayed_cr.
14811 (define_attr "cr_logical_3op"): New.
14812 (cceq_ior_compare): Adjust.
14813 (cceq_ior_compare_complement): Adjust.
14814 (*cceq_rev_compare): Adjust.
14815 * config/rs6000/rs6000.c (rs6000_adjust_cost): Adjust.
14816 (is_cracked_insn): Adjust.
14817 (insn_must_be_first_in_group): Adjust.
14818 * config/rs6000/40x.md: Adjust.
14819 * config/rs6000/440.md: Adjust.
14820 * config/rs6000/476.md: Adjust.
14821 * config/rs6000/601.md: Adjust.
14822 * config/rs6000/603.md: Adjust.
14823 * config/rs6000/6xx.md: Adjust.
14824 * config/rs6000/7450.md: Adjust.
14825 * config/rs6000/7xx.md: Adjust.
14826 * config/rs6000/8540.md: Adjust.
14827 * config/rs6000/cell.md: Adjust.
14828 * config/rs6000/e300c2c3.md: Adjust.
14829 * config/rs6000/e500mc.md: Adjust.
14830 * config/rs6000/e500mc64.md: Adjust.
14831 * config/rs6000/e5500.md: Adjust.
14832 * config/rs6000/e6500.md: Adjust.
14833 * config/rs6000/mpc.md: Adjust.
14834 * config/rs6000/power4.md: Adjust.
14835 * config/rs6000/power5.md: Adjust.
14836 * config/rs6000/power6.md: Adjust.
14837 * config/rs6000/power7.md: Adjust.
14838 * config/rs6000/power8.md: Adjust.
14839 * config/rs6000/power9.md: Adjust.
14840 * config/rs6000/rs64.md: Adjust.
14841 * config/rs6000/titan.md: Adjust.
14843 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
14845 * config/i386/predicates.md (indirect_branch_operand): Rewrite
14846 ix86_indirect_branch_register logic.
14848 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
14850 * config/i386/constraints.md (Bs): Update
14851 ix86_indirect_branch_register check. Don't check
14852 ix86_indirect_branch_register with GOT_memory_operand.
14854 * config/i386/predicates.md (GOT_memory_operand): Don't check
14855 ix86_indirect_branch_register here.
14856 (GOT32_symbol_operand): Likewise.
14858 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
14860 * config/i386/predicates.md (constant_call_address_operand):
14861 Rewrite ix86_indirect_branch_register logic.
14862 (sibcall_insn_operand): Likewise.
14864 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
14866 * config/i386/constraints.md (Bs): Replace
14867 ix86_indirect_branch_thunk_register with
14868 ix86_indirect_branch_register.
14870 * config/i386/i386.md (indirect_jump): Likewise.
14871 (tablejump): Likewise.
14872 (*sibcall_memory): Likewise.
14873 (*sibcall_value_memory): Likewise.
14874 Peepholes of indirect call and jump via memory: Likewise.
14875 * config/i386/i386.opt: Likewise.
14876 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14877 (GOT_memory_operand): Likewise.
14878 (call_insn_operand): Likewise.
14879 (sibcall_insn_operand): Likewise.
14880 (GOT32_symbol_operand): Likewise.
14882 2018-01-15 Jakub Jelinek <jakub@redhat.com>
14884 PR middle-end/83837
14885 * omp-expand.c (expand_omp_atomic_pipeline): Use loaded_val
14886 type rather than type addr's type points to.
14887 (expand_omp_atomic_mutex): Likewise.
14888 (expand_omp_atomic): Likewise.
14890 2018-01-15 H.J. Lu <hongjiu.lu@intel.com>
14893 * config/i386/i386.c (output_indirect_thunk_function): Use
14894 ASM_OUTPUT_LABEL, instead of ASM_OUTPUT_DEF, for TARGET_MACHO
14895 for __x86_return_thunk.
14897 2018-01-15 Richard Biener <rguenther@suse.de>
14899 PR middle-end/83850
14900 * expmed.c (extract_bit_field_1): Fix typo.
14902 2018-01-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
14905 * config/arm/iterators.md (VF): New mode iterator.
14906 * config/arm/neon.md (neon_vabd<mode>_2): Use the above.
14907 Remove integer-related logic from pattern.
14908 (neon_vabd<mode>_3): Likewise.
14910 2018-01-15 Jakub Jelinek <jakub@redhat.com>
14912 PR middle-end/82694
14913 * common.opt (fstrict-overflow): No longer an alias.
14914 (fwrapv-pointer): New option.
14915 * tree.h (TYPE_OVERFLOW_WRAPS, TYPE_OVERFLOW_UNDEFINED): Define
14916 also for pointer types based on flag_wrapv_pointer.
14917 * opts.c (common_handle_option) <case OPT_fstrict_overflow>: Set
14918 opts->x_flag_wrap[pv] to !value, clear opts->x_flag_trapv if
14919 opts->x_flag_wrapv got set.
14920 * fold-const.c (fold_comparison, fold_binary_loc): Revert 2017-08-01
14921 changes, just use TYPE_OVERFLOW_UNDEFINED on pointer type instead of
14922 POINTER_TYPE_OVERFLOW_UNDEFINED.
14923 * match.pd: Likewise in address comparison pattern.
14924 * doc/invoke.texi: Document -fwrapv and -fstrict-overflow.
14926 2018-01-15 Richard Biener <rguenther@suse.de>
14929 * tree.c (free_lang_data_in_type): Always unlink TYPE_DECLs
14930 from TYPE_FIELDS. Free TYPE_BINFO if not used by devirtualization.
14931 Reset type names to their identifier if their TYPE_DECL doesn't
14932 have linkage (and thus is used for ODR and devirt).
14933 (save_debug_info_for_decl): Remove.
14934 (save_debug_info_for_type): Likewise.
14935 (add_tree_to_fld_list): Adjust.
14936 * tree-pretty-print.c (dump_generic_node): Make dumping of
14937 type names more robust.
14939 2018-01-15 Richard Biener <rguenther@suse.de>
14941 * BASE-VER: Bump to 8.0.1.
14943 2018-01-14 Martin Sebor <msebor@redhat.com>
14946 * builtins.c (check_access): Avoid warning when the no-warning bit
14949 2018-01-14 Cory Fields <cory-nospam-@coryfields.com>
14951 * tree-ssa-loop-im.c (sort_bbs_in_loop_postorder_cmp): Stabilize sort.
14952 * ira-color (allocno_hard_regs_compare): Likewise.
14954 2018-01-14 Nathan Rossi <nathan@nathanrossi.com>
14957 * config/microblaze/microblaze.c (microblaze_asm_output_ident):
14958 Use .pushsection/.popsection.
14960 2018-01-14 Martin Sebor <msebor@redhat.com>
14963 * doc/invoke.texi (-Wlass-memaccess): Document suppression by casting.
14965 2018-01-14 Jakub Jelinek <jakub@redhat.com>
14967 * config.gcc (i[34567]86-*-*): Remove one duplicate gfniintrin.h
14968 entry from extra_headers.
14969 (x86_64-*-*): Remove two duplicate gfniintrin.h entries from
14970 extra_headers, make the list bitwise identical to the i?86-*-* one.
14972 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
14974 * config/i386/i386.c (ix86_set_indirect_branch_type): Disallow
14975 -mcmodel=large with -mindirect-branch=thunk,
14976 -mindirect-branch=thunk-extern, -mfunction-return=thunk and
14977 -mfunction-return=thunk-extern.
14978 * doc/invoke.texi: Document -mcmodel=large is incompatible with
14979 -mindirect-branch=thunk, -mindirect-branch=thunk-extern,
14980 -mfunction-return=thunk and -mfunction-return=thunk-extern.
14982 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
14984 * config/i386/i386.c (print_reg): Print the name of the full
14985 integer register without '%'.
14986 (ix86_print_operand): Handle 'V'.
14987 * doc/extend.texi: Document 'V' modifier.
14989 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
14991 * config/i386/constraints.md (Bs): Disallow memory operand for
14992 -mindirect-branch-register.
14994 * config/i386/predicates.md (indirect_branch_operand): Likewise.
14995 (GOT_memory_operand): Likewise.
14996 (call_insn_operand): Likewise.
14997 (sibcall_insn_operand): Likewise.
14998 (GOT32_symbol_operand): Likewise.
14999 * config/i386/i386.md (indirect_jump): Call convert_memory_address
15000 for -mindirect-branch-register.
15001 (tablejump): Likewise.
15002 (*sibcall_memory): Likewise.
15003 (*sibcall_value_memory): Likewise.
15004 Disallow peepholes of indirect call and jump via memory for
15005 -mindirect-branch-register.
15006 (*call_pop): Replace m with Bw.
15007 (*call_value_pop): Likewise.
15008 (*sibcall_pop_memory): Replace m with Bs.
15009 * config/i386/i386.opt (mindirect-branch-register): New option.
15010 * doc/invoke.texi: Document -mindirect-branch-register option.
15012 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15014 * config/i386/i386-protos.h (ix86_output_function_return): New.
15015 * config/i386/i386.c (ix86_set_indirect_branch_type): Also
15016 set function_return_type.
15017 (indirect_thunk_name): Add ret_p to indicate thunk for function
15019 (output_indirect_thunk_function): Pass false to
15020 indirect_thunk_name.
15021 (ix86_output_indirect_branch_via_reg): Likewise.
15022 (ix86_output_indirect_branch_via_push): Likewise.
15023 (output_indirect_thunk_function): Create alias for function
15024 return thunk if regno < 0.
15025 (ix86_output_function_return): New function.
15026 (ix86_handle_fndecl_attribute): Handle function_return.
15027 (ix86_attribute_table): Add function_return.
15028 * config/i386/i386.h (machine_function): Add
15029 function_return_type.
15030 * config/i386/i386.md (simple_return_internal): Use
15031 ix86_output_function_return.
15032 (simple_return_internal_long): Likewise.
15033 * config/i386/i386.opt (mfunction-return=): New option.
15034 (indirect_branch): Mention -mfunction-return=.
15035 * doc/extend.texi: Document function_return function attribute.
15036 * doc/invoke.texi: Document -mfunction-return= option.
15038 2018-01-14 H.J. Lu <hongjiu.lu@intel.com>
15040 * config/i386/i386-opts.h (indirect_branch): New.
15041 * config/i386/i386-protos.h (ix86_output_indirect_jmp): Likewise.
15042 * config/i386/i386.c (ix86_using_red_zone): Disallow red-zone
15043 with local indirect jump when converting indirect call and jump.
15044 (ix86_set_indirect_branch_type): New.
15045 (ix86_set_current_function): Call ix86_set_indirect_branch_type.
15046 (indirectlabelno): New.
15047 (indirect_thunk_needed): Likewise.
15048 (indirect_thunk_bnd_needed): Likewise.
15049 (indirect_thunks_used): Likewise.
15050 (indirect_thunks_bnd_used): Likewise.
15051 (INDIRECT_LABEL): Likewise.
15052 (indirect_thunk_name): Likewise.
15053 (output_indirect_thunk): Likewise.
15054 (output_indirect_thunk_function): Likewise.
15055 (ix86_output_indirect_branch_via_reg): Likewise.
15056 (ix86_output_indirect_branch_via_push): Likewise.
15057 (ix86_output_indirect_branch): Likewise.
15058 (ix86_output_indirect_jmp): Likewise.
15059 (ix86_code_end): Call output_indirect_thunk_function if needed.
15060 (ix86_output_call_insn): Call ix86_output_indirect_branch if
15062 (ix86_handle_fndecl_attribute): Handle indirect_branch.
15063 (ix86_attribute_table): Add indirect_branch.
15064 * config/i386/i386.h (machine_function): Add indirect_branch_type
15065 and has_local_indirect_jump.
15066 * config/i386/i386.md (indirect_jump): Set has_local_indirect_jump
15068 (tablejump): Likewise.
15069 (*indirect_jump): Use ix86_output_indirect_jmp.
15070 (*tablejump_1): Likewise.
15071 (simple_return_indirect_internal): Likewise.
15072 * config/i386/i386.opt (mindirect-branch=): New option.
15073 (indirect_branch): New.
15076 (thunk-inline): Likewise.
15077 (thunk-extern): Likewise.
15078 * doc/extend.texi: Document indirect_branch function attribute.
15079 * doc/invoke.texi: Document -mindirect-branch= option.
15081 2018-01-14 Jan Hubicka <hubicka@ucw.cz>
15084 * ipa-inline.c (edge_badness): Tolerate roundoff errors.
15086 2018-01-14 Richard Sandiford <richard.sandiford@linaro.org>
15088 * ipa-inline.c (want_inline_small_function_p): Return false if
15089 inlining has already failed with CIF_FINAL_ERROR.
15090 (update_caller_keys): Call want_inline_small_function_p before
15092 (update_callee_keys): Likewise.
15094 2018-01-10 Kelvin Nilsen <kelvin@gcc.gnu.org>
15096 * config/rs6000/rs6000-p8swap.c (rs6000_sum_of_two_registers_p):
15098 (rs6000_quadword_masked_address_p): Likewise.
15099 (quad_aligned_load_p): Likewise.
15100 (quad_aligned_store_p): Likewise.
15101 (const_load_sequence_p): Add comment to describe the outer-most loop.
15102 (mimic_memory_attributes_and_flags): New function.
15103 (rs6000_gen_stvx): Likewise.
15104 (replace_swapped_aligned_store): Likewise.
15105 (rs6000_gen_lvx): Likewise.
15106 (replace_swapped_aligned_load): Likewise.
15107 (replace_swapped_load_constant): Capitalize argument name in
15108 comment describing this function.
15109 (rs6000_analyze_swaps): Add a third pass to search for vector loads
15110 and stores that access quad-word aligned addresses and replace
15111 with stvx or lvx instructions when appropriate.
15112 * config/rs6000/rs6000-protos.h (rs6000_sum_of_two_registers_p):
15113 New function prototype.
15114 (rs6000_quadword_masked_address_p): Likewise.
15115 (rs6000_gen_lvx): Likewise.
15116 (rs6000_gen_stvx): Likewise.
15117 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode>): For modes
15118 VSX_D (V2DF, V2DI), modify this split to select lvx instruction
15119 when memory address is aligned.
15120 (*vsx_le_perm_load_<mode>): For modes VSX_W (V4SF, V4SI), modify
15121 this split to select lvx instruction when memory address is aligned.
15122 (*vsx_le_perm_load_v8hi): Modify this split to select lvx
15123 instruction when memory address is aligned.
15124 (*vsx_le_perm_load_v16qi): Likewise.
15125 (four unnamed splitters): Modify to select the stvx instruction
15126 when memory is aligned.
15128 2018-01-13 Jan Hubicka <hubicka@ucw.cz>
15130 * predict.c (determine_unlikely_bbs): Handle correctly BBs
15131 which appears in the queue multiple times.
15133 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15134 Alan Hayward <alan.hayward@arm.com>
15135 David Sherwood <david.sherwood@arm.com>
15137 * tree-vectorizer.h (vec_lower_bound): New structure.
15138 (_loop_vec_info): Add check_nonzero and lower_bounds.
15139 (LOOP_VINFO_CHECK_NONZERO): New macro.
15140 (LOOP_VINFO_LOWER_BOUNDS): Likewise.
15141 (LOOP_REQUIRES_VERSIONING_FOR_ALIAS): Check lower_bounds too.
15142 * tree-data-ref.h (dr_with_seg_len): Add access_size and align
15143 fields. Make seg_len the distance travelled, not including the
15145 (dr_direction_indicator): Declare.
15146 (dr_zero_step_indicator): Likewise.
15147 (dr_known_forward_stride_p): Likewise.
15148 * tree-data-ref.c: Include stringpool.h, tree-vrp.h and
15150 (runtime_alias_check_p): Allow runtime alias checks with
15152 (operator ==): Compare access_size and align.
15153 (prune_runtime_alias_test_list): Rework for new distinction between
15154 the access_size and seg_len.
15155 (create_intersect_range_checks_index): Likewise. Cope with polynomial
15157 (get_segment_min_max): New function.
15158 (create_intersect_range_checks): Use it.
15159 (dr_step_indicator): New function.
15160 (dr_direction_indicator): Likewise.
15161 (dr_zero_step_indicator): Likewise.
15162 (dr_known_forward_stride_p): Likewise.
15163 * tree-loop-distribution.c (data_ref_segment_size): Return
15164 DR_STEP * (niters - 1).
15165 (compute_alias_check_pairs): Update call to the dr_with_seg_len
15167 * tree-vect-data-refs.c (vect_check_nonzero_value): New function.
15168 (vect_preserves_scalar_order_p): New function, split out from...
15169 (vect_analyze_data_ref_dependence): ...here. Check for zero steps.
15170 (vect_vfa_segment_size): Return DR_STEP * (length_factor - 1).
15171 (vect_vfa_access_size): New function.
15172 (vect_vfa_align): Likewise.
15173 (vect_compile_time_alias): Take access_size_a and access_b arguments.
15174 (dump_lower_bound): New function.
15175 (vect_check_lower_bound): Likewise.
15176 (vect_small_gap_p): Likewise.
15177 (vectorizable_with_step_bound_p): Likewise.
15178 (vect_prune_runtime_alias_test_list): Ignore cross-iteration
15179 depencies if the vectorization factor is 1. Convert the checks
15180 for nonzero steps into checks on the bounds of DR_STEP. Try using
15181 a bunds check for variable steps if the minimum required step is
15182 relatively small. Update calls to the dr_with_seg_len
15183 constructor and to vect_compile_time_alias.
15184 * tree-vect-loop-manip.c (vect_create_cond_for_lower_bounds): New
15186 (vect_loop_versioning): Call it.
15187 * tree-vect-loop.c (vect_analyze_loop_2): Clear LOOP_VINFO_LOWER_BOUNDS
15189 (vect_estimate_min_profitable_iters): Account for any bounds checks.
15191 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15192 Alan Hayward <alan.hayward@arm.com>
15193 David Sherwood <david.sherwood@arm.com>
15195 * doc/sourcebuild.texi (vect_scatter_store): Document.
15196 * optabs.def (scatter_store_optab, mask_scatter_store_optab): New
15198 * doc/md.texi (scatter_store@var{m}, mask_scatter_store@var{m}):
15200 * genopinit.c (main): Add supports_vec_scatter_store and
15201 supports_vec_scatter_store_cached to target_optabs.
15202 * gimple.h (gimple_expr_type): Handle IFN_SCATTER_STORE and
15203 IFN_MASK_SCATTER_STORE.
15204 * internal-fn.def (SCATTER_STORE, MASK_SCATTER_STORE): New internal
15206 * internal-fn.h (internal_store_fn_p): Declare.
15207 (internal_fn_stored_value_index): Likewise.
15208 * internal-fn.c (scatter_store_direct): New macro.
15209 (expand_scatter_store_optab_fn): New function.
15210 (direct_scatter_store_optab_supported_p): New macro.
15211 (internal_store_fn_p): New function.
15212 (internal_gather_scatter_fn_p): Handle IFN_SCATTER_STORE and
15213 IFN_MASK_SCATTER_STORE.
15214 (internal_fn_mask_index): Likewise.
15215 (internal_fn_stored_value_index): New function.
15216 (internal_gather_scatter_fn_supported_p): Adjust operand numbers
15217 for scatter stores.
15218 * optabs-query.h (supports_vec_scatter_store_p): Declare.
15219 * optabs-query.c (supports_vec_scatter_store_p): New function.
15220 * tree-vectorizer.h (vect_get_store_rhs): Declare.
15221 * tree-vect-data-refs.c (vect_analyze_data_ref_access): Return
15222 true for scatter stores.
15223 (vect_gather_scatter_fn_p): Handle scatter stores too.
15224 (vect_check_gather_scatter): Consider using scatter stores if
15225 supports_vec_scatter_store_p.
15226 * tree-vect-patterns.c (vect_try_gather_scatter_pattern): Handle
15227 scatter stores too.
15228 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15229 internal_fn_stored_value_index.
15230 (check_load_store_masking): Handle scatter stores too.
15231 (vect_get_store_rhs): Make public.
15232 (vectorizable_call): Use internal_store_fn_p.
15233 (vectorizable_store): Handle scatter store internal functions.
15234 (vect_transform_stmt): Compare GROUP_STORE_COUNT with GROUP_SIZE
15235 when deciding whether the end of the group has been reached.
15236 * config/aarch64/aarch64.md (UNSPEC_ST1_SCATTER): New unspec.
15237 * config/aarch64/aarch64-sve.md (scatter_store<mode>): New expander.
15238 (mask_scatter_store<mode>): New insns.
15240 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15241 Alan Hayward <alan.hayward@arm.com>
15242 David Sherwood <david.sherwood@arm.com>
15244 * tree-vectorizer.h (vect_gather_scatter_fn_p): Declare.
15245 * tree-vect-data-refs.c (vect_gather_scatter_fn_p): Make public.
15246 * tree-vect-stmts.c (vect_truncate_gather_scatter_offset): New
15248 (vect_use_strided_gather_scatters_p): Take a masked_p argument.
15249 Use vect_truncate_gather_scatter_offset if we can't treat the
15250 operation as a normal gather load or scatter store.
15251 (get_group_load_store_type): Take the gather_scatter_info
15252 as argument. Try using a gather load or scatter store for
15253 single-element groups.
15254 (get_load_store_type): Update calls to get_group_load_store_type
15255 and vect_use_strided_gather_scatters_p.
15257 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15258 Alan Hayward <alan.hayward@arm.com>
15259 David Sherwood <david.sherwood@arm.com>
15261 * tree-vectorizer.h (vect_create_data_ref_ptr): Take an extra
15262 optional tree argument.
15263 * tree-vect-data-refs.c (vect_check_gather_scatter): Check for
15265 (vect_create_data_ref_ptr): Take the iv_step as an optional argument,
15266 but continue to use the current value as a fallback.
15267 (bump_vector_ptr): Use operand_equal_p rather than tree_int_cst_compare
15268 to compare the updates.
15269 * tree-vect-stmts.c (vect_use_strided_gather_scatters_p): New function.
15270 (get_load_store_type): Use it when handling a strided access.
15271 (vect_get_strided_load_store_ops): New function.
15272 (vect_get_data_ptr_increment): Likewise.
15273 (vectorizable_load): Handle strided gather loads. Always pass
15274 a step to vect_create_data_ref_ptr and bump_vector_ptr.
15276 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15277 Alan Hayward <alan.hayward@arm.com>
15278 David Sherwood <david.sherwood@arm.com>
15280 * doc/md.texi (gather_load@var{m}): Document.
15281 (mask_gather_load@var{m}): Likewise.
15282 * genopinit.c (main): Add supports_vec_gather_load and
15283 supports_vec_gather_load_cached to target_optabs.
15284 * optabs-tree.c (init_tree_optimization_optabs): Use
15285 ggc_cleared_alloc to allocate target_optabs.
15286 * optabs.def (gather_load_optab, mask_gather_laod_optab): New optabs.
15287 * internal-fn.def (GATHER_LOAD, MASK_GATHER_LOAD): New internal
15289 * internal-fn.h (internal_load_fn_p): Declare.
15290 (internal_gather_scatter_fn_p): Likewise.
15291 (internal_fn_mask_index): Likewise.
15292 (internal_gather_scatter_fn_supported_p): Likewise.
15293 * internal-fn.c (gather_load_direct): New macro.
15294 (expand_gather_load_optab_fn): New function.
15295 (direct_gather_load_optab_supported_p): New macro.
15296 (direct_internal_fn_optab): New function.
15297 (internal_load_fn_p): Likewise.
15298 (internal_gather_scatter_fn_p): Likewise.
15299 (internal_fn_mask_index): Likewise.
15300 (internal_gather_scatter_fn_supported_p): Likewise.
15301 * optabs-query.c (supports_at_least_one_mode_p): New function.
15302 (supports_vec_gather_load_p): Likewise.
15303 * optabs-query.h (supports_vec_gather_load_p): Declare.
15304 * tree-vectorizer.h (gather_scatter_info): Add ifn, element_type
15305 and memory_type field.
15306 (NUM_PATTERNS): Bump to 15.
15307 * tree-vect-data-refs.c: Include internal-fn.h.
15308 (vect_gather_scatter_fn_p): New function.
15309 (vect_describe_gather_scatter_call): Likewise.
15310 (vect_check_gather_scatter): Try using internal functions for
15311 gather loads. Recognize existing calls to a gather load function.
15312 (vect_analyze_data_refs): Consider using gather loads if
15313 supports_vec_gather_load_p.
15314 * tree-vect-patterns.c (vect_get_load_store_mask): New function.
15315 (vect_get_gather_scatter_offset_type): Likewise.
15316 (vect_convert_mask_for_vectype): Likewise.
15317 (vect_add_conversion_to_patterm): Likewise.
15318 (vect_try_gather_scatter_pattern): Likewise.
15319 (vect_recog_gather_scatter_pattern): New pattern recognizer.
15320 (vect_vect_recog_func_ptrs): Add it.
15321 * tree-vect-stmts.c (exist_non_indexing_operands_for_use_p): Use
15322 internal_fn_mask_index and internal_gather_scatter_fn_p.
15323 (check_load_store_masking): Take the gather_scatter_info as an
15324 argument and handle gather loads.
15325 (vect_get_gather_scatter_ops): New function.
15326 (vectorizable_call): Check internal_load_fn_p.
15327 (vectorizable_load): Likewise. Handle gather load internal
15329 (vectorizable_store): Update call to check_load_store_masking.
15330 * config/aarch64/aarch64.md (UNSPEC_LD1_GATHER): New unspec.
15331 * config/aarch64/iterators.md (SVE_S, SVE_D): New mode iterators.
15332 * config/aarch64/predicates.md (aarch64_gather_scale_operand_w)
15333 (aarch64_gather_scale_operand_d): New predicates.
15334 * config/aarch64/aarch64-sve.md (gather_load<mode>): New expander.
15335 (mask_gather_load<mode>): New insns.
15337 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15338 Alan Hayward <alan.hayward@arm.com>
15339 David Sherwood <david.sherwood@arm.com>
15341 * optabs.def (fold_left_plus_optab): New optab.
15342 * doc/md.texi (fold_left_plus_@var{m}): Document.
15343 * internal-fn.def (IFN_FOLD_LEFT_PLUS): New internal function.
15344 * internal-fn.c (fold_left_direct): Define.
15345 (expand_fold_left_optab_fn): Likewise.
15346 (direct_fold_left_optab_supported_p): Likewise.
15347 * fold-const-call.c (fold_const_fold_left): New function.
15348 (fold_const_call): Use it to fold CFN_FOLD_LEFT_PLUS.
15349 * tree-parloops.c (valid_reduction_p): New function.
15350 (gather_scalar_reductions): Use it.
15351 * tree-vectorizer.h (FOLD_LEFT_REDUCTION): New vect_reduction_type.
15352 (vect_finish_replace_stmt): Declare.
15353 * tree-vect-loop.c (fold_left_reduction_fn): New function.
15354 (needs_fold_left_reduction_p): New function, split out from...
15355 (vect_is_simple_reduction): ...here. Accept reductions that
15356 forbid reassociation, but give them type FOLD_LEFT_REDUCTION.
15357 (vect_force_simple_reduction): Also store the reduction type in
15358 the assignment's STMT_VINFO_REDUC_TYPE.
15359 (vect_model_reduction_cost): Handle FOLD_LEFT_REDUCTION.
15360 (merge_with_identity): New function.
15361 (vect_expand_fold_left): Likewise.
15362 (vectorize_fold_left_reduction): Likewise.
15363 (vectorizable_reduction): Handle FOLD_LEFT_REDUCTION. Leave the
15364 scalar phi in place for it. Check for target support and reject
15365 cases that would reassociate the operation. Defer the transform
15366 phase to vectorize_fold_left_reduction.
15367 * config/aarch64/aarch64.md (UNSPEC_FADDA): New unspec.
15368 * config/aarch64/aarch64-sve.md (fold_left_plus_<mode>): New expander.
15369 (*fold_left_plus_<mode>, *pred_fold_left_plus_<mode>): New insns.
15371 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15373 * tree-if-conv.c (predicate_mem_writes): Remove redundant
15374 call to ifc_temp_var.
15376 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15377 Alan Hayward <alan.hayward@arm.com>
15378 David Sherwood <david.sherwood@arm.com>
15380 * target.def (legitimize_address_displacement): Take the original
15381 offset as a poly_int.
15382 * targhooks.h (default_legitimize_address_displacement): Update
15384 * targhooks.c (default_legitimize_address_displacement): Likewise.
15385 * doc/tm.texi: Regenerate.
15386 * lra-constraints.c (base_plus_disp_to_reg): Take the displacement
15387 as an argument, moving assert of ad->disp == ad->disp_term to...
15388 (process_address_1): ...here. Update calls to base_plus_disp_to_reg.
15389 Try calling targetm.legitimize_address_displacement before expanding
15390 the address rather than afterwards, and adjust for the new interface.
15391 * config/aarch64/aarch64.c (aarch64_legitimize_address_displacement):
15392 Match the new hook interface. Handle SVE addresses.
15393 * config/sh/sh.c (sh_legitimize_address_displacement): Make the
15394 new hook interface.
15396 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15398 * Makefile.in (OBJS): Add early-remat.o.
15399 * target.def (select_early_remat_modes): New hook.
15400 * doc/tm.texi.in (TARGET_SELECT_EARLY_REMAT_MODES): New hook.
15401 * doc/tm.texi: Regenerate.
15402 * targhooks.h (default_select_early_remat_modes): Declare.
15403 * targhooks.c (default_select_early_remat_modes): New function.
15404 * timevar.def (TV_EARLY_REMAT): New timevar.
15405 * passes.def (pass_early_remat): New pass.
15406 * tree-pass.h (make_pass_early_remat): Declare.
15407 * early-remat.c: New file.
15408 * config/aarch64/aarch64.c (aarch64_select_early_remat_modes): New
15410 (TARGET_SELECT_EARLY_REMAT_MODES): Define.
15412 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15413 Alan Hayward <alan.hayward@arm.com>
15414 David Sherwood <david.sherwood@arm.com>
15416 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Replace
15417 vfm1 with a bound_epilog parameter.
15418 (vect_do_peeling): Update calls accordingly, and move the prologue
15419 call earlier in the function. Treat the base bound_epilog as 0 for
15420 fully-masked loops and retain vf - 1 for other loops. Add 1 to
15421 this base when peeling for gaps.
15422 * tree-vect-loop.c (vect_analyze_loop_2): Allow peeling for gaps
15423 with fully-masked loops.
15424 (vect_estimate_min_profitable_iters): Handle the single peeled
15425 iteration in that case.
15427 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15428 Alan Hayward <alan.hayward@arm.com>
15429 David Sherwood <david.sherwood@arm.com>
15431 * tree-vect-data-refs.c (vect_analyze_group_access_1): Allow
15432 single-element interleaving even if the size is not a power of 2.
15433 * tree-vect-stmts.c (get_load_store_type): Disallow elementwise
15434 accesses for single-element interleaving if the group size is
15437 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15438 Alan Hayward <alan.hayward@arm.com>
15439 David Sherwood <david.sherwood@arm.com>
15441 * doc/md.texi (fold_extract_last_@var{m}): Document.
15442 * doc/sourcebuild.texi (vect_fold_extract_last): Likewise.
15443 * optabs.def (fold_extract_last_optab): New optab.
15444 * internal-fn.def (FOLD_EXTRACT_LAST): New internal function.
15445 * internal-fn.c (fold_extract_direct): New macro.
15446 (expand_fold_extract_optab_fn): Likewise.
15447 (direct_fold_extract_optab_supported_p): Likewise.
15448 * tree-vectorizer.h (EXTRACT_LAST_REDUCTION): New vect_reduction_type.
15449 * tree-vect-loop.c (vect_model_reduction_cost): Handle
15450 EXTRACT_LAST_REDUCTION.
15451 (get_initial_def_for_reduction): Do not create an initial vector
15452 for EXTRACT_LAST_REDUCTION reductions.
15453 (vectorizable_reduction): Leave the scalar phi in place for
15454 EXTRACT_LAST_REDUCTIONs. Try using EXTRACT_LAST_REDUCTION
15455 ahead of INTEGER_INDUC_COND_REDUCTION. Do not check for an
15456 epilogue code for EXTRACT_LAST_REDUCTION and defer the
15457 transform phase to vectorizable_condition.
15458 * tree-vect-stmts.c (vect_finish_stmt_generation_1): New function,
15460 (vect_finish_stmt_generation): ...here.
15461 (vect_finish_replace_stmt): New function.
15462 (vectorizable_condition): Handle EXTRACT_LAST_REDUCTION.
15463 * config/aarch64/aarch64-sve.md (fold_extract_last_<mode>): New
15465 * config/aarch64/aarch64.md (UNSPEC_CLASTB): New unspec.
15467 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15468 Alan Hayward <alan.hayward@arm.com>
15469 David Sherwood <david.sherwood@arm.com>
15471 * doc/md.texi (extract_last_@var{m}): Document.
15472 * optabs.def (extract_last_optab): New optab.
15473 * internal-fn.def (EXTRACT_LAST): New internal function.
15474 * internal-fn.c (cond_unary_direct): New macro.
15475 (expand_cond_unary_optab_fn): Likewise.
15476 (direct_cond_unary_optab_supported_p): Likewise.
15477 * tree-vect-loop.c (vectorizable_live_operation): Allow fully-masked
15478 loops using EXTRACT_LAST.
15479 * config/aarch64/aarch64-sve.md (aarch64_sve_lastb<mode>): Rename to...
15480 (extract_last_<mode>): ...this optab.
15481 (vec_extract<mode><Vel>): Update accordingly.
15483 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15484 Alan Hayward <alan.hayward@arm.com>
15485 David Sherwood <david.sherwood@arm.com>
15487 * target.def (empty_mask_is_expensive): New hook.
15488 * doc/tm.texi.in (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): New hook.
15489 * doc/tm.texi: Regenerate.
15490 * targhooks.h (default_empty_mask_is_expensive): Declare.
15491 * targhooks.c (default_empty_mask_is_expensive): New function.
15492 * tree-vectorizer.c (vectorize_loops): Only call optimize_mask_stores
15493 if the target says that empty masks are expensive.
15494 * config/aarch64/aarch64.c (aarch64_empty_mask_is_expensive):
15496 (TARGET_VECTORIZE_EMPTY_MASK_IS_EXPENSIVE): Redefine.
15498 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15499 Alan Hayward <alan.hayward@arm.com>
15500 David Sherwood <david.sherwood@arm.com>
15502 * tree-vectorizer.h (_loop_vec_info::mask_skip_niters): New field.
15503 (LOOP_VINFO_MASK_SKIP_NITERS): New macro.
15504 (vect_use_loop_mask_for_alignment_p): New function.
15505 (vect_prepare_for_masked_peels, vect_gen_while_not): Declare.
15506 * tree-vect-loop-manip.c (vect_set_loop_masks_directly): Add an
15507 niters_skip argument. Make sure that the first niters_skip elements
15508 of the first iteration are inactive.
15509 (vect_set_loop_condition_masked): Handle LOOP_VINFO_MASK_SKIP_NITERS.
15510 Update call to vect_set_loop_masks_directly.
15511 (get_misalign_in_elems): New function, split out from...
15512 (vect_gen_prolog_loop_niters): ...here.
15513 (vect_update_init_of_dr): Take a code argument that specifies whether
15514 the adjustment should be added or subtracted.
15515 (vect_update_init_of_drs): Likewise.
15516 (vect_prepare_for_masked_peels): New function.
15517 (vect_do_peeling): Skip prologue peeling if we're using a mask
15518 instead. Update call to vect_update_inits_of_drs.
15519 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15521 (vect_analyze_loop_2): Allow fully-masked loops with peeling for
15522 alignment. Do not include the number of peeled iterations in
15523 the minimum threshold in that case.
15524 (vectorizable_induction): Adjust the start value down by
15525 LOOP_VINFO_MASK_SKIP_NITERS iterations.
15526 (vect_transform_loop): Call vect_prepare_for_masked_peels.
15527 Take the number of skipped iterations into account when calculating
15529 * tree-vect-stmts.c (vect_gen_while_not): New function.
15531 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15532 Alan Hayward <alan.hayward@arm.com>
15533 David Sherwood <david.sherwood@arm.com>
15535 * doc/sourcebuild.texi (vect_fully_masked): Document.
15536 * params.def (PARAM_MIN_VECT_LOOP_BOUND): Change minimum and
15537 default value to 0.
15538 * tree-vect-loop.c (vect_analyze_loop_costing): New function,
15540 (vect_analyze_loop_2): ...here. Don't check the vectorization
15541 factor against the number of loop iterations if the loop is
15544 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15545 Alan Hayward <alan.hayward@arm.com>
15546 David Sherwood <david.sherwood@arm.com>
15548 * tree-ssa-loop-ivopts.c (USE_ADDRESS): Split into...
15549 (USE_REF_ADDRESS, USE_PTR_ADDRESS): ...these new use types.
15550 (dump_groups): Update accordingly.
15551 (iv_use::mem_type): New member variable.
15552 (address_p): New function.
15553 (record_use): Add a mem_type argument and initialize the new
15555 (record_group_use): Add a mem_type argument. Use address_p.
15556 Remove obsolete null checks of base_object. Update call to record_use.
15557 (find_interesting_uses_op): Update call to record_group_use.
15558 (find_interesting_uses_cond): Likewise.
15559 (find_interesting_uses_address): Likewise.
15560 (get_mem_type_for_internal_fn): New function.
15561 (find_address_like_use): Likewise.
15562 (find_interesting_uses_stmt): Try find_address_like_use before
15563 calling find_interesting_uses_op.
15564 (addr_offset_valid_p): Use the iv mem_type field as the type
15565 of the addressed memory.
15566 (add_autoinc_candidates): Likewise.
15567 (get_address_cost): Likewise.
15568 (split_small_address_groups_p): Use address_p.
15569 (split_address_groups): Likewise.
15570 (add_iv_candidate_for_use): Likewise.
15571 (autoinc_possible_for_pair): Likewise.
15572 (rewrite_groups): Likewise.
15573 (get_use_type): Check for USE_REF_ADDRESS instead of USE_ADDRESS.
15574 (determine_group_iv_cost): Update after split of USE_ADDRESS.
15575 (get_alias_ptr_type_for_ptr_address): New function.
15576 (rewrite_use_address): Rewrite address uses in calls that were
15577 identified by find_address_like_use.
15579 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15580 Alan Hayward <alan.hayward@arm.com>
15581 David Sherwood <david.sherwood@arm.com>
15583 * expr.c (expand_expr_addr_expr_1): Handle ADDR_EXPRs of
15585 * gimple-expr.h (is_gimple_addressable: Likewise.
15586 * gimple-expr.c (is_gimple_address): Likewise.
15587 * internal-fn.c (expand_call_mem_ref): New function.
15588 (expand_mask_load_optab_fn): Use it.
15589 (expand_mask_store_optab_fn): Likewise.
15591 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15592 Alan Hayward <alan.hayward@arm.com>
15593 David Sherwood <david.sherwood@arm.com>
15595 * doc/md.texi (cond_add@var{mode}, cond_sub@var{mode})
15596 (cond_and@var{mode}, cond_ior@var{mode}, cond_xor@var{mode})
15597 (cond_smin@var{mode}, cond_smax@var{mode}, cond_umin@var{mode})
15598 (cond_umax@var{mode}): Document.
15599 * optabs.def (cond_add_optab, cond_sub_optab, cond_and_optab)
15600 (cond_ior_optab, cond_xor_optab, cond_smin_optab, cond_smax_optab)
15601 (cond_umin_optab, cond_umax_optab): New optabs.
15602 * internal-fn.def (COND_ADD, COND_SUB, COND_MIN, COND_MAX, COND_AND)
15603 (COND_IOR, COND_XOR): New internal functions.
15604 * internal-fn.h (get_conditional_internal_fn): Declare.
15605 * internal-fn.c (cond_binary_direct): New macro.
15606 (expand_cond_binary_optab_fn): Likewise.
15607 (direct_cond_binary_optab_supported_p): Likewise.
15608 (get_conditional_internal_fn): New function.
15609 * tree-vect-loop.c (vectorizable_reduction): Handle fully-masked loops.
15610 Cope with reduction statements that are vectorized as calls rather
15612 * config/aarch64/aarch64-sve.md (cond_<optab><mode>): New insns.
15613 * config/aarch64/iterators.md (UNSPEC_COND_ADD, UNSPEC_COND_SUB)
15614 (UNSPEC_COND_SMAX, UNSPEC_COND_UMAX, UNSPEC_COND_SMIN)
15615 (UNSPEC_COND_UMIN, UNSPEC_COND_AND, UNSPEC_COND_ORR)
15616 (UNSPEC_COND_EOR): New unspecs.
15617 (optab): Add mappings for them.
15618 (SVE_COND_INT_OP, SVE_COND_FP_OP): New int iterators.
15619 (sve_int_op, sve_fp_op): New int attributes.
15621 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15622 Alan Hayward <alan.hayward@arm.com>
15623 David Sherwood <david.sherwood@arm.com>
15625 * optabs.def (while_ult_optab): New optab.
15626 * doc/md.texi (while_ult@var{m}@var{n}): Document.
15627 * internal-fn.def (WHILE_ULT): New internal function.
15628 * internal-fn.h (direct_internal_fn_supported_p): New override
15629 that takes two types as argument.
15630 * internal-fn.c (while_direct): New macro.
15631 (expand_while_optab_fn): New function.
15632 (convert_optab_supported_p): Likewise.
15633 (direct_while_optab_supported_p): New macro.
15634 * wide-int.h (wi::udiv_ceil): New function.
15635 * tree-vectorizer.h (rgroup_masks): New structure.
15636 (vec_loop_masks): New typedef.
15637 (_loop_vec_info): Add masks, mask_compare_type, can_fully_mask_p
15638 and fully_masked_p.
15639 (LOOP_VINFO_CAN_FULLY_MASK_P, LOOP_VINFO_FULLY_MASKED_P)
15640 (LOOP_VINFO_MASKS, LOOP_VINFO_MASK_COMPARE_TYPE): New macros.
15641 (vect_max_vf): New function.
15642 (slpeel_make_loop_iterate_ntimes): Delete.
15643 (vect_set_loop_condition, vect_get_loop_mask_type, vect_gen_while)
15644 (vect_halve_mask_nunits, vect_double_mask_nunits): Declare.
15645 (vect_record_loop_mask, vect_get_loop_mask): Likewise.
15646 * tree-vect-loop-manip.c: Include tree-ssa-loop-niter.h,
15647 internal-fn.h, stor-layout.h and optabs-query.h.
15648 (vect_set_loop_mask): New function.
15649 (add_preheader_seq): Likewise.
15650 (add_header_seq): Likewise.
15651 (interleave_supported_p): Likewise.
15652 (vect_maybe_permute_loop_masks): Likewise.
15653 (vect_set_loop_masks_directly): Likewise.
15654 (vect_set_loop_condition_masked): Likewise.
15655 (vect_set_loop_condition_unmasked): New function, split out from
15656 slpeel_make_loop_iterate_ntimes.
15657 (slpeel_make_loop_iterate_ntimes): Rename to..
15658 (vect_set_loop_condition): ...this. Use vect_set_loop_condition_masked
15659 for fully-masked loops and vect_set_loop_condition_unmasked otherwise.
15660 (vect_do_peeling): Update call accordingly.
15661 (vect_gen_vector_loop_niters): Use VF as the step for fully-masked
15663 * tree-vect-loop.c (_loop_vec_info::_loop_vec_info): Initialize
15664 mask_compare_type, can_fully_mask_p and fully_masked_p.
15665 (release_vec_loop_masks): New function.
15666 (_loop_vec_info): Use it to free the loop masks.
15667 (can_produce_all_loop_masks_p): New function.
15668 (vect_get_max_nscalars_per_iter): Likewise.
15669 (vect_verify_full_masking): Likewise.
15670 (vect_analyze_loop_2): Save LOOP_VINFO_CAN_FULLY_MASK_P around
15671 retries, and free the mask rgroups before retrying. Check loop-wide
15672 reasons for disallowing fully-masked loops. Make the final decision
15673 about whether use a fully-masked loop or not.
15674 (vect_estimate_min_profitable_iters): Do not assume that peeling
15675 for the number of iterations will be needed for fully-masked loops.
15676 (vectorizable_reduction): Disable fully-masked loops.
15677 (vectorizable_live_operation): Likewise.
15678 (vect_halve_mask_nunits): New function.
15679 (vect_double_mask_nunits): Likewise.
15680 (vect_record_loop_mask): Likewise.
15681 (vect_get_loop_mask): Likewise.
15682 (vect_transform_loop): Handle the case in which the final loop
15683 iteration might handle a partial vector. Call vect_set_loop_condition
15684 instead of slpeel_make_loop_iterate_ntimes.
15685 * tree-vect-stmts.c: Include tree-ssa-loop-niter.h and gimple-fold.h.
15686 (check_load_store_masking): New function.
15687 (prepare_load_store_mask): Likewise.
15688 (vectorizable_store): Handle fully-masked loops.
15689 (vectorizable_load): Likewise.
15690 (supportable_widening_operation): Use vect_halve_mask_nunits for
15692 (supportable_narrowing_operation): Likewise vect_double_mask_nunits.
15693 (vect_gen_while): New function.
15694 * config/aarch64/aarch64.md (umax<mode>3): New expander.
15695 (aarch64_uqdec<mode>): New insn.
15697 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15698 Alan Hayward <alan.hayward@arm.com>
15699 David Sherwood <david.sherwood@arm.com>
15701 * optabs.def (reduc_and_scal_optab, reduc_ior_scal_optab)
15702 (reduc_xor_scal_optab): New optabs.
15703 * doc/md.texi (reduc_and_scal_@var{m}, reduc_ior_scal_@var{m})
15704 (reduc_xor_scal_@var{m}): Document.
15705 * doc/sourcebuild.texi (vect_logical_reduc): Likewise.
15706 * internal-fn.def (IFN_REDUC_AND, IFN_REDUC_IOR, IFN_REDUC_XOR): New
15707 internal functions.
15708 * fold-const-call.c (fold_const_call): Handle them.
15709 * tree-vect-loop.c (reduction_fn_for_scalar_code): Return the new
15710 internal functions for BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR.
15711 * config/aarch64/aarch64-sve.md (reduc_<bit_reduc>_scal_<mode>):
15712 (*reduc_<bit_reduc>_scal_<mode>): New patterns.
15713 * config/aarch64/iterators.md (UNSPEC_ANDV, UNSPEC_ORV)
15714 (UNSPEC_XORV): New unspecs.
15715 (optab): Add entries for them.
15716 (BITWISEV): New int iterator.
15717 (bit_reduc_op): New int attributes.
15719 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15720 Alan Hayward <alan.hayward@arm.com>
15721 David Sherwood <david.sherwood@arm.com>
15723 * doc/md.texi (vec_shl_insert_@var{m}): New optab.
15724 * internal-fn.def (VEC_SHL_INSERT): New internal function.
15725 * optabs.def (vec_shl_insert_optab): New optab.
15726 * tree-vectorizer.h (can_duplicate_and_interleave_p): Declare.
15727 (duplicate_and_interleave): Likewise.
15728 * tree-vect-loop.c: Include internal-fn.h.
15729 (neutral_op_for_slp_reduction): New function, split out from
15730 get_initial_defs_for_reduction.
15731 (get_initial_def_for_reduction): Handle option 2 for variable-length
15732 vectors by loading the neutral value into a vector and then shifting
15733 the initial value into element 0.
15734 (get_initial_defs_for_reduction): Replace the code argument with
15735 the neutral value calculated by neutral_op_for_slp_reduction.
15736 Use gimple_build_vector for constant-length vectors.
15737 Use IFN_VEC_SHL_INSERT for variable-length vectors if all
15738 but the first group_size elements have a neutral value.
15739 Use duplicate_and_interleave otherwise.
15740 (vect_create_epilog_for_reduction): Take a neutral_op parameter.
15741 Update call to get_initial_defs_for_reduction. Handle SLP
15742 reductions for variable-length vectors by creating one vector
15743 result for each scalar result, with the elements associated
15744 with other scalar results stubbed out with the neutral value.
15745 (vectorizable_reduction): Call neutral_op_for_slp_reduction.
15746 Require IFN_VEC_SHL_INSERT for double reductions on
15747 variable-length vectors, or SLP reductions that have
15748 a neutral value. Require can_duplicate_and_interleave_p
15749 support for variable-length unchained SLP reductions if there
15750 is no neutral value, such as for MIN/MAX reductions. Also require
15751 the number of vector elements to be a multiple of the number of
15752 SLP statements when doing variable-length unchained SLP reductions.
15753 Update call to vect_create_epilog_for_reduction.
15754 * tree-vect-slp.c (can_duplicate_and_interleave_p): Make public
15755 and remove initial values.
15756 (duplicate_and_interleave): Make public.
15757 * config/aarch64/aarch64.md (UNSPEC_INSR): New unspec.
15758 * config/aarch64/aarch64-sve.md (vec_shl_insert_<mode>): New insn.
15760 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15761 Alan Hayward <alan.hayward@arm.com>
15762 David Sherwood <david.sherwood@arm.com>
15764 * tree-vect-slp.c: Include gimple-fold.h and internal-fn.h
15765 (can_duplicate_and_interleave_p): New function.
15766 (vect_get_and_check_slp_defs): Take the vector of statements
15767 rather than just the current one. Remove excess parentheses.
15768 Restriction rejectinon of vect_constant_def and vect_external_def
15769 for variable-length vectors to boolean types, or types for which
15770 can_duplicate_and_interleave_p is false.
15771 (vect_build_slp_tree_2): Update call to vect_get_and_check_slp_defs.
15772 (duplicate_and_interleave): New function.
15773 (vect_get_constant_vectors): Use gimple_build_vector for
15774 constant-length vectors and suitable variable-length constant
15775 vectors. Use duplicate_and_interleave for other variable-length
15776 vectors. Don't defer the update when inserting new statements.
15778 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15779 Alan Hayward <alan.hayward@arm.com>
15780 David Sherwood <david.sherwood@arm.com>
15782 * tree-vect-loop.c (vect_estimate_min_profitable_iters): Make sure
15783 min_profitable_iters doesn't go negative.
15785 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15786 Alan Hayward <alan.hayward@arm.com>
15787 David Sherwood <david.sherwood@arm.com>
15789 * doc/md.texi (vec_mask_load_lanes@var{m}@var{n}): Document.
15790 (vec_mask_store_lanes@var{m}@var{n}): Likewise.
15791 * optabs.def (vec_mask_load_lanes_optab): New optab.
15792 (vec_mask_store_lanes_optab): Likewise.
15793 * internal-fn.def (MASK_LOAD_LANES): New internal function.
15794 (MASK_STORE_LANES): Likewise.
15795 * internal-fn.c (mask_load_lanes_direct): New macro.
15796 (mask_store_lanes_direct): Likewise.
15797 (expand_mask_load_optab_fn): Handle masked operations.
15798 (expand_mask_load_lanes_optab_fn): New macro.
15799 (expand_mask_store_optab_fn): Handle masked operations.
15800 (expand_mask_store_lanes_optab_fn): New macro.
15801 (direct_mask_load_lanes_optab_supported_p): Likewise.
15802 (direct_mask_store_lanes_optab_supported_p): Likewise.
15803 * tree-vectorizer.h (vect_store_lanes_supported): Take a masked_p
15805 (vect_load_lanes_supported): Likewise.
15806 * tree-vect-data-refs.c (strip_conversion): New function.
15807 (can_group_stmts_p): Likewise.
15808 (vect_analyze_data_ref_accesses): Use it instead of checking
15809 for a pair of assignments.
15810 (vect_store_lanes_supported): Take a masked_p parameter.
15811 (vect_load_lanes_supported): Likewise.
15812 * tree-vect-loop.c (vect_analyze_loop_2): Update calls to
15813 vect_store_lanes_supported and vect_load_lanes_supported.
15814 * tree-vect-slp.c (vect_analyze_slp_instance): Likewise.
15815 * tree-vect-stmts.c (get_group_load_store_type): Take a masked_p
15816 parameter. Don't allow gaps for masked accesses.
15817 Use vect_get_store_rhs. Update calls to vect_store_lanes_supported
15818 and vect_load_lanes_supported.
15819 (get_load_store_type): Take a masked_p parameter and update
15820 call to get_group_load_store_type.
15821 (vectorizable_store): Update call to get_load_store_type.
15822 Handle IFN_MASK_STORE_LANES.
15823 (vectorizable_load): Update call to get_load_store_type.
15824 Handle IFN_MASK_LOAD_LANES.
15826 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15827 Alan Hayward <alan.hayward@arm.com>
15828 David Sherwood <david.sherwood@arm.com>
15830 * config/aarch64/aarch64-modes.def: Define x2, x3 and x4 vector
15832 * config/aarch64/aarch64-protos.h
15833 (aarch64_sve_struct_memory_operand_p): Declare.
15834 * config/aarch64/iterators.md (SVE_STRUCT): New mode iterator.
15835 (vector_count, insn_length, VSINGLE, vsingle): New mode attributes.
15836 (VPRED, vpred): Handle SVE structure modes.
15837 * config/aarch64/constraints.md (Utx): New constraint.
15838 * config/aarch64/predicates.md (aarch64_sve_struct_memory_operand)
15839 (aarch64_sve_struct_nonimmediate_operand): New predicates.
15840 * config/aarch64/aarch64.md (UNSPEC_LDN, UNSPEC_STN): New unspecs.
15841 * config/aarch64/aarch64-sve.md (mov<mode>, *aarch64_sve_mov<mode>_le)
15842 (*aarch64_sve_mov<mode>_be, pred_mov<mode>): New patterns for
15843 structure modes. Split into pieces after RA.
15844 (vec_load_lanes<mode><vsingle>, vec_mask_load_lanes<mode><vsingle>)
15845 (vec_store_lanes<mode><vsingle>, vec_mask_store_lanes<mode><vsingle>):
15847 * config/aarch64/aarch64.c (aarch64_classify_vector_mode): Handle
15848 SVE structure modes.
15849 (aarch64_classify_address): Likewise.
15850 (sizetochar): Move earlier in file.
15851 (aarch64_print_operand): Handle SVE register lists.
15852 (aarch64_array_mode): New function.
15853 (aarch64_sve_struct_memory_operand_p): Likewise.
15854 (TARGET_ARRAY_MODE): Redefine.
15856 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15857 Alan Hayward <alan.hayward@arm.com>
15858 David Sherwood <david.sherwood@arm.com>
15860 * target.def (array_mode): New target hook.
15861 * doc/tm.texi.in (TARGET_ARRAY_MODE): New hook.
15862 * doc/tm.texi: Regenerate.
15863 * hooks.h (hook_optmode_mode_uhwi_none): Declare.
15864 * hooks.c (hook_optmode_mode_uhwi_none): New function.
15865 * tree-vect-data-refs.c (vect_lanes_optab_supported_p): Use
15866 targetm.array_mode.
15867 * stor-layout.c (mode_for_array): Likewise. Support polynomial
15870 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15871 Alan Hayward <alan.hayward@arm.com>
15872 David Sherwood <david.sherwood@arm.com>
15874 * fold-const.c (fold_binary_loc): Check the argument types
15875 rather than the result type when testing for a vector operation.
15877 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15879 * doc/tm.texi.in (DWARF_LAZY_REGISTER_VALUE): Document.
15880 * doc/tm.texi: Regenerate.
15882 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
15883 Alan Hayward <alan.hayward@arm.com>
15884 David Sherwood <david.sherwood@arm.com>
15886 * doc/invoke.texi (-msve-vector-bits=): Document new option.
15887 (sve): Document new AArch64 extension.
15888 * doc/md.texi (w): Extend the description of the AArch64
15889 constraint to include SVE vectors.
15890 (Upl, Upa): Document new AArch64 predicate constraints.
15891 * config/aarch64/aarch64-opts.h (aarch64_sve_vector_bits_enum): New
15893 * config/aarch64/aarch64.opt (sve_vector_bits): New enum.
15894 (msve-vector-bits=): New option.
15895 * config/aarch64/aarch64-option-extensions.def (fp, simd): Disable
15896 SVE when these are disabled.
15897 (sve): New extension.
15898 * config/aarch64/aarch64-modes.def: Define SVE vector and predicate
15899 modes. Adjust their number of units based on aarch64_sve_vg.
15900 (MAX_BITSIZE_MODE_ANY_MODE): Define.
15901 * config/aarch64/aarch64-protos.h (ADDR_QUERY_ANY): New
15902 aarch64_addr_query_type.
15903 (aarch64_const_vec_all_same_in_range_p, aarch64_sve_pred_mode)
15904 (aarch64_sve_cnt_immediate_p, aarch64_sve_addvl_addpl_immediate_p)
15905 (aarch64_sve_inc_dec_immediate_p, aarch64_add_offset_temporaries)
15906 (aarch64_split_add_offset, aarch64_output_sve_cnt_immediate)
15907 (aarch64_output_sve_addvl_addpl, aarch64_output_sve_inc_dec_immediate)
15908 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): Declare.
15909 (aarch64_simd_imm_zero_p): Delete.
15910 (aarch64_check_zero_based_sve_index_immediate): Declare.
15911 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
15912 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
15913 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
15914 (aarch64_sve_float_mul_immediate_p): Likewise.
15915 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
15916 rather than an rtx.
15917 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): Declare.
15918 (aarch64_expand_mov_immediate): Take a gen_vec_duplicate callback.
15919 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move): Declare.
15920 (aarch64_expand_sve_vec_cmp_int, aarch64_expand_sve_vec_cmp_float)
15921 (aarch64_expand_sve_vcond, aarch64_expand_sve_vec_perm): Declare.
15922 (aarch64_regmode_natural_size): Likewise.
15923 * config/aarch64/aarch64.h (AARCH64_FL_SVE): New macro.
15924 (AARCH64_FL_V8_3, AARCH64_FL_RCPC, AARCH64_FL_DOTPROD): Shift
15926 (AARCH64_ISA_SVE, TARGET_SVE): New macros.
15927 (FIXED_REGISTERS, CALL_USED_REGISTERS, REGISTER_NAMES): Add entries
15928 for VG and the SVE predicate registers.
15929 (V_ALIASES): Add a "z"-prefixed alias.
15930 (FIRST_PSEUDO_REGISTER): Change to P15_REGNUM + 1.
15931 (AARCH64_DWARF_VG, AARCH64_DWARF_P0): New macros.
15932 (PR_REGNUM_P, PR_LO_REGNUM_P): Likewise.
15933 (PR_LO_REGS, PR_HI_REGS, PR_REGS): New reg_classes.
15934 (REG_CLASS_NAMES): Add entries for them.
15935 (REG_CLASS_CONTENTS): Likewise. Update ALL_REGS to include VG
15936 and the predicate registers.
15937 (aarch64_sve_vg): Declare.
15938 (BITS_PER_SVE_VECTOR, BYTES_PER_SVE_VECTOR, BYTES_PER_SVE_PRED)
15939 (SVE_BYTE_MODE, MAX_COMPILE_TIME_VEC_BYTES): New macros.
15940 (REGMODE_NATURAL_SIZE): Define.
15941 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins): Handle
15943 * config/aarch64/aarch64.c: Include cfgrtl.h.
15944 (simd_immediate_info): Add a constructor for series vectors,
15945 and an associated step field.
15946 (aarch64_sve_vg): New variable.
15947 (aarch64_dbx_register_number): Handle VG and the predicate registers.
15948 (aarch64_vect_struct_mode_p, aarch64_vector_mode_p): Delete.
15949 (VEC_ADVSIMD, VEC_SVE_DATA, VEC_SVE_PRED, VEC_STRUCT, VEC_ANY_SVE)
15950 (VEC_ANY_DATA, VEC_STRUCT): New constants.
15951 (aarch64_advsimd_struct_mode_p, aarch64_sve_pred_mode_p)
15952 (aarch64_classify_vector_mode, aarch64_vector_data_mode_p)
15953 (aarch64_sve_data_mode_p, aarch64_sve_pred_mode)
15954 (aarch64_get_mask_mode): New functions.
15955 (aarch64_hard_regno_nregs): Handle SVE data modes for FP_REGS
15956 and FP_LO_REGS. Handle PR_REGS, PR_LO_REGS and PR_HI_REGS.
15957 (aarch64_hard_regno_mode_ok): Handle VG. Also handle the SVE
15958 predicate modes and predicate registers. Explicitly restrict
15959 GPRs to modes of 16 bytes or smaller. Only allow FP registers
15960 to store a vector mode if it is recognized by
15961 aarch64_classify_vector_mode.
15962 (aarch64_regmode_natural_size): New function.
15963 (aarch64_hard_regno_caller_save_mode): Return the original mode
15965 (aarch64_sve_cnt_immediate_p, aarch64_output_sve_cnt_immediate)
15966 (aarch64_sve_addvl_addpl_immediate_p, aarch64_output_sve_addvl_addpl)
15967 (aarch64_sve_inc_dec_immediate_p, aarch64_output_sve_inc_dec_immediate)
15968 (aarch64_add_offset_1_temporaries, aarch64_offset_temporaries): New
15970 (aarch64_add_offset): Add a temp2 parameter. Assert that temp1
15971 does not overlap dest if the function is frame-related. Handle
15973 (aarch64_split_add_offset): New function.
15974 (aarch64_add_sp, aarch64_sub_sp): Add temp2 parameters and pass
15975 them aarch64_add_offset.
15976 (aarch64_allocate_and_probe_stack_space): Add a temp2 parameter
15977 and update call to aarch64_sub_sp.
15978 (aarch64_add_cfa_expression): New function.
15979 (aarch64_expand_prologue): Pass extra temporary registers to the
15980 functions above. Handle the case in which we need to emit new
15981 DW_CFA_expressions for registers that were originally saved
15982 relative to the stack pointer, but now have to be expressed
15983 relative to the frame pointer.
15984 (aarch64_output_mi_thunk): Pass extra temporary registers to the
15986 (aarch64_expand_epilogue): Likewise. Prevent inheritance of
15987 IP0 and IP1 values for SVE frames.
15988 (aarch64_expand_vec_series): New function.
15989 (aarch64_expand_sve_widened_duplicate): Likewise.
15990 (aarch64_expand_sve_const_vector): Likewise.
15991 (aarch64_expand_mov_immediate): Add a gen_vec_duplicate parameter.
15992 Handle SVE constants. Use emit_move_insn to move a force_const_mem
15993 into the register, rather than emitting a SET directly.
15994 (aarch64_emit_sve_pred_move, aarch64_expand_sve_mem_move)
15995 (aarch64_get_reg_raw_mode, offset_4bit_signed_scaled_p)
15996 (offset_6bit_unsigned_scaled_p, aarch64_offset_7bit_signed_scaled_p)
15997 (offset_9bit_signed_scaled_p): New functions.
15998 (aarch64_replicate_bitmask_imm): New function.
15999 (aarch64_bitmask_imm): Use it.
16000 (aarch64_cannot_force_const_mem): Reject expressions involving
16001 a CONST_POLY_INT. Update call to aarch64_classify_symbol.
16002 (aarch64_classify_index): Handle SVE indices, by requiring
16003 a plain register index with a scale that matches the element size.
16004 (aarch64_classify_address): Handle SVE addresses. Assert that
16005 the mode of the address is VOIDmode or an integer mode.
16006 Update call to aarch64_classify_symbol.
16007 (aarch64_classify_symbolic_expression): Update call to
16008 aarch64_classify_symbol.
16009 (aarch64_const_vec_all_in_range_p): New function.
16010 (aarch64_print_vector_float_operand): Likewise.
16011 (aarch64_print_operand): Handle 'N' and 'C'. Use "zN" rather than
16012 "vN" for FP registers with SVE modes. Handle (const ...) vectors
16013 and the FP immediates 1.0 and 0.5.
16014 (aarch64_print_address_internal): Handle SVE addresses.
16015 (aarch64_print_operand_address): Use ADDR_QUERY_ANY.
16016 (aarch64_regno_regclass): Handle predicate registers.
16017 (aarch64_secondary_reload): Handle big-endian reloads of SVE
16019 (aarch64_class_max_nregs): Handle SVE modes and predicate registers.
16020 (aarch64_rtx_costs): Check for ADDVL and ADDPL instructions.
16021 (aarch64_convert_sve_vector_bits): New function.
16022 (aarch64_override_options): Use it to handle -msve-vector-bits=.
16023 (aarch64_classify_symbol): Take the offset as a HOST_WIDE_INT
16024 rather than an rtx.
16025 (aarch64_legitimate_constant_p): Use aarch64_classify_vector_mode.
16026 Handle SVE vector and predicate modes. Accept VL-based constants
16027 that need only one temporary register, and VL offsets that require
16028 no temporary registers.
16029 (aarch64_conditional_register_usage): Mark the predicate registers
16030 as fixed if SVE isn't available.
16031 (aarch64_vector_mode_supported_p): Use aarch64_classify_vector_mode.
16032 Return true for SVE vector and predicate modes.
16033 (aarch64_simd_container_mode): Take the number of bits as a poly_int64
16034 rather than an unsigned int. Handle SVE modes.
16035 (aarch64_preferred_simd_mode): Update call accordingly. Handle
16037 (aarch64_autovectorize_vector_sizes): Add BYTES_PER_SVE_VECTOR
16039 (aarch64_sve_index_immediate_p, aarch64_sve_arith_immediate_p)
16040 (aarch64_sve_bitmask_immediate_p, aarch64_sve_dup_immediate_p)
16041 (aarch64_sve_cmp_immediate_p, aarch64_sve_float_arith_immediate_p)
16042 (aarch64_sve_float_mul_immediate_p): New functions.
16043 (aarch64_sve_valid_immediate): New function.
16044 (aarch64_simd_valid_immediate): Use it as the fallback for SVE vectors.
16045 Explicitly reject structure modes. Check for INDEX constants.
16046 Handle PTRUE and PFALSE constants.
16047 (aarch64_check_zero_based_sve_index_immediate): New function.
16048 (aarch64_simd_imm_zero_p): Delete.
16049 (aarch64_mov_operand_p): Use aarch64_simd_valid_immediate for
16050 vector modes. Accept constants in the range of CNT[BHWD].
16051 (aarch64_simd_scalar_immediate_valid_for_move): Explicitly
16052 ask for an Advanced SIMD mode.
16053 (aarch64_sve_ld1r_operand_p, aarch64_sve_ldr_operand_p): New functions.
16054 (aarch64_simd_vector_alignment): Handle SVE predicates.
16055 (aarch64_vectorize_preferred_vector_alignment): New function.
16056 (aarch64_simd_vector_alignment_reachable): Use it instead of
16058 (aarch64_shift_truncation_mask): Use aarch64_vector_data_mode_p.
16059 (aarch64_output_sve_mov_immediate, aarch64_output_ptrue): New
16061 (MAX_VECT_LEN): Delete.
16062 (expand_vec_perm_d): Add a vec_flags field.
16063 (emit_unspec2, aarch64_expand_sve_vec_perm): New functions.
16064 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_zip)
16065 (aarch64_evpc_ext): Don't apply a big-endian lane correction
16067 (aarch64_evpc_rev): Rename to...
16068 (aarch64_evpc_rev_local): ...this. Use a predicated operation for SVE.
16069 (aarch64_evpc_rev_global): New function.
16070 (aarch64_evpc_dup): Enforce a 64-byte range for SVE DUP.
16071 (aarch64_evpc_tbl): Use MAX_COMPILE_TIME_VEC_BYTES instead of
16073 (aarch64_evpc_sve_tbl): New function.
16074 (aarch64_expand_vec_perm_const_1): Update after rename of
16075 aarch64_evpc_rev. Handle SVE permutes too, trying
16076 aarch64_evpc_rev_global and using aarch64_evpc_sve_tbl rather
16077 than aarch64_evpc_tbl.
16078 (aarch64_vectorize_vec_perm_const): Initialize vec_flags.
16079 (aarch64_sve_cmp_operand_p, aarch64_unspec_cond_code)
16080 (aarch64_gen_unspec_cond, aarch64_expand_sve_vec_cmp_int)
16081 (aarch64_emit_unspec_cond, aarch64_emit_unspec_cond_or)
16082 (aarch64_emit_inverted_unspec_cond, aarch64_expand_sve_vec_cmp_float)
16083 (aarch64_expand_sve_vcond): New functions.
16084 (aarch64_modes_tieable_p): Use aarch64_vector_data_mode_p instead
16085 of aarch64_vector_mode_p.
16086 (aarch64_dwarf_poly_indeterminate_value): New function.
16087 (aarch64_compute_pressure_classes): Likewise.
16088 (aarch64_can_change_mode_class): Likewise.
16089 (TARGET_GET_RAW_RESULT_MODE, TARGET_GET_RAW_ARG_MODE): Redefine.
16090 (TARGET_VECTORIZE_PREFERRED_VECTOR_ALIGNMENT): Likewise.
16091 (TARGET_VECTORIZE_GET_MASK_MODE): Likewise.
16092 (TARGET_DWARF_POLY_INDETERMINATE_VALUE): Likewise.
16093 (TARGET_COMPUTE_PRESSURE_CLASSES): Likewise.
16094 (TARGET_CAN_CHANGE_MODE_CLASS): Likewise.
16095 * config/aarch64/constraints.md (Upa, Upl, Uav, Uat, Usv, Usi, Utr)
16096 (Uty, Dm, vsa, vsc, vsd, vsi, vsn, vsl, vsm, vsA, vsM, vsN): New
16098 (Dn, Dl, Dr): Accept const as well as const_vector.
16099 (Dz): Likewise. Compare against CONST0_RTX.
16100 * config/aarch64/iterators.md: Refer to "Advanced SIMD" instead
16101 of "vector" where appropriate.
16102 (SVE_ALL, SVE_BH, SVE_BHS, SVE_BHSI, SVE_HSDI, SVE_HSF, SVE_SD)
16103 (SVE_SDI, SVE_I, SVE_F, PRED_ALL, PRED_BHS): New mode iterators.
16104 (UNSPEC_SEL, UNSPEC_ANDF, UNSPEC_IORF, UNSPEC_XORF, UNSPEC_COND_LT)
16105 (UNSPEC_COND_LE, UNSPEC_COND_EQ, UNSPEC_COND_NE, UNSPEC_COND_GE)
16106 (UNSPEC_COND_GT, UNSPEC_COND_LO, UNSPEC_COND_LS, UNSPEC_COND_HS)
16107 (UNSPEC_COND_HI, UNSPEC_COND_UO): New unspecs.
16108 (Vetype, VEL, Vel, VWIDE, Vwide, vw, vwcore, V_INT_EQUIV)
16109 (v_int_equiv): Extend to SVE modes.
16110 (Vesize, V128, v128, Vewtype, V_FP_EQUIV, v_fp_equiv, VPRED): New
16112 (LOGICAL_OR, SVE_INT_UNARY, SVE_FP_UNARY): New code iterators.
16113 (optab): Handle popcount, smin, smax, umin, umax, abs and sqrt.
16114 (logical_nn, lr, sve_int_op, sve_fp_op): New code attributs.
16115 (LOGICALF, OPTAB_PERMUTE, UNPACK, UNPACK_UNSIGNED, SVE_COND_INT_CMP)
16116 (SVE_COND_FP_CMP): New int iterators.
16117 (perm_hilo): Handle the new unpack unspecs.
16118 (optab, logicalf_op, su, perm_optab, cmp_op, imm_con): New int
16120 * config/aarch64/predicates.md (aarch64_sve_cnt_immediate)
16121 (aarch64_sve_addvl_addpl_immediate, aarch64_split_add_offset_immediate)
16122 (aarch64_pluslong_or_poly_operand, aarch64_nonmemory_operand)
16123 (aarch64_equality_operator, aarch64_constant_vector_operand)
16124 (aarch64_sve_ld1r_operand, aarch64_sve_ldr_operand): New predicates.
16125 (aarch64_sve_nonimmediate_operand): Likewise.
16126 (aarch64_sve_general_operand): Likewise.
16127 (aarch64_sve_dup_operand, aarch64_sve_arith_immediate): Likewise.
16128 (aarch64_sve_sub_arith_immediate, aarch64_sve_inc_dec_immediate)
16129 (aarch64_sve_logical_immediate, aarch64_sve_mul_immediate): Likewise.
16130 (aarch64_sve_dup_immediate, aarch64_sve_cmp_vsc_immediate): Likewise.
16131 (aarch64_sve_cmp_vsd_immediate, aarch64_sve_index_immediate): Likewise.
16132 (aarch64_sve_float_arith_immediate): Likewise.
16133 (aarch64_sve_float_arith_with_sub_immediate): Likewise.
16134 (aarch64_sve_float_mul_immediate, aarch64_sve_arith_operand): Likewise.
16135 (aarch64_sve_add_operand, aarch64_sve_logical_operand): Likewise.
16136 (aarch64_sve_lshift_operand, aarch64_sve_rshift_operand): Likewise.
16137 (aarch64_sve_mul_operand, aarch64_sve_cmp_vsc_operand): Likewise.
16138 (aarch64_sve_cmp_vsd_operand, aarch64_sve_index_operand): Likewise.
16139 (aarch64_sve_float_arith_operand): Likewise.
16140 (aarch64_sve_float_arith_with_sub_operand): Likewise.
16141 (aarch64_sve_float_mul_operand): Likewise.
16142 (aarch64_sve_vec_perm_operand): Likewise.
16143 (aarch64_pluslong_operand): Include aarch64_sve_addvl_addpl_immediate.
16144 (aarch64_mov_operand): Accept const_poly_int and const_vector.
16145 (aarch64_simd_lshift_imm, aarch64_simd_rshift_imm): Accept const
16146 as well as const_vector.
16147 (aarch64_simd_imm_zero, aarch64_simd_imm_minus_one): Move earlier
16148 in file. Use CONST0_RTX and CONSTM1_RTX.
16149 (aarch64_simd_or_scalar_imm_zero): Likewise. Add match_codes.
16150 (aarch64_simd_reg_or_zero): Accept const as well as const_vector.
16151 Use aarch64_simd_imm_zero.
16152 * config/aarch64/aarch64-sve.md: New file.
16153 * config/aarch64/aarch64.md: Include it.
16154 (VG_REGNUM, P0_REGNUM, P7_REGNUM, P15_REGNUM): New register numbers.
16155 (UNSPEC_REV, UNSPEC_LD1_SVE, UNSPEC_ST1_SVE, UNSPEC_MERGE_PTRUE)
16156 (UNSPEC_PTEST_PTRUE, UNSPEC_UNPACKSHI, UNSPEC_UNPACKUHI)
16157 (UNSPEC_UNPACKSLO, UNSPEC_UNPACKULO, UNSPEC_PACK)
16158 (UNSPEC_FLOAT_CONVERT, UNSPEC_WHILE_LO): New unspec constants.
16159 (sve): New attribute.
16160 (enabled): Disable instructions with the sve attribute unless
16162 (movqi, movhi): Pass CONST_POLY_INT operaneds through
16163 aarch64_expand_mov_immediate.
16164 (*mov<mode>_aarch64, *movsi_aarch64, *movdi_aarch64): Handle
16165 CNT[BHSD] immediates.
16166 (movti): Split CONST_POLY_INT moves into two halves.
16167 (add<mode>3): Accept aarch64_pluslong_or_poly_operand.
16168 Split additions that need a temporary here if the destination
16169 is the stack pointer.
16170 (*add<mode>3_aarch64): Handle ADDVL and ADDPL immediates.
16171 (*add<mode>3_poly_1): New instruction.
16172 (set_clobber_cc): New expander.
16174 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16176 * simplify-rtx.c (simplify_immed_subreg): Add an inner_bytes
16177 parameter and use it instead of GET_MODE_SIZE (innermode). Use
16178 inner_bytes * BITS_PER_UNIT instead of GET_MODE_BITSIZE (innermode).
16179 Use CEIL (inner_bytes, GET_MODE_UNIT_SIZE (innermode)) instead of
16180 GET_MODE_NUNITS (innermode). Also add a first_elem parameter.
16181 Change innermode from fixed_mode_size to machine_mode.
16182 (simplify_subreg): Update call accordingly. Handle a constant-sized
16183 subreg of a variable-length CONST_VECTOR.
16185 2018-01-13 Richard Sandiford <richard.sandiford@linaro.org>
16186 Alan Hayward <alan.hayward@arm.com>
16187 David Sherwood <david.sherwood@arm.com>
16189 * tree-ssa-address.c (mem_ref_valid_without_offset_p): New function.
16190 (add_offset_to_base): New function, split out from...
16191 (create_mem_ref): ...here. When handling a scale other than 1,
16192 check first whether the address is valid without the offset.
16193 Add it into the base if so, leaving the index and scale as-is.
16195 2018-01-12 Jakub Jelinek <jakub@redhat.com>
16198 * config/rs6000/rs6000-c.c (altivec_resolve_overloaded_builtin): Call
16199 fold_for_warn before checking if arg2 is INTEGER_CST.
16201 2018-01-12 Segher Boessenkool <segher@kernel.crashing.org>
16203 * config/rs6000/predicates.md (load_multiple_operation): Delete.
16204 (store_multiple_operation): Delete.
16205 * config/rs6000/rs6000-cpus.def (601): Remove MASK_STRING.
16206 * config/rs6000/rs6000-protos.h (rs6000_output_load_multiple): Delete.
16207 * config/rs6000/rs6000-string.c (expand_block_move): Delete everything
16208 guarded by TARGET_STRING.
16209 (rs6000_output_load_multiple): Delete.
16210 * config/rs6000/rs6000.c (rs6000_option_override_internal): Delete
16211 OPTION_MASK_STRING / TARGET_STRING handling.
16212 (print_operand) <'N', 'O'>: Add comment that these are unused now.
16213 (const rs6000_opt_masks) <"string">: Change mask to 0.
16214 * config/rs6000/rs6000.h (TARGET_DEFAULT): Remove MASK_STRING.
16215 (MASK_STRING): Delete.
16216 * config/rs6000/rs6000.md (*mov<mode>_string): Delete TARGET_STRING
16218 (load_multiple): Delete.
16225 (store_multiple): Delete.
16232 (movmemsi_8reg): Delete.
16233 (corresponding unnamed define_insn): Delete.
16234 (movmemsi_6reg): Delete.
16235 (corresponding unnamed define_insn): Delete.
16236 (movmemsi_4reg): Delete.
16237 (corresponding unnamed define_insn): Delete.
16238 (movmemsi_2reg): Delete.
16239 (corresponding unnamed define_insn): Delete.
16240 (movmemsi_1reg): Delete.
16241 (corresponding unnamed define_insn): Delete.
16242 * config/rs6000/rs6000.opt (mno-string): New.
16243 (mstring): Replace by deprecation warning stub.
16244 * doc/invoke.texi (RS/6000 and PowerPC Options): Delete -mstring.
16246 2018-01-12 Jakub Jelinek <jakub@redhat.com>
16248 * regrename.c (regrename_do_replace): If replacing the same
16249 reg multiple times, try to reuse last created gen_raw_REG.
16252 * bb-reorder.c (pass_partition_blocks::gate): In lto don't partition
16253 main to workaround a bug in GDB.
16255 2018-01-12 Tom de Vries <tom@codesourcery.com>
16258 * config.gcc (nvptx*-*-*): Set use_gcc_stdint=wrap.
16260 2018-01-12 Vladimir Makarov <vmakarov@redhat.com>
16262 PR rtl-optimization/80481
16263 * ira-color.c (get_cap_member): New function.
16264 (allocnos_conflict_by_live_ranges_p): Use it.
16265 (slot_coalesced_allocno_live_ranges_intersect_p): Add assert.
16266 (setup_slot_coalesced_allocno_live_ranges): Ditto.
16268 2018-01-12 Uros Bizjak <ubizjak@gmail.com>
16271 * config/alpha/alpha.md (*saddsi_1): New insn_ans_split pattern.
16272 (*saddl_se_1): Ditto.
16273 (*ssubsi_1): Ditto.
16274 (*ssubl_se_1): Ditto.
16276 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
16278 * tree-predcom.c (aff_combination_dr_offset): Use wi::to_poly_widest
16279 rather than wi::to_widest for DR_INITs.
16280 * tree-vect-data-refs.c (vect_find_same_alignment_drs): Use
16281 wi::to_poly_offset rather than wi::to_offset for DR_INIT.
16282 (vect_analyze_data_ref_accesses): Require both DR_INITs to be
16284 (vect_analyze_group_access_1): Note that here.
16286 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
16288 * tree-vectorizer.c (get_vec_alignment_for_array_type): Handle
16289 polynomial type sizes.
16291 2018-01-12 Richard Sandiford <richard.sandiford@linaro.org>
16293 * gimplify.c (gimple_add_tmp_var_fn): Allow variables to have a
16294 poly_uint64 size, rather than requiring an unsigned HOST_WIDE_INT size.
16295 (gimple_add_tmp_var): Likewise.
16297 2018-01-12 Martin Liska <mliska@suse.cz>
16299 * gimple.c (gimple_alloc_counts): Use uint64_t instead of int.
16300 (gimple_alloc_sizes): Likewise.
16301 (dump_gimple_statistics): Use PRIu64 in printf format.
16302 * gimple.h: Change uint64_t to int.
16304 2018-01-12 Martin Liska <mliska@suse.cz>
16306 * tree-core.h: Use uint64_t instead of int.
16307 * tree.c (tree_node_counts): Likewise.
16308 (tree_node_sizes): Likewise.
16309 (dump_tree_statistics): Use PRIu64 in printf format.
16311 2018-01-12 Martin Liska <mliska@suse.cz>
16313 * Makefile.in: As qsort_chk is implemented in vec.c, add
16314 vec.o to linkage of gencfn-macros.
16315 * tree.c (build_new_poly_int_cst): Add CXX_MEM_STAT_INFO as it's
16316 passing the info to record_node_allocation_statistics.
16317 (test_vector_cst_patterns): Add CXX_MEM_STAT_INFO to declaration
16319 * ggc-common.c (struct ggc_usage): Add operator== and use
16320 it in operator< and compare function.
16321 * mem-stats.h (struct mem_usage): Likewise.
16322 * vec.c (struct vec_usage): Remove operator< and compare
16323 function. Can be simply inherited.
16325 2018-01-12 Martin Jambor <mjambor@suse.cz>
16328 * params.def: New parameter PARAM_AVOID_FMA_MAX_BITS.
16329 * tree-ssa-math-opts.c: Include domwalk.h.
16330 (convert_mult_to_fma_1): New function.
16331 (fma_transformation_info): New type.
16332 (fma_deferring_state): Likewise.
16333 (cancel_fma_deferring): New function.
16334 (result_of_phi): Likewise.
16335 (last_fma_candidate_feeds_initial_phi): Likewise.
16336 (convert_mult_to_fma): Added deferring logic, split actual
16337 transformation to convert_mult_to_fma_1.
16338 (math_opts_dom_walker): New type.
16339 (math_opts_dom_walker::after_dom_children): New method, body moved
16340 here from pass_optimize_widening_mul::execute, added deferring logic
16342 (pass_optimize_widening_mul::execute): Moved most of code to
16343 math_opts_dom_walker::after_dom_children.
16344 * config/i386/x86-tune.def (X86_TUNE_AVOID_128FMA_CHAINS): New.
16345 * config/i386/i386.c (ix86_option_override_internal): Added
16346 maybe_setting of PARAM_AVOID_FMA_MAX_BITS.
16348 2018-01-12 Richard Biener <rguenther@suse.de>
16351 * dwarf2out.c (gen_variable_die): Do not reset old_die for
16352 inline instance vars.
16354 2018-01-12 Oleg Endo <olegendo@gcc.gnu.org>
16357 * config/rx/rx.c (rx_is_restricted_memory_address):
16358 Handle SUBREG case.
16360 2018-01-12 Richard Biener <rguenther@suse.de>
16362 PR tree-optimization/80846
16363 * target.def (split_reduction): New target hook.
16364 * targhooks.c (default_split_reduction): New function.
16365 * targhooks.h (default_split_reduction): Declare.
16366 * tree-vect-loop.c (vect_create_epilog_for_reduction): If the
16367 target requests first reduce vectors by combining low and high
16369 * tree-vect-stmts.c (vect_gen_perm_mask_any): Adjust.
16370 (get_vectype_for_scalar_type_and_size): Export.
16371 * tree-vectorizer.h (get_vectype_for_scalar_type_and_size): Declare.
16372 * doc/tm.texi.in (TARGET_VECTORIZE_SPLIT_REDUCTION): Document.
16373 * doc/tm.texi: Regenerate.
16374 * config/i386/i386.c (ix86_split_reduction): Implement
16375 TARGET_VECTORIZE_SPLIT_REDUCTION.
16377 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16380 * config/sparc/sparc.h (PIC_OFFSET_TABLE_REGNUM): Set to INVALID_REGNUM
16381 in PIC mode except for TARGET_VXWORKS_RTP.
16382 * config/sparc/sparc.c: Include cfgrtl.h.
16383 (TARGET_INIT_PIC_REG): Define.
16384 (TARGET_USE_PSEUDO_PIC_REG): Likewise.
16385 (sparc_pic_register_p): New predicate.
16386 (sparc_legitimate_address_p): Use it.
16387 (sparc_legitimize_pic_address): Likewise.
16388 (sparc_delegitimize_address): Likewise.
16389 (sparc_mode_dependent_address_p): Likewise.
16390 (gen_load_pcrel_sym): Remove 4th parameter.
16391 (load_got_register): Adjust call to above. Remove obsolete stuff.
16392 (sparc_expand_prologue): Do not call load_got_register here.
16393 (sparc_flat_expand_prologue): Likewise.
16394 (sparc_output_mi_thunk): Set the pic_offset_table_rtx object.
16395 (sparc_use_pseudo_pic_reg): New function.
16396 (sparc_init_pic_reg): Likewise.
16397 * config/sparc/sparc.md (vxworks_load_got): Set the GOT register.
16398 (builtin_setjmp_receiver): Enable only for TARGET_VXWORKS_RTP.
16400 2018-01-12 Christophe Lyon <christophe.lyon@linaro.org>
16402 * doc/sourcebuild.texi (Effective-Target Keywords, Other attributes):
16403 Add item for branch_cost.
16405 2018-01-12 Eric Botcazou <ebotcazou@adacore.com>
16407 PR rtl-optimization/83565
16408 * rtlanal.c (nonzero_bits1): On WORD_REGISTER_OPERATIONS machines, do
16409 not extend the result to a larger mode for rotate operations.
16410 (num_sign_bit_copies1): Likewise.
16412 2018-01-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
16415 * config/sol2.h (STARTFILE_ARCH_SPEC): Don't use with -shared or
16417 Use values-Xc.o for -pedantic.
16418 Link with values-xpg4.o for C90, values-xpg6.o otherwise.
16420 2018-01-12 Martin Liska <mliska@suse.cz>
16423 * ipa-devirt.c (final_warning_record::grow_type_warnings):
16425 (possible_polymorphic_call_targets): Use it.
16426 (ipa_devirt): Likewise.
16428 2018-01-12 Martin Liska <mliska@suse.cz>
16430 * profile-count.h (enum profile_quality): Use 0 as invalid
16431 enum value of profile_quality.
16433 2018-01-12 Chung-Ju Wu <jasonwucj@gmail.com>
16435 * doc/invoke.texi (NDS32 Options): Add -mext-perf, -mext-perf2 and
16436 -mext-string options.
16438 2018-01-12 Richard Biener <rguenther@suse.de>
16440 * lto-streamer-out.c (DFS::DFS_write_tree_body): Process
16441 DECL_DEBUG_EXPR conditional on DECL_HAS_DEBUG_EXPR_P.
16442 * tree-streamer-in.c (lto_input_ts_decl_common_tree_pointers):
16444 * tree-streamer-out.c (write_ts_decl_common_tree_pointers): Likewise.
16446 2018-01-11 Michael Meissner <meissner@linux.vnet.ibm.com>
16448 * configure.ac (--with-long-double-format): Add support for the
16449 configuration option to change the default long double format on
16451 * config.gcc (powerpc*-linux*-*): Likewise.
16452 * configure: Regenerate.
16453 * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): If long
16454 double is IEEE, define __KC__ and __KF__ to allow floatn.h to be
16455 used without modification.
16457 2018-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
16459 * config/rs6000/rs6000-builtin.def (BU_P7_MISC_X): New #define.
16460 (SPEC_BARRIER): New instantiation of BU_P7_MISC_X.
16461 * config/rs6000/rs6000.c (rs6000_expand_builtin): Handle
16462 MISC_BUILTIN_SPEC_BARRIER.
16463 (rs6000_init_builtins): Likewise.
16464 * config/rs6000/rs6000.md (UNSPECV_SPEC_BARRIER): New UNSPECV
16466 (speculation_barrier): New define_insn.
16467 * doc/extend.texi: Document __builtin_speculation_barrier.
16469 2018-01-11 Jakub Jelinek <jakub@redhat.com>
16472 * config/i386/i386.c (ix86_expand_vector_init_one_nonzero): If one_var
16473 is 0, for V{8,16}S[IF] and V[48]D[IF]mode use gen_vec_set<mode>_0.
16474 * config/i386/sse.md (VI8_AVX_AVX512F, VI4F_256_512): New mode
16476 (ssescalarmodesuffix): Add 512-bit vectors. Use "d" or "q" for
16477 integral modes instead of "ss" and "sd".
16478 (vec_set<mode>_0): New define_insns for 256-bit and 512-bit
16479 vectors with 32-bit and 64-bit elements.
16480 (vecdupssescalarmodesuffix): New mode attribute.
16481 (vec_dup<mode>): Use it.
16483 2018-01-11 H.J. Lu <hongjiu.lu@intel.com>
16486 * config/i386/i386.c (ix86_compute_frame_layout): Align stack
16487 frame if argument is passed on stack.
16489 2018-01-11 Jakub Jelinek <jakub@redhat.com>
16492 * ree.c (combine_reaching_defs): Optimize also
16493 reg2=exp; reg1=reg2; reg2=any_extend(reg1); into
16494 reg2=any_extend(exp); reg1=reg2;, formatting fix.
16496 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
16498 PR middle-end/83189
16499 * gimple-ssa-isolate-paths.c (isolate_path): Fix profile update.
16501 2018-01-11 Jan Hubicka <hubicka@ucw.cz>
16503 PR middle-end/83718
16504 * tree-inline.c (copy_cfg_body): Adjust num&den for scaling
16505 after they are computed.
16507 2018-01-11 Bin Cheng <bin.cheng@arm.com>
16509 PR tree-optimization/83695
16510 * gimple-loop-linterchange.cc
16511 (tree_loop_interchange::interchange_loops): Call scev_reset_htab to
16512 reset cached scev information after interchange.
16513 (pass_linterchange::execute): Remove call to scev_reset_htab.
16515 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16517 * config/arm/arm_neon.h (vfmlal_lane_low_u32, vfmlal_lane_high_u32,
16518 vfmlalq_laneq_low_u32, vfmlalq_lane_low_u32, vfmlal_laneq_low_u32,
16519 vfmlalq_laneq_high_u32, vfmlalq_lane_high_u32, vfmlal_laneq_high_u32,
16520 vfmlsl_lane_low_u32, vfmlsl_lane_high_u32, vfmlslq_laneq_low_u32,
16521 vfmlslq_lane_low_u32, vfmlsl_laneq_low_u32, vfmlslq_laneq_high_u32,
16522 vfmlslq_lane_high_u32, vfmlsl_laneq_high_u32): Define.
16523 * config/arm/arm_neon_builtins.def (vfmal_lane_low,
16524 vfmal_lane_lowv4hf, vfmal_lane_lowv8hf, vfmal_lane_high,
16525 vfmal_lane_highv4hf, vfmal_lane_highv8hf, vfmsl_lane_low,
16526 vfmsl_lane_lowv4hf, vfmsl_lane_lowv8hf, vfmsl_lane_high,
16527 vfmsl_lane_highv4hf, vfmsl_lane_highv8hf): New sets of builtins.
16528 * config/arm/iterators.md (VFMLSEL2, vfmlsel2): New mode attributes.
16529 (V_lane_reg): Likewise.
16530 * config/arm/neon.md (neon_vfm<vfml_op>l_lane_<vfml_half><VCVTF:mode>):
16532 (neon_vfm<vfml_op>l_lane_<vfml_half><vfmlsel2><mode>): Likewise.
16533 (vfmal_lane_low<mode>_intrinsic,
16534 vfmal_lane_low<vfmlsel2><mode>_intrinsic,
16535 vfmal_lane_high<vfmlsel2><mode>_intrinsic,
16536 vfmal_lane_high<mode>_intrinsic, vfmsl_lane_low<mode>_intrinsic,
16537 vfmsl_lane_low<vfmlsel2><mode>_intrinsic,
16538 vfmsl_lane_high<vfmlsel2><mode>_intrinsic,
16539 vfmsl_lane_high<mode>_intrinsic): New define_insns.
16541 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16543 * config/arm/arm-cpus.in (fp16fml): New feature.
16544 (ALL_SIMD): Add fp16fml.
16545 (armv8.2-a): Add fp16fml as an option.
16546 (armv8.3-a): Likewise.
16547 (armv8.4-a): Add fp16fml as part of fp16.
16548 * config/arm/arm.h (TARGET_FP16FML): Define.
16549 * config/arm/arm-c.c (arm_cpu_builtins): Define __ARM_FEATURE_FP16_FML
16551 * config/arm/arm-modes.def (V2HF): Define.
16552 * config/arm/arm_neon.h (vfmlal_low_u32, vfmlsl_low_u32,
16553 vfmlal_high_u32, vfmlsl_high_u32, vfmlalq_low_u32,
16554 vfmlslq_low_u32, vfmlalq_high_u32, vfmlslq_high_u32): Define.
16555 * config/arm/arm_neon_builtins.def (vfmal_low, vfmal_high,
16556 vfmsl_low, vfmsl_high): New set of builtins.
16557 * config/arm/iterators.md (PLUSMINUS): New code iterator.
16558 (vfml_op): New code attribute.
16559 (VFMLHALVES): New int iterator.
16560 (VFML, VFMLSEL): New mode attributes.
16561 (V_reg): Define mapping for V2HF.
16562 (V_hi, V_lo): New mode attributes.
16563 (VF_constraint): Likewise.
16564 (vfml_half, vfml_half_selector): New int attributes.
16565 * config/arm/neon.md (neon_vfm<vfml_op>l_<vfml_half><mode>): New
16567 (vfmal_low<mode>_intrinsic, vfmsl_high<mode>_intrinsic,
16568 vfmal_high<mode>_intrinsic, vfmsl_low<mode>_intrinsic):
16570 * config/arm/t-arm-elf (v8_fps): Add fp16fml.
16571 * config/arm/t-multilib (v8_2_a_simd_variants): Add fp16fml.
16572 * config/arm/unspecs.md (UNSPEC_VFML_LO, UNSPEC_VFML_HI): New unspecs.
16573 * doc/invoke.texi (ARM Options): Document fp16fml. Update armv8.4-a
16575 * doc/sourcebuild.texi (arm_fp16fml_neon_ok, arm_fp16fml_neon):
16576 Document new effective target and option set.
16578 2018-01-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
16580 * config/arm/arm-cpus.in (armv8_4): New feature.
16581 (ARMv8_4a): New fgroup.
16582 (armv8.4-a): New arch.
16583 * config/arm/arm-tables.opt: Regenerate.
16584 * config/arm/t-aprofile: Add matching rules for -march=armv8.4-a.
16585 * config/arm/t-arm-elf (all_v8_archs): Add armv8.4-a.
16586 * config/arm/t-multilib (v8_4_a_simd_variants): New variable.
16587 Add matching rules for -march=armv8.4-a and extensions.
16588 * doc/invoke.texi (ARM Options): Document -march=armv8.4-a.
16590 2018-01-11 Oleg Endo <olegendo@gcc.gnu.org>
16593 * config/rx/rx.md (BW): New mode attribute.
16594 (sync_lock_test_and_setsi): Add mode suffix to insn output.
16596 2018-01-11 Richard Biener <rguenther@suse.de>
16598 PR tree-optimization/83435
16599 * graphite.c (canonicalize_loop_form): Ignore fake loop exit edges.
16600 * graphite-scop-detection.c (scop_detection::get_sese): Likewise.
16601 * tree-vrp.c (add_assert_info): Drop TREE_OVERFLOW if they appear.
16603 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
16604 Alan Hayward <alan.hayward@arm.com>
16605 David Sherwood <david.sherwood@arm.com>
16607 * config/aarch64/aarch64.c (aarch64_address_info): Add a const_offset
16609 (aarch64_classify_address): Initialize it. Track polynomial offsets.
16610 (aarch64_print_address_internal): Use it to check for a zero offset.
16612 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
16613 Alan Hayward <alan.hayward@arm.com>
16614 David Sherwood <david.sherwood@arm.com>
16616 * config/aarch64/aarch64-modes.def (NUM_POLY_INT_COEFFS): Set to 2.
16617 * config/aarch64/aarch64-protos.h (aarch64_initial_elimination_offset):
16618 Return a poly_int64 rather than a HOST_WIDE_INT.
16619 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a poly_int64
16620 rather than a HOST_WIDE_INT.
16621 * config/aarch64/aarch64.h (aarch64_frame): Protect with
16622 HAVE_POLY_INT_H rather than HOST_WIDE_INT. Change locals_offset,
16623 hard_fp_offset, frame_size, initial_adjust, callee_offset and
16624 final_offset from HOST_WIDE_INT to poly_int64.
16625 * config/aarch64/aarch64-builtins.c (aarch64_simd_expand_args): Use
16626 to_constant when getting the number of units in an Advanced SIMD
16628 (aarch64_builtin_vectorized_function): Check for a constant number
16630 * config/aarch64/aarch64-simd.md (mov<mode>): Handle polynomial
16632 (aarch64_ld<VSTRUCT:nregs>_lane<VALLDIF:mode>): Use the nunits
16633 attribute instead of GET_MODE_NUNITS.
16634 * config/aarch64/aarch64.c (aarch64_hard_regno_nregs)
16635 (aarch64_class_max_nregs): Use the constant_lowest_bound of the
16636 GET_MODE_SIZE for fixed-size registers.
16637 (aarch64_const_vec_all_same_in_range_p): Use const_vec_duplicate_p.
16638 (aarch64_hard_regno_call_part_clobbered, aarch64_classify_index)
16639 (aarch64_mode_valid_for_sched_fusion_p, aarch64_classify_address)
16640 (aarch64_legitimize_address_displacement, aarch64_secondary_reload)
16641 (aarch64_print_operand, aarch64_print_address_internal)
16642 (aarch64_address_cost, aarch64_rtx_costs, aarch64_register_move_cost)
16643 (aarch64_short_vector_p, aapcs_vfp_sub_candidate)
16644 (aarch64_simd_attr_length_rglist, aarch64_operands_ok_for_ldpstp):
16645 Handle polynomial GET_MODE_SIZE.
16646 (aarch64_hard_regno_caller_save_mode): Likewise. Return modes
16647 wider than SImode without modification.
16648 (tls_symbolic_operand_type): Use strip_offset instead of split_const.
16649 (aarch64_pass_by_reference, aarch64_layout_arg, aarch64_pad_reg_upward)
16650 (aarch64_gimplify_va_arg_expr): Assert that we don't yet handle
16651 passing and returning SVE modes.
16652 (aarch64_function_value, aarch64_layout_arg): Use gen_int_mode
16653 rather than GEN_INT.
16654 (aarch64_emit_probe_stack_range): Take the size as a poly_int64
16655 rather than a HOST_WIDE_INT, but call sorry if it isn't constant.
16656 (aarch64_allocate_and_probe_stack_space): Likewise.
16657 (aarch64_layout_frame): Cope with polynomial offsets.
16658 (aarch64_save_callee_saves, aarch64_restore_callee_saves): Take the
16659 start_offset as a poly_int64 rather than a HOST_WIDE_INT. Track
16660 polynomial offsets.
16661 (offset_9bit_signed_unscaled_p, offset_12bit_unsigned_scaled_p)
16662 (aarch64_offset_7bit_signed_scaled_p): Take the offset as a
16663 poly_int64 rather than a HOST_WIDE_INT.
16664 (aarch64_get_separate_components, aarch64_process_components)
16665 (aarch64_expand_prologue, aarch64_expand_epilogue)
16666 (aarch64_use_return_insn_p): Handle polynomial frame offsets.
16667 (aarch64_anchor_offset): New function, split out from...
16668 (aarch64_legitimize_address): ...here.
16669 (aarch64_builtin_vectorization_cost): Handle polynomial
16670 TYPE_VECTOR_SUBPARTS.
16671 (aarch64_simd_check_vect_par_cnst_half): Handle polynomial
16673 (aarch64_simd_make_constant, aarch64_expand_vector_init): Get the
16674 number of elements from the PARALLEL rather than the mode.
16675 (aarch64_shift_truncation_mask): Use GET_MODE_UNIT_BITSIZE
16676 rather than GET_MODE_BITSIZE.
16677 (aarch64_evpc_trn, aarch64_evpc_uzp, aarch64_evpc_ext)
16678 (aarch64_evpc_rev, aarch64_evpc_dup, aarch64_evpc_zip)
16679 (aarch64_expand_vec_perm_const_1): Handle polynomial
16680 d->perm.length () and d->perm elements.
16681 (aarch64_evpc_tbl): Likewise. Use nelt rather than GET_MODE_NUNITS.
16682 Apply to_constant to d->perm elements.
16683 (aarch64_simd_valid_immediate, aarch64_vec_fpconst_pow_of_2): Handle
16684 polynomial CONST_VECTOR_NUNITS.
16685 (aarch64_move_pointer): Take amount as a poly_int64 rather
16687 (aarch64_progress_pointer): Avoid temporary variable.
16688 * config/aarch64/aarch64.md (aarch64_<crc_variant>): Use
16689 the mode attribute instead of GET_MODE.
16691 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
16692 Alan Hayward <alan.hayward@arm.com>
16693 David Sherwood <david.sherwood@arm.com>
16695 * config/aarch64/aarch64.c (aarch64_force_temporary): Assert that
16696 x exists before using it.
16697 (aarch64_add_constant_internal): Rename to...
16698 (aarch64_add_offset_1): ...this. Replace regnum with separate
16699 src and dest rtxes. Handle the case in which they're different,
16700 including when the offset is zero. Replace scratchreg with an rtx.
16701 Use 2 additions if there is no spare register into which we can
16702 move a 16-bit constant.
16703 (aarch64_add_constant): Delete.
16704 (aarch64_add_offset): Replace reg with separate src and dest
16705 rtxes. Take a poly_int64 offset instead of a HOST_WIDE_INT.
16706 Use aarch64_add_offset_1.
16707 (aarch64_add_sp, aarch64_sub_sp): Take the scratch register as
16708 an rtx rather than an int. Take the delta as a poly_int64
16709 rather than a HOST_WIDE_INT. Use aarch64_add_offset.
16710 (aarch64_expand_mov_immediate): Update uses of aarch64_add_offset.
16711 (aarch64_expand_prologue): Update calls to aarch64_sub_sp,
16712 aarch64_allocate_and_probe_stack_space and aarch64_add_offset.
16713 (aarch64_expand_epilogue): Update calls to aarch64_add_offset
16714 and aarch64_add_sp.
16715 (aarch64_output_mi_thunk): Use aarch64_add_offset rather than
16716 aarch64_add_constant.
16718 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
16720 * config/aarch64/aarch64.c (aarch64_reinterpret_float_as_int):
16721 Use scalar_float_mode.
16723 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
16725 * config/aarch64/aarch64-simd.md
16726 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): Avoid GET_MODE_NUNITS.
16727 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Likewise.
16728 (aarch64_fml<f16mac1>l_lane_lowv2sf): Likewise.
16729 (aarch64_fml<f16mac1>l_lane_highv2sf): Likewise.
16730 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Likewise.
16731 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Likewise.
16732 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Likewise.
16733 (aarch64_fml<f16mac1>l_laneq_highv2sf): Likewise.
16734 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Likewise.
16735 (aarch64_fml<f16mac1>lq_lane_highv4sf): Likewise.
16737 2018-01-11 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
16740 * config/arm/arm.c (arm_declare_function_name): Set arch_to_print if
16741 targ_options->x_arm_arch_string is non NULL.
16743 2018-01-11 Tamar Christina <tamar.christina@arm.com>
16745 * config/aarch64/aarch64.h
16746 (AARCH64_FL_FOR_ARCH8_4): Add AARCH64_FL_DOTPROD.
16748 2018-01-11 Sudakshina Das <sudi.das@arm.com>
16751 * expmed.c (emit_store_flag_force): Swap if const op0
16752 and change VOIDmode to mode of op0.
16754 2018-01-11 Richard Sandiford <richard.sandiford@linaro.org>
16756 PR rtl-optimization/83761
16757 * caller-save.c (replace_reg_with_saved_mem): Pass bits rather
16758 than bytes to mode_for_size.
16760 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
16762 PR middle-end/83189
16763 * gfortran.fortran-torture/compile/pr83189.f90: New testcase.
16764 * tree-ssa-loop-manip.c (tree_transform_and_unroll_loop): Handle zero
16767 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
16769 PR middle-end/83575
16770 * cfgrtl.c (rtl_verify_edges): Only verify fixability of partition
16771 when in layout mode.
16772 (cfg_layout_finalize): Do not verify cfg before we are out of layout.
16773 * cfgcleanup.c (try_optimize_cfg): Only verify flow info when doing
16776 2018-01-10 Michael Collison <michael.collison@arm.com>
16778 * config/aarch64/aarch64-modes.def (V2HF): New VECTOR_MODE.
16779 * config/aarch64/aarch64-option-extension.def: Add
16780 AARCH64_OPT_EXTENSION of 'fp16fml'.
16781 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16782 (__ARM_FEATURE_FP16_FML): Define if TARGET_F16FML is true.
16783 * config/aarch64/predicates.md (aarch64_lane_imm3): New predicate.
16784 * config/aarch64/constraints.md (Ui7): New constraint.
16785 * config/aarch64/iterators.md (VFMLA_W): New mode iterator.
16786 (VFMLA_SEL_W): Ditto.
16789 (VFMLA16_LOW): New int iterator.
16790 (VFMLA16_HIGH): Ditto.
16791 (UNSPEC_FMLAL): New unspec.
16792 (UNSPEC_FMLSL): Ditto.
16793 (UNSPEC_FMLAL2): Ditto.
16794 (UNSPEC_FMLSL2): Ditto.
16795 (f16mac): New code attribute.
16796 * config/aarch64/aarch64-simd-builtins.def
16797 (aarch64_fmlal_lowv2sf): Ditto.
16798 (aarch64_fmlsl_lowv2sf): Ditto.
16799 (aarch64_fmlalq_lowv4sf): Ditto.
16800 (aarch64_fmlslq_lowv4sf): Ditto.
16801 (aarch64_fmlal_highv2sf): Ditto.
16802 (aarch64_fmlsl_highv2sf): Ditto.
16803 (aarch64_fmlalq_highv4sf): Ditto.
16804 (aarch64_fmlslq_highv4sf): Ditto.
16805 (aarch64_fmlal_lane_lowv2sf): Ditto.
16806 (aarch64_fmlsl_lane_lowv2sf): Ditto.
16807 (aarch64_fmlal_laneq_lowv2sf): Ditto.
16808 (aarch64_fmlsl_laneq_lowv2sf): Ditto.
16809 (aarch64_fmlalq_lane_lowv4sf): Ditto.
16810 (aarch64_fmlsl_lane_lowv4sf): Ditto.
16811 (aarch64_fmlalq_laneq_lowv4sf): Ditto.
16812 (aarch64_fmlsl_laneq_lowv4sf): Ditto.
16813 (aarch64_fmlal_lane_highv2sf): Ditto.
16814 (aarch64_fmlsl_lane_highv2sf): Ditto.
16815 (aarch64_fmlal_laneq_highv2sf): Ditto.
16816 (aarch64_fmlsl_laneq_highv2sf): Ditto.
16817 (aarch64_fmlalq_lane_highv4sf): Ditto.
16818 (aarch64_fmlsl_lane_highv4sf): Ditto.
16819 (aarch64_fmlalq_laneq_highv4sf): Ditto.
16820 (aarch64_fmlsl_laneq_highv4sf): Ditto.
16821 * config/aarch64/aarch64-simd.md:
16822 (aarch64_fml<f16mac1>l<f16quad>_low<mode>): New pattern.
16823 (aarch64_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
16824 (aarch64_simd_fml<f16mac1>l<f16quad>_low<mode>): Ditto.
16825 (aarch64_simd_fml<f16mac1>l<f16quad>_high<mode>): Ditto.
16826 (aarch64_fml<f16mac1>l_lane_lowv2sf): Ditto.
16827 (aarch64_fml<f16mac1>l_lane_highv2sf): Ditto.
16828 (aarch64_simd_fml<f16mac>l_lane_lowv2sf): Ditto.
16829 (aarch64_simd_fml<f16mac>l_lane_highv2sf): Ditto.
16830 (aarch64_fml<f16mac1>lq_laneq_lowv4sf): Ditto.
16831 (aarch64_fml<f16mac1>lq_laneq_highv4sf): Ditto.
16832 (aarch64_simd_fml<f16mac>lq_laneq_lowv4sf): Ditto.
16833 (aarch64_simd_fml<f16mac>lq_laneq_highv4sf): Ditto.
16834 (aarch64_fml<f16mac1>l_laneq_lowv2sf): Ditto.
16835 (aarch64_fml<f16mac1>l_laneq_highv2sf): Ditto.
16836 (aarch64_simd_fml<f16mac>l_laneq_lowv2sf): Ditto.
16837 (aarch64_simd_fml<f16mac>l_laneq_highv2sf): Ditto.
16838 (aarch64_fml<f16mac1>lq_lane_lowv4sf): Ditto.
16839 (aarch64_fml<f16mac1>lq_lane_highv4sf): Ditto.
16840 (aarch64_simd_fml<f16mac>lq_lane_lowv4sf): Ditto.
16841 (aarch64_simd_fml<f16mac>lq_lane_highv4sf): Ditto.
16842 * config/aarch64/arm_neon.h (vfmlal_low_u32): New intrinsic.
16843 (vfmlsl_low_u32): Ditto.
16844 (vfmlalq_low_u32): Ditto.
16845 (vfmlslq_low_u32): Ditto.
16846 (vfmlal_high_u32): Ditto.
16847 (vfmlsl_high_u32): Ditto.
16848 (vfmlalq_high_u32): Ditto.
16849 (vfmlslq_high_u32): Ditto.
16850 (vfmlal_lane_low_u32): Ditto.
16851 (vfmlsl_lane_low_u32): Ditto.
16852 (vfmlal_laneq_low_u32): Ditto.
16853 (vfmlsl_laneq_low_u32): Ditto.
16854 (vfmlalq_lane_low_u32): Ditto.
16855 (vfmlslq_lane_low_u32): Ditto.
16856 (vfmlalq_laneq_low_u32): Ditto.
16857 (vfmlslq_laneq_low_u32): Ditto.
16858 (vfmlal_lane_high_u32): Ditto.
16859 (vfmlsl_lane_high_u32): Ditto.
16860 (vfmlal_laneq_high_u32): Ditto.
16861 (vfmlsl_laneq_high_u32): Ditto.
16862 (vfmlalq_lane_high_u32): Ditto.
16863 (vfmlslq_lane_high_u32): Ditto.
16864 (vfmlalq_laneq_high_u32): Ditto.
16865 (vfmlslq_laneq_high_u32): Ditto.
16866 * config/aarch64/aarch64.h (AARCH64_FL_F16SML): New flag.
16867 (AARCH64_FL_FOR_ARCH8_4): New.
16868 (AARCH64_ISA_F16FML): New ISA flag.
16869 (TARGET_F16FML): New feature flag for fp16fml.
16870 (doc/invoke.texi): Document new fp16fml option.
16872 2018-01-10 Michael Collison <michael.collison@arm.com>
16874 * config/aarch64/aarch64-builtins.c:
16875 (aarch64_types_ternopu_imm_qualifiers, TYPES_TERNOPUI): New.
16876 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16877 (__ARM_FEATURE_SHA3): Define if TARGET_SHA3 is true.
16878 * config/aarch64/aarch64.h (AARCH64_FL_SHA3): New flags.
16879 (AARCH64_ISA_SHA3): New ISA flag.
16880 (TARGET_SHA3): New feature flag for sha3.
16881 * config/aarch64/iterators.md (sha512_op): New int attribute.
16882 (CRYPTO_SHA512): New int iterator.
16883 (UNSPEC_SHA512H): New unspec.
16884 (UNSPEC_SHA512H2): Ditto.
16885 (UNSPEC_SHA512SU0): Ditto.
16886 (UNSPEC_SHA512SU1): Ditto.
16887 * config/aarch64/aarch64-simd-builtins.def
16888 (aarch64_crypto_sha512hqv2di): New builtin.
16889 (aarch64_crypto_sha512h2qv2di): Ditto.
16890 (aarch64_crypto_sha512su0qv2di): Ditto.
16891 (aarch64_crypto_sha512su1qv2di): Ditto.
16892 (aarch64_eor3qv8hi): Ditto.
16893 (aarch64_rax1qv2di): Ditto.
16894 (aarch64_xarqv2di): Ditto.
16895 (aarch64_bcaxqv8hi): Ditto.
16896 * config/aarch64/aarch64-simd.md:
16897 (aarch64_crypto_sha512h<sha512_op>qv2di): New pattern.
16898 (aarch64_crypto_sha512su0qv2di): Ditto.
16899 (aarch64_crypto_sha512su1qv2di): Ditto.
16900 (aarch64_eor3qv8hi): Ditto.
16901 (aarch64_rax1qv2di): Ditto.
16902 (aarch64_xarqv2di): Ditto.
16903 (aarch64_bcaxqv8hi): Ditto.
16904 * config/aarch64/arm_neon.h (vsha512hq_u64): New intrinsic.
16905 (vsha512h2q_u64): Ditto.
16906 (vsha512su0q_u64): Ditto.
16907 (vsha512su1q_u64): Ditto.
16908 (veor3q_u16): Ditto.
16909 (vrax1q_u64): Ditto.
16910 (vxarq_u64): Ditto.
16911 (vbcaxq_u16): Ditto.
16912 * config/arm/types.md (crypto_sha512): New type attribute.
16913 (crypto_sha3): Ditto.
16914 (doc/invoke.texi): Document new sha3 option.
16916 2018-01-10 Michael Collison <michael.collison@arm.com>
16918 * config/aarch64/aarch64-builtins.c:
16919 (aarch64_types_quadopu_imm_qualifiers, TYPES_QUADOPUI): New.
16920 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16921 (__ARM_FEATURE_SM3): Define if TARGET_SM4 is true.
16922 (__ARM_FEATURE_SM4): Define if TARGET_SM4 is true.
16923 * config/aarch64/aarch64.h (AARCH64_FL_SM4): New flags.
16924 (AARCH64_ISA_SM4): New ISA flag.
16925 (TARGET_SM4): New feature flag for sm4.
16926 * config/aarch64/aarch64-simd-builtins.def
16927 (aarch64_sm3ss1qv4si): Ditto.
16928 (aarch64_sm3tt1aq4si): Ditto.
16929 (aarch64_sm3tt1bq4si): Ditto.
16930 (aarch64_sm3tt2aq4si): Ditto.
16931 (aarch64_sm3tt2bq4si): Ditto.
16932 (aarch64_sm3partw1qv4si): Ditto.
16933 (aarch64_sm3partw2qv4si): Ditto.
16934 (aarch64_sm4eqv4si): Ditto.
16935 (aarch64_sm4ekeyqv4si): Ditto.
16936 * config/aarch64/aarch64-simd.md:
16937 (aarch64_sm3ss1qv4si): Ditto.
16938 (aarch64_sm3tt<sm3tt_op>qv4si): Ditto.
16939 (aarch64_sm3partw<sm3part_op>qv4si): Ditto.
16940 (aarch64_sm4eqv4si): Ditto.
16941 (aarch64_sm4ekeyqv4si): Ditto.
16942 * config/aarch64/iterators.md (sm3tt_op): New int iterator.
16943 (sm3part_op): Ditto.
16944 (CRYPTO_SM3TT): Ditto.
16945 (CRYPTO_SM3PART): Ditto.
16946 (UNSPEC_SM3SS1): New unspec.
16947 (UNSPEC_SM3TT1A): Ditto.
16948 (UNSPEC_SM3TT1B): Ditto.
16949 (UNSPEC_SM3TT2A): Ditto.
16950 (UNSPEC_SM3TT2B): Ditto.
16951 (UNSPEC_SM3PARTW1): Ditto.
16952 (UNSPEC_SM3PARTW2): Ditto.
16953 (UNSPEC_SM4E): Ditto.
16954 (UNSPEC_SM4EKEY): Ditto.
16955 * config/aarch64/constraints.md (Ui2): New constraint.
16956 * config/aarch64/predicates.md (aarch64_imm2): New predicate.
16957 * config/arm/types.md (crypto_sm3): New type attribute.
16958 (crypto_sm4): Ditto.
16959 * config/aarch64/arm_neon.h (vsm3ss1q_u32): New intrinsic.
16960 (vsm3tt1aq_u32): Ditto.
16961 (vsm3tt1bq_u32): Ditto.
16962 (vsm3tt2aq_u32): Ditto.
16963 (vsm3tt2bq_u32): Ditto.
16964 (vsm3partw1q_u32): Ditto.
16965 (vsm3partw2q_u32): Ditto.
16966 (vsm4eq_u32): Ditto.
16967 (vsm4ekeyq_u32): Ditto.
16968 (doc/invoke.texi): Document new sm4 option.
16970 2018-01-10 Michael Collison <michael.collison@arm.com>
16972 * config/aarch64/aarch64-arches.def (armv8.4-a): New architecture.
16973 * config/aarch64/aarch64.h (AARCH64_ISA_V8_4): New ISA flag.
16974 (AARCH64_FL_FOR_ARCH8_4): New.
16975 (AARCH64_FL_V8_4): New flag.
16976 (doc/invoke.texi): Document new armv8.4-a option.
16978 2018-01-10 Michael Collison <michael.collison@arm.com>
16980 * config/aarch64/aarch64-c.c (aarch64_update_cpp_builtins):
16981 (__ARM_FEATURE_AES): Define if TARGET_AES is true.
16982 (__ARM_FEATURE_SHA2): Define if TARGET_SHA2 is true.
16983 * config/aarch64/aarch64-option-extension.def: Add
16984 AARCH64_OPT_EXTENSION of 'sha2'.
16985 (aes): Add AARCH64_OPT_EXTENSION of 'aes'.
16986 (crypto): Disable sha2 and aes if crypto disabled.
16987 (crypto): Enable aes and sha2 if enabled.
16988 (simd): Disable sha2 and aes if simd disabled.
16989 * config/aarch64/aarch64.h (AARCH64_FL_AES, AARCH64_FL_SHA2):
16991 (AARCH64_ISA_AES, AARCH64_ISA_SHA2): New ISA flags.
16992 (TARGET_SHA2): New feature flag for sha2.
16993 (TARGET_AES): New feature flag for aes.
16994 * config/aarch64/aarch64-simd.md:
16995 (aarch64_crypto_aes<aes_op>v16qi): Make pattern
16996 conditional on TARGET_AES.
16997 (aarch64_crypto_aes<aesmc_op>v16qi): Ditto.
16998 (aarch64_crypto_sha1hsi): Make pattern conditional
17000 (aarch64_crypto_sha1hv4si): Ditto.
17001 (aarch64_be_crypto_sha1hv4si): Ditto.
17002 (aarch64_crypto_sha1su1v4si): Ditto.
17003 (aarch64_crypto_sha1<sha1_op>v4si): Ditto.
17004 (aarch64_crypto_sha1su0v4si): Ditto.
17005 (aarch64_crypto_sha256h<sha256_op>v4si): Ditto.
17006 (aarch64_crypto_sha256su0v4si): Ditto.
17007 (aarch64_crypto_sha256su1v4si): Ditto.
17008 (doc/invoke.texi): Document new aes and sha2 options.
17010 2018-01-10 Martin Sebor <msebor@redhat.com>
17012 PR tree-optimization/83781
17013 * gimple-fold.c (get_range_strlen): Avoid treating arrays of pointers
17016 2018-01-11 Martin Sebor <msebor@gmail.com>
17017 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
17019 PR tree-optimization/83501
17020 PR tree-optimization/81703
17022 * tree-ssa-strlen.c (get_string_cst): Rename...
17023 (get_string_len): ...to this. Handle global constants.
17024 (handle_char_store): Adjust.
17026 2018-01-10 Kito Cheng <kito.cheng@gmail.com>
17027 Jim Wilson <jimw@sifive.com>
17029 * config/riscv/riscv-protos.h (riscv_output_return): New.
17030 * config/riscv/riscv.c (struct machine_function): New naked_p field.
17031 (riscv_attribute_table, riscv_output_return),
17032 (riscv_handle_fndecl_attribute, riscv_naked_function_p),
17033 (riscv_allocate_stack_slots_for_args, riscv_warn_func_return): New.
17034 (riscv_compute_frame_info): Only compute frame->mask if not a naked
17036 (riscv_expand_prologue): Add early return for naked function.
17037 (riscv_expand_epilogue): Likewise.
17038 (riscv_function_ok_for_sibcall): Return false for naked function.
17039 (riscv_set_current_function): New.
17040 (TARGET_SET_CURRENT_FUNCTION, TARGET_ALLOCATE_STACK_SLOTS_FOR_ARGS),
17041 (TARGET_ATTRIBUTE_TABLE, TARGET_WARN_FUNC_RETURN): New.
17042 * config/riscv/riscv.md (simple_return): Call riscv_output_return.
17043 * doc/extend.texi (RISC-V Function Attributes): New.
17045 2018-01-10 Michael Meissner <meissner@linux.vnet.ibm.com>
17047 * config/rs6000/rs6000.c (is_complex_IBM_long_double): Explicitly
17048 check for 128-bit long double before checking TCmode.
17049 * config/rs6000/rs6000.h (FLOAT128_IEEE_P): Explicitly check for
17050 128-bit long doubles before checking TFmode or TCmode.
17051 (FLOAT128_IBM_P): Likewise.
17053 2018-01-10 Martin Sebor <msebor@redhat.com>
17055 PR tree-optimization/83671
17056 * builtins.c (c_strlen): Unconditionally return zero for the empty
17058 Use -Warray-bounds for warnings.
17059 * gimple-fold.c (get_range_strlen): Handle non-constant lengths
17060 for non-constant array indices with COMPONENT_REF, arrays of
17061 arrays, and pointers to arrays.
17062 (gimple_fold_builtin_strlen): Determine and set length range for
17063 non-constant character arrays.
17065 2018-01-10 Aldy Hernandez <aldyh@redhat.com>
17067 PR middle-end/81897
17068 * tree-ssa-uninit.c (convert_control_dep_chain_into_preds): Skip
17071 2018-01-10 Eric Botcazou <ebotcazou@adacore.com>
17073 * dwarf2out.c (dwarf2out_var_location): Do not pass NULL to fprintf.
17075 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
17078 * config/rs6000/rs6000.c (print_operand) <'y'>: Use
17079 VECTOR_MEM_ALTIVEC_OR_VSX_P.
17080 * config/rs6000/vsx.md (*vsx_le_perm_load_<mode> for VSX_D): Use
17081 indexed_or_indirect_operand predicate.
17082 (*vsx_le_perm_load_<mode> for VSX_W): Likewise.
17083 (*vsx_le_perm_load_v8hi): Likewise.
17084 (*vsx_le_perm_load_v16qi): Likewise.
17085 (*vsx_le_perm_store_<mode> for VSX_D): Likewise.
17086 (*vsx_le_perm_store_<mode> for VSX_W): Likewise.
17087 (*vsx_le_perm_store_v8hi): Likewise.
17088 (*vsx_le_perm_store_v16qi): Likewise.
17089 (eight unnamed splitters): Likewise.
17091 2018-01-10 Peter Bergner <bergner@vnet.ibm.com>
17093 * config/rs6000/x86intrin.h: Change #warning to #error. Update message.
17094 * config/rs6000/emmintrin.h: Likewise.
17095 * config/rs6000/mmintrin.h: Likewise.
17096 * config/rs6000/xmmintrin.h: Likewise.
17098 2018-01-10 David Malcolm <dmalcolm@redhat.com>
17101 * tree-core.h: Document EXPR_LOCATION_WRAPPER_P's usage of
17103 * tree.c (tree_nop_conversion): Return true for location wrapper
17105 (maybe_wrap_with_location): New function.
17106 (selftest::check_strip_nops): New function.
17107 (selftest::test_location_wrappers): New function.
17108 (selftest::tree_c_tests): Call it.
17109 * tree.h (STRIP_ANY_LOCATION_WRAPPER): New macro.
17110 (maybe_wrap_with_location): New decl.
17111 (EXPR_LOCATION_WRAPPER_P): New macro.
17112 (location_wrapper_p): New inline function.
17113 (tree_strip_any_location_wrapper): New inline function.
17115 2018-01-10 H.J. Lu <hongjiu.lu@intel.com>
17118 * config/i386/i386.c (ix86_compute_frame_layout): Always adjust
17119 stack_realign_offset for the largest alignment of stack slot
17121 (ix86_find_max_used_stack_alignment): New function.
17122 (ix86_finalize_stack_frame_flags): Use it. Set
17123 max_used_stack_alignment if we don't realign stack.
17124 * config/i386/i386.h (machine_function): Add
17125 max_used_stack_alignment.
17127 2018-01-10 Christophe Lyon <christophe.lyon@linaro.org>
17129 * config/arm/arm.opt (-mbranch-cost): New option.
17130 * config/arm/arm.h (BRANCH_COST): Take arm_branch_cost into
17133 2018-01-10 Segher Boessenkool <segher@kernel.crashing.org>
17136 * config/rs6000/rs6000.md (load_toc_v4_PIC_2, load_toc_v4_PIC_3b,
17137 load_toc_v4_PIC_3c): Wrap const term in CONST RTL.
17139 2018-01-10 Richard Biener <rguenther@suse.de>
17142 * dwarf2out.c (gen_subprogram_die): Hoist old_die && declaration
17143 early out so it also covers the case where we have a non-NULL
17146 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
17148 PR tree-optimization/83753
17149 * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
17150 for non-strided grouped accesses if the number of elements is 1.
17152 2018-01-10 Jan Hubicka <hubicka@ucw.cz>
17155 * i386.c (ix86_vectorize_builtin_gather): Check TARGET_USE_GATHER.
17156 * i386.h (TARGET_USE_GATHER): Define.
17157 * x86-tune.def (X86_TUNE_USE_GATHER): New.
17159 2018-01-10 Martin Liska <mliska@suse.cz>
17162 * basic-block.h (CLEANUP_NO_PARTITIONING): New define.
17163 * bb-reorder.c (pass_reorder_blocks::execute): Do not clean up
17165 * cfgcleanup.c (try_optimize_cfg): Fix up partitioning if
17166 CLEANUP_NO_PARTITIONING is not set.
17168 2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
17170 * doc/rtl.texi: Remove documentation of (const ...) wrappers
17171 for vectors, as a partial revert of r254296.
17172 * rtl.h (const_vec_p): Delete.
17173 (const_vec_duplicate_p): Don't test for vector CONSTs.
17174 (unwrap_const_vec_duplicate, const_vec_series_p): Likewise.
17175 * expmed.c (make_tree): Likewise.
17178 * common.md (E, F): Use CONSTANT_P instead of checking for
17180 * emit-rtl.c (gen_lowpart_common): Use const_vec_p instead of
17181 checking for CONST_VECTOR.
17183 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
17185 PR middle-end/83575
17186 * predict.c (force_edge_cold): Handle in more sane way edges
17187 with no prediction.
17189 2018-01-09 Carl Love <cel@us.ibm.com>
17191 * config/rs6002/altivec.md (p8_vmrgow): Add support for V2DI, V2DF,
17193 (p8_vmrgew): Add support for V2DI, V2DF, V4SF types.
17194 * config/rs6000/rs6000-builtin.def: Add definitions for FLOAT2_V2DF,
17195 VMRGEW_V2DI, VMRGEW_V2DF, VMRGEW_V4SF, VMRGOW_V4SI, VMRGOW_V4SF,
17196 VMRGOW_V2DI, VMRGOW_V2DF. Remove definition for VMRGOW.
17197 * config/rs6000/rs6000-c.c (VSX_BUILTIN_VEC_FLOAT2,
17198 P8V_BUILTIN_VEC_VMRGEW, P8V_BUILTIN_VEC_VMRGOW): Add definitions.
17199 * config/rs6000/rs6000-protos.h: Add extern defition for
17200 rs6000_generate_float2_double_code.
17201 * config/rs6000/rs6000.c (rs6000_generate_float2_double_code): Add
17203 * config/rs6000/vsx.md (vsx_xvcdpsp): Add define_insn.
17204 (float2_v2df): Add define_expand.
17206 2018-01-09 Uros Bizjak <ubizjak@gmail.com>
17209 * combine.c (force_int_to_mode) <case ASHIFT>: Use mode instead of
17210 op_mode in the force_to_mode call.
17212 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
17214 * config/aarch64/aarch64.c (aarch64_evpc_trn): Use d.perm.series_p
17215 instead of checking each element individually.
17216 (aarch64_evpc_uzp): Likewise.
17217 (aarch64_evpc_zip): Likewise.
17218 (aarch64_evpc_ext): Likewise.
17219 (aarch64_evpc_rev): Likewise.
17220 (aarch64_evpc_dup): Test the encoding for a single duplicated element,
17221 instead of checking each element individually. Return true without
17223 (aarch64_vectorize_vec_perm_const): Use all_from_input_p to test
17224 whether all selected elements come from the same input, instead of
17225 checking each element individually. Remove calls to gen_rtx_REG,
17226 start_sequence and end_sequence and instead assert that no rtl is
17229 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
17231 * config/aarch64/aarch64.c (aarch64_legitimate_constant_p): Fix
17232 order of HIGH and CONST checks.
17234 2018-01-09 Richard Sandiford <richard.sandiford@linaro.org>
17236 * tree-vect-stmts.c (permute_vec_elements): Create a fresh variable
17237 if the destination isn't an SSA_NAME.
17239 2018-01-09 Richard Biener <rguenther@suse.de>
17241 PR tree-optimization/83668
17242 * graphite.c (canonicalize_loop_closed_ssa): Add edge argument,
17244 (canonicalize_loop_form): ... here, renamed from ...
17245 (canonicalize_loop_closed_ssa_form): ... this and amended to
17246 swap successor edges for loop exit blocks to make us use
17247 the RPO order we need for initial schedule generation.
17249 2018-01-09 Joseph Myers <joseph@codesourcery.com>
17251 PR tree-optimization/64811
17252 * match.pd: When optimizing comparisons with Inf, avoid
17253 introducing or losing exceptions from comparisons with NaN.
17255 2018-01-09 Martin Liska <mliska@suse.cz>
17258 * asan.c (shadow_mem_size): Add gcc_assert.
17260 2018-01-09 Georg-Johann Lay <avr@gjlay.de>
17262 Don't save registers in main().
17265 * doc/invoke.texi (AVR Options) [-mmain-is-OS_task]: Document it.
17266 * config/avr/avr.opt (-mmain-is-OS_task): New target option.
17267 * config/avr/avr.c (avr_set_current_function): Don't error if
17268 naked, OS_task or OS_main are specified at the same time.
17269 (avr_function_ok_for_sibcall): Don't disable sibcalls for OS_task,
17271 (avr_insert_attributes) [-mmain-is-OS_task] <main>: Add OS_task
17273 * common/config/avr/avr-common.c (avr_option_optimization_table):
17274 Switch on -mmain-is-OS_task for optimizing compilations.
17276 2018-01-09 Richard Biener <rguenther@suse.de>
17278 PR tree-optimization/83572
17279 * graphite.c: Include cfganal.h.
17280 (graphite_transform_loops): Connect infinite loops to exit
17281 and remove fake edges at the end.
17283 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
17285 * ipa-inline.c (edge_badness): Revert accidental checkin.
17287 2018-01-09 Jan Hubicka <hubicka@ucw.cz>
17290 * ipa-comdats.c (set_comdat_group): Only set comdat group of real
17291 symbols; not inline clones.
17293 2018-01-09 Jakub Jelinek <jakub@redhat.com>
17296 * modulo-sched.c (schedule_reg_moves): Punt if we'd need to move
17297 hard registers. Formatting fixes.
17299 PR preprocessor/83722
17300 * gcc.c (try_generate_repro): Pass
17301 &temp_stderr_files[RETRY_ICE_ATTEMPTS - 1] rather than
17302 &temp_stdout_files[RETRY_ICE_ATTEMPTS - 1] as last argument to
17305 2018-01-08 Monk Chiang <sh.chiang04@gmail.com>
17306 Kito Cheng <kito.cheng@gmail.com>
17308 * config/riscv/riscv.c (machine_function::is_leaf): Remove field.
17309 (riscv_leaf_function_p): Delete.
17310 (riscv_function_ok_for_sibcall): Return false when TARGET_SAVE_RESTORE.
17312 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17314 * config/rs6000/rs6000-string.c (do_load_for_compare_from_addr): New
17316 (do_ifelse): New function.
17317 (do_isel): New function.
17318 (do_sub3): New function.
17319 (do_add3): New function.
17320 (do_load_mask_compare): New function.
17321 (do_overlap_load_compare): New function.
17322 (expand_compare_loop): New function.
17323 (expand_block_compare): Call expand_compare_loop() when appropriate.
17324 * config/rs6000/rs6000.opt (-mblock-compare-inline-limit): Change
17325 option description.
17326 (-mblock-compare-inline-loop-limit): New option.
17328 2018-01-08 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
17331 * config/rs6000/altivec.md (*altivec_vpermr_<mode>_internal):
17332 Reverse order of second and third operands in first alternative.
17333 * config/rs6000/rs6000.c (rs6000_expand_vector_set): Reverse order
17334 of first and second elements in UNSPEC_VPERMR vector.
17335 (altivec_expand_vec_perm_le): Likewise.
17337 2018-01-08 Jeff Law <law@redhat.com>
17339 PR rtl-optimizatin/81308
17340 * tree-switch-conversion.c (cfg_altered): New file scoped static.
17341 (process_switch): If group_case_labels makes a change, then set
17343 (pass_convert_switch::execute): If a switch is converted, then
17344 set cfg_altered. Return TODO_cfg_cleanup if cfg_altered is true.
17346 PR rtl-optimization/81308
17347 * recog.c (split_all_insns): Conditionally cleanup the CFG after
17350 2018-01-08 Vidya Praveen <vidyapraveen@arm.com>
17352 PR target/83663 - Revert r255946
17353 * config/aarch64/aarch64.c (aarch64_expand_vector_init): Modify code
17354 generation for cases where splatting a value is not useful.
17355 * simplify-rtx.c (simplify_ternary_operation): Simplify vec_merge
17356 across a vec_duplicate and a paradoxical subreg forming a vector
17357 mode to a vec_concat.
17359 2018-01-08 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
17361 * config/arm/t-aprofile (MULTILIB_MATCHES): Add mapping rules for
17362 -march=armv8.3-a variants.
17363 * config/arm/t-multilib: Likewise.
17364 * config/arm/t-arm-elf: Likewise. Handle dotprod extension.
17366 2018-01-08 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
17368 * config/rs6000/rs6000.md (cceq_ior_compare): Remove * so I can use it
17370 (cceq_ior_compare_complement): Give it a name so I can use it, and
17371 change boolean_or_operator predicate to boolean_operator so it can
17372 be used to generate a crand.
17373 (eqne): New code iterator.
17374 (bd/bd_neg): New code_attrs.
17375 (<bd>_<mode>): New name for ctr<mode>_internal[12] now combined into
17376 a single define_insn.
17377 (<bd>tf_<mode>): A new insn pattern for the conditional form branch
17378 decrement (bdnzt/bdnzf/bdzt/bdzf).
17379 * config/rs6000/rs6000.c (rs6000_legitimate_combined_insn): Updated
17380 with the new names of the branch decrement patterns, and added the
17381 names of the branch decrement conditional patterns.
17383 2018-01-08 Richard Biener <rguenther@suse.de>
17385 PR tree-optimization/83563
17386 * graphite.c (canonicalize_loop_closed_ssa_form): Reset the SCEV
17389 2018-01-08 Richard Biener <rguenther@suse.de>
17391 PR middle-end/83713
17392 * convert.c (do_narrow): Properly guard TYPE_OVERFLOW_WRAPS checks.
17394 2018-01-08 Richard Biener <rguenther@suse.de>
17396 PR tree-optimization/83685
17397 * tree-ssa-pre.c (create_expression_by_pieces): Do not insert
17398 references to abnormals.
17400 2018-01-08 Richard Biener <rguenther@suse.de>
17403 * dwarf2out.c (output_indirect_strings): Handle empty
17404 skeleton_debug_str_hash.
17405 (dwarf2out_early_finish): Index strings for -gsplit-dwarf.
17407 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
17409 * config/arc/arc.c (TARGET_TRAMPOLINE_ADJUST_ADDRESS): Delete.
17410 (emit_store_direct): Likewise.
17411 (arc_trampoline_adjust_address): Likewise.
17412 (arc_asm_trampoline_template): New function.
17413 (arc_initialize_trampoline): Use asm_trampoline_template.
17414 (TARGET_ASM_TRAMPOLINE_TEMPLATE): Define.
17415 * config/arc/arc.h (TRAMPOLINE_SIZE): Adjust to 16.
17416 * config/arc/arc.md (flush_icache): Delete pattern.
17418 2018-01-08 Claudiu Zissulescu <claziss@synopsys.com>
17420 * config/arc/arc-c.def (__ARC_UNALIGNED__): New define.
17421 * config/arc/arc.h (STRICT_ALIGNMENT): Control this macro using
17424 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
17427 * config/epiphany/epiphany.h (make_pass_mode_switch_use): Guard
17428 by not USED_FOR_TARGET.
17429 (make_pass_resolve_sw_modes): Likewise.
17431 2018-01-08 Sebastian Huber <sebastian.huber@embedded-brains.de>
17433 * config/nios2/nios2.h (nios2_section_threshold): Guard by not
17436 2018-01-08 Richard Biener <rguenther@suse.de>
17438 PR middle-end/83580
17439 * tree-data-ref.c (split_constant_offset): Remove STRIP_NOPS.
17441 2018-01-08 Richard Biener <rguenther@suse.de>
17443 PR middle-end/83517
17444 * match.pd ((t * 2) / 2) -> t): Add missing :c.
17446 2018-01-06 Aldy Hernandez <aldyh@redhat.com>
17448 PR middle-end/81897
17449 * tree-ssa-uninit.c (compute_control_dep_chain): Do not bail on
17450 basic blocks with a small number of successors.
17451 (convert_control_dep_chain_into_preds): Improve handling of
17453 (dump_predicates): Split apart into...
17454 (dump_pred_chain): ...here...
17455 (dump_pred_info): ...and here.
17456 (can_one_predicate_be_invalidated_p): Add debugging printfs.
17457 (can_chain_union_be_invalidated_p): Improve check for invalidation
17459 (uninit_uses_cannot_happen): Avoid unnecessary if
17460 convert_control_dep_chain_into_preds yielded nothing.
17462 2018-01-06 Martin Sebor <msebor@redhat.com>
17464 PR tree-optimization/83640
17465 * gimple-ssa-warn-restrict.c (builtin_access::builtin_access): Avoid
17466 subtracting negative offset from size.
17467 (builtin_access::overlap): Adjust offset bounds of the access to fall
17468 within the size of the object if possible.
17470 2018-01-06 Richard Sandiford <richard.sandiford@linaro.org>
17472 PR rtl-optimization/83699
17473 * expmed.c (extract_bit_field_1): Restrict the vector usage of
17474 extract_bit_field_as_subreg to cases in which the extracted
17475 value is also a vector.
17477 * lra-constraints.c (process_alt_operands): Test for the equivalence
17478 substitutions when detecting a possible reload cycle.
17480 2018-01-06 Jakub Jelinek <jakub@redhat.com>
17483 * toplev.c (process_options): Don't enable debug_nonbind_markers_p
17484 by default if flag_selective_schedling{,2}. Formatting fixes.
17486 PR rtl-optimization/83682
17487 * rtl.h (const_vec_duplicate_p): Only return true for VEC_DUPLICATE
17488 if it has non-VECTOR_MODE element mode.
17489 (vec_duplicate_p): Likewise.
17491 PR middle-end/83694
17492 * cfgexpand.c (expand_debug_expr): Punt if mode1 is VOIDmode
17493 and bitsize might be greater than MAX_BITSIZE_MODE_ANY_INT.
17495 2018-01-05 Jakub Jelinek <jakub@redhat.com>
17498 * config/i386/i386-builtin.def
17499 (__builtin_ia32_vgf2p8affineinvqb_v64qi,
17500 __builtin_ia32_vgf2p8affineqb_v64qi, __builtin_ia32_vgf2p8mulb_v64qi):
17501 Require also OPTION_MASK_ISA_AVX512F in addition to
17502 OPTION_MASK_ISA_GFNI.
17503 (__builtin_ia32_vgf2p8affineinvqb_v16qi_mask,
17504 __builtin_ia32_vgf2p8affineqb_v16qi_mask): Require
17505 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_SSE in addition
17506 to OPTION_MASK_ISA_GFNI.
17507 (__builtin_ia32_vgf2p8mulb_v32qi_mask): Require
17508 OPTION_MASK_ISA_AVX512VL in addition to OPTION_MASK_ISA_GFNI and
17509 OPTION_MASK_ISA_AVX512BW.
17510 (__builtin_ia32_vgf2p8mulb_v16qi_mask): Require
17511 OPTION_MASK_ISA_AVX512VL instead of OPTION_MASK_ISA_AVX512BW in
17512 addition to OPTION_MASK_ISA_GFNI.
17513 (__builtin_ia32_vgf2p8affineinvqb_v16qi,
17514 __builtin_ia32_vgf2p8affineqb_v16qi, __builtin_ia32_vgf2p8mulb_v16qi):
17515 Require OPTION_MASK_ISA_SSE2 instead of OPTION_MASK_ISA_SSE in addition
17516 to OPTION_MASK_ISA_GFNI.
17517 * config/i386/i386.c (def_builtin): Change to builtin isa/isa2 being
17518 a requirement for all ISAs rather than any of them with a few
17520 (ix86_add_new_builtins): Clear OPTION_MASK_ISA_64BIT from isa before
17522 (ix86_expand_builtin): Require all ISAs from builtin's isa and isa2
17523 bitmasks to be enabled with 3 exceptions, instead of requiring any
17524 enabled ISA with lots of exceptions.
17525 * config/i386/sse.md (vgf2p8affineinvqb_<mode><mask_name>,
17526 vgf2p8affineqb_<mode><mask_name>, vgf2p8mulb_<mode><mask_name>):
17527 Change avx512bw in isa attribute to avx512f.
17528 * config/i386/sgxintrin.h: Add license boilerplate.
17529 * config/i386/vaesintrin.h: Likewise. Fix macro spelling __AVX512F
17530 to __AVX512F__ and __AVX512VL to __AVX512VL__.
17531 (_mm256_aesdec_epi128, _mm256_aesdeclast_epi128, _mm256_aesenc_epi128,
17532 _mm256_aesenclast_epi128): Enable temporarily avx if __AVX__ is not
17534 * config/i386/gfniintrin.h (_mm_gf2p8mul_epi8,
17535 _mm_gf2p8affineinv_epi64_epi8, _mm_gf2p8affine_epi64_epi8): Enable
17536 temporarily sse2 rather than sse if not enabled already.
17539 * config/i386/sse.md (VI248_VLBW): Rename to ...
17540 (VI248_AVX512VL): ... this. Don't guard V32HI with TARGET_AVX512BW.
17541 (vpshrd_<mode><mask_name>, vpshld_<mode><mask_name>,
17542 vpshrdv_<mode>, vpshrdv_<mode>_mask, vpshrdv_<mode>_maskz,
17543 vpshrdv_<mode>_maskz_1, vpshldv_<mode>, vpshldv_<mode>_mask,
17544 vpshldv_<mode>_maskz, vpshldv_<mode>_maskz_1): Use VI248_AVX512VL
17545 mode iterator instead of VI248_VLBW.
17547 2018-01-05 Jan Hubicka <hubicka@ucw.cz>
17549 * ipa-fnsummary.c (record_modified_bb_info): Add OP.
17550 (record_modified): Skip clobbers; add debug output.
17551 (param_change_prob): Use sreal frequencies.
17553 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
17555 * tree-vect-data-refs.c (vect_compute_data_ref_alignment): Don't
17556 punt for user-aligned variables.
17558 2018-01-05 Richard Sandiford <richard.sandiford@linaro.org>
17560 * tree-chrec.c (chrec_contains_symbols): Return true for
17563 2018-01-05 Sudakshina Das <sudi.das@arm.com>
17566 * simplify-rtx.c (simplify_relational_operation_1): Add simplifications
17567 of (x|y) == x for BICS pattern.
17569 2018-01-05 Jakub Jelinek <jakub@redhat.com>
17571 PR tree-optimization/83605
17572 * gimple-ssa-strength-reduction.c: Include tree-eh.h.
17573 (find_candidates_dom_walker::before_dom_children): Ignore stmts that
17576 2018-01-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
17578 * config.gcc (epiphany-*-elf*): Add (epiphany-*-rtems*) configuration.
17579 * config/epiphany/rtems.h: New file.
17581 2018-01-04 Jakub Jelinek <jakub@redhat.com>
17582 Uros Bizjak <ubizjak@gmail.com>
17585 * config/i386/i386.md (*<rotate_insn>hi3_1 splitter): Use
17586 QIreg_operand instead of register_operand predicate.
17587 * config/i386/i386.c (ix86_rop_should_change_byte_p,
17588 set_rop_modrm_reg_bits, ix86_mitigate_rop): Use -mmitigate-rop in
17589 comments instead of -fmitigate[-_]rop.
17591 2018-01-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
17594 * cgraphunit.c (symbol_table::compile): Switch to text_section
17595 before calling assembly_start debug hook.
17596 * run-rtl-passes.c (run_rtl_passes): Likewise.
17599 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
17601 * tree-vrp.c (extract_range_from_binary_expr_1): Check
17602 range_int_cst_p rather than !symbolic_range_p before calling
17603 extract_range_from_multiplicative_op_1.
17605 2018-01-04 Jeff Law <law@redhat.com>
17607 * tree-ssa-math-opts.c (execute_cse_reciprocals_1): Remove
17608 redundant test in assertion.
17610 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
17612 * doc/rtl.texi: Document machine_mode wrapper classes.
17614 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
17616 * fold-const.c (fold_ternary_loc): Check tree_fits_uhwi_p before
17617 using tree_to_uhwi.
17619 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
17621 * tree-ssa-forwprop.c (is_combined_permutation_identity): Allow
17622 the VEC_PERM_EXPR fold to fail.
17624 2018-01-04 Jakub Jelinek <jakub@redhat.com>
17627 * bb-reorder.c (insert_section_boundary_note): Set has_bb_partition
17628 to switched_sections.
17630 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
17633 * config/arm/arm.c (arm_vectorize_vec_perm_const): Fix inverted
17634 test for d.testing.
17636 2018-01-04 Peter Bergner <bergner@vnet.ibm.com>
17639 * config/rs6000/rs6000.c (rs6000_discover_homogeneous_aggregate): Do not
17640 allow arguments in FP registers if TARGET_HARD_FLOAT is false.
17642 2018-01-04 Jakub Jelinek <jakub@redhat.com>
17645 * cfgexpand.c (expand_debug_expr) <case BIT_FIELD_REF>: Punt if mode
17646 is BLKmode and bitpos not zero or mode change is needed.
17648 2018-01-04 Richard Sandiford <richard.sandiford@linaro.org>
17651 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): Require
17654 2018-01-04 Uros Bizjak <ubizjak@gmail.com>
17657 * config/alpha/alpha.md (*sadd<modesuffix>): Use ASHIFT
17658 instead of MULT rtx. Update all corresponding splitters.
17659 (*saddl_se): Ditto.
17660 (*ssub<modesuffix>): Ditto.
17661 (*ssubl_se): Ditto.
17662 (*cmp_sadd_di): Update split patterns.
17663 (*cmp_sadd_si): Ditto.
17664 (*cmp_sadd_sidi): Ditto.
17665 (*cmp_ssub_di): Ditto.
17666 (*cmp_ssub_si): Ditto.
17667 (*cmp_ssub_sidi): Ditto.
17668 * config/alpha/predicates.md (const23_operand): New predicate.
17669 * config/alpha/alpha.c (alpha_rtx_costs) [PLUS, MINUS]:
17670 Look for ASHIFT, not MULT inner operand.
17671 (alpha_split_conditional_move): Update for *sadd<modesuffix> change.
17673 2018-01-04 Martin Liska <mliska@suse.cz>
17675 PR gcov-profile/83669
17676 * gcov.c (output_intermediate_file): Add version to intermediate
17678 * doc/gcov.texi: Document new field 'version' in intermediate
17679 file format. Fix location of '-k' option of gcov command.
17681 2018-01-04 Martin Liska <mliska@suse.cz>
17684 * ipa-icf.c (sem_function::merge): Do not cross comdat boundary.
17686 2018-01-04 Jakub Jelinek <jakub@redhat.com>
17688 * gimple-ssa-sprintf.c (parse_directive): Cast second dir.len to uhwi.
17690 2018-01-03 Martin Sebor <msebor@redhat.com>
17692 PR tree-optimization/83655
17693 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call): Avoid
17694 checking calls with invalid arguments.
17696 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17698 * tree-vect-stmts.c (vect_get_store_rhs): New function.
17699 (vectorizable_mask_load_store): Delete.
17700 (vectorizable_call): Return false for masked loads and stores.
17701 (vectorizable_store): Handle IFN_MASK_STORE. Use vect_get_store_rhs
17702 instead of gimple_assign_rhs1.
17703 (vectorizable_load): Handle IFN_MASK_LOAD.
17704 (vect_transform_stmt): Don't set is_store for call_vec_info_type.
17706 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17708 * tree-vect-stmts.c (vect_build_gather_load_calls): New function,
17710 (vectorizable_mask_load_store): ...here.
17711 (vectorizable_load): ...and here.
17713 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17715 * tree-vect-stmts.c (vect_build_all_ones_mask)
17716 (vect_build_zero_merge_argument): New functions, split out from...
17717 (vectorizable_load): ...here.
17719 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17721 * tree-vect-stmts.c (vect_check_store_rhs): New function,
17723 (vectorizable_mask_load_store): ...here.
17724 (vectorizable_store): ...and here.
17726 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17728 * tree-vect-stmts.c (vect_check_load_store_mask): New function,
17730 (vectorizable_mask_load_store): ...here.
17732 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17734 * tree-vectorizer.h (vec_load_store_type): Moved from tree-vec-stmts.c
17735 (vect_model_store_cost): Take a vec_load_store_type instead of a
17737 * tree-vect-stmts.c (vec_load_store_type): Move to tree-vectorizer.h.
17738 (vect_model_store_cost): Take a vec_load_store_type instead of a
17740 (vectorizable_mask_load_store): Update accordingly.
17741 (vectorizable_store): Likewise.
17742 * tree-vect-slp.c (vect_analyze_slp_cost_1): Update accordingly.
17744 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17746 * tree-vect-loop.c (vect_transform_loop): Stub out scalar
17747 IFN_MASK_LOAD calls here rather than...
17748 * tree-vect-stmts.c (vectorizable_mask_load_store): ...here.
17750 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17751 Alan Hayward <alan.hayward@arm.com>
17752 David Sherwood <david.sherwood@arm.com>
17754 * expmed.c (extract_bit_field_1): For vector extracts,
17755 fall back to extract_bit_field_as_subreg if vec_extract
17758 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17759 Alan Hayward <alan.hayward@arm.com>
17760 David Sherwood <david.sherwood@arm.com>
17762 * lra-spills.c (pseudo_reg_slot_compare): Sort slots by whether
17763 they are variable or constant sized.
17764 (assign_stack_slot_num_and_sort_pseudos): Don't reuse variable-sized
17765 slots for constant-sized data.
17767 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17768 Alan Hayward <alan.hayward@arm.com>
17769 David Sherwood <david.sherwood@arm.com>
17771 * tree-vect-patterns.c (vect_recog_mask_conversion_pattern): When
17772 handling COND_EXPRs with boolean comparisons, try to find a better
17773 basis for the mask type than the boolean itself.
17775 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17777 * doc/rtl.texi (MAX_BITSIZE_MODE_ANY_MODE): Describe how the default
17778 is calculated and how it can be overridden.
17779 * genmodes.c (max_bitsize_mode_any_mode): New variable.
17780 (create_modes): Initialize it from MAX_BITSIZE_MODE_ANY_MODE,
17782 (emit_max_int): Use it to set the output MAX_BITSIZE_MODE_ANY_MODE,
17785 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17786 Alan Hayward <alan.hayward@arm.com>
17787 David Sherwood <david.sherwood@arm.com>
17789 * config/aarch64/aarch64-protos.h (aarch64_output_simd_mov_immediate):
17790 Remove the mode argument.
17791 (aarch64_simd_valid_immediate): Remove the mode and inverse
17793 * config/aarch64/iterators.md (bitsize): New iterator.
17794 * config/aarch64/aarch64-simd.md (*aarch64_simd_mov<mode>, and<mode>3)
17795 (ior<mode>3): Update calls to aarch64_output_simd_mov_immediate.
17796 * config/aarch64/constraints.md (Do, Db, Dn): Update calls to
17797 aarch64_simd_valid_immediate.
17798 * config/aarch64/predicates.md (aarch64_reg_or_orr_imm): Likewise.
17799 (aarch64_reg_or_bic_imm): Likewise.
17800 * config/aarch64/aarch64.c (simd_immediate_info): Replace mvn
17801 with an insn_type enum and msl with a modifier_type enum.
17802 Replace element_width with a scalar_mode. Change the shift
17803 to unsigned int. Add constructors for scalar_float_mode and
17804 scalar_int_mode elements.
17805 (aarch64_vect_float_const_representable_p): Delete.
17806 (aarch64_can_const_movi_rtx_p)
17807 (aarch64_simd_scalar_immediate_valid_for_move)
17808 (aarch64_simd_make_constant): Update call to
17809 aarch64_simd_valid_immediate.
17810 (aarch64_advsimd_valid_immediate_hs): New function.
17811 (aarch64_advsimd_valid_immediate): Likewise.
17812 (aarch64_simd_valid_immediate): Remove mode and inverse
17813 arguments. Rewrite to use the above. Use const_vec_duplicate_p
17814 to detect duplicated constants and use aarch64_float_const_zero_rtx_p
17815 and aarch64_float_const_representable_p on the result.
17816 (aarch64_output_simd_mov_immediate): Remove mode argument.
17817 Update call to aarch64_simd_valid_immediate and use of
17818 simd_immediate_info.
17819 (aarch64_output_scalar_simd_mov_immediate): Update call
17822 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17823 Alan Hayward <alan.hayward@arm.com>
17824 David Sherwood <david.sherwood@arm.com>
17826 * machmode.h (mode_precision): Prefix with CONST_MODE_PRECISION.
17827 (mode_nunits): Likewise CONST_MODE_NUNITS.
17828 * machmode.def (ADJUST_NUNITS): Document.
17829 * genmodes.c (mode_data::need_nunits_adj): New field.
17830 (blank_mode): Update accordingly.
17831 (adj_nunits): New variable.
17832 (print_maybe_const_decl): Replace CATEGORY with a NEEDS_ADJ
17834 (emit_mode_size_inline): Set need_bytesize_adj for all modes
17835 listed in adj_nunits.
17836 (emit_mode_nunits_inline): Set need_nunits_adj for all modes
17837 listed in adj_nunits. Don't emit case statements for such modes.
17838 (emit_insn_modes_h): Emit definitions of CONST_MODE_NUNITS
17839 and CONST_MODE_PRECISION. Make CONST_MODE_SIZE expand to
17840 nothing if adj_nunits is nonnull.
17841 (emit_mode_precision, emit_mode_nunits): Use print_maybe_const_decl.
17842 (emit_mode_unit_size, emit_mode_base_align, emit_mode_ibit)
17843 (emit_mode_fbit): Update use of print_maybe_const_decl.
17844 (emit_move_size): Likewise. Treat the array as non-const
17846 (emit_mode_adjustments): Handle adj_nunits.
17848 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17850 * machmode.def (VECTOR_MODES_WITH_PREFIX): Document.
17851 * genmodes.c (VECTOR_MODES_WITH_PREFIX): New macro.
17852 (VECTOR_MODES): Use it.
17853 (make_vector_modes): Take the prefix as an argument.
17855 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17856 Alan Hayward <alan.hayward@arm.com>
17857 David Sherwood <david.sherwood@arm.com>
17859 * mode-classes.def (MODE_VECTOR_BOOL): New mode class.
17860 * machmode.h (INTEGRAL_MODE_P, VECTOR_MODE_P): Return true
17861 for MODE_VECTOR_BOOL.
17862 * machmode.def (VECTOR_BOOL_MODE): Document.
17863 * genmodes.c (VECTOR_BOOL_MODE): New macro.
17864 (make_vector_bool_mode): New function.
17865 (complete_mode, emit_mode_wider, emit_mode_adjustments): Handle
17867 * lto-streamer-in.c (lto_input_mode_table): Likewise.
17868 * rtx-vector-builder.c (rtx_vector_builder::find_cached_value):
17870 * stor-layout.c (int_mode_for_mode): Likewise.
17871 * tree.c (build_vector_type_for_mode): Likewise.
17872 * varasm.c (output_constant_pool_2): Likewise.
17873 * emit-rtl.c (init_emit_once): Make sure that CONST1_RTX (BImode) and
17874 CONSTM1_RTX (BImode) are the same thing. Initialize const_tiny_rtx
17875 for MODE_VECTOR_BOOL.
17876 * expr.c (expand_expr_real_1): Use VECTOR_MODE_P instead of a list
17877 of mode class checks.
17878 * tree-vect-generic.c (expand_vector_operation): Use VECTOR_MODE_P
17879 instead of a list of mode class checks.
17880 (expand_vector_scalar_condition): Likewise.
17881 (type_for_widest_vector_mode): Handle BImode as an inner mode.
17883 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17884 Alan Hayward <alan.hayward@arm.com>
17885 David Sherwood <david.sherwood@arm.com>
17887 * machmode.h (mode_size): Change from unsigned short to
17889 (mode_to_bytes): Return a poly_uint16 rather than an unsigned short.
17890 (GET_MODE_SIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
17891 or if measurement_type is not polynomial.
17892 (fixed_size_mode::includes_p): Check for constant-sized modes.
17893 * genmodes.c (emit_mode_size_inline): Make mode_size_inline
17894 return a poly_uint16 rather than an unsigned short.
17895 (emit_mode_size): Change the type of mode_size from unsigned short
17896 to poly_uint16_pod. Use ZERO_COEFFS for the initializer.
17897 (emit_mode_adjustments): Cope with polynomial vector sizes.
17898 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
17900 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
17902 * auto-inc-dec.c (try_merge): Treat GET_MODE_SIZE as polynomial.
17903 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Likewise.
17904 * caller-save.c (setup_save_areas): Likewise.
17905 (replace_reg_with_saved_mem): Likewise.
17906 * calls.c (emit_library_call_value_1): Likewise.
17907 * combine-stack-adj.c (combine_stack_adjustments_for_block): Likewise.
17908 * combine.c (simplify_set, make_extraction, simplify_shift_const_1)
17909 (gen_lowpart_for_combine): Likewise.
17910 * convert.c (convert_to_integer_1): Likewise.
17911 * cse.c (equiv_constant, cse_insn): Likewise.
17912 * cselib.c (autoinc_split, cselib_hash_rtx): Likewise.
17913 (cselib_subst_to_values): Likewise.
17914 * dce.c (word_dce_process_block): Likewise.
17915 * df-problems.c (df_word_lr_mark_ref): Likewise.
17916 * dwarf2cfi.c (init_one_dwarf_reg_size): Likewise.
17917 * dwarf2out.c (multiple_reg_loc_descriptor, mem_loc_descriptor)
17918 (concat_loc_descriptor, concatn_loc_descriptor, loc_descriptor)
17919 (rtl_for_decl_location): Likewise.
17920 * emit-rtl.c (gen_highpart, widen_memory_access): Likewise.
17921 * expmed.c (extract_bit_field_1, extract_integral_bit_field): Likewise.
17922 * expr.c (emit_group_load_1, clear_storage_hints): Likewise.
17923 (emit_move_complex, emit_move_multi_word, emit_push_insn): Likewise.
17924 (expand_expr_real_1): Likewise.
17925 * function.c (assign_parm_setup_block_p, assign_parm_setup_block)
17926 (pad_below): Likewise.
17927 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
17928 * gimple-ssa-store-merging.c (rhs_valid_for_store_merging_p): Likewise.
17929 * ira.c (get_subreg_tracking_sizes): Likewise.
17930 * ira-build.c (ira_create_allocno_objects): Likewise.
17931 * ira-color.c (coalesced_pseudo_reg_slot_compare): Likewise.
17932 (ira_sort_regnos_for_alter_reg): Likewise.
17933 * ira-costs.c (record_operand_costs): Likewise.
17934 * lower-subreg.c (interesting_mode_p, simplify_gen_subreg_concatn)
17935 (resolve_simple_move): Likewise.
17936 * lra-constraints.c (get_reload_reg, operands_match_p): Likewise.
17937 (process_addr_reg, simplify_operand_subreg, curr_insn_transform)
17938 (lra_constraints): Likewise.
17939 (CONST_POOL_OK_P): Reject variable-sized modes.
17940 * lra-spills.c (slot, assign_mem_slot, pseudo_reg_slot_compare)
17941 (add_pseudo_to_slot, lra_spill): Likewise.
17942 * omp-low.c (omp_clause_aligned_alignment): Likewise.
17943 * optabs-query.c (get_best_extraction_insn): Likewise.
17944 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
17945 * optabs.c (expand_vec_perm_var, expand_vec_cond_expr): Likewise.
17946 (expand_mult_highpart, valid_multiword_target_p): Likewise.
17947 * recog.c (offsettable_address_addr_space_p): Likewise.
17948 * regcprop.c (maybe_mode_change): Likewise.
17949 * reginfo.c (choose_hard_reg_mode, record_subregs_of_mode): Likewise.
17950 * regrename.c (build_def_use): Likewise.
17951 * regstat.c (dump_reg_info): Likewise.
17952 * reload.c (complex_word_subreg_p, push_reload, find_dummy_reload)
17953 (find_reloads, find_reloads_subreg_address): Likewise.
17954 * reload1.c (eliminate_regs_1): Likewise.
17955 * rtlanal.c (for_each_inc_dec_find_inc_dec, rtx_cost): Likewise.
17956 * simplify-rtx.c (avoid_constant_pool_reference): Likewise.
17957 (simplify_binary_operation_1, simplify_subreg): Likewise.
17958 * targhooks.c (default_function_arg_padding): Likewise.
17959 (default_hard_regno_nregs, default_class_max_nregs): Likewise.
17960 * tree-cfg.c (verify_gimple_assign_binary): Likewise.
17961 (verify_gimple_assign_ternary): Likewise.
17962 * tree-inline.c (estimate_move_cost): Likewise.
17963 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
17964 * tree-ssa-loop-ivopts.c (add_autoinc_candidates): Likewise.
17965 (get_address_cost_ainc): Likewise.
17966 * tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Likewise.
17967 (vect_supportable_dr_alignment): Likewise.
17968 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
17969 (vectorizable_reduction): Likewise.
17970 * tree-vect-stmts.c (vectorizable_assignment, vectorizable_shift)
17971 (vectorizable_operation, vectorizable_load): Likewise.
17972 * tree.c (build_same_sized_truth_vector_type): Likewise.
17973 * valtrack.c (cleanup_auto_inc_dec): Likewise.
17974 * var-tracking.c (emit_note_insn_var_location): Likewise.
17975 * config/arc/arc.h (ASM_OUTPUT_CASE_END): Use as_a <scalar_int_mode>.
17976 (ADDR_VEC_ALIGN): Likewise.
17978 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
17979 Alan Hayward <alan.hayward@arm.com>
17980 David Sherwood <david.sherwood@arm.com>
17982 * machmode.h (mode_to_bits): Return a poly_uint16 rather than an
17984 (GET_MODE_BITSIZE): Return a constant if ONLY_FIXED_SIZE_MODES,
17985 or if measurement_type is polynomial.
17986 * calls.c (shift_return_value): Treat GET_MODE_BITSIZE as polynomial.
17987 * combine.c (make_extraction): Likewise.
17988 * dse.c (find_shift_sequence): Likewise.
17989 * dwarf2out.c (mem_loc_descriptor): Likewise.
17990 * expmed.c (store_integral_bit_field, extract_bit_field_1): Likewise.
17991 (extract_bit_field, extract_low_bits): Likewise.
17992 * expr.c (convert_move, convert_modes, emit_move_insn_1): Likewise.
17993 (optimize_bitfield_assignment_op, expand_assignment): Likewise.
17994 (store_expr_with_bounds, store_field, expand_expr_real_1): Likewise.
17995 * fold-const.c (optimize_bit_field_compare, merge_ranges): Likewise.
17996 * gimple-fold.c (optimize_atomic_compare_exchange_p): Likewise.
17997 * reload.c (find_reloads): Likewise.
17998 * reload1.c (alter_reg): Likewise.
17999 * stor-layout.c (bitwise_mode_for_mode, compute_record_mode): Likewise.
18000 * targhooks.c (default_secondary_memory_needed_mode): Likewise.
18001 * tree-if-conv.c (predicate_mem_writes): Likewise.
18002 * tree-ssa-strlen.c (handle_builtin_memcmp): Likewise.
18003 * tree-vect-patterns.c (adjust_bool_pattern): Likewise.
18004 * tree-vect-stmts.c (vectorizable_simd_clone_call): Likewise.
18005 * valtrack.c (dead_debug_insert_temp): Likewise.
18006 * varasm.c (mergeable_constant_section): Likewise.
18007 * config/sh/sh.h (LOCAL_ALIGNMENT): Use as_a <fixed_size_mode>.
18009 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18010 Alan Hayward <alan.hayward@arm.com>
18011 David Sherwood <david.sherwood@arm.com>
18013 * expr.c (expand_assignment): Cope with polynomial mode sizes
18014 when assigning to a CONCAT.
18016 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18017 Alan Hayward <alan.hayward@arm.com>
18018 David Sherwood <david.sherwood@arm.com>
18020 * machmode.h (mode_precision): Change from unsigned short to
18022 (mode_to_precision): Return a poly_uint16 rather than an unsigned
18024 (GET_MODE_PRECISION): Return a constant if ONLY_FIXED_SIZE_MODES,
18025 or if measurement_type is not polynomial.
18026 (HWI_COMPUTABLE_MODE_P): Turn into a function. Optimize the case
18027 in which the mode is already known to be a scalar_int_mode.
18028 * genmodes.c (emit_mode_precision): Change the type of mode_precision
18029 from unsigned short to poly_uint16_pod. Use ZERO_COEFFS for the
18031 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18032 for GET_MODE_PRECISION.
18033 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18034 for GET_MODE_PRECISION.
18035 * combine.c (update_rsp_from_reg_equal): Treat GET_MODE_PRECISION
18037 (try_combine, find_split_point, combine_simplify_rtx): Likewise.
18038 (expand_field_assignment, make_extraction): Likewise.
18039 (make_compound_operation_int, record_dead_and_set_regs_1): Likewise.
18040 (get_last_value): Likewise.
18041 * convert.c (convert_to_integer_1): Likewise.
18042 * cse.c (cse_insn): Likewise.
18043 * expr.c (expand_expr_real_1): Likewise.
18044 * lra-constraints.c (simplify_operand_subreg): Likewise.
18045 * optabs-query.c (can_atomic_load_p): Likewise.
18046 * optabs.c (expand_atomic_load): Likewise.
18047 (expand_atomic_store): Likewise.
18048 * ree.c (combine_reaching_defs): Likewise.
18049 * rtl.h (partial_subreg_p, paradoxical_subreg_p): Likewise.
18050 * rtlanal.c (nonzero_bits1, lsb_bitfield_op_p): Likewise.
18051 * tree.h (type_has_mode_precision_p): Likewise.
18052 * ubsan.c (instrument_si_overflow): Likewise.
18054 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18055 Alan Hayward <alan.hayward@arm.com>
18056 David Sherwood <david.sherwood@arm.com>
18058 * tree.h (TYPE_VECTOR_SUBPARTS): Turn into a function and handle
18059 polynomial numbers of units.
18060 (SET_TYPE_VECTOR_SUBPARTS): Likewise.
18061 (valid_vector_subparts_p): New function.
18062 (build_vector_type): Remove temporary shim and take the number
18063 of units as a poly_uint64 rather than an int.
18064 (build_opaque_vector_type): Take the number of units as a
18065 poly_uint64 rather than an int.
18066 * tree.c (build_vector_from_ctor): Handle polynomial
18067 TYPE_VECTOR_SUBPARTS.
18068 (type_hash_canon_hash, type_cache_hasher::equal): Likewise.
18069 (uniform_vector_p, vector_type_mode, build_vector): Likewise.
18070 (build_vector_from_val): If the number of units is variable,
18071 use build_vec_duplicate_cst for constant operands and
18072 VEC_DUPLICATE_EXPR otherwise.
18073 (make_vector_type): Remove temporary is_constant ().
18074 (build_vector_type, build_opaque_vector_type): Take the number of
18075 units as a poly_uint64 rather than an int.
18076 (check_vector_cst): Handle polynomial TYPE_VECTOR_SUBPARTS and
18078 * cfgexpand.c (expand_debug_expr): Likewise.
18079 * expr.c (count_type_elements, categorize_ctor_elements_1): Likewise.
18080 (store_constructor, expand_expr_real_1): Likewise.
18081 (const_scalar_mask_from_tree): Likewise.
18082 * fold-const-call.c (fold_const_reduction): Likewise.
18083 * fold-const.c (const_binop, const_unop, fold_convert_const): Likewise.
18084 (operand_equal_p, fold_vec_perm, fold_ternary_loc): Likewise.
18085 (native_encode_vector, vec_cst_ctor_to_array): Likewise.
18086 (fold_relational_const): Likewise.
18087 (native_interpret_vector): Likewise. Change the size from an
18088 int to an unsigned int.
18089 * gimple-fold.c (gimple_fold_stmt_to_constant_1): Handle polynomial
18090 TYPE_VECTOR_SUBPARTS.
18091 (gimple_fold_indirect_ref, gimple_build_vector): Likewise.
18092 (gimple_build_vector_from_val): Use VEC_DUPLICATE_EXPR when
18093 duplicating a non-constant operand into a variable-length vector.
18094 * hsa-brig.c (hsa_op_immed::emit_to_buffer): Handle polynomial
18095 TYPE_VECTOR_SUBPARTS and VECTOR_CST_NELTS.
18096 * ipa-icf.c (sem_variable::equals): Likewise.
18097 * match.pd: Likewise.
18098 * omp-simd-clone.c (simd_clone_subparts): Likewise.
18099 * print-tree.c (print_node): Likewise.
18100 * stor-layout.c (layout_type): Likewise.
18101 * targhooks.c (default_builtin_vectorization_cost): Likewise.
18102 * tree-cfg.c (verify_gimple_comparison): Likewise.
18103 (verify_gimple_assign_binary): Likewise.
18104 (verify_gimple_assign_ternary): Likewise.
18105 (verify_gimple_assign_single): Likewise.
18106 * tree-pretty-print.c (dump_generic_node): Likewise.
18107 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
18108 (simplify_bitfield_ref, is_combined_permutation_identity): Likewise.
18109 * tree-vect-data-refs.c (vect_permute_store_chain): Likewise.
18110 (vect_grouped_load_supported, vect_permute_load_chain): Likewise.
18111 (vect_shift_permute_load_chain): Likewise.
18112 * tree-vect-generic.c (nunits_for_known_piecewise_op): Likewise.
18113 (expand_vector_condition, optimize_vector_constructor): Likewise.
18114 (lower_vec_perm, get_compute_type): Likewise.
18115 * tree-vect-loop.c (vect_determine_vectorization_factor): Likewise.
18116 (get_initial_defs_for_reduction, vect_transform_loop): Likewise.
18117 * tree-vect-patterns.c (vect_recog_bool_pattern): Likewise.
18118 (vect_recog_mask_conversion_pattern): Likewise.
18119 * tree-vect-slp.c (vect_supported_load_permutation_p): Likewise.
18120 (vect_get_constant_vectors, vect_transform_slp_perm_load): Likewise.
18121 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
18122 (get_group_load_store_type, vectorizable_mask_load_store): Likewise.
18123 (vectorizable_bswap, simd_clone_subparts, vectorizable_assignment)
18124 (vectorizable_shift, vectorizable_operation, vectorizable_store)
18125 (vectorizable_load, vect_is_simple_cond, vectorizable_comparison)
18126 (supportable_widening_operation): Likewise.
18127 (supportable_narrowing_operation): Likewise.
18128 * tree-vector-builder.c (tree_vector_builder::binary_encoded_nelts):
18130 * varasm.c (output_constant): Likewise.
18132 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18133 Alan Hayward <alan.hayward@arm.com>
18134 David Sherwood <david.sherwood@arm.com>
18136 * tree-vect-data-refs.c (vect_permute_store_chain): Reorganize
18137 so that both the length == 3 and length != 3 cases set up their
18138 own permute vectors. Add comments explaining why we know the
18139 number of elements is constant.
18140 (vect_permute_load_chain): Likewise.
18142 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18143 Alan Hayward <alan.hayward@arm.com>
18144 David Sherwood <david.sherwood@arm.com>
18146 * machmode.h (mode_nunits): Change from unsigned char to
18148 (ONLY_FIXED_SIZE_MODES): New macro.
18149 (pod_mode::measurement_type, scalar_int_mode::measurement_type)
18150 (scalar_float_mode::measurement_type, scalar_mode::measurement_type)
18151 (complex_mode::measurement_type, fixed_size_mode::measurement_type):
18153 (mode_to_nunits): Return a poly_uint16 rather than an unsigned short.
18154 (GET_MODE_NUNITS): Return a constant if ONLY_FIXED_SIZE_MODES,
18155 or if measurement_type is not polynomial.
18156 * genmodes.c (ZERO_COEFFS): New macro.
18157 (emit_mode_nunits_inline): Make mode_nunits_inline return a
18159 (emit_mode_nunits): Change the type of mode_nunits to poly_uint16_pod.
18160 Use ZERO_COEFFS when emitting initializers.
18161 * data-streamer.h (bp_pack_poly_value): New function.
18162 (bp_unpack_poly_value): Likewise.
18163 * lto-streamer-in.c (lto_input_mode_table): Use bp_unpack_poly_value
18164 for GET_MODE_NUNITS.
18165 * lto-streamer-out.c (lto_write_mode_table): Use bp_pack_poly_value
18166 for GET_MODE_NUNITS.
18167 * tree.c (make_vector_type): Remove temporary shim and make
18168 the real function take the number of units as a poly_uint64
18169 rather than an int.
18170 (build_vector_type_for_mode): Handle polynomial nunits.
18171 * dwarf2out.c (loc_descriptor, add_const_value_attribute): Likewise.
18172 * emit-rtl.c (const_vec_series_p_1): Likewise.
18173 (gen_rtx_CONST_VECTOR): Likewise.
18174 * fold-const.c (test_vec_duplicate_folding): Likewise.
18175 * genrecog.c (validate_pattern): Likewise.
18176 * optabs-query.c (can_vec_perm_var_p, can_mult_highpart_p): Likewise.
18177 * optabs-tree.c (expand_vec_cond_expr_p): Likewise.
18178 * optabs.c (expand_vector_broadcast, expand_binop_directly): Likewise.
18179 (shift_amt_for_vec_perm_mask, expand_vec_perm_var): Likewise.
18180 (expand_vec_cond_expr, expand_mult_highpart): Likewise.
18181 * rtlanal.c (subreg_get_info): Likewise.
18182 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
18183 (vect_grouped_load_supported): Likewise.
18184 * tree-vect-generic.c (type_for_widest_vector_mode): Likewise.
18185 * tree-vect-loop.c (have_whole_vector_shift): Likewise.
18186 * simplify-rtx.c (simplify_unary_operation_1): Likewise.
18187 (simplify_const_unary_operation, simplify_binary_operation_1)
18188 (simplify_const_binary_operation, simplify_ternary_operation)
18189 (test_vector_ops_duplicate, test_vector_ops): Likewise.
18190 (simplify_immed_subreg): Use GET_MODE_NUNITS on a fixed_size_mode
18191 instead of CONST_VECTOR_NUNITS.
18192 * varasm.c (output_constant_pool_2): Likewise.
18193 * rtx-vector-builder.c (rtx_vector_builder::build): Only include the
18194 explicit-encoded elements in the XVEC for variable-length vectors.
18196 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18198 * lra-constraints.c (curr_insn_transform): Use partial_subreg_p.
18200 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18201 Alan Hayward <alan.hayward@arm.com>
18202 David Sherwood <david.sherwood@arm.com>
18204 * coretypes.h (fixed_size_mode): Declare.
18205 (fixed_size_mode_pod): New typedef.
18206 * builtins.h (target_builtins::x_apply_args_mode)
18207 (target_builtins::x_apply_result_mode): Change type to
18208 fixed_size_mode_pod.
18209 * builtins.c (apply_args_size, apply_result_size, result_vector)
18210 (expand_builtin_apply_args_1, expand_builtin_apply)
18211 (expand_builtin_return): Update accordingly.
18213 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18215 * cse.c (hash_rtx_cb): Hash only the encoded elements.
18216 * cselib.c (cselib_hash_rtx): Likewise.
18217 * expmed.c (make_tree): Build VECTOR_CSTs directly from the
18218 CONST_VECTOR encoding.
18220 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18221 Jeff Law <law@redhat.com>
18224 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): For
18225 noreturn probe, use gen_pop instead of ix86_emit_restore_reg_using_pop,
18226 only set RTX_FRAME_RELATED_P on both the push and pop if cfa_reg is sp
18227 and add REG_CFA_ADJUST_CFA notes in that case to both insns.
18230 * config/i386/i386.c (ix86_adjust_stack_and_probe_stack_clash): Do not
18231 explicitly probe *sp in a noreturn function if there were any callee
18232 register saves or frame pointer is needed.
18234 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18237 * cfgexpand.c (expand_debug_expr): Return NULL if mode is
18238 BLKmode for ternary, binary or unary expressions.
18241 * var-tracking.c (delete_vta_debug_insn): New inline function.
18242 (delete_vta_debug_insns): Add USE_CFG argument, if true, walk just
18243 insns from get_insns () to NULL instead of each bb separately.
18244 Use delete_vta_debug_insn. No longer static.
18245 (vt_debug_insns_local, variable_tracking_main_1): Adjust
18246 delete_vta_debug_insns callers.
18247 * rtl.h (delete_vta_debug_insns): Declare.
18248 * final.c (rest_of_handle_final): Call delete_vta_debug_insns
18249 instead of variable_tracking_main.
18251 2018-01-03 Martin Sebor <msebor@redhat.com>
18253 PR tree-optimization/83603
18254 * calls.c (maybe_warn_nonstring_arg): Avoid accessing function
18255 arguments past the endof the argument list in functions declared
18256 without a prototype.
18257 * gimple-ssa-warn-restrict.c (wrestrict_dom_walker::check_call):
18258 Avoid checking when arguments are null.
18260 2018-01-03 Martin Sebor <msebor@redhat.com>
18263 * doc/extend.texi (attribute const): Fix a typo.
18264 * ipa-pure-const.c ((warn_function_const, warn_function_pure): Avoid
18265 issuing -Wsuggest-attribute for void functions.
18267 2018-01-03 Martin Sebor <msebor@redhat.com>
18269 * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use
18270 offset_int::from instead of wide_int::to_shwi.
18271 (maybe_diag_overlap): Remove assertion.
18272 Use HOST_WIDE_INT_PRINT_DEC instead of %lli.
18273 * gimple-ssa-sprintf.c (format_directive): Same.
18274 (parse_directive): Same.
18275 (sprintf_dom_walker::compute_format_length): Same.
18276 (try_substitute_return_value): Same.
18278 2018-01-03 Jeff Law <law@redhat.com>
18280 PR middle-end/83654
18281 * explow.c (anti_adjust_stack_and_probe_stack_clash): Test a
18282 non-constant residual for zero at runtime and avoid probing in
18283 that case. Reorganize code for trailing problem to mirror handling
18286 2018-01-03 Prathamesh Kulkarni <prathamesh.kulkarni@linaro.org>
18288 PR tree-optimization/83501
18289 * tree-ssa-strlen.c (get_string_cst): New.
18290 (handle_char_store): Call get_string_cst.
18292 2018-01-03 Martin Liska <mliska@suse.cz>
18294 PR tree-optimization/83593
18295 * tree-ssa-strlen.c: Include tree-cfg.h.
18296 (strlen_check_and_optimize_stmt): Add new argument cleanup_eh.
18297 (strlen_dom_walker): Add new member variable m_cleanup_cfg.
18298 (strlen_dom_walker::strlen_dom_walker): Initialize m_cleanup_cfg
18300 (strlen_dom_walker::before_dom_children): Call
18301 gimple_purge_dead_eh_edges. Dump tranformation with details
18303 (strlen_dom_walker::before_dom_children): Update call by adding
18304 new argument cleanup_eh.
18305 (pass_strlen::execute): Return TODO_cleanup_cfg if needed.
18307 2018-01-03 Martin Liska <mliska@suse.cz>
18310 * cif-code.def (VARIADIC_THUNK): New enum value.
18311 * ipa-fnsummary.c (compute_fn_summary): Do not inline variadic
18314 2018-01-03 Jan Beulich <jbeulich@suse.com>
18316 * sse.md (mov<mode>_internal): Tighten condition for when to use
18317 vmovdqu<ssescalarsize> for TI and OI modes.
18319 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18321 Update copyright years.
18323 2018-01-03 Martin Liska <mliska@suse.cz>
18326 * ipa-visibility.c (function_and_variable_visibility): Skip
18327 functions with noipa attribure.
18329 2018-01-03 Jakub Jelinek <jakub@redhat.com>
18331 * gcc.c (process_command): Update copyright notice dates.
18332 * gcov-dump.c (print_version): Ditto.
18333 * gcov.c (print_version): Ditto.
18334 * gcov-tool.c (print_version): Ditto.
18335 * gengtype.c (create_file): Ditto.
18336 * doc/cpp.texi: Bump @copying's copyright year.
18337 * doc/cppinternals.texi: Ditto.
18338 * doc/gcc.texi: Ditto.
18339 * doc/gccint.texi: Ditto.
18340 * doc/gcov.texi: Ditto.
18341 * doc/install.texi: Ditto.
18342 * doc/invoke.texi: Ditto.
18344 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18346 * vector-builder.h (vector_builder::m_full_nelts): Change from
18347 unsigned int to poly_uint64.
18348 (vector_builder::full_nelts): Update prototype accordingly.
18349 (vector_builder::new_vector): Likewise.
18350 (vector_builder::encoded_full_vector_p): Handle polynomial full_nelts.
18351 (vector_builder::operator ==): Likewise.
18352 (vector_builder::finalize): Likewise.
18353 * int-vector-builder.h (int_vector_builder::int_vector_builder):
18354 Take the number of elements as a poly_uint64 rather than an
18356 * vec-perm-indices.h (vec_perm_indices::m_nelts_per_input): Change
18357 from unsigned int to poly_uint64.
18358 (vec_perm_indices::vec_perm_indices): Update prototype accordingly.
18359 (vec_perm_indices::new_vector): Likewise.
18360 (vec_perm_indices::length): Likewise.
18361 (vec_perm_indices::nelts_per_input): Likewise.
18362 (vec_perm_indices::input_nelts): Likewise.
18363 * vec-perm-indices.c (vec_perm_indices::new_vector): Take the
18364 number of elements per input as a poly_uint64 rather than an
18365 unsigned int. Use the original encoding for variable-length
18366 vectors, rather than clamping each individual element.
18367 For the second and subsequent elements in each pattern,
18368 clamp the step and base before clamping their sum.
18369 (vec_perm_indices::series_p): Handle polynomial element counts.
18370 (vec_perm_indices::all_in_range_p): Likewise.
18371 (vec_perm_indices_to_tree): Likewise.
18372 (vec_perm_indices_to_rtx): Likewise.
18373 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise.
18374 * tree-vector-builder.c (tree_vector_builder::new_unary_operation)
18375 (tree_vector_builder::new_binary_operation): Handle polynomial
18376 element counts. Return false if we need to know the number
18377 of elements at compile time.
18378 * fold-const.c (fold_vec_perm): Punt if the number of elements
18379 isn't known at compile time.
18381 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18383 * vec-perm-indices.h (vec_perm_builder): Change element type
18384 from HOST_WIDE_INT to poly_int64.
18385 (vec_perm_indices::element_type): Update accordingly.
18386 (vec_perm_indices::clamp): Handle polynomial element_types.
18387 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
18388 (vec_perm_indices::all_in_range_p): Likewise.
18389 (tree_to_vec_perm_builder): Check for poly_int64 trees rather
18391 * vector-builder.h (vector_builder::stepped_sequence_p): Handle
18392 polynomial vec_perm_indices element types.
18393 * int-vector-builder.h (int_vector_builder::equal_p): Likewise.
18394 * fold-const.c (fold_vec_perm): Likewise.
18395 * optabs.c (shift_amt_for_vec_perm_mask): Likewise.
18396 * tree-vect-generic.c (lower_vec_perm): Likewise.
18397 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
18398 * config/aarch64/aarch64.c (aarch64_evpc_tbl): Cast d->perm
18399 element type to HOST_WIDE_INT.
18401 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18402 Alan Hayward <alan.hayward@arm.com>
18403 David Sherwood <david.sherwood@arm.com>
18405 * alias.c (addr_side_effect_eval): Take the size as a poly_int64
18406 rather than an int. Use plus_constant.
18407 (memrefs_conflict_p): Take the sizes as poly_int64s rather than ints.
18408 Take the offset "c" as a poly_int64 rather than a HOST_WIDE_INT.
18410 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18411 Alan Hayward <alan.hayward@arm.com>
18412 David Sherwood <david.sherwood@arm.com>
18414 * calls.c (emit_call_1, expand_call): Change struct_value_size from
18415 a HOST_WIDE_INT to a poly_int64.
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 * calls.c (load_register_parameters): Cope with polynomial
18422 mode sizes. Require a constant size for BLKmode parameters
18423 that aren't described by a PARALLEL. If BLOCK_REG_PADDING
18424 forces a parameter to be padded at the lsb end in order to
18425 fill a complete number of words, require the parameter size
18426 to be ordered wrt UNITS_PER_WORD.
18428 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18429 Alan Hayward <alan.hayward@arm.com>
18430 David Sherwood <david.sherwood@arm.com>
18432 * reload1.c (spill_stack_slot_width): Change element type
18433 from unsigned int to poly_uint64_pod.
18434 (alter_reg): Treat mode sizes as polynomial.
18436 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18437 Alan Hayward <alan.hayward@arm.com>
18438 David Sherwood <david.sherwood@arm.com>
18440 * reload.c (complex_word_subreg_p): New function.
18441 (reload_inner_reg_of_subreg, push_reload): Use it.
18443 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18444 Alan Hayward <alan.hayward@arm.com>
18445 David Sherwood <david.sherwood@arm.com>
18447 * lra-constraints.c (process_alt_operands): Reject matched
18448 operands whose sizes aren't ordered.
18449 (match_reload): Refer to this check here.
18451 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18452 Alan Hayward <alan.hayward@arm.com>
18453 David Sherwood <david.sherwood@arm.com>
18455 * builtins.c (expand_ifn_atomic_compare_exchange_into_call): Assert
18456 that the mode size is in the set {1, 2, 4, 8, 16}.
18458 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18459 Alan Hayward <alan.hayward@arm.com>
18460 David Sherwood <david.sherwood@arm.com>
18462 * var-tracking.c (adjust_mems): Treat mode sizes as polynomial.
18463 Use plus_constant instead of gen_rtx_PLUS.
18465 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18466 Alan Hayward <alan.hayward@arm.com>
18467 David Sherwood <david.sherwood@arm.com>
18469 * config/cr16/cr16-protos.h (cr16_push_rounding): Declare.
18470 * config/cr16/cr16.h (PUSH_ROUNDING): Move implementation to...
18471 * config/cr16/cr16.c (cr16_push_rounding): ...this new function.
18472 * config/h8300/h8300-protos.h (h8300_push_rounding): Declare.
18473 * config/h8300/h8300.h (PUSH_ROUNDING): Move implementation to...
18474 * config/h8300/h8300.c (h8300_push_rounding): ...this new function.
18475 * config/i386/i386-protos.h (ix86_push_rounding): Declare.
18476 * config/i386/i386.h (PUSH_ROUNDING): Move implementation to...
18477 * config/i386/i386.c (ix86_push_rounding): ...this new function.
18478 * config/m32c/m32c-protos.h (m32c_push_rounding): Take and return
18480 * config/m32c/m32c.c (m32c_push_rounding): Likewise.
18481 * config/m68k/m68k-protos.h (m68k_push_rounding): Declare.
18482 * config/m68k/m68k.h (PUSH_ROUNDING): Move implementation to...
18483 * config/m68k/m68k.c (m68k_push_rounding): ...this new function.
18484 * config/pdp11/pdp11-protos.h (pdp11_push_rounding): Declare.
18485 * config/pdp11/pdp11.h (PUSH_ROUNDING): Move implementation to...
18486 * config/pdp11/pdp11.c (pdp11_push_rounding): ...this new function.
18487 * config/stormy16/stormy16-protos.h (xstormy16_push_rounding): Declare.
18488 * config/stormy16/stormy16.h (PUSH_ROUNDING): Move implementation to...
18489 * config/stormy16/stormy16.c (xstormy16_push_rounding): ...this new
18491 * expr.c (emit_move_resolve_push): Treat the input and result
18492 of PUSH_ROUNDING as a poly_int64.
18493 (emit_move_complex_push, emit_single_push_insn_1): Likewise.
18494 (emit_push_insn): Likewise.
18495 * lra-eliminations.c (mark_not_eliminable): Likewise.
18496 * recog.c (push_operand): Likewise.
18497 * reload1.c (elimination_effects): Likewise.
18498 * rtlanal.c (nonzero_bits1): Likewise.
18499 * calls.c (store_one_arg): Likewise. Require the padding to be
18500 known at compile time.
18502 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18503 Alan Hayward <alan.hayward@arm.com>
18504 David Sherwood <david.sherwood@arm.com>
18506 * expr.c (emit_single_push_insn_1): Treat mode sizes as polynomial.
18507 Use plus_constant instead of gen_rtx_PLUS.
18509 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18510 Alan Hayward <alan.hayward@arm.com>
18511 David Sherwood <david.sherwood@arm.com>
18513 * auto-inc-dec.c (set_inc_state): Take the mode size as a poly_int64
18514 rather than an int.
18516 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18517 Alan Hayward <alan.hayward@arm.com>
18518 David Sherwood <david.sherwood@arm.com>
18520 * expr.c (expand_expr_real_1): Use tree_to_poly_uint64
18521 instead of int_size_in_bytes when handling VIEW_CONVERT_EXPRs
18522 via stack temporaries. Treat the mode size as polynomial too.
18524 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18525 Alan Hayward <alan.hayward@arm.com>
18526 David Sherwood <david.sherwood@arm.com>
18528 * expr.c (expand_expr_real_2): When handling conversions involving
18529 unions, apply tree_to_poly_uint64 to the TYPE_SIZE rather than
18530 multiplying int_size_in_bytes by BITS_PER_UNIT. Treat GET_MODE_BISIZE
18531 as a poly_uint64 too.
18533 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18534 Alan Hayward <alan.hayward@arm.com>
18535 David Sherwood <david.sherwood@arm.com>
18537 * rtlanal.c (subreg_get_info): Handle polynomial mode sizes.
18539 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18540 Alan Hayward <alan.hayward@arm.com>
18541 David Sherwood <david.sherwood@arm.com>
18543 * combine.c (can_change_dest_mode): Handle polynomial
18544 REGMODE_NATURAL_SIZE.
18545 * expmed.c (store_bit_field_1): Likewise.
18546 * expr.c (store_constructor): Likewise.
18547 * emit-rtl.c (validate_subreg): Operate on polynomial mode sizes
18548 and polynomial REGMODE_NATURAL_SIZE.
18549 (gen_lowpart_common): Likewise.
18550 * reginfo.c (record_subregs_of_mode): Likewise.
18551 * rtlanal.c (read_modify_subreg_p): Likewise.
18553 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18554 Alan Hayward <alan.hayward@arm.com>
18555 David Sherwood <david.sherwood@arm.com>
18557 * internal-fn.c (expand_vector_ubsan_overflow): Handle polynomial
18558 numbers of elements.
18560 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18561 Alan Hayward <alan.hayward@arm.com>
18562 David Sherwood <david.sherwood@arm.com>
18564 * match.pd: Cope with polynomial numbers of vector elements.
18566 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18567 Alan Hayward <alan.hayward@arm.com>
18568 David Sherwood <david.sherwood@arm.com>
18570 * fold-const.c (fold_indirect_ref_1): Handle polynomial offsets
18571 in a POINTER_PLUS_EXPR.
18573 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18574 Alan Hayward <alan.hayward@arm.com>
18575 David Sherwood <david.sherwood@arm.com>
18577 * omp-simd-clone.c (simd_clone_subparts): New function.
18578 (simd_clone_init_simd_arrays): Use it instead of TYPE_VECTOR_SUBPARTS.
18579 (ipa_simd_modify_function_body): Likewise.
18581 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18582 Alan Hayward <alan.hayward@arm.com>
18583 David Sherwood <david.sherwood@arm.com>
18585 * tree-vect-generic.c (nunits_for_known_piecewise_op): New function.
18586 (expand_vector_piecewise): Use it instead of TYPE_VECTOR_SUBPARTS.
18587 (expand_vector_addition, add_rshift, expand_vector_divmod): Likewise.
18588 (expand_vector_condition, vector_element): Likewise.
18589 (subparts_gt): New function.
18590 (get_compute_type): Use subparts_gt.
18591 (count_type_subparts): Delete.
18592 (expand_vector_operations_1): Use subparts_gt instead of
18593 count_type_subparts.
18595 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18596 Alan Hayward <alan.hayward@arm.com>
18597 David Sherwood <david.sherwood@arm.com>
18599 * tree-vect-data-refs.c (vect_no_alias_p): Replace with...
18600 (vect_compile_time_alias): ...this new function. Do the calculation
18601 on poly_ints rather than trees.
18602 (vect_prune_runtime_alias_test_list): Update call accordingly.
18604 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18605 Alan Hayward <alan.hayward@arm.com>
18606 David Sherwood <david.sherwood@arm.com>
18608 * tree-vect-slp.c (vect_build_slp_tree_1): Handle polynomial
18610 (vect_schedule_slp_instance): Likewise.
18612 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18613 Alan Hayward <alan.hayward@arm.com>
18614 David Sherwood <david.sherwood@arm.com>
18616 * tree-vect-slp.c (vect_get_and_check_slp_defs): Reject
18617 constant and extern definitions for variable-length vectors.
18618 (vect_get_constant_vectors): Note that the number of units
18619 is known to be constant.
18621 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18622 Alan Hayward <alan.hayward@arm.com>
18623 David Sherwood <david.sherwood@arm.com>
18625 * tree-vect-stmts.c (vectorizable_conversion): Treat the number
18626 of units as polynomial. Choose between WIDE and NARROW based
18629 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18630 Alan Hayward <alan.hayward@arm.com>
18631 David Sherwood <david.sherwood@arm.com>
18633 * tree-vect-stmts.c (simd_clone_subparts): New function.
18634 (vectorizable_simd_clone_call): Use it instead of TYPE_VECTOR_SUBPARTS.
18636 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18637 Alan Hayward <alan.hayward@arm.com>
18638 David Sherwood <david.sherwood@arm.com>
18640 * tree-vect-stmts.c (vectorizable_call): Treat the number of
18641 vectors as polynomial. Use build_index_vector for
18642 IFN_GOMP_SIMD_LANE.
18644 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18645 Alan Hayward <alan.hayward@arm.com>
18646 David Sherwood <david.sherwood@arm.com>
18648 * tree-vect-stmts.c (get_load_store_type): Treat the number of
18649 units as polynomial. Reject VMAT_ELEMENTWISE and VMAT_STRIDED_SLP
18650 for variable-length vectors.
18651 (vectorizable_mask_load_store): Treat the number of units as
18652 polynomial, asserting that it is constant if the condition has
18653 already been enforced.
18654 (vectorizable_store, vectorizable_load): Likewise.
18656 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18657 Alan Hayward <alan.hayward@arm.com>
18658 David Sherwood <david.sherwood@arm.com>
18660 * tree-vect-loop.c (vectorizable_live_operation): Treat the number
18661 of units as polynomial. Punt if we can't tell at compile time
18662 which vector contains the final result.
18664 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18665 Alan Hayward <alan.hayward@arm.com>
18666 David Sherwood <david.sherwood@arm.com>
18668 * tree-vect-loop.c (vectorizable_induction): Treat the number
18669 of units as polynomial. Punt on SLP inductions. Use an integer
18670 VEC_SERIES_EXPR for variable-length integer reductions. Use a
18671 cast of such a series for variable-length floating-point
18674 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18675 Alan Hayward <alan.hayward@arm.com>
18676 David Sherwood <david.sherwood@arm.com>
18678 * tree.h (build_index_vector): Declare.
18679 * tree.c (build_index_vector): New function.
18680 * tree-vect-loop.c (get_initial_defs_for_reduction): Treat the number
18681 of units as polynomial, forcibly converting it to a constant if
18682 vectorizable_reduction has already enforced the condition.
18683 (vect_create_epilog_for_reduction): Likewise. Use build_index_vector
18684 to create a {1,2,3,...} vector.
18685 (vectorizable_reduction): Treat the number of units as polynomial.
18686 Choose vectype_in based on the largest scalar element size rather
18687 than the smallest number of units. Enforce the restrictions
18690 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18691 Alan Hayward <alan.hayward@arm.com>
18692 David Sherwood <david.sherwood@arm.com>
18694 * tree-vect-data-refs.c (vector_alignment_reachable_p): Treat the
18695 number of units as polynomial.
18697 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18698 Alan Hayward <alan.hayward@arm.com>
18699 David Sherwood <david.sherwood@arm.com>
18701 * target.h (vector_sizes, auto_vector_sizes): New typedefs.
18702 * target.def (autovectorize_vector_sizes): Return the vector sizes
18703 by pointer, using vector_sizes rather than a bitmask.
18704 * targhooks.h (default_autovectorize_vector_sizes): Update accordingly.
18705 * targhooks.c (default_autovectorize_vector_sizes): Likewise.
18706 * config/aarch64/aarch64.c (aarch64_autovectorize_vector_sizes):
18708 * config/arc/arc.c (arc_autovectorize_vector_sizes): Likewise.
18709 * config/arm/arm.c (arm_autovectorize_vector_sizes): Likewise.
18710 * config/i386/i386.c (ix86_autovectorize_vector_sizes): Likewise.
18711 * config/mips/mips.c (mips_autovectorize_vector_sizes): Likewise.
18712 * omp-general.c (omp_max_vf): Likewise.
18713 * omp-low.c (omp_clause_aligned_alignment): Likewise.
18714 * optabs-query.c (can_vec_mask_load_store_p): Likewise.
18715 * tree-vect-loop.c (vect_analyze_loop): Likewise.
18716 * tree-vect-slp.c (vect_slp_bb): Likewise.
18717 * doc/tm.texi: Regenerate.
18718 * tree-vectorizer.h (current_vector_size): Change from an unsigned int
18720 * tree-vect-stmts.c (get_vectype_for_scalar_type_and_size): Take
18721 the vector size as a poly_uint64 rather than an unsigned int.
18722 (current_vector_size): Change from an unsigned int to a poly_uint64.
18723 (get_vectype_for_scalar_type): Update accordingly.
18724 * tree.h (build_truth_vector_type): Take the size and number of
18725 units as a poly_uint64 rather than an unsigned int.
18726 (build_vector_type): Add a temporary overload that takes
18727 the number of units as a poly_uint64 rather than an unsigned int.
18728 * tree.c (make_vector_type): Likewise.
18729 (build_truth_vector_type): Take the number of units as a poly_uint64
18730 rather than an unsigned int.
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 * target.def (get_mask_mode): Take the number of units and length
18737 as poly_uint64s rather than unsigned ints.
18738 * targhooks.h (default_get_mask_mode): Update accordingly.
18739 * targhooks.c (default_get_mask_mode): Likewise.
18740 * config/i386/i386.c (ix86_get_mask_mode): Likewise.
18741 * doc/tm.texi: Regenerate.
18743 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18744 Alan Hayward <alan.hayward@arm.com>
18745 David Sherwood <david.sherwood@arm.com>
18747 * omp-general.h (omp_max_vf): Return a poly_uint64 instead of an int.
18748 * omp-general.c (omp_max_vf): Likewise.
18749 * omp-expand.c (omp_adjust_chunk_size): Update call to omp_max_vf.
18750 (expand_omp_simd): Handle polynomial safelen.
18751 * omp-low.c (omplow_simd_context): Add a default constructor.
18752 (omplow_simd_context::max_vf): Change from int to poly_uint64.
18753 (lower_rec_simd_input_clauses): Update accordingly.
18754 (lower_rec_input_clauses): 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-vectorizer.h (vect_nunits_for_cost): New function.
18761 * tree-vect-loop.c (vect_model_reduction_cost): Use it.
18762 * tree-vect-slp.c (vect_analyze_slp_cost_1): Likewise.
18763 (vect_analyze_slp_cost): Likewise.
18764 * tree-vect-stmts.c (vect_model_store_cost): Likewise.
18765 (vect_model_load_cost): Likewise.
18767 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18768 Alan Hayward <alan.hayward@arm.com>
18769 David Sherwood <david.sherwood@arm.com>
18771 * tree-vect-slp.c (vect_record_max_nunits, vect_build_slp_tree_1)
18772 (vect_build_slp_tree_2, vect_build_slp_tree): Change max_nunits
18773 from an unsigned int * to a poly_uint64_pod *.
18774 (calculate_unrolling_factor): New function.
18775 (vect_analyze_slp_instance): Use it. Track polynomial max_nunits.
18777 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18778 Alan Hayward <alan.hayward@arm.com>
18779 David Sherwood <david.sherwood@arm.com>
18781 * tree-vectorizer.h (_slp_instance::unrolling_factor): Change
18782 from an unsigned int to a poly_uint64.
18783 (_loop_vec_info::slp_unrolling_factor): Likewise.
18784 (_loop_vec_info::vectorization_factor): Change from an int
18786 (MAX_VECTORIZATION_FACTOR): Bump from 64 to INT_MAX.
18787 (vect_get_num_vectors): New function.
18788 (vect_update_max_nunits, vect_vf_for_cost): Likewise.
18789 (vect_get_num_copies): Use vect_get_num_vectors.
18790 (vect_analyze_data_ref_dependences): Change max_vf from an int *
18791 to an unsigned int *.
18792 (vect_analyze_data_refs): Change min_vf from an int * to a
18794 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
18795 than an unsigned HOST_WIDE_INT.
18796 * tree-vect-data-refs.c (vect_analyze_possibly_independent_ddr)
18797 (vect_analyze_data_ref_dependence): Change max_vf from an int *
18798 to an unsigned int *.
18799 (vect_analyze_data_ref_dependences): Likewise.
18800 (vect_compute_data_ref_alignment): Handle polynomial vf.
18801 (vect_enhance_data_refs_alignment): Likewise.
18802 (vect_prune_runtime_alias_test_list): Likewise.
18803 (vect_shift_permute_load_chain): Likewise.
18804 (vect_supportable_dr_alignment): Likewise.
18805 (dependence_distance_ge_vf): Take the vectorization factor as a
18806 poly_uint64 rather than an unsigned HOST_WIDE_INT.
18807 (vect_analyze_data_refs): Change min_vf from an int * to a
18809 * tree-vect-loop-manip.c (vect_gen_scalar_loop_niters): Take
18810 vfm1 as a poly_uint64 rather than an int. Make the same change
18811 for the returned bound_scalar.
18812 (vect_gen_vector_loop_niters): Handle polynomial vf.
18813 (vect_do_peeling): Likewise. Update call to
18814 vect_gen_scalar_loop_niters and handle polynomial bound_scalars.
18815 (vect_gen_vector_loop_niters_mult_vf): Assert that the vf must
18817 * tree-vect-loop.c (vect_determine_vectorization_factor)
18818 (vect_update_vf_for_slp, vect_analyze_loop_2): Handle polynomial vf.
18819 (vect_get_known_peeling_cost): Likewise.
18820 (vect_estimate_min_profitable_iters, vectorizable_reduction): Likewise.
18821 (vect_worthwhile_without_simd_p, vectorizable_induction): Likewise.
18822 (vect_transform_loop): Likewise. Use the lowest possible VF when
18823 updating the upper bounds of the loop.
18824 (vect_min_worthwhile_factor): Make static. Return an unsigned int
18825 rather than an int.
18826 * tree-vect-slp.c (vect_attempt_slp_rearrange_stmts): Cope with
18827 polynomial unroll factors.
18828 (vect_analyze_slp_cost_1, vect_analyze_slp_instance): Likewise.
18829 (vect_make_slp_decision): Likewise.
18830 (vect_supported_load_permutation_p): Likewise, and polynomial
18832 (vect_analyze_slp_cost): Handle polynomial vf.
18833 (vect_slp_analyze_node_operations): Likewise.
18834 (vect_slp_analyze_bb_1): Likewise.
18835 (vect_transform_slp_perm_load): Take the vf as a poly_uint64 rather
18836 than an unsigned HOST_WIDE_INT.
18837 * tree-vect-stmts.c (vectorizable_simd_clone_call, vectorizable_store)
18838 (vectorizable_load): Handle polynomial vf.
18839 * tree-vectorizer.c (simduid_to_vf::vf): Change from an int to
18841 (adjust_simduid_builtins, shrink_simd_arrays): Update accordingly.
18843 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18844 Alan Hayward <alan.hayward@arm.com>
18845 David Sherwood <david.sherwood@arm.com>
18847 * match.pd: Handle bit operations involving three constants
18848 and try to fold one pair.
18850 2018-01-03 Richard Sandiford <richard.sandiford@linaro.org>
18852 * tree-vect-loop-manip.c: Include gimple-fold.h.
18853 (slpeel_make_loop_iterate_ntimes): Add step, final_iv and
18854 niters_maybe_zero parameters. Handle other cases besides a step of 1.
18855 (vect_gen_vector_loop_niters): Add a step_vector_ptr parameter.
18856 Add a path that uses a step of VF instead of 1, but disable it
18858 (vect_do_peeling): Add step_vector, niters_vector_mult_vf_var
18859 and niters_no_overflow parameters. Update calls to
18860 slpeel_make_loop_iterate_ntimes and vect_gen_vector_loop_niters.
18861 Create a new SSA name if the latter choses to use a ste other
18862 than zero, and return it via niters_vector_mult_vf_var.
18863 * tree-vect-loop.c (vect_transform_loop): Update calls to
18864 vect_do_peeling, vect_gen_vector_loop_niters and
18865 slpeel_make_loop_iterate_ntimes.
18866 * tree-vectorizer.h (slpeel_make_loop_iterate_ntimes, vect_do_peeling)
18867 (vect_gen_vector_loop_niters): Update declarations after above changes.
18869 2018-01-02 Michael Meissner <meissner@linux.vnet.ibm.com>
18871 * config/rs6000/rs6000.md (floor<mode>2): Add support for IEEE
18872 128-bit round to integer instructions.
18873 (ceil<mode>2): Likewise.
18874 (btrunc<mode>2): Likewise.
18875 (round<mode>2): Likewise.
18877 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
18879 * config/rs6000/rs6000-string.c (expand_block_move): Allow the use of
18880 unaligned VSX load/store on P8/P9.
18881 (expand_block_clear): Allow the use of unaligned VSX
18882 load/store on P8/P9.
18884 2018-01-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
18886 * config/rs6000/rs6000-p8swap.c (swap_feeds_both_load_and_store):
18888 (rs6000_analyze_swaps): Mark a web unoptimizable if it contains a
18889 swap associated with both a load and a store.
18891 2018-01-02 Andrew Waterman <andrew@sifive.com>
18893 * config/riscv/linux.h (ICACHE_FLUSH_FUNC): New.
18894 * config/riscv/riscv.md (clear_cache): Use it.
18896 2018-01-02 Artyom Skrobov <tyomitch@gmail.com>
18898 * web.c: Remove out-of-date comment.
18900 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18902 * expr.c (fixup_args_size_notes): Check that any existing
18903 REG_ARGS_SIZE notes are correct, and don't try to re-add them.
18904 (emit_single_push_insn_1): Move stack_pointer_delta adjustment to...
18905 (emit_single_push_insn): ...here.
18907 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18909 * rtl.h (CONST_VECTOR_ELT): Redefine to const_vector_elt.
18910 (const_vector_encoded_nelts): New function.
18911 (CONST_VECTOR_NUNITS): Redefine to use GET_MODE_NUNITS.
18912 (const_vector_int_elt, const_vector_elt): Declare.
18913 * emit-rtl.c (const_vector_int_elt_1): New function.
18914 (const_vector_elt): Likewise.
18915 * simplify-rtx.c (simplify_immed_subreg): Avoid taking the address
18916 of CONST_VECTOR_ELT.
18918 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18920 * expr.c: Include rtx-vector-builder.h.
18921 (const_vector_mask_from_tree): Use rtx_vector_builder and operate
18922 directly on the tree encoding.
18923 (const_vector_from_tree): Likewise.
18924 * optabs.c: Include rtx-vector-builder.h.
18925 (expand_vec_perm_var): Use rtx_vector_builder and create a repeating
18926 sequence of "u" values.
18927 * vec-perm-indices.c: Include rtx-vector-builder.h.
18928 (vec_perm_indices_to_rtx): Use rtx_vector_builder and operate
18929 directly on the vec_perm_indices encoding.
18931 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18933 * doc/rtl.texi (const_vector): Describe new encoding scheme.
18934 * Makefile.in (OBJS): Add rtx-vector-builder.o.
18935 * rtx-vector-builder.h: New file.
18936 * rtx-vector-builder.c: Likewise.
18937 * rtl.h (rtx_def::u2): Add a const_vector field.
18938 (CONST_VECTOR_NPATTERNS): New macro.
18939 (CONST_VECTOR_NELTS_PER_PATTERN): Likewise.
18940 (CONST_VECTOR_DUPLICATE_P): Likewise.
18941 (CONST_VECTOR_STEPPED_P): Likewise.
18942 (CONST_VECTOR_ENCODED_ELT): Likewise.
18943 (const_vec_duplicate_p): Check for a duplicated vector encoding.
18944 (unwrap_const_vec_duplicate): Likewise.
18945 (const_vec_series_p): Check for a non-duplicated vector encoding.
18946 Say that the function only returns true for integer vectors.
18947 * emit-rtl.c: Include rtx-vector-builder.h.
18948 (gen_const_vec_duplicate_1): Delete.
18949 (gen_const_vector): Call gen_const_vec_duplicate instead of
18950 gen_const_vec_duplicate_1.
18951 (const_vec_series_p_1): Operate directly on the CONST_VECTOR encoding.
18952 (gen_const_vec_duplicate): Use rtx_vector_builder.
18953 (gen_const_vec_series): Likewise.
18954 (gen_rtx_CONST_VECTOR): Likewise.
18955 * config/powerpcspe/powerpcspe.c: Include rtx-vector-builder.h.
18956 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
18957 Build a new vector rather than modifying a CONST_VECTOR in-place.
18958 (handle_special_swappables): Update call accordingly.
18959 * config/rs6000/rs6000-p8swap.c: Include rtx-vector-builder.h.
18960 (swap_const_vector_halves): Take an rtx pointer rather than rtx.
18961 Build a new vector rather than modifying a CONST_VECTOR in-place.
18962 (handle_special_swappables): Update call accordingly.
18964 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18966 * simplify-rtx.c (simplify_const_binary_operation): Use
18967 CONST_VECTOR_ELT instead of XVECEXP.
18969 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18971 * tree-cfg.c (verify_gimple_assign_ternary): Allow the size of
18972 the selector elements to be different from the data elements
18973 if the selector is a VECTOR_CST.
18974 * tree-vect-stmts.c (vect_gen_perm_mask_any): Use a vector of
18975 ssizetype for the selector.
18977 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18979 * optabs.c (shift_amt_for_vec_perm_mask): Try using series_p
18980 before testing each element individually.
18981 * tree-vect-generic.c (lower_vec_perm): Likewise.
18983 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
18985 * selftest.h (selftest::vec_perm_indices_c_tests): Declare.
18986 * selftest-run-tests.c (selftest::run_tests): Call it.
18987 * vector-builder.h (vector_builder::operator ==): New function.
18988 (vector_builder::operator !=): Likewise.
18989 * vec-perm-indices.h (vec_perm_indices::series_p): Declare.
18990 (vec_perm_indices::all_from_input_p): New function.
18991 * vec-perm-indices.c (vec_perm_indices::series_p): Likewise.
18992 (test_vec_perm_12, selftest::vec_perm_indices_c_tests): Likewise.
18993 * fold-const.c (fold_ternary_loc): Use tree_to_vec_perm_builder
18994 instead of reading the VECTOR_CST directly. Detect whether both
18995 vector inputs are the same before constructing the vec_perm_indices,
18996 and update the number of inputs argument accordingly. Use the
18997 utility functions added above. Only construct sel2 if we need to.
18999 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19001 * optabs.c (expand_vec_perm_var): Use an explicit encoding for
19002 the broadcast of the low byte.
19003 (expand_mult_highpart): Use an explicit encoding for the permutes.
19004 * optabs-query.c (can_mult_highpart_p): Likewise.
19005 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Likewise.
19006 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19007 (vectorizable_bswap): Likewise.
19008 * tree-vect-data-refs.c (vect_grouped_store_supported): Use an
19009 explicit encoding for the power-of-2 permutes.
19010 (vect_permute_store_chain): Likewise.
19011 (vect_grouped_load_supported): Likewise.
19012 (vect_permute_load_chain): Likewise.
19014 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19016 * vec-perm-indices.h (vec_perm_indices_to_tree): Declare.
19017 * vec-perm-indices.c (vec_perm_indices_to_tree): New function.
19018 * tree-ssa-forwprop.c (simplify_vector_constructor): Use it.
19019 * tree-vect-slp.c (vect_transform_slp_perm_load): Likewise.
19020 * tree-vect-stmts.c (vectorizable_bswap): Likewise.
19021 (vect_gen_perm_mask_any): Likewise.
19023 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19025 * int-vector-builder.h: New file.
19026 * vec-perm-indices.h: Include int-vector-builder.h.
19027 (vec_perm_indices): Redefine as an int_vector_builder.
19028 (auto_vec_perm_indices): Delete.
19029 (vec_perm_builder): Redefine as a stand-alone class.
19030 (vec_perm_indices::vec_perm_indices): New function.
19031 (vec_perm_indices::clamp): Likewise.
19032 * vec-perm-indices.c: Include fold-const.h and tree-vector-builder.h.
19033 (vec_perm_indices::new_vector): New function.
19034 (vec_perm_indices::new_expanded_vector): Update for new
19035 vec_perm_indices class.
19036 (vec_perm_indices::rotate_inputs): New function.
19037 (vec_perm_indices::all_in_range_p): Operate directly on the
19038 encoded form, without computing elided elements.
19039 (tree_to_vec_perm_builder): Operate directly on the VECTOR_CST
19040 encoding. Update for new vec_perm_indices class.
19041 * optabs.c (expand_vec_perm_const): Create a vec_perm_indices for
19042 the given vec_perm_builder.
19043 (expand_vec_perm_var): Update vec_perm_builder constructor.
19044 (expand_mult_highpart): Use vec_perm_builder instead of
19045 auto_vec_perm_indices.
19046 * optabs-query.c (can_mult_highpart_p): Use vec_perm_builder and
19047 vec_perm_indices instead of auto_vec_perm_indices. Use a single
19048 or double series encoding as appropriate.
19049 * fold-const.c (fold_ternary_loc): Use vec_perm_builder and
19050 vec_perm_indices instead of auto_vec_perm_indices.
19051 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19052 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19053 (vect_permute_store_chain): Likewise.
19054 (vect_grouped_load_supported): Likewise.
19055 (vect_permute_load_chain): Likewise.
19056 (vect_shift_permute_load_chain): Likewise.
19057 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19058 (vect_transform_slp_perm_load): Likewise.
19059 (vect_schedule_slp_instance): Likewise.
19060 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19061 (vectorizable_mask_load_store): Likewise.
19062 (vectorizable_bswap): Likewise.
19063 (vectorizable_store): Likewise.
19064 (vectorizable_load): Likewise.
19065 * tree-vect-generic.c (lower_vec_perm): Use vec_perm_builder and
19066 vec_perm_indices instead of auto_vec_perm_indices. Use
19067 tree_to_vec_perm_builder to read the vector from a tree.
19068 * tree-vect-loop.c (calc_vec_perm_mask_for_shift): Take a
19069 vec_perm_builder instead of a vec_perm_indices.
19070 (have_whole_vector_shift): Use vec_perm_builder and
19071 vec_perm_indices instead of auto_vec_perm_indices. Leave the
19072 truncation to calc_vec_perm_mask_for_shift.
19073 (vect_create_epilog_for_reduction): Likewise.
19074 * config/aarch64/aarch64.c (expand_vec_perm_d::perm): Change
19075 from auto_vec_perm_indices to vec_perm_indices.
19076 (aarch64_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19077 instead of changing individual elements.
19078 (aarch64_vectorize_vec_perm_const): Use new_vector to install
19079 the vector in d.perm.
19080 * config/arm/arm.c (expand_vec_perm_d::perm): Change
19081 from auto_vec_perm_indices to vec_perm_indices.
19082 (arm_expand_vec_perm_const_1): Use rotate_inputs on d.perm
19083 instead of changing individual elements.
19084 (arm_vectorize_vec_perm_const): Use new_vector to install
19085 the vector in d.perm.
19086 * config/powerpcspe/powerpcspe.c (rs6000_expand_extract_even):
19087 Update vec_perm_builder constructor.
19088 (rs6000_expand_interleave): Likewise.
19089 * config/rs6000/rs6000.c (rs6000_expand_extract_even): Likewise.
19090 (rs6000_expand_interleave): Likewise.
19092 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19094 * optabs-query.c (can_vec_perm_var_p): Check whether lowering
19095 to qimode could truncate the indices.
19096 * optabs.c (expand_vec_perm_var): Likewise.
19098 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19100 * Makefile.in (OBJS): Add vec-perm-indices.o.
19101 * vec-perm-indices.h: New file.
19102 * vec-perm-indices.c: Likewise.
19103 * target.h (vec_perm_indices): Replace with a forward class
19105 (auto_vec_perm_indices): Move to vec-perm-indices.h.
19106 * optabs.h: Include vec-perm-indices.h.
19107 (expand_vec_perm): Delete.
19108 (selector_fits_mode_p, expand_vec_perm_var): Declare.
19109 (expand_vec_perm_const): Declare.
19110 * target.def (vec_perm_const_ok): Replace with...
19111 (vec_perm_const): ...this new hook.
19112 * doc/tm.texi.in (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Replace with...
19113 (TARGET_VECTORIZE_VEC_PERM_CONST): ...this new hook.
19114 * doc/tm.texi: Regenerate.
19115 * optabs.def (vec_perm_const): Delete.
19116 * doc/md.texi (vec_perm_const): Likewise.
19117 (vec_perm): Refer to TARGET_VECTORIZE_VEC_PERM_CONST.
19118 * expr.c (expand_expr_real_2): Use expand_vec_perm_const rather than
19119 expand_vec_perm for constant permutation vectors. Assert that
19120 the mode of variable permutation vectors is the integer equivalent
19121 of the mode that is being permuted.
19122 * optabs-query.h (selector_fits_mode_p): Declare.
19123 * optabs-query.c: Include vec-perm-indices.h.
19124 (selector_fits_mode_p): New function.
19125 (can_vec_perm_const_p): Check whether targetm.vectorize.vec_perm_const
19126 is defined, instead of checking whether the vec_perm_const_optab
19127 exists. Use targetm.vectorize.vec_perm_const instead of
19128 targetm.vectorize.vec_perm_const_ok. Check whether the indices
19129 fit in the vector mode before using a variable permute.
19130 * optabs.c (shift_amt_for_vec_perm_mask): Take a mode and a
19131 vec_perm_indices instead of an rtx.
19132 (expand_vec_perm): Replace with...
19133 (expand_vec_perm_const): ...this new function. Take the selector
19134 as a vec_perm_indices rather than an rtx. Also take the mode of
19135 the selector. Update call to shift_amt_for_vec_perm_mask.
19136 Use targetm.vectorize.vec_perm_const instead of vec_perm_const_optab.
19137 Use vec_perm_indices::new_expanded_vector to expand the original
19138 selector into bytes. Check whether the indices fit in the vector
19139 mode before using a variable permute.
19140 (expand_vec_perm_var): Make global.
19141 (expand_mult_highpart): Use expand_vec_perm_const.
19142 * fold-const.c: Includes vec-perm-indices.h.
19143 * tree-ssa-forwprop.c: Likewise.
19144 * tree-vect-data-refs.c: Likewise.
19145 * tree-vect-generic.c: Likewise.
19146 * tree-vect-loop.c: Likewise.
19147 * tree-vect-slp.c: Likewise.
19148 * tree-vect-stmts.c: Likewise.
19149 * config/aarch64/aarch64-protos.h (aarch64_expand_vec_perm_const):
19151 * config/aarch64/aarch64-simd.md (vec_perm_const<mode>): Delete.
19152 * config/aarch64/aarch64.c (aarch64_expand_vec_perm_const)
19153 (aarch64_vectorize_vec_perm_const_ok): Fuse into...
19154 (aarch64_vectorize_vec_perm_const): ...this new function.
19155 (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19156 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19157 * config/arm/arm-protos.h (arm_expand_vec_perm_const): Delete.
19158 * config/arm/vec-common.md (vec_perm_const<mode>): Delete.
19159 * config/arm/arm.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19160 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19161 (arm_expand_vec_perm_const, arm_vectorize_vec_perm_const_ok): Merge
19163 (arm_vectorize_vec_perm_const): ...this new function. Explicitly
19164 check for NEON modes.
19165 * config/i386/i386-protos.h (ix86_expand_vec_perm_const): Delete.
19166 * config/i386/sse.md (VEC_PERM_CONST, vec_perm_const<mode>): Delete.
19167 * config/i386/i386.c (ix86_expand_vec_perm_const_1): Update comment.
19168 (ix86_expand_vec_perm_const, ix86_vectorize_vec_perm_const_ok): Merge
19170 (ix86_vectorize_vec_perm_const): ...this new function. Incorporate
19171 the old VEC_PERM_CONST conditions.
19172 * config/ia64/ia64-protos.h (ia64_expand_vec_perm_const): Delete.
19173 * config/ia64/vect.md (vec_perm_const<mode>): Delete.
19174 * config/ia64/ia64.c (ia64_expand_vec_perm_const)
19175 (ia64_vectorize_vec_perm_const_ok): Merge into...
19176 (ia64_vectorize_vec_perm_const): ...this new function.
19177 * config/mips/loongson.md (vec_perm_const<mode>): Delete.
19178 * config/mips/mips-msa.md (vec_perm_const<mode>): Delete.
19179 * config/mips/mips-ps-3d.md (vec_perm_constv2sf): Delete.
19180 * config/mips/mips-protos.h (mips_expand_vec_perm_const): Delete.
19181 * config/mips/mips.c (mips_expand_vec_perm_const)
19182 (mips_vectorize_vec_perm_const_ok): Merge into...
19183 (mips_vectorize_vec_perm_const): ...this new function.
19184 * config/powerpcspe/altivec.md (vec_perm_constv16qi): Delete.
19185 * config/powerpcspe/paired.md (vec_perm_constv2sf): Delete.
19186 * config/powerpcspe/spe.md (vec_perm_constv2si): Delete.
19187 * config/powerpcspe/vsx.md (vec_perm_const<mode>): Delete.
19188 * config/powerpcspe/powerpcspe-protos.h (altivec_expand_vec_perm_const)
19189 (rs6000_expand_vec_perm_const): Delete.
19190 * config/powerpcspe/powerpcspe.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK):
19192 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19193 (altivec_expand_vec_perm_const_le): Take each operand individually.
19194 Operate on constant selectors rather than rtxes.
19195 (altivec_expand_vec_perm_const): Likewise. Update call to
19196 altivec_expand_vec_perm_const_le.
19197 (rs6000_expand_vec_perm_const): Delete.
19198 (rs6000_vectorize_vec_perm_const_ok): Delete.
19199 (rs6000_vectorize_vec_perm_const): New function.
19200 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19201 an element count and rtx array.
19202 (rs6000_expand_extract_even): Update call accordingly.
19203 (rs6000_expand_interleave): Likewise.
19204 * config/rs6000/altivec.md (vec_perm_constv16qi): Delete.
19205 * config/rs6000/paired.md (vec_perm_constv2sf): Delete.
19206 * config/rs6000/vsx.md (vec_perm_const<mode>): Delete.
19207 * config/rs6000/rs6000-protos.h (altivec_expand_vec_perm_const)
19208 (rs6000_expand_vec_perm_const): Delete.
19209 * config/rs6000/rs6000.c (TARGET_VECTORIZE_VEC_PERM_CONST_OK): Delete.
19210 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19211 (altivec_expand_vec_perm_const_le): Take each operand individually.
19212 Operate on constant selectors rather than rtxes.
19213 (altivec_expand_vec_perm_const): Likewise. Update call to
19214 altivec_expand_vec_perm_const_le.
19215 (rs6000_expand_vec_perm_const): Delete.
19216 (rs6000_vectorize_vec_perm_const_ok): Delete.
19217 (rs6000_vectorize_vec_perm_const): New function. Remove stray
19218 reference to the SPE evmerge intructions.
19219 (rs6000_do_expand_vec_perm): Take a vec_perm_builder instead of
19220 an element count and rtx array.
19221 (rs6000_expand_extract_even): Update call accordingly.
19222 (rs6000_expand_interleave): Likewise.
19223 * config/sparc/sparc.md (vec_perm_constv8qi): Delete in favor of...
19224 * config/sparc/sparc.c (sparc_vectorize_vec_perm_const): ...this
19226 (TARGET_VECTORIZE_VEC_PERM_CONST): Redefine.
19228 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19230 * optabs.c (expand_vec_perm_1): Assert that SEL has an integer
19231 vector mode and that that mode matches the mode of the data
19233 (expand_vec_perm): Split handling of non-CONST_VECTOR selectors
19234 out into expand_vec_perm_var. Do all CONST_VECTOR handling here,
19235 directly using expand_vec_perm_1 when forcing selectors into
19237 (expand_vec_perm_var): New function, split out from expand_vec_perm.
19239 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19241 * optabs-query.h (can_vec_perm_p): Delete.
19242 (can_vec_perm_var_p, can_vec_perm_const_p): Declare.
19243 * optabs-query.c (can_vec_perm_p): Split into...
19244 (can_vec_perm_var_p, can_vec_perm_const_p): ...these two functions.
19245 (can_mult_highpart_p): Use can_vec_perm_const_p to test whether a
19246 particular selector is valid.
19247 * tree-ssa-forwprop.c (simplify_vector_constructor): Likewise.
19248 * tree-vect-data-refs.c (vect_grouped_store_supported): Likewise.
19249 (vect_grouped_load_supported): Likewise.
19250 (vect_shift_permute_load_chain): Likewise.
19251 * tree-vect-slp.c (vect_build_slp_tree_1): Likewise.
19252 (vect_transform_slp_perm_load): Likewise.
19253 * tree-vect-stmts.c (perm_mask_for_reverse): Likewise.
19254 (vectorizable_bswap): Likewise.
19255 (vect_gen_perm_mask_checked): Likewise.
19256 * fold-const.c (fold_ternary_loc): Likewise. Don't take
19257 implementations of variable permutation vectors into account
19258 when deciding which selector to use.
19259 * tree-vect-loop.c (have_whole_vector_shift): Don't check whether
19260 vec_perm_const_optab is supported; instead use can_vec_perm_const_p
19261 with a false third argument.
19262 * tree-vect-generic.c (lower_vec_perm): Use can_vec_perm_const_p
19263 to test whether the constant selector is valid and can_vec_perm_var_p
19264 to test whether a variable selector is valid.
19266 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19268 * optabs-query.h (can_vec_perm_p): Take a const vec_perm_indices *.
19269 * optabs-query.c (can_vec_perm_p): Likewise.
19270 * fold-const.c (fold_vec_perm): Take a const vec_perm_indices &
19271 instead of vec_perm_indices.
19272 * tree-vectorizer.h (vect_gen_perm_mask_any): Likewise,
19273 (vect_gen_perm_mask_checked): Likewise,
19274 * tree-vect-stmts.c (vect_gen_perm_mask_any): Likewise,
19275 (vect_gen_perm_mask_checked): Likewise,
19277 2018-01-02 Richard Sandiford <richard.sandiford@linaro.org>
19279 * optabs-query.h (qimode_for_vec_perm): Declare.
19280 * optabs-query.c (can_vec_perm_p): Split out qimode search to...
19281 (qimode_for_vec_perm): ...this new function.
19282 * optabs.c (expand_vec_perm): Use qimode_for_vec_perm.
19284 2018-01-02 Aaron Sawdey <acsawdey@linux.vnet.ibm.com>
19286 * rtlanal.c (canonicalize_condition): Return 0 if final rtx
19287 does not have a conditional at the top.
19289 2018-01-02 Richard Biener <rguenther@suse.de>
19291 * ipa-inline.c (big_speedup_p): Fix expression.
19293 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
19296 * config/i386/x86-tune-costs.h: Increase cost of integer load costs
19299 2018-01-02 Jan Hubicka <hubicka@ucw.cz>
19303 * x86-tune-costs.h (generic_cost): Reduce cost of FDIV 20->17,
19304 cost of sqrt 20->14, DIVSS 18->13, DIVSD 32->17, SQRtSS 30->14
19305 and SQRTsD 58->18, cond_not_taken_branch_cost. 2->1. Increase
19306 cond_taken_branch_cost 3->4.
19308 2018-01-01 Jakub Jelinek <jakub@redhat.com>
19310 PR tree-optimization/83581
19311 * tree-loop-distribution.c (pass_loop_distribution::execute): Return
19312 TODO_cleanup_cfg if any changes have been made.
19314 PR middle-end/83608
19315 * expr.c (store_expr_with_bounds): Use simplify_gen_subreg instead of
19316 convert_modes if target mode has the right side, but different mode
19319 PR middle-end/83609
19320 * expr.c (expand_assignment): Fix up a typo in simplify_gen_subreg
19321 last argument when extracting from CONCAT. If either from_real or
19322 from_imag is NULL, use expansion through memory. If result is not
19323 a CONCAT and simplify_gen_subreg fails, try to simplify_gen_subreg
19324 the parts directly to inner mode, if even that fails, use expansion
19327 PR middle-end/83623
19328 * expmed.c (expand_shift_1): For 2-byte rotates by BITS_PER_UNIT,
19329 check for bswap in mode rather than HImode and use that in expand_unop
19332 Copyright (C) 2018 Free Software Foundation, Inc.
19334 Copying and distribution of this file, with or without modification,
19335 are permitted in any medium without royalty provided the copyright
19336 notice and this notice are preserved.